Просмотр исходного кода

fix:修改结算单+验收单金额保留位数

lazy недель назад: 3
Родитель
Сommit
a97e41caaa

+ 17 - 6
src/components/Input/AmountInput/index.vue

@@ -47,6 +47,10 @@ export default  {
     clearable: {
       type: Boolean,
       default: true
+    },
+    reserveNum: {
+      type: Number,
+      default: 2
     }
   },
   data() {
@@ -60,12 +64,12 @@ export default  {
     value: {
       handler(num) {
         this.inputVal = num
-        this.convertNum(num)
+        this.convertNum(num, this.reserveNum)
       },
       immediate: true
     },
     inputVal(num) {
-      this.convertNum(num)
+      this.convertNum(num, this.reserveNum)
     }
   },
   mounted() {
@@ -81,16 +85,16 @@ export default  {
     inputChange(...angs) {
       this.$emit('change', ...angs)
     },
-    convertNum: function(num) {
+    convertNum: function(num, decimalPlaces = 2) { // 增加一个参数 decimalPlaces,默认为2
       if (num && typeof (num) !== 'undefined' && (num === '-' || !isNaN((num + '').replace(/,/g, '')))) {
         num = num + ''
         if (num !== this.lastVal) {
           num = num.replace(/,/g, '')
           this.$emit('input', num)
-          // this.$emit('change', num)
           var minus = ''; var int = ''; var dec = ''
           if (this.disabled) {
-            dec = '.00'
+            // 保留 decimalPlaces 位小数,默认保留两位
+            dec = '.' + '0'.repeat(decimalPlaces)
           }
           if (num.indexOf('-') > -1) {
             minus = '-'
@@ -99,9 +103,17 @@ export default  {
           if (num.indexOf('.') > -1) {
             int = num.substring(0, num.indexOf('.'))
             dec = num.substring(num.indexOf('.'), num.length)
+            // 保留指定的小数位数
+            let decLength = dec.length - 1
+            if (decLength > decimalPlaces) {
+              dec = dec.substring(0, decimalPlaces + 1)
+            } else {
+              dec += '0'.repeat(decimalPlaces - decLength)
+            }
           } else {
             int = num
           }
+
           var result = []; var counter = 0
           int = int.split('')
           const noZeroIndex = int.findIndex(item => item !== '0') // 找到第一个不为0的下标
@@ -143,7 +155,6 @@ export default  {
           }
         }
         this.$emit('input', this.inputVal)
-        // this.$emit('change', this.inputVal)
         if (this.isInit) {
           this.isInit = false
         } else {

+ 24 - 5
src/views/myFinancing/applyFinancing/index.vue

@@ -178,7 +178,7 @@
 <script>
 import { getProjectInfo, getFinishProCon, getApplicantInfo, chooseToAcceptTheGoods, generateReceivable, applySubmit, getDetailsInfo } from '@/api/myFinancing'
 import { validMail } from '@/utils/validate'
-import { deduplicateArray, getUuid } from '@/utils'
+import { deduplicateArray, getUuid, formatMoney } from '@/utils'
 export default {
   name: 'ApplyFinancing',
   props: {
@@ -321,16 +321,25 @@ export default {
         },
         {
           label: '参考价格',
-          prop: 'referencePrice'
+          prop: 'referencePrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.referencePrice, 4) }</div>
+          }
         },
         {
           label: '浮动价格',
-          prop: 'floatingPrice'
+          prop: 'floatingPrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.floatingPrice, 4) }</div>
+          }
         },
         {
           label: '销售单价(元)',
           prop: 'salesPrice',
-          width: '140'
+          width: '140',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.salesPrice, 4) }</div>
+          }
         },
         {
           label: '销售总价(元)',
@@ -345,7 +354,10 @@ export default {
         {
           label: '采购单价(元)',
           prop: 'purchasePrice',
-          width: '140'
+          width: '140',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.purchasePrice, 4) }</div>
+          }
         },
         {
           label: '采购总价(元)',
@@ -485,6 +497,13 @@ export default {
       disabled: false
     }
   },
+  computed: {
+    formatMoney() {
+      return (val, reserveNum) => {
+        return formatMoney(val, reserveNum)
+      }
+    }
+  },
   watch: {
     detailsInfo: {
       handler(val) {

+ 23 - 4
src/views/myTrade/acceptanceManagement/acceptanceAdd.vue

@@ -136,23 +136,33 @@
           <el-table-column prop="goodsFactory" label="厂家" show-overflow-tooltip />
           <el-table-column prop="goodsUnit" label="单位" show-overflow-tooltip />
           <el-table-column prop="goodsQuantity" label="数量" show-overflow-tooltip />
-          <el-table-column prop="referencePrice" label="参考价格" show-overflow-tooltip>
+          <el-table-column prop="referencePrice" width="180" label="参考价格" show-overflow-tooltip>
             <template slot="header" slot-scope="scope">
               <el-tooltip class="item" effect="dark" content="网价" placement="top">
                 <span class="table-tip-icon">!</span>
               </el-tooltip>
               <span>参考价格</span>
             </template>
+            <template slot-scope="scope">
+              <div>{{ formatMoney(scope.row.referencePrice, 4) }}</div>
+            </template>
           </el-table-column>
-          <el-table-column prop="floatingPrice" label="浮动价格" show-overflow-tooltip>
+          <el-table-column prop="floatingPrice" width="180" label="浮动价格" show-overflow-tooltip>
             <template slot="header" slot-scope="scope">
               <el-tooltip class="item" effect="dark" content="合约中约定的上下浮动差价" placement="top">
                 <span class="table-tip-icon">!</span>
               </el-tooltip>
               <span>浮动价格</span>
             </template>
+            <template slot-scope="scope">
+              <div>{{ formatMoney(scope.row.floatingPrice, 4) }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="salesPrice" width="180" label="销售单价(元)" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <div>{{ formatMoney(scope.row.salesPrice, 4) }}</div>
+            </template>
           </el-table-column>
-          <el-table-column prop="salesPrice" label="销售单价(元)" show-overflow-tooltip />
           <el-table-column prop="acceptanceDate" label="验收日期" show-overflow-tooltip />
           <el-table-column prop="" label="操作">
             <template slot-scope="scope">
@@ -218,6 +228,8 @@
 <script>
 import { exportFile, exportUrl } from '@/utils/index'
 import { getDetails, getOperaterOfCore, getCompletedProjectList, getCompletedProjectDetail, getSteelBillNumber, getGoodsBySaleNumber, acceptanceAddInfo, download, importGoodsTemplate, acceptanceUpdateInfo, previewUpFile } from '@/api/myTrade/acceptanceManagement/index'
+import { formatMoney } from '@/utils'
+
 export default {
   name: 'AcceptanceFormAdd',
   components: {
@@ -367,6 +379,13 @@ export default {
       originFileIds: []
     }
   },
+  computed: {
+    formatMoney() {
+      return (val, reserveNum) => {
+        return formatMoney(val, reserveNum)
+      }
+    },
+  },
   watch: {
     goodsInfoList: {
       handler(newV) {
@@ -592,7 +611,7 @@ export default {
           if (res.data.length) {
             this.goodsInfoList = []
             res.data.map(item => {
-              item.salesPrice = parseFloat(item.referencePrice + item.floatingPrice).toFixed(2)
+              item.salesPrice = parseFloat(item.referencePrice + item.floatingPrice).toFixed(4)
               item.acceptanceDate = item.acceptanceDate.split(' ')[0]
               this.goodsInfoList.push(item)
             })

+ 21 - 3
src/views/myTrade/acceptanceManagement/acceptanceViewTemp.vue

@@ -157,6 +157,8 @@
 
 <script>
 import { getDetails, getCompletedProjectList } from '@/api/myTrade/acceptanceManagement/index'
+import { formatMoney } from '@/utils'
+
 export default {
   name: 'AcceptanceFormViewTemp',
   components: {
@@ -246,17 +248,26 @@ export default {
         {
           label: '参考价格',
           showTooltip: true,
-          prop: 'referencePrice'
+          prop: 'referencePrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.referencePrice, 4) }</div>
+          }
         },
         {
           label: '浮动价格',
           showTooltip: true,
-          prop: 'floatingPrice'
+          prop: 'floatingPrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.floatingPrice, 4) }</div>
+          }
         },
         {
           label: '销售单价(元)',
           showTooltip: true,
-          prop: 'salesPrice'
+          prop: 'salesPrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.salesPrice, 4) }</div>
+          }
         },
         {
           label: '验收日期',
@@ -266,6 +277,13 @@ export default {
       ]
     }
   },
+  computed: {
+    formatMoney() {
+      return (val, reserveNum) => {
+        return formatMoney(val, reserveNum)
+      }
+    },
+  },
   watch: {
     goodsInfoList: {
       handler(newV) {

+ 21 - 3
src/views/myTrade/acceptanceManagement/changePrice.vue

@@ -99,6 +99,8 @@
 <script>
 import { exportFile } from '@/utils/index'
 import { getDetails, getAdjustDetails, getOperaterOfCore, getCompletedProjectList, getCompletedProjectDetail, acceptanceAdjust, downloadAdjust, importGoodsTemplate } from '@/api/myTrade/acceptanceManagement/index'
+import { formatMoney } from '@/utils'
+
 export default {
   name: 'ChangePrice',
   components: {
@@ -173,17 +175,26 @@ export default {
         {
           label: '参考价格',
           showTooltip: true,
-          prop: 'referencePrice'
+          prop: 'referencePrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.referencePrice, 4) }</div>
+          }
         },
         {
           label: '浮动价格',
           showTooltip: true,
-          prop: 'floatingPrice'
+          prop: 'floatingPrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.floatingPrice, 4) }</div>
+          }
         },
         {
           label: '销售单价(元)',
           showTooltip: true,
-          prop: 'salesPrice'
+          prop: 'salesPrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.salesPrice, 4) }</div>
+          }
         },
         {
           label: '验收日期',
@@ -212,6 +223,13 @@ export default {
       detailInfos: {}
     }
   },
+  computed: {
+    formatMoney() {
+      return (val, reserveNum) => {
+        return formatMoney(val, reserveNum)
+      }
+    },
+  },
   watch: {
     goodsInfoList: {
       handler(newV) {

+ 21 - 3
src/views/myTrade/acceptanceManagement/components/historyViewContent/add.vue

@@ -146,6 +146,8 @@
 </template>
 
 <script>
+import { formatMoney } from '@/utils'
+
 export default {
   name: 'AcceptanceFormAdd',
   props: {
@@ -229,17 +231,26 @@ export default {
         {
           label: '参考价格',
           showTooltip: true,
-          prop: 'referencePrice'
+          prop: 'referencePrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.referencePrice, 4) }</div>
+          }
         },
         {
           label: '浮动价格',
           showTooltip: true,
-          prop: 'floatingPrice'
+          prop: 'floatingPrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.floatingPrice, 4) }</div>
+          }
         },
         {
           label: '销售单价(元)',
           showTooltip: true,
-          prop: 'salesPrice'
+          prop: 'salesPrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.salesPrice, 4) }</div>
+          }
         },
         {
           label: '验收日期',
@@ -249,6 +260,13 @@ export default {
       ]
     }
   },
+  computed: {
+    formatMoney() {
+      return (val, reserveNum) => {
+        return formatMoney(val, reserveNum)
+      }
+    },
+  },
   watch: {
     goodsInfoList: {
       handler(newV) {

+ 21 - 3
src/views/myTrade/acceptanceManagement/components/historyViewContent/priceAdjust.vue

@@ -71,6 +71,8 @@
 </template>
 
 <script>
+import { formatMoney } from '@/utils'
+
 export default {
   name: 'ChangePrice',
   components: {
@@ -141,17 +143,26 @@ export default {
         {
           label: '参考价格',
           showTooltip: true,
-          prop: 'referencePrice'
+          prop: 'referencePrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.referencePrice, 4) }</div>
+          }
         },
         {
           label: '浮动价格',
           showTooltip: true,
-          prop: 'floatingPrice'
+          prop: 'floatingPrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.floatingPrice, 4) }</div>
+          }
         },
         {
           label: '销售单价(元)',
           showTooltip: true,
-          prop: 'salesPrice'
+          prop: 'salesPrice',
+          render: (h, row) => {
+            return <div>{ this.formatMoney(row.salesPrice, 4) }</div>
+          }
         },
         {
           label: '验收日期',
@@ -162,6 +173,13 @@ export default {
       detailInfos: {}
     }
   },
+  computed: {
+    formatMoney() {
+      return (val, reserveNum) => {
+        return formatMoney(val, reserveNum)
+      }
+    }
+  },
   watch: {
     goodsInfoList: {
       handler(newV) {

+ 16 - 2
src/views/myTrade/settlementDocumentManagement/add.vue

@@ -82,6 +82,7 @@
                 :rules="[{ required: true, message: '请输入参考价格', trigger: 'blur' }]">
                 <cy-amount-input
                   v-model="scope.row.referencePrice"
+                  :reserve-num="4"
                   placeholder="请输入参考价格"
                   @change="calculateNum"
                   style="width: 100%;"
@@ -107,6 +108,7 @@
                 :rules="[{ required: true, message: '请输入浮动价格', trigger: 'blur' }]">
                 <cy-amount-input
                   v-model="scope.row.floatingPrice"
+                  :reserve-num="4"
                   placeholder="请输入浮动价格"
                   @change="calculateNum"
                   style="width: 100%;"
@@ -132,10 +134,17 @@
                 />
               </el-form-item>
             </template> -->
+            <template slot-scope="scope">
+              <div>{{ formatMoney(scope.row.salesPrice, 4) }}</div>
+            </template>
           </el-table-column>
           <el-table-column prop="salesTotalPrice" label="销售总价" show-overflow-tooltip/>
           <el-table-column prop="salesGuaranteeMoney" label="销售质保金" show-overflow-tooltip/>
-          <el-table-column prop="purchasePrice" label="采购单价" show-overflow-tooltip/>
+          <el-table-column prop="purchasePrice" label="采购单价" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <div>{{ formatMoney(scope.row.purchasePrice, 4) }}</div>
+            </template>
+          </el-table-column>
           <el-table-column prop="purchaseTotalPrice" label="采购总价" show-overflow-tooltip/>
           <el-table-column prop="purchaseGuaranteeMoney" label="采购质保金" show-overflow-tooltip/>
           <el-table-column prop="purchGuaranteeMoney" label="操作">
@@ -261,7 +270,7 @@
 <script>
 import request from '@/utils/request'
 import chooseGoodsVue from './components/chooseGoods.vue'
-import { handleMoney, fourMoney } from '@/utils'
+import { handleMoney, fourMoney, formatMoney } from '@/utils'
 
 export default {
   name: 'AddSettlement',
@@ -766,6 +775,11 @@ export default {
     },
     changeNum3() {
       return handleMoney(this.buyTotalPrice)
+    },
+    formatMoney() {
+      return (val, reserveNum) => {
+        return formatMoney(val, reserveNum)
+      }
     }
   }
 }

+ 21 - 8
src/views/myTrade/settlementDocumentManagement/components/add.vue

@@ -24,10 +24,10 @@
         <el-input v-model="ruleForm.settlementAmount" placeholder="请输入结算金额" disabled />
       </el-form-item>
       <el-form-item label="经办人(供应商)" prop="operatorSupplier" required>
-        <el-input v-model="ruleForm.operatorSupplier" placeholder="请输入经办人(供应商)" disabled /> 
+        <el-input v-model="ruleForm.operatorSupplier" placeholder="请输入经办人(供应商)" disabled />
       </el-form-item>
       <el-form-item label="经办人(核心企业)" prop="operatorEnterprise" required>
-        <el-input v-model="ruleForm.operatorEnterprise" placeholder="请输入经办人(核心企业)" disabled /> 
+        <el-input v-model="ruleForm.operatorEnterprise" placeholder="请输入经办人(核心企业)" disabled />
       </el-form-item>
       <cy-info-title style="margin-top: 15px;">货物信息(下游结算)
         <span style="font-size: 12px; color: #A3A8AC;">单位:元</span>
@@ -57,7 +57,7 @@
               <span>参考价格</span>
             </template>
             <template slot-scope="scope">
-              {{ scope.row.referencePrice || 0 }}
+              {{ formatMoney(scope.row.referencePrice, 4) || 0 }}
             </template>
           </el-table-column>
           <el-table-column prop="floatingPrice" label="浮动价格" show-overflow-tooltip>
@@ -68,13 +68,21 @@
               <span>浮动价格</span>
             </template>
             <template slot-scope="scope">
-              {{ scope.row.floatingPrice || 0 }}
+              {{ formatMoney(scope.row.floatingPrice, 4) || 0 }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="salesPrice" label="销售单价" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <div>{{ formatMoney(scope.row.salesPrice, 4) }}</div>
             </template>
           </el-table-column>
-          <el-table-column prop="salesPrice" label="销售单价" show-overflow-tooltip/>
           <el-table-column prop="salesTotalPrice" label="销售总价" show-overflow-tooltip/>
           <el-table-column prop="salesGuaranteeMoney" label="销售质保金" show-overflow-tooltip/>
-          <el-table-column prop="purchasePrice" label="采购单价" show-overflow-tooltip/>
+          <el-table-column prop="purchasePrice" label="采购单价" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <div>{{ formatMoney(scope.row.purchasePrice, 4) }}</div>
+            </template>
+          </el-table-column>
           <el-table-column prop="purchaseTotalPrice" label="采购总价" show-overflow-tooltip/>
           <el-table-column prop="purchaseGuaranteeMoney" label="采购质保金" show-overflow-tooltip/>
         </el-table>
@@ -156,7 +164,7 @@
 
 <script>
 import request from '@/utils/request'
-import { handleMoney } from '@/utils'
+import { handleMoney, formatMoney } from '@/utils'
 
 export default {
   name: 'AddSettlement',
@@ -360,6 +368,11 @@ export default {
     },
     changeNum3() {
       return handleMoney(this.buyTotalPrice)
+    },
+    formatMoney() {
+      return (val, reserveNum) => {
+        return formatMoney(val, reserveNum)
+      }
     }
   },
   watch: {
@@ -423,4 +436,4 @@ export default {
   color: #ff0000;
   margin-right: 5px;
 }
-</style>
+</style>

+ 20 - 7
src/views/myTrade/settlementDocumentManagement/components/edit.vue

@@ -18,7 +18,7 @@
         <el-input v-model="ruleForm.businessNumber" disabled />
       </el-form-item>
       <el-form-item label="经办人(供应商)" prop="operatorSupplier" required>
-        <el-input v-model="ruleForm.operatorSupplier" placeholder="请输入经办人(供应商)" /> 
+        <el-input v-model="ruleForm.operatorSupplier" placeholder="请输入经办人(供应商)" />
       </el-form-item>
       <cy-info-title style="margin-top: 15px;">货物信息(下游结算)
         <span style="font-size: 12px; color: #A3A8AC;">单位:元</span>
@@ -48,7 +48,7 @@
               <span>参考价格</span>
             </template>
             <template slot-scope="scope">
-              {{ scope.row.referencePrice || 0 }}
+              {{ formatMoney(scope.row.referencePrice, 4) || 0 }}
             </template>
           </el-table-column>
           <el-table-column prop="floatingPrice" label="浮动价格" show-overflow-tooltip>
@@ -59,13 +59,21 @@
               <span>浮动价格</span>
             </template>
             <template slot-scope="scope">
-              {{ scope.row.floatingPrice || 0 }}
+              {{ formatMoney(scope.row.floatingPrice, 4) || 0 }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="salesPrice" label="销售单价" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <div>{{ formatMoney(scope.row.salesPrice, 4) }}</div>
             </template>
           </el-table-column>
-          <el-table-column prop="salesPrice" label="销售单价" show-overflow-tooltip/>
           <el-table-column prop="salesTotalPrice" label="销售总价" show-overflow-tooltip/>
           <el-table-column prop="salesGuaranteeMoney" label="销售质保金" show-overflow-tooltip/>
-          <el-table-column prop="purchasePrice" label="采购单价" show-overflow-tooltip/>
+          <el-table-column prop="purchasePrice" label="采购单价" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <div>{{ formatMoney(scope.row.purchasePrice, 4) }}</div>
+            </template>
+          </el-table-column>
           <el-table-column prop="purchaseTotalPrice" label="采购总价" show-overflow-tooltip/>
           <el-table-column prop="purchaseGuaranteeMoney" label="采购质保金" show-overflow-tooltip/>
         </el-table>
@@ -94,7 +102,7 @@
 
 <script>
 import request from '@/utils/request'
-import { handleMoney } from '@/utils'
+import { handleMoney, formatMoney } from '@/utils'
 
 export default {
   name: 'AddSettlement',
@@ -182,6 +190,11 @@ export default {
     },
     changeNum3() {
       return handleMoney(this.buyTotalPrice)
+    },
+    formatMoney() {
+      return (val, reserveNum) => {
+        return formatMoney(val, reserveNum)
+      }
     }
   },
   watch: {
@@ -235,4 +248,4 @@ export default {
   color: #ff0000;
   margin-right: 5px;
 }
-</style>
+</style>

+ 18 - 4
src/views/myTrade/settlementDocumentManagement/editPrice.vue

@@ -18,7 +18,7 @@
         <el-input v-model="businessInfo.businessNumber" disabled />
       </el-form-item>
       <el-form-item label="经办人(供应商)" prop="operatorSupplier">
-        <el-input v-model="ruleForm.operatorSupplier" placeholder="请输入经办人(供应商)" /> 
+        <el-input v-model="ruleForm.operatorSupplier" placeholder="请输入经办人(供应商)" />
       </el-form-item>
       <cy-info-title style="margin-top: 15px;">货物信息(下游结算)
         <span style="font-size: 12px; color: #A3A8AC;">单位:元</span>
@@ -69,6 +69,7 @@
                 :rules="[{ required: true, message: '请输入参考价格', trigger: 'blur' }]">
                 <cy-amount-input
                   v-model="scope.row.referencePrice"
+                  :reserve-num="4"
                   placeholder="请输入参考价格"
                   @change="calculateNum"
                   style="width: 100%;"
@@ -93,6 +94,7 @@
                 :rules="[{ required: true, message: '请输入浮动价格', trigger: 'blur' }]">
                 <cy-amount-input
                   v-model="scope.row.floatingPrice"
+                  :reserve-num="4"
                   placeholder="请输入浮动价格"
                   @change="calculateNum"
                   style="width: 100%;"
@@ -117,10 +119,17 @@
                 />
               </el-form-item>
             </template> -->
+            <template slot-scope="scope">
+              <div>{{ formatMoney(scope.row.salesPrice, 4) }}</div>
+            </template>
           </el-table-column>
           <el-table-column prop="salesTotalPrice" label="销售总价" show-overflow-tooltip/>
           <el-table-column prop="salesGuaranteeMoney" label="销售质保金" show-overflow-tooltip/>
-          <el-table-column prop="purchasePrice" label="采购单价" show-overflow-tooltip/>
+          <el-table-column prop="purchasePrice" label="采购单价" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <div>{{ formatMoney(scope.row.purchasePrice, 4) }}</div>
+            </template>
+          </el-table-column>
           <el-table-column prop="purchaseTotalPrice" label="采购总价" show-overflow-tooltip/>
           <el-table-column prop="purchaseGuaranteeMoney" label="采购质保金" show-overflow-tooltip/>
         </el-table>
@@ -153,7 +162,7 @@
 
 <script>
 import request from '@/utils/request'
-import { handleMoney, fourMoney } from '@/utils'
+import { handleMoney, fourMoney, formatMoney } from '@/utils'
 import { exportFile } from '@/utils/index'
 
 export default {
@@ -339,6 +348,11 @@ export default {
     },
     changeNum3() {
       return handleMoney(this.buyTotalPrice)
+    },
+    formatMoney() {
+      return (val, reserveNum) => {
+        return formatMoney(val, reserveNum)
+      }
     }
   }
 }
@@ -372,4 +386,4 @@ export default {
   color: #ff0000;
   margin-right: 5px;
 }
-</style>
+</style>