Ver código fonte

518合并代码

XMLWAN 2 anos atrás
pai
commit
5fcf45f231

+ 8 - 0
src/api/his/advice.js Ver arquivo

7
     params: params
7
     params: params
8
   })
8
   })
9
 }
9
 }
10
+
11
+export function getPharmacyBaseDrug(params) {
12
+  return request({
13
+    url: '/api/advice/getpharmacybasedrug',
14
+    method: 'Get',
15
+    params: params
16
+  })
17
+}

+ 3 - 12
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Ver arquivo

1413
               this.currentRow = null
1413
               this.currentRow = null
1414
               this.setCurrent()
1414
               this.setCurrent()
1415
               this.hideForm()
1415
               this.hideForm()
1416
-              console.log("子药23223332323332",this.form.parent_id)
1417
-              console.log("232322332323232",this.form.parent_id)
1416
+            
1418
 
1417
 
1419
               if (this.form.parent_id > 0) {
1418
               if (this.form.parent_id > 0) {
1420
                 var spliceIndex = -1
1419
                 var spliceIndex = -1
1427
                     break
1426
                     break
1428
                   }
1427
                   }
1429
                 }
1428
                 }
1430
-                console.log("spliceIndex233232323232",spliceIndex)
1429
+               
1431
                 if (spliceIndex > -1) {
1430
                 if (spliceIndex > -1) {
1432
                   spliceIndex += 1
1431
                   spliceIndex += 1
1433
                   if (spliceIndex === this.doctor_advices.length) {
1432
                   if (spliceIndex === this.doctor_advices.length) {
1440
                     }
1439
                     }
1441
                   }
1440
                   }
1442
 
1441
 
1443
-                  console.log("doctore_advic4233232323232",this.doctor_advices)
1442
+                 
1444
                 }
1443
                 }
1445
               } else {
1444
               } else {
1446
                 this.doctor_advices.unshift(response.data.data.advice)
1445
                 this.doctor_advices.unshift(response.data.data.advice)
2366
                  this.doctor_advices.push(his_advices[i])
2365
                  this.doctor_advices.push(his_advices[i])
2367
               }
2366
               }
2368
             }
2367
             }
2369
-
2370
-            this.$notify({
2371
-              title: '成功',
2372
-              message: '新增医嘱成功',
2373
-              type: 'success',
2374
-              duration: 2000
2375
-            })
2376
-
2377
             this.currentIndex = -1
2368
             this.currentIndex = -1
2378
             this.currentRow = null
2369
             this.currentRow = null
2379
             this.setCurrent()
2370
             this.setCurrent()

+ 2 - 2
src/xt_pages/stock/stockOutOrderAdd.vue Ver arquivo

766
       this.currentIndex = val
766
       this.currentIndex = val
767
     },
767
     },
768
     handleSelect(val){
768
     handleSelect(val){
769
-       
769
+       console.log("val232332322323323232323",val)
770
         var arr = []
770
         var arr = []
771
        
771
        
772
-       
773
         for(let i=0;i<this.recordInfo.recordData.length;i++){
772
         for(let i=0;i<this.recordInfo.recordData.length;i++){
774
            arr.push(this.recordInfo.recordData[i].good_id)
773
            arr.push(this.recordInfo.recordData[i].good_id)
775
         }
774
         }
798
             this.recordInfo.recordData[i].remark = val.remark
797
             this.recordInfo.recordData[i].remark = val.remark
799
             this.recordInfo.recordData[i].buy_price = val.buy_price
798
             this.recordInfo.recordData[i].buy_price = val.buy_price
800
             this.recordInfo.recordData[i].stock_count = total_count
799
             this.recordInfo.recordData[i].stock_count = total_count
800
+            this.recordInfo.recordData[i].license_number = val.number
801
             if(val.packing_price == 0){
801
             if(val.packing_price == 0){
802
               this.recordInfo.recordData[i].price =""
802
               this.recordInfo.recordData[i].price =""
803
             }else{
803
             }else{

+ 1 - 1
src/xt_pages/stock/stockOutOrderEdit.vue Ver arquivo

782
             this.recordInfo.recordData[i].name = val.specification_name  +"/"+val.packing_unit
782
             this.recordInfo.recordData[i].name = val.specification_name  +"/"+val.packing_unit
783
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
783
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
784
             this.recordInfo.recordData[i].remark = val.remark
784
             this.recordInfo.recordData[i].remark = val.remark
785
-            this.recordInfo.recordData[i].license_number = ""
785
+            this.recordInfo.recordData[i].license_number = val.number
786
             this.recordInfo.recordData[i].warehouse_info_id = 0
786
             this.recordInfo.recordData[i].warehouse_info_id = 0
787
             this.recordInfo.recordData[i].buy_price = val.buy_price
787
             this.recordInfo.recordData[i].buy_price = val.buy_price
788
             this.recordInfo.recordData[i].stock_count = total_count
788
             this.recordInfo.recordData[i].stock_count = total_count

+ 102 - 12
src/xt_pages/stock/test.vue Ver arquivo

30
             @change="startTimeChange"
30
             @change="startTimeChange"
31
           ></el-date-picker>
31
           ></el-date-picker>
32
 
32
 
33
-        <el-input @keyup.enter.native='searchAction' v-model="keywords"
33
+        <!-- <el-input @keyup.enter.native='searchAction' v-model="keywords"
34
                   class="filter-item"/>
34
                   class="filter-item"/>
35
         <el-button  class="filter-item" type="primary" icon="el-icon-search"
35
         <el-button  class="filter-item" type="primary" icon="el-icon-search"
36
-                   @click="searchAction">搜索</el-button>
36
+                   @click="searchAction">搜索</el-button> -->
37
           </div>
37
           </div>
38
 
38
 
39
           <el-table
39
           <el-table
52
             ref="singleTable"
52
             ref="singleTable"
53
             @current-change="handleCurrentChange"
53
             @current-change="handleCurrentChange"
54
           >
54
           >
55
-            <el-table-column align="center" prop="name" label="姓名" wdith="89">
56
-              <template slot-scope="scope"></template>
55
+            <el-table-column align="center" prop="name" label="名称" wdith="89">
56
+              <template slot-scope="scope">
57
+                {{scope.row.drug_name}}
58
+              </template>
59
+            </el-table-column>
60
+            <el-table-column align="center" prop="name" label="规格" wdith="89">
61
+              <template slot-scope="scope">
62
+                {{scope.row.dose}}{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
63
+              </template>
64
+            </el-table-column>
65
+            <el-table-column align="center" prop="name" label="库存" wdith="89">
66
+              <template slot-scope="scope">
67
+                {{getWarehoseInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}
68
+              </template>
57
             </el-table-column>
69
             </el-table-column>
58
           </el-table>
70
           </el-table>
59
         </div>
71
         </div>
60
       </div>
72
       </div>
61
       <div class="mainRight">
73
       <div class="mainRight">
62
         <el-tabs v-model="titleType">
74
         <el-tabs v-model="titleType">
63
-          <el-tab-pane label="明细" name="明细"></el-tab-pane>
64
-          <el-tab-pane label="汇总" name="汇总"></el-tab-pane>
75
+          <el-tab-pane label="明细" name="明细">
76
+           
77
+           <el-table
78
+            :data="tableData"
79
+            border
80
+            style="width: 100%">
81
+            <el-table-column prop="date" label="序号" width="180">
82
+              <template slot-scope="scope">
83
+
84
+              </template>
85
+            </el-table-column>
86
+            <el-table-column  prop="name" label="单据编码" width="180">
87
+            </el-table-column>
88
+            <el-table-column prop="address" label="患者姓名">
89
+            </el-table-column>
90
+            <el-table-column prop="address" label="单次用量">
91
+            </el-table-column>
92
+             <el-table-column prop="address" label="用法">
93
+            </el-table-column>
94
+             <el-table-column prop="address" label="频率">
95
+            </el-table-column>
96
+             <el-table-column prop="address" label="天数">
97
+            </el-table-column>
98
+            <el-table-column prop="address" label="总量">
99
+            </el-table-column>
100
+          </el-table>
101
+
102
+          </el-tab-pane>
103
+         
65
         </el-tabs>
104
         </el-tabs>
66
       </div>
105
       </div>
67
     </div>
106
     </div>
69
 </template>
108
 </template>
70
 
109
 
71
 <script>
110
 <script>
72
-import { getTodayAdviceList } from "@/api/his/advice";
111
+import { getTodayAdviceList,getPharmacyBaseDrug } from "@/api/his/advice";
73
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
112
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
74
-
113
+const moment = require('moment')
75
 export default {
114
 export default {
76
   components: {
115
   components: {
77
     BreadCrumb,
116
     BreadCrumb,
88
       titleType: "明细",
127
       titleType: "明细",
89
       patient_id: 0,
128
       patient_id: 0,
90
       keywords: "",
129
       keywords: "",
91
-      start_time:new Date(),
130
+      start_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
131
+      tableData:[],
92
     };
132
     };
93
   },
133
   },
94
 
134
 
131
       this.getPatientList();
171
       this.getPatientList();
132
     },
172
     },
133
     handleCurrentChange(row) {
173
     handleCurrentChange(row) {
134
-      this.patient_id = row.id;
135
-     
174
+    
175
+      this.getPharmacyBaseDrug(row.id)
136
     },
176
     },
137
     getlist(){
177
     getlist(){
138
       var params = {
178
       var params = {
140
         keywords:this.keywords,
180
         keywords:this.keywords,
141
       }  
181
       }  
142
       getTodayAdviceList(params).then(response=>{
182
       getTodayAdviceList(params).then(response=>{
143
-
183
+         if(response.data.state == 1){
184
+           var list =  response.data.data.list
185
+           this.$refs.singleTable.setCurrentRow(list[0])
186
+           this.patientTableData = list
187
+         }
144
       }) 
188
       }) 
189
+    }, 
190
+     getWarehoseInfo(arr, max_unit, min_unit, min_number) {
191
+      var total = 0;
192
+      var max_str = "";
193
+      var min_str = "";
194
+      if (arr.length > 0) {
195
+        for (let i = 0; i < arr.length; i++) {
196
+          total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
197
+        }
198
+      }
199
+      if (total < min_number) {
200
+        min_str = total + min_unit;
201
+      }
202
+      if (total == 0) {
203
+        min_str = "";
204
+        max_str = "";
205
+      }
206
+      if (total >= min_number) {
207
+        if (parseInt(total / min_number) != 0) {
208
+          max_str = parseInt(total / min_number) + max_unit;
209
+        }
210
+        if (total % min_number != 0) {
211
+          min_str = (total % min_number) + min_unit;
212
+        }
213
+      }
214
+      return max_str + min_str;
215
+    },
216
+    startTimeChange(){
217
+
218
+    },
219
+    getPharmacyBaseDrug(drug_id){
220
+      var params = {
221
+        start_time:this.start_time,
222
+        drug_id:drug_id,
223
+      }
224
+      console.log("param23232323322332",params)
225
+      getPharmacyBaseDrug(params).then(response=>{
226
+        if(response.data.state == 1){
227
+           var advicelist = response.data.data.advicelist
228
+           console.log("advicelist23323232323323",advicelist)
229
+           var hisAdviceList = response.data.data.hisAdviceList
230
+           console.log("hisadvicelist23233232233",hisAdviceList)
231
+           var patient = response.data.data.patient
232
+           console.log("patient23322323232332",patient)
233
+        }
234
+      })
145
     }
235
     }
146
   },
236
   },
147
   created() {
237
   created() {