Browse Source

修改发料任务筛选

lijuncheng0816
niexiting 4 months ago
parent
commit
6e9e4c67c1
  1. 4
      src/mycomponents/balance/level.vue
  2. 122
      src/mycomponents/job/jobFilter.vue
  3. 90
      src/pages/issue/job/issueJob.vue
  4. 2
      src/pages/repleinsh/job/repleinshJob.vue

4
src/mycomponents/balance/level.vue

@ -15,8 +15,8 @@
}, },
props: { props: {
priority: { priority: {
type: String, type: Number,
default:'2' default:2
}, },
title: { title: {
type: String, type: String,

122
src/mycomponents/job/jobFilter.vue

@ -1,40 +1,55 @@
<template> <template>
<uni-popup ref="popup" > <uni-popup ref="popup">
<view class="maskbox" @tap="maskClick"></view> <view class="maskbox" @tap="maskClick"></view>
<view class="uni-flex uni-column center" <view class="uni-flex uni-column center"
style="background-color: white;width: 100%; height:auto;padding: 20rpx;z-index: 99;position: relative; border-radius: 10rpx;"> style="background-color: white;width: 100%; height:auto;padding: 20rpx;z-index: 99;position: relative; border-radius: 10rpx;">
<view class="uni-flex space-between u-col-center" style="width: 100%;">
<view class="" style="font-size: 32rpx;"> <!-- 现场并不需要这两个筛选条件暂时拿掉 -->
只看当天 <!-- <view class="uni-flex space-between u-col-center" style="width: 100%;">
</view> <view class="" style="font-size: 32rpx;">
只看当天
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch> </view>
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35"
@change="switchChangeToday"></u-switch>
</view> </view>
<view class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;"> <view class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;"> <view class="" style="font-size: 32rpx;">
只看待处理 只看待处理
</view> </view>
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch> <u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35"
</view> @change="switchChangeWait"></u-switch>
<view v-if="isShowProductionLineCode" class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;"> </view> -->
<view v-if="isShowProductionLineCode" class="uni-flex space-between u-col-center"
style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;"> <view class="" style="font-size: 32rpx;">
生产线 生产线
</view> </view>
<!-- <u-input style="margin-left: 20rpx;" v-model="productionLineCode" :border="true" <!-- <u-input style="margin-left: 20rpx;" v-model="productionLineCode" :border="true"
placeholder="请输入生产线" @confirm="productionLineCodeConfirm" /> --> placeholder="请输入生产线" @confirm="productionLineCodeConfirm" /> -->
<uni-data-select class="uni-data-select" style="margin-left: 50rpx;" placeholder="请输入生产线" v-model="productionLineCode" :clear="false" :localdata="productionline" @change="productionLineCodeConfirm"></uni-data-select> <uni-data-select class="uni-data-select" style="margin-left: 50rpx;" placeholder="请输入生产线"
v-model="productionLineCode" :clear="false" :localdata="productionline"
@change="productionLineCodeConfirm"></uni-data-select>
</view> </view>
<view v-if="isShowFromLocationCode" class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;"> <view v-if="isShowItemCode" 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="itemCode" :border="true"
placeholder="请输入物料代码" @confirm="itemCodeConfirm" />
</view>
<view v-if="isShowFromLocationCode" class="uni-flex space-between u-col-center"
style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;"> <view class="" style="font-size: 32rpx;">
来源库位 来源库位
</view> </view>
<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 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">
<button class="filter_button" hover-class="filter_button_after" <button class="filter_button" hover-class="filter_button_after"
@click="scanOtherClick">扫描ASN单号</button> @click="scanOtherClick">扫描ASN单号</button>
@ -43,8 +58,12 @@
<button class="filter_button" hover-class="filter_button_after" <button class="filter_button" hover-class="filter_button_after"
@click="scanNumberClick">扫描任务编号</button> @click="scanNumberClick">扫描任务编号</button>
</view> </view>
</view> -->
<view class=" uni-flex uni-row" style="margin-top: 5px;">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="query()">查询</button>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode='getScanNumber'></win-scan-job-number> <win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode='getScanNumber'></win-scan-job-number>
<win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode='getScanAsNumber'></win-scan-asn-number> <win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode='getScanAsNumber'></win-scan-asn-number>
@ -59,12 +78,14 @@
import winScanAsnNumber from "@/mycomponents/scan/winScanAsnNumber.vue" import winScanAsnNumber from "@/mycomponents/scan/winScanAsnNumber.vue"
export default { export default {
emits: ["switchChangeToday", "switchChangeWait", "onScanNumber", "onScanAsnNumber","productionLineCode","fromLocationCode","fromLocationCodeConfirm"], emits: ["switchChangeToday", "switchChangeWait", "onScanNumber", "onScanAsnNumber", "productionLineCode",
"fromLocationCode", "fromLocationCodeConfirm", "itemCodeConfirm", "onQuery"
],
components: { components: {
winScanJobNumber, winScanJobNumber,
winScanAsnNumber winScanAsnNumber
}, },
props: { props: {
checkedToday: { checkedToday: {
type: Boolean, type: Boolean,
@ -78,34 +99,39 @@
type: String, type: String,
default: "" default: ""
}, },
isShowAsn:{ isShowAsn: {
type: Boolean, type: Boolean,
default: false default: false
}, },
isShowJob:{ isShowJob: {
type: Boolean, type: Boolean,
default: true default: true
}, },
isShowFromLocationCode:{ isShowFromLocationCode: {
type: Boolean, type: Boolean,
default: false default: false
}, },
isShowProductionLineCode:{ isShowProductionLineCode: {
type: Boolean, type: Boolean,
default: false default: false
}, },
productionline:{ productionline: {
type: Array, type: Array,
default: [] default: []
},
isShowItemCode: {
type: Boolean,
default: false
} }
}, },
data() { data() {
return { return {
dataContent: {}, dataContent: {},
checkedTodayModel:false, checkedTodayModel: false,
checkedWaitModel:false, checkedWaitModel: false,
productionLineCode:'',// 线 productionLineCode: '', // 线
fromLocationCode:'',// fromLocationCode: '', //
itemCode: '' //
} }
}, },
watch: { watch: {
@ -124,19 +150,36 @@
deep: true deep: true
} }
}, },
mounted() { mounted() {},
},
methods: { methods: {
getQueryCondition() {
let params = {
productionLineCode: this.productionLineCode,
fromLocationCode: this.fromLocationCode,
itemCode: this.itemCode
}
return params;
},
query() {
let params = this.getQueryCondition();
this.$emit("onQuery", params)
this.closeScanPopup();
},
// 线 // 线
productionLineCodeConfirm(e){ productionLineCodeConfirm(e) {
var lineCode=e var lineCode = e
this.$emit("productionLineCode", lineCode) this.productionLineCode = e;
// this.$emit("productionLineCode", lineCode)
}, },
// //
fromLocationCodeConfirm(){ fromLocationCodeConfirm() {
this.$emit("fromLocationCode", this.fromLocationCode) // this.$emit("fromLocationCode", this.fromLocationCode)
}, },
itemCodeConfirm() {},
// //
maskClick() { maskClick() {
// //
@ -149,19 +192,18 @@
this.$refs.popup.close() this.$refs.popup.close()
}, },
switchChangeToday(isOn) { switchChangeToday(isOn) {
let creationTime = ''; let creationTime = '';
if (isOn) { if (isOn) {
creationTime = getTodayDate(); creationTime = getTodayDate();
} }
this.$emit("switchChangeToday", isOn, creationTime) this.$emit("switchChangeToday", isOn, creationTime)
this.closeScanPopup() this.closeScanPopup()
}, },
switchChangeWait(isOn) { switchChangeWait(isOn) {
let status = "1,2"; let status = "1,2";
if(isOn){ if (isOn) {
status="1" status = "1"
} }
this.$emit("switchChangeWait", isOn, status) this.$emit("switchChangeWait", isOn, status)
this.closeScanPopup() this.closeScanPopup()
@ -199,4 +241,4 @@
height: 100vh; height: 100vh;
z-index: 0; z-index: 0;
} }
</style> </style>

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

@ -4,7 +4,13 @@
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionlineList" <job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionlineList"
ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait"
@onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask"
@productionLineCode="productionLineCode" @fromLocationCode="fromLocationCode"> :isShowItemCode="true" @productionLineCode="productionLineCode" @fromLocationCode="fromLocationCode"
@onQuery="getListByFilter">
<!-- <job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true"
:productionline="productionlineList" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask" @productionLineCode="productionLineCode"
@fromLocationCode="fromLocationCode"> -->
</job-filter> </job-filter>
<view v-if="jobList.length>0"> <view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
@ -228,9 +234,7 @@
var params = { var params = {
filters: filters, filters: filters,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: 100,
sort: 'fromLocationCode',
by: 'asc'
} }
getIssueJobList(params).then(res => { getIssueJobList(params).then(res => {
uni.hideLoading(); uni.hideLoading();
@ -261,6 +265,79 @@
that.showMessage(error) that.showMessage(error)
}) })
}, },
getListByFilter(params) {
let that = this;
uni.showLoading({
title: "加载中­....",
mask: true
});
var filters = []
if (this.checkedToday) {
filters.push({
column: "create_time",
action: "betweeen",
value: this.todayTime
})
}
filters.push({
column: "status",
action: "in",
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
if (params.fromLocationCode) {
//
filters.push({
column: "fromLocationCode",
action: "==",
value: params.fromLocationCode
})
}
if (params.productionLine) {
// 线
filters.push({
column: "productionLineCode",
action: "==",
value: params.productionLine
})
}
if (params.itemCode) {
// 线
filters.push({
column: "itemCode",
action: "like",
value: params.itemCode
})
}
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getIssueJobList(params).then(res => {
uni.hideLoading();
if (res.data.total == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务');
} else if (res.data.total == 1) {
that.openJobDetail(res.data.list[0]);
} else {
that.showItemList(res.data.list);
}
}).catch(error => {
that.showMessage(error)
})
},
fromLocationCode(fromLocation) { fromLocationCode(fromLocation) {
this.fromLocation = fromLocation; this.fromLocation = fromLocation;
this.getList('refresh', this.fromLocation, this.productionLine) this.getList('refresh', this.fromLocation, this.productionLine)
@ -303,7 +380,7 @@
}, },
showItemList(itemList) { showItemList(itemList) {
this.$refs.scanList.openPopup(itemList); this.$refs.jobListPopup.openPopup(itemList);
}, },
selectedItem(item) { selectedItem(item) {
@ -510,7 +587,8 @@
} }
} else { } else {
this.showMessage("按来源库位[" + balance.locationCode + "]批次[" + result.label.batch + this.showMessage("按来源库位[" + balance.locationCode + "]批次[" + result.label.batch +
"]物料号[" + result.label.itemCode + "]未查找到任务<br>" + "扫描[" + result.scanMessage + "]") "]物料号[" + result.label.itemCode + "]未查找到任务<br>" + "扫描[" + result
.scanMessage + "]")
} }
}).catch(error => { }).catch(error => {
this.showMessage(error + "<br>扫描[" + result.scanMessage + "]") this.showMessage(error + "<br>扫描[" + result.scanMessage + "]")

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

@ -2,7 +2,7 @@
<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" ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" <job-filter :isShowFromLocationCode="true" ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :isShowItemCode="true"
:checkedWaitTask="checkedWaitTask" @fromLocationCode="fromLocationCode"> :checkedWaitTask="checkedWaitTask" @fromLocationCode="fromLocationCode">
</job-filter> </job-filter>
<view v-if="jobList.length>0"> <view v-if="jobList.length>0">

Loading…
Cancel
Save