GaoYuPeng 3 years ago
parent
commit
b05ae4d323

+ 17 - 13
shanXiPlatform/src/views/reservesManagement/grainCheck/newGrain/addNewGrain.vue

@@ -83,7 +83,7 @@
83
           type="savebtn"
83
           type="savebtn"
84
           :loading="loading"
84
           :loading="loading"
85
           v-show="show"
85
           v-show="show"
86
-          v-else-if="flag"
86
+          v-if="flag"
87
           @click="saveInfo"
87
           @click="saveInfo"
88
           >保存</el-button
88
           >保存</el-button
89
         >
89
         >
@@ -529,16 +529,24 @@ export default {
529
       if (this.type == "2") {
529
       if (this.type == "2") {
530
         this.data3.depotId = this.depot_id
530
         this.data3.depotId = this.depot_id
531
         this.data3.houseId = this.house_id
531
         this.data3.houseId = this.house_id
532
-        // console.log(this.house_id, "house_id")
533
-        // console.log(this.data3.houseId, "this.data3.houseId...")
532
+        console.log(this.house_id, "house_id")
533
+        console.log(this.data3.houseId, "this.data3.houseId...")
534
         this.data3.checkDescribe = JSON.stringify(this.data3.checkDescribe)
534
         this.data3.checkDescribe = JSON.stringify(this.data3.checkDescribe)
535
 
535
 
536
         addInfo(this.data3)
536
         addInfo(this.data3)
537
           .then(res => {
537
           .then(res => {
538
-            // console.log(this.data3, "this.data3")
539
-            // console.log(res,'res222111...')
538
+            console.log(this.data3, "this.data3")
539
+            console.log(res,'res222111...')
540
             if (res.code == 200) {
540
             if (res.code == 200) {
541
+              console.log('新增成功........')
541
               this.loading = false
542
               this.loading = false
543
+              this.$message({
544
+              message: "新增成功!",
545
+              type: "success"
546
+            })
547
+            this.$router.push({
548
+              path: "/reservesManagement/grainCheck/newGrain"
549
+            })
542
               if (!(JSON.stringify(this.data2) == {})) {
550
               if (!(JSON.stringify(this.data2) == {})) {
543
                 if (
551
                 if (
544
                   Object.getOwnPropertyNames(
552
                   Object.getOwnPropertyNames(
@@ -548,10 +556,11 @@ export default {
548
                   //当选项全部被选中后调用接口
556
                   //当选项全部被选中后调用接口
549
                   let auditState = 4 //4 是已完成
557
                   let auditState = 4 //4 是已完成
550
                   //判断是否切换仓房,或者仓房发生改变
558
                   //判断是否切换仓房,或者仓房发生改变
559
+                  console.log(this.house_id,this.data2.houseId,'houseId')
551
                   if (this.house_id == this.data2.houseId) {
560
                   if (this.house_id == this.data2.houseId) {
552
                     haveDone(this.data2.id, auditState)
561
                     haveDone(this.data2.id, auditState)
553
                       .then(res => {
562
                       .then(res => {
554
-                        // console.log(res, "res.......")
563
+                        console.log(res, "res.......")
555
                       })
564
                       })
556
                       .catch(err => {
565
                       .catch(err => {
557
                         console.log(err)
566
                         console.log(err)
@@ -579,14 +588,9 @@ export default {
579
                   }
588
                   }
580
                 }
589
                 }
581
               }
590
               }
591
+
582
             }
592
             }
583
-            this.$message({
584
-              message: "新增成功!",
585
-              type: "success"
586
-            })
587
-            this.$router.push({
588
-              path: "/reservesManagement/grainCheck/newGrain"
589
-            })
593
+
590
           })
594
           })
591
           .catch(err => {
595
           .catch(err => {
592
             this.loading = false
596
             this.loading = false