diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java
index 998bb8b25..b761ce62b 100644
--- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java
+++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java
@@ -97,6 +97,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
map.put("begin_time", MapUtil.getStr(whereJson, "begin_time"));
map.put("end_time", MapUtil.getStr(whereJson, "end_time"));
map.put("sap_pcsn", MapUtil.getStr(whereJson, "sap_pcsn"));
+ map.put("stor_id", MapUtil.getStr(whereJson, "stor_id"));
map.put("canuse_qty", "0");
if (StrUtil.isNotEmpty(map.get("material_code"))) {
@@ -744,7 +745,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
jsonMap.put("flag", "1");
jsonMap.put("material_id", dtl.getString("material_id"));
jsonMap.put("sale_order_name", dtl.getString("source_bill_code"));
- jsonMap.put("sect_id", "");
+ jsonMap.put("sect_id", whereJson.getString("sect_id"));
JSONObject jsonOneIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
if (ObjectUtil.isEmpty(jsonOneIvt)) throw new BadRequestException("库存不足");
@@ -820,9 +821,10 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
jsonMap.put("flag", "1");
jsonMap.put("material_id", dtl.getString("material_id"));
jsonMap.put("pcsn", dtl.getString("pcsn"));
+ jsonMap.put("sect_id", whereJson.getString("sect_id"));
JSONObject jsonIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
- if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("此物料批次库存不存在");
+ if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("库存不足");
double canuse_qty = jsonIvt.getDoubleValue("canuse_qty");
jsonIvt.put("change_qty", canuse_qty + "");
@@ -953,7 +955,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
jsonMap.put("flag", "1");
jsonMap.put("material_id", dtl.getString("material_id"));
jsonMap.put("sale_order_name", dtl.getString("source_bill_code"));
- jsonMap.put("sect_id", "");
+ jsonMap.put("sect_id", whereJson.getString("sect_id"));
JSONObject jsonOneIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
if (ObjectUtil.isEmpty(jsonOneIvt)) throw new BadRequestException("库存不足");
@@ -1029,9 +1031,10 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
jsonMap.put("flag", "1");
jsonMap.put("material_id", dtl.getString("material_id"));
jsonMap.put("pcsn", dtl.getString("pcsn"));
+ jsonMap.put("sect_id", whereJson.getString("sect_id"));
JSONObject jsonIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
- if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("此物料批次库存不存在");
+ if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("库存不足");
double canuse_qty = jsonIvt.getDoubleValue("canuse_qty");
jsonIvt.put("change_qty", canuse_qty + "");
diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql
index d03b77352..5d1717f08 100644
--- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql
+++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/QST_IVT_CHECKOUTBILL.wql
@@ -479,6 +479,10 @@
mater.material_name like 输入.material_code)
ENDOPTION
+ OPTION 输入.stor_id <> ""
+ attr.stor_id = 输入.stor_id
+ ENDOPTION
+
OPTION 输入.sap_pcsn <> ""
sub.sap_pcsn like 输入.sap_pcsn
ENDOPTION
diff --git a/lms/nladmin-ui/src/views/wms/st/outbill/AddDialog.vue b/lms/nladmin-ui/src/views/wms/st/outbill/AddDialog.vue
index 3ee5de01a..a75bdd822 100644
--- a/lms/nladmin-ui/src/views/wms/st/outbill/AddDialog.vue
+++ b/lms/nladmin-ui/src/views/wms/st/outbill/AddDialog.vue
@@ -249,7 +249,7 @@
-