|
|
@ -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="productionlineList" |
|
|
|
<job-filter :isShowFromLocationCode="true" :isShowFromAreaCode="false" :isShowToAreaCode="false" :isShowProductionLineCode="true" :productionline="productionlineList" |
|
|
|
ref="filter" otherTitle="" |
|
|
|
:checkedToday="checkedToday" |
|
|
|
:checkedWaitTask="checkedWaitTask" |
|
|
@ -109,6 +109,8 @@ |
|
|
|
title: '', |
|
|
|
productionLine: "", |
|
|
|
fromLocation: "", |
|
|
|
fromAreaCode: '', // 来源库区 |
|
|
|
toAreaCode: '', // 到库区 |
|
|
|
filterItemCode: "", |
|
|
|
businessTypeCode: "Issue", |
|
|
|
businessType: null, |
|
|
@ -141,13 +143,13 @@ |
|
|
|
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|
|
|
return; |
|
|
|
} |
|
|
|
this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
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: { |
|
|
|
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(); |
|
|
|
var that = this; |
|
|
|
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('发料刷新'); |
|
|
|
}, planRefreshTime) |
|
|
|
}, |
|
|
@ -215,7 +217,7 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
getList(type, fromLocation = '', productionLine = '',filterItemCode='') { |
|
|
|
getList(type, fromLocation = '', productionLine = '',filterItemCode='',fromAreaCode='',toAreaCode='') { |
|
|
|
let that = this; |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中....", |
|
|
@ -251,6 +253,22 @@ |
|
|
|
value: fromLocation |
|
|
|
}) |
|
|
|
} |
|
|
|
if(fromAreaCode){ |
|
|
|
//来源库区 |
|
|
|
filters.push({ |
|
|
|
column: "from_area_code", |
|
|
|
action: "==", |
|
|
|
value: fromAreaCode |
|
|
|
}) |
|
|
|
} |
|
|
|
if(toAreaCode){ |
|
|
|
//到库区 |
|
|
|
filters.push({ |
|
|
|
column: "to_area_code", |
|
|
|
action: "==", |
|
|
|
value: toAreaCode |
|
|
|
}) |
|
|
|
} |
|
|
|
if (productionLine) { |
|
|
|
// 生产线 |
|
|
|
filters.push({ |
|
|
@ -358,13 +376,35 @@ |
|
|
|
}else{ |
|
|
|
this.filterItemCode = '' |
|
|
|
} |
|
|
|
if (params.fromAreaCode) { |
|
|
|
// 来源库区 |
|
|
|
this.fromAreaCode = params.fromAreaCode |
|
|
|
filters.push({ |
|
|
|
column: "from_area_code", |
|
|
|
action: "==", |
|
|
|
value: params.fromAreaCode |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
this.fromAreaCode = '' |
|
|
|
} |
|
|
|
if (params.toAreaCode) { |
|
|
|
// 到库区 |
|
|
|
this.toAreaCode = params.toAreaCode |
|
|
|
filters.push({ |
|
|
|
column: "to_area_code", |
|
|
|
action: "==", |
|
|
|
value: params.toAreaCode |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
this.toAreaCode = '' |
|
|
|
} |
|
|
|
var params = { |
|
|
|
filters: filters, |
|
|
|
pageNo: 1, |
|
|
|
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 => { |
|
|
|
// uni.hideLoading(); |
|
|
|
// if (res.data.total == 0) { |
|
|
@ -383,12 +423,12 @@ |
|
|
|
|
|
|
|
fromLocationCode(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) { |
|
|
|
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) { |
|
|
|
let that = this; |
|
|
@ -461,7 +501,7 @@ |
|
|
|
cancleJob(id) { |
|
|
|
cancleTakeIssueJob(id).then(res => { |
|
|
|
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({ |
|
|
|
title: "放弃任务成功" |
|
|
@ -498,14 +538,14 @@ |
|
|
|
switchChangeToday(state, creationTime) { |
|
|
|
this.checkedToday = state; |
|
|
|
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) { |
|
|
|
this.checkedWaitTask = state; |
|
|
|
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){ |
|
|
|
let that = this; |
|
|
@ -542,7 +582,7 @@ |
|
|
|
if (this.$refs.scanPopup) { |
|
|
|
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) |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|