|
@ -1,18 +1,11 @@ |
|
|
<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" :isShowFromAreaCode="true" :isShowToAreaCode="true" :isShowProductionLineCode="true" :productionline="productionlineList" |
|
|
<job-filter :isShowFromLocationCode="true" :isShowFromAreaCode="true" :isShowToAreaCode="true" |
|
|
ref="filter" otherTitle="" |
|
|
:isShowProductionLineCode="true" |
|
|
:checkedToday="checkedToday" |
|
|
:productionline="productionlineList" |
|
|
:checkedWaitTask="checkedWaitTask" |
|
|
ref="filter" otherTitle="" :isShowItemCode="true" |
|
|
@switchChangeWait="switchChangeWait" |
|
|
@onQuery="getListByFilter" :isShowQurery='true'> |
|
|
@switchChangeToday="switchChangeToday" |
|
|
|
|
|
:isShowItemCode="true" @onQuery="getListByFilter" :isShowQurery='true'> |
|
|
|
|
|
<!-- <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"> --> |
|
|
|
|
|
</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"> |
|
@ -58,7 +51,8 @@ |
|
|
} from '@/common/record.js'; |
|
|
} from '@/common/record.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
planRefreshTime |
|
|
planRefreshTime, |
|
|
|
|
|
issueJobFilter |
|
|
} from '@/common/config.js'; |
|
|
} from '@/common/config.js'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -114,7 +108,8 @@ |
|
|
filterItemCode: "", |
|
|
filterItemCode: "", |
|
|
businessTypeCode: "Issue", |
|
|
businessTypeCode: "Issue", |
|
|
businessType: null, |
|
|
businessType: null, |
|
|
timer:null |
|
|
timer: null, |
|
|
|
|
|
productionLineCode:"" |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
@ -122,15 +117,15 @@ |
|
|
this.getIssueJobByProductionline() |
|
|
this.getIssueJobByProductionline() |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
this.timerRefresh(); |
|
|
this.getList('refresh') |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onHide() { |
|
|
onHide() { |
|
|
this.stopRefresh(); |
|
|
// this.stopRefresh(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onUnload(){ |
|
|
onUnload() { |
|
|
this.stopRefresh(); |
|
|
// this.stopRefresh(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onReady() { |
|
|
onReady() { |
|
@ -143,13 +138,15 @@ |
|
|
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.fromAreaCode,this.toAreaCode) |
|
|
|
|
|
|
|
|
this.getList('more') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
|
|
|
|
|
|
this.getList('refresh') |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//后退按钮 |
|
|
//后退按钮 |
|
@ -167,17 +164,17 @@ |
|
|
if (e.index === 0) { |
|
|
if (e.index === 0) { |
|
|
goHome(); |
|
|
goHome(); |
|
|
} else if (e.index == 1) { |
|
|
} else if (e.index == 1) { |
|
|
this.$refs.filter.openFilter(); |
|
|
this.$refs.filter.openFilterParams(uni.getStorageSync(issueJobFilter)); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
timerRefresh() { |
|
|
timerRefresh() { |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
this.getList('refresh') |
|
|
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,this.fromAreaCode,this.toAreaCode) |
|
|
that.getList('refresh') |
|
|
console.log('发料刷新'); |
|
|
console.log('发料刷新'); |
|
|
}, planRefreshTime) |
|
|
}, planRefreshTime) |
|
|
}, |
|
|
}, |
|
@ -218,7 +215,7 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getList(type, fromLocation = '', productionLine = '',filterItemCode='',fromAreaCode='',toAreaCode='') { |
|
|
getList(type) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中....", |
|
|
title: "加载中....", |
|
@ -230,72 +227,19 @@ |
|
|
this.pageNo = 1; |
|
|
this.pageNo = 1; |
|
|
this.jobList = []; |
|
|
this.jobList = []; |
|
|
} |
|
|
} |
|
|
var filters = [] |
|
|
var queryFiltersParams =this.setQueryParam() |
|
|
if (this.checkedToday) { |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "create_time", |
|
|
|
|
|
action: "betweeen", |
|
|
|
|
|
value: this.todayTime |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "status", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: this.status |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (fromLocation) { |
|
|
|
|
|
// 来源库位 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "fromLocationCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: fromLocation |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if(fromAreaCode){ |
|
|
|
|
|
//来源库区 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "fromAreaCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: fromAreaCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if(toAreaCode){ |
|
|
|
|
|
//到库区 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "toAreaCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: toAreaCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if (productionLine) { |
|
|
|
|
|
// 生产线 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "productionLineCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: productionLine |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if(filterItemCode){ |
|
|
|
|
|
// 物料代码 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "itemCode", |
|
|
|
|
|
action: "like", |
|
|
|
|
|
value: filterItemCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
var params = { |
|
|
var params = { |
|
|
filters: filters, |
|
|
filters: queryFiltersParams, |
|
|
pageNo: this.pageNo, |
|
|
pageNo: this.pageNo, |
|
|
pageSize: 100, |
|
|
pageSize: this.pageSize, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log("查询条件",JSON.stringify(params)) |
|
|
getIssueJobList(params).then(res => { |
|
|
getIssueJobList(params).then(res => { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
if (type === "refresh") { |
|
|
if (type === "refresh") { |
|
|
uni.stopPullDownRefresh(); |
|
|
uni.stopPullDownRefresh(); |
|
|
this.openScanPopup() |
|
|
|
|
|
} |
|
|
} |
|
|
var list = res.data.list; |
|
|
var list = res.data.list; |
|
|
|
|
|
|
|
@ -311,6 +255,9 @@ |
|
|
if (type === "refresh") { |
|
|
if (type === "refresh") { |
|
|
uni.stopPullDownRefresh(); |
|
|
uni.stopPullDownRefresh(); |
|
|
} |
|
|
} |
|
|
|
|
|
if(this.jobList.length>0){ |
|
|
|
|
|
this.openScanPopup() |
|
|
|
|
|
} |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
if (type === "refresh") { |
|
|
if (type === "refresh") { |
|
|
uni.stopPullDownRefresh(); |
|
|
uni.stopPullDownRefresh(); |
|
@ -322,153 +269,93 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getListByFilter(params) { |
|
|
setQueryParam() { |
|
|
console.log('getListByFilter',params) |
|
|
var filterParams = [] |
|
|
let that = this; |
|
|
var queryParams=uni.getStorageSync(issueJobFilter) |
|
|
uni.showLoading({ |
|
|
// if(!queryParams){ |
|
|
title: "加载中....", |
|
|
// queryParams={ |
|
|
mask: true |
|
|
|
|
|
}); |
|
|
|
|
|
// var filters = [] |
|
|
|
|
|
// if (this.checkedToday) { |
|
|
|
|
|
// filters.push({ |
|
|
|
|
|
// column: "create_time", |
|
|
|
|
|
// action: "betweeen", |
|
|
|
|
|
// value: this.todayTime |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
// } |
|
|
|
|
|
// queryParams.status="1,2" |
|
|
// filters.push({ |
|
|
|
|
|
// column: "status", |
|
|
|
|
|
// action: "in", |
|
|
|
|
|
// value: this.status |
|
|
|
|
|
// }) |
|
|
|
|
|
if (params.status) { |
|
|
|
|
|
this.status = params.status |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
this.status = "1,2" |
|
|
|
|
|
} |
|
|
|
|
|
if(params.creationTime==""){ |
|
|
|
|
|
this.checkedToday = false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (params.fromLocationCode) { |
|
|
|
|
|
// 来源库位 |
|
|
|
|
|
this.fromLocation = params.fromLocationCode |
|
|
|
|
|
// filters.push({ |
|
|
|
|
|
// column: "fromLocationCode", |
|
|
|
|
|
// action: "==", |
|
|
|
|
|
// value: params.fromLocationCode |
|
|
|
|
|
// }) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.fromLocation = '' |
|
|
|
|
|
} |
|
|
|
|
|
if (params.productionLineCode) { |
|
|
|
|
|
// 生产线 |
|
|
|
|
|
this.productionLine = params.productionLineCode |
|
|
|
|
|
// filters.push({ |
|
|
|
|
|
// column: "productionLineCode", |
|
|
|
|
|
// action: "==", |
|
|
|
|
|
// value: params.productionLineCode |
|
|
|
|
|
// }) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.productionLine = '' |
|
|
|
|
|
} |
|
|
|
|
|
if (params.itemCode) { |
|
|
|
|
|
// 物料代码 |
|
|
|
|
|
this.filterItemCode = params.itemCode |
|
|
|
|
|
// filters.push({ |
|
|
|
|
|
// column: "itemCode", |
|
|
|
|
|
// action: "like", |
|
|
|
|
|
// value: params.itemCode |
|
|
|
|
|
// }) |
|
|
|
|
|
}else{ |
|
|
|
|
|
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 = { |
|
|
|
|
|
// filters: filters, |
|
|
|
|
|
// pageNo: 1, |
|
|
|
|
|
// pageSize: 100, |
|
|
|
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
//只看当天 |
|
|
// getIssueJobList(params).then(res => { |
|
|
if (queryParams.creationTime ) { |
|
|
// uni.hideLoading(); |
|
|
filterParams.push({ |
|
|
// if (res.data.total == 0) { |
|
|
column: "create_time", |
|
|
// that.showMessage('未查找到发料任务'); |
|
|
action: "betweeen", |
|
|
// } else if (res.data.total == 1) { |
|
|
value: queryParams.creationTime |
|
|
// that.openJobDetail(res.data.list[0]); |
|
|
}) |
|
|
// } else { |
|
|
} |
|
|
// that.showItemList(res.data.list); |
|
|
//只看待处理 |
|
|
// } |
|
|
if (queryParams.status) { |
|
|
// }).catch(error => { |
|
|
filterParams.push({ |
|
|
|
|
|
column: "status", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: queryParams.status |
|
|
|
|
|
}) |
|
|
|
|
|
}else { |
|
|
|
|
|
filterParams.push({ |
|
|
|
|
|
column: "status", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: "1,2" |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// that.showMessage(error) |
|
|
//生产线 |
|
|
// }) |
|
|
if (queryParams.productionLineCode) { |
|
|
}, |
|
|
filterParams.push({ |
|
|
|
|
|
column: "productionLineCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: queryParams.productionLineCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
//物料代码 |
|
|
|
|
|
if (queryParams.itemCode) { |
|
|
|
|
|
filterParams.push({ |
|
|
|
|
|
column: "itemCode", |
|
|
|
|
|
action: "like", |
|
|
|
|
|
value: queryParams.itemCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//来源库位 |
|
|
|
|
|
if (queryParams.fromLocationCode) { |
|
|
|
|
|
filterParams.push({ |
|
|
|
|
|
column: "fromLocationCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: queryParams.fromLocationCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
fromLocationCode(fromLocation) { |
|
|
//来源库区 |
|
|
this.fromLocation = fromLocation; |
|
|
if (queryParams.fromAreaCode) { |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
filterParams.push({ |
|
|
|
|
|
column: "fromAreaCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: queryParams.fromAreaCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
//到库区 |
|
|
|
|
|
if (queryParams.toAreaCode) { |
|
|
|
|
|
filterParams.push({ |
|
|
|
|
|
column: "toAreaCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: queryParams.toAreaCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
return filterParams; |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
productionLineCode(productionLineCode) { |
|
|
|
|
|
this.productionLine = productionLineCode |
|
|
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) |
|
|
|
|
|
}, |
|
|
|
|
|
getByAsnNumber(code) { |
|
|
|
|
|
let that = this; |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中....", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
getPurchasereceiptByAsnNumber(code).then(res => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
if (res.data.total == 0) { |
|
|
|
|
|
that.showMessage('未查找到' + '【' + code + '】的收货任务'); |
|
|
|
|
|
} else if (res.data.total == 1) { |
|
|
|
|
|
this.$refs.scanAsnNumber.closeScanPopup(); |
|
|
|
|
|
that.openJobDetail(res.data.list[0]); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$refs.scanAsnNumber.closeScanPopup(); |
|
|
|
|
|
that.showItemList(res.data.list); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
getListByFilter(params) { |
|
|
uni.hideLoading(); |
|
|
this.productionLineCode =params.productionLineCode |
|
|
that.showErrorMessage(error); |
|
|
uni.setStorageSync(issueJobFilter,params) |
|
|
}) |
|
|
this.getList('refresh') |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
openJobDetail(item, scanMessage = '') { |
|
|
openJobDetail(item, scanMessage = '') { |
|
|
this.getJobInfoByNumber(item.number,scanMessage) |
|
|
this.getJobInfoByNumber(item.number, scanMessage) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -512,7 +399,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.fromAreaCode,this.toAreaCode) |
|
|
this.getList('refresh') |
|
|
|
|
|
|
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: "放弃任务成功" |
|
|
title: "放弃任务成功" |
|
@ -533,7 +420,7 @@ |
|
|
closeTakeIssueJob(id).then(res => { |
|
|
closeTakeIssueJob(id).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
this.getList("refresh") |
|
|
this.getList('refresh') |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: "关闭任务成功" |
|
|
title: "关闭任务成功" |
|
|
}) |
|
|
}) |
|
@ -546,19 +433,7 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
switchChangeToday(state, creationTime) { |
|
|
getJobInfoByNumber(number, scanMessage) { |
|
|
this.checkedToday = state; |
|
|
|
|
|
this.todayTime = creationTime; |
|
|
|
|
|
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.fromAreaCode,this.toAreaCode) |
|
|
|
|
|
}, |
|
|
|
|
|
getJobInfoByNumber(number,scanMessage){ |
|
|
|
|
|
let that = this; |
|
|
let that = this; |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中....", |
|
|
title: "加载中....", |
|
@ -579,31 +454,33 @@ |
|
|
var params = { |
|
|
var params = { |
|
|
filters: filters, |
|
|
filters: filters, |
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
|
pageSize: 100, |
|
|
pageSize: this.pageSize, |
|
|
} |
|
|
} |
|
|
getIssueJobList(params).then(res => { |
|
|
getIssueJobList(params).then(res => { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
if (res.data.list.length == 0) { |
|
|
if (res.data.list.length == 0) { |
|
|
that.showMessage('未查找到' + '【' + number + '】的发料任务'); |
|
|
that.showMessage('未查找到' + '【' + number + '】的发料任务'); |
|
|
} else { |
|
|
} else { |
|
|
var result =res.data.list[0]; |
|
|
var result = res.data.list[0]; |
|
|
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){ |
|
|
if (result.acceptUserId && result.acceptUserId != this.$store.state.user.id) { |
|
|
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => { |
|
|
this.$refs.comMessage.showErrorMessage("任务号[" + result.number + "]已经被[" + result |
|
|
|
|
|
.acceptUserName + "]承接,无法执行", res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
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.fromAreaCode,this.toAreaCode) |
|
|
this.getList('refresh') |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: './issueDetail?id=' + result.masterId + '&status=' + result.status + '&scanMessage=' + |
|
|
url: './issueDetail?id=' + result.masterId + '&status=' + result.status + |
|
|
|
|
|
'&scanMessage=' + |
|
|
scanMessage + '&title=' + this.title |
|
|
scanMessage + '&title=' + this.title |
|
|
}); |
|
|
}); |
|
|
this.scanMessage="" |
|
|
this.scanMessage = "" |
|
|
} |
|
|
} |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
@ -611,44 +488,6 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getScanNumber(code) { |
|
|
|
|
|
this.getDataListByType(code) |
|
|
|
|
|
}, |
|
|
|
|
|
getDataListByType(code) { |
|
|
|
|
|
let that = this; |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中....", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}); |
|
|
|
|
|
var filters = [] |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "status", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: '1,2' |
|
|
|
|
|
}) |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "number", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: code |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
var params = { |
|
|
|
|
|
filters: filters, |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
pageSize: 100, |
|
|
|
|
|
} |
|
|
|
|
|
getIssueJobList(params).then(res => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
if (res.data.list.length == 0) { |
|
|
|
|
|
that.showMessage('未查找到' + '【' + code + '】的发料任务'); |
|
|
|
|
|
} else if (res.data.list.length == 1) { |
|
|
|
|
|
that.openJobDetail(res.data.list[0]); |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
that.showMessage(error); |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showMessage(message) { |
|
|
showMessage(message) { |
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
@ -700,6 +539,14 @@ |
|
|
value: balance.locationCode |
|
|
value: balance.locationCode |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
|
|
|
if(productionLineCode){ |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "productionLineCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: productionLineCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
getIssueJobList({ |
|
|
getIssueJobList({ |
|
|
filters: filters, |
|
|
filters: filters, |
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
|