Commit bdfa457f by liangjianmin

feat(picking): 实现货品标签补打功能

- 根据类型区分单个补打和批量补打操作
- 批量补打时增加勾选数据校验,提示错误信息
- 请求补打接口并根据接口响应提示成功或失败
- 过滤符合条件的标签进行批量补打处理
- 使用统一的请求方法发送POST请求到补打接口
parent a6e4e1a4
Showing with 28 additions and 1 deletions
......@@ -1548,7 +1548,34 @@
* TODO: 等后台接口确定后实现
*/
rePrintMantissaTag(type) {
// 等后台接口
var params = { ...this.rePrintTagParams, from_type: 2 };
if (type == 1) {
params.stock_out_item_id = this.detail.stock_out_item_id;
params.recheck_num = this.formParams.pick_qty;
} else {
if (this.filter_id.length == 0) {
uni.showToast({
title: '请勾选数据',
icon: 'error'
});
return false;
}
var filteredItems = this.list.filter(item => this.rePrintTagParams.stock_out_item_id.includes(item.stock_out_item_id) && item.pick_type_val === '散');
params.stock_out_item_id = filteredItems.map(item => item.stock_out_item_id).join(',');
}
this.request(API.RePrintTag, 'POST', params, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '打印成功',
icon: 'success'
});
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
/**
*打印货品标签
......
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