From 52f9a10eb0a0b648032595905ace4af88bf17c15 Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期五, 06 九月 2024 17:57:48 +0800
Subject: [PATCH] update
---
jrj/project/business/SO3.maint.cpp | 47 +++++++++++++++++++++++++++++++++++++++--------
1 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/jrj/project/business/SO3.maint.cpp b/jrj/project/business/SO3.maint.cpp
index 0a1efb7..3132a61 100644
--- a/jrj/project/business/SO3.maint.cpp
+++ b/jrj/project/business/SO3.maint.cpp
@@ -9,6 +9,11 @@
#include "viewobject/saleorder.view.hpp"
#include "viewobject/quote.view.hpp"
+#include "jstring.hpp"
+#include "JFactory.hpp"
+#include "jobjectsvr.hpp"
+#include <memory>
+#include "JPtr.hpp"
class __declspec(dllexport) BaseMaintSOWin : public maint
{
xdwtable dw_props;
@@ -223,17 +228,34 @@
xstring colname = hdr->colname;
if (value == L"支付条款")
{
- //int p1 = vc.xdoc.getNativePointer();
- //openUrl(L"/sale/view/SaleOrder/xpage/payment", p1);
+ xaserverarg arg;
+ xml x;
+ dw_base.DwUpdateAllTo(x);
+ arg.SetArg(L"content", x.xml());
+ openUrl(L"/sale/view/SaleOrder/xpage/payment", (LPARAM)arg);
+ if (arg.GetArgString(L"process") == L"ok")
+ {
+ x.loadXML(arg.GetArgString(L"content"));
+ dw_base.Retrieve(x);
+ }
dw_base.AcceptText();
+ dw_base.Redraw();
return 1;
}
//交货期维护
if (value == L"交货期")
{
- //int p2 = vc.xdoc.getNativePointer();
- //openUrl(L"/sale/view/SaleOrder/xpage/delivery1", p2);
+ xaserverarg arg;
+ xml x;
+ dw_base.DwUpdateAllTo(x);
+ arg.SetArg(L"content", x.xml());
+ openUrl(L"/sale/view/SaleOrder/xpage/delivery1", (LPARAM)arg);
+ if (arg.GetArgString(L"process") == L"ok")
+ {
+ x.loadXML(arg.GetArgString(L"content"));
+ dw_base.Retrieve(x);
+ }
dw_base.AcceptText();
dw_base.Redraw();
return 1;
@@ -609,11 +631,10 @@
//str = str.trim();
//if(str==L"")
//{
- xaserverarg& arg = *new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
- arg.AddArg(L"HWND", xstring((__int64)GetHWND()));
+ xaserverarg arg;
+ arg.SetParam(L"HWND", GetHWND());
arg.AddArg(L"CustomerID", dw_base.GetItemString(1, L"CustomerID"));
- OpenWindow(L"dev:xpage[Product.Select.SO.vx]", (LPARAM)&arg);
+ OpenWindow(L"dev:xpage[Product.Select.SO.vx]", arg);
//OpenWindow(L"dev:xpage[Product.Select.vx]",cast(arg1 as int));
//}
//else
@@ -940,8 +961,16 @@
return 1;
}
+
int onload()
{
+ /*
+ using JFString = JFactory<JString>;
+ JPtr<JFString> jfString(JObjectSvr::CreateInstance<JFString>(L"JFactoryString"));
+ //auto jfString = JObjectSvr::CreateInstance<JFString>(L"JFactoryString");
+ JPtr<JString> pStr(jfString->make());
+ */
+
dw_props = GetControl(L"dw_props");
/*KXMLDOMDocument x = SaleOrderView::GetMaintFormForBase();
dw_props.SetDataObject(x);
@@ -1011,12 +1040,14 @@
if (SONo != L"")
{
KXMLDOMDocument x = SaleOrderView::GetMaintDataForBase(SONo);
+ BSTR str = (BSTR)x.xml();
dw_base.Retrieve(x);
dw_item.Retrieve(x);
}
else
{
KXMLDOMDocument x = ViewObject::RetrieveData(GetServerUrl(),L"/sale/data/SaleOrder/newinitial");
+ BSTR str = (BSTR)x.xml();
dw_base.Retrieve(x);
xstring sdate = publiccode::GetCurrentDate();
--
Gitblit v1.9.3