Browse Source

新分支

28169 8 months ago
parent
commit
406de9d594

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

@@ -747,6 +747,15 @@ export function deleteSelfWarehouseInfo(id,params){
747 747
   })
748 748
 }
749 749
 
750
+export function deleteSelfWarehouse(id,params){
751
+ 
752
+  return request({
753
+    url:"/api/drug/deleteselfwarehouse?id="+id,
754
+    method:"Get",
755
+    params:params
756
+  })
757
+}
758
+
750 759
 export function toCheckSelfWarehousingInfo(params){
751 760
  
752 761
   return request({
@@ -880,4 +889,26 @@ export function getAllSelfDrugWarehouse(params){
880 889
     method:"get",
881 890
     params:params,
882 891
   })
892
+}
893
+
894
+export function getAllSelfDrugWarehouseOut(params){
895
+  
896
+  return request({
897
+    url:"/api/drug/getallselfdrugwarehouseout",
898
+    method:"Get",
899
+    params:params,
900
+  })
901
+}
902
+
903
+export function deleteSelfWarehouseOutList(id,params){
904
+
905
+  return request({
906
+    url:"/api/drug/deleteselfwarehouseoutlist?id="+id,
907
+    method:"Get",
908
+    params:params
909
+  })
910
+}
911
+
912
+export function getSelfDrugWarehouseOutDetailByPatientId(params){
913
+
883 914
 }

+ 1 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_sixtyTwo.vue View File

@@ -1654,7 +1654,7 @@ export default {
1654 1654
 
1655 1655
             var delghTwo = 0
1656 1656
             if (this.records[recordIndex].advices && this.records[recordIndex].advices.length < 14) {
1657
-              delghTwo = 14 - this.records[recordIndex].advices.length
1657
+              delghTwo =  this.records[recordIndex].advices.length
1658 1658
             } else {
1659 1659
               delghTwo = 0
1660 1660
             }

+ 5 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -11,10 +11,14 @@
11 11
         >
12 12
             <el-button style="position: absolute;left: 12%;top: 2%" @click="handlePatientInfo(patient.id)">{{ patient.name }}</el-button>
13 13
            
14
-            <span style="position: absolute;left: 20%;top: 3%">
14
+            <span style="position: absolute;left: 20%;top: 3%" v-if="this.$store.getters.xt_user.template_info.org_id!=0&&this.$store.getters.xt_user.template_info.org_id!=10702">
15 15
               透前称重:{{predialysis&&predialysis.weight_before?predialysis.weight_before:"" }} kg
16 16
             </span>
17 17
 
18
+            <span style="position: absolute;left: 20%;top: 3%" v-if="this.$store.getters.xt_user.template_info.org_id ==0||this.$store.getters.xt_user.template_info.org_id==10702">
19
+              透前体重:{{predialysis&&(predialysis.weight_before-predialysis.additional_weight).toFixed(2)?(predialysis.weight_before-predialysis.additional_weight).toFixed(2):"" }} kg
20
+            </span>
21
+
18 22
           
19 23
            
20 24
             <span style="position: absolute;left: 30%;top: 3%">

+ 2 - 2
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue View File

@@ -132,7 +132,7 @@
132 132
             v-if="isShow('脉搏1')"
133 133
           >
134 134
             <template slot-scope="scope">
135
-              {{ scope.row.pulse_frequency_one ? scope.row.pulse_frequency_one : "/" }}
135
+              {{ scope.row.monitor_pulse_frequency_one ? scope.row.monitor_pulse_frequency_one : "/" }}
136 136
             </template>
137 137
           </el-table-column>
138 138
 
@@ -1415,7 +1415,7 @@
1415 1415
           <el-col :span="8" v-if="isShow('脉搏1')">
1416 1416
             <el-form-item label="脉搏(次/分):" :prop="isName('脉搏')"
1417 1417
               :rules="isCheckmust('脉搏')">
1418
-              <el-input v-model="form.pulse_frequency_one"></el-input>
1418
+              <el-input v-model="form.monitor_pulse_frequency_one"></el-input>
1419 1419
             </el-form-item>
1420 1420
           </el-col>
1421 1421
           <el-col :span="8" v-if="isShow('呼吸频率')">

+ 4 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderseventyfive.vue View File

@@ -262,7 +262,10 @@
262 262
                 class="under_line"
263 263
                 style="width: 70px; text-align: center"
264 264
               >
265
-                {{ predialysis.weight_before != '' && predialysis.additional_weight !='' ? (predialysis.weight_before - predialysis.additional_weight).toFixed(1) : ""}}
265
+              <span v-if="predialysis!=null && predialysis.weight_before >0">
266
+                    {{ (predialysis.weight_before - predialysis.additional_weight).toFixed(1)}}
267
+              </span>
268
+                <!-- {{ predialysis.weight_before > 0? (predialysis.weight_before - predialysis.additional_weight).toFixed(1) : ""}} -->
266 269
               </div>
267 270
               kg
268 271
             </div>

+ 20 - 11
src/xt_pages/stock/selfPreparedMedicine/editWarehouseOut.vue View File

@@ -25,13 +25,12 @@
25 25
           >
26 26
 
27 27
           <el-button
28
-          size="small"
29
-          type="primary"
30
-          v-if="is_check == 1 && parseInt(this.$route.query.is_sys) == 0"
31
-          @click="toReturnCheck"
32
-          class="filter-item"
33
-          >反 审 核</el-button
34
-        >
28
+            size="small"
29
+            type="primary"
30
+           v-if="is_check == 1 && parseInt(this.$route.query.is_sys) == 0"
31
+            @click="toReturnCheck()"
32
+            class="filter-item"
33
+            >反审核</el-button>
35 34
        
36 35
         </div>
37 36
       </div>
@@ -481,7 +480,9 @@
481 480
         showReturnCheck:false,
482 481
         patientList:[],
483 482
         patient_id:"",
484
-        numberList:[]
483
+        numberList:[],
484
+        is_check:0,
485
+        is_sys:0,
485 486
       };
486 487
     },
487 488
     methods: {
@@ -1173,6 +1174,14 @@
1173 1174
         getSelfDrugWarehouseOutById(id).then(response=>{
1174 1175
           if(response.data.state ==1){
1175 1176
               var outInfo = response.data.data.outInfo
1177
+              if(outInfo.is_check == 2){
1178
+               this.showCheck = true
1179
+               this.showReturnCheck = false
1180
+             }
1181
+             if(outInfo.is_check == 1){
1182
+                this.showCheck = false
1183
+                this.showReturnCheck = true
1184
+             }
1176 1185
               this.manufacturerList = response.data.data.manufacturerList
1177 1186
               this.dealerList = response.data.data.dealerList
1178 1187
               this.drugTypeList = response.data.data.drugTypeList
@@ -1301,10 +1310,10 @@
1301 1310
     created() {
1302 1311
       var id =  this.$route.query.id
1303 1312
       var is_sys = this.$route.query.is_sys
1313
+      this.is_sys = is_sys
1304 1314
       var is_check = this.$route.query.is_check
1305
-      console.log("id",id)
1306
-      console.log("is_sys",is_sys)
1307
-      console.log("is_check",is_check)
1315
+      this.is_check = is_check
1316
+     
1308 1317
       this.drugTypeList = getDictionaryDataConfig("system", "drug_type");
1309 1318
       this.getallPatientList() 
1310 1319
       this.getSelfDrugWarehouseOutById(id)

+ 604 - 0
src/xt_pages/stock/selfPreparedMedicine/patientDrugQuery.vue View File

@@ -0,0 +1,604 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="app-container" style="padding-left:0px;margin:0px;"  v-loading="loading"
4
+        element-loading-text="拼命加载中">
5
+         <el-container>
6
+               <div style="width:27%">
7
+                <el-row style="white-space:nowrap;display:flex;line-height: 31px;">
8
+                   <span style="font-size:14px;color:#606266"> 时间:</span>
9
+                    <el-date-picker
10
+                      size="small"
11
+                      v-model="start_time"
12
+                      prefix-icon="el-icon-date"
13
+                      :editable="false"
14
+                      type="date"
15
+                      placeholder="选择日期时间"
16
+                      align="right"
17
+                      format="yyyy-MM-dd"
18
+                      value-format="yyyy-MM-dd"
19
+                      @change="startTimeChange"
20
+                      :clearable="false"
21
+                    ></el-date-picker> 
22
+                      <span>-</span> 
23
+                      <el-date-picker
24
+                        size="small"
25
+                        v-model="end_time"
26
+                        prefix-icon="el-icon-date"
27
+                        :editable="false"
28
+                        type="date"
29
+                        placeholder="选择日期时间"
30
+                        align="right"
31
+                        format="yyyy-MM-dd"
32
+                        value-format="yyyy-MM-dd"
33
+                        @change="endTimeChange"
34
+                    ></el-date-picker>
35
+                </el-row>
36
+                <el-row></el-row>
37
+                 <el-row>
38
+                   <el-col :span="24" style="display:flex">
39
+                      <el-input style="margin-top:10px;margin-bottom:10px" placeholder="请输入患者姓名" v-model="keyword"></el-input>&nbsp;
40
+                      <el-button style="height: 35px;margin-top: 10px;margin-bottom: 10px;" type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
41
+                   </el-col>
42
+                  </el-row>
43
+
44
+                  <el-row>
45
+                    
46
+                      <el-table
47
+                          ref="singleTable"
48
+                          :data="patientList"
49
+                          highlight-current-row
50
+                           border
51
+                          @current-change="handleCurrentChange"
52
+                           height="440"
53
+                           :row-style="{ color: '#303133' }"
54
+                          :header-cell-style="{
55
+                            backgroundColor: 'rgb(245, 247, 250)',
56
+                            color: '#606266'
57
+                          }"
58
+                        >
59
+                     <el-table-column
60
+                       prop="date"
61
+                       label="序号"
62
+                      align="center"
63
+                      >
64
+                      <template slot-scope="scope">
65
+                        {{scope.$index + 1}}
66
+                      </template>
67
+                    </el-table-column>
68
+                     <el-table-column
69
+                       prop="name"
70
+                      label="姓名"
71
+                      align="center">
72
+                      <template slot-scope="scope">
73
+                        {{scope.row.name}}
74
+                      </template>
75
+                     </el-table-column>
76
+
77
+                     </el-table>
78
+                  </el-row>
79
+               </div>
80
+
81
+                 <el-main>
82
+                  <div class="main newMain">
83
+                      
84
+                        
85
+                  <el-tabs>
86
+
87
+                   <el-tab-pane label="患者使用列表">
88
+                     <div style="float:right;margin-bottom:10px">
89
+                      <el-button type="primary" @click="toPrint">打印</el-button>
90
+                      <el-button type="primary" @click="exportList">导出</el-button>
91
+                      </div>
92
+                     <el-table
93
+                          :data="tableList"
94
+                          highlight-current-row
95
+                           border
96
+                           height="440"
97
+                           :row-style="{ color: '#303133' }"
98
+                          :header-cell-style="{
99
+                            backgroundColor: 'rgb(245, 247, 250)',
100
+                            color: '#606266'
101
+                          }"
102
+                        >
103
+                     <el-table-column
104
+                       prop="date"
105
+                       label="名称"
106
+                      align="center"
107
+                      >
108
+                      <template slot-scope="scope">
109
+                        {{scope.row.drug_name}}
110
+                      </template>
111
+                    </el-table-column>
112
+                     <el-table-column
113
+                       prop="name"
114
+                      label="生产厂家"
115
+                      align="center">
116
+                      <template slot-scope="scope">
117
+                        {{scope.row.manufacturer}}
118
+                      </template>
119
+                     </el-table-column>
120
+                      <el-table-column
121
+                       prop="name"
122
+                      label="规格&单位"
123
+                      align="center">
124
+                      <template slot-scope="scope">
125
+                        {{scope.row.dose}}{{scope.row.dose_unit}} * {{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
126
+                      </template>
127
+                     </el-table-column>
128
+                      <el-table-column
129
+                       prop="name"
130
+                      label="数量"
131
+                      align="center">
132
+                      <template slot-scope="scope">
133
+                         {{getCount(scope.row.child,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
134
+                      </template>
135
+                     </el-table-column>
136
+
137
+                     </el-table>
138
+                      <el-pagination
139
+                        @size-change="handleSizeChange"
140
+                        @current-change="handleCurrentChangeOne"
141
+                        :page-sizes="[10, 50, 100,200,500,1000]"
142
+                        :page-size="10"
143
+                        background
144
+                        align="right"
145
+                        style="margin-top:20px;"
146
+                        layout="total, sizes, prev, pager, next, jumper"
147
+                        :total="total"
148
+                        >
149
+                      </el-pagination>
150
+                    </el-tab-pane>
151
+                   </el-tabs>
152
+                </div>
153
+             </el-main>
154
+          </el-container>
155
+        </el-container>
156
+      </el-container>
157
+      </div>
158
+    </div>
159
+
160
+</template>
161
+<script>
162
+import { getGoodPatientList,getSelfDrugWarehouseOutDetailByPatientId } from "@/api/drug/drug"
163
+export default {
164
+  data(){
165
+    return{
166
+      zoneList:[],
167
+      zone_id:0,
168
+      tableData:[],
169
+      DeviceTypeType:[],
170
+      device_type:"",
171
+      forms:{},
172
+      start_time:"",
173
+      end_time:"",
174
+      patientList:[],
175
+      tableList:[],
176
+      keyword:"",
177
+      manufacturerList:[],
178
+      patient_id:0,
179
+      patient:{},
180
+      limit:10,
181
+      page:1,
182
+      total:0,
183
+      loading:false,
184
+    }
185
+  },
186
+  methods:{
187
+  
188
+    handleSizeChange(val) {
189
+      this.limit = val;
190
+      this.getDrugWarehouseOutDetailByPatientId()
191
+    },
192
+    handleCurrentChangeOne(val) {
193
+      this.page = val;
194
+      
195
+      this.getDrugWarehouseOutDetailByPatientId()
196
+    },
197
+    startTimeChange(){
198
+      this.handleCurrentChange(this.patient)
199
+    },
200
+    endTimeChange(){
201
+      this.handleCurrentChange(this.patient)
202
+    },
203
+    getlist(){
204
+        this.loading = true
205
+        var params = {
206
+          keyword:this.keyword,
207
+        }
208
+      getGoodPatientList(params).then(response=>{
209
+        if(response.data.state == 1){
210
+          this.loading = false
211
+          var list = response.data.data.list
212
+          this.patientList=[]
213
+          this.patientList = list
214
+          this.$refs.singleTable.setCurrentRow(this.patientList[0]);
215
+          this.handleCurrentChange(this.patientList[0])
216
+        }
217
+      })
218
+    },
219
+   onSearch(){
220
+     this.getlist()
221
+   },
222
+   handleCurrentChange(val){
223
+       this.patient = val
224
+       var params = {
225
+         patient_id:val.id,
226
+         start_time:this.start_time,
227
+         end_time:this.end_time,
228
+         limit:this.limit,
229
+         page:this.page,
230
+       }
231
+     getSelfDrugWarehouseOutDetailByPatientId(params).then(response=>{
232
+        if(response.data.state == 1){
233
+          var list = response.data.data.list
234
+          console.log("list233223232323",list)
235
+          var outlist = response.data.data.outlist
236
+          this.manufacturerList = response.data.data.manufacturerList
237
+          if(list!=null && list.length > 0){
238
+            for(let i=0;i<list.length;i++){
239
+              if(list[i].count_unit == list[i].drug.max_unit){
240
+                 list[i].count = list[i].count * list[i].drug.min_number
241
+              }
242
+            }
243
+          }
244
+          let dataInfo = {}
245
+          list.forEach((item, index) => {
246
+            let { drug_id } = item
247
+            if (!dataInfo[drug_id]) {
248
+              dataInfo[drug_id] = {
249
+                drug_id,
250
+                child: [],
251
+                dose:item.drug.dose,
252
+                dose_unit:item.drug.dose_unit,
253
+                min_number:item.drug.min_number,
254
+                min_unit:item.drug.min_unit,
255
+                max_unit:item.drug.max_unit,
256
+                drug_name:item.drug.drug_name,
257
+                manufacturer:this.getManufacturName(item.manufacturer),
258
+              }
259
+            }
260
+          })
261
+          let arr = Object.values(dataInfo)
262
+          arr.forEach((item,index)=>{
263
+            for(let i=0;i<outlist.length;i++){
264
+               if(item.drug_id == outlist[i].drug_id){
265
+                 item.child.push(outlist[i])
266
+               }
267
+            }
268
+          })
269
+        
270
+        
271
+          this.tableList = arr
272
+          this.total = response.data.data.total
273
+        }
274
+     })
275
+   },
276
+   getDrugWarehouseOutDetailByPatientId(){
277
+      var params = {
278
+         patient_id:this.patient.id,
279
+         start_time:this.start_time,
280
+         end_time:this.end_time,
281
+         limit:this.limit,
282
+         page:this.page,
283
+       }
284
+      console.log("hh23232323232323",params)
285
+     getDrugWarehouseOutDetailByPatientId(params).then(response=>{
286
+        if(response.data.state == 1){
287
+          var list = response.data.data.list
288
+         console.log("list233223232323",list)
289
+          var outlist = response.data.data.outlist
290
+          this.manufacturerList = response.data.data.manufacturerList
291
+          if(list!=null && list.length > 0){
292
+            for(let i=0;i<list.length;i++){
293
+              if(list[i].count_unit == list[i].drug.max_unit){
294
+                 list[i].count = list[i].count * list[i].drug.min_number
295
+              }
296
+            }
297
+          }
298
+          let dataInfo = {}
299
+          list.forEach((item, index) => {
300
+            let { drug_id } = item
301
+            if (!dataInfo[drug_id]) {
302
+              dataInfo[drug_id] = {
303
+                drug_id,
304
+                child: [],
305
+                dose:item.drug.dose,
306
+                dose_unit:item.drug.dose_unit,
307
+                min_number:item.drug.min_number,
308
+                min_unit:item.drug.min_unit,
309
+                max_unit:item.drug.max_unit,
310
+                drug_name:item.drug.drug_name,
311
+                manufacturer:this.getManufacturName(item.manufacturer),
312
+              }
313
+            }
314
+          })
315
+          let arr = Object.values(dataInfo)
316
+          arr.forEach((item,index)=>{
317
+            for(let i=0;i<outlist.length;i++){
318
+               if(item.drug_id == outlist[i].drug_id){
319
+                 item.child.push(outlist[i])
320
+               }
321
+            }
322
+          })
323
+         
324
+         
325
+          this.tableList = arr
326
+        }
327
+     })
328
+   },
329
+   getManufacturName(id){
330
+     var manufacturer_name = ""
331
+     for(let i=0;i<this.manufacturerList.length;i++){
332
+        if(id == this.manufacturerList[i].id){
333
+          manufacturer_name = this.manufacturerList[i].manufacturer_name
334
+        } 
335
+     }
336
+     return manufacturer_name
337
+   },
338
+   open(){
339
+    console.log("haaaaaaaaaaaaaaaaaaaaaaa")
340
+    this.getlist()
341
+   },
342
+   getCount(val,min_number,max_unit,min_unit){
343
+    var total = 0
344
+    var min_str = ""
345
+    var max_str = ""
346
+    if(val!=null && val.length>0){
347
+      for(let i=0;i<val.length;i++){
348
+        total +=val[i].count
349
+      }
350
+    }
351
+    if (total < min_number) {
352
+      min_str = total + min_unit;
353
+    }
354
+    if (total == 0) {
355
+      min_str = "";
356
+      max_str = "";
357
+    }
358
+    if (total >= min_number) {
359
+      if (parseInt(total / min_number) != 0) {
360
+        max_str = parseInt(total / min_number) + max_unit;
361
+      }
362
+      if (total % min_number != 0) {
363
+        min_str = (total % min_number) + min_unit;
364
+      }
365
+    }
366
+    return max_str + min_str;  
367
+   },
368
+   toPrint(){
369
+    var patient_name = ""
370
+    for(let i=0;i<this.patientList.length;i++){
371
+       if(this.patient.id == this.patientList[i].id){
372
+        patient_name = this.patientList[i].name
373
+       }
374
+    }
375
+    this.$router.push({path:"/drugs/patient/print?start_time="+this.start_time+"&end_time="+this.end_time+"&page="+this.page+"&limit="+this.limit+"&keyword="+this.keyword+"&patient_id="+this.patient.id+"&patient_name="+patient_name})
376
+   },
377
+   exportList(){
378
+      for(let i=0;i<this.tableList.length;i++){
379
+        this.tableList[i].index = i+1
380
+        this.tableList[i].count_name = this.getCount(this.tableList[i].child,this.tableList[i].min_number,this.tableList[i].max_unit,this.tableList[i].min_unit)
381
+        this.tableList[i].query_date = this.start_time + "~" + this.end_time
382
+        this.tableList[i].specification_name = this.tableList[i].dose +this.tableList[i].dose_unit + "*"+this.tableList[i].min_number+this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
383
+        this.tableList[i].patient_name = ""
384
+        if(this.tableList[i].index == 1){
385
+          this.tableList[i].patient_name = this.getPatientName(this.patient.id)
386
+        }
387
+      
388
+      }
389
+      import('@/vendor/Export2Excel').then(excel => {
390
+       
391
+        const tHeader = ['序号','患者姓名','查询日期','药品名称','生产厂家','规格&单位','数量']
392
+        const filterVal = ['index','patient_name','query_date','drug_name', 'manufacturer','specification_name','count_name']
393
+
394
+        const data = this.formatJson(filterVal,this.tableList)
395
+
396
+        excel.export_json_to_excel({
397
+          header: tHeader,
398
+          data,
399
+          filename: '患者药品使用查询表'
400
+        })
401
+       })
402
+       },
403
+       formatJson(filterVal, jsonData) {
404
+        return jsonData.map(v => filterVal.map(j => v[j]))
405
+       },
406
+       getPatientName(id){
407
+         var patient_name = ""
408
+        for(let i=0;i<this.patientList.length;i++){
409
+          if(id == this.patientList[i].id){
410
+            patient_name = this.patientList[i].name
411
+          }
412
+        }
413
+        return patient_name
414
+       }
415
+  },
416
+  created(){
417
+    var nowDate = new Date();
418
+    var nowYear = nowDate.getFullYear();
419
+    var nowMonth = nowDate.getMonth() + 1;
420
+    var nowDay = nowDate.getDate();
421
+    this.end_time =
422
+      nowYear +
423
+      "-" +
424
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
425
+      "-" +
426
+      (nowDay < 10 ? "0" + nowDay : nowDay);
427
+    nowDate.setMonth(nowDate.getMonth() - 1);
428
+    nowYear = nowDate.getFullYear();
429
+    nowMonth = nowDate.getMonth() + 1;
430
+    nowDay = nowDate.getDate();
431
+    this.start_time =
432
+      nowYear +
433
+      "-" +
434
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
435
+      "-" +
436
+      (nowDay < 10 ? "0" + nowDay : nowDay);
437
+   
438
+  },
439
+  
440
+}
441
+</script>
442
+
443
+
444
+   
445
+<style lang="scss" scoped>
446
+    .zone{
447
+      //  margin-left: 30px;
448
+      //  text-align: left;
449
+       width: 70px;
450
+       display: inline-block;
451
+       color:#606266;
452
+    }
453
+    .disinfect{
454
+      position: relative;
455
+      .newButton{
456
+        // position: absolute;
457
+        // right: 2%;
458
+        // top:4px;
459
+        // z-index: 9;
460
+        margin-bottom: 10px;
461
+    margin-left: 90%;
462
+      }
463
+    }
464
+    .disinfectOne{
465
+      position: relative;
466
+      .newButtonOne{
467
+        position: absolute;
468
+         right: 0;
469
+         top: -10;
470
+         z-index: 18;
471
+      }
472
+    }
473
+    .but{
474
+      width: 200px;
475
+      height: 50px;
476
+      // border: solid 1px red;
477
+      margin-left: 77%;
478
+    }
479
+    .clearn{
480
+      width: 460px;
481
+      height: 50px;
482
+      // border:solid 1px red;
483
+      margin-left:650px;
484
+    }
485
+
486
+  .zClass{
487
+    width: 200px;
488
+    height: 200px;
489
+    // border:solid 1px red;
490
+    margin-left: 450px;
491
+    margin-top: 200px;
492
+  }
493
+  .warn{
494
+    color: red;
495
+    font-size: 14px;
496
+    width: 100%;
497
+    display: inline-block;
498
+    margin-left: 96px;
499
+  }
500
+
501
+  .userbutton{
502
+       margin-bottom: 10px;
503
+    margin-left: 82%
504
+  }
505
+    /deep/ .el-tabs__content{
506
+    margin-top: 10px;
507
+  }
508
+
509
+</style>
510
+<style lang="scss">
511
+   .a{
512
+     margin-bottom: 10px;
513
+      margin-top: 6px;
514
+
515
+   }
516
+
517
+   .b{
518
+    .el-button{
519
+      margin-left: 90%;
520
+      margin-bottom: 10px;
521
+    }
522
+   }
523
+
524
+   .stoppage{
525
+     .el-form-item__label{
526
+       width:190px;
527
+     }
528
+   }
529
+   .st{
530
+     .el-form-item__label{
531
+       width:-10px;
532
+     }
533
+   }
534
+   .main{
535
+     position: relative;
536
+     .newButtonOne{
537
+       position:absolute;
538
+       right: 0;
539
+       z-index: 2;
540
+     }
541
+   }
542
+
543
+    .elbutton{
544
+      // border: solid 1px red;
545
+      height: 50px;
546
+      width: 400px;
547
+      margin-left: 650px;
548
+    }
549
+  // .el-form-item__label {
550
+  //   width: 130px;
551
+  //   font-size: 14px;
552
+  // }
553
+  .el-form-item__error {
554
+    margin-left: 130px;
555
+  }
556
+
557
+ .el-upload-list__item-name {
558
+    color: #606266;
559
+    display: block;
560
+    margin-right: 40px;
561
+    overflow: hidden;
562
+    padding-left: 4px;
563
+    text-overflow: ellipsis;
564
+    transition: color .3s;
565
+    white-space: nowrap;
566
+}
567
+.el-main{
568
+  padding-top: 0px;
569
+}
570
+.newMain{
571
+  .el-form-item__label{
572
+    width: 104px;
573
+  }
574
+}
575
+.newDisinfectOne{
576
+  .el-input--prefix .el-input__inner{
577
+    padding-left: 15px
578
+  }
579
+}
580
+.stoppage{
581
+  .el-form-item__label{
582
+    width: 18%;
583
+  }
584
+}
585
+.newItem{
586
+  .el-form-item__label{
587
+    width: 130px;
588
+  }
589
+}
590
+.formItem{
591
+  .el-form-item__label{
592
+    width: 104px;
593
+    line-height: 30px;
594
+  }
595
+}
596
+.newname{
597
+  .el-form-item__label{
598
+    width: 60px;
599
+  }
600
+}
601
+::-webkit-scrollbar{
602
+  height: 20px;
603
+}
604
+</style>

+ 2 - 2
src/xt_pages/stock/selfPreparedMedicine/selfDrugFlow.vue View File

@@ -104,8 +104,8 @@
104 104
           <el-table-column prop="drug_name" label="数量&单位" align="center">
105 105
              <template slot-scope="scope">
106 106
                 <span v-if="scope.row.consumable_type != 2 &&  scope.row.consumable_type != 3 && scope.row.consumable_type != 5 && scope.row.consumable_type != 7">{{scope.row.count}}{{scope.row.max_unit}}</span>
107
-                <span v-if="(scope.row.consumable_type == 2 || scope.row.consumable_type == 3 || scope.row.consumable_type == 5 || scope.row.consumable_type == 7) && parseInt(scope.row.count/scope.row.BaseDrugLib.min_number) >0">{{parseInt(scope.row.count/scope.row.BaseDrugLib.min_number)}}{{scope.row.BaseDrugLib.max_unit}}</span>
108
-                <span v-if="(scope.row.consumable_type == 2 || scope.row.consumable_type == 3 || scope.row.consumable_type == 5 || scope.row.consumable_type == 7) && scope.row.count%scope.row.BaseDrugLib.min_number >0">{{scope.row.count%scope.row.BaseDrugLib.min_number}}{{scope.row.BaseDrugLib.min_unit}}</span>
107
+                <span v-if="(scope.row.consumable_type == 2 || scope.row.consumable_type == 3 || scope.row.consumable_type == 5 || scope.row.consumable_type == 7) && parseInt(scope.row.count/scope.row.drug.min_number) >0">{{parseInt(scope.row.count/scope.row.drug.min_number)}}{{scope.row.drug.max_unit}}</span>
108
+                <span v-if="(scope.row.consumable_type == 2 || scope.row.consumable_type == 3 || scope.row.consumable_type == 5 || scope.row.consumable_type == 7) && scope.row.count%scope.row.drug.min_number >0">{{scope.row.count%scope.row.drug.min_number}}{{scope.row.drug.min_unit}}</span>
109 109
              </template>
110 110
           </el-table-column>
111 111
   

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

@@ -10,7 +10,7 @@
10 10
                 <new-drug-query></new-drug-query>
11 11
               </el-tab-pane>
12 12
             
13
-              <el-tab-pane label="患者查询" name="sencode">
13
+              <el-tab-pane label="患者查询" name="second">
14 14
                   <patient-drug-query ref="mychildtwo"></patient-drug-query>
15 15
               </el-tab-pane>
16 16
           </el-tabs>

+ 74 - 67
src/xt_pages/stock/selfPreparedMedicine/warehouseInfo.vue View File

@@ -87,9 +87,9 @@
87 87
           @change="changeAllSelected"
88 88
           >全选</el-checkbox
89 89
         >
90
-        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
90
+        <!-- <el-button size="small" icon="el-icon-delete" @click="batchDelete"
91 91
           >删除</el-button
92
-        >
92
+        > -->
93 93
         <el-button size="small" type="primary" @click="drugPrint()"
94 94
           >打印</el-button
95 95
         >
@@ -224,7 +224,7 @@
224 224
       <div v-if="isShow">
225 225
 
226 226
         <el-table
227
-        :data="tableList"
227
+        :data="tableDataList"
228 228
         :class="signAndWeighBoxPatients"
229 229
         style="width: 100%"
230 230
         border
@@ -237,32 +237,26 @@
237 237
           backgroundColor: 'rgb(245, 247, 250)',
238 238
           color: '#606266',
239 239
         }"
240
-        @current-change="handleCurrentChangeOne"
241 240
       >
242 241
         <el-table-column align="center" type="selection" width="55">
243 242
         </el-table-column>
244 243
 
245
-        <el-table-column label="入库时间" align="center">
246
-          <template slot-scope="scope">
247
-             {{ getTime(scope.row.record_date)}}
248
-          </template>
249
-        </el-table-column>
250 244
 
251 245
         <el-table-column label="药品名称" align="center">
252 246
           <template slot-scope="scope">
253
-             {{ scope.row.drug.drug_name }}
247
+             {{ scope.row.drug_name }}
254 248
           </template>
255 249
         </el-table-column>
256 250
 
257 251
         <el-table-column label="药品类型" align="center">
258 252
           <template slot-scope="scope">
259
-             {{ GetDrugTypeName(scope.row.drug.drug_type) }}
253
+            {{scope.row.drug_type}}
260 254
           </template>
261 255
         </el-table-column>
262 256
 
263 257
         <el-table-column label="规格" align="center">
264 258
           <template slot-scope="scope">
265
-            {{ scope.row.drug.dose }} {{  scope.row.drug.dose_unit }} * {{ scope.row.drug.min_number}} {{ scope.row.drug.min_unit}} / {{ scope.row.max_unit }}
259
+            {{scope.row.name}}
266 260
           </template>
267 261
         </el-table-column>
268 262
 
@@ -278,72 +272,32 @@
278 272
           </template>
279 273
         </el-table-column>
280 274
 
281
-      
282
-
283 275
         <el-table-column label="生产厂家" align="center">
284 276
           <template slot-scope="scope">
285
-           
286
-            {{ getManufacturer(scope.row.manufacturer) }}
277
+           {{scope.row.manufacturer}}
287 278
           </template>
288 279
         </el-table-column>
289 280
 
290 281
         <el-table-column label="生产日期" align="center">
291 282
           <template slot-scope="scope">
292
-             {{ getTime(scope.row.product_date) }}
283
+           {{scope.row.product_date}}
293 284
           </template>
294 285
         </el-table-column>
295 286
 
296 287
         <el-table-column label="有效日期" align="center">
297 288
           <template slot-scope="scope">
298
-            {{ getTime(scope.row.expiry_date) }}
299
-          </template>
300
-        </el-table-column>
301
-
302
-        <el-table-column label="审核状态" align="center">
303
-          <template slot-scope="scope">
304
-             <span v-if="scope.row.is_check ==1">已审核</span>
305
-             <span v-if="scope.row.is_check ==2">未审核</span>
289
+          {{scope.row.expiry_date}}
306 290
           </template>
307 291
         </el-table-column>
308 292
 
293
+  
309 294
         <el-table-column label="备注" align="center">
310 295
           <template slot-scope="scope">
311 296
              {{ scope.row.remark }}
312 297
           </template>
313 298
         </el-table-column>
314 299
 
315
-        <el-table-column label="操作" align="center" width="240">
316
-          <template slot-scope="scope">
317
-            <el-tooltip
318
-              class="item"
319
-              effect="dark"
320
-              content="编辑"
321
-              placement="top"
322
-            >
323
-              <el-button
324
-                size="small"
325
-                type="primary"
326
-                icon="el-icon-edit-outline"
327
-                @click="handleEdit(scope.$index, scope.row)"
328
-              >
329
-              </el-button>
330
-            </el-tooltip>
331
-            <el-tooltip
332
-              class="item"
333
-              effect="dark"
334
-              content="删除"
335
-              placement="top"
336
-            >
337
-              <el-button
338
-                size="small"
339
-                type="danger"
340
-                icon="el-icon-delete"
341
-                @click="handleDelete(scope.$index, scope.row)"
342
-              >
343
-              </el-button>
344
-            </el-tooltip>
345
-          </template>
346
-        </el-table-column>
300
+      
347 301
         </el-table>
348 302
       </div>
349 303
     
@@ -364,7 +318,7 @@ import {
364 318
 } from "@/api/drug/drug_stock";
365 319
 import { getDictionaryDataConfig } from "@/utils/data";
366 320
 import BreadCrumb from "../../components/bread-crumb";
367
-import { getallPatientList,getAllSelfDrugWarehouseInfoList,deleteSelfWarehouseInfo,getAllSelfDrugWarehouse} from "@/api/drug/drug"
321
+import { getallPatientList,getAllSelfDrugWarehouseInfoList,deleteSelfWarehouse,getAllSelfDrugWarehouse,getSelfDrugWarehouseInfoById} from "@/api/drug/drug"
368 322
 export default {
369 323
   name: "drugStockInOrder",
370 324
   components: { BreadCrumb },
@@ -460,6 +414,7 @@ export default {
460 414
       drugTypeList:[],
461 415
       isShow:false,
462 416
       doctorList:[],
417
+      tableDataList:[]
463 418
     };
464 419
   },
465 420
 
@@ -623,11 +578,7 @@ export default {
623 578
       
624 579
     },
625 580
     search(){
626
-
627
-    },
628
-    handleSearch(id) {
629
-      this.WarehouseInfo.warehouseInfoDate = [];
630
-      this.dialogVisible = true;
581
+      this.getAllSelfDrugWarehouse();
631 582
     },
632 583
     handleDelete: function (index, row) {
633 584
         if(row.is_check ==1){
@@ -635,7 +586,7 @@ export default {
635 586
           return false
636 587
         }
637 588
         if(row.is_sys ==1){
638
-          this.$message.error("该药自动入库,不能删除!")
589
+          this.$message.error("该药自动入库,不能删除!")
639 590
           return false
640 591
         }
641 592
         this.$confirm('确定删除吗?', '提示', {
@@ -643,7 +594,7 @@ export default {
643 594
           cancelButtonText: '取消',
644 595
           type: 'warning'
645 596
         }).then(() => {
646
-          deleteSelfWarehouseInfo(row.id).then(response => {
597
+          deleteSelfWarehouse(row.id).then(response => {
647 598
             if (response.data.state == 0) {
648 599
               this.$message.error(response.data.msg)
649 600
               return false
@@ -739,7 +690,53 @@ export default {
739 690
         .catch(() => {});
740 691
     },
741 692
     handleCurrentChangeOne(val) {
742
-     
693
+         getSelfDrugWarehouseInfoById(val.id).then(response=>{
694
+          if(response.data.state ==1){
695
+            var info = response.data.data.info
696
+
697
+            var warehouseInfo =  response.data.data.warehouseInfo
698
+
699
+            this.isShow = true
700
+             if(info.is_check == 2){
701
+               this.showCheck = true
702
+               this.showReturnCheck = false
703
+             }
704
+             if(info.is_check == 1){
705
+                this.showCheck = false
706
+                this.showReturnCheck = true
707
+             }
708
+             this.patient_id = info.patient_id
709
+
710
+             this.warehousing_time  =this.getTimeOne(warehouseInfo.operation_time)
711
+             this.manufacturerList = response.data.data.manufacturerList
712
+             this.dealerList = response.data.data.dealerList
713
+             this.drugTypeList = response.data.data.drugTypeList
714
+             var warehouseInfo  =  response.data.data.warehouseInfo
715
+             this.warehousing_id  = warehouseInfo.id
716
+             const tempObj = {};
717
+             
718
+             tempObj["id"] = info.id;
719
+             tempObj["drug_id"] = info.drug_id;
720
+             tempObj["drug_name"] = info.drug.drug_name;
721
+             tempObj["max_unit"] = info.max_unit;
722
+             tempObj["min_unit"] = info.min_unit,
723
+             tempObj["product_date"] = this.getTimeOne(info.product_date);
724
+             tempObj["expiry_date"] = this.getTimeOne(info.expiry_date);
725
+             tempObj["warehousing_count"] = info.warehousing_count.toString();
726
+             tempObj["remark"] = info.remark;
727
+             tempObj["dealer"] =this.getDealer(info.dealer) 
728
+             tempObj["manufacturer"] = this.getManufacturer(info.manufacturer);
729
+             tempObj["batch_number"] = info.batch_number;
730
+             tempObj["drug_type"] =this.GetDrugTypeName(info.drug.drug_type) 
731
+             tempObj["number"] = info.number;
732
+             tempObj["count_unit"] = info.max_unit;
733
+           
734
+             tempObj["name"] = info.drug.dose + info.drug.dose_unit + "*" + info.drug.min_number+info.drug.min_unit +"/"+info.drug.max_unit
735
+             this.tableDataList = []
736
+             this.tableDataList.push(tempObj);
737
+          }
738
+
739
+       })
743 740
     },
744 741
     getTime(val) {
745 742
       if (val < 0) {
@@ -751,6 +748,16 @@ export default {
751 748
         return uParseTime(val, "{y}-{m}-{d}");
752 749
       }
753 750
     },
751
+    getTimeOne(val) {
752
+      if(val < 0){
753
+        return ""
754
+      }
755
+      if(val == ""){
756
+      return ""
757
+      }else {
758
+      return uParseTime(val, '{y}-{m}-{d}')
759
+      }
760
+     },
754 761
     getDrugType(id) {
755 762
       var name = "";
756 763
       for (let i = 0; i < this.drugTypeList.length; i++) {
@@ -763,7 +770,6 @@ export default {
763 770
     
764 771
     getManufacturer(id) {
765 772
       var name = "";
766
-      console.log("manufacturerList-=------",this.manufacturerList)
767 773
       for (let i = 0; i < this.manufacturerList.length; i++) {
768 774
 
769 775
         if (id == this.manufacturerList[i].id) {
@@ -944,6 +950,7 @@ export default {
944 950
       },
945 951
       GetDrugTypeName(drug_type){
946 952
         var name = ""
953
+        console.log("drugTypeList---------------",this.drugTypeList)
947 954
         for(let i=0;i<this.drugTypeList.length;i++){
948 955
           if(drug_type == this.drugTypeList[i].value){
949 956
              name = this.drugTypeList[i].name

+ 215 - 99
src/xt_pages/stock/selfPreparedMedicine/warehouseOut.vue View File

@@ -37,7 +37,7 @@
37 37
           style="width: 200px"
38 38
           v-model.trim="searchKey"
39 39
           class="filter-item"
40
-          placeholder="单据编码/制单人/药品名称"
40
+          placeholder="单据编码"
41 41
         />
42 42
         <el-button
43 43
           size="small"
@@ -103,9 +103,9 @@
103 103
           @change="changeAllSelected"
104 104
           >全选</el-checkbox
105 105
         >
106
-        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
106
+        <!-- <el-button size="small" icon="el-icon-delete" @click="batchDelete"
107 107
           >删除</el-button
108
-        >
108
+        > -->
109 109
         <el-button size="small" type="primary" @click="drugPrint()"
110 110
           >打印</el-button
111 111
         >
@@ -131,6 +131,7 @@
131 131
           </el-select>
132 132
         </div>
133 133
       </div>
134
+      
134 135
 
135 136
       <el-table
136 137
         :data="tableList"
@@ -151,68 +152,43 @@
151 152
         <el-table-column align="center" type="selection" width="55">
152 153
         </el-table-column>
153 154
 
154
-        <el-table-column label="出库时间" align="center">
155
+        <el-table-column label="单据日期" align="center">
155 156
           <template slot-scope="scope">
156
-             {{ getTime(scope.row.sys_record_time)}}
157
+             {{ getTime(scope.row.warehouse_out_time)}}
157 158
           </template>
158 159
         </el-table-column>
159 160
 
160
-        <el-table-column label="药品名称" align="center">
161
+        <el-table-column label="单据编号" align="center">
161 162
           <template slot-scope="scope">
162
-             {{ scope.row.drug.drug_name }}
163
+           {{scope.row.warehouse_out_order_number}}
163 164
           </template>
164 165
         </el-table-column>
165 166
 
166
-        <el-table-column label="药品类型" align="center">
167
+        <el-table-column label="患者名称" align="center">
167 168
           <template slot-scope="scope">
168
-             {{ GetDrugTypeName(scope.row.drug.drug_type) }}
169
+             {{getPatientName(scope.row.patient_id)}}
169 170
           </template>
170 171
         </el-table-column>
171 172
 
172
-        <el-table-column label="规格" align="center">
173
+        <el-table-column label="制单人" align="center">
173 174
           <template slot-scope="scope">
174
-            {{ scope.row.drug.dose }} {{  scope.row.drug.dose_unit }} * {{ scope.row.drug.min_number}} {{ scope.row.drug.min_unit}} / {{ scope.row.max_unit }}
175
+            {{getAdminUserName(scope.row.creater)}}
175 176
           </template>
176 177
         </el-table-column>
177 178
 
178
-        <el-table-column label="批号" align="center">
179
+        <el-table-column label="出库方式" align="center">
179 180
           <template slot-scope="scope">
180
-             {{ scope.row.batch_number }}
181
+            <span v-if="scope.row.is_sys ==1">自动出库</span>
182
+            <span v-if="scope.row.is_sys ==0">手动出库</span>
181 183
           </template>
182 184
         </el-table-column>
183 185
 
184
-        <el-table-column label="出库数量" align="center">
186
+        <el-table-column label="审核状态" align="center">
185 187
           <template slot-scope="scope">
186
-             {{ scope.row.count }} {{ scope.row.max_unit }}
188
+             <span v-if="scope.row.is_check ==1">已审核</span>
189
+             <span v-if="scope.row.is_check ==2">未审核</span>
187 190
           </template>
188 191
         </el-table-column>
189
-
190
-      
191
-
192
-        <el-table-column label="生产厂家" align="center">
193
-          <template slot-scope="scope">
194
-            {{ getManufacturer(scope.row.manufacturer) }}
195
-          </template>
196
-        </el-table-column>
197
-
198
-        <el-table-column label="生产日期" align="center">
199
-          <template slot-scope="scope">
200
-             {{ getTime(scope.row.product_date) }}
201
-          </template>
202
-        </el-table-column>
203
-
204
-        <el-table-column label="有效日期" align="center">
205
-          <template slot-scope="scope">
206
-            {{ getTime(scope.row.expiry_date) }}
207
-          </template>
208
-        </el-table-column>
209
-
210
-        <el-table-column label="备注" align="center">
211
-          <template slot-scope="scope">
212
-             {{ scope.row.remark }}
213
-          </template>
214
-        </el-table-column>
215
-
216 192
         <el-table-column label="操作" align="center" width="240">
217 193
           <template slot-scope="scope">
218 194
             <el-tooltip
@@ -246,7 +222,7 @@
246 222
           </template>
247 223
         </el-table-column>
248 224
       </el-table>
249
-
225
+   
250 226
       <el-pagination
251 227
         @size-change="handleSizeChange"
252 228
         @current-change="handleCurrentChange"
@@ -258,7 +234,86 @@
258 234
         :total="total"
259 235
       >
260 236
       </el-pagination>
237
+       
238
+       <div v-show="isShow">
239
+        <el-table
240
+        :data="recordDataList"
241
+        :class="signAndWeighBoxPatients"
242
+        style="width: 100%"
243
+        border
244
+        highlight-current-row
245
+        v-loading="Warehouse.loading"
246
+        ref="multipleTable"
247
+        @selection-change="select"
248
+        :row-style="{ color: '#303133' }"
249
+        :header-cell-style="{
250
+          backgroundColor: 'rgb(245, 247, 250)',
251
+          color: '#606266',
252
+        }"
253
+      >
254
+        <el-table-column align="center" type="selection" width="55">
255
+        </el-table-column>
256
+
257
+    
258
+        <el-table-column label="药品名称" align="center">
259
+          <template slot-scope="scope">
260
+             {{ scope.row.drug_name }}
261
+          </template>
262
+        </el-table-column>
263
+
264
+        <el-table-column label="药品类型" align="center">
265
+          <template slot-scope="scope">
266
+             {{scope.row.drug_type }}
267
+          </template>
268
+        </el-table-column>
269
+
270
+        <el-table-column label="规格" align="center">
271
+          <template slot-scope="scope">
272
+             {{scope.row.name}}
273
+          </template>
274
+        </el-table-column>
275
+
276
+        <el-table-column label="批号" align="center">
277
+          <template slot-scope="scope">
278
+             {{ scope.row.batch_number }}
279
+          </template>
280
+        </el-table-column>
281
+
282
+        <el-table-column label="出库数量" align="center">
283
+          <template slot-scope="scope">
284
+             {{ scope.row.count }} {{ scope.row.max_unit }}
285
+          </template>
286
+        </el-table-column>
287
+
288
+      
289
+
290
+        <el-table-column label="生产厂家" align="center">
291
+          <template slot-scope="scope">
292
+            {{scope.row.manufacturer}}
293
+          </template>
294
+        </el-table-column>
295
+
296
+        <el-table-column label="生产日期" align="center">
297
+          <template slot-scope="scope">
298
+           {{scope.row.product_date}}
299
+          </template>
300
+        </el-table-column>
301
+
302
+        <el-table-column label="有效日期" align="center">
303
+          <template slot-scope="scope">
304
+            {{ scope.row.expiry_date }}
305
+          </template>
306
+        </el-table-column>
307
+
308
+        <el-table-column label="备注" align="center">
309
+          <template slot-scope="scope">
310
+             {{ scope.row.remark }}
311
+          </template>
312
+        </el-table-column>
313
+
261 314
     
315
+      </el-table>
316
+       </div>
262 317
     </div>
263 318
 
264 319
  
@@ -277,7 +332,7 @@ import {
277 332
 import { getAllDrugList } from "@/api/data";
278 333
 import { getDictionaryDataConfig } from "@/utils/data";
279 334
 import BreadCrumb from "../../components/bread-crumb";
280
-  import { getallPatientList,getAllSelfDrugWarehouseOutList,deleteSelfWarehouseOut} from "@/api/drug/drug"
335
+  import { getallPatientList,getAllSelfDrugWarehouseOutList,deleteSelfWarehouseOutList,getAllSelfDrugWarehouseOut,getSelfDrugWarehouseOutById} from "@/api/drug/drug"
281 336
 export default {
282 337
   name: "drugStockInOrder",
283 338
   components: { BreadCrumb },
@@ -312,8 +367,8 @@ export default {
312 367
       (nowDay < 10 ? "0" + nowDay : nowDay);
313 368
 
314 369
     this.getallPatientList() 
315
-
316
-    this.getAllSelfDrugWarehouseOutList()
370
+    this.getAllSelfDrugWarehouseOut()
371
+    
317 372
   },
318 373
   data() {
319 374
     return {
@@ -371,30 +426,36 @@ export default {
371 426
       manufacturerList:[],
372 427
       dealerList:[],
373 428
       drugTypeList:[],
429
+      isShow:false,
430
+      doctorList:[],
431
+      recordDataList:[],
432
+      loading:false,
374 433
     };
375 434
   },
376 435
 
377 436
   methods: {
378
-    
379
-    getAllSelfDrugWarehouseOutList(){
380
-        var params = {
437
+    getAllSelfDrugWarehouseOut(){
438
+      var params = {
381 439
           keyword:this.searchKey,
382 440
           patient_id:this.patient_id,
383 441
           start_time:this.start_time,
384 442
           end_time:this.end_time,
443
+          check_type:this.check_type,
444
+          limit:this.limit,
445
+          page:this.page,
446
+        }
447
+      getAllSelfDrugWarehouseOut(params).then(response=>{
448
+        if(response.data.state ==1){
449
+          var list= response.data.data.list
450
+          this.tableList = list
451
+          var doctorList = response.data.data.doctorList
452
+          this.doctorList = doctorList
453
+          this.total = response.data.data.total
385 454
         }
386
-        getAllSelfDrugWarehouseOutList(params).then(response=>{
387
-          if(response.data.state ==1){
388
-            var outInfo  =  response.data.data.outInfo
389
-            console.log("infolist22222222222222",outInfo)
390
-            this.tableList = outInfo
391
-            this.manufacturerList = response.data.data.manufacturerList
392
-            this.dealerList = response.data.data.dealerList
393
-            this.drugTypeList = response.data.data.drugTypeList
394 455
 
395
-          }
396 456
       })
397 457
     },
458
+   
398 459
     tableRowClassName({ row, rowIndex }) {
399 460
       // 把每一行的索引放进row
400 461
       row.index = rowIndex;
@@ -474,11 +535,11 @@ export default {
474 535
     },
475 536
     handleSizeChange(val) {
476 537
       this.limit = val;
477
-      this.GetWarehouse();
538
+      this.getAllSelfDrugWarehouseOut();
478 539
     },
479 540
     handleCurrentChange(val) {
480 541
       this.page = val;
481
-      this.GetWarehouse();
542
+      this.getAllSelfDrugWarehouseOut();
482 543
     },
483 544
     startTimeChange(val) {
484 545
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
@@ -488,7 +549,7 @@ export default {
488 549
       } else {
489 550
         this.startTime = this.getTimestamp(val);
490 551
         this.start_time = val;
491
-        this.GetWarehouse();
552
+        this.getAllSelfDrugWarehouseOut();
492 553
       }
493 554
     },
494 555
     endTimeChange(val) {
@@ -498,7 +559,7 @@ export default {
498 559
         this.end_time = "";
499 560
       } else {
500 561
         this.end_time = val;
501
-        this.GetWarehouse();
562
+        this.getAllSelfDrugWarehouseOut();
502 563
       }
503 564
     },
504 565
     getTimestamp(time) {
@@ -515,39 +576,7 @@ export default {
515 576
       
516 577
     },
517 578
     search(){
518
-
519
-    },
520
-    handleSearch(id) {
521
-      this.WarehouseInfo.warehouseInfoDate = [];
522
-      this.GetOrderDetail(id);
523
-      this.dialogVisible = true;
524
-    },
525
-    GetOrderDetail(order_id) {
526
-      const params = {
527
-        id: order_id,
528
-      };
529
-
530
-      this.WarehouseInfo.warehouseInfoDate = [];
531
-      getDrugWarehouseInfoList(params).then((response) => {
532
-        if (response.data.state == 0) {
533
-          this.$message.error(response.data.msg);
534
-          return false;
535
-        } else {
536
-          var obj = {total_count:0,is_total:1}
537
-          for (let i = 0; i < response.data.data.info.length; i++) {
538
-            response.data.data.info[i].is_total = 0
539
-            this.showOne = true;
540
-            this.WarehouseInfo.warehouseInfoDate.push(
541
-              response.data.data.info[i]
542
-            );
543
-            obj.total_count += (response.data.data.info[i].warehousing_count *response.data.data.info[i].price)
544
-          }
545
-          this.WarehouseInfo.warehouseInfoDate.push(obj)
546
-        
547
-          this.WarehouseInfo.warehouse = response.data.data.warehousing;
548
-          this.getAllDrugList();
549
-        }
550
-      });
579
+      this.getAllSelfDrugWarehouseOut();
551 580
     },
552 581
     handleDelete: function (index, row) {
553 582
 
@@ -556,7 +585,7 @@ export default {
556 585
           cancelButtonText: '取消',
557 586
           type: 'warning'
558 587
         }).then(() => {
559
-          deleteSelfWarehouseOut(row.id).then(response => {
588
+          deleteSelfWarehouseOutList(row.id).then(response => {
560 589
             if (response.data.state == 0) {
561 590
               this.$message.error(response.data.msg)
562 591
               return false
@@ -652,7 +681,7 @@ export default {
652 681
         .catch(() => {});
653 682
     },
654 683
     handleCurrentChangeOne(val) {
655
-      this.GetOrderDetail(val.id);
684
+      this.getSelfDrugWarehouseOutById(val.id)
656 685
     },
657 686
     getTime(val) {
658 687
       if (val < 0) {
@@ -845,10 +874,10 @@ export default {
845 874
       return storehouse_name;
846 875
     },
847 876
     changeStoreHouse() {
848
-      this.GetWarehouse();
877
+      this.getAllSelfDrugWarehouseOut();
849 878
     },
850 879
     changeCheckType() {
851
-      this.GetWarehouse();
880
+      this.getAllSelfDrugWarehouseOut();
852 881
     },
853 882
 
854 883
     getallPatientList(){
@@ -891,7 +920,94 @@ export default {
891 920
           }
892 921
         }
893 922
         return dealer_name
923
+      },
924
+      getPatientName(id){
925
+         var name = ""
926
+         for(let i=0;i<this.patientList.length;i++){
927
+            if(id == this.patientList[i].id){
928
+               name = this.patientList[i].name
929
+            }
930
+         }
931
+         return name
932
+      },
933
+      getAdminUserName(admin_user_id){
934
+         var user_name = ""
935
+         for(let i=0;i<this.doctorList.length;i++){
936
+            if(admin_user_id == this.doctorList[i].admin_user_id){
937
+              user_name = this.doctorList[i].user_name
938
+            }
939
+         }
940
+         return user_name
941
+      },
942
+      getSelfDrugWarehouseOutById(id){
943
+        getSelfDrugWarehouseOutById(id).then(response=>{
944
+          if(response.data.state ==1){
945
+              var outInfo = response.data.data.outInfo
946
+              this.isShow = true
947
+              if(outInfo.is_check == 2){
948
+               this.showCheck = true
949
+               this.showReturnCheck = false
950
+             }
951
+             if(outInfo.is_check == 1){
952
+                this.showCheck = false
953
+                this.showReturnCheck = true
954
+             }
955
+              this.manufacturerList = response.data.data.manufacturerList
956
+              this.dealerList = response.data.data.dealerList
957
+              this.drugTypeList = response.data.data.drugTypeList
958
+              console.log("out_info",outInfo)
959
+              const tempObj = {};
960
+              this.patient_id = outInfo.patient_id
961
+              this.warehouse_out_time = this.getTimeOne(outInfo.sys_record_time);
962
+              this.warehouse_out_id  = outInfo.warehouse_out_id
963
+              tempObj["id"] = outInfo.id;
964
+              tempObj["drug_id"] = outInfo.drug_id;
965
+              tempObj["max_unit"] = outInfo.count_unit;
966
+              tempObj["min_unit"] = outInfo.min_unit, 
967
+              tempObj["return_count"] = "";
968
+              tempObj["price"] = "";
969
+              tempObj["remark"] = outInfo.remark;
970
+              tempObj["manufacturer"] = this.getManufacturer(outInfo.manufacturer)
971
+              tempObj["batch_number"] = outInfo.batch_number;
972
+              tempObj["drug_type"] = this.GetDrugTypeName(outInfo.drug.drug_type) 
973
+              tempObj["dose"] = "";
974
+              tempObj["dose_unit"] = "";
975
+              tempObj["min_number"] = "";
976
+              tempObj["dealer"] = this.getDealer(outInfo.dealer) 
977
+              tempObj["number"] = "";
978
+              tempObj["warehouse_info_id"] = outInfo.warehouse_info_id;
979
+              tempObj["count"] = (outInfo.count).toString();
980
+              tempObj["admin_user_id"] = this.$store.getters.xt_user.user.user_name;
981
+              tempObj["retail_price"] = 0;
982
+              tempObj["last_price"] = "";
983
+              tempObj["stock_count"] = "";
984
+              tempObj["total_count"] = 0;
985
+              tempObj["max_unit_fisrt"] = 0;
986
+              tempObj["min_unit_fisrt"] = 0;
987
+              tempObj["total_price"] = 0;
988
+              tempObj["patient_id"] = outInfo.patient_id
989
+              tempObj["product_date"] = this.getTimeOne(outInfo.product_date);
990
+              tempObj["expiry_date"]=this.getTimeOne(outInfo.expiry_date)
991
+              tempObj["class_type"] = ""
992
+              tempObj["drug_name"] = outInfo.drug.drug_name
993
+              tempObj["name"] = outInfo.drug.dose + outInfo.drug.dose_unit + "*" + outInfo.drug.min_number+outInfo.drug.min_unit +"/"+outInfo.drug.max_unit
994
+              this.recordDataList = []
995
+              this.recordDataList.push(tempObj);
996
+          }
997
+        })
998
+      },
999
+
1000
+      getTimeOne(val) {
1001
+      if(val < 0){
1002
+        return ""
1003
+      }
1004
+      if(val == ""){
1005
+      return ""
1006
+      }else {
1007
+      return uParseTime(val, '{y}-{m}-{d}')
894 1008
       }
1009
+     },
1010
+
895 1011
     
896 1012
    
897 1013
   },