|
|
@ -78,11 +78,12 @@ const scanPopup = ref() |
|
|
|
const jobListRef = ref() |
|
|
|
const businessTypeCode = ref('Issue') |
|
|
|
const businessType = ref(null) |
|
|
|
const filterItemCode = ref('') |
|
|
|
const fromInventoryStatuses = ref() |
|
|
|
const fromLocationAreaTypeList = ref([]) |
|
|
|
onShow(() => { |
|
|
|
nextTick(() => { |
|
|
|
getList('refresh', fromLocation.value, productionLine.value) |
|
|
|
getList('refresh', fromLocation.value, productionLine.value,filterItemCode.value) |
|
|
|
}) |
|
|
|
}) |
|
|
|
onLoad((option) => { |
|
|
@ -99,10 +100,10 @@ onReachBottom(() => { |
|
|
|
if (loadingType.value == 'loading' || loadingType.value == 'nomore') { |
|
|
|
return |
|
|
|
} |
|
|
|
getList('more', fromLocation.value, productionLine.value) |
|
|
|
getList('more', fromLocation.value, productionLine.value,filterItemCode.value) |
|
|
|
}) |
|
|
|
onPullDownRefresh(() => { |
|
|
|
getList('refresh', fromLocation.value, productionLine.value) |
|
|
|
getList('refresh', fromLocation.value, productionLine.value,filterItemCode.value) |
|
|
|
}) |
|
|
|
// 后退按钮 |
|
|
|
onBackPress((options) => { |
|
|
@ -150,7 +151,7 @@ const getIssueJobByProductionline1 = () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
const getList = (type, fromLocation = '', productionLine = '') => { |
|
|
|
const getList = (type, fromLocation = '', productionLine = '',filterItemCode = '') => { |
|
|
|
proxy.$modal.loading('加载中....') |
|
|
|
loadingType.value = 'loading' |
|
|
|
if (type === 'refresh') { |
|
|
@ -193,6 +194,14 @@ const getList = (type, fromLocation = '', productionLine = '') => { |
|
|
|
value: productionLine |
|
|
|
}) |
|
|
|
} |
|
|
|
if(filterItemCode){ |
|
|
|
// 物料代码 |
|
|
|
filters.push({ |
|
|
|
column: "itemCode", |
|
|
|
action: "like", |
|
|
|
value: filterItemCode |
|
|
|
}) |
|
|
|
} |
|
|
|
const params = { |
|
|
|
filters, |
|
|
|
pageNo: pageNo.value, |
|
|
@ -295,55 +304,66 @@ const getListByFilter = ( param )=>{ |
|
|
|
}) |
|
|
|
|
|
|
|
if (param.fromLocationCode) { |
|
|
|
fromLocation.value = param.fromLocationCode |
|
|
|
// 来源库位 |
|
|
|
filters.push({ |
|
|
|
column: "fromLocationCode", |
|
|
|
action: "==", |
|
|
|
value: param.fromLocationCode |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
fromLocation.value = '' |
|
|
|
} |
|
|
|
|
|
|
|
if (param.productionLineCode) { |
|
|
|
productionLine.value = param.productionLineCode |
|
|
|
// 生产线 |
|
|
|
filters.push({ |
|
|
|
column: "productionLineCode", |
|
|
|
action: "==", |
|
|
|
value: param.productionLineCode |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
productionLine.value = '' |
|
|
|
} |
|
|
|
if (param.itemCode) { |
|
|
|
// 生产线 |
|
|
|
filterItemCode.value = param.itemCode |
|
|
|
// 物料代码 |
|
|
|
filters.push({ |
|
|
|
column: "itemCode", |
|
|
|
action: "like", |
|
|
|
value: param.itemCode |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
filterItemCode.value = '' |
|
|
|
} |
|
|
|
let params = { |
|
|
|
filters: filters, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 100, |
|
|
|
} |
|
|
|
getIssueJobList(params).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.data.total == 0) { |
|
|
|
showMessage('未查找到' + '【' + code + '】的收货任务'); |
|
|
|
} else if (res.data.total == 1) { |
|
|
|
openJobDetail(res.data.list[0]); |
|
|
|
} else { |
|
|
|
showItemList(res.data.list); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
showMessage(error) |
|
|
|
}) |
|
|
|
getList('refresh', fromLocation.value, productionLine.value, filterItemCode.value) |
|
|
|
// getIssueJobList(params).then(res => { |
|
|
|
// uni.hideLoading(); |
|
|
|
// if (res.data.total == 0) { |
|
|
|
// showMessage('未查找到' + '【' + code + '】的收货任务'); |
|
|
|
// } else if (res.data.total == 1) { |
|
|
|
// openJobDetail(res.data.list[0]); |
|
|
|
// } else { |
|
|
|
// showItemList(res.data.list); |
|
|
|
// } |
|
|
|
// }).catch(error => { |
|
|
|
// showMessage(error) |
|
|
|
// }) |
|
|
|
} |
|
|
|
const fromLocationCode = (fromLocationParams) => { |
|
|
|
fromLocation.value = fromLocationParams |
|
|
|
getList('refresh', fromLocation.value, productionLine.value) |
|
|
|
getList('refresh', fromLocation.value, productionLine.value,filterItemCode.value) |
|
|
|
} |
|
|
|
|
|
|
|
const productionLineCode = (productionLineCode) => { |
|
|
|
productionLine.value = productionLineCode |
|
|
|
getList('refresh', fromLocation.value, productionLine.value) |
|
|
|
getList('refresh', fromLocation.value, productionLine.value,filterItemCode.value) |
|
|
|
} |
|
|
|
const getByAsnNumber = (code) => { |
|
|
|
proxy.$modal.loading('加载中....') |
|
|
@ -372,7 +392,7 @@ const cancleJob = (id) => { |
|
|
|
cancleTakeIssueJob(id) |
|
|
|
.then((res) => { |
|
|
|
if (res.data) { |
|
|
|
getList('refresh', fromLocation.value, productionLine.value) |
|
|
|
getList('refresh', fromLocation.value, productionLine.value,filterItemCode.value) |
|
|
|
uni.showToast({ |
|
|
|
title: '放弃任务成功' |
|
|
|
}) |
|
|
@ -410,12 +430,12 @@ const closeJob = (id) => { |
|
|
|
const switchChangeToday = (state, creationTime) => { |
|
|
|
checkedToday.value = state |
|
|
|
todayTime.value = creationTime |
|
|
|
getList('refresh', fromLocation.value, productionLine.value) |
|
|
|
getList('refresh', fromLocation.value, productionLine.value,filterItemCode.value) |
|
|
|
} |
|
|
|
const switchChangeWait = (state, jobStatus) => { |
|
|
|
checkedWaitTask.value = state |
|
|
|
status.value = jobStatus |
|
|
|
getList('refresh', fromLocation.value, productionLine.value) |
|
|
|
getList('refresh', fromLocation.value, productionLine.value,filterItemCode.value) |
|
|
|
} |
|
|
|
const getScanNumber = (code) => { |
|
|
|
getDataListByType(code) |
|
|
|