feat(inspection): 1.添加报告类型功能并优化检验流程
2.设备管理组件中的部门列表获取方法优化
| | |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import dataAcquisitionConfig from './acquisitionConfig.vue' |
| | | import { |
| | | obtainItemParameterList, |
| | | exportEquipmentDetails, |
| | | getInsProduction, |
| | | upDeviceParameter, |
| | |
| | | getDeviceParameter, |
| | | delDeviceParameter, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { listDept } from '@/api/system/dept' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | export default { |
| | | props: { |
| | |
| | | mounted() { |
| | | this.selectEnumByCategory() |
| | | this.selectDevicePrincipal() |
| | | this.obtainItemParameterList() |
| | | this.obtainDepartmentList() |
| | | this.getInsProductIds() |
| | | // 初始化 |
| | | this.clickSidebar(this.clickNodeVal) |
| | |
| | | handleNotification(cate) { |
| | | this.queryParams.largeCategory = cate |
| | | }, |
| | | obtainItemParameterList() { |
| | | obtainItemParameterList().then(res => { |
| | | obtainDepartmentList() { |
| | | listDept({ status: '0' }).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.laboratoryName, |
| | | value: a.id |
| | | label: a.deptName, |
| | | value: a.deptId |
| | | }) |
| | | }) |
| | | this.subordinateDepartmentsList = data |
| | |
| | | checkSubmitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | reportType: this.reportType, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | if (!res.data || res.data.length == 0) { |
| | | if (!res.data || res.data.errorMsg.length == 0) { |
| | | this.submitLoading = true; |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | entrustCode: this.insOrder.entrustCode, |
| | | registerInsResults: this.reportType === 1, |
| | | reportType: this.reportType |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | |
| | | } else { |
| | | let newData = [] |
| | | const h = this.$createElement |
| | | for (let i in res.data) { |
| | | const lastChar = res.data[i].slice(-1); |
| | | for (let i in res.data.errorMsg) { |
| | | const lastChar = res.data.errorMsg[i].slice(-1); |
| | | if (lastChar == '-') { |
| | | res.data[i] = res.data[i].slice(0, -1); |
| | | res.data.errorMsg[i] = res.data.errorMsg[i].slice(0, -1); |
| | | } |
| | | newData.push(h('p', { style: 'font-size: 14px;color: red;' }, (Number(i) + 1) + '、' + res.data[i])) |
| | | newData.push(h('p', { style: 'font-size: 14px;color: red;' }, (Number(i) + 1) + '、' + res.data.errorMsg[i])) |
| | | } |
| | | newData.push(h('p', { style: 'font-size: 16px;color:#000;margin-top:12px;overflow-y: auto;max-height:80vh' }, '以上项目不合格,确定提交?')) |
| | | this.$confirm('提示', { |
| | |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | registerInsResults: false, |
| | | reportType: this.reportType |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | |
| | | this.$refs.viewManHourDia.showDialog(this.id, 99); |
| | | }, |
| | | openAddVerifyDia() { |
| | | this.reportType = null; |
| | | this.addVerifyDia = true; |
| | | }, |
| | | confirmSubmit(registerInsResults){ |
| | |
| | | checkSubmitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | reportType: this.reportType, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | if (!res.data || res.data.errorMsg.length == 0) { |
| | | this.submitLoading = true; |
| | | //检验类型为原材料 |
| | | if(this.typeSource==1 && res.data.unInsOrderCount==0 && this.isSplit==1){ |
| | | if(this.reportType === 1 && this.typeSource==1 && res.data.unInsOrderCount==0 && this.isSplit==1){ |
| | | const htmlStr = "是否登记IFS采购检验结果并移库?该操作会登记<span style='color:#ff4949'>同一零件同一订单的所有拆分批次</span>,请谨慎选择。" |
| | | this.$confirm(htmlStr, '提示', { |
| | | confirmButtonText: '是', |
| | |
| | | this.$refs.viewManHourDia.showDialog(this.id, 99); |
| | | }, |
| | | openAddVerifyDia() { |
| | | this.reportType = null; |
| | | this.addVerifyDia = true; |
| | | }, |
| | | submit() { |
| | |
| | | checkSubmitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | reportType: this.reportType, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | if (!res.data || res.data.length == 0) { |
| | | if (!res.data || res.data.errorMsg.length == 0) { |
| | | this.submitLoading = true; |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | entrustCode: this.insOrder.entrustCode, |
| | | registerInsResults: this.reportType === 1, |
| | | reportType: this.reportType, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | |
| | | } else { |
| | | let newData = []; |
| | | const h = this.$createElement; |
| | | for (let i in res.data) { |
| | | const lastChar = res.data[i].slice(-1); |
| | | for (let i in res.data.errorMsg) { |
| | | const lastChar = res.data.errorMsg[i].slice(-1); |
| | | if (lastChar == "-") { |
| | | res.data[i] = res.data[i].slice(0, -1); |
| | | res.data.errorMsg[i] = res.data.errorMsg[i].slice(0, -1); |
| | | } |
| | | newData.push( |
| | | h( |
| | | "p", |
| | | { style: "font-size: 14px;color: red;" }, |
| | | Number(i) + 1 + "、" + res.data[i] |
| | | Number(i) + 1 + "、" + res.data.errorMsg[i] |
| | | ) |
| | | ); |
| | | } |
| | |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | registerInsResults: false, |
| | | reportType: this.reportType, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | |
| | | <el-option v-for="(a, i) in queryStatusList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="报告类型" prop="reportType"> |
| | | <el-select v-model="entity.reportType" clearable size="small" @change="refreshTable()"> |
| | | <el-option v-for="item in reportTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="下单类别" prop="typeSource"> |
| | | <el-select v-model="entity.typeSource" clearable size="small" @change="refreshTable()"> |
| | | <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | |
| | | code: null, |
| | | typeSource: null, |
| | | orderType: null, |
| | | materialProp: null |
| | | materialProp: null, |
| | | reportType: null |
| | | }, |
| | | page: { |
| | | current: 1, |
| | |
| | | { label: '抽检', value: '抽检' }, |
| | | { label: '进厂检验', value: '进厂检验' }, |
| | | { label: '季度检验', value: 'Quarterly inspection' }, |
| | | ], |
| | | reportTypeList: [ |
| | | { label: '检测报告', value: 0 }, |
| | | { label: '检验报告', value: 1 }, |
| | | ], |
| | | showInfoDialog: false, // 产业链信息查看 |
| | | isReport: 1, |
| | |
| | | linkMethod: "selectAllByOne", |
| | | }, |
| | | { |
| | | label: '报告类型', |
| | | prop: 'reportType', |
| | | width: '100px', |
| | | dataType: 'tag', |
| | | formatData: (params) => params === 0 ? '检测报告' : '检验报告', |
| | | formatType: (params) => params === 0 ? 'warning' : 'success', |
| | | }, |
| | | { |
| | | label: "下单类别", |
| | | prop: "typeSource", |
| | | width: "100px", |