Browse Source

Merge branch 'dev1.0.2' of http://222.90.211.174:3000/suf/factoring-trade-front-end-v2 into dev1.0.2

sufan 7 months ago
parent
commit
05531628c3

+ 84 - 22
src/components/Input/InputNumber/index.vue

@@ -1,17 +1,29 @@
-<!-- 只能输入纯数字input框 -->
+<!-- 数字input框 -->
 <template>
-  <el-input v-model="inputVal" :maxlength="maxLen" :disabled="disabled" type="text" :placeholder="placeholder" @input="handleInput">
-    <template v-if="!isPositive">
-      <i slot="prefix" class="el-icon-minus" />
-    </template>
-  </el-input>
+  <el-input
+    v-if="decimalOptions.needy"
+    v-model="inputVal"
+    :placeholder="placeholder"
+    :disabled="disabled"
+    :maxlength="maxLen"
+    @change="handleChange"
+  />
+  <el-input
+    v-else
+    v-model="inputVal"
+    :disabled="disabled"
+    :placeholder="placeholder"
+    :controls="false"
+    :maxlength="maxLen"
+    @change="handleInput"
+  />
 </template>
 
 <script>
 /**
- * 如果数字是负数必须在组件声明处标志isPositive此prop
- * eg:  <cy-number-input v-model="testVal" :is-positive="false" />
- *  <cy-number-input v-model="testVal" />
+ * eg: <cy-number-input v-model="testVal" />
+ * 支持小数需要配置decimalOptions选项, 如果小数不保留任何位数请直接使用整数配置
+ * <cy-number-input v-model="testVal" :decimalOptions="{ needy:true, digitsNo: 2 }" />
  */
 export default {
   props: {
@@ -23,11 +35,6 @@ export default {
       type: String,
       default: '请输入数字'
     },
-    // 是否为正数
-    isPositive: {
-      type: Boolean,
-      default: true
-    },
     value: {
       type: [String, Number],
       default: ''
@@ -35,6 +42,15 @@ export default {
     disabled: {
       type: Boolean,
       default: false
+    },
+    decimalOptions: {
+      type: Object,
+      default: () => {
+        return {
+          needy: false, // true开启小数认证
+          digitsNo: 2 // 保留位数
+        }
+      }
     }
   },
   data() {
@@ -46,26 +62,72 @@ export default {
     value: {
       handler(val) {
         if (val === undefined) return
-        this.handleInput(String(val))
+        if (!this.decimalOptions.needy) {
+          this.handleInput(val)
+        } else {
+          this.handleChange(val)
+        }
       },
       immediate: true
     },
     inputVal(val) {
-      this.handleInput(val)
+      if (!this.decimalOptions.needy) {
+        this.handleInput(val)
+      }
     }
   },
   methods: {
     handleInput(val) {
-      // 移除非数字字符
-      this.inputVal = val.replace(/[^\d]/g, '')
-      if (!this.isPositive) {
-        this.$emit('input', Number('-' + this.inputVal))
+      if (val === '' || val.replace(/\s/g, '') === '') {
+        this.inputVal = ''
+        return
+      }
+      const newVal = String(val).replace(/[^\d | \-]/g, '').replace(/\s/g, '')
+      if (newVal === undefined || newVal === '-') return
+      this.inputVal = newVal
+      this.$emit('input', this.inputVal)
+    },
+    handleChange(val) {
+      if (val === '' || val.replace(/\s/g, '') === '') {
+        this.inputVal = ''
+        return
+      }
+      if (val.indexOf('.') === -1) {
+        this.inputVal = ''
+        return
+      }
+      let newVal = val.replace(/[^d+] | [\-] | [\.]/g, '').replace(/\s/g, '')
+      const fixedPosition = this.decimalOptions.digitsNo ? this.decimalOptions.digitsNo : 2
+      newVal = this.toPrecision(val, fixedPosition)
+      this.inputVal = newVal
+      this.$emit('input', this.inputVal)
+    },
+    toPrecision(num, precision) {
+      // 处理精度
+      const res = parseFloat(Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision))
+      if (res.toString().includes('e')) {
+        const resArr = num.split('.')
+        return `${resArr[0]}.${resArr[1].slice(0, precision)}`
       } else {
-        this.$emit('input', Number(this.inputVal))
+        const splitArr = res.toString().split('.')
+        if (splitArr[1].length < precision) {
+          // 缺位补0
+          while (splitArr[1].length < precision) {
+            splitArr[1] = splitArr[1] + '0'
+          }
+        } else {
+          // 多余截取
+          splitArr[1] = splitArr[1].slice(0, precision)
+        }
+        return `${splitArr[0]}.${splitArr[1]}`
       }
     }
   }
 }
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+::v-deep .el-input__inner {
+  text-align: left;
+}
+</style>

+ 1 - 0
src/views/contactUs/index.vue

@@ -8,6 +8,7 @@
         :columns="columns"
         :data="tableData"
         :count="total"
+        :table-options="tableOptions"
       />
     </template>
   </div>

+ 10 - 2
src/views/creditManage/coreEnterprise/indexTable.js

@@ -65,7 +65,7 @@ export default {
                 icon: 'iconfont icon-timeAxis',
                 category: 'timeAxis'
               },
-              { msg: '尽调审核', icon: 'iconfont icon-orange icon-a-Group8151', category: 'edit' }
+              { msg: '尽调审核', icon: 'iconfont icon-xiugai', category: 'edit' }
               // {
               //   msg: '查看',
               //   icon: 'iconfont icon-Magnifier',
@@ -124,9 +124,17 @@ export default {
         },
         {
           label: '未通过原因',
-          prop: 'errorString',
+          prop: 'errorsString',
           showTooltip: true
         },
+        {
+          label: '是否流程授信',
+          prop: 'process',
+          showTooltip: true,
+          render: (h, row) => {
+            return <span>{ row.process ? '是' : '否' }</span>
+          }
+        },
         {
           label: '最近提交时间',
           prop: 'gmtModified'

+ 10 - 2
src/views/creditManage/projectCredit/indexTable.js

@@ -57,7 +57,7 @@ export default {
                 icon: 'iconfont icon-timeAxis',
                 category: 'timeAxis'
               },
-              { msg: '尽调审核', icon: 'iconfont icon-orange icon-a-Group8151', category: 'edit' }
+              { msg: '尽调审核', icon: 'iconfont icon-xiugai', category: 'edit' }
               // {
               //   msg: '查看',
               //   icon: 'iconfont icon-Magnifier',
@@ -113,9 +113,17 @@ export default {
         },
         {
           label: '未通过原因',
-          prop: 'errorString',
+          prop: 'errorsString',
           showTooltip: true
         },
+        {
+          label: '是否流程授信',
+          prop: 'process',
+          showTooltip: true,
+          render: (h, row) => {
+            return <span>{ row.process ? '是' : '否' }</span>
+          }
+        },
         {
           label: '最近提交时间',
           prop: 'gmtModified'

+ 6 - 1
src/views/refundManage/indexTable.js

@@ -77,6 +77,11 @@ export default {
           label: '执行人',
           prop: 'executor'
         },
+        {
+          label: '状态',
+          prop: 'statusStr',
+          showTooltip: true
+        },
         {
           label: '操作',
           show: true,
@@ -201,7 +206,7 @@ export default {
               {
                 msg: '编辑',
                 icon: 'iconfont icon-xiugai',
-                power: 'applyRefund',
+                // power: 'applyRefund',
                 tabPower: ['pending'],
                 // rowPower: [''],
                 category: 'edit'

+ 7 - 7
src/views/salesContractManagement/components/SalesContractReviewContent.vue

@@ -177,16 +177,16 @@ export default {
           setTimeout(() => {
             const { approvalConclusion, settleCycleMethod, settleCycle, retentionInfo, performanceBondLimit, signConfirm, personInfoHistoryRefList, fileStorages, performanceBond, paymentNode, paymentTerm } = JSON.parse(JSON.stringify(newV))
             this.ruleForm = {
-              approvalConclusion: approvalConclusion || 'pass',
-              isRetention: retentionInfo.retention,
+              approvalConclusion: approvalConclusion || '',
+              isRetention: retentionInfo ? retentionInfo.retention : '',
               performanceBond,
               settleCycleMethod: settleCycleMethod || '',
               settleCycle,
-              retentionPercent: retentionInfo.retentionPercent,
-              top: retentionInfo.top || '',
-              retentionLimit: retentionInfo.retentionLimit,
-              releaseMethod: retentionInfo.releaseMethod,
-              retentionPeriod: retentionInfo.retentionPeriod,
+              retentionPercent: retentionInfo ? retentionInfo.retentionPercent : '',
+              top: retentionInfo ? retentionInfo.top : '',
+              retentionLimit: retentionInfo ? retentionInfo.retentionLimit : '',
+              releaseMethod: retentionInfo ? retentionInfo.releaseMethod : '',
+              retentionPeriod: retentionInfo ? retentionInfo.retentionPeriod : '',
               performanceBondLimit,
               paymentNode: paymentNode || '',
               paymentTerm: paymentTerm || ''

+ 1 - 1
src/views/salesContractManagement/components/SignConfirmationContent.vue

@@ -128,7 +128,7 @@ export default {
       handler(newV) {
         if (Object.keys(newV).length) {
           const { signeListDeatails, salesContractApprovalFile, signConfirm } = JSON.parse(JSON.stringify(newV))
-          this.ruleForm.signConfirm = signConfirm || ''
+          this.ruleForm.signConfirm = signConfirm === null || signConfirm === undefined ? '' : signConfirm
           this.ruleForm.salesContractApprovalFile = salesContractApprovalFile || []
           this.signeList = signeListDeatails || []
         }

+ 6 - 5
src/views/salesContractManagement/components/SignConfirmationContentC.vue

@@ -4,14 +4,14 @@
       <cy-info-title>电子合同信息</cy-info-title>
       <table style="margin-top: 20px" border class="view-table" cellspacing="0">
         <tr>
-          <th rowspan="100" style="width: 250px;">{{ detailInfo.electronicSignaturePersonal.name }}</th>
+          <th rowspan="100" style="width: 250px;">{{ detailInfo.electronicSignaturePersonal ? detailInfo.electronicSignaturePersonal.name : '' }}</th>
           <td style="width: 200px;">认证链接</td>
           <td>
             <div style="display: flex; flex-direction: row; justify-content: space-between;">
-              <span>{{ detailInfo.electronicSignaturePersonal.shortAuthUrl }}</span>
+              <span>{{ detailInfo.electronicSignaturePersonal ? detailInfo.electronicSignaturePersonal.shortAuthUrl : '' }}</span>
               <div
-                v-if="detailInfo.electronicSignaturePersonal.shortAuthUrl && !disabled"
-                v-clipboard="detailInfo.electronicSignaturePersonal.shortAuthUrl"
+                v-if="detailInfo.electronicSignaturePersonal && detailInfo.electronicSignaturePersonal.shortAuthUrl && !disabled"
+                v-clipboard="detailInfo.electronicSignaturePersonal ? detailInfo.electronicSignaturePersonal.shortAuthUrl : ''"
                 v-clipboard:success="copyResult"
                 style="color: #FE7D0B; margin-right: 10px; width: 55px; flex-shrink: 0; text-align: right; display: flex; flex-direction: column; justify-content: center; cursor: pointer;"
               >
@@ -20,7 +20,7 @@
             </div>
           </td>
           <td style="width: 220px;">
-            认证状态:{{ detailInfo.electronicSignaturePersonal.authStatus ? '已认证' : '未认证' }}
+            认证状态:{{ detailInfo.electronicSignaturePersonal && detailInfo.electronicSignaturePersonal.authStatus ? '已认证' : '未认证' }}
             <span v-if="!disabled" style="color: #FE7D0B; float: right; margin-right: 10px; cursor: pointer;" @click="modifyClick('', detailInfo.electronicSignaturePersonal.fddCustomerId, 'auth')">刷新</span>
           </td>
         </tr>
@@ -101,6 +101,7 @@ export default {
     deatilsInfo: {
       handler(newV) {
         if (Object.keys(newV).length) {
+          console.log('eeeeeee', JSON.parse(JSON.stringify(newV)))
           this.detailInfo = JSON.parse(JSON.stringify(newV))
           this.ruleForm.remark = this.deatilsInfo.remark
         }