From 69ca48293b089073a494c36faafaee3f0c83e7a4 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期五, 28 六月 2024 14:48:08 +0800
Subject: [PATCH] Merge branch 'master' of http://116.62.18.175:6699/r/mis-prj
---
jrj/project/business/Public/memo.edit.new.cpp | 0
jrj/project/business/SO/Product.FetchNo.cpp | 336 ++++++++++++++++++++++++++++
jrj/project/business/HR/AdministrativeDepartmentFolder.cpp | 4
jrj/project/business/SO/maint.Document.SO3.v3.cpp | 2
jrj/xframe/vbusiness/vframe/listwin.vframe.vbusiness.hpp | 4
jrj/project/business/Public/message.supplier.cpp | 0
jrj/project/business/SO3.list.cpp | 8
jrj/ext-jrj/ext-jrj.vcxproj | 15 +
jrj/project/business/Public/message.business.cpp | 0
jrj/ext-jrj/ext-jrj.vcxproj.filters | 18 +
jrj/project/business/SO/Apply.SOItem.cpp | 297 ++++++++++++++++++++++++
11 files changed, 676 insertions(+), 8 deletions(-)
diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj
index 1dba532..085ed5c 100644
--- a/jrj/ext-jrj/ext-jrj.vcxproj
+++ b/jrj/ext-jrj/ext-jrj.vcxproj
@@ -277,6 +277,15 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
+ <ClCompile Include="..\project\business\Public\memo.edit.new.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\project\business\Public\message.business.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\project\business\Public\message.supplier.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="..\project\business\quote.enquiry.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
</ClCompile>
@@ -290,6 +299,9 @@
<ClCompile Include="..\project\business\SO3.maint.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
</ClCompile>
+ <ClCompile Include="..\project\business\SO\Apply.SOItem.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="..\project\business\SO\delivery.base.maint.so.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
@@ -302,6 +314,9 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
+ <ClCompile Include="..\project\business\SO\Product.FetchNo.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="..\project\business\SO\Product.Select.SO.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
diff --git a/jrj/ext-jrj/ext-jrj.vcxproj.filters b/jrj/ext-jrj/ext-jrj.vcxproj.filters
index 2024dc4..991f934 100644
--- a/jrj/ext-jrj/ext-jrj.vcxproj.filters
+++ b/jrj/ext-jrj/ext-jrj.vcxproj.filters
@@ -61,6 +61,9 @@
<Filter Include="project\business\HR">
<UniqueIdentifier>{5f718d5a-c9c4-4438-95e8-b079e44db2aa}</UniqueIdentifier>
</Filter>
+ <Filter Include="project\business\Public">
+ <UniqueIdentifier>{84061804-77b3-4859-b7b2-60cfa03c9463}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h">
@@ -386,5 +389,20 @@
<ClCompile Include="..\project\business\HR\ManpowerFileWindow.cpp">
<Filter>project\business\HR</Filter>
</ClCompile>
+ <ClCompile Include="..\project\business\SO\Product.FetchNo.cpp">
+ <Filter>project\business\SO</Filter>
+ </ClCompile>
+ <ClCompile Include="..\project\business\Public\memo.edit.new.cpp">
+ <Filter>project\business\Public</Filter>
+ </ClCompile>
+ <ClCompile Include="..\project\business\Public\message.business.cpp">
+ <Filter>project\business\Public</Filter>
+ </ClCompile>
+ <ClCompile Include="..\project\business\Public\message.supplier.cpp">
+ <Filter>project\business\Public</Filter>
+ </ClCompile>
+ <ClCompile Include="..\project\business\SO\Apply.SOItem.cpp">
+ <Filter>project\business\SO</Filter>
+ </ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/jrj/project/business/HR/AdministrativeDepartmentFolder.cpp b/jrj/project/business/HR/AdministrativeDepartmentFolder.cpp
index 31ca6fa..be01a84 100644
--- a/jrj/project/business/HR/AdministrativeDepartmentFolder.cpp
+++ b/jrj/project/business/HR/AdministrativeDepartmentFolder.cpp
@@ -181,7 +181,9 @@
adid = L"";
parentid = L"";
- if (GetWinParam()) {
+ if (GetWinParam())
+ {
+ xaserverarg arg=GetArg();
parentid = arg.GetArgString(L"parentid");
adid = arg.GetArgString(L"adid");
}
diff --git a/jrj/project/business/Public/memo.edit.new.cpp b/jrj/project/business/Public/memo.edit.new.cpp
new file mode 100644
index 0000000..f9efb1f
--- /dev/null
+++ b/jrj/project/business/Public/memo.edit.new.cpp
Binary files differ
diff --git a/jrj/project/business/Public/message.business.cpp b/jrj/project/business/Public/message.business.cpp
new file mode 100644
index 0000000..83fd2aa
--- /dev/null
+++ b/jrj/project/business/Public/message.business.cpp
Binary files differ
diff --git a/jrj/project/business/Public/message.supplier.cpp b/jrj/project/business/Public/message.supplier.cpp
new file mode 100644
index 0000000..a1ea747
--- /dev/null
+++ b/jrj/project/business/Public/message.supplier.cpp
Binary files differ
diff --git a/jrj/project/business/SO/Apply.SOItem.cpp b/jrj/project/business/SO/Apply.SOItem.cpp
new file mode 100644
index 0000000..d6d273b
--- /dev/null
+++ b/jrj/project/business/SO/Apply.SOItem.cpp
@@ -0,0 +1,297 @@
+#include <wobject/xstring.hpp>
+#include <xcontrol/xtreeview.hpp>
+#include <xcontrol/xdwgrid.hpp>
+
+#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
+#include "viewobject/view.base.hpp"
+
+using xml = KXMLDOMDocument;
+
+ class __declspec(dllexport) ApplySOItem : public xframe
+ {
+ public:
+ ApplySOItem(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static ApplySOItem* CreateInstance(void* implPtr, void* hWnd)
+ {
+ ApplySOItem* pWin = new ApplySOItem(implPtr, (HWND)hWnd);
+ return pWin;
+ }
+
+ public:
+ xdwgrid dw_list;
+ xnode m_agentNode; //Agent Condition
+
+ 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 ProcessUsedArg(xaserverarg arg)
+ {
+ xstring EntityIDList = L"";
+ int ll_row = dw_list.GetNextSelectRow(1);
+ while (ll_row > 0 && ll_row <= dw_list.GetRowCount())
+ {
+ xstring id = dw_list.GetGuid(ll_row);
+ if (EntityIDList == L"") EntityIDList = id; else EntityIDList += L",L" + id;
+ ll_row = dw_list.GetNextSelectRow(ll_row + 1);
+ }
+ if (EntityIDList != L"") arg.AddArg(L"EntityID", EntityIDList);
+ //alert(EntityIDList);
+ return 1;
+ }
+
+ xstring GetEntityName(int pr)
+ {
+ return L"SaleItem3";
+ }
+
+ xstring GetEntityID(int pr)
+ {
+ int row = dw_list.GetRow();
+ xstring id = dw_list.GetGuid(row);
+ return id;
+ }
+
+ int ViewUpdate(int pr, xstring updateItem, xaserverarg arg)
+ {
+ if (updateItem == L"del")
+ {
+ int DelRow = dw_list.GetRow();
+ dw_list.DeleteRow(DelRow);
+ return 1;
+ }
+ else if (updateItem == L"setstate")
+ {
+ int row = dw_list.GetRow();
+ if (row < 1) return 1;
+
+ if (arg.GetArgString(L"billstatus") != L"")
+ {
+ xstring billstatus = arg.GetArgString(L"billstatus");
+ xstring statusName = GetBillStatusName(billstatus);
+ dw_list.SetItemString(row, L"ChkState", billstatus);
+ dw_list.SetItemDisplayString(row, L"ChkState", statusName);
+ }
+ dw_list.Redraw();
+ }
+ return 1;
+ }
+
+ //焦点激活处理函数
+ int OnSetFocus(TEvent* evt, LPARAM p)
+ {
+ //重置工具条
+ SetAgent();
+ return 1;
+ }
+
+
+ /*
+ int OnApply()
+ {
+ int row = dw_list.GetNextSelectRow(1);
+ if(row < 1) return 1;
+
+ while (row>0)
+ {
+ dw_list.SetItemString(row,L"ChkState",L"2");
+ row = dw_list.GetNextSelectRow(row + 1);
+ }
+ if(OnSave()==1)
+ {
+ xaserverarg arg = new xaserverarg;
+ arg.setNativePointer(arg.CreateInstance());
+ xml x = new xml;
+ x.setNativePointer(x.CreateInstance());
+
+ arg.AddArg(L"FlowID",L"1A83D53D-DD12-4FDB-A274-FA8D5982AB53");
+ arg.AddArg(L"Category",L"PurchesItem3");
+ arg.AddArg(L"Reciever",L"admin");
+ arg.AddArg(L"Status",L"业务审核");
+
+ xaserverarg parg = GetParam();
+ xstring SONo = parg.GetArgString(L"SONo");
+
+ row = dw_list.GetNextSelectRow(1);
+ while (row>0)
+ {
+ arg.AddArg(L"EntityID",dw_list.GetGuid(row));
+ arg.AddArg(L"EntityNo",dw_list.GetItemString(row,L"GoodsNo"));
+ arg.AddArg(L"Subject",L"请核准订单"+SONo+L"采购数据,货号为"+dw_list.GetItemString(row,L"GoodsNo"));
+
+ if(url::get(L"/sale/data/PurchaseOrder/task/add", arg.GetString(),x)!=1)
+ {
+ xstring error = x.GetXmlDoc().text;
+ alert(error);
+ return -1;
+ }else
+ {
+ trace(x.GetXml());
+ }
+ row = dw_list.GetNextSelectRow(row + 1);
+ }
+
+ alert(L"提交成功");
+ }
+ return 1;
+ }
+ */
+ int OnAskGoodsNo()
+ {
+ int rowCount = dw_list.GetRowCount();
+ xstring skunos = L"";
+ xstring GoodsNo1 = dw_list.GetItemString(dw_list.GetRow(), L"GoodsNo");
+ xstring GoodsNo2 = GoodsNo1.mid(0, 1);
+ xstring GoodsNo3 = GoodsNo1.mid(1, 1);
+ xstring GoodsNo4 = GoodsNo1.mid(2, 1);
+
+ for (int i = 1; i <= rowCount; i++)
+ {
+ if (dw_list.GetItemString(i, L"SKUNo") != L"" && dw_list.GetItemString(i, L"GoodsNo") == L"" || GoodsNo1.find(L"N") >= 0
+ || GoodsNo1.find(L"n") >= 0 || GoodsNo4.isNumber() == false && GoodsNo2.isNumber() == true && GoodsNo3.isNumber() == true)
+ {
+ if (skunos == L"")
+ skunos = dw_list.GetItemString(i, L"SKUNo");
+ else
+ skunos += L",L" + dw_list.GetItemString(i, L"SKUNo");
+ }
+ }
+ xaserverarg arg ;
+ arg.AddArg(L"SKUNoList", skunos);
+ OpenWindow(L"dev:xpage[Product.FetchNo.vx]", arg);
+ return 1;
+ }
+ //命令发布函数
+ int OnCmdDispatch(xstring comdid)
+ {
+ if (comdid == L"xmCancel")
+ {
+ CloseWindow();
+ return 1;
+ }
+ else if (comdid == L"xmAskGoodsNo")
+ {
+ OnAskGoodsNo();
+ }
+ //else if(comdid==L"xmApply") return OnApply();
+ else if (comdid.find(L"action:", 0) >= 0)
+ {
+ xstring GoodsNo = dw_list.GetItemString(dw_list.GetRow(), L"GoodsNo");
+ xstring GoodsNo2 = GoodsNo.mid(0, 2);
+ xstring GoodsNo4 = GoodsNo.mid(2, 1);
+
+ if (GoodsNo == L"")
+ {
+ alert(L"公司货号未指定");
+ return 0;
+ }
+ if (GoodsNo.find(L"N") >= 0 || GoodsNo.find(L"n") >= 0) {
+ alert(L"公司货号带有N");
+ return 0;
+ }
+ if (GoodsNo4 >= L"A" && GoodsNo4 <= L"z" && GoodsNo2 >= L"22" && GoodsNo2 <= L"99")
+ {
+ alert(L"公司货号为新品货号");
+ return 0;
+ }
+ xstring CType = dw_list.GetItemString(dw_list.GetRow(), L"CType");
+
+ if (CType == L"")
+ {
+ alert(L"客户合同附件未上传!");
+ return 0;
+ }
+ int ret = ProcessFlowAction(comdid, 1);
+ return ret;
+ }
+ return 0;
+ }
+
+ //命令处理事件
+ int OnXCommand(TEvent* evt, LPARAM p)
+ {
+ return OnCmdDispatch(evt->xcommand.pStrID);
+ }
+
+ int OnAttachEvent()
+ {
+ //绑定工具条点击事件
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&ApplySOItem::OnXCommand);
+ //获取焦点事件,用于重置工具条
+ //AttachEvent(L"WM_SETFOCUS",OnSetFocus);
+ return 1;
+ }
+
+ int OnRetrieve()
+ {
+ xml x;
+ xaserverarg arg=GetArg();
+
+ arg.AddArg(L"id", arg.GetArgString(L"EntityNo"));
+ if (getUrl(L"/sale/data/SaleOrder/maint/item", arg.GetString(), x) != 1)
+ {
+ //trace(x.GetXmlDoc().text);
+ return -1;
+ }
+ else
+ {
+ dw_list.Retrieve(x);
+ dw_list.Redraw();
+ }
+ dw_list.SetReadOnly(true);
+ dw_list.SetSelectionMode(3);
+
+ return 1;
+ }
+
+ int onload()
+ {
+
+
+ dw_list = GetControl(L"dw_list");
+ dw_list.openUrl(L"/sale/view/SaleOrder/template/item");
+ dw_list.SetReadOnly(true);
+ dw_list.SetColumnState(L"EnquiryPriceListID", false);
+ dw_list.SetColumnState(L"ItemID", false);
+ dw_list.SetColumnState(L"LineType", false);
+ dw_list.SetColumnState(L"Assortment", false);
+ dw_list.SetColumnState(L"ClassifyID", false);
+ dw_list.SetColumnState(L"UnitFreight", false);
+ dw_list.SetColumnState(L"CName", false);
+ dw_list.SetColumnState(L"QuoteLineID", false);
+ dw_list.SetColumnState(L"POSupplierID", false);
+ dw_list.SetColumnState(L"Submitter", false);
+ dw_list.SetColumnState(L"ScheduleShipDate", false);
+ OnAttachEvent();
+
+ SetArg();
+ OnRetrieve();
+
+ return 1;
+ }
+
+ int onloaded()
+ {
+ //SetAgent();
+
+ return 1;
+ }
+ };
\ No newline at end of file
diff --git a/jrj/project/business/SO/Product.FetchNo.cpp b/jrj/project/business/SO/Product.FetchNo.cpp
new file mode 100644
index 0000000..4b837d9
--- /dev/null
+++ b/jrj/project/business/SO/Product.FetchNo.cpp
@@ -0,0 +1,336 @@
+#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) ProductFetchNoWin : public xframe
+ {
+ public:
+ xdwgrid dw_list;
+
+ xnode m_agentNode; //Agent Condition
+ public:
+ ProductFetchNoWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {}
+ public:
+ static ProductFetchNoWin* CreateInstance(void* implPtr, void* hWnd)
+ {
+ ProductFetchNoWin* pWin = new ProductFetchNoWin(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 OnRowChanged(TEvent* evt, LPARAM p)
+ {
+ DWNMHDR& hdr = *(DWNMHDR*)evt->notify.pnmh;
+ int row = hdr.row;
+
+ /*
+ htmlctrl xs = GetControl(L"html_detail");
+ xstring html = makeHtml(row);
+ xs.SetContent(html);
+ xs.Redraw();
+
+ xstring id = g_xdoc_product.getData(0,L"data/Item",row,L"@guid");
+ OnShowImage(id);
+ */
+
+ return 1;
+ }
+
+ //焦点激活处理函数
+ int OnSetFocus(TEvent* evt, LPARAM p)
+ {
+ //重置工具条
+ //SetAgent();
+ return 1;
+ }
+
+ int SendNotice()
+ {
+ xaserverarg arg;
+
+ if (dw_list.GetRowCount() < 1) return 1;
+ xstring Subject = L"编号:" + dw_list.GetItemString(dw_list.GetRow(), L"SKUNo") + L" 品名:" + dw_list.GetItemString(dw_list.GetRow(), L"CName") + L",申请货号";
+ xstring EntityID = dw_list.GetItemString(dw_list.GetRow(), L"SKUID");
+ xstring EntityNo = dw_list.GetItemString(dw_list.GetRow(), L"SKUNo");
+ xstring Category = L"货号申请";
+ xstring Reciever = L"00908";
+ xstring Content = L"";
+ //alert(L"EntityID:"+EntityID);
+ xml x = ViewObject::AddMessage(Category, Reciever, EntityNo, EntityID, Subject, Content);
+ return 1;
+ }
+
+ int OnSubmit()
+ {
+ dw_list = GetControl(L"dw_list");
+ if (dw_list.GetRowCount() < 1) return 0;
+ xml x;
+
+ dw_list.DwUpdateAllToEx(x);
+ xstring error = L"";
+ xaserverarg arg;
+
+ arg.AddArg(L"content", x.xml());
+ if (xurl::get(L"/sale/data/ProductLibrary3/update/product/askgoodsno", arg.GetString(), x) != 1)
+ {
+ xstring error = x.text();
+ trace(error);
+ }
+ else
+ {
+ if (error.find(L"error") >= 0)
+ alert(L"提交失败");
+ else
+ alert(L"提交成功!");
+ SendNotice();
+ }
+ return 1;
+ }
+
+ /*
+ xstring makeHtml(int row)
+ {
+ xstring id = g_xdoc_product.getData(0,L"data/Item",row,L"@guid");
+ xml x = GetGoodsPropList(id);
+ xml x1 = GetGoodsPropListEx(id);
+
+ xstring html=L"<html><style> .text{ font-weight:400} .label { font-weight:400;}</style><body style='margin:2;background-color:#ccdccc none #f0f0f0 none'>";
+ html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >编号:</span><span style='width:90;font-size:10pt'>" + dw_list.GetItemString(row,L"SKUNo")+
+ "</span> <span style='font-weight:700;width:50;font-size:10pt' >类项:</span><span style='width:90;font-size:10pt'>" + dw_list.GetItemString(row,L"RefNo")+
+ "</span></div>";
+ html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >公司型号:</span><span style='width:90;font-size:10pt'>" + dw_list.GetItemString(row,L"GoodsNo")+
+ "</span></div>" ;
+ html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >品名:</span><span style='width:90;font-size:10pt'>" + dw_list.GetItemString(row,L"CName")+
+ "</span></div>" ;
+ if(dw_list.GetItemString(row,L"CSpec")!=L"")
+ html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >规格:</span><span style='width:90;font-size:10pt'>" + dw_list.GetItemString(row,L"CSpec")+
+ "</span></div>" ;
+
+ KXMLDOMNodeList fieldsEx = x1.GetXmlDoc().selectNodes(L"data/field");
+ xstring ls_detail=L"";
+ xstring ls_item =L"";
+ xstring name;
+ xstring label;
+ int len = fieldsEx.length;
+ int i= 0;
+
+ for(i=0;i<len; true)
+ {
+ int cnt = 0;
+ ls_item = L"";
+ while(cnt < 2)
+ {
+ name = fieldsEx.item(i).selectSingleNode(L"@name").text;
+ label = fieldsEx.item(i).selectSingleNode(L"@label").text;
+ ls_item += L"<td>" + label + L"</td>" + L"<td style='text-align:center'>" + g_xdoc_product.getData(0,L"data/Item",row,name) + L"</td>" ;
+ cnt++;
+ i++;
+ if(i ==len)break;
+ }
+ ls_detail += L"<tr>" + ls_item + L"</tr>";
+ }
+ html += L"<div style='margin-left:8px;margin-right:16px;'>" +
+ +L"<table><colgroup span='1' width='70'/><colgroup span='1' width='120'/><colgroup span='1' width='70'/><colgroup span='1' width='120'/>"
+ + ls_detail
+ +L"</table>"
+ +L"</div>" ;
+
+ xstring ls_star=L"";
+ KXMLDOMNodeList fields = x().selectNodes(L"data/field");
+ len = fields.length;
+
+ ls_detail = L"";
+ if(len > 0)
+ html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >技术要求:</span></div>" ;
+ for(i=0;i<len; true)
+ {
+ ls_item=L"";
+
+ int count = 0;
+ while(count < 2)
+ {
+ name = fields.item(i).selectSingleNode(L"@name").text;
+ label = fields.item(i).selectSingleNode(L"@label").text;
+ if(name==L"QualityTerm" || name==L"PackTerm" || label==L"质量" || label==L"包装质量" || label==L"技术要求")
+ {
+ i++;
+ if(i >= len)count = 2;
+ continue;
+ }
+ else if(g_xdoc_product.getData(0,L"data/Item",row,name)==L"")
+ {
+ KXMLDOMNodeList options = fields.item(i).selectNodes(L"item");
+ int tlen = options.length;
+ xstring terms = L"" ;
+ for(int k=0; k<tlen; k++)
+ {
+ if(options.item(k).text)
+ {
+ if(k>0) terms += L", L";
+ terms += L"[" + options.item(k).text +L"]";
+ }
+ }
+ ls_star += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >" + label +L"*:</span><span style='width:90;font-size:10pt'>" + terms + L"</span></div>" ;
+ }else
+ {
+ ls_item = L"<td>" + label + L"</td>" + L"<td>" + g_xdoc_product.getData(0,L"data/Item",row,name) + L"</td>" ;
+ count++;
+ }
+ i++;
+ if(i >= len)count = 2;
+ }
+ ls_item = L"<tr>" + ls_item + L"</tr>";
+ ls_detail += ls_item;
+ }
+
+ html += L"<div style='margin-left:8px;margin-right:16px;'>" +
+ +L"<table><colgroup span='1' width='70'/><colgroup span='1' width='120'/><colgroup span='1' width='70'/><colgroup span='1' width='120'/>"
+ + ls_detail
+ +L"</table>"
+ +L"</div>" ;
+ if(dw_list.GetItemString(row,L"QualityTerm")!=L"")
+ {
+ html += L"<div style='height:12px'/>";
+ html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >质量:</span></div>" ;
+ html += L"<div ><span style='margin-left:8px;margin-right:16px;font-weight:400;font-size:10pt' >" + dw_list.GetItemString(row,L"QualityTerm") + L"</span></div>" ;
+ }
+
+ if(dw_list.GetItemString(row,L"PackTerm")!=L"")
+ {
+ html += L"<div style='height:12px'/>";
+ html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >包装质量:</span></div>" ;
+ html += L"<div ><span style='margin-left:8px;margin-right:16px;font-weight:400;font-size:10pt' >" + dw_list.GetItemString(row,L"PackTerm") + L"</span></div>" ;
+ }
+
+ if(g_xdoc_product.getData(0,L"data/Item",row,L"Remark")!=L"")
+ {
+ //html += L"<div style='height:12px'/>";
+ html += L"<div ><span style='font-weight:700;width:50;font-size:10pt' >备注:</span></div>" ;
+ html += L"<div ><span style='margin-left:8px;margin-right:16px;font-weight:400;font-size:10pt' >" + g_xdoc_product.getData(0,L"data/Item",row,L"Remark") + L"</span></div>" ;
+ }
+
+ html += L"<div style='height:24px'/>";
+
+ //星标项
+ html += ls_star;
+
+
+ html += L"</body></html>";
+ //trace(html);
+ return html;
+ }
+ */
+
+ //命令发布函数
+ int OnCmdDispatch(xstring comdid)
+ {
+ if (comdid == L"xmSubmit")
+ {
+ return OnSubmit();
+ }
+ if (comdid == L"xmCancel")
+ {
+ CloseWindow();
+ return 1;
+ }
+ return 0;
+ }
+
+ //命令处理事件
+ int OnXCommand(TEvent* evt, LPARAM p)
+ {
+ return OnCmdDispatch(evt->xcommand.pStrID);
+ }
+
+ int OnAttachEvent()
+ {
+ AttachEvent(L"dw_list", L"DWV_ROWFOCUSCHANGED", (FEvent)&ProductFetchNoWin::OnRowChanged);
+ //绑定工具条点击事件
+ AttachEvent(L"WM_XCOMMAND", (FEvent)&ProductFetchNoWin::OnXCommand);
+ //获取焦点事件,用于重置工具条
+ AttachEvent(L"WM_SETFOCUS", (FEvent)&ProductFetchNoWin::OnSetFocus);
+ }
+
+ /*
+ int OnRetrieve()
+ {
+ xml x = new.xml();
+ x.setNativePointer(xml::CreateInstance());
+ xaserverarg arg = new xaserverarg;
+ arg.setNativePointer(arg.CreateInstance());
+ arg.AddArg(L"xxx",L"xxx");
+ if (getUrl(L"",arg.GetString(),x)!=1)
+ {
+ trace(x().text);
+ return -1;
+ }else
+ {
+ //dw_list.Retrieve(x);
+ //dw_list.Redraw();
+ }
+ return 1;
+ }
+ */
+
+ int onload()
+ {
+ dw_list = GetControl(L"dw_list");
+ dw_list.SetDataObject(ProductLibraryView::GetMaintListForm3(L"").GetXmlDoc());
+ dw_list.SetColumnState(L"SKUID", false);
+ dw_list.SetColumnState(L"category1", false);
+ dw_list.SetColumnState(L"Submitter1", false);
+
+ if (GetWinParam())
+ {
+ xaserverarg arg;
+ xml x;
+
+ if (xurl::get(L"/sale/data/ProductLibrary3/data/list/skunolist", arg.GetString(), x) != 1)
+ {
+ xstring error = x.text();
+ trace(error);
+ }
+ else
+ {
+ //alert(x.GetXml());
+ dw_list.Retrieve(x);
+ }
+ }
+ OnAttachEvent();
+ dw_list.SetReadOnly(true);
+
+ return 1;
+ }
+
+ int onloaded()
+ {
+ //SetAgent();
+
+ return 1;
+ }
+ };
\ No newline at end of file
diff --git a/jrj/project/business/SO/maint.Document.SO3.v3.cpp b/jrj/project/business/SO/maint.Document.SO3.v3.cpp
index e35dd11..321df57 100644
--- a/jrj/project/business/SO/maint.Document.SO3.v3.cpp
+++ b/jrj/project/business/SO/maint.Document.SO3.v3.cpp
@@ -454,7 +454,7 @@
if (GetWinParam())
{
- xaserverarg arg;
+ xaserverarg arg= GetArg();
entityid = arg.GetArgString(L"entityid");
Type = arg.GetArgString(L"Type");
ApprovalStatus = arg.GetArgString(L"ApprovalStatus");
diff --git a/jrj/project/business/SO3.list.cpp b/jrj/project/business/SO3.list.cpp
index 6056ff2..c75d8cc 100644
--- a/jrj/project/business/SO3.list.cpp
+++ b/jrj/project/business/SO3.list.cpp
@@ -285,12 +285,12 @@
return 1;
}
- int PreOnCmdDispatch(string comdid)
+ int PreOnCmdDispatch(xstring comdid)
{
if (comdid == L"action:bill.new")
{
- string s = publiccode::GetUser().id;
- string no = publiccode::GetUser().no;
+ xstring s = publiccode::GetUser().id;
+ xstring no = publiccode::GetUser().no;
if (no != L"00303" && no != L"admin")
{
KXMLDOMDocument supplier_x = ViewObject::RetrieveData(GetServerUrl(),L"/sale/data/SupplierV3/entity/FindBySaleType", L"id", s);
@@ -306,7 +306,7 @@
}
if (comdid == L"action:bill.annex")
{
- string deptname = publiccode::GetUser().deptname;
+ xstring deptname = publiccode::GetUser().deptname;
if (deptname == L"采购部")
{
return 1;
diff --git a/jrj/xframe/vbusiness/vframe/listwin.vframe.vbusiness.hpp b/jrj/xframe/vbusiness/vframe/listwin.vframe.vbusiness.hpp
index 72246ac..7d3007d 100644
--- a/jrj/xframe/vbusiness/vframe/listwin.vframe.vbusiness.hpp
+++ b/jrj/xframe/vbusiness/vframe/listwin.vframe.vbusiness.hpp
@@ -406,13 +406,13 @@
return 1;
}
- virtual int PreOnCmdDispatch(string comdid)
+ virtual int PreOnCmdDispatch(xstring comdid)
{
//返回0——不在执行以下代码;返回其他——执行以下代码。
return 1;
}
- virtual int PostOnCmdDispatch(string comdid)
+ virtual int PostOnCmdDispatch(xstring comdid)
{
// trace("test");
return 1;
--
Gitblit v1.9.3