From 9577bfd83282afad65a758321eec7186a10222f9 Mon Sep 17 00:00:00 2001
From: p-honggang.li <p-honggang.li@pcitc.com>
Date: 星期三, 03 九月 2025 16:56:23 +0800
Subject: [PATCH] 修改配置

---
 src/views/productManage/productPriceViewer/index.vue |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/views/productManage/productPriceViewer/index.vue b/src/views/productManage/productPriceViewer/index.vue
index 71022ee..e64ba23 100644
--- a/src/views/productManage/productPriceViewer/index.vue
+++ b/src/views/productManage/productPriceViewer/index.vue
@@ -354,6 +354,7 @@
 import { useUserInfo } from '@/stores/modules/userInfo'
 import { queryUserDetail } from '@/api/userInfo'
 import productApi from '@/api/productApi'
+import workFlowApi from '@/api/workFlowApi'
 
 const route = useRoute()
 
@@ -828,16 +829,25 @@
       // 璋冪敤宸ヤ綔娴佹帴鍙e彂璧峰鎵规祦绋嬶紝鎷垮埌娴佺▼瀹炰緥ID鍚庡洖鍐欒鍗晈orkflow_id
       try {
         // 鏍规嵁鏄惁鍖呭惈鍗忚鏄庣粏锛岄厤缃笉鍚屾祦绋嬪畾涔変笌涓氬姟Key锛堝厛鐢ㄩ潤鎬佸�煎崰浣嶏級
-        const processdefId = hasAGREEMENT ? 'Process_Agreement_Static' : 'Process_Points_Static'
+        // const processdefId = hasAGREEMENT ? 'Process_Agreement_Static' : 'Process_Points_Static'
         const businessKey = hasAGREEMENT ? 'agreement_biz_key' : 'points_biz_key'
-        const wfRes: any = await orderApi.startWorkflowAndComplete({
-          processdefId,
-          userid: String(currentUserId.value || ''),
-          businessKey
+        const type = hasAGREEMENT ? 'trade_agreement' : 'trade_point';
+        // 鑾峰彇宸ヤ綔娴佸弬鏁�
+        const  wkParamsRes: any = await workFlowApi.getWorkFlowParams({
+          type: type,
+          unitId: '1'
         })
-        if (wfRes?.code === 200 && wfRes.data?.processinstId) {
-          await orderApi.updateWorkflowId(data.orderId, wfRes.data.processinstId)
+        if(wkParamsRes?.code === 200 && wkParamsRes.data?.processTemplateId){
+          const wfRes: any = await orderApi.startWorkflowAndComplete({
+            processdefId: wkParamsRes.data.processTemplateId,
+            userid: String(currentUserId.value || ''),
+            businessKey: businessKey
+          })
+          if (wfRes?.code === 200 && wfRes.data?.processinstId) {
+            await orderApi.updateWorkflowId(data.orderId, wfRes.data.processinstId)
+          }
         }
+
       } catch (e) {
         console.warn('鍚姩宸ヤ綔娴佸け璐ユ垨鏇存柊workflow_id澶辫触', e)
       }

--
Gitblit v1.8.0