Commit 54bfdd72 by LJM

bug

parent 4968097b
......@@ -80,7 +80,7 @@
border: 1px solid transparent;
.pick_type_val {
position: absolute;
right: 5rpx;
right: 50rpx;
top: 5rpx;
font-size: 17rpx;
color: #1969f9;
......
......@@ -150,7 +150,7 @@
<view class="fix-btn row verCenter" v-if="is_batch_active">
<!-- 不限制仓库,均显示【打印货品标签】按钮 -->
<view class="print_type row rowCenter verCenter">
<text class="t1" @click="rePrintTag()">打印货品标签</text>
<text class="t1" @click="rePrintTag(2)">打印货品标签</text>
<view class="print-type-box row rowCenter verCenter">
<!-- 深圳自营仓 -->
<template v-if="warehouse_id == 9">
......@@ -209,7 +209,7 @@
<text class="iconfont icon-juxing2" @click="closeDrawer()"></text>
<text class="text">{{ stock_out_sn }}</text>
</view>
<view class="field-item row" style="margin-top: 39rpx;">
<view class="field-item row" style="margin-top: 30rpx;">
<view class="item row verCenter">
<text class="label">入库批次号:</text>
<text class="text">{{ detail.stock_in_batch_sn }}</text>
......@@ -219,8 +219,8 @@
<text class="text">{{ detail.position_name }}</text>
</view>
</view>
<view class="bor"></view>
<view class="item-tit row bothSide">
<view class="bor" style="margin-bottom: 4rpx;"></view>
<view class="item-tit row bothSide" style="margin-bottom: 0;">
<view>货品详情</view>
<text class="pick_type_val row rowCenter verCenter" v-if="detail.pick_type_val">{{ detail.pick_type_val }}</text>
</view>
......@@ -269,7 +269,7 @@
<text class="label">主单仓库备注:</text>
<text class="desc" style="max-width: 429rpx;">{{ detail.upstream_remark }}</text>
</view>
<view class="item row" style="flex: 0 0 100%;margin-bottom: 17rpx;">
<view class="item row" style="flex: 0 0 100%;margin-bottom: 8rpx;">
<text class="label">仓库备注:</text>
<text class="desc" style="max-width: 429rpx;">{{ detail.remark }}</text>
</view>
......@@ -316,7 +316,7 @@
<text class="label">采 购 员:</text>
<text class="tt">{{ detail.pur_user_name }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<view class="item row verCenter" style="flex: 0 0 100%;margin-bottom: 0;">
<text class="label">收货客户:</text>
<text class="tt" style="max-width: 100%;">{{ detail.customer_name }}</text>
</view>
......@@ -345,10 +345,10 @@
</view>
</scroll-view>
<!-- 拆货打印标签-->
<view class="print row verCenter" v-if="warehouse_id == 9">
<view class="print row verCenter">
<checkbox-group @change="onCheckboxChange">
<label>
<checkbox value="1" color="#1969f9" style="transform:scale(0.7)" checked />
<checkbox value="1" color="#1969f9" style="transform:scale(0.7)" :checked="is_print" />
</label>
</checkbox-group>
<text class="t1">拆货打印标签</text>
......@@ -562,7 +562,7 @@
<checkbox value="1" color="#1969f9" style="transform:scale(0.7)" checked />
</label>
</checkbox-group>
<text class="t1">打印货品标签</text>
<text class="t1">拆货打印标签</text>
<view class="print-type-box row verCenter">
<!-- 深圳自营仓 -->
<template v-if="warehouse_id == 9">
......@@ -862,6 +862,12 @@
this.picked_num = Number(data.lock_qty) - Number(data.pick_qty);
this.formParams.pick_qty = Number(data.lock_qty) - Number(data.pick_qty);
this.image_list = []; //清空图片列表
//如果单个等于整 默认就不勾选
if (data.pick_type_val == '整') {
this.is_print = false;
}
} else if (type == 2) {
//按容器拣货
this.formParams.pick_remark = '';
......@@ -893,7 +899,7 @@
if (this.filter_id.includes(item.lock_id)) {
// 判断pick_type_val的值,更新demolish_num和goods_num
if (item.pick_type_val === '整') {
this.goods_num += 1; //打印货品标签数量
} else if (item.pick_type_val === '散') {
this.demolish_num += 1; //计算拆货数量
this.goods_num += 2; //打印货品标签数量
......@@ -1148,8 +1154,8 @@
//单个拣货
this.rePrintTagParams.stock_out_item_id = this.detail.stock_out_item_id;
this.rePrintTagParams.recheck_num = this.formParams.pick_qty;
} else {
//底部操作栏打印货品标签 和 批量打印的打印货品标签
} else if (type == 2) {
//底部操作栏打印标签的
if (this.filter_id.length == 0) {
uni.showToast({
title: '请勾选数据',
......@@ -1158,6 +1164,22 @@
return false;
}
this.rePrintTagParams.stock_out_item_id = this.rePrintTagParams.stock_out_item_id.join(','); //出库明细ids
} else {
//批量打印的打印货品标签
if (this.filter_id.length == 0) {
uni.showToast({
title: '请勾选数据',
icon: 'error'
});
return false;
}
// 使用filter方法筛选出符合条件的对象
let filteredItems = this.list.filter(item => this.rePrintTagParams.stock_out_item_id.includes(item.stock_out_item_id) && item.pick_type_val === '散');
// 使用map方法将stock_out_item_ids为'散'的值提取出来
let stock_out_item_ids = filteredItems.map(item => item.stock_out_item_id);
this.rePrintTagParams.stock_out_item_id = stock_out_item_ids.join(','); //出库明细ids
}
this.request(API.RePrintTag, 'POST', this.rePrintTagParams, true).then(res => {
if (res.code === 0) {
......@@ -1199,11 +1221,11 @@
icon: 'success'
});
//如果勾选了打印则触发打印必须自营仓
if (this.is_print && this.warehouse_id == 9) {
if (this.is_print) {
this.rePrintTag(1);
}
// 根据 is_print 的值设置 setTimeout 的延迟时间
const timeoutDuration = (this.is_print && this.warehouse_id == 9) ? 4000 : 2000;
const timeoutDuration = this.is_print ? 4000 : 2000;
setTimeout(() => {
if (pick_qty_num == num) {
//清空数据
......@@ -1254,11 +1276,11 @@
icon: 'success'
});
//如果勾选了打印则触发打印必须自营仓
if (this.is_print && this.warehouse_id == 9) {
if (this.is_print) {
this.rePrintTag();
}
// 根据 is_print 勾选的值设置 setTimeout 的延迟时间
const timeoutDuration = (this.is_print && this.warehouse_id == 9) ? 4000 : 2000;
const timeoutDuration = this.is_print ? 4000 : 2000;
setTimeout(() => {
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