From 5d9955c19c1d28d13015fcbc4c7da87ec951aa2a Mon Sep 17 00:00:00 2001
From: lifan <2308045698@qq.com>
Date: 星期一, 29 六月 2026 15:31:42 +0800
Subject: [PATCH] update

---
 jrj/ext-jrj/list.Test.ap.cpp                      |   94 +++++++++++++++++++++++++++++++---------------
 jrj/ext-jrj/ext-jrj.vcxproj                       |    2 
 jrj/project/business/Expense/list.expense.ap.cpp  |    0 
 jrj/project/business/Expense/maint.expense.ap.cpp |    0 
 jrj/ext-jrj/ext-jrj.vcxproj.filters               |    2 
 5 files changed, 65 insertions(+), 33 deletions(-)

diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj
index a5b5e33..9e94472 100644
--- a/jrj/ext-jrj/ext-jrj.vcxproj
+++ b/jrj/ext-jrj/ext-jrj.vcxproj
@@ -325,7 +325,6 @@
     <ClCompile Include="..\project\business\AP\list.manageSupplierID.ap.cpp" />
     <ClCompile Include="..\project\business\AP\list.RefundGDNLine.Entity.xarch.cpp" />
     <ClCompile Include="..\project\business\AP\list.RefundSourcingLine.Entity.xarch.cpp" />
-    <ClCompile Include="..\project\business\AP\list.Test.ap.cpp" />
     <ClCompile Include="..\project\business\AP\maint.ap.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
     </ClCompile>
@@ -1293,6 +1292,7 @@
     <ClCompile Include="JType.cpp" />
     <ClCompile Include="JValue.cpp" />
     <ClCompile Include="JVariant.cpp" />
+    <ClCompile Include="list.Test.ap.cpp" />
     <ClCompile Include="pch.cpp">
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
diff --git a/jrj/ext-jrj/ext-jrj.vcxproj.filters b/jrj/ext-jrj/ext-jrj.vcxproj.filters
index 7eaf7b7..72f3936 100644
--- a/jrj/ext-jrj/ext-jrj.vcxproj.filters
+++ b/jrj/ext-jrj/ext-jrj.vcxproj.filters
@@ -1652,7 +1652,7 @@
     <ClCompile Include="..\project\total3\FactoryPaymentMethod.cpp">
       <Filter>vbusiness\total</Filter>
     </ClCompile>
-    <ClCompile Include="..\project\business\AP\list.Test.ap.cpp">
+    <ClCompile Include="list.Test.ap.cpp">
       <Filter>project\business\AP</Filter>
     </ClCompile>
   </ItemGroup>
diff --git a/jrj/project/business/AP/list.Test.ap.cpp b/jrj/ext-jrj/list.Test.ap.cpp
similarity index 77%
rename from jrj/project/business/AP/list.Test.ap.cpp
rename to jrj/ext-jrj/list.Test.ap.cpp
index b4d20be..def1a02 100644
--- a/jrj/project/business/AP/list.Test.ap.cpp
+++ b/jrj/ext-jrj/list.Test.ap.cpp
@@ -7,6 +7,7 @@
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
 #include "viewobject/view.base.hpp"
+
 using xml = KXMLDOMDocument;
 class __declspec(dllexport) ListTestAP : public xframe
 {
@@ -24,7 +25,7 @@
 		ListTestAP* pWin = new ListTestAP(implPtr, (HWND)hWnd);
 		return pWin;
 	}
-	int SetAgent()
+	/*int SetAgent()
 	{
 		xstring xfNodeAgentArea = L"agentarea";
 		xnode anode = GetAgentNode(xfNodeAgentArea);
@@ -43,14 +44,27 @@
 			}
 		}
 		return 1;
-	}
+	}*/
 
-	//鐒︾偣婵�娲诲鐞嗗嚱鏁�
+	//焦点激活处理函数
 	int OnSetFocus(TEvent* evt, LPARAM param)
 	{
-		//閲嶇疆宸ュ叿鏉�
-		SetAgent();
+		//重置工具条
+		SetAgent(L"list", GetEntityID(1));
 		return 1;
+	}
+
+	xstring GetEntityName(LPARAM pr)
+	{
+		return L"APTest";
+	}
+
+	xstring GetEntityID(LPARAM pr)
+	{
+		int row = dw_list.GetRow();
+		xstring id = dw_list.GetItemString(row, L"APID");
+		//alert(id);
+		return id;
 	}
 
 	xstring GetPayType()
@@ -84,29 +98,29 @@
 		else return 1;
 	}
 
-	//鍛戒护鍙戝竷鍑芥暟
+	//命令发布函数
 	int OnCmdDispatch(xstring comdid)
 	{
-		xstring payType = GetPayType();
+		xstring payType =L"测试费";
 
 
 
-		if (comdid == L"xmBank") return OnBank();
+		if (comdid == L"xmBank" || comdid == L"action:bill.xmBank") return OnBank();
 		if (comdid == L"xmSave") return OnSave();
-		if (comdid == L"xmRefresh" || comdid == L"xmSearch")
+		if (comdid == L"xmRefresh" || comdid == L"xmSearch" || comdid == L"action:bill.refresh")
 		{
 			return OnRetrieveEx(apType);
 		}
-		if (comdid == L"xmAddRow")
+		if (comdid == L"xmAddRow" || comdid == L"action:bill.new" )
 		{
 			xaserverarg arg1;
 
-			if (payType == L"杩愭潅璐�" or payType == L"娴嬭瘯璐�")
+			if (payType == L"运杂费" or payType == L"测试费")
 				arg1.AddArg(L"payType", payType);
 			OpenWindow(L"dev:xpage[maint.expense.ap.vx]", arg1);
 			return 1;
 		}
-		if (comdid == L"xmModifyRow")
+		if (comdid == L"xmModifyRow" || comdid == L"action:bill.open")
 		{
 			xaserverarg arg;
 			int row = dw_list.GetRow();
@@ -119,7 +133,7 @@
 			OpenWindow(L"dev:xpage[maint.expense.ap.vx]", arg);
 			return 1;
 		}
-		if (comdid == L"xmDeleteRow")
+		if (comdid == L"xmDeleteRow" || comdid == L"action:bill.delete")
 		{
 			int row = dw_list.GetRow();
 			if (row < 1) return 1;
@@ -128,7 +142,7 @@
 
 			int MB_OKCANCEL = 1;
 			int IDOK = 1;
-			int ret = MessageBox(GetHWND(), L"纭鍒犻櫎浜у搧娴嬭瘯璐�?", L"鎻愮ず", MB_OKCANCEL);
+			int ret = MessageBox(GetHWND(), L"确认删除产品测试费?", L"提示", MB_OKCANCEL);
 			if (ret == IDOK)
 			{
 				ViewObject::RetrieveData(L"/sale/data/AP/delete/AP", L"EntityID", APID1);
@@ -138,10 +152,24 @@
 
 			return 1;
 		}
-		if (comdid == L"xmPrint")
+		if (comdid == L"xmPrint" || comdid == L"action:bill.xmPrint")
 		{
 			return OnPrint();
 		}
+		if (comdid == L"action:bill.check.ask")
+		{
+			ProcessFlowAction(L"action:bill.check.ask", 1);
+			PostMessage(GetFrameWindow().GetHWND(), 0x401, (LPARAM)L"xmRefresh", 0);
+			return 1;
+		}
+		if (comdid.find(L"action:", 0) >= 0)
+		{
+			if (dw_list.GetRow() < 1)
+				return 0;
+			int ret1 = ProcessFlowAction(comdid, 1);
+			return ret1;
+		}
+
 		return 0;
 	}
 
@@ -174,14 +202,14 @@
 		int h = xcombobox::GetCurSel(evt->command.hCtrl);
 		if (h > -1)
 		{
-			xstring txt = (string)xcombobox::GetLBText(evt->command.hCtrl, h);
+			xstring txt = L"测试费";
 			apType = L"---";
-			if (txt == L"杩愭潅璐�")
+			if (txt == L"运杂费")
 			{
 				dw_list.openUrl(L"/sale/view/AP/template/AP/Expense/List");
 				apType = L"003";
 			}
-			if (txt == L"娴嬭瘯璐�")
+			if (txt == L"测试费")
 			{
 				dw_list.openUrl(L"/sale/view/AP/template/AP/Expense/List");
 				apType = L"021";
@@ -191,7 +219,7 @@
 		return 1;
 	}
 
-	//鍛戒护澶勭悊浜嬩欢
+	//命令处理事件
 	int OnXCommand(TEvent* evt, LPARAM param)
 	{
 		return OnCmdDispatch(evt->xcommand.pStrID);
@@ -199,12 +227,12 @@
 
 	int OnAttachEvent()
 	{
-		//缁戝畾宸ュ叿鏉$偣鍑讳簨浠�
+		//绑定工具条点击事件
 		AttachEvent(L"WM_XCOMMAND", (FEvent)&ListTestAP::OnXCommand);
-		//鑾峰彇鐒︾偣浜嬩欢锛岀敤浜庨噸缃伐鍏锋潯
+		//获取焦点事件,用于重置工具条
 		AttachEvent(L"WM_SETFOCUS", (FEvent)&ListTestAP::OnSetFocus);
-		AttachEvent(L"cbx_type", L"CBN_SELCHANGE", (FEvent)&ListTestAP::OnCombboChanged);//灞炴�х粍鍒囨崲list涓垪鐨勬暟閲忓彉鍖�
-		AttachEvent(L"dw_list", L"DWV_DOUBLECLICKED", (FEvent)&ListTestAP::OnDoubleClicked);//琛屽弻鍑�
+		AttachEvent(L"cbx_type", L"CBN_SELCHANGE", (FEvent)&ListTestAP::OnCombboChanged);//属性组切换list中列的数量变化
+		AttachEvent(L"dw_list", L"DWV_DOUBLECLICKED", (FEvent)&ListTestAP::OnDoubleClicked);//行双击
 		AttachEvent(L"dw_list", L"DWV_CLICKED", (FEvent)&ListTestAP::OnDwClicked);
 		return 1;
 	}
@@ -270,11 +298,11 @@
 		if (str == L"true")
 		{
 			dw_list.ResetUpdateStatus();
-			alert(L"淇濆瓨鎴愬姛!");
+			alert(L"保存成功!");
 		}
 		else
 		{
-			alert(L"淇濆瓨澶辫触!");
+			alert(L"保存失败!");
 		}
 		return 1;
 	}
@@ -294,21 +322,24 @@
 
 		xaserverarg arg;
 
+		
+		arg.AddArg(L"APType",L"021");
 		arg.AddArg(L"QueryTxt", xcontrol(GetControl(L"sle_search")).GetText());
-		arg.AddArg(L"APType", APType);
 		arg.AddArg(L"QueryArg", GetQueryArg());
 		arg.AddArg(L"DatePicker", L"APDate");
-		if (getUrl(L"/sale/data/AP/list", arg.GetString(), x) != 1)
+		//alert(arg.GetString());
+		if (getUrl(L"/sale/data/AP/listAPTest", arg.GetString(), x) != 1)
 		{
 			trace(x.text());
 			return -1;
 		}
 		else
 		{
+		
 			dw_list.Retrieve(x);
 			dw_list.Redraw();
 			dw_list.SetReadOnly(true);
-			dw_list.SetSelectionMode(3);
+			dw_list.SetSelectionMode(1);
 		}
 		return 1;
 	}
@@ -318,6 +349,7 @@
 	{
 		dw_list = GetControl(L"dw_list");
 		dw_list.openUrl(L"/sale/view/AP/template/AP/Expense/List");
+		dw_list.SetColumnState(L"APID", false);
 
 		dw_arg = GetControl(L"dw_arg");
 		dw_arg.openUrl(L"/sale/view/AR/template/queryarg");
@@ -325,10 +357,10 @@
 		dw_arg.SetRowSelectorWidth(0);
 		dw_arg.SetHScrollState(false);
 		dw_arg.SetVScrollState(false);
-
+		dw_arg.SetItemString(1, L"DateType", L"不设定");
 
 		OnAttachEvent();
-		apType = L"003";
+		apType = L"021";
 		OnRetrieveEx(apType);
 
 		return 1;
@@ -336,7 +368,7 @@
 
 	int onloaded()
 	{
-		SetAgent();
+		SetAgent(L"list", GetEntityID(1));
 
 		return 1;
 	}
diff --git a/jrj/project/business/Expense/list.expense.ap.cpp b/jrj/project/business/Expense/list.expense.ap.cpp
index d7f6d51..dc896a4 100644
--- a/jrj/project/business/Expense/list.expense.ap.cpp
+++ b/jrj/project/business/Expense/list.expense.ap.cpp
Binary files differ
diff --git a/jrj/project/business/Expense/maint.expense.ap.cpp b/jrj/project/business/Expense/maint.expense.ap.cpp
index 454fbfd..8ca139c 100644
--- a/jrj/project/business/Expense/maint.expense.ap.cpp
+++ b/jrj/project/business/Expense/maint.expense.ap.cpp
Binary files differ

--
Gitblit v1.9.3