Commit 9c08a81b by LJM

css

parent 275bf524
.arrivalRegister { .arrivalRegister {
padding: 15rpx 22rpx; padding: 15rpx 22rpx;
.radio-search-box {
height: 57rpx;
}
.search-all {
height: 60rpx;
background: #ffffff;
border-radius: 10rpx;
padding-left: 17rpx;
.icon-juxing1 {
font-size: 30rpx;
color: #919399;
}
.icon-a-juxing11 {
font-size: 30rpx;
color: #c6c7cc;
}
.uni-input {
width: 80%;
font-size: 18rpx;
color: #484b59;
margin-left: 13rpx;
}
}
.search-box { .search-box {
height: 60rpx; height: 60rpx;
background: #ffffff; background: #ffffff;
......
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-juxing4:before {
content: "\e79c";
}
.icon-zimu-M:before { .icon-zimu-M:before {
content: "\e660"; content: "\e660";
} }
......
<template> <template>
<view class="arrivalRegister"> <view class="arrivalRegister">
<view class="search-box row bothSide verCenter"> <!-- 时间筛选 -->
<view class="time-interval row bothSide verCenter">
<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.create_time_begin" /></picker>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput('start')" v-if="searchParams.create_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.create_time_end" /></picker>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput('end')" v-if="searchParams.create_time_end != ''"></text>
</view>
</view>
<view class="radio-search-box row verCenter">
<radio-group @change="radioChange" class="row verCenter">
<label class="radio row verCenter">
<radio value="0" checked="true" style="transform:scale(0.7)" color="#1969F9" />
<text class="tt">全量搜索</text>
</label>
<label class="radio">
<radio value="1" style="transform:scale(0.7)" color="#1969F9" />
<text class="tt">入仓号</text>
</label>
<label class="radio">
<radio value="2" style="transform:scale(0.7)" color="#1969F9" />
<text class="tt">FedEX</text>
</label>
</radio-group>
</view>
<view class="search-all row verCenter">
<text class="iconfont icon-juxing1"></text>
<template v-if="index == 0">
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" focus v-model="searchParams.mobile_register_all_search" @input="handleInput(1, $event)" />
</template>
<template v-else-if="index == 1">
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" :maxlength="maxInputLength" />
</template>
<template v-else-if="index == 2">
<input class="uni-input" placeholder="请输入FedEx" placeholder-style="color:#919399" focus v-model="searchParams.tracking_no" @input="handleInput(3, $event)" style="width: 400rpx;" />
</template>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
<view class="search-box row bothSide verCenter" v-if="false">
<view class="sn row rowCenter verCenter"> <view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array"> <picker @change="bindPickerChange" :value="index" :range="array">
<view class="row verCenter"> <view class="row verCenter">
...@@ -25,6 +71,7 @@ ...@@ -25,6 +71,7 @@
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text> <text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view> </view>
</view> </view>
<!-- 列表数据 -->
<view class="list row bothSide" v-if="list.length > 0"> <view class="list row bothSide" v-if="list.length > 0">
<view class="box" v-for="(item, index) in list" :key="index" :class="{ curr: filter_list[index] }"> <view class="box" v-for="(item, index) in list" :key="index" :class="{ curr: filter_list[index] }">
<view class="check-box-icon" @click="filterChange(index)"></view> <view class="check-box-icon" @click="filterChange(index)"></view>
...@@ -209,6 +256,8 @@ export default { ...@@ -209,6 +256,8 @@ export default {
warehouse_id_data: [], warehouse_id_data: [],
hasMoreData: true, //是否分页加载 hasMoreData: true, //是否分页加载
searchParams: { searchParams: {
create_time_begin: '',
create_time_end: '',
mobile_register_all_search: '', //全量搜索 mobile_register_all_search: '', //全量搜索
stock_in_with_stock_in_items_inhouse: '', //入仓单号 stock_in_with_stock_in_items_inhouse: '', //入仓单号
tracking_no: '' //fedex tracking_no: '' //fedex
...@@ -244,6 +293,32 @@ export default { ...@@ -244,6 +293,32 @@ export default {
this.getData(); this.getData();
}, },
methods: { methods: {
radioChange(e) {
this.index = e.detail.value;
},
/**
* 时间选择
*/
bindTimeChange(type, e) {
this.resetChange();
if (type == 1) {
this.searchParams.create_time_begin = e.detail.value;
} else if (type == 2) {
this.searchParams.create_time_end = e.detail.value;
}
var timeA = new Date(this.searchParams.create_time_begin).getTime();
var timeB = new Date(this.searchParams.create_time_end).getTime();
if (timeB < timeA) {
uni.showToast({
title: '不能小于开始时间',
icon: 'none'
});
this.searchParams.create_time_end = this.searchParams.create_time_begin;
return false;
}
this.getData();
},
/** /**
* 找出false对应的下标 * 找出false对应的下标
* @param {Object} arr * @param {Object} arr
...@@ -304,16 +379,22 @@ export default { ...@@ -304,16 +379,22 @@ export default {
/** /**
* 清空数据 * 清空数据
*/ */
clearInput() { clearInput(type) {
this.input_flag = false; if (type == 'start') {
this.resetChange(); this.searchParams.create_time_begin = '';
} else if (type == 'end') {
this.searchParams.create_time_end = '';
} else {
this.input_flag = false;
this.resetChange();
if (this.index == 0) { if (this.index == 0) {
this.searchParams.mobile_register_all_search = ''; this.searchParams.mobile_register_all_search = '';
} else if (this.index == 1) { } else if (this.index == 1) {
this.searchParams.stock_in_with_stock_in_items_inhouse = ''; this.searchParams.stock_in_with_stock_in_items_inhouse = '';
} else if (this.index == 2) { } else if (this.index == 2) {
this.searchParams.tracking_no = ''; this.searchParams.tracking_no = '';
}
} }
this.getData(); this.getData();
}, },
...@@ -353,7 +434,7 @@ export default { ...@@ -353,7 +434,7 @@ export default {
getData() { getData() {
this.request(API.stockInMobileRegisterList, 'POST', { page: this.page, limit: this.limit, is_register: 0, ...this.searchParams }, false).then(res => { this.request(API.stockInMobileRegisterList, 'POST', { page: this.page, limit: this.limit, is_register: 0, ...this.searchParams }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
if (res.data.total > 0) { if (res.data.list.length > 0) {
this.hasMoreData = true; this.hasMoreData = true;
this.list = this.list.concat(res.data.list); this.list = this.list.concat(res.data.list);
this.filter_list = createArray(this.list.length, false); this.filter_list = createArray(this.list.length, false);
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<template v-if="is_batch"> <template v-if="is_batch">
<input class="uni-input" placeholder="请扫描入库标签" :disabled="searchParams.position_name == '' ? true : false" placeholder-style="color:#919399" v-model="search_keyword" @input="handleInput(2, search_keyword)" maxlength="15" ref="myInput" /> <input class="uni-input" placeholder="请扫描入库标签" :disabled="searchParams.position_name == '' ? true : false" placeholder-style="color:#919399" :focus="isFocus" v-model="search_keyword" @input="handleInput(2, search_keyword)" maxlength="15" ref="myInput" />
</template> </template>
<template v-else> <template v-else>
<input class="uni-input" placeholder="请扫描入库标签" :disabled="searchParams.position_name == '' ? true : false" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput(2, searchParams.stock_in_batch_sn)" maxlength="15" /> <input class="uni-input" placeholder="请扫描入库标签" :disabled="searchParams.position_name == '' ? true : false" placeholder-style="color:#919399" :focus="isFocus" v-model="searchParams.stock_in_batch_sn" @input="handleInput(2, searchParams.stock_in_batch_sn)" maxlength="15" ref="myInput" />
</template> </template>
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_flag_stock_in_batch_sn"></text> <text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_flag_stock_in_batch_sn"></text>
...@@ -452,6 +452,7 @@ import { createArray } from '@/util/util.js'; ...@@ -452,6 +452,7 @@ import { createArray } from '@/util/util.js';
export default { export default {
data() { data() {
return { return {
isFocus: false,
is_batch: false, //是否开启批量 is_batch: false, //是否开启批量
is_batch_active: false, //是否开启批量激活s is_batch_active: false, //是否开启批量激活s
history_id: [], //批量记录id history_id: [], //批量记录id
...@@ -548,12 +549,6 @@ export default { ...@@ -548,12 +549,6 @@ export default {
}); });
this.search_keyword = ''; this.search_keyword = '';
try {
this.$refs.myInput.focus(); // 获取焦点
} catch (e) {
//TODO handle the exception
}
//若识别物料标签不在上架任务中,则弹窗提示:该物料不在上架任务中,需关闭弹窗才可继续操作 //若识别物料标签不在上架任务中,则弹窗提示:该物料不在上架任务中,需关闭弹窗才可继续操作
let isInList = list.some(function(item) { let isInList = list.some(function(item) {
return item.stock_in_batch_sn === val; return item.stock_in_batch_sn === val;
...@@ -570,6 +565,21 @@ export default { ...@@ -570,6 +565,21 @@ export default {
this.history_id.splice(index_history_id, 1); this.history_id.splice(index_history_id, 1);
} }
}); });
} else {
uni.showToast({
icon: 'success'
});
}
try {
//再次获取焦点
this.isFocus = false;
setTimeout(() => {
this.isFocus = true;
this.$forceUpdate();
}, 1000);
} catch (e) {
//TODO handle the exception
} }
} }
}); });
...@@ -594,10 +604,14 @@ export default { ...@@ -594,10 +604,14 @@ export default {
} else { } else {
if (type == 1) { if (type == 1) {
this.input_flag_position_name = false; this.input_flag_position_name = false;
this.getData();
} else if (type == 2) { } else if (type == 2) {
this.searchParams.stock_in_batch_sn = '';
this.input_flag_stock_in_batch_sn = false; this.input_flag_stock_in_batch_sn = false;
this.getData();
} else if (type == 3) { } else if (type == 3) {
this.input_flag_container_sn = false; this.input_flag_container_sn = false;
this.getData();
} }
} }
}, 500), }, 500),
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<template v-if="index == 0"> <template v-if="index == 0">
<template v-if="is_batch"> <template v-if="is_batch">
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" focus v-model="search_keyword" @input="handleInput(1, $event)" maxlength="15" ref="myInput" id="myInput" /> <input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" :focus="isFocus" v-model="search_keyword" @input="handleInput(1, $event)" maxlength="15" ref="myInput" id="myInput" />
</template> </template>
<template v-else> <template v-else>
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" focus v-model="searchParams.search_keyword" @input="handleInput(1, $event)" maxlength="15" ref="myInput" id="myInput" /> <input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" :focus="isFocus" v-model="searchParams.search_keyword" @input="handleInput(1, $event)" maxlength="15" ref="myInput" id="myInput" />
</template> </template>
</template> </template>
<template v-else-if="index == 1"> <template v-else-if="index == 1">
...@@ -140,6 +140,7 @@ import debounce from 'lodash/debounce'; ...@@ -140,6 +140,7 @@ import debounce from 'lodash/debounce';
export default { export default {
data() { data() {
return { return {
isFocus: true,
is_batch: false, //是否开启批量 is_batch: false, //是否开启批量
history_id: [], history_id: [],
search_keyword: '', search_keyword: '',
...@@ -207,11 +208,13 @@ export default { ...@@ -207,11 +208,13 @@ export default {
this.page = 1; this.page = 1;
this.filter_id = []; this.filter_id = [];
if (!this.is_batch) { this.search_keyword = '';
this.search_keyword = ''; this.searchParams.search_keyword = '';
this.searchParams.search_keyword = ''; //再次获取焦点
} this.isFocus = false;
setTimeout(() => {
this.isFocus = true;
}, 1000);
this.getData(); this.getData();
}, },
showDrawer() { showDrawer() {
...@@ -338,12 +341,6 @@ export default { ...@@ -338,12 +341,6 @@ export default {
}); });
this.search_keyword = ''; this.search_keyword = '';
try {
this.$refs.myInput.focus(); // 获取焦点
} catch (e) {
//TODO handle the exception
}
//若识别物料标签不在上架任务中,则弹窗提示:该物料不在上架任务中,需关闭弹窗才可继续操作 //若识别物料标签不在上架任务中,则弹窗提示:该物料不在上架任务中,需关闭弹窗才可继续操作
let isInList = list.some(function(item) { let isInList = list.some(function(item) {
return item.stock_in_batch_sn === val; return item.stock_in_batch_sn === val;
...@@ -360,6 +357,21 @@ export default { ...@@ -360,6 +357,21 @@ export default {
this.history_id.splice(index_history_id, 1); this.history_id.splice(index_history_id, 1);
} }
}); });
} else {
uni.showToast({
icon: 'success'
});
}
try {
//再次获取焦点
this.isFocus = false;
setTimeout(() => {
this.isFocus = true;
this.$forceUpdate();
}, 1000);
} catch (e) {
//TODO handle the exception
} }
} }
}); });
......
...@@ -34,10 +34,10 @@ ...@@ -34,10 +34,10 @@
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<template v-if="is_batch"> <template v-if="is_batch">
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" v-model="search_keyword" @input="handleInput(2, search_keyword)" maxlength="15" ref="myInput" /> <input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" :focus="isFocus" v-model="search_keyword" @input="handleInput(2, search_keyword)" maxlength="15" ref="myInput" />
</template> </template>
<template v-else> <template v-else>
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput(2, searchParams.stock_in_batch_sn)" maxlength="15" /> <input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" :focus="isFocus" v-model="searchParams.stock_in_batch_sn" @input="handleInput(2, searchParams.stock_in_batch_sn)" maxlength="15" />
</template> </template>
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_flag_stock_in_batch_sn"></text> <text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_flag_stock_in_batch_sn"></text>
...@@ -131,6 +131,13 @@ ...@@ -131,6 +131,13 @@
</view> </view>
<view class="row" style="justify-content: flex-end;width: 100%;"><view class="btn row rowCenter verCenter" @click="showDrawer(1, item)">选择</view></view> <view class="row" style="justify-content: flex-end;width: 100%;"><view class="btn row rowCenter verCenter" @click="showDrawer(1, item)">选择</view></view>
</view> </view>
<template v-if="list.length == 1 && list[0].no_recheck_qty == 0">
<!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter">
<text class="iconfont icon-a-juxing21"></text>
<text class="text">查不到当前数据</text>
</view>
</template>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
...@@ -558,6 +565,7 @@ import debounce from 'lodash/debounce'; ...@@ -558,6 +565,7 @@ import debounce from 'lodash/debounce';
export default { export default {
data() { data() {
return { return {
isFocus: true,
is_batch: false, //是否开启批量 is_batch: false, //是否开启批量
history_id: [], //批量记录id history_id: [], //批量记录id
search_keyword: '', //批量搜索值 search_keyword: '', //批量搜索值
...@@ -629,6 +637,12 @@ export default { ...@@ -629,6 +637,12 @@ export default {
this.search_keyword = ''; this.search_keyword = '';
this.searchParams.stock_in_batch_sn = ''; this.searchParams.stock_in_batch_sn = '';
//再次获取焦点
this.isFocus = false;
setTimeout(() => {
this.isFocus = true;
}, 1000);
this.getData(); this.getData();
}, },
bindPickerBoxChange: function(e, index) { bindPickerBoxChange: function(e, index) {
...@@ -868,12 +882,6 @@ export default { ...@@ -868,12 +882,6 @@ export default {
}); });
this.search_keyword = ''; this.search_keyword = '';
try {
this.$refs.myInput.focus(); // 获取焦点
} catch (e) {
//TODO handle the exception
}
//若识别物料标签不在上架任务中,则弹窗提示:该物料不在上架任务中,需关闭弹窗才可继续操作 //若识别物料标签不在上架任务中,则弹窗提示:该物料不在上架任务中,需关闭弹窗才可继续操作
let isInList = list.some(function(item) { let isInList = list.some(function(item) {
return item.stock_in_batch_sn === val; return item.stock_in_batch_sn === val;
...@@ -890,6 +898,21 @@ export default { ...@@ -890,6 +898,21 @@ export default {
this.history_id.splice(index_history_id, 1); this.history_id.splice(index_history_id, 1);
} }
}); });
} else {
uni.showToast({
icon: 'success'
});
}
try {
//再次获取焦点
this.isFocus = false;
setTimeout(() => {
this.isFocus = true;
this.$forceUpdate();
}, 1000);
} catch (e) {
//TODO handle the exception
} }
} }
}); });
......
No preview for this file type
...@@ -135,3 +135,33 @@ image { ...@@ -135,3 +135,33 @@ image {
.btn-disabled { .btn-disabled {
opacity: 0.5; opacity: 0.5;
} }
.time-interval {
.time-interval-box {
width: 48%;
height: 60rpx;
background: #ffffff;
border-radius: 10rpx;
padding-left: 17rpx;
padding-right: 10rpx;
box-sizing: border-box;
.iconfont {
font-size: 30rpx;
color: #919399;
}
.uni-input {
margin-left: 13rpx;
font-size: 18rpx;
}
}
}
.radio-search-box {
.radio {
margin-right: 5rpx;
}
.tt {
font-size: 18rpx;
color: #292b33;
}
}
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