|
@ -173,7 +173,6 @@ |
|
|
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) |
|
|
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) |
|
|
that.detailSource = getDataSource(that.detailSource, that.subList) |
|
|
that.detailSource = getDataSource(that.detailSource, that.subList) |
|
|
that.resizeCollapse(); |
|
|
that.resizeCollapse(); |
|
|
uni.hideLoading(); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
that.showMessage('列表数据为0'); |
|
|
that.showMessage('列表数据为0'); |
|
|
} |
|
|
} |
|
@ -198,7 +197,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submit() { |
|
|
submit() { |
|
|
|
|
|
var scanCount= this.getScanCount(this.subList); |
|
|
|
|
|
if(scanCount==0){ |
|
|
|
|
|
this.showErrorMessage("扫描数为0,请先扫描") |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
|
mask: true |
|
|
mask: true |
|
@ -237,7 +240,7 @@ |
|
|
repleinshJobSubmit(params).then(res => { |
|
|
repleinshJobSubmit(params).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
this.showCommitSuccessMessage("提交成功<br>生成补料记录" + res.data) |
|
|
this.showCommitSuccessMessage("提交成功<br>生成补料记录<br>" + res.data) |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
} |
|
|
} |
|
@ -432,6 +435,24 @@ |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
getScanCount(subList){ |
|
|
|
|
|
var scanCount = 0; |
|
|
|
|
|
this.detailSource.forEach(toLocationCode => { |
|
|
|
|
|
toLocationCode.Items.forEach(item => { |
|
|
|
|
|
item.Locations.forEach(fromLocation => { |
|
|
|
|
|
fromLocation.Batchs.forEach(batch => { |
|
|
|
|
|
let subItem = batch.detail; |
|
|
|
|
|
if (batch.Records.length > 0) { |
|
|
|
|
|
scanCount+=batch.Records.length |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
return scanCount; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|