From 19df926ceac02075e1c92b2e961a49e0385051cb Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期一, 05 八月 2024 09:07:05 +0800 Subject: [PATCH] Merge branch 'master' of http://116.62.18.175:6699/r/mis-prj --- jrj/project/business/AP/APNew3.warizd.cpp | 9 +- jrj/project/business/PO/Maint.PurcherItem.cpp | 0 jrj/project/business/PO/MakeAllPOEx.PO.cpp | 0 jrj/project/business/Public/UserGroupShare.cpp | 2 jrj/ext-jrj/ext-jrj.vcxproj.filters | 3 jrj/xframe/xcontrol/xcombobox.hpp | 1 jrj/project/business/Company/HrOrg.cpp | 2 jrj/project/business/ProductSample/ProductLibrary4.cpp | 0 jrj/project/business/SystemSettings/BugMaint.Developer.hxsoft.cpp | 2 jrj/xframe/xcontrol/xdwtable.hpp | 4 + jrj/ext-jrj/ext-jrj.vcxproj | 5 jrj/project/business/AP/list.manageSupplierID.ap.cpp | 171 ++++++++++++++++++++++++++++++++++++++++++ jrj/project/business/SystemSettings/UserImport.cpp | 8 +- 13 files changed, 193 insertions(+), 14 deletions(-) diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj index adad8c7..c513036 100644 --- a/jrj/ext-jrj/ext-jrj.vcxproj +++ b/jrj/ext-jrj/ext-jrj.vcxproj @@ -258,6 +258,7 @@ <ClCompile Include="..\project\business\AP\list.ap.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> + <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\maint.ap.cpp"> @@ -808,7 +809,7 @@ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\Public\UserGroupShare.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\Public\UserGroupShareEx.cpp"> @@ -940,7 +941,7 @@ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\SystemSettings\BindComputer.cpp"> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\SystemSettings\Buglist.Developer.hxsoft.cpp"> diff --git a/jrj/ext-jrj/ext-jrj.vcxproj.filters b/jrj/ext-jrj/ext-jrj.vcxproj.filters index 50b1619..1280bd9 100644 --- a/jrj/ext-jrj/ext-jrj.vcxproj.filters +++ b/jrj/ext-jrj/ext-jrj.vcxproj.filters @@ -1268,5 +1268,8 @@ <ClCompile Include="..\project\business\Enquiry\Quick.Input.NewProductEx.cpp"> <Filter>project\business\Enquiry</Filter> </ClCompile> + <ClCompile Include="..\project\business\AP\list.manageSupplierID.ap.cpp"> + <Filter>project\business\AP</Filter> + </ClCompile> </ItemGroup> </Project> \ No newline at end of file diff --git a/jrj/project/business/AP/APNew3.warizd.cpp b/jrj/project/business/AP/APNew3.warizd.cpp index a22bcaa..d6a2c6f 100644 --- a/jrj/project/business/AP/APNew3.warizd.cpp +++ b/jrj/project/business/AP/APNew3.warizd.cpp @@ -380,7 +380,7 @@ else if (comdid == L"xmFilter") return OnFilter(); else if (comdid == L"xmQuery") { - + index = m_layer.GetSheetIndex(); index++; OnRetrieve(); @@ -575,11 +575,11 @@ arg.AddArg(L"QueryTxt", xcontrol(GetControl(L"sle_search")).GetText()); xcombobox cbx_type = GetControl(L"cbx_ship"); - int h = xcombobox::GetCurSel(cbx_type.GetHWND()); + int h = cbx_type.GetCurSel(); if (h < 0) return 1; - xstring str = xcombobox::GetItemData(cbx_type.GetHWND()); + xstring str = (string)cbx_type.GetItemData(h); arg.AddArg(L"ShipDays", str); - trace(str); + if (getUrl(L"/sale/data/AP/list101", arg.GetString(), x) != 1) { trace(x.text()); @@ -588,6 +588,7 @@ } else { + dw_1.Retrieve(x); dw_1.Redraw(); } diff --git a/jrj/project/business/AP/list.manageSupplierID.ap.cpp b/jrj/project/business/AP/list.manageSupplierID.ap.cpp new file mode 100644 index 0000000..c769da4 --- /dev/null +++ b/jrj/project/business/AP/list.manageSupplierID.ap.cpp @@ -0,0 +1,171 @@ +#include <wobject/xstring.hpp> +#include <xcontrol/xtreeview.hpp> +#include <xcontrol/xdwgrid.hpp> +#include <wobject/xdouble.hpp> +#include <xcontrol/xlayersheet.hpp> + +#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" +#include "viewobject/view.base.hpp" + +using xml = KXMLDOMDocument; + class __declspec(dllexport) manageSupplierID : public xframe + { + public: + xdwgrid dw_list; + xdwtable dw_arg; + xstring DatePicker; + xnode m_agentNode; //Agent Condition + public: + manageSupplierID(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} + public: + static manageSupplierID* CreateInstance(void* implPtr, void* hWnd) + { + manageSupplierID* pWin = new manageSupplierID(implPtr, (HWND)hWnd); + return pWin; + } + int SetAgent() + { + xstring xfNodeAgentArea = L"agentarea"; + xnode anode = GetAgentNode(xfNodeAgentArea); + if(m_agentNode) + { + SetAgentNode (anode,m_agentNode); + } + else + { + KXMLDOMElement xframeElement = GetElement(); + KXMLDOMElement agent = xframeElement.selectSingleNode(L"agent/"+xfNodeAgentArea+L"[1]/*"); + if(agent) + { + xstring s = agent.xml(); + m_agentNode = SetAgentNode (anode,s); + } + } + return 1; + } + + //焦点激活处理函数 + int OnSetFocus(TEvent* evt, LPARAM p) + { + //重置工具条 + //SetAgent(); + return 1; + } + + //命令发布函数 + int OnCmdDispatch(xstring comdid) + { + if(comdid==L"xmSearch" ||comdid==L"xmRefresh") + { + OnRetrieve(DatePicker); + return 1; + } + if(comdid==L"xmSaveAs") + { + dw_list.SaveAs(L""); + return 1; + } + if(comdid==L"xmRefresh") + { + OnRetrieve(DatePicker); + return 1; + } + return 0; + } + + //命令处理事件 + int OnXCommand(TEvent* evt, LPARAM param) + { + return OnCmdDispatch(evt->xcommand.pStrID); + } + + int OnAttachEvent() + { + //绑定工具条点击事件 + AttachEvent(L"WM_XCOMMAND", (FEvent)&manageSupplierID::OnXCommand); + //获取焦点事件,用于重置工具条 + AttachEvent(L"WM_SETFOCUS", (FEvent)&manageSupplierID::OnSetFocus); + AttachEvent(L"cbx_state",L"CBN_SELCHANGE", (FEvent)&manageSupplierID::OnDatePicker); + return 1; + } + + + int OnDatePicker(TEvent* evt, LPARAM lParam) + { + + int h = xcombobox::GetCurSel(evt->command.hCtrl); + if(h > -1) + { + xstring txt = xcombobox::GetLBText(evt->command.hCtrl, h); + if(txt==L"出运日期") + { + + DatePicker=L"ETD"; + OnRetrieve(DatePicker); + } + else if(txt==L"退税日期") + { + + DatePicker=L"RefundAmountDate"; + OnRetrieve(DatePicker); + } + } + return 1; + } + + xstring GetQueryArg() + { + dw_arg.AcceptText(); + xml x; + + dw_arg.DwUpdateAllTo(x); + return x.xml(); + } + + int OnRetrieve(xstring DatePicker) + { + xml x; + xaserverarg arg ; + arg.AddArg(L"QueryTxt",xcontrol(GetControl(L"sle_search")).GetText()); + arg.AddArg(L"QueryArg",GetQueryArg()); + arg.AddArg(L"DatePicker",DatePicker); + trace(L"QueryTxt:===L"+ xcontrol(GetControl(L"sle_search")).GetText()+L"QueryArg:====L"+GetQueryArg()+L"DatePicker:====L"+DatePicker); + if (getUrl(L"/sale/data/AP/InvoiceSupplierIDList",arg.GetString(),x)!=1) + { + trace(x.text()); + return -1; + }else + { + dw_list.Retrieve(x); + dw_list.Redraw(); + dw_list.SetReadOnly(true); + } + return 1; + } + + + int onload() + { + dw_list = GetControl(L"dw_list"); + dw_list.openUrl(L"/sale/view/AP/ManageSupplierID"); + + dw_arg = GetControl(L"dw_arg"); + dw_arg.openUrl(L"/sale/view/AR/template/queryarg"); + dw_arg.SetColHeaderHeight(0); + dw_arg.SetRowSelectorWidth(0); + dw_arg.SetHScrollState(false); + dw_arg.SetVScrollState(false); + dw_arg.SetItemString(1,L"DateType",L"本月"); + //OnRetrieve(); + OnAttachEvent(); + + return 1; + } + + int onloaded() + { + //SetAgent(); + + return 1; + } + }; \ No newline at end of file diff --git a/jrj/project/business/Company/HrOrg.cpp b/jrj/project/business/Company/HrOrg.cpp index baceac9..5dfe6b7 100644 --- a/jrj/project/business/Company/HrOrg.cpp +++ b/jrj/project/business/Company/HrOrg.cpp @@ -131,7 +131,7 @@ return 1; - xstring id = tv_org.GetItemData(sitem); + xstring id = (string)tv_org.GetItemData(sitem); HCURSOR hCursor = xutil::SetCursorWait(); OnCreateTree(id, sitem); xutil::RestoreCursor(hCursor); diff --git a/jrj/project/business/PO/Maint.PurcherItem.cpp b/jrj/project/business/PO/Maint.PurcherItem.cpp index 6579bd8..ebc0331 100644 --- a/jrj/project/business/PO/Maint.PurcherItem.cpp +++ b/jrj/project/business/PO/Maint.PurcherItem.cpp Binary files differ diff --git a/jrj/project/business/PO/MakeAllPOEx.PO.cpp b/jrj/project/business/PO/MakeAllPOEx.PO.cpp index 7c50d9c..b905d39 100644 --- a/jrj/project/business/PO/MakeAllPOEx.PO.cpp +++ b/jrj/project/business/PO/MakeAllPOEx.PO.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/ProductLibrary4.cpp b/jrj/project/business/ProductSample/ProductLibrary4.cpp index 628bba0..38df7f0 100644 --- a/jrj/project/business/ProductSample/ProductLibrary4.cpp +++ b/jrj/project/business/ProductSample/ProductLibrary4.cpp Binary files differ diff --git a/jrj/project/business/Public/UserGroupShare.cpp b/jrj/project/business/Public/UserGroupShare.cpp index 75b4249..391081c 100644 --- a/jrj/project/business/Public/UserGroupShare.cpp +++ b/jrj/project/business/Public/UserGroupShare.cpp @@ -173,7 +173,7 @@ "\r\nReciever:"+Reciever + L"\r\nNo:"+NO + L"\r\nEntityID:"+EntityID + L"Subject:"+Subject+ "\r\nContent:"+Content); */ - x = ViewObject::AddMessage(Category, Reciever, NO, EntityID, Subject, Content); + ViewObject::AddMessage(GetServerUrl(), Category, Reciever, NO, EntityID, Subject, Content); return 1; } diff --git a/jrj/project/business/SystemSettings/BugMaint.Developer.hxsoft.cpp b/jrj/project/business/SystemSettings/BugMaint.Developer.hxsoft.cpp index ec10349..fbd16e2 100644 --- a/jrj/project/business/SystemSettings/BugMaint.Developer.hxsoft.cpp +++ b/jrj/project/business/SystemSettings/BugMaint.Developer.hxsoft.cpp @@ -176,7 +176,7 @@ for(i=0; i<s; i++) { xstring tmp = m_cb.GetLBText( i); - xstring tmp2 = m_cb.GetItemData(i); + xstring tmp2 = (string)m_cb.GetItemData(i); KXMLDOMElement e = x.createElement(L"item"); e.setAttribute(L"name", L""+tmp); e.setAttribute(L"file", L""+tmp2); diff --git a/jrj/project/business/SystemSettings/UserImport.cpp b/jrj/project/business/SystemSettings/UserImport.cpp index 00d9041..fb7b0a7 100644 --- a/jrj/project/business/SystemSettings/UserImport.cpp +++ b/jrj/project/business/SystemSettings/UserImport.cpp @@ -110,10 +110,10 @@ //trace(row); KXMLDOMElement e = dw_list.GetRowElement(row); trace(e.xml()); - xstring sEmployeeNo = e.selectSingleNode(L"EmployeeNo").text() + L""; - xstring sOldEmpNo = e.selectSingleNode(L"OldEmpNo").text() + L""; - xstring sPersonID = e.selectSingleNode(L"PersonID").text() + L""; - xstring sPersonName = e.selectSingleNode(L"Name").text() + L""; + xstring sEmployeeNo = e.selectSingleNode(L"EmployeeNo").text() + (xstring)L""; + xstring sOldEmpNo = e.selectSingleNode(L"OldEmpNo").text() + (xstring)L""; + xstring sPersonID = e.selectSingleNode(L"PersonID").text() + (xstring)L""; + xstring sPersonName = e.selectSingleNode(L"Name").text() + (xstring)L""; xstring sPassWord = xutil::MD5(sOldEmpNo); /* diff --git a/jrj/xframe/xcontrol/xcombobox.hpp b/jrj/xframe/xcontrol/xcombobox.hpp index f1df0f1..2bed6f1 100644 --- a/jrj/xframe/xcontrol/xcombobox.hpp +++ b/jrj/xframe/xcontrol/xcombobox.hpp @@ -16,7 +16,6 @@ return *this; } public: - int GetCurSel() { int CB_GETCURSEL_ = 0x0147; diff --git a/jrj/xframe/xcontrol/xdwtable.hpp b/jrj/xframe/xcontrol/xdwtable.hpp index 05f76fc..c51aa4b 100644 --- a/jrj/xframe/xcontrol/xdwtable.hpp +++ b/jrj/xframe/xcontrol/xdwtable.hpp @@ -453,24 +453,28 @@ int GetItemInt(int row, int col) { xstring str = GetItemString(row, col); + str = str.replace(L",", L""); return str.toInt(); } double GetItemDouble(int row, int col) { xstring str = GetItemString(row, col); + str = str.replace(L",", L""); return str.toDouble(); } int GetItemInt(int row, string col) { xstring str = GetItemString(row, col); + str = str.replace(L",", L""); return str.toInt(); } double GetItemDouble(int row, string col) { xstring str = GetItemString(row, col); + str = str.replace(L",", L""); return str.toDouble(); } -- Gitblit v1.9.3