sqg 3 rokov pred
rodič
commit
a8cb754df9

+ 16 - 1
front-vue/src/views/service/bill/bill.vue

@@ -54,7 +54,7 @@
         <el-table-column label="关联融信" align="center" prop="zfiNumber" v-if="uncheckList.zfiNumber" :show-overflow-tooltip="true" />
         <el-table-column label="应付方" align="center" prop="payerName" v-if="uncheckList.payerName" :show-overflow-tooltip="true" />
         <el-table-column label="应收方" align="center" prop="payeeName" v-if="uncheckList.payeeName" :show-overflow-tooltip="true" />
-        <el-table-column label="账款金额" align="center" prop="zbiAmount" v-if="uncheckList.zbiAmount" :show-overflow-tooltip="true" />
+        <el-table-column label="账款金额" align="center" :formatter="moneyFormat" prop="zbiAmount" v-if="uncheckList.zbiAmount" :show-overflow-tooltip="true" />
         <el-table-column label="贸易日期" align="center" prop="zbiDate" v-if="uncheckList.zbiDate" :show-overflow-tooltip="true">
             <template slot-scope="scope">
                 <span>{{ parseTime(new Date(scope.row.zbiDate),'{y}-{m}-{d}') }}</span>
@@ -254,6 +254,21 @@ export default {
         this.columnQuery();
     },
     methods: {
+        //列表格式化金额
+        moneyFormat(row, column, cellValue) {
+        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() {
             //获取页面路径

+ 19 - 4
front-vue/src/views/service/credit/creditReport.vue

@@ -18,7 +18,7 @@
                             <el-table :data="creditLineList">
                                 <el-table-column label="渠道名称" align="center" prop="managementName" :show-overflow-tooltip="true"/>
                                 <el-table-column label="额度" align="center" prop="allAmount" :show-overflow-tooltip="true"/>
-                                <el-table-column label="可用金额" align="center" prop="subAmount" :show-overflow-tooltip="true"/>
+                                <el-table-column label="可用金额" align="center" :formatter="moneyFormat" prop="subAmount" :show-overflow-tooltip="true"/>
                                 <el-table-column label="已用金额" align="center" prop="availableAmount" :show-overflow-tooltip="true"/>
                             </el-table>
                             
@@ -63,7 +63,7 @@
                     <el-table :data="creditLineNumList">
                         <el-table-column label="渠道名称" align="center" prop="managementName" :show-overflow-tooltip="true"/>
                         <el-table-column label="数量" align="center" prop="num" :show-overflow-tooltip="true"/>
-                        <el-table-column label="额度" align="center" prop="allAmount" :show-overflow-tooltip="true"/>
+                        <el-table-column label="额度" align="center" :formatter="moneyFormat" prop="allAmount" :show-overflow-tooltip="true"/>
                     </el-table>
                     
                     <pagination
@@ -118,18 +118,33 @@ export default {
     mounted() {
     },
     methods: {
+        //列表格式化金额
+        moneyFormat(row, column, cellValue) {
+        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(/\.$/, "");
+        },
         initChartPie (data, name, color, formatter) {
             let chartPie = document.getElementById('echartPie');
             let myChart = echarts.init(chartPie);
             let option = {
                 tooltip: {
                     trigger: 'item',
-                    formatter: '{b}: {d}%'
+                    // formatter: '{b}: {d}%'
                 },
                 color: color,
                 label: {
                     alignTo: 'edge',
-                    formatter: formatter,
+                    formatter: "{b} ({d}%)",
                     minMargin: 5,
                     edgeDistance: 10,
                     rich: {

+ 16 - 0
front-vue/src/views/service/repayment/repayment.vue

@@ -344,6 +344,7 @@
               label="还款金额(元)"
               align="center"
               prop="zfrLoanAmount"
+              :formatter="moneyFormat"
               :show-overflow-tooltip="true"
               v-if="uncheckList.zfrLoanAmount"
             />
@@ -1020,6 +1021,21 @@ export default {
     this.columnQuery();
   },
   methods: {
+    //列表格式化金额
+    moneyFormat(row, column, cellValue) {
+      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(/\.$/, "");
+    },
     /** 查询所有还款列表 */
     getList() {
       this.loading = true;