You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

155 lines
3.8 KiB

<template>
<uni-popup ref="popup">
<view class="maskbox" @tap="maskClick"></view>
<view class="uni-flex uni-column center"
style="background-color: white;width: 200px; height:auto;padding: 20rpx;z-index: 99;position: relative;">
<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>
</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 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>
</view>
<view class="uni-flex u-row-center" style="margin-top: 30rpx;">
<button class="filter_button" hover-class="filter_button_after"
@click="scanNumberClick">扫描任务编号</button>
</view>
</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>
</template>
<script>
import {
getTodayDate
} from '@/common/basic.js';
import winScanJobNumber from "@/mycomponents/scan/winScanJobNumber.vue"
import winScanAsnNumber from "@/mycomponents/scan/winScanAsnNumber.vue"
export default {
emits: ["switchChangeToday", "switchChangeWait", "onScanNumber", "onScanAsnNumber"],
components: {
winScanJobNumber,
winScanAsnNumber
},
props: {
checkedToday: {
type: Boolean,
default: false
},
checkedWaitTask: {
type: Boolean,
default: false
},
otherTitle: {
type: String,
default: ""
},
isShowAsn:{
type: Boolean,
default: false
}
},
data() {
return {
dataContent: {},
checkedTodayModel:false,
checkedWaitModel:false,
}
},
watch: {
checkedToday: {
handler(newName, oldName) {
this.checkedTodayModel = this.checkedToday
},
immediate: true,
deep: true
},
checkedWaitTask: {
handler(newName, oldName) {
this.checkedWaitModel = this.checkedWaitTask
},
immediate: true,
deep: true
}
},
mounted() {
},
methods: {
// 点击遮罩
maskClick() {
// 如果不允许点击遮罩,直接返回
this.closeScanPopup();
},
openFilter() {
this.$refs['popup'].open("right");
},
closeScanPopup() {
this.$refs.popup.close()
},
switchChangeToday(isOn) {
let creationTime = '';
if (isOn) {
creationTime = getTodayDate();
}
this.$emit("switchChangeToday", isOn, creationTime)
this.closeScanPopup()
},
switchChangeWait(isOn) {
let status = "1,2";
if(isOn){
status="1"
}
this.$emit("switchChangeWait", isOn, status)
this.closeScanPopup()
},
scanNumberClick() {
this.$refs.scanNumber.openScanPopup();
},
scanOtherClick() {
this.$refs.scanAsnNumber.openScanPopup();
},
getScanAsNumber(val) {
this.$emit("onScanAsnNumber", val)
this.$refs.scanAsnNumber.closeScanPopup();
this.closeScanPopup();
},
getScanNumber(val) {
this.$emit("onScanNumber", val)
this.$refs.scanNumber.closeScanPopup();
this.closeScanPopup();
},
}
}
</script>
<style lang="scss">
.maskbox {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 0;
}
</style>