|
|
@ -182,20 +182,15 @@ |
|
|
|
}); |
|
|
|
getDeliverDetail(that.id).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.data == null) { |
|
|
|
that.showMessage('未获取到详情'); |
|
|
|
if (res.data &&res.data.subList.length > 0) { |
|
|
|
that.jobContent = res.data; |
|
|
|
that.jobStatus = res.data.status; |
|
|
|
that.subList = res.data.subList; |
|
|
|
that.detailSource = getDataSource(that.detailSource, that.subList) |
|
|
|
that.toLocationCode = that.subList[0].toLocationCode |
|
|
|
that.resizeCollapse(); |
|
|
|
} else { |
|
|
|
if (res.data.subList.length > 0) { |
|
|
|
that.jobContent = res.data; |
|
|
|
that.jobStatus = res.data.status; |
|
|
|
|
|
|
|
that.subList = res.data.subList; |
|
|
|
that.detailSource = getDataSource(that.detailSource, that.subList) |
|
|
|
that.toLocationCode = that.subList[0].toLocationCode |
|
|
|
that.resizeCollapse(); |
|
|
|
} else { |
|
|
|
that.showMessage('列表数据为0'); |
|
|
|
} |
|
|
|
that.showMessage('未获取到详情'); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
@ -279,21 +274,24 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
//实际扫描的数量 |
|
|
|
item.totalQty =totalQty |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
//如果允许部分提交任务有扫描记录就可以直接提交;如果不允许部分执行,任务数量和提交数量不一致给出提示 |
|
|
|
this.detailSource.forEach(detail=>{ |
|
|
|
detail.Items.forEach(item=>{ |
|
|
|
if(item.taskQty!=item.totalQty){ |
|
|
|
str += `物料号【${item.itemCode}】提交数量【${item.totalQty}】与任务物料数量【${item.taskQty}】不一致\n` |
|
|
|
if(this.jobContent.allowPartialComplete=="FALSE"){ |
|
|
|
if(item.taskQty!=item.totalQty){ |
|
|
|
str += `物料号【${item.itemCode}】任务数量【${item.taskQty}】与提交数量【${item.totalQty}】不一致\n` |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
if(str){ |
|
|
|
str = '任务明细未全部完成,请全部扫描后提交\n' + str |
|
|
|
str = '不允许提交\n' + str |
|
|
|
this.showErrorMessage(str) |
|
|
|
} |
|
|
|
|
|
|
|