XMLWAN пре 2 година
родитељ
комит
43c0bc4cfc

+ 16 - 0
src/api/drug/drug.js Прегледај датотеку

@@ -531,3 +531,19 @@ export function getWarehouseOutDetailByPatientId(params) {
531 531
     params: params
532 532
   })
533 533
 }
534
+
535
+export function getGoodExpiryDateQuery(params) {
536
+  return request({
537
+    url: '/api/good/getgoodexpirydatequery',
538
+    method: 'Get',
539
+    params: params
540
+  })
541
+}
542
+
543
+export function getPurchaseStockQuery(params) {
544
+  return request({
545
+    url: '/api/good/getpurchasestockquery',
546
+    method: 'Get',
547
+    params: params
548
+  })
549
+}

+ 2 - 2
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Прегледај датотеку

@@ -1542,7 +1542,7 @@ export default {
1542 1542
           }
1543 1543
         })
1544 1544
       } else {
1545
-        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10088) {
1545
+        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10088 || this.$store.getters.xt_user.org_id == 10278) {
1546 1546
           axios.get('http://127.0.0.1:9532/api/register/get', {
1547 1547
             params: forms,
1548 1548
             headers: {
@@ -2993,7 +2993,7 @@ export default {
2993 2993
           })
2994 2994
         }
2995 2995
       } else if (index == 6) {
2996
-        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10088) {
2996
+        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10088 || this.$store.getters.xt_user.org_id == 10278) {
2997 2997
           this.$refs.register9504.show()
2998 2998
         } else {
2999 2999
           this.$refs.register.show(this.doctors, this.department)

+ 548 - 2
src/xt_pages/stock/query/expiryDateQuery.vue Прегледај датотеку

@@ -1,7 +1,553 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
      <div class="app-container ">
4
-       有效期 库存查询喔喔喔
4
+        <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
5
+         <div>
6
+          <span>有效期:</span>
7
+          <el-select v-model="expiry_type" style="width:200px;margin-right:10px;" placeholder="请选择"
8
+            filterable
9
+            @change="changeExpriyList">
10
+              <el-option
11
+                v-for="item in expriyList"
12
+                :key="item.id"
13
+                :label="item.name"
14
+                :value="item.id">
15
+              </el-option>
16
+          </el-select>
17
+          <span>仓库名称:</span>
18
+          <el-select v-model="storehouse_id" style="width:200px;margin-right:10px;" placeholder="请选择"
19
+          filterable
20
+           @change="changeStorehouseName">
21
+            <el-option
22
+              v-for="item in houseList"
23
+              :key="item.id"
24
+              :label="item.storehouse_name"
25
+              :value="item.id">
26
+            </el-option>
27
+          </el-select>
28
+          <el-input v-model="keyword" style="width:200px" placeholder="请输入耗材名称或生产厂商" ></el-input>
29
+          <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
30
+         </div>
31
+        </div>
32
+           <el-table
33
+            :row-style="{ color: '#303133' }"
34
+            :header-cell-style="{
35
+              backgroundColor: 'rgb(245, 247, 250)',
36
+              color: '#606266'
37
+            }"
38
+            :data="tableList"
39
+            :class="signAndWeighBoxPatients"
40
+            border
41
+          >
42
+            <el-table-column label="耗材类型" align="center">
43
+              <template slot-scope="scope">
44
+                 {{getGoodTypeName(scope.row.GoodInfo.good_type_id)}}
45
+              </template>
46
+            </el-table-column>
47
+            <el-table-column label="耗材名称" align="center">
48
+              <template slot-scope="scope">
49
+                 {{scope.row.GoodInfo.good_name}}
50
+              </template>
51
+            </el-table-column>
52
+            <el-table-column label="规格&单位" align="center">
53
+                <template slot-scope="scope">
54
+                   {{scope.row.GoodInfo.specification_name}}
55
+                </template>
56
+            </el-table-column>
57
+            <el-table-column label="生产厂商" align="center">
58
+              <template slot-scope="scope">
59
+                 {{getManufacturName(scope.row.manufacturer)}}
60
+              </template>
61
+            </el-table-column>
62
+            <el-table-column label="进货价" align="center">
63
+              <template slot-scope="scope">
64
+                 {{scope.row.price}}
65
+              </template>
66
+            </el-table-column>
67
+            <el-table-column label="库存" align="center">
68
+              <template slot-scope="scope">
69
+                 {{scope.row.stock_count}}
70
+              </template>
71
+            </el-table-column>
72
+        
73
+            <el-table-column label="批号" align="center">
74
+              <template slot-scope="scope">
75
+                 {{scope.row.number}}
76
+               </template>
77
+            </el-table-column>
78
+          
79
+            <el-table-column label="有效期" align="center">
80
+              <template slot-scope="scope">
81
+                {{getTime(scope.row.expiry_date)}}
82
+             </template>
83
+            </el-table-column>
84
+
85
+            <el-table-column label="剩余天数" align="center">
86
+              <template slot-scope="scope">
87
+                {{getDaysBetween(getTime(scope.row.expiry_date),getTime(nowtime))}}
88
+              </template>
89
+            </el-table-column>
90
+          </el-table>
91
+           <el-pagination
92
+            @size-change="handleSizeChange"
93
+            @current-change="handleCurrentChange"
94
+            :page-sizes="[10, 50, 100,200,500,1000]"
95
+            :page-size="10"
96
+            background
97
+            align="right"
98
+            style="margin-top:20px;"
99
+            layout="total, sizes, prev, pager, next, jumper"
100
+            :total="total"
101
+          >
102
+            </el-pagination>
5 103
      </div>
104
+
105
+
106
+
107
+   
108
+
6 109
   </div>
7
-</template>
110
+</template>
111
+<script>
112
+import { getStorehouseList,getGoodExpiryDateQuery,getGoodWarehouseOutInfoById } from "@/api/drug/drug"
113
+import {
114
+  getStockDrugCount
115
+} from "@/api/stock";
116
+import { uParseTime } from '@/utils/tools'
117
+import moment from 'moment';
118
+export default {
119
+
120
+  data(){
121
+    return{
122
+     tableList:[],
123
+     goodList:[
124
+      {id:1,name:"全部耗材"},
125
+      {id:2,name:"库存预警"},
126
+     ],
127
+     houseList:[],
128
+     storehouse_id:0,
129
+     good_type:1,
130
+     multipleSelection: [],
131
+     signAndWeighBoxPatients: "sign-and-weigh-box-patients",
132
+     manufacturerList:[],
133
+     limit:10,
134
+     page:1,
135
+     total:0,
136
+     limitone:10,
137
+     pageone:1,
138
+     totalone:0,
139
+     keyword:"",
140
+     goodTypeList:[],
141
+     start_time:"",
142
+     end_time:"",
143
+     countList:[],
144
+     outCountList:[],
145
+     autoCountList:[],
146
+     cancelCountList:[],
147
+     org_id:this.$store.getters.xt_user.org_id,
148
+     dialogVisible:false,
149
+     start_first_time:"",
150
+     end_first_time:"",
151
+     tableData:[],
152
+     good_id:0,
153
+     patientList:[],
154
+     good_name:"",
155
+     specification_name:"",
156
+     expiry_type:0,
157
+     expriyList:[
158
+      {id:0,name:"全部"},
159
+      {id:1,name:"已过期"},
160
+      {id:2,name:"30天内过期"},
161
+      {id:3,name:"90天内过期"},
162
+      {id:4,name:"180天内过期"},
163
+      {id:5,name:"1年内过期"},
164
+     ],
165
+     nowtime:0,
166
+     start_time:"",
167
+    }
168
+  
169
+  },
170
+  methods:{
171
+    changeStorehouseName(){
172
+      this.getlist()
173
+    },
174
+    changeGoodName(){
175
+
176
+    },
177
+    getStorehouseList(){
178
+      getStorehouseList().then(response=>{
179
+         if(response.data.state == 1){
180
+           var houseList = response.data.data.list
181
+           var obj = {id:0,storehouse_name:"全部"}
182
+           this.houseList.push(obj)
183
+           for(let i=0;i<houseList.length;i++){
184
+             this.houseList.push(houseList[i])
185
+           }
186
+           this.manufacturerList = response.data.data.manufacturerList
187
+           this.goodTypeList = response.data.data.goodTypeList
188
+           this.patientList = response.data.data.patientList
189
+         }
190
+      })
191
+    },
192
+    getlist(){
193
+        var params = {
194
+          storehouse_id:this.storehouse_id,
195
+          expiry_type:this.expiry_type,
196
+          keyword:this.keyword,
197
+          page:this.page,
198
+          limit:this.limit,
199
+          start_time:this.start_time,
200
+        }
201
+      getGoodExpiryDateQuery(params).then(response=>{
202
+         if(response.data.state == 1){
203
+            var list = response.data.data.list
204
+            this.tableList = list
205
+            var manufacturerList = response.data.data.manufacturerList
206
+            this.manufacturerList = manufacturerList
207
+            this.total = response.data.data.total
208
+            this.nowtime = response.data.data.nowtime
209
+         }
210
+      })
211
+    },
212
+    getManufacturName(id){
213
+      var manufacturer_name = ""
214
+      for(let i=0;i<this.manufacturerList.length;i++){
215
+        if(id == this.manufacturerList[i].id){
216
+           manufacturer_name = this.manufacturerList[i].manufacturer_name
217
+        }
218
+      }
219
+      return manufacturer_name
220
+    },
221
+    handleSizeChange(val) {
222
+      this.limit = val;
223
+      this.getlist()
224
+    },
225
+    handleCurrentChange(val) {
226
+      this.page = val;
227
+      this.getlist()
228
+    },
229
+    handleSizeChangeOne(val) {
230
+      this.limitone = val;
231
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
232
+    },
233
+    handleCurrentChangeOne(val) {
234
+      this.pageone = val;
235
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
236
+    },
237
+   seach(){
238
+    this.getlist()
239
+   },
240
+   getGoodTypeName(id){
241
+     var type_name = ""
242
+     for(let i=0;i<this.goodTypeList.length;i++){
243
+       if(id == this.goodTypeList[i].id){
244
+         type_name = this.goodTypeList[i].type_name
245
+       }
246
+     }
247
+     return type_name
248
+   },
249
+   getHouseName(id){
250
+     var storehouse_name = ""
251
+     for(let i=0;i<this.houseList.length;i++){
252
+       if(id == this.houseList[i].id){
253
+         storehouse_name = this.houseList[i].storehouse_name
254
+       }
255
+     }
256
+     return storehouse_name
257
+   },
258
+   getWareInfoCount(val,storehouse_id){
259
+     var count = 0
260
+     if(val.length > 0){
261
+       for(let i=0;i<val.length;i++){
262
+         if(val[i].storehouse_id == storehouse_id){
263
+             count +=val[i].warehousing_count
264
+         }
265
+       }
266
+     }
267
+     if(count > 0){
268
+       return count
269
+     }else{
270
+       return ""
271
+     }
272
+   },
273
+   getStockDrugCount(){
274
+        var params ={
275
+           keywords: this.keywords,
276
+           start_time:this.start_time,
277
+           end_time:this.end_time,
278
+        }
279
+      getStockDrugCount(params).then(response=>{
280
+         if(response.data.state == 1){
281
+           var outlist = response.data.data.outList
282
+           this.outCountList = outlist
283
+           var autoCount = response.data.data.autoCount
284
+           this.autoCountList = autoCount
285
+           var totalCount = response.data.data.totalCount
286
+           this.cancelCountList = totalCount
287
+         }
288
+      })
289
+    },
290
+    getWareInfoCountOne(val,storehouse_id){
291
+     var count = 0
292
+     if(val.length > 0){
293
+       for(let i=0;i<val.length;i++){
294
+         if(val[i].storehouse_id == storehouse_id){
295
+             count +=val[i].stock_count
296
+         }
297
+       }
298
+     }
299
+     if(count > 0){
300
+       return count
301
+     }else{
302
+       return ""
303
+     }
304
+   },
305
+   getOutCount(id){
306
+      var count = 0
307
+      for(let i=0;i<this.outCountList.length;i++){
308
+         if(id == this.outCountList[i].good_id){
309
+           count = this.outCountList[i].count
310
+         }
311
+      }
312
+     return count
313
+   },
314
+   getAutoCount(id){
315
+     var count= 0
316
+     for(let i=0;i<this.autoCountList.length;i++){
317
+       if(id == this.autoCountList[i].good_id){
318
+         count = this.autoCountList[i].count
319
+       }
320
+     }
321
+     return count
322
+   },
323
+   getCancelCount(id){
324
+     var count = 0
325
+     for(let i=0;i<this.cancelCountList.length;i++){
326
+       if(id == this.cancelCountList[i].good_id){
327
+          count = this.cancelCountList[i].count
328
+       }
329
+     }
330
+     return count
331
+   },
332
+   getCancelCountInfo(cancel_stock_info,storehouse_id){
333
+     var count = 0 
334
+     if(cancel_stock_info.length >0){
335
+        for(let i=0;i<cancel_stock_info.length;i++){
336
+          if(storehouse_id ==  cancel_stock_info[i].storehouse_id){
337
+              count += cancel_stock_info[i].count
338
+          }
339
+        }
340
+     }
341
+     return count
342
+   },
343
+   getWareOutInfoCount(warehouse_out_info,storehouse_id){
344
+     var count = 0
345
+     if(warehouse_out_info.length > 0){
346
+       for(let i=0;i<warehouse_out_info.length;i++){
347
+         if(storehouse_id == warehouse_out_info[i].storehouse_id){
348
+            count +=warehouse_out_info[i].count
349
+         }
350
+       }
351
+     }
352
+     return count
353
+   },
354
+   getInCount(id){
355
+      var count= 0
356
+     for(let i=0;i<this.countList.length;i++){
357
+      if(id == this.countList[i].good_id){
358
+          count = this.countList[i].count
359
+      }
360
+     }
361
+     return count
362
+    },
363
+    getOutCount(id){
364
+      var count = 0
365
+      for(let i=0;i<this.outCountList.length;i++){
366
+         if(id == this.outCountList[i].good_id){
367
+           count = this.outCountList[i].count
368
+         }
369
+      }
370
+     return count
371
+   },
372
+   getAutoCount(id){
373
+     var count= 0
374
+     for(let i=0;i<this.autoCountList.length;i++){
375
+       if(id == this.autoCountList[i].good_id){
376
+         count = this.autoCountList[i].count
377
+       }
378
+     }
379
+     return count
380
+   },
381
+   getCancelCount(id){
382
+     var count = 0
383
+     for(let i=0;i<this.cancelCountList.length;i++){
384
+       if(id == this.cancelCountList[i].good_id){
385
+          count = this.cancelCountList[i].count
386
+       }
387
+     }
388
+     return count
389
+   },
390
+   getStockCount(id){
391
+     var stock_count = 0
392
+     for(let i=0;i<this.countList.length;i++){
393
+       if(id == this.countList[i].good_id){
394
+         stock_count = this.countList[i].stock_count
395
+       }
396
+     }
397
+     return stock_count
398
+   },
399
+   getWareInfo(arr){
400
+     var total = 0
401
+     if(arr.length > 0){
402
+       for(let i=0;i<arr.length;i++){
403
+         total += parseInt(arr[i].warehousing_count)
404
+       }
405
+     }else{
406
+       total = ""
407
+     }
408
+     return total
409
+   },
410
+   getOverplus(arr){
411
+     var total = 0
412
+     if(arr.length > 0){
413
+      for(let i=0;i<arr.length;i++){
414
+        total += arr[i].stock_count
415
+      }
416
+     }else{
417
+       total = ""
418
+     }
419
+     return total
420
+   },
421
+   getCancelInfo(arr){
422
+     var total = 0
423
+     if(arr.length > 0){
424
+      for(let i=0;i<arr.length;i++){
425
+        total += arr[i].count
426
+      }
427
+     }else{
428
+       total = ""
429
+     }
430
+     return total
431
+   },
432
+   getOverFlushInfo(arr){
433
+     var total = 0
434
+     if(arr.length >0){
435
+      for(let i=0;i<arr.length;i++){
436
+        total += arr[i].stock_count
437
+      }
438
+     }
439
+     return total
440
+   },
441
+   toDialogClick(id,good_name,specification_name){
442
+    this.good_id = id
443
+    this.good_name = good_name
444
+    this.specification_name = specification_name
445
+     var params = {
446
+       good_id:id,
447
+       limit:this.limitone,
448
+       page:this.pageone,
449
+       start_first_time:this.start_first_time,
450
+       end_first_time:this.end_first_time,
451
+     }
452
+     getGoodWarehouseOutInfoById(params).then(response=>{
453
+       if(response.data.state == 1){
454
+         var list = response.data.data.list
455
+         console.log("list23233233232w",list)
456
+         this.tableList = list
457
+         this.tableData = list
458
+         this.totalone = response.data.data.total
459
+         this.dialogVisible = true
460
+       }
461
+     })
462
+   
463
+   },
464
+   startFirstTimeChange(){
465
+    
466
+   },
467
+   endEndTimeChange(){
468
+
469
+   },
470
+  getTime(val) {
471
+    if(val < 0){
472
+      return ""
473
+    }
474
+   if(val == ""){
475
+     return ""
476
+   }else {
477
+    return uParseTime(val, '{y}-{m}-{d}')
478
+   }
479
+   },
480
+  getName(id){
481
+    var name = ""
482
+    for(let i=0;i<this.patientList.length;i++){
483
+      if(id == this.patientList[i].id){
484
+        name = this.patientList[i].name
485
+      }
486
+    }
487
+    return name
488
+  },
489
+  getDaysBetween(dateString1, dateString2) {
490
+    let startDate = Date.parse(dateString1);
491
+    let endDate = Date.parse(dateString2);
492
+    return (startDate - endDate ) / (1 * 24 * 60 * 60 * 1000);
493
+  },
494
+  changeExpriyList(val){
495
+   
496
+    if(val ==0){
497
+     this.start_time = ""
498
+     this.getlist()
499
+    }
500
+    //已过期
501
+    if(val == 1){
502
+      this.getlist()
503
+    }
504
+    //30天内过期
505
+    if(val == 2){
506
+      var time = this.addDate(this.getTime(this.nowtime),30)
507
+      this.start_time = time
508
+      this.getlist()
509
+    }
510
+    //90天内过期
511
+    if(val == 3){
512
+       var time = this.addDate(this.getTime(this.nowtime),90)
513
+      this.start_time = time
514
+      this.getlist()
515
+    }
516
+    //180天内过期
517
+    if(val == 4){
518
+       var time = this.addDate(this.getTime(this.nowtime),180)
519
+       this.start_time = time
520
+    }
521
+    //1年以后
522
+    if(val == 5){
523
+       var time = this.addDate(this.getTime(this.nowtime),365)
524
+       this.start_time = time
525
+       this.getlist()
526
+    }
527
+  
528
+  },
529
+  addDate(date, days) {
530
+    var date = new Date(date);
531
+    date.setDate(date.getDate() + days);
532
+    var year = date.getFullYear();
533
+    var month = date.getMonth() + 1;
534
+    var day = date.getDate();
535
+    var mm = "'" + month + "'";
536
+    var dd = "'" + day + "'";
537
+    if(mm.length == 3) {
538
+      month = "0" + month;
539
+    }
540
+    if(dd.length == 3) {
541
+      day = "0" + day;
542
+    }
543
+    var time = year + "-" + month + "-" + day
544
+    return time;
545
+  },
546
+  },
547
+  created(){
548
+    this.getStorehouseList()
549
+    this.getlist()
550
+  }
551
+}
552
+</script>
553
+

+ 531 - 2
src/xt_pages/stock/query/purchaseStockQuery.vue Прегледај датотеку

@@ -1,7 +1,536 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
      <div class="app-container ">
4
-        进销存 库存查询喔喔喔
4
+        <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
5
+         <div>
6
+          <span>操作时间:</span>
7
+          <el-date-picker
8
+            size="small"
9
+            v-model="start_time"
10
+            prefix-icon="el-icon-date"
11
+            :editable="false"
12
+            style="width: 150px;"
13
+            type="date"
14
+            placeholder="选择日期时间"
15
+            align="right"
16
+            format="yyyy-MM-dd"
17
+            value-format="yyyy-MM-dd"
18
+            @change="startTimeChange"
19
+           ></el-date-picker> 
20
+            <span>-</span> 
21
+            <el-date-picker
22
+              size="small"
23
+              v-model="end_time"
24
+              prefix-icon="el-icon-date"
25
+              :editable="false"
26
+              style="width: 150px;"
27
+              type="date"
28
+              placeholder="选择日期时间"
29
+              align="right"
30
+              format="yyyy-MM-dd"
31
+              value-format="yyyy-MM-dd"
32
+              @change="endTimeChange"
33
+          ></el-date-picker>  
34
+          <span>耗材类型:</span>
35
+          <el-select v-model="good_type" style="width:200px;margin-right:10px;" placeholder="请选择"
36
+          filterable
37
+           @change="changeGoodTypeName">
38
+            <el-option
39
+              v-for="item in goodTypeList"
40
+              :key="item.id"
41
+              :label="item.type_name"
42
+              :value="item.id">
43
+            </el-option>
44
+          </el-select>
45
+          <el-input v-model="keyword" style="width:200px" placeholder="请输入耗材名称或生产厂商" ></el-input>
46
+          <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
47
+         </div>
48
+        </div>
49
+
50
+           <el-table
51
+            :row-style="{ color: '#303133' }"
52
+            :header-cell-style="{
53
+              backgroundColor: 'rgb(245, 247, 250)',
54
+              color: '#606266'
55
+            }"
56
+            :data="tableList"
57
+            :class="signAndWeighBoxPatients"
58
+            border
59
+          >
60
+            <el-table-column label="耗材类型" align="center">
61
+              <template slot-scope="scope">
62
+                 {{getGoodTypeName(scope.row.good_type_id)}}
63
+              </template>
64
+            </el-table-column>
65
+            <el-table-column label="耗材名称" align="center">
66
+              <template slot-scope="scope">
67
+                {{scope.row.good_name}}
68
+              </template>
69
+            </el-table-column>
70
+            <el-table-column label="规格&单位" align="center">
71
+                <template slot-scope="scope">
72
+                  {{scope.row.specification_name}}
73
+                </template>
74
+            </el-table-column>
75
+            <el-table-column label="生产厂商" align="center">
76
+              <template slot-scope="scope">
77
+                 {{getManufacturName(scope.row.manufacturer)}}
78
+              </template>
79
+            </el-table-column>
80
+            <el-table-column label="期初结余" align="center">
81
+                 <el-table-column
82
+                    prop="province"
83
+                    label="数量"
84
+                    width="100">
85
+                 </el-table-column>
86
+                <el-table-column
87
+                  prop="city"
88
+                  label="进货金额"
89
+                  width="100">
90
+                </el-table-column>
91
+                <el-table-column
92
+                  prop="address"
93
+                  label="销售金额"
94
+                  width="100">
95
+                </el-table-column>
96
+            </el-table-column>
97
+            <el-table-column label="本期增加" align="center">
98
+              <el-table-column
99
+                    prop="province"
100
+                    label="数量"
101
+                    width="100">
102
+                 </el-table-column>
103
+                <el-table-column
104
+                  prop="city"
105
+                  label="进货金额"
106
+                  width="100">
107
+                </el-table-column>
108
+                <el-table-column
109
+                  prop="address"
110
+                  label="销售金额"
111
+                  width="100">
112
+                </el-table-column>
113
+            </el-table-column>
114
+        
115
+            <el-table-column label="本期减少" align="center">
116
+               <el-table-column
117
+                    prop="province"
118
+                    label="数量"
119
+                    width="100">
120
+                 </el-table-column>
121
+                <el-table-column
122
+                  prop="city"
123
+                  label="进货金额"
124
+                  width="100">
125
+                </el-table-column>
126
+                <el-table-column
127
+                  prop="address"
128
+                  label="销售金额"
129
+                  width="100">
130
+                </el-table-column>
131
+            </el-table-column>
132
+          
133
+            <el-table-column label="期末结余" align="center">
134
+              <el-table-column
135
+                    prop="province"
136
+                    label="数量"
137
+                    width="100">
138
+                 </el-table-column>
139
+                <el-table-column
140
+                  prop="city"
141
+                  label="进货金额"
142
+                  width="100">
143
+                </el-table-column>
144
+                <el-table-column
145
+                  prop="address"
146
+                  label="销售金额"
147
+                  width="100">
148
+                </el-table-column>
149
+            </el-table-column>
150
+
151
+          
152
+          </el-table>
153
+           <el-pagination
154
+            @size-change="handleSizeChange"
155
+            @current-change="handleCurrentChange"
156
+            :page-sizes="[10, 50, 100,200,500,1000]"
157
+            :page-size="10"
158
+            background
159
+            align="right"
160
+            style="margin-top:20px;"
161
+            layout="total, sizes, prev, pager, next, jumper"
162
+            :total="total"
163
+          >
164
+            </el-pagination>
5 165
      </div>
166
+
167
+
168
+
169
+  
170
+
6 171
   </div>
7
-</template>
172
+</template>
173
+<script>
174
+import { getStorehouseList,getPurchaseStockQuery } from "@/api/drug/drug"
175
+import {
176
+  getStockDrugCount
177
+} from "@/api/stock";
178
+import { uParseTime } from '@/utils/tools'
179
+export default {
180
+
181
+  data(){
182
+    return{
183
+     tableList:[],
184
+     goodList:[
185
+      {id:1,name:"全部耗材"},
186
+      {id:2,name:"库存预警"},
187
+     ],
188
+     houseList:[],
189
+     storehouse_id:0,
190
+     good_type:0,
191
+     multipleSelection: [],
192
+     signAndWeighBoxPatients: "sign-and-weigh-box-patients",
193
+     manufacturerList:[],
194
+     limit:10,
195
+     page:1,
196
+     total:0,
197
+     keyword:"",
198
+     goodTypeList:[],
199
+     start_time:"",
200
+     end_time:"",
201
+     countList:[],
202
+     outCountList:[],
203
+     autoCountList:[],
204
+     cancelCountList:[],
205
+     org_id:this.$store.getters.xt_user.org_id,
206
+     dialogVisible:false,
207
+     start_first_time:"",
208
+     end_first_time:"",
209
+     tableData:[],
210
+     good_id:0,
211
+     patientList:[],
212
+     good_name:"",
213
+     specification_name:""
214
+    }
215
+  
216
+  },
217
+  methods:{
218
+    changeStorehouseName(){
219
+
220
+    },
221
+    changeGoodTypeName(){
222
+      this.getlist()
223
+    },
224
+    changeGoodName(){
225
+
226
+    },
227
+    getStorehouseList(){
228
+      getStorehouseList().then(response=>{
229
+         if(response.data.state == 1){
230
+           var houseList = response.data.data.list
231
+           var obj = {id:0,storehouse_name:"全部"}
232
+           this.houseList.push(obj)
233
+           for(let i=0;i<houseList.length;i++){
234
+             this.houseList.push(houseList[i])
235
+           }
236
+           this.manufacturerList = response.data.data.manufacturerList
237
+           var obj = {id:0,type_name:"全部"}
238
+           this.goodTypeList.push(obj)
239
+           var goodTypeList = response.data.data.goodTypeList
240
+           for(let i=0;i<goodTypeList.length;i++){
241
+             this.goodTypeList.push(goodTypeList[i])
242
+            }
243
+           this.patientList = response.data.data.patientList
244
+         }
245
+      })
246
+    },
247
+    getlist(){
248
+        var params = {
249
+          good_type:this.good_type,
250
+          keyword:this.keyword,
251
+          page:this.page,
252
+          limit:this.limit,
253
+          start_time:this.start_time,
254
+          end_time:this.end_time,
255
+        }
256
+      getPurchaseStockQuery(params).then(response=>{
257
+         if(response.data.state == 1){
258
+            var list = response.data.data.list
259
+            this.tableList = list
260
+            this.total = response.data.data.total
261
+
262
+           this.manufacturerList = response.data.data.manufacturerList
263
+           
264
+         }
265
+      })
266
+    },
267
+    getManufacturName(id){
268
+      var manufacturer_name = ""
269
+      for(let i=0;i<this.manufacturerList.length;i++){
270
+        if(id == this.manufacturerList[i].id){
271
+           manufacturer_name = this.manufacturerList[i].manufacturer_name
272
+        }
273
+      }
274
+      return manufacturer_name
275
+    },
276
+    handleSizeChange(val) {
277
+      this.limit = val;
278
+      this.getlist()
279
+    },
280
+    handleCurrentChange(val) {
281
+      this.page = val;
282
+      this.getlist()
283
+    },
284
+    handleSizeChangeOne(val) {
285
+      this.limitone = val;
286
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
287
+    },
288
+    handleCurrentChangeOne(val) {
289
+      this.pageone = val;
290
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
291
+    },
292
+   seach(){
293
+    this.getlist()
294
+   },
295
+   getGoodTypeName(id){
296
+     var type_name = ""
297
+     for(let i=0;i<this.goodTypeList.length;i++){
298
+       if(id == this.goodTypeList[i].id){
299
+         type_name = this.goodTypeList[i].type_name
300
+       }
301
+     }
302
+     return type_name
303
+   },
304
+   getHouseName(id){
305
+     var storehouse_name = ""
306
+     for(let i=0;i<this.houseList.length;i++){
307
+       if(id == this.houseList[i].id){
308
+         storehouse_name = this.houseList[i].storehouse_name
309
+       }
310
+     }
311
+     return storehouse_name
312
+   },
313
+   getWareInfoCount(val,storehouse_id){
314
+     var count = 0
315
+     if(val.length > 0){
316
+       for(let i=0;i<val.length;i++){
317
+         if(val[i].storehouse_id == storehouse_id){
318
+             count +=val[i].warehousing_count
319
+         }
320
+       }
321
+     }
322
+     if(count > 0){
323
+       return count
324
+     }else{
325
+       return ""
326
+     }
327
+   },
328
+   getStockDrugCount(){
329
+        var params ={
330
+           keywords: this.keywords,
331
+           start_time:this.start_time,
332
+           end_time:this.end_time,
333
+        }
334
+      getStockDrugCount(params).then(response=>{
335
+         if(response.data.state == 1){
336
+           var outlist = response.data.data.outList
337
+           this.outCountList = outlist
338
+           var autoCount = response.data.data.autoCount
339
+           this.autoCountList = autoCount
340
+           var totalCount = response.data.data.totalCount
341
+           this.cancelCountList = totalCount
342
+         }
343
+      })
344
+    },
345
+    getWareInfoCountOne(val,storehouse_id){
346
+     var count = 0
347
+     if(val.length > 0){
348
+       for(let i=0;i<val.length;i++){
349
+         if(val[i].storehouse_id == storehouse_id){
350
+             count +=val[i].stock_count
351
+         }
352
+       }
353
+     }
354
+     if(count > 0){
355
+       return count
356
+     }else{
357
+       return ""
358
+     }
359
+   },
360
+   getOutCount(id){
361
+      var count = 0
362
+      for(let i=0;i<this.outCountList.length;i++){
363
+         if(id == this.outCountList[i].good_id){
364
+           count = this.outCountList[i].count
365
+         }
366
+      }
367
+     return count
368
+   },
369
+   getAutoCount(id){
370
+     var count= 0
371
+     for(let i=0;i<this.autoCountList.length;i++){
372
+       if(id == this.autoCountList[i].good_id){
373
+         count = this.autoCountList[i].count
374
+       }
375
+     }
376
+     return count
377
+   },
378
+   getCancelCount(id){
379
+     var count = 0
380
+     for(let i=0;i<this.cancelCountList.length;i++){
381
+       if(id == this.cancelCountList[i].good_id){
382
+          count = this.cancelCountList[i].count
383
+       }
384
+     }
385
+     return count
386
+   },
387
+   getCancelCountInfo(cancel_stock_info,storehouse_id){
388
+     var count = 0 
389
+     if(cancel_stock_info.length >0){
390
+        for(let i=0;i<cancel_stock_info.length;i++){
391
+          if(storehouse_id ==  cancel_stock_info[i].storehouse_id){
392
+              count += cancel_stock_info[i].count
393
+          }
394
+        }
395
+     }
396
+     return count
397
+   },
398
+   getWareOutInfoCount(warehouse_out_info,storehouse_id){
399
+     var count = 0
400
+     if(warehouse_out_info.length > 0){
401
+       for(let i=0;i<warehouse_out_info.length;i++){
402
+         if(storehouse_id == warehouse_out_info[i].storehouse_id){
403
+            count +=warehouse_out_info[i].count
404
+         }
405
+       }
406
+     }
407
+     return count
408
+   },
409
+   getInCount(id){
410
+      var count= 0
411
+     for(let i=0;i<this.countList.length;i++){
412
+      if(id == this.countList[i].good_id){
413
+          count = this.countList[i].count
414
+      }
415
+     }
416
+     return count
417
+    },
418
+    getOutCount(id){
419
+      var count = 0
420
+      for(let i=0;i<this.outCountList.length;i++){
421
+         if(id == this.outCountList[i].good_id){
422
+           count = this.outCountList[i].count
423
+         }
424
+      }
425
+     return count
426
+   },
427
+   getAutoCount(id){
428
+     var count= 0
429
+     for(let i=0;i<this.autoCountList.length;i++){
430
+       if(id == this.autoCountList[i].good_id){
431
+         count = this.autoCountList[i].count
432
+       }
433
+     }
434
+     return count
435
+   },
436
+   getCancelCount(id){
437
+     var count = 0
438
+     for(let i=0;i<this.cancelCountList.length;i++){
439
+       if(id == this.cancelCountList[i].good_id){
440
+          count = this.cancelCountList[i].count
441
+       }
442
+     }
443
+     return count
444
+   },
445
+   getStockCount(id){
446
+     var stock_count = 0
447
+     for(let i=0;i<this.countList.length;i++){
448
+       if(id == this.countList[i].good_id){
449
+         stock_count = this.countList[i].stock_count
450
+       }
451
+     }
452
+     return stock_count
453
+   },
454
+   getWareInfo(arr){
455
+     var total = 0
456
+     if(arr.length > 0){
457
+       for(let i=0;i<arr.length;i++){
458
+         total += parseInt(arr[i].warehousing_count)
459
+       }
460
+     }else{
461
+       total = ""
462
+     }
463
+     return total
464
+   },
465
+   getOverplus(arr){
466
+     var total = 0
467
+     if(arr.length > 0){
468
+      for(let i=0;i<arr.length;i++){
469
+        total += arr[i].stock_count
470
+      }
471
+     }else{
472
+       total = ""
473
+     }
474
+     return total
475
+   },
476
+   getCancelInfo(arr){
477
+     var total = 0
478
+     if(arr.length > 0){
479
+      for(let i=0;i<arr.length;i++){
480
+        total += arr[i].count
481
+      }
482
+     }else{
483
+       total = ""
484
+     }
485
+     return total
486
+   },
487
+   getOverFlushInfo(arr){
488
+     var total = 0
489
+     if(arr.length >0){
490
+      for(let i=0;i<arr.length;i++){
491
+        total += arr[i].stock_count
492
+      }
493
+     }
494
+     return total
495
+   },
496
+  
497
+   startFirstTimeChange(){
498
+    
499
+   },
500
+   endEndTimeChange(){
501
+
502
+   },
503
+  getTime(val) {
504
+    if(val < 0){
505
+      return ""
506
+    }
507
+   if(val == ""){
508
+     return ""
509
+   }else {
510
+    return uParseTime(val, '{y}-{m}-{d}')
511
+   }
512
+   },
513
+  getName(id){
514
+    var name = ""
515
+    for(let i=0;i<this.patientList.length;i++){
516
+      if(id == this.patientList[i].id){
517
+        name = this.patientList[i].name
518
+      }
519
+    }
520
+    return name
521
+  },
522
+  endTimeChange(){
523
+
524
+  },
525
+  startTimeChange(){
526
+
527
+  }
528
+  },
529
+  created(){
530
+    this.getStorehouseList()
531
+    this.getlist()
532
+    this.getStockDrugCount()
533
+  }
534
+}
535
+</script>
536
+

+ 22 - 15
src/xt_pages/user/components/PatientDetail.vue Прегледај датотеку

@@ -346,6 +346,19 @@
346 346
               </el-form-item>
347 347
             </el-col>
348 348
 
349
+            <el-col :span="24">
350
+                <el-form-item label="诊疗计划 : " prop="diagnose">
351
+                  <el-input
352
+                    type="textarea"
353
+                    :rows="3"
354
+                    v-model="form.treatment_plan"
355
+                    resize="none"
356
+                    placeholder
357
+                    readonly
358
+                  ></el-input>
359
+                </el-form-item>
360
+             </el-col>
361
+
349 362
             <el-col :span="8">
350 363
               <el-form-item label="民族 : " prop="nation">
351 364
                 <el-input
@@ -867,7 +880,7 @@
867 880
                     </div>
868 881
                   </td>
869 882
                   <td valign="top">
870
-                    <div class="td_proj_title">备用电话</div>
883
+                    <div class="td_proj_title">家属电话</div>
871 884
                   </td>
872 885
                   <td valign="top">
873 886
                     <div class="td_proj_content td_align_left">
@@ -915,7 +928,7 @@
915 928
                     ></div>
916 929
                   </td>
917 930
                 </tr>
918
-                <tr v-if="org_id==10090||org_id==0||org_id==9675">
931
+                <tr>
919 932
                   <td>
920 933
                     <div class="td_proj_title">传<br />染<br />病</div>
921 934
                   </td>
@@ -925,6 +938,7 @@
925 938
                     </div>
926 939
                   </td>
927 940
                 </tr>
941
+              
928 942
                 <tr>
929 943
                   <td colspan="8"><div class="td_proj_title">体格检查</div></td>
930 944
                 </tr>
@@ -953,16 +967,7 @@
953 967
                     ></div>
954 968
                   </td>
955 969
                 </tr>
956
-                <tr v-if="org_id!=10090&&org_id!=0&&org_id!=9675">
957
-                  <td>
958
-                    <div class="td_proj_title">传<br />染<br />病</div>
959
-                  </td>
960
-                  <td colspan="7">
961
-                    <div class="td_proj_content td_align_left">
962
-                      {{ patientPrint.contagions }}
963
-                    </div>
964
-                  </td>
965
-                </tr>
970
+             
966 971
                 <tr>
967 972
                   <td>
968 973
                     <div class="td_proj_title">诊<br />断</div>
@@ -974,14 +979,14 @@
974 979
                     ></div>
975 980
                   </td>
976 981
                 </tr>
977
-                <tr v-if="org_id==10090||org_id==0||org_id==9675">
982
+                <tr>
978 983
                   <td>
979 984
                     <div class="td_proj_title">诊<br />疗<br />计<br />划</div>
980 985
                   </td>
981 986
                   <td colspan="7">
982 987
                     <div
983 988
                       class="td_proj_content td_align_left"
984
-                      v-html="patientPrint.diagnose"
989
+                      v-html="patientPrint.treatment_plan"
985 990
                     ></div>
986 991
                   </td>
987 992
                 </tr>
@@ -1118,7 +1123,8 @@ const defaultForm = {
1118 1123
   sch_remark:"",
1119 1124
   org_id:0,
1120 1125
   troble_shoot:"",
1121
-  zb_patient_id:""
1126
+  zb_patient_id:"",
1127
+  treatment_plan:"",
1122 1128
 };
1123 1129
 
1124 1130
 export default {
@@ -1310,6 +1316,7 @@ export default {
1310 1316
             // this.form.record_date = patietInfo.is_infectious
1311 1317
             this.form.response_result = patietInfo.response_result;
1312 1318
             this.form.remind_cycle = patietInfo.remind_cycle;
1319
+            this.form.treatment_plan = patietInfo.treatment_plan
1313 1320
             if(patietInfo.is_infectious == 1){
1314 1321
                this.form.remind_cycle = 0
1315 1322
 

+ 14 - 1
src/xt_pages/user/components/PatientForm.vue Прегледај датотеку

@@ -413,6 +413,18 @@
413 413
                 </el-form-item>
414 414
               </el-col>
415 415
 
416
+              <el-col :span="24">
417
+                <el-form-item label="诊疗计划 : " prop="diagnose">
418
+                  <el-input
419
+                    type="textarea"
420
+                    :rows="3"
421
+                    v-model="form.treatment_plan"
422
+                    resize="none"
423
+                    placeholder
424
+                  ></el-input>
425
+                </el-form-item>
426
+              </el-col>
427
+
416 428
               <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
417 429
                 <el-form-item label="民族 : " prop="nation">
418 430
                   <el-input v-model="form.nation" maxlength="30"></el-input>
@@ -1155,6 +1167,7 @@ const defaultForm = {
1155 1167
   sbp: "",
1156 1168
   dbp: "",
1157 1169
   showOne:true,
1170
+  treatment_plan:"",
1158 1171
 };
1159 1172
 
1160 1173
 export default {
@@ -1665,7 +1678,7 @@ export default {
1665 1678
             this.form.work = patietInfo.work_unit;
1666 1679
             this.form.unit_address = patietInfo.unit_address;
1667 1680
             this.form.user_sys_before_count = patietInfo.user_sys_before_count;
1668
-
1681
+            this.form.treatment_plan = patietInfo.treatment_plan
1669 1682
             if (patietInfo.profession > 0) {
1670 1683
               this.form.profession = patietInfo.profession;
1671 1684
             }