Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
0d3dc43e3f

+ 7 - 7
src/api/dialysis_record.js View File

36
     schedule_date: schedule_date,
36
     schedule_date: schedule_date,
37
     mode: mode
37
     mode: mode
38
   }
38
   }
39
-  console.log('data=====', data)
39
+
40
   return request({
40
   return request({
41
     url: '/api/dislysis/monitor/edit',
41
     url: '/api/dislysis/monitor/edit',
42
     method: 'post',
42
     method: 'post',
47
   })
47
   })
48
 }
48
 }
49
 
49
 
50
-export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_drawing, puncture_nurse_id, start_time, schedual_type, mode,washpipe_nurse,change_nurse,difficult_puncture_nurse,new_fistula_nurse) {
50
+export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_drawing, puncture_nurse_id, start_time, schedual_type, mode, washpipe_nurse, change_nurse, difficult_puncture_nurse, new_fistula_nurse) {
51
   var params = {
51
   var params = {
52
     patient_id: patient_id,
52
     patient_id: patient_id,
53
     date: schedule_date,
53
     date: schedule_date,
58
     lood_drawing: lood_drawing,
58
     lood_drawing: lood_drawing,
59
     schedual_type: schedual_type,
59
     schedual_type: schedual_type,
60
     mode: mode,
60
     mode: mode,
61
-    washpipe_nurse:washpipe_nurse,
62
-    change_nurse:change_nurse,
63
-    difficult_puncture_nurse:difficult_puncture_nurse,
64
-    new_fistula_nurse:new_fistula_nurse
61
+    washpipe_nurse: washpipe_nurse,
62
+    change_nurse: change_nurse,
63
+    difficult_puncture_nurse: difficult_puncture_nurse,
64
+    new_fistula_nurse: new_fistula_nurse
65
   }
65
   }
66
-  console.log("params",params)
66
+  console.log('params', params)
67
   return request({
67
   return request({
68
     url: '/api/dialysis/start_record',
68
     url: '/api/dialysis/start_record',
69
     method: 'post',
69
     method: 'post',

+ 4 - 4
src/xt_pages/hospitalStation/components/deskPrescription.vue View File

287
                     </el-table-column>
287
                     </el-table-column>
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 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">
290
+                         <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 ">
291
                              <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">{{Math.floor(scope.row.count/scope.row.min_number)}}{{scope.row.max_unit}}</span>
292
                              <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 v-if="scope.row.count%scope.row.min_number>0"> {{scope.row.count%scope.row.min_number}}{{scope.row.min_unit}}</span>
293
                           </span>
293
                           </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">
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 == 10088">
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>
2655
         this.$refs.additionalCharges.show()
2655
         this.$refs.additionalCharges.show()
2656
       },
2656
       },
2657
       selectDrugs(selection, row) {
2657
       selectDrugs(selection, row) {
2658
-      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){
2658
+      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 ){
2659
             if (row.count <= 0) {
2659
             if (row.count <= 0) {
2660
               if (selection) {
2660
               if (selection) {
2661
                 selection.forEach(row => {
2661
                 selection.forEach(row => {
2929
       },
2929
       },
2930
       selectChange(selection, row) {
2930
       selectChange(selection, row) {
2931
         console.log('row', row)
2931
         console.log('row', row)
2932
-          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 ){
2932
+          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){
2933
            if (row.stock_count <= 0) {
2933
            if (row.stock_count <= 0) {
2934
             if (row.type == 3) {
2934
             if (row.type == 3) {
2935
               if (selection) {
2935
               if (selection) {

+ 4 - 4
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

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">
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 == 10088">
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">
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 == 10088">
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>
2657
       selectDrugs(selection, row) {
2657
       selectDrugs(selection, row) {
2658
         console.log('selection', selection)
2658
         console.log('selection', selection)
2659
         console.log('row', row)
2659
         console.log('row', row)
2660
-        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){
2660
+        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){
2661
             if (row.count <= 0) {
2661
             if (row.count <= 0) {
2662
               if (selection) {
2662
               if (selection) {
2663
                 selection.forEach(row => {
2663
                 selection.forEach(row => {
2932
       },
2932
       },
2933
       selectChange(selection, row) {
2933
       selectChange(selection, row) {
2934
         console.log('row', row)
2934
         console.log('row', row)
2935
-        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 ){
2935
+        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){
2936
            if (row.stock_count <= 0) {
2936
            if (row.stock_count <= 0) {
2937
             if (row.type == 3) {
2937
             if (row.type == 3) {
2938
               if (selection) {
2938
               if (selection) {

+ 10 - 7
src/xt_pages/stock/drugs/inventoryPrint.vue View File

100
          }
100
          }
101
       },
101
       },
102
       getManufacturerName(id){
102
       getManufacturerName(id){
103
-        var name = ""
104
-        for(let i=0;i<this.manufacturerList.length;i++){
105
-          if(id == this.manufacturerList[i].id){
106
-             name = this.manufacturerList[i].manufacturer_name
107
-          }
108
-          return name
103
+       
104
+           var name = ""
105
+           for(let i=0;i<this.manufacturerList.length;i++){
106
+              if(id == this.manufacturerList[i].id){
107
+                  name = this.manufacturerList[i].manufacturer_name
108
+              }
109
+           }
110
+           return name
109
         }
111
         }
110
-      }
112
+      
113
+      
111
      },
114
      },
112
     created(){
115
     created(){
113
       this.getlist()
116
       this.getlist()

+ 1 - 0
src/xt_pages/stock/inventoryPrint.vue View File

96
          })
96
          })
97
         },
97
         },
98
         getManufacturerName(id){
98
         getManufacturerName(id){
99
+       
99
            var name = ""
100
            var name = ""
100
            for(let i=0;i<this.manufacturerList.length;i++){
101
            for(let i=0;i<this.manufacturerList.length;i++){
101
               if(id == this.manufacturerList[i].id){
102
               if(id == this.manufacturerList[i].id){

+ 15 - 10
src/xt_pages/stock/stockQuery.vue View File

108
        </el-table-column>
108
        </el-table-column>
109
        <el-table-column label="出库数量" align="center" v-if="showOne">
109
        <el-table-column label="出库数量" align="center" v-if="showOne">
110
          <template slot-scope="scope">
110
          <template slot-scope="scope">
111
-          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id== 10245 || org_id == 9779">
111
+          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id== 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id ==  10088">
112
             <span>
112
             <span>
113
               {{getWareInfo(scope.row.xt_warehouse_info) - getOverFlushInfo(scope.row.xt_warehouse_info) + getCancelSotckInfo(scope.row.cancel_stock_info) }}
113
               {{getWareInfo(scope.row.xt_warehouse_info) - getOverFlushInfo(scope.row.xt_warehouse_info) + getCancelSotckInfo(scope.row.cancel_stock_info) }}
114
             </span>
114
             </span>
125
 
125
 
126
        <el-table-column label="剩余库存量" align="center" v-if="showThree">
126
        <el-table-column label="剩余库存量" align="center" v-if="showThree">
127
          <template slot-scope="scope">
127
          <template slot-scope="scope">
128
-          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9779">{{getOverFlushInfo(scope.row.xt_warehouse_info)}}</span>
128
+          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id == 10088">{{getOverFlushInfo(scope.row.xt_warehouse_info)}}</span>
129
           <span v-else>{{getWareInfo(scope.row.xt_warehouse_info) - getAutoCount(scope.row.id) - getOutCount(scope.row.id) + getCancelCount(scope.row.id) }}</span>
129
           <span v-else>{{getWareInfo(scope.row.xt_warehouse_info) - getAutoCount(scope.row.id) - getOutCount(scope.row.id) + getCancelCount(scope.row.id) }}</span>
130
          </template>
130
          </template>
131
        </el-table-column>
131
        </el-table-column>
358
            this.tableList[i].prodect_name = this.getManufacture(this.tableList[i].manufacturer)
358
            this.tableList[i].prodect_name = this.getManufacture(this.tableList[i].manufacturer)
359
            this.tableList[i].inCount =  this.getWareInfo(this.tableList[i].xt_warehouse_info)
359
            this.tableList[i].inCount =  this.getWareInfo(this.tableList[i].xt_warehouse_info)
360
 
360
 
361
-        
362
-          if(this.org_id == 9671 || this.org_id == 10138 || this.org_id == 10028 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9779){
363
-             this.tableList[i].outCount  = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getOverFlushInfo(this.tableList[i].xt_warehouse_info) + this.getCancelSotckInfo(this.tableList[i].cancel_stock_info) 
361
+          if(this.end_time == ""){
362
+            if(this.org_id == 9671 || this.org_id == 10138 || this.org_id == 10028 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9779 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id ==  10088 ){
363
+              this.tableList[i].outCount  = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getOverFlushInfo(this.tableList[i].xt_warehouse_info) + this.getCancelSotckInfo(this.tableList[i].cancel_stock_info) 
364
+            }else{
365
+              this.tableList[i].outCount =  this.getAutoCount(this.tableList[i].id) + this.getOutCount(this.tableList[i].id)
366
+            }
367
+            
368
+            if(this.org_id == 9671 || this.org_id == 10138 || this.org_id == 10028 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9779 || this.org_id == 10106 || this.org_id == 9504 || this.org_id == 10215 || this.org_id ==  10088 ){
369
+                this.tableList[i].overplus = this.getOverFlushInfo(this.tableList[i].xt_warehouse_info)
370
+            }else{
371
+              this.tableList[i].overplus = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getAutoCount(this.tableList[i].id) - this.getOutCount(this.tableList[i].id) + this.getCancelCount(this.tableList[i].id)
372
+            }
364
           }else{
373
           }else{
365
             this.tableList[i].outCount =  this.getAutoCount(this.tableList[i].id) + this.getOutCount(this.tableList[i].id)
374
             this.tableList[i].outCount =  this.getAutoCount(this.tableList[i].id) + this.getOutCount(this.tableList[i].id)
375
+            this.tableList[i].overplus = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getAutoCount(this.tableList[i].id) - this.getOutCount(this.tableList[i].id) + this.getCancelCount(this.tableList[i].id)
366
           }
376
           }
367
           
377
           
368
-           if(this.org_id == 9671 || this.org_id == 10138 || this.org_id == 10028 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9779){
369
-              this.tableList[i].overplus = this.getOverFlushInfo(this.tableList[i].xt_warehouse_info)
370
-           }else{
371
-             this.tableList[i].overplus = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getAutoCount(this.tableList[i].id) - this.getOutCount(this.tableList[i].id) + this.getCancelCount(this.tableList[i].id)
372
-           }
373
 
378
 
374
          }
379
          }
375
          const data = this.formatJson(filterVal, this.tableList)
380
          const data = this.formatJson(filterVal, this.tableList)