From 604518cc05436d2179c3875e1aad3853123f625f Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期二, 07 四月 2026 12:33:48 +0800
Subject: [PATCH] 优化设备模具保养任务下推单据,解决设备模具保养任务保存时,反写保养计划不对的情况

---
 pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue b/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue
index 4b6410c..14b4561 100644
--- a/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue
+++ b/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue
@@ -622,7 +622,7 @@
 						this.hform.HQty = 1
 
 						// 鑾峰彇妫�楠岃绋�
-						this.GetItemByEquipFile()
+						await this.GetItemByEquipFile()
 					} else {
 						CommonUtils.showTips({
 							title: "娓╅Θ鎻愮ず",
@@ -794,7 +794,7 @@
 				}
 			}
 		},
-		onLoad(e) {
+		async onLoad(e) {
 			console.log('e: ', e);
 			if (!e.operationType) {
 				this.operationType = 1
@@ -813,8 +813,20 @@
 			} else if (this.operationType == 4) {
 				// 涓嬫帹
                 let HBarCode = e.HBarCode
+				let HPlanHInterID = e.HPlanHInterID
+				let HPlanHEntryID = e.HPlanHEntryID
                 this.getMaxNum()
-                this.GetMessageByBarCode(HBarCode)
+                //this.GetMessageByBarCode(HBarCode)
+				if (HBarCode) {
+					await this.GetMessageByBarCode(HBarCode)
+					if(uni.getStorageSync('Organization')=='瀹佹尝甯傚崕鑸熷寘瑁呮湁闄愬叕鍙�'){
+						//淇濆吇璁″垝鐨処D鏍规嵁淇濆吇浠诲姟涓嬫帹鐨勫疄闄卛d杩涜璧嬪��
+						this.hform.HEquipMaintainPlanInterID = (HPlanHInterID == null ? this.hform.HEquipMaintainPlanInterID : HPlanHInterID) =="" ? this.hform.HEquipMaintainPlanInterID : HPlanHInterID
+						this.hform.HEquipMaintainPlanEntryID = (HPlanHEntryID == null ? this.hform.HEquipMaintainPlanEntryID : HPlanHEntryID) =="" ? this.hform.HEquipMaintainPlanEntryID : HPlanHEntryID						
+						this.hform.HMainSourceInterID = (HPlanHInterID == null ? this.hform.HEquipMaintainPlanInterID : HPlanHInterID) =="" ? this.hform.HEquipMaintainPlanInterID : HPlanHInterID
+						this.hform.HMainSourceEntryID = (HPlanHEntryID == null ? this.hform.HEquipMaintainPlanEntryID : HPlanHEntryID) =="" ? this.hform.HEquipMaintainPlanEntryID : HPlanHEntryID						
+					}
+				}
 			}
 
 			this.getHDeptList()

--
Gitblit v1.9.1