peixh vor 4 Jahren
Ursprung
Commit
57c70bc866

+ 1 - 1
front-vue/src/views/service/credit/creditDetail.vue

@@ -72,7 +72,7 @@
                 <el-row>
                     <el-col :span="10">
                         <el-form-item size="large" label="签发金额">
-                            <el-input v-model="form.zfiAmount" />
+                            <el-input v-model="form.zfiAmount" readonly/>
                         </el-form-item>
                     </el-col>
                     <el-col :span="4">

+ 14 - 2
front-vue/src/views/service/creditLine/supplierCreditLine.vue

@@ -87,7 +87,7 @@
       </el-table-column>
       <el-table-column label="企业名称" align="center" prop="scyName"  show-overflow-tooltip/>
       <el-table-column label="企业代码" align="center" prop="scySocialCode"  show-overflow-tooltip/>
-      <el-table-column label="授信额度" align="center" prop="zfsqAmount" />
+      <el-table-column label="授信额度" :formatter="moneyFormat" align="center" prop="zfsqAmount" />
       <el-table-column label="授信状态" :formatter="statusFormat" align="center" prop="zfsqStatus" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -523,7 +523,19 @@ export default {
       this.download('system/quota/export', {
         ...this.queryParams
       }, `system_quota.xlsx`)
-    }
+    },
+    /* 金额格式化 */
+    moneyFormat(row, column, cellValue) {
+      if(cellValue){
+        cellValue += "";
+        if (!cellValue.includes(".")) cellValue += ".";
+        return cellValue
+          .replace(/(\d)(?=(\d{3})+\.)/g, function($0, $1) {
+            return $1 + ",";
+          })
+          .replace(/\.$/, "");
+      }
+    },
   }
 };
 </script>