|
@@ -186,7 +186,18 @@
|
186
|
186
|
|
187
|
187
|
</template>
|
188
|
188
|
</el-table-column>
|
189
|
|
-
|
|
189
|
+ <el-table-column label="经销商" align="center" width="150">
|
|
190
|
+ <template slot-scope="scope">
|
|
191
|
+ <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
|
|
192
|
+ <el-option
|
|
193
|
+ v-for="(option, index) in manufacturerList"
|
|
194
|
+ :key="index"
|
|
195
|
+ :label="option.manufacturer_name"
|
|
196
|
+ :value="option.id">
|
|
197
|
+ </el-option>
|
|
198
|
+ </el-select>
|
|
199
|
+ </template>
|
|
200
|
+ </el-table-column>
|
190
|
201
|
|
191
|
202
|
<el-table-column label="备注" align="center" width="150">
|
192
|
203
|
<template slot-scope="scope">
|
|
@@ -348,7 +359,7 @@
|
348
|
359
|
},
|
349
|
360
|
|
350
|
361
|
manufacturer: [],
|
351
|
|
- dealer: [],
|
|
362
|
+ dealerList: [],
|
352
|
363
|
goodType: [],
|
353
|
364
|
manufacturerList:[],
|
354
|
365
|
goodList:[]
|
|
@@ -636,7 +647,6 @@
|
636
|
647
|
if (valid) {
|
637
|
648
|
const array = this.recordInfo.recordData
|
638
|
649
|
console.log("array9999999",array)
|
639
|
|
-
|
640
|
650
|
for (let i = 0; i < array.length; i++) {
|
641
|
651
|
if (array[i].good_type_id == 0) {
|
642
|
652
|
this.$message.error('商品类型不能为空')
|
|
@@ -649,10 +659,18 @@
|
649
|
659
|
this.$message.success('请添加入库商品')
|
650
|
660
|
return
|
651
|
661
|
}
|
652
|
|
-
|
|
662
|
+ for(let i=0;i<this.recordInfo.recordData.length;i++){
|
|
663
|
+ for(let j=0;j<this.manufacturerList.length;j++){
|
|
664
|
+ if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
|
|
665
|
+
|
|
666
|
+ this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
|
|
667
|
+ }
|
|
668
|
+ }
|
|
669
|
+ }
|
653
|
670
|
const params = {
|
654
|
671
|
'stockIn': this.recordInfo.recordData
|
655
|
672
|
}
|
|
673
|
+ console.log("stockIn",this.recordInfo.recordData)
|
656
|
674
|
|
657
|
675
|
postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
|
658
|
676
|
if (response.data.state == 0) {
|
|
@@ -672,7 +690,8 @@
|
672
|
690
|
,
|
673
|
691
|
changeManufacturer(val) {
|
674
|
692
|
|
675
|
|
- }, changeDealer(val) {
|
|
693
|
+ },
|
|
694
|
+ changeDealer(val) {
|
676
|
695
|
|
677
|
696
|
},
|
678
|
697
|
getDataConfig(module, filed_name){
|
|
@@ -683,14 +702,16 @@
|
683
|
702
|
if (keyword != undefined) {
|
684
|
703
|
key = keyword
|
685
|
704
|
}
|
686
|
|
- console.log("keyrowrd",key)
|
687
|
705
|
postSearchGoodList(key).then(response => {
|
688
|
706
|
if (response.data.state == 1) {
|
689
|
707
|
|
690
|
708
|
var list = response.data.data.list
|
|
709
|
+
|
691
|
710
|
this.goodList = list
|
692
|
711
|
var manufacturerList = response.data.data.manufacturerList
|
693
|
712
|
this.manufacturerList = manufacturerList
|
|
713
|
+ var dealer = response.data.data.dealer
|
|
714
|
+ this.dealerList = dealer
|
694
|
715
|
for(let i=0;i<this.goodList.length;i++){
|
695
|
716
|
for(let j=0;j<this.manufacturerList.length;j++){
|
696
|
717
|
if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
|
|
@@ -715,14 +736,15 @@
|
715
|
736
|
this.recordInfo.recordData[i].good_type_id = val.id
|
716
|
737
|
this.recordInfo.recordData[i].good_name = val.good_name
|
717
|
738
|
this.recordInfo.recordData[i].good_type_id = val.good_type_id
|
718
|
|
- this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.min_unit
|
|
739
|
+ this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.packing_unit
|
719
|
740
|
this.recordInfo.recordData[i].number = val.number
|
720
|
741
|
this.recordInfo.recordData[i].manufacturer = val.manufacturer
|
721
|
742
|
this.recordInfo.recordData[i].remark = val.remark
|
722
|
743
|
this.recordInfo.recordData[i].price = val.buy_price
|
723
|
744
|
this.recordInfo.recordData[i].specification_name = val.specification_name
|
724
|
745
|
this.recordInfo.recordData[i].good_id = val.id
|
725
|
|
- this.recordInfo.recordData[i].min_unit = val.min_unit
|
|
746
|
+ this.recordInfo.recordData[i].packing_unit = val.packing_unit
|
|
747
|
+
|
726
|
748
|
}
|
727
|
749
|
}
|
728
|
750
|
}
|