jrj/ext-jrj/ext-jrj.vcxproj
@@ -715,14 +715,53 @@ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\CheckOut.instore.Sample.cpp" /> <ClCompile Include="..\project\business\ProductSample\InstoreSample3Win.cpp"> <ClCompile Include="..\project\business\ProductSample\instore.Sample3.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\OutstoreSample3Win.cpp"> <ClCompile Include="..\project\business\ProductSample\ItemCustomerPicture.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\new.Sample3.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\outstore.Sample3.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\outstorekind.Sample3.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\PictureView.Product3.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\Product.SearchDlg.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\ProductLibrary4.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\ProductLibraryItemMaint3.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\ProductNewItem.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\Quick.Input.NewProduct.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\SampleAbnormal.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\SampleBarcodePrint.cpp" /> <ClCompile Include="..\project\business\ProductSample\ShipmentNew.Sample3.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\UserProductApply.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\ProductSample\ViewPicturesEx.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> </ClCompile> <ClCompile Include="..\project\business\Public\GroupManagerList.cpp"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> jrj/ext-jrj/ext-jrj.vcxproj.filters
@@ -812,12 +812,6 @@ <ClCompile Include="..\project\business\Enquiry\ViewPictures.cpp"> <Filter>project\business\Enquiry</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\InstoreSample3Win.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\OutstoreSample3Win.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\SampleBarcodePrint.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> @@ -1196,5 +1190,65 @@ <ClCompile Include="..\project\business\Expense\PaperCardReconciliation.cpp"> <Filter>project\business\Expense</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\ItemCustomerPicture.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\new.Sample3.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\outstorekind.Sample3.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\PictureView.Product3.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\Product.SearchDlg.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\ProductLibrary4.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\ProductLibraryItemMaint3.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\ProductNewItem.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\Quick.Input.NewProduct.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\SampleAbnormal.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\ShipmentNew.Sample3.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\UserProductApply.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\instore.Sample3.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\outstore.Sample3.cpp"> <Filter>project\business\ProductSample</Filter> </ClCompile> <ClCompile Include="..\project\business\ProductSample\ViewPicturesEx.cpp"> <Filter>vbusiness\total</Filter> </ClCompile> <ClCompile Include="..\project\business\Expense\VATNotityListShiftToList.cpp"> <Filter>project\business\VATNotify</Filter> </ClCompile> <ClCompile Include="..\project\business\Expense\VATInvoiceAdd.cpp"> <Filter>project\business\VATNotify</Filter> </ClCompile> <ClCompile Include="..\project\business\Expense\GdnSourceSplit.cpp"> <Filter>project\business\VATNotify</Filter> </ClCompile> <ClCompile Include="..\project\business\Expense\APOther.cpp"> <Filter>project\business\VATNotify</Filter> </ClCompile> <ClCompile Include="..\project\business\Expense\APNew.cpp"> <Filter>project\business\VATNotify</Filter> </ClCompile> </ItemGroup> </Project> jrj/project/business/Expense/maint.expense.ap.cppBinary files differ
jrj/project/business/ProductSample/ItemCustomerPicture.cppBinary files differ
jrj/project/business/ProductSample/PictureView.Product3.cppBinary files differ
jrj/project/business/ProductSample/Product.SearchDlg.cppBinary files differ
jrj/project/business/ProductSample/ProductLibrary4.cppBinary files differ
jrj/project/business/ProductSample/ProductLibraryItemMaint3.cppBinary files differ
jrj/project/business/ProductSample/ProductNewItem.cppBinary files differ
jrj/project/business/ProductSample/Quick.Input.NewProduct.cppBinary files differ
jrj/project/business/ProductSample/SampleAbnormal.cppBinary files differ
jrj/project/business/ProductSample/ShipmentNew.Sample3.cppBinary files differ
jrj/project/business/ProductSample/UserProductApply.cppBinary files differ
jrj/project/business/ProductSample/ViewPicturesEx.cppBinary files differ
jrj/project/business/ProductSample/instore.Sample3.cppBinary files differ
jrj/project/business/ProductSample/new.Sample3.cppBinary files differ
jrj/project/business/ProductSample/outstore.Sample3.cppBinary files differ
jrj/project/business/ProductSample/outstorekind.Sample3.cppBinary files differ
jrj/project/total3/ViewEx1.total.cpp
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,323 @@ use "xcontrol.vframe.vbusiness.vd" use "xbase.vframe.vbusiness.vd" unit trade [ class ViewEx1TotalWin : public xwin { xdwgrid dw_list; xoffice dw_office; xcell dw_cell; xnode m_agentNode; //Agent Condition msxml::IXMLDOMElement rptEle; string m_category; string argStr; int SetAgent() { string xfNodeAgentArea = "agentarea"; xnode anode = GetAgentNode(xfNodeAgentArea); if(m_agentNode) { SetAgentNodeContent (anode,m_agentNode); } else { msxml::IXMLDOMElement xframeElement = GetElement(); msxml::IXMLDOMElement agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[1]/*"); if(agent) { string s = agent.xml; m_agentNode = SetAgentNodeContent (anode,s); } } return 1; } //ç¦ç¹æ¿æ´»å¤ç彿° int OnSetFocus(ref TEvent evt,int param) { //éç½®å·¥å ·æ¡ SetAgent(); return 1; } //å½ä»¤åå¸å½æ° int OnCmdDispatch(string comdid) { int hCursor = 0; if(comdid=="xmAnalysis") { hCursor = xutil::SetCursorWait(); string str = dw_list.DataAnalysis(""); xaserverarg arg=new xaserverarg; arg.setNativePointer(arg.CreateInstance()); arg.AddArg("html", str); int obj = cast(dw_list as int); arg.AddArg("obj",obj.toString()); OpenWindow("dev:xpage[data.vanalysis.vx]", cast(arg as int)); xutil::RestoreCursor(hCursor); return 1; } if(comdid=="xmTrans") return OnTransData(); if(comdid=="xmQuery") { if(rptEle) { string argUrl = rptEle.getAttribute("arg"); if(argUrl !="") { xaserverarg ar = new xaserverarg; ar.setNativePointer(ar.CreateInstance()); ar.AddArg("argurl",argUrl); if(argStr !="") ar.AddArg("arg",argStr); OpenWindow("dev:xpage[view.total.arg.vx]",cast(ar as int)); string arstr = ar.GetArgString("arg"); if(arstr != "" && ar.GetArgString("action")=="ok") { argStr = arstr; hCursor = xutil::SetCursorWait(); OnRetrieve(rptEle.getAttribute("data"),argStr); xutil::RestoreCursor(hCursor); } } else { argStr=""; OnRetrieve(rptEle.getAttribute("data"),argStr); } } return 1; } if(comdid=="xmSaveAs") { dw_list.SaveAs(""); return 1; } return 0; } int SwitchReport(msxml::IXMLDOMElement e) { string dwname = e.getAttribute("template"); string dataurl = e.getAttribute("data"); string sheettype = e.getAttribute("reporttype"); if(rptEle != e) { argStr = ""; rptEle = e; } if(sheettype=="") sheettype="report"; SwitchLayer("dw_"+sheettype,"report"); if(sheettype=="report")dw_list.openUrl(dwname); SetAgent(); return 1; } int OnCombboChanged(ref TCommandEvent evt,int lParam) { int h = xcombobox::GetCurSel(evt.hCtrl); if(h > -1) { int hCursor = xutil::SetCursorWait(); msxml::IXMLDOMElement e = xcombobox::GetItemData(evt.hCtrl, h); SwitchReport(e); win32::PostMessage(GetHWND(),0x401,"xmQuery",0); //OnCmdDispatch("xmQuery"); xutil::RestoreCursor(hCursor); } return 1; } int OnTransData() { int ret = win32::MessageBox(GetHWND(),"æ¯å¦æ´æ°æ°æ®?\næ´æ°è¿ç¨é¢è®¡éè¦åååéï¼å¦æä¸é´å¼¹åºçå¾ æ¶é´è¿é¿çæç¤ºï¼è¯·ç¹å»ä¸é´éè¯æé®ï¼æçå¾ å°ä¸å®æ¶é´åç¹å»","æç¤º",0x4 /*yesno*/); if(ret != 6 /*IDYES */ ) return 1; xml x = new xml; x.setNativePointer(xml::CreateInstance()); int hCursor = xutil::SetCursorWait(); if (url::get("/sale/data/Total3/total/transdata","",x)!=1) { xutil::RestoreCursor(hCursor); return 1; }else { xutil::RestoreCursor(hCursor); alert("æ°æ®ä¼ è¾å®æ!"); return 1; } return 1; } //å½ä»¤å¤çäºä»¶ int OnXCommand(ref TXCommandEvent evt,int param) { return OnCmdDispatch(evt.pStrID); } int OnDWClick(ref TNotifyEvent evt,int p) { ref DWNMHDR hdr = trust(evt.pnmh as ref DWNMHDR); string value = hdr.data; string colname = hdr.colname; int row = hdr.row; if(row < 1) return 1; xaserverarg arg; /* if(colname=="SONo") { string SONo = dw_list.GetItemString(row,colname); arg=new xaserverarg; arg.setNativePointer(arg.CreateInstance()); arg.AddArg("EntityNo",SONo); arg.AddArg("ReadOnly","true"); OpenWindow("dev:xpage[base.maint.so.vx]",arg.getNativePointer()); } if(colname=="InvoiceNo") { string InvoiceNo= dw_list.GetItemString(row,colname); arg=new xaserverarg; arg.setNativePointer(arg.CreateInstance()); arg.AddArg("EntityNo",InvoiceNo); arg.AddArg("ReadOnly","true"); OpenWindow("dev:xpage[maint.GDN3.vx]",arg.getNativePointer()); } if(colname=="InvoiceNoEx") { string InvoiceNoEx= dw_list.GetItemString(row,colname); arg=new xaserverarg; arg.setNativePointer(arg.CreateInstance()); arg.AddArg("EntityNo",InvoiceNoEx); arg.AddArg("invoiceno",InvoiceNoEx); arg.AddArg("ReadOnly","true"); OpenWindow("dev:xpage[maint.vatnotify.vx]",arg.getNativePointer()); } */ return 1; } int OnAttachEvent() { //ç»å®å·¥å ·æ¡ç¹å»äºä»¶ AttachEvent("WM_XCOMMAND",OnXCommand); //è·åç¦ç¹äºä»¶ï¼ç¨äºéç½®å·¥å ·æ¡ AttachEvent("WM_SETFOCUS",OnSetFocus); AttachEvent("cb_report","CBN_SELCHANGE",OnCombboChanged); AttachEvent("dw_report","DWV_CLICKED",OnDWClick); } int OnRetrieve(string dataurl, string argstr) { if(!rptEle) return 0; dw_list.Reset(); xml x = new xml; x.setNativePointer(xml::CreateInstance()); xaserverarg arg = new xaserverarg; arg.setNativePointer(arg.CreateInstance()); arg.AddArg("arg",argstr); string sheettype = rptEle.getAttribute("reporttype"); if(sheettype=="") sheettype="report"; if (url::get(dataurl,arg.GetString(),x)!=1) { trace("\r\n--------"+x.GetXmlDoc().text); dw_list.Redraw(); return -1; }else { //xutil::SaveToFile("C:\\Temp\\Total3.xml",x.GetXml(),"","",""); if(sheettype=="report") { dw_list.Retrieve(x); dw_list.Redraw(); dw_list.SetReadOnly(true); } else if(sheettype=="cell") { } else if(sheettype=="office") { dw_office.LoadTemplate(x); for(int i=0; i<dw_office.GetSheetCount();i++) { xcell sheet = dw_office.GetSheet(i); sheet.SetReadOnly(true); } } } return 1; } xml getReportSet(string category) { xml x = new xml; x.setNativePointer(xml::CreateInstance()); xaserverarg arg = new xaserverarg; arg.setNativePointer(arg.CreateInstance()); arg.AddArg("category",category); if (url::get("/sale/data/Total3/reportset",arg.GetString(),x)!=1) { return 0; } return x; } int onload() { dw_list = GetControl("dw_report"); dw_office = GetControl("dw_office"); dw_cell = GetControl("dw_cell"); dw_list.openUrl("/sale/view/Total3/template/sodetail"); argStr =""; rptEle = 0; xcombobox xc = GetControl("cb_report"); //m_category = "total/business"; m_category = "total/sample"; if(GetParam()) { xaserverarg arg = new xaserverarg; arg.setNativePointer(GetParam()); m_category = arg.GetArgString("category"); } xml x = getReportSet(m_category); if(x) { msxml::IXMLDOMNodeList nlist =x.GetXmlDoc().selectNodes("//reports/report"); int len = nlist.length; for(int i=0; i<len; i++) { msxml::IXMLDOMElement rpt = nlist.item(i); string name = rpt.getAttribute("name"); xcombobox::AddItem(xc.GetId(),name,trust(rpt as int)); if(i==0) xc.SetText(name); if(i==0) rptEle = rpt; } } OnAttachEvent(); return 1; } int onloaded() { SetAgent(); if(rptEle) { SwitchReport(rptEle); //OnCmdDispatch("xmQuery"); } return 1; } }; ]