From c19ec73d40519d87414b3e8a77972fefc9ef8d67 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 05 十一月 2026 10:17:57 +0800
Subject: [PATCH] feat(outsourcingOrder): 新增外协订单独立路由并修复相关页面逻辑
---
src/views/business/inspectionTask/inspection.vue | 29 +++++++++++++++++++----------
1 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index 6db42c7..3501191 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -385,7 +385,7 @@
placeholder="璇烽�夋嫨"
size="small"
@change="
- (m) => handleChangeCableTag(currentSample.id, 4, 'cableTag', m)
+ (m) => handleChangeCableTag(currentSample.id, 4, 'rawMaterialTag', m)
"
@focus="getRawMaterialTag(currentSample.id)"
>
@@ -2472,24 +2472,25 @@
},
// 鏍规嵁绫诲瀷銆佷换鍔d銆佸疄楠屽鏉ヨ幏鍙栨牱鍝佺殑妫�楠岄」淇℃伅
async getCurrentProduct(id, type, cableTag) {
- if (cableTag === undefined) {
- cableTag = "";
- }
+ const selectedCableTag = cableTag || this.temCableTag;
this.tableLoading = true;
- type = this.typeSource == "1" ? 5 : type;
+ // 澶栬喘鍘嗗彶鍗曞彲鑳芥浘璇涓哄師鏉愭枡锛岄�夋嫨绾胯姱鏃朵粛搴旀寜棰滆壊鏌ヨ銆�
+ const usesCableItems = selectedCableTag && (
+ this.effectiveOrderType === "02wg" ||
+ ["03incoming", "04subcontract"].includes(this.insOrder.ifsOrderType)
+ );
+ type = this.typeSource == "1" && !usesCableItems ? 5 : type;
this.type = type;
let res = await getInsProduct({
id: id,
type: type,
laboratory: this.sonLaboratory,
- cableTag: cableTag ? cableTag : this.temCableTag,
+ cableTag: selectedCableTag,
rawMaterialTag: this.rawMaterialTag,
repetitionTag: this.repetitionTag,
});
this.tableLoading = false;
- if (res.data.length > 0) {
- return res.data;
- }
+ return res.data || [];
},
// 鍒囨崲鏍峰搧
async handleChangeSample(row, column, event) {
@@ -2498,6 +2499,9 @@
this.sampleVisible = false;
// 璧嬪�兼牱鍝�
this.currentSample = this.HaveJson(row);
+ this.currentTab = null;
+ this.temCableTag = "";
+ this.repetitionTag = "";
let list = await this.getCurrentProduct(row.id, 0);
// 璧嬪�兼牱鍝佹楠岄」
this.currentSample.insProduct = this.HaveJson(list);
@@ -2517,7 +2521,6 @@
// 澶勭悊椤甸潰鍒楄〃鏁版嵁
this.getTableLists();
this.currentKey = row.index;
- this.currentTab = null;
// 鍚戝绾跨▼鍘讳繚瀛橀〉闈㈠垪琛ㄦ暟鎹�,鍚庣浼犲弬,褰撳墠妯℃澘淇℃伅
this.worker.postMessage(
JSON.stringify({
@@ -2535,6 +2538,12 @@
if (num === "cableTag") {
cableTag = m2;
this.temCableTag = cableTag;
+ this.repetitionTag = "";
+ this.getRepetitionTag();
+ } else if (num === "rawMaterialTag") {
+ this.currentTab = null;
+ this.temCableTag = "";
+ this.repetitionTag = "";
this.getRepetitionTag();
}
if (num === "repetitionTag") {
--
Gitblit v1.9.3