|
@@ -19,6 +19,7 @@
|
19
|
19
|
type="primary"
|
20
|
20
|
icon="el-icon-search"
|
21
|
21
|
@click="search"
|
|
22
|
+ placeholder="请输入单据编号或操作人姓名"
|
22
|
23
|
>搜索</el-button
|
23
|
24
|
>
|
24
|
25
|
<el-date-picker
|
|
@@ -43,46 +44,83 @@
|
43
|
44
|
<el-button size="small" type="primary">导出</el-button>
|
44
|
45
|
</div>
|
45
|
46
|
</div>
|
46
|
|
- <div style="display: flex;justify-content: space-between;margin-top:10px">
|
47
|
|
- <div style="width:541px;margin-right:10px;">
|
48
|
|
- <el-table :data="tableData" border :height="tableHeight" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
|
|
47
|
+ <div>
|
|
48
|
+ <div style="width:100%;margin-right:10px;margin-top:10px">
|
|
49
|
+ <el-table :data="tableList" border :height="tableHeight" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
|
49
|
50
|
<el-table-column prop="date" label="单据编码" width="100">
|
50
|
|
- <template slot-scope="scope">
|
|
51
|
+ <template slot-scope="scope" align="center">
|
51
|
52
|
{{scope.row.warehousing_order}}
|
52
|
53
|
</template>
|
53
|
54
|
</el-table-column>
|
54
|
|
- <el-table-column prop="date" label="调价日期"width="100">
|
55
|
|
- <template slot-scope="scope">
|
56
|
|
- {{scope.row.start_time}}
|
57
|
|
- </template>
|
|
55
|
+ <el-table-column label="耗材名称" width="100" align="center">
|
|
56
|
+ <template slot-scope="scope">
|
|
57
|
+ {{scope.row.good_name}}
|
|
58
|
+ </template>
|
58
|
59
|
</el-table-column>
|
59
|
|
- <el-table-column
|
60
|
|
- prop="name"
|
61
|
|
- label="操作人"
|
62
|
|
- width="80">
|
|
60
|
+ <el-table-column label="规格" width="100">
|
|
61
|
+ <template slot-scope="scope">
|
|
62
|
+ {{scope.row.specification_name}}
|
|
63
|
+ </template>
|
63
|
64
|
</el-table-column>
|
64
|
|
- <el-table-column
|
65
|
|
- prop="name"
|
66
|
|
- label="状态"
|
67
|
|
- width="80">
|
|
65
|
+ <el-table-column label="单位" width="100">
|
|
66
|
+ <template slot-scope="scope">
|
|
67
|
+ {{scope.row.GoodInfo.packing_unit}}
|
|
68
|
+ </template>
|
68
|
69
|
</el-table-column>
|
69
|
|
- <el-table-column
|
70
|
|
- prop="name"
|
71
|
|
- label="核对人"
|
72
|
|
- width="80">
|
|
70
|
+ <el-table-column label="调价数量" width="100">
|
|
71
|
+ <template slot-scope="scope">
|
|
72
|
+ {{scope.row.count}}
|
|
73
|
+ </template>
|
73
|
74
|
</el-table-column>
|
74
|
|
- <el-table-column
|
75
|
|
- width="100"
|
76
|
|
- label="操作">
|
77
|
|
- <template slot-scope="scope">
|
78
|
|
- <el-button type="text" size="small">删除</el-button>
|
79
|
|
- <el-button type="text" size="small">编辑</el-button>
|
80
|
|
- </template>
|
|
75
|
+ <el-table-column label="原进货价" width="100">
|
|
76
|
+ <template slot-scope="scope">
|
|
77
|
+ {{scope.row.buy_price}}
|
|
78
|
+ </template>
|
|
79
|
+ </el-table-column>
|
|
80
|
+ <el-table-column label="原零售价" width="100">
|
|
81
|
+ <template slot-scope="scope">
|
|
82
|
+ {{scope.row.packing_price}}
|
|
83
|
+ </template>
|
|
84
|
+ </el-table-column>
|
|
85
|
+ <el-table-column label="生产厂商" width="100">
|
|
86
|
+ <template slot-scope="scope">
|
|
87
|
+ {{scope.row.manufacturer}}
|
|
88
|
+ </template>
|
|
89
|
+ </el-table-column>
|
|
90
|
+ <el-table-column label="经销商" width="100">
|
|
91
|
+ <template slot-scope="scope">
|
|
92
|
+ {{scope.row.dealer}}
|
|
93
|
+ </template>
|
|
94
|
+ </el-table-column>
|
|
95
|
+ <el-table-column label="操作人" width="100">
|
|
96
|
+ <template slot-scope="scope">
|
|
97
|
+ {{getDoctor(scope.row.creater)}}
|
|
98
|
+ </template>
|
|
99
|
+ </el-table-column>
|
|
100
|
+ <el-table-column label="核对人" width="100">
|
|
101
|
+ <template slot-scope="scope">
|
|
102
|
+ {{getDoctor(scope.row.checker)}}
|
|
103
|
+ </template>
|
|
104
|
+ </el-table-column>
|
|
105
|
+ <el-table-column label="状态" width="100">
|
|
106
|
+ <template slot-scope="scope">
|
|
107
|
+ <span v-if="scope.row.checker_status == 2">未核对</span>
|
|
108
|
+ <span v-if="scope.row.checker_status == 1">已核对</span>
|
|
109
|
+ </template>
|
|
110
|
+ </el-table-column>
|
|
111
|
+ <el-table-column prop="date" label="调价日期" width="100">
|
|
112
|
+ <template slot-scope="scope">
|
|
113
|
+ {{getTime(scope.row.start_time)}}
|
|
114
|
+ </template>
|
|
115
|
+ </el-table-column>
|
|
116
|
+ <el-table-column label="备注" width="100">
|
|
117
|
+ <template slot-scope="scope">
|
|
118
|
+ {{scope.row.remark}}
|
|
119
|
+ </template>
|
81
|
120
|
</el-table-column>
|
82
|
121
|
</el-table>
|
83
|
122
|
</div>
|
84
|
|
- <!-- <div style="flex:1;"> -->
|
85
|
|
- <el-table :data="tableData" border :height="tableHeight" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
|
|
123
|
+ <!-- <el-table :data="tableData" border :height="tableHeight" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
|
86
|
124
|
<el-table-column
|
87
|
125
|
fixed="left"
|
88
|
126
|
prop="date"
|
|
@@ -154,8 +192,8 @@
|
154
|
192
|
label="有效日期"
|
155
|
193
|
width="100">
|
156
|
194
|
</el-table-column>
|
157
|
|
- </el-table>
|
158
|
|
- <!-- </div> -->
|
|
195
|
+ </el-table> -->
|
|
196
|
+
|
159
|
197
|
</div>
|
160
|
198
|
</div>
|
161
|
199
|
<el-dialog
|
|
@@ -266,22 +304,23 @@
|
266
|
304
|
label="操作">
|
267
|
305
|
<template slot-scope="scope">
|
268
|
306
|
<el-button type="text" size="small" @click="deletePrice(scope.$index)">删除</el-button>
|
269
|
|
- <el-button type="text" size="small" @click="editPrice(scope.row.id)">编辑</el-button>
|
|
307
|
+ <el-button type="text" size="small" @click="editPrice(scope.row)">编辑</el-button>
|
270
|
308
|
</template>
|
271
|
309
|
</el-table-column>
|
272
|
310
|
</el-table>
|
273
|
311
|
<span slot="footer" class="dialog-footer">
|
274
|
312
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
275
|
|
- <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
313
|
+ <el-button type="primary" @click="saveAdjustPrice">确 定</el-button>
|
276
|
314
|
</span>
|
277
|
315
|
</el-dialog>
|
278
|
316
|
|
|
317
|
+ <!-- 编辑调价 -->
|
279
|
318
|
<el-dialog
|
280
|
319
|
title="编辑"
|
281
|
320
|
:visible.sync="editPriceDialogVisible"
|
282
|
321
|
width="50%">
|
283
|
322
|
<span>
|
284
|
|
- <el-form :ref="form" >
|
|
323
|
+ <el-form :model="form">
|
285
|
324
|
<el-row>
|
286
|
325
|
<el-col>
|
287
|
326
|
<el-form-item label="耗材名称:">
|
|
@@ -302,13 +341,31 @@
|
302
|
341
|
</template>
|
303
|
342
|
</el-autocomplete>
|
304
|
343
|
</el-form-item>
|
305
|
|
- </el-col>
|
|
344
|
+ <el-form-item label="原价格:">
|
|
345
|
+ <el-input v-model="form.packing_price" style="width:200px"></el-input>
|
|
346
|
+ </el-form-item>
|
|
347
|
+ <el-form-item label="现价格:">
|
|
348
|
+ <el-input v-model="form.new_price" style="width:200px"></el-input>
|
|
349
|
+ </el-form-item>
|
|
350
|
+ </el-col>
|
|
351
|
+ </el-row>
|
|
352
|
+ <el-row>
|
|
353
|
+ <el-col>
|
|
354
|
+ <el-form-item label="调价数量:">
|
|
355
|
+ <el-input v-model="form.count" style="width:200px"></el-input>
|
|
356
|
+ </el-form-item>
|
|
357
|
+ <el-form-item label="备注:">
|
|
358
|
+ <div style="display:flex;">
|
|
359
|
+ <el-input v-model="form.remark" style="width:200px"></el-input>
|
|
360
|
+ </div>
|
|
361
|
+ </el-form-item>
|
|
362
|
+ </el-col>
|
306
|
363
|
</el-row>
|
307
|
364
|
</el-form>
|
308
|
365
|
</span>
|
309
|
366
|
<span slot="footer" class="dialog-footer">
|
310
|
|
- <el-button @click="dialogVisible = false">取 消</el-button>
|
311
|
|
- <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
367
|
+ <el-button @click="editPriceDialogVisible = false">取 消</el-button>
|
|
368
|
+ <el-button type="primary" @click="upatePrice">保存</el-button>
|
312
|
369
|
</span>
|
313
|
370
|
</el-dialog>
|
314
|
371
|
</div>
|
|
@@ -316,7 +373,7 @@
|
316
|
373
|
|
317
|
374
|
<script>
|
318
|
375
|
import BreadCrumb from "../components/bread-crumb";
|
319
|
|
-import { postSearchGoodWarehouseList} from "@/api/stock"
|
|
376
|
+import { postSearchGoodWarehouseList,saveAdjustPrice,getAllStockPrice} from "@/api/stock"
|
320
|
377
|
import { uParseTime } from '@/utils/tools'
|
321
|
378
|
export default {
|
322
|
379
|
name: "stockModifyPrice",
|
|
@@ -338,6 +395,7 @@ export default {
|
338
|
395
|
tableData: [],
|
339
|
396
|
dialogVisible:false,
|
340
|
397
|
form: {
|
|
398
|
+ id:"",
|
341
|
399
|
good_name: '',
|
342
|
400
|
packing_price:'',
|
343
|
401
|
new_price:"",
|
|
@@ -358,6 +416,8 @@ export default {
|
358
|
416
|
dealerList:[],
|
359
|
417
|
currentIndex: 0,
|
360
|
418
|
editPriceDialogVisible:false,
|
|
419
|
+ tableList:[],
|
|
420
|
+ doctorList:[]
|
361
|
421
|
}
|
362
|
422
|
},
|
363
|
423
|
methods:{
|
|
@@ -410,7 +470,8 @@ export default {
|
410
|
470
|
},
|
411
|
471
|
handleSelect(val){
|
412
|
472
|
console.log("val23232323",val)
|
413
|
|
- this.form.good_id = val.id,
|
|
473
|
+ this.form.id = val.id
|
|
474
|
+ this.form.good_id = val.good_id,
|
414
|
475
|
this.form.good_name = val.good_name
|
415
|
476
|
this.form.packing_price = val.packing_price
|
416
|
477
|
this.form.warehousing_order = val.warehousing_order
|
|
@@ -421,12 +482,14 @@ export default {
|
421
|
482
|
this.form.remark = val.remark
|
422
|
483
|
this.form.buy_price = val.buy_price
|
423
|
484
|
this.form.warehousing_unit = val.packing_unit
|
|
485
|
+
|
424
|
486
|
},
|
425
|
487
|
handleClose(){
|
426
|
488
|
|
427
|
489
|
},
|
428
|
490
|
addPrice(){
|
429
|
491
|
var obj = {
|
|
492
|
+ id:this.form.id,
|
430
|
493
|
good_name:this.form.good_name,
|
431
|
494
|
specification_name:this.form.specification_name,
|
432
|
495
|
warehousing_order:this.form.warehousing_order,
|
|
@@ -440,6 +503,8 @@ export default {
|
440
|
503
|
count:this.form.count,
|
441
|
504
|
new_price:this.form.new_price,
|
442
|
505
|
remark:this.form.remark,
|
|
506
|
+ buy_price:this.form.buy_price,
|
|
507
|
+ good_id:this.form.good_id,
|
443
|
508
|
}
|
444
|
509
|
this.tableData.push(obj)
|
445
|
510
|
this.form.good_name = ""
|
|
@@ -454,6 +519,7 @@ export default {
|
454
|
519
|
this.form.count = ""
|
455
|
520
|
this.form.new_price = ""
|
456
|
521
|
this.form.remark = ""
|
|
522
|
+ this.form.buy_price= ""
|
457
|
523
|
},
|
458
|
524
|
getTime(val) {
|
459
|
525
|
if(val < 0){
|
|
@@ -467,11 +533,80 @@ export default {
|
467
|
533
|
},
|
468
|
534
|
deletePrice(index){
|
469
|
535
|
this.tableData.splice(index,1)
|
|
536
|
+ },
|
|
537
|
+ editPrice(row){
|
|
538
|
+ console.log("row232233223",row)
|
|
539
|
+ this.form.good_name = row.good_name
|
|
540
|
+ this.form.packing_price = row.packing_unit
|
|
541
|
+ this.form.new_price = row.new_price
|
|
542
|
+ this.form.count = row.count
|
|
543
|
+ this.form.remark = row.remark
|
|
544
|
+ this.form.id = row.id
|
|
545
|
+ this.editPriceDialogVisible = true
|
|
546
|
+ },
|
|
547
|
+ upatePrice(){
|
|
548
|
+ for(let i=0;i<this.tableData.length;i++){
|
|
549
|
+ if(this.form.id == this.tableData[i].id){
|
|
550
|
+ this.tableData[i].good_name = this.form.good_name
|
|
551
|
+ this.tableData[i].packing_price = this.form.packing_price
|
|
552
|
+ this.tableData[i].new_price = this.form.new_price
|
|
553
|
+ this.tableData[i].count = this.form.count
|
|
554
|
+ this.tableData[i].remark = this.form.remark
|
|
555
|
+ }
|
|
556
|
+ }
|
|
557
|
+ this.editPriceDialogVisible = false
|
|
558
|
+ },
|
|
559
|
+ saveAdjustPrice(){
|
|
560
|
+ for(let i=0;i<this.tableData.length;i++){
|
|
561
|
+ this.tableData[i].buy_price = this.tableData[i].buy_price.toString()
|
|
562
|
+ this.tableData[i].packing_price = this.tableData[i].packing_price.toString()
|
|
563
|
+ this.tableData[i].new_price = this.tableData[i].new_price.toString()
|
|
564
|
+ this.tableData[i].count = parseInt(this.tableData[i].count)
|
|
565
|
+ }
|
|
566
|
+ var params= {
|
|
567
|
+ tableData:this.tableData,
|
|
568
|
+ }
|
|
569
|
+ console.log("parasm222",params)
|
|
570
|
+ saveAdjustPrice(params).then(response=>{
|
|
571
|
+ if(response.data.state == 1){
|
|
572
|
+ var msg = response.data.data.msg
|
|
573
|
+ console.log("msg",msg)
|
|
574
|
+ this.$message.success("保存成功!")
|
|
575
|
+ this.dialogVisible = false
|
|
576
|
+ }
|
|
577
|
+ })
|
|
578
|
+ },
|
|
579
|
+ getAllStockPrice(){
|
|
580
|
+ var params = {
|
|
581
|
+ keyword:this.searchKey,
|
|
582
|
+ start_time:this.start_time,
|
|
583
|
+ end_time:this.end_time,
|
|
584
|
+ }
|
|
585
|
+ getAllStockPrice(params).then(response=>{
|
|
586
|
+ if(response.data.state == 1){
|
|
587
|
+ var list = response.data.data.list
|
|
588
|
+ console.log("zhognguoffs",list)
|
|
589
|
+ this.tableList = list
|
|
590
|
+ var doctor = response.data.data.doctor
|
|
591
|
+ console.log("doctor",doctor)
|
|
592
|
+ this.doctorList = doctor
|
|
593
|
+ }
|
|
594
|
+ })
|
|
595
|
+ },
|
|
596
|
+ getDoctor(id){
|
|
597
|
+ var user_name = ""
|
|
598
|
+ for(let i=0;i<this.doctorList.length;i++){
|
|
599
|
+ if(id == this.doctorList[i].admin_user_id){
|
|
600
|
+ user_name = this.doctorList[i].user_name
|
|
601
|
+ }
|
|
602
|
+ }
|
|
603
|
+ return user_name
|
470
|
604
|
}
|
471
|
605
|
},
|
472
|
606
|
created(){
|
473
|
607
|
let tableHeight = document.body.clientHeight - 200;
|
474
|
608
|
this.tableHeight = tableHeight
|
|
609
|
+ this.getAllStockPrice()
|
475
|
610
|
},
|
476
|
611
|
mounted() {
|
477
|
612
|
const that = this;
|