From 4e474afdd5fec0c08deb41bfedbf326d16ec6170 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期五, 21 十一月 2025 10:53:37 +0800
Subject: [PATCH] 提交
---
项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue | 2 +-
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs | 52 ++++++++++++++++++++++++++++++++++++++++++----------
项目代码/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js | 1 +
3 files changed, 44 insertions(+), 11 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
index 19960e4..c6578d5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
@@ -416,6 +416,7 @@
searchBefore(param) {
//鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
//杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
+ this.searchFormFields.orderType=[0]
return true;
},
searchAfter(result) {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
index 8dfd2f1..9782bb1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
@@ -93,7 +93,7 @@
field: "orderType",
type: "select",
dataKey: "inOrderType",
- data: [],
+ data: [0],
},
{
title: "鍗曟嵁鐘舵��",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
index 3c03457..5cf4570 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
@@ -283,28 +283,60 @@
{
_unitOfWorkManage.BeginTran();
- // 1. 鏌ユ壘鍑哄簱閿佸畾淇℃伅
var lockInfo = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>()
- .Where(it => it.OrderNo == orderNo &&
- it.Status == (int)OutLockStockStatusEnum.鍑哄簱涓� &&
- it.PalletCode == palletCode &&
- it.CurrentBarcode == barcode)
- .FirstAsync();
+ .Where(it => it.OrderNo == orderNo &&
+ it.Status == (int)OutLockStockStatusEnum.鍑哄簱涓� &&
+ it.PalletCode == palletCode &&
+ it.CurrentBarcode == barcode &&
+ it.AssignQuantity > it.PickedQty) // 澧炲姞锛氬彧鏈夋湭瀹屾垚鍒嗘嫞鐨勬墠鑳界户缁�
+ .FirstAsync();
if (lockInfo == null)
{
lockInfo = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>()
- .Where(it => it.CurrentBarcode == barcode &&
- it.Status == (int)OutLockStockStatusEnum.鍑哄簱涓�)
- .FirstAsync();
+ .Where(it => it.CurrentBarcode == barcode &&
+ it.Status == (int)OutLockStockStatusEnum.鍑哄簱涓� &&
+ it.AssignQuantity > it.PickedQty) // 澧炲姞锛氭鏌ュ垎鎷h繘搴�
+ .FirstAsync();
if (lockInfo == null)
- throw new Exception($"鏉$爜{barcode}涓嶅睘浜庢墭鐩榹palletCode}鎴栦笉瀛樺湪寰呭垎鎷h褰�");
+ {
+ // 妫�鏌ユ槸鍚﹀凡缁忓畬鎴愬垎鎷�
+ var completedLockInfo = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>()
+ .Where(it => it.CurrentBarcode == barcode &&
+ (it.Status == (int)OutLockStockStatusEnum.鎷i�夊畬鎴� ||
+ it.PickedQty >= it.AssignQuantity))
+ .FirstAsync();
+
+ if (completedLockInfo != null)
+ throw new Exception($"鏉$爜{barcode}宸茬粡瀹屾垚鍒嗘嫞锛屼笉鑳介噸澶嶅垎鎷�");
+ else
+ throw new Exception($"鏉$爜{barcode}涓嶅睘浜庢墭鐩榹palletCode}鎴栦笉瀛樺湪寰呭垎鎷h褰�");
+ }
}
if (lockInfo.PalletCode != palletCode)
throw new Exception($"鏉$爜{barcode}涓嶅睘浜庢墭鐩榹palletCode}");
+ if (lockInfo.PickedQty >= lockInfo.AssignQuantity)
+ {
+ throw new Exception($"鏉$爜{barcode}宸茬粡瀹屾垚鍒嗘嫞锛屼笉鑳介噸澶嶅垎鎷�");
+ }
+
+ // 妫�鏌ユ嫞閫夊巻鍙诧紝闃叉閲嶅鍒嗘嫞
+ var existingPicking = await Db.Queryable<Dt_PickingRecord>()
+ .Where(x => x.Barcode == barcode &&
+ x.OrderNo == orderNo &&
+ x.PalletCode == palletCode &&
+ x.OutStockLockId == lockInfo.Id)
+ .FirstAsync();
+
+ if (existingPicking != null)
+ {
+ throw new Exception($"鏉$爜{barcode}宸茬粡鍒嗘嫞杩囷紝涓嶈兘閲嶅鍒嗘嫞");
+ }
+
+
var outorderdetail = _outboundOrderDetailService.Db.Queryable<Dt_OutboundOrderDetail>().First(x => x.Id == lockInfo.OrderDetailId);
if (outorderdetail != null && lockInfo.AssignQuantity > outorderdetail.OrderQuantity)
{
--
Gitblit v1.9.3