|
|
@ -30,7 +30,7 @@ |
|
|
|
:locationAreaTypeList="toLocationAreaTypeList"></requiredLocation> |
|
|
|
</view> |
|
|
|
<view class=" uni-flex uni-row"> |
|
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit">提交</button> |
|
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="clickSubmit">提交</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -225,6 +225,58 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
clickSubmit(){ |
|
|
|
let str="" |
|
|
|
var totalQty =0; |
|
|
|
var taskQty =0; |
|
|
|
this.detailSource.forEach(detail => { |
|
|
|
detail.Items.forEach(item => { |
|
|
|
taskQty =calc.add(taskQty,item.qty) |
|
|
|
item.Locations.forEach(lco => { |
|
|
|
lco.Batchs.forEach(batch => { |
|
|
|
batch.Records.forEach(record => { |
|
|
|
if (batch.qty != record.qty) { |
|
|
|
var tempHandleQty = 0 |
|
|
|
if (record.qty) { |
|
|
|
tempHandleQty = record.qty |
|
|
|
} else { |
|
|
|
tempHandleQty = 0 |
|
|
|
} |
|
|
|
if (batch.qty != 0) { |
|
|
|
str += |
|
|
|
`包装号【${record.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${batch.qty}】不一致\n` |
|
|
|
} |
|
|
|
} |
|
|
|
if(record){ |
|
|
|
var hanleQty =record.qty?record.qty:0 |
|
|
|
totalQty = calc.add(totalQty,hanleQty) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
if(str){ |
|
|
|
str = '任务明细未全部完成,是否提交?\n' + str |
|
|
|
} |
|
|
|
if(totalQty!=taskQty){ |
|
|
|
str ="扫描数量["+totalQty+"]与任务数量不一致["+taskQty+"],是否提交" |
|
|
|
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { |
|
|
|
if (res) { |
|
|
|
//防止重复点击 |
|
|
|
this.$throttle(this.submitJob, 2000, this)() |
|
|
|
} else { |
|
|
|
this.scanPopupGetFocus() |
|
|
|
} |
|
|
|
}); |
|
|
|
}else { |
|
|
|
//防止重复点击 |
|
|
|
this.$throttle(this.submitJob, 2000, this)() |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
submit() { |
|
|
|
var scanCount = this.getScanCount(this.subList); |
|
|
@ -277,6 +329,11 @@ |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
var params = this.setParams() |
|
|
|
if (!params.subList || params.subList.length == 0) { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage("请扫描您需要提交的补料任务") |
|
|
|
return |
|
|
|
} |
|
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
repleinshJobSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|