Procházet zdrojové kódy

11月14日 库存扣减更新

XMLWAN před 3 roky
rodič
revize
a563cc6ff4

+ 4 - 4
src/xt_pages/hospitalStation/components/deskPrescription.vue Zobrazit soubor

@@ -288,7 +288,7 @@
288 288
                     <el-table-column label="库存" width="60">
289 289
                       <template slot-scope="scope">
290 290
                                           <span
291
-                                              v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10188 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10191 || org_id == 10278">
291
+                                              v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10188 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10191 || org_id == 10278 || org_id == 10217">
292 292
                                               <span
293 293
                                                   v-if="scope.row.count/scope.row.min_number>0">{{ Math.floor(scope.row.count / scope.row.min_number) }}{{ scope.row.max_unit }}</span>
294 294
                                               <span
@@ -387,7 +387,7 @@
387 387
                     <el-table-column label="库存" width="40">
388 388
                       <template slot-scope="scope">
389 389
                                                 <span
390
-                                                    v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10191 || org_id == 10278">
390
+                                                    v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id ==10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10191 || org_id == 10278 || org_id == 10217">
391 391
                                                     {{ scope.row.stock_count }}
392 392
                                                 </span>
393 393
                         <span v-else> {{ scope.row.total }}</span>
@@ -2667,7 +2667,7 @@ export default {
2667 2667
       this.$refs.additionalCharges.show()
2668 2668
     },
2669 2669
     selectDrugs(selection, row) {
2670
-      if (this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id == 10088 || this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10191 || this.org_id == 10278) {
2670
+      if (this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id == 10088 || this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217) {
2671 2671
         if (row.count <= 0) {
2672 2672
           if (selection) {
2673 2673
             selection.forEach(row => {
@@ -2954,7 +2954,7 @@ export default {
2954 2954
     },
2955 2955
     selectChange(selection, row) {
2956 2956
       console.log('row', row)
2957
-      if (this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id == 10088 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 10188  || this.org_id == 9956 || this.org_id == 10191 || this.org_id == 10278) {
2957
+      if (this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id == 10088 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 10188  || this.org_id == 9956 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217) {
2958 2958
         if (row.stock_count <= 0) {
2959 2959
           if (row.type == 3) {
2960 2960
             if (selection) {

+ 4 - 4
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Zobrazit soubor

@@ -286,7 +286,7 @@
286 286
                                         </el-table-column>
287 287
                                         <el-table-column label="库存" width="60">
288 288
                                             <template slot-scope="scope">
289
-                                              <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id == 10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id ==9956 || org_id == 10188 || org_id == 10191 || org_id == 10278">
289
+                                              <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id == 10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id ==9956 || org_id == 10188 || org_id == 10191 || org_id == 10278 || org_id == 10217">
290 290
                                                <span v-if="scope.row.count/scope.row.min_number>0">{{Math.floor(scope.row.count/scope.row.min_number)}}{{scope.row.max_unit}}</span>
291 291
                                                <span v-if="scope.row.count%scope.row.min_number>0"> {{scope.row.count%scope.row.min_number}}{{scope.row.min_unit}}</span>
292 292
                                               </span>
@@ -383,7 +383,7 @@
383 383
                                         </el-table-column>
384 384
                                         <el-table-column label="库存" width="40">
385 385
                                             <template slot-scope="scope">
386
-                                              <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id == 10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10188 || org_id == 10191 || org_id == 10278">
386
+                                              <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919 || org_id == 10106 || org_id == 9504 || org_id ==10215 || org_id == 10188 || org_id == 10265 || org_id == 10164 || org_id == 9956 || org_id == 10188 || org_id == 10191 || org_id == 10278 || org_id == 10217">
387 387
                                                    {{scope.row.stock_count}}
388 388
                                               </span>
389 389
                                               <span v-else> {{ scope.row.total }}</span>
@@ -2663,7 +2663,7 @@
2663 2663
       selectDrugs(selection, row) {
2664 2664
         console.log('selection', selection)
2665 2665
         console.log('row', row)
2666
-        if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10188 || this.org_id == 10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id ==10215 || this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10188 || this.org_id == 10191 || this.org_id == 10278){
2666
+        if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10188 || this.org_id == 10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id ==10215 || this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10188 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217){
2667 2667
             if (row.count <= 0) {
2668 2668
               if (selection) {
2669 2669
                 selection.forEach(row => {
@@ -2941,7 +2941,7 @@
2941 2941
       },
2942 2942
       selectChange(selection, row) {
2943 2943
         console.log('row', row)
2944
-        if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10188 || this.org_id ==10245 || this.org_id == 9919  || this.org_id == 10106 || this.org_id == 9504 || this.org_id ==10215 ||  this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10188 || this.org_id == 10191 || this.org_id == 10278){
2944
+        if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10188 || this.org_id ==10245 || this.org_id == 9919  || this.org_id == 10106 || this.org_id == 9504 || this.org_id ==10215 ||  this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10188 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217){
2945 2945
            if (row.stock_count <= 0) {
2946 2946
             if (row.type == 3) {
2947 2947
               if (selection) {

+ 23 - 7
src/xt_pages/stock/detail/print.vue Zobrazit soubor

@@ -51,7 +51,8 @@
51 51
               <td style="line-height: 50px">
52 52
                 <span v-if="type == 1"> {{ item.warehousing_count }}</span>
53 53
                 <span v-if="type == 2"> 
54
-                  <span  v-if= "org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span>  
54
+                  <span  v-if= "org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span> 
55
+                   <span  v-if= "org_id == 10265">{{getMySelfCount(item.good_id) }}</span>   
55 56
                   <span v-else>{{getStockCount(item.good_id) }}</span>
56 57
                 </span>
57 58
                
@@ -63,7 +64,7 @@
63 64
               <td style="line-height:50px">
64 65
                 <span v-if="type == 1"> {{ item.price }}</span>
65 66
                 <span v-if="type == 2"> 
66
-                  <span v-if="org_id == 9919 || org_id == 9671">{{ item.buy_price }}</span>  
67
+                  <span v-if="org_id == 9919">{{ item.buy_price }}</span>  
67 68
                   <span v-else>
68 69
                     {{ item.packing_price }} 
69 70
                   </span>  
@@ -73,9 +74,10 @@
73 74
               <td style="line-height:50px">
74 75
                 <span v-if="type == 1">{{(item.warehousing_count * item.price).toFixed(2)}}</span>
75 76
                 <span v-if="type == 2">
76
-                  <span v-if="org_id == 3907 || org_id ==9919 || org_id == 9671">
77
-                     {{(getStockCount(item.good_id) * item.buy_price).toFixed(2) }}
77
+                  <span v-if="org_id == 3907 || org_id ==9919">
78
+                     {{(getStockCount(item.good_id) * item.buy_price).toFixed(2)}}
78 79
                   </span>
80
+                  <span v-if="org_id == 10265">{{(getMySelfCount(item.good_id)*item.packing_price).toFixed(2)}}</span>
79 81
                   <span v-else>{{(getStockCount(item.good_id) * item.packing_price).toFixed(2)}}</span>
80 82
                 </span>
81 83
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
@@ -97,7 +99,8 @@
97 99
               <td style="line-height: 50px"  width="80">
98 100
                 <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
99 101
                 <span v-if="type == 2">
100
-                  <span v-if="org_id == 3907 || org_id == 9919 || org_id == 9671">{{getWareOutTotalOne().toFixed(2)}}</span>
102
+                  <span v-if="org_id == 3907 || org_id == 9919">{{getWareOutTotalOne().toFixed(2)}}</span>
103
+                  <span v-if="org_id == 10265">{{getWareOutTotalSix().toFixed(2)}}</span>
101 104
                   <span v-else> {{getWareOutTotal().toFixed(2)}}</span>
102 105
                  </span> 
103 106
                 <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
@@ -406,13 +409,26 @@
406 409
        return total
407 410
      },
408 411
      getWareOutTotalOne(){
409
-       console.log("数据23332323",this.stockDatas)
410 412
        var total = 0
411 413
        for(let i=0;i<this.stockDatas.length;i++){
412 414
          total+= this.getStockCount(this.stockDatas[i].good_id) * this.stockDatas[i].buy_price
413 415
        }
414 416
        return total
415
-     }
417
+     },
418
+     getMySelfCount(){
419
+       var total = 0
420
+       for(let i=0;i<this.stockDatas.length;i++){
421
+         total+= this.stockDatas[i].count
422
+       }
423
+       return total
424
+     },
425
+     getWareOutTotalSix(){
426
+       var total = 0
427
+       for(let i=0;i<this.stockDatas.length;i++){
428
+         total+= this.getMySelfCount(this.stockDatas[i].good_id) * this.stockDatas[i].packing_price
429
+       }
430
+       return total
431
+     },
416 432
     },
417 433
     created() {
418 434
       var xtuser = this.$store.getters.xt_user

+ 24 - 2
src/xt_pages/stock/detail/stockOutDetail.vue Zobrazit soubor

@@ -754,10 +754,18 @@ export default {
754 754
         if(this.orgId == 9919){
755 755
           this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].buy_price).toFixed(2)
756 756
           this.tableOut[i].packing_price = this.tableOut[i].buy_price
757
+        }else if(this.orgId == 10265){
758
+          this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
757 759
         }else{
758 760
           this.tableOut[i].total_price = (this.getStockCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
759 761
         }
760
-        this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
762
+       
763
+        if(this.orgId  == 10265){
764
+        
765
+         this.tableOut[i].out_count = this.getMySelfCount(this.tableOut[i].good_id)
766
+        }else{
767
+          this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
768
+        }
761 769
        }
762 770
        import('@/vendor/Export2Excel').then(excel => {
763 771
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
@@ -845,7 +853,7 @@ export default {
845 853
       getGoodDetailPrintList(params).then(response=>{
846 854
         if(response.data.state == 1){
847 855
           var list = response.data.data.list
848
-        
856
+          console.log("lisrt23323223233232232323232323",list)
849 857
           this.tableOut = list
850 858
           var stockTotal = response.data.data.stockTotal
851 859
           console.log("list88888888888888888888",stockTotal)
@@ -863,6 +871,20 @@ export default {
863 871
         }
864 872
         return count
865 873
     }, 
874
+     getMySelfCount(){
875
+       var total = 0
876
+       for(let i=0;i<this.tableOut.length;i++){
877
+         total+= this.tableOut[i].count
878
+       }
879
+       return total
880
+     },
881
+     getWareOutTotalSix(){
882
+       var total = 0
883
+       for(let i=0;i<this.tableOut.length;i++){
884
+         total+= this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].packing_price
885
+       }
886
+       return total
887
+     },
866 888
   }
867 889
 };
868 890
 </script>

+ 8 - 5
src/xt_pages/supply/components/addGoodReturn.vue Zobrazit soubor

@@ -717,12 +717,15 @@ export default {
717 717
       this.recordInfo.tableList.push(tempObj);
718 718
     },
719 719
     handleDelete: function (index, row) {
720
-      if (this.recordInfo.tableList.length <= 1) {
721
-        this.$message.error("只有一条记录的时候无法删除");
722
-        return;
723
-      }else{
724
-        this.recordInfo.tableList.splice(index, 1);
720
+      if(row.id == 0){
721
+       if (this.recordInfo.tableList.length <= 1) {
722
+          this.$message.error("只有一条记录的时候无法删除");
723
+          return;
724
+        }else{
725
+          this.recordInfo.tableList.splice(index, 1);
726
+        }
725 727
       }
728
+     
726 729
       if (row.id > 0) {
727 730
         const params = {
728 731
             id: row.id