| | |
| | | <div> |
| | | <span class="search_title">类型:</span> |
| | | <el-select v-model="searchForm.inspectType" clearable style="width: 200px" @change="handleQuery"> |
| | | <el-option label="原材料检验" :value="0" /> |
| | | <el-option label="过程检验" :value="1" /> |
| | | <el-option label="出厂检验" :value="2" /> |
| | | <el-option label="入厂检" :value="0" /> |
| | | <el-option label="车间检" :value="1" /> |
| | | <el-option label="出厂检" :value="2" /> |
| | | </el-select> |
| | | </div> |
| | | <div style="margin-left: 10px"> |
| | |
| | | const { searchForm } = toRefs(data); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "状态", |
| | | prop: "inspectState", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "待处理"; |
| | | } else if (params == 1) { |
| | | return "已处理"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == '不合格') { |
| | | return "danger"; |
| | | } else if (params == '合格') { |
| | | return "success"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: "检测日期", |
| | | prop: "checkTime", |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "批号", |
| | | prop: "batchNo", |
| | | width: 120 |
| | | }, |
| | | { |
| | |
| | | width: 120, |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "原材料检验"; |
| | | return "入厂检"; |
| | | } else if (params == 1) { |
| | | return "过程检验"; |
| | | return "车间检"; |
| | | } else { |
| | | return '出厂检验'; |
| | | return '出厂检'; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | |
| | | label: "单位", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "数量", |
| | | prop: "quantity", |
| | | width: 100 |
| | | }, |
| | | // { |
| | | // label: "数量", |
| | | // prop: "quantity", |
| | | // width: 100 |
| | | // }, |
| | | { |
| | | label: "不合格现象", |
| | | prop: "defectivePhenomena", |
| | |
| | | label: "处理日期", |
| | | prop: "dealTime", |
| | | width: 120 |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "操作", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 120, |
| | | operation: [ |
| | | { |
| | | name: "编辑", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openForm("edit", row); |
| | | }, |
| | | disabled: (row) => row.inspectState === 1, |
| | | }, |
| | | { |
| | | name: "处理", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openInspectionForm("edit", row); |
| | | }, |
| | | disabled: (row) => row.inspectState === 1, |
| | | }, |
| | | ], |
| | | }, |
| | | ]); |
| | | const tableData = ref([]); |