Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
867f6caedd

+ 2 - 2
src/xt_pages/supply/components/addGoodOrder.vue View File

@@ -49,7 +49,7 @@
49 49
     </div>
50 50
     <div>
51 51
         <el-button size="small" type="primary" @click="saveGoodOrder" v-show="showOne">保存</el-button>
52
-         <el-button size="small" type="primary" @click="updateGoodOrder" v-show="showTwo">修改</el-button>
52
+         <el-button size="small" type="primary" @click="updateGoodOrder" v-show="showTwo">保存</el-button>
53 53
         <el-button size="small" type="primary"  @click="checkPurchaseOrder">审核</el-button>
54 54
 
55 55
        
@@ -790,7 +790,7 @@ getTimes(time) {
790 790
            updateGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehose_out_id,this.number,this.rate_of_concession,this.discount_amount,this.good_number).then(response=>{
791 791
            if(response.data.state == 1){
792 792
              this.loading = false
793
-             this.$message.success("修改成功!")
793
+             this.$message.success("保存成功!")
794 794
              
795 795
            }
796 796
          })

+ 2 - 2
src/xt_pages/supply/components/addGoodReturn.vue View File

@@ -60,7 +60,7 @@
60 60
         </div>
61 61
         <div>
62 62
           <el-button size="small" type="primary" @click="saveGoodReturn" v-show="showOne">保存</el-button>
63
-          <el-button size="small" type="primary" @click="saveGoodReturn" v-show="showTwo">修改</el-button>
63
+          <el-button size="small" type="primary" @click="saveGoodReturn" v-show="showTwo">保存</el-button>
64 64
           <el-button size="small" type="primary" @click="updatePurchaseOrder"
65 65
             >审核</el-button
66 66
           >
@@ -683,7 +683,7 @@ export default {
683 683
             if (response.data.state == 1) {
684 684
               this.loading = false;
685 685
               var warehousingInfo = response.data.data.warehousingInfo;
686
-              this.$message.success("修改成功!");
686
+              this.$message.success("保存成功!");
687 687
             }
688 688
           });
689 689
         }

+ 24 - 26
src/xt_pages/supply/components/addPurchaseOrder.vue View File

@@ -82,7 +82,7 @@
82 82
             type="primary"
83 83
             @click="updatePurchaseOrder"
84 84
             v-show="showOne"
85
-            >修改</el-button
85
+            >保存</el-button
86 86
           >
87 87
         </div>
88 88
       </div>
@@ -669,6 +669,9 @@ export default {
669 669
               this.loading = false;
670 670
               this.$message.success("保存成功!");
671 671
               var warehouseInfo = response.data.data.warehouseInfo;
672
+              if(warehouseInfo.is_check == 1){
673
+                this.Reviewed = true
674
+              }
672 675
               this.number = warehouseInfo.number;
673 676
               this.id = warehouseInfo.id;
674 677
               this.recordInfo.tableList = [];
@@ -704,25 +707,25 @@ export default {
704 707
               }
705 708
               console.log("orderINFO23323232", orderInfo);
706 709
               this.recordInfo.tableList = orderInfo;
707
-              // for(let i=0;i<orderInfo.length;i++){
708
-              //    orderInfo[i].name = ""
709
-              //    orderInfo[i].supply_name = ""
710
-              //    orderInfo[i].supply_specification_name = ""
711
-              //   if(orderInfo[i].is_source == 1){
712
-              //     for(let j=0;j<this.drugList.length;j++){
713
-              //        if(orderInfo[i].project_id == this.drugList[j].id){
714
-              //           orderInfo[i].name = this.drugList[j].drug_name
715
-              //        }
716
-              //     }
717
-              //   }
718
-              //   if(orderInfo[i].is_source == 2){
719
-              //     for(let y=0;y<this.goodList.length;y++){
720
-              //        if(orderInfo[i].project_id = this.goodList[y].id){
721
-              //           orderInfo[i].name = this.goodList[y].good_name
722
-              //        }
723
-              //     }
724
-              //   }
725
-              // }
710
+              for(let i=0;i<orderInfo.length;i++){
711
+                 orderInfo[i].name = ""
712
+                 orderInfo[i].supply_name = ""
713
+                 orderInfo[i].supply_specification_name = ""
714
+                if(orderInfo[i].is_source == 1){
715
+                  for(let j=0;j<this.drugList.length;j++){
716
+                     if(orderInfo[i].project_id == this.drugList[j].id){
717
+                        orderInfo[i].name = this.drugList[j].drug_name
718
+                     }
719
+                  }
720
+                }
721
+                if(orderInfo[i].is_source == 2){
722
+                  for(let y=0;y<this.goodList.length;y++){
723
+                     if(orderInfo[i].project_id = this.goodList[y].id){
724
+                        orderInfo[i].name = this.goodList[y].good_name
725
+                     }
726
+                  }
727
+                }
728
+              }
726 729
               this.showTwo = false;
727 730
               this.showOne = true;
728 731
             }
@@ -831,7 +834,7 @@ export default {
831 834
             if (response.data.state == 1) {
832 835
               this.loading = false;
833 836
               var warehousingInfo = response.data.data.warehousingInfo;
834
-              this.$message.success("修改成功!");
837
+              this.$message.success("保存成功!");
835 838
             }
836 839
           });
837 840
         }
@@ -845,11 +848,6 @@ export default {
845 848
           this.recordInfo.tableList[i].supply_count;
846 849
       }
847 850
       this.total_price = total_price;
848
-      //   var discount_amount = 0
849
-      //   if(this.rate_of_concession >0){
850
-      //      discount_amount = (this.rate_of_concession/100*total_price)
851
-      //   }
852
-      //  this.discount_amount = discount_amount.toFixed(2)
853 851
       return total_price.toFixed(2);
854 852
     },
855 853
     checkPurchaseOrder(id, index) {

+ 2 - 2
src/xt_pages/supply/components/editGoodOrder.vue View File

@@ -47,7 +47,7 @@
47 47
 
48 48
     </div>
49 49
     <div>
50
-        <el-button size="small" type="primary" @click="updateGoodOrder">修改</el-button>
50
+        <el-button size="small" type="primary" @click="updateGoodOrder">保存</el-button>
51 51
         <el-button size="small" type="primary"  @click="toClick" v-show="showThree">生成采购退货单</el-button>
52 52
         <el-button size="small" type="primary"  v-show="showOne">审核</el-button>
53 53
         <el-button size="small" type="primary"  v-show="showTwo">反审核</el-button>
@@ -698,7 +698,7 @@ getTimes(time) {
698 698
            updateGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehose_out_id,this.number,this.rate_of_concession,this.discount_amount,this.good_number).then(response=>{
699 699
            if(response.data.state == 1){
700 700
              this.loading = false
701
-             this.$message.success("修改成功!")
701
+             this.$message.success("保存成功!")
702 702
              
703 703
            }
704 704
          })

+ 15 - 2
src/xt_pages/supply/components/editPurchaseOrder.vue View File

@@ -51,7 +51,7 @@
51 51
     </div>
52 52
     <div>
53 53
         <el-button size="small" type="primary" @click="toAdd" v-show="showOne">生成采购单</el-button>
54
-        <el-button size="small" type="primary" @click="updatePurchaseOrder">修改</el-button>
54
+        <el-button size="small" type="primary" @click="updatePurchaseOrder">保存</el-button>
55 55
         <el-button size="small" type="primary" @click="toPrint">打印</el-button>
56 56
         <el-button size="small" type="primary" v-if="is_check == 2" @click="checkPurchaseOrder" v-show="showTwo">审核</el-button>
57 57
         <el-button size="small" type="primary" v-if="is_check == 1" @click="checkReturnOrder" v-show="showThree">反审核</el-button>
@@ -197,6 +197,9 @@
197 197
         </template>
198 198
     </el-table-column>
199 199
   </el-table>
200
+
201
+   <!-- 审核水印 -->
202
+  <img src="@/assets/purchase/Reviewed.png" alt="正在加载..." class="reviewImg" v-show="Reviewed == true" />
200 203
 </el-form>
201 204
    <div style="margin-top:10px">
202 205
       合计:{{getAllPrice()}} 元
@@ -237,6 +240,7 @@ BreadCrumb
237 240
 },
238 241
 data() {
239 242
 return {
243
+    Reviewed:false,
240 244
     crumbs: [
241 245
        { path: false, name: "采购订单" },
242 246
        { path: "/supply/query", name: "编辑采购订单" }
@@ -552,7 +556,7 @@ getTimes(time) {
552 556
            if(response.data.state == 1){
553 557
             this.loading = false
554 558
              var warehousingInfo =  response.data.data.warehousingInfo
555
-             this.$message.success("修改成功!")
559
+             this.$message.success("保存成功!")
556 560
            }
557 561
         })
558 562
       } 
@@ -594,6 +598,9 @@ getTimes(time) {
594 598
     getPurchaseOrderDetail(id).then(response=>{
595 599
       if(response.data.state == 1){
596 600
         var info = response.data.data.info
601
+        if(info.is_check == 1){
602
+          this.Reviewed = true
603
+        }
597 604
         this.is_check = info.is_check
598 605
         this.number = info.number
599 606
         this.id = info.id
@@ -885,4 +892,10 @@ background-color: #d0d3da;
885 892
   bottom: 20px;
886 893
   height: 100%;
887 894
 }
895
+.reviewImg{
896
+  position: fixed;
897
+  left: 50%;
898
+  transform: translateX(-50%);
899
+  top: 30%;
900
+}
888 901
 </style>

+ 1 - 1
src/xt_pages/supply/purchaseOrderQuery.vue View File

@@ -361,7 +361,7 @@ export default {
361 361
     this.end_time = this.getTimes(new Date())
362 362
     this.org_id =  this.$store.getters.xt_user.org_id
363 363
     this.getAllSupply()
364
-    // this.getlist()
364
+    this.getlist()
365 365
   },
366 366
  
367 367
 };

+ 13 - 13
src/xt_permission.js View File

@@ -12,19 +12,19 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
12 12
 
13 13
 router.beforeEach((to, from, next) => {
14 14
   // 线上注释
15
-  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
-    store.dispatch('VerifyConfigList', []).then(() => {
17
-      next()
18
-    })
19
-  }
20
-  if (store.getters.permission_routers === undefined) {
21
-    store.dispatch('xt_GenerateRoutes', []).then(() => {
22
-      next()
23
-    })
24
-  } else {
25
-    next()
26
-  }
27
-  return
15
+  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
+  //   store.dispatch('VerifyConfigList', []).then(() => {
17
+  //     next()
18
+  //   })
19
+  // }
20
+  // if (store.getters.permission_routers === undefined) {
21
+  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
22
+  //     next()
23
+  //   })
24
+  // } else {
25
+  //   next()
26
+  // }
27
+  // return
28 28
   // 线上注释
29 29
   NProgress.start()
30 30
   // console.log(store.getters.current_role_urls.indexOf(to.path))