|
@ -1,7 +1,7 @@ |
|
|
<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="productionlineList" |
|
|
<job-filter :isShowFromLocationCode="true" :isShowFromAreaCode="true" :isShowToAreaCode="true" :isShowProductionLineCode="true" :productionline="productionlineList" |
|
|
ref="filter" otherTitle="" |
|
|
ref="filter" otherTitle="" |
|
|
:checkedToday="checkedToday" |
|
|
:checkedToday="checkedToday" |
|
|
:checkedWaitTask="checkedWaitTask" |
|
|
:checkedWaitTask="checkedWaitTask" |
|
@ -109,6 +109,8 @@ |
|
|
title: '', |
|
|
title: '', |
|
|
productionLine: "", |
|
|
productionLine: "", |
|
|
fromLocation: "", |
|
|
fromLocation: "", |
|
|
|
|
|
fromAreaCode: '', // 来源库区 |
|
|
|
|
|
toAreaCode: '', // 到库区 |
|
|
filterItemCode: "", |
|
|
filterItemCode: "", |
|
|
businessTypeCode: "Issue", |
|
|
businessTypeCode: "Issue", |
|
|
businessType: null, |
|
|
businessType: null, |
|
@ -141,13 +143,13 @@ |
|
|
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|
|
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//后退按钮 |
|
|
//后退按钮 |
|
@ -171,11 +173,11 @@ |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
timerRefresh() { |
|
|
timerRefresh() { |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
this.stopRefresh(); |
|
|
this.stopRefresh(); |
|
|
var that = this; |
|
|
var that = this; |
|
|
this.timer = setInterval(function() { |
|
|
this.timer = setInterval(function() { |
|
|
that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode) |
|
|
that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
console.log('发料刷新'); |
|
|
console.log('发料刷新'); |
|
|
}, planRefreshTime) |
|
|
}, planRefreshTime) |
|
|
}, |
|
|
}, |
|
@ -215,7 +217,7 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getList(type, fromLocation = '', productionLine = '',filterItemCode='') { |
|
|
getList(type, fromLocation = '', productionLine = '',filterItemCode='',fromAreaCode='',toAreaCode='') { |
|
|
let that = this; |
|
|
let that = this; |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中....", |
|
|
title: "加载中....", |
|
@ -251,6 +253,22 @@ |
|
|
value: fromLocation |
|
|
value: fromLocation |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
if(fromAreaCode){ |
|
|
|
|
|
//来源库区 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "fromAreaCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: fromAreaCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if(toAreaCode){ |
|
|
|
|
|
//到库区 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "toAreaCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: toAreaCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
if (productionLine) { |
|
|
if (productionLine) { |
|
|
// 生产线 |
|
|
// 生产线 |
|
|
filters.push({ |
|
|
filters.push({ |
|
@ -358,13 +376,35 @@ |
|
|
}else{ |
|
|
}else{ |
|
|
this.filterItemCode = '' |
|
|
this.filterItemCode = '' |
|
|
} |
|
|
} |
|
|
|
|
|
if (params.fromAreaCode) { |
|
|
|
|
|
// 来源库区 |
|
|
|
|
|
this.fromAreaCode = params.fromAreaCode |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "fromAreaCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: params.fromAreaCode |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.fromAreaCode = '' |
|
|
|
|
|
} |
|
|
|
|
|
if (params.toAreaCode) { |
|
|
|
|
|
// 到库区 |
|
|
|
|
|
this.toAreaCode = params.toAreaCode |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "toAreaCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: params.toAreaCode |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.toAreaCode = '' |
|
|
|
|
|
} |
|
|
var params = { |
|
|
var params = { |
|
|
filters: filters, |
|
|
filters: filters, |
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
|
pageSize: 100, |
|
|
pageSize: 100, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
// getIssueJobList(params).then(res => { |
|
|
// getIssueJobList(params).then(res => { |
|
|
// uni.hideLoading(); |
|
|
// uni.hideLoading(); |
|
|
// if (res.data.total == 0) { |
|
|
// if (res.data.total == 0) { |
|
@ -383,12 +423,12 @@ |
|
|
|
|
|
|
|
|
fromLocationCode(fromLocation) { |
|
|
fromLocationCode(fromLocation) { |
|
|
this.fromLocation = fromLocation; |
|
|
this.fromLocation = fromLocation; |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
productionLineCode(productionLineCode) { |
|
|
productionLineCode(productionLineCode) { |
|
|
this.productionLine = productionLineCode |
|
|
this.productionLine = productionLineCode |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
}, |
|
|
}, |
|
|
getByAsnNumber(code) { |
|
|
getByAsnNumber(code) { |
|
|
let that = this; |
|
|
let that = this; |
|
@ -417,7 +457,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
openJobDetail(item, scanMessage = '') { |
|
|
openJobDetail(item, scanMessage = '') { |
|
|
this.getJobInfoByNumber(item.number,scanMessage = '') |
|
|
this.getJobInfoByNumber(item.number,scanMessage) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -461,7 +501,7 @@ |
|
|
cancleJob(id) { |
|
|
cancleJob(id) { |
|
|
cancleTakeIssueJob(id).then(res => { |
|
|
cancleTakeIssueJob(id).then(res => { |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
|
|
|
|
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: "放弃任务成功" |
|
|
title: "放弃任务成功" |
|
@ -498,14 +538,14 @@ |
|
|
switchChangeToday(state, creationTime) { |
|
|
switchChangeToday(state, creationTime) { |
|
|
this.checkedToday = state; |
|
|
this.checkedToday = state; |
|
|
this.todayTime = creationTime; |
|
|
this.todayTime = creationTime; |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
switchChangeWait(state, jobStatus) { |
|
|
switchChangeWait(state, jobStatus) { |
|
|
this.checkedWaitTask = state; |
|
|
this.checkedWaitTask = state; |
|
|
this.status = jobStatus; |
|
|
this.status = jobStatus; |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
}, |
|
|
}, |
|
|
getJobInfoByNumber(number,scanMessage){ |
|
|
getJobInfoByNumber(number,scanMessage){ |
|
|
let that = this; |
|
|
let that = this; |
|
@ -542,7 +582,7 @@ |
|
|
if (this.$refs.scanPopup) { |
|
|
if (this.$refs.scanPopup) { |
|
|
this.$refs.scanPopup.getfocus() |
|
|
this.$refs.scanPopup.getfocus() |
|
|
} |
|
|
} |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|