| | |
| | | |
| | | #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" |
| | | #include "viewobject/view.base.hpp" |
| | | #include "xcontrol/xshtml.hpp" |
| | | |
| | | using xml = KXMLDOMDocument; |
| | | |
| | |
| | | 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) |
| | | { |
| | |
| | | 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") |
| | | { |
| | |
| | | |
| | | 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()); |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | { |
| | | hdr.mask = DMS_CSSSTYLE; |
| | | //hdr.cssstyle = L"color:#cccccc"; |
| | | hdr.cssstyle = L"font-weight:700"; |
| | | hdr.pCssStyle = (LPTSTR)L"font-weight:700"; |
| | | |
| | | } |
| | | } |
| | |
| | | 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"普通"){ |
| | |
| | | { |
| | | 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") |
| | | { |
| | |
| | | return 1; |
| | | } |
| | | |
| | | int ExpandChildFolder(int hItem, KXMLDOMElement pElement) |
| | | int ExpandChildFolder(HTREEITEM hItem, KXMLDOMElement pElement) |
| | | { |
| | | KXMLDOMNodeList nlist = pElement.selectNodes(L"Item"); |
| | | int len = nlist.length(); |
| | |
| | | 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); |
| | | } |
| | |
| | | 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*/ |
| | |
| | | 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)); |