From f108a61293bec2c8fe7e031a1ded2805eab6edcb Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 3 Jan 2025 14:52:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(loan):=20=E9=80=82=E9=85=8D=E8=B4=B7?= =?UTF-8?q?=E6=AC=BE=E4=B8=9A=E5=8A=A1=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改投保单号为贷款合同号 - 更新相关 API 路径 -调整表格列和搜索条件以适应贷款业务 - 优化耳标号筛选功能 - 更新字典加载项 --- project/xumu/AppLoanApply/AppLoanApply.vue | 2 +- project/xumu/AppLoanApply/add.vue | 76 ++++++++++++---------- project/xumu/AppLoanApply/list.vue | 27 ++++---- project/xumu/components/AiEartagPicker.vue | 2 +- 4 files changed, 58 insertions(+), 49 deletions(-) diff --git a/project/xumu/AppLoanApply/AppLoanApply.vue b/project/xumu/AppLoanApply/AppLoanApply.vue index 99bd1c42..064b073d 100644 --- a/project/xumu/AppLoanApply/AppLoanApply.vue +++ b/project/xumu/AppLoanApply/AppLoanApply.vue @@ -17,7 +17,7 @@ export default { } }, created() { - this.dict.load("auditStatus", "insureType", "insureStatus", "category", "variety") + this.dict.load("auditStatus", "loanProduct", "loanStatus", "category", "variety") }, } diff --git a/project/xumu/AppLoanApply/add.vue b/project/xumu/AppLoanApply/add.vue index d1485b31..cc6fd96f 100644 --- a/project/xumu/AppLoanApply/add.vue +++ b/project/xumu/AppLoanApply/add.vue @@ -18,9 +18,10 @@ export default { }, data() { return { - detail: {detailList: []}, + detail: {detailList: [], loanAmount: 0}, columns, - companyList: [] + bankList: [], + filterText: "" } }, computed: { @@ -33,12 +34,14 @@ export default { isAdd: v => !v.$route.query.id, isEdit: v => v.$route.query.edit == 1, formImages: v => [ - {label: "身份证(正面)", prop: "frontCard", rules: {required: v.isAdd||v.isEdit, message: '请上传 身份证(正面)'}}, - {label: "身份证(反面)", prop: "reverseCard", rules: {required: v.isAdd||v.isEdit, message: '请上传 身份证(反面)'}}, - {label: "营业执照", prop: "businessPic", rules: {required: v.isAdd||v.isEdit, message: '请上传 营业执照'}}, - {label: "畜禽经营许可证", prop: "breedPic", rules: {required: v.isAdd||v.isEdit, message: '请上传 畜禽经营许可证'}}, - {label: "动物防疫条件许可证", prop: "prevention", rules: {required: v.isAdd||v.isEdit, message: '请上传 动物防疫条件许可证'}}, - ] + {label: "身份证(正面)", prop: "frontCard", rules: {required: v.isAdd || v.isEdit, message: '请上传 身份证(正面)'}}, + {label: "身份证(反面)", prop: "reverseCard", rules: {required: v.isAdd || v.isEdit, message: '请上传 身份证(反面)'}}, + {label: "营业执照", prop: "businessPic", rules: {required: v.isAdd || v.isEdit, message: '请上传 营业执照'}}, + {label: "畜禽经营许可证", prop: "breedPic", rules: {required: v.isAdd || v.isEdit, message: '请上传 畜禽经营许可证'}}, + {label: "动物防疫条件许可证", prop: "prevention", rules: {required: v.isAdd || v.isEdit, message: '请上传 动物防疫条件许可证'}}, + ], + selectedEartags: v => v.detail.detailList?.length || 0, + tableData: v => v.detail.detailList?.filter(e => e.biochipEarNumber.indexOf(v.filterText) > -1) || [], }, methods: { back(params = {}) { @@ -46,25 +49,25 @@ export default { }, getDetail() { const {id} = this.$route.query - return id && this.instance.post("/api/insurance/apply/getInfo", null, {params: {id}}).then(res => { + return id && this.instance.post("/api/loan/apply/getInfo", null, {params: {id}}).then(res => { if (res?.data) { const detail = res.data - detail.detailList = detail.weightList || [] + detail.detailList = detail.detailList || [] let {farmPicture: picture = "{}"} = detail picture = JSON.parse(picture) return this.detail = {...detail, ...picture} } }) }, - getCompanies() { - this.instance.post("/api/insurance/apply/getCompany").then(res => { + getBanks() { + this.instance.post("/api/loan/apply/getBank").then(res => { if (res?.data) { - this.companyList = res.data + this.bankList = res.data } }) }, getProducts(id) { - const item = this.companyList.find(e => e.id == id) + const item = this.bankList.find(e => e.id == id) return item?.children || [] }, submit(submitType) { @@ -78,7 +81,7 @@ export default { } }) this.detail.farmPicture = JSON.stringify(farmPicture) - this.instance.post("/api/insurance/apply/addOrEdit", {...this.detail, submitType}).then(res => { + this.instance.post("/api/loan/apply/addOrEdit", {...this.detail, submitType}).then(res => { if (res?.code == '0') { this.$message.success("提交成功!") this.back() @@ -88,7 +91,7 @@ export default { } }, created() { - this.getCompanies() + this.getBanks() this.getDetail() } } @@ -103,36 +106,39 @@ export default { - - - + + + - - - + + + - - + + - + - + - -