Browse Source

发料,补料任务,查询,重置功能 2024/8/7

hella_vue3
王志国 1 month ago
parent
commit
62f956ab1c
  1. 10
      src/mycomponents/job/jobFilter.vue
  2. 64
      src/pages/issue/job/issueJob.vue
  3. 52
      src/pages/repleinsh/job/repleinshJob.vue

10
src/mycomponents/job/jobFilter.vue

@ -60,7 +60,7 @@
</view>
</view> -->
<view class=" uni-flex uni-row" style="margin-top: 5px;" v-if="isShowQurery">
<button class="btn_single_clear" hover-class="btn_commit_after" @click="query()">重置</button>
<button class="btn_single_clear" hover-class="btn_commit_after" @click="reset()">重置</button>
<button class="btn_single_commit" hover-class="btn_commit_after" @click="query()">查询</button>
</view>
</view>
@ -161,6 +161,14 @@ const query = ()=> {
emit("onQuery", params)
closeScanPopup();
}
const reset = ()=>{
productionLineCode.value = ''
fromLocationCode.value = ''
itemCode.value = ''
creationTime.value = ''
status.value = ''
query()
},
// 线
const productionLineCodeConfirm = (e) => {
const lineCode = e

64
src/pages/issue/job/issueJob.vue

@ -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)

52
src/pages/repleinsh/job/repleinshJob.vue

@ -75,6 +75,8 @@ const inInventoryStatus = ref("")
const checkedWaitTask = ref(false)
const productionLineCode = ref('')
const productionlineList = ref([])
const fromLocationCode = ref('')
const filterItemCode = ref('')
onShow(() => {
nextTick(() => {
getList('refresh')
@ -94,10 +96,10 @@ onReachBottom(() => {
if (loadingType.value == 'loading' || loadingType.value == 'nomore') {
return
}
getList('more')
getList('more',fromLocationCode.value,filterItemCode.value)
})
onPullDownRefresh(() => {
getList('refresh')
getList('refresh',fromLocationCode.value,filterItemCode.value)
})
// 退
onBackPress((options) => {
@ -116,7 +118,7 @@ onNavigationBarButtonTap((e) => {
filter.value.openFilter()
}
})
const getList = (type, fromLocationCode = '') => {
const getList = (type, fromLocationCode = '', filterItemCode = '') => {
proxy.$modal.loading('加载中­....')
loadingType.value = 'loading'
if (type === 'refresh') {
@ -151,6 +153,14 @@ const getList = (type, fromLocationCode = '') => {
value: fromLocationCode
})
}
if (filterItemCode != '') {
//
filters.push({
column: "itemCode",
action: "like",
value: filterItemCode
})
}
const params = {
filters,
pageNo: pageNo.value,
@ -188,7 +198,8 @@ const getList = (type, fromLocationCode = '') => {
}
const fromLocationCode = (fromLocationCode) => {
console.log('fromLocationCode', fromLocationCode)
getList('refresh', fromLocationCode, '')
fromLocationCode.value = fromLocationCode
getList('refresh', fromLocationCode.value, filterItemCode.value)
}
const openJobDetail = (item, scanMessageParams = '') => {
proxy.$tab.navigateTo(`./repleinshDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage.value}&title=${title.value}`)
@ -361,11 +372,14 @@ const getListByFilter = ( param )=>{
if (param.fromLocationCode) {
//
fromLocationCode.value = param.fromLocationCode
filters.push({
column: "fromLocationCode",
action: "==",
value: param.fromLocationCode
})
}else{
fromLocationCode.value = ''
}
// if (param.productionLine) {
// // 线
@ -376,30 +390,34 @@ const getListByFilter = ( param )=>{
// })
// }
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('未查找到补料任务');
} else if (res.data.total == 1) {
openJobDetail(res.data.list[0]);
} else {
showItemList(res.data.list);
}
}).catch(error => {
showMessage(error)
})
getList('refresh', fromLocationCode.value, filterItemCode.value)
// getIssueJobList(params).then(res => {
// uni.hideLoading();
// if (res.data.total == 0) {
// showMessage('');
// } else if (res.data.total == 1) {
// openJobDetail(res.data.list[0]);
// } else {
// showItemList(res.data.list);
// }
// }).catch(error => {
// showMessage(error)
// })
}
const selectItem = (item) => {
scanPopup.value.closeScanPopup()

Loading…
Cancel
Save