From aecae8e9fa34b6307fb1b0e5478a69962d5ddd72 Mon Sep 17 00:00:00 2001 From: LiFan <2308045698@qq.com> Date: 星期一, 22 七月 2024 18:09:31 +0800 Subject: [PATCH] update --- jrj/project/business/ProductSample/outstorekind.Sample3.cpp | 0 jrj/project/business/ProductSample/ProductNewItem.cpp | 0 jrj/project/business/ProductSample/ViewPicturesEx.cpp | 0 jrj/project/business/ProductSample/ShipmentNew.Sample3.cpp | 0 jrj/project/business/ProductSample/ItemCustomerPicture.cpp | 0 jrj/project/business/ProductSample/Product.SearchDlg.cpp | 0 jrj/project/business/ProductSample/Quick.Input.NewProduct.cpp | 0 jrj/project/business/ProductSample/new.Sample3.cpp | 0 jrj/project/business/ProductSample/PictureView.Product3.cpp | 0 jrj/project/business/ProductSample/ProductLibraryItemMaint3.cpp | 0 jrj/project/business/ProductSample/UserProductApply.cpp | 0 jrj/project/business/ProductSample/ProductLibrary4.cpp | 0 jrj/project/total3/ViewEx1.total.cpp | 323 ++++++++++++++++++++++++++++++++++++++++++++++ jrj/ext-jrj/ext-jrj.vcxproj | 39 +++++ jrj/project/business/ProductSample/SampleAbnormal.cpp | 0 15 files changed, 362 insertions(+), 0 deletions(-) diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj index 0de5e48..73ac92c 100644 --- a/jrj/ext-jrj/ext-jrj.vcxproj +++ b/jrj/ext-jrj/ext-jrj.vcxproj @@ -719,10 +719,49 @@ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> </ClCompile> + <ClCompile Include="..\project\business\ProductSample\ItemCustomerPicture.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</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'">true</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'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\project\business\ProductSample\ProductLibrary4.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</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'">true</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> diff --git a/jrj/project/business/ProductSample/ItemCustomerPicture.cpp b/jrj/project/business/ProductSample/ItemCustomerPicture.cpp new file mode 100644 index 0000000..2392f5a --- /dev/null +++ b/jrj/project/business/ProductSample/ItemCustomerPicture.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/PictureView.Product3.cpp b/jrj/project/business/ProductSample/PictureView.Product3.cpp new file mode 100644 index 0000000..3cbd3f4 --- /dev/null +++ b/jrj/project/business/ProductSample/PictureView.Product3.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/Product.SearchDlg.cpp b/jrj/project/business/ProductSample/Product.SearchDlg.cpp new file mode 100644 index 0000000..508227a --- /dev/null +++ b/jrj/project/business/ProductSample/Product.SearchDlg.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/ProductLibrary4.cpp b/jrj/project/business/ProductSample/ProductLibrary4.cpp new file mode 100644 index 0000000..8dc02a4 --- /dev/null +++ b/jrj/project/business/ProductSample/ProductLibrary4.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/ProductLibraryItemMaint3.cpp b/jrj/project/business/ProductSample/ProductLibraryItemMaint3.cpp new file mode 100644 index 0000000..47027f6 --- /dev/null +++ b/jrj/project/business/ProductSample/ProductLibraryItemMaint3.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/ProductNewItem.cpp b/jrj/project/business/ProductSample/ProductNewItem.cpp new file mode 100644 index 0000000..68ad87b --- /dev/null +++ b/jrj/project/business/ProductSample/ProductNewItem.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/Quick.Input.NewProduct.cpp b/jrj/project/business/ProductSample/Quick.Input.NewProduct.cpp new file mode 100644 index 0000000..bb9dd11 --- /dev/null +++ b/jrj/project/business/ProductSample/Quick.Input.NewProduct.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/SampleAbnormal.cpp b/jrj/project/business/ProductSample/SampleAbnormal.cpp new file mode 100644 index 0000000..2181c49 --- /dev/null +++ b/jrj/project/business/ProductSample/SampleAbnormal.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/ShipmentNew.Sample3.cpp b/jrj/project/business/ProductSample/ShipmentNew.Sample3.cpp new file mode 100644 index 0000000..11a9ba6 --- /dev/null +++ b/jrj/project/business/ProductSample/ShipmentNew.Sample3.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/UserProductApply.cpp b/jrj/project/business/ProductSample/UserProductApply.cpp new file mode 100644 index 0000000..8cc1e31 --- /dev/null +++ b/jrj/project/business/ProductSample/UserProductApply.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/ViewPicturesEx.cpp b/jrj/project/business/ProductSample/ViewPicturesEx.cpp new file mode 100644 index 0000000..0ddd45f --- /dev/null +++ b/jrj/project/business/ProductSample/ViewPicturesEx.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/new.Sample3.cpp b/jrj/project/business/ProductSample/new.Sample3.cpp new file mode 100644 index 0000000..950630f --- /dev/null +++ b/jrj/project/business/ProductSample/new.Sample3.cpp Binary files differ diff --git a/jrj/project/business/ProductSample/outstorekind.Sample3.cpp b/jrj/project/business/ProductSample/outstorekind.Sample3.cpp new file mode 100644 index 0000000..3ee2566 --- /dev/null +++ b/jrj/project/business/ProductSample/outstorekind.Sample3.cpp Binary files differ diff --git a/jrj/project/total3/ViewEx1.total.cpp b/jrj/project/total3/ViewEx1.total.cpp new file mode 100644 index 0000000..f9d4a7a --- /dev/null +++ b/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; + } + }; +] \ No newline at end of file -- Gitblit v1.9.3