|
@@ -8,7 +8,7 @@
|
|
|
<view class="partList-list-box" v-for="item in partList" :key="item.id">
|
|
|
<view class="product flex align_center">
|
|
|
<view class="checkbox" v-if="model == 'checkbox'">
|
|
|
- <u-checkbox v-model="item.checked" :disabled="item.printQty==0" :name="item.id" @change="checkChange" size="40" shape="circle"></u-checkbox>
|
|
|
+ <u-checkbox v-model="item.checked" :disabled="item.putQty==0||item.qty==0" :name="item.id" @change="checkChange" size="40" shape="circle"></u-checkbox>
|
|
|
</view>
|
|
|
<view class="flex align_center flex_1">
|
|
|
<view class="pimgs" @click="checkChange({name:item.id})">
|
|
@@ -172,16 +172,18 @@
|
|
|
item.checked = val && !!item.printQty
|
|
|
})
|
|
|
this.partList.splice()
|
|
|
+ console.log(this.partList)
|
|
|
},
|
|
|
checkChange(e){
|
|
|
const row = this.partList.find(item => item.id == e.name)
|
|
|
+ const pQty = row.billState == 'FINISH' ? row.putQty : row.qty
|
|
|
console.log(row.checked)
|
|
|
if(row){
|
|
|
- row.checked = !row.checked
|
|
|
+ row.checked = pQty ? !row.checked : false
|
|
|
this.partList.splice()
|
|
|
}
|
|
|
// 判断是否全选
|
|
|
- const isAllNoChecked = this.partList.filter(item => !item.checked && item.printQty)
|
|
|
+ const isAllNoChecked = this.partList.filter(item => !item.checked || !(item.billState == 'FINISH' ? item.putQty : item.qty))
|
|
|
this.$emit('allChecked',isAllNoChecked.length == 0)
|
|
|
},
|
|
|
// 获取所有选择的
|