|
|
@ -3,16 +3,8 @@ |
|
|
|
<page-meta root-font-size="16px"></page-meta> |
|
|
|
<view class=""> |
|
|
|
<view class="top_card"> |
|
|
|
<com-job-scan-detail |
|
|
|
:jobContent="datacontent" |
|
|
|
:allCount="allCount" |
|
|
|
:isShowScanHint="true" |
|
|
|
scanHint="已发数" |
|
|
|
:scanCount="scanCount" |
|
|
|
:isShowOther="true" |
|
|
|
:isShowShouRong="true" |
|
|
|
:shouRongCount="shouRongCount" |
|
|
|
> |
|
|
|
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :isShowScanHint="true" scanHint="已发数" |
|
|
|
:scanCount="scanCount" :isShowOther="true" :isShowShouRong="true" :shouRongCount="shouRongCount"> |
|
|
|
</com-job-scan-detail> |
|
|
|
</view> |
|
|
|
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" |
|
|
@ -82,9 +74,9 @@ |
|
|
|
<uni-td width="120" align="center"> |
|
|
|
<view |
|
|
|
style="display: flex;flex-direction: row;justify-content:center;align-items: center;"> |
|
|
|
<com-number-box ref="comNumberBoxRef" v-model="item.tempHandledToQty" |
|
|
|
:max="999999" :min="0" style='width: 100px;' |
|
|
|
@change="qtyChanged($event,item,index)"> |
|
|
|
<com-number-box ref="comNumberBoxRef" |
|
|
|
v-model="item.tempHandledToQty" :max="999999" :min="0" |
|
|
|
style='width: 100px;' @change="qtyChanged($event,item,index)"> |
|
|
|
</com-number-box> |
|
|
|
</view> |
|
|
|
</uni-td> |
|
|
@ -126,7 +118,7 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
</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> |
|
|
@ -201,7 +193,8 @@ |
|
|
|
jobStatus: "", |
|
|
|
toLocationInfo: {}, |
|
|
|
singCode: "", |
|
|
|
shouRongCount:null |
|
|
|
shouRongCount: null, |
|
|
|
showBtn: true |
|
|
|
} |
|
|
|
}, |
|
|
|
props: { |
|
|
@ -209,22 +202,13 @@ |
|
|
|
}, |
|
|
|
onLoad(param) { |
|
|
|
this.id = param.id; |
|
|
|
if (param.jobStatus == 1) { |
|
|
|
this.receive((callback => { |
|
|
|
this.getDetail(); |
|
|
|
})); |
|
|
|
} else { |
|
|
|
this.getDetail(); |
|
|
|
} |
|
|
|
}, |
|
|
|
//返回首页 |
|
|
|
onNavigationBarButtonTap(e) { |
|
|
|
if (e.index === 0) { |
|
|
|
if (this.jobStatus == 2) { |
|
|
|
//取消承接任务 |
|
|
|
cancelTakeKittingIssueJob(this.id).then(res => { |
|
|
|
}).catch(error => { |
|
|
|
}) |
|
|
|
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
|
cancelTakeKittingIssueJob(this.id).then(res => {}).catch(error => {}) |
|
|
|
} |
|
|
|
goHome(); |
|
|
|
|
|
|
@ -236,7 +220,7 @@ |
|
|
|
onBackPress(e) { |
|
|
|
//已经接收但是没提交任务 |
|
|
|
if (e.from == 'backbutton') { |
|
|
|
if (this.jobStatus == 2) { |
|
|
|
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
|
//取消承接任务 |
|
|
|
cancelTakeKittingIssueJob(this.id).then(res => { |
|
|
|
uni.navigateBack(); |
|
|
@ -248,6 +232,7 @@ |
|
|
|
} |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
uni.setNavigationBarColor({ |
|
|
@ -349,15 +334,39 @@ |
|
|
|
uni.hideLoading(); |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
this.setReceived(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.showMessage('未查找到详细信息') |
|
|
|
|
|
|
|
uni.hideLoading(); |
|
|
|
this.showMessage('未查找到详细信息') |
|
|
|
}); |
|
|
|
}, |
|
|
|
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 |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
|
let item = this.details.find(r => { |
|
|
|
return r.itemCode == result.itemCode |
|
|
@ -399,9 +408,7 @@ |
|
|
|
item.value = item.SHIFT_CODE |
|
|
|
}) |
|
|
|
this.$refs.selectPopup.openScanPopup(list) |
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
} else { |
|
|
|
this.showMessage("推荐列表为0") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|