diff --git a/src/views/oa/erp/contractInfo/orderActivate.vue b/src/views/oa/erp/contractInfo/orderActivate.vue
index ad9e373..2fe808f 100644
--- a/src/views/oa/erp/contractInfo/orderActivate.vue
+++ b/src/views/oa/erp/contractInfo/orderActivate.vue
@@ -146,58 +146,58 @@
-
-
-
- 回款阶段
-
-
- 添加阶段
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-->
-
+
-
-
- 删除
-
-
+
+
+
+
+
@@ -285,7 +285,6 @@
import { getErpProjectInfoList, getProjectInfo, listProjectInfo } from '@/api/oa/erp/projectInfo';
import { saveContractOrder, updateContractOrder, submitContractOrderAndFlowStart } from '@/api/oa/erp/contractOrder';
import { ProjectInfoForm } from '@/api/oa/erp/projectInfo/types';
-import { getRuleGenerateCode } from '@/api/system/codeRule';
import { startWorkFlow } from '@/api/workflow/task';
import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
import SubmitVerify from '@/components/Process/submitVerify.vue';
@@ -300,7 +299,6 @@ import { CodeRuleEnum, FlowCodeEnum, ProjectCategoryEnum } from '@/enums/OAEnum'
import { getErpProjectPlanStageList, listErpProjectPlanStage } from '@/api/oa/erp/erpProjectPlanStage';
import { ErpProjectPlanStageForm, ErpProjectPlanStageQuery } from '@/api/oa/erp/erpProjectPlanStage/types';
import { listContractInfo, getContractInfo } from '@/api/oa/erp/contractInfo';
-import { ContractInfoVO, ContractInfoQuery } from '@/api/oa/erp/contractInfo/types';
import { getBasePaymentStageList } from '@/api/oa/base/paymentStage';
import { PaymentStageVO } from '@/api/oa/base/paymentStage/types';
import { getInfo } from '@/api/login';
@@ -359,7 +357,10 @@ const paymentStageList = ref([]);
const getPaymentStageList = async () => {
try {
const res = await getBasePaymentStageList({ pageNum: 1, pageSize: 9999 });
- paymentStageList.value = res.data || [];
+ paymentStageList.value = (res.data || []).map((item: any) => ({
+ ...item,
+ paymentStageId: item.paymentStageId != null ? String(item.paymentStageId) : item.paymentStageId
+ }));
} catch (error) {
console.error('查询回款阶段列表失败:', error);
paymentStageList.value = [];
@@ -583,6 +584,32 @@ const loadContractInfo = async () => {
return String(id.trim());
}) as any;
}
+ // 新增时:合同付款方式赋值到回款阶段表格
+ const list = (contractData as any).contractPaymentMethodList;
+ if (list && Array.isArray(list) && list.length > 0) {
+ planStageList.value = list.map((pm: any, index: number) => {
+ const stage = paymentStageList.value.find((s: PaymentStageVO) => String(s.paymentStageId) === String(pm.paymentStageId));
+ return {
+ planStageId: undefined,
+ projectId: form.value.projectId,
+ projectPlanId: undefined,
+ projectPhases: '',
+ planStartTime: undefined,
+ planEndTime: undefined,
+ collectionStage: stage.paymentStageId,
+ repaymentRate: pm.paymentPercentage ?? undefined,
+ repaymentAmount: undefined,
+ repaymentTime: undefined,
+ delayDay: undefined,
+ receivableDate: undefined,
+ reasonsExplanation: '',
+ scheduleRemark: '',
+ sortOrder: pm.sortOrder ?? index + 1,
+ remark: pm.remark ?? '',
+ activeFlag: '1'
+ } as ErpProjectPlanStageForm;
+ });
+ }
}
}
} catch (error) {