diff --git a/apps/web-contract/src/router/routes/modules/contract.ts b/apps/web-contract/src/router/routes/modules/contract.ts
index 9ac02dcd..0bb65c4d 100644
--- a/apps/web-contract/src/router/routes/modules/contract.ts
+++ b/apps/web-contract/src/router/routes/modules/contract.ts
@@ -323,7 +323,6 @@ const routes: RouteRecordRaw[] = [
title: '履行提示',
},
},
-
{
name: 'ContractPerformResult',
path: '/contract/perform/result',
@@ -333,6 +332,16 @@ const routes: RouteRecordRaw[] = [
title: '履行结果填报',
},
},
+ {
+ name: 'ContractPerformResultList',
+ path: '/contract/perform/resultList',
+ component: () =>
+ import('#/views/contract/perform/result-list/index.vue'),
+ meta: {
+ icon: 'lucide:area-chart',
+ title: '履行结果编制',
+ },
+ },
{
name: 'ContractPerformTemporaryArchive',
path: '/contract/perform/temporary-archive',
diff --git a/apps/web-contract/src/views/contract/approval/edit/index.vue b/apps/web-contract/src/views/contract/approval/edit/index.vue
index 72279815..eb00948b 100644
--- a/apps/web-contract/src/views/contract/approval/edit/index.vue
+++ b/apps/web-contract/src/views/contract/approval/edit/index.vue
@@ -19,6 +19,7 @@ import chooseUserModal from '#/views/system/user/choose-user-modal.vue';
import chooseSigningBasisModal from '../signing-basis/choose-signing-basis-modal.vue';
import { getColumns } from '../signing-basis/columns';
import { getFormSchema } from './curd';
+import AuditNodeTable from '#/views/contract/components/audit-node-table/audit-node-table.vue';
const { xGridRef, gridProps } = useVxeTable({ ref: 'xGridRef' });
@@ -86,7 +87,7 @@ const gridOptions = reactive(
}),
);
-const collapses = ['1', '2'];
+const collapses = ['1', '2', '3'];
const collapseActiveKey = ref(collapses);
function areArraysEqualUnordered(arr1, arr2) {
if (arr1.length !== arr2.length) return false;
@@ -115,7 +116,7 @@ function handleBack() {
* 页面返回并关闭tab
*/
function back() {
- router.replace('/contract/approval/list');
+ router.replace('/contract/approval/todo');
}
function handleOpenSignBasisChooseModal() {
@@ -189,38 +190,62 @@ async function handleAbolish(type: 'openModal' | 'confirm') {
}
async function handleAbolishAudit(
- type: 'accessConfirm' | 'reject' | 'rejectConfirm',
+ type: 'access' | 'accessConfirm' | 'reject' | 'rejectConfirm',
data?: any,
) {
console.log(type);
- if (type === 'accessConfirm') {
+ if (type === 'access') {
Modal.confirm({
title: '提示',
content: '是否确认立项废除审核通过?',
- onOk: async () => {
- try {
- await Apis.contractBaseInfo.post_abolishSubmit({
- params: {
- guid: id.value,
+ onOk: () => {
+ temporaryFormModalApi.setData({
+ title: '备注信息',
+ schema: {
+ columns: {
+ comment: {
+ title: '',
+ key: 'comment',
+ col: { span: 24 },
+ colon: false,
+ component: {
+ name: 'a-textarea',
+ vModel: 'value',
+ autoSize: { minRows: 4, maxRows: 6 },
+ placeholder: '请输入',
+ },
+ rules: [{ required: true, message: '请输入退回原因' }],
+ },
},
- data: {
- // appId: id.value,
- taskId: taskId,
- nodeId: '',
- comment: '通过',
- },
- });
- message.success('审核通过');
- back();
- } catch (error) {
- logger.error('审核通过失败', error);
- message.error('审核通过失败,请稍候再试');
- }
+ },
+ });
+ temporaryFormModalApi.open();
},
});
}
+ if (type === 'accessConfirm') {
+ try {
+ await Apis.contractBaseInfo.post_abolishSubmit({
+ params: {
+ guid: id.value,
+ },
+ data: {
+ // appId: id.value,
+ taskId: taskId,
+ nodeId: '',
+ comment: '通过',
+ },
+ });
+ message.success('审核通过');
+ back();
+ } catch (error) {
+ logger.error('审核通过失败', error);
+ message.error('审核通过失败,请稍候再试');
+ }
+ }
+
if (type === 'reject') {
Modal.confirm({
title: '提示',
@@ -406,7 +431,7 @@ async function handleSave() {
handleSubmit();
},
onCancel: () => {
- back();
+ // back();
},
});
} catch (error) {
@@ -427,74 +452,94 @@ async function handleSubmit() {
chooseUserModalApi.open();
}
+let auditType = ref('');
+const isTemporaryFormModalLoading = ref(false);
+
async function handleAudit(
- type: 'accessConfirm' | 'reject' | 'rejectConfirm',
+ type: 'openAccessModal' | 'openRejectModal' | 'confirm',
data?: any,
) {
console.log(type);
- if (type === 'accessConfirm') {
- if (currAuditType.value === 'abolish') {
- await handleAbolish('confirm');
- return;
- }
- Modal.confirm({
- title: '提示',
- content: '是否确认审核通过?',
- onOk: async () => {
- try {
- await Apis.contractBaseInfo.post_submit({
- params: {
- guid: id.value,
- },
- data: {
- appId: id.value,
- taskId: taskId,
- nodeId: '',
- comment: '通过',
- },
- });
- message.success('审核通过');
- back();
- } catch (error) {
- logger.error('审核通过失败', error);
- message.error('审核通过失败,请稍候再试');
- }
- },
- });
- }
-
- if (type === 'reject') {
- Modal.confirm({
- title: '提示',
- content: '是否确认退回?',
- onOk: () => {
- temporaryFormModalApi.setData({
- title: '退回原因',
- schema: {
- columns: {
- comment: {
- title: '',
- key: 'comment',
- col: { span: 24 },
- colon: false,
- component: {
- name: 'a-textarea',
- vModel: 'value',
- autoSize: { minRows: 4, maxRows: 6 },
- placeholder: '请输入',
- },
- rules: [{ required: true, message: '请输入退回原因' }],
- },
+ if (type === 'openAccessModal') {
+ auditType.value = 'access';
+ temporaryFormModalApi.setData({
+ title: '审核通过备注',
+ schema: {
+ columns: {
+ comment: {
+ title: '',
+ key: 'comment',
+ col: { span: 24 },
+ colon: false,
+ component: {
+ name: 'a-textarea',
+ vModel: 'value',
+ autoSize: { minRows: 4, maxRows: 6 },
+ placeholder: '请输入',
},
},
- });
- temporaryFormModalApi.open();
+ },
},
});
+ temporaryFormModalApi.open();
}
- if (type === 'rejectConfirm') {
+ if (type === 'confirm' && auditType.value === 'access') {
+ isTemporaryFormModalLoading.value = true;
+ const comment = data.comment;
+
+ try {
+ await Apis.contractBaseInfo.post_submit({
+ params: {
+ guid: id.value,
+ },
+ data: {
+ appId: id.value,
+ taskId: taskId,
+ nodeId: '',
+ comment: comment || '',
+ },
+ });
+ message.success('审核通过');
+ back();
+ } catch (error) {
+ logger.error('审核通过失败', error);
+ message.error('审核通过失败,请稍候再试');
+ } finally {
+ isTemporaryFormModalLoading.value = false;
+ }
+ }
+
+ if (type === 'openRejectModal') {
+ auditType.value = 'reject';
+
+ temporaryFormModalApi.setData({
+ title: '审核退回原因',
+ schema: {
+ columns: {
+ comment: {
+ title: '',
+ key: 'comment',
+ col: { span: 24 },
+ colon: false,
+ component: {
+ name: 'a-textarea',
+ vModel: 'value',
+ autoSize: { minRows: 4, maxRows: 6 },
+ placeholder: '请输入',
+ },
+ rules: [{ required: true, message: '请输入退回原因' }],
+ },
+ },
+ },
+ });
+ temporaryFormModalApi.open();
+ }
+
+ if (type === 'confirm' && auditType.value === 'reject') {
+ isTemporaryFormModalLoading.value = true;
+
const comment = data.comment;
try {
await Apis.contractBaseInfo.post_rollback({
@@ -514,6 +559,8 @@ async function handleAudit(
} catch (error) {
logger.error('合同立项退回失败', error);
message.error('退回失败,请稍候再试');
+ } finally {
+ isTemporaryFormModalLoading.value = false;
}
}
}
@@ -537,12 +584,12 @@ onMounted(async () => {
formBinding.value.columns = getFormSchema({
contractTypeData: contractTypeData.value,
- readOnly: !id.value || currData.value.step !== 'edit',
+ readOnly: !id.value || currData.value.step !== 'paEdit',
});
xGridRef.value!.reloadColumn(
getColumns({
- readOnly: !id.value || currData.value.step !== 'edit',
+ readOnly: !id.value || currData.value.step !== 'paEdit',
}),
);
@@ -600,8 +647,9 @@ onMounted(async () => {