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/api/sysUser.ts | 1 src/views/tradeManage/buyer/index.vue | 7 +-- src/views_back/layout/index.vue | 2 src/views/productManage/productPriceViewer/index.vue | 24 ++++++++--- src/views/tradeManage/evaluate/index.vue | 4 +- src/views/layout/index.vue | 2 src/api/orderApi.ts | 12 +++++ src/views/approveManage/tradeApproval/list.vue | 6 ++ src/api/workFlowApi.ts | 15 +++++++ src/main.ts | 10 ++-- src/utils/orderWorkflow.ts | 3 + 11 files changed, 63 insertions(+), 23 deletions(-) diff --git a/src/api/orderApi.ts b/src/api/orderApi.ts index 208163b..de14af6 100644 --- a/src/api/orderApi.ts +++ b/src/api/orderApi.ts @@ -123,7 +123,17 @@ method: 'get' }) as ApiPromise }, - + + updateOrderStatusToIsEvaluate(orderId: string): ApiPromise { + return createAxios({ + url: `${url}/status/isEvaluate`, + method: 'post', + params: { + orderId + } + }) as ApiPromise + }, + updateOrderStatusToNext(orderId: string): ApiPromise { return createAxios({ url: `${url}/status/next`, diff --git a/src/api/sysUser.ts b/src/api/sysUser.ts index a7e381b..4223282 100644 --- a/src/api/sysUser.ts +++ b/src/api/sysUser.ts @@ -26,6 +26,7 @@ // 鑾峰彇鐢ㄦ埛璇︽儏 getUserdetail(data: object = {}): ApiPromise { return createAxios({ + baseURL: '/api', url: `${url}/detail`, headers: { 'Content-Type': 'application/json;charset=UTF-8' diff --git a/src/api/workFlowApi.ts b/src/api/workFlowApi.ts new file mode 100644 index 0000000..eb9bf22 --- /dev/null +++ b/src/api/workFlowApi.ts @@ -0,0 +1,15 @@ +import createAxios from '@/utils/axios' + +const workFlowApi = { + getWorkFlowParams(data: object = {}) : ApiPromise{ + return createAxios({ + baseURL: '/api', + url: `/approval/templateRelation/relationByType`, + headers: { + 'Content-Type': 'application/json;charset=UTF-8' + }, + data: data + }) as ApiPromise + } +} +export default workFlowApi \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 9f5b239..a71c38e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,17 +11,17 @@ // import pagination from '@/components/Pagination/index.vue' import store from '@/stores' // pinia鐘舵�佺鐞嗗櫒鍏ㄥ眬璋冪敤 import directives from '@/directives/index' -import FcDesigner from '@form-create/designer'; -import formCreate from '@form-create/element-ui'; // 寮曞叆 FormCreate +// import FcDesigner from '@form-create/designer'; +// import formCreate from '@form-create/element-ui'; // 寮曞叆 FormCreate const app = createApp(App) app.use(store) app.use(router) app.use(ElementPlus) app.use(directives) -app.use(FcDesigner); -app.use(FcDesigner.formCreate); -app.use(formCreate); +// app.use(FcDesigner); +// app.use(FcDesigner.formCreate); +// app.use(formCreate); for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component(key, component) } diff --git a/src/utils/orderWorkflow.ts b/src/utils/orderWorkflow.ts index 965a67e..a13246c 100644 --- a/src/utils/orderWorkflow.ts +++ b/src/utils/orderWorkflow.ts @@ -20,7 +20,8 @@ AUTHORIZE = '鎺堟潈', CONFIRM_TRADE = '浜ゆ槗纭', EVALUATE = '璇勪环', - CANCEL_ORDER = '鍙栨秷璁㈠崟' + CANCEL_ORDER = '鍙栨秷璁㈠崟', + COMPLETED = '宸插畬鎴�' } // 椤甸潰绫诲瀷鏋氫妇 diff --git a/src/views/approveManage/tradeApproval/list.vue b/src/views/approveManage/tradeApproval/list.vue index af22a7e..872c0bb 100644 --- a/src/views/approveManage/tradeApproval/list.vue +++ b/src/views/approveManage/tradeApproval/list.vue @@ -820,12 +820,16 @@ gap: 20px; align-items: center; overflow: hidden; - + + .status-item{ + flex-direction: row-reverse; + } .order-item { display: flex; align-items: center; gap: 8px; flex-shrink: 0; + flex: 1; .label { color: #909399; diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index 5146abe..25fd5ce 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -129,7 +129,7 @@ .content-wrapper { width: 100%; - height: calc(100vh - 70px); + height: calc(100vh); display: flex; } .content-wrapperall{ 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) } diff --git a/src/views/tradeManage/buyer/index.vue b/src/views/tradeManage/buyer/index.vue index 51ea821..ae15918 100644 --- a/src/views/tradeManage/buyer/index.vue +++ b/src/views/tradeManage/buyer/index.vue @@ -227,7 +227,7 @@ 浜ゆ槗纭 </el-button> <el-button - v-else-if="action.type === ActionType.EVALUATE" + v-else-if="action.type === ActionType.EVALUATE && row.parentOrder.isEvaluate === '鏈瘎浠�'" type="primary" link size="small" @@ -280,12 +280,10 @@ <script setup lang="ts"> import { onMounted, reactive, ref } from 'vue' import { useRouter } from 'vue-router' -import { Search, Refresh } from '@element-plus/icons-vue' import { ElMessage, ElMessageBox } from 'element-plus' import orderApi from '@/api/orderApi' import productApi from '@/api/productApi' import { useUserInfo } from '@/stores/modules/userInfo' -import ProductOrderStatusDialog from '@/views/productManage/productOrderStatusDialog/index.vue' import { OrderWorkflowController, OrderStatus, ActionType, PageType, StatusMapper } from '@/utils/orderWorkflow' import { queryUserDetail } from '@/api/userInfo' @@ -582,7 +580,8 @@ status: uiStatus, statusName: order.orderStatus || '', orderStatus: StatusMapper.toUIStatus(order.orderStatus), // 杞崲涓烘爣鍑嗙姸鎬佹灇涓� - workFlowId: order.workflowId || '' + workFlowId: order.workflowId || '', + isEvaluate: order.isEvaluate || '' } const subOrders: any[] = Array.isArray(order?.orderDetails) ? order.orderDetails.map((d: any, i: number) => ({ diff --git a/src/views/tradeManage/evaluate/index.vue b/src/views/tradeManage/evaluate/index.vue index f607372..f2d0411 100644 --- a/src/views/tradeManage/evaluate/index.vue +++ b/src/views/tradeManage/evaluate/index.vue @@ -862,8 +862,8 @@ }) if (result && result.code === 200) { - // 鏇存柊璁㈠崟鐘舵�佽繘鍏ヤ笅涓�涓姸鎬� - await orderApi.updateOrderStatusToNext(orderId) + // 鏇存柊璁㈠崟璇勪环鐘舵�佷负宸茶瘎浠� + await orderApi.updateOrderStatusToIsEvaluate(orderId) ElMessage.success('璇勪环鎻愪氦鎴愬姛') router.back() evaluationLoading.value = false diff --git a/src/views_back/layout/index.vue b/src/views_back/layout/index.vue index 3d30d3a..02d0afa 100644 --- a/src/views_back/layout/index.vue +++ b/src/views_back/layout/index.vue @@ -118,7 +118,7 @@ .content-wrapper { width: 100%; - height: calc(100vh - 70px); + height: calc(100vh); display: flex; } .content-wrapperall{ -- Gitblit v1.8.0