Commit a6e4e1a4 by liangjianmin

feat(picking): 添加尾数打印标签功能

- 新增尾数打印标签选项,允许用户选择是否打印货品尾数标签
- 根据仓库类型提供不同的打印样式选择
- 更新状态管理以支持尾数打印的勾选和重置逻辑
- 确保用户体验一致性,提升打印功能的灵活性
parent cdfeed83
Showing with 94 additions and 5 deletions
...@@ -359,6 +359,38 @@ ...@@ -359,6 +359,38 @@
<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>
</scroll-view> </scroll-view>
<!-- 尾数打印标签-->
<view class="print row verCenter bothSide">
<view class="row verCenter">
<checkbox-group @change="onCheckboxChangeMantissa">
<label>
<checkbox value="1" color="#1969f9" style="transform:scale(0.7)" :checked="is_print_mantissa" />
</label>
</checkbox-group>
<text class="t1">尾数打印标签</text>
<view class="print-type-box row rowCenter verCenter">
<!-- 深圳自营仓 -->
<template v-if="warehouse_id == 9">
<picker @change="bindPickerChange($event)" :value="print_style_index" :range="print_style" class="row rowCenter verCenter">
<view class="row rowCenter verCenter">
<view class="uni-input">{{ print_style[print_style_index] }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</template>
<!-- 非自营仓 -->
<template v-else>
<picker @change="bindPickerChange($event, 1)" :value="print_language_index" :range="print_language" class="row rowCenter verCenter">
<view class="row rowCenter verCenter">
<view class="uni-input">{{ print_language[print_language_index] }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</template>
</view>
</view>
<view style="font-size: 18rpx;color: #F98119;">该货品尾数、标准包装-尾数 的标签</view>
</view>
<!-- 拆货打印标签--> <!-- 拆货打印标签-->
<view class="print row verCenter bothSide"> <view class="print row verCenter bothSide">
<view class="row verCenter"> <view class="row verCenter">
...@@ -577,7 +609,37 @@ ...@@ -577,7 +609,37 @@
</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_type row verCenter">
<checkbox-group @change="onCheckboxChangeMantissa">
<label>
<checkbox value="1" color="#1969f9" style="transform:scale(0.7)" :checked="is_print_mantissa" />
</label>
</checkbox-group>
<text class="t1">尾数打印标签</text>
<view class="print-type-box row verCenter">
<!-- 深圳自营仓 -->
<template v-if="warehouse_id == 9">
<picker @change="bindPickerChange($event)" :value="print_style_index" :range="print_style">
<view class="row verCenter wrap-box">
<view class="uni-input">{{ print_style[print_style_index] }}</view>
<text class="uni-arrow"></text>
</view>
</picker>
</template>
<!-- 非自营仓 -->
<template v-else>
<picker @change="bindPickerChange($event, 1)" :value="print_language_index" :range="print_language">
<view class="row verCenter wrap-box">
<view class="uni-input">{{ print_language[print_language_index] }}</view>
<text class="uni-arrow"></text>
</view>
</picker>
</template>
</view>
<view style="font-size: 18rpx;color: #F98119;margin-left: 10rpx;">该货品尾数、标准包装-尾数 的标签</view>
</view>
<!-- 拆货打印标签 -->
<view class="print_type row verCenter"> <view class="print_type row verCenter">
<checkbox-group @change="onCheckboxChange"> <checkbox-group @change="onCheckboxChange">
<label> <label>
...@@ -814,6 +876,7 @@ ...@@ -814,6 +876,7 @@
img_upload_url: uni.getStorageSync('img_upload_url') || 'http://image.liexindev.net', //oss系统 img_upload_url: uni.getStorageSync('img_upload_url') || 'http://image.liexindev.net', //oss系统
isApp: uni.getSystemInfoSync().platform === 'android' || uni.getSystemInfoSync().platform === 'ios', isApp: uni.getSystemInfoSync().platform === 'android' || uni.getSystemInfoSync().platform === 'ios',
is_print: false, //是否打印货品标签 is_print: false, //是否打印货品标签
is_print_mantissa: false, //是否打印尾数标签
old_Label: false, //旧标签默认false old_Label: false, //旧标签默认false
is_focus: false, //获取焦点动态化 is_focus: false, //获取焦点动态化
is_batch: true, //是否开启批量 is_batch: true, //是否开启批量
...@@ -954,6 +1017,14 @@ ...@@ -954,6 +1017,14 @@
this.is_print = e.detail.value.includes('1'); this.is_print = e.detail.value.includes('1');
}, },
/** /**
* @param {Object} e
* 尾数打印标签监听是否选择
*/
onCheckboxChangeMantissa(e) {
console.log('尾数标签 check 发生 change 事件,携带值为', e.detail.value);
this.is_print_mantissa = e.detail.value.includes('1');
},
/**
* 打印货品标签样式切换监听 * 打印货品标签样式切换监听
* @param {Object} e * @param {Object} e
* @param {Object} type * @param {Object} type
...@@ -1142,6 +1213,7 @@ ...@@ -1142,6 +1213,7 @@
this.image_list = []; //清空图片列表 this.image_list = []; //清空图片列表
this.server_image_list = []; //清空服务器图片列表 this.server_image_list = []; //清空服务器图片列表
this.is_print = false; //重置勾选状态 this.is_print = false; //重置勾选状态
this.is_print_mantissa = false; //重置尾数打印勾选状态
//如果是散则自动勾选 //如果是散则自动勾选
if (data.pick_type_val == '散') { if (data.pick_type_val == '散') {
...@@ -1178,6 +1250,7 @@ ...@@ -1178,6 +1250,7 @@
this.image_list = []; //清空图片列表 this.image_list = []; //清空图片列表
this.server_image_list = []; //清空服务器图片列表 this.server_image_list = []; //清空服务器图片列表
this.is_print = false; //重置勾选状态 this.is_print = false; //重置勾选状态
this.is_print_mantissa = false; //重置尾数打印勾选状态
//先重置计数器 //先重置计数器
this.demolish_num = 0; this.demolish_num = 0;
...@@ -1470,6 +1543,14 @@ ...@@ -1470,6 +1543,14 @@
}); });
}, },
/** /**
* 打印尾数标签(货品尾数、标准包装-尾数)
* @param {Number} type 1单个拣货
* TODO: 等后台接口确定后实现
*/
rePrintMantissaTag(type) {
// 等后台接口
},
/**
*打印货品标签 *打印货品标签
*/ */
rePrintTag(type) { rePrintTag(type) {
...@@ -1555,12 +1636,16 @@ ...@@ -1555,12 +1636,16 @@
title: '拣货成功', title: '拣货成功',
icon: 'success' icon: 'success'
}); });
//如果勾选了尾数打印则触发打印尾数标签
if (this.is_print_mantissa) {
this.rePrintMantissaTag(1);
}
//如果勾选了打印则触发打印必须自营仓 //如果勾选了打印则触发打印必须自营仓
if (this.is_print) { if (this.is_print) {
this.rePrintTag(1); this.rePrintTag(1);
} }
// 根据 is_print 的值设置 setTimeout 的延迟时间 // 根据 is_print 或 is_print_mantissa 的值设置 setTimeout 的延迟时间
const timeoutDuration = this.is_print ? 4000 : 2000; const timeoutDuration = (this.is_print || this.is_print_mantissa) ? 4000 : 2000;
setTimeout(() => { setTimeout(() => {
if (pick_qty_num == num) { if (pick_qty_num == num) {
//清空数据 //清空数据
...@@ -1614,12 +1699,16 @@ ...@@ -1614,12 +1699,16 @@
title: '拣货成功', title: '拣货成功',
icon: 'success' icon: 'success'
}); });
//如果勾选了尾数打印则触发打印尾数标签
if (this.is_print_mantissa) {
this.rePrintMantissaTag();
}
//如果勾选了打印则触发打印必须自营仓 //如果勾选了打印则触发打印必须自营仓
if (this.is_print) { if (this.is_print) {
this.rePrintTag(); this.rePrintTag();
} }
// 根据 is_print 勾选的值设置 setTimeout 的延迟时间 // 根据 is_print 或 is_print_mantissa 勾选的值设置 setTimeout 的延迟时间
const timeoutDuration = this.is_print ? 4000 : 2000; const timeoutDuration = (this.is_print || this.is_print_mantissa) ? 4000 : 2000;
setTimeout(() => { setTimeout(() => {
if (flag) { if (flag) {
//批量拣货清空数据 //批量拣货清空数据
......
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