From 03ef0b51103c735077c784c7df81ae2bcc1599ab Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期四, 13 二月 2025 18:33:56 +0800
Subject: [PATCH] update

---
 jrj/project/business/Affair/Business5.cpp |   37 +++++++++++++++++++------------------
 1 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/jrj/project/business/Affair/Business5.cpp b/jrj/project/business/Affair/Business5.cpp
index 0441872..c2f905e 100644
--- a/jrj/project/business/Affair/Business5.cpp
+++ b/jrj/project/business/Affair/Business5.cpp
@@ -6,6 +6,7 @@
 
 #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
 #include "viewobject/view.base.hpp"
+#include "xcontrol/xshtml.hpp"
 
 using xml = KXMLDOMDocument;
 
@@ -20,15 +21,15 @@
 		xnode	m_agentNode;	//Agent Condition
 		xtreeview tv_folder;
 		
-		int		hMessage;
-		int		hTask;
+		HTREEITEM		hMessage;
+		HTREEITEM		hTask;
 	
 		xstring 	agentFor;
 		xstring    selectname;
 		xwin		sheet;
 
 	public:
-		Business5Win(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+		Business5Win(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd),sheet(0) {}
 	public:
 		static Business5Win* CreateInstance(void* implPtr, void* hWnd)
 		{
@@ -187,18 +188,18 @@
 			int ret = 0;
 			if(comdid.find(L"action:",0)>=0)
 			{
-				ret =SendMessage(GetHWND(),0x401,(LPARAM)comdid,0);
+				ret =SendMessage(sheet.GetHWND(),0x401,(LPARAM)comdid.c_str(), 0);
 			}
 			if(comdid==L"xmRefreshTask")
 			{
 				trace(L"\r\n----refresh task--------");
-				SendMessage(GetHWND(),0x401,(LPARAM)comdid,0);
+				SendMessage(sheet.GetHWND(),0x401,(LPARAM)comdid.c_str(), 0);
 				return 1;
 			}
 			if(comdid==L"xmRefresh")
 			{
 				trace(L"\r\n----refresh--------");
-				ret =SendMessage(GetHWND(),0x401, (LPARAM)comdid,0);
+				ret =SendMessage(sheet.GetHWND(),0x401, (LPARAM)comdid.c_str(), 0);
 			}
 			if(comdid == L"xmRertieve")
 			{
@@ -409,7 +410,7 @@
 				
 			trace(ele.xml());
 			arg.AddArg(L"content",ele.xml());
-			xml doc=new xml;			
+			xml doc;			
 			if(getUrl(L"/sale/data/vpage/vstart/task",arg.GetString(),doc)!=1)
 			{
 				trace((xstring)L"error->:"+doc.xml());
@@ -418,7 +419,7 @@
 			if(doc.xml() == L"")
 				return -1;
 			//trace(doc.xml());
-			htmlctrl ht = GetControl(L"taskinfo");
+			xshtml ht = GetControl(L"taskinfo");
 			ht.SetContent(doc.xml());
 			ht.Redraw();
 			return 1;
@@ -426,7 +427,7 @@
 		int OnItemAskStyle(TEvent* evt, int p)
 		{
 			int DMS_CSSSTYLE = 0x8;
-			ref DWASKSTYLENMHDR hdr = trust(evt.pnmh as ref DWASKSTYLENMHDR);
+			DWASKSTYLENMHDR& hdr = *(DWASKSTYLENMHDR*)evt->notify.pnmh;
 			int row = hdr.row;
 			int col = hdr.col;
 			xstring colname = hdr.colname;
@@ -444,7 +445,7 @@
 				{
 					hdr.mask =  DMS_CSSSTYLE;
 					//hdr.cssstyle = L"color:#cccccc";
-					hdr.cssstyle = L"font-weight:700";
+					hdr.pCssStyle = (LPTSTR)L"font-weight:700";
 					
 				}
 			}
@@ -513,7 +514,7 @@
 				xstring TaskID = ele.getAttribute(L"guid");
 				xstring Category = dw_message.GetItemString(row,L"Category");
 				if(Category==L"货号申请"){
-					int p1 ;
+					int p1=0 ;
 					OpenWindow(L"dev:xpage[UserProductApply.vx]", p1);
 				}
 				if(Category==L"普通"){
@@ -530,7 +531,7 @@
 				{
 					if(dw_message.GetRowCount() < 1) return 1;
 					xstring No = dw_message.GetItemString(dw_message.GetRow(),L"No");
-					OpenWindow(L"dev:xpage[EnquiryEx.quote.vx]",cast(No as int));
+					OpenWindow(L"dev:xpage[EnquiryEx.quote.vx]",(LPARAM)No.c_str());
 				}
 				if(Category==L"SupplierV3")
 				{
@@ -591,7 +592,7 @@
 			return 1;
 		}
 		
-		int  ExpandChildFolder(int hItem, KXMLDOMElement pElement)
+		int  ExpandChildFolder(HTREEITEM hItem, KXMLDOMElement pElement)
 		{
 			KXMLDOMNodeList nlist = pElement.selectNodes(L"Item");
 			int len = nlist.length();
@@ -603,7 +604,7 @@
 				xstring child = e.getAttribute(L"child");
 				int image = 15;
 				if(sImage) image = sImage.toInt();
-				int h= tv_folder.InsertChildItem(tv_folder.GetId(),hItem,name, trust(e as int),image);
+				HTREEITEM h= tv_folder.InsertChildItem(hItem,name, e,image);
 				if(child !=L"no" ) tv_folder.SetItemChild(h,1);
 				ExpandChildFolder(h,e);
 			}
@@ -616,14 +617,14 @@
 			KXMLDOMNodeList nlist = x.selectNodes(L"/data/Item"); 
 			KXMLDOMNode t = nlist.item(0);
 			xstring informationQuantity =t.selectSingleNode(L"informationQuantity").text();
-			tv_folder.SetItemLabel(hMessage, L"消息"+L"(L"+informationQuantity+L")L");
+			tv_folder.SetItemLabel(hMessage, (xstring)L"消息"+L"("+informationQuantity+L")");
 			
 			xml x1 = ViewObject::RetrieveData(L"/sale/data/business/list/AdjustTipTask");
 			//alert(x1.xml());
 			KXMLDOMNodeList nlist1 = x1.selectNodes(L"/data/Item");
 			KXMLDOMNode t1= nlist1.item(0);
 			xstring informationQuantityTask =t1.selectSingleNode(L"informationQuantityTask").text();
-			tv_folder.SetItemLabel(hTask, L"任务"+L"(L"+informationQuantityTask+L")L");
+			tv_folder.SetItemLabel(hTask, (xstring)L"任务"+L"("+informationQuantityTask+L")");
 			
 			/*select count(*) from bpm_task where typ='notify' and  process='N' 
 			and charindex('|'+'00303'+'|','|' + rtrim(receiver) +'|')>=1*/
@@ -663,9 +664,9 @@
 			tv_folder.SetLineAtRoot(true);
 			sheet = GetChildWin(L"sheet1");
 			
-			int hItem = tv_folder.GetRootItem();
+			HTREEITEM hItem = tv_folder.GetRootItem();
 			tv_folder.ExpandItem(hItem);
-			int hcItem =tv_folder.GetChildItem(hItem);
+			HTREEITEM hcItem =tv_folder.GetChildItem(hItem);
 			hTask = hcItem;
 			tv_folder.ExpandItemAll(hcItem);
 			tv_folder.ItemFocus(tv_folder.GetChildItem(hcItem));

--
Gitblit v1.9.3