Merge branch 'dev_KTHG' of http://114.132.189.42:9002/r/product-inventory-management into dev_KTHG
| | |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | export function downloadRawMaterial(data) { |
| | | return request({ |
| | | url: '/quality/rawMaterial/down', |
| | | method: 'post', |
| | | data: data, |
| | | responseType: "blob", |
| | | }) |
| | | } |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="批号:" prop="batchNo"> |
| | | <el-input style="width: 100%" v-model="form.batchNo" placeholder="请输入" clearable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="批号:" prop="batchNo"> |
| | | <el-input style="width: 100%" v-model="form.batchNo" placeholder="请输入" clearable/> |
| | | <el-form-item label="数量(吨):" prop="quantity"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" |
| | | clearable :precision="2" controls-position="right"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="检测结果:" prop="checkResult"> |
| | | <el-select v-model="form.checkResult"> |
| | | <el-option label="合格" :value="0"/> |
| | | <el-option label="不合格" :value="1"/> |
| | | <el-option label="合格" :value="1"/> |
| | | <el-option label="不合格" :value="0"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | productName: "", |
| | | productId: "", |
| | | productModelId: "", |
| | | quantity: undefined, |
| | | model: "", |
| | | batchNo: "", |
| | | checkType: "", |
| | | checkType: undefined, |
| | | checkResult: "", |
| | | unit: "", |
| | | checkUserName: "", |
| | |
| | | checkUserName: [{required: false, message: "请选择检验员", trigger: "blur"}], |
| | | productId: [{required: true, message: "请输入", trigger: "blur"}], |
| | | productModelId: [{required: true, message: "请选择产品型号", trigger: "change"}], |
| | | batchNo: [{required: false, message: "请输入批次", trigger: "blur"}], |
| | | checkType: [{required: false, message: "请选择检验类型", trigger: "blur"}], |
| | | quantity: [{required: true, message: "请输入数量", trigger: "blur"}], |
| | | batchNo: [{required: true, message: "请输入批次", trigger: "blur"}], |
| | | checkType: [{required: true, message: "请选择检验类型", trigger: "change"}], |
| | | checkResult: [{required: true, message: "请选择检测结果", trigger: "change"}], |
| | | }, |
| | | }); |
| | |
| | | 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({ |
| | |
| | | prop: "model", |
| | | }, |
| | | { |
| | | label: "数量(吨)", |
| | | prop: "quantity", |
| | | }, |
| | | { |
| | | label: "批次号", |
| | | prop: "batchNo", |
| | | width: 120 |
| | |
| | | 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() |
| | | |