Browse Source

授信详情根据类型展示

peixh 3 years ago
parent
commit
03a8299896

+ 1 - 1
front-vue/src/router/index.js

@@ -279,7 +279,7 @@ export const constantRoutes = [
         meta: { title: '修改授信信息',noCache: true }
       },
       {
-        path: 'detailCreditLine/:zfpcrId/:zfiAmount/:usableAmount',
+        path: 'detailCreditLine/:zfpcrId/:zfiAmount/:usableAmount/:companyType',
         component: (resolve) => require(['@/views/service/creditLine/detailCreditLine'], resolve),
         name: 'detailCreditLine',
         meta: { title: '授信信息详情',noCache: true }

+ 13 - 11
front-vue/src/views/service/creditLine/creditLine.vue

@@ -539,9 +539,10 @@ export default {
       const zfpcrId = row.zfpcrId || this.ids;
       const zfiAmount = row.zfiAmount;
       const usableAmount = row.usableAmount;
+      const companyType = this.companyType;
       this.resetQuery();
-      Cookies.set("/creditLine/detailCreditLine/" + zfpcrId + '/' + zfiAmount + '/' + usableAmount + '/', this.$route.fullPath)
-      this.$router.push("/creditLine/detailCreditLine/" + zfpcrId + '/' + zfiAmount + '/' + usableAmount + '/',);
+      Cookies.set("/creditLine/detailCreditLine/" + zfpcrId + '/' + zfiAmount + '/' + usableAmount + '/' + companyType + '/', this.$route.fullPath)
+      this.$router.push("/creditLine/detailCreditLine/" + zfpcrId + '/' + zfiAmount + '/' + usableAmount + '/' + companyType + '/',);
     },
     /** 冻结/解冻按钮操作 */
     handleUpdate(row) {
@@ -615,15 +616,16 @@ export default {
     },
     /* 金额格式化 */
     moneyFormat(row, column, cellValue) {
-      if(cellValue){
-        cellValue += "";
-        if (!cellValue.includes(".")) cellValue += ".";
-        return cellValue
-          .replace(/(\d)(?=(\d{3})+\.)/g, function($0, $1) {
-            return $1 + ",";
-          })
-          .replace(/\.$/, "");
-      }
+        if(cellValue == null || cellValue== undefined || cellValue == ''){
+            cellValue = '0.00'
+        }
+        cellValue += '';
+        if (!cellValue.includes('.')) {
+            cellValue += '.00';
+        }
+        return cellValue.replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
+            return $1 + ',';
+          }).replace(/\.$/, '');
     },
     /* 修改表格样式 */
     changeCellStyle(row, column, rowIndex, columnIndex) {

+ 23 - 20
front-vue/src/views/service/creditLine/detailCreditLine.vue

@@ -16,25 +16,25 @@
           </el-form-item>
         </el-col>
         <el-col :span="8">
-          <el-form-item label="融资产品:" prop="zfpcrProductId">
-            <el-select v-model="form.zfpcrProductId" style="width : 284px" clearable disabled>
+          <el-form-item label="授信企业名称:" prop="zfpcrCompanyId">
+            <el-select v-model="form.zfpcrCompanyId" style="width : 284px" clearable disabled>
               <el-option
-                v-for="(item,index) in financeProductList"
+                v-for="(item,index) in hxCompanyList"
                 :key="index"
-                :label="item.zfpName"
-                :value="item.zfpId"
+                :label="item.scyName"
+                :value="item.scyId"
               ></el-option>
             </el-select>
           </el-form-item>
         </el-col>
         <el-col :span="8">
-          <el-form-item label="授信企业名称:" prop="zfpcrCompanyId">
-            <el-select v-model="form.zfpcrCompanyId" style="width : 284px" clearable disabled>
+          <el-form-item label="融资产品:" prop="zfpcrProductId">
+            <el-select v-model="form.zfpcrProductId" style="width : 284px" clearable disabled>
               <el-option
-                v-for="(item,index) in hxCompanyList"
+                v-for="(item,index) in financeProductList"
                 :key="index"
-                :label="item.scyName"
-                :value="item.scyId"
+                :label="item.zfpName"
+                :value="item.zfpId"
               ></el-option>
             </el-select>
           </el-form-item>
@@ -111,7 +111,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="8">
-          <el-form-item label="是否收取手续费:" prop="zfpcrCharge" label-width="113px">
+          <el-form-item label="是否收取手续费:" prop="zfpcrCharge" label-width="113px" v-if="this.companyType == '00'">
             <el-radio-group v-model="form.zfpcrCharge" size="medium" disabled>
               <el-radio-button  v-for="(dict,index) in chargeOptions" :key="index" :label="dict.dictValue" border>{{dict.dictLabel}}</el-radio-button>
             </el-radio-group>
@@ -120,14 +120,14 @@
       </el-row>
       <el-row>
         <el-col :span="8">
-          <el-form-item label="平台服务费收取费率:" prop="zfpcrChargeRate" label-width="139px" v-if="this.form.zfpcrCharge == '1'">
+          <el-form-item label="平台服务费收取费率:" prop="zfpcrChargeRate" label-width="139px" v-if="this.form.zfpcrCharge == '1' && this.companyType == '00'">
           <el-input v-model="form.zfpcrChargeRate" placeholder="请输入平台服务费收取费率" style="width:284px" readonly>
             <template slot="append">%</template>
           </el-input>
         </el-form-item>
         </el-col>
         <el-col :span="8">
-          <el-form-item label="核心企业还款账户账号:" prop="zfpcrAccount" label-width="142px">
+          <el-form-item label="核心企业还款账户账号:" prop="zfpcrAccount" label-width="142px" v-if="this.companyType == '00'">
             <el-autocomplete
               readonly
               style="width:286px"
@@ -139,7 +139,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="8">
-          <el-form-item label="核心企业还款账户开户行:" prop="zfpcrAccountBank" label-width="142px">
+          <el-form-item label="核心企业还款账户开户行:" prop="zfpcrAccountBank" label-width="142px" v-if="this.companyType == '00'">
             <el-input v-model="form.zfpcrAccountBank" placeholder="请输入核心企业还款账户开户行" style="width:284px" maxlength="30" readonly>
             </el-input>
           </el-form-item>
@@ -147,7 +147,7 @@
       </el-row>
       <el-row>
         <el-col :span="8">
-          <el-form-item label="融资放款方式:" prop="zfpcrLoanType">
+          <el-form-item label="融资放款方式:" prop="zfpcrLoanType" v-if="this.companyType == '00'">
             <el-select v-model="form.zfpcrLoanType" placeholder="请选择状态" clearable style="width : 284px" clearable disabled>
               <el-option
                 v-for="dict in loanTypeOptions"
@@ -159,7 +159,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="8">
-          <el-form-item label="记账簿托管方式:" prop="zfpcrBookkeepingType" label-width="113px">
+          <el-form-item label="记账簿托管方式:" prop="zfpcrBookkeepingType" label-width="113px" v-if="this.companyType == '00'">
             <el-select v-model="form.zfpcrBookkeepingType" placeholder="请选择状态" clearable style="width : 284px" clearable disabled>
               <el-option
                 v-for="dict in bookkeepingTypeOptions"
@@ -171,11 +171,11 @@
         </el-form-item>
         </el-col>
       </el-row>
-      <el-divider content-position="left">关联合同</el-divider>
+      <el-divider content-position="left" v-if="this.companyType == '00'">关联合同</el-divider >
       <el-form-item prop="zfqcrContractId" style="margin-left: 100px" >
         <!-- <el-button size="mini" type="primary" @click="openTicket">选择合同</el-button>
         <el-button size="mini" @click="deleteTicekt">清空全部</el-button> -->
-        <el-table :data="ticketList" style="width: 1100px">
+        <el-table :data="ticketList" style="width: 1100px" v-if="this.companyType == '00'">
           <el-table-column label="序号" type="index" width="50" align="center">
             <template slot-scope="scope">
               <span>{{ (queryParamsContract.pageNum - 1) * queryParamsContract.pageSize + scope.$index + 1}}</span>
@@ -283,6 +283,8 @@ export default {
   components: {},
   data() {
     return {
+      //企业类型
+      companyType: null,
       wordUrl: '',
       openWord: false,
       //金额展示
@@ -387,8 +389,8 @@ export default {
         zfpcrAmount: [
           { required: true, message: "授信额度不能为空", trigger: ["blur", "change"] },
           {
-             pattern: /^([0-9]{1,2}$)|(^[0-9]{1,2}\.[0-9]{1,2}$)|100$/,
-            message: "请输入正确的平台服务费收取费率",
+            pattern: /^[0-9][0-9]{0,8}$|^[1-9][0-9]{0,8}[.]\d{1,2}$/,
+            message: "请输入正确的额度",
             trigger: ["blur","change"],
           },
         ],
@@ -430,6 +432,7 @@ export default {
     const zfpcrId = this.$route.params && this.$route.params.zfpcrId;
     const zfiAmount = this.$route.params && this.$route.params.zfiAmount;
     const usableAmount = this.$route.params && this.$route.params.usableAmount;
+    this.companyType = this.$route.params && this.$route.params.companyType;
     var self =this;
     getCreditLine(zfpcrId).then((response) => {
       debugger

+ 10 - 9
front-vue/src/views/service/creditLine/supplierCreditLine.vue

@@ -526,15 +526,16 @@ export default {
     },
     /* 金额格式化 */
     moneyFormat(row, column, cellValue) {
-      if(cellValue){
-        cellValue += "";
-        if (!cellValue.includes(".")) cellValue += ".";
-        return cellValue
-          .replace(/(\d)(?=(\d{3})+\.)/g, function($0, $1) {
-            return $1 + ",";
-          })
-          .replace(/\.$/, "");
-      }
+        if(cellValue == null || cellValue== undefined || cellValue == ''){
+            cellValue = '0.00'
+        }
+        cellValue += '';
+        if (!cellValue.includes('.')) {
+            cellValue += '.00';
+        }
+        return cellValue.replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
+            return $1 + ',';
+          }).replace(/\.$/, '');
     },
   }
 };

+ 11 - 10
front-vue/src/views/service/financeRecord/financeRecord.vue

@@ -1107,16 +1107,17 @@ export default {
         },
         /* 金额格式化 */
         moneyFormat(row, column, cellValue) {
-            if (cellValue) {
-                cellValue += "";
-                if (!cellValue.includes(".")) cellValue += ".";
-                return cellValue
-                    .replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
-                        return $1 + ",";
-                    })
-                    .replace(/\.$/, "");
-            }
-        },
+        if(cellValue == null || cellValue== undefined || cellValue == ''){
+            cellValue = '0.00'
+        }
+        cellValue += '';
+        if (!cellValue.includes('.')) {
+            cellValue += '.00';
+        }
+        return cellValue.replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
+            return $1 + ',';
+          }).replace(/\.$/, '');
+    },
         //获取当前客户是否之前设置过列展示隐藏
         columnQuery() {
             //获取页面路径