Browse Source

发料任务筛选中增加:生产线、来源库位

hella_online_20240829
yufei0306 4 months ago
parent
commit
abe0e8da16
  1. 36
      src/mycomponents/job/jobFilter.vue
  2. 41
      src/pages/issue/job/issueJob.vue

36
src/mycomponents/job/jobFilter.vue

@ -17,6 +17,21 @@
</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" @change="switchChangeWait"></u-switch>
</view> </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>
<u-input style="margin-left: 20rpx;" v-model="productionLineCode" :border="true"
placeholder="请输入生产线" @confirm="productionLineCodeConfirm" />
</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>
<u-input style="margin-left: 20rpx;" v-model="fromLocationCode" :border="true"
placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" />
</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"
@ -64,13 +79,23 @@
isShowAsn:{ isShowAsn:{
type: Boolean, type: Boolean,
default: false default: false
} },
isShowFromLocationCode:{
type: Boolean,
default: false
},
isShowProductionLineCode:{
type: Boolean,
default: false
},
}, },
data() { data() {
return { return {
dataContent: {}, dataContent: {},
checkedTodayModel:false, checkedTodayModel:false,
checkedWaitModel:false, checkedWaitModel:false,
productionLineCode:'',// 线
fromLocationCode:'',//
} }
}, },
watch: { watch: {
@ -92,6 +117,15 @@
mounted() { mounted() {
}, },
methods: { methods: {
// 线
productionLineCodeConfirm(){
this.$emit("productionLineCode", this.productionLineCode)
},
//
fromLocationCodeConfirm(){
this.$emit("fromLocationCode", this.fromLocationCode)
},
// //
maskClick() { maskClick() {
// //

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

@ -1,9 +1,10 @@
<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 ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" <job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" ref="filter" otherTitle=""
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber"
:checkedWaitTask="checkedWaitTask"> :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">
@ -110,7 +111,7 @@
}, },
methods: { methods: {
getList(type) { getList(type, fromLocationCode = '', productionLineCode = '') {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中­....", title: "加载中­....",
@ -137,6 +138,23 @@
value: this.status value: this.status
}) })
if (fromLocationCode != '') {
//
filters.push({
column: "fromLocationCode",
action: "==",
value: fromLocationCode
})
}
if (productionLineCode != '') {
// 线
filters.push({
column: "productionLineCode",
action: "==",
value: productionLineCode
})
}
var params = { var params = {
filters: filters, filters: filters,
pageNo: this.pageNo, pageNo: this.pageNo,
@ -169,7 +187,14 @@
that.showMessage(error) that.showMessage(error)
}) })
}, },
fromLocationCode(fromLocationCode) {
console.log('fromLocationCode', fromLocationCode)
this.getList('refresh', fromLocationCode, '')
},
productionLineCode(productionLineCode) {
console.log('productionLineCode', productionLineCode)
this.getList('refresh', '', productionLineCode)
},
getByAsnNumber(code) { getByAsnNumber(code) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
@ -229,12 +254,12 @@
cancleJob(id) { cancleJob(id) {
cancleTakeIssueJob(id).then(res => { cancleTakeIssueJob(id).then(res => {
if(res.data){ if (res.data) {
this.getList("refresh") this.getList("refresh")
uni.showToast({ uni.showToast({
title:"放弃任务成功" title: "放弃任务成功"
}) })
}else { } else {
this.showMessage("放弃任务失败") this.showMessage("放弃任务失败")
} }
}).catch(error => { }).catch(error => {

Loading…
Cancel
Save