|
|
@ -1,10 +1,10 @@ |
|
|
|
<template> |
|
|
|
<view class=""> |
|
|
|
<com-empty-view v-if="jobList.length==0"></com-empty-view> |
|
|
|
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionline" ref="filter" otherTitle="" |
|
|
|
@switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" |
|
|
|
:checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" @productionLineCode="productionLineCode" |
|
|
|
@fromLocationCode="fromLocationCode"> |
|
|
|
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionline" |
|
|
|
ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" |
|
|
|
@onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" |
|
|
|
@productionLineCode="productionLineCode" @fromLocationCode="fromLocationCode"> |
|
|
|
</job-filter> |
|
|
|
<view v-if="jobList.length>0"> |
|
|
|
<uni-swipe-action ref="swipeAction"> |
|
|
@ -22,7 +22,7 @@ |
|
|
|
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> |
|
|
|
</view> |
|
|
|
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button> |
|
|
|
<winScanPackJob ref="scanPopup" @getResult='getScanResult' ></winScanPackJob> |
|
|
|
<winScanPackJob ref="scanPopup" @getResult='getScanResult'></winScanPackJob> |
|
|
|
<jobList ref="jobList" @selectItem="selectItem"></jobList> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
|
</view> |
|
|
@ -78,10 +78,10 @@ |
|
|
|
status: '1,2', //待处理 、进行中 |
|
|
|
detailOptions: [], |
|
|
|
detailGiveupOptions: [], |
|
|
|
productionline:[] |
|
|
|
productionline: [] |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(){ |
|
|
|
onLoad() { |
|
|
|
this.getIssueJobByProductionline() |
|
|
|
}, |
|
|
|
onShow() { |
|
|
@ -124,15 +124,15 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
getIssueJobByProductionline(){ |
|
|
|
getIssueJobByProductionline().then(res=>{ |
|
|
|
console.log('生产线',res) |
|
|
|
if(res.code==0){ |
|
|
|
this.productionline = res.data.map(item=>({ |
|
|
|
getIssueJobByProductionline() { |
|
|
|
getIssueJobByProductionline().then(res => { |
|
|
|
console.log('生产线', res) |
|
|
|
if (res.code == 0) { |
|
|
|
this.productionline = res.data.map(item => ({ |
|
|
|
value: item.value, |
|
|
|
text: item.name |
|
|
|
})) |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.productionline = [] |
|
|
|
} |
|
|
|
}) |
|
|
@ -257,7 +257,7 @@ |
|
|
|
|
|
|
|
openJobDetail(item, scanMessage = '') { |
|
|
|
uni.navigateTo({ |
|
|
|
url: './issueDetail?id=' + item.masterId + '&status=' + item.status+'&scanMessage=' + |
|
|
|
url: './issueDetail?id=' + item.masterId + '&status=' + item.status + '&scanMessage=' + |
|
|
|
scanMessage |
|
|
|
}); |
|
|
|
}, |
|
|
@ -272,7 +272,7 @@ |
|
|
|
|
|
|
|
selectItem(item) { |
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
|
this.openJobDetail(item,this.scanMessage); |
|
|
|
this.openJobDetail(item, this.scanMessage); |
|
|
|
}, |
|
|
|
|
|
|
|
swipeClick(e, dataContent) { |
|
|
@ -361,7 +361,9 @@ |
|
|
|
showMessage(message) { |
|
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
|
|
if (res) { |
|
|
|
|
|
|
|
if (this.$refs.scanPopup) { |
|
|
|
this.$refs.scanPopup.packGetFocus() |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
@ -369,17 +371,16 @@ |
|
|
|
this.$refs.scanPopup.openScanPopup(); |
|
|
|
}, |
|
|
|
getScanResult(result) { |
|
|
|
if(!result.label.batch){ |
|
|
|
if (!result.label.batch) { |
|
|
|
this.showMessage("批次为空") |
|
|
|
return; |
|
|
|
} |
|
|
|
if(!result.label.itemCode){ |
|
|
|
if (!result.label.itemCode) { |
|
|
|
this.showMessage("物料号为空") |
|
|
|
return; |
|
|
|
} |
|
|
|
try { |
|
|
|
var filters = [ |
|
|
|
{ |
|
|
|
var filters = [{ |
|
|
|
column: "status", |
|
|
|
action: "in", |
|
|
|
value: '1,2' |
|
|
@ -402,7 +403,7 @@ |
|
|
|
sort: 'createTime', |
|
|
|
by: 'asc' |
|
|
|
}).then(res => { |
|
|
|
this.scanMessage =result.scanMessage |
|
|
|
this.scanMessage = result.scanMessage |
|
|
|
let resultList = res.data.list; |
|
|
|
if (resultList.length > 0) { |
|
|
|
resultList.forEach(item => { |
|
|
@ -410,16 +411,17 @@ |
|
|
|
item.selected = false |
|
|
|
}) |
|
|
|
let list = [] |
|
|
|
resultList.forEach(item=>{ |
|
|
|
if(!list.find(subItem=>subItem.title==item.title)){ |
|
|
|
resultList.forEach(item => { |
|
|
|
if (!list.find(subItem => subItem.title == item.title)) { |
|
|
|
list.push(item) |
|
|
|
} |
|
|
|
}) |
|
|
|
if(list.length >0){ |
|
|
|
if (list.length > 0) { |
|
|
|
this.selectItem(list[0]) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.showMessage("物料号["+result.label.itemCode+"]批次["+result.label.batch+']未查找到任务') |
|
|
|
this.showMessage("物料号[" + result.label.itemCode + "]批次[" + result.label.batch + |
|
|
|
']未查找到任务') |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|