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 |   78 +++++++++++++++++++++++---------------
 1 files changed, 47 insertions(+), 31 deletions(-)

diff --git a/jrj/project/business/SO/Apply.SOItem.cpp b/jrj/project/business/SO/Apply.SOItem.cpp
index 0ff6da3..e8ced78 100644
--- a/jrj/project/business/SO/Apply.SOItem.cpp
+++ b/jrj/project/business/SO/Apply.SOItem.cpp
@@ -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