Browse Source

发料任务添加来源库区和到库区筛选功能

lijuncheng0816
wangyufei 3 months ago
parent
commit
ab395f1498
  1. 32
      src/mycomponents/job/jobFilter.vue
  2. 66
      src/pages/issue/job/issueJob.vue

32
src/mycomponents/job/jobFilter.vue

@ -46,6 +46,22 @@
<u-input style="margin-left: 20rpx;" confirmType="search" v-model="fromLocationCode" :border="true" <u-input style="margin-left: 20rpx;" confirmType="search" v-model="fromLocationCode" :border="true"
placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" /> placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" />
</view> </view>
<view v-if="isShowFromAreaCode" class="uni-flex space-between u-col-center"
style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;">
来源库区
</view>
<u-input style="margin-left: 20rpx;" confirmType="search" v-model="fromAreaCode" :border="true"
placeholder="请输入来源库区" />
</view>
<view v-if="isShowToAreaCode" class="uni-flex space-between u-col-center"
style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;">
到库区
</view>
<u-input style="margin-left: 50rpx;" confirmType="search" v-model="toAreaCode" :border="true"
placeholder="请输入到库区" />
</view>
<!-- <view class=""> <!-- <view class="">
<view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn"> <view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn">
@ -125,6 +141,16 @@
isShowQurery: { isShowQurery: {
type: Boolean, type: Boolean,
default: false default: false
},
//
isShowFromAreaCode: {
type: Boolean,
default: false
},
//
isShowToAreaCode: {
type: Boolean,
default: false
} }
}, },
data() { data() {
@ -134,6 +160,8 @@
checkedWaitModel: false, checkedWaitModel: false,
productionLineCode: '', // 线 productionLineCode: '', // 线
fromLocationCode: '', // fromLocationCode: '', //
fromAreaCode: '', //
toAreaCode: '', //
itemCode: '', // itemCode: '', //
creationTime: '', creationTime: '',
status: '' status: ''
@ -161,6 +189,8 @@
let params = { let params = {
productionLineCode: this.productionLineCode, productionLineCode: this.productionLineCode,
fromLocationCode: this.fromLocationCode, fromLocationCode: this.fromLocationCode,
fromAreaCode: this.fromAreaCode, //
toAreaCode: this.toAreaCode, //
itemCode: this.itemCode, itemCode: this.itemCode,
creationTime: this.creationTime, creationTime: this.creationTime,
status: this.status status: this.status
@ -170,6 +200,8 @@
reset(){ reset(){
this.productionLineCode = '' this.productionLineCode = ''
this.fromLocationCode = '' this.fromLocationCode = ''
this.fromAreaCode = ''//
this.toAreaCode = ''//
this.itemCode = '' this.itemCode = ''
this.creationTime = '' this.creationTime = ''
this.status = '' this.status = ''

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

@ -1,7 +1,7 @@
<template> <template>
<view class=""> <view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionlineList" <job-filter :isShowFromLocationCode="true" :isShowFromAreaCode="false" :isShowToAreaCode="false" :isShowProductionLineCode="true" :productionline="productionlineList"
ref="filter" otherTitle="" ref="filter" otherTitle=""
:checkedToday="checkedToday" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask" :checkedWaitTask="checkedWaitTask"
@ -109,6 +109,8 @@
title: '', title: '',
productionLine: "", productionLine: "",
fromLocation: "", fromLocation: "",
fromAreaCode: '', //
toAreaCode: '', //
filterItemCode: "", filterItemCode: "",
businessTypeCode: "Issue", businessTypeCode: "Issue",
businessType: null, businessType: null,
@ -141,13 +143,13 @@
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return; return;
} }
this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
//退 //退
@ -171,11 +173,11 @@
methods: { methods: {
timerRefresh() { timerRefresh() {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
this.stopRefresh(); this.stopRefresh();
var that = this; var that = this;
this.timer = setInterval(function() { this.timer = setInterval(function() {
that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode) that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode,this.fromAreaCode,this.toAreaCode)
console.log('发料刷新'); console.log('发料刷新');
}, planRefreshTime) }, planRefreshTime)
}, },
@ -215,7 +217,7 @@
}) })
}, },
getList(type, fromLocation = '', productionLine = '',filterItemCode='') { getList(type, fromLocation = '', productionLine = '',filterItemCode='',fromAreaCode='',toAreaCode='') {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中­....", title: "加载中­....",
@ -251,6 +253,22 @@
value: fromLocation value: fromLocation
}) })
} }
if(fromAreaCode){
//
filters.push({
column: "from_area_code",
action: "==",
value: fromAreaCode
})
}
if(toAreaCode){
//
filters.push({
column: "to_area_code",
action: "==",
value: toAreaCode
})
}
if (productionLine) { if (productionLine) {
// 线 // 线
filters.push({ filters.push({
@ -358,13 +376,35 @@
}else{ }else{
this.filterItemCode = '' this.filterItemCode = ''
} }
if (params.fromAreaCode) {
//
this.fromAreaCode = params.fromAreaCode
filters.push({
column: "from_area_code",
action: "==",
value: params.fromAreaCode
})
}else{
this.fromAreaCode = ''
}
if (params.toAreaCode) {
//
this.toAreaCode = params.toAreaCode
filters.push({
column: "to_area_code",
action: "==",
value: params.toAreaCode
})
}else{
this.toAreaCode = ''
}
var params = { var params = {
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
} }
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
// getIssueJobList(params).then(res => { // getIssueJobList(params).then(res => {
// uni.hideLoading(); // uni.hideLoading();
// if (res.data.total == 0) { // if (res.data.total == 0) {
@ -383,12 +423,12 @@
fromLocationCode(fromLocation) { fromLocationCode(fromLocation) {
this.fromLocation = fromLocation; this.fromLocation = fromLocation;
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
productionLineCode(productionLineCode) { productionLineCode(productionLineCode) {
this.productionLine = productionLineCode this.productionLine = productionLineCode
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
getByAsnNumber(code) { getByAsnNumber(code) {
let that = this; let that = this;
@ -461,7 +501,7 @@
cancleJob(id) { cancleJob(id) {
cancleTakeIssueJob(id).then(res => { cancleTakeIssueJob(id).then(res => {
if (res.data) { if (res.data) {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
uni.showToast({ uni.showToast({
title: "放弃任务成功" title: "放弃任务成功"
@ -498,14 +538,14 @@
switchChangeToday(state, creationTime) { switchChangeToday(state, creationTime) {
this.checkedToday = state; this.checkedToday = state;
this.todayTime = creationTime; this.todayTime = creationTime;
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
switchChangeWait(state, jobStatus) { switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state; this.checkedWaitTask = state;
this.status = jobStatus; this.status = jobStatus;
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
getJobInfoByNumber(number,scanMessage){ getJobInfoByNumber(number,scanMessage){
let that = this; let that = this;
@ -542,7 +582,7 @@
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus() this.$refs.scanPopup.getfocus()
} }
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
} }
}); });

Loading…
Cancel
Save