|
|
@ -100,6 +100,7 @@ |
|
|
|
title: '', |
|
|
|
productionLine: "", |
|
|
|
fromLocation: "", |
|
|
|
filterItemCode: "", |
|
|
|
businessTypeCode: "Issue", |
|
|
|
businessType: null, |
|
|
|
}; |
|
|
@ -109,7 +110,8 @@ |
|
|
|
this.getIssueJobByProductionline() |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine); |
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onReady() { |
|
|
@ -122,12 +124,13 @@ |
|
|
|
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|
|
|
return; |
|
|
|
} |
|
|
|
this.getList('more', this.fromLocation, this.productionLine) |
|
|
|
this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
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; |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中....", |
|
|
@ -229,7 +232,14 @@ |
|
|
|
value: productionLine |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
if(filterItemCode){ |
|
|
|
// 物料代码 |
|
|
|
filters.push({ |
|
|
|
column: "itemCode", |
|
|
|
action: "like", |
|
|
|
value: filterItemCode |
|
|
|
}) |
|
|
|
} |
|
|
|
var params = { |
|
|
|
filters: filters, |
|
|
|
pageNo: this.pageNo, |
|
|
@ -266,6 +276,7 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
getListByFilter(params) { |
|
|
|
console.log('getListByFilter',params) |
|
|
|
let that = this; |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中....", |
|
|
@ -294,56 +305,68 @@ |
|
|
|
|
|
|
|
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 = '' |
|
|
|
} |
|
|
|
var params = { |
|
|
|
filters: filters, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 100, |
|
|
|
} |
|
|
|
getIssueJobList(params).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.data.total == 0) { |
|
|
|
that.showMessage('未查找到发料任务'); |
|
|
|
} else if (res.data.total == 1) { |
|
|
|
that.openJobDetail(res.data.list[0]); |
|
|
|
} else { |
|
|
|
that.showItemList(res.data.list); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
|
|
|
|
that.showMessage(error) |
|
|
|
}) |
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
// getIssueJobList(params).then(res => { |
|
|
|
// uni.hideLoading(); |
|
|
|
// if (res.data.total == 0) { |
|
|
|
// that.showMessage('未查找到发料任务'); |
|
|
|
// } else if (res.data.total == 1) { |
|
|
|
// that.openJobDetail(res.data.list[0]); |
|
|
|
// } else { |
|
|
|
// that.showItemList(res.data.list); |
|
|
|
// } |
|
|
|
// }).catch(error => { |
|
|
|
|
|
|
|
// that.showMessage(error) |
|
|
|
// }) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
fromLocationCode(fromLocation) { |
|
|
|
this.fromLocation = fromLocation; |
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine) |
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
|
|
|
|
}, |
|
|
|
productionLineCode(productionLineCode) { |
|
|
|
this.productionLine = productionLineCode |
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine) |
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
}, |
|
|
|
getByAsnNumber(code) { |
|
|
|
let that = this; |
|
|
@ -418,7 +441,8 @@ |
|
|
|
cancleJob(id) { |
|
|
|
cancleTakeIssueJob(id).then(res => { |
|
|
|
if (res.data) { |
|
|
|
this.getList("refresh", this.fromLocation, this.productionLine) |
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
title: "放弃任务成功" |
|
|
|
}) |
|
|
@ -454,13 +478,14 @@ |
|
|
|
switchChangeToday(state, creationTime) { |
|
|
|
this.checkedToday = state; |
|
|
|
this.todayTime = creationTime; |
|
|
|
this.getList("refresh", this.fromLocation, this.productionLine); |
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
switchChangeWait(state, jobStatus) { |
|
|
|
this.checkedWaitTask = state; |
|
|
|
this.status = jobStatus; |
|
|
|
this.getList("refresh", this.fromLocation, this.productionLine); |
|
|
|
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) |
|
|
|
}, |
|
|
|
|
|
|
|
getScanNumber(code) { |
|
|
|