|
@@ -28,8 +28,9 @@
|
28
|
28
|
|
29
|
29
|
<div class="cell clearfix">
|
30
|
30
|
<label class="title"><span class="name">经销商</span> : </label>
|
31
|
|
- <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
|
32
|
|
- <el-option
|
|
31
|
+
|
|
32
|
+ <el-select size="small" v-model="form.dealer" filterable placeholder="请选择经销商" @change="changeDealer">
|
|
33
|
+ <el-option
|
33
|
34
|
v-for="(option, index) in dealer"
|
34
|
35
|
:key="index"
|
35
|
36
|
:label="option.dealer_name"
|
|
@@ -41,7 +42,7 @@
|
41
|
42
|
<div class="cell clearfix">
|
42
|
43
|
<label class="title"><span class="name">厂商</span> : </label>
|
43
|
44
|
|
44
|
|
- <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商"
|
|
45
|
+ <el-select size="small" v-model="form.manufacturer" filterable placeholder="请选择厂商"
|
45
|
46
|
@change="changeManufacturer">
|
46
|
47
|
<el-option
|
47
|
48
|
v-for="(option, index) in manufacturer"
|
|
@@ -61,12 +62,12 @@
|
61
|
62
|
<el-table-column align="center" width="200">
|
62
|
63
|
|
63
|
64
|
<template slot="header" slot-scope="scope">
|
64
|
|
- <span>商品类型<span style="color: red">*</span></span>
|
|
65
|
+ <span>耗材类型<span style="color: red">*</span></span>
|
65
|
66
|
</template>
|
66
|
67
|
|
67
|
68
|
<template slot-scope="scope">
|
68
|
69
|
<el-form-item style="padding-top: 15px;margin-left: 10px;margin-right: 10px">
|
69
|
|
- <el-input placeholder="请输入商品类型" v-model="scope.row.good_type_id"
|
|
70
|
+ <el-input placeholder="请输入耗材类型" v-model="scope.row.good_type_id"
|
70
|
71
|
:value="typeName(scope.row.good_type_id)"
|
71
|
72
|
@focus="showDialog(scope.$index, scope.row)"></el-input>
|
72
|
73
|
</el-form-item>
|
|
@@ -86,7 +87,24 @@
|
86
|
87
|
|
87
|
88
|
</template>
|
88
|
89
|
</el-table-column>
|
89
|
|
-
|
|
90
|
+ <el-table-column align="center" width="200">
|
|
91
|
+ <template slot="header" slot-scope="scope">
|
|
92
|
+ <span>单位<span style="color: red">*</span></span>
|
|
93
|
+ </template>
|
|
94
|
+ <template slot-scope="scope">
|
|
95
|
+ <el-form-item style="padding-top:15px">
|
|
96
|
+ <el-select v-model="scope.row.good_unit" style="width:160px;" placeholder="请选择">
|
|
97
|
+ <el-option
|
|
98
|
+ v-for="(item,index) in propForm.goodUnit"
|
|
99
|
+ :key="index"
|
|
100
|
+ :label="item.name"
|
|
101
|
+ :value="item.id">
|
|
102
|
+ </el-option>
|
|
103
|
+ </el-select>
|
|
104
|
+
|
|
105
|
+ </el-form-item>
|
|
106
|
+ </template>
|
|
107
|
+ </el-table-column>
|
90
|
108
|
|
91
|
109
|
<el-table-column align="center" width="150">
|
92
|
110
|
<template slot="header" slot-scope="scope">
|
|
@@ -195,7 +213,7 @@
|
195
|
213
|
<script>
|
196
|
214
|
import stockInDialog from './Dialog/stockInDialog'
|
197
|
215
|
import { uParseTime } from '@/utils/tools'
|
198
|
|
-
|
|
216
|
+ import {getDataConfig } from "@/utils/data";
|
199
|
217
|
import {
|
200
|
218
|
deleteWarehouseInfo,
|
201
|
219
|
GetAllConfig,
|
|
@@ -340,7 +358,9 @@
|
340
|
358
|
this.propForm.formValue = {}
|
341
|
359
|
this.propForm.isCreated = 1
|
342
|
360
|
this.isVisibility = true
|
343
|
|
- }, comfirm: function(val) {
|
|
361
|
+ },
|
|
362
|
+ comfirm: function(val) {
|
|
363
|
+ console.log("val99999999999999",val)
|
344
|
364
|
this.propForm.goodType = []
|
345
|
365
|
this.propForm.goods = []
|
346
|
366
|
|
|
@@ -352,7 +372,7 @@
|
352
|
372
|
this.recordInfo.recordData[this.currentIndex].good_type_id = val.selectedGoodInfo[i].good_type_id
|
353
|
373
|
this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
|
354
|
374
|
this.recordInfo.recordData[this.currentIndex].price = val.selectedGoodInfo[i].buy_price.toString()
|
355
|
|
-
|
|
375
|
+ this.recordInfo.recordData[this.currentIndex].good_unit = val.selectedGoodInfo[i].good_unit
|
356
|
376
|
} else {
|
357
|
377
|
const tempForm = {}
|
358
|
378
|
tempForm['good_type_id'] =val.selectedGoodInfo[i].good_type_id
|
|
@@ -365,6 +385,7 @@
|
365
|
385
|
tempForm['remark'] = ''
|
366
|
386
|
tempForm['dealer'] = ''
|
367
|
387
|
tempForm['manufacturer'] = ''
|
|
388
|
+ tempForm['good_unit'] = val.selectedGoodInfo[i].good_unit
|
368
|
389
|
this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
|
369
|
390
|
}
|
370
|
391
|
}
|
|
@@ -434,6 +455,7 @@
|
434
|
455
|
}
|
435
|
456
|
return name
|
436
|
457
|
}, specificationName: function(good_info_id) {
|
|
458
|
+ console.log("333333333",this.goodInfo)
|
437
|
459
|
let name = ''
|
438
|
460
|
for (let i = 0; i < this.goodInfo.length; i++) {
|
439
|
461
|
if (this.goodInfo[i].id == good_info_id) {
|
|
@@ -466,13 +488,15 @@
|
466
|
488
|
return ''
|
467
|
489
|
}
|
468
|
490
|
return Math.round(parseFloat(val) * 100) / 100
|
469
|
|
- }, GetWarehouseInfoByOrdeNumber: function() {
|
|
491
|
+ },
|
|
492
|
+ GetWarehouseInfoByOrdeNumber: function() {
|
470
|
493
|
const params = {
|
471
|
494
|
'warehousing_order': sessionStorage.getItem('warehousing_orders')
|
472
|
495
|
}
|
473
|
496
|
this.recordInfo.recordData = []
|
474
|
497
|
getWarehouseInfoByOrdeNumber(params).then(response => {
|
475
|
498
|
if (response.data.state != 0) {
|
|
499
|
+ console.log("8888888888mma",response.data.data.info)
|
476
|
500
|
for (let i = 0; i < response.data.data.info.length; i++) {
|
477
|
501
|
this.recordInfo.recordData.push(response.data.data.info[i])
|
478
|
502
|
}
|
|
@@ -584,6 +608,8 @@
|
584
|
608
|
this.$refs['tableForm'].validate((valid) => {
|
585
|
609
|
if (valid) {
|
586
|
610
|
const array = this.recordInfo.recordData
|
|
611
|
+ console.log("array9999999",array)
|
|
612
|
+
|
587
|
613
|
for (let i = 0; i < array.length; i++) {
|
588
|
614
|
if (array[i].good_type_id == 0) {
|
589
|
615
|
this.$message.error('商品类型不能为空')
|
|
@@ -623,7 +649,10 @@
|
623
|
649
|
|
624
|
650
|
}, changeDealer(val) {
|
625
|
651
|
|
626
|
|
- }
|
|
652
|
+ },
|
|
653
|
+ getDataConfig(module, filed_name){
|
|
654
|
+ return getDataConfig(module, filed_name)
|
|
655
|
+ },
|
627
|
656
|
}
|
628
|
657
|
,
|
629
|
658
|
created() {
|
|
@@ -648,10 +677,12 @@
|
648
|
677
|
tempObj['remark'] = ''
|
649
|
678
|
tempObj['dealer'] = ''
|
650
|
679
|
tempObj['manufacturer'] = ''
|
651
|
|
-
|
|
680
|
+ tempObj['good_unit'] = ''
|
652
|
681
|
this.recordInfo.recordData.push(tempObj)
|
653
|
682
|
this.GetConfigInfo()
|
654
|
683
|
this.propForm.goodUnit = this.$store.getters.good_unit
|
|
684
|
+
|
|
685
|
+ console.log("单位",this.getDataConfig('hemodialysis','units'))
|
655
|
686
|
}
|
656
|
687
|
|
657
|
688
|
}
|