Bladeren bron

Merge branch 'dev1.2.0' of http://192.168.0.200:3000/suf/factoring-trade-front-end-v2 into 1.2.0

lazy 2 maanden geleden
bovenliggende
commit
ea39e88b09

+ 101 - 9
src/views/divideAccountsManage/edit.vue

@@ -32,13 +32,18 @@
           <el-input v-model="ruleForm.remark" placeholder="请输入说明" :disabled="disabled" />
         </el-form-item>
       </template>
-
+      <el-form-item label="是否苏商资方分账">
+        <el-radio-group v-model="ruleForm.smbFinancing" :disabled="disabled">
+          <el-radio :label="true">是</el-radio>
+          <el-radio :label="false">否</el-radio>
+        </el-radio-group>
+      </el-form-item>
       <cy-info-title>
         货款分配
         <div v-if="!disabled" slot="right">
           <el-button type="text" @click="oneCalc('click')">一键计算</el-button>
           <el-button type="primary" @click="financingGoods">选择已融资货物</el-button>
-          <el-button type="primary" @click="acceptanceGoods">选择已验收货物</el-button>
+          <el-button v-if="!ruleForm.smbFinancing" type="primary" @click="acceptanceGoods">选择已验收货物</el-button>
         </div>
       </cy-info-title>
       <el-form-item label="货款金额" prop="name" style="width: 100%">
@@ -143,7 +148,8 @@ export default {
   data() {
     return {
       ruleForm: {
-        remark: ''
+        remark: '',
+        smbFinancing: ''
       },
       rules: {},
       key: 0,
@@ -330,11 +336,13 @@ export default {
             return <span> { this.handlerMoneyEmpty(row.financingOverdueInterest) }</span>
           }
         },
+        // 原来逻辑 --- 开始 --- 苏商不展示
         {
           label: '是否分配融资利息和管理费',
           prop: 'hasAssignInterest',
           showTooltip: true,
           width: '110',
+          show: !this.ruleForm.smbFinancing,
           render: (h, row) => {
             return <el-select disabled={this.disabled} v-model={ row.hasAssignInterest } onChange={() => { this.oneCalc('click') }} placeholder='请选择是否'>
               <el-option label='是' value={true}></el-option>
@@ -346,7 +354,7 @@ export default {
           label: '融资利息',
           prop: 'financingInterest',
           showTooltip: true,
-          show: this.oneCalcStatus,
+          show: this.oneCalcStatus && !this.ruleForm.smbFinancing,
           width: '120',
           render: (h, row) => {
             return <span> { this.handlerMoneyEmpty(row.financingInterest) }</span>
@@ -369,22 +377,100 @@ export default {
           prop: 'financingManagementFee',
           width: '120',
           showTooltip: true,
-          show: this.oneCalcStatus,
+          show: this.oneCalcStatus && !this.ruleForm.smbFinancing,
           render: (h, row) => {
             return <span> { this.handlerMoneyEmpty(row.financingManagementFee) }</span>
           }
-
         },
         {
           label: '融资本金',
           prop: 'financingPrincipal',
           showTooltip: true,
-          show: this.oneCalcStatus,
+          show: this.oneCalcStatus && !this.ruleForm.smbFinancing,
           width: '120',
           render: (h, row) => {
             return <span> { this.handlerMoneyEmpty(row.financingPrincipal) }</span>
           }
         },
+        // 原来逻辑 --- 结束 --- 苏商不展示
+        // 苏商逻辑 --- 开始 --- 原来不展示
+        {
+          label: '是否分配长银融资利息/管理费/本金',
+          prop: 'hasAssignInkasso',
+          showTooltip: true,
+          show: this.ruleForm.smbFinancing,
+          width: '150',
+          render: (h, row) => {
+            return <el-select disabled={this.disabled} v-model={ row.hasAssignInkasso } onChange={() => { this.oneCalc('click') }} placeholder='请选择是否'>
+              <el-option label='是' value={true}></el-option>
+              <el-option label='否' value={false}></el-option>
+            </el-select>
+          }
+        },
+        {
+          label: '长银利息',
+          prop: 'inkassoInterest',
+          showTooltip: true,
+          show: this.oneCalcStatus && this.ruleForm.smbFinancing,
+          width: '120',
+          render: (h, row) => {
+            return <span> { this.handlerMoneyEmpty(row.inkassoInterest) }</span>
+          }
+        },
+        {
+          label: '长银管理费',
+          prop: 'inkassoManagementFee',
+          showTooltip: true,
+          show: this.oneCalcStatus && this.ruleForm.smbFinancing,
+          width: '120',
+          render: (h, row) => {
+            return <span> { this.handlerMoneyEmpty(row.inkassoManagementFee) }</span>
+          }
+        },
+        {
+          label: '长银本金',
+          prop: 'inkassoPrincipal',
+          showTooltip: true,
+          show: this.oneCalcStatus && this.ruleForm.smbFinancing,
+          width: '120',
+          render: (h, row) => {
+            return <span> { this.handlerMoneyEmpty(row.inkassoPrincipal) }</span>
+          }
+        },
+        {
+          label: '是否分配资方融资利息/本金',
+          prop: 'hasAssignManagement',
+          showTooltip: true,
+          width: '130',
+          show: this.ruleForm.smbFinancing,
+          render: (h, row) => {
+            return <el-select disabled={this.disabled} v-model={ row.hasAssignManagement } onChange={() => { this.oneCalc('click') }} placeholder='请选择是否'>
+              <el-option label='是' value={true}></el-option>
+              <el-option label='否' value={false}></el-option>
+            </el-select>
+          }
+        },
+        {
+          label: '资方融资利息',
+          prop: 'managementInterest',
+          showTooltip: true,
+          show: this.oneCalcStatus && this.ruleForm.smbFinancing,
+          width: '120',
+          render: (h, row) => {
+            return <span> { this.handlerMoneyEmpty(row.managementInterest) }</span>
+          }
+        },
+        {
+          label: '资方融资本金',
+          prop: 'managementPrincipal',
+          showTooltip: true,
+          show: this.oneCalcStatus && this.ruleForm.smbFinancing,
+          width: '120',
+          render: (h, row) => {
+            return <span> { this.handlerMoneyEmpty(row.managementPrincipal) }</span>
+          }
+        },
+        // 苏商逻辑 --- 结束 --- 原来不展示
         {
           label: '履约保证金',
           prop: 'accrualAmount',
@@ -496,6 +582,7 @@ export default {
     getDetailsData(data) {
       const { ledgerAccountBasicInfo, goodsAssignList, supplierBankCardInfoList } = data
       this.ledgerAccountBasicInfo = ledgerAccountBasicInfo
+      this.ruleForm.smbFinancing = ledgerAccountBasicInfo.smbFinancing
       this.loanTableData = goodsAssignList
       this.accountTableData = supplierBankCardInfoList
       if (goodsAssignList.length) {
@@ -509,7 +596,7 @@ export default {
         enterpriseId
       }
       getFinancingGoods(params).then((data) => {
-        this.financingGoodsList = data.data
+        this.financingGoodsList = data.data.filter(item => item.smbFinancing === this.ruleForm.smbFinancing)
       })
     },
     getAcceptanceGoodsList() {
@@ -565,6 +652,8 @@ export default {
         if (!item.hasAssignInterest) item.hasAssignInterest = true
         if (!item.hasAssignManagementFee) item.hasAssignManagementFee = true
         if (!item.hasAssignOverdueInterest) item.hasAssignOverdueInterest = true
+        if (!item.hasAssignInkasso) item.hasAssignInkasso = false
+        if (!item.hasAssignManagement) item.hasAssignManagement = false
         return item
       })
       this.paymentAccountClick()
@@ -587,7 +676,10 @@ export default {
         }
         const params = {
           Loading: true,
-          ledgerAccountBasicInfo: this.ledgerAccountBasicInfo,
+          ledgerAccountBasicInfo: {
+            ...this.ledgerAccountBasicInfo,
+            smbFinancing: this.ruleForm.smbFinancing
+          },
           goodsAssignList: this.loanTableData
           // this.loanTableData.map(item => {
           //   delete item.financingOverdueInterestList

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

@@ -91,15 +91,15 @@
       <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">
-          <el-radio :label="1">是</el-radio>
-          <el-radio :label="0">否</el-radio>
+          <el-radio :label="true">是</el-radio>
+          <el-radio :label="false">否</el-radio>
         </el-radio-group>
       </el-form-item>
       <el-form-item
         label="保理申请人银行名称"
         prop="applicantDesignatedBankName"
         :rules="[
-          { required: ruleForm.smb === 0, message: '请输入保理申请人银行名称', trigger: 'blur' }
+          { required: ruleForm.smb === false, message: '请输入保理申请人银行名称', trigger: 'blur' }
         ]"
       >
         <el-input v-model="ruleForm.applicantDesignatedBankName" :disabled="disabled" placeholder="请输入保理申请人银行名称" />

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

@@ -135,6 +135,7 @@
         </el-form-item>
         <el-form-item label="代偿承诺函">
           <cy-upload
+            ref="commitmentFile"
             :upload-params="{}"
             :file-data="compensationFileList"
             :disabled="true"
@@ -268,12 +269,13 @@ export default {
                   return
                 }
               }
-
+              const commitmentFileIds = this.$refs.commitmentFile.getFileLists.map(item => item.id)
               const params = {
                 ...this.ruleFormFile,
                 receivablesFileIds,
                 mortgageFileIds,
-                ownershipFileIds
+                ownershipFileIds,
+                commitmentFileIds
               }
               delete params.receivablesFiles
               delete params.mortgageFiles

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

@@ -484,6 +484,8 @@ export default {
     getChangeSmbInfo() {
       this.$emit('getInstitutionName', this.ruleForm.institutionName)
       if (this.ruleForm.institutionName === '江苏苏商银行股份有限公司') {
+        // 还款方式 - 管理费前收利息按月收
+        this.ruleForm.payBackMethod = 'paymentMethodForInterestManagementFee_D'
         const { id } = this.$route.params
         getSmbFinancingRate({ financingBasicInfoId: id }).then(({ data }) => {
           this.ruleForm.interestCalculate = 1

+ 2 - 0
src/views/financingManage/paymentApprove.vue

@@ -53,8 +53,10 @@ export default {
         taskId,
         ...oneData,
         receivablesRegisterInfo: twoData,
+        commitmentFileIds: twoData.commitmentFileIds,
         paymentApplyId
       }
+      delete params.receivablesRegisterInfo.commitmentFileIds
       if (!twoData) {
         params.receivablesRegisterInfo
       }