Browse Source

金额格式化

sqg 3 years ago
parent
commit
74fa9af351

+ 1 - 0
front-vue/src/views/service/credit/addInformation.vue

@@ -362,6 +362,7 @@ import {getToken} from "@/utils/auth";
 import AddBill from "@/views/service/bill/addBill";
 import EditBill from "@/views/service/bill/editBill";
 import {isOpenApproval} from "@/api/service/credit/approvalRelatedCredit";
+import { amtformat } from "@/utils/amtCommon";
 import pdfShow from "./pdfShow";
 import Cookies from 'js-cookie';
 export default {

+ 1 - 13
front-vue/src/views/service/credit/pdfShow.vue

@@ -135,6 +135,7 @@
 import {sendMessage,checkCode,faceAuth,checkFaceAuth,contractSigning} from "@/api/service/credit/message";
 import {cfcaProjectNo,projectSendMessage,checkProCode} from "@/api/service/credit/cfcaProject";
 import {getCreditDetail,getFinanceSign} from "@/api/service/credit/credit";
+import { amtformat } from "@/utils/amtCommon";
 import Cookies from 'js-cookie';
 export default {
     props : ['pdfFileList','zfiId', 'parent'],
@@ -657,19 +658,6 @@ export default {
     handleInput(str) {
         return amtformat(str, 2, ".", ",");
     },
-    //格式化金额 
-    amtFormat(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(/\.$/, '');
-    },
     /* //  将数字金额转换为大写金额 */
     smallToBig(money) {
       //  将数字金额转换为大写金额

+ 1 - 0
front-vue/src/views/service/credit/signFor.vue

@@ -313,6 +313,7 @@ import {isOpenApproval} from "@/api/service/credit/approvalRelatedCredit";
 import pdfShow from "./pdfShow";
 import DetailBill from "@/views/service/credit/billDetail";
 import {contractSigning} from "@/api/service/credit/message";
+import { amtformat } from "@/utils/amtCommon";
 import Cookies from 'js-cookie';
 export default {
     name: "addCredit",

+ 1 - 13
front-vue/src/views/service/financeRecord/pdfShow.vue

@@ -135,6 +135,7 @@
 import {sendMessage,checkCode,faceAuth,checkFaceAuth,contractSigning} from "@/api/service/credit/message";
 import {cfcaProjectNo,projectSendMessage,checkProCode} from "@/api/service/credit/cfcaProject";
 import {getCreditDetail,getFinanceSign} from "@/api/service/credit/credit";
+import { amtformat } from "@/utils/amtCommon";
 import Cookies from 'js-cookie';
 export default {
     props : ['pdfFileList','zfiId', 'parent'],
@@ -674,19 +675,6 @@ export default {
     handleInput(str) {
         return amtformat(str, 2, ".", ",");
     },
-    //格式化金额 
-    amtFormat(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(/\.$/, '');
-    },
     /* //  将数字金额转换为大写金额 */
     smallToBig(money) {
       //  将数字金额转换为大写金额