|  |  | 
 |  |  | #include <wobject/xstring.hpp> | 
 |  |  | #include <wobject/xstring.hpp> | 
 |  |  | #include <xcontrol/xtreeview.hpp> | 
 |  |  | #include <xcontrol/xdwgrid.hpp> | 
 |  |  | #include <xcontrol/xcell.hpp> | 
 |  |  |  | 
 |  |  |  | 
 |  |  | #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" | 
 |  |  | #include "viewobject/view.base.hpp" | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | using xml = KXMLDOMDocument; | 
 |  |  |    class __declspec(dllexport) DeliveryEdit : public xframe | 
 |  |  |    { | 
 |  |  |    public: | 
 |  |  |       xdwtable   dw_1; | 
 |  |  |  | 
 |  |  |       vcontrol vc; | 
 |  |  |       xcell   dw_cell; | 
 |  |  |  | 
 |  |  |    public: | 
 |  |  | 
 |  |  |  | 
 |  |  |       xstring OnCreateTxt() | 
 |  |  |       { | 
 |  |  |          //dw_1.AcceptText(); //不能加会报错 | 
 |  |  |          //dw_1.AcceptText(); //不能加会报错 | 
 |  |  |          xstring sType; | 
 |  |  |          xstring sDeliveryRule; | 
 |  |  |          xstring sDeliveryDays; | 
 |  |  | 
 |  |  |  | 
 |  |  |       int OnOk() | 
 |  |  |       { | 
 |  |  |          xml x; | 
 |  |  |          dw_1.AcceptText(); | 
 |  |  |  | 
 |  |  |          dw_1.DwUpdateAllTo(x); | 
 |  |  |          GetArg().SetArg(L"content", x.xml()); | 
 |  |  |          GetArg().SetArg(L"process",L"ok"); | 
 |  |  |          CloseWindow(); | 
 |  |  |  | 
 |  |  |          return 1; | 
 |  |  | 
 |  |  |  | 
 |  |  |          if (colname == L"DeliveryRule") | 
 |  |  |          { | 
 |  |  |             xstring sP = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='保护' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial=''><edit edittype=''/></cellprop>"; | 
 |  |  |             xstring sP = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='保护' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial=''><edit edittype=''/></cellprop>"; | 
 |  |  |             xstring sUp = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial=''><edit edittype=''/></cellprop>"; | 
 |  |  |  | 
 |  |  |             if (value == L"1" || value == L"2" || value == L"3") | 
 |  |  | 
 |  |  |  | 
 |  |  |          } | 
 |  |  |  | 
 |  |  |          //生成交货期 | 
 |  |  |          //生成交货期 | 
 |  |  |          if (colname == L"DeliveryRule" || colname == L"DeliveryDays" || colname == L"ScheduleShipDate") | 
 |  |  |          { | 
 |  |  |             xstring sTxt = OnCreateTxt(); | 
 |  |  | 
 |  |  |  | 
 |  |  |       int OnInit() | 
 |  |  |       { | 
 |  |  |          int iArgs = GetParam(); | 
 |  |  |          /* | 
 |  |  |          int iArgs = GetArg(); | 
 |  |  |  | 
 |  |  |          XXmlContentSvr xdoc = new XXmlContentSvr; | 
 |  |  |          xdoc.setNativePointer(iArgs); | 
 |  |  | 
 |  |  |  | 
 |  |  |          vbind bind = new vbind; | 
 |  |  |          bind.bind(dw_1, vc); | 
 |  |  |  | 
 |  |  |          */ | 
 |  |  |          xml x; | 
 |  |  |          x ; | 
 |  |  |          x.setNativePointer(xml::CreateInstance()); | 
 |  |  |          x.LoadXml(vc.GetContent()); | 
 |  |  |  | 
 |  |  |          xstring xs = GetArg().GetArgString(L"content"); | 
 |  |  |          x.loadXML(xs.c_str()); | 
 |  |  |          dw_1.Retrieve(x); | 
 |  |  |  | 
 |  |  |          xstring sDeliveryRule = dw_1.GetItemString(1, L"DeliveryRule"); | 
 |  |  |          xstring sP = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='保护' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial=''><edit edittype=''/></cellprop>"; | 
 |  |  |          xstring sP = L"<cellprop searchcolumn='' celltype='' cellformatex='' cellformat='' cellprotectex='' cellprotect='保护' cellvisibleex='' cellvisible='' cellneeddata='' cellvalid='' cellinitial=''><edit edittype=''/></cellprop>"; | 
 |  |  |          if (sDeliveryRule != L"1" && sDeliveryRule != L"2" && sDeliveryRule != L"3") | 
 |  |  |             dw_cell.SetCellProps(3, 3, sP); | 
 |  |  |          if (sDeliveryRule != L"5") | 
 |  |  | 
 |  |  |  | 
 |  |  |       int onload() | 
 |  |  |       { | 
 |  |  |          SetArg(); | 
 |  |  |          dw_1 = GetControl(L"dw_1"); | 
 |  |  |          dw_1.openUrl(L"/sale/view/SaleOrder/template/delivery"); //base.maint.so.tpl/delivery | 
 |  |  |          dw_1.SetColHeaderHeight(0); |