Browse Source

森语-搬运工对账单-删行触发合计重新计算

jbb 2 years ago
parent
commit
1bfaa77bac
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/views/oa/modules/SyCarryModal.vue

+ 3 - 2
src/views/oa/modules/SyCarryModal.vue

@@ -165,7 +165,7 @@
           <span slot="option" slot-scope="text, record, index">
                 <a @click="copyRow(record)">复制</a>
                  <a-divider type="vertical" />
-                <a @click="deleteRow(index)" style="color:red">删行</a>
+                <a @click="deleteRow(record,index)" style="color:red">删行</a>
 
           </span>
         </a-table>
@@ -478,8 +478,9 @@
       },
 
       //删行
-      deleteRow(index){
+      deleteRow(record,index){
         this.syCarryBTable.dataSource.splice(index,1)
+        this.formState.totalNum =(Number(this.formState.totalNum) -Number(record.totalPrice)).toFixed(2)
       },
  
       /** 调用完edit()方法之后会自动调用此方法 */