Bladeren bron

返回列表修改

wengyuwen 4 jaren geleden
bovenliggende
commit
4e79f5653e
2 gewijzigde bestanden met toevoegingen van 11 en 7 verwijderingen
  1. 5 3
      src/views/purchaseIssue/index.vue
  2. 6 4
      src/views/purchaseRequest/index.vue

+ 5 - 3
src/views/purchaseIssue/index.vue

@@ -1259,7 +1259,7 @@ export default {
       })
     },
     //详情内容保存
-    submitAndSave(item) {
+    submitAndSave(item,res) {
       if(this.$refs.avatar.form.fBillstatus < 4 || !this.$refs.avatar.form.fBillstatus) {
       let formData = new window.FormData()
       this.$refs.avatar.form.fMoney = 0
@@ -1274,7 +1274,9 @@ export default {
       formData.append('fBilltype', 'XS')
       submit(formData).then(res => {
           if (res.code == 200) {
-            this.$refs.avatar.form = res.data.warehouseBills
+            if(!res){
+              this.$refs.avatar.form = res.data.warehouseBills
+            }
             this.contentList = res.data.tWarehousebillsCntrs
             if (item === 3){
               let datae = {
@@ -1366,7 +1368,7 @@ export default {
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          this.submitAndSave(2)
+          this.submitAndSave(2,1)
         }).catch(() => {
           data = {
             tableName: this.queryList.tableName,

+ 6 - 4
src/views/purchaseRequest/index.vue

@@ -1163,8 +1163,8 @@ export default {
       }
     },
     //详情内容保存
-    submitAndSave(item) {
-      console.log(item)
+    submitAndSave(item,res) {
+      console.log(res)
       if(this.$refs.avatar.form.fBillstatus < 4 || !this.$refs.avatar.form.fBillstatus) {
         let formData = new window.FormData()
         this.$refs.avatar.form.fMoney = 0
@@ -1174,7 +1174,9 @@ export default {
         formData.append('fBilltype', 'SQ')
         submit(formData).then(res => {
           if (res.code == 200) {
-            this.$refs.avatar.form = res.data.warehouseBills
+            if(!res){
+              this.$refs.avatar.form = res.data.warehouseBills
+            }
             this.contentList = res.data.tWarehousebillsCntrs
             if (item === 3){
               let datae = {
@@ -1267,7 +1269,7 @@ export default {
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          this.submitAndSave(2)
+          this.submitAndSave(2,1)
         }).catch(() => {
           data = {
             tableName: this.queryList.tableName,