From 7d373af1a34ede50b72367be462a0ce1ed6b5baf Mon Sep 17 00:00:00 2001
From: lifan <2308045698@qq.com>
Date: 星期四, 26 十一月 2026 10:53:42 +0800
Subject: [PATCH] update

---
 jrj/project/business/SO/Apply.SOItem.cpp |   88 ++++++++++++++++++++++++++------------------
 1 files changed, 52 insertions(+), 36 deletions(-)

diff --git a/jrj/project/business/SO/Apply.SOItem.cpp b/jrj/project/business/SO/Apply.SOItem.cpp
index fcb2a91..e8ced78 100644
--- a/jrj/project/business/SO/Apply.SOItem.cpp
+++ b/jrj/project/business/SO/Apply.SOItem.cpp
@@ -50,7 +50,7 @@
 			while (ll_row > 0 && ll_row <= dw_list.GetRowCount())
 			{
 				xstring id = dw_list.GetGuid(ll_row);
-				if (EntityIDList == L"") EntityIDList = id; else EntityIDList += L",L" + id;
+				if (EntityIDList == L"") EntityIDList = id; else EntityIDList += L"," + id;
 				ll_row = dw_list.GetNextSelectRow(ll_row + 1);
 			}
 			if (EntityIDList != L"") arg.AddArg(L"EntityID", EntityIDList);
@@ -58,19 +58,19 @@
 			return 1;
 		}
 
-		xstring GetEntityName(int pr)
+		xstring GetEntityName(LPARAM pr)
 		{
 			return L"SaleItem3";
 		}
 
-		xstring GetEntityID(int pr)
+		xstring GetEntityID(LPARAM pr)
 		{
 			int row = dw_list.GetRow();
 			xstring id = dw_list.GetGuid(row);
 			return id;
 		}
 
-		int ViewUpdate(int pr, xstring updateItem, xaserverarg  arg)
+		int ViewUpdate(LPARAM pr, xstring updateItem, xaserverarg  arg)
 		{
 			if (updateItem == L"del")
 			{
@@ -171,7 +171,7 @@
 					if (skunos == L"")
 						skunos = dw_list.GetItemString(i, L"SKUNo");
 					else
-						skunos += L",L" + dw_list.GetItemString(i, L"SKUNo");
+						skunos += L"," + dw_list.GetItemString(i, L"SKUNo");
 				}
 			}
 			xaserverarg arg ;
@@ -182,46 +182,62 @@
 		//命令发布函数
 		int OnCmdDispatch(xstring comdid)
 		{
+			xstring positionname = publiccode::GetUser().positionname;
+
 			if (comdid == L"xmCancel")
 			{
 				CloseWindow();
 				return 1;
 			}
-			else if (comdid == L"xmAskGoodsNo")
+			if (comdid == L"xmCancel")
 			{
-				OnAskGoodsNo();
+				CloseWindow();
+				return 1;
 			}
-			//else if(comdid==L"xmApply") return OnApply();
-			else if (comdid.find(L"action:", 0) >= 0)
+			if (comdid.find(L"action:bill.workflow.lognew", 0) >= 0)
 			{
-				xstring GoodsNo = dw_list.GetItemString(dw_list.GetRow(), L"GoodsNo");
-				xstring GoodsNo2 = GoodsNo.mid(0, 2);
-				xstring GoodsNo4 = GoodsNo.mid(2, 1);
-
-				if (GoodsNo == L"")
-				{
-					alert(L"公司货号未指定");
-					return 0;
-				}
-				if (GoodsNo.find(L"N") >= 0 || GoodsNo.find(L"n") >= 0) {
-					alert(L"公司货号带有N");
-					return 0;
-				}
-				if (GoodsNo4 >= L"A" && GoodsNo4 <= L"z" && GoodsNo2 >= L"22" && GoodsNo2 <= L"99")
-				{
-					alert(L"公司货号为新品货号");
-					return 0;
-				}
-				xstring CType = dw_list.GetItemString(dw_list.GetRow(), L"CType");
-
-				if (CType == L"")
-				{
-					alert(L"客户合同附件未上传!");
-					return 0;
-				}
-				int ret = ProcessFlowAction(comdid, 1);
-				return ret;
+				int ret1 = ProcessFlowAction(comdid, 1);
+				return ret1;
 			}
+			if (positionname.find(L"跟单") < 0)
+			{ 
+				if (comdid == L"xmAskGoodsNo")
+				{
+					OnAskGoodsNo();
+				}
+				//else if(comdid==L"xmApply") return OnApply();
+				else if (comdid.find(L"action:", 0) >= 0)
+				{
+					xstring GoodsNo = dw_list.GetItemString(dw_list.GetRow(), L"GoodsNo");
+					xstring GoodsNo2 = GoodsNo.mid(0, 2);
+					xstring GoodsNo4 = GoodsNo.mid(2, 1);
+
+					if (GoodsNo == L"")
+					{
+						alert(L"公司货号未指定");
+						return 0;
+					}
+					if (GoodsNo.find(L"N") >= 0 || GoodsNo.find(L"n") >= 0) {
+						alert(L"公司货号带有N");
+						return 0;
+					}
+					if (GoodsNo4 >= L"A" && GoodsNo4 <= L"z" && GoodsNo2 >= L"22" && GoodsNo2 <= L"99")
+					{
+						alert(L"公司货号为新品货号");
+						return 0;
+					}
+					xstring CType = dw_list.GetItemString(dw_list.GetRow(), L"CType");
+
+					if (CType == L"")
+					{
+						alert(L"客户合同附件未上传!");
+						return 0;
+					}
+					int ret = ProcessFlowAction(comdid, 1);
+					return ret;
+				}
+			}
+			
 			return 0;
 		}
 

--
Gitblit v1.9.3