|
@@ -441,6 +441,7 @@
|
|
<script>
|
|
<script>
|
|
import { getOrderDetail, getHomeLoginList, getHomeLoginDetail, getWarehouseList, addHome, editHome, submitHome, checkStock, getRetailProductList } from "@/api/supply/engin";
|
|
import { getOrderDetail, getHomeLoginList, getHomeLoginDetail, getWarehouseList, addHome, editHome, submitHome, checkStock, getRetailProductList } from "@/api/supply/engin";
|
|
import { getDictList, getTypeList, getSalesmanList } from '@/api/common'
|
|
import { getDictList, getTypeList, getSalesmanList } from '@/api/common'
|
|
|
|
+import { findElem } from '@/utils/util'
|
|
|
|
|
|
let that
|
|
let that
|
|
export default {
|
|
export default {
|
|
@@ -542,7 +543,7 @@ export default {
|
|
|
|
|
|
formLoading: false,
|
|
formLoading: false,
|
|
|
|
|
|
- isFirst: true,
|
|
|
|
|
|
+ isFirst: false,
|
|
salesmanList: [],
|
|
salesmanList: [],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -557,8 +558,11 @@ export default {
|
|
if(this.goodsList && this.goodsList.length) {
|
|
if(this.goodsList && this.goodsList.length) {
|
|
this.goodsList.forEach(item => {
|
|
this.goodsList.forEach(item => {
|
|
if(item.serviceId) {
|
|
if(item.serviceId) {
|
|
- let obj = this.salesmanList.find(o => o.adminUserId == item.serviceId);
|
|
|
|
- list.push(obj);
|
|
|
|
|
|
+ let hasItem = findElem(list, 'adminUserId', item.serviceId);
|
|
|
|
+ if(hasItem < 0) {
|
|
|
|
+ let obj = this.salesmanList.find(o => o.adminUserId == item.serviceId);
|
|
|
|
+ list.push(obj);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
if(this.isFirst) {
|
|
if(this.isFirst) {
|
|
@@ -582,6 +586,7 @@ export default {
|
|
this.getWarehouseList();
|
|
this.getWarehouseList();
|
|
|
|
|
|
if(this.listItem) {
|
|
if(this.listItem) {
|
|
|
|
+ this.isFirst = true;
|
|
this.editId = this.listItem.parentId;
|
|
this.editId = this.listItem.parentId;
|
|
this.getDetail();
|
|
this.getDetail();
|
|
}else {
|
|
}else {
|
|
@@ -759,6 +764,9 @@ export default {
|
|
}),
|
|
}),
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ this.goodsList.forEach(item => {
|
|
|
|
+ item.customerWalletId = (item.wallets && item.wallets.length) ? item.wallets[0].customerWalletId : '';
|
|
|
|
+ })
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -879,6 +887,7 @@ export default {
|
|
item.rebateAmount = '';
|
|
item.rebateAmount = '';
|
|
item.rebateRate = '';
|
|
item.rebateRate = '';
|
|
item.productPriceId = item.id;
|
|
item.productPriceId = item.id;
|
|
|
|
+ item.customerWalletId = (item.wallets && item.wallets.length) ? item.wallets[0].customerWalletId : '';
|
|
});
|
|
});
|
|
this.leftGoodsList = res.data.records;
|
|
this.leftGoodsList = res.data.records;
|
|
this.listTotal = res.data.total;
|
|
this.listTotal = res.data.total;
|