|
@@ -0,0 +1,659 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="main-contain">
|
|
3
|
+ <div class="app-container ">
|
|
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="storehouse_id" style="width:200px;margin-right:10px;" placeholder="请选择"
|
|
8
|
+ filterable
|
|
9
|
+ @change="changeStorehouseName">
|
|
10
|
+ <el-option
|
|
11
|
+ v-for="item in houseList"
|
|
12
|
+ :key="item.id"
|
|
13
|
+ :label="item.storehouse_name"
|
|
14
|
+ :value="item.id">
|
|
15
|
+ </el-option>
|
|
16
|
+ </el-select>
|
|
17
|
+ <span>库存预警:</span>
|
|
18
|
+ <el-select v-model="good_type" style="width:250px;margin-right:10px;" placeholder="请选择"
|
|
19
|
+ filterable
|
|
20
|
+ @change="changeGoodName">
|
|
21
|
+ <el-option
|
|
22
|
+ v-for="item in goodList"
|
|
23
|
+ :key="item.id"
|
|
24
|
+ :label="item.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
|
+
|
|
33
|
+ <el-table
|
|
34
|
+ :row-style="{ color: '#303133' }"
|
|
35
|
+ :header-cell-style="{
|
|
36
|
+ backgroundColor: 'rgb(245, 247, 250)',
|
|
37
|
+ color: '#606266'
|
|
38
|
+ }"
|
|
39
|
+ :data="tableList"
|
|
40
|
+ :class="signAndWeighBoxPatients"
|
|
41
|
+ border
|
|
42
|
+ >
|
|
43
|
+ <el-table-column label="药品类型" align="center">
|
|
44
|
+ <template slot-scope="scope">
|
|
45
|
+
|
|
46
|
+ </template>
|
|
47
|
+ </el-table-column>
|
|
48
|
+ <el-table-column label="药品名称" align="center">
|
|
49
|
+ <template slot-scope="scope">
|
|
50
|
+
|
|
51
|
+ </template>
|
|
52
|
+ </el-table-column>
|
|
53
|
+ <el-table-column label="规格&单位" align="center">
|
|
54
|
+ <template slot-scope="scope">
|
|
55
|
+
|
|
56
|
+ </template>
|
|
57
|
+ </el-table-column>
|
|
58
|
+ <el-table-column label="生产厂商" align="center">
|
|
59
|
+ <template slot-scope="scope">
|
|
60
|
+
|
|
61
|
+ </template>
|
|
62
|
+ </el-table-column>
|
|
63
|
+ <el-table-column label="国家编码" align="center">
|
|
64
|
+ <template slot-scope="scope">
|
|
65
|
+
|
|
66
|
+ </template>
|
|
67
|
+ </el-table-column>
|
|
68
|
+ <el-table-column label="仓库名称" align="center">
|
|
69
|
+ <template slot-scope="scope">
|
|
70
|
+ <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
|
|
71
|
+ <td style="border-right: none; border-inline-end: none;text-align: center" >
|
|
72
|
+
|
|
73
|
+ </td>
|
|
74
|
+ </tr>
|
|
75
|
+ </template>
|
|
76
|
+ </el-table-column>
|
|
77
|
+
|
|
78
|
+ <el-table-column label="入库量" align="center">
|
|
79
|
+ <template slot-scope="scope">
|
|
80
|
+ <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
|
|
81
|
+ <td style="border-right: none; border-inline-end: none;text-align: center">
|
|
82
|
+
|
|
83
|
+ </td>
|
|
84
|
+ </tr>
|
|
85
|
+ </template>
|
|
86
|
+ </el-table-column>
|
|
87
|
+
|
|
88
|
+ <el-table-column label="出库量" align="center">
|
|
89
|
+ <template slot-scope="scope">
|
|
90
|
+
|
|
91
|
+ </template>
|
|
92
|
+ </el-table-column>
|
|
93
|
+
|
|
94
|
+ <el-table-column label="退库数量" align="center">
|
|
95
|
+ <template slot-scope="scope">
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+ </template>
|
|
99
|
+ </el-table-column>
|
|
100
|
+
|
|
101
|
+ <el-table-column label="实际出库" align="center">
|
|
102
|
+ <template slot-scope="scope">
|
|
103
|
+
|
|
104
|
+ </template>
|
|
105
|
+ </el-table-column>
|
|
106
|
+
|
|
107
|
+ <el-table-column label="剩余库存" align="center">
|
|
108
|
+
|
|
109
|
+ </el-table-column>
|
|
110
|
+
|
|
111
|
+ <el-table-column label="总库存量" align="center">
|
|
112
|
+
|
|
113
|
+ </el-table-column>
|
|
114
|
+
|
|
115
|
+ <el-table-column label="操作" align="center" width="200px">
|
|
116
|
+
|
|
117
|
+ <template slot-scope="scope">
|
|
118
|
+ <el-button
|
|
119
|
+ size="small"
|
|
120
|
+ type="primary"
|
|
121
|
+ @click="toClick(scope.row)"
|
|
122
|
+ >库存流水
|
|
123
|
+ </el-button>
|
|
124
|
+ <el-button
|
|
125
|
+ size="small"
|
|
126
|
+ type="primary"
|
|
127
|
+ @click="toClickOne(scope.row)"
|
|
128
|
+ >批次
|
|
129
|
+ </el-button>
|
|
130
|
+ </template>
|
|
131
|
+ </el-table-column>
|
|
132
|
+ </el-table>
|
|
133
|
+ <el-pagination
|
|
134
|
+ @size-change="handleSizeChange"
|
|
135
|
+ @current-change="handleCurrentChange"
|
|
136
|
+ :page-sizes="[10, 50, 100,200,500,1000]"
|
|
137
|
+ :page-size="10"
|
|
138
|
+ background
|
|
139
|
+ align="right"
|
|
140
|
+ style="margin-top:20px;"
|
|
141
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
142
|
+ :total="total"
|
|
143
|
+ >
|
|
144
|
+ </el-pagination>
|
|
145
|
+ </div>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+ <el-dialog
|
|
150
|
+ title="出库详情"
|
|
151
|
+ :visible.sync="dialogVisible"
|
|
152
|
+ width="70%">
|
|
153
|
+ <span>
|
|
154
|
+ 耗材名称:{{good_name}}
|
|
155
|
+ 规格&单位:{{specification_name}}
|
|
156
|
+ 查询日期:
|
|
157
|
+ <el-date-picker
|
|
158
|
+ size="small"
|
|
159
|
+ v-model="start_first_time"
|
|
160
|
+ prefix-icon="el-icon-date"
|
|
161
|
+ :editable="false"
|
|
162
|
+ style="width: 150px;"
|
|
163
|
+ type="date"
|
|
164
|
+ placeholder="选择日期时间"
|
|
165
|
+ align="right"
|
|
166
|
+ format="yyyy-MM-dd"
|
|
167
|
+ value-format="yyyy-MM-dd"
|
|
168
|
+ @change="startFirstTimeChange"
|
|
169
|
+ ></el-date-picker>
|
|
170
|
+ <span>-</span>
|
|
171
|
+ <el-date-picker
|
|
172
|
+ size="small"
|
|
173
|
+ v-model="end_first_time"
|
|
174
|
+ prefix-icon="el-icon-date"
|
|
175
|
+ :editable="false"
|
|
176
|
+ style="width: 150px;"
|
|
177
|
+ type="date"
|
|
178
|
+ placeholder="选择日期时间"
|
|
179
|
+ align="right"
|
|
180
|
+ format="yyyy-MM-dd"
|
|
181
|
+ value-format="yyyy-MM-dd"
|
|
182
|
+ @change="endEndTimeChange"
|
|
183
|
+ ></el-date-picker>
|
|
184
|
+ </span>
|
|
185
|
+ <el-divider></el-divider>
|
|
186
|
+ <el-table
|
|
187
|
+ :row-style="{ color: '#303133' }"
|
|
188
|
+ :header-cell-style="{
|
|
189
|
+ backgroundColor: 'rgb(245, 247, 250)',
|
|
190
|
+ color: '#606266'
|
|
191
|
+ }"
|
|
192
|
+ :data="tableData"
|
|
193
|
+ :class="signAndWeighBoxPatients"
|
|
194
|
+ border
|
|
195
|
+ >
|
|
196
|
+ <el-table-column label="单据编号" align="center">
|
|
197
|
+ <template slot-scope="scope">
|
|
198
|
+ {{scope.row.warehouse_out_order_number}}
|
|
199
|
+ </template>
|
|
200
|
+ </el-table-column>
|
|
201
|
+ <el-table-column label="操作时间" align="center">
|
|
202
|
+ <template slot-scope="scope">
|
|
203
|
+ {{getTime(scope.row.ctime)}}
|
|
204
|
+ </template>
|
|
205
|
+ </el-table-column>
|
|
206
|
+ <el-table-column label="出库数量" align="center">
|
|
207
|
+ <template slot-scope="scope">
|
|
208
|
+ {{scope.row.count}}
|
|
209
|
+ </template>
|
|
210
|
+ </el-table-column>
|
|
211
|
+ <el-table-column label="库存数量" align="center">
|
|
212
|
+ <template slot-scope="scope">
|
|
213
|
+
|
|
214
|
+ </template>
|
|
215
|
+ </el-table-column>
|
|
216
|
+ <el-table-column label="使用人" align="center">
|
|
217
|
+ <template slot-scope="scope">
|
|
218
|
+ {{getName(scope.row.patient_id)}}
|
|
219
|
+ </template>
|
|
220
|
+ </el-table-column>
|
|
221
|
+ <el-table-column label="备注" align="center">
|
|
222
|
+ <template slot-scope="scope">
|
|
223
|
+ {{scope.row.remark}}
|
|
224
|
+ </template>
|
|
225
|
+ </el-table-column>
|
|
226
|
+ </el-table>
|
|
227
|
+ <el-pagination
|
|
228
|
+ @size-change="handleSizeChangeOne"
|
|
229
|
+ @current-change="handleCurrentChangeOne"
|
|
230
|
+ :page-sizes="[10, 50, 100,200,500,1000]"
|
|
231
|
+ :page-size="10"
|
|
232
|
+ background
|
|
233
|
+ align="right"
|
|
234
|
+ style="margin-top:20px;"
|
|
235
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
236
|
+ :total="totalone"
|
|
237
|
+ >
|
|
238
|
+ </el-pagination>
|
|
239
|
+ <span slot="footer" class="dialog-footer">
|
|
240
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
241
|
+ <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
242
|
+ </span>
|
|
243
|
+ </el-dialog>
|
|
244
|
+
|
|
245
|
+ </div>
|
|
246
|
+</template>
|
|
247
|
+<script>
|
|
248
|
+import { getStorehouseList,getDrugNewQuery,getGoodWarehouseOutInfoById } from "@/api/drug/drug"
|
|
249
|
+import {
|
|
250
|
+ getStockDrugCount
|
|
251
|
+} from "@/api/stock";
|
|
252
|
+import { uParseTime } from '@/utils/tools'
|
|
253
|
+export default {
|
|
254
|
+
|
|
255
|
+ data(){
|
|
256
|
+ return{
|
|
257
|
+ tableList:[],
|
|
258
|
+ goodList:[
|
|
259
|
+ {id:1,name:"全部耗材"},
|
|
260
|
+ {id:2,name:"库存预警"},
|
|
261
|
+ ],
|
|
262
|
+ houseList:[],
|
|
263
|
+ storehouse_id:0,
|
|
264
|
+ good_type:1,
|
|
265
|
+ multipleSelection: [],
|
|
266
|
+ signAndWeighBoxPatients: "sign-and-weigh-box-patients",
|
|
267
|
+ manufacturerList:[],
|
|
268
|
+ limit:10,
|
|
269
|
+ page:1,
|
|
270
|
+ total:0,
|
|
271
|
+ limitone:10,
|
|
272
|
+ pageone:1,
|
|
273
|
+ totalone:0,
|
|
274
|
+ keyword:"",
|
|
275
|
+ goodTypeList:[],
|
|
276
|
+ start_time:"",
|
|
277
|
+ end_time:"",
|
|
278
|
+ countList:[],
|
|
279
|
+ outCountList:[],
|
|
280
|
+ autoCountList:[],
|
|
281
|
+ cancelCountList:[],
|
|
282
|
+ org_id:this.$store.getters.xt_user.org_id,
|
|
283
|
+ dialogVisible:false,
|
|
284
|
+ start_first_time:"",
|
|
285
|
+ end_first_time:"",
|
|
286
|
+ tableData:[],
|
|
287
|
+ good_id:0,
|
|
288
|
+ patientList:[],
|
|
289
|
+ good_name:"",
|
|
290
|
+ specification_name:""
|
|
291
|
+ }
|
|
292
|
+
|
|
293
|
+ },
|
|
294
|
+ methods:{
|
|
295
|
+ changeStorehouseName(){
|
|
296
|
+
|
|
297
|
+ },
|
|
298
|
+ changeGoodName(){
|
|
299
|
+
|
|
300
|
+ },
|
|
301
|
+ toClick(val){
|
|
302
|
+ var manufacturer_name = ""
|
|
303
|
+ var specification_name = ""
|
|
304
|
+ for(let i=0;i<this.manufacturerList.length;i++){
|
|
305
|
+ if(val.manufacturer == this.manufacturerList[i].id){
|
|
306
|
+ manufacturer_name = this.manufacturerList[i].manufacturer_name
|
|
307
|
+ }
|
|
308
|
+ }
|
|
309
|
+ specification_name = val.specification_name + "/" + val.packing_unit
|
|
310
|
+ var overCount = this.getOverplus(val.xt_warehouse_info)
|
|
311
|
+ // window.sessionStorage.setItem('start_time',this.start_time)
|
|
312
|
+ // window.sessionStorage.setItem('end_time',this.end_time)
|
|
313
|
+ this.$router.push({path:"/stock/in/stockflow?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
|
|
314
|
+ },
|
|
315
|
+ toClickOne(val){
|
|
316
|
+
|
|
317
|
+ var manufacturer_name = ""
|
|
318
|
+ var specification_name = ""
|
|
319
|
+ for(let i=0;i<this.manufacturerList.length;i++){
|
|
320
|
+ if(val.manufacturer == this.manufacturerList[i].id){
|
|
321
|
+ manufacturer_name = this.manufacturerList[i].manufacturer_name
|
|
322
|
+ }
|
|
323
|
+ }
|
|
324
|
+ specification_name = val.specification_name + "/" + val.packing_unit
|
|
325
|
+ var overCount = this.getOverplus(val.xt_warehouse_info)
|
|
326
|
+ // window.sessionStorage.setItem('start_time',this.start_time)
|
|
327
|
+ // window.sessionStorage.setItem('end_time',this.end_time)
|
|
328
|
+ this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
|
|
329
|
+ },
|
|
330
|
+
|
|
331
|
+ getStorehouseList(){
|
|
332
|
+ getStorehouseList().then(response=>{
|
|
333
|
+ if(response.data.state == 1){
|
|
334
|
+ var houseList = response.data.data.list
|
|
335
|
+ var obj = {id:0,storehouse_name:"全部"}
|
|
336
|
+ this.houseList.push(obj)
|
|
337
|
+ for(let i=0;i<houseList.length;i++){
|
|
338
|
+ this.houseList.push(houseList[i])
|
|
339
|
+ }
|
|
340
|
+ this.manufacturerList = response.data.data.manufacturerList
|
|
341
|
+ this.goodTypeList = response.data.data.goodTypeList
|
|
342
|
+ this.patientList = response.data.data.patientList
|
|
343
|
+ }
|
|
344
|
+ })
|
|
345
|
+ },
|
|
346
|
+ getlist(){
|
|
347
|
+ var params = {
|
|
348
|
+ storehouse_id:this.storehouse_id,
|
|
349
|
+ good_type:this.good_type,
|
|
350
|
+ keyword:this.keyword,
|
|
351
|
+ page:this.page,
|
|
352
|
+ limit:this.limit,
|
|
353
|
+ start_time:this.start_time,
|
|
354
|
+ end_time:this.end_time,
|
|
355
|
+ }
|
|
356
|
+ getDrugNewQuery(params).then(response=>{
|
|
357
|
+ if(response.data.state == 1){
|
|
358
|
+ var list = response.data.data.list
|
|
359
|
+ console.log("list2332233232323232w",list)
|
|
360
|
+
|
|
361
|
+ if(list.length > 0){
|
|
362
|
+ var arr = []
|
|
363
|
+ for(let i=0;i<list.length;i++){
|
|
364
|
+ if(list[i].xt_warehouse_info.length > 0){
|
|
365
|
+ arr.push(list[i])
|
|
366
|
+ }
|
|
367
|
+ }
|
|
368
|
+ this.tableList = arr
|
|
369
|
+ }
|
|
370
|
+ this.total = response.data.data.total
|
|
371
|
+
|
|
372
|
+ }
|
|
373
|
+ })
|
|
374
|
+ },
|
|
375
|
+ getManufacturName(id){
|
|
376
|
+ var manufacturer_name = ""
|
|
377
|
+ for(let i=0;i<this.manufacturerList.length;i++){
|
|
378
|
+ if(id == this.manufacturerList[i].id){
|
|
379
|
+ manufacturer_name = this.manufacturerList[i].manufacturer_name
|
|
380
|
+ }
|
|
381
|
+ }
|
|
382
|
+ return manufacturer_name
|
|
383
|
+ },
|
|
384
|
+ handleSizeChange(val) {
|
|
385
|
+ this.limit = val;
|
|
386
|
+ this.getlist()
|
|
387
|
+ },
|
|
388
|
+ handleCurrentChange(val) {
|
|
389
|
+ this.page = val;
|
|
390
|
+ this.getlist()
|
|
391
|
+ },
|
|
392
|
+ handleSizeChangeOne(val) {
|
|
393
|
+ this.limitone = val;
|
|
394
|
+ this.toDialogClick(this.good_id,this.good_name,this.specification_name)
|
|
395
|
+ },
|
|
396
|
+ handleCurrentChangeOne(val) {
|
|
397
|
+ this.pageone = val;
|
|
398
|
+ this.toDialogClick(this.good_id,this.good_name,this.specification_name)
|
|
399
|
+ },
|
|
400
|
+ seach(){
|
|
401
|
+ this.getlist()
|
|
402
|
+ },
|
|
403
|
+ getGoodTypeName(id){
|
|
404
|
+ var type_name = ""
|
|
405
|
+ for(let i=0;i<this.goodTypeList.length;i++){
|
|
406
|
+ if(id == this.goodTypeList[i].id){
|
|
407
|
+ type_name = this.goodTypeList[i].type_name
|
|
408
|
+ }
|
|
409
|
+ }
|
|
410
|
+ return type_name
|
|
411
|
+ },
|
|
412
|
+ getHouseName(id){
|
|
413
|
+ var storehouse_name = ""
|
|
414
|
+ for(let i=0;i<this.houseList.length;i++){
|
|
415
|
+ if(id == this.houseList[i].id){
|
|
416
|
+ storehouse_name = this.houseList[i].storehouse_name
|
|
417
|
+ }
|
|
418
|
+ }
|
|
419
|
+ return storehouse_name
|
|
420
|
+ },
|
|
421
|
+ getWareInfoCount(val,storehouse_id){
|
|
422
|
+ var count = 0
|
|
423
|
+ if(val.length > 0){
|
|
424
|
+ for(let i=0;i<val.length;i++){
|
|
425
|
+ if(val[i].storehouse_id == storehouse_id){
|
|
426
|
+ count +=val[i].warehousing_count
|
|
427
|
+ }
|
|
428
|
+ }
|
|
429
|
+ }
|
|
430
|
+ if(count > 0){
|
|
431
|
+ return count
|
|
432
|
+ }else{
|
|
433
|
+ return ""
|
|
434
|
+ }
|
|
435
|
+ },
|
|
436
|
+ getStockDrugCount(){
|
|
437
|
+ var params ={
|
|
438
|
+ keywords: this.keywords,
|
|
439
|
+ start_time:this.start_time,
|
|
440
|
+ end_time:this.end_time,
|
|
441
|
+ }
|
|
442
|
+ getStockDrugCount(params).then(response=>{
|
|
443
|
+ if(response.data.state == 1){
|
|
444
|
+ var outlist = response.data.data.outList
|
|
445
|
+ this.outCountList = outlist
|
|
446
|
+ var autoCount = response.data.data.autoCount
|
|
447
|
+ this.autoCountList = autoCount
|
|
448
|
+ var totalCount = response.data.data.totalCount
|
|
449
|
+ this.cancelCountList = totalCount
|
|
450
|
+ }
|
|
451
|
+ })
|
|
452
|
+ },
|
|
453
|
+ getWareInfoCountOne(val,storehouse_id){
|
|
454
|
+ var count = 0
|
|
455
|
+ if(val.length > 0){
|
|
456
|
+ for(let i=0;i<val.length;i++){
|
|
457
|
+ if(val[i].storehouse_id == storehouse_id){
|
|
458
|
+ count +=val[i].stock_count
|
|
459
|
+ }
|
|
460
|
+ }
|
|
461
|
+ }
|
|
462
|
+ if(count > 0){
|
|
463
|
+ return count
|
|
464
|
+ }else{
|
|
465
|
+ return ""
|
|
466
|
+ }
|
|
467
|
+ },
|
|
468
|
+ getOutCount(id){
|
|
469
|
+ var count = 0
|
|
470
|
+ for(let i=0;i<this.outCountList.length;i++){
|
|
471
|
+ if(id == this.outCountList[i].good_id){
|
|
472
|
+ count = this.outCountList[i].count
|
|
473
|
+ }
|
|
474
|
+ }
|
|
475
|
+ return count
|
|
476
|
+ },
|
|
477
|
+ getAutoCount(id){
|
|
478
|
+ var count= 0
|
|
479
|
+ for(let i=0;i<this.autoCountList.length;i++){
|
|
480
|
+ if(id == this.autoCountList[i].good_id){
|
|
481
|
+ count = this.autoCountList[i].count
|
|
482
|
+ }
|
|
483
|
+ }
|
|
484
|
+ return count
|
|
485
|
+ },
|
|
486
|
+ getCancelCount(id){
|
|
487
|
+ var count = 0
|
|
488
|
+ for(let i=0;i<this.cancelCountList.length;i++){
|
|
489
|
+ if(id == this.cancelCountList[i].good_id){
|
|
490
|
+ count = this.cancelCountList[i].count
|
|
491
|
+ }
|
|
492
|
+ }
|
|
493
|
+ return count
|
|
494
|
+ },
|
|
495
|
+ getCancelCountInfo(cancel_stock_info,storehouse_id){
|
|
496
|
+ var count = 0
|
|
497
|
+ if(cancel_stock_info.length >0){
|
|
498
|
+ for(let i=0;i<cancel_stock_info.length;i++){
|
|
499
|
+ if(storehouse_id == cancel_stock_info[i].storehouse_id){
|
|
500
|
+ count += cancel_stock_info[i].count
|
|
501
|
+ }
|
|
502
|
+ }
|
|
503
|
+ }
|
|
504
|
+ return count
|
|
505
|
+ },
|
|
506
|
+ getWareOutInfoCount(warehouse_out_info,storehouse_id){
|
|
507
|
+ var count = 0
|
|
508
|
+ if(warehouse_out_info.length > 0){
|
|
509
|
+ for(let i=0;i<warehouse_out_info.length;i++){
|
|
510
|
+ if(storehouse_id == warehouse_out_info[i].storehouse_id){
|
|
511
|
+ count +=warehouse_out_info[i].count
|
|
512
|
+ }
|
|
513
|
+ }
|
|
514
|
+ }
|
|
515
|
+ return count
|
|
516
|
+ },
|
|
517
|
+ getInCount(id){
|
|
518
|
+ var count= 0
|
|
519
|
+ for(let i=0;i<this.countList.length;i++){
|
|
520
|
+ if(id == this.countList[i].good_id){
|
|
521
|
+ count = this.countList[i].count
|
|
522
|
+ }
|
|
523
|
+ }
|
|
524
|
+ return count
|
|
525
|
+ },
|
|
526
|
+ getOutCount(id){
|
|
527
|
+ var count = 0
|
|
528
|
+ for(let i=0;i<this.outCountList.length;i++){
|
|
529
|
+ if(id == this.outCountList[i].good_id){
|
|
530
|
+ count = this.outCountList[i].count
|
|
531
|
+ }
|
|
532
|
+ }
|
|
533
|
+ return count
|
|
534
|
+ },
|
|
535
|
+ getAutoCount(id){
|
|
536
|
+ var count= 0
|
|
537
|
+ for(let i=0;i<this.autoCountList.length;i++){
|
|
538
|
+ if(id == this.autoCountList[i].good_id){
|
|
539
|
+ count = this.autoCountList[i].count
|
|
540
|
+ }
|
|
541
|
+ }
|
|
542
|
+ return count
|
|
543
|
+ },
|
|
544
|
+ getCancelCount(id){
|
|
545
|
+ var count = 0
|
|
546
|
+ for(let i=0;i<this.cancelCountList.length;i++){
|
|
547
|
+ if(id == this.cancelCountList[i].good_id){
|
|
548
|
+ count = this.cancelCountList[i].count
|
|
549
|
+ }
|
|
550
|
+ }
|
|
551
|
+ return count
|
|
552
|
+ },
|
|
553
|
+ getStockCount(id){
|
|
554
|
+ var stock_count = 0
|
|
555
|
+ for(let i=0;i<this.countList.length;i++){
|
|
556
|
+ if(id == this.countList[i].good_id){
|
|
557
|
+ stock_count = this.countList[i].stock_count
|
|
558
|
+ }
|
|
559
|
+ }
|
|
560
|
+ return stock_count
|
|
561
|
+ },
|
|
562
|
+ getWareInfo(arr){
|
|
563
|
+ var total = 0
|
|
564
|
+ if(arr.length > 0){
|
|
565
|
+ for(let i=0;i<arr.length;i++){
|
|
566
|
+ total += parseInt(arr[i].warehousing_count)
|
|
567
|
+ }
|
|
568
|
+ }else{
|
|
569
|
+ total = ""
|
|
570
|
+ }
|
|
571
|
+ return total
|
|
572
|
+ },
|
|
573
|
+ getOverplus(arr){
|
|
574
|
+ var total = 0
|
|
575
|
+ if(arr.length > 0){
|
|
576
|
+ for(let i=0;i<arr.length;i++){
|
|
577
|
+ total += arr[i].stock_count
|
|
578
|
+ }
|
|
579
|
+ }else{
|
|
580
|
+ total = ""
|
|
581
|
+ }
|
|
582
|
+ return total
|
|
583
|
+ },
|
|
584
|
+ getCancelInfo(arr){
|
|
585
|
+ var total = 0
|
|
586
|
+ if(arr.length > 0){
|
|
587
|
+ for(let i=0;i<arr.length;i++){
|
|
588
|
+ total += arr[i].count
|
|
589
|
+ }
|
|
590
|
+ }else{
|
|
591
|
+ total = ""
|
|
592
|
+ }
|
|
593
|
+ return total
|
|
594
|
+ },
|
|
595
|
+ getOverFlushInfo(arr){
|
|
596
|
+ var total = 0
|
|
597
|
+ if(arr.length >0){
|
|
598
|
+ for(let i=0;i<arr.length;i++){
|
|
599
|
+ total += arr[i].stock_count
|
|
600
|
+ }
|
|
601
|
+ }
|
|
602
|
+ return total
|
|
603
|
+ },
|
|
604
|
+ toDialogClick(id,good_name,specification_name){
|
|
605
|
+ this.good_id = id
|
|
606
|
+ this.good_name = good_name
|
|
607
|
+ this.specification_name = specification_name
|
|
608
|
+ var params = {
|
|
609
|
+ good_id:id,
|
|
610
|
+ limit:this.limitone,
|
|
611
|
+ page:this.pageone,
|
|
612
|
+ start_first_time:this.start_first_time,
|
|
613
|
+ end_first_time:this.end_first_time,
|
|
614
|
+ }
|
|
615
|
+ getGoodWarehouseOutInfoById(params).then(response=>{
|
|
616
|
+ if(response.data.state == 1){
|
|
617
|
+ var list = response.data.data.list
|
|
618
|
+ console.log("list23233233232w",list)
|
|
619
|
+ this.tableData = list
|
|
620
|
+ this.totalone = response.data.data.total
|
|
621
|
+ this.dialogVisible = true
|
|
622
|
+ }
|
|
623
|
+ })
|
|
624
|
+
|
|
625
|
+ },
|
|
626
|
+ startFirstTimeChange(){
|
|
627
|
+
|
|
628
|
+ },
|
|
629
|
+ endEndTimeChange(){
|
|
630
|
+
|
|
631
|
+ },
|
|
632
|
+ getTime(val) {
|
|
633
|
+ if(val < 0){
|
|
634
|
+ return ""
|
|
635
|
+ }
|
|
636
|
+ if(val == ""){
|
|
637
|
+ return ""
|
|
638
|
+ }else {
|
|
639
|
+ return uParseTime(val, '{y}-{m}-{d}')
|
|
640
|
+ }
|
|
641
|
+ },
|
|
642
|
+ getName(id){
|
|
643
|
+ var name = ""
|
|
644
|
+ for(let i=0;i<this.patientList.length;i++){
|
|
645
|
+ if(id == this.patientList[i].id){
|
|
646
|
+ name = this.patientList[i].name
|
|
647
|
+ }
|
|
648
|
+ }
|
|
649
|
+ return name
|
|
650
|
+ }
|
|
651
|
+ },
|
|
652
|
+ created(){
|
|
653
|
+ this.getStorehouseList()
|
|
654
|
+ this.getlist()
|
|
655
|
+ this.getStockDrugCount()
|
|
656
|
+ }
|
|
657
|
+}
|
|
658
|
+</script>
|
|
659
|
+
|