|
|
@ -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> |
|
|
@ -100,7 +92,7 @@ |
|
|
|
<view class="" style="margin-left: 50rpx; margin-right: 50rpx;"> |
|
|
|
<button type="primary" size="default" @click="recommend">推荐库存</button> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</scroll-view> |
|
|
@ -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> |
|
|
@ -172,7 +164,7 @@ |
|
|
|
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue'; |
|
|
|
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue' |
|
|
|
import selectClickList from "@/mycomponents/popup/selectClickList.vue" |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
comMessage, |
|
|
@ -198,13 +190,14 @@ |
|
|
|
scrollTop: 0 |
|
|
|
}, |
|
|
|
allCount: 0, |
|
|
|
scanCount:0, |
|
|
|
scanCount: 0, |
|
|
|
isPack: true, |
|
|
|
titleArray: ['箱标签'], |
|
|
|
jobStatus: "", |
|
|
|
toLocationInfo: {}, |
|
|
|
singCode: "", |
|
|
|
shouRongCount:null |
|
|
|
shouRongCount: null, |
|
|
|
showBtn: true |
|
|
|
} |
|
|
|
}, |
|
|
|
props: { |
|
|
@ -212,17 +205,14 @@ |
|
|
|
}, |
|
|
|
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) { |
|
|
|
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
|
cancelTakeAssembleIssueJob(this.id).then(res => {}).catch(error => {}) |
|
|
|
} |
|
|
|
goHome(); |
|
|
|
} else if (e.index === 1) { |
|
|
|
window.location.reload(); |
|
|
@ -232,7 +222,7 @@ |
|
|
|
onBackPress(e) { |
|
|
|
//已经接收但是没提交任务 |
|
|
|
if (e.from == 'backbutton') { |
|
|
|
if (this.jobStatus == 2) { |
|
|
|
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) { |
|
|
|
//取消承接任务 |
|
|
|
cancelTakeAssembleIssueJob(this.id).then(res => { |
|
|
|
uni.navigateBack(); |
|
|
@ -319,16 +309,16 @@ |
|
|
|
r => { |
|
|
|
r.scaned = false; |
|
|
|
r.scanDate = new Date() |
|
|
|
r.handledFromLocationCode="" |
|
|
|
r.handledToLocationCode="" |
|
|
|
r.handledFromLocationCode = "" |
|
|
|
r.handledToLocationCode = "" |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
this.allCount = that.details[0].recommendFromQty; |
|
|
|
this.scanCount = that.details[0].handledToQty; |
|
|
|
that.details[0].defaultHandleQty = that.details[0].handledFromQty; |
|
|
|
that.details[0].tempHandledToQty =0 |
|
|
|
that.details[0].tempHandledFromQty =0 |
|
|
|
that.details[0].tempHandledToQty = 0 |
|
|
|
that.details[0].tempHandledFromQty = 0 |
|
|
|
//查找收容数 |
|
|
|
getCountByItemCode(that.details[0].itemCode).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
@ -345,15 +335,39 @@ |
|
|
|
uni.hideLoading(); |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
this.setReceived(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
uni.hideLoading(); |
|
|
|
this.showMessage('未查找到详细信息') |
|
|
|
|
|
|
|
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 |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
|
}, |
|
|
|
getScanResult(result) { |
|
|
|
let item = this.details.find(r => { |
|
|
|
return r.itemCode == result.itemCode |
|
|
@ -367,25 +381,25 @@ |
|
|
|
this.$refs.scanPackPopup.closeScanPopup(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
recommend(){ |
|
|
|
var itemCode =this.details[0].itemCode |
|
|
|
var productLine =this.details[0].prodLine |
|
|
|
if(!itemCode){ |
|
|
|
|
|
|
|
recommend() { |
|
|
|
var itemCode = this.details[0].itemCode |
|
|
|
var productLine = this.details[0].prodLine |
|
|
|
if (!itemCode) { |
|
|
|
this.showMessage("物料为空") |
|
|
|
return; |
|
|
|
} |
|
|
|
if(!productLine){ |
|
|
|
if (!productLine) { |
|
|
|
this.showMessage("生产线为空") |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中", |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
|
|
|
|
getRecommendBalance(itemCode,productLine,false).then(res=>{ |
|
|
|
|
|
|
|
getRecommendBalance(itemCode, productLine, false).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.length > 0) { |
|
|
|
var list = []; |
|
|
@ -395,12 +409,10 @@ |
|
|
|
item.value = item.SHIFT_CODE |
|
|
|
}) |
|
|
|
this.$refs.selectPopup.openScanPopup(list) |
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
} else { |
|
|
|
this.showMessage("推荐列表为0") |
|
|
|
} |
|
|
|
}).catch(error=>{ |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
@ -456,8 +468,8 @@ |
|
|
|
title: "提交中...", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
that.details[0].handledFromQty =that.details[0].tempHandledToQty |
|
|
|
that.details[0].handledToQty =that.details[0].tempHandledToQty |
|
|
|
that.details[0].handledFromQty = that.details[0].tempHandledToQty |
|
|
|
that.details[0].handledToQty = that.details[0].tempHandledToQty |
|
|
|
let params = that.details[0]; |
|
|
|
finshAssembleIssueJob(that.id, params.id, params) |
|
|
|
.then(res => { |
|
|
@ -512,11 +524,11 @@ |
|
|
|
} |
|
|
|
if (value == 0) { |
|
|
|
this.showMessage('发料数量必须大于0') |
|
|
|
item.tempHandledToQty =item.tempHandledFromQty |
|
|
|
item.tempHandledToQty = item.tempHandledFromQty |
|
|
|
this.$refs.comNumberBoxRef[0].setValue(item.tempHandledToQty); |
|
|
|
return; |
|
|
|
} |
|
|
|
item.tempHandledFromQty =value; |
|
|
|
} |
|
|
|
item.tempHandledFromQty = value; |
|
|
|
console.log('item', item.tempHandledFromQty); |
|
|
|
this.$forceUpdate(); |
|
|
|
|
|
|
|