Commit b52ca95f by LJM

移动端--自营仓相关入库批次号扫描处增加截取部分文本功能

parent 7fa92228
......@@ -33,7 +33,7 @@
.search-type {
margin-bottom: 15rpx;
.search-bar {
width: 345rpx;
width: 100%;
height: 60rpx;
padding-right: 17rpx;
background: #ffffff;
......@@ -57,6 +57,14 @@
font-size: 18rpx;
color: #292b33;
font-weight: bold;
white-space: nowrap;
}
.custom-switch {
width: 74rpx;
transform: scale(0.5);
}
.android-switch {
transform: scale(0.7);
}
}
.list {
......
......@@ -33,7 +33,7 @@
.search-type {
margin-bottom: 15rpx;
.search-bar {
width: 345rpx;
width: 100%;
height: 60rpx;
padding-right: 17rpx;
background: #ffffff;
......@@ -65,6 +65,7 @@
.title {
font-size: 18rpx;
color: #292b33;
white-space: nowrap;
font-weight: bold;
}
.info {
......@@ -72,6 +73,13 @@
font-size: 22rpx;
margin-right: 16rpx;
}
.custom-switch {
width: 74rpx;
transform: scale(0.5);
}
.android-switch {
transform: scale(0.7);
}
}
}
.fix-btn {
......
......@@ -5,7 +5,7 @@
</view>
<view class="picking-sort-wrap">
<view class="search-type row bothSide verCenter">
<view class="left">
<view class="left" style="width: 49%;">
<view class="title row verCenter" style="height: 45rpx;">库 位:</view>
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
......@@ -15,12 +15,16 @@
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag_position_name"></text>
</view>
</view>
<view class="right">
<view class="right" style="width: 49%;">
<template v-if="curr == 0">
<view class="row bothSide verCenter" style="height: 45rpx;">
<view class="title">入库批次号:</view>
<view class="row verCenter">
<switch @change="switchChange" :checked="is_batch" color="#1969f9" style="transform:scale(0.7);width: 77rpx;" />
<view class="title rpw">入库批次号:</view>
<view class="row verCenter rowCenter">
<template v-if="warehouse_id == 9">
<switch @change="switchChange($event,1)" :checked="old_Label" color="#1969f9" :class="isApp ? 'android-switch' : 'custom-switch'" />
<text style="font-size: 18rpx;white-space: nowrap;">旧标签</text>
</template>
<switch @change="switchChange" :checked="is_batch" color="#1969f9" :class="isApp ? 'android-switch' : 'custom-switch'" />
<text style="font-size: 18rpx;white-space: nowrap;">批量扫描</text>
</view>
</view>
......@@ -533,6 +537,8 @@
export default {
data() {
return {
isApp: uni.getSystemInfoSync().platform === 'android' || uni.getSystemInfoSync().platform === 'ios',
old_Label: false, //旧标签默认false
isFocus: false,
is_batch: true, //是否开启批量
is_batch_active: false, //是否开启批量激活s
......@@ -589,6 +595,11 @@
this.stock_out_sn = options.stock_out_sn || '';
this.searchParams.stock_out_id = options.stock_out_id || '';
this.warehouse_id = options.warehouse_id || '';
//深圳自营仓-默认选择旧标签
if (this.warehouse_id == 9) {
this.old_Label = true;
}
},
onShow() {
if (this.noexebshowFalg) {
......@@ -606,23 +617,26 @@
this.rePrintTagParams.print_type = e.detail.value;
},
/**
* 批量扫描监听
* @param {Object} e
* @param {Object} type 1旧标签 批量扫描监听
*/
switchChange(e) {
switchChange(e, type) {
console.log('switch 发生 change 事件,携带值为', e.detail.value);
this.is_batch = e.detail.value;
//重置相关数据
this.history_id = [];
this.list = [];
this.page = 1;
this.filter_id = [];
this.is_batch_active = false;
if (type == 1) {
this.search_keyword = '';
this.searchParams.stock_in_batch_sn = '';
} else {
this.is_batch = e.detail.value;
//重置相关数据
this.history_id = [];
this.list = [];
this.page = 1;
this.filter_id = [];
this.is_batch_active = false;
this.search_keyword = '';
this.searchParams.stock_in_batch_sn = '';
this.getData();
}
this.getData();
},
/**
* 单号搜索
......@@ -1009,8 +1023,15 @@
title: this.stock_out_sn + '拣货'
});
//入库批次号为自营仓库的时候,输入文本后自动截取前8位,作为入库批次号传给后台进行校验。
if (this.warehouse_id == 9 && this.old_Label) {
this.searchParams.stock_in_batch_sn = this.searchParams.stock_in_batch_sn.substring(0, 8);
}
this.request(URL, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
//过滤出应拣数量不为0的数据
if (this.curr == 0) {
var filteredList = res.data.list.filter(item => item.lock_qty - item.pick_qty > 0);
......
......@@ -12,7 +12,12 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" v-model="formParams.sn" placeholder="请输入入库标签" placeholder-style="color:#919399" @input="handleInput(1, formParams.sn)" maxlength="15" />
<template v-if="index == 0">
<input class="uni-input" v-model="formParams.sn" placeholder="请输入入库标签" placeholder-style="color:#919399" @input="handleInput(1, formParams.sn)" maxlength="15" />
</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" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag"></text>
</view>
......@@ -121,27 +126,7 @@
print_language: ['中文', '英文'],
print_type: ['基本样式', '不带D/C'],
print_type_index: 0,
labelStyles: [{
id: 5,
name: '入库标签'
},
{
id: 1,
name: '库位标签'
},
{
id: 2,
name: '库区标签'
},
{
id: 3,
name: '区域标签'
},
{
id: 4,
name: '容器标签'
}
],
labelStyles: [{ id: 5, name: '入库标签' }, { id: 5, name: '旧标签' }, { id: 1, name: '库位标签' }, { id: 2, name: '库区标签' }, { id: 3, name: '区域标签' }, { id: 4, name: '容器标签' }],
warehouse_arr: [],
warehouse_index: 0,
formParams: {
......@@ -212,6 +197,7 @@
this.print_type_index = e.detail.value;
this.formParams.print_type = Number(e.detail.value) + 1;
} else {
//入库标签 旧标签 容器标签 库位标签 库区标签 区域标签
this.index = e.detail.value;
this.formParams.type = this.labelStyles[e.detail.value].id;
}
......
......@@ -5,7 +5,7 @@
</view>
<view class="picking-sort-wrap">
<view class="search-type row bothSide verCenter">
<view class="left">
<view class="left" style="width: 49%;">
<view class="box-info row bothSide verCenter">
<view class="title row bothSide verCenter">打包箱号:</view>
<view class="info" @click="showBox()">箱信息</view>
......@@ -21,12 +21,16 @@
</view>
</view>
</view>
<view class="right">
<view class="right" style="width: 49%;">
<template v-if="curr == 0">
<view class="box-info row bothSide verCenter">
<view class="title">入库批次号:</view>
<view class="row verCenter">
<switch @change="switchChange" :checked="is_batch" color="#1969f9" style="transform:scale(0.7);width: 77rpx;" />
<template v-if="warehouse_id == 9">
<switch @change="switchChange($event,1)" :checked="old_Label" color="#1969f9" :class="isApp ? 'android-switch' : 'custom-switch'" />
<text style="font-size: 18rpx;white-space: nowrap;">旧标签</text>
</template>
<switch @change="switchChange" :checked="is_batch" color="#1969f9" :class="isApp ? 'android-switch' : 'custom-switch'" />
<text style="font-size: 18rpx;white-space: nowrap;">批量扫描</text>
</view>
</view>
......@@ -500,10 +504,6 @@
</scroll-view>
</view>
<view class="btn row verCenter bothSide">
<!-- <view class="btn2 row rowCenter verCenter">
<text class="check-box-icon curr"></text>
<text class="text">打印客户专属标签</text>
</view> -->
<view class="btn1 row rowCenter verCenter" style="width: 100%;" @click="multiMarkChecked()">复 核</view>
</view>
</view>
......@@ -554,10 +554,6 @@
</template>
<view class="default row rowCenter verCenter" @click="chooseImageChange()" v-if="image_list.length < maxNum"><text class="iconfont icon-a-juxing3"></text></view>
</view>
<!-- <view class="print row verCenter">
<text class="check-box-icon curr"></text>
<text class="tt">打印客户专属标签</text>
</view> -->
<view class="btn row verCenter bothSide">
<view class="btn0 row rowCenter verCenter" @click="closeDrawer(0)">取 消</view>
<view class="btn1 row rowCenter verCenter" style="width: 50%;" @click="multiMarkChecked">一键复核</view>
......@@ -623,6 +619,8 @@
export default {
data() {
return {
isApp: uni.getSystemInfoSync().platform === 'android' || uni.getSystemInfoSync().platform === 'ios',
old_Label: false, //旧标签默认false
isFocus: true,
is_batch: true, //是否开启批量
history_id: [], //批量记录id
......@@ -682,6 +680,10 @@
this.searchParams.stock_out_id = options.stock_out_id || '';
this.warehouse_id = options.warehouse_id || '';
this.stock_out_sn = options.stock_out_sn || '';
//深圳自营仓-默认选择旧标签
if (this.warehouse_id == 9) {
this.old_Label = true;
}
},
onShow() {
if (this.noexebshowFalg) {
......@@ -690,28 +692,31 @@
},
methods: {
/**
* 批量扫描监听
* @param {Object} e
* @param {Object} type 1旧标签 批量扫描监听
*/
switchChange(e) {
console.log('switch 发生 change 事件,携带值为', e.detail.value);
this.is_batch = e.detail.value;
//重置相关数据
this.history_id = [];
this.list = [];
this.page = 1;
this.filter_id = [];
if (type == 1) {
this.search_keyword = '';
this.searchParams.stock_in_batch_sn = '';
} else {
this.is_batch = e.detail.value;
//重置相关数据
this.history_id = [];
this.list = [];
this.page = 1;
this.filter_id = [];
//再次获取焦点
this.isFocus = false;
setTimeout(() => {
this.isFocus = true;
}, 1000);
this.search_keyword = '';
this.searchParams.stock_in_batch_sn = '';
this.getData();
//再次获取焦点
this.isFocus = false;
setTimeout(() => {
this.isFocus = true;
}, 1000);
this.getData();
}
},
/**
* 打印货品标签样式切换监听
......@@ -1111,6 +1116,12 @@
uni.setNavigationBarTitle({
title: this.stock_out_sn + '复核'
});
//入库批次号为自营仓库的时候,输入文本后自动截取前8位,作为入库批次号传给后台进行校验。
if (this.warehouse_id == 9 && this.old_Label) {
this.searchParams.stock_in_batch_sn = this.searchParams.stock_in_batch_sn.substring(0, 8);
}
this.request(URL, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
//过滤出待复核不为0的数据
......
......@@ -12,7 +12,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" :focus="is_focus" bindfocus="onFocus" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event)" />
<template v-if="index == 0">
<input class="uni-input" placeholder="请扫描入库批次号" placeholder-style="color:#919399" :focus="is_focus" bindfocus="onFocus" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event)" />
</template>
<template v-else-if="index == 1">
<input class="uni-input" placeholder="请输入旧标签查询" placeholder-style="color:#919399" :focus="is_focus" bindfocus="onFocus" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event)" maxlength="8" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
......@@ -244,7 +249,7 @@
page: 1,
limit: 1000,
index: 0,
array: ['入库批次号'],
array: ['入库批次号', '旧标签'],
list: [],
searchParams: {
stock_in_batch_sn: '' //入库批次号
......
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