|
@@ -523,23 +523,26 @@ export default {
|
|
|
_this.$message.warning('请先选择产品!')
|
|
|
return
|
|
|
}
|
|
|
- const chooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.id.indexOf('promo-')<0)
|
|
|
+ const chooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.stockQty > 0)
|
|
|
const obj = []
|
|
|
chooseRow && chooseRow.map(item => {
|
|
|
- if (item.stockQty > 0) {
|
|
|
- obj.push(item.salesBillDetailSn)
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- this.$confirm({
|
|
|
- title: '提示',
|
|
|
- content: '确认要批量添加到待下推列表吗?',
|
|
|
- centered: true,
|
|
|
- closable: true,
|
|
|
- onOk () {
|
|
|
- _this.$emit('addProduct', obj)
|
|
|
- }
|
|
|
+ obj.push(item.salesBillDetailSn)
|
|
|
})
|
|
|
+
|
|
|
+ if(obj.length){
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '确认要批量添加到待下推列表吗?',
|
|
|
+ centered: true,
|
|
|
+ closable: true,
|
|
|
+ onOk () {
|
|
|
+ _this.$emit('addProduct', obj)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ _this.$message.warning('库存为0,不可添加!')
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
// 整单取消
|
|
|
handleAllCancel () {
|