fix(inspectionTask): 修复连接实验室功能并更新字段标签
| | |
| | | import UnPassRetestResult from "@/components/rawMaterialInspection/unPassRetestResult.vue" |
| | | import { |
| | | claimInsOrderPlan, |
| | | upPlanUser2, |
| | | upPlanUser, |
| | | selectUserCondition, |
| | | getBindingProductByProductId, |
| | |
| | | selectInsOrderPlanList, |
| | | selectSampleAndProductByOrderId, |
| | | } from "@/api/business/inspectionTask.js"; |
| | | import { treeDevice } from "@/api/cnas/resourceDemand/device.js"; |
| | | import { mapGetters } from "vuex"; |
| | | import {getRetestResult} from "@/api/business/rawMaterialOrder"; |
| | | import {upReportUrl} from "@/api/business/insReport"; |
| | |
| | | }, |
| | | handleConnect(row) { |
| | | this.orderId = row.id; |
| | | this.connect = {}; |
| | | this.connect = { |
| | | connectPerson: "", |
| | | sonLaboratory: "", |
| | | }; |
| | | this.sonLaboratoryList = []; |
| | | this.connectVisible = true; |
| | | upPlanUser2({ orderId: this.orderId }).then((res) => { |
| | | if (res.code === 200 && res.data.length > 0) { |
| | | this.sonLaboratoryList = []; |
| | | res.data.forEach((m) => { |
| | | this.sonLaboratoryList.push({ |
| | | value: m, |
| | | label: m, |
| | | }); |
| | | }); |
| | | treeDevice().then((res) => { |
| | | if (res.code === 200) { |
| | | const laboratoryNames = [ |
| | | ...new Set((res.data || []).map((item) => item && item.label).filter(Boolean)), |
| | | ]; |
| | | this.sonLaboratoryList = laboratoryNames.map((laboratoryName) => ({ |
| | | value: laboratoryName, |
| | | label: laboratoryName, |
| | | })); |
| | | if (this.sonLaboratoryList.length === 0) { |
| | | this.$message.warning("暂无场所数据"); |
| | | return; |
| | | } |
| | | this.connect.sonLaboratory = this.sonLaboratoryList[0].value; |
| | | } |
| | | }).catch(() => { |
| | | this.$message.error("场所数据加载失败"); |
| | | }); |
| | | }, |
| | | confirmConnect() { |
| | |
| | | <div class="search"> |
| | | <div class="search_box"> |
| | | <div class="search_item"> |
| | | <span class="search_label">模板名称</span> |
| | | <span class="search_label">检验项目</span> |
| | | <el-input v-model="queryParams.name" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | |
| | | <el-dialog :before-close="closeCopyTem" :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="isShowCopyTem" :title="title" width="35%" :modal-append-to-body="false"> |
| | | <el-form ref="copyForm" :model="copyForm" :rules="copyFormRules" label-position="right" label-width="80px"> |
| | | <el-form-item label="检验项目" prop="number"> |
| | | <el-form-item label="检验依据" prop="number"> |
| | | <el-input v-model="copyForm.number" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="模版名称" prop="name"> |
| | | <el-form-item label="检验项目" prop="name"> |
| | | <el-input v-model="copyForm.name" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | |
| | | id: "", |
| | | }, |
| | | copyFormRules: { |
| | | name: [{ required: true, message: "请输入模版名称", trigger: "blur" }], |
| | | name: [{ required: true, message: "请输入检验项目", trigger: "blur" }], |
| | | }, |
| | | queryParams: { |
| | | name: null, |
| | | }, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "检验项目", prop: "number" }, |
| | | { label: "模板名称", prop: "name" }, |
| | | { label: "检验依据", prop: "number" }, |
| | | { label: "检验项目", prop: "name" }, |
| | | { label: "备注", prop: "remark" }, |
| | | { label: "价格(元)", prop: "price" }, |
| | | { label: "创建用户", prop: "createUserName" }, |