Browse Source

修改发料任务筛选

lijuncheng0816
niexiting 4 months ago
parent
commit
6e9e4c67c1
  1. 4
      src/mycomponents/balance/level.vue
  2. 74
      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: {
priority: {
type: String,
default:'2'
type: Number,
default:2
},
title: {
type: String,

74
src/mycomponents/job/jobFilter.vue

@ -3,30 +3,45 @@
<view class="maskbox" @tap="maskClick"></view>
<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;">
<view class="uni-flex space-between u-col-center" style="width: 100%;">
<!-- 现场并不需要这两个筛选条件暂时拿掉 -->
<!-- <view class="uni-flex space-between u-col-center" style="width: 100%;">
<view class="" style="font-size: 32rpx;">
只看当天
</view>
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch>
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35"
@change="switchChangeToday"></u-switch>
</view>
<view class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;">
只看待处理
</view>
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch>
</view>
<view v-if="isShowProductionLineCode" class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;">
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35"
@change="switchChangeWait"></u-switch>
</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" /> -->
<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 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 v-if="isShowFromLocationCode" class="uni-flex space-between u-col-center"
style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;">
来源库位
</view>
@ -34,7 +49,7 @@
placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" />
</view>
<view class="">
<!-- <view class="">
<view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn">
<button class="filter_button" hover-class="filter_button_after"
@click="scanOtherClick">扫描ASN单号</button>
@ -43,8 +58,12 @@
<button class="filter_button" hover-class="filter_button_after"
@click="scanNumberClick">扫描任务编号</button>
</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>
</uni-popup>
<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>
@ -59,7 +78,9 @@
import winScanAsnNumber from "@/mycomponents/scan/winScanAsnNumber.vue"
export default {
emits: ["switchChangeToday", "switchChangeWait", "onScanNumber", "onScanAsnNumber","productionLineCode","fromLocationCode","fromLocationCodeConfirm"],
emits: ["switchChangeToday", "switchChangeWait", "onScanNumber", "onScanAsnNumber", "productionLineCode",
"fromLocationCode", "fromLocationCodeConfirm", "itemCodeConfirm", "onQuery"
],
components: {
winScanJobNumber,
winScanAsnNumber
@ -97,6 +118,10 @@
productionline: {
type: Array,
default: []
},
isShowItemCode: {
type: Boolean,
default: false
}
},
data() {
@ -106,6 +131,7 @@
checkedWaitModel: false,
productionLineCode: '', // 线
fromLocationCode: '', //
itemCode: '' //
}
},
watch: {
@ -124,19 +150,36 @@
deep: true
}
},
mounted() {
},
mounted() {},
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) {
var lineCode = e
this.$emit("productionLineCode", lineCode)
this.productionLineCode = e;
// this.$emit("productionLineCode", lineCode)
},
//
fromLocationCodeConfirm() {
this.$emit("fromLocationCode", this.fromLocationCode)
// this.$emit("fromLocationCode", this.fromLocationCode)
},
itemCodeConfirm() {},
//
maskClick() {
//
@ -149,7 +192,6 @@
this.$refs.popup.close()
},
switchChangeToday(isOn) {
let creationTime = '';
if (isOn) {
creationTime = getTodayDate();

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

@ -4,7 +4,13 @@
<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">
: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>
<view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction">
@ -228,9 +234,7 @@
var params = {
filters: filters,
pageNo: this.pageNo,
pageSize: this.pageSize,
sort: 'fromLocationCode',
by: 'asc'
pageSize: 100,
}
getIssueJobList(params).then(res => {
uni.hideLoading();
@ -261,6 +265,79 @@
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) {
this.fromLocation = fromLocation;
this.getList('refresh', this.fromLocation, this.productionLine)
@ -303,7 +380,7 @@
},
showItemList(itemList) {
this.$refs.scanList.openPopup(itemList);
this.$refs.jobListPopup.openPopup(itemList);
},
selectedItem(item) {
@ -510,7 +587,8 @@
}
} else {
this.showMessage("按来源库位[" + balance.locationCode + "]批次[" + result.label.batch +
"]物料号[" + result.label.itemCode + "]未查找到任务<br>" + "扫描[" + result.scanMessage + "]")
"]物料号[" + result.label.itemCode + "]未查找到任务<br>" + "扫描[" + result
.scanMessage + "]")
}
}).catch(error => {
this.showMessage(error + "<br>扫描[" + result.scanMessage + "]")

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

@ -2,7 +2,7 @@
<view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view>
<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">
</job-filter>
<view v-if="jobList.length>0">

Loading…
Cancel
Save