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 { - - - + + + - - - + + + - - + + - + - + - -