|
|
@@ -0,0 +1,95 @@
|
|
|
+<template>
|
|
|
+ <div class="ele-body">
|
|
|
+ <el-card shadow="never">
|
|
|
+ <search ref="search" @search="reload"></search>
|
|
|
+ <ele-pro-table ref="table" :columns="columns" :datasource="datasource" :pageSize="20" :pageSizes="[20, 40, 60,80, 100]">
|
|
|
+ <!-- 表头工具栏 -->
|
|
|
+ <template v-slot:toolbar>
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-slot:code="{ row }">
|
|
|
+ <el-link type="primary" :underline="false">
|
|
|
+ {{ row.code }}
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import search from './components/search.vue';
|
|
|
+
|
|
|
+import { getSampleSmallWhole } from '@/api/samplemanagement';
|
|
|
+
|
|
|
+import dictMixins from '@/mixins/dictMixins';
|
|
|
+
|
|
|
+export default {
|
|
|
+ mixins: [dictMixins],
|
|
|
+ components: {
|
|
|
+ search,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ columns: [
|
|
|
+ {type: 'index',columnKey: 'index',align: 'center',label: '序号',width: 55,showOverflowTooltip: true},
|
|
|
+ { label: '样品编码', prop: 'sampleCode', width: '150', align: 'center', showOverflowTooltip: true, slot: 'sampleCode' },
|
|
|
+ { label: '编码', prop: 'categoryCode', width: '150', align: 'center', showOverflowTooltip: true, slot: 'categoryCode' },
|
|
|
+ { label: '名称', prop: 'categoryName', width: '150', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '批次号', prop: 'batchNo', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '发货条码', prop: 'barcodes', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '包装编码', prop: 'packageNo', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '包装数量', prop: 'packingQuantity', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '包装单位', prop: 'packingUnit', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '计量数量', prop: 'measureQuantity', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '计量单位', prop: 'measureUnit', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '物料代号', prop: 'materielDesignation', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '客户代号', prop: 'clientCode', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '刻码', prop: 'engrave', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '仓库', prop: 'warehouseName', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '货区', prop: 'areaName', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '货架', prop: 'goodsShelfName', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '货位', prop: 'goodsAllocationName', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '生产日期', prop: 'productionDate', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '采购日期', prop: 'purchaseDate', align: 'center', showOverflowTooltip: true },
|
|
|
+ { label: '重量', prop: 'weight', align: 'center', showOverflowTooltip: true, fixed: 'right' },
|
|
|
+ { label: '重量单位', prop: 'weightUnit', align: 'center', showOverflowTooltip: true, fixed: 'right' },
|
|
|
+ {
|
|
|
+ label: '处置状态', prop: 'disposalStatus', align: 'center', showOverflowTooltip: true, fixed: 'right', formatter: (row, column, cellValue) => {
|
|
|
+ return cellValue == 1 ? '返工' : cellValue == 2 ? '返修' : cellValue == 3 ? '报废' : cellValue == 4 ? '降级使用' :
|
|
|
+ cellValue == 5 ? '让步接收' : cellValue == 6 ? '留样' : cellValue == 7 ? '消耗' : cellValue == 8 ? '回用' : '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { label: '处置时间', prop: 'disposeTime', align: 'center', showOverflowTooltip: true, fixed: 'right' },
|
|
|
+ {
|
|
|
+ label: '质检状态', prop: 'qualityStatus', align: 'center', showOverflowTooltip: true, fixed: 'right', formatter: (row, column, cellValue) => {
|
|
|
+ return cellValue == 0 ? '未检' : cellValue == 1 ? '已检' : cellValue == 2 ? '待检' : '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '质检结果', prop: 'qualityResults', align: 'center', showOverflowTooltip: true, fixed: 'right', formatter: (row, column, cellValue) => {
|
|
|
+ return cellValue == 1 ? '合格' : cellValue == 2 ? '不合格' : '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ // this.requestDict('取样类型');
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ datasource({ page, where, limit }) {
|
|
|
+ where.conditionType = 1;
|
|
|
+ return getSampleSmallWhole({
|
|
|
+ ...where,
|
|
|
+ pageNum: page,
|
|
|
+ size: limit
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ reload(where) {
|
|
|
+ this.$refs.table.reload({ page: 1, where });
|
|
|
+ },
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|