Commit 4e8da62b authored by xiangzj's avatar xiangzj

以酒促酒

parent 9b3b14a2
...@@ -193,27 +193,39 @@ ...@@ -193,27 +193,39 @@
availableBot: botNum availableBot: botNum
} }
if(row.availableQty - 0 === 0){ if(row.availableQty - 0 === 0){
return Message.warning('选择的酒不够一件') uni.showToast({
title: '选择的酒不够一件',
duration: 2000,
icon: 'none'
});
return
} }
uni.navigateTo({ uni.navigateTo({
url: `/pages/purchase/purchase-apply?order=${JSON.stringify(row)}&sourceType=purchase` url: `/pages/purchase/purchase-apply?order=${JSON.stringify(row)}&sourceType=purchase`
}) })
}, },
handleCheck(idx,row){ handleCheck(idx,row){
// this.$set(this.lists,idx,{...this.lists[idx],checked : !this.lists[idx].checked})
this.lists[idx].checked = !this.lists[idx].checked this.lists[idx].checked = !this.lists[idx].checked
this.checkedArr = [] this.checkedArr = []
this.lists.forEach((ele,index) => { this.lists.forEach((ele,index) => {
if(idx !== index){ if(idx !== index){
if(ele.productCode !== this.lists[idx].productCode || ele.zzfld000001 !== this.lists[idx].zzfld000001){ if(ele.productCode !== this.lists[idx].productCode || ele.zzfld000001 !== this.lists[idx].zzfld000001 ||ele.invoId !== this.lists[idx].invoId){
ele.disabled = true ele.disabled = true
}else{ }else{
ele.disabled = false ele.disabled = false
} }
} }
if(ele.checked){ if(ele.checked){
this.checkedArr.push(row) this.checkedArr.push(ele)
} }
// if(ele.checked){
// if(ele.productCode === row.productCode && ele.zzfld000001 === row.zzfld000001 && ele.invoId === row.invoId && ele.zZFLD00002Q === row.zZFLD00002Q && ele.availableBot === row.availableBot && ele.availableQty === row.availableQty ){
// this.checkedArr.push(row)
// }
// }
}) })
this.lists.forEach((ele,index) => { this.lists.forEach((ele,index) => {
if(this.checkedArr.length === 0){ if(this.checkedArr.length === 0){
ele.disabled = false ele.disabled = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment