| | |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <!-- <ValueTable |
| | | :key="upIndex" |
| | | ref="insOrderPlan" |
| | | :componentData="componentData" |
| | | :isColumnWidth="true" |
| | | :tableRowClassName="changeRowClass" |
| | | :upUrl="$api.user.updateUser" |
| | | :url="$api.insOrderPlan.selectInsOrderPlanList" |
| | | class="value-table" |
| | | @handleInspection="handleInspection" |
| | | /> --> |
| | | <lims-table |
| | | :tableData="tableData" |
| | | :column="column" |
| | |
| | | :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" |
| | | @pagination="pagination" |
| | | key="tableData0" |
| | | ></lims-table> |
| | | </div> |
| | | </div> |
| | |
| | | />--> |
| | | <el-dialog :visible.sync="dataDialogVisible" title="数据查看" width="80%"> |
| | | <div v-if="dataDialogVisible" style="height: 70vh; overflow-y: auto"> |
| | | <ValueTable |
| | | ref="ValueTableDataLook" |
| | | :componentData="componentDataDataLook" |
| | | :rowKey="'insProductId'" |
| | | :url="$api.insOrder.selectSampleAndProductByOrderId" |
| | | /> |
| | | <lims-table |
| | | :tableData="lookTableData" |
| | | :column="lookColumn" |
| | | :page="lookPage" |
| | | :tableLoading="lookTableLoading" |
| | | :height="'60vh'" |
| | | @pagination="lookPagination" |
| | | key="tableData1" |
| | | ></lims-table> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | |
| | | bindingProductTreeByProductId, |
| | | delProductTreeByProductId, |
| | | selectInsOrderPlanList, |
| | | selectSampleAndProductByOrderId, |
| | | } from "@/api/business/inspectionTask.js"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | |
| | | requiredUp: [], |
| | | }, |
| | | dataDialogVisible: false, |
| | | componentData: { |
| | | entity: { |
| | | orderBy: { |
| | | field: "entrustCode", |
| | | order: "asc", |
| | | }, |
| | | sonLaboratory: null, |
| | | insState: null, |
| | | userId: null, |
| | | typeSource: null, |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | init: false, |
| | | needSort: ["createTime", "sendTime", "type", "appointed", "insState"], |
| | | do: [ |
| | | { |
| | | id: "", |
| | | font: "数据查看", |
| | | type: "text", |
| | | method: "handleDataLook", |
| | | }, |
| | | { |
| | | id: "", |
| | | font: "修改检验值", |
| | | type: "text", |
| | | method: "editInspection", |
| | | disabFun: (row, index) => { |
| | | return ( |
| | | row.userName == null || row.insState == 3 || row.insState == 5 |
| | | ); |
| | | }, |
| | | }, |
| | | { |
| | | id: "", |
| | | font: "检验", |
| | | type: "text", |
| | | method: "handleInspection", |
| | | disabFun: (row, index) => { |
| | | return ( |
| | | row.userName == null || |
| | | row.insState == 3 || |
| | | row.insState == 5 || |
| | | (row.userName && |
| | | !row.userName.includes( |
| | | JSON.parse(localStorage.getItem("user")).name |
| | | )) |
| | | ); |
| | | }, |
| | | }, |
| | | { |
| | | id: "", |
| | | font: "交接", |
| | | type: "text", |
| | | method: "handleConnect", |
| | | disabFun: (row, index) => { |
| | | return ( |
| | | row.userName == null || |
| | | row.insState == 5 || |
| | | row.insState == 3 || |
| | | (row.userName && |
| | | !row.userName.includes( |
| | | JSON.parse(localStorage.getItem("user")).name |
| | | )) |
| | | ); |
| | | }, |
| | | }, |
| | | // { |
| | | // font: '产业链', |
| | | // type: 'text', |
| | | // method: 'openInfoDialog', |
| | | // disabFun: (row, index) => { |
| | | // return row.typeSource !== 1 |
| | | // } |
| | | // }, |
| | | // { |
| | | // id: '', |
| | | // font: '认领', |
| | | // type: 'text', |
| | | // method: 'claimFun', |
| | | // disabFun: (row, index) => { |
| | | // return row.userName != null || row.checkName!=null |
| | | // } |
| | | // }, |
| | | { |
| | | id: "", |
| | | font: "原始记录", |
| | | type: "text", |
| | | method: "viewInspectInfo", |
| | | }, |
| | | ], |
| | | linkEvent: { |
| | | entrustCode: { |
| | | method: "selectAllByOne", |
| | | }, |
| | | }, |
| | | tagField: { |
| | | type: { |
| | | select: [], |
| | | }, |
| | | insState: { |
| | | select: [], |
| | | }, |
| | | insResult: { |
| | | select: [ |
| | | { |
| | | value: 0, |
| | | label: "不合格", |
| | | type: "danger", |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: "合格", |
| | | type: "success", |
| | | }, |
| | | { |
| | | value: "", |
| | | label: "未出结果", |
| | | type: "info", |
| | | }, |
| | | ], |
| | | }, |
| | | typeSource: { |
| | | select: [ |
| | | { |
| | | value: 0, |
| | | label: "成品下单", |
| | | type: "info", |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: "原材料下单", |
| | | type: "info", |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: "原材料下单", |
| | | type: "info", |
| | | }, |
| | | ], |
| | | }, |
| | | orderType: { |
| | | select: [ |
| | | { |
| | | value: "Customer-ordered test", |
| | | label: "委托试验", |
| | | type: "success", |
| | | effect: "plain", |
| | | }, |
| | | { |
| | | value: "抽检", |
| | | label: "抽检", |
| | | type: "", |
| | | effect: "plain", |
| | | }, |
| | | { |
| | | value: "进厂检验", |
| | | label: "进厂检验", |
| | | type: "info", |
| | | effect: "plain", |
| | | }, |
| | | { |
| | | value: "Quarterly inspection", |
| | | label: "季度检验", |
| | | type: "warning", |
| | | effect: "plain", |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | }, |
| | | upIndex: 0, |
| | | planTotal: 0, |
| | | insStateList: [], |
| | | state: 0, // 0:台账页,1:检验页面,2检验页面(复核),默认为0,3数据查看 |
| | |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "操作", |
| | | width: "260px", |
| | | operation: [ |
| | | { |
| | | name: "数据查看", |
| | |
| | | }, |
| | | tableLoading: false, |
| | | queryParams: {}, |
| | | insResultList: [ |
| | | { |
| | | value: 1, |
| | | label: "合格", |
| | | type: "success", |
| | | }, |
| | | { |
| | | value: 0, |
| | | label: "不合格", |
| | | type: "danger", |
| | | }, |
| | | { |
| | | value: 3, |
| | | label: "不判定", |
| | | type: "", |
| | | }, |
| | | ], |
| | | lookTableData: [], |
| | | lookColumn: [ |
| | | { |
| | | label: "样品编号", |
| | | prop: "sampleCode", |
| | | width: "140px", |
| | | dataType: "link", |
| | | linkMethod: "selectAllByOne", |
| | | }, |
| | | { label: "样品名称", prop: "sample", width: "140px" }, |
| | | { label: "检验项分类", prop: "inspectionItemClass" }, |
| | | { label: "检验项", prop: "inspectionItem", width: "140px" }, |
| | | { label: "检验子项", prop: "inspectionItemSubclass" }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "样品型号", prop: "model" }, |
| | | { label: "条件", prop: "radius" }, |
| | | { label: "电缆标识", prop: "cableTag" }, |
| | | { label: "试验要求", prop: "tell" }, |
| | | { label: "检验结果", prop: "lastValue" }, |
| | | { |
| | | label: "结果判定", |
| | | prop: "insResult", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.insResultList.find((m) => m.value == params).label; |
| | | }, |
| | | formatType: (params) => { |
| | | return this.insResultList.find((m) => m.value == params).type; |
| | | }, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "操作", |
| | | operation: [ |
| | | { |
| | | name: "不合格复测查看", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.getRetestResult(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.insResult != 0; |
| | | }, |
| | | }, |
| | | { |
| | | name: "检验项绑定", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.getBinding(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return ( |
| | | this.lookInfo.userName == null || |
| | | this.lookInfo.insState == 3 || |
| | | this.lookInfo.insState == 5 |
| | | ); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | lookPage: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | lookTableLoading: false, |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | getLookList() { |
| | | this.lookTableLoading = true; |
| | | let param = { id: this.lookInfo.id, ...this.lookPage }; |
| | | delete param.total; |
| | | selectSampleAndProductByOrderId({ ...param }) |
| | | .then((res) => { |
| | | this.lookTableLoading = false; |
| | | if (res.code === 200) { |
| | | this.lookTableData = res.data.records; |
| | | this.lookPage.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.lookTableLoading = false; |
| | | }); |
| | | }, |
| | | lookPagination({ page, limit }) { |
| | | this.lookPage.current = page; |
| | | this.lookPage.size = limit; |
| | | this.getLookList(); |
| | | }, |
| | | // 修改检验值 |
| | | editInspection(row) { |
| | | this.$refs.editInspectionItem.showDialog(row.id); |
| | |
| | | // 数据查看 |
| | | handleDataLook(row) { |
| | | this.lookInfo = row; |
| | | this.componentDataDataLook.entity.id = row.id; |
| | | this.getLookList(); |
| | | this.dataDialogVisible = true; |
| | | }, |
| | | // 查看不合格复测结果 |