| | |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <!-- <span class="search_title">供应商:</span>--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="searchForm.supplier"--> |
| | | <!-- style="width: 240px"--> |
| | | <!-- placeholder="请输入供应商搜索"--> |
| | | <!-- @change="handleQuery"--> |
| | | <!-- clearable--> |
| | | <!-- :prefix-icon="Search"--> |
| | | <!-- />--> |
| | | <span class="search_title">批号:</span> |
| | | <el-input |
| | | v-model="searchForm.batchNo" |
| | | style="width: 200px" |
| | | placeholder="请输入" |
| | | @change="handleQuery" |
| | | clearable |
| | | prefix-icon="Search" |
| | | /> |
| | | <span class="search_title">检验类型:</span> |
| | | <el-select |
| | | v-model="searchForm.checkType" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | @change="handleQuery" |
| | | clearable |
| | | > |
| | | <el-option label="入厂检" :value="0" /> |
| | | <el-option label="车间检" :value="1" /> |
| | | <el-option label="出厂检" :value="2" /> |
| | | </el-select> |
| | | <span class="search_title">提交状态:</span> |
| | | <el-select |
| | | v-model="searchForm.inspectState" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | @change="handleQuery" |
| | | clearable |
| | | > |
| | | <el-option label="未提交" :value="0" /> |
| | | <el-option label="已提交" :value="1" /> |
| | | </el-select> |
| | | <span style="margin-left: 10px" class="search_title">检测日期:</span> |
| | | <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange" |
| | | placeholder="请选择" clearable @change="changeDaterange"/> |
| | |
| | | import InspectionFormDia from "@/views/qualityManagement/rawMaterial/components/inspectionFormDia.vue"; |
| | | import FormDia from "@/views/qualityManagement/rawMaterial/components/formDia.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import { |
| | | downloadQualityInspect, |
| | | } from "@/api/qualityManagement/rawMaterialInspection.js"; |
| | | import FilesDia from "@/views/qualityManagement/rawMaterial/components/filesDia.vue"; |
| | | import dayjs from "dayjs"; |
| | | import {userListNoPage} from "@/api/system/user.js"; |
| | |
| | | import { |
| | | deleteRawMaterial, |
| | | findRawMaterialListPage, |
| | | submitRawMaterial, updateCheckUserName, |
| | | submitRawMaterial, updateCheckUserName,downloadRawMaterial |
| | | } from "@/api/qualityManagement/rawMaterial.js"; |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | supplier: "", |
| | | batchNo: "", |
| | | checkType: undefined, |
| | | inspectState: undefined, |
| | | entryDate: undefined, // 录入日期 |
| | | entryDateStart: undefined, |
| | | entryDateEnd: undefined, |
| | |
| | | prop: "checkResult", |
| | | dataType: "tag", |
| | | formatType: (params) => { |
| | | if (params === 1) { |
| | | if (params === 0) { |
| | | return "danger"; |
| | | } else if (params === 0) { |
| | | } else if (params === 1) { |
| | | return "success"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatData: (params) => { |
| | | if (params === 1) { |
| | | if (params === 0) { |
| | | return "不合格"; |
| | | } else if (params === 0) { |
| | | } else if (params === 1) { |
| | | return "合格"; |
| | | } |
| | | }, |
| | |
| | | disabled: (row) => { |
| | | // 已提交则禁用 |
| | | if (row.inspectState == 1) return true; |
| | | // 如果检验员有值,只有当前登录用户能提交 |
| | | if (row.checkUserName) { |
| | | return row.checkUserName !== userStore.nickName; |
| | | } |
| | | return false; |
| | | } |
| | | }, |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/quality/qualityInspect/export", {inspectType: 0}, "原材料检验.xlsx"); |
| | | proxy.download("/quality/rawMaterial/export", {}, "原料检.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | |
| | | } |
| | | |
| | | const downLoadFile = (row) => { |
| | | downloadQualityInspect({id: row.id}).then((blobData) => { |
| | | downloadRawMaterial({id: row.id}).then((blobData) => { |
| | | const blob = new Blob([blobData], { |
| | | type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', |
| | | }) |
| | |
| | | |
| | | const link = document.createElement('a') |
| | | link.href = downloadUrl |
| | | link.download = '原材料检验报告.docx' |
| | | link.download = '原料检验报告.docx' |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | |
| | |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped></style> |
| | | <style scoped> |
| | | .search_title { |
| | | margin: 0 10px; |
| | | } |
| | | </style> |