Browse Source

变更令

ZaiZai 1 year ago
parent
commit
af55592ea2
1 changed files with 9 additions and 3 deletions
  1. 9 3
      src/views/debit-pay/admin/components/middlepay/addModal.vue

+ 9 - 3
src/views/debit-pay/admin/components/middlepay/addModal.vue

@@ -103,8 +103,8 @@
                             <template #allMeterTotal="{ row }">
                                 <hc-table-input v-model="row.allMeterTotal" disabled />
                             </template>
-                            <template #action="{ row }">
-                                <el-link type="danger">删除</el-link>
+                            <template #action="{ index }">
+                                <el-link type="danger" @click="delAddTableClick(index)">删除</el-link>
                             </template>
                         </hc-table>
                     </hc-card-item>
@@ -348,7 +348,7 @@ const addTableData = ref([])
 //计算本期计量金额
 const currentMeterTotalBlur = (row) => {
     row.currentMeterMoney = (BigNumber(row.currentMeterTotal).multipliedBy(row.currentPrice)).toString()
-    row.allMeterTotal = (BigNumber(row.currentMeterTotal).plus(row.allMeterTotal)).toString()
+    row.allMeterTotal = (BigNumber(row.currentMeterTotal).plus(row.webAllMeterTotal)).toString()
 
     //计算总计量金额
     let meterMoney = 0
@@ -365,6 +365,11 @@ const addTableRowStyle = ({ row }) => {
     }
 }
 
+//删除清单
+const delAddTableClick = (index) => {
+    addTableData.value.splice(index, 1)
+}
+
 //添加分解单
 const addBillBaseModalShow = ref(false)
 const billBaseIds = ref('')
@@ -375,6 +380,7 @@ const addBillBaseModalClick = () => {
 //添加完成
 const finishChange = (data) => {
     for (let i = 0; i < data.length; i++) {
+        data[i].webAllMeterTotal = data[i].allMeterTotal
         addTableData.value.push(data[i])
     }
 }