|
|
@ -6,6 +6,10 @@ |
|
|
|
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :isShowScanHint="false" |
|
|
|
allCountHint="箱数"> |
|
|
|
</com-job-scan-detail> |
|
|
|
<view class="" style="background-color: #fff; padding: 20rpx; font-size: 32rpx;"> |
|
|
|
承接人 : {{datacontent.claimsUserName}} |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" |
|
|
|
class="scroll-detail"> |
|
|
@ -153,7 +157,7 @@ |
|
|
|
</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_save_btn btn_double" @click="submit()">提交</button> |
|
|
|
</view> |
|
|
@ -231,7 +235,8 @@ |
|
|
|
titleArray: ['箱标签'], |
|
|
|
jobStatus: "", |
|
|
|
toLocationInfo: {}, |
|
|
|
handleToPackingCodeLocationCode: "" |
|
|
|
handleToPackingCodeLocationCode: "", |
|
|
|
showBtn: true |
|
|
|
} |
|
|
|
}, |
|
|
|
props: { |
|
|
@ -239,20 +244,15 @@ |
|
|
|
}, |
|
|
|
onLoad(param) { |
|
|
|
this.id = param.id; |
|
|
|
if (param.jobStatus == 1) { |
|
|
|
this.receive((callback => { |
|
|
|
this.getDetail(); |
|
|
|
})); |
|
|
|
} else { |
|
|
|
this.getDetail(); |
|
|
|
} |
|
|
|
this.getDetail(); |
|
|
|
}, |
|
|
|
//返回首页 |
|
|
|
onNavigationBarButtonTap(e) { |
|
|
|
if (e.index === 0) { |
|
|
|
cancelTakeInjectionIssueJob(this.id).then(res => { |
|
|
|
}).catch(error => { |
|
|
|
}) |
|
|
|
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
|
cancelTakeInjectionIssueJob(this.id).then(res => {}).catch(error => {}) |
|
|
|
} |
|
|
|
|
|
|
|
goHome(); |
|
|
|
} else if (e.index === 1) { |
|
|
|
window.location.reload(); |
|
|
@ -262,7 +262,7 @@ |
|
|
|
onBackPress(e) { |
|
|
|
//已经接收但是没提交任务 |
|
|
|
if (e.from == 'backbutton') { |
|
|
|
if (this.jobStatus == 2) { |
|
|
|
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
|
//取消承接任务 |
|
|
|
cancelTakeInjectionIssueJob(this.id).then(res => { |
|
|
|
uni.navigateBack(); |
|
|
@ -339,6 +339,7 @@ |
|
|
|
}; |
|
|
|
getInjectionIssueDetail(params) |
|
|
|
.then(item => { |
|
|
|
uni.hideLoading(); |
|
|
|
console.log('item', item); |
|
|
|
that.datacontent = item; |
|
|
|
that.jobStatus = item.jobStatus; |
|
|
@ -366,9 +367,9 @@ |
|
|
|
); |
|
|
|
that.ispending = item.jobStatus === 2; |
|
|
|
this.allCount = that.details.length; |
|
|
|
|
|
|
|
this.setReceived(); |
|
|
|
} |
|
|
|
uni.hideLoading(); |
|
|
|
|
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.showMessage('未查找到详细信息') |
|
|
@ -376,6 +377,29 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
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) { |
|
|
|
var fromData = result.data; |
|
|
|
var data = this.details.filter(r => r.itemCode == result.data.itemCode) |
|
|
@ -393,18 +417,18 @@ |
|
|
|
"]不一致,是否继续发料?", |
|
|
|
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]; |
|
|
@ -419,7 +443,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 |
|
|
@ -444,7 +468,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 |
|
|
|
item.handledFromSupplierBatch = balancesItem.supplierBatch |
|
|
@ -482,7 +506,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) { |
|
|
@ -496,7 +520,7 @@ |
|
|
|
this.showScanMessage(err.message); |
|
|
|
uni.hideLoading(); |
|
|
|
}); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
getBalanceRemoveInAndOut(params) |
|
|
|
.then(res => { |
|
|
|
if (res.totalCount === 0) { |
|
|
@ -589,7 +613,7 @@ |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
let params = that.details[0]; |
|
|
|
console.log("提交",JSON.stringify(params)) |
|
|
|
console.log("提交", JSON.stringify(params)) |
|
|
|
finshInjectionIssueJob(that.id, params.id, params) |
|
|
|
.then(res => { |
|
|
|
uni.hideLoading(); |
|
|
@ -632,7 +656,7 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
scanPopupGetFocus() { |
|
|
|
if(this.$refs.scanPopupTo){ |
|
|
|
if (this.$refs.scanPopupTo) { |
|
|
|
this.$refs.scanPopupTo.getfocus(); |
|
|
|
} |
|
|
|
}, |
|
|
|