scorpio il y a 2 ans
Parent
commit
d9d3eb4156
1 fichiers modifiés avec 6 ajouts et 4 suppressions
  1. 6 4
      src/views/contract/component/info2.vue

+ 6 - 4
src/views/contract/component/info2.vue

@@ -254,11 +254,13 @@ export default {
         type: 'warning'
       }).then(res => {
         if (res === 'confirm') {
+          console.log(item)
           this.$api.contract.voucherDel({ ids: item.id }).then(res => {
             if (res.code === 200) {
-              this.form.accountInformationFileList = item.filter(
-                sub => sub.id !== item
-              )
+              this.form.accountInformationFileList =
+                this.form.accountInformationFileList.filter(
+                  sub => sub.id !== item.id
+                )
             }
           })
         }
@@ -266,7 +268,7 @@ export default {
     },
     rowUpdate(row, index, done, loading) {
       loading()
-      const data = Object.assign(row, { contractId: this.id })
+      const data = Object.assign(this.form, { contractId: this.id })
       this.$api.contract.ledgerUpdate(data).then(
         res => {
           if (res.code === 200) {