|
@ -97,7 +97,7 @@ |
|
|
scanOptions: [], |
|
|
scanOptions: [], |
|
|
toLocationCode: '', |
|
|
toLocationCode: '', |
|
|
toLocationAreaTypeList: [], |
|
|
toLocationAreaTypeList: [], |
|
|
jobStatus:"" |
|
|
jobStatus: "" |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -129,7 +129,7 @@ |
|
|
onBackPress(e) { |
|
|
onBackPress(e) { |
|
|
//已经接收但是没提交任务 |
|
|
//已经接收但是没提交任务 |
|
|
if (e.from === 'backbutton') { |
|
|
if (e.from === 'backbutton') { |
|
|
if (this.jobStatus=="2") { |
|
|
if (this.jobStatus == "2") { |
|
|
//取消承接任务 |
|
|
//取消承接任务 |
|
|
cancleTakeRepleinshJob(this.id).then(res => { |
|
|
cancleTakeRepleinshJob(this.id).then(res => { |
|
|
uni.navigateBack(); |
|
|
uni.navigateBack(); |
|
@ -184,7 +184,10 @@ |
|
|
that.toLocationCode = that.subList[0].toLocationCode |
|
|
that.toLocationCode = that.subList[0].toLocationCode |
|
|
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) |
|
|
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) |
|
|
that.detailSource = getDataSource(that.detailSource, that.subList) |
|
|
that.detailSource = getDataSource(that.detailSource, that.subList) |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(r => { |
|
|
that.resizeCollapse(); |
|
|
that.resizeCollapse(); |
|
|
|
|
|
}, 100) |
|
|
} else { |
|
|
} else { |
|
|
that.showMessage('列表数据为0'); |
|
|
that.showMessage('列表数据为0'); |
|
|
} |
|
|
} |
|
@ -212,28 +215,28 @@ |
|
|
var scanCount = this.getScanCount(this.subList); |
|
|
var scanCount = this.getScanCount(this.subList); |
|
|
|
|
|
|
|
|
//允许部分提交 |
|
|
//允许部分提交 |
|
|
if(this.jobContent.allowPartialComplete=="TRUE"){ |
|
|
if (this.jobContent.allowPartialComplete == "TRUE") { |
|
|
// 如果扫描数是0,提示扫描数为0,是否提交,点击确定提交,取消提示消失 |
|
|
// 如果扫描数是0,提示扫描数为0,是否提交,点击确定提交,取消提示消失 |
|
|
if(scanCount == 0){ |
|
|
if (scanCount == 0) { |
|
|
this.$refs.comMessage.showQuestionMessage("扫描数为0,是否提交?",res=>{ |
|
|
this.$refs.comMessage.showQuestionMessage("扫描数为0,是否提交?", res => { |
|
|
if(res){ |
|
|
if (res) { |
|
|
this.setSubmitParamsAndSubmit(); |
|
|
this.setSubmitParamsAndSubmit(); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}else { |
|
|
} else { |
|
|
this.setSubmitParamsAndSubmit(); |
|
|
this.setSubmitParamsAndSubmit(); |
|
|
} |
|
|
} |
|
|
}else { |
|
|
} else { |
|
|
//不允许部分提交,扫描数必须等于任务数量才可以提交 |
|
|
//不允许部分提交,扫描数必须等于任务数量才可以提交 |
|
|
if(scanCount == 0){ |
|
|
if (scanCount == 0) { |
|
|
this.showErrorMessage("扫描数为0,当前补料任务不允许部分提交,请先扫描") |
|
|
this.showErrorMessage("扫描数为0,当前补料任务不允许部分提交,请先扫描") |
|
|
}else { |
|
|
} else { |
|
|
this.setSubmitParamsAndSubmit(); |
|
|
this.setSubmitParamsAndSubmit(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setSubmitParamsAndSubmit(){ |
|
|
setSubmitParamsAndSubmit() { |
|
|
//目前任务只到一个库位 |
|
|
//目前任务只到一个库位 |
|
|
var itemCodes = [] |
|
|
var itemCodes = [] |
|
|
let locationCode = this.toLocationCode |
|
|
let locationCode = this.toLocationCode |
|
@ -268,6 +271,7 @@ |
|
|
var params = this.setParams() |
|
|
var params = this.setParams() |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
|
|
|
|
return; |
|
|
repleinshJobSubmit(params).then(res => { |
|
|
repleinshJobSubmit(params).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
@ -312,17 +316,20 @@ |
|
|
.toLocationCode; |
|
|
.toLocationCode; |
|
|
record.supplierCode = r.supplierCode; |
|
|
record.supplierCode = r.supplierCode; |
|
|
|
|
|
|
|
|
if(r.parentPackingNumber!=''&&r.parentPackingNumber!=null) |
|
|
if (r.parentPackingNumber != '' && r |
|
|
{ |
|
|
.parentPackingNumber != null) { |
|
|
record.fromPackingNumber = r.parentPackingNumber; |
|
|
record.fromPackingNumber = r |
|
|
|
|
|
.parentPackingNumber; |
|
|
record.toPackingNumber = r |
|
|
record.toPackingNumber = r |
|
|
.packingNumber; |
|
|
.packingNumber; |
|
|
} |
|
|
// record.fromPackUnit = r.packUnit; |
|
|
else |
|
|
record.toPackUnit = r.packUnit; |
|
|
{ |
|
|
} else { |
|
|
record.fromPackingNumber = r.packingNumber; |
|
|
record.fromPackingNumber = r |
|
|
|
|
|
.packingNumber; |
|
|
record.toPackingNumber = r |
|
|
record.toPackingNumber = r |
|
|
.packingNumber; |
|
|
.packingNumber; |
|
|
|
|
|
record.toPackUnit = r.packUnit; |
|
|
} |
|
|
} |
|
|
record.toBatch = r.batch; |
|
|
record.toBatch = r.batch; |
|
|
|
|
|
|
|
@ -403,10 +410,10 @@ |
|
|
let handleQty = 0; |
|
|
let handleQty = 0; |
|
|
if (batch != undefined) { |
|
|
if (batch != undefined) { |
|
|
batch.Records.forEach(res => { |
|
|
batch.Records.forEach(res => { |
|
|
handleQty = calc.add(handleQty,res.qty) |
|
|
handleQty = calc.add(handleQty, res.qty) |
|
|
}) |
|
|
}) |
|
|
batch.handleQty = handleQty; |
|
|
batch.handleQty = handleQty; |
|
|
itemHandleQty = calc.add(itemHandleQty,handleQty) |
|
|
itemHandleQty = calc.add(itemHandleQty, handleQty) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -491,7 +498,7 @@ |
|
|
fromLocation.Batchs.forEach(batch => { |
|
|
fromLocation.Batchs.forEach(batch => { |
|
|
let subItem = batch.detail; |
|
|
let subItem = batch.detail; |
|
|
if (batch.Records.length > 0) { |
|
|
if (batch.Records.length > 0) { |
|
|
scanCount = calc.add(scanCount,batch.Records.length) |
|
|
scanCount = calc.add(scanCount, batch.Records.length) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|