|
@@ -124,6 +124,8 @@ export default {
|
|
},
|
|
},
|
|
// 快递下拉列表
|
|
// 快递下拉列表
|
|
companyData: [],
|
|
companyData: [],
|
|
|
|
+ // 选中sp
|
|
|
|
+ goodsList: [],
|
|
// 选中商品ID
|
|
// 选中商品ID
|
|
ids: [],
|
|
ids: [],
|
|
rules: {
|
|
rules: {
|
|
@@ -154,7 +156,7 @@ export default {
|
|
|
|
|
|
// 选中商品
|
|
// 选中商品
|
|
handleSelectionGoods(e) {
|
|
handleSelectionGoods(e) {
|
|
- this.ids = e.map((item) => item.itemId);
|
|
|
|
|
|
+ this.goodsList = e
|
|
},
|
|
},
|
|
|
|
|
|
// 确认
|
|
// 确认
|
|
@@ -175,11 +177,20 @@ export default {
|
|
|
|
|
|
// 提交
|
|
// 提交
|
|
submitForm(form) {
|
|
submitForm(form) {
|
|
- if (!this.ids.length) {
|
|
|
|
|
|
+ if (!this.goodsList.length) {
|
|
this.msgError("请选择发货的商品");
|
|
this.msgError("请选择发货的商品");
|
|
this.loading = false;
|
|
this.loading = false;
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ let index = this.goodsList.findIndex(item=>{
|
|
|
|
+ return item.deliveryFlowId
|
|
|
|
+ })
|
|
|
|
+ if(index != -1){
|
|
|
|
+ this.msgError(`${ this.goodsList[index].title }已发货!`);
|
|
|
|
+ this.loading = false;
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.ids = this.goodsList.map((item) => item.itemId);
|
|
let data = {
|
|
let data = {
|
|
...form,
|
|
...form,
|
|
orderId: this.goodsInfo.orderId,
|
|
orderId: this.goodsInfo.orderId,
|