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