|
@ -153,7 +153,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
<view class="uni-flex uni-row new_btn_bot"> |
|
|
<view class="uni-flex uni-row new_btn_bot" v-if="showBtn"> |
|
|
<button class="new_clear_btn btn_double" @click="clear()">清空</button> |
|
|
<button class="new_clear_btn btn_double" @click="clear()">清空</button> |
|
|
<button class="new_save_btn btn_double" @click="submit()">提交</button> |
|
|
<button class="new_save_btn btn_double" @click="submit()">提交</button> |
|
|
</view> |
|
|
</view> |
|
@ -231,7 +231,8 @@ |
|
|
titleArray: ['箱标签'], |
|
|
titleArray: ['箱标签'], |
|
|
jobStatus: "", |
|
|
jobStatus: "", |
|
|
toLocationInfo: {}, |
|
|
toLocationInfo: {}, |
|
|
handleToPackingCodeLocationCode: "" |
|
|
handleToPackingCodeLocationCode: "", |
|
|
|
|
|
showBtn: true |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
@ -239,22 +240,13 @@ |
|
|
}, |
|
|
}, |
|
|
onLoad(param) { |
|
|
onLoad(param) { |
|
|
this.id = param.id; |
|
|
this.id = param.id; |
|
|
if (param.jobStatus == 1) { |
|
|
|
|
|
this.receive((callback => { |
|
|
|
|
|
this.getDetail(); |
|
|
|
|
|
})); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.getDetail(); |
|
|
this.getDetail(); |
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
//返回首页 |
|
|
//返回首页 |
|
|
onNavigationBarButtonTap(e) { |
|
|
onNavigationBarButtonTap(e) { |
|
|
if (e.index === 0) { |
|
|
if (e.index === 0) { |
|
|
if (this.jobStatus == 2) { |
|
|
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
//取消承接任务 |
|
|
cancelTakeKittingIssueJob(this.id).then(res => {}).catch(error => {}) |
|
|
cancelTakeKittingIssueJob(this.id).then(res => { |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
goHome(); |
|
|
goHome(); |
|
|
} else if (e.index === 1) { |
|
|
} else if (e.index === 1) { |
|
@ -265,7 +257,7 @@ |
|
|
onBackPress(e) { |
|
|
onBackPress(e) { |
|
|
//已经接收但是没提交任务 |
|
|
//已经接收但是没提交任务 |
|
|
if (e.from == 'backbutton') { |
|
|
if (e.from == 'backbutton') { |
|
|
if (this.jobStatus == 2) { |
|
|
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
//取消承接任务 |
|
|
//取消承接任务 |
|
|
cancelTakeKittingIssueJob(this.id).then(res => { |
|
|
cancelTakeKittingIssueJob(this.id).then(res => { |
|
|
uni.navigateBack(); |
|
|
uni.navigateBack(); |
|
@ -342,6 +334,7 @@ |
|
|
}; |
|
|
}; |
|
|
getKittingIssueDetail(params) |
|
|
getKittingIssueDetail(params) |
|
|
.then(item => { |
|
|
.then(item => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
console.log('item', item); |
|
|
console.log('item', item); |
|
|
that.datacontent = item; |
|
|
that.datacontent = item; |
|
|
that.jobStatus = item.jobStatus; |
|
|
that.jobStatus = item.jobStatus; |
|
@ -369,15 +362,37 @@ |
|
|
); |
|
|
); |
|
|
that.ispending = item.jobStatus === 2; |
|
|
that.ispending = item.jobStatus === 2; |
|
|
this.allCount = that.details.length; |
|
|
this.allCount = that.details.length; |
|
|
|
|
|
this.setReceived(); |
|
|
} |
|
|
} |
|
|
uni.hideLoading(); |
|
|
|
|
|
}) |
|
|
}) |
|
|
.catch(err => { |
|
|
.catch(err => { |
|
|
this.showMessage('未查找到详细信息') |
|
|
this.showMessage('未查找到详细信息') |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
setReceived() { |
|
|
|
|
|
//是否承接 |
|
|
|
|
|
//已经承接 |
|
|
|
|
|
if (this.datacontent.isClaims) { |
|
|
|
|
|
//承接并且承接人是自己显示,不是自己隐藏 |
|
|
|
|
|
if (this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
|
|
|
this.showBtn = true |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showBtn = false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
//未承接,调用承接接口,承接成功后显示按钮 |
|
|
|
|
|
this.receive((callback => { |
|
|
|
|
|
if (callback) { |
|
|
|
|
|
this.showBtn = true |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showBtn = false |
|
|
|
|
|
} |
|
|
|
|
|
})); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
getScanResultTo(result) { |
|
|
getScanResultTo(result) { |
|
|
var fromData = result.data; |
|
|
var fromData = result.data; |
|
@ -435,7 +450,8 @@ |
|
|
item.handledFromQty = balancesItem.qty |
|
|
item.handledFromQty = balancesItem.qty |
|
|
item.handleToPackingCodeLocationCode = balancesItem.locationCode |
|
|
item.handleToPackingCodeLocationCode = balancesItem.locationCode |
|
|
} else { |
|
|
} else { |
|
|
showConfirmMsg("箱码[" + fromData.code + "]的批次[" + balancesItem.lot + "]与推荐目标批次[" + item |
|
|
showConfirmMsg("箱码[" + fromData.code + "]的批次[" + balancesItem.lot + |
|
|
|
|
|
"]与推荐目标批次[" + item |
|
|
.recommendToLot + "]不一致,是否继续发料", res => { |
|
|
.recommendToLot + "]不一致,是否继续发料", res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
item.handledToContainerCode = balancesItem.containerCode |
|
|
item.handledToContainerCode = balancesItem.containerCode |
|
@ -458,7 +474,8 @@ |
|
|
item.handledFromLot = balancesItem.lot |
|
|
item.handledFromLot = balancesItem.lot |
|
|
item.handledFromWarehouseCode = balancesItem.warehouseCode |
|
|
item.handledFromWarehouseCode = balancesItem.warehouseCode |
|
|
item.handledFromQty = balancesItem.qty |
|
|
item.handledFromQty = balancesItem.qty |
|
|
item.handleToPackingCodeLocationCode = balancesItem.locationCode |
|
|
item.handleToPackingCodeLocationCode = balancesItem |
|
|
|
|
|
.locationCode |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|