Преглед изворни кода

11月14日 库存扣减更新

XMLWAN пре 3 година
родитељ
комит
a31e7a004b

+ 4 - 4
src/views/layout/Layout.vue Прегледај датотеку

@@ -17,10 +17,10 @@
17 17
           <p>透析管理</p>
18 18
         </div>
19 19
 
20
-<!--         <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">-->
21
-<!--           <i class="iconfont icon-kccx navIcon"></i>-->
22
-<!--           <p>采购管理</p>-->
23
-<!--        </div>-->
20
+        <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
21
+          <i class="iconfont icon-kccx navIcon"></i>
22
+          <p>采购管理</p>
23
+       </div>
24 24
 
25 25
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
26 26
           <i class="iconfont icon-kccx navIcon"></i>

+ 1 - 0
src/xt_pages/hospitalStation/checkTemplate/printOne.vue Прегледај датотеку

@@ -42,6 +42,7 @@
42 42
                 </div>
43 43
             </div>
44 44
             <img style="width:100%;" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
45
+            <img style="width:100%;" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">
45 46
         </div>
46 47
     </div>
47 48
 

+ 5 - 2
src/xt_pages/hospitalStation/template/printThree.vue Прегледај датотеку

@@ -70,7 +70,8 @@
70 70
           </div>
71 71
           <div>*处方当日有效,特殊情况可适当延长,一般不超过3天</div>
72 72
           <div>*药品属于特殊商品,非质量问题不允许退换</div>
73
-          <img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt="">
73
+          <span v-if="org_id == 10138"><img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt=""></span> 
74
+          <span v-if="org_id == 10278"><img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt=""></span>
74 75
           <!-- <div class="doctorBox">
75 76
               <p>医师:{{item.doctor?item.doctor:""}}</p>
76 77
               <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
@@ -116,7 +117,8 @@ export default {
116 117
         orgname:"",
117 118
         diagnoses:[],
118 119
         pageArr:[],
119
-        faber:{}
120
+        faber:{},
121
+        org_id:0,
120 122
       }
121 123
     },
122 124
    methods:{
@@ -421,6 +423,7 @@ export default {
421 423
       this.getHisPatientDetail()
422 424
       var xtuser = this.$store.getters.xt_user;
423 425
       this.orgname = xtuser.org.org_name;
426
+      this.org_id = this.$store.getters.xt_user.org.id
424 427
 
425 428
    },
426 429
    watch:{

+ 5 - 2
src/xt_pages/outpatientDoctorStation/template/printThree.vue Прегледај датотеку

@@ -70,7 +70,8 @@
70 70
           </div>
71 71
           <div>*处方当日有效,特殊情况可适当延长,一般不超过3天</div>
72 72
           <div>*药品属于特殊商品,非质量问题不允许退换</div>
73
-          <img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt="">
73
+          <span v-if="org_id == 10138"><img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt=""></span> 
74
+          <span v-if="org_id == 10278"><img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt=""></span>
74 75
           <!-- <div class="doctorBox">
75 76
               <p>医师:{{item.doctor?item.doctor:""}}</p>
76 77
               <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
@@ -116,7 +117,8 @@ export default {
116 117
         orgname:"",
117 118
         diagnoses:[],
118 119
         pageArr:[],
119
-        faber:{}
120
+        faber:{},
121
+        org_id:0,
120 122
       }
121 123
     },
122 124
    methods:{
@@ -434,6 +436,7 @@ export default {
434 436
       this.getHisPatientDetail()
435 437
       var xtuser = this.$store.getters.xt_user;
436 438
       this.orgname = xtuser.org.org_name;
439
+      this.org_id = this.$store.getters.xt_user.org.id
437 440
 
438 441
    },
439 442
    watch:{

+ 5 - 3
src/xt_pages/supply/components/addGoodReturn.vue Прегледај датотеку

@@ -824,15 +824,16 @@ export default {
824 824
                  }
825 825
               }
826 826
               orderInfo[i].supply_total = this.getWarehoseInfo(orderInfo[i].drug_warehouse_info,orderInfo[i].drug.max_unit,orderInfo[i].drug.min_unit,orderInfo[i].drug.min_number)
827
-              orderInfo[i].count =this.getWarehoseInfo(orderInfo[i].drug_warehouse_info,orderInfo[i].drug.max_unit,orderInfo[i].drug.min_unit,orderInfo[i].drug.min_number)
827
+             // orderInfo[i].count =this.getWarehoseInfo(orderInfo[i].drug_warehouse_info,orderInfo[i].drug.max_unit,orderInfo[i].drug.min_unit,orderInfo[i].drug.min_number)
828 828
             }
829 829
             if(orderInfo[i].is_source == 2){
830 830
                orderInfo[i].supply_total = this.getTotalStockCount(orderInfo[i].good_warehouse_info)
831
-               orderInfo[i].count = this.getTotalStockCount(orderInfo[i].good_warehouse_info)
831
+
832
+              // orderInfo[i].count = this.getTotalStockCount(orderInfo[i].good_warehouse_info)
832 833
             }
833 834
             orderInfo[i].id = orderInfo[i].id;
834 835
             orderInfo[i].supply_count = orderInfo[i].supply_count;
835
-           
836
+            orderInfo[i].count = orderInfo[i].count
836 837
             orderInfo[i].supply_price = orderInfo[i].price;
837 838
             orderInfo[i].supply_remake = orderInfo[i].remark;
838 839
             orderInfo[i].type = orderInfo[i].is_source;
@@ -847,6 +848,7 @@ export default {
847 848
             orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
848 849
             orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
849 850
             orderInfo[i].deposit_rate = ""
851
+           
850 852
             if (orderInfo[i].is_source == 1) {
851 853
               for (let j = 0; j < drugList.length; j++) {
852 854
                 if (orderInfo[i].project_id == drugList[j].id) {

+ 1 - 0
src/xt_pages/supply/components/editGoodOrder.vue Прегледај датотеку

@@ -1375,6 +1375,7 @@ export default {
1375 1375
             this.Reviewed = false
1376 1376
             this.showOne = true
1377 1377
             this.showTwo = false
1378
+            this.showThree = false
1378 1379
           }
1379 1380
           if (msg == 2) {
1380 1381
             var cancelList = response.data.data.cancelList;

+ 6 - 1
src/xt_pages/supply/components/editGoodReturn.vue Прегледај датотеку

@@ -562,6 +562,7 @@ export default {
562 562
             drugList[i].type = 1;
563 563
             drugList[i].supply_price = drugList[i].last_price;
564 564
             drugList[i].name = drugList[i].drug_name;
565
+            drugList[i].count = ""
565 566
             drugList[i].unitList = [
566 567
               { id: 1, name: "" },
567 568
               { id: 2, name: "" },
@@ -614,7 +615,9 @@ export default {
614 615
               { id: 1, name: "" },
615 616
               { id: 2, name: "" },
616 617
             ];
618
+
617 619
             goodList[i].supply_unit = goodList[i].packing_unit;
620
+            goodList[i].count = ""
618 621
             for (let j = 0; j < goodList[i].unitList.length; j++) {
619 622
               goodList[i].unitList[0].name = goodList[i].packing_unit;
620 623
             }
@@ -919,7 +922,6 @@ export default {
919 922
             orderInfo[i].id = orderInfo[i].id;
920 923
             orderInfo[i].supply_count = orderInfo[i].supply_count;
921 924
             orderInfo[i].count = orderInfo[i].count;
922
-
923 925
             orderInfo[i].supply_price = orderInfo[i].price;
924 926
             orderInfo[i].supply_remake = orderInfo[i].remark;
925 927
             orderInfo[i].type = orderInfo[i].is_source;
@@ -1021,7 +1023,9 @@ export default {
1021 1023
             if (response.data.state == 1) {
1022 1024
               var msg = response.data.msg;
1023 1025
               this.loading = false;
1026
+              this.getGoodReturnDetail()
1024 1027
               this.$message.success("保存成功!");
1028
+
1025 1029
             }
1026 1030
           });
1027 1031
         }
@@ -1112,6 +1116,7 @@ export default {
1112 1116
     tempObj["order_number"] = ""
1113 1117
     this.recordInfo.tableList.push(tempObj);
1114 1118
     this.getInitOrder();
1119
+
1115 1120
     //获取购货单列表
1116 1121
     this.getGoodReturnDetail();
1117 1122
     this.start_time = this.getTimes(new Date());

+ 3 - 0
src/xt_pages/supply/goodreturn.vue Прегледај датотеку

@@ -156,6 +156,9 @@
156 156
           <template slot-scope="scope">
157 157
             <!-- <span v-if="scope.row.is_check == 2">未审核</span>
158 158
            <span v-if="scope.row.is_check == 1">已审核</span> -->
159
+           <span v-if="scope.row.payment == 0">未退款</span>
160
+           <span v-if="scope.row.payment > 0 && scope.row.payment< getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">部分退款</span>
161
+           <span v-if="scope.row.payment == getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">全部退款</span>
159 162
           </template>
160 163
         </el-table-column>
161 164
 

+ 36 - 3
src/xt_pages/supply/purchaseOrderQuery.vue Прегледај датотеку

@@ -107,7 +107,6 @@
107 107
               <tr class="color" v-for="(item,index) in scope.row.orderOut" :key="index">
108 108
                  <td style="border-right:none;">{{item.good_number}}</td>
109 109
               </tr>
110
-
111 110
             </div>
112 111
           </template>
113 112
         </el-table-column>
@@ -126,9 +125,14 @@
126 125
         </el-table-column>
127 126
         <el-table-column label="订单状态" align="center">
128 127
           <template slot-scope="scope">
129
-            <span v-if="scope.row.is_warehouse == 1">全部入库</span>
128
+            <!-- <span v-if="scope.row.is_warehouse == 1">全部入库</span>
130 129
             <span v-if="scope.row.is_warehouse == 2">未入库</span>
131
-            <span v-if="scope.row.is_warehouse == 3">部分入库</span>
130
+            <span v-if="scope.row.is_warehouse == 3">部分入库</span> -->
131
+            <span v-if="scope.row.orderOut!= undefined && scope.row.orderOut.length == 0">未入库</span> 
132
+            <span v-if="scope.row.orderOut!= undefined && scope.row.orderOut.length > 0">
133
+            <span v-if="getStatus(scope.row.orderOut) >= getAllCount(scope.row.orderInfo) ">全部入库</span> 
134
+            <span v-if="getStatus(scope.row.orderOut) < getAllCount(scope.row.orderInfo) ">部分入库</span> 
135
+            </span> 
132 136
           </template>
133 137
         </el-table-column>
134 138
 
@@ -288,9 +292,11 @@ export default {
288 292
       getAllPurchaseOrderList(params).then((response) => {
289 293
         if (response.data.state == 1) {
290 294
           var list = response.data.data.list;
295
+          console.log("list2323322332323232232323",list)
291 296
           this.tableList = list;
292 297
           var total = response.data.data.total;
293 298
           this.total = total;
299
+         
294 300
         }
295 301
       });
296 302
     },
@@ -376,6 +382,33 @@ export default {
376 382
       this.Color_txt = false;
377 383
       console.log(this.Color_txt, "false");
378 384
     },
385
+    getStatus(val){
386
+      console.log("val23322332",val)
387
+      var arr =[]
388
+      var newArr =[]
389
+      var total = 0
390
+      if(val!=undefined && val.length >0){
391
+        for(let i=0;i<val.length;i++){
392
+          if(val[i].is_check == 1){
393
+             arr.push(val[i])
394
+          }
395
+        }
396
+      }
397
+      if(arr.length > 0){
398
+        for(let i=0;i<arr.length;i++){
399
+          for(let j=0;j<arr[i].order.length;j++){
400
+            newArr.push(arr[i].order[j])
401
+          }
402
+        }
403
+      }
404
+      if(newArr.length >0){
405
+        for(let i=0;i<newArr.length;i++){
406
+          total +=newArr[i].count
407
+        }
408
+      }
409
+      
410
+      return total
411
+    }
379 412
   },
380 413
   created() {
381 414
     var now = new Date(); //当前日期