|
@@ -154,21 +154,21 @@ export default {
|
|
return item.productEntity.code.indexOf(this.queryParam.productCode) >= 0 &&
|
|
return item.productEntity.code.indexOf(this.queryParam.productCode) >= 0 &&
|
|
item.productEntity.name.indexOf(this.queryParam.productName) >= 0
|
|
item.productEntity.name.indexOf(this.queryParam.productName) >= 0
|
|
})
|
|
})
|
|
- let arr = ret.map(con=>{return con.salesReturnDetailSn})
|
|
|
|
- if(arr &&arr.length>0){
|
|
|
|
- if(this.salesBillSnList && this.salesBillSnList.length>0){
|
|
|
|
- this.salesBillSnList.forEach(item=>{
|
|
|
|
- let pot = arr.indexOf(item.salesReturnDetailSn)
|
|
|
|
- if(pot!=-1){
|
|
|
|
- if(item.price ||item.price==0){
|
|
|
|
- ret[pot].price = item.price
|
|
|
|
|
|
+ const arr = ret.map(con => { return con.salesReturnDetailSn })
|
|
|
|
+ if (arr && arr.length > 0) {
|
|
|
|
+ if (this.salesBillSnList && this.salesBillSnList.length > 0) {
|
|
|
|
+ this.salesBillSnList.forEach(item => {
|
|
|
|
+ const pot = arr.indexOf(item.salesReturnDetailSn)
|
|
|
|
+ if (pot != -1) {
|
|
|
|
+ if (item.price || item.price == 0) {
|
|
|
|
+ ret[pot].price = item.price
|
|
}
|
|
}
|
|
- ret[pot].priceRemark = '抓单('+this.form.salesBillNo+')'
|
|
|
|
|
|
+ ret[pot].priceRemark = '抓单(' + this.form.salesBillNo + ')'
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
res({
|
|
res({
|
|
list: ret,
|
|
list: ret,
|
|
count: ret.length
|
|
count: ret.length
|
|
@@ -180,7 +180,7 @@ export default {
|
|
listInfo: null,
|
|
listInfo: null,
|
|
noShowBillSnList: null,
|
|
noShowBillSnList: null,
|
|
salesBillSnList: [],
|
|
salesBillSnList: [],
|
|
- salesBillFlag:false //抓单按钮
|
|
|
|
|
|
+ salesBillFlag: false // 抓单按钮
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -210,17 +210,17 @@ export default {
|
|
productList: productArr
|
|
productList: productArr
|
|
}
|
|
}
|
|
grabSalesBill(objInfo).then(res => {
|
|
grabSalesBill(objInfo).then(res => {
|
|
- if(res.status == 200){
|
|
|
|
|
|
+ if (res.status == 200) {
|
|
const newList = res.data
|
|
const newList = res.data
|
|
const _this = this
|
|
const _this = this
|
|
_this.salesBillFlag = true
|
|
_this.salesBillFlag = true
|
|
if (newList && newList.length > 0) {
|
|
if (newList && newList.length > 0) {
|
|
const flag = newList.some(item => Object.keys(item).length > 2)
|
|
const flag = newList.some(item => Object.keys(item).length > 2)
|
|
if (flag) {
|
|
if (flag) {
|
|
- this.listInfo = newList.filter(con => Object.keys(con).length > 2)
|
|
|
|
- this.openGrabOrderModal =this.isShow?true:false
|
|
|
|
|
|
+ _this.listInfo = newList.filter(con => Object.keys(con).length > 2)
|
|
const noShowList = newList.filter(con => Object.keys(con).length <= 2)
|
|
const noShowList = newList.filter(con => Object.keys(con).length <= 2)
|
|
- this.noShowBillSnList = _this.getNewSalesBillList(noShowList)
|
|
|
|
|
|
+ _this.noShowBillSnList = _this.getNewSalesBillList(noShowList)
|
|
|
|
+ _this.salesBillSnList = _this.noShowBillSnList ? _this.noShowBillSnList : []
|
|
} else {
|
|
} else {
|
|
const resultVal = _this.getNewSalesBillList(newList)
|
|
const resultVal = _this.getNewSalesBillList(newList)
|
|
this.salesBillSnList = resultVal
|
|
this.salesBillSnList = resultVal
|
|
@@ -289,7 +289,6 @@ export default {
|
|
})
|
|
})
|
|
this.form.salesReturnBillDetailList = snList
|
|
this.form.salesReturnBillDetailList = snList
|
|
}
|
|
}
|
|
-
|
|
|
|
const params = Object.assign(this.form)
|
|
const params = Object.assign(this.form)
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
@@ -314,7 +313,7 @@ export default {
|
|
},
|
|
},
|
|
// 取消
|
|
// 取消
|
|
handleCommonCancel () {
|
|
handleCommonCancel () {
|
|
- this.salesBillFlag=false
|
|
|
|
|
|
+ this.salesBillFlag = false
|
|
this.$emit('cancel')
|
|
this.$emit('cancel')
|
|
},
|
|
},
|
|
// 查询
|
|
// 查询
|