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