From 9d4f45939870dde9b59d354616d87536d6274ef1 Mon Sep 17 00:00:00 2001 From: p-honggang.li <p-honggang.li@pcitc.com> Date: 星期三, 03 九月 2025 18:30:07 +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 b1b9b8e..5d87a57 100644 --- a/src/views/productManage/productPriceViewer/index.vue +++ b/src/views/productManage/productPriceViewer/index.vue @@ -357,6 +357,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() @@ -831,16 +832,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