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