From abc00124a405f68609416eac5124971ef56fd566 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期三, 18 九月 2024 11:56:54 +0800
Subject: [PATCH] Merge branch 'master' of http://116.62.18.175:6699/r/mis-prj
---
jrj/project/business/QuoteFile.cpp | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/jrj/project/business/QuoteFile.cpp b/jrj/project/business/QuoteFile.cpp
index dba2d82..8cc020a 100644
--- a/jrj/project/business/QuoteFile.cpp
+++ b/jrj/project/business/QuoteFile.cpp
@@ -507,10 +507,9 @@
xaserverarg argx;
argx.AddArg(L"QuoteNo", dw_base.GetItemString(1, L"QuoteNo"));
- int p1 = argx;
if (dw_base.GetItemString(1, L"QuoteNo") != L"")
{
- OpenWindow(L"dev:xpage[xmQuoteBillList.vx]", p1);
+ OpenWindow(L"dev:xpage[xmQuoteBillList.vx]", argx);
}
if (argx.GetArgString(L"action") != L"ok") return 1;
@@ -4724,6 +4723,21 @@
return 1;
}
+ xstring GetTryFirstAttr(xstring str, xstring term)
+ {
+ xstring foundStr = L" " + term + L"=";
+ wchar quote = L'"';
+ int pos = str.find(foundStr);
+ if (pos < 0) return L"";
+ pos += foundStr.length();
+ while (str.at(pos) == L' ')pos++;
+ if (str.at(pos) == L'\'')quote = L'\'';
+ int epos = ++pos;
+ while (str.at(epos) && str.at(epos) != quote)epos++;
+ if (!str.at(epos))return L"";
+ return str.mid(pos, epos - pos);
+ }
+
int onload()
{
SetArg();
@@ -4755,7 +4769,11 @@
x.loadXML(templ);
*/
action = L"purch";
-
+ action = GetTryFirstAttr(templ, L"action");
+ if (action == L"") action = L"purch";
+ entityItemID = GetTryFirstAttr(templ, L"TemplateItemID");
+ if (entityItemID == L"")entityItemID = GetTryFirstAttr(templ, L"ItemID");
+#if 0
if (templ.find(L"action=\"") >= 0)
{
action = templ.mid(templ.find(L"action=\"") + 8, templ.find(L"\"", templ.find(L"action=\"") + 8) - (templ.find(L"action=\"") + 8));
@@ -4772,7 +4790,7 @@
entityItemID = templ.mid(templ.find(L" ItemID=\"") + 9, templ.find(L"\"", templ.find(L" ItemID=\"") + 9) - (templ.find(L" ItemID=\"") + 9));
}
}
-
+#endif
/*action = x.documentElement.getAttribute(L"action");
if(action==L"") action=L"purch";
entityItemID = x.documentElement.getAttribute(L"TemplateItemID");
--
Gitblit v1.9.3