Browse Source

fix:修改新建结算单回款计划回款金额类型问题

lazy 1 month ago
parent
commit
42f8992d2d
1 changed files with 8 additions and 6 deletions
  1. 8 6
      src/views/myTrade/settlementDocumentManagement/add.vue

+ 8 - 6
src/views/myTrade/settlementDocumentManagement/add.vue

@@ -27,10 +27,10 @@
         <el-input v-model="ruleForm.settlementAmount" placeholder="请输入结算金额" />
         <el-input v-model="ruleForm.settlementAmount" placeholder="请输入结算金额" />
       </el-form-item>
       </el-form-item>
       <el-form-item label="经办人(供应商)" prop="operatorSupplier">
       <el-form-item label="经办人(供应商)" prop="operatorSupplier">
-        <el-input v-model="ruleForm.operatorSupplier" placeholder="请输入经办人(供应商)" /> 
+        <el-input v-model="ruleForm.operatorSupplier" placeholder="请输入经办人(供应商)" />
       </el-form-item>
       </el-form-item>
       <el-form-item label="经办人(核心企业)" prop="operatorEnterprise">
       <el-form-item label="经办人(核心企业)" prop="operatorEnterprise">
-        <el-input v-model="ruleForm.operatorEnterprise" placeholder="请输入经办人(核心企业)" @blur="changeCoreCom" /> 
+        <el-input v-model="ruleForm.operatorEnterprise" placeholder="请输入经办人(核心企业)" @blur="changeCoreCom" />
         <!-- <el-select v-model="ruleForm.operatorEnterprise" style="width: 100%" placeholder="请选择经办人(核心企业)" multiple>
         <!-- <el-select v-model="ruleForm.operatorEnterprise" style="width: 100%" placeholder="请选择经办人(核心企业)" multiple>
           <el-option v-for="(item, index) in coreComList" :key="index + '_business'"
           <el-option v-for="(item, index) in coreComList" :key="index + '_business'"
             :label="item.name" :value="item.name" />
             :label="item.name" :value="item.name" />
@@ -44,7 +44,7 @@
         </template>
         </template>
       </cy-info-title>
       </cy-info-title>
       <div style="width: 100%; margin-bottom: 20px;">
       <div style="width: 100%; margin-bottom: 20px;">
-        <el-table :data="ruleForm.goodsList" style="width: 100%;" 
+        <el-table :data="ruleForm.goodsList" style="width: 100%;"
           :span-method="combineRow">
           :span-method="combineRow">
           <el-table-column type="index" label="序号" show-overflow-tooltip/>
           <el-table-column type="index" label="序号" show-overflow-tooltip/>
           <el-table-column prop="acceptanceGoodsNumber" label="验收单货物编号" show-overflow-tooltip/>
           <el-table-column prop="acceptanceGoodsNumber" label="验收单货物编号" show-overflow-tooltip/>
@@ -174,6 +174,9 @@
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="repaymentAmount" label="回款金额(元)" show-overflow-tooltip>
           <el-table-column prop="repaymentAmount" label="回款金额(元)" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <cy-amount-input v-model="scope.row.repaymentAmount" :disabled="true"></cy-amount-input>
+            </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="purchGuaranteeMoney" label="操作">
           <el-table-column prop="purchGuaranteeMoney" label="操作">
             <template slot-scope="scope">
             <template slot-scope="scope">
@@ -503,7 +506,6 @@ export default {
         method: 'post',
         method: 'post',
         data
         data
       }).then(({ data }) => {
       }).then(({ data }) => {
-        
         // } else {
         // } else {
           this.ruleForm.goodsList.forEach((item, index) => {
           this.ruleForm.goodsList.forEach((item, index) => {
             this.calculateKeyList.forEach(key => {
             this.calculateKeyList.forEach(key => {
@@ -738,7 +740,7 @@ export default {
     },
     },
     calculateRepayNum() {
     calculateRepayNum() {
       this.repayTotalNum = this.ruleForm.repayList.reduce((t, i) => {
       this.repayTotalNum = this.ruleForm.repayList.reduce((t, i) => {
-        t = parseFloat(Number(t) + Number(i.repaymentAmount)).toFixed(2)
+        t = parseFloat(Number(t) + Number(i.repaymentAmount.replace(/,/g, ''))).toFixed(2)
         console.log(t, 'helo', i.repaymentAmount)
         console.log(t, 'helo', i.repaymentAmount)
         return t
         return t
       }, 0)
       }, 0)
@@ -796,4 +798,4 @@ export default {
   color: #ff0000;
   color: #ff0000;
   margin-right: 5px;
   margin-right: 5px;
 }
 }
-</style>
+</style>