|
@@ -328,33 +328,6 @@ export default {
|
|
|
showThreeStock () {
|
|
|
this.showStockCol = true
|
|
|
},
|
|
|
- // 有发货经销商时,查询
|
|
|
- reSearchTable () {
|
|
|
- // 查询参数
|
|
|
- const params = {
|
|
|
- salesBillSn: this.salesBillSn,
|
|
|
- showStock: this.showStock,
|
|
|
- warehouseSn: this.warehouseSn,
|
|
|
- promotionFlag: this.promoFlag == '' ? undefined : this.promoFlag
|
|
|
- }
|
|
|
- salesDetailAllList(params).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- res.data.forEach(item => {
|
|
|
- this.chooseList.forEach(con => {
|
|
|
- if (con.id === item.id) {
|
|
|
- item.transferDealerStockQty = con.transferDealerStockQty
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- if (this.transferQty || this.transferQty == 0) {
|
|
|
- res.data = res.data.filter(item => {
|
|
|
- return item.transferDealerStockQty == this.transferQty
|
|
|
- })
|
|
|
- }
|
|
|
- this.dataSource = res.data
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 查询表格数据
|
|
|
async searchTable () {
|
|
|
this.dataSource = []
|
|
@@ -425,9 +398,24 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // 赋值
|
|
|
- this.dataSource = listData
|
|
|
-
|
|
|
+ // 发货经销商时 查询
|
|
|
+ if (this.chooseList && this.chooseList.length) {
|
|
|
+ this.dataSource = this.chooseList
|
|
|
+ if (this.transferQty) {
|
|
|
+ this.dataSource = listData.filter(item => {
|
|
|
+ if (this.transferQty == '0') { // 不满足
|
|
|
+ return item.transferDealerStockQty <= 0
|
|
|
+ } else if (this.transferQty == '1') { // 满足
|
|
|
+ return item.transferDealerStockQty > 0
|
|
|
+ } else { // 未入库
|
|
|
+ return item.transferDealerStockQty == '--'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 赋值
|
|
|
+ this.dataSource = listData
|
|
|
+ }
|
|
|
// 格式化数据
|
|
|
let f = 0
|
|
|
let str = ''
|