Commit 8b6bb87e by LJM

移动端--到货登记--已登记展示数据改为展示全部正常状态数据和时间查询

parent 82bfd3b3
Showing with 57 additions and 1 deletions
<template>
<view class="arrivalRegister">
<!-- 时间筛选 -->
<view class="time-interval row bothSide verCenter" style="margin-bottom: 15rpx;">
<view class="time-interval-box row verCenter bothSide">
<view class="row verCenter">
<text class="iconfont icon-juxing4"></text>
<picker mode="date" @change="bindTimeChange(1, $event)">
<input type="text" class="uni-input" placeholder="请选择起始时间" placeholder-style="color:#919399" v-model="searchParams.arrival_time_begin" />
</picker>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput('start')" v-if="searchParams.arrival_time_begin != ''"></text>
</view>
<view class="time-interval-box row verCenter bothSide">
<view class="row verCenter">
<text class="iconfont icon-juxing4"></text>
<picker mode="date" @change="bindTimeChange(2, $event)">
<input type="text" class="uni-input" placeholder="请选择结束时间" placeholder-style="color:#919399" v-model="searchParams.arrival_time_end" />
</picker>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput('end')" v-if="searchParams.arrival_time_end != ''"></text>
</view>
</view>
<!-- 搜索条件 -->
<view class="search-box row bothSide verCenter">
<view class="search-box-wrap row verCenter">
......@@ -195,6 +216,8 @@
hasMoreData: true, //是否分页加载
maxInputLength: 7,
searchParams: {
arrival_time_begin: '',
arrival_time_end: '',
mobile_register_all_search: '', //全量搜索
stock_in_with_stock_in_items_inhouse: '', //入仓单号
box_sn: '' //箱号
......@@ -220,6 +243,29 @@
this.getData();
},
methods: {
/**
* 时间选择
*/
bindTimeChange(type, e) {
this.resetChange();
if (type == 1) {
this.searchParams.arrival_time_begin = e.detail.value;
} else if (type == 2) {
this.searchParams.arrival_time_end = e.detail.value;
}
var timeA = new Date(this.searchParams.arrival_time_begin).getTime();
var timeB = new Date(this.searchParams.arrival_time_end).getTime();
if (timeB < timeA) {
uni.showToast({
title: '不能小于开始时间',
icon: 'none'
});
this.searchParams.arrival_time_begin = this.searchParams.arrival_time_begin;
return false;
}
this.getData();
},
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
......@@ -264,10 +310,19 @@
/**
* 清空数据
*/
clearInput() {
clearInput(type) {
this.input_flag = false;
this.clearInputAndFocus(); //再次获取焦点
this.resetChange();
if (type) {
if (type == 'start') {
//清除起始时间
this.searchParams.arrival_time_begin = '';
} else if (type == 'end') {
//清除结束时间
this.searchParams.arrival_time_end = '';
}
} else {
if (this.index == 0) {
//全量搜索
this.searchParams.mobile_register_all_search = '';
......@@ -278,6 +333,7 @@
//箱号
this.searchParams.box_sn = '';
}
}
this.getData();
},
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment