LiFan
2024-08-02 925bc0b4eb99dc60a1ad4e727428217e3dcfdbdb
update
已添加1个文件
已修改4个文件
175 ■■■■■ 文件已修改
jrj/ext-jrj/ext-jrj.vcxproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jrj/ext-jrj/ext-jrj.vcxproj.filters 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jrj/project/business/AP/list.manageSupplierID.ap.cpp 171 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jrj/project/business/PO/Maint.PurcherItem.cpp 补丁 | 查看 | 原始文档 | blame | 历史
jrj/project/business/PO/MakeAllPOEx.PO.cpp 补丁 | 查看 | 原始文档 | blame | 历史
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">
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>
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;
        }
    };
jrj/project/business/PO/Maint.PurcherItem.cpp
Binary files differ
jrj/project/business/PO/MakeAllPOEx.PO.cpp
Binary files differ