Commit 77af2b23 by liangjianmin

fix(tallyReceive): 更新自营商品检查及D/C必填逻辑

- 修改自营商品检查逻辑,仅针对采购入库类型(stock_in_type=1)检查新自营库存类型(stock_type=2)
- 更新D/C必填逻辑,确保在采购入库时自营商品和老自营商品的输入要求明确
parent db7e0caa
......@@ -881,8 +881,8 @@
return false;
}
// 检查选中的理货任务是否包含自营商品(新自营stock_type=2)
var selfOperatedItem = selectedIndexes.map(i => this.list[i]).find(item => item.stock_type == 2);
// 检查选中的理货任务是否包含自营商品(新自营stock_type=2),仅针对采购入库类型(stock_in_type=1)
var selfOperatedItem = selectedIndexes.map(i => this.list[i]).find(item => item.stock_in_type == 1 && item.stock_type == 2);
if (selfOperatedItem) {
uni.showToast({
title: '自营商品需要录入相关信息,请单个理货',
......
......@@ -511,8 +511,9 @@
computed: {
// D/C是否必填:库存类型为新自营(2)或老自营(3),或者是否拆货为"是"
isDcRequired() {
var stockType = this.detail.stock_type;
return stockType == 2 || stockType == 3 || this.is_apart;
var { stock_in_type, stock_type } = this.detail;
// 仅针对采购入库类型(stock_in_type=1),库存类型为新自营(2)或老自营(3)时必填;拆货时始终必填
return (stock_in_type == 1 && (stock_type == 2 || stock_type == 3)) || this.is_apart;
}
},
watch: {
......
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