Commit b52ca95f by LJM

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

parent 7fa92228
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
.search-type { .search-type {
margin-bottom: 15rpx; margin-bottom: 15rpx;
.search-bar { .search-bar {
width: 345rpx; width: 100%;
height: 60rpx; height: 60rpx;
padding-right: 17rpx; padding-right: 17rpx;
background: #ffffff; background: #ffffff;
...@@ -57,6 +57,14 @@ ...@@ -57,6 +57,14 @@
font-size: 18rpx; font-size: 18rpx;
color: #292b33; color: #292b33;
font-weight: bold; font-weight: bold;
white-space: nowrap;
}
.custom-switch {
width: 74rpx;
transform: scale(0.5);
}
.android-switch {
transform: scale(0.7);
} }
} }
.list { .list {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
.search-type { .search-type {
margin-bottom: 15rpx; margin-bottom: 15rpx;
.search-bar { .search-bar {
width: 345rpx; width: 100%;
height: 60rpx; height: 60rpx;
padding-right: 17rpx; padding-right: 17rpx;
background: #ffffff; background: #ffffff;
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
.title { .title {
font-size: 18rpx; font-size: 18rpx;
color: #292b33; color: #292b33;
white-space: nowrap;
font-weight: bold; font-weight: bold;
} }
.info { .info {
...@@ -72,6 +73,13 @@ ...@@ -72,6 +73,13 @@
font-size: 22rpx; font-size: 22rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
.custom-switch {
width: 74rpx;
transform: scale(0.5);
}
.android-switch {
transform: scale(0.7);
}
} }
} }
.fix-btn { .fix-btn {
......
<template> <template>
<view class="immediatelyStockIn"> <view class="immediatelyStockIn">
<view class="form-input row verCenter"> <view class="form-input row verCenter">
<text class="text row verCenter">入库批次号</text> <view class="pick-box">
<picker @change="bindPickerChange($event, 2)" :value="index" :range="item_1">
<view class="row verCenter">
<view class="uni-input">{{ item_1[index_1] }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view>
<view class="row bothSide verCenter input-wrap"> <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)" />
</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" />
</template>
<text class="iconfont icon-a-juxing11" @click="clearInput(4)" v-if="input_stock_in_batch_sn"></text> <text class="iconfont icon-a-juxing11" @click="clearInput(4)" v-if="input_stock_in_batch_sn"></text>
</view> </view>
</view> </view>
...@@ -56,15 +68,17 @@ ...@@ -56,15 +68,17 @@
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
export default { export default {
data() { data() {
return { return {
is_submit: true, is_submit: true,
index: 0, index: 0,
item: ['货品编码', '自营货品ID'], item: ['货品编码', '自营货品ID'],
item_1: ['入库批次号', '旧标签'],
index_1: 0,
input_stock_in_batch_sn: false, input_stock_in_batch_sn: false,
input_goods_sn: false, input_goods_sn: false,
input_goods_name: false, input_goods_name: false,
...@@ -86,6 +100,10 @@ export default { ...@@ -86,6 +100,10 @@ export default {
this.getData(); this.getData();
}, },
methods: { methods: {
/**
* @param {Object} e
* @param {Object} type 1(货品编码,sku_id) 2(入库批次号,旧标签)
*/
bindPickerChange: function(e, type) { bindPickerChange: function(e, type) {
if (type == 1) { if (type == 1) {
this.index = e.detail.value; this.index = e.detail.value;
...@@ -94,6 +112,8 @@ export default { ...@@ -94,6 +112,8 @@ export default {
} else if (this.index == 1) { } else if (this.index == 1) {
this.formParams.goods_sn = ''; this.formParams.goods_sn = '';
} }
} else if (type == 2) {
this.index_1 = e.detail.value;
} else { } else {
this.warehouse_id_index = e.detail.value; this.warehouse_id_index = e.detail.value;
this.formParams.warehouse_id = this.warehouse_id_data[e.detail.value].value; this.formParams.warehouse_id = this.warehouse_id_data[e.detail.value].value;
...@@ -202,9 +222,9 @@ export default { ...@@ -202,9 +222,9 @@ export default {
}); });
} }
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/immediatelyStockIn/index.scss'; @import '@/assets/css/immediatelyStockIn/index.scss';
</style> </style>
\ No newline at end of file
...@@ -12,7 +12,12 @@ ...@@ -12,7 +12,12 @@
<view class="search-bar row bothSide verCenter"> <view class="search-bar row bothSide verCenter">
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <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 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" />
</template>
</view> </view>
<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>
...@@ -99,7 +104,9 @@ ...@@ -99,7 +104,9 @@
</view> </view>
<view class="input-box row" style="flex: 0 0 100%;"> <view class="input-box row" style="flex: 0 0 100%;">
<text class="label">拣货照片:</text> <text class="label">拣货照片:</text>
<view class="pick_img_list row"><image :lazy-load="true" @click="previewChange(item.pick_img_list, i)" class="img_list" :src="v.small_image_url" v-for="(v, i) in item.pick_img_list" :key="i" mode="aspectFill"></image></view> <view class="pick_img_list row">
<image :lazy-load="true" @click="previewChange(item.pick_img_list, i)" class="img_list" :src="v.small_image_url" v-for="(v, i) in item.pick_img_list" :key="i" mode="aspectFill"></image>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -119,15 +126,15 @@ ...@@ -119,15 +126,15 @@
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
import { createArray } from '@/util/util.js'; import { createArray } from '@/util/util.js';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
export default { export default {
data() { data() {
return { return {
index: 0, index: 0,
array: ['全量搜索'], array: ['全量搜索', '旧标签'],
noexebshowFalg: true, //控制是否会触发生命周期 noexebshowFalg: true, //控制是否会触发生命周期
input_flag: false, input_flag: false,
all_flag: false, //全选标记 all_flag: false, //全选标记
...@@ -314,9 +321,9 @@ export default { ...@@ -314,9 +321,9 @@ export default {
this.page = 1; this.page = 1;
} }
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/picking/record.scss'; @import '@/assets/css/picking/record.scss';
</style> </style>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</view> </view>
<view class="picking-sort-wrap"> <view class="picking-sort-wrap">
<view class="search-type row bothSide verCenter"> <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="title row verCenter" style="height: 45rpx;">库 位:</view>
<view class="search-bar row bothSide verCenter"> <view class="search-bar row bothSide verCenter">
<view class="row verCenter"> <view class="row verCenter">
...@@ -15,12 +15,16 @@ ...@@ -15,12 +15,16 @@
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag_position_name"></text> <text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag_position_name"></text>
</view> </view>
</view> </view>
<view class="right"> <view class="right" style="width: 49%;">
<template v-if="curr == 0"> <template v-if="curr == 0">
<view class="row bothSide verCenter" style="height: 45rpx;"> <view class="row bothSide verCenter" style="height: 45rpx;">
<view class="title">入库批次号:</view> <view class="title rpw">入库批次号:</view>
<view class="row verCenter"> <view class="row verCenter rowCenter">
<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> <text style="font-size: 18rpx;white-space: nowrap;">批量扫描</text>
</view> </view>
</view> </view>
...@@ -533,6 +537,8 @@ ...@@ -533,6 +537,8 @@
export default { export default {
data() { data() {
return { return {
isApp: uni.getSystemInfoSync().platform === 'android' || uni.getSystemInfoSync().platform === 'ios',
old_Label: false, //旧标签默认false
isFocus: false, isFocus: false,
is_batch: true, //是否开启批量 is_batch: true, //是否开启批量
is_batch_active: false, //是否开启批量激活s is_batch_active: false, //是否开启批量激活s
...@@ -589,6 +595,11 @@ ...@@ -589,6 +595,11 @@
this.stock_out_sn = options.stock_out_sn || ''; this.stock_out_sn = options.stock_out_sn || '';
this.searchParams.stock_out_id = options.stock_out_id || ''; this.searchParams.stock_out_id = options.stock_out_id || '';
this.warehouse_id = options.warehouse_id || ''; this.warehouse_id = options.warehouse_id || '';
//深圳自营仓-默认选择旧标签
if (this.warehouse_id == 9) {
this.old_Label = true;
}
}, },
onShow() { onShow() {
if (this.noexebshowFalg) { if (this.noexebshowFalg) {
...@@ -606,11 +617,14 @@ ...@@ -606,11 +617,14 @@
this.rePrintTagParams.print_type = e.detail.value; this.rePrintTagParams.print_type = e.detail.value;
}, },
/** /**
* 批量扫描监听
* @param {Object} e * @param {Object} e
* @param {Object} type 1旧标签 批量扫描监听
*/ */
switchChange(e) { switchChange(e, type) {
console.log('switch 发生 change 事件,携带值为', e.detail.value); console.log('switch 发生 change 事件,携带值为', e.detail.value);
if (type == 1) {
} else {
this.is_batch = e.detail.value; this.is_batch = e.detail.value;
//重置相关数据 //重置相关数据
this.history_id = []; this.history_id = [];
...@@ -618,11 +632,11 @@ ...@@ -618,11 +632,11 @@
this.page = 1; this.page = 1;
this.filter_id = []; this.filter_id = [];
this.is_batch_active = false; this.is_batch_active = false;
this.search_keyword = ''; this.search_keyword = '';
this.searchParams.stock_in_batch_sn = ''; this.searchParams.stock_in_batch_sn = '';
this.getData(); this.getData();
}
}, },
/** /**
* 单号搜索 * 单号搜索
...@@ -1009,8 +1023,15 @@ ...@@ -1009,8 +1023,15 @@
title: this.stock_out_sn + '拣货' 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 => { this.request(URL, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
//过滤出应拣数量不为0的数据 //过滤出应拣数量不为0的数据
if (this.curr == 0) { if (this.curr == 0) {
var filteredList = res.data.list.filter(item => item.lock_qty - item.pick_qty > 0); var filteredList = res.data.list.filter(item => item.lock_qty - item.pick_qty > 0);
......
...@@ -12,7 +12,12 @@ ...@@ -12,7 +12,12 @@
<view class="search-bar row bothSide verCenter"> <view class="search-bar row bothSide verCenter">
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <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="15" /> <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> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag"></text> <text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag"></text>
</view> </view>
...@@ -121,27 +126,7 @@ ...@@ -121,27 +126,7 @@
print_language: ['中文', '英文'], print_language: ['中文', '英文'],
print_type: ['基本样式', '不带D/C'], print_type: ['基本样式', '不带D/C'],
print_type_index: 0, print_type_index: 0,
labelStyles: [{ labelStyles: [{ id: 5, name: '入库标签' }, { id: 5, name: '旧标签' }, { id: 1, name: '库位标签' }, { id: 2, name: '库区标签' }, { id: 3, name: '区域标签' }, { id: 4, name: '容器标签' }],
id: 5,
name: '入库标签'
},
{
id: 1,
name: '库位标签'
},
{
id: 2,
name: '库区标签'
},
{
id: 3,
name: '区域标签'
},
{
id: 4,
name: '容器标签'
}
],
warehouse_arr: [], warehouse_arr: [],
warehouse_index: 0, warehouse_index: 0,
formParams: { formParams: {
...@@ -212,6 +197,7 @@ ...@@ -212,6 +197,7 @@
this.print_type_index = e.detail.value; this.print_type_index = e.detail.value;
this.formParams.print_type = Number(e.detail.value) + 1; this.formParams.print_type = Number(e.detail.value) + 1;
} else { } else {
//入库标签 旧标签 容器标签 库位标签 库区标签 区域标签
this.index = e.detail.value; this.index = e.detail.value;
this.formParams.type = this.labelStyles[e.detail.value].id; this.formParams.type = this.labelStyles[e.detail.value].id;
} }
......
...@@ -12,7 +12,12 @@ ...@@ -12,7 +12,12 @@
<view class="search-bar row bothSide verCenter"> <view class="search-bar row bothSide verCenter">
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <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 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" />
</template>
</view> </view>
<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>
...@@ -90,7 +95,9 @@ ...@@ -90,7 +95,9 @@
</view> </view>
<view class="input-box row" style="flex: 0 0 100%;"> <view class="input-box row" style="flex: 0 0 100%;">
<text class="label">复核照片:</text> <text class="label">复核照片:</text>
<view class="pick_img_list row"><image @click="previewChange(item.recheck_img_list, i)" class="img_list" :src="v.small_image_url" v-for="(v, i) in item.recheck_img_list" :key="i" mode="aspectFill"></image></view> <view class="pick_img_list row">
<image @click="previewChange(item.recheck_img_list, i)" class="img_list" :src="v.small_image_url" v-for="(v, i) in item.recheck_img_list" :key="i" mode="aspectFill"></image>
</view>
</view> </view>
<view class="input-box row" style="flex: 0 0 100%;"> <view class="input-box row" style="flex: 0 0 100%;">
<text class="label">主单仓库备注:</text> <text class="label">主单仓库备注:</text>
...@@ -118,15 +125,15 @@ ...@@ -118,15 +125,15 @@
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
import { createArray } from '@/util/util.js'; import { createArray } from '@/util/util.js';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
export default { export default {
data() { data() {
return { return {
index: 0, index: 0,
array: ['全量搜索'], array: ['全量搜索', '旧标签'],
input_flag: false, input_flag: false,
noexebshowFalg: true, //控制是否会触发生命周期 noexebshowFalg: true, //控制是否会触发生命周期
page: 1, page: 1,
...@@ -317,9 +324,9 @@ export default { ...@@ -317,9 +324,9 @@ export default {
this.page = 1; this.page = 1;
} }
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/stockRecheck/record.scss'; @import '@/assets/css/stockRecheck/record.scss';
</style> </style>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</view> </view>
<view class="picking-sort-wrap"> <view class="picking-sort-wrap">
<view class="search-type row bothSide verCenter"> <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="box-info row bothSide verCenter">
<view class="title row bothSide verCenter">打包箱号:</view> <view class="title row bothSide verCenter">打包箱号:</view>
<view class="info" @click="showBox()">箱信息</view> <view class="info" @click="showBox()">箱信息</view>
...@@ -21,12 +21,16 @@ ...@@ -21,12 +21,16 @@
</view> </view>
</view> </view>
</view> </view>
<view class="right"> <view class="right" style="width: 49%;">
<template v-if="curr == 0"> <template v-if="curr == 0">
<view class="box-info row bothSide verCenter"> <view class="box-info row bothSide verCenter">
<view class="title">入库批次号:</view> <view class="title">入库批次号:</view>
<view class="row verCenter"> <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> <text style="font-size: 18rpx;white-space: nowrap;">批量扫描</text>
</view> </view>
</view> </view>
...@@ -500,10 +504,6 @@ ...@@ -500,10 +504,6 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="btn row verCenter bothSide"> <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 class="btn1 row rowCenter verCenter" style="width: 100%;" @click="multiMarkChecked()">复 核</view>
</view> </view>
</view> </view>
...@@ -554,10 +554,6 @@ ...@@ -554,10 +554,6 @@
</template> </template>
<view class="default row rowCenter verCenter" @click="chooseImageChange()" v-if="image_list.length < maxNum"><text class="iconfont icon-a-juxing3"></text></view> <view class="default row rowCenter verCenter" @click="chooseImageChange()" v-if="image_list.length < maxNum"><text class="iconfont icon-a-juxing3"></text></view>
</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="btn row verCenter bothSide">
<view class="btn0 row rowCenter verCenter" @click="closeDrawer(0)">取 消</view> <view class="btn0 row rowCenter verCenter" @click="closeDrawer(0)">取 消</view>
<view class="btn1 row rowCenter verCenter" style="width: 50%;" @click="multiMarkChecked">一键复核</view> <view class="btn1 row rowCenter verCenter" style="width: 50%;" @click="multiMarkChecked">一键复核</view>
...@@ -623,6 +619,8 @@ ...@@ -623,6 +619,8 @@
export default { export default {
data() { data() {
return { return {
isApp: uni.getSystemInfoSync().platform === 'android' || uni.getSystemInfoSync().platform === 'ios',
old_Label: false, //旧标签默认false
isFocus: true, isFocus: true,
is_batch: true, //是否开启批量 is_batch: true, //是否开启批量
history_id: [], //批量记录id history_id: [], //批量记录id
...@@ -682,6 +680,10 @@ ...@@ -682,6 +680,10 @@
this.searchParams.stock_out_id = options.stock_out_id || ''; this.searchParams.stock_out_id = options.stock_out_id || '';
this.warehouse_id = options.warehouse_id || ''; this.warehouse_id = options.warehouse_id || '';
this.stock_out_sn = options.stock_out_sn || ''; this.stock_out_sn = options.stock_out_sn || '';
//深圳自营仓-默认选择旧标签
if (this.warehouse_id == 9) {
this.old_Label = true;
}
}, },
onShow() { onShow() {
if (this.noexebshowFalg) { if (this.noexebshowFalg) {
...@@ -690,11 +692,14 @@ ...@@ -690,11 +692,14 @@
}, },
methods: { methods: {
/** /**
* 批量扫描监听
* @param {Object} e * @param {Object} e
* @param {Object} type 1旧标签 批量扫描监听
*/ */
switchChange(e) { switchChange(e) {
console.log('switch 发生 change 事件,携带值为', e.detail.value); console.log('switch 发生 change 事件,携带值为', e.detail.value);
if (type == 1) {
} else {
this.is_batch = e.detail.value; this.is_batch = e.detail.value;
//重置相关数据 //重置相关数据
this.history_id = []; this.history_id = [];
...@@ -710,8 +715,8 @@ ...@@ -710,8 +715,8 @@
setTimeout(() => { setTimeout(() => {
this.isFocus = true; this.isFocus = true;
}, 1000); }, 1000);
this.getData(); this.getData();
}
}, },
/** /**
* 打印货品标签样式切换监听 * 打印货品标签样式切换监听
...@@ -1111,6 +1116,12 @@ ...@@ -1111,6 +1116,12 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.stock_out_sn + '复核' 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 => { this.request(URL, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
//过滤出待复核不为0的数据 //过滤出待复核不为0的数据
......
...@@ -33,11 +33,14 @@ ...@@ -33,11 +33,14 @@
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<template v-if="index_batch_sn == 0"> <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)" /> <input class="uni-input" placeholder="请输入入库批次号" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event, 2)" />
</template> </template>
<template v-else-if="index_batch_sn == 1"> <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)" /> <input class="uni-input" placeholder="请输入货品名称" placeholder-style="color:#919399" v-model="searchParams.goods_name" @input="handleInput($event, 2)" />
</template> </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" />
</template>
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_stock_in_batch_sn"></text> <text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_stock_in_batch_sn"></text>
</view> </view>
...@@ -115,7 +118,9 @@ ...@@ -115,7 +118,9 @@
<text class="label">库存总数量:</text> <text class="label">库存总数量:</text>
<text class="t1">{{ item.stock_qty }}</text> <text class="t1">{{ item.stock_qty }}</text>
</view> </view>
<view class="btn-box row verCenter"><view class="btn3 row rowCenter verCenter" @click="showDrawer(item, 1)">选择</view></view> <view class="btn-box row verCenter">
<view class="btn3 row rowCenter verCenter" @click="showDrawer(item, 1)">选择</view>
</view>
</view> </view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
...@@ -204,7 +209,9 @@ ...@@ -204,7 +209,9 @@
<input type="number" placeholder="请输入盘点数量" class="uni-input" v-model="stocktake_qty" /> <input type="number" placeholder="请输入盘点数量" class="uni-input" v-model="stocktake_qty" />
</view> </view>
</view> </view>
<view class="btn row rowCenter verCenter"><view class="row btn1 row rowCenter verCenter" style="width:100%" @click="updateStocktakeItemQty()">确认</view></view> <view class="btn row rowCenter verCenter">
<view class="row btn1 row rowCenter verCenter" style="width:100%" @click="updateStocktakeItemQty()">确认</view>
</view>
</view> </view>
</uni-drawer> </uni-drawer>
<!-- 库位列表弹窗 --> <!-- 库位列表弹窗 -->
...@@ -236,7 +243,9 @@ ...@@ -236,7 +243,9 @@
<view class="uni-td row verCenter rowCenter">{{ item.greater_than_zero }}</view> <view class="uni-td row verCenter rowCenter">{{ item.greater_than_zero }}</view>
</view> </view>
</view> </view>
<view class="btn row rowCenter verCenter"><view class="row btn2 row rowCenter verCenter" style="width:100%" @click="closeDrawer()">关闭</view></view> <view class="btn row rowCenter verCenter">
<view class="row btn2 row rowCenter verCenter" style="width:100%" @click="closeDrawer()">关闭</view>
</view>
</view> </view>
</uni-drawer> </uni-drawer>
<!-- 补打入库标签 --> <!-- 补打入库标签 -->
...@@ -260,11 +269,15 @@ ...@@ -260,11 +269,15 @@
<template v-else> <template v-else>
<radio-group @change="radioChange" class="row verCenter"> <radio-group @change="radioChange" class="row verCenter">
<label class="uni-list-cell row verCenter"> <label class="uni-list-cell row verCenter">
<view><radio value="1" checked="checked" style="transform:scale(0.7)" color="#1969f9" /></view> <view>
<radio value="1" checked="checked" style="transform:scale(0.7)" color="#1969f9" />
</view>
<text class="text">按库存数量</text> <text class="text">按库存数量</text>
</label> </label>
<label class="uni-list-cell row verCenter"> <label class="uni-list-cell row verCenter">
<view><radio value="2" style="transform:scale(0.7)" color="#1969f9" /></view> <view>
<radio value="2" style="transform:scale(0.7)" color="#1969f9" />
</view>
<text class="text">按盘点数量</text> <text class="text">按盘点数量</text>
</label> </label>
</radio-group> </radio-group>
...@@ -289,17 +302,19 @@ ...@@ -289,17 +302,19 @@
</picker> </picker>
</view> </view>
</view> </view>
<view class="btn row rowCenter verCenter"><view class="row btn1 row rowCenter verCenter" style="width:100%" @click="printLabelChange()">打印</view></view> <view class="btn row rowCenter verCenter">
<view class="row btn1 row rowCenter verCenter" style="width:100%" @click="printLabelChange()">打印</view>
</view>
</view> </view>
</uni-drawer> </uni-drawer>
</view> </view>
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
import { createArray } from '@/util/util.js'; import { createArray } from '@/util/util.js';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
export default { export default {
data() { data() {
return { return {
input_flag: false, //库位 input_flag: false, //库位
...@@ -310,7 +325,7 @@ export default { ...@@ -310,7 +325,7 @@ export default {
filter_list: [], //筛选已选中的列表 filter_list: [], //筛选已选中的列表
filter_id: [], //过滤处理的id filter_id: [], //过滤处理的id
indexFilter: 0, indexFilter: 0,
array_batch_sn: ['入库批次号', '货品名称'], array_batch_sn: ['入库批次号', '货品名称', '旧标签'],
index_batch_sn: 0, index_batch_sn: 0,
stocktake_qty: '', stocktake_qty: '',
list: [], list: [],
...@@ -476,8 +491,8 @@ export default { ...@@ -476,8 +491,8 @@ export default {
this.searchParams.position_code = ''; this.searchParams.position_code = '';
} else if (type == 2) { } else if (type == 2) {
this.input_stock_in_batch_sn = false; this.input_stock_in_batch_sn = false;
if (this.index_batch_sn == 0) { if (this.index_batch_sn == 0 || this.index_batch_sn == 2) {
//入库批次号 //入库批次号++旧标签
this.searchParams.stock_in_batch_sn = ''; this.searchParams.stock_in_batch_sn = '';
} else if (this.index_batch_sn == 1) { } else if (this.index_batch_sn == 1) {
//货品名称 //货品名称
...@@ -506,11 +521,13 @@ export default { ...@@ -506,11 +521,13 @@ export default {
this.searchParams.goods_name = ''; this.searchParams.goods_name = '';
if (val) { if (val) {
this.input_stock_in_batch_sn = true; this.input_stock_in_batch_sn = true;
if (this.index_batch_sn == 0) { if (this.index_batch_sn == 0 || this.index_batch_sn == 2) {
//入库批次号 //入库批次号 ++旧标签
this.searchParams.stock_in_batch_sn = val; this.searchParams.stock_in_batch_sn = val;
setTimeout(() => { setTimeout(() => {
if (this.list.length > 0) {
this.showDrawer(this.list[0], 1); this.showDrawer(this.list[0], 1);
}
}, 500); }, 500);
} else if (this.index_batch_sn == 1) { } else if (this.index_batch_sn == 1) {
//货品名称 //货品名称
...@@ -631,9 +648,9 @@ export default { ...@@ -631,9 +648,9 @@ export default {
this.filter_id = []; this.filter_id = [];
} }
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/stocktake/operate.scss'; @import '@/assets/css/stocktake/operate.scss';
</style> </style>
\ No newline at end of file
...@@ -12,7 +12,12 @@ ...@@ -12,7 +12,12 @@
<view class="search-bar row bothSide verCenter"> <view class="search-bar row bothSide verCenter">
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <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" />
</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" />
</template>
</view> </view>
<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>
...@@ -198,7 +203,9 @@ ...@@ -198,7 +203,9 @@
</view> </view>
</view> </view>
<view class="btn row rowCenter verCenter"><view class="row btn1 row rowCenter verCenter" style="width:100%" @click="updateStocktakeItemQty()">确认</view></view> <view class="btn row rowCenter verCenter">
<view class="row btn1 row rowCenter verCenter" style="width:100%" @click="updateStocktakeItemQty()">确认</view>
</view>
</view> </view>
</uni-drawer> </uni-drawer>
<!-- 补打入库标签 --> <!-- 补打入库标签 -->
...@@ -222,11 +229,15 @@ ...@@ -222,11 +229,15 @@
<template v-else> <template v-else>
<radio-group @change="radioChange" class="row verCenter"> <radio-group @change="radioChange" class="row verCenter">
<label class="uni-list-cell row verCenter"> <label class="uni-list-cell row verCenter">
<view><radio value="1" checked="checked" style="transform:scale(0.7)" color="#1969f9" /></view> <view>
<radio value="1" checked="checked" style="transform:scale(0.7)" color="#1969f9" />
</view>
<text class="text">按库存数量</text> <text class="text">按库存数量</text>
</label> </label>
<label class="uni-list-cell row verCenter"> <label class="uni-list-cell row verCenter">
<view><radio value="2" style="transform:scale(0.7)" color="#1969f9" /></view> <view>
<radio value="2" style="transform:scale(0.7)" color="#1969f9" />
</view>
<text class="text">按盘点数量</text> <text class="text">按盘点数量</text>
</label> </label>
</radio-group> </radio-group>
...@@ -269,23 +280,25 @@ ...@@ -269,23 +280,25 @@
</view> </view>
</view> </view>
</template> </template>
<view class="btn row rowCenter verCenter"><view class="row btn1 row rowCenter verCenter" style="width:100%" @click="printLabelChange()">打印</view></view> <view class="btn row rowCenter verCenter">
<view class="row btn1 row rowCenter verCenter" style="width:100%" @click="printLabelChange()">打印</view>
</view>
</view> </view>
</uni-drawer> </uni-drawer>
</view> </view>
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
import { createArray } from '@/util/util.js'; import { createArray } from '@/util/util.js';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
export default { export default {
data() { data() {
return { return {
isZy: false, //区分是否是自营 isZy: false, //区分是否是自营
index: 0, index: 0,
array: ['全量搜索'], array: ['全量搜索', '旧标签'],
noexebshowFalg: true, //控制是否会触发生命周期 noexebshowFalg: true, //控制是否会触发生命周期
input_flag: false, input_flag: false,
page: 1, page: 1,
...@@ -553,9 +566,9 @@ export default { ...@@ -553,9 +566,9 @@ export default {
this.filter_id = []; this.filter_id = [];
} }
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/stocktake/record.scss'; @import '@/assets/css/stocktake/record.scss';
</style> </style>
\ No newline at end of file
...@@ -12,7 +12,12 @@ ...@@ -12,7 +12,12 @@
<view class="search-bar row bothSide verCenter"> <view class="search-bar row bothSide verCenter">
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<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)" /> <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> </view>
<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>
...@@ -244,7 +249,7 @@ ...@@ -244,7 +249,7 @@
page: 1, page: 1,
limit: 1000, limit: 1000,
index: 0, index: 0,
array: ['入库批次号'], array: ['入库批次号', '旧标签'],
list: [], list: [],
searchParams: { searchParams: {
stock_in_batch_sn: '' //入库批次号 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