Quellcode durchsuchen

11月14日 库存扣减更新

XMLWAN vor 3 Jahren
Ursprung
Commit
a563cc6ff4

+ 4 - 4
src/xt_pages/hospitalStation/components/deskPrescription.vue Datei anzeigen

288
                     <el-table-column label="库存" width="60">
288
                     <el-table-column label="库存" width="60">
289
                       <template slot-scope="scope">
289
                       <template slot-scope="scope">
290
                                           <span
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
                                               <span
292
                                               <span
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>
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
                                               <span
294
                                               <span
387
                     <el-table-column label="库存" width="40">
387
                     <el-table-column label="库存" width="40">
388
                       <template slot-scope="scope">
388
                       <template slot-scope="scope">
389
                                                 <span
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
                                                     {{ scope.row.stock_count }}
391
                                                     {{ scope.row.stock_count }}
392
                                                 </span>
392
                                                 </span>
393
                         <span v-else> {{ scope.row.total }}</span>
393
                         <span v-else> {{ scope.row.total }}</span>
2667
       this.$refs.additionalCharges.show()
2667
       this.$refs.additionalCharges.show()
2668
     },
2668
     },
2669
     selectDrugs(selection, row) {
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
         if (row.count <= 0) {
2671
         if (row.count <= 0) {
2672
           if (selection) {
2672
           if (selection) {
2673
             selection.forEach(row => {
2673
             selection.forEach(row => {
2954
     },
2954
     },
2955
     selectChange(selection, row) {
2955
     selectChange(selection, row) {
2956
       console.log('row', row)
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
         if (row.stock_count <= 0) {
2958
         if (row.stock_count <= 0) {
2959
           if (row.type == 3) {
2959
           if (row.type == 3) {
2960
             if (selection) {
2960
             if (selection) {

+ 4 - 4
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Datei anzeigen

286
                                         </el-table-column>
286
                                         </el-table-column>
287
                                         <el-table-column label="库存" width="60">
287
                                         <el-table-column label="库存" width="60">
288
                                             <template slot-scope="scope">
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
                                                <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>
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
                                                <span v-if="scope.row.count%scope.row.min_number>0"> {{scope.row.count%scope.row.min_number}}{{scope.row.min_unit}}</span>
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
                                               </span>
292
                                               </span>
383
                                         </el-table-column>
383
                                         </el-table-column>
384
                                         <el-table-column label="库存" width="40">
384
                                         <el-table-column label="库存" width="40">
385
                                             <template slot-scope="scope">
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
                                                    {{scope.row.stock_count}}
387
                                                    {{scope.row.stock_count}}
388
                                               </span>
388
                                               </span>
389
                                               <span v-else> {{ scope.row.total }}</span>
389
                                               <span v-else> {{ scope.row.total }}</span>
2663
       selectDrugs(selection, row) {
2663
       selectDrugs(selection, row) {
2664
         console.log('selection', selection)
2664
         console.log('selection', selection)
2665
         console.log('row', row)
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
             if (row.count <= 0) {
2667
             if (row.count <= 0) {
2668
               if (selection) {
2668
               if (selection) {
2669
                 selection.forEach(row => {
2669
                 selection.forEach(row => {
2941
       },
2941
       },
2942
       selectChange(selection, row) {
2942
       selectChange(selection, row) {
2943
         console.log('row', row)
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
            if (row.stock_count <= 0) {
2945
            if (row.stock_count <= 0) {
2946
             if (row.type == 3) {
2946
             if (row.type == 3) {
2947
               if (selection) {
2947
               if (selection) {

+ 23 - 7
src/xt_pages/stock/detail/print.vue Datei anzeigen

51
               <td style="line-height: 50px">
51
               <td style="line-height: 50px">
52
                 <span v-if="type == 1"> {{ item.warehousing_count }}</span>
52
                 <span v-if="type == 1"> {{ item.warehousing_count }}</span>
53
                 <span v-if="type == 2"> 
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
                   <span v-else>{{getStockCount(item.good_id) }}</span>
56
                   <span v-else>{{getStockCount(item.good_id) }}</span>
56
                 </span>
57
                 </span>
57
                
58
                
63
               <td style="line-height:50px">
64
               <td style="line-height:50px">
64
                 <span v-if="type == 1"> {{ item.price }}</span>
65
                 <span v-if="type == 1"> {{ item.price }}</span>
65
                 <span v-if="type == 2"> 
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
                   <span v-else>
68
                   <span v-else>
68
                     {{ item.packing_price }} 
69
                     {{ item.packing_price }} 
69
                   </span>  
70
                   </span>  
73
               <td style="line-height:50px">
74
               <td style="line-height:50px">
74
                 <span v-if="type == 1">{{(item.warehousing_count * item.price).toFixed(2)}}</span>
75
                 <span v-if="type == 1">{{(item.warehousing_count * item.price).toFixed(2)}}</span>
75
                 <span v-if="type == 2">
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
                   </span>
79
                   </span>
80
+                  <span v-if="org_id == 10265">{{(getMySelfCount(item.good_id)*item.packing_price).toFixed(2)}}</span>
79
                   <span v-else>{{(getStockCount(item.good_id) * item.packing_price).toFixed(2)}}</span>
81
                   <span v-else>{{(getStockCount(item.good_id) * item.packing_price).toFixed(2)}}</span>
80
                 </span>
82
                 </span>
81
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
83
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
97
               <td style="line-height: 50px"  width="80">
99
               <td style="line-height: 50px"  width="80">
98
                 <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
100
                 <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
99
                 <span v-if="type == 2">
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
                   <span v-else> {{getWareOutTotal().toFixed(2)}}</span>
104
                   <span v-else> {{getWareOutTotal().toFixed(2)}}</span>
102
                  </span> 
105
                  </span> 
103
                 <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
106
                 <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
406
        return total
409
        return total
407
      },
410
      },
408
      getWareOutTotalOne(){
411
      getWareOutTotalOne(){
409
-       console.log("数据23332323",this.stockDatas)
410
        var total = 0
412
        var total = 0
411
        for(let i=0;i<this.stockDatas.length;i++){
413
        for(let i=0;i<this.stockDatas.length;i++){
412
          total+= this.getStockCount(this.stockDatas[i].good_id) * this.stockDatas[i].buy_price
414
          total+= this.getStockCount(this.stockDatas[i].good_id) * this.stockDatas[i].buy_price
413
        }
415
        }
414
        return total
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
     created() {
433
     created() {
418
       var xtuser = this.$store.getters.xt_user
434
       var xtuser = this.$store.getters.xt_user

+ 24 - 2
src/xt_pages/stock/detail/stockOutDetail.vue Datei anzeigen

754
         if(this.orgId == 9919){
754
         if(this.orgId == 9919){
755
           this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].buy_price).toFixed(2)
755
           this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].buy_price).toFixed(2)
756
           this.tableOut[i].packing_price = this.tableOut[i].buy_price
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
         }else{
759
         }else{
758
           this.tableOut[i].total_price = (this.getStockCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
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
        import('@/vendor/Export2Excel').then(excel => {
770
        import('@/vendor/Export2Excel').then(excel => {
763
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
771
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
845
       getGoodDetailPrintList(params).then(response=>{
853
       getGoodDetailPrintList(params).then(response=>{
846
         if(response.data.state == 1){
854
         if(response.data.state == 1){
847
           var list = response.data.data.list
855
           var list = response.data.data.list
848
-        
856
+          console.log("lisrt23323223233232232323232323",list)
849
           this.tableOut = list
857
           this.tableOut = list
850
           var stockTotal = response.data.data.stockTotal
858
           var stockTotal = response.data.data.stockTotal
851
           console.log("list88888888888888888888",stockTotal)
859
           console.log("list88888888888888888888",stockTotal)
863
         }
871
         }
864
         return count
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
 </script>
890
 </script>

+ 8 - 5
src/xt_pages/supply/components/addGoodReturn.vue Datei anzeigen

717
       this.recordInfo.tableList.push(tempObj);
717
       this.recordInfo.tableList.push(tempObj);
718
     },
718
     },
719
     handleDelete: function (index, row) {
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
       if (row.id > 0) {
729
       if (row.id > 0) {
727
         const params = {
730
         const params = {
728
             id: row.id
731
             id: row.id