Просмотр исходного кода

feat(额度支用):额度支用

sufan недель назад: 2
Родитель
Сommit
4b3b0806eb

+ 9 - 0
src/api/financingManage/index.js

@@ -303,3 +303,12 @@ export function getSmbFinancingRate(params) {
     params
   })
 }
+
+// 获取苏商银行相关还款责任人
+export function getSmbRepaymentPerson(params) {
+  return request({
+    url: '/reviewQuotaDisburse/getFinancingFromInverstorsPerson',
+    method: 'get',
+    params
+  })
+}

+ 17 - 2
src/views/financingManage/limitExpenditure/components/FinancingInfo.vue

@@ -3,7 +3,7 @@
     <cy-info-title>融资信息</cy-info-title>
     <el-form ref="ruleForm" :key="ruleFormKey" :model="ruleForm" :rules="rules" label-position="top" class="rule-form-orange">
       <el-form-item label="融资金额" prop="financingAmount">
-        <cy-amount-input v-model="ruleForm.financingAmount" :disabled="disabled" placeholder="请输入融资金额" :clearable="false" />
+        <cy-amount-input v-model="ruleForm.financingAmount" :disabled="disabled" placeholder="请输入融资金额" :clearable="false" @blur="getRepaymentPersonFromSmb" />
       </el-form-item>
       <el-form-item label="币种" prop="currencyCode">
         <el-select
@@ -222,7 +222,7 @@
 <script>
 import { mapGetters } from 'vuex'
 import { getInstitutionName } from '@/api/financialManagement/financialManagement'
-import { getBusinessTypeByManagement, getBankCard, getExpiration, getSmbFinancingRate } from '@/api/financingManage'
+import { getBusinessTypeByManagement, getBankCard, getExpiration, getSmbFinancingRate, getSmbRepaymentPerson } from '@/api/financingManage'
 import { startAndEndValue, filterListData } from '@/utils'
 export default {
   props: {
@@ -490,6 +490,8 @@ export default {
           this.ruleForm.marginRatio = 0
           this.ruleForm.otherFeeAmount = 0
           this.ruleForm.financingRate = data.approvedInterestRate
+          // 调用 - 苏商银行获取相关还款责任人
+          this.getRepaymentPersonFromSmb()
         }).catch(() => {
           this.$confirm('供应商不支持该资方', '提示', {
             confirmButtonText: '确定',
@@ -504,6 +506,19 @@ export default {
         })
       }
     },
+    // 苏商银行获取相关还款责任人
+    getRepaymentPersonFromSmb() {
+      const { id } = this.$route.params
+      if (this.ruleForm.financingAmount && this.ruleForm.institutionName === '江苏苏商银行股份有限公司') {
+        getSmbRepaymentPerson({ financingBasicInfoId: id, arlpAmt: this.ruleForm.financingAmount }).then(({ data }) => {
+          const params = {
+            respRepay: true,
+            rltRepayList: data
+          }
+          this.$emit('getSmbRepaymentPerson', params)
+        })
+      }
+    },
     // 业务类型发生变化
     getCardInfo() {
       this.ruleForm.accountName = ''

+ 5 - 4
src/views/financingManage/limitExpenditure/components/ResponsiblePerson.vue

@@ -22,7 +22,7 @@
         :count="0"
       />
     </template>
-    <cy-dialog ref="dialog" title="相关还款责任人信息" width="90%" top="5vh">
+    <cy-dialog ref="dialog" title="相关还款责任人信息" width="90%" top="3vh">
       <responsible-person-dialog ref="responsiblePerson" :key="responsibleKey" :details-info="responsibleData" :disabled="responsiblePersonDisabled" :guarantee-object="ruleForm.guaranteeObject"></responsible-person-dialog>
       <div v-if="!responsiblePersonDisabled" class="submit-btn">
         <el-button @click="$refs.dialog.show = false ">取消</el-button>
@@ -162,17 +162,17 @@ export default {
               {
                 msg: '编辑',
                 category: 'edit',
-                show: !this.disabled
+                show: !row.autoGenerate && !this.disabled
               },
               {
                 msg: '删除',
                 category: 'delete',
-                show: !this.disabled
+                show: !row.autoGenerate && !this.disabled
               },
               {
                 msg: '查看',
                 category: 'see',
-                show: this.disabled
+                show: this.disabled || row.autoGenerate
               }
             ]
             const options = btnList.map(item => {
@@ -243,6 +243,7 @@ export default {
       }
     },
     addClick() {
+      this.responsiblePersonDisabled = false
       this.$refs.dialog.show = true
       this.responsibleData = {}
       this.responsibleKey += 1

+ 2 - 1
src/views/financingManage/limitExpenditure/components/ResponsiblePersonDialog.vue

@@ -818,7 +818,8 @@ export default {
               reviewRltRepayVehicles: this.movableVehicleData,
               reviewRltRepayEquityAssets: this.stockRightData,
               reviewRltRepayOtherAssets: this.otherData,
-              guaranteeObject: this.guaranteeObject
+              guaranteeObject: this.guaranteeObject,
+              autoGenerate: false
             }
             if (this.ruleForm.arlpType === 'arlpType_BZR') {
               params = {

+ 13 - 2
src/views/financingManage/limitExpenditure/mainContent.vue

@@ -76,6 +76,7 @@
         :disabled="disabled"
         style="margin-top: 20px;"
         @getInstitutionName="getInstitutionName"
+        @getSmbRepaymentPerson="getSmbRepaymentPerson"
       />
       <cy-info-title>
         收支计划
@@ -94,7 +95,7 @@
       >
       </revenue-expenditure-plan>
       <main-contract-info ref="mainContractInfo" :details-info="ruleForm.reviewMasterContract" :disabled="disabled"></main-contract-info>
-      <responsible-person ref="responsiblePerson" :disabled="disabled" :details-info="ruleForm"></responsible-person>
+      <responsible-person ref="responsiblePerson" :disabled="disabled" :details-info="smbRepaymentPerson ? smbRepaymentPerson : ruleForm"></responsible-person>
       <mortgage-pledge-info ref="mortgagePledgeInfo" :disabled="disabled" :details-info="ruleForm"></mortgage-pledge-info>
       <assignment ref="assignment" :details-info="ruleForm" :disabled="disabled"></assignment>
     </template>
@@ -171,7 +172,9 @@ export default {
       },
       formKey: 0,
       // 出资方信息
-      institutionName: ''
+      institutionName: '',
+      // 苏商银行相关还款责任人
+      smbRepaymentPerson: null
     }
   },
   watch: {
@@ -253,6 +256,14 @@ export default {
     getInstitutionName(val) {
       this.institutionName = val
     },
+    getSmbRepaymentPerson(params) {
+      const { respRepay, rltRepayList } = params
+      this.smbRepaymentPerson = {
+        ...this.ruleForm,
+        respRepay,
+        rltRepayList
+      }
+    },
     async getParams(type) {
       // const { id } = this.$route.params
       const { taskId } = this.$route.query