From 925bc0b4eb99dc60a1ad4e727428217e3dcfdbdb Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期五, 02 八月 2024 13:54:35 +0800
Subject: [PATCH] update
---
jrj/project/business/PO/Maint.PurcherItem.cpp | 0
jrj/project/business/PO/MakeAllPOEx.PO.cpp | 0
jrj/ext-jrj/ext-jrj.vcxproj | 1
jrj/project/business/AP/list.manageSupplierID.ap.cpp | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
jrj/ext-jrj/ext-jrj.vcxproj.filters | 3 +
5 files changed, 175 insertions(+), 0 deletions(-)
diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj
index ac3c482..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">
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/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/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
--
Gitblit v1.9.3