|
@@ -120,18 +120,20 @@
|
120
|
120
|
|
121
|
121
|
<el-table-column width="150" align="center">
|
122
|
122
|
<template slot="header" slot-scope="scope">
|
123
|
|
- <span>批号<span style="color: red"></span></span>
|
|
123
|
+ <span>批号<span style="color: red">*</span></span>
|
124
|
124
|
</template>
|
125
|
125
|
<template slot-scope="scope">
|
126
|
|
- <!-- <el-input placeholder="请输入批号" v-model="scope.row.number"></el-input> -->
|
127
|
|
- <el-select v-model="scope.row.number" filterable placeholder="请选择">
|
|
126
|
+ <el-form-item
|
|
127
|
+ :rules="tableRules.number">
|
|
128
|
+ <el-select v-model="scope.row.number" filterable placeholder="请选择" @change="changeNumberList(scope.row)">
|
128
|
129
|
<el-option
|
129
|
130
|
v-for="(item,index) in numberList"
|
130
|
131
|
:key="index"
|
131
|
132
|
:label="item.number"
|
132
|
|
- :value="item.number">
|
|
133
|
+ :value="item.id">
|
133
|
134
|
</el-option>
|
134
|
135
|
</el-select>
|
|
136
|
+ </el-form-item>
|
135
|
137
|
</template>
|
136
|
138
|
</el-table-column>
|
137
|
139
|
|
|
@@ -324,7 +326,8 @@ export default {
|
324
|
326
|
},
|
325
|
327
|
tableRules: {
|
326
|
328
|
price: [{ required: true, message: "单价不能为空", trigger: "blur" }],
|
327
|
|
- count: [{ required: true, message: "数量不能为空", trigge: "blur" }]
|
|
329
|
+ count: [{ required: true, message: "数量不能为空", trigge: "blur" }],
|
|
330
|
+ number:[{ required: true, message: "批号不能为空",trigge:"blur"}],
|
328
|
331
|
},
|
329
|
332
|
ruleForm: {
|
330
|
333
|
manufacturer: [
|
|
@@ -456,10 +459,10 @@ export default {
|
456
|
459
|
tempObj["good_unit"] = "";
|
457
|
460
|
tempObj["number"] = ""
|
458
|
461
|
tempObj["specification_name"] = ""
|
459
|
|
- tempObj["number"] = ""
|
460
|
462
|
tempObj["expiry_date"] = ""
|
461
|
463
|
tempObj["product_date"] = ""
|
462
|
464
|
tempObj["license_number"] = ""
|
|
465
|
+ tempObj["warehouse_info_id"] = 0
|
463
|
466
|
this.recordInfo.recordData.push(tempObj);
|
464
|
467
|
},
|
465
|
468
|
handleDelete: function(index, row) {
|
|
@@ -587,6 +590,7 @@ export default {
|
587
|
590
|
|
588
|
591
|
this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
|
589
|
592
|
}
|
|
593
|
+ console.log("批次好",this.numberList)
|
590
|
594
|
for(let i=0;i<this.recordInfo.recordData.length;i++){
|
591
|
595
|
for(let j=0;j<this.manufacturerList.length;j++){
|
592
|
596
|
if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
|
|
@@ -598,12 +602,18 @@ export default {
|
598
|
602
|
this.recordInfo.recordData[i].dealer = this.dealerList[z].id
|
599
|
603
|
}
|
600
|
604
|
}
|
|
605
|
+
|
|
606
|
+ for(let y=0;y<this.numberList.length;y++){
|
|
607
|
+ if(this.recordInfo.recordData[i].number == this.numberList[y].id){
|
|
608
|
+ this.recordInfo.recordData[i].number = this.numberList[y].number
|
|
609
|
+ }
|
|
610
|
+ }
|
601
|
611
|
}
|
602
|
612
|
const params = {
|
603
|
613
|
stockOut: this.recordInfo.recordData
|
604
|
614
|
};
|
605
|
615
|
console.log("2323223223",this.recordInfo.recordData);
|
606
|
|
-
|
|
616
|
+
|
607
|
617
|
postWarehouseOut(
|
608
|
618
|
params,
|
609
|
619
|
this.warehouse_out_time,
|
|
@@ -619,7 +629,7 @@ export default {
|
619
|
629
|
var msg = response.data.data.msg
|
620
|
630
|
var good_name = response.data.data.good_name
|
621
|
631
|
var specification_name = response.data.data.specification_name
|
622
|
|
- var str = good_name +"*" + specification_name +"无库存,请入库"
|
|
632
|
+ var str = good_name +"*" + specification_name +"该批次无库存,请入库"
|
623
|
633
|
console.log("msg222222222",msg)
|
624
|
634
|
if(msg == 1){
|
625
|
635
|
this.$message.error(str)
|
|
@@ -711,9 +721,7 @@ export default {
|
711
|
721
|
}
|
712
|
722
|
|
713
|
723
|
|
714
|
|
- }
|
715
|
|
-
|
716
|
|
-
|
|
724
|
+ }
|
717
|
725
|
},
|
718
|
726
|
|
719
|
727
|
getStockBatchNumber(id){
|
|
@@ -731,6 +739,15 @@ export default {
|
731
|
739
|
getDataConfig(module, filed_name) {
|
732
|
740
|
return getDataConfig(module, filed_name)
|
733
|
741
|
},
|
|
742
|
+ changeNumberList(val){
|
|
743
|
+ console.log("val232332323223232332",val)
|
|
744
|
+ for(let i=0;i<this.recordInfo.recordData.length;i++){
|
|
745
|
+ if(val.good_id == this.recordInfo.recordData[i].good_id){
|
|
746
|
+ this.recordInfo.recordData[i].warehouse_info_id = val.number
|
|
747
|
+ }
|
|
748
|
+ }
|
|
749
|
+ console.log("表格",this.recordInfo.recordData)
|
|
750
|
+ }
|
734
|
751
|
},
|
735
|
752
|
created() {
|
736
|
753
|
var nowDate = new Date();
|
|
@@ -752,9 +769,9 @@ export default {
|
752
|
769
|
tempObj["good_unit"] = ""
|
753
|
770
|
tempObj["number"] = ""
|
754
|
771
|
tempObj["specification_name"] = ""
|
755
|
|
- tempObj["number"] = ""
|
756
|
772
|
tempObj["dealer"] = ""
|
757
|
773
|
tempObj["license_number"] = ""
|
|
774
|
+ tempObj["warehouse_info_id"] = 0
|
758
|
775
|
this.recordInfo.recordData.push(tempObj);
|
759
|
776
|
this.GetConfigInfo();
|
760
|
777
|
this.propForm.goodUnit = this.$store.getters.good_unit;
|