From 9f71fe1d6491522b3baf1966e5f0a24fd684076f Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期二, 25 二月 2025 16:12:19 +0800
Subject: [PATCH] update
---
jrj/project/printview/Template.Print.ViewEx.cpp | 32 +++++++++++++++-----------------
1 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/jrj/project/printview/Template.Print.ViewEx.cpp b/jrj/project/printview/Template.Print.ViewEx.cpp
index ebdaa3d..05da9f3 100644
--- a/jrj/project/printview/Template.Print.ViewEx.cpp
+++ b/jrj/project/printview/Template.Print.ViewEx.cpp
@@ -76,12 +76,10 @@
#endif
- xstring GetSaveFileName(xstring initFileName, xstring filter, xstring ext)
+ xstring GetMySaveFileName(xstring initFileName, xstring filter, xstring ext)
{
- wchar_t szFileName[255];
- wchar_t szPath[255];
- szFileName[0] = 0;
- szPath[0] = 0;
+ wchar_t szFileName[255] = { 0 };
+ wchar_t szPath[255] = { 0 };
if(initFileName !=L"")
{
@@ -95,10 +93,11 @@
}
int nFilterIndex = 1;
- OPENFILENAMEW ofn;
-
- ofn.lStructSize = 88;//sizeof(ofn);
- ofn.hwndOwner = 0;
+ OPENFILENAMEW ofn = { 0 };
+ //::ZeroMemory(&ofn,sizeof(OPENFILENAMEW))
+ //ofn.lStructSize = 88;//sizeof(ofn);
+ ofn.lStructSize = sizeof(ofn);
+ ofn.hwndOwner = GetHWND();
ofn.hInstance = 0;
ofn.lpstrFilter = filter;
//"JPEG 文件(*.jpg)\0*.jpg;*.jpeg;*.png;*.gif;*.bmp\0全部文件(*.*)\0*.*\0";
@@ -138,7 +137,7 @@
if(m_EntityName==L"SaleOrder") pre=L"PI";
if(m_EntityName==L"GDN3")pre=L"INV";
}
- xstring file1 = GetSaveFileName(pre+m_EntityNo+L".xlsx",
+ xstring file1 = GetMySaveFileName(pre+m_EntityNo+L".xlsx",
L"Excel1文件(*.xlsx)\0*.xlsx;*.xls\0Excel97文件(*.xls)\0*.xls\0PDF文件(*.pdf)\0*.pdf\0",
L"xlsx");
if(file1 ==L"") return 1;
@@ -420,7 +419,6 @@
xstring DownLoadPaperPic(xstring guid)
{
-
xstring path = xutil::GetModuleTmpPath();
xstring ext = L"jpg";
xstring filename = guid + L"." + ext;
@@ -511,15 +509,15 @@
xstring skuno = tail.mid(spos,pos1 - spos ).trim();
xstring CustomerID=L"";
xstring CustomerItemNo=L"";
- if(skuno.find(L",L")>0)
+ if(skuno.find(L",")>0)
{
- CustomerID = skuno.left(skuno.find(L",L")).trim();
- skuno = skuno.mid(skuno.find(L",L")+1,256).trim();
+ CustomerID = skuno.left(skuno.find(L",")).trim();
+ skuno = skuno.mid(skuno.find(L",")+1,256).trim();
}
- if(skuno.find(L",L")>0)
+ if(skuno.find(L",")>0)
{
- CustomerItemNo = skuno.left(skuno.find(L",L")).trim();
- skuno = skuno.mid(skuno.find(L",L")+1,256).trim();
+ CustomerItemNo = skuno.left(skuno.find(L",")).trim();
+ skuno = skuno.mid(skuno.find(L",")+1,256).trim();
}
xstring src = DownLoadSKUNoPic(skuno,CustomerID,CustomerItemNo);
head += tail.left(pos) + L"src=\"" + src;
--
Gitblit v1.9.3