From 240fa2b20900b8c2542f6bc5d912d7f647ad0b64 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 19 二月 2025 16:31:18 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
src/views/business/inspectionTask/index.vue | 314 +++++++++++++++++++--------------------------------
1 files changed, 118 insertions(+), 196 deletions(-)
diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index 127d5bb..71998c7 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -162,24 +162,14 @@
</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"
:page="page"
:tableLoading="tableLoading"
- :height="'calc(100vh - 290px)'"
+ :height="'calc(100vh - 300px)'"
@pagination="pagination"
+ key="tableData0"
></lims-table>
</div>
</div>
@@ -281,12 +271,15 @@
/>-->
<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
@@ -400,6 +393,7 @@
bindingProductTreeByProductId,
delProductTreeByProductId,
selectInsOrderPlanList,
+ selectSampleAndProductByOrderId,
} from "@/api/business/inspectionTask.js";
import { mapGetters } from "vuex";
export default {
@@ -521,182 +515,6 @@
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: "瀛e害妫�楠�",
- type: "warning",
- effect: "plain",
- },
- ],
- },
- },
- selectField: {},
- requiredAdd: [],
- requiredUp: [],
- },
- upIndex: 0,
planTotal: 0,
insStateList: [],
state: 0, // 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅
@@ -819,7 +637,6 @@
dataType: "action",
fixed: "right",
label: "鎿嶄綔",
- width: "260px",
operation: [
{
name: "鏁版嵁鏌ョ湅",
@@ -887,6 +704,90 @@
},
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",
+ mergeCol: true, //鍚堝苟鍒�
+ },
+ { label: "鏍峰搧鍚嶇О", prop: "sample", width: "140px", mergeCol: true },
+ { label: "妫�楠岄」鍒嗙被", prop: "inspectionItemClass" },
+ { label: "妫�楠岄」", prop: "inspectionItem", width: "140px" },
+ { label: "妫�楠屽瓙椤�", prop: "inspectionItemSubclass" },
+ { label: "鍗曚綅", prop: "unit" },
+ { label: "鏍峰搧鍨嬪彿", prop: "model", mergeCol: true },
+ { 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() {
@@ -926,6 +827,27 @@
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);
@@ -937,7 +859,7 @@
// 鏁版嵁鏌ョ湅
handleDataLook(row) {
this.lookInfo = row;
- this.componentDataDataLook.entity.id = row.id;
+ this.getLookList();
this.dataDialogVisible = true;
},
// 鏌ョ湅涓嶅悎鏍煎娴嬬粨鏋�
--
Gitblit v1.9.3