Browse Source

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

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

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

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

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

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

Loading…
Cancel
Save