From 2e900229d329f9eca9b774f43730659ac03722e9 Mon Sep 17 00:00:00 2001 From: yinq Date: Wed, 22 Oct 2025 17:16:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?1.0.17=20=E5=90=88=E5=90=8C=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=B8=8A=E4=BC=A0=E7=BB=88=E7=89=88=E5=90=88=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/oa/erp/contractInfo/index.vue | 108 ++++++------------------ 1 file changed, 28 insertions(+), 80 deletions(-) diff --git a/src/views/oa/erp/contractInfo/index.vue b/src/views/oa/erp/contractInfo/index.vue index 558b387..701fcc9 100644 --- a/src/views/oa/erp/contractInfo/index.vue +++ b/src/views/oa/erp/contractInfo/index.vue @@ -132,8 +132,15 @@ @@ -159,23 +166,25 @@ - - - - - - - - - + + + + + + - @@ -192,11 +201,8 @@ - - - @@ -205,6 +211,7 @@ import { listContractInfo, delContractInfo } from '@/api/oa/erp/contractInfo'; import { ContractInfoVO, ContractInfoQuery } from '@/api/oa/erp/contractInfo/types'; import { updateContractInfo } from '@/api/oa/erp/contractInfo'; import download from '@/plugins/download'; +import ApprovalRecord from '@/components/Process/approvalRecord.vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const route = useRoute(); @@ -213,6 +220,7 @@ const { contract_category, business_direction, active_flag, contract_flag, contr proxy?.useDict('contract_category', 'business_direction', 'active_flag', 'contract_flag', 'contract_type', 'contract_status') ); +const approvalRecordRef = ref>(); const contractInfoList = ref([]); const loading = ref(true); const showSearch = ref(true); @@ -336,7 +344,9 @@ const handleAdd = () => { proxy.$tab.closePage(route); router.push({ path: '/contract/contractInfo/edit', - query: {} + query: { + type: 'add' + } }); }; @@ -346,7 +356,8 @@ const handleUpdate = (row?: ContractInfoVO) => { router.push({ path: '/contract/contractInfo/edit', query: { - id: _contractId + id: _contractId, + type: 'update' } }); }; @@ -405,71 +416,8 @@ const downloadFinalContract = (ossId: string | number) => { download.oss(ossId); }; -// 提交审批 -const handleSubmitApproval = async (row: ContractInfoVO) => { - try { - // 添加确认弹框 - await proxy?.$modal.confirm('确认提交该合同进行审批?'); - - // 启动审批流程 - const submitFormData: StartProcessBo = { - businessId: row.contractId.toString(), - flowCode: 'OAC', // 使用现有的流程定义,后续可以创建专门的合同审批流程 - variables: { - // 合同相关的流程变量 - contractId: row.contractId, - contractName: row.contractName, - totalPrice: row.totalPrice - }, - bizExt: { - businessTitle: '合同审批', - businessCode: row.contractId - } - }; - - // 设置任务变量 - taskVariables.value = { - contractId: row.contractId, - contractName: row.contractName, - totalPrice: row.totalPrice, - contractCode: row.contractCode - }; - - // 启动流程并获取任务ID - const resp = await startWorkFlow(submitFormData); - - // 更新合同状态为审批中 - await updateContractInfo({ - contractId: row.contractId, - contractStatus: '2', - flowStatus: 'waiting' - } as any); - - // 自动打开审批对话框,调用第一个审批节点 - if (submitVerifyRef.value && resp.data && resp.data.taskId) { - submitVerifyRef.value.openDialog(resp.data.taskId); - } else { - proxy?.$modal.msgSuccess('审批流程已启动'); - await getList(); - } - } catch (error) { - // 用户取消操作时不显示错误 - if (error === 'cancel') { - return; - } - console.error('提交审批失败:', error); - proxy?.$modal.msgError('提交审批失败,请重试'); - } -}; - // 查看审批记录 const handleApprovalRecord = (row: ContractInfoVO) => { approvalRecordRef.value?.init(row.contractId); }; - -// 审批提交回调 -const submitCallback = async () => { - proxy?.$modal.msgSuccess('审批操作成功'); - await getList(); -}; From 74d632b62018b97fe9c32028c9ac9ea1ae82431a Mon Sep 17 00:00:00 2001 From: yinq Date: Fri, 24 Oct 2025 09:20:47 +0800 Subject: [PATCH 2/3] =?UTF-8?q?1.0.18=20=E6=8F=90=E4=BA=A4=E5=90=88?= =?UTF-8?q?=E5=90=8C=E5=B9=B6=E5=8F=91=E8=B5=B7=E6=B5=81=E7=A8=8B=E3=80=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=88=E5=90=8C=E5=AE=A1=E6=89=B9=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/oa/erp/contractInfo/index.ts | 12 + src/api/oa/erp/contractInfo/types.ts | 4 +- src/api/system/dept/index.ts | 9 + src/views/oa/erp/contractInfo/edit.vue | 334 ++++++++++++------------ src/views/oa/erp/contractInfo/index.vue | 18 +- 5 files changed, 213 insertions(+), 164 deletions(-) diff --git a/src/api/oa/erp/contractInfo/index.ts b/src/api/oa/erp/contractInfo/index.ts index 681ba3f..a2f830b 100644 --- a/src/api/oa/erp/contractInfo/index.ts +++ b/src/api/oa/erp/contractInfo/index.ts @@ -74,3 +74,15 @@ export function getErpContractInfoList(query) { params: query }); } + +/** + * 提交合同并发起流程 + * @param data + */ +export const contractSubmitAndFlowStart = (data: ContractInfoForm): AxiosPromise => { + return request({ + url: '/oa/erp/contractInfo/contractSubmitAndFlowStart', + method: 'post', + data: data + }); +}; diff --git a/src/api/oa/erp/contractInfo/types.ts b/src/api/oa/erp/contractInfo/types.ts index 554064b..f867900 100644 --- a/src/api/oa/erp/contractInfo/types.ts +++ b/src/api/oa/erp/contractInfo/types.ts @@ -306,7 +306,9 @@ export interface ContractInfoForm extends BaseEntity { * 合同物料列表 */ contractMaterialList?: any[]; - + flowCode?: any; + variables?: any; + bizExt?: any; } export interface ContractInfoQuery extends PageQuery { diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts index 03c54d5..d147ee3 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -63,3 +63,12 @@ export const delDept = (deptId: number | string) => { method: 'delete' }); }; + +// 查询全部部门列表 +export const allListDept = (query?: DeptQuery) => { + return request({ + url: '/system/dept/allListDept', + method: 'get', + params: query + }); +}; diff --git a/src/views/oa/erp/contractInfo/edit.vue b/src/views/oa/erp/contractInfo/edit.vue index a29e015..48cfff1 100644 --- a/src/views/oa/erp/contractInfo/edit.vue +++ b/src/views/oa/erp/contractInfo/edit.vue @@ -1,9 +1,9 @@ - + - - - - - 保 存 - 返 回 - - - @@ -338,7 +329,7 @@ @@ -369,28 +360,31 @@ diff --git a/src/views/oa/erp/projectInfo/index.vue b/src/views/oa/erp/projectInfo/index.vue new file mode 100644 index 0000000..8d588e8 --- /dev/null +++ b/src/views/oa/erp/projectInfo/index.vue @@ -0,0 +1,437 @@ + + + diff --git a/src/views/oa/erp/projectType/index.vue b/src/views/oa/erp/projectType/index.vue new file mode 100644 index 0000000..6a8b51a --- /dev/null +++ b/src/views/oa/erp/projectType/index.vue @@ -0,0 +1,290 @@ + + +