From 78fae8f58dd35214f1b2e2009f334c9d47d484b1 Mon Sep 17 00:00:00 2001 From: yxq Date: Tue, 1 Aug 2023 15:04:26 +0800 Subject: [PATCH] =?UTF-8?q?app=20=E6=96=87=E5=8D=B0=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=A1=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LogisticsManagement/Purchase_Print/single.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Print/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Print/single.vue index 36d234253..93bd873f9 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Print/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Print/single.vue @@ -136,6 +136,7 @@ export default { return { // 页面相关参数 id: null, + ProcessId:null, mode: null, edit: null, ready: false, @@ -179,16 +180,17 @@ export default { } }, - async onLoad({ type, id }) { - await this.init(type, id) + async onLoad({ type, id, ProcessId}) { + await this.init(type, id, ProcessId) }, methods: { // 页面初始化 - async init(type, id) { + async init(type, id, ProcessId) { this.LOADING('加载数据中...') this.id = id + this.ProcessId = ProcessId this.mode = type this.edit = ['create', 'edit'].includes(this.mode) @@ -215,8 +217,10 @@ export default { let userInfo = this.GET_GLOBAL('loginUser'); this.origin.Purchase_Print.DepartmentId = userInfo.departmentId this.origin.Purchase_Print.CreatorId = userInfo.userId - } else { - const result = await this.HTTP_GET('learun/adms/purchaseprint/form', this.id) + } else { + const result = this.id ? await this.HTTP_GET('learun/adms/purchaseprint/form', this.id) : + await this.HTTP_GET('learun/adms/purchaseprint/GetshList', this.ProcessId) + this.origin = await this.formatFormData({Purchase_Print:{...result.Purchase_Print,Purchase_Print_Details:result.Purchase_Print_Details||[]}}) } this.current = this.COPY(this.origin)