From 9b3b2eb20b09e13da837a28f16e552ba70a090c4 Mon Sep 17 00:00:00 2001 From: LiFan <2308045698@qq.com> Date: 星期四, 24 四月 2025 14:48:21 +0800 Subject: [PATCH] update --- jrj/project/business/VATNotify/simple.maint.vatnotify.cpp | 35 +++++++++++++++++++++-------------- 1 files changed, 21 insertions(+), 14 deletions(-) diff --git a/jrj/project/business/VATNotify/simple.maint.vatnotify.cpp b/jrj/project/business/VATNotify/simple.maint.vatnotify.cpp index c137345..a18d51e 100644 --- a/jrj/project/business/VATNotify/simple.maint.vatnotify.cpp +++ b/jrj/project/business/VATNotify/simple.maint.vatnotify.cpp @@ -45,7 +45,7 @@ return 1; } - xstring GetEntityData(int pr) + xstring GetEntityData(LPARAM pr) { xml x ; dw_item.AcceptText(); @@ -63,36 +63,42 @@ int OnPrint() { - xaserverarg& arg = *new xaserverarg; + xaserverarg arg; arg.AddArg(L"EntityName", L"VATNotify"); arg.AddArg(L"EntityID", L"", L""); xstring InvoiceNo = dw_item.GetItemString(dw_item.GetRow(), L"NInvoiceNo"); if (InvoiceNo == L"") InvoiceNo = dw_item.GetItemString(dw_item.GetRow(), L"InvoiceNo"); xstring SupplierID = dw_item.GetItemString(dw_item.GetRow(), L"SupplierID"); + xstring SupplierName = dw_item.GetItemString(dw_item.GetRow(), L"ShortName"); arg.AddArg(L"EntityNo", InvoiceNo, L""); + arg.AddArg(L"EntityNoEx", InvoiceNo, L""); arg.AddArg(L"SupplierID", SupplierID); arg.AddArg(L"VATNotifyID", L""); + arg.AddArg(L"SupplierName", SupplierName); - openUrl(L"/sale/view/view.base/xpage/Template/PrintViewEx", &arg); + openUrl(L"/sale/view/view.base/xpage/Template/PrintViewEx", arg); return 1; } int OnPrintItem() { - xaserverarg& arg = *new xaserverarg; + xaserverarg arg; arg.AddArg(L"EntityName", L"VATNotify", L""); arg.AddArg(L"EntityID", L"", L""); xstring InvoiceNo = dw_item.GetItemString(dw_item.GetRow(), L"NInvoiceNo"); if (InvoiceNo == L"") InvoiceNo = dw_item.GetItemString(dw_item.GetRow(), L"InvoiceNo"); xstring SupplierID = dw_item.GetItemString(dw_item.GetRow(), L"SupplierID"); + xstring SupplierName = dw_item.GetItemString(dw_item.GetRow(), L"ShortName"); arg.AddArg(L"EntityNo", InvoiceNo, L""); + arg.AddArg(L"EntityNoEx", InvoiceNo, L""); arg.AddArg(L"SupplierID", SupplierID); arg.AddArg(L"VATNotifyID", dw_item.GetGuid(dw_item.GetRow())); + arg.AddArg(L"SupplierName", SupplierName); trace(InvoiceNo + L"====L" + dw_item.GetGuid(dw_item.GetRow())); - openUrl(L"/sale/view/view.base/xpage/Template/PrintViewEx", &arg); + openUrl(L"/sale/view/view.base/xpage/Template/PrintViewEx", arg); return 1; } @@ -369,7 +375,7 @@ { xml x ; - xaserverarg arg = ViewObject::MakeArg(); + xaserverarg arg ; arg.AddArg(L"ClassifyID", ClassifyID); arg.AddArg(L"InvoiceNo", InvoiceNo); arg.AddArg(L"InvoiceExcept", InvoiceNoExcept); @@ -390,7 +396,7 @@ { xml x ; - xaserverarg arg = ViewObject::MakeArg(); + xaserverarg arg ; arg.AddArg(L"ClassifyID", ClassifyID); arg.AddArg(L"InvoiceNo", InvoiceNo); arg.AddArg(L"InvoiceExcept", InvoiceNoExcept); @@ -607,7 +613,7 @@ dw_item.AcceptText(); dw_item.DwUpdateAllToEx(x); - xaserverarg arg = ViewObject::MakeArg(); + xaserverarg arg ; arg.AddArg(L"content", x.xml()); @@ -730,10 +736,9 @@ { KXMLDOMElement e = lst.item(i); docElement.appendChild(e); - e.Release(); + } - docElement.Release(); - lst.Release(); + dw_fob.Retrieve(x1); } else @@ -779,7 +784,7 @@ if (GetWinParam()) { - int pArg = GetArg(); + arg = GetArg(); } else @@ -822,7 +827,7 @@ if (x == L"userInvoiceNo") //下拉 { xstring sInvoiceNo = dw_item.GetItemString(row, L"NInvoiceNo"); - hdr.data = sInvoiceNo; + hdr.data = sInvoiceNo.c_str(true); } return 1; @@ -830,6 +835,7 @@ int onload() { + SetArg(); dw_item = GetControl(L"dw_item"); dw_item.openUrl(L"/sale/view/VATNotify/template/VATNotify/item"); dw_item.SetColumnState(L"InvoiceNo", false); @@ -843,6 +849,7 @@ dw_item.SetColumnState(L"QtyUnitName", false); dw_item.SetColumnState(L"QtyUnit", false); dw_item.SetColumnState(L"CQtyUnit", false); + dw_item.SetColumnState(L"ShortName", false); dw_fob = GetControl(L"dw_fob"); dw_fob.openUrl(L"/sale/view/VATNotify/template/VATNotify/fob"); @@ -860,7 +867,7 @@ if (GetWinParam()) { - int pArg = GetArg(); + arg = GetArg(); InvNo = arg.GetArgString(L"invoiceno"); SetWindowText(GetHWND(), InvNo); -- Gitblit v1.9.3