const commonItem = {}
this.mainForm.customermachinedetailList.forEach(item => {
if (commonItem[item.lngdetailid]) {
commonItem[item.lngdetailid].push(item)
} else {
this.$set(commonItem, item.lngdetailid, [item])
}
})
this.sumequal = true
Object.keys(commonItem).forEach((val, index) => {
this.sum = 0
commonItem[val].forEach(item => {
this.sum += item.dbldeliveryquantity * 1
})
if (commonItem[val][0].dblquantity !== this.sum) {
this.sumequal = false
}
})
if (!this.sumequal) {
this.$message.error('可配貨數量不等於申請數量')
return false
}