Browse Source

fix(苏商银行):苏商银行额度支用

sufan 2 months ago
parent
commit
146df66e6f

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

@@ -294,3 +294,12 @@ export function generateContractLink(params) {
     params
   })
 }
+
+// 获取苏商银行融资利率
+export function getSmbFinancingRate(params) {
+  return request({
+    url: '/reviewQuotaDisburse/getFinancingFromInvestorsNotice',
+    method: 'get',
+    params
+  })
+}

+ 1 - 1
src/views/financingManage/components/ApplyFinancing.vue

@@ -90,7 +90,7 @@
       </el-form-item>
       <cy-info-title style="margin-top: 20px;">账户信息</cy-info-title>
       <el-form-item label="是否为江苏苏商银行" prop="smb">
-        <el-radio-group v-model="ruleForm.smb" :disabled="disabled" @change="smbChange">
+        <el-radio-group v-model="ruleForm.smb" :disabled="disabled">
           <el-radio :label="1">是</el-radio>
           <el-radio :label="0">否</el-radio>
         </el-radio-group>

+ 12 - 3
src/views/financingManage/components/ContractConclusion.vue

@@ -192,6 +192,12 @@ export default {
             return item
           })
         }
+        // 获取签署文件
+        if (!this.disabled && this.detailsInfo?.id) {
+          this.getSignFilesList()
+        }
+        // 解决签署历史改文件的问题
+        this.filterSignFileList()
       },
       deep: true,
       immediate: true
@@ -199,9 +205,6 @@ export default {
   },
   created() {
     this.getSignList()
-    if (!this.disabled) {
-      this.getSignFilesList()
-    }
   },
   methods: {
     getSignList() {
@@ -213,8 +216,14 @@ export default {
     getSignFilesList() {
       getSignFiles({ contractInfoId: this.detailsInfo.id }).then(({ data }) => {
         this.signWayList = data
+        this.filterSignFileList()
       })
     },
+    // 去除与签署文件不匹配的签署文件
+    filterSignFileList() {
+      const signList = this.signWayList.filter(item => this.ruleForm.electronicSign.includes(item.code)).map(item => item.code)
+      if (signList.length) this.ruleForm.electronicSign = signList
+    },
     handlerOperate(type, index) {
       if (type === 'add') {
         this.tableData.push(

+ 4 - 2
src/views/financingManage/components/ContractPreparationContent.vue

@@ -138,7 +138,9 @@ export default {
         }
       ],
       conditionSettingList: [],
-      tripartiteData: {}
+      tripartiteData: {
+        reviewBasicContractList: []
+      }
     }
   },
   computed: {
@@ -209,7 +211,7 @@ export default {
           reviewBasicContractList: contractBasicContractList && contractBasicContractList.map(item => {
             // item.contractContentList = item.contractChangeContentList
             return item
-          })
+          }) || []
         }
       },
       immediate: true,

+ 45 - 4
src/views/financingManage/limitExpenditure/components/FinancingInfo.vue

@@ -160,7 +160,8 @@
       </el-form-item>
       <el-form-item label="还款方式" prop="payBackMethod" style="width: 100%">
         <el-radio-group v-model="ruleForm.payBackMethod" :disabled="disabled">
-          <el-radio v-for="(item, index) in constant.paymentMethodForInterestManagementFee" :key="index" :label="item.code">{{ item.name }}</el-radio>
+          <!-- constant.paymentMethodForInterestManagementFee 苏商银行修改 -->
+          <el-radio v-for="(item, index) in getPayBackMethod " :key="index" :label="item.code">{{ item.name }}</el-radio>
         </el-radio-group>
       </el-form-item>
       <el-form-item label="融资利率(年化)" prop="financingRate" class="one-form-item">
@@ -222,8 +223,8 @@
 <script>
 import { mapGetters } from 'vuex'
 import { getInstitutionName } from '@/api/financialManagement/financialManagement'
-import { getBusinessTypeByManagement, getBankCard, getExpiration } from '@/api/financingManage'
-import { startAndEndValue } from '@/utils'
+import { getBusinessTypeByManagement, getBankCard, getExpiration, getSmbFinancingRate } from '@/api/financingManage'
+import { startAndEndValue, filterListData } from '@/utils'
 export default {
   props: {
     disabled: {
@@ -231,7 +232,7 @@ export default {
       default: false
     },
     detailsInfo: {
-      type: Object,  
+      type: Object,
       default: () => {}
     },
     endDate: {
@@ -347,6 +348,15 @@ export default {
     },
     businessInfo() {
       return this.businessTypeInfo.find(item => item.businessTypeDic.id === this.ruleForm.businessType)
+    },
+    // 江苏苏商银行股份有限公司-单独判断
+    getPayBackMethod() {
+      if (this.ruleForm.institutionName === '江苏苏商银行股份有限公司') {
+        // 还款方式为 管理费前收利息按月收
+        return filterListData(this.constant.paymentMethodForInterestManagementFee, ['paymentMethodForInterestManagementFee_A', 'paymentMethodForInterestManagementFee_B', 'paymentMethodForInterestManagementFee_C'])
+      } else {
+        return filterListData(this.constant.paymentMethodForInterestManagementFee, ['paymentMethodForInterestManagementFee_D'])
+      }
     }
   },
   watch: {
@@ -359,10 +369,13 @@ export default {
             transferNoticeMethodList: transferNoticeMethodList || [],
             serviceScopeList: serviceScopeList || []
           })
+
           this.ruleFormKey += 1
           this.$nextTick(() => {
             setTimeout(() => {
               this.getBusinessTypeInfoData()
+              // 苏商银行调用方法
+              this.$emit('getInstitutionName', this.ruleForm.institutionName)
             }, 500)
           })
         }
@@ -458,13 +471,41 @@ export default {
         })
       }
     },
+    // 出资方发生变化
     getBusinessTypeInfo() {
       this.ruleForm.businessType = ''
       this.ruleForm.accountName = ''
       this.ruleForm.disburseExpiryDate = ''
       this.ruleFormKey += 1
       this.getBusinessTypeInfoData()
+      // 苏商银行调用方法
+      this.getChangeSmbInfo()
+    },
+    // 苏商银行单独判断
+    getChangeSmbInfo() {
+      this.$emit('getInstitutionName', this.ruleForm.institutionName)
+      if (this.ruleForm.institutionName === '江苏苏商银行股份有限公司') {
+        const { id } = this.$route.params
+        getSmbFinancingRate({ financingBasicInfoId: id }).then(({ data }) => {
+          this.ruleForm.interestCalculate = 1
+          this.ruleForm.marginRatio = 0
+          this.ruleForm.otherFeeAmount = 0
+          this.ruleForm.financingRate = data.approvedInterestRate
+        }).catch(() => {
+          this.$confirm('供应商不支持该资方', '提示', {
+            confirmButtonText: '确定',
+            showCancelButton: false,
+            closeOnClickModal: false,
+            showClose: false,
+            type: 'warning'
+          }).then(() => {
+            this.ruleForm.institutionName = ''
+            this.$emit('getInstitutionName', this.ruleForm.institutionName)
+          })
+        })
+      }
     },
+    // 业务类型发生变化
     getCardInfo() {
       this.ruleForm.accountName = ''
       this.ruleForm.disburseExpiryDate = ''

+ 15 - 3
src/views/financingManage/limitExpenditure/mainContent.vue

@@ -21,14 +21,18 @@
       </el-form-item>
       <template v-if="ruleForm.approvalConclusion === 'pass'">
         <cy-info-title>授信余额</cy-info-title>
-        <el-form-item label="业务综合授信余额" class="one-form-item">
+        <el-form-item label="业务综合授信余额">
           <cy-amount-input v-model="ruleForm.businessCreditBalance" disabled placeholder="请输入业务综合授信余额" clearable>
           </cy-amount-input>
         </el-form-item>
-        <el-form-item label="供应商授信余额" class="one-form-item">
+        <el-form-item label="供应商授信余额">
           <cy-amount-input v-model="ruleForm.supplierCreditBalance" disabled placeholder="请输入供应商授信余额" clearable>
           </cy-amount-input>
         </el-form-item>
+        <el-form-item v-if="institutionName === '江苏苏商银行股份有限公司'" label="资方授信可用余额">
+          <cy-amount-input v-model="ruleForm.managementCreditBalance" disabled placeholder="请输入资方授信可用余额" clearable>
+          </cy-amount-input>
+        </el-form-item>
         <cy-info-title>应收账款信息</cy-info-title>
         <el-form-item label="应收账款起始日" prop="startDate">
           <el-date-picker
@@ -71,6 +75,7 @@
         :accounts-receivable-net-amount-total="ruleForm.accountsReceivableNetAmountTotal"
         :disabled="disabled"
         style="margin-top: 20px;"
+        @getInstitutionName="getInstitutionName"
       />
       <cy-info-title>
         收支计划
@@ -130,6 +135,7 @@ export default {
         approvalComments: '',
         businessCreditBalance: '',
         supplierCreditBalance: '',
+        managementCreditBalance: '',
         reviewMasterContract: {
           factoringAccountName: '',
           factoringAccount: '',
@@ -163,7 +169,9 @@ export default {
         incomeExpenditurePlanList: [],
         planIrrStr: ''
       },
-      formKey: 0
+      formKey: 0,
+      // 出资方信息
+      institutionName: ''
     }
   },
   watch: {
@@ -241,6 +249,10 @@ export default {
         this.planIrrStr = data
       })
     },
+    // 苏商银行回调 - 用来判断 - 资方授信可用余额 - 是否显示
+    getInstitutionName(val) {
+      this.institutionName = val
+    },
     async getParams(type) {
       // const { id } = this.$route.params
       const { taskId } = this.$route.query

+ 2 - 2
src/views/systemManage/logManage/detail.vue

@@ -7,7 +7,7 @@
       :table-options="tableOptions"
       :data="tableData"
       :count="total"
-      parentComponent="LogDetail"
+      parent-component="LogDetail"
     />
   </div>
 </template>
@@ -54,4 +54,4 @@ export default {
 
 <style lang="scss">
 
-</style>
+</style>