|
@@ -704,6 +704,7 @@ export default {
|
|
|
},
|
|
|
// 确认导入商品
|
|
|
importGoods() {
|
|
|
+ console.log(this.salesType)
|
|
|
if (this.reData) {
|
|
|
if (this.selectionList.length != 1) {
|
|
|
return this.$message.error("重新选择的时候只能选择一条数据");
|
|
@@ -775,8 +776,9 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
} else if (this.salesType == 2) {
|
|
|
- this.selectionList.forEach(item => {
|
|
|
+ this.selectionList.forEach(async item => {
|
|
|
this.contactsDataBuyFree.push({
|
|
|
+ purchasePrice: await this.getPurchasePrice(item),
|
|
|
itemId: item.id,
|
|
|
code: item.code,
|
|
|
brand: item.brand,
|
|
@@ -785,7 +787,6 @@ export default {
|
|
|
brandItem: item.brandItem,
|
|
|
corpName: item.corpName,
|
|
|
corpId: item.corpId,
|
|
|
- purchasePrice: "",
|
|
|
salesPrice: "",
|
|
|
purchaseAmount: "",
|
|
|
salesVolume: "",
|
|
@@ -941,11 +942,17 @@ export default {
|
|
|
if (!this.contactsData[item].corpId) {
|
|
|
return this.$message.error('特价明细第' + (Number(item) + 1) + '行供应商不能为空')
|
|
|
}
|
|
|
+ if (!this.contactsData[item].salesPrice) {
|
|
|
+ return this.$message.error('特价明细第' + (Number(item) + 1) + '行销售价不能为空')
|
|
|
+ }
|
|
|
}
|
|
|
for (let item in this.contactsDataBuyFree) {
|
|
|
if (!this.contactsDataBuyFree[item].corpId) {
|
|
|
return this.$message.error('买赠明细第' + (Number(item) + 1) + '行供应商不能为空')
|
|
|
}
|
|
|
+ if (!this.contactsDataBuyFree[item].salesPrice) {
|
|
|
+ return this.$message.error('买赠明细第' + (Number(item) + 1) + '行销售价不能为空')
|
|
|
+ }
|
|
|
}
|
|
|
this.form.corps = this.form.corps.join(",");
|
|
|
this.form.specialItemList = this.contactsData;
|