Commit 7836ed72 by LJM

优化

parent 6bb64fef
......@@ -15,9 +15,11 @@
.icon-a-juxing11 {
font-size: 30rpx;
color: #c6c7cc;
width: 60rpx;
text-align: center;
}
.uni-input {
width: 600rpx;
width: 465rpx;
font-size: 18rpx;
color: #484b59;
margin-left: 13rpx;
......@@ -157,6 +159,7 @@
position: fixed;
bottom: 0;
width: 100%;
height: 75rpx;
left: 0;
.btn1 {
width: 248rpx;
......
......@@ -44,7 +44,8 @@
margin-top: 15rpx;
label {
margin-right: 10rpx;
font-size: 24rpx;
font-size: 16rpx;
color: #1969f9;
}
}
.list {
......
......@@ -92,6 +92,7 @@
overflow: hidden;
}
.desc {
width: 60%;
font-size: 17rpx;
color: #484b59;
word-break: break-all;
......
......@@ -38,17 +38,22 @@
</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)" />
</template>
<view class="search-all row verCenter bothSide">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<!-- 全量搜索 -->
<template v-if="index == 0">
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" :focus="is_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="is_focus" v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" :maxlength="maxInputLength" />
</template>
<!-- fedex -->
<template v-else-if="index == 2">
<input class="uni-input" placeholder="请输入FedEx" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.tracking_no" @input="handleInput(3, $event)" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
<!-- 列表数据 -->
......@@ -475,6 +480,7 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
indicatorDots: true,
autoplay: false,
interval: 2000,
......@@ -561,6 +567,10 @@
this.getZyGoodsData(stock_in_sn, 1);
}
},
/**
* 搜索条件切换
* @param {Object} e
*/
radioChange(e) {
this.index = e.detail.value;
},
......@@ -732,20 +742,23 @@
*/
clearInput(type) {
if (type == 'start') {
//清除起始时间
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) {
this.searchParams.mobile_register_all_search = '';
this.searchParams.mobile_register_all_search = ''; //全量搜索
} 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) {
this.searchParams.tracking_no = '';
this.searchParams.tracking_no = ''; //Fedex
}
this.input_flag = false;
this.clearInputAndFocus(); //再次获取焦点
}
this.getData();
},
......@@ -987,6 +1000,7 @@
this.resetChange();
this.getData();
this.closeDrawer();
this.clearInputAndFocus();
}, 2000);
} else {
uni.showModal({
......@@ -1048,6 +1062,7 @@
this.resetChange();
this.getData();
this.closeDrawer();
this.clearInputAndFocus(); //再次获取焦点
this.filter_id = [];
this.filter_id_warehouse_id = [];
}, 2000);
......@@ -1080,6 +1095,7 @@
this.resetChange();
this.getData();
this.closeDrawer();
this.clearInputAndFocus(); //再次获取焦点
this.filter_id = [];
this.filter_id_warehouse_id = [];
}, 2000);
......@@ -1130,6 +1146,16 @@
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
......@@ -11,10 +11,10 @@
</view>
<view class="row bothSide verCenter input-wrap">
<template v-if="index_1 == 0">
<input type="text" placeholder="请输入入库批次号" placeholder-style="color:#919399" class="uni-input" v-model="formParams.stock_in_batch_sn" @input="handleInput(4, $event)" />
<input type="text" placeholder="请输入入库批次号" placeholder-style="color:#919399" class="uni-input" v-model="formParams.stock_in_batch_sn" @input="handleInput(4, $event)" :focus="is_focus" />
</template>
<template v-else-if="index_1 == 1">
<input type="text" placeholder="请输入旧标签查询" placeholder-style="color:#919399" class="uni-input" v-model="formParams.stock_in_batch_sn" @input="handleInput(4, $event)" maxlength="8" />
<input type="text" placeholder="请输入旧标签查询" placeholder-style="color:#919399" class="uni-input" v-model="formParams.stock_in_batch_sn" @input="handleInput(4, $event)" maxlength="8" :focus="is_focus" />
</template>
<text class="iconfont icon-a-juxing11" @click="clearInput(4)" v-if="input_stock_in_batch_sn"></text>
</view>
......@@ -74,6 +74,7 @@
export default {
data() {
return {
is_focus: false, //获取焦点动态化
is_submit: true,
index: 0,
item: ['货品编码', '自营货品ID'],
......@@ -138,8 +139,10 @@
this.formParams.position_code = '';
this.input_position = false;
} else if (type == 4) {
//入库批次号 旧标签
this.formParams.stock_in_batch_sn = '';
this.input_stock_in_batch_sn = false;
this.clearInputAndFocus();
}
},
/**
......@@ -220,6 +223,16 @@
uni.navigateTo({
url: '/pages/immediatelyStockIn/list?goods_sn=' + this.formParams.goods_sn + '&goods_name=' + this.formParams.goods_name + '&warehouse_id=' + this.formParams.warehouse_id + '&position_id=' + this.formParams.position_id + '&sku_id=' + this.formParams.sku_id + '&stock_in_batch_sn=' + this.formParams.stock_in_batch_sn
});
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
<template>
<view class="picking">
<!-- 搜索部分 -->
<view class="search-box row bothSide verCenter">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
......@@ -12,11 +13,12 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描出库单号" placeholder-style="color:#919399" @input="handleInput" v-model="searchParams.stock_out_sn" />
<input class="uni-input" placeholder="请扫描出库单号" placeholder-style="color:#919399" :focus="is_focus" @input="handleInput($event)" v-model="searchParams.stock_out_sn" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<!-- 列表区 -->
<view class="list row bothSide" v-if="list.length > 0">
<view class="box" v-for="(item, index) in list" :key="index">
<view class="text-item row verCenter">
......@@ -48,7 +50,9 @@
<text class="label">销售员:</text>
<text class="tt">{{ item.sale_name }}</text>
</view>
<view class="btn-box row"><view class="btn row rowCenter verCenter" @click="take(item.stock_out_id, item.stock_out_sn, item.warehouse_id)">领取</view></view>
<view class="btn-box row">
<view class="btn row rowCenter verCenter" @click="take(item.stock_out_id, item.stock_out_sn, item.warehouse_id)">领取</view>
</view>
</view>
</view>
<!-- 无数据展示 -->
......@@ -60,96 +64,116 @@
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
input_flag: false,
index: 0,
page: 1,
limit: 1000,
array: ['出库单号'],
list: [],
searchParams: {
stock_out_sn: ''
}
};
},
onShow() {
this.getData();
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.navigateTo({
url: '/pages/picking/me'
});
}
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 获取列表数据
*/
getData() {
this.request(API.getNoTakeList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
/**
* 领取
*/
take(stock_out_id, stock_out_sn, warehouse_id) {
this.request(API.take, 'POST', { stock_out_id: stock_out_id }, true).then(res => {
if (res.code === 0) {
uni.navigateTo({
url: '/pages/picking/sort?stock_out_id=' + stock_out_id + '&stock_out_sn=' + stock_out_sn + '&warehouse_id=' + warehouse_id
});
} else {
uni.showModal({
itle: '提示',
content: res.msg,
showCancel: false
});
export default {
data() {
return {
is_focus: true, //获取焦点动态化
input_flag: false,
index: 0,
page: 1,
limit: 1000,
array: ['出库单号'],
list: [],
searchParams: {
stock_out_sn: ''
}
});
};
},
/**
* 清空数据
*/
clearInput() {
this.input_flag = false;
this.searchParams.stock_out_sn = '';
onShow() {
this.getData();
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
var val = event.target.value;
if (val) {
this.input_flag = true;
} else {
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.navigateTo({
url: '/pages/picking/me'
});
}
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 获取列表数据
*/
getData() {
this.request(API.getNoTakeList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
/**
* 领取
*/
take(stock_out_id, stock_out_sn, warehouse_id) {
this.request(API.take, 'POST', { stock_out_id: stock_out_id }, true).then(res => {
if (res.code === 0) {
uni.navigateTo({
url: '/pages/picking/sort?stock_out_id=' + stock_out_id + '&stock_out_sn=' + stock_out_sn + '&warehouse_id=' + warehouse_id
});
} else {
uni.showModal({
itle: '提示',
content: res.msg,
showCancel: false
});
}
});
},
/**
* 清空数据
*/
clearInput() {
this.input_flag = false;
this.searchParams.stock_out_sn = '';
this.clearInputAndFocus(); //再次获取焦点
this.getData();
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
var val = event.target.value;
this.resetChange();
if (val) {
this.input_flag = true;
} else {
this.input_flag = false;
}
this.getData();
}, 500),
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
this.getData();
}, 500)
}
};
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/picking/index.scss';
</style>
@import '@/assets/css/picking/index.scss';
</style>
\ No newline at end of file
<template>
<view class="picking-me">
<!-- 搜索部分 -->
<view class="search-box row bothSide verCenter">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
......@@ -12,11 +13,12 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" v-model="searchParams.stock_out_sn" @input="handleInput" />
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" v-model="searchParams.stock_out_sn" @input="handleInput" :focus="is_focus" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<!-- 列表 -->
<view class="list row bothSide" v-if="list.length > 0">
<view class="box" v-for="(item, index) in list" :key="index">
<view class="text-item row verCenter">
......@@ -85,6 +87,7 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
input_flag: false,
index: 0,
array: ['出库单号'],
......@@ -112,7 +115,7 @@
this.getData();
},
onShow() {
this.list = [];
this.resetChange();
this.getData();
},
methods: {
......@@ -124,8 +127,10 @@
* 清空数据
*/
clearInput() {
this.resetChange();
this.input_flag = false;
this.searchParams.stock_out_sn = '';
this.clearInputAndFocus(); //再次获取焦点
this.getData();
},
/**
......@@ -136,7 +141,6 @@
this.resetChange();
var val = event.target.value;
this.searchParams.stock_out_sn = '';
if (val) {
this.input_flag = true;
this.searchParams.stock_out_sn = val;
......@@ -156,9 +160,8 @@
icon: 'success'
});
setTimeout(() => {
this.list = [];
this.getData();
this.filter_id = [];
this.resetChange();
this.clearInputAndFocus();
}, 2000);
} else {
uni.showModal({
......@@ -195,6 +198,16 @@
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
......@@ -33,10 +33,10 @@
<text class="iconfont icon-juxing1"></text>
<!-- 批量扫描 -->
<template v-if="is_batch">
<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="16" ref="myInput" />
<input class="uni-input" placeholder="请扫描入库标签" :disabled="searchParams.position_name == '' ? true : false" placeholder-style="color:#919399" :focus="is_focus" v-model="search_keyword" @input="handleInput(2, search_keyword)" maxlength="16" ref="myInput" />
</template>
<template v-else>
<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="16" ref="myInput" />
<input class="uni-input" placeholder="请扫描入库标签" :disabled="searchParams.position_name == '' ? true : false" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_in_batch_sn" @input="handleInput(2, searchParams.stock_in_batch_sn)" maxlength="16" ref="myInput" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_flag_stock_in_batch_sn"></text>
......@@ -604,7 +604,7 @@
isApp: uni.getSystemInfoSync().platform === 'android' || uni.getSystemInfoSync().platform === 'ios',
is_print: true, //是否打印货品标签
old_Label: false, //旧标签默认false
isFocus: false,
is_focus: false, //获取焦点动态化
is_batch: true, //是否开启批量
is_batch_active: false, //是否开启批量激活s
history_id: [], //批量记录id
......@@ -733,9 +733,9 @@
this.input_flag_position_name = true;
this.getData();
//再次获取焦点
this.isFocus = false;
this.is_focus = false;
setTimeout(() => {
this.isFocus = true;
this.is_focus = true;
this.$forceUpdate();
}, 1500);
} else if (type == 2) {
......@@ -777,9 +777,9 @@
try {
//再次获取焦点
this.isFocus = false;
this.is_focus = false;
setTimeout(() => {
this.isFocus = true;
this.is_focus = true;
this.search_keyword = ''; //清空入库批次号
this.$forceUpdate();
}, 500);
......@@ -797,9 +797,9 @@
//执行最后再次获取焦点
try {
this.isFocus = false;
this.is_focus = false;
setTimeout(() => {
this.isFocus = true;
this.is_focus = true;
this.search_keyword = ''; //清空入库批次号
this.$forceUpdate();
}, 500);
......@@ -1087,15 +1087,19 @@
*/
clearInput(type) {
if (type == 1) {
//库位
this.searchParams.position_name = '';
this.input_flag_position_name = false;
} else if (type == 2) {
//入库标签
this.searchParams.stock_in_batch_sn = '';
this.input_flag_stock_in_batch_sn = false;
} else if (type == 3) {
//容器
this.searchParams.container_sn = '';
this.input_flag_container_sn = false;
}
this.clearInputAndFocus(); //再次获取焦点
this.getData();
},
/**
......@@ -1303,6 +1307,16 @@
});
}
});
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
......@@ -15,14 +15,14 @@
<text class="iconfont icon-juxing1"></text>
<template v-if="index == 0">
<template v-if="is_batch">
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" :focus="isFocus" v-model="search_keyword" @input="handleInput(1, $event)" />
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" :focus="is_focus" v-model="search_keyword" @input="handleInput(1, $event)" />
</template>
<template v-else>
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" :focus="isFocus" v-model="searchParams.search_keyword" @input="handleInput(1, $event)" />
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.search_keyword" @input="handleInput(1, $event)" />
</template>
</template>
<template v-else-if="index == 1">
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" focus v-model="searchParams.search_keyword" @input="handleInput(2, $event)" />
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.search_keyword" @input="handleInput(2, $event)" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......@@ -150,7 +150,7 @@
data() {
return {
isApp: uni.getSystemInfoSync().platform === 'android' || uni.getSystemInfoSync().platform === 'ios',
isFocus: true,
is_focus: true, //获取焦点动态化
is_batch: false, //是否开启批量
history_id: [],
search_keyword: '',
......@@ -186,7 +186,6 @@
this.getData();
},
onNavigationBarButtonTap(e) {
console.log(e);
if (e.index == 0) {
uni.navigateTo({
url: '/pages/putaway/record'
......@@ -201,9 +200,9 @@
// 重置全局变量或执行其他操作
getApp().globalData.fromPage = null;
//再次获取焦点
that.isFocus = false;
that.is_focus = false;
setTimeout(() => {
that.isFocus = true;
that.is_focus = true;
}, 1000);
}
this.resetChange();
......@@ -223,7 +222,10 @@
} else {
this.index = e.detail.value;
this.searchParams.search_type = Number(e.detail.value) + 1;
this.search_keyword = '';
this.searchParams.search_keyword = '';
this.clearInputAndFocus();
//批量扫描关闭
if (this.index == 1) {
this.is_batch = false;
......@@ -248,9 +250,9 @@
this.search_keyword = '';
this.searchParams.search_keyword = '';
//再次获取焦点
this.isFocus = false;
this.is_focus = false;
setTimeout(() => {
this.isFocus = true;
this.is_focus = true;
}, 800);
this.getData();
},
......@@ -366,6 +368,7 @@
this.search_keyword = '';
}
this.searchParams.search_keyword = '';
this.clearInputAndFocus(); //再次获取焦点
this.getData();
},
/**
......@@ -411,9 +414,9 @@
this.history_id.splice(index_history_id, 1);
try {
//再次获取焦点
this.isFocus = false;
this.is_focus = false;
setTimeout(() => {
this.isFocus = true;
this.is_focus = true;
this.search_keyword = ''; //清空入库批次号
this.$forceUpdate();
}, 500);
......@@ -431,9 +434,9 @@
//执行最后再次获取焦点
try {
this.isFocus = false;
this.is_focus = false;
setTimeout(() => {
this.isFocus = true;
this.is_focus = true;
this.search_keyword = ''; //清空入库批次号
this.$forceUpdate();
}, 500);
......@@ -463,7 +466,7 @@
this.getData();
this.input_flag = false;
}
}, 800),
}, 500),
/**
* 监听库位编码
*/
......@@ -547,9 +550,9 @@
this.closeDrawer();
this.getData();
//再次获取焦点
this.isFocus = false;
this.is_focus = false;
setTimeout(() => {
this.isFocus = true;
this.is_focus = true;
}, 500);
}, 2000);
} else {
......@@ -567,6 +570,16 @@
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
<template>
<view class="putaway">
<!-- 搜索部分 -->
<view class="search-box row bothSide verCenter">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
......@@ -12,11 +13,12 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入容器码" placeholder-style="color:#919399" v-model="searchParams.container_sn" @input="handleInput" />
<input class="uni-input" placeholder="请扫描或输入容器码" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.container_sn" @input="handleInput" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<!-- 列表 -->
<view class="list row bothSide" v-if="list.length > 0">
<view class="box" v-for="(item, index) in list" :key="index">
<view class="text-item row verCenter">
......@@ -36,7 +38,9 @@
<text class="label">待上架数量:</text>
<text class="tt">{{ item.total_pending_shelf_qty }}</text>
</view>
<navigator class="btn-box row" :url="'/pages/putaway/packSingle?container_id=' + item.container_id + '&container_sn=' + item.container_sn" hover-class="none"><view class="btn row rowCenter verCenter">选择</view></navigator>
<navigator class="btn-box row" :url="'/pages/putaway/packSingle?container_id=' + item.container_id + '&container_sn=' + item.container_sn" hover-class="none">
<view class="btn row rowCenter verCenter">选择</view>
</navigator>
</view>
</view>
<!-- 无数据展示 -->
......@@ -48,85 +52,107 @@
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
input_flag: false,
page: 1,
limit: 1000,
index: 0,
array: ['容器'],
list: [],
searchParams: {
container_sn: ''
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
is_focus: true, //获取焦点动态化
input_flag: false,
page: 1,
limit: 1000,
index: 0,
array: ['容器'],
list: [],
searchParams: {
container_sn: ''
}
};
},
onNavigationBarButtonTap(e) {
console.log(e);
if (e.index == 0) {
uni.navigateTo({
url: '/pages/putaway/record'
});
}
};
},
onNavigationBarButtonTap(e) {
console.log(e);
if (e.index == 0) {
uni.navigateTo({
url: '/pages/putaway/record'
});
}
},
onShow() {
this.getData();
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 清空数据
*/
clearInput() {
this.input_flag = false;
this.searchParams.container_sn = '';
onShow() {
this.getData();
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
var val = event.target.value;
if (val) {
this.input_flag = true;
} else {
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 清空数据
*/
clearInput() {
this.resetChange();
this.searchParams.container_sn = '';
this.input_flag = false;
}
this.getData();
setTimeout(() => {
if (this.list.length == 1) {
uni.navigateTo({
url: '/pages/putaway/packSingle?container_id=' + this.list[0].container_id + '&container_sn=' + this.list[0].container_sn
});
}
}, 1000);
}, 500),
/**
* 获取列表数据
*/
getData() {
this.request(API.onShelfByContainerCountList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
this.clearInputAndFocus(); //再次获取焦点
this.getData();
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
var val = event.target.value;
this.resetChange();
if (val) {
this.input_flag = true;
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
this.input_flag = false;
}
});
this.getData((data, msg) => {
if (data.length == 1) {
uni.navigateTo({
url: '/pages/putaway/packSingle?container_id=' + this.list[0].container_id + '&container_sn=' + this.list[0].container_sn
});
}
});
}, 500),
/**
* 获取列表数据
*/
getData(callback) {
this.request(API.onShelfByContainerCountList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
typeof callback == 'function' && callback(res.data.list, res.data.msg);
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
/**
* 重置
*/
resetChange() {
this.filter_id = []; //清空选中状态
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
}
};
};
</script>
<style scoped lang="scss">
@import '@/assets/css/putaway/index.scss';
</style>
@import '@/assets/css/putaway/index.scss';
</style>
\ No newline at end of file
<template>
<view class="putaway-record">
<!-- 搜索部分 -->
<view class="search-box row bothSide verCenter">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
......@@ -13,12 +14,13 @@
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<template v-if="index == 0">
<input class="uni-input" placeholder="请扫描或者输入" placeholder-style="color:#919399" v-model="searchParams.search_keyword" @input="handleInput" />
<input class="uni-input" placeholder="请扫描或者输入" placeholder-style="color:#919399" v-model="searchParams.search_keyword" @input="handleInput" :focus="is_focus" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<!-- 筛选部分 -->
<view class="radio-wrap row verCenter" style="padding-bottom: 0;">
<radio-group name="radio1" @change="radioChange($event, 1)">
<label>
......@@ -51,6 +53,7 @@
</label>
</radio-group>
</view>
<!-- 列表 -->
<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="check-box-icon" @click="filterChange(index)"></view>
......@@ -252,6 +255,7 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
input_flag: false,
page: 1,
limit: 50,
......@@ -352,6 +356,7 @@
this.resetChange();
this.input_flag = false;
this.searchParams.search_keyword = '';
this.clearInputAndFocus(); //再次获取焦点
this.getData();
},
/**
......@@ -539,6 +544,16 @@
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
<template>
<view class="putaway-single">
<!-- 搜索部分 -->
<view class="search-box row bothSide verCenter">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange($event)" :value="index" :range="array">
......@@ -17,6 +18,7 @@
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<!-- 列表 -->
<view class="section">
<view class="field-item row">
<view class="item row verCenter">
......@@ -201,6 +203,7 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
isFirst: false,
isZY: false, //区分是否自营
isInputFocus: false,
......@@ -256,8 +259,10 @@
* 清空数据
*/
clearInput() {
this.input_flag = false;
this.searchParams.stock_in_batch_sn = '';
this.resetChange();
this.input_flag = false;
this.clearInputAndFocus(); //再次获取焦点
this.getData();
},
/**
......@@ -446,6 +451,23 @@
});
}
});
},
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
......@@ -13,10 +13,10 @@
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<template v-if="index == 0">
<input class="uni-input" v-model="formParams.sn" placeholder="请输入入库标签" placeholder-style="color:#919399" @input="handleInput(1, formParams.sn)" maxlength="16" />
<input class="uni-input" v-model="formParams.sn" placeholder="请输入入库标签" placeholder-style="color:#919399" @input="handleInput(1, formParams.sn)" maxlength="16" :focus="is_focus" />
</template>
<template v-else-if="index == 1">
<input class="uni-input" v-model="formParams.sn" placeholder="请输入旧标签查询" placeholder-style="color:#919399" @input="handleInput(1, formParams.sn)" maxlength="8" />
<input class="uni-input" v-model="formParams.sn" placeholder="请输入旧标签查询" placeholder-style="color:#919399" @input="handleInput(1, formParams.sn)" maxlength="8" :focus="is_focus" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag"></text>
......@@ -33,7 +33,7 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" type="number" v-model="formParams.tally_qty" placeholder="请输入数量" placeholder-style="color:#919399" @input="handleInput(2, formParams.tally_qty)" />
<input class="uni-input" type="number" v-model="formParams.tally_qty" placeholder="请输入数量" placeholder-style="color:#919399" @input="handleInput(2, formParams.tally_qty)" :focus="is_focus_num" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_flag_num"></text>
</view>
......@@ -118,9 +118,11 @@
export default {
data() {
return {
is_focus: false, //获取焦点动态化
is_focus_num: false,
company_id: 1,
input_flag: false,
input_flag_num: false,
input_flag: false, //入库标签叉叉
input_flag_num: false, //数量叉叉
index: 0,
print_language_index: 0,
print_language: ['中文', '英文'],
......@@ -160,12 +162,15 @@
*/
clearInput(type) {
if (type == 1) {
//入库标签
this.formParams.sn = '';
this.input_flag = false;
} else if (type == 2) {
//数量
this.formParams.tally_qty = '';
this.input_flag_num = false;
}
this.clearInputAndFocus();
},
/**
* 单号搜索
......@@ -249,6 +254,26 @@
});
}
});
},
/**
* 再次获取焦点
*/
clearInputAndFocus(type) {
if (type == 1) {
//入库标签
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
} else {
//数量
this.input_flag_num = false;
this.is_focus_num = false;
setTimeout(() => {
this.is_focus_num = true;
}, 200);
}
}
}
};
......
......@@ -13,7 +13,7 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" focus v-model="searchParams.stock_out_sn" @input="handleInput" />
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_out_sn" @input="handleInput" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
......@@ -86,6 +86,7 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
input_flag: false,
page: 1,
limit: 1000,
......@@ -113,6 +114,7 @@
methods: {
checkboxChange(e) {
console.log('checkbox发送选择改变,携带值为', e.detail.value);
this.resetChange();
this.searchParams.stock_out_status = e.detail.value.join(',');
this.getData();
},
......@@ -146,8 +148,10 @@
* 清空数据
*/
clearInput() {
this.resetChange();
this.input_flag = false;
this.searchParams.stock_out_sn = '';
this.clearInputAndFocus(); //再次获取焦点
this.getData();
},
/**
......@@ -155,16 +159,17 @@
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
if (val) {
this.input_flag = true;
setTimeout(() => {
if (this.list.length == 1) {
this.getData((data, msg) => {
if (data.length == 1) {
uni.navigateTo({
url: '/pages/stockRecheck/sort?stock_out_id=' + this.list[0].stock_out_id + '&stock_out_sn=' + this.searchParams.stock_out_sn
});
}
}, 800);
});
} else {
this.input_flag = false;
}
......@@ -173,11 +178,12 @@
/**
* 获取列表数据
*/
getData() {
getData(callback) {
this.request(API.getToCheckList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
this.filter_list = createArray(this.list.length, false);
typeof callback == 'function' && callback(res.data.list, res.data.msg);
} else {
uni.showToast({
title: res.msg,
......@@ -222,6 +228,24 @@
});
}
});
},
/**
* 重置
*/
resetChange() {
this.filter_id = []; //清空选中状态
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
......@@ -13,7 +13,7 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" v-model="searchParams.stock_out_sn" @input="handleInput" />
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" v-model="searchParams.stock_out_sn" @input="handleInput" :focus="is_focus" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
......@@ -273,6 +273,7 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
company_id: uni.getStorageSync('company_id') || 1,
input_flag: false,
flag: false,
......@@ -422,8 +423,10 @@
* 清空数据
*/
clearInput() {
this.resetChange();
this.input_flag = false;
this.searchParams.stock_out_sn = '';
this.clearInputAndFocus();
this.getData();
},
/**
......@@ -611,6 +614,16 @@
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
......@@ -13,10 +13,10 @@
<view class="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.all_search_keyword" @input="handleInput" />
<input class="uni-input" placeholder="请输入查询" placeholder-style="color:#919399" focus="is_focus" v-model="searchParams.all_search_keyword" @input="handleInput" />
</template>
<template v-else-if="index == 1">
<input class="uni-input" placeholder="请输入旧标签查询" placeholder-style="color:#919399" focus v-model="searchParams.all_search_keyword" @input="handleInput" maxlength="8" />
<input class="uni-input" placeholder="请输入旧标签查询" placeholder-style="color:#919399" focus="is_focus" v-model="searchParams.all_search_keyword" @input="handleInput" maxlength="8" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......@@ -125,6 +125,7 @@
<text class="iconfont icon-a-juxing21"></text>
<text class="text">查不到当前数据</text>
</view>
<!-- 底部按钮操作栏 -->
<view class="fix-btn row verCenter">
<view class="btn1 row rowCenter verCenter" @click="allChnage()">
<text class="check-box-icon" :class="{ curr: filter_list.length > 0 && filter_list.length == filter_id.length }"></text>
......@@ -143,6 +144,7 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
index: 0,
array: ['全量搜索', '旧标签'],
input_flag: false,
......@@ -195,6 +197,7 @@
this.resetChange();
this.searchParams.all_search_keyword = '';
this.input_flag = false;
this.clearInputAndFocus();
this.getData();
},
/**
......@@ -295,8 +298,8 @@
});
setTimeout(() => {
this.resetChange();
this.filter_id = [];
this.getData();
this.clearInputAndFocus();
}, 2000);
} else {
uni.showModal({
......@@ -480,8 +483,19 @@
* 重置
*/
resetChange() {
this.filter_id = [];
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
<template>
<view class="picking">
<!-- 搜索部分 -->
<view class="search-box row bothSide verCenter">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
......@@ -12,11 +13,12 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描盘点单号" placeholder-style="color:#919399" @input="handleInput" v-model="searchParams.stocktake_sn" />
<input class="uni-input" placeholder="请扫描盘点单号" placeholder-style="color:#919399" @input="handleInput" v-model="searchParams.stocktake_sn" :focus="is_focus" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<!-- 列表 -->
<view class="list row bothSide" v-if="list.length > 0">
<view class="box" v-for="(item, index) in list" :key="index">
<view class="text-item row verCenter">
......@@ -36,7 +38,9 @@
<text class="label">创建时间:</text>
<text class="tt">{{ item.create_time }}</text>
</view>
<view class="btn-box row"><navigator class="btn row rowCenter verCenter" :url="'/pages/stocktake/operate?stocktake_id=' + item.stocktake_id + '&stocktake_sn=' + item.stocktake_sn">选择</navigator></view>
<view class="btn-box row">
<navigator class="btn row rowCenter verCenter" :url="'/pages/stocktake/operate?stocktake_id=' + item.stocktake_id + '&stocktake_sn=' + item.stocktake_sn">选择</navigator>
</view>
</view>
</view>
<!-- 无数据展示 -->
......@@ -48,78 +52,98 @@
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
input_flag: false,
index: 0,
page: 1,
limit: 1000,
array: ['盘点单号'],
list: [],
searchParams: {
stocktake_sn: ''
}
};
},
onShow() {
this.getData();
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.navigateTo({
url: '/pages/picking/me'
});
}
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 获取列表数据
*/
getData() {
this.request(API.getStocktakeList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
export default {
data() {
return {
input_flag: false,
index: 0,
page: 1,
limit: 1000,
array: ['盘点单号'],
list: [],
searchParams: {
stocktake_sn: ''
}
});
};
},
/**
* 清空数据
*/
clearInput() {
this.input_flag = false;
this.searchParams.stocktake_sn = '';
onShow() {
this.getData();
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
var val = event.target.value;
if (val) {
this.input_flag = true;
} else {
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.navigateTo({
url: '/pages/picking/me'
});
}
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 获取列表数据
*/
getData() {
this.request(API.getStocktakeList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
/**
* 清空数据
*/
clearInput() {
this.resetChange();
this.input_flag = false;
this.searchParams.stocktake_sn = '';
this.clearInputAndFocus(); //再次获取焦点
this.getData();
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
if (val) {
this.input_flag = true;
} else {
this.input_flag = false;
}
this.getData();
}, 500),
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
this.getData();
}, 500)
}
};
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/stocktake/list.scss';
</style>
@import '@/assets/css/stocktake/list.scss';
</style>
\ No newline at end of file
......@@ -14,7 +14,7 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入库位" placeholder-style="color:#919399" v-model="searchParams.position_code" @input="handleInput($event, 1)" focus />
<input class="uni-input" placeholder="请扫描或输入库位" placeholder-style="color:#919399" v-model="searchParams.position_code" @input="handleInput($event, 1)" :focus="is_focus" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag"></text>
</view>
......@@ -33,13 +33,13 @@
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<template v-if="index_batch_sn == 0">
<input class="uni-input" placeholder="请输入入库批次号" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event, 2)" :focus="is_focus" />
<input class="uni-input" placeholder="请输入入库批次号" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event, 2)" :focus="is_focus_batch_sn" />
</template>
<template v-else-if="index_batch_sn == 1">
<input class="uni-input" placeholder="请输入货品名称" placeholder-style="color:#919399" v-model="searchParams.goods_name" @input="handleInput($event, 2)" :focus="is_focus" />
<input class="uni-input" placeholder="请输入货品名称" placeholder-style="color:#919399" v-model="searchParams.goods_name" @input="handleInput($event, 2)" :focus="is_focus_batch_sn" />
</template>
<template v-else-if="index_batch_sn == 2">
<input class="uni-input" placeholder="请输入旧标签" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event, 2)" maxlength="8" :focus="is_focus" />
<input class="uni-input" placeholder="请输入旧标签" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event, 2)" maxlength="8" :focus="is_focus_batch_sn" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_stock_in_batch_sn"></text>
......@@ -208,6 +208,10 @@
<text class="label">盘点数量:</text>
<input type="number" placeholder="请输入盘点数量" class="uni-input" v-model="stocktake_qty" />
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">盘点备注:</text>
<input type="text" placeholder="请输入盘点备注" class="uni-input" v-model="remark" />
</view>
</view>
<view class="btn row rowCenter verCenter">
<view class="row btn1 row rowCenter verCenter" style="width:100%" @click="updateStocktakeItemQty()">确认</view>
......@@ -320,8 +324,9 @@
export default {
data() {
return {
is_focus: false, //获取焦点动态化
is_focus: true, //获取焦点动态化
input_flag: false, //库位
is_focus_batch_sn: false,
input_stock_in_batch_sn: false, //入库批次号
index: 0,
total: 0, //待盘点任务数
......@@ -333,6 +338,7 @@
array_batch_sn: ['入库批次号', '货品名称', '旧标签'],
index_batch_sn: 0,
stocktake_qty: '', //盘点数量
remark: '', //盘点备注
list: [],
page: 1,
limit: 50,
......@@ -494,9 +500,12 @@
*/
clearInput(type) {
if (type == 1) {
//库位
this.input_flag = false;
this.searchParams.position_code = '';
this.clearInputAndFocus(1);
} else if (type == 2) {
//入库批次号
this.input_stock_in_batch_sn = false;
if (this.index_batch_sn == 0 || this.index_batch_sn == 2) {
//入库批次号++旧标签
......@@ -505,6 +514,7 @@
//货品名称
this.searchParams.goods_name = '';
}
this.clearInputAndFocus(2);
}
this.getData();
},
......@@ -627,7 +637,7 @@
* 更新操作
*/
updateStocktakeItemQty() {
this.request(API.updateStocktakeItemQty, 'POST', { stocktake_items_id: this.detail.stocktake_items_id, stocktake_qty: this.stocktake_qty }, true).then(res => {
this.request(API.updateStocktakeItemQty, 'POST', { stocktake_items_id: this.detail.stocktake_items_id, stocktake_qty: this.stocktake_qty, remark: this.remark }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '操作成功',
......@@ -643,10 +653,7 @@
this.getData();
//入库批次号重新获取焦点
this.is_focus = false;
setTimeout(() => {
this.is_focus = true; //再次获取焦点
}, 500);
this.clearInputAndFocus(2);
}, 2000);
} else {
uni.showModal({
......@@ -664,6 +671,28 @@
this.list = [];
this.page = 1;
this.filter_id = [];
},
/**
* 再次获取焦点
*/
clearInputAndFocus(type) {
if (type == 1) {
//库位
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
} else if (type == 2) {
//入库批次号
this.input_stock_in_batch_sn = false; //关闭叉叉
this.is_focus_batch_sn = false;
setTimeout(() => {
this.is_focus_batch_sn = true;
}, 200);
}
}
}
};
......
......@@ -14,10 +14,13 @@
<view class="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.keyword" @input="handleInput" />
<input class="uni-input" placeholder="请输入查询" placeholder-style="color:#919399" focus v-model="searchParams.keyword" @input="handleInput($event,1)" :focus="is_focus" />
</template>
<template v-else-if="index == 1">
<input class="uni-input" placeholder="请输入旧标签查询" placeholder-style="color:#919399" focus v-model="searchParams.keyword" @input="handleInput" maxlength="8" />
<input class="uni-input" placeholder="请输入旧标签查询" placeholder-style="color:#919399" focus v-model="searchParams.keyword" @input="handleInput($event,1)" maxlength="8" :focus="is_focus" />
</template>
<template v-else-if="index == 2">
<input class="uni-input" placeholder="请输入货品名称" placeholder-style="color:#919399" focus v-model="searchParams.goods_name" @input="handleInput($event,2)" :focus="is_focus" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......@@ -96,6 +99,10 @@
<text class="tt">{{ item.stocktake_qty }}</text>
</view>
<view class="input-box row">
<text class="label">盘点备注:</text>
<text class="desc">{{ item.remark}}</text>
</view>
<view class="input-box row">
<text class="label">盘点人:</text>
<text class="tt">{{ item.stocktake_user }}</text>
</view>
......@@ -201,6 +208,10 @@
<text class="label">盘点数量:</text>
<input type="number" placeholder="请输入盘点数量" class="uni-input" v-model="stocktake_qty" />
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">盘点备注:</text>
<input type="text" placeholder="请输入盘点备注" class="uni-input" v-model="remark" />
</view>
</view>
<view class="bor"></view>
<view class="field-item row">
......@@ -307,9 +318,10 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
isZy: false, //区分是否是自营
index: 0,
array: ['全量搜索', '旧标签'],
array: ['全量搜索', '旧标签', '货品名称'],
noexebshowFalg: true, //控制是否会触发生命周期
input_flag: false,
page: 1,
......@@ -320,13 +332,15 @@
filter_list: [], //筛选已选中的列表
filter_id: [], //过滤处理的id
stocktake_qty: '', //盘点数量
remark: '', //盘点备注
tag_version: ['中文标签', '英文标签'],
tag_version_index: 0,
print_style: ['基本样式', '不带D/C'],
print_style_index: -1,
searchParams: {
stocktake_id: '',
keyword: ''
keyword: '',
goods_name: ''
},
formParams: {
stocktake_id: '',
......@@ -386,6 +400,8 @@
//详情
this.$refs.showRight.open();
this.detail = data;
this.remark = data.remark; //赋值盘点备注
//盘点数量
if (data.is_stocktake == 0) {
this.stocktake_qty = '';
} else {
......@@ -425,6 +441,7 @@
if (type == 1) {
//全量搜索
this.index = e.detail.value;
this.clearInputAndFocus();
} else if (type == 2) {
//补打入库标签
this.tag_version_index = e.detail.value;
......@@ -469,21 +486,31 @@
this.resetChange();
this.searchParams.keyword = '';
this.input_flag = false;
this.clearInputAndFocus(); //再次获取焦点
this.getData();
},
/**
* 全量搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
handleInput: debounce(function(event, type) {
this.resetChange();
var val = event.target.value;
this.searchParams.goods_name = '';
this.searchParams.keyword = '';
if (val) {
this.input_flag = true;
this.searchParams.keyword = val;
if (type == 1) {
//全量搜索 旧标签
this.input_flag = true;
this.searchParams.keyword = val;
} else if (type == 2) {
//货品名称
this.input_flag = true;
this.searchParams.goods_name = val;
}
} else {
this.input_flag = false;
this.searchParams.keyword = '';
}
this.getData();
}, 500),
......@@ -513,16 +540,18 @@
* 更新盘点数量
*/
updateStocktakeItemQty() {
this.request(API.updateStocktakeItemQty, 'POST', { stocktake_items_id: this.detail.stocktake_items_id, stocktake_qty: this.stocktake_qty }, true).then(res => {
this.request(API.updateStocktakeItemQty, 'POST', { stocktake_items_id: this.detail.stocktake_items_id, stocktake_qty: this.stocktake_qty, remark: this.remark }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success'
});
setTimeout(() => {
this.searchParams.keyword = '';
this.resetChange();
this.getData();
this.closeDrawer();
this.clearInputAndFocus();
}, 2000);
} else {
uni.showModal({
......@@ -575,6 +604,16 @@
this.list = [];
this.page = 1;
this.filter_id = [];
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
<template>
<view class="tallyReceive">
<!-- 搜索部分 -->
<view class="search-box row bothSide verCenter" style="margin-bottom: 20rpx;">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
......@@ -13,25 +14,25 @@
<view class="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_wait_tally_all_search" @input="handleInput(1, $event)" />
<input class="uni-input" placeholder="请扫描或输入查询" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.mobile_wait_tally_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="8" />
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" maxlength="8" />
</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(0, $event)" style="width: 400rpx;" />
<input class="uni-input" placeholder="请输入FedEx" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.tracking_no" @input="handleInput(0, $event)" style="width: 400rpx;" />
</template>
<template v-else-if="index == 3">
<input class="uni-input" placeholder="请输入DigKey" placeholder-style="color:#919399" focus v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 400rpx;" />
<input class="uni-input" placeholder="请输入DigKey" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 400rpx;" />
</template>
<template v-else-if="index == 4">
<input class="uni-input" placeholder="请输入Rochester" placeholder-style="color:#919399" focus v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 400rpx;" />
<input class="uni-input" placeholder="请输入Rochester" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 400rpx;" />
</template>
<template v-else-if="index == 5">
<input class="uni-input" placeholder="请输入TME" placeholder-style="color:#919399" focus v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 400rpx;" />
<input class="uni-input" placeholder="请输入TME" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 400rpx;" />
</template>
<template v-else-if="index == 6">
<input class="uni-input" placeholder="请输入Chip1stop" placeholder-style="color:#919399" focus v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 400rpx;" />
<input class="uni-input" placeholder="请输入Chip1stop" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 400rpx;" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag"></text>
......@@ -51,6 +52,7 @@
</view>
</view>
</view>
<!-- 列表 -->
<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="is-watch row rowCenter verCenter" v-if="item.is_watch == 1">看货</view>
......@@ -202,6 +204,7 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
timer: null, // 用于存储计时器
is_submit: true,
noexebshowFalg: true, //控制是否会触发生命周期
......@@ -349,7 +352,6 @@
clearInput(type) {
this.resetChange();
if (type == 1) {
this.input_flag = false;
if (this.index == 0) {
//清空全量搜索
this.searchParams.mobile_wait_tally_all_search = '';
......@@ -376,6 +378,8 @@
this.searchParams.code_type = '';
this.searchParams.goods_name = '';
}
this.input_flag = false;
this.clearInputAndFocus(); //再次获取焦点
} else {
//容器以及一键理货里面的容器
this.input_contaion = false;
......@@ -484,6 +488,7 @@
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
this.clearInputAndFocus();
},
//设置默认的容器
getTallyContainerDefault() {
......@@ -614,10 +619,10 @@
icon: 'success'
});
setTimeout(() => {
this.filter_id = []; //清空选中状态
this.resetChange();
this.getData();
this.closeDrawer();
this.clearInputAndFocus(); //再次获取焦点
}, 2000);
} else {
uni.showModal({
......@@ -759,8 +764,19 @@
* 重置
*/
resetChange() {
this.filter_id = []; //清空选中状态
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
<template>
<view class="tallyReceive">
<!-- 搜索部分 -->
<view class="search-box row bothSide verCenter" style="margin-bottom: 20rpx;">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
......@@ -13,13 +14,13 @@
<view class="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.tracking_no" @input="handleInput(1, $event)" />
<input class="uni-input" placeholder="请输入物流单号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.tracking_no" @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_sn" @input="handleInput(2, $event)" />
<input class="uni-input" placeholder="请输入入库单号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_in_sn" @input="handleInput(2, $event)" />
</template>
<template v-else-if="index == 2">
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(3, $event)" maxlength="7" />
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(3, $event)" maxlength="7" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag"></text>
......@@ -39,6 +40,7 @@
</view>
</view>
</view>
<!-- 详情 -->
<view class="section">
<view class="field-item row" v-if="detail">
<view class="is-watch row rowCenter verCenter" v-if="is_watch">看货</view>
......@@ -290,6 +292,7 @@
</view>
</template>
</view>
<!-- 底部操作栏 -->
<view class="fix-btn row verCenter">
<!--区分深圳自营和非深圳自营-->
<template v-if="warehouse_id == 9">
......@@ -325,6 +328,7 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
is_watch: false, //是否看货
is_print: false, //查询该销售单是否需要打印客户标签
coo: '', //产地
......@@ -334,8 +338,8 @@
noexebshowFalg: true, //控制是否会触发生命周期
print_flag: true, //是否打印
pic_flag: false, //是否整单照片
input_flag: true,
input_contaion: true,
input_flag: false,
input_contaion: false,
company_id: uni.getStorageSync('company_id') || 1, //公司组织
page: 1,
limit: 1,
......@@ -462,7 +466,7 @@
*/
clearInput(type) {
if (type == 1) {
this.input_flag = false;
//搜索部分清空
if (this.index == 0) {
this.searchParams.tracking_no = '';
} else if (this.index == 1) {
......@@ -470,8 +474,11 @@
} else if (this.index == 2) {
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
}
this.input_flag = false;
this.stock_in_item_id = this.detail.stock_in_item_id;
this.clearInputAndFocus(); //再次获取焦点
} else {
//容器以及一键理货里面的容器
this.input_contaion = false;
this.searchParams.container_name = '';
this.searchParams.container_id = '';
......@@ -510,6 +517,7 @@
var val = event.target.value;
if (val) {
if (type == 1) {
//物流单号
this.searchParams.tracking_no = '';
this.searchParams.stock_in_sn = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
......@@ -518,6 +526,7 @@
this.input_flag = true;
this.getData();
} else if (type == 2) {
//入库单号
this.searchParams.tracking_no = '';
this.searchParams.stock_in_sn = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
......@@ -526,6 +535,7 @@
this.input_flag = true;
this.getData();
} else if (type == 3) {
//fedex
this.searchParams.tracking_no = '';
this.searchParams.stock_in_sn = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
......@@ -534,6 +544,7 @@
this.input_flag = true;
this.getData();
} else if (type == 4) {
//容器
this.searchParams.container_name = val;
this.input_contaion = true;
this.getTallyContainer();
......@@ -847,6 +858,16 @@
},
closeDrawer() {
this.$refs.showRight.close();
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
......@@ -31,10 +31,10 @@
<view class="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_have_tally_all_search" @input="handleInput(1, $event)" />
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.mobile_have_tally_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)" />
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......@@ -407,6 +407,7 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
page: 1,
limit: 50, //分页限制数量
input_flag: false,
......@@ -548,6 +549,7 @@
} else {
//全量搜索
this.index = e.detail.value;
this.clearInputAndFocus();
}
},
/**
......@@ -638,12 +640,13 @@
this.searchParams.create_time_end = '';
} else {
this.resetChange();
this.input_flag = false;
if (this.index == 0) {
this.searchParams.mobile_have_tally_all_search = '';
} else if (this.index == 1) {
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
}
this.input_flag = false;
this.clearInputAndFocus(); //再次获取焦点
this.getData();
}
},
......@@ -972,6 +975,16 @@
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
......@@ -12,7 +12,7 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" focus v-model="searchParams.transfer_sn" @input="handleInput" />
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.transfer_sn" @input="handleInput" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
......@@ -40,7 +40,9 @@
<text class="label">创建时间:</text>
<text class="tt">{{ item.create_time }}</text>
</view>
<navigator class="btn-box row" :url="'/pages/transfer/task?transfer_id=' + item.transfer_id + '&transfer_sn=' + item.transfer_sn" hover-class="none"><view class="btn row rowCenter verCenter">选择</view></navigator>
<navigator class="btn-box row" :url="'/pages/transfer/task?transfer_id=' + item.transfer_id + '&transfer_sn=' + item.transfer_sn" hover-class="none">
<view class="btn row rowCenter verCenter">选择</view>
</navigator>
</view>
</view>
<!-- 无数据展示 -->
......@@ -52,80 +54,102 @@
</template>
<script>
import { API } from '@/util/api.js';
import { createArray } from '@/util/util.js';
import debounce from 'lodash/debounce';
import { API } from '@/util/api.js';
import { createArray } from '@/util/util.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
input_flag: false,
page: 1,
limit: 1000,
index: 0,
array: ['移位单号'],
list: [],
searchParams: {
transfer_sn: '' //移位单号
}
};
},
onShow() {
this.getData();
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
export default {
data() {
return {
is_focus: true, //获取焦点动态化
input_flag: false,
page: 1,
limit: 1000,
index: 0,
array: ['移位单号'],
list: [],
searchParams: {
transfer_sn: '' //移位单号
}
};
},
onShow() {
this.getData();
},
/**
* 获取列表数据
*/
getData() {
this.request(API.getTransferList, 'GET', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 获取列表数据
*/
getData() {
this.request(API.getTransferList, 'GET', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
if (val) {
this.input_flag = true;
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
this.input_flag = false;
}
});
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
var val = event.target.value;
if (val) {
this.input_flag = true;
} else {
this.getData();
}, 500),
/**
* 筛选过滤出选中的元素
*/
filterChange(index) {
this.$set(this.filter_list, index, (this.filter_list[index] = !this.filter_list[index]));
let filter_arr = this.findIndex(this.filter_list, true);
this.filter_id = filter_arr.map(i => this.list[i].stock_in_id);
},
/**
* 清空数据
*/
clearInput() {
this.resetChange();
this.input_flag = false;
this.searchParams.transfer_sn = '';
this.clearInputAndFocus();
this.getData();
},
/**
* 重置
*/
resetChange() {
this.filter_id = []; //清空选中状态
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
this.getData();
}, 500),
/**
* 筛选过滤出选中的元素
*/
filterChange(index) {
this.$set(this.filter_list, index, (this.filter_list[index] = !this.filter_list[index]));
let filter_arr = this.findIndex(this.filter_list, true);
this.filter_id = filter_arr.map(i => this.list[i].stock_in_id);
},
/**
* 清空数据
*/
clearInput() {
this.input_flag = false;
this.searchParams.transfer_sn = '';
this.getData();
}
}
};
};
</script>
<style scoped lang="scss">
@import '@/assets/css/transfer/index.scss';
</style>
@import '@/assets/css/transfer/index.scss';
</style>
\ No newline at end of file
......@@ -398,7 +398,18 @@
this.input_flag = false;
this.searchParams.stock_in_batch_sn = '';
this.list = [];
this.clearInputAndFocus();
}
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
<template>
<view class="stockRecheck-record">
<!-- 搜索部分 -->
<view class="search-box row bothSide verCenter">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
......@@ -13,15 +14,16 @@
<view class="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.search_val" @input="handleInput" />
<input class="uni-input" placeholder="请输入查询" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.search_val" @input="handleInput" />
</template>
<template v-else-if="index == 1">
<input class="uni-input" placeholder="请输入旧标签查询" placeholder-style="color:#919399" focus v-model="searchParams.search_val" @input="handleInput" maxlength="8" />
<input class="uni-input" placeholder="请输入旧标签查询" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.search_val" @input="handleInput" maxlength="8" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<!-- 列表 -->
<view class="list" v-if="list.length > 0">
<view class="box row" v-for="(item, index) in list" :key="index">
<view class="input-box row verCenter">
......@@ -133,6 +135,7 @@
export default {
data() {
return {
is_focus: true, //获取焦点动态化
index: 0,
array: ['全量搜索', '旧标签'],
input_flag: false,
......@@ -174,6 +177,7 @@
this.resetChange();
this.searchParams.search_val = '';
this.input_flag = false;
this.clearInputAndFocus(); //再次获取焦点
this.getData();
},
/**
......@@ -218,6 +222,16 @@
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
......
// const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
// const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
// const API_BASE = 'http://wms.liexindev.net'; //WMS系统
// const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
const API_BASE = 'http://wms.liexindev.net'; //WMS系统
const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
const API_BASE = 'https://wms.ichunt.net'; //WMS系统
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
// const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
// const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
// const API_BASE = 'https://wms.ichunt.net'; //WMS系统
// const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API = {
......
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