Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
ee98e6a0d3

+ 7 - 7
src/xt_pages/hospitalStation/components/prescriptionTable.vue View File

475
       },
475
       },
476
       getPrescribingNumberUnit(scope) {
476
       getPrescribingNumberUnit(scope) {
477
 
477
 
478
-        // console.log('scope',scope)
478
+        console.log('scope9999999',scope)
479
         // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
479
         // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
480
         //   if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
480
         //   if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
481
         //     scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
481
         //     scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
494
         // }
494
         // }
495
         if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
495
         if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
496
           scope.row.retail_price = scope.row.drug.min_price
496
           scope.row.retail_price = scope.row.drug.min_price
497
-          if (scope.row.prescribing_number > scope.row.drug.total) {
498
-            this.$message.error(scope.row.drug_name + '库存不足')
499
-          }
497
+          // if (scope.row.prescribing_number > scope.row.drug.total) {
498
+          //   this.$message.error(scope.row.drug_name + '库存不足')
499
+          // }
500
         } else {
500
         } else {
501
-          if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
502
-            this.$message.error(scope.row.drug_name + '库存不足')
503
-          }
501
+          // if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
502
+          //   this.$message.error(scope.row.drug_name + '库存不足')
503
+          // }
504
           scope.row.retail_price = scope.row.drug.retail_price
504
           scope.row.retail_price = scope.row.drug.retail_price
505
         }
505
         }
506
       },
506
       },

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

+ 7 - 7
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue View File

463
       },
463
       },
464
       getPrescribingNumberUnit(scope) {
464
       getPrescribingNumberUnit(scope) {
465
 
465
 
466
-        // console.log('scope',scope)
466
+         console.log('scope',scope)
467
         // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
467
         // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
468
         //   if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
468
         //   if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
469
         //     scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
469
         //     scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
482
         // }
482
         // }
483
         if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
483
         if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
484
           scope.row.retail_price = scope.row.drug.min_price
484
           scope.row.retail_price = scope.row.drug.min_price
485
-          if (scope.row.prescribing_number > scope.row.drug.total) {
486
-            this.$message.error(scope.row.drug_name + '库存不足')
487
-          }
485
+          // if (scope.row.prescribing_number > scope.row.drug.total) {
486
+          //   this.$message.error(scope.row.drug_name + '库存不足')
487
+          // }
488
         } else {
488
         } else {
489
-          if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
490
-            this.$message.error(scope.row.drug_name + '库存不足')
491
-          }
489
+          // if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
490
+          //   this.$message.error(scope.row.drug_name + '库存不足')
491
+          // }
492
           scope.row.retail_price = scope.row.drug.retail_price
492
           scope.row.retail_price = scope.row.drug.retail_price
493
         }
493
         }
494
       },
494
       },

+ 2 - 0
src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue View File

29
               <td style="line-height:18px;" width="80">批号</td>
29
               <td style="line-height:18px;" width="80">批号</td>
30
               <td style="line-height:18px;" width="120">生产日期</td>
30
               <td style="line-height:18px;" width="120">生产日期</td>
31
               <td style="line-height:18px;" width="120">有效日期</td>
31
               <td style="line-height:18px;" width="120">有效日期</td>
32
+              <td style="line-height:18px;" width="120">入库日期</td>
32
               <td style="line-height:18px;" width="60">质检<br>意见</td>
33
               <td style="line-height:18px;" width="60">质检<br>意见</td>
33
               <td style="line-height:18px;" width="60">验收<br>结论</td>
34
               <td style="line-height:18px;" width="60">验收<br>结论</td>
34
             </tr>
35
             </tr>
57
               <td style="line-height:18px">{{ item.batch_number }}</td>
58
               <td style="line-height:18px">{{ item.batch_number }}</td>
58
               <td style="line-height:18px">{{ getTime(item.product_date,'{y}-{m}-{d}')}}</td>
59
               <td style="line-height:18px">{{ getTime(item.product_date,'{y}-{m}-{d}')}}</td>
59
               <td style="line-height:18px">{{ getTime(item.expiry_date,'{y}-{m}-{d}')}}</td>
60
               <td style="line-height:18px">{{ getTime(item.expiry_date,'{y}-{m}-{d}')}}</td>
61
+              <td style="line-height:18px">{{ getTime(it.ctime,'{y}-{m}-{d}')}}</td>
60
               <td style="line-height:18px">正常<br>入库</td>
62
               <td style="line-height:18px">正常<br>入库</td>
61
               <td style="line-height:18px">合格</td>
63
               <td style="line-height:18px">合格</td>
62
             </tr>
64
             </tr>

+ 2 - 2
src/xt_pages/stock/drugs/inventoryDetails.vue View File

139
               page:this.page,
139
               page:this.page,
140
               keyword:this.searchKey,
140
               keyword:this.searchKey,
141
             }
141
             }
142
-           console.log("parasm232332323",params)
142
+        
143
           getInventoryDetailList(params).then(response=>{
143
           getInventoryDetailList(params).then(response=>{
144
              if(response.data.state == 1){
144
              if(response.data.state == 1){
145
               this.total =  response.data.data.total
145
               this.total =  response.data.data.total
150
           })   
150
           })   
151
         },
151
         },
152
          getTime(val) {
152
          getTime(val) {
153
-          console.log("val3233232322323",val)
153
+         
154
          if(val == undefined){
154
          if(val == undefined){
155
            return  ""
155
            return  ""
156
          }
156
          }

+ 2 - 2
src/xt_pages/stock/inventoryDetails.vue View File

53
            
53
            
54
             <el-table-column prop="name" label="盘盈类型"  width="100" align="center">
54
             <el-table-column prop="name" label="盘盈类型"  width="100" align="center">
55
                 <template slot-scope="scope">
55
                 <template slot-scope="scope">
56
-                   <span v-if="scope.row.count > scope.row.last_stock_count">盘盈</span>
57
-                   <span v-if="scope.row.count < scope.row.last_stock_count">盘亏</span>
56
+                   <span v-if="scope.row.stock_count > scope.row.last_stock_count">盘亏</span>
57
+                   <span v-if="scope.row.stock_count < scope.row.last_stock_count">盘盈</span>
58
                 </template>
58
                 </template>
59
             </el-table-column>
59
             </el-table-column>
60
            
60
            

+ 2 - 0
src/xt_pages/stock/stockInOrderDetailPrint.vue View File

39
                                     <td style="line-height:18px;" width="80">批号</td>
39
                                     <td style="line-height:18px;" width="80">批号</td>
40
                                     <td style="line-height:18px;" width="120">生产日期</td>
40
                                     <td style="line-height:18px;" width="120">生产日期</td>
41
                                     <td style="line-height:18px;" width="120">有效日期</td>
41
                                     <td style="line-height:18px;" width="120">有效日期</td>
42
+                                    <td style="line-height:18px;" width="120">入库日期</td>
42
                                     <td style="line-height:18px;" width="60">质检<br>意见</td>
43
                                     <td style="line-height:18px;" width="60">质检<br>意见</td>
43
                                     <td style="line-height:18px;" width="60">验收<br>结论</td>
44
                                     <td style="line-height:18px;" width="60">验收<br>结论</td>
44
                                 </tr>
45
                                 </tr>
56
                                     <td style="line-height:18px;">{{ item.number }}</td>
57
                                     <td style="line-height:18px;">{{ item.number }}</td>
57
                                     <td style="line-height:18px;">{{ getTime(item.product_date) }}</td>
58
                                     <td style="line-height:18px;">{{ getTime(item.product_date) }}</td>
58
                                     <td style="line-height:18px;">{{ getTime(item.expiry_date) }}</td>
59
                                     <td style="line-height:18px;">{{ getTime(item.expiry_date) }}</td>
60
+                                    <td style="line-height:18px;">{{ getTime(item.ctime) }}</td>
59
                                     <td style="line-height:18px;">正常<br>入库</td>
61
                                     <td style="line-height:18px;">正常<br>入库</td>
60
                                     <td style="line-height:18px;">合格</td>
62
                                     <td style="line-height:18px;">合格</td>
61
                                 </tr>
63
                                 </tr>