|
|
@@ -0,0 +1,87 @@
|
|
|
+<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, 30, 40, 50, 100]">
|
|
|
+ <!-- 表头工具栏 -->
|
|
|
+ <template v-slot:toolbar>
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-slot:sampleCode="{ row }">
|
|
|
+ <el-link type="primary" :underline="false">
|
|
|
+ {{ row.sampleCode }}
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import search from './components/search.vue';
|
|
|
+
|
|
|
+import { getQualitySampleList } 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 },
|
|
|
+ { prop: 'sampleCode', slot: 'sampleCode', label: '编码', align: 'center', width: 160, showOverflowTooltip: true },
|
|
|
+ { prop: 'categoryCode', label: '物品编码', align: 'center', width: 160, showOverflowTooltip: true },
|
|
|
+ { prop: 'categoryName', label: '物品名称', align: 'center', width: 160, showOverflowTooltip: true },
|
|
|
+ { prop: 'specification', label: '规格', align: 'center', width: 100, showOverflowTooltip: true },
|
|
|
+ { prop: 'brandNum', label: '牌号', align: 'center', width: 100, showOverflowTooltip: true },
|
|
|
+ { prop: 'modelType', label: '型号', align: 'center', width: 160, showOverflowTooltip: true },
|
|
|
+ { prop: 'measureUnit', label: '计量单位', align: 'center', width: 100, showOverflowTooltip: true },
|
|
|
+ { prop: 'batchNo', label: '批次号', align: 'center', width: 100, showOverflowTooltip: true },
|
|
|
+ { prop: 'weight', label: '重量', align: 'center', width: 100, showOverflowTooltip: true },
|
|
|
+ { prop: 'weightUnit', label: '重量单位', align: 'center', width: 100, showOverflowTooltip: true },
|
|
|
+ { prop: 'disposeTime', label: '处置时间', align: 'center', width: 180, showOverflowTooltip: true },
|
|
|
+ {
|
|
|
+ prop: 'status', label: '状态', align: 'center',
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return cellValue == 1 ? '已处置' : cellValue == 2 ? '未处置' : '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ // this.requestDict('取样类型');
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ datasource({ page, where, limit }) {
|
|
|
+ where.disposalStatus = 7;
|
|
|
+ return getQualitySampleList({
|
|
|
+ ...where,
|
|
|
+ pageNum: page,
|
|
|
+ size: limit
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ reload(where) {
|
|
|
+ this.$refs.table.reload({ page: 1, where });
|
|
|
+ },
|
|
|
+ processingMethod(type, row) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/sample/samplemanagement/components/edit',
|
|
|
+ query: {
|
|
|
+ type: type,
|
|
|
+ qualityWorkOrderId: row.qualityWorkOrderId || '',
|
|
|
+ id: row.id || '',
|
|
|
+ qualityType: row.qualityType || ''
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // this.$refs.edit.open(type, row)
|
|
|
+ },
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|