|
|
@ -159,10 +159,8 @@ |
|
|
|
</view> |
|
|
|
<selectClickList ref="selectPopup" title="推荐信息" @select="selectPlan"></selectClickList> |
|
|
|
<winScanButtonTop @goScan='openScanPopupTo' title="箱码"></winScanButtonTop> |
|
|
|
<win-scan-button @goScan='openLocationFrom' title="来源库位"></win-scan-button> |
|
|
|
<winScanButtonBottom @goScan='openLocationTo' title="目标库位"></winScanButtonBottom> |
|
|
|
<win-scan-button @goScan='openLocationTo' title="目标库位"></win-scan-button> |
|
|
|
<win-scan-by-pack ref="scanPopupTo" @getScanResult='getScanResultTo' title="箱码"></win-scan-by-pack> |
|
|
|
<winScanLocationCode ref="locationFrom" title="来源库位" @getLocation="geFromLocation"></winScanLocationCode> |
|
|
|
<winScanLocationCode ref="locationTo" title="目标库位" @getLocation="geToLocation"></winScanLocationCode> |
|
|
|
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()' |
|
|
|
@afterCloseScanMessage='closeScanMessage'></com-message> |
|
|
@ -232,7 +230,7 @@ |
|
|
|
jobStatus: "", |
|
|
|
toLocationInfo: {}, |
|
|
|
handleToPackingCodeLocationCode: "", |
|
|
|
showBtn:true |
|
|
|
showBtn: true |
|
|
|
} |
|
|
|
}, |
|
|
|
props: { |
|
|
@ -245,11 +243,9 @@ |
|
|
|
//返回首页 |
|
|
|
onNavigationBarButtonTap(e) { |
|
|
|
if (e.index === 0) { |
|
|
|
if (this.datacontent.isClaims &&this.datacontent.claimsUserId==localStorage.getItem('userId')) { |
|
|
|
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
|
//取消承接任务 |
|
|
|
cancelTakeCoatingIssueJob(this.id).then(res => { |
|
|
|
}).catch(error => { |
|
|
|
}) |
|
|
|
cancelTakeCoatingIssueJob(this.id).then(res => {}).catch(error => {}) |
|
|
|
} |
|
|
|
goHome(); |
|
|
|
} else if (e.index === 1) { |
|
|
@ -260,7 +256,7 @@ |
|
|
|
onBackPress(e) { |
|
|
|
//已经接收但是没提交任务 |
|
|
|
if (e.from == 'backbutton') { |
|
|
|
if (this.datacontent.isClaims &&this.datacontent.claimsUserId==localStorage.getItem('userId')) { |
|
|
|
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
|
//取消承接任务 |
|
|
|
cancelTakeCoatingIssueJob(this.id).then(res => { |
|
|
|
uni.navigateBack(); |
|
|
@ -286,29 +282,6 @@ |
|
|
|
openLocationTo() { |
|
|
|
this.$refs.locationTo.openScanPopup() |
|
|
|
}, |
|
|
|
openLocationFrom() { |
|
|
|
this.$refs.locationFrom.openScanPopup() |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
geFromLocation(locationInfo) { |
|
|
|
var current = this.details[0] |
|
|
|
if (!current.handledToPackingCode) { |
|
|
|
this.showMessage("请先扫描箱码") |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (locationInfo.code != current.handleToPackingCodeLocationCode) { |
|
|
|
this.showMessage("扫描来源库位[" + locationInfo.code + "]与箱码[" + current.handledToPackingCode + |
|
|
|
"]对应的库位[" + current.handleToPackingCodeLocationCode + "]不一致,请重新扫描") |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
current.handledFromLocationCode = locationInfo.code |
|
|
|
current.handledFromLocationArea = locationInfo.locationArea |
|
|
|
current.handledFromLocationGroup = locationInfo.locationGroup |
|
|
|
current.handledFromLocationErpCode = locationInfo.locationErpCode |
|
|
|
}, |
|
|
|
|
|
|
|
geToLocation(locationInfo) { |
|
|
|
var current = this.details[0] |
|
|
@ -379,7 +352,7 @@ |
|
|
|
//是否承接 |
|
|
|
//已经承接 |
|
|
|
if (this.datacontent.isClaims) { |
|
|
|
this.datacontent.jobStatus =2 |
|
|
|
this.datacontent.jobStatus = 2 |
|
|
|
//承接并且承接人是自己显示,不是自己隐藏 |
|
|
|
if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
|
this.showBtn = true |
|
|
@ -422,17 +395,17 @@ |
|
|
|
"]不一致,是否继续发料?", |
|
|
|
res => { |
|
|
|
if (res) { |
|
|
|
this.setData(result,data,fromData) |
|
|
|
this.setData(result, data, fromData) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.setData(result,data,fromData) |
|
|
|
this.setData(result, data, fromData) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
setData(result,data,fromData) { |
|
|
|
setData(result, data, fromData) { |
|
|
|
this.getBalance(result, res => { |
|
|
|
if (res.totalCount > 0) { |
|
|
|
var balancesItem = res.items[0]; |
|
|
@ -447,7 +420,7 @@ |
|
|
|
item.handledToLot = balancesItem.lot |
|
|
|
item.handledToWarehouseCode = balancesItem.warehouseCode |
|
|
|
item.handledToQty = balancesItem.qty |
|
|
|
item.stdPackQty =balancesItem.stdPackQty |
|
|
|
item.stdPackQty = balancesItem.stdPackQty |
|
|
|
|
|
|
|
item.handledFromContainerCode = balancesItem.containerCode |
|
|
|
item.handledFromPackingCode = balancesItem.packingCode |
|
|
@ -458,6 +431,7 @@ |
|
|
|
item.handledFromLot = balancesItem.lot |
|
|
|
item.handledFromWarehouseCode = balancesItem.warehouseCode |
|
|
|
item.handledFromQty = balancesItem.qty |
|
|
|
item.handledFromLocationCode = balancesItem.locationCode |
|
|
|
item.handleToPackingCodeLocationCode = balancesItem.locationCode |
|
|
|
} else { |
|
|
|
showConfirmMsg("箱码[" + fromData.code + "]的批次[" + balancesItem.lot + "]与推荐目标批次[" + item |
|
|
@ -472,7 +446,7 @@ |
|
|
|
item.handledToLot = balancesItem.lot |
|
|
|
item.handledToWarehouseCode = balancesItem.warehouseCode |
|
|
|
item.handledToQty = balancesItem.qty |
|
|
|
item.stdPackQty =balancesItem.stdPackQty |
|
|
|
item.stdPackQty = balancesItem.stdPackQty |
|
|
|
|
|
|
|
item.handledFromContainerCode = balancesItem.containerCode |
|
|
|
item.handledFromPackingCode = balancesItem.packingCode |
|
|
@ -483,6 +457,7 @@ |
|
|
|
item.handledFromLot = balancesItem.lot |
|
|
|
item.handledFromWarehouseCode = balancesItem.warehouseCode |
|
|
|
item.handledFromQty = balancesItem.qty |
|
|
|
item.handledFromLocationCode = balancesItem.locationCode |
|
|
|
item.handleToPackingCodeLocationCode = balancesItem.locationCode |
|
|
|
} |
|
|
|
}) |
|
|
@ -511,7 +486,7 @@ |
|
|
|
// sortBy: 'PackingCode asc' |
|
|
|
|
|
|
|
}; |
|
|
|
if(this.details[0].recommendFromPackingCode==result.data.code){ |
|
|
|
if (this.details[0].recommendFromPackingCode == result.data.code) { |
|
|
|
balances(params) |
|
|
|
.then(res => { |
|
|
|
if (res.totalCount === 0) { |
|
|
@ -525,7 +500,7 @@ |
|
|
|
this.showScanMessage(err.message); |
|
|
|
uni.hideLoading(); |
|
|
|
}); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
getBalanceRemoveInAndOut(params) |
|
|
|
.then(res => { |
|
|
|
if (res.totalCount === 0) { |
|
|
@ -601,10 +576,6 @@ |
|
|
|
this.showMessage('请先扫描目标库位'); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!that.details[0].handledFromLocationCode) { |
|
|
|
this.showMessage('请先扫描来源库位'); |
|
|
|
return; |
|
|
|
} |
|
|
|
that.finsh(); |
|
|
|
|
|
|
|
}, |
|
|
@ -621,9 +592,7 @@ |
|
|
|
finshCoatingIssueJob(that.id, params.id, params) |
|
|
|
.then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res != null) { |
|
|
|
that.showCommitSuccessMessage(); |
|
|
|
} |
|
|
|
that.showCommitSuccessMessage(); |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
that.showMessage(err.message); |
|
|
|