Commit 07aedd29 by liangjianmin

feat(stockRecheck): 添加Digikey标签确认弹窗及复核逻辑

- 新增Digikey标签确认弹窗,用户在复核时可确认已打印标签的物料
- 更新复核逻辑,处理复核按钮点击时判断是否需要标签确认
- 优化一键复核功能,支持批量物料的标签确认
- 增加相关样式以提升用户体验
parent 77af2b23
......@@ -807,4 +807,86 @@
}
}
}
}
::v-deep .uni-popup {
z-index: 10080 !important;
}
.digikey-popup {
width: 600rpx;
background: #ffffff;
border-radius: 20rpx;
padding: 30rpx;
.digikey-popup-title {
font-size: 32rpx;
color: #292b33;
font-weight: bold;
text-align: center;
margin-bottom: 30rpx;
}
.digikey-popup-content {
max-height: 400rpx;
overflow-y: auto;
margin-bottom: 20rpx;
.digikey-item {
padding: 20rpx 0;
border-bottom: 1px solid #f0f0f2;
&:last-child {
border-bottom: none;
}
.digikey-model {
font-size: 26rpx;
color: #484b59;
flex: 1;
margin-right: 20rpx;
word-break: break-all;
}
.digikey-qty {
font-size: 26rpx;
color: #F98119;
white-space: nowrap;
}
}
}
.digikey-popup-tip {
font-size: 24rpx;
color: #ff3700;
text-align: center;
margin-bottom: 30rpx;
line-height: 1.5;
}
.digikey-popup-btn {
.btn-cancel {
width: 45%;
height: 70rpx;
line-height: 70rpx;
text-align: center;
background: #ffe0d7;
border-radius: 10rpx;
font-size: 28rpx;
color: #ff3700;
font-weight: bold;
}
.btn-confirm {
width: 45%;
height: 70rpx;
line-height: 70rpx;
text-align: center;
background: #1969f9;
border-radius: 10rpx;
font-size: 28rpx;
color: #ffffff;
font-weight: bold;
}
}
}
\ No newline at end of file
......@@ -382,10 +382,27 @@
</view>
<view class="btn row verCenter bothSide">
<view class="btn0 row rowCenter verCenter" @click="closeDrawer()">取 消</view>
<view class="btn1 row rowCenter verCenter" style="width: 50%;" @click="markChecked(detail.stock_out_item_id, formParams.recheck_qty, searchParams.box_name)">复 核</view>
<view class="btn1 row rowCenter verCenter" style="width: 50%;" @click="handleRecheck(detail.stock_out_item_id, formParams.recheck_qty, searchParams.box_name)">复 核</view>
</view>
</view>
</uni-drawer>
<!-- Digikey标签确认弹窗 -->
<uni-popup ref="digikeyPopup" type="center">
<view class="digikey-popup">
<view class="digikey-popup-title">Digikey标签确认</view>
<view class="digikey-popup-content">
<view class="digikey-item row bothSide" v-for="(item, index) in digikeyConfirmList" :key="index">
<text class="digikey-model">型号:{{ item.goods_name }}</text>
<text class="digikey-qty">数量:{{ item.no_recheck_qty }}</text>
</view>
</view>
<view class="digikey-popup-tip">以上复核物料,请确认已经打印粘贴Digikey标签</view>
<view class="digikey-popup-btn row bothSide">
<view class="btn-cancel" @click="closeDigikeyPopup">取消</view>
<view class="btn-confirm" @click="confirmDigikeyRecheck">确认</view>
</view>
</view>
</uni-popup>
<!-- 按容器拣货-弹窗 -->
<uni-drawer ref="showRightPack" mode="right">
<view class="uni-drawer-picking">
......@@ -586,7 +603,7 @@
</view>
<view class="btn row verCenter bothSide">
<view class="btn0 row rowCenter verCenter" @click="closeDrawer()">取 消</view>
<view class="btn1 row rowCenter verCenter" style="width: 50%;" @click="multiMarkChecked">一键复核</view>
<view class="btn1 row rowCenter verCenter" style="width: 50%;" @click="handleMultiRecheck">一键复核</view>
</view>
</view>
</uni-drawer>
......@@ -740,7 +757,10 @@
stock_out_item_id: '',
print_type: 0,
recheck_num: ''
}
},
// Digikey标签确认相关
digikeyConfirmList: [], // 待确认的物料列表
pendingRecheckParams: null // 暂存复核参数
};
},
onNavigationBarButtonTap(e) {
......@@ -1254,9 +1274,10 @@
});
},
/**
*按货品复核-单个复核
* 处理复核按钮点击(判断是否需要Digikey标签确认)
*/
markChecked(stock_out_item_id, recheck_qty, box_name) {
handleRecheck(stock_out_item_id, recheck_qty, box_name) {
// 基础校验
if (!this.searchParams.box_name) {
uni.showToast({
title: '输入打包箱号',
......@@ -1272,6 +1293,52 @@
return false;
}
// 判断是否需要Digikey标签确认
if (this.detail.is_check_channel_tag == 1) {
// 暂存复核参数
this.pendingRecheckParams = { stock_out_item_id, recheck_qty, box_name };
// 构建确认列表(型号 + 待复核数)
this.digikeyConfirmList = [{
goods_name: this.detail.goods_name,
no_recheck_qty: this.formParams.recheck_qty
}];
// 打开确认弹窗
this.$refs.digikeyPopup.open();
} else {
// 直接执行复核
this.markChecked(stock_out_item_id, recheck_qty, box_name);
}
},
/**
* 关闭Digikey确认弹窗
*/
closeDigikeyPopup() {
this.$refs.digikeyPopup.close();
this.pendingRecheckParams = null;
this.digikeyConfirmList = [];
},
/**
* 确认Digikey标签后执行复核
*/
confirmDigikeyRecheck() {
this.$refs.digikeyPopup.close();
if (this.pendingRecheckParams) {
if (this.pendingRecheckParams.type === 'multi') {
// 一键复核
this.multiMarkChecked();
} else {
// 单个复核
var { stock_out_item_id, recheck_qty, box_name } = this.pendingRecheckParams;
this.markChecked(stock_out_item_id, recheck_qty, box_name);
}
this.pendingRecheckParams = null;
this.digikeyConfirmList = [];
}
},
/**
*按货品复核-单个复核
*/
markChecked(stock_out_item_id, recheck_qty, box_name) {
//图片集合
var pic_ids = this.server_image_list.map(item => {
return item.pic_id;
......@@ -1305,9 +1372,9 @@
});
},
/**
* 按容器复核-一键复核
* 处理一键复核按钮点击(判断是否需要Digikey标签确认)
*/
multiMarkChecked() {
handleMultiRecheck() {
if (!this.searchParams.box_name) {
uni.showToast({
title: '输入打包箱号',
......@@ -1316,6 +1383,28 @@
return false;
}
// 根据选中的id筛选出对应的物料列表
var selectedItems = this.list.filter(item => this.stock_out_item_ids.includes(item.stock_out_item_id));
// 检查是否有需要确认Digikey标签的物料
var needConfirmItems = selectedItems.filter(item => item.is_check_channel_tag == 1);
if (needConfirmItems.length > 0) {
// 暂存标记为一键复核
this.pendingRecheckParams = { type: 'multi' };
// 构建确认列表(型号 + 待复核数)
this.digikeyConfirmList = needConfirmItems.map(item => ({
goods_name: item.goods_name,
no_recheck_qty: item.no_recheck_qty
}));
this.$refs.digikeyPopup.open();
} else {
this.multiMarkChecked();
}
},
/**
* 按容器复核-一键复核
*/
multiMarkChecked() {
//图片集合
var pic_ids = this.server_image_list.map(item => {
return item.pic_id;
......
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