diff --git a/src/views/product/Add.vue b/src/views/product/Add.vue index 66e79b5..7a78223 100644 --- a/src/views/product/Add.vue +++ b/src/views/product/Add.vue @@ -55,7 +55,7 @@ - {{ item.options }} @@ -67,7 +67,7 @@ - {{ item.options }} @@ -81,12 +81,11 @@

选择本产品贷款资金的用途。

- {{ item.options }} - 其他 + :label="item.id">{{ item.name }} -

选择本产品的担保种类。

-
- {{ item.guarantyStyle }} - {{ item.name }} + {{ child.guarantyStyle }} + :label="child.itemId">{{ child.options }}
@@ -220,7 +220,6 @@ const router = useRouter(); const route = useRoute(); const curTab = ref('tab1'); const config = ref({}); -const guaranteees = ref([]); const formRef = ref(); const form = reactive({ productDefinition: '', @@ -265,9 +264,6 @@ const tabChange = (tab: TabsPaneContext, event: Event) => { const getConfig = async () => { const { process } = await getProcessInformationBasedOnRoles(41); config.value = process; - - const { data } = await typeOfGuarantee(); - guaranteees.value = data; }; // 提交 const submit = async (formEl: FormInstance | undefined) => { @@ -282,10 +278,10 @@ const submit = async (formEl: FormInstance | undefined) => { param.providentFundAndSocialSecurity = param.providentFundAndSocialSecurity ? 13 : ''; param.whetherToSupportEarlyRepayment = param.whetherToSupportEarlyRepayment ? 58 : ''; console.log(33, form, param); - const { data } = await save(param); + await save(param); addRecord(param); ElMessage.success('提交成功!'); - emit('getList'); + emit('getList', 1); // setTimeout(() => { // router.push(``) // }, 1500); @@ -298,28 +294,39 @@ const submit = async (formEl: FormInstance | undefined) => { }; // 新增判分记录 const addRecord = async (data: any) => { - const preIds = `1,2,41,44`; + const preIds = `1,2,41,${data.productType ? 45 : 44}`; // 1,关卡id,角色(这个页面是产品经理新增产品),个人/企业(44/45) const lcRule = []>[ handleId(48, 1, data.productDefinition, preIds + ',48', 3), handleId(49, 2, data.productName, preIds + ',49', 3), handleId(50, 3, 1, preIds + ',50', 1), ]; - if (data.age) { - lcRule.push(handleId(51, 41, 2, preIds + ',51', 1), handleId(51, 41, '[' + data.minimumAge + ',' + data.maximumAge + ']' + '', preIds + ',51', 5)); - } - if (data.edu) { - lcRule.push(handleId(51, 4, '3,' + data.educationalRequirements, preIds + ',51', 1)); - } - if (data.curWL) { - lcRule.push(handleId(51, 4, '3,' + data.currentWorkingLife, preIds + ',51', 1)); - } - data.providentFundAndSocialSecurity && lcRule.push(handleId(51, 4, '3,13', preIds + ',51', 1)); + data.age && lcRule.push(handleId(100, 41, '[' + data.minimumAge + ',' + data.maximumAge + ']' + '', preIds + ',51,100', 5)); + data.edu && lcRule.push(handleId(101, 42, data.educationalRequirements, preIds + ',51,101', 1)); + data.curWL && lcRule.push(handleId(102, 43, data.currentWorkingLife, preIds + ',51,102', 1)); + data.providentFundAndSocialSecurity && lcRule.push(handleId(103, '', '', preIds + ',51,103', '')); // 公积金社保 // 贷款用途 - lcRule.push(data.loanPurpose === 4 ? handleId(52, 11, data.otherPurposesOfLoan, preIds + ',52', 3) : handleId(52, 10, data.loanPurpose, preIds + ',52', 1)); + lcRule.push( + data.loanPurpose === 107 ? handleId(107, 11, data.otherPurposesOfLoan, preIds + ',52,107', 3) : handleId(data.loanPurpose, '', '', preIds + ',52,' + data.loanPurpose, 1), + ); + + // 担保方式 + data.bankGuaranteeTypeIds.includes(108) && lcRule.push(handleId(108, '', '', preIds + ',53,108', '')); + data.bankGuaranteeTypeIds.includes(109) && lcRule.push(handleId(109, '', '', preIds + ',53,109', '')); + data.bankGuaranteeTypeIds.includes(110) && lcRule.push(handleId(110, 13, data.bankGuaranteeTypeIds.filter((e: number) => e > 22 && e < 33).join(), preIds + ',53,110', 1)); + data.bankGuaranteeTypeIds.includes(111) && lcRule.push(handleId(111, 14, data.bankGuaranteeTypeIds.filter((e: number) => e > 32 && e < 38).join(), preIds + ',53,111', 1)); + + lcRule.push( + handleId(54, 15, '[' + data.minimumLoan + ',' + data.loanCeiling + ']', preIds + ',54', 5), + handleId(55, 16, '[' + data.minimumAprOnLoan + ',' + data.maximumAnnualInterestRate + ']', preIds + ',55', 5), + handleId(56, 17, '[' + data.minimumTermOfLoan + ',' + data.maximumTermOfLoan + ']', preIds + ',56', 5), + handleId(57, 18, data.modeRepayment, preIds + ',57', 1), + ); + + data.whetherToSupportEarlyRepayment && lcRule.push(handleId(58, '', '', preIds + ',58', '')); await addOperation({ - parentId: '1,2,41,44', + parentId: preIds, lcJudgmentRuleReq: lcRule, projectId: 1, }); diff --git a/src/views/product/CardList.vue b/src/views/product/CardList.vue index 0a81008..27761df 100644 --- a/src/views/product/CardList.vue +++ b/src/views/product/CardList.vue @@ -20,7 +20,7 @@
  • + @click="switchProduct(item.id)">