|
@ -99,7 +99,8 @@ |
|
|
detailCloseOptions: [], |
|
|
detailCloseOptions: [], |
|
|
title: '', |
|
|
title: '', |
|
|
productionLine: "", |
|
|
productionLine: "", |
|
|
fromLocation: "", |
|
|
fromLocation: "", |
|
|
|
|
|
filterItemCode: "", |
|
|
businessTypeCode: "Issue", |
|
|
businessTypeCode: "Issue", |
|
|
businessType: null, |
|
|
businessType: null, |
|
|
}; |
|
|
}; |
|
@ -109,7 +110,8 @@ |
|
|
this.getIssueJobByProductionline() |
|
|
this.getIssueJobByProductionline() |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
this.getList('refresh', this.fromLocation, this.productionLine); |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onReady() { |
|
|
onReady() { |
|
@ -122,12 +124,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.getList('more', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
this.getList('refresh', this.fromLocation, this.productionLine) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//后退按钮 |
|
|
//后退按钮 |
|
@ -180,7 +183,7 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getList(type, fromLocation = '', productionLine = '') { |
|
|
getList(type, fromLocation = '', productionLine = '',filterItemCode='') { |
|
|
let that = this; |
|
|
let that = this; |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中....", |
|
|
title: "加载中....", |
|
@ -228,8 +231,15 @@ |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: productionLine |
|
|
value: productionLine |
|
|
}) |
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if(filterItemCode){ |
|
|
|
|
|
// 物料代码 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "itemCode", |
|
|
|
|
|
action: "like", |
|
|
|
|
|
value: filterItemCode |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var params = { |
|
|
var params = { |
|
|
filters: filters, |
|
|
filters: filters, |
|
|
pageNo: this.pageNo, |
|
|
pageNo: this.pageNo, |
|
@ -265,7 +275,8 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getListByFilter(params) { |
|
|
getListByFilter(params) { |
|
|
|
|
|
console.log('getListByFilter',params) |
|
|
let that = this; |
|
|
let that = this; |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中....", |
|
|
title: "加载中....", |
|
@ -293,57 +304,69 @@ |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
if (params.fromLocationCode) { |
|
|
if (params.fromLocationCode) { |
|
|
// 来源库位 |
|
|
// 来源库位 |
|
|
|
|
|
this.fromLocation = params.fromLocationCode |
|
|
filters.push({ |
|
|
filters.push({ |
|
|
column: "fromLocationCode", |
|
|
column: "fromLocationCode", |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: params.fromLocationCode |
|
|
value: params.fromLocationCode |
|
|
}) |
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.fromLocation = '' |
|
|
} |
|
|
} |
|
|
if (params.productionLineCode) { |
|
|
if (params.productionLineCode) { |
|
|
// 生产线 |
|
|
// 生产线 |
|
|
|
|
|
this.productionLine = params.productionLineCode |
|
|
filters.push({ |
|
|
filters.push({ |
|
|
column: "productionLineCode", |
|
|
column: "productionLineCode", |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: params.productionLineCode |
|
|
value: params.productionLineCode |
|
|
}) |
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.productionLine = '' |
|
|
} |
|
|
} |
|
|
if (params.itemCode) { |
|
|
if (params.itemCode) { |
|
|
// 生产线 |
|
|
// 物料代码 |
|
|
|
|
|
this.filterItemCode = params.itemCode |
|
|
filters.push({ |
|
|
filters.push({ |
|
|
column: "itemCode", |
|
|
column: "itemCode", |
|
|
action: "like", |
|
|
action: "like", |
|
|
value: params.itemCode |
|
|
value: params.itemCode |
|
|
}) |
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.filterItemCode = '' |
|
|
} |
|
|
} |
|
|
var params = { |
|
|
var params = { |
|
|
filters: filters, |
|
|
filters: filters, |
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
|
pageSize: 100, |
|
|
pageSize: 100, |
|
|
} |
|
|
} |
|
|
getIssueJobList(params).then(res => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
if (res.data.total == 0) { |
|
|
// getIssueJobList(params).then(res => { |
|
|
that.showMessage('未查找到发料任务'); |
|
|
// uni.hideLoading(); |
|
|
} else if (res.data.total == 1) { |
|
|
// if (res.data.total == 0) { |
|
|
that.openJobDetail(res.data.list[0]); |
|
|
// that.showMessage('未查找到发料任务'); |
|
|
} else { |
|
|
// } else if (res.data.total == 1) { |
|
|
that.showItemList(res.data.list); |
|
|
// that.openJobDetail(res.data.list[0]); |
|
|
} |
|
|
// } else { |
|
|
}).catch(error => { |
|
|
// that.showItemList(res.data.list); |
|
|
|
|
|
// } |
|
|
that.showMessage(error) |
|
|
// }).catch(error => { |
|
|
}) |
|
|
|
|
|
|
|
|
// that.showMessage(error) |
|
|
|
|
|
// }) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fromLocationCode(fromLocation) { |
|
|
fromLocationCode(fromLocation) { |
|
|
this.fromLocation = fromLocation; |
|
|
this.fromLocation = fromLocation; |
|
|
this.getList('refresh', this.fromLocation, this.productionLine) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
productionLineCode(productionLineCode) { |
|
|
productionLineCode(productionLineCode) { |
|
|
this.productionLine = productionLineCode |
|
|
this.productionLine = productionLineCode |
|
|
this.getList('refresh', this.fromLocation, this.productionLine) |
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
}, |
|
|
}, |
|
|
getByAsnNumber(code) { |
|
|
getByAsnNumber(code) { |
|
|
let that = this; |
|
|
let that = this; |
|
@ -418,7 +441,8 @@ |
|
|
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.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
|
|
|
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: "放弃任务成功" |
|
|
title: "放弃任务成功" |
|
|
}) |
|
|
}) |
|
@ -454,13 +478,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.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
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.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getScanNumber(code) { |
|
|
getScanNumber(code) { |
|
|