Commit 33473eb3 by liangjianmin

fix(tallyReceive): 添加自营商品检查逻辑

- 在理货任务提交前检查选中的理货任务是否包含自营商品
- 如果包含自营商品,显示提示信息并阻止提交
- 更新库存类型字段显示,确保信息准确性
parent 22ce2d4b
......@@ -119,7 +119,7 @@
</view>
<view class="text-item row">
<text class="label">库存类型:</text>
<text class="tt"></text>
<text class="tt">{{ item.stock_type_cn }}</text>
</view>
<view class="text-item row" v-if="item.customer_material_number">
<text class="label" style="width: 125rpx;">客户物料编码:</text>
......@@ -881,6 +881,17 @@
return false;
}
// 检查选中的理货任务是否包含自营商品(新自营stock_type=2 或 老自营stock_type=3)
var selfOperatedItem = selectedIndexes.map(i => this.list[i]).find(item => item.stock_type == 2 || item.stock_type == 3);
if (selfOperatedItem) {
uni.showToast({
title: '自营商品需要录入相关信息,请单个理货',
icon: 'none',
duration: 2500
});
return false;
}
this.image_list = []; //清空图片列表
this.server_image_list = []; //清空服务器图片列表
this.formParams.image_ids = ''; //每次打开先清空图片集合
......
......@@ -955,7 +955,7 @@
return false;
}
}
//拆货任务必填用途
if (this.is_apart && this.formParams.purpose_type == 0) {
uni.showModal({
......@@ -965,7 +965,7 @@
});
return false;
}
//若选择的用途是"销售用",则理货数量需≤销售需拆货数量
if (this.formParams.purpose_type == 1) {
var apart_todo_qty = Number(this.detail.apart_todo_qty) || 0;
......@@ -979,7 +979,7 @@
return false;
}
}
//【理货】、【一键理货】操作时,D/C 必填并且必须为四位数字
if (this.warehouse_id == 9) {
const dcRegex = /^\d{4}$/; // 匹配四位数字
......
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