Browse Source

hah阿凡达

28169 1 week ago
parent
commit
2f3b7ed464

+ 10 - 0
src/api/drug/drug.js View File

@@ -954,4 +954,14 @@ export function getPatientAdviceListDetail(params){
954 954
     method:"Get",
955 955
     params:params
956 956
   })
957
+}
958
+
959
+
960
+export function getSelfDrugWarhouseInfo(params){
961
+
962
+  return request({
963
+    url:"/api/drug/getselfdrugwarehouseinfo",
964
+    method:"get",
965
+    params:params,
966
+  })
957 967
 }

+ 22 - 11
src/xt_pages/dialysis/details/dialog/acceptsTreatmentDialog.vue View File

@@ -478,6 +478,27 @@ export default {
478 478
         accepts.consciousness = 1
479 479
         accepts.appetite =1
480 480
 
481
+        if(this.$store.getters.xt_user.template_info.org_id== 10293 || this.$store.getters.xt_user.template_info.org_id == 0){
482
+          accepts.way =1 
483
+          accepts.posture = 1
484
+          accepts.consciousness =1
485
+          accepts.appetite =1
486
+          accepts.danger_level=1
487
+          console.log("this.precaution_arr",this.precaution_arr)
488
+          this.receiveTreatmentAsses.way =1
489
+          this.receiveTreatmentAsses.consciousness =2
490
+          this.receiveTreatmentAsses.appetite =2
491
+          this.receiveTreatmentAsses.posture= 1
492
+          this.receiveTreatmentAsses.danger_level=2
493
+          this.receiveTreatmentAsses.precaution = 3
494
+          var arr = [3,4]
495
+          this.precautionTwo.push(...arr)
496
+          this.receiveTreatmentAsses.precaution = this.precautionTwo   
497
+          accepts.precaution= ""
498
+          accepts.precaution = "3,4"
499
+          
500
+       }
501
+
481 502
       }
482 503
       this.accepts = accepts;
483 504
      console.log("accepts", accepts);
@@ -792,17 +813,7 @@ export default {
792 813
     this.intake_arr = getDataConfig("hemodialysis", "intake");
793 814
     this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
794 815
 
795
-    if(this.$store.getters.user.template_info.org_id == 10293){
796
-        this.receiveTreatmentAsses.way =1
797
-        this.receiveTreatmentAsses.consciousness =2
798
-        this.receiveTreatmentAsses.appetite =2
799
-        this.receiveTreatmentAsses.posture= 1
800
-        this.receiveTreatmentAsses.danger_level=2
801
-        this.receiveTreatmentAsses.precaution = 3
802
-        var arr = [3,4]
803
-        this.precautionTwo.push(...arr)
804
-        this.receiveTreatmentAsses.precaution = this.precautionTwo      
805
-  }
816
+   
806 817
   },
807 818
  
808 819
 };

+ 106 - 7
src/xt_pages/dialysis/patientAdviceList.vue View File

@@ -71,28 +71,52 @@
71 71
                         </div>
72 72
                     </div> -->
73 73
                     <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
74
-                        <el-table-column align="center" prop="dialysis_no" label="药品名称">
74
+                       
75
+                      <el-table-column align="center" prop="dialysis_no" label="药品编号">
76
+                            <template slot-scope="scope">
77
+                                {{ scope.row.drug_id }}
78
+                            </template>
79
+                        </el-table-column>
80
+                       <el-table-column align="center" prop="dialysis_no" label="药品名称">
75 81
                             <template slot-scope="scope">
76
-                                {{ scope.row.advice_name }}
82
+                               <span v-if="scope.row.drug_id >0">
83
+                                 {{ scope.row.advice_name }}
84
+                               </span>
85
+                               <span v-if="scope.row.drug_id ==0" style="color: red;">
86
+                                 {{ scope.row.advice_name }}
87
+                               </span>
77 88
                             </template>
78 89
                         </el-table-column>
79 90
                         <el-table-column align="center" prop="name" label="规格名称">
80 91
                             <template slot-scope="scope">{{ scope.row.specification_name }}</template>
81 92
                         </el-table-column>
93
+
94
+                        <el-table-column align="center" prop="name" label="自备药入库数量">
95
+                            <template slot-scope="scope">
96
+                              {{ getCountInfo(scope.row.drug_id) }}
97
+                            </template>
98
+                        </el-table-column>
82 99
                        
83 100
                         <el-table-column align="center" prop="name" label="开药数量">
84 101
                             <template slot-scope="scope">
85 102
                               {{getTotal(scope.row.child)}}
86 103
                             </template>
87 104
                         </el-table-column>
105
+
106
+                        <el-table-column align="center" prop="name" label="剩余数量">
107
+                            <template slot-scope="scope">
108
+                               {{ getCountInfo(scope.row.drug_id) - getTotal(scope.row.child)}}
109
+                            </template>
110
+                        </el-table-column>
88 111
                         <el-table-column align="center" prop="dialysis_no" label="单位">
89 112
                             <template slot-scope="scope">{{scope.row.prescribing_number_unit}}</template>
90 113
                         </el-table-column>
91 114
                        
92 115
                        
93
-                        <el-table-column align="center" prop="name" label="操作">
116
+                        <el-table-column align="center" prop="name" label="操作" width="300">
94 117
                             <template slot-scope="scope">
95
-                                <el-button size="mini" type="primary" @click="toDetail(scope.row.advice_name,scope.row.patient_id)">明细</el-button>
118
+                                <el-button size="mini" type="primary" @click="getSelfDrugWarhouseInfo(scope.row.drug_id,scope.row.patient_id)">入库明细</el-button>
119
+                                <el-button size="mini" type="primary" @click="toDetail(scope.row.advice_name,scope.row.patient_id)">使用明细</el-button>
96 120
                             </template>
97 121
                         </el-table-column>
98 122
                     </el-table>
@@ -132,6 +156,36 @@
132 156
             <el-button type="primary" @click="adviceDialogVisible = false">确 定</el-button>
133 157
         </span>
134 158
      </el-dialog>
159
+
160
+
161
+     <el-dialog
162
+         title="入库详情"
163
+        :visible.sync="drugInfoDialogVisible"
164
+        width="50%">
165
+        <span>
166
+         <el-table :data="drugWarehouseInfo" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
167
+                
168
+                <el-table-column align="center" prop="name" label="入库时间">
169
+                    <template slot-scope="scope">{{getTime(scope.row.ctime)}}</template>
170
+                </el-table-column>
171
+                
172
+                <el-table-column align="center" prop="name" label="入库数量">
173
+                    <template slot-scope="scope">
174
+                        {{scope.row.warehousing_count}}
175
+                    </template>
176
+                </el-table-column>
177
+                <el-table-column align="center" prop="dialysis_no" label="单位">
178
+                    <template slot-scope="scope">{{scope.row.max_unit}}</template>
179
+                </el-table-column>
180
+                
181
+                
182
+            </el-table> 
183
+        </span>
184
+        <span slot="footer" class="dialog-footer">
185
+            <el-button @click="drugInfoDialogVisible = false">取 消</el-button>
186
+            <el-button type="primary" @click="drugInfoDialogVisible = false">确 定</el-button>
187
+        </span>
188
+     </el-dialog>
135 189
     </div>
136 190
 </template>
137 191
 
@@ -141,7 +195,7 @@
141 195
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
142 196
 const moment = require('moment')
143 197
 import { PostSearch } from '@/api/patient'
144
-import { getCurrentPatient,saveRadio,getPatientAdviceList,DeleteDrugNameById,getDrugSet,getPatientDetail,getPatientAdviceListDetail} from "@/api/drug/drug"
198
+import { getCurrentPatient,saveRadio,getPatientAdviceList,DeleteDrugNameById,getDrugSet,getPatientDetail,getPatientAdviceListDetail,getSelfDrugWarhouseInfo} from "@/api/drug/drug"
145 199
 import { TimeSelect } from "element-ui";
146 200
 import { uParseTime } from '@/utils/tools'
147 201
 export default {
@@ -172,7 +226,10 @@ export default {
172 226
             outStocklist:[],
173 227
             outList:[],
174 228
             tableList:[],
175
-            adviceDialogVisible:false
229
+            adviceDialogVisible:false,
230
+            drugInfo:[],
231
+            drugWarehouseInfo:[],
232
+            drugInfoDialogVisible:false
176 233
         }
177 234
     },
178 235
     methods:{
@@ -294,6 +351,12 @@ export default {
294 351
                    }
295 352
                    this.tableData = []
296 353
                    this.tableData = arr
354
+
355
+                  var drugInfo  = response.data.data.drugInfo
356
+
357
+                  this.drugInfo = drugInfo
358
+
359
+                  console.log("drugInfo============",drugInfo)
297 360
                 }
298 361
               
299 362
               }
@@ -406,7 +469,43 @@ export default {
406 469
         }else {
407 470
             return uParseTime(val, '{y}-{m}-{d}')
408 471
         }
409
-     },
472
+       },
473
+       getCountInfo(drug_id){
474
+        var count = 0
475
+        var arr = []
476
+        for(let i=0;i<this.drugInfo.length;i++){
477
+          if(drug_id == this.drugInfo[i].drug_id){
478
+              arr.push(this.drugInfo[i])
479
+          }
480
+        }
481
+        if(arr!=null && arr.length>0){
482
+          for(let i =0;i<arr.length;i++){
483
+             count+=arr[i].warehousing_count
484
+          }
485
+        }
486
+        if (count > 0) {
487
+           return count
488
+        }else{
489
+          return ""
490
+        }
491
+       },
492
+       getSelfDrugWarhouseInfo(drug_id,patient_id){
493
+          var params = {
494
+            drug_id:drug_id,
495
+            patient_id:patient_id
496
+          }
497
+         getSelfDrugWarhouseInfo(params).then(response=>{
498
+          
499
+            if(response.data.state ==1){
500
+             
501
+              var drugWarehouseInfo = response.data.data.drugInfo
502
+
503
+              this.drugWarehouseInfo = drugWarehouseInfo
504
+              this.drugInfoDialogVisible = true
505
+             
506
+            }
507
+         })
508
+       }
410 509
 
411 510
     },
412 511
     created(){

+ 1 - 1
src/xt_pages/stock/query/purchaseNewStockQuery.vue View File

@@ -1164,7 +1164,7 @@ export default {
1164 1164
    },
1165 1165
    exportList: function() {
1166 1166
 
1167
-       if(this.org_id!=0&& this.org_id!=9956 && this.org_id!=10697){
1167
+       if(this.org_id!=0&& this.org_id!=9956 && this.org_id!=10697 && this.org_id!=10375){
1168 1168
          
1169 1169
         for(let i=0;i<this.tableList.length;i++){
1170 1170
           this.tableList[i].index = i+1

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

@@ -12,6 +12,7 @@
12 12
             
13 13
               <el-tab-pane label="患者查询" name="second">
14 14
                   <patient-drug-query ref="mychildtwo"></patient-drug-query>
15
+
15 16
               </el-tab-pane>
16 17
           </el-tabs>
17 18
        </div>