|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<view class=""> |
|
|
|
<com-empty-view v-if="jobList.length==0"></com-empty-view> |
|
|
|
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionline" |
|
|
|
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionlineList" |
|
|
|
ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" |
|
|
|
@onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" |
|
|
|
@productionLineCode="productionLineCode" @fromLocationCode="fromLocationCode"> |
|
|
@ -80,8 +80,10 @@ |
|
|
|
status: '1,2', //待处理 、进行中 |
|
|
|
detailOptions: [], |
|
|
|
detailGiveupOptions: [], |
|
|
|
productionline: [], |
|
|
|
title:'' |
|
|
|
productionlineList: [], |
|
|
|
title:'', |
|
|
|
productionLine:"", |
|
|
|
fromLocation:"" |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
@ -89,7 +91,7 @@ |
|
|
|
this.getIssueJobByProductionline() |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.getList('refresh'); |
|
|
|
this.getList('refresh',this.fromLocation,this.productionLine); |
|
|
|
}, |
|
|
|
|
|
|
|
onReady() { |
|
|
@ -101,11 +103,11 @@ |
|
|
|
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|
|
|
return; |
|
|
|
} |
|
|
|
this.getList("more"); |
|
|
|
this.getList("more",this.productionLine); |
|
|
|
}, |
|
|
|
|
|
|
|
onPullDownRefresh() { |
|
|
|
this.getList('refresh'); |
|
|
|
this.getList('refresh',this.productionLine); |
|
|
|
}, |
|
|
|
|
|
|
|
//后退按钮 |
|
|
@ -132,16 +134,20 @@ |
|
|
|
getIssueJobByProductionline().then(res => { |
|
|
|
console.log('生产线', res) |
|
|
|
if (res.code == 0) { |
|
|
|
this.productionline = res.data.map(item => ({ |
|
|
|
this.productionlineList = res.data.map(item => ({ |
|
|
|
value: item.value, |
|
|
|
text: item.name |
|
|
|
})) |
|
|
|
this.productionlineList.unshift({ |
|
|
|
value: "", |
|
|
|
text: "全部" |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.productionline = [] |
|
|
|
this.productionlineList = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getList(type, fromLocationCode = '', productionLineCode = '') { |
|
|
|
getList(type, fromLocation = '', productionLine = '') { |
|
|
|
let that = this; |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中....", |
|
|
@ -174,20 +180,20 @@ |
|
|
|
value: this.$store.state.user.id |
|
|
|
}) |
|
|
|
|
|
|
|
if (fromLocationCode != '') { |
|
|
|
if (fromLocation) { |
|
|
|
// 来源库位 |
|
|
|
filters.push({ |
|
|
|
column: "fromLocationCode", |
|
|
|
action: "==", |
|
|
|
value: fromLocationCode |
|
|
|
value: fromLocation |
|
|
|
}) |
|
|
|
} |
|
|
|
if (productionLineCode != '') { |
|
|
|
if (productionLine) { |
|
|
|
// 生产线 |
|
|
|
filters.push({ |
|
|
|
column: "productionLineCode", |
|
|
|
action: "==", |
|
|
|
value: productionLineCode |
|
|
|
value: productionLine |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@ -226,13 +232,13 @@ |
|
|
|
that.showMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
fromLocationCode(fromLocationCode) { |
|
|
|
console.log('fromLocationCode', fromLocationCode) |
|
|
|
this.getList('refresh', fromLocationCode, '') |
|
|
|
fromLocationCode(fromLocation) { |
|
|
|
this.fromLocation =fromLocation; |
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine) |
|
|
|
}, |
|
|
|
productionLineCode(productionLineCode) { |
|
|
|
console.log('productionLineCode', productionLineCode) |
|
|
|
this.getList('refresh', '', productionLineCode) |
|
|
|
this.productionLine =productionLineCode |
|
|
|
this.getList('refresh', this.fromLocation,this.productionLine) |
|
|
|
}, |
|
|
|
getByAsnNumber(code) { |
|
|
|
let that = this; |
|
|
@ -299,7 +305,7 @@ |
|
|
|
cancleJob(id) { |
|
|
|
cancleTakeIssueJob(id).then(res => { |
|
|
|
if (res.data) { |
|
|
|
this.getList("refresh") |
|
|
|
this.getList("refresh",this.fromLocation,this.productionLine) |
|
|
|
uni.showToast({ |
|
|
|
title: "放弃任务成功" |
|
|
|
}) |
|
|
@ -314,13 +320,13 @@ |
|
|
|
switchChangeToday(state, creationTime) { |
|
|
|
this.checkedToday = state; |
|
|
|
this.todayTime = creationTime; |
|
|
|
this.getList("refresh"); |
|
|
|
this.getList("refresh",this.fromLocation,this.productionLine); |
|
|
|
}, |
|
|
|
|
|
|
|
switchChangeWait(state, jobStatus) { |
|
|
|
this.checkedWaitTask = state; |
|
|
|
this.status = jobStatus; |
|
|
|
this.getList("refresh"); |
|
|
|
this.getList("refresh",this.fromLocation,this.productionLine); |
|
|
|
}, |
|
|
|
|
|
|
|
getScanNumber(code) { |
|
|
@ -344,6 +350,12 @@ |
|
|
|
value: code |
|
|
|
}) |
|
|
|
|
|
|
|
filters.push({ |
|
|
|
column: "accept_user_id", |
|
|
|
action: "==", |
|
|
|
value: this.$store.state.user.id |
|
|
|
}) |
|
|
|
|
|
|
|
var params = { |
|
|
|
filters: filters, |
|
|
|
pageNo: 1, |
|
|
|