|
@@ -41,8 +41,8 @@
|
41
|
41
|
<div>
|
42
|
42
|
<el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
|
43
|
43
|
<el-button size="small" type="primary" @click="toCheck">核对</el-button>
|
44
|
|
- <el-button size="small" type="primary" @click="print">打印</el-button>
|
45
|
|
- <el-button size="small" type="primary">导出</el-button>
|
|
44
|
+ <!-- <el-button size="small" type="primary" @click="print">打印</el-button>
|
|
45
|
+ <el-button size="small" type="primary">导出</el-button> -->
|
46
|
46
|
</div>
|
47
|
47
|
</div>
|
48
|
48
|
<el-table :data="tableList" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }" @selection-change="changePrice">
|
|
@@ -57,6 +57,16 @@
|
57
|
57
|
{{getTime(scope.row.start_time)}}
|
58
|
58
|
</template>
|
59
|
59
|
</el-table-column>
|
|
60
|
+ <el-table-column prop="name" label="药品名称" align="center">
|
|
61
|
+ <template slot-scope="scope">
|
|
62
|
+ {{scope.row.drug_name}}
|
|
63
|
+ </template>
|
|
64
|
+ </el-table-column>
|
|
65
|
+ <el-table-column prop="name" label="规格" align="center">
|
|
66
|
+ <template slot-scope="scope">
|
|
67
|
+ {{scope.row.specification_name}}
|
|
68
|
+ </template>
|
|
69
|
+ </el-table-column>
|
60
|
70
|
<el-table-column prop="name" label="报损数量" align="center">
|
61
|
71
|
<template slot-scope="scope">
|
62
|
72
|
{{scope.row.count}}
|
|
@@ -83,7 +93,7 @@
|
83
|
93
|
<span v-if="scope.row.checker_status == 2">未核对</span>
|
84
|
94
|
</template>
|
85
|
95
|
</el-table-column>
|
86
|
|
- <el-table-column label="操作" align="center">
|
|
96
|
+ <el-table-column label="操作" align="center" width="200">
|
87
|
97
|
<template slot-scope="scope">
|
88
|
98
|
<el-button type="primary" size="small" @click="moDrugDamage(scope.row.id,scope.row.checker_status)">编辑</el-button>
|
89
|
99
|
<el-button type="danger" size="small" @click="deleteDrugDamage(scope.row.id,scope.row.checker_status,scope.$index)">删除</el-button>
|
|
@@ -102,12 +112,12 @@
|
102
|
112
|
</el-pagination>
|
103
|
113
|
</div>
|
104
|
114
|
<el-dialog
|
105
|
|
- title="库房报损"
|
|
115
|
+ title="药品报损"
|
106
|
116
|
:visible.sync="dialogVisible"
|
107
|
117
|
width="1200px">
|
108
|
118
|
<el-form :model="form" class="modifyDialog" label-width="120px">
|
109
|
119
|
<el-form-item label="药品ID">
|
110
|
|
- <el-input v-model="form.drug_id"></el-input>
|
|
120
|
+ <el-input v-model="form.drug_id" :disabled="true"></el-input>
|
111
|
121
|
</el-form-item>
|
112
|
122
|
<el-form-item label="药品名称">
|
113
|
123
|
<el-autocomplete
|
|
@@ -119,7 +129,7 @@
|
119
|
129
|
placeholder="请输入药品名称"
|
120
|
130
|
@select="handleSelect"
|
121
|
131
|
@input="changeGoodName(scope.$index)"
|
122
|
|
- style="width:160px;"
|
|
132
|
+ style="width:260px;"
|
123
|
133
|
>
|
124
|
134
|
<i class="el-icon-search el-input__icon" slot="suffix"></i>
|
125
|
135
|
<template slot-scope="{ item }">
|
|
@@ -140,36 +150,28 @@
|
140
|
150
|
</el-form-item>
|
141
|
151
|
|
142
|
152
|
<el-form-item label="单位">
|
143
|
|
- <el-input v-model="form.warehousing_unit"></el-input>
|
144
|
|
- <!-- <el-select v-model="scope.row.warehousing_unit" filterable placeholder="请选择单位" style="width:80px">
|
145
|
|
- <el-option
|
146
|
|
- v-for="(option, index) in unitList"
|
147
|
|
- :key="index"
|
148
|
|
- :label="option.name"
|
149
|
|
- :value="option.name">
|
150
|
|
- </el-option>
|
151
|
|
- </el-select> -->
|
|
153
|
+ <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
|
152
|
154
|
</el-form-item>
|
153
|
155
|
<el-form-item label="进货价">
|
154
|
|
- <el-input v-model="form.last_price"></el-input>
|
|
156
|
+ <el-input v-model="form.last_price" :disabled="true"></el-input>
|
155
|
157
|
</el-form-item>
|
156
|
158
|
<el-form-item label="零售价">
|
157
|
|
- <el-input v-model="form.retail_price"></el-input>
|
|
159
|
+ <el-input v-model="form.retail_price" :disabled="true"></el-input>
|
158
|
160
|
</el-form-item>
|
159
|
161
|
<el-form-item label="报损数量">
|
160
|
162
|
<el-input v-model="form.count"></el-input>
|
161
|
163
|
</el-form-item>
|
162
|
164
|
<el-form-item label="库存">
|
163
|
|
- <el-input v-model="form.total" :disabled="true"></el-input>
|
|
165
|
+ <el-input v-model="form.total" :disabled="true" ></el-input>
|
164
|
166
|
</el-form-item>
|
165
|
167
|
<el-form-item label="产地">
|
166
|
|
- <el-input v-model="form.drug_origin_place"></el-input>
|
|
168
|
+ <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
|
167
|
169
|
</el-form-item>
|
168
|
170
|
<el-form-item label="批准文号">
|
169
|
|
- <el-input v-model="form.number"></el-input>
|
|
171
|
+ <el-input v-model="form.number" :disabled="true"></el-input>
|
170
|
172
|
</el-form-item>
|
171
|
173
|
<el-form-item label="生产厂商">
|
172
|
|
- <el-input v-model="form.manufacturer"></el-input>
|
|
174
|
+ <el-input v-model="form.manufacturer" :disabled="true"></el-input>
|
173
|
175
|
</el-form-item>
|
174
|
176
|
<el-form-item label="备注">
|
175
|
177
|
<div style="display:flex;">
|
|
@@ -214,11 +216,7 @@
|
214
|
216
|
{{scope.row.retail_price}}
|
215
|
217
|
</template>
|
216
|
218
|
</el-table-column>
|
217
|
|
- <!-- <el-table-column prop="name" label="新零售价" width="100" align="center">
|
218
|
|
- <template slot-scope="scope">
|
219
|
|
- {{scope.row.new_price}}
|
220
|
|
- </template>
|
221
|
|
- </el-table-column> -->
|
|
219
|
+
|
222
|
220
|
<el-table-column prop="name" label="生产厂商" width="100" align="center">
|
223
|
221
|
<template slot-scope="scope">
|
224
|
222
|
{{scope.row.manufacturer}}
|
|
@@ -245,7 +243,7 @@
|
245
|
243
|
label="操作">
|
246
|
244
|
<template slot-scope="scope">
|
247
|
245
|
<el-button type="text" size="small" @click="toDel(scope.$index)">删除</el-button>
|
248
|
|
- <el-button type="text" size="small" @click="toEdit(scope.row)">编辑</el-button>
|
|
246
|
+ <el-button type="text" size="small" @click="toEdit(scope.row,scope.$index)">编辑</el-button>
|
249
|
247
|
</template>
|
250
|
248
|
</el-table-column>
|
251
|
249
|
</el-table>
|
|
@@ -257,7 +255,7 @@
|
257
|
255
|
|
258
|
256
|
|
259
|
257
|
<el-dialog
|
260
|
|
- title="耗材盘点核对"
|
|
258
|
+ title="药品盘点核对"
|
261
|
259
|
:visible.sync="checkDialogVisible"
|
262
|
260
|
width="30%"
|
263
|
261
|
>
|
|
@@ -305,7 +303,7 @@
|
305
|
303
|
width="1200px">
|
306
|
304
|
<el-form :model="form" class="modifyDialog" label-width="120px">
|
307
|
305
|
<el-form-item label="药品ID">
|
308
|
|
- <el-input v-model="form.drug_id"></el-input>
|
|
306
|
+ <el-input v-model="form.drug_id" :disabled="true"></el-input>
|
309
|
307
|
</el-form-item>
|
310
|
308
|
<el-form-item label="药品名称">
|
311
|
309
|
<el-autocomplete
|
|
@@ -325,37 +323,46 @@
|
325
|
323
|
</template>
|
326
|
324
|
</el-autocomplete>
|
327
|
325
|
</el-form-item>
|
328
|
|
- <!-- <el-form-item label="规格">
|
329
|
|
- <el-input v-model="form.name"></el-input>
|
330
|
|
- </el-form-item> -->
|
|
326
|
+ <el-form-item label="批次">
|
|
327
|
+ <el-select v-model="form.batch_number" filterable placeholder="请选择" @change="changeNumber">
|
|
328
|
+ <el-option
|
|
329
|
+ v-for="(item,index) in numberList"
|
|
330
|
+ :key="index"
|
|
331
|
+ :label="item.batch_number"
|
|
332
|
+ :value="item.id">
|
|
333
|
+ </el-option>
|
|
334
|
+ </el-select>
|
|
335
|
+ </el-form-item>
|
|
336
|
+ <el-form-item label="规格">
|
|
337
|
+ <el-input v-model="form.specification_name" :disabled="true"></el-input>
|
|
338
|
+ </el-form-item>
|
331
|
339
|
<el-form-item label="单位">
|
332
|
|
- <el-input v-model="form.warehousing_unit"></el-input>
|
|
340
|
+ <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
|
333
|
341
|
</el-form-item>
|
334
|
342
|
<el-form-item label="进货价">
|
335
|
|
- <el-input v-model="form.last_price"></el-input>
|
|
343
|
+ <el-input v-model="form.last_price" :disabled="true"></el-input>
|
336
|
344
|
</el-form-item>
|
337
|
345
|
<el-form-item label="零售价">
|
338
|
|
- <el-input v-model="form.retail_price"></el-input>
|
|
346
|
+ <el-input v-model="form.retail_price" :disabled="true"></el-input>
|
339
|
347
|
</el-form-item>
|
340
|
348
|
<el-form-item label="报损数量">
|
341
|
349
|
<el-input v-model="form.count"></el-input>
|
342
|
350
|
</el-form-item>
|
343
|
351
|
<el-form-item label="库存">
|
344
|
|
- <el-input v-model="form.total"></el-input>
|
|
352
|
+ <el-input v-model="form.total" :disabled="true"></el-input>
|
345
|
353
|
</el-form-item>
|
346
|
354
|
<el-form-item label="产地">
|
347
|
|
- <el-input v-model="form.drug_origin_place"></el-input>
|
|
355
|
+ <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
|
348
|
356
|
</el-form-item>
|
349
|
357
|
<el-form-item label="批准文号">
|
350
|
|
- <el-input v-model="form.number"></el-input>
|
|
358
|
+ <el-input v-model="form.number" :disabled="true"></el-input>
|
351
|
359
|
</el-form-item>
|
352
|
360
|
<el-form-item label="生产厂商">
|
353
|
|
- <el-input v-model="form.manufacturer"></el-input>
|
|
361
|
+ <el-input v-model="form.manufacturer" :disabled="true"></el-input>
|
354
|
362
|
</el-form-item>
|
355
|
363
|
<el-form-item label="备注">
|
356
|
364
|
<div style="display:flex;">
|
357
|
365
|
<el-input v-model="form.remark"></el-input>
|
358
|
|
- <el-button style="margin-left:5px;" type="primary" @click="addPrice">添加</el-button>
|
359
|
366
|
</div>
|
360
|
367
|
</el-form-item>
|
361
|
368
|
</el-form>
|
|
@@ -373,7 +380,7 @@
|
373
|
380
|
width="1200px">
|
374
|
381
|
<el-form :model="form" class="modifyDialog" label-width="120px">
|
375
|
382
|
<el-form-item label="药品ID">
|
376
|
|
- <el-input v-model="form.drug_id"></el-input>
|
|
383
|
+ <el-input v-model="form.drug_id" :disabled="true"></el-input>
|
377
|
384
|
</el-form-item>
|
378
|
385
|
<el-form-item label="药品名称">
|
379
|
386
|
<el-autocomplete
|
|
@@ -397,33 +404,32 @@
|
397
|
404
|
<el-input v-model="form.name"></el-input>
|
398
|
405
|
</el-form-item> -->
|
399
|
406
|
<el-form-item label="单位">
|
400
|
|
- <el-input v-model="form.warehousing_unit"></el-input>
|
|
407
|
+ <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
|
401
|
408
|
</el-form-item>
|
402
|
409
|
<el-form-item label="进货价">
|
403
|
|
- <el-input v-model="form.last_price"></el-input>
|
|
410
|
+ <el-input v-model="form.last_price" :disabled="true"></el-input>
|
404
|
411
|
</el-form-item>
|
405
|
412
|
<el-form-item label="零售价">
|
406
|
|
- <el-input v-model="form.retail_price"></el-input>
|
|
413
|
+ <el-input v-model="form.retail_price" :disabled="true"></el-input>
|
407
|
414
|
</el-form-item>
|
408
|
415
|
<el-form-item label="报损数量">
|
409
|
416
|
<el-input v-model="form.count"></el-input>
|
410
|
417
|
</el-form-item>
|
411
|
418
|
<el-form-item label="库存">
|
412
|
|
- <el-input v-model="form.total"></el-input>
|
|
419
|
+ <el-input v-model="form.total" :disabled="true"></el-input>
|
413
|
420
|
</el-form-item>
|
414
|
421
|
<el-form-item label="产地">
|
415
|
|
- <el-input v-model="form.drug_origin_place"></el-input>
|
|
422
|
+ <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
|
416
|
423
|
</el-form-item>
|
417
|
424
|
<el-form-item label="批准文号">
|
418
|
|
- <el-input v-model="form.number"></el-input>
|
|
425
|
+ <el-input v-model="form.number" :disabled="true"></el-input>
|
419
|
426
|
</el-form-item>
|
420
|
427
|
<el-form-item label="生产厂商">
|
421
|
|
- <el-input v-model="form.manufacturer"></el-input>
|
|
428
|
+ <el-input v-model="form.manufacturer" :disabled="true"></el-input>
|
422
|
429
|
</el-form-item>
|
423
|
430
|
<el-form-item label="备注">
|
424
|
431
|
<div style="display:flex;">
|
425
|
432
|
<el-input v-model="form.remark"></el-input>
|
426
|
|
- <el-button style="margin-left:5px;" type="primary" @click="addPrice">添加</el-button>
|
427
|
433
|
</div>
|
428
|
434
|
</el-form-item>
|
429
|
435
|
</el-form>
|
|
@@ -439,7 +445,7 @@
|
439
|
445
|
|
440
|
446
|
<script>
|
441
|
447
|
import BreadCrumb from "../../components/bread-crumb";
|
442
|
|
-import { postSearchDrugWarehouseList,saveDrugDamage,getDrugDamageList,SaveDrugDamagePrice,getDrugDamageDetail,modifyDrugDamage,deleteDrugDamage,getDrugWarehouseInfoList } from "@/api/drug/drug"
|
|
448
|
+import { postSearchDrugWarehouseList,saveDrugDamage,getDrugDamageList,SaveDrugDamagePrice,getDrugDamageDetail,modifyDrugDamage,deleteDrugDamage,getDrugWarehouseInfoList,getDrugWarehouseInfoTotal } from "@/api/drug/drug"
|
443
|
449
|
import { getDrugBatchNumber } from "@/api/drug/drug_stock"
|
444
|
450
|
import { uParseTime } from '@/utils/tools'
|
445
|
451
|
export default {
|
|
@@ -488,6 +494,8 @@ export default {
|
488
|
494
|
warehouse_info_id:"",
|
489
|
495
|
expiry_date:"",
|
490
|
496
|
product_date:"",
|
|
497
|
+ stock_max_number:"",
|
|
498
|
+ stock_min_number:"",
|
491
|
499
|
},
|
492
|
500
|
drugList:[],
|
493
|
501
|
manufacturerList:[],
|
|
@@ -508,11 +516,12 @@ export default {
|
508
|
516
|
modifyDialogVisible:false,
|
509
|
517
|
id:"",
|
510
|
518
|
numberList:[],
|
|
519
|
+ index:0,
|
511
|
520
|
}
|
512
|
521
|
},
|
513
|
522
|
methods:{
|
514
|
523
|
search(){
|
515
|
|
-
|
|
524
|
+ this.getlist()
|
516
|
525
|
},
|
517
|
526
|
print(){
|
518
|
527
|
if(this.ids == ""){
|
|
@@ -596,14 +605,17 @@ export default {
|
596
|
605
|
this.form.dealer = val.dealer
|
597
|
606
|
this.form.manufacturer = val.manufacturer
|
598
|
607
|
this.form.remark = val.remark
|
599
|
|
- this.form.warehousing_unit = val.max_unit
|
600
|
|
- this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
|
601
|
|
- this.form.batch_number = val.batch_number
|
|
608
|
+ this.form.warehousing_unit = val.max_unit
|
|
609
|
+ this.form.total = ""
|
|
610
|
+ // this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
|
|
611
|
+ // this.form.batch_number = val.batch_number
|
602
|
612
|
this.form.last_price = val.last_price
|
603
|
613
|
this.form.expiry_date = val.expiry_date
|
604
|
614
|
this.form.product_date = val.product_date
|
605
|
615
|
this.form.specification_name = val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
|
606
|
616
|
this.form.drug_origin_place = val.drug_origin_place
|
|
617
|
+ this.form.batch_number = ""
|
|
618
|
+ this.form.total = ""
|
607
|
619
|
}
|
608
|
620
|
})
|
609
|
621
|
},
|
|
@@ -629,6 +641,7 @@ export default {
|
629
|
641
|
changeNumber(val){
|
630
|
642
|
console.log("val",val)
|
631
|
643
|
this.form.warehousing_info_id = val
|
|
644
|
+ this.getDrugWarehouseInfoTotal(val)
|
632
|
645
|
},
|
633
|
646
|
getDrugBatchNumber(id){
|
634
|
647
|
var params = {
|
|
@@ -653,6 +666,19 @@ export default {
|
653
|
666
|
}
|
654
|
667
|
},
|
655
|
668
|
addPrice(){
|
|
669
|
+ console.log("批次号",this.form.batch_number)
|
|
670
|
+ if(this.form.drug_name == ""){
|
|
671
|
+ this.$message.error("请输入药品名称")
|
|
672
|
+ return
|
|
673
|
+ }
|
|
674
|
+ if(this.form.batch_number == ""){
|
|
675
|
+ this.$message.error("请选择批次号")
|
|
676
|
+ return false
|
|
677
|
+ }
|
|
678
|
+ if(this.form.count == ""){
|
|
679
|
+ this.$message.error("请输入报损数量")
|
|
680
|
+ return false
|
|
681
|
+ }
|
656
|
682
|
var obj = {
|
657
|
683
|
drug_id:this.form.drug_id,
|
658
|
684
|
drug_name:this.form.drug_name,
|
|
@@ -674,7 +700,10 @@ export default {
|
674
|
700
|
specification_name:this.form.specification_name,
|
675
|
701
|
drug_origin_place:this.form.drug_origin_place,
|
676
|
702
|
warehousing_info_id:this.form.warehousing_info_id,
|
677
|
|
- batch_number:this.form.batch_number
|
|
703
|
+ batch_number:this.form.batch_number,
|
|
704
|
+ stock_max_number:this.form.stock_max_number,
|
|
705
|
+ stock_min_number:this.form.stock_min_number,
|
|
706
|
+ total:this.form.total,
|
678
|
707
|
}
|
679
|
708
|
this.tableData.push(obj)
|
680
|
709
|
this.form.drug_name = ""
|
|
@@ -694,15 +723,25 @@ export default {
|
694
|
723
|
this.form.product_date = ""
|
695
|
724
|
this.form.specification_name = ""
|
696
|
725
|
this.form.drug_origin_place = ""
|
|
726
|
+ this.form.total = ""
|
697
|
727
|
},
|
698
|
728
|
saveDrugDamage(){
|
699
|
|
- console.log("hhhh",this.tableData)
|
700
|
|
- console.log("oooo",this.numberList)
|
|
729
|
+
|
701
|
730
|
for(let i=0;i<this.tableData.length;i++){
|
702
|
731
|
this.tableData[i].retail_price = this.tableData[i].retail_price.toString()
|
703
|
732
|
this.tableData[i].last_price = this.tableData[i].last_price.toString()
|
704
|
733
|
this.tableData[i].new_price = this.tableData[i].new_price.toString()
|
705
|
734
|
this.tableData[i].count = parseInt(this.tableData[i].count)
|
|
735
|
+ if(this.tableData[i].stock_max_number == ""){
|
|
736
|
+ this.tableData[i].stock_max_number = 0
|
|
737
|
+ }else{
|
|
738
|
+ this.tableData[i].stock_max_number = parseInt(this.tableData[i].stock_max_number)
|
|
739
|
+ }
|
|
740
|
+ if(this.tableData[i].stock_min_number == ""){
|
|
741
|
+ this.tableData[i].stock_min_number = 0
|
|
742
|
+ }else{
|
|
743
|
+ this.tableData[i].stock_min_number = parseInt(this.tableData[i].stock_min_number)
|
|
744
|
+ }
|
706
|
745
|
if(this.tableData[i].expiry_date == undefined){
|
707
|
746
|
this.tableData[i].expiry_date = 0
|
708
|
747
|
}else{
|
|
@@ -723,7 +762,7 @@ export default {
|
723
|
762
|
tableData:this.tableData,
|
724
|
763
|
}
|
725
|
764
|
console.log("parasm222",params)
|
726
|
|
-
|
|
765
|
+
|
727
|
766
|
saveDrugDamage(params).then(response=>{
|
728
|
767
|
if(response.data.state == 1){
|
729
|
768
|
var msg = response.data.data.msg
|
|
@@ -741,6 +780,7 @@ export default {
|
741
|
780
|
page:this.page,
|
742
|
781
|
start_time:this.start_time,
|
743
|
782
|
end_time:this.end_time,
|
|
783
|
+ keyword:this.searchKey,
|
744
|
784
|
}
|
745
|
785
|
getDrugDamageList(params).then(response=>{
|
746
|
786
|
if(response.data.state == 1){
|
|
@@ -798,7 +838,8 @@ export default {
|
798
|
838
|
toDel(index){
|
799
|
839
|
this.tableList.splice(index,1)
|
800
|
840
|
},
|
801
|
|
- toEdit(val){
|
|
841
|
+ toEdit(val,index){
|
|
842
|
+ this.index = index
|
802
|
843
|
this.form.drug_name = val.drug_name
|
803
|
844
|
this.form.drug_origin_place = val.drug_origin_place
|
804
|
845
|
this.form.last_price = val.last_price
|
|
@@ -810,6 +851,10 @@ export default {
|
810
|
851
|
this.form.remark = val.remark
|
811
|
852
|
this.form.id = val.id
|
812
|
853
|
this.form.count = val.count
|
|
854
|
+ this.form.specification_name = val.specification_name
|
|
855
|
+ this.form.warehousing_unit = val.warehousing_unit
|
|
856
|
+ this.form.stock_max_number = val.stock_max_number
|
|
857
|
+ this.form.stock_min_number = val.stock_min_number,
|
813
|
858
|
this.editDialogVisible = true
|
814
|
859
|
},
|
815
|
860
|
EditDrugDamage(){
|
|
@@ -823,6 +868,24 @@ export default {
|
823
|
868
|
this.tableData[i].retail_price = this.form.retail_price
|
824
|
869
|
this.tableData[i].remark = this.form.remark
|
825
|
870
|
this.tableData[i].count = this.form.count
|
|
871
|
+ this.tableData[i].stock_max_number = this.form.stock_max_number
|
|
872
|
+ this.tableData[i].stock_min_number = this.form.stock_min_number
|
|
873
|
+ this.tableData[i].manufacturer = this.form.manufacturer
|
|
874
|
+ this.tableData[i].dealer = this.form.dealer
|
|
875
|
+ }
|
|
876
|
+ if(this.index == i){
|
|
877
|
+ this.tableData[i].drug_name = this.form.drug_name
|
|
878
|
+ this.tableData[i].drug_origin_place = this.form.drug_origin_place
|
|
879
|
+ this.tableData[i].last_price = this.form.last_price
|
|
880
|
+ this.tableData[i].new_price = this.form.new_price
|
|
881
|
+ this.tableData[i].number = this.form.number
|
|
882
|
+ this.tableData[i].retail_price = this.form.retail_price
|
|
883
|
+ this.tableData[i].remark = this.form.remark
|
|
884
|
+ this.tableData[i].count = this.form.count
|
|
885
|
+ this.tableData[i].stock_max_number = this.form.stock_max_number
|
|
886
|
+ this.tableData[i].stock_min_number = this.form.stock_min_number
|
|
887
|
+ this.tableData[i].manufacturer = this.form.manufacturer
|
|
888
|
+ this.tableData[i].dealer = this.form.dealer
|
826
|
889
|
}
|
827
|
890
|
}
|
828
|
891
|
this.editDialogVisible = false
|
|
@@ -844,6 +907,7 @@ export default {
|
844
|
907
|
getDrugDamageDetail(id).then(response=>{
|
845
|
908
|
if(response.data.state ==1){
|
846
|
909
|
var detail = response.data.data.detail
|
|
910
|
+ console.log("系准给",detail)
|
847
|
911
|
this.form.drug_id = detail.drug_id
|
848
|
912
|
this.form.drug_name = detail.drug_name
|
849
|
913
|
this.form.drug_origin_place = detail.drug_origin_place
|
|
@@ -855,12 +919,26 @@ export default {
|
855
|
919
|
this.form.remark = detail.remark
|
856
|
920
|
this.form.count = detail.count
|
857
|
921
|
this.id = detail.id
|
858
|
|
- this.form.warehousing_unit = detail.warehouseing_unit
|
|
922
|
+ this.form.warehousing_unit = detail.warehousing_unit
|
|
923
|
+ this.form.stock_max_number = detail.stock_max_number
|
|
924
|
+ this.form.stock_min_number = detail.stock_min_number
|
|
925
|
+ this.form.total = detail.total
|
|
926
|
+ this.form.warehousing_info_id = detail.warehousing_info_id
|
859
|
927
|
this.modifyDialogVisible = true
|
860
|
928
|
}
|
861
|
929
|
})
|
862
|
930
|
},
|
863
|
931
|
modifyDrugDamage(){
|
|
932
|
+ if(this.form.stock_max_number == ""){
|
|
933
|
+ this.form.stock_max_number = 0
|
|
934
|
+ }else{
|
|
935
|
+ this.form.stock_max_number = parseInt(this.form.stock_max_number)
|
|
936
|
+ }
|
|
937
|
+ if(this.form.stock_min_number == ""){
|
|
938
|
+ this.form.stock_min_number = 0
|
|
939
|
+ }else{
|
|
940
|
+ this.form.stock_min_number = parseInt(this.form.stock_min_number)
|
|
941
|
+ }
|
864
|
942
|
var params = {
|
865
|
943
|
drug_id:this.form.drug_id,
|
866
|
944
|
drug_name:this.form.drug_name,
|
|
@@ -874,6 +952,9 @@ export default {
|
874
|
952
|
count:parseInt(this.form.count),
|
875
|
953
|
warehousing_unit:this.form.warehousing_unit,
|
876
|
954
|
id:this.id,
|
|
955
|
+ total:this.form.total,
|
|
956
|
+ stock_max_number:this.form.stock_max_number,
|
|
957
|
+ stock_min_number:this.form.stock_min_number,
|
877
|
958
|
}
|
878
|
959
|
modifyDrugDamage(params).then(response=>{
|
879
|
960
|
if(response.data.state == 1){
|
|
@@ -916,6 +997,27 @@ export default {
|
916
|
997
|
changeEndTime(val){
|
917
|
998
|
this.end_time = this.getTime(val)
|
918
|
999
|
this.getlist()
|
|
1000
|
+ },
|
|
1001
|
+ getDrugWarehouseInfoTotal(val){
|
|
1002
|
+ var params = {
|
|
1003
|
+ id:val,
|
|
1004
|
+ }
|
|
1005
|
+ getDrugWarehouseInfoTotal(params).then(response=>{
|
|
1006
|
+ if(response.data.state == 1){
|
|
1007
|
+ var list = response.data.data.list
|
|
1008
|
+ console.log("list",list)
|
|
1009
|
+ // this.form.total = list.stock_max_number + list.XtBaseDrug.max_unit + list.stock_min_number + list.XtBaseDrug.min_unit
|
|
1010
|
+ if(list.stock_max_number > 0){
|
|
1011
|
+ this.form.total = list.stock_max_number + list.XtBaseDrug.max_unit
|
|
1012
|
+ this.form.stock_max_number = list.stock_max_number
|
|
1013
|
+ }
|
|
1014
|
+ if(list.stock_min_number >0 ){
|
|
1015
|
+ this.form.total = list.stock_min_number + list.XtBaseDrug.min_unit
|
|
1016
|
+ this.form.stock_min_number = list.stock_min_number
|
|
1017
|
+ }
|
|
1018
|
+
|
|
1019
|
+ }
|
|
1020
|
+ })
|
919
|
1021
|
}
|
920
|
1022
|
},
|
921
|
1023
|
created(){
|