|
@ -1,5 +1,14 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="page-wraper"> |
|
|
<view class="page-wraper"> |
|
|
|
|
|
<view class="page-header"> |
|
|
|
|
|
<view class="header_job_top"> |
|
|
|
|
|
<job-top :dataContent="jobContent"></job-top> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="header_item"> |
|
|
|
|
|
申请单号 : {{jobContent.requestNumber}} |
|
|
|
|
|
</view> |
|
|
|
|
|
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line> |
|
|
|
|
|
</view> |
|
|
<view class="page-main"> |
|
|
<view class="page-main"> |
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
@ -63,7 +72,7 @@ |
|
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
|
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
|
|
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
|
|
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
|
|
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue' |
|
|
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue' |
|
|
|
|
|
import jobTop from '@/mycomponents/job/jobTop.vue' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
@ -75,7 +84,8 @@ |
|
|
requiredLocation, |
|
|
requiredLocation, |
|
|
comMessage, |
|
|
comMessage, |
|
|
winScanPackAndLocation, |
|
|
winScanPackAndLocation, |
|
|
detailInfoPopup |
|
|
detailInfoPopup, |
|
|
|
|
|
jobTop |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -95,16 +105,15 @@ |
|
|
this.id = option.id; |
|
|
this.id = option.id; |
|
|
if (this.id != undefined) { |
|
|
if (this.id != undefined) { |
|
|
// //新建的任务自动接收 |
|
|
// //新建的任务自动接收 |
|
|
// if (option.status == "JOB_PENDING") { |
|
|
if (option.status == "1") { |
|
|
// this.receive((callback => { |
|
|
this.receive((callback => { |
|
|
// this.received = true; |
|
|
this.received = true; |
|
|
// this.getDetail(); |
|
|
this.getDetail(); |
|
|
// })); |
|
|
})); |
|
|
// } else { |
|
|
} else { |
|
|
// this.getDetail(); |
|
|
|
|
|
// } |
|
|
|
|
|
this.getDetail(); |
|
|
this.getDetail(); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
//返回首页 |
|
|
//返回首页 |
|
|
onNavigationBarButtonTap(e) { |
|
|
onNavigationBarButtonTap(e) { |
|
@ -256,31 +265,59 @@ |
|
|
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); |
|
|
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); |
|
|
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); |
|
|
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); |
|
|
if (itemDetail.inventoryStatus != result.balance.inventoryStatus){ |
|
|
if (itemDetail.inventoryStatus != result.balance.inventoryStatus){ |
|
|
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
if(this.jobContent.allowModifyInventoryStatus=="TRUE"){ |
|
|
']不一致,是否继续上架?', res => { |
|
|
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
|
|
|
']不一致,是否继续转移?', res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance |
|
|
itemDetail.handleQty = Number(result.balance.qty) ; |
|
|
.qty) ? Number(result.balance.qty) : Number(result.label.qty); |
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
itemDetail.balance.balanceQty =Number(result.balance.qty) ; |
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
this.calcHandleQty(); |
|
|
this.calcHandleQty(); |
|
|
} else { |
|
|
} else { |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
}else { |
|
|
|
|
|
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
|
|
|
']不一致,不允许转移!', res => { |
|
|
|
|
|
this.scanPopupGetFocus(); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
}else { |
|
|
}else { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance |
|
|
itemDetail.handleQty = Number(result.balance.qty) ; |
|
|
.qty) ? Number(result.balance.qty) : Number(result.label.qty); |
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty); |
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
this.calcHandleQty(); |
|
|
this.calcHandleQty(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { |
|
|
|
|
|
// this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
|
|
|
// ']不一致,是否继续转移?', res => { |
|
|
|
|
|
// if (res) { |
|
|
|
|
|
// itemDetail.scaned = true; |
|
|
|
|
|
// itemDetail.handleQty = Number(result.balance.qty) ; |
|
|
|
|
|
// itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
|
|
|
// itemDetail.balance = result.balance; |
|
|
|
|
|
// itemDetail.balance.balanceQty = result.balance.qty; |
|
|
|
|
|
// itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
|
|
|
// itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
|
|
|
// this.calcHandleQty(); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.scanPopupGetFocus(); |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
// } else { |
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -325,21 +362,35 @@ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
|
|
|
this.managementList = []; |
|
|
|
|
|
//查询管理模式 |
|
|
|
|
|
// this.detailSource.forEach(item => { |
|
|
|
|
|
// item.subList.forEach(detail => { |
|
|
|
|
|
// if (detail.scaned) { |
|
|
|
|
|
// getManagementPrecisions(item.itemCode,detail.toLocationCode,res=>{ |
|
|
|
|
|
// if (res.success) { |
|
|
|
|
|
// this.managementList = this.managementList.concat(res.list) |
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
var params = this.setParams(); |
|
|
var params = this.setParams(); |
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
|
|
|
|
|
|
// inventoryMoveSubmit(params).then(res => { |
|
|
inventoryMoveSubmit(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 + "]") |
|
|
// } |
|
|
} |
|
|
// }).catch(error => { |
|
|
}).catch(error => { |
|
|
// uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
// this.showErrorMessage(error) |
|
|
this.showErrorMessage(error) |
|
|
// }) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setParams() { |
|
|
setParams() { |
|
@ -349,6 +400,13 @@ |
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
|
item.subList.forEach(detail => { |
|
|
item.subList.forEach(detail => { |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
|
|
|
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
|
|
|
// detail.packingNumber, detail.batch); |
|
|
|
|
|
detail.toPackingNumber = detail.packingNumber; |
|
|
|
|
|
detail.toBatch = detail.batch; |
|
|
|
|
|
detail.toContainerNumber = ''; |
|
|
|
|
|
|
|
|
|
|
|
detail.toLocationCode = detail.toLocationCode; |
|
|
subList.push(detail) |
|
|
subList.push(detail) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -421,6 +479,7 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|