GaoYuPeng 3 년 전
부모
커밋
b05ae4d323
1개의 변경된 파일17개의 추가작업 그리고 13개의 파일을 삭제
  1. 17 13
      shanXiPlatform/src/views/reservesManagement/grainCheck/newGrain/addNewGrain.vue

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

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