From 7123990b31c90e0767eb6cee50c92fa6459cea62 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期二, 25 六月 2024 23:28:18 +0800
Subject: [PATCH] Merge branch 'master' of http://116.62.18.175:6699/r/mis-prj
---
jrj/project/business/Supplier.maint.cpp | 99 ++++++++++++++++++---------------
jrj/project/business/Customer3.maint.cpp | 32 ++++++++++
jrj/project/business/Customer3.list.cpp | 11 +++
3 files changed, 97 insertions(+), 45 deletions(-)
diff --git a/jrj/project/business/Customer3.list.cpp b/jrj/project/business/Customer3.list.cpp
index 2531cf9..94c1c1b 100644
--- a/jrj/project/business/Customer3.list.cpp
+++ b/jrj/project/business/Customer3.list.cpp
@@ -379,6 +379,17 @@
OpenWindow(L"dev:xpage[maint.Document.Customer.v3.vx]", (LPARAM)&arg);
return 1;
}
+ if (comdid == L"action:bill.open")
+ {
+ xaserverarg& arg9 = *new xaserverarg;
+
+ arg9.AddArg(L"PartyID", dw_list.GetItemString(dw_list.GetRow(), L"PartyID"));
+ arg9.AddArg(L"CustomerGood", dw_list.GetItemString(dw_list.GetRow(), L"CustomerGood"));
+ arg9.AddArg(L"ApplyStatus", dw_list.GetItemString(dw_list.GetRow(), L"ApplyStatus"));
+
+ OpenWindow(L"dev:xpage[maint.Document.Customer.v3.vx]", (LPARAM)&arg9);
+ return 1;
+ }
if (comdid == L"action:bill.AnnexEx")
{
xaserverarg& arg4 = *new xaserverarg;
diff --git a/jrj/project/business/Customer3.maint.cpp b/jrj/project/business/Customer3.maint.cpp
index 9f9ba77..3be41ae 100644
--- a/jrj/project/business/Customer3.maint.cpp
+++ b/jrj/project/business/Customer3.maint.cpp
@@ -1087,6 +1087,32 @@
return 1;
}
+ int CustomerBase(xstring ID)
+ {
+ xml x;
+ xaserverarg arg;
+ arg.setNativePointer(arg.CreateInstance());
+ arg.AddArg(L"EntityID", ID);
+
+ if (getUrl(L"/sale/data/CustomerV3/entity/maint", arg.GetString(), x) != 1)
+ {
+ trace(x.text());
+ return -1;
+ }
+ else
+ {
+ dw_detail.Retrieve(x);
+ dw_detail.Redraw();
+ dw_Meetings.Retrieve(x);
+ dw_Meetings.Redraw();
+ dw_MeetingsEx.Retrieve(x);
+ dw_MeetingsEx.Redraw();
+ dw_visit.Retrieve(x);
+ dw_visit.Redraw();
+ }
+ return 1;
+ }
+
int onload()
{
maint::onload();
@@ -1189,10 +1215,16 @@
}
+
if (GetParam())
{
xaserverarg& args = *(xaserverarg * )GetParam();
+
+ if (args.GetArgString(L"PartyID") != L"")
+ {
+ CustomerBase(m_EntityID);
+ }
//alert(args.GetString());
xstring CustomerGood = args.GetArgString(L"CustomerGood");
ApplyStatus= args.GetArgString(L"CustomerGood");
diff --git a/jrj/project/business/Supplier.maint.cpp b/jrj/project/business/Supplier.maint.cpp
index ae00e89..699a072 100644
--- a/jrj/project/business/Supplier.maint.cpp
+++ b/jrj/project/business/Supplier.maint.cpp
@@ -4,6 +4,7 @@
#include <xcontrol/xlayersheet.hpp>
+
#include "vbusiness/vframe/maint.vframe.vbusiness.hpp"
#include "viewobject/view.base.hpp"
@@ -20,7 +21,15 @@
xlayersheet xsheet;
//xstring xpage;
xstring m_diffstr;
- vcontrol vc;
+
+public:
+ maintSupplierv3(void* implPtr, HWND hWnd) :maint(implPtr, hWnd) {}
+public:
+ static maintSupplierv3* CreateInstance(void* implPtr, void* hWnd)
+ {
+ maintSupplierv3* pWin = new maintSupplierv3(implPtr, (HWND)hWnd);
+ return pWin;
+ }
xstring str_replace(xstring s, xstring a, xstring b, int k)
{
@@ -29,12 +38,12 @@
{
xstring tmp;
if(i==0)
- tmp = b + s.mid(i + a.length()(), s.length()());
- else if (i + a.length()() == s.length()())
+ tmp = b + s.mid(i + a.length(), s.length());
+ else if (i + a.length() == s.length())
tmp = s.mid(0, i) + b;
else
- tmp = s.mid(0, i) + b + s.mid(i + a.length()(), s.length()());
- str_replace(tmp, a, b, i + b.length()() + 1);
+ tmp = s.mid(0, i) + b + s.mid(i + a.length(), s.length());
+ str_replace(tmp, a, b, i + b.length() + 1);
}
else
return L""+s;
@@ -47,7 +56,7 @@
int SetAttributeByxml(xml x,xstring nodename,xstring action,xstring status)
{
KXMLDOMElement e;
- KXMLDOMNodeList nlist = x.GetXmlDoc().selectNodes(L"//"+nodename+L"");
+ KXMLDOMNodeList nlist = x.selectNodes(L"//"+nodename+L"");
if(nlist)
{
@@ -1132,8 +1141,8 @@
if(value == L"鏌ョ湅")
{
arg.AddArg(L"src",dw.GetItemString(row,L"ImageList1"));
- int pa = arg.getNativePointer();
- openUrl(L"/sale/view/"+GetEntityName(1)+L"/xpage/supplierattachment/picture", pa);
+
+ openUrl(L"/sale/view/" + GetEntityName(1) + L"/xpage/supplierattachment/picture", &arg);
//alert(arg.GetArgString(L"src"));
dw.SetItemString(row,L"ImageList1",arg.GetArgString(L"src"));
}
@@ -1150,8 +1159,8 @@
//alert(value);
//xdwtable dw = dw_base.FindDwTable(L"item2",0);
//xdwtable dw1 = dw_base.FindDwTable(L"item3",0);
- xaserverarg arg=new xaserverarg;
- arg.setNativePointer(arg.CreateInstance());
+ xaserverarg& arg=*new xaserverarg;
+
/*if(value == L"涓婁紶闄勪欢")
{
@@ -1217,15 +1226,15 @@
{
arg.AddArg(L"entityid",dw_base.GetGuid(1));
arg.AddArg(L"ApplyStatus",dw_base.GetItemString(1,L"ApplyStatus"));
- int p3=cast(arg as int) ;
- OpenWindow(L"dev:xpage[maint.Document.Supplier.v3.vx]", p3);
+
+ OpenWindow(L"dev:xpage[maint.Document.Supplier.v3.vx]", (LPARAM)&arg);
}
if(value == L"楠屽巶鎶ュ憡闄勪欢")
{
arg.AddArg(L"entityid",dw_base.GetGuid(1));
arg.AddArg(L"ApplyStatus",dw_base.GetItemString(1,L"ApplyStatus"));
- int p7=cast(arg as int) ;
- OpenWindow(L"dev:xpage[maint.Document.SupplierEx.v3.vx]", p7);
+
+ OpenWindow(L"dev:xpage[maint.Document.SupplierEx.v3.vx]", (LPARAM)&arg);
}
else if(value == L"鍚堜綔淇℃伅")
{
@@ -1235,11 +1244,11 @@
}
if (colname1 == L"ThirdPartyReport")
{
- xaserverarg arg1 = new xaserverarg;
+ xaserverarg& arg1 = *new xaserverarg;
arg1.setNativePointer(arg.CreateInstance());
- int p2=cast(arg1 as int) ;
+
dw_base.SetItemString(1,L"ThirdPartyReport",L"");
- OpenWindow(L"dev:xpage[Inspection.Supplie.vx]", p2);
+ OpenWindow(L"dev:xpage[Inspection.Supplie.vx]", (LPARAM)&arg1);
xstring str1 = arg1.GetArgString(L"ThirdPartyReport");
if(str1 != L""){
dw_base.SetItemString(1,L"ThirdPartyReport",str1);
@@ -1248,10 +1257,10 @@
}
if (colname1 == L"PayType")
{
- xaserverarg arg2 = new xaserverarg;
+ xaserverarg& arg2 =* new xaserverarg;
arg2.setNativePointer(arg.CreateInstance());
- int p1=cast(arg2 as int) ;
- OpenWindow(L"dev:xpage[paymen.Supplier.vx]", p1);
+
+ OpenWindow(L"dev:xpage[paymen.Supplier.vx]", (LPARAM)&arg2);
xstring str = arg2.GetArgString(L"PayType");
if(str != L""){
dw_base.SetItemString(1,L"PayType",str);
@@ -1261,7 +1270,7 @@
return 1;
}
- int OnSheetChanged(ref TNotifyEvent evt,int p)
+ int OnSheetChanged(TEvent* evt, int p)
{
xstring suserid = xaserver::GetUserId();
PUser pp = publiccode::GetUser(suserid);
@@ -1279,7 +1288,7 @@
}
}
- int OnItemClickExS(ref TNotifyEvent evt,int p)
+ int OnItemClickExS(TEvent* evt, int p)
{
xdwtable dw = dw_visitp.FindDwTable(L"item4",0);
@@ -1288,7 +1297,7 @@
xstring value = hdr.data;
int row = hdr.row;
//alert(value);
- xaserverarg arg=new xaserverarg;
+ xaserverarg& arg=*new xaserverarg;
arg.setNativePointer(arg.CreateInstance());
if(value == L"闄勪欢涓婁紶")
@@ -1301,26 +1310,26 @@
arg.AddArg(L"entityid",dw.GetGuid(dw.GetRow()));
//arg.AddArg(L"ApplyStatus",dw_base.GetItemString(1,L"ApplyStatus"));
- int p4=cast(arg as int) ;
- OpenWindow(L"dev:xpage[maint.Document.Customer.v3.vx]", p4);
+
+ OpenWindow(L"dev:xpage[maint.Document.Customer.v3.vx]", (LPARAM)&arg);
return 1;
}
if(value == L"浜哄憳")
{
- xaserverarg arg2 = new xaserverarg;
+ xaserverarg& arg2 = *new xaserverarg;
arg2.setNativePointer(arg2.CreateInstance());
- xaserverarg parg2 = GetParam();
- OpenWindow(L"dev:xpage[SupplierUserGroupPersonSelect.vx]",cast(arg2 as int));
+
+ OpenWindow(L"dev:xpage[SupplierUserGroupPersonSelect.vx]", (LPARAM)&arg2);
if(arg2.GetArgString(L"comdid")==L"xmOk")
{
xstring data = arg2.GetArgString(L"data");
- xml x2 = new xml;
- x2.setNativePointer(xml::CreateInstance());
- x2.LoadXml(data);
- KXMLDOMNodeList nodes = x2.GetXmlDoc().selectNodes(L"/root/item");
- trace(x2.GetXml());
+ xml x2;
+
+ x2.loadXML(data);
+ KXMLDOMNodeList nodes = x2.selectNodes(L"/root/item");
+ trace(x2.xml());
int len = nodes.length();
@@ -1348,31 +1357,31 @@
int PostOnAttachEvent()
{
- AttachEvent(L"dw_base",L"DWV_CLICKED",OnItemClick);
- //AttachEvent(L"tab_1", L"LYSN_SELECTEDSHEET",OnSheetChanged);
- AttachEvent(L"dw_kpinfo",L"DWV_CLICKED",OnkpItemClick);
- AttachEvent(L"dw_kpinfo",L"DWV_ITEMCHANGED",OnItemChangedkp);
- AttachEvent(L"dw_base",L"DWV_ITEMCHANGED",OnItemChanged);
- AttachEvent(L"dw_basegy",L"DWV_ITEMCHANGED",OnItemChanged3);
- AttachEvent(L"dw_visitp",L"DWV_CLICKED",OnItemClickExS);
+ AttachEvent(L"dw_base",L"DWV_CLICKED", (FEvent)&maintSupplierv3::OnItemClick);
+ //AttachEvent(L"tab_1", L"LYSN_SELECTEDSHEET",(FEvent)&maintSupplierv3::OnSheetChanged);
+ AttachEvent(L"dw_kpinfo",L"DWV_CLICKED", (FEvent)&maintSupplierv3::OnkpItemClick);
+ AttachEvent(L"dw_kpinfo",L"DWV_ITEMCHANGED", (FEvent)&maintSupplierv3::OnItemChangedkp);
+ AttachEvent(L"dw_base",L"DWV_ITEMCHANGED", (FEvent)&maintSupplierv3::OnItemChanged);
+ AttachEvent(L"dw_basegy",L"DWV_ITEMCHANGED", (FEvent)&maintSupplierv3::OnItemChanged3);
+ AttachEvent(L"dw_visitp",L"DWV_CLICKED", (FEvent)&maintSupplierv3::OnItemClickExS);
return 1;
}
int OnInit()
{
- dw_base = this.GetControl(L"dw_base");
+ dw_base = GetControl(L"dw_base");
dw_base.SetColHeaderHeight(16);
- dw_kpinfo = this.GetControl(L"dw_kpinfo");
+ dw_kpinfo = GetControl(L"dw_kpinfo");
dw_kpinfo.SetColHeaderHeight(16);
- dw_visitp = this.GetControl(L"dw_visitp");
+ dw_visitp = GetControl(L"dw_visitp");
dw_visitp.SetColHeaderHeight(16);
//xdwtable dw_check = this.GetControl(L"dw_check");
//dw_check.SetColHeaderHeight(16);
//dw_check.SetReadOnly(true);
- dw_basegy = this.GetControl(L"dw_basegy");
- dw_supgoods = this.GetControl(L"dw_supgoods");
+ dw_basegy = GetControl(L"dw_basegy");
+ dw_supgoods = GetControl(L"dw_supgoods");
m_layer = GetControl(L"tab_1");
xsheet = GetControl(L"tab_1");
--
Gitblit v1.9.3