|
@ -59,9 +59,12 @@ |
|
|
getDetailCloseOption |
|
|
getDetailCloseOption |
|
|
} from '@/common/array.js'; |
|
|
} from '@/common/array.js'; |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
planRefreshTime |
|
|
|
|
|
} from '@/common/config.js'; |
|
|
|
|
|
|
|
|
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' |
|
|
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' |
|
|
import jobFilter from '@/mycomponents/job/jobFilter.vue' |
|
|
import jobFilter from '@/mycomponents/job/jobFilter.vue' |
|
|
|
|
|
|
|
|
import comRepleinshJobCard from '@/pages/repleinsh/coms/comRepleinshJobCard.vue' |
|
|
import comRepleinshJobCard from '@/pages/repleinsh/coms/comRepleinshJobCard.vue' |
|
|
import repleinshJobListPopup from '@/pages/repleinsh/coms/repleinshJobListPopup.vue' |
|
|
import repleinshJobListPopup from '@/pages/repleinsh/coms/repleinshJobListPopup.vue' |
|
|
import repleinshInfoPopup from '@/pages/repleinsh/coms/repleinshInfoPopup.vue' |
|
|
import repleinshInfoPopup from '@/pages/repleinsh/coms/repleinshInfoPopup.vue' |
|
@ -105,7 +108,8 @@ |
|
|
productionLineCode: "", |
|
|
productionLineCode: "", |
|
|
productionlineList: [], |
|
|
productionlineList: [], |
|
|
fromLocationCode:'', |
|
|
fromLocationCode:'', |
|
|
filterItemCode:'' |
|
|
filterItemCode:'', |
|
|
|
|
|
timer:null |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
@ -113,8 +117,13 @@ |
|
|
this.getBusinessTypeFunc() |
|
|
this.getBusinessTypeFunc() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onShow() { |
|
|
onShow() { |
|
|
this.getList('refresh', this.fromLocationCode, this.filterItemCode) |
|
|
this.timerRefresh(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onHide() { |
|
|
|
|
|
this.stopRefresh(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onReady() { |
|
|
onReady() { |
|
@ -155,6 +164,21 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
timerRefresh() { |
|
|
|
|
|
this.getList('refresh', this.fromLocationCode, this.filterItemCode) |
|
|
|
|
|
this.stopRefresh(); |
|
|
|
|
|
var that = this; |
|
|
|
|
|
this.timer = setInterval(function() { |
|
|
|
|
|
that.getList('refresh', that.fromLocationCode, that.filterItemCode) |
|
|
|
|
|
console.log('补料刷新'); |
|
|
|
|
|
}, planRefreshTime) |
|
|
|
|
|
}, |
|
|
|
|
|
stopRefresh() { |
|
|
|
|
|
if (this.timer) { |
|
|
|
|
|
clearInterval(this.timer); |
|
|
|
|
|
this.timer = null; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
getBusinessTypeFunc() { |
|
|
getBusinessTypeFunc() { |
|
|
getBusinessType(this.businessTypeCode, res => { |
|
|
getBusinessType(this.businessTypeCode, res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
@ -197,11 +221,6 @@ |
|
|
value: this.status |
|
|
value: this.status |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "accept_user_id", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.$store.state.user.id |
|
|
|
|
|
}) |
|
|
|
|
|
if (fromLocationCode != '') { |
|
|
if (fromLocationCode != '') { |
|
|
// 来源库位 |
|
|
// 来源库位 |
|
|
filters.push({ |
|
|
filters.push({ |
|
@ -275,12 +294,6 @@ |
|
|
value: this.status |
|
|
value: this.status |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "accept_user_id", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.$store.state.user.id |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
if (params.fromLocationCode) { |
|
|
if (params.fromLocationCode) { |
|
|
// 来源库位 |
|
|
// 来源库位 |
|
|
this.fromLocationCode = params.fromLocationCode |
|
|
this.fromLocationCode = params.fromLocationCode |
|
@ -335,11 +348,62 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openJobDetail(item, scanMessage = '') { |
|
|
openJobDetail(item, scanMessage = '') { |
|
|
uni.navigateTo({ |
|
|
this.getJobInfoByNumber(item.number,scanMessage = '') |
|
|
url: './repleinshDetail?id=' + item.masterId + '&status=' + item.status + '&scanMessage=' + |
|
|
|
|
|
scanMessage + '&title=' + this.title |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getJobInfoByNumber(number,scanMessage){ |
|
|
|
|
|
let that = this; |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中....", |
|
|
|
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
this.scanMessage = "" |
|
|
var filters = [] |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "status", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: '1,2' |
|
|
|
|
|
}) |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "number", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: number |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
var params = { |
|
|
|
|
|
filters: filters, |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
pageSize: 100, |
|
|
|
|
|
} |
|
|
|
|
|
getRepleinshJobList(params).then(res => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
if (res.data.list.length == 0) { |
|
|
|
|
|
that.showMessage('未查找到' + '【' + number + '】的发料任务'); |
|
|
|
|
|
} else { |
|
|
|
|
|
var result =res.data.list[0]; |
|
|
|
|
|
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){ |
|
|
|
|
|
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
if (this.$refs.scanPopup) { |
|
|
|
|
|
this.$refs.scanPopup.getfocus() |
|
|
|
|
|
} |
|
|
|
|
|
this.getList('refresh', this.fromLocationCode, this.filterItemCode) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
url: './repleinshDetail?id=' + result.masterId + '&status=' + result.status + '&scanMessage=' + |
|
|
|
|
|
scanMessage + '&title=' + this.title |
|
|
|
|
|
}); |
|
|
|
|
|
this.scanMessage = "" |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
that.showMessage(error); |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showItemList(itemList) { |
|
|
showItemList(itemList) { |
|
@ -377,7 +441,7 @@ |
|
|
cancleJob(id) { |
|
|
cancleJob(id) { |
|
|
cancleTakeRepleinshJob(id).then(res => { |
|
|
cancleTakeRepleinshJob(id).then(res => { |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
this.getList("refresh") |
|
|
this.getList('refresh', this.fromLocationCode, this.filterItemCode) |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: "放弃任务成功" |
|
|
title: "放弃任务成功" |
|
|
}) |
|
|
}) |
|
@ -397,7 +461,7 @@ |
|
|
closeTakeRepleinshJob(id).then(res => { |
|
|
closeTakeRepleinshJob(id).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
this.getList("refresh") |
|
|
this.getList('refresh', this.fromLocationCode, this.filterItemCode) |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: "关闭任务成功" |
|
|
title: "关闭任务成功" |
|
|
}) |
|
|
}) |
|
@ -413,13 +477,13 @@ |
|
|
switchChangeToday(state, creationTime) { |
|
|
switchChangeToday(state, creationTime) { |
|
|
this.checkedToday = state; |
|
|
this.checkedToday = state; |
|
|
this.todayTime = creationTime; |
|
|
this.todayTime = creationTime; |
|
|
this.getList("refresh"); |
|
|
this.getList('refresh', this.fromLocationCode, this.filterItemCode) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
switchChangeWait(state, jobStatus) { |
|
|
switchChangeWait(state, jobStatus) { |
|
|
this.checkedWaitTask = state; |
|
|
this.checkedWaitTask = state; |
|
|
this.status = jobStatus; |
|
|
this.status = jobStatus; |
|
|
this.getList("refresh"); |
|
|
this.getList('refresh', this.fromLocationCode, this.filterItemCode) |
|
|
}, |
|
|
}, |
|
|
getScanNumber(code) { |
|
|
getScanNumber(code) { |
|
|
this.getDataListByType(code) |
|
|
this.getDataListByType(code) |
|
@ -441,11 +505,6 @@ |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: code |
|
|
value: code |
|
|
}) |
|
|
}) |
|
|
filters.push({ |
|
|
|
|
|
column: "accept_user_id", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.$store.state.user.id |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
var params = { |
|
|
var params = { |
|
|
filters: filters, |
|
|
filters: filters, |
|
@ -513,11 +572,6 @@ |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: result.label.itemCode |
|
|
value: result.label.itemCode |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
column: "accept_user_id", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.$store.state.user.id |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
{ |
|
|
column: "fromLocationCode", |
|
|
column: "fromLocationCode", |
|
|
action: "==", |
|
|
action: "==", |
|
|