|
@@ -130,6 +130,16 @@
|
130
|
130
|
<el-form-item label="规格">
|
131
|
131
|
<el-input v-model="form.specification_name"></el-input>
|
132
|
132
|
</el-form-item>
|
|
133
|
+ <el-form-item label="批号">
|
|
134
|
+ <el-select v-model="form.number" filterable placeholder="请选择">
|
|
135
|
+ <el-option
|
|
136
|
+ v-for="(item,index) in numberList"
|
|
137
|
+ :key="index"
|
|
138
|
+ :label="item.number"
|
|
139
|
+ :value="item.number">
|
|
140
|
+ </el-option>
|
|
141
|
+ </el-select>
|
|
142
|
+ </el-form-item>
|
133
|
143
|
<el-form-item label="单位">
|
134
|
144
|
<el-input v-model="form.warehousing_unit"></el-input>
|
135
|
145
|
</el-form-item>
|
|
@@ -165,37 +175,37 @@
|
165
|
175
|
</el-form-item>
|
166
|
176
|
</el-form>
|
167
|
177
|
<el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
|
168
|
|
- <el-table-column prop="date" label="耗材ID" width="100">
|
|
178
|
+ <el-table-column prop="date" label="耗材ID" width="100" align="center">
|
169
|
179
|
<template slot-scope="scope">
|
170
|
180
|
{{scope.row.good_id}}
|
171
|
181
|
</template>
|
172
|
182
|
</el-table-column>
|
173
|
|
- <el-table-column prop="date" label="耗材名称" width="100">
|
|
183
|
+ <el-table-column prop="date" label="耗材名称" width="100" align="center">
|
174
|
184
|
<template slot-scope="scope">
|
175
|
185
|
{{scope.row.good_name}}
|
176
|
186
|
</template>
|
177
|
187
|
</el-table-column>
|
178
|
|
- <el-table-column prop="name" label="规格" width="100">
|
|
188
|
+ <el-table-column prop="name" label="规格" width="100" align="center">
|
179
|
189
|
<template slot-scope="scope">
|
180
|
190
|
{{scope.row.specification_name}}
|
181
|
191
|
</template>
|
182
|
192
|
</el-table-column>
|
183
|
|
- <el-table-column prop="name" label="单位" width="100">
|
|
193
|
+ <el-table-column prop="name" label="单位" width="100" align="center">
|
184
|
194
|
<template slot-scope="scope">
|
185
|
195
|
{{scope.row.warehousing_unit}}
|
186
|
196
|
</template>
|
187
|
197
|
</el-table-column>
|
188
|
|
- <el-table-column prop="name" label="报损数量" width="100">
|
|
198
|
+ <el-table-column prop="name" label="报损数量" width="100" align="center">
|
189
|
199
|
<template slot-scope="scope">
|
190
|
200
|
{{scope.row.count}}
|
191
|
201
|
</template>
|
192
|
202
|
</el-table-column>
|
193
|
|
- <el-table-column prop="name" label="原进货价" width="100">
|
|
203
|
+ <el-table-column prop="name" label="原进货价" width="100" align="center">
|
194
|
204
|
<template slot-scope="scope">
|
195
|
205
|
{{scope.row.buy_price}}
|
196
|
206
|
</template>
|
197
|
207
|
</el-table-column>
|
198
|
|
- <el-table-column prop="name" label="原零售价" width="100">
|
|
208
|
+ <el-table-column prop="name" label="原零售价" width="100" align="center">
|
199
|
209
|
<template slot-scope="scope">
|
200
|
210
|
{{scope.row.packing_price}}
|
201
|
211
|
</template>
|
|
@@ -205,22 +215,22 @@
|
205
|
215
|
{{scope.row.new_price}}
|
206
|
216
|
</template>
|
207
|
217
|
</el-table-column> -->
|
208
|
|
- <el-table-column prop="name" label="生产厂商" width="100">
|
|
218
|
+ <el-table-column prop="name" label="生产厂商" width="100" align="center">
|
209
|
219
|
<template slot-scope="scope">
|
210
|
220
|
{{scope.row.manufacturer}}
|
211
|
221
|
</template>
|
212
|
222
|
</el-table-column>
|
213
|
|
- <el-table-column prop="name" label="产地" width="100">
|
|
223
|
+ <el-table-column prop="name" label="产地" width="100" align="center">
|
214
|
224
|
<template slot-scope="scope">
|
215
|
225
|
{{scope.row.good_origin_place}}
|
216
|
226
|
</template>
|
217
|
227
|
</el-table-column>
|
218
|
|
- <el-table-column prop="name" label="批准文号" width="100">
|
|
228
|
+ <el-table-column prop="name" label="批准文号" width="100" align="center">
|
219
|
229
|
<template slot-scope="scope">
|
220
|
230
|
{{scope.row.license_number}}
|
221
|
231
|
</template>
|
222
|
232
|
</el-table-column>
|
223
|
|
- <el-table-column prop="name" label="备注" width="100">
|
|
233
|
+ <el-table-column prop="name" label="备注" width="100" align="center">
|
224
|
234
|
<template slot-scope="scope">
|
225
|
235
|
{{scope.row.remark}}
|
226
|
236
|
</template>
|
|
@@ -364,7 +374,7 @@
|
364
|
374
|
<script>
|
365
|
375
|
import BreadCrumb from "../components/bread-crumb";
|
366
|
376
|
import { uParseTime } from '@/utils/tools'
|
367
|
|
-import { postSearchGoodWarehouseList,saveReportStock,getReportStockList,SaveCheckedDamage,getStockDamageDetail,modifyPrice,deleteStockDamage} from "@/api/stock"
|
|
377
|
+import { postSearchGoodWarehouseList,saveReportStock,getReportStockList,SaveCheckedDamage,getStockDamageDetail,modifyPrice,deleteStockDamage,getStockBatchNumber,getGoodWarehouseList} from "@/api/stock"
|
368
|
378
|
export default {
|
369
|
379
|
name: "stockModifyPrice",
|
370
|
380
|
components:{
|
|
@@ -401,6 +411,9 @@ export default {
|
401
|
411
|
good_origin_place:"",
|
402
|
412
|
report_count:"",
|
403
|
413
|
total:"",
|
|
414
|
+ number:"",
|
|
415
|
+ expiry_date:"",
|
|
416
|
+ product_date:"",
|
404
|
417
|
},
|
405
|
418
|
currentIndex: 0,
|
406
|
419
|
manufacturerList:[],
|
|
@@ -420,6 +433,7 @@ export default {
|
420
|
433
|
editPriceDialogVisible:false,
|
421
|
434
|
modifyPriceDialogVisible:false,
|
422
|
435
|
id:0,
|
|
436
|
+ numberList:[]
|
423
|
437
|
}
|
424
|
438
|
},
|
425
|
439
|
methods:{
|
|
@@ -484,7 +498,9 @@ export default {
|
484
|
498
|
})
|
485
|
499
|
},
|
486
|
500
|
handleSelect(val){
|
487
|
|
- console.log("val23232323",val)
|
|
501
|
+ //获取当前耗材的批号
|
|
502
|
+ this.getStockBatchNumber(val.good_id)
|
|
503
|
+ this.getGoodWarehouseList(val.good_id)
|
488
|
504
|
this.form.id = val.id
|
489
|
505
|
this.form.good_id = val.good_id,
|
490
|
506
|
this.form.good_name = val.good_name
|
|
@@ -499,6 +515,8 @@ export default {
|
499
|
515
|
this.form.warehousing_unit = val.packing_unit
|
500
|
516
|
this.form.total = val.total
|
501
|
517
|
this.form.new_price = val.new_price
|
|
518
|
+ this.form.expiry_date = val.expiry_date
|
|
519
|
+ this.form.product_date = val.product_date
|
502
|
520
|
},
|
503
|
521
|
addStock(){
|
504
|
522
|
var obj = {
|
|
@@ -506,19 +524,37 @@ export default {
|
506
|
524
|
good_name:this.form.good_name,
|
507
|
525
|
specification_name:this.form.specification_name,
|
508
|
526
|
warehousing_unit:this.form.warehousing_unit,
|
509
|
|
- count:parseInt(this.form.count),
|
|
527
|
+ count:this.form.count,
|
510
|
528
|
buy_price:this.form.buy_price.toString(),
|
511
|
529
|
packing_price:this.form.packing_price.toString(),
|
512
|
530
|
manufacturer:this.form.manufacturer,
|
513
|
531
|
good_origin_place:this.form.good_origin_place,
|
514
|
532
|
license_number:this.form.license_number,
|
515
|
533
|
remark:this.form.remark,
|
516
|
|
- // new_price:this.form.new_price.toString(),
|
517
|
534
|
warehousing_order:this.form.warehousing_order,
|
518
|
535
|
dealer:this.form.dealer,
|
519
|
536
|
start_time:this.getTime(new Date()),
|
|
537
|
+ number:this.form.number,
|
|
538
|
+ warehousing_info_id:0,
|
|
539
|
+ product_date:val.product_date,
|
|
540
|
+ expiry_date:val.expiry_date,
|
520
|
541
|
}
|
521
|
542
|
this.tableData.push(obj)
|
|
543
|
+ this.form.good_id = 0
|
|
544
|
+ this.form.good_name = ""
|
|
545
|
+ this.form.specification_name = ""
|
|
546
|
+ this.form.warehousing_unit = ""
|
|
547
|
+ this.form.count = ""
|
|
548
|
+ this.form.buy_price = ""
|
|
549
|
+ this.form.packing_price = ""
|
|
550
|
+ this.form.manufacturer = ""
|
|
551
|
+ this.form.good_origin_place = ""
|
|
552
|
+ this.form.license_number = ""
|
|
553
|
+ this.form.remark = ""
|
|
554
|
+ this.form.warehousing_order = ""
|
|
555
|
+ this.form.dealer = ""
|
|
556
|
+ this.form.number = ""
|
|
557
|
+ this.form.good_id = ""
|
522
|
558
|
},
|
523
|
559
|
saveReportStock(){
|
524
|
560
|
for(let i = 0;i<this.tableData.length;i++){
|
|
@@ -528,6 +564,19 @@ export default {
|
528
|
564
|
if(this.tableData[i].dealer == 0){
|
529
|
565
|
this.tableData[i].dealer = ""
|
530
|
566
|
}
|
|
567
|
+ }
|
|
568
|
+ console.log("比阿哥",this.tableData)
|
|
569
|
+ console.log("numberlist",this.numberList)
|
|
570
|
+ for(let i=0;i<this.tableData.length;i++){
|
|
571
|
+ this.tableData[i].count = parseInt(this.tableData[i].count)
|
|
572
|
+ this.tableData[i].expiry_date = parseInt(this.tableData[i].expiry_date)
|
|
573
|
+ this.tableData[i].product_date = parseInt(this.tableData[i].product_date)
|
|
574
|
+ this.tableData[i].total = parseInt(this.tableData[i].total)
|
|
575
|
+ for(let j=0;j<this.numberList.length;j++){
|
|
576
|
+ if(this.tableData[i].number == this.numberList[j].number){
|
|
577
|
+ this.tableData[i].warehousing_info_id = this.numberList[j].id
|
|
578
|
+ }
|
|
579
|
+ }
|
531
|
580
|
}
|
532
|
581
|
var params = {
|
533
|
582
|
tableData:this.tableData,
|
|
@@ -550,6 +599,7 @@ export default {
|
550
|
599
|
this.form.buy_price = ""
|
551
|
600
|
this.form.warehousing_unit = ""
|
552
|
601
|
this.form.total = ""
|
|
602
|
+ this.form.number = ""
|
553
|
603
|
|
554
|
604
|
}
|
555
|
605
|
})
|
|
@@ -593,18 +643,12 @@ export default {
|
593
|
643
|
}
|
594
|
644
|
},
|
595
|
645
|
changePrice(val){
|
596
|
|
- console.log("val23232322323",val)
|
597
|
|
-
|
598
|
646
|
var arr = []
|
599
|
|
-
|
600
|
647
|
for(let i=0;i<val.length;i++){
|
601
|
648
|
arr.push(val[i].id)
|
602
|
649
|
}
|
603
|
650
|
var str = arr.join(",")
|
604
|
|
-
|
605
|
|
- console.log("str",str)
|
606
|
|
- this.ids = str
|
607
|
|
-
|
|
651
|
+ this.ids = str
|
608
|
652
|
},
|
609
|
653
|
SaveCheckedDamage(){
|
610
|
654
|
var params = {
|
|
@@ -681,7 +725,6 @@ export default {
|
681
|
725
|
modifyPrice(params).then(response=>{
|
682
|
726
|
if(response.data.state ==1){
|
683
|
727
|
var adjust = response.data.data.adjust
|
684
|
|
-
|
685
|
728
|
this.modifyPriceDialogVisible = false
|
686
|
729
|
this.$message.success("保存成功")
|
687
|
730
|
this.getlist()
|
|
@@ -742,6 +785,30 @@ export default {
|
742
|
785
|
formatJson(filterVal, jsonData) {
|
743
|
786
|
return jsonData.map(v => filterVal.map(j => v[j]));
|
744
|
787
|
},
|
|
788
|
+ getStockBatchNumber(id){
|
|
789
|
+ var params = {
|
|
790
|
+ id:id
|
|
791
|
+ }
|
|
792
|
+ getStockBatchNumber(params).then(response=>{
|
|
793
|
+ if(response.data.state == 1){
|
|
794
|
+ var list = response.data.data.list
|
|
795
|
+ console.log("批号列表",list)
|
|
796
|
+ this.numberList = list
|
|
797
|
+ }
|
|
798
|
+ })
|
|
799
|
+ },
|
|
800
|
+ getGoodWarehouseList(id){
|
|
801
|
+ var params = {
|
|
802
|
+ id:id,
|
|
803
|
+ }
|
|
804
|
+ getGoodWarehouseList(params).then(response=>{
|
|
805
|
+ if(response.data.state == 1){
|
|
806
|
+ var list = response.data.data.list
|
|
807
|
+ this.form.total = list.stock_count
|
|
808
|
+ console.log("list23232",list)
|
|
809
|
+ }
|
|
810
|
+ })
|
|
811
|
+ }
|
745
|
812
|
},
|
746
|
813
|
created(){
|
747
|
814
|
// var nowDate = new Date();
|