| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
| | | <LocalDebuggerCommand>d:\xclient64\xexplorer64.exe</LocalDebuggerCommand> |
| | | <LocalDebuggerWorkingDirectory>d:\xclient64</LocalDebuggerWorkingDirectory> |
| | | <LocalDebuggerCommand>D:\xclient64\xexplorer64.exe</LocalDebuggerCommand> |
| | | <LocalDebuggerWorkingDirectory>D:\xclient64</LocalDebuggerWorkingDirectory> |
| | | <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> |
| | | <LocalDebuggerCommandArguments>-noupdate</LocalDebuggerCommandArguments> |
| | | </PropertyGroup> |
| | |
| | | #include "wobject/xnode.hpp" |
| | | #include "platform/nstring.hpp" |
| | | |
| | | #include <vector> |
| | | //#include <stdio.h> |
| | | |
| | | class __declspec(dllexport)IndexMenuWin: public xwin |
| | | { |
| | | public: |
| | |
| | | HWND m_nHwnd; |
| | | int tabNo; |
| | | |
| | | //int m_panelNo; // 当前菜单组 |
| | | //int m_panelNo; // 当前菜单组 |
| | | xstring m_Assignment; |
| | | public: |
| | | IndexMenuWin(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} |
| | |
| | | if(hItem == 0) return 1; |
| | | int hasChild = tv_menu.GetItemChild1(hItem); |
| | | if(hasChild > 0) return 1; |
| | | int ret = rClick(L"收藏菜单"); |
| | | int ret = rClick(L"收藏菜单"); |
| | | if(ret == 1) |
| | | { |
| | | xstring id = (xstring)tv_menu.GetItemData(hItem); |
| | |
| | | if(xaserver::ExecXQuery(GetServerUrl(),L"[menu.user.edit.xq]",arg.GetString(),x)!=1) |
| | | { |
| | | trace(x.xml()); |
| | | //alert("收藏失败!"); |
| | | //alert("收藏失败!"); |
| | | return -1; |
| | | } |
| | | createTree1(); |
| | |
| | | dbClick(tv_menu, hItem); |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | int SetMenuAgent() |
| | | { |
| | | xaserverarg arg; |
| | | KXMLDOMDocument x; |
| | | arg.SetArg(L"pid", L"null"); |
| | | arg.SetArg(L"Assignment", this->m_Assignment); |
| | | if (xaserver::ExecXQuery(GetServerUrl(), L"[Items.menu.xq]", arg.GetString(), x) != 1) |
| | | { |
| | | trace(x.xml()); |
| | | alert("取消失败!"); |
| | | return -1; |
| | | } |
| | | KXMLDOMNodeList items = x.selectNodes(L"*/item"); |
| | | long len = items.length(); |
| | | xstring tools; |
| | | wchar_t tool[1204]; |
| | | const wchar_t * templ = L"<xtoolbutton width ='80' imageflow ='top' height ='80' caption ='%s' name ='Menu-%d' src ='icons32/%s白.png' style ='font-family:思源黑体 CN Bold;font-size:9pt;margin:8;text-align:center;background-color:%s;background-radius:8pt;'><help>%s</help></xtoolbutton>"; |
| | | std::vector<const wchar_t*> colors{L"#DE9832",L"#32B2E6",L"#FFEF34",L"#2EA14A",L"#D54C84"}; |
| | | for (int i = 0; i < len; i++) |
| | | { |
| | | if (i >= 20)break; |
| | | xstring name = items.item(i).selectSingleNode(L"name").text(); |
| | | xstring id = items.item(i).selectSingleNode(L"id").text(); |
| | | xstring src = name.replace(L"管理", L"").replace(L"模块", L""); |
| | | swprintf_s(tool, 1024, templ, name.c_str(), i, src.c_str(), colors[i % 5],name.c_str()); |
| | | if (i == 0) tools = tool; else tools += tool; |
| | | } |
| | | tools = L"<box layerflow ='htmlflow'>" + tools + L"</box>"; |
| | | xnode node = this->GetAgentNode(L"menu-item"); |
| | | if(node)this->SetAgentNode(node, tools); |
| | | } |
| | | int SetInitAgent() |
| | | { |
| | | int no = GetCurPanel(); |
| | |
| | | xstring str = xc.GetText(); |
| | | if(str.isEmpty()) |
| | | { |
| | | alert(L"请输入查询条件!"); |
| | | alert(L"请输入查询条件!"); |
| | | return -1; |
| | | } |
| | | HTREEITEM rItem = tv_menu2.GetRootItem(); |
| | |
| | | TVNNMHDR& nmtv = *(TVNNMHDR*)evt->notify.pnmh; |
| | | HTREEITEM hItem = nmtv.FromItem; |
| | | if(!hItem) return 1; |
| | | int ret = rClick(L"取消收藏"); |
| | | int ret = rClick(L"取消收藏"); |
| | | if(ret == 1) |
| | | { |
| | | xstring id = (xstring)tv_menu1.GetItemData(hItem); |
| | |
| | | if(xaserver::ExecXQuery(GetServerUrl(),L"[menu.user.edit.xq]",arg.GetString(),x)!=1) |
| | | { |
| | | trace(x.xml()); |
| | | alert("取消失败!"); |
| | | alert("取消失败!"); |
| | | return -1; |
| | | } |
| | | tv_menu1.DeleteItem(hItem); |
| | |
| | | SetInitAgent(); |
| | | createTree1(); |
| | | |
| | | SetMenuAgent(); |
| | | xutil::RestoreCursor(hCursor); |
| | | //this->Redraw(); |
| | | |
| | |
| | | |
| | | xstring NInvoiceNoEx = dw_list.GetItemString(dw_list.GetRow(), L"NInvoiceNo"); |
| | | xstring InvoiceNoEx = dw_list.GetItemString(dw_list.GetRow(), L"InvoiceNo"); |
| | | xstring SupplierName = dw_list.GetItemString(dw_list.GetRow(), L"ShortName"); |
| | | if (NInvoiceNoEx != InvoiceNoEx) |
| | | { |
| | | NInvoiceNoEx = InvoiceNoEx; |
| | |
| | | arg.AddArg(L"EntityNoEx", NInvoiceNoEx, L""); |
| | | arg.AddArg(L"SupplierID", SupplierID); |
| | | arg.AddArg(L"VATNotifyID", L""); |
| | | arg.AddArg(L"SupplierName", SupplierName); |
| | | trace(InvoiceNo + L"==1" + NInvoiceNoEx + L"==2" + SupplierID + L"==3" + dw_list.GetGuid(dw_list.GetRow())); |
| | | |
| | | openUrl(L"/sale/view/view.base/xpage/Template/PrintViewEx", arg); |
| | |
| | | NInvoiceNoEx = InvoiceNoEx; |
| | | } |
| | | xstring SupplierID = dw_list.GetItemString(dw_list.GetRow(), L"SupplierID"); |
| | | xstring SupplierName = dw_list.GetItemString(dw_list.GetRow(), L"ShortName"); |
| | | arg.AddArg(L"EntityNo", InvoiceNo, L""); |
| | | arg.AddArg(L"EntityNoEx", NInvoiceNoEx, L""); |
| | | arg.AddArg(L"SupplierID", SupplierID); |
| | | arg.AddArg(L"VATNotifyID", dw_list.GetGuid(dw_list.GetRow())); |
| | | arg.AddArg(L"SupplierName", SupplierName); |
| | | trace(L"=====L" + InvoiceNo + L"=====L" + SupplierID + L"=====L" + dw_list.GetGuid(dw_list.GetRow())); |
| | | |
| | | openUrl(L"/sale/view/view.base/xpage/Template/PrintViewEx", arg); |
| | |
| | | { |
| | | dw_list = GetControl(L"dw_list"); |
| | | dw_list.openUrl(L"/sale/view/VATNotify/template/VATNotify/list"); |
| | | dw_list.SetColumnState(L"ShortName", false); |
| | | |
| | | dw_arg = GetControl(L"dw_arg"); |
| | | dw_arg.openUrl(L"/sale/view/AR/template/queryarg"); |
| | | dw_arg.SetColHeaderHeight(0); |
| | |
| | | xstring InvoiceNo = dw_item.GetItemString(dw_item.GetRow(), L"NInvoiceNo"); |
| | | if (InvoiceNo == L"") InvoiceNo = dw_item.GetItemString(dw_item.GetRow(), L"InvoiceNo"); |
| | | xstring SupplierID = dw_item.GetItemString(dw_item.GetRow(), L"SupplierID"); |
| | | xstring SupplierName = dw_item.GetItemString(dw_item.GetRow(), L"ShortName"); |
| | | arg.AddArg(L"EntityNo", InvoiceNo, L""); |
| | | arg.AddArg(L"EntityNoEx", InvoiceNo, L""); |
| | | arg.AddArg(L"SupplierID", SupplierID); |
| | | arg.AddArg(L"VATNotifyID", L""); |
| | | arg.AddArg(L"SupplierName", SupplierName); |
| | | |
| | | openUrl(L"/sale/view/view.base/xpage/Template/PrintViewEx", arg); |
| | | return 1; |
| | |
| | | xstring InvoiceNo = dw_item.GetItemString(dw_item.GetRow(), L"NInvoiceNo"); |
| | | if (InvoiceNo == L"") InvoiceNo = dw_item.GetItemString(dw_item.GetRow(), L"InvoiceNo"); |
| | | xstring SupplierID = dw_item.GetItemString(dw_item.GetRow(), L"SupplierID"); |
| | | xstring SupplierName = dw_item.GetItemString(dw_item.GetRow(), L"ShortName"); |
| | | arg.AddArg(L"EntityNo", InvoiceNo, L""); |
| | | arg.AddArg(L"EntityNoEx", InvoiceNo, L""); |
| | | arg.AddArg(L"SupplierID", SupplierID); |
| | | arg.AddArg(L"VATNotifyID", dw_item.GetGuid(dw_item.GetRow())); |
| | | arg.AddArg(L"SupplierName", SupplierName); |
| | | trace(InvoiceNo + L"====L" + dw_item.GetGuid(dw_item.GetRow())); |
| | | |
| | | openUrl(L"/sale/view/view.base/xpage/Template/PrintViewEx", arg); |
| | |
| | | dw_item.SetColumnState(L"QtyUnitName", false); |
| | | dw_item.SetColumnState(L"QtyUnit", false); |
| | | dw_item.SetColumnState(L"CQtyUnit", false); |
| | | dw_item.SetColumnState(L"ShortName", false); |
| | | |
| | | dw_fob = GetControl(L"dw_fob"); |
| | | dw_fob.openUrl(L"/sale/view/VATNotify/template/VATNotify/fob"); |
| | |
| | | public: |
| | | xhtml ole_print; |
| | | xcell cell; |
| | | xstring m_SupplierName; |
| | | xstring m_EntityName; |
| | | xstring m_EntityID; |
| | | xstring m_EntityNo; |
| | |
| | | if(m_EntityName==L"SaleOrder") pre=L"PI"; |
| | | if(m_EntityName==L"GDN3")pre=L"INV"; |
| | | } |
| | | if (m_EntityName == L"VATNotify")m_EntityNo = m_EntityNo + m_SupplierName; |
| | | xstring file1 = GetMySaveFileName(pre+m_EntityNo+L".xlsx", |
| | | L"Excel1文件(*.xlsx)\0*.xlsx;*.xls\0Excel97文件(*.xls)\0*.xls\0PDF文件(*.pdf)\0*.pdf\0", |
| | | L"xlsx"); |
| | |
| | | m_EntityID = arg.GetArgString(L"EntityID"); |
| | | m_EntityNo = arg.GetArgString(L"EntityNo"); |
| | | m_EntityName = arg.GetArgString(L"EntityName"); |
| | | m_SupplierName = arg.GetArgString(L"SupplierName"); |
| | | m_DocumentID = L""; |
| | | |
| | | OnHtml(arg); |
| | |
| | | m_EntityID = arg.GetArgString(L"EntityID"); |
| | | m_EntityNo = arg.GetArgString(L"EntityNo"); |
| | | m_EntityName = arg.GetArgString(L"EntityName"); |
| | | m_SupplierName = arg.GetArgString(L"SupplierName"); |
| | | m_DocumentID = L""; |
| | | OnHtml(arg); |
| | | } |
| | |
| | | m_EntityID = arg.GetArgString(L"EntityID"); |
| | | m_EntityNo = arg.GetArgString(L"EntityNo"); |
| | | m_EntityName = arg.GetArgString(L"EntityName"); |
| | | m_SupplierName = arg.GetArgString(L"SupplierName"); |
| | | m_DocumentID = L""; |
| | | return 1; |
| | | } |
| | |
| | | m_EntityID = arg.GetArgString(L"EntityID"); |
| | | m_EntityNo = arg.GetArgString(L"EntityNo"); |
| | | m_EntityName = arg.GetArgString(L"EntityName"); |
| | | m_SupplierName = arg.GetArgString(L"SupplierName"); |
| | | m_DocumentID = L""; |
| | | } |
| | | }else |