BeautifySkinFrom2.cpp 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725
  1. // BeautifySkinFrom2.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "BeautifySkinFrom2.h"
  6. #include "MyMdi.H"
  7. #include "ModifyDinDan.h"
  8. #include "ImportPhoto.h"
  9. #include "ShowPic.h"
  10. #include "SelectPhotoDlg.h"
  11. #include "./helper/ffsco.h"
  12. #include "ShowCut.h"
  13. #include "CompressOption.h"
  14. #include "NetShareInfo.h"
  15. #include "DlgChuXiuInfo.h"
  16. #ifdef _DEBUG
  17. #define new DEBUG_NEW
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21. IMPLEMENT_DYNCREATE(BeautifySkinFrom2, MyFormView)
  22. BeautifySkinFrom2::BeautifySkinFrom2(): MyFormView(BeautifySkinFrom2::IDD)
  23. {
  24. m_filter = _T("");
  25. m_nAdd = 0;
  26. if (g_bAllBranch)
  27. {
  28. m_nAdd = 1;
  29. }
  30. }
  31. BeautifySkinFrom2::~BeautifySkinFrom2()
  32. {
  33. }
  34. void BeautifySkinFrom2::DoDataExchange(CDataExchange* pDX)
  35. {
  36. MyFormView::DoDataExchange(pDX);
  37. DDX_Control(pDX, IDC_COMBO1, m_combo1);
  38. DDX_Control(pDX, IDC_LIST2, m_FurtherList);
  39. DDX_Control(pDX, IDC_STATIC1, m_static1);
  40. DDX_CBString(pDX, IDC_COMBO1, m_filter);
  41. }
  42. BEGIN_MESSAGE_MAP(BeautifySkinFrom2, MyFormView)
  43. ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
  44. ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
  45. ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
  46. ON_WM_TIMER()
  47. ON_BN_CLICKED(IDC_BUTimportphoto, OnBUTimportphoto)
  48. ON_BN_CLICKED(IDC_BUTshowphoto, OnBUTshowphoto)
  49. ON_BN_CLICKED(IDC_BUTexportphoto, OnBUTexportphoto)
  50. ON_BN_CLICKED(IDC_BUTexportphoto2, OnBUTexportphoto2)
  51. ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
  52. ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST2, OnItemchangedList2)
  53. ON_NOTIFY(NM_CLICK, IDC_LIST2, OnClickList2)
  54. ON_BN_CLICKED(IDC_BTNSEARCHFILTER, OnBtnsearchfilter)
  55. ON_BN_CLICKED(IDC_BUTprint3, OnBUTprint3)
  56. END_MESSAGE_MAP()
  57. #ifdef _DEBUG
  58. void BeautifySkinFrom2::AssertValid() const
  59. {
  60. MyFormView::AssertValid();
  61. }
  62. void BeautifySkinFrom2::Dump(CDumpContext& dc) const
  63. {
  64. MyFormView::Dump(dc);
  65. }
  66. #endif
  67. void BeautifySkinFrom2::OnInitialUpdate()
  68. {
  69. MyFormView::OnInitialUpdate();
  70. CMyMdi Mdi;
  71. Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
  72. CRect rc2;
  73. GetWindowRect(rc2);
  74. ::MoveWindow(m_hWnd, g_rc.left, g_rc.top, g_rc.Width(), g_rc.Height(), TRUE);
  75. EnumChildWindows(m_hWnd, (WNDENUMPROC)EnumChildProc, 0);
  76. int idarray[] = { IDC_BUTprint3, IDC_BUTexportphoto, IDC_BUTimportphoto, IDC_BUTshowphoto, IDC_BUTexportphoto2, IDC_BUTclose };
  77. int idcount = 6;
  78. int btnwid;
  79. CRect prerc;
  80. for (int a = idcount - 2; a >= 0; a--)
  81. {
  82. GetDlgItem(idarray[a + 1])->GetWindowRect(prerc);
  83. ScreenToClient(prerc);
  84. GetDlgItem(idarray[a])->GetWindowRect(rc2);
  85. ScreenToClient(rc2);
  86. btnwid = rc2.Width();
  87. rc2.right = prerc.left;
  88. rc2.left = rc2.right - btnwid;
  89. GetDlgItem(idarray[a])->MoveWindow(rc2);
  90. }
  91. m_static1.SetFont(&g_titlefont);
  92. if (g_bAllBranch == 0)
  93. {
  94. #ifdef CHILD_VERSION
  95. m_FurtherList.SetHeadings("订单号,100;家长姓名,100;宝宝姓名,100;修片,100;选片,100;选片日期,100;精修,100;精修日期,100;设计,100;看设计日期,100;加急,100;取件日期,100;修片人,100;精修人,100;接单人,100;套系名称,100;套系价格,100;手机,100;固定电话,100");
  96. #else
  97. m_FurtherList.SetHeadings("订单号,100;男宾姓名,100;女宾姓名,100;修片,100;选片,100;选片日期,100;精修,100;精修日期,100;设计,100;看设计日期,100;加急,100;取件日期,100;修片人,100;精修人,100;接单人,100;套系名称,100;套系价格,100;男宾电话,100;女宾电话,100");
  98. #endif
  99. m_FurtherList.LoadColumnInfo(122);
  100. }
  101. else
  102. {
  103. #ifdef CHILD_VERSION
  104. m_FurtherList.SetHeadings("店名,100;订单号,100;家长姓名,100;宝宝姓名,100;修片,100;选片,100;选片日期,100;精修,100;精修日期,100;设计,100;看设计日期,100;加急,100;取件日期,100;修片人,100;精修人,100;接单人,100;套系名称,100;套系价格,100;手机,100;固定电话,100");
  105. #else
  106. m_FurtherList.SetHeadings("店名,100;订单号,100;男宾姓名,100;女宾姓名,100;修片,100;选片,100;选片日期,100;精修,100;精修日期,100;设计,100;看设计日期,100;加急,100;取件日期,100;修片人,100;精修人,100;接单人,100;套系名称,100;套系价格,100;男宾电话,100;女宾电话,100");
  107. #endif
  108. m_FurtherList.LoadColumnInfo(198);
  109. GetDlgItem(IDC_BUTprint3)->ShowWindow(1);
  110. }
  111. GetData();
  112. m_combo1.AddString(g_user.name);
  113. m_combo1.GetWindowRect(rc2);
  114. ScreenToClient(rc2);
  115. rc2.bottom += 200;
  116. m_combo1.MoveWindow(rc2);
  117. GetDlgItem(IDC_BUTclose)->GetWindowRect(rc2);
  118. SetComboHei(&m_combo1, rc2.Height());
  119. GetDlgItem(IDC_BUTexportphoto)->EnableWindow(IsHasRights2new(10));
  120. GetDlgItem(IDC_BUTexportphoto2)->EnableWindow(IsHasRights2new(11));
  121. }
  122. void BeautifySkinFrom2::FillGrid(BOOL bStatus)
  123. {
  124. if (g_bSearchFilter)
  125. {
  126. m_FurtherList.DeleteAllItems2();
  127. int ii = 0;
  128. m_FurtherList.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  129. int count = 0;
  130. {
  131. for (ii = 0; ii < m_FurtherList.m_arLabels.GetSize(); ii++)
  132. {
  133. // 条件查询==精修日期
  134. if (g_filterdate1 != "")
  135. {
  136. if (m_List1array.ElementAt(ii).ElementAt(7 + m_nAdd) < g_filterdate1 || m_List1array.ElementAt(ii).ElementAt(7 + m_nAdd) > g_filterdate2)
  137. continue;
  138. }
  139. if (g_waiter1 != "")
  140. {
  141. // 条件查询==精修人;
  142. if (m_List1array.ElementAt(ii).ElementAt(13 + m_nAdd) != g_waiter1)
  143. continue;
  144. }
  145. if (g_bAllBranch && g_filterbranch != "")
  146. {
  147. if (m_List1array.ElementAt(ii).ElementAt(0) != g_filterbranch)
  148. continue;
  149. }
  150. if (1)
  151. {
  152. m_FurtherList.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  153. }
  154. }
  155. }
  156. m_FurtherList.m_arLabels.SetSize(count, 1);
  157. ii = count;
  158. m_FurtherList.m_LabelCount = ii;
  159. m_FurtherList.SetItemCountEx(ii);
  160. CString str;
  161. str.Format("单数:%d", ii);
  162. SetDlgItemText(IDC_STATIC2, str);
  163. }
  164. else
  165. {
  166. m_FurtherList.DeleteAllItems2();
  167. int ii = 0;
  168. m_FurtherList.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  169. int count = 0;
  170. if (m_filter.IsEmpty())
  171. {
  172. if (bStatus)
  173. {
  174. for (ii = 0; ii < m_FurtherList.m_arLabels.GetSize(); ii++)
  175. {
  176. // 条件查询==选片状态&&精修状态;
  177. if (m_List1array.ElementAt(ii).ElementAt(4 + m_nAdd) == "OK" && m_List1array.ElementAt(ii).ElementAt(6 + m_nAdd) != "OK")
  178. m_FurtherList.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  179. }
  180. }
  181. else
  182. {
  183. for (ii = 0; ii < m_FurtherList.m_arLabels.GetSize(); ii++)
  184. {
  185. m_FurtherList.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  186. }
  187. }
  188. }
  189. else
  190. {
  191. if (bStatus)
  192. {
  193. int type = GetType(m_filter);
  194. if (type == 1)//电话
  195. {
  196. for (ii = 0; ii < m_FurtherList.m_arLabels.GetSize(); ii++)
  197. {
  198. // 查询条件==选片状态&&精修状态&&(手机1||手机2)
  199. if (m_List1array.ElementAt(ii).ElementAt(4 + m_nAdd) == "OK" &&
  200. m_List1array.ElementAt(ii).ElementAt(6 + m_nAdd) != "OK" &&
  201. (m_List1array.ElementAt(ii).ElementAt(17 + m_nAdd).Find(m_filter) != -1 || m_List1array.ElementAt(ii).ElementAt(18 + m_nAdd).Find(m_filter) != -1))
  202. {
  203. m_FurtherList.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  204. }
  205. }
  206. }
  207. else if (type == 2)//拼音
  208. {
  209. m_filter.MakeUpper();
  210. for (ii = 0; ii < m_FurtherList.m_arLabels.GetSize(); ii++)
  211. {
  212. // 查询条件==选片状态&&精修状态&&(拼音1||拼音2)
  213. if (m_List1array.ElementAt(ii).ElementAt(4 + m_nAdd) == "OK" &&
  214. m_List1array.ElementAt(ii).ElementAt(6 + m_nAdd) != "OK" &&
  215. (m_List1array.ElementAt(ii).ElementAt(19 + m_nAdd).Find(m_filter) != -1 ||m_List1array.ElementAt(ii).ElementAt(20 + m_nAdd).Find(m_filter) != -1))
  216. {
  217. m_FurtherList.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  218. }
  219. }
  220. }
  221. else
  222. {
  223. for (ii = 0; ii < m_FurtherList.m_arLabels.GetSize(); ii++)
  224. {
  225. // 查询条件==选片状态&&精修状态&&(……)
  226. if (m_List1array.ElementAt(ii).ElementAt(4 + m_nAdd) == "OK" &&
  227. m_List1array.ElementAt(ii).ElementAt(6 + m_nAdd) != "OK" &&
  228. (m_List1array.ElementAt(ii).ElementAt(0).Find(m_filter) != -1 || \
  229. m_List1array.ElementAt(ii).ElementAt(1).Find(m_filter) != -1 || \
  230. m_List1array.ElementAt(ii).ElementAt(2).Find(m_filter) != -1 || \
  231. m_List1array.ElementAt(ii).ElementAt(3).Find(m_filter) != -1 || \
  232. m_List1array.ElementAt(ii).ElementAt(12).Find(m_filter) != -1 || \
  233. m_List1array.ElementAt(ii).ElementAt(13).Find(m_filter) != -1 || \
  234. m_List1array.ElementAt(ii).ElementAt(14).Find(m_filter) != -1 || \
  235. m_List1array.ElementAt(ii).ElementAt(15).Find(m_filter) != -1 || \
  236. m_List1array.ElementAt(ii).ElementAt(16).Find(m_filter) != -1 || \
  237. m_List1array.ElementAt(ii).ElementAt(17).Find(m_filter) != -1 || \
  238. m_List1array.ElementAt(ii).ElementAt(18).Find(m_filter) != -1 || \
  239. m_List1array.ElementAt(ii).ElementAt(19).Find(m_filter) != -1))
  240. {
  241. m_FurtherList.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  242. }
  243. }
  244. }
  245. }
  246. else
  247. {
  248. int type = GetType(m_filter);
  249. if (type == 1)//电话
  250. {
  251. for (ii = 0; ii < m_FurtherList.m_arLabels.GetSize(); ii++)
  252. {
  253. // 查询条件==手机1||手机2
  254. if (m_List1array.ElementAt(ii).ElementAt(17 + m_nAdd).Find(m_filter) != -1 ||
  255. m_List1array.ElementAt(ii).ElementAt(18 + m_nAdd).Find(m_filter) != -1)
  256. {
  257. m_FurtherList.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  258. }
  259. }
  260. }
  261. else if (type == 2)//拼音
  262. {
  263. m_filter.MakeUpper();
  264. for (ii = 0; ii < m_FurtherList.m_arLabels.GetSize(); ii++)
  265. {
  266. // 查询条件==拼音1||拼音2
  267. if (m_List1array.ElementAt(ii).ElementAt(19 + m_nAdd).Find(m_filter) != -1 ||
  268. m_List1array.ElementAt(ii).ElementAt(20 + m_nAdd).Find(m_filter) != -1)
  269. {
  270. m_FurtherList.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  271. }
  272. }
  273. }
  274. else
  275. {
  276. for (ii = 0; ii < m_FurtherList.m_arLabels.GetSize(); ii++)
  277. {
  278. if (m_List1array.ElementAt(ii).ElementAt(0).Find(m_filter) != -1 || \
  279. m_List1array.ElementAt(ii).ElementAt(1).Find(m_filter) != -1 || \
  280. m_List1array.ElementAt(ii).ElementAt(2).Find(m_filter) != -1 || \
  281. m_List1array.ElementAt(ii).ElementAt(3).Find(m_filter) != -1 || \
  282. m_List1array.ElementAt(ii).ElementAt(12).Find(m_filter) != -1 || \
  283. m_List1array.ElementAt(ii).ElementAt(13).Find(m_filter) != -1 || \
  284. m_List1array.ElementAt(ii).ElementAt(14).Find(m_filter) != -1 || \
  285. m_List1array.ElementAt(ii).ElementAt(15).Find(m_filter) != -1 || \
  286. m_List1array.ElementAt(ii).ElementAt(16).Find(m_filter) != -1 || \
  287. m_List1array.ElementAt(ii).ElementAt(17).Find(m_filter) != -1 || \
  288. m_List1array.ElementAt(ii).ElementAt(18).Find(m_filter) != -1 || \
  289. m_List1array.ElementAt(ii).ElementAt(20).Find(m_filter) != -1)
  290. {
  291. m_FurtherList.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  292. }
  293. }
  294. }
  295. }
  296. }
  297. m_FurtherList.m_arLabels.SetSize(count, 1);
  298. ii = count;
  299. m_FurtherList.m_LabelCount = ii;
  300. m_FurtherList.SetItemCountEx(ii);
  301. CString str;
  302. str.Format("单数:%d", ii);
  303. SetDlgItemText(IDC_STATIC2, str);
  304. }
  305. if (!g_id.IsEmpty())
  306. {
  307. for (int i = 0; i < m_FurtherList.GetItemCount(); i++)
  308. {
  309. if (g_id == m_FurtherList.GetItemText(i, 0 + m_nAdd))
  310. {
  311. m_FurtherList.SetItemState(i, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
  312. m_FurtherList.EnsureVisible(i, FALSE);
  313. break;
  314. }
  315. }
  316. }
  317. }
  318. void BeautifySkinFrom2::OnBUTclose()
  319. {
  320. GetParent()->SendMessage(WM_CLOSE);
  321. }
  322. void BeautifySkinFrom2::OnSelchangeCombo1()
  323. {
  324. SetTimer(1, 100, NULL);
  325. }
  326. void BeautifySkinFrom2::OnTimer(UINT nIDEvent)
  327. {
  328. KillTimer(nIDEvent);
  329. OnButton1();
  330. }
  331. BOOL BeautifySkinFrom2::PreTranslateMessage(MSG* pMsg)
  332. {
  333. try
  334. {
  335. if (pMsg->message == WM_KEYDOWN)
  336. {
  337. switch (pMsg->wParam)
  338. {
  339. case VK_RETURN:
  340. OnButton1();
  341. return 1;
  342. case 0x43: // copy
  343. if ((GetKeyState(VK_CONTROL) & 0x80))
  344. {
  345. GetFocus()->SendMessage(WM_COPY);
  346. return TRUE;
  347. }
  348. break;
  349. case 0x56: //Ctrl + V:
  350. if ((GetKeyState(VK_CONTROL) & 0x80))
  351. {
  352. GetFocus()->SendMessage(WM_PASTE);
  353. return TRUE;
  354. }
  355. break;
  356. case 0x58: // cut
  357. if ((GetKeyState(VK_CONTROL) & 0x80))
  358. {
  359. GetFocus()->SendMessage(WM_CUT);
  360. return TRUE;
  361. }
  362. break;
  363. case 0x5A: //undo
  364. case 0x59: //redo
  365. if ((GetKeyState(VK_CONTROL) & 0x80))
  366. {
  367. GetFocus()->SendMessage(WM_UNDO);
  368. return TRUE;
  369. }
  370. break;
  371. }
  372. }
  373. return MyFormView::PreTranslateMessage(pMsg);
  374. }
  375. catch (...)
  376. {
  377. }
  378. return true;
  379. }
  380. void BeautifySkinFrom2::OnBUTimportphoto() // 导入精修片 按钮;
  381. {
  382. #ifdef USE_KERNEL_DLL
  383. POSITION pos = m_FurtherList.GetFirstSelectedItemPosition();
  384. if ( pos == NULL )
  385. {
  386. AfxMessageBox(_T("请选中您要导入精修片的订单!"),MB_ICONINFORMATION);
  387. return;
  388. }
  389. INT nItemCount = m_FurtherList.GetItemCount();
  390. INT nSelectedItem = m_FurtherList.GetNextSelectedItem(pos);
  391. // 获取列表信息:域名、订单号、顾客信息、景点名(成长套系名)、精修人、精修状态、精修日期;
  392. CString strBranchName = _T("");
  393. CString strBranchId = _T("");
  394. CString strOrderNum = _T("");
  395. CString strScenery = _T("");
  396. CString strCustomerInfo = _T("");
  397. CString strJingxiuRen = _T("");
  398. CString strJingxiuState = _T("");
  399. CString strJingxiuDate = _T("");
  400. // 获取域名;
  401. if ( g_bAllBranch )
  402. {// 多店汇总时;
  403. strBranchName = m_FurtherList.GetItemText(nSelectedItem, 0);
  404. strBranchId = GetDomainFromBranch( strBranchName );
  405. }
  406. else
  407. {
  408. if ( g_branchname.IsEmpty() )
  409. {// 连接本店时;
  410. strBranchId = g_domain;
  411. }
  412. else
  413. {// 连接分店时;
  414. strBranchName = g_branchname;
  415. strBranchId = GetDomainFromBranch( g_branchname );
  416. }
  417. }
  418. // 获取订单号;
  419. strOrderNum = m_FurtherList.GetItemText(nSelectedItem, 0 + m_nAdd);
  420. // 获取精修师;
  421. strJingxiuRen = m_FurtherList.GetItemText(nSelectedItem, 13 + m_nAdd); // 11
  422. // 获取精修状态;
  423. strJingxiuState = m_FurtherList.GetItemText(nSelectedItem, 6 + m_nAdd);
  424. // 获取精修日期;
  425. strJingxiuDate = m_FurtherList.GetItemText(nSelectedItem, 7 + m_nAdd);
  426. // 获取顾客信息;
  427. strCustomerInfo = m_FurtherList.GetItemText(nSelectedItem, 1 + m_nAdd) + _T(",") + m_FurtherList.GetItemText(nSelectedItem, 2 + m_nAdd);
  428. CDlgChuXiuInfo xpdlg;
  429. xpdlg.m_strOrderNumber = strOrderNum;
  430. xpdlg.m_strXiupianRen = strJingxiuRen;
  431. if ( strJingxiuState == _T("OK") )
  432. xpdlg.m_nXiupianStatus = 0;
  433. else if ( strJingxiuState == _T("修片中"))
  434. xpdlg.m_nXiupianStatus = 1;
  435. else if ( strJingxiuState == _T("未修"))
  436. xpdlg.m_nXiupianStatus = 2;
  437. CString strSQL = _T("");
  438. if ( xpdlg.DoModal() == IDOK )
  439. {
  440. if ( xpdlg.m_bGrowthTx )
  441. strScenery = xpdlg.m_strScenery;
  442. if ( xpdlg.m_nXiupianStatus == 0 )
  443. strJingxiuState = _T("OK");
  444. else if ( xpdlg.m_nXiupianStatus == 1)
  445. strJingxiuState = _T("修片中");
  446. else if ( xpdlg.m_nXiupianStatus == 2 )
  447. strJingxiuState = _T("未修");
  448. strJingxiuRen = xpdlg.m_strXiupianRen;
  449. if (strJingxiuDate.IsEmpty())
  450. strSQL.Format(_T("update dindan set waiter7 = '%s', status6 = '%s', time9 = '%s' where id = '%s' "), strJingxiuRen, strJingxiuState, g_date, strOrderNum);
  451. else
  452. strSQL.Format(_T("update dindan set waiter7 = '%s', status6 = '%s' where id = '%s'"), strJingxiuRen, strJingxiuState, strOrderNum);
  453. // 构建更新包,发送到服务端更新数据;
  454. g_sendhead.bsql = TRUE;
  455. if ( g_bAllBranch )
  456. { // 多店汇总时;
  457. g_branchip = GetBranchIPbyId(strBranchId);
  458. g_pMainWnd->OnDisconnect();
  459. g_branchname = strBranchName;
  460. g_bBranchModify = TRUE;
  461. g_pMainWnd->ProcessChatMessageRequest2(strSQL);
  462. g_pMainWnd->OnDisconnect();
  463. g_bBranchModify = FALSE;
  464. g_branchip = g_branchname = "";
  465. }
  466. else
  467. {// 连接本店或分店时;
  468. g_pMainWnd->ProcessChatMessageRequest2(strSQL);
  469. }
  470. /////////////////////////////////////////////////////////////////////////////////////////////////
  471. // 接收服务器返回的数据,并刷新界面;
  472. if (g_bSendOK == 0)
  473. {
  474. OutputDebugString(_T("接收服务信息失败\n"));
  475. return;
  476. }
  477. if ( g_bAllBranch == 0)
  478. {// 连接本店或分店时;
  479. GetData();
  480. }
  481. else
  482. {// 多店汇总时;
  483. for (int i = 0; i < m_List1array.GetSize(); i++)
  484. {
  485. if ( strOrderNum == m_List1array.ElementAt(i).ElementAt(1) && strBranchName == m_List1array.ElementAt(i).ElementAt(0))
  486. {
  487. m_List1array.ElementAt(i).SetAt(6 + m_nAdd, strJingxiuState);
  488. if ( strJingxiuDate.IsEmpty() )
  489. m_List1array.ElementAt(i).SetAt(7 + m_nAdd, g_date);
  490. m_List1array.ElementAt(i).SetAt(13 + m_nAdd, strJingxiuRen);
  491. FillGrid();
  492. break;
  493. }
  494. }
  495. }
  496. }
  497. else
  498. {
  499. // 开始导入初修片;
  500. if ( MessageBox(_T("是否现在开始导入精修片!"), _T("导片提示:导入精修片"), MB_TOPMOST|MB_YESNO|MB_ICONWARNING ) != IDYES )
  501. {// 是否马上导入相片;
  502. return;
  503. }
  504. if ( xpdlg.m_bGrowthTx )
  505. strScenery = xpdlg.m_strScenery;
  506. if ( xpdlg.m_bGrowthTx && strScenery.IsEmpty() )
  507. {
  508. AfxMessageBox(_T("儿童成长套系导片必须选择套系名!"));
  509. return;
  510. }
  511. }
  512. /////////////////////////////////////////////////////////////////////////////////////////////////
  513. if ( g_pIMGProcess == NULL )
  514. {
  515. return;
  516. }
  517. ImgImportInterface *pImport = NULL;
  518. g_pIMGProcess->QueryInterface(IID_ImgImportInterface, (void**)&pImport);
  519. if ( pImport )
  520. {
  521. pImport->ImportFurtherImg(
  522. FALSE, // 文件夹形式打开源或多选文件形式;
  523. strBranchId, // 分店域名;
  524. strOrderNum, // 订单号;
  525. strCustomerInfo, // 顾客信息,可任意组合;
  526. !strScenery.IsEmpty(), // 导入时,是否生成景点名文件夹;
  527. strScenery, // 导入时,景点名;
  528. _T("*.jpg|*.jpeg"), // 导入时,主扩展名相片;
  529. INVALID_COPY_PIX, // 导入时,主扩展名相片的压缩像素;
  530. _T("*.nef|*.cr2"), // 导入时,附加的扩展名相片;
  531. TRUE, // 导入时,是否生成缩略图;
  532. SET_PIX(100,100), // 导入时,生成的缩略图像素大小;
  533. FALSE // 导入时,文件存在时是否覆盖;
  534. );
  535. g_pIMGProcess->Release();
  536. }
  537. // 结束;
  538. #else
  539. POSITION pos;
  540. pos = m_FurtherList.GetFirstSelectedItemPosition();
  541. if (pos == NULL)
  542. {
  543. AfxMessageBox("请先选中您要导片的定单!", MB_ICONINFORMATION);
  544. return;
  545. }
  546. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  547. CString branch;
  548. CString id = m_FurtherList.GetItemText(iItem, 0 + m_nAdd);
  549. if (g_bAllBranch)
  550. branch = m_FurtherList.GetItemText(iItem, 0);
  551. CString oldstatus = m_FurtherList.GetItemText(iItem, 6 + m_nAdd);
  552. CString time9 = m_FurtherList.GetItemText(iItem, 7 + m_nAdd);
  553. CString name = m_FurtherList.GetItemText(iItem, 1 + m_nAdd) + "," + m_FurtherList.GetItemText(iItem, 2 + m_nAdd);
  554. name.TrimLeft(",");
  555. name.TrimRight(",");
  556. name = "客人:" + name;
  557. CString phone = m_FurtherList.GetItemText(iItem, 15 + m_nAdd) + "," + m_FurtherList.GetItemText(iItem, 16 + m_nAdd);
  558. phone.TrimLeft(",");
  559. phone.TrimRight(",");
  560. phone = "电话:" + phone;
  561. CString strDomain = _T("");
  562. CString savepath = _T("");
  563. if (g_bAllBranch)
  564. strDomain = GetDomainFromBranch(branch);
  565. else
  566. {
  567. if(g_branchname != _T(""))
  568. strDomain = GetDomainFromBranch(g_branchname);
  569. }
  570. //////////////////////////////////////////////////////////////////////////
  571. // 获取可用的共享目录;
  572. #if USE_SHARE_FLORD // 2015.04.13
  573. TCHAR szSharePath[MAX_PATH];
  574. //if( GetEnableShareDirectory(3,id,branch,szSharePath) )
  575. if (CNetShareInfo::GetInstance()->GetEnableShareDirectory(3, id, strDomain, szSharePath))
  576. {
  577. savepath.Format("%s\\",szSharePath);
  578. }
  579. else
  580. {
  581. AfxMessageBox(_T("没有可用的共享目录!"));
  582. return;
  583. }
  584. #else
  585. savepath += id + "\\";
  586. #endif
  587. //////////////////////////////////////////////////////////////////////////
  588. if (::CheckFolderFileExist(savepath) == 0)
  589. {
  590. if ( !CreateDirectory(savepath, NULL) )
  591. {
  592. DWORD dwError = GetLastError();
  593. AfxMessageBox(_T("创建精修订单目录失败"));
  594. return;
  595. }
  596. }
  597. CString srcdir; CString str;
  598. GetSavePath(srcdir);
  599. if (srcdir.IsEmpty())
  600. {
  601. CString status6;
  602. if (AfxMessageBox("客照是否全部精修完毕?", MB_YESNO | MB_ICONINFORMATION) == IDYES)
  603. status6 = "OK";
  604. else
  605. status6 = "修片中";
  606. CString sql;
  607. if (time9.IsEmpty())
  608. sql = "update dindan set status6='" + status6 + "',time9='" + g_date + "' where id='" + id + "'";
  609. else
  610. sql = "update dindan set status6='" + status6 + "' where id='" + id + "'";
  611. g_sendhead.bsql = 1;
  612. if (g_bAllBranch)
  613. {
  614. g_branchip = GetIP(branch);
  615. g_pMainWnd->OnDisconnect();
  616. g_branchname = branch;
  617. g_bBranchModify = 1;
  618. g_pMainWnd->ProcessChatMessageRequest2(sql);
  619. g_pMainWnd->OnDisconnect();
  620. g_bBranchModify = 0;
  621. g_branchip = g_branchname = "";
  622. }
  623. else
  624. g_pMainWnd->ProcessChatMessageRequest2(sql);
  625. if (g_bSendOK == 0)return;
  626. if (g_bAllBranch == 0)
  627. {
  628. GetData();
  629. }
  630. else
  631. {
  632. for (int i = 0; i < m_List1array.GetSize(); i++)
  633. {
  634. if (id == m_List1array.ElementAt(i).ElementAt(1) && branch == m_List1array.ElementAt(i).ElementAt(0))
  635. {
  636. m_List1array.ElementAt(i).SetAt(6 + m_nAdd, status6);
  637. if (time9.IsEmpty())
  638. m_List1array.ElementAt(i).SetAt(7 + m_nAdd, g_date);
  639. FillGrid();
  640. break;
  641. }
  642. }
  643. }
  644. return;
  645. }
  646. if (srcdir.GetLength() < 4)
  647. {
  648. AfxMessageBox("请选择正确的您文件所在的目录!", MB_ICONSTOP);
  649. return;
  650. }
  651. if (oldstatus != "未修")
  652. {
  653. str.Format("%s\r\n%s\r\n此单已导入过修片,确认您选中的照片没有导入过吗? 否则会覆盖原来的照片, 是否继续?", name, phone);
  654. if (AfxMessageBox(str, MB_YESNO | MB_ICONSTOP) != IDYES)
  655. return;
  656. }
  657. else
  658. {
  659. str.Format("%s\r\n%s\r\n确认您选中的照片与客户资料相符吗? 是否继续?", name, phone);
  660. if (AfxMessageBox(str, MB_YESNO | MB_ICONINFORMATION) != IDYES)
  661. return;
  662. }
  663. CStringArray array;
  664. CStringArray desarray;
  665. CStringArray dirarray;
  666. if (1)
  667. {
  668. // 1.获取源目录下的所有文件,包含子目录;
  669. using namespace helper_coffs;
  670. ffsco o;
  671. o.dirs(1);
  672. o.find(LPCSTR(srcdir), LPCSTR("*.*"));
  673. ffsco::typeT coo;
  674. ffsco::typeT::iterator it;
  675. coo = o.co_dir();
  676. for (it = coo.begin(); coo.end() != it; it++)
  677. {
  678. str = (*it).c_str();
  679. if (FindArray(&dirarray, str) == -1)
  680. {
  681. dirarray.Add(str);
  682. if (str != dirarray.ElementAt(0))
  683. {
  684. str = savepath + str.Right(str.GetLength() - dirarray.ElementAt(0).GetLength());
  685. if (::CheckFolderFileExist(str) == 0)
  686. ::CreateDirectory(str, NULL);
  687. }
  688. }
  689. }
  690. }
  691. if (1)
  692. {
  693. // 2.从每个子目录下查找所有的相片;
  694. for (int i = 0; i < dirarray.GetSize(); i++)
  695. {
  696. using namespace helper_coffs;
  697. ffsco o;
  698. o.dirs(0);
  699. o.find(LPCSTR(dirarray.ElementAt(i)), LPCSTR("*.jpg"));
  700. ffsco::typeT coo;
  701. ffsco::typeT::iterator it;
  702. coo = o.co_file();
  703. for (it = coo.begin();coo.end() != it;it++)
  704. {
  705. str = (*it).c_str();
  706. array.Add(str);
  707. desarray.Add(savepath + dirarray.ElementAt(i).Right(dirarray.ElementAt(i).GetLength() - dirarray.ElementAt(0).GetLength()) + str.Right(str.GetLength() - str.ReverseFind('\\') - 1));
  708. }
  709. }
  710. }
  711. if (array.GetSize() == 0)return;
  712. ImportPhoto dlg;
  713. #if USE_SHARE_FLORD
  714. dlg.m_id = id; // add by 2015-07-06 Jeff;
  715. #endif
  716. dlg.m_branch = branch;
  717. dlg.m_nphototype = 2;
  718. dlg.m_bOverWrite = 1;
  719. dlg.m_pArray = &array;
  720. dlg.m_pDesArray = &desarray;
  721. dlg.m_savepath = savepath;
  722. #ifdef ENTERPRISE_VERSION
  723. // if(!g_branchname.IsEmpty ())
  724. {
  725. dlg.m_bSaveUploadTask = g_bSaveUploadTask3;
  726. dlg.m_sel = g_cominfoarraylocal.ElementAt(0).ElementAt(80);
  727. dlg.m_uploadtaskarray.Add(id + ";" + name);
  728. dlg.m_uploadtaskarray.Add("");
  729. dlg.m_uploadtaskarray.Add("");
  730. dlg.m_uploadtaskarray.Add("");
  731. dlg.m_uploadtaskarray.Add("");
  732. dlg.m_uploadtaskarray.Add("");
  733. dlg.m_uploadtaskarray.Add("");
  734. dlg.m_uploadtaskarray.Add("");
  735. dlg.m_uploadtaskarray.Add("");
  736. dlg.m_uploadtaskarray.Add("");
  737. }
  738. #endif
  739. dlg.DoModal();
  740. CString status6;
  741. if (AfxMessageBox("客照是否全部精修完毕?", MB_YESNO | MB_ICONINFORMATION) == IDYES)
  742. status6 = "OK";
  743. else
  744. status6 = "修片中";
  745. CString sql;
  746. if (time9.IsEmpty())
  747. sql = "update dindan set status6='" + status6 + "',waiter7='" + g_user.name + "',time9='" + g_date + "' where id='" + id + "'";
  748. else
  749. sql = "update dindan set status6='" + status6 + "',waiter7='" + g_user.name + "' where id='" + id + "'";
  750. g_sendhead.bsql = 1;
  751. if (g_bAllBranch)
  752. {
  753. g_branchip = GetIP(branch);
  754. g_pMainWnd->OnDisconnect();
  755. g_branchname = branch;
  756. g_bBranchModify = 1;
  757. g_pMainWnd->ProcessChatMessageRequest2(sql);
  758. g_pMainWnd->OnDisconnect();
  759. g_bBranchModify = 0;
  760. g_branchip = g_branchname = "";
  761. }
  762. else
  763. g_pMainWnd->ProcessChatMessageRequest2(sql);
  764. if (g_bSendOK == 0)return;
  765. savepath += "ok";
  766. ::DeleteFile(savepath); // 删除ok文件;
  767. AfxMessageBox("导入客照成功!", MB_ICONINFORMATION);
  768. if (g_bAllBranch == 0)
  769. {
  770. GetData();
  771. }
  772. else
  773. {
  774. for (int i = 0; i < m_List1array.GetSize(); i++)
  775. {
  776. if (id == m_List1array.ElementAt(i).ElementAt(1) && branch == m_List1array.ElementAt(i).ElementAt(0))
  777. {
  778. m_List1array.ElementAt(i).SetAt(6 + m_nAdd, status6);
  779. if (time9.IsEmpty())
  780. m_List1array.ElementAt(i).SetAt(7 + m_nAdd, g_date);
  781. m_List1array.ElementAt(i).SetAt(11 + m_nAdd, g_user.name);
  782. FillGrid();
  783. break;
  784. }
  785. }
  786. }
  787. #endif
  788. }
  789. void BeautifySkinFrom2::OnBUTshowphoto()
  790. {
  791. POSITION pos;
  792. pos = m_FurtherList.GetFirstSelectedItemPosition();
  793. if (pos == NULL)
  794. {
  795. AfxMessageBox("请先选中您要查看的定单!", MB_ICONINFORMATION);
  796. return;
  797. }
  798. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  799. CString branch;
  800. CString id = m_FurtherList.GetItemText(iItem, 0 + m_nAdd);
  801. if (g_bAllBranch)
  802. branch = m_FurtherList.GetItemText(iItem, 0);
  803. CString name = m_FurtherList.GetItemText(iItem, 1 + m_nAdd) + "," + m_FurtherList.GetItemText(iItem, 2 + m_nAdd);
  804. name.TrimLeft(",");
  805. name.TrimRight(",");
  806. name = "客人:" + name;
  807. ShowPic dlg;
  808. dlg.m_id = id;
  809. dlg.m_name = name;
  810. dlg.m_mode = 3;
  811. if(g_branchname == _T(""))
  812. dlg.m_path = g_path1 + "\\";
  813. else
  814. {
  815. dlg.m_branch = GetDomainFromBranch(g_branchname);
  816. CString branchpath = GetBranchPhotoPath(g_branchname);
  817. dlg.m_path = g_path1 + branchpath + "\\";
  818. }
  819. #ifndef USE_KERNEL_DLL
  820. #if USE_SHARE_FLORD
  821. // 根据域名,相片类型,订单号查找相片;
  822. dlg.m_aryOfShareDirectory.RemoveAll();
  823. CNetShareInfo::GetInstance()->LoadOrderImages(dlg.m_mode, dlg.m_id, g_domain, dlg.m_patharray1, &dlg.m_aryOfShareDirectory);
  824. #endif
  825. #endif
  826. dlg.m_path += id;
  827. dlg.m_path += "\\";
  828. dlg.DoModal();
  829. }
  830. //-----------------------------------------------------------------
  831. // remark by Jeff 2014-12-12
  832. // 函数:GetNo
  833. // 描述:从str中解析出每个相片名,然后存入空的CStringArray中;
  834. // 参数:
  835. // str:选好的相片名串,如:"001,002,003" 后分隔符改为"|",结果应是"001|002|003"
  836. // array:空的数组,用来存放解析后的相片名;
  837. // 返回:
  838. // 注意:更换分隔符造成的问题,在该函数已解决;
  839. //-----------------------------------------------------------------
  840. void BeautifySkinFrom2::GetNo(CString str, CStringArray &array)
  841. {
  842. if (!str.IsEmpty())
  843. {
  844. #ifdef USE_SEP_VEB
  845. int pos = str.Find(SEPS_VEB);
  846. #else
  847. int pos = str.Find(",");
  848. #endif
  849. while (pos != -1)
  850. {
  851. if (FindArray(&array, str.Left(pos)) == -1)
  852. array.Add(str.Left(pos));
  853. str = str.Right(str.GetLength() - pos - 1);
  854. #ifdef USE_SEP_VEB
  855. pos = str.Find(SEPS_VEB);
  856. #else
  857. pos = str.Find(",");
  858. #endif
  859. }
  860. if (FindArray(&array, str) == -1)
  861. array.Add(str);
  862. }
  863. }
  864. //-----------------------------------------------------------------
  865. // remark by Jeff 2014-12-12
  866. // 函数:GetSelName
  867. // 描述:
  868. // 参数:
  869. // name:由GetNo解析出来后的单个相片名,如:"001"
  870. // spnamearray:订单下的商品数组,case 50所得;
  871. // 返回:
  872. // 注意:更换分隔符造成的问题,在该函数已解决;
  873. //-----------------------------------------------------------------
  874. CString BeautifySkinFrom2::GetSelName(CString name, CArray<CStringArray, CStringArray>&spnamearray)
  875. {
  876. CString ret;
  877. #ifdef USE_SEP_VEB
  878. name = SEPS_VEB + name + SEPS_VEB;
  879. #else
  880. name = "," + name + ",";
  881. #endif
  882. CString str;
  883. for (int i = 0; i < spnamearray.GetSize(); i++)
  884. {
  885. #ifdef USE_SEP_VEB
  886. str = SEPS_VEB + spnamearray.ElementAt(i).ElementAt(6) + SEPS_VEB;
  887. #else
  888. str = "," + spnamearray.ElementAt(i).ElementAt(6) + ",";
  889. #endif
  890. if (str.Find(name) != -1)
  891. {
  892. ret += spnamearray.ElementAt(i).ElementAt(5);
  893. ret += ";";
  894. }
  895. }
  896. ret.TrimRight(";");
  897. ret.Replace("*", "x");
  898. return ret;
  899. }
  900. CString GetPathFromNo2(CString dir, CString no)
  901. {
  902. CString sRet;
  903. dir.TrimRight('\\');
  904. dir += "\\";
  905. CStringArray dirarray;
  906. CString temp;
  907. using namespace helper_coffs;
  908. ffsco o;
  909. o.dirs(1);
  910. o.find(LPCSTR(dir), LPCSTR("*.*"));
  911. ffsco::typeT coo;
  912. ffsco::typeT::iterator it;
  913. coo = o.co_dir();
  914. for (it = coo.begin();coo.end() != it;it++)
  915. {
  916. temp = (*it).c_str();
  917. if (::FindArray(&dirarray, temp) == -1 && temp != dir)
  918. {
  919. dirarray.Add(temp);
  920. }
  921. }
  922. for (int i = 0; i < dirarray.GetSize(); i++)
  923. {
  924. temp = dirarray.ElementAt(i);
  925. sRet.Format("%s%s.jpg", temp, no);
  926. if (::PathFileExists(sRet))return sRet;
  927. sRet.Replace(".jpg", ".raw");
  928. if (::PathFileExists(sRet))return sRet;
  929. sRet.Replace(".raw", ".nef");
  930. if (::PathFileExists(sRet))return sRet;
  931. sRet.Replace(".nef", ".cr2");
  932. if (::PathFileExists(sRet))return sRet;
  933. sRet.Replace(".cr2", ".jpg");
  934. if (::PathFileExists(sRet))return sRet;
  935. }
  936. return dir + no + ".jpg";
  937. }
  938. CString GetPathFromNo3(CString dir, CString no)
  939. {
  940. CString sRet;
  941. dir.TrimRight('\\');
  942. dir += "\\";
  943. CStringArray dirarray;
  944. CString temp;
  945. using namespace helper_coffs;
  946. ffsco o;
  947. o.dirs(1);
  948. o.find(LPCSTR(dir), LPCSTR("*.*"));
  949. ffsco::typeT coo;
  950. ffsco::typeT::iterator it;
  951. coo = o.co_dir();
  952. for (it = coo.begin();coo.end() != it;it++)
  953. {
  954. temp = (*it).c_str();
  955. if (::FindArray(&dirarray, temp) == -1 && temp != dir)
  956. {
  957. dirarray.Add(temp);
  958. }
  959. }
  960. for (int i = 0; i < dirarray.GetSize(); i++)
  961. {
  962. temp = dirarray.ElementAt(i);
  963. sRet.Format("%s%s.jpg", temp, no);
  964. if (::PathFileExists(sRet))return sRet;
  965. }
  966. return dir + no + ".jpg";
  967. }
  968. // 导出裁剪后的效果图;
  969. void BeautifySkinFrom2::OnBUTexportphoto() // 导出选好的片 按钮;
  970. {
  971. #ifdef USE_KERNEL_DLL
  972. // 判断用户是否有权限导出选好的片;
  973. if ( !IsHasRights2new(10) )
  974. {
  975. AfxMessageBox(_T("您没有权限导出选好的片!"));
  976. return;
  977. }
  978. // 获取列表信息;
  979. POSITION pos = m_FurtherList.GetFirstSelectedItemPosition();
  980. if ( pos == NULL )
  981. {
  982. AfxMessageBox(__T("请选中您要导片的订单!"));
  983. return;
  984. }
  985. INT nItemCount = m_FurtherList.GetItemCount();
  986. INT nSelectedItem = m_FurtherList.GetNextSelectedItem(pos);
  987. // 获取域名、订单号、景点名、顾客信息、选片人、选片状态、选片日期;
  988. CString strBranchName = _T("");
  989. CString strBranchId = _T("");
  990. CString strOrderNum = _T("");
  991. CString strScenery = _T("");
  992. CString strCustomerInfo = _T("");
  993. CString strXuanpianRen = _T("");
  994. CString strXuanpianState = _T("");
  995. CString strXuanpianDate = _T("");
  996. // 获取订单号;
  997. strOrderNum = m_FurtherList.GetItemText(nSelectedItem, 0 + m_nAdd);
  998. // 获取顾客信息;
  999. strCustomerInfo = m_FurtherList.GetItemText(nSelectedItem, 1 + m_nAdd) + _T(",") + m_FurtherList.GetItemText(nSelectedItem, 2 + m_nAdd);
  1000. // 获取选片状态;
  1001. strXuanpianState = m_FurtherList.GetItemText(nSelectedItem, 4 + m_nAdd);
  1002. // 获取选片日期;
  1003. strXuanpianRen = m_FurtherList.GetItemText(nSelectedItem, 5 + m_nAdd);
  1004. if ( strXuanpianState == _T("未选") )
  1005. {
  1006. MessageBox(_T("此单未选片!"), _T("影楼管理"), MB_OK | MB_TOPMOST | MB_ICONINFORMATION );
  1007. return;
  1008. }
  1009. // 获取域名;
  1010. if ( g_bAllBranch )
  1011. {// 多店汇总;
  1012. strBranchName = m_FurtherList.GetItemText(nSelectedItem, 0);
  1013. strBranchId = GetDomainFromBranch(strBranchName);
  1014. }
  1015. else
  1016. {
  1017. if ( g_branchname.IsEmpty() )
  1018. {// 连接本店时;
  1019. strBranchId = g_domain;
  1020. }
  1021. else
  1022. {//连接分店时;
  1023. strBranchName = g_branchname;
  1024. strBranchId = GetDomainFromBranch( g_branchname );
  1025. }
  1026. }
  1027. // 获取景点名,需要读取dindanjd表获取,目前只支持儿童成长套系订单;
  1028. IsGrowthTx IsGrowthtxdlg;
  1029. IsGrowthtxdlg.m_mode = 1;
  1030. IsGrowthtxdlg.m_strOrderNumber = strOrderNum;
  1031. IsGrowthtxdlg.DoModal();
  1032. if( IsGrowthtxdlg.m_bReturnOK == 0 || (IsGrowthtxdlg.m_bGrowthTx && IsGrowthtxdlg.m_seltxname.IsEmpty()) )
  1033. {
  1034. return;
  1035. }
  1036. if ( IsGrowthtxdlg.m_bGrowthTx )
  1037. {
  1038. // 读取dindanjd表里的成长套系名,并返回选中的成长套系名;
  1039. strScenery = IsGrowthtxdlg.m_seltxname;
  1040. if ( strScenery == _T("全部") )
  1041. {
  1042. strScenery.Empty();
  1043. }
  1044. }
  1045. /////////////////////////////////////////////////////////////////////////////////////////////////
  1046. // 与服务器通信获取指定条件的订单商品信息;
  1047. CString strSQL = _T("");
  1048. #ifdef CHILD_VERSION
  1049. if ( IsGrowthtxdlg.m_bGrowthTx && !strScenery.IsEmpty() )
  1050. strSQL.Format(_T("id='%s' and growthtxname = '%s'; id='%s'; id='%s' and name <> '入册' and name <> '入底'"), strOrderNum, strScenery, strOrderNum, strOrderNum);
  1051. else
  1052. strSQL.Format(_T("id='%s'; id='%s'; id='%s' and name <> '入册' and name <> '入底'"), strOrderNum, strOrderNum, strOrderNum);
  1053. #else
  1054. strSQL.Format(_T("id='%s'; id='%s'; id='%s' and kind <> '2' and name <> '入册' and name <> '入底'"), strOrderNum, strOrderNum, strOrderNum);
  1055. #endif//CHILD_VERSION
  1056. g_sendhead.bsql = FALSE;
  1057. g_sendhead.code[0] = 50; // dindansp;
  1058. g_sendhead.code[1] = 11; // dindan;
  1059. g_sendhead.code[2] = 56; // dindansp;
  1060. g_sendhead.tabcount = 3;
  1061. if( g_bAllBranch )
  1062. {//多店汇总时;
  1063. g_branchip = GetBranchIPbyId(strBranchId);
  1064. g_pMainWnd->OnDisconnect();
  1065. g_branchname = strBranchName;
  1066. g_bBranchModify = TRUE;
  1067. g_pMainWnd->ProcessChatMessageRequest2(strSQL);
  1068. g_pMainWnd->OnDisconnect();
  1069. g_bBranchModify = FALSE;
  1070. g_branchip = g_branchname = _T("");
  1071. }
  1072. else
  1073. {// 连接本店或分店时;
  1074. g_pMainWnd->ProcessChatMessageRequest2(strSQL);
  1075. }
  1076. if( !g_bSendOK )
  1077. return ;
  1078. CArray<CStringArray, CStringArray> Arydindan;
  1079. CArray<CStringArray, CStringArray> Arydindansp;
  1080. CArray<CStringArray, CStringArray> Arydindansp2;
  1081. DataToArray( &Arydindansp, &Arydindan, &Arydindansp2 );
  1082. CString strTemp = _T("");
  1083. CStringArray AryImgNums;
  1084. CStringArray AryPerImgGoods;
  1085. // 获取所有dindansp记录no字段中的相片编号;
  1086. int i = 0;
  1087. int nSize = Arydindansp.GetSize();
  1088. for ( i = 0; i < nSize; i++)
  1089. {
  1090. strTemp = Arydindansp.ElementAt(i).ElementAt(6); // dindansp表中的no字段;
  1091. GetNo(strTemp, AryImgNums);
  1092. }
  1093. // 获取每张相片编号对应的商品,每个商品间用分号隔开;
  1094. nSize = AryImgNums.GetSize();
  1095. AryPerImgGoods.SetSize(nSize);
  1096. for ( i = 0; i < nSize; i++ )
  1097. {
  1098. strTemp = AryImgNums.ElementAt(i);
  1099. AryPerImgGoods.SetAt(i, GetSelName(strTemp, Arydindansp));
  1100. }
  1101. // 由于VC6.0传CStringArray给VC9.0DLL 时,会产生无法避免的兼容性问题,故使用CString传;
  1102. CString strImgNums = _T("");
  1103. for ( i = 0; i < AryImgNums.GetSize(); i++ )
  1104. {
  1105. strImgNums += AryImgNums.ElementAt(i);
  1106. strImgNums += _T("?|?");
  1107. }
  1108. CString strPerImgGoods = _T("");
  1109. for ( i = 0; i < AryPerImgGoods.GetSize(); i++ )
  1110. {// 商品名称,应该禁止包含非法字符;
  1111. strPerImgGoods += AryPerImgGoods.ElementAt(i);
  1112. strPerImgGoods += _T("?|?");
  1113. }
  1114. // 再选择导出的是初修片、原片、初修+原片,并且是否按产品生成文件夹分类相片或者相片名后带产品名;
  1115. SelectPhotoDlg selectdlg;
  1116. selectdlg.DoModal();
  1117. BOOL bExportWithName = selectdlg.m_check1;
  1118. INT bExportMode = selectdlg.m_mode; // 0 原片+初修, 1 原片, 2 初修;
  1119. // 保存导出相片的路径;
  1120. CString strSaveDirectory = _T("");
  1121. if ( g_pIMGProcess == NULL )
  1122. {
  1123. return ;
  1124. }
  1125. ImgExportInterface *pExport = NULL;
  1126. g_pIMGProcess->QueryInterface(IID_ImgExportInterface, (void**)&pExport);
  1127. if ( pExport )
  1128. {// 导出选好的片;
  1129. HGLOBAL hMemery = pExport->ExportSelectedBeautifyImg(
  1130. strBranchId,
  1131. strOrderNum,
  1132. strCustomerInfo,
  1133. !strScenery.IsEmpty(),
  1134. strScenery,
  1135. _T("*.jpg|*.jpeg"),
  1136. INVALID_COPY_PIX,
  1137. _T("*.nef|*.cr2|*.raw|"),
  1138. FALSE,
  1139. bExportWithName,
  1140. IsGrowthtxdlg.m_bGrowthTx,
  1141. bExportMode,
  1142. strImgNums,
  1143. strPerImgGoods,
  1144. Arydindan.ElementAt(0).ElementAt(60)
  1145. );
  1146. if ( hMemery )
  1147. {
  1148. CString strDir = _T("");
  1149. TCHAR* pszSaveDirectory = (TCHAR*)GlobalLock(hMemery);
  1150. GlobalUnlock(hMemery);
  1151. // 输出输出要求内容;
  1152. strDir.Format(_T("%s\\客户要求.txt"), pszSaveDirectory);
  1153. if ( Arydindan.GetSize() )
  1154. {
  1155. CStdioFile fp;
  1156. fp.Open(strDir, CFile::modeCreate | CFile::modeWrite);
  1157. fp.WriteString(_T("选片要求:\n"));
  1158. fp.WriteString(Arydindan.ElementAt(0).ElementAt(39) + _T(" ") + Arydindan.ElementAt(0).ElementAt(75));
  1159. fp.WriteString(_T("\n"));
  1160. fp.WriteString(_T("\n"));
  1161. fp.WriteString(_T("订单要求:\n"));
  1162. fp.WriteString(Arydindan.ElementAt(0).ElementAt(38));
  1163. fp.WriteString(_T("\n"));
  1164. fp.WriteString(_T("\n"));
  1165. fp.WriteString(_T("客人产品:\n"));
  1166. CString str;
  1167. str = _T("产品名称");
  1168. FillLength(str, 30);
  1169. str += _T("数量");
  1170. FillLength(str, 40);
  1171. #ifdef LKAY_VERSION
  1172. str += _T("P数");
  1173. FillLength(str, 50);
  1174. str += _T("加急");
  1175. FillLength(str, 60);
  1176. str += _T("取件日期");
  1177. FillLength(str, 70);
  1178. #else
  1179. str += _T("加急");
  1180. FillLength(str, 50);
  1181. str += _T("取件日期");
  1182. FillLength(str, 60);
  1183. #endif
  1184. fp.WriteString(str);
  1185. fp.WriteString(_T("\n"));
  1186. for (int i = 0; i < Arydindansp2.GetSize(); i++)
  1187. {
  1188. str.Empty();
  1189. str = Arydindansp2.ElementAt(i).ElementAt(0);
  1190. FillLength(str, 30);
  1191. str += Arydindansp2.ElementAt(i).ElementAt(1);
  1192. FillLength(str, 40);
  1193. #ifdef LKAY_VERSION
  1194. str += Arydindansp2.ElementAt(i).ElementAt(29); //p数
  1195. FillLength(str, 50);
  1196. str += Arydindansp2.ElementAt(i).ElementAt(18);
  1197. FillLength(str, 60);
  1198. str += Arydindansp2.ElementAt(i).ElementAt(19);
  1199. FillLength(str, 70);
  1200. #else
  1201. str += Arydindansp2.ElementAt(i).ElementAt(18);
  1202. FillLength(str, 50);
  1203. str += Arydindansp2.ElementAt(i).ElementAt(19);
  1204. FillLength(str, 60);
  1205. #endif
  1206. fp.WriteString(str);
  1207. fp.WriteString(_T("\n"));
  1208. }
  1209. fp.Close();
  1210. }
  1211. // 导出条形码位图;
  1212. if ( g_bExportBarCode )
  1213. {
  1214. for ( int j = Arydindansp.GetSize() - 1; j >= 0; j-- )
  1215. {
  1216. if ( Arydindansp.ElementAt(j).ElementAt(6).IsEmpty() )
  1217. Arydindansp.RemoveAt(j);
  1218. }
  1219. if ( !bExportWithName )
  1220. {
  1221. for ( int i = 0; i < Arydindansp.GetSize(); i++ )
  1222. {
  1223. strDir.Format(_T("%s\\%s"), pszSaveDirectory, Arydindansp.ElementAt(i).ElementAt(5));
  1224. if ( PathFileExists(strDir) )
  1225. {
  1226. // 商品目录存在才导出;
  1227. pExport->ExportBarCodeImg(0, g_screenwid, g_screenhei, 1, 40, Arydindansp.ElementAt(i).ElementAt(7), Arydindansp.ElementAt(i).ElementAt(0), Arydindansp.ElementAt(i).ElementAt(5), strDir);
  1228. }
  1229. }
  1230. }
  1231. pExport->ExportOrderBarCodeImg(0, g_screenwid, g_screenhei*3, 1, 40, Arydindansp, pszSaveDirectory);
  1232. }
  1233. }
  1234. OutputDebugString(_T("导出选好的片!\n"));
  1235. }
  1236. pExport->Release();
  1237. // 结束;
  1238. #else
  1239. // 1.判断权限;
  1240. if (IsHasRights2new(10) == 0)return;
  1241. #if USE_SHARE_FLORD
  1242. BOOL bOfmat = FALSE;
  1243. BOOL bGrowth = FALSE;
  1244. BOOL bExportWithName = FALSE;
  1245. CString name1,name2,branch,strdomain,strOrderNumber,strGrowhTx = _T("");
  1246. CStringArray array,spnamearray2;
  1247. OUT CArray<CStringArray, CStringArray> sparray2;
  1248. GetCurSelRecord(name1,name2,strOrderNumber,branch,strdomain);
  1249. int nResult = GetImageWithGoods(branch,strdomain,strOrderNumber,bGrowth,strGrowhTx,bExportWithName,array,spnamearray2,sparray2);
  1250. if ( nResult == -1 )
  1251. {
  1252. // 没有任务相片存在于共享目录中;
  1253. return;
  1254. }
  1255. CString strSaveDiretory;
  1256. GetSavePath(strSaveDiretory);
  1257. if(strSaveDiretory.IsEmpty())return;
  1258. strSaveDiretory.TrimRight ('\\');
  1259. strSaveDiretory+="\\";
  1260. strSaveDiretory+=strOrderNumber;
  1261. strSaveDiretory+=g_branchname;
  1262. if(g_bAllBranch)
  1263. {
  1264. if(GetBranchPhotoPath(branch)!="")
  1265. strSaveDiretory+=branch;
  1266. }
  1267. strSaveDiretory+=name1;
  1268. strSaveDiretory+=name2;
  1269. strSaveDiretory+="选片";
  1270. strSaveDiretory+="\\";
  1271. if ( nResult == 3 )
  1272. {
  1273. // 选择导出的是初修,但初修无片,导出原片;
  1274. strSaveDiretory.Delete(strSaveDiretory.GetLength()-1, 1);
  1275. strSaveDiretory += _T("(未修)\\");
  1276. bOfmat = TRUE;
  1277. }
  1278. ::CreateDirectory (strSaveDiretory, NULL);
  1279. #else
  1280. // 2.获取选中列的信息,如订单号;
  1281. UpdateData();
  1282. POSITION pos;
  1283. pos = m_FurtherList.GetFirstSelectedItemPosition();
  1284. if (pos == NULL)
  1285. {
  1286. AfxMessageBox("请先选中您要导片的定单!", MB_ICONINFORMATION);
  1287. return;
  1288. }
  1289. // 2.1.获取订单的选片状态;
  1290. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  1291. CString status2 = m_FurtherList.GetItemText(iItem, 4 + m_nAdd);
  1292. if (status2 != "OK")
  1293. {
  1294. AfxMessageBox("此单未选片!", MB_ICONINFORMATION);
  1295. return;
  1296. }
  1297. // 2.2.获取订单号;
  1298. BOOL bOfmat = 0;
  1299. CString strOrderNumber = m_FurtherList.GetItemText(iItem, 0 + m_nAdd); // 订单号;
  1300. CString branch;
  1301. if (g_bAllBranch)
  1302. branch = m_FurtherList.GetItemText(iItem, 0);
  1303. CString name1 = m_FurtherList.GetItemText(iItem, 1 + m_nAdd);
  1304. CString name2 = m_FurtherList.GetItemText(iItem, 2 + m_nAdd);
  1305. // 3.1.选片成长套系对话框;
  1306. IsGrowthTx growthtxdlg;
  1307. growthtxdlg.m_mode = 1;
  1308. growthtxdlg.m_strOrderNumber = strOrderNumber;
  1309. growthtxdlg.DoModal(); // 非成长套系的,直接退出;
  1310. BOOL m_bGrowthTX = growthtxdlg.m_bGrowthTx;
  1311. CString m_seltxname = growthtxdlg.m_seltxname;
  1312. #ifdef CHILD_VERSION
  1313. CString filter = "id='" + strOrderNumber + "';id='" + strOrderNumber + "';id='" + strOrderNumber + "' and name<>'入册' and name<>'入底'";
  1314. if (m_seltxname != "" && m_seltxname != "全部")
  1315. {
  1316. filter = "id='" + strOrderNumber + "' and growthtxname='" + m_seltxname + "';id='" + strOrderNumber + "';id='" + strOrderNumber + "' and name<>'入册' and name<>'入底'";
  1317. }
  1318. #else
  1319. CString filter="id='"+strOrderNumber+"';id='"+strOrderNumber+"';id='"+strOrderNumber+"' and kind<>'2' and name<>'入册' and name<>'入底'";
  1320. #endif //#ifdef CHILD_VERSION
  1321. g_sendhead.bsql = 0;
  1322. g_sendhead.code[0] = 50; // dindansp
  1323. g_sendhead.code[1] = 11; // dindan
  1324. g_sendhead.code[2] = 56; // dindansp
  1325. g_sendhead.tabcount = 3;
  1326. if (g_bAllBranch)
  1327. {
  1328. g_branchip = GetIP(branch);
  1329. g_pMainWnd->OnDisconnect();
  1330. g_branchname = branch;
  1331. g_bBranchModify = 1;
  1332. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1333. g_pMainWnd->OnDisconnect();
  1334. g_bBranchModify = 0;
  1335. g_branchip = g_branchname = "";
  1336. }
  1337. else
  1338. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1339. if (g_bSendOK == 0)return;
  1340. CArray<CStringArray, CStringArray>sparray;
  1341. CArray<CStringArray, CStringArray>sparray2;
  1342. DataToArray(&sparray, &g_List1array, &sparray2);
  1343. CString strSrcDiretory; // 相片源目录;
  1344. if (g_bAllBranch)
  1345. {
  1346. CString branchpath = GetBranchPhotoPath(branch);
  1347. strSrcDiretory = g_path2 + branchpath + "\\";
  1348. }
  1349. else
  1350. strSrcDiretory = g_path2 + "\\";
  1351. // 4.照片类型选择对话框;(客户原片、初修片)
  1352. SelectPhotoDlg selectdlg;
  1353. selectdlg.DoModal();
  1354. strSrcDiretory += strOrderNumber;
  1355. strSrcDiretory += "\\";
  1356. if (m_seltxname != "" && m_seltxname != "全部")
  1357. {
  1358. strSrcDiretory += m_seltxname;
  1359. strSrcDiretory += "\\";
  1360. }
  1361. ////////////////////////////////////////
  1362. CString str, spname;
  1363. CStringArray noarray;
  1364. CStringArray spnamearray;
  1365. for (int i = 0; i < sparray.GetSize(); i++)
  1366. {
  1367. str = sparray.ElementAt(i).ElementAt(6); // 选好的片的相片名串;
  1368. spname = sparray.ElementAt(i).ElementAt(5); // 选好的片对应的商品名;
  1369. GetNo(str, noarray);
  1370. }
  1371. /*
  1372. for(int k=0; k<noarray; k++)
  1373. printf("no str=%s\n", noarray.ElementAt(k));
  1374. */
  1375. if (noarray.GetSize() == 0)
  1376. {
  1377. AfxMessageBox("此单未选片!", MB_ICONINFORMATION);
  1378. return;
  1379. }
  1380. spnamearray.SetSize(noarray.GetSize());
  1381. for (i = 0; i < noarray.GetSize(); i++)
  1382. {
  1383. str = noarray.ElementAt(i);
  1384. spnamearray.SetAt(i, GetSelName(str, sparray));//+"-"+str );
  1385. }
  1386. CString strSaveDiretory; // 导出选好片的目录;
  1387. GetSavePath(strSaveDiretory);
  1388. if (strSaveDiretory.IsEmpty())return;
  1389. strSaveDiretory.TrimRight('\\');
  1390. strSaveDiretory += "\\";
  1391. strSaveDiretory += strOrderNumber;
  1392. strSaveDiretory += g_branchname;
  1393. if (g_bAllBranch)
  1394. {
  1395. if (GetBranchPhotoPath(branch) != "")
  1396. strSaveDiretory += branch;
  1397. }
  1398. strSaveDiretory += name1;
  1399. strSaveDiretory += name2;
  1400. strSaveDiretory += "选片";
  1401. strSaveDiretory += "\\";
  1402. CStringArray array;
  1403. CStringArray spnamearray2;
  1404. CString src, des;
  1405. // printf("m_mode = %d, m_seltxname = %s, m_bGrowthTX = %d, SrcDir = %s\n", selectdlg.m_mode, m_seltxname, m_bGrowthTX, strSrcDiretory);
  1406. if (selectdlg.m_mode == 0)
  1407. {
  1408. for (i = 0; i < noarray.GetSize(); i++)
  1409. {
  1410. if ((m_seltxname != "" && m_seltxname != "全部") || m_bGrowthTX == 0)
  1411. src.Format("%s%s.jpg", strSrcDiretory, noarray.ElementAt(i));
  1412. else
  1413. src = GetPathFromNo3(strSrcDiretory, noarray.ElementAt(i));
  1414. // printf("src1 = %s\n", src);
  1415. if (PathFileExists(src))
  1416. {
  1417. // printf("exists src = %s\n", src);
  1418. array.Add(src);
  1419. if (1)//selectdlg.m_check1)
  1420. spnamearray2.Add(spnamearray.ElementAt(i));
  1421. else
  1422. spnamearray2.Add(noarray.ElementAt(i));
  1423. }
  1424. else
  1425. AfxMessageBox("未找到初修过的文件:" + src.Right(src.GetLength() - src.ReverseFind('\\') - 1), MB_ICONINFORMATION);
  1426. }
  1427. }
  1428. // printf("arraySize1 = %d\n", array.GetSize());
  1429. if (array.GetSize() == 0)
  1430. {
  1431. if (selectdlg.m_mode == 0)
  1432. AfxMessageBox("注意:此单未修片, 导出的是原片!", MB_ICONINFORMATION);
  1433. if (g_bAllBranch)
  1434. {
  1435. CString branchpath = GetBranchPhotoPath(branch);
  1436. strSrcDiretory = g_path1 + branchpath + "\\";
  1437. }
  1438. else
  1439. strSrcDiretory = g_path1 + "\\";
  1440. strSrcDiretory += strOrderNumber;
  1441. strSrcDiretory += "\\";
  1442. strSaveDiretory.Delete(strSaveDiretory.GetLength() - 1, 1);
  1443. strSaveDiretory += "(未修)\\";
  1444. bOfmat = 1;
  1445. for (i = 0; i < noarray.GetSize(); i++)
  1446. {
  1447. // src.Format ("%s%s.jpg", strSrcDiretory, noarray.ElementAt (i));
  1448. src = GetPathFromNo2(strSrcDiretory, noarray.ElementAt(i));
  1449. // printf("src2 = %s\n", src);
  1450. if (PathFileExists(src))
  1451. {
  1452. // printf("exists src = %s\n", src);
  1453. array.Add(src);
  1454. if (1)//selectdlg.m_check1)
  1455. spnamearray2.Add(spnamearray.ElementAt(i));
  1456. else
  1457. spnamearray2.Add(noarray.ElementAt(i));
  1458. }
  1459. else
  1460. AfxMessageBox("未找到原片文件:" + src.Right(src.GetLength() - src.ReverseFind('\\') - 1), MB_ICONINFORMATION);
  1461. }
  1462. }
  1463. // printf("arraySize2 = %d\n", array.GetSize());
  1464. if (array.GetSize() == 0)
  1465. {
  1466. AfxMessageBox("此单未导入原片!", MB_ICONINFORMATION);
  1467. return;
  1468. }
  1469. ::CreateDirectory(strSaveDiretory, NULL);
  1470. #endif //#if USE_SHARE_FLORD
  1471. // 3.导出相片处理对象;
  1472. ImportPhoto dlg;
  1473. dlg.m_name = name1 + name2;
  1474. #if USE_SHARE_FLORD
  1475. dlg.m_bAddname = bExportWithName;
  1476. #else
  1477. dlg.m_bAddname = selectdlg.m_check1;
  1478. #endif
  1479. dlg.m_bOfmat = bOfmat;
  1480. dlg.m_mode = 1;
  1481. dlg.m_bOrigin = 1;
  1482. dlg.m_pArray = &array;
  1483. dlg.m_pArray2 = &spnamearray2;
  1484. dlg.m_savepath = strSaveDiretory;
  1485. dlg.DoModal();
  1486. //////////////
  1487. if (g_List1array.GetSize())
  1488. {
  1489. CStdioFile fp;
  1490. fp.Open(strSaveDiretory + "客户要求.txt", CFile::modeCreate | CFile::modeWrite);
  1491. fp.WriteString("选片要求:\n");
  1492. fp.WriteString(g_List1array.ElementAt(0).ElementAt(39) + " " + g_List1array.ElementAt(0).ElementAt(75));
  1493. fp.WriteString("\n");
  1494. fp.WriteString("\n");
  1495. fp.WriteString("订单要求:\n");
  1496. fp.WriteString(g_List1array.ElementAt(0).ElementAt(38));
  1497. fp.WriteString("\n");
  1498. fp.WriteString("\n");
  1499. fp.WriteString("客人产品:\n");
  1500. CString str;
  1501. str = "产品名称";
  1502. FillLength(str, 30);
  1503. str += "数量";
  1504. FillLength(str, 40);
  1505. #ifdef LKAY_VERSION
  1506. str += "P数";
  1507. FillLength(str, 50);
  1508. str += "加急";
  1509. FillLength(str, 60);
  1510. str += "取件日期";
  1511. FillLength(str, 70);
  1512. #else
  1513. str += "加急";
  1514. FillLength(str, 50);
  1515. str += "取件日期";
  1516. FillLength(str, 60);
  1517. #endif
  1518. fp.WriteString(str);
  1519. fp.WriteString("\n");
  1520. for (int i = 0; i < sparray2.GetSize(); i++)
  1521. {
  1522. str.Empty();
  1523. str = sparray2.ElementAt(i).ElementAt(0);
  1524. FillLength(str, 30);
  1525. str += sparray2.ElementAt(i).ElementAt(1);
  1526. FillLength(str, 40);
  1527. #ifdef LKAY_VERSION
  1528. str += sparray2.ElementAt(i).ElementAt(29);//p数
  1529. FillLength(str, 50);
  1530. str += sparray2.ElementAt(i).ElementAt(18);
  1531. FillLength(str, 60);
  1532. str += sparray2.ElementAt(i).ElementAt(19);
  1533. FillLength(str, 70);
  1534. #else
  1535. str += sparray2.ElementAt(i).ElementAt(18);
  1536. FillLength(str, 50);
  1537. str += sparray2.ElementAt(i).ElementAt(19);
  1538. FillLength(str, 60);
  1539. #endif
  1540. fp.WriteString(str);
  1541. fp.WriteString("\n");
  1542. }
  1543. fp.Close();
  1544. }
  1545. //////////////
  1546. AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  1547. #if JEFF_TEST_ON // 导出裁剪效果图;
  1548. //strSrcDiretory; // 源相片目录;
  1549. //strSaveDiretory;// 导出选好片的目录;
  1550. if (FALSE == g_List1array.ElementAt(0).ElementAt(60).IsEmpty())
  1551. #if USE_SHARE_FLORD
  1552. ;
  1553. #else
  1554. // 使用多级共享目录,需要重写该函数;
  1555. ExportCutImageToFile(g_List1array.ElementAt(0).ElementAt(60), strSrcDiretory, strSaveDiretory+_T("裁剪效果\\"));
  1556. #endif
  1557. #else
  1558. {
  1559. ShowCut dlg;
  1560. dlg.m_branch = branch;
  1561. dlg.m_mode = 1;
  1562. dlg.m_id = strOrderNumber;
  1563. dlg.DoModal();
  1564. }
  1565. #endif
  1566. CString strlog;
  1567. strlog = " 导出选片 ";
  1568. strlog += "客人:";
  1569. strlog += name1 + name2 + strOrderNumber;
  1570. WriteLog(_T("精修导出选好的片"), strlog);
  1571. #endif
  1572. }
  1573. void BeautifySkinFrom2::OnBUTexportphoto2() // 导出精修的片 按钮;
  1574. {
  1575. #ifdef USE_KERNEL_DLL
  1576. // 判断登陆用户是否有导出原片的权限;
  1577. if ( !IsHasRights2new(11) )
  1578. {
  1579. AfxMessageBox(_T("您无权限导出原片!"),MB_ICONINFORMATION);
  1580. return;
  1581. }
  1582. // 获取列表信息:域名、订单号、景点名、顾客信息;
  1583. POSITION pos = m_FurtherList.GetFirstSelectedItemPosition();
  1584. if ( pos == NULL )
  1585. {
  1586. AfxMessageBox(_T("请选中您要导出原片的订单!"), MB_ICONINFORMATION);
  1587. return;
  1588. }
  1589. INT nItemCount = m_FurtherList.GetItemCount();
  1590. INT nSelectedItem = m_FurtherList.GetNextSelectedItem(pos);
  1591. CString strBranchId = _T("");
  1592. CString strOrderNum = _T("");
  1593. // 初修列表不支持景点名,需要从其他地方获取;
  1594. CString strScenery = _T("");
  1595. CString strCustomerInfo = _T("");
  1596. // 获取域名;
  1597. if ( g_bAllBranch )
  1598. {// 多店汇总时;
  1599. strBranchId = GetDomainFromBranch( m_FurtherList.GetItemText(nSelectedItem, 0) );
  1600. }
  1601. else
  1602. {
  1603. if ( g_branchname.IsEmpty() )
  1604. {// 连接本店时;
  1605. strBranchId = g_domain;
  1606. }
  1607. else
  1608. {// 连接分店时;
  1609. strBranchId = GetDomainFromBranch( g_branchname );
  1610. }
  1611. }
  1612. // 获取订单号;
  1613. strOrderNum = m_FurtherList.GetItemText(nSelectedItem, 0 + m_nAdd);
  1614. // 获取顾客信息;
  1615. strCustomerInfo = m_FurtherList.GetItemText(nSelectedItem, 1 + m_nAdd) + _T(",") + m_FurtherList.GetItemText(nSelectedItem, 2 + m_nAdd);
  1616. // 获取景点名,需要读取dindanjd表获取,目前只支持儿童成长套系订单;
  1617. IsGrowthTx IsGrowthtxdlg;
  1618. IsGrowthtxdlg.m_mode = 1;
  1619. IsGrowthtxdlg.m_strOrderNumber = strOrderNum;
  1620. IsGrowthtxdlg.DoModal();
  1621. if( IsGrowthtxdlg.m_bReturnOK == 0 || (IsGrowthtxdlg.m_bGrowthTx && IsGrowthtxdlg.m_seltxname.IsEmpty()) )
  1622. {
  1623. return;
  1624. }
  1625. if ( IsGrowthtxdlg.m_bGrowthTx )
  1626. {
  1627. // 读取dindanjd表里的成长套系名,并返回选中的成长套系名;
  1628. strScenery = IsGrowthtxdlg.m_seltxname;
  1629. if ( strScenery == _T("全部") )
  1630. {
  1631. strScenery.Empty();
  1632. }
  1633. }
  1634. // 导出原片时,是否压缩导出;
  1635. DWORD dwExportPix = INVALID_COPY_PIX; // 通过其他对话框,选择导出时压缩的像素;
  1636. /////////////////////////////////////////////////////////////////////////////////////////////////
  1637. if ( g_pIMGProcess == NULL )
  1638. {
  1639. return ;
  1640. }
  1641. // 获取完信息,开始导出原片;
  1642. ImgExportInterface *pExport = NULL;
  1643. g_pIMGProcess->QueryInterface(IID_ImgExportInterface, (void**)&pExport);
  1644. if ( pExport )
  1645. {
  1646. pExport->ExportFurtherImg(
  1647. TRUE,
  1648. strBranchId,
  1649. strOrderNum,
  1650. strCustomerInfo,
  1651. !strScenery.IsEmpty(),
  1652. strScenery,
  1653. _T("*.jpg|*.jpeg"),
  1654. dwExportPix,
  1655. _T("*.nef|*.cr2|*.raw|*.ra2"),
  1656. FALSE,
  1657. FALSE
  1658. );
  1659. }
  1660. g_pIMGProcess->Release();
  1661. // 结束;
  1662. #else
  1663. if (IsHasRights2new(11) == 0)return;
  1664. POSITION pos;
  1665. pos = m_FurtherList.GetFirstSelectedItemPosition();
  1666. if (pos == NULL)
  1667. {
  1668. AfxMessageBox("请先选中您要导出片的定单!", MB_ICONINFORMATION);
  1669. return;
  1670. }
  1671. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  1672. CString id = m_FurtherList.GetItemText(iItem, 0 + m_nAdd);
  1673. #if USE_SHARE_FLORD
  1674. CString branch;
  1675. if(g_bAllBranch)
  1676. branch=m_FurtherList.GetItemText (iItem, 0);
  1677. CString strDomain = _T("");
  1678. CString savepath = _T("");
  1679. if (g_bAllBranch)
  1680. {
  1681. if(branch != _T(""))
  1682. strDomain = GetDomainFromBranch(branch);
  1683. }
  1684. else
  1685. {
  1686. if(g_branchname != _T(""))
  1687. strDomain = GetDomainFromBranch(g_branchname);
  1688. }
  1689. // 导出原片时,可以选择只导出单独的景点相片;(如果是儿童版的成长套系,可以导出某个套系的相片)
  1690. // 得到源相片;
  1691. CStringArray array;
  1692. CNetShareInfo::GetInstance()->LoadOrderImages(3, id, strDomain,array);
  1693. // printf("size=%d\n", array.GetSize());
  1694. if(array.GetSize ()==0)
  1695. {
  1696. AfxMessageBox("此单未导片!", MB_ICONINFORMATION);
  1697. return;
  1698. }
  1699. // 获取保存的路径;
  1700. CString dir;
  1701. GetSavePath(dir);
  1702. if(dir.IsEmpty())
  1703. {
  1704. return;
  1705. }
  1706. CString name1=m_FurtherList.GetItemText (iItem, 1+m_nAdd);
  1707. CString name2=m_FurtherList.GetItemText (iItem, 2+m_nAdd);
  1708. dir.TrimRight ('\\');
  1709. dir+="\\";
  1710. dir+=id;
  1711. dir+=g_branchname;
  1712. if(g_bAllBranch)
  1713. {
  1714. if(GetBranchPhotoPath(branch)!="")
  1715. dir+=branch;
  1716. }
  1717. dir+=name1;
  1718. dir+=name2;
  1719. dir+="精修好的片";
  1720. dir+="\\";
  1721. ::CreateDirectory (dir, NULL);
  1722. // 新的相片路径;
  1723. int nIndex = 0;
  1724. CString strTemp;
  1725. CStringArray desarray;
  1726. for ( int i = 0; i < array.GetSize(); i++ )
  1727. {
  1728. // 获取到订单号以后的路径字符;
  1729. strTemp = array.ElementAt(i).Mid(array.ElementAt(i).Find(id) + id.GetLength() + 1 );
  1730. desarray.Add(dir + strTemp);
  1731. if ( (nIndex = strTemp.Find("\\")) != -1 )
  1732. {
  1733. strTemp = strTemp.Left( nIndex + 1 );
  1734. CreateDirectory(dir + strTemp, NULL);
  1735. }
  1736. }
  1737. #else
  1738. CString branch;
  1739. if (g_bAllBranch)
  1740. branch = m_FurtherList.GetItemText(iItem, 0);
  1741. CString path;
  1742. if (g_bAllBranch)
  1743. {
  1744. CString branchpath = GetBranchPhotoPath(branch);
  1745. path = g_path4 + branchpath + "\\";
  1746. }
  1747. else
  1748. path = g_path4 + "\\";
  1749. path += id;
  1750. path += "\\";
  1751. CStringArray array;
  1752. CString dir;
  1753. GetSavePath(dir);
  1754. if (dir.IsEmpty())
  1755. {
  1756. return;
  1757. }
  1758. CString name1 = m_FurtherList.GetItemText(iItem, 1 + m_nAdd);
  1759. CString name2 = m_FurtherList.GetItemText(iItem, 2 + m_nAdd);
  1760. dir.TrimRight('\\');
  1761. dir += "\\";
  1762. dir += id;
  1763. dir += g_branchname;
  1764. if (g_bAllBranch)
  1765. {
  1766. if (GetBranchPhotoPath(branch) != "")
  1767. dir += branch;
  1768. }
  1769. dir += name1;
  1770. dir += name2;
  1771. dir += "精修好的片";
  1772. dir += "\\";
  1773. ::CreateDirectory(dir, NULL);
  1774. CStringArray desarray;
  1775. CStringArray dirarray;
  1776. CString savepath = dir;
  1777. CString str;
  1778. if (1)
  1779. {
  1780. using namespace helper_coffs;
  1781. ffsco o;
  1782. o.dirs(1);
  1783. o.find(LPCSTR(path), LPCSTR("*.*"));
  1784. ffsco::typeT coo;
  1785. ffsco::typeT::iterator it;
  1786. coo = o.co_dir();
  1787. for (it = coo.begin();coo.end() != it;it++)
  1788. {
  1789. str = (*it).c_str();
  1790. if (FindArray(&dirarray, str) == -1)
  1791. {
  1792. dirarray.Add(str);
  1793. if (str != dirarray.ElementAt(0))
  1794. {
  1795. str = savepath + str.Right(str.GetLength() - dirarray.ElementAt(0).GetLength());
  1796. if (::CheckFolderFileExist(str) == 0)
  1797. ::CreateDirectory(str, NULL);
  1798. }
  1799. }
  1800. }
  1801. }
  1802. if (1)
  1803. {
  1804. for (int i = 0; i < dirarray.GetSize(); i++)
  1805. {
  1806. using namespace helper_coffs;
  1807. ffsco o;
  1808. o.dirs(0);
  1809. o.find(LPCSTR(dirarray.ElementAt(i)), LPCSTR("*.jpg"));
  1810. ffsco::typeT coo;
  1811. ffsco::typeT::iterator it;
  1812. coo = o.co_file();
  1813. for (it = coo.begin();coo.end() != it;it++)
  1814. {
  1815. str = (*it).c_str();
  1816. if (str.GetAt(str.ReverseFind('\\') + 1) == 's')continue;
  1817. if (str.GetAt(str.ReverseFind('\\') + 1) == 'm')continue;
  1818. array.Add(str);
  1819. desarray.Add(savepath + dirarray.ElementAt(i).Right(dirarray.ElementAt(i).GetLength() - dirarray.ElementAt(0).GetLength()) + str.Right(str.GetLength() - str.ReverseFind('\\') - 1));
  1820. }
  1821. }
  1822. }
  1823. if (array.GetSize() == 0)
  1824. {
  1825. AfxMessageBox("此单未导片!", MB_ICONINFORMATION);
  1826. return;
  1827. }
  1828. #endif
  1829. CCompressOption comoptdlg;
  1830. comoptdlg.DoModal();
  1831. ImportPhoto dlg;
  1832. dlg.m_nOutputSize = comoptdlg.m_nsize;
  1833. dlg.m_mode = 1;
  1834. dlg.m_pArray = &array;
  1835. dlg.m_pDesArray = &desarray;
  1836. dlg.m_savepath = dir;
  1837. dlg.DoModal(); AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  1838. CString str;
  1839. str = " 导出精修片 ";
  1840. str += "客人:";
  1841. str += name1 + name2 + id;
  1842. WriteLog(_T("导出精修片"), str);
  1843. #endif
  1844. }
  1845. void BeautifySkinFrom2::OnButton1()
  1846. {
  1847. UpdateData();
  1848. m_filter.TrimLeft();
  1849. m_filter.TrimRight();
  1850. FillGrid();
  1851. }
  1852. void BeautifySkinFrom2::OnButton2() // 已选未修 按钮;
  1853. {
  1854. UpdateData();
  1855. m_filter.TrimLeft();
  1856. m_filter.TrimRight();
  1857. FillGrid(1);
  1858. }
  1859. void BeautifySkinFrom2::OnItemchangedList2(NMHDR* pNMHDR, LRESULT* pResult)
  1860. {
  1861. NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
  1862. POSITION pos;
  1863. pos = m_FurtherList.GetFirstSelectedItemPosition();
  1864. if (pos == NULL)
  1865. {
  1866. return;
  1867. }
  1868. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  1869. if (IsHasRights2new(6) || IsHasRights2new(49))
  1870. {
  1871. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(1);
  1872. }
  1873. else
  1874. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(0);
  1875. /* if(waiter7.IsEmpty () && IsHasRights2new(6) || IsHasRights2new(49))
  1876. {
  1877. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(1);
  1878. }
  1879. else if(waiter7==g_user.name && IsHasRights2new(6) )
  1880. {
  1881. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(1);
  1882. }
  1883. else
  1884. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(0);*/
  1885. *pResult = 0;
  1886. }
  1887. void BeautifySkinFrom2::OnClickList2(NMHDR* pNMHDR, LRESULT* pResult)
  1888. {
  1889. POSITION pos;
  1890. pos = m_FurtherList.GetFirstSelectedItemPosition();
  1891. if (pos == NULL)return;
  1892. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  1893. g_id = m_FurtherList.GetItemText(iItem, 0 + m_nAdd);
  1894. *pResult = 0;
  1895. }
  1896. void BeautifySkinFrom2::HidePrice()
  1897. {
  1898. #ifdef LKAY_VERSION
  1899. if (IsHasRights2new(31))return;
  1900. for (int i = 0; i < m_List1array.GetSize(); i++)
  1901. {
  1902. m_List1array.ElementAt(i).SetAt(14 + m_nAdd, "***");
  1903. m_List1array.ElementAt(i).SetAt(15 + m_nAdd, "***");
  1904. m_List1array.ElementAt(i).SetAt(16 + m_nAdd, "***");
  1905. m_List1array.ElementAt(i).SetAt(13 + m_nAdd, "***");
  1906. }
  1907. #else
  1908. if (IsHasRights2new(31))return;
  1909. for (int i = 0; i < m_List1array.GetSize(); i++)
  1910. {
  1911. m_List1array.ElementAt(i).SetAt(17 + m_nAdd, "***");
  1912. m_List1array.ElementAt(i).SetAt(18 + m_nAdd, "***");
  1913. }
  1914. #endif
  1915. }
  1916. void BeautifySkinFrom2::OnBtnsearchfilter()
  1917. {
  1918. SearchFilter dlg;
  1919. dlg.m_mode = 3;
  1920. if (dlg.DoModal() == IDOK)FillGrid();
  1921. g_bSearchFilter = 0;
  1922. }
  1923. void BeautifySkinFrom2::GetData()
  1924. {
  1925. if (g_bAllBranch == 0)
  1926. {
  1927. if (g_bShowOK == 0)
  1928. {
  1929. #ifdef LKAY_VERSION
  1930. CString filter = "status3='未取' and (dindantype<>'意向客户' or dindantype is null)";
  1931. #else
  1932. CString filter = "status3='未取'";
  1933. #endif
  1934. g_sendhead.bsql = 0;
  1935. g_sendhead.code[0] = 35;
  1936. g_sendhead.tabcount = 1;
  1937. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1938. if (g_bSendOK == 0)return;
  1939. }
  1940. else
  1941. {
  1942. g_sendhead.bsql = 0;
  1943. g_sendhead.code[0] = 35;
  1944. g_sendhead.tabcount = 1;
  1945. #ifdef LKAY_VERSION
  1946. CString filter = "dindantype<>'意向客户' or dindantype is null";
  1947. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1948. #else
  1949. g_pMainWnd->ProcessChatMessageRequest2(1);
  1950. #endif
  1951. if (g_bSendOK == 0)return;
  1952. }
  1953. DataToArray(&m_List1array);
  1954. }
  1955. else
  1956. {
  1957. //////////////数据汇总
  1958. m_List1array.RemoveAll();
  1959. CString branch;
  1960. for (int i = -1; i < g_brancharray.GetSize() - 1; i++)
  1961. {
  1962. if (i != -1)
  1963. {
  1964. branch = g_brancharray.ElementAt(i).ElementAt(0);
  1965. g_branchip = g_brancharray.ElementAt(i).ElementAt(1);
  1966. g_pMainWnd->OnDisconnect();
  1967. g_branchname = branch;
  1968. g_bBranchModify = 1;
  1969. }
  1970. else
  1971. branch = g_brancharray.ElementAt(g_brancharray.GetSize() - 1).ElementAt(0);
  1972. if (g_bShowOK == 0)
  1973. {
  1974. CString filter = "status3='未取'";
  1975. g_sendhead.bsql = 0;
  1976. g_sendhead.code[0] = 35;
  1977. g_sendhead.tabcount = 1;
  1978. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1979. if (g_bSendOK == 0)continue;
  1980. }
  1981. else
  1982. {
  1983. g_sendhead.bsql = 0;
  1984. g_sendhead.code[0] = 35;
  1985. g_sendhead.tabcount = 1;
  1986. g_pMainWnd->ProcessChatMessageRequest2(1);
  1987. if (g_bSendOK == 0)continue;
  1988. }
  1989. CArray<CStringArray, CStringArray>List1array;
  1990. DataToArray(&List1array);
  1991. int size = m_List1array.GetSize();
  1992. for (int j = 0; j < List1array.GetSize(); j++)
  1993. {
  1994. size++;
  1995. m_List1array.SetSize(size, 1);
  1996. size--;
  1997. m_List1array.ElementAt(size).Copy(List1array.ElementAt(j));
  1998. m_List1array.ElementAt(size).InsertAt(0, branch);
  1999. size++;
  2000. }
  2001. }
  2002. g_pMainWnd->OnDisconnect();
  2003. g_bBranchModify = 0; g_branchip = g_branchname = "";
  2004. }
  2005. HidePrice();
  2006. FillGrid();
  2007. }
  2008. void BeautifySkinFrom2::OnBUTprint3()
  2009. {
  2010. GetData();
  2011. }
  2012. // Jeff.没看到调用的地方,也没有关联任何按钮控件.
  2013. // 应该是废弃的函数;
  2014. void BeautifySkinFrom2::OnBUTexportphotoAddName()
  2015. {
  2016. if (IsHasRights2new(10) == 0)return;
  2017. UpdateData();
  2018. POSITION pos;
  2019. pos = m_FurtherList.GetFirstSelectedItemPosition();
  2020. if (pos == NULL)
  2021. {
  2022. AfxMessageBox("请先选中您要导片的定单!", MB_ICONINFORMATION);
  2023. return;
  2024. }
  2025. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  2026. CString status2 = m_FurtherList.GetItemText(iItem, 4);
  2027. if (status2 != "OK")
  2028. {
  2029. AfxMessageBox("此单未选片!", MB_ICONINFORMATION);
  2030. return;
  2031. }
  2032. CString id = m_FurtherList.GetItemText(iItem, 0);
  2033. CString name1 = m_FurtherList.GetItemText(iItem, 1);
  2034. CString name2 = m_FurtherList.GetItemText(iItem, 2);
  2035. CString filter = "id='" + id + "';id='" + id + "'";
  2036. g_sendhead.bsql = 0;
  2037. g_sendhead.code[0] = 50;
  2038. g_sendhead.code[1] = 11;
  2039. g_sendhead.tabcount = 2;
  2040. g_pMainWnd->ProcessChatMessageRequest2(filter);
  2041. if (g_bSendOK == 0)return;
  2042. CArray<CStringArray, CStringArray>sparray;
  2043. DataToArray(&sparray, &g_List1array);
  2044. CString path = g_path2 + "\\";
  2045. SelectPhotoDlg selectdlg;
  2046. selectdlg.DoModal();
  2047. path += id;
  2048. path += "\\";
  2049. ////////////////////////////////////////
  2050. CString str, spname;
  2051. CStringArray noarray;
  2052. CStringArray spnamearray;
  2053. int i = 0;
  2054. for ( i = 0; i < sparray.GetSize(); i++)
  2055. {
  2056. str = sparray.ElementAt(i).ElementAt(6);
  2057. spname = sparray.ElementAt(i).ElementAt(5);
  2058. GetNo(str, noarray);
  2059. }
  2060. if (noarray.GetSize() == 0)
  2061. {
  2062. AfxMessageBox("此单未选片!", MB_ICONINFORMATION);
  2063. return;
  2064. }
  2065. spnamearray.SetSize(noarray.GetSize());
  2066. for (i = 0; i < noarray.GetSize(); i++)
  2067. {
  2068. str = noarray.ElementAt(i);
  2069. spnamearray.SetAt(i, GetSelName(str, sparray) + "-" + str);
  2070. }
  2071. CString dir;
  2072. GetSavePath(dir);
  2073. if (dir.IsEmpty())return;
  2074. dir.TrimRight('\\');
  2075. dir += "\\";
  2076. dir += id;
  2077. dir += name1;
  2078. dir += name2;
  2079. dir += "选片";
  2080. dir += "\\";
  2081. CStringArray array;
  2082. CStringArray spnamearray2;
  2083. CString src, des;
  2084. //selectdlg.m_mode: 1=原片 2=初修 0=初修+原片
  2085. if (selectdlg.m_mode == 2)
  2086. {
  2087. for (i = 0; i < noarray.GetSize(); i++)
  2088. {
  2089. src.Format("%s%s.jpg", path, noarray.ElementAt(i));
  2090. if (::CheckFolderFileExist(src))
  2091. {
  2092. array.Add(src);
  2093. if (selectdlg.m_check1)
  2094. spnamearray2.Add(spnamearray.ElementAt(i));
  2095. else
  2096. spnamearray2.Add(noarray.ElementAt(i));
  2097. }
  2098. else
  2099. AfxMessageBox("未找到初修过的文件:" + src.Right(src.GetLength() - src.ReverseFind('\\') - 1), MB_ICONINFORMATION);
  2100. }
  2101. }
  2102. if (array.GetSize() == 0)
  2103. {
  2104. if (selectdlg.m_mode == 2)
  2105. AfxMessageBox("注意:此单未修片, 导出的是原片!", MB_ICONINFORMATION);
  2106. path = g_path1 + "\\";
  2107. path += id;
  2108. path += "\\";
  2109. dir.Delete(dir.GetLength() - 1, 1);
  2110. dir += "(未修)\\";
  2111. for (i = 0; i < noarray.GetSize(); i++)
  2112. {
  2113. src = GetPathFromNo2(path, noarray.ElementAt(i));
  2114. if (PathFileExists(src))
  2115. {
  2116. array.Add(src);
  2117. if (selectdlg.m_check1)
  2118. spnamearray2.Add(spnamearray.ElementAt(i));
  2119. else
  2120. spnamearray2.Add(noarray.ElementAt(i));
  2121. }
  2122. }
  2123. }
  2124. if (array.GetSize() == 0)
  2125. {
  2126. AfxMessageBox("此单未导入原片!", MB_ICONINFORMATION);
  2127. return;
  2128. }
  2129. ::CreateDirectory(dir, NULL);
  2130. ImportPhoto dlg;
  2131. dlg.m_mode = 1;
  2132. dlg.m_pArray = &array;
  2133. dlg.m_pArray2 = &spnamearray2;
  2134. dlg.m_savepath = dir;
  2135. dlg.DoModal();
  2136. //////////////
  2137. if (g_List1array.GetSize())
  2138. {
  2139. CStdioFile fp;
  2140. fp.Open(dir + "客户要求.txt", CFile::modeCreate | CFile::modeWrite);
  2141. fp.WriteString(g_List1array.ElementAt(0).ElementAt(39));
  2142. fp.Close();
  2143. }
  2144. //////////////
  2145. AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  2146. }
  2147. #if USE_SHARE_FLORD
  2148. /************************************************************************/
  2149. /*
  2150. 函数:GetCurSelRecord
  2151. 描述:获取当前List列表选中的项记录;
  2152. 参数:
  2153. OUT:strName1 选中项的顾客1姓名;
  2154. OUT:strName2 选中项的顾客2姓名;
  2155. OUT:strOrderNum 选中项的订单号;
  2156. OUT:strDomain 选中项的所在分店域名,本店为空;
  2157. 返回:
  2158. 调用约定:
  2159. 注意:
  2160. */
  2161. /************************************************************************/
  2162. void BeautifySkinFrom2::GetCurSelRecord(
  2163. OUT CString &strName1,
  2164. OUT CString &strName2,
  2165. OUT CString &strOrderNum,
  2166. OUT CString &strBranch,
  2167. OUT CString &strDomain)
  2168. {
  2169. UpdateData();
  2170. // 获取所中行;
  2171. POSITION pos = m_FurtherList.GetFirstSelectedItemPosition();
  2172. if ( pos == NULL)
  2173. {
  2174. AfxMessageBox(_T("请先选中您要导片的定单!"), MB_ICONINFORMATION);
  2175. return;
  2176. }
  2177. int nItem = m_FurtherList.GetNextSelectedItem(pos);
  2178. // 获取选片状态, m_nAdd作用?;
  2179. CString strStatus = m_FurtherList.GetItemText(nItem,4 + m_nAdd);
  2180. if ( strStatus != _T("OK") )
  2181. {
  2182. AfxMessageBox(_T("此单未选片!"), MB_ICONINFORMATION);
  2183. return;
  2184. }
  2185. strOrderNum = m_FurtherList.GetItemText(nItem, 0 + m_nAdd);
  2186. strName1 = m_FurtherList.GetItemText(nItem, 1 + m_nAdd);
  2187. strName2 = m_FurtherList.GetItemText(nItem, 2 + m_nAdd);
  2188. if ( g_bAllBranch )
  2189. {
  2190. // 多店汇总时;
  2191. strBranch = m_FurtherList.GetItemText(nItem, 0);
  2192. strDomain = GetDomainFromBranch(strBranch);
  2193. }
  2194. else
  2195. {
  2196. if(g_branchname != _T(""))
  2197. {
  2198. strBranch = g_branchname;
  2199. strDomain = GetDomainFromBranch(g_branchname);
  2200. }
  2201. }
  2202. }
  2203. /************************************************************************/
  2204. /*
  2205. 函数:GetImageWithGoods
  2206. 描述:获取每张相片对应的商品串;
  2207. 参数:
  2208. IN: strBranch 分店名(多店汇总时)
  2209. IN: strDomain 分店域名(多店汇总或分店连接时);
  2210. IN: strOrderNum 订单号;
  2211. OUT: bGrowth 是否是儿童套系;
  2212. OUT: strSelGrowth 若bGrowth为TRUE,则这里为选中的成长套系名称;
  2213. OUT: bExportWithName 导出选好的片是否带商品名;
  2214. OUT: strAryOfImagePath 选中的相片路径;
  2215. OUT: strEachImageOfGoods与strAryOfImagePath元素位置对应,每一个元素都是strAryOfImagePath元素的商品表(用分号隔开);
  2216. 返回:返回导出的相片类型,== -1 无相片, 1 == 原片,0 == 初修片, 3 == 无初修,使用原片, //== 4 选择的是原片,但原片空....
  2217. 调用约定:
  2218. 注意:
  2219. */
  2220. /************************************************************************/
  2221. int BeautifySkinFrom2::GetImageWithGoods(
  2222. IN CString &strBranch,
  2223. IN CString &strDomain,
  2224. IN CString &strOrderNum,
  2225. OUT BOOL &bGrowth,
  2226. OUT CString &strSelGrowth,
  2227. OUT BOOL &bExportWithName,
  2228. OUT CStringArray &strAryOfImagePath,
  2229. OUT CStringArray &strAryOfEachImageOfGoods,
  2230. OUT CArray<CStringArray, CStringArray> &sparray2)
  2231. {
  2232. // 若是儿童成长套系,则弹出选项框;
  2233. CStringArray strAryOfScenery;
  2234. IsGrowthTx growthtxdlg;
  2235. growthtxdlg.m_mode = 1;
  2236. growthtxdlg.m_pAryOfScenery = &strAryOfScenery;
  2237. growthtxdlg.m_strOrderNumber = strOrderNum;
  2238. growthtxdlg.DoModal();
  2239. bGrowth = growthtxdlg.m_bGrowthTx;
  2240. strSelGrowth = growthtxdlg.m_seltxname;
  2241. // 与服务器通信获取指定条件的订单商品信息;
  2242. CString strFilter = _T("");
  2243. #ifdef CHILD_VERSION
  2244. if ( !strSelGrowth.IsEmpty() && strSelGrowth != _T("全部") )
  2245. {
  2246. strFilter.Format(_T("id='%s' and growthtxname = '%s'; id='%s'; id='%s' and name <> '入册' and name <> '入底'"), strOrderNum, strSelGrowth, strOrderNum, strOrderNum);
  2247. }
  2248. else
  2249. {
  2250. strFilter.Format(_T("id='%s'; id='%s'; id='%s' and name <> '入册' and name <> '入底'"), strOrderNum, strOrderNum, strOrderNum);
  2251. }
  2252. #else
  2253. strFilter.Format(_T("id='%s'; id='%s'; id='%s' and kind <> '2' and name <> '入册' and name <> '入底'"), strOrderNum, strOrderNum, strOrderNum);
  2254. #endif
  2255. g_sendhead.bsql = 0;
  2256. g_sendhead.code[0] = 50;
  2257. g_sendhead.code[1] = 11;
  2258. g_sendhead.code[2] = 56;
  2259. g_sendhead.tabcount = 3;
  2260. if( !g_bAllBranch )
  2261. {
  2262. g_pMainWnd->ProcessChatMessageRequest2(strFilter);
  2263. }
  2264. else
  2265. {
  2266. g_branchip = GetIP(strBranch);
  2267. g_pMainWnd->OnDisconnect();
  2268. g_branchname = strBranch;
  2269. g_bBranchModify = 1;
  2270. g_pMainWnd->ProcessChatMessageRequest2(strFilter);
  2271. g_pMainWnd->OnDisconnect();
  2272. g_bBranchModify = 0;
  2273. g_branchip = g_branchname = _T("");
  2274. }
  2275. if( !g_bSendOK )
  2276. return -1;
  2277. CArray<CStringArray, CStringArray> sparray;
  2278. //CArray<CStringArray, CStringArray> sparray2;
  2279. DataToArray( &sparray, &g_List1array, &sparray2 );
  2280. CString strTemp;
  2281. CStringArray strAryOfImageNum; // 所有相片的数字编号;
  2282. // 获取所有dindansp记录no字段中的相片编号;
  2283. int i = 0;
  2284. int nSize = sparray.GetSize();
  2285. for ( i = 0; i < nSize; i++)
  2286. {
  2287. strTemp = sparray.ElementAt(i).ElementAt(6); // dindansp表中的no字段;
  2288. // WriteTextLog(_T("no:") + strTemp);
  2289. GetNo(strTemp, strAryOfImageNum);
  2290. }
  2291. if ( strAryOfImageNum.GetSize() == 0 )
  2292. {
  2293. AfxMessageBox(_T("此单未选片!"),MB_ICONINFORMATION);
  2294. return -1;
  2295. }
  2296. // 获取每个相片编号关联的商品集合,用分号隔开;
  2297. strAryOfEachImageOfGoods.SetSize(strAryOfImageNum.GetSize());
  2298. nSize = strAryOfImageNum.GetSize();
  2299. for( int n = 0; n < nSize; n++)
  2300. {
  2301. strTemp = strAryOfImageNum.ElementAt(n);
  2302. // WriteTextLog(_T("关联的号码:") + strTemp);
  2303. CString strspnames = GetSelName(strTemp, sparray);
  2304. // WriteTextLog(_T("关联的商品:") + strspnames);
  2305. strAryOfEachImageOfGoods.SetAt(n, strspnames);
  2306. }
  2307. CStringArray strTempImageGoods;
  2308. strTempImageGoods.Copy(strAryOfEachImageOfGoods);
  2309. SelectPhotoDlg selectdlg;
  2310. selectdlg.DoModal();
  2311. bExportWithName = selectdlg.m_check1;
  2312. int nPhotoType = selectdlg.m_mode; //mode模式:2.初修 1.原片 0.初修+原片 //相片类型1=原片 2=初修 3=精修 4=设计
  2313. // 遍历所有共享目录,查找相片路径;
  2314. CStringArray imagePathArr;
  2315. CStringArray imageNumArr;
  2316. imageNumArr.Copy(strAryOfImageNum);
  2317. if(nPhotoType == 0)
  2318. {
  2319. // printf(_T("原片+初修\n"));
  2320. for(i=2; i>0; --i)
  2321. {
  2322. imagePathArr.RemoveAll();
  2323. LoadExistsImagesEx(i, strDomain, strOrderNum, bGrowth, strSelGrowth, strAryOfScenery, imageNumArr, imagePathArr, strAryOfEachImageOfGoods);
  2324. if(strAryOfImagePath.GetSize() == 0)
  2325. strAryOfImagePath.Append(imagePathArr);
  2326. else
  2327. {
  2328. int nSize = strAryOfImagePath.GetSize();
  2329. for(int j=0; j<nSize; j++)
  2330. {
  2331. //去掉相同的相片
  2332. CString strName1 = strAryOfImagePath.ElementAt(j);
  2333. strName1 = strName1.Right(strName1.GetLength() - strName1.ReverseFind('\\') - 1);
  2334. for(int k=0; k<imagePathArr.GetSize(); k++)
  2335. {
  2336. CString strName2 = imagePathArr.ElementAt(k);
  2337. strName2 = strName2.Right(strName2.GetLength() - strName2.ReverseFind('\\') - 1);
  2338. if(strName1 == strName2)
  2339. {
  2340. imagePathArr.RemoveAt(k);
  2341. break;
  2342. }
  2343. }
  2344. }
  2345. if(imagePathArr.GetSize() > 0)
  2346. strAryOfImagePath.Append(imagePathArr);
  2347. }
  2348. }
  2349. }
  2350. else
  2351. {
  2352. LoadExistsImagesEx(nPhotoType, strDomain, strOrderNum, bGrowth, strSelGrowth, strAryOfScenery, imageNumArr, imagePathArr, strAryOfEachImageOfGoods);
  2353. if(imagePathArr.GetSize() > 0)
  2354. strAryOfImagePath.Copy(imagePathArr);
  2355. }
  2356. if ( strAryOfImagePath.GetSize() == 0 && nPhotoType == 2)
  2357. {
  2358. AfxMessageBox(_T("注意:此单未修片, 导出的是原片!"), MB_ICONINFORMATION);
  2359. nPhotoType = 1;
  2360. strAryOfImagePath.RemoveAll();
  2361. strAryOfEachImageOfGoods.RemoveAll();
  2362. strAryOfEachImageOfGoods.Copy(strTempImageGoods);
  2363. LoadExistsImagesEx(nPhotoType,strDomain,strOrderNum,bGrowth,strSelGrowth,strAryOfScenery,imageNumArr,imagePathArr,strAryOfEachImageOfGoods);
  2364. if(imagePathArr.GetSize() > 0)
  2365. strAryOfImagePath.Append(imagePathArr);
  2366. return strAryOfImagePath.GetSize() ? 3 : -1;
  2367. }
  2368. //按编号排序
  2369. CStringArray tempPathArr;
  2370. tempPathArr.Copy(strAryOfImagePath);
  2371. strAryOfImagePath.RemoveAll();
  2372. for(int j=0; j<imageNumArr.GetSize(); j++)
  2373. {
  2374. BOOL bExists = FALSE;
  2375. CString strNum = imageNumArr.ElementAt(j);
  2376. for(i=0; i<tempPathArr.GetSize(); i++)
  2377. {
  2378. CString strFile = tempPathArr.ElementAt(i);
  2379. strFile = strFile.Mid(strFile.ReverseFind('\\')+1);
  2380. int nPos = strFile.Find(_T("."));
  2381. if(nPos == -1)
  2382. continue;
  2383. strFile = strFile.Left(nPos);
  2384. if(strNum.CompareNoCase(strFile) == 0)
  2385. {
  2386. strAryOfImagePath.Add(tempPathArr.ElementAt(i));
  2387. bExists = TRUE;
  2388. break;
  2389. }
  2390. }
  2391. if(!bExists)
  2392. strAryOfImagePath.Add(_T(""));
  2393. }
  2394. return strAryOfImagePath.GetSize() ? selectdlg.m_mode : -1;
  2395. }
  2396. /************************************************************************/
  2397. /*
  2398. 函数:LoadExistsImagesEx
  2399. 描述:加载存在的相片编号文件;
  2400. 参数:
  2401. IN:nPhotoType 导出的相片类型;
  2402. IN:lpDomain 域名;
  2403. IN:lpOrderNum 订单号;
  2404. IN:bGrowTh 是否儿童成长套系;
  2405. IN:lpSelectName 选中的成长套系名;
  2406. IN:strAryOfScenery 订单下的景点名或儿童成长套系名数组;
  2407. IN:strAryOfImageNum 订单选好商品的相片编号数组;
  2408. OUT:strAryOfImagePath 存在于共享目录的相片编号文件路径数组;
  2409. OUT:strAryOfImageGoods 存在于共享目录的相片关联的商品数组;
  2410. 返回:
  2411. 调用约定:
  2412. 注意:
  2413. */
  2414. /************************************************************************/
  2415. void BeautifySkinFrom2::LoadExistsImagesEx(IN const int &nPhotoType,
  2416. IN LPCTSTR lpDomain,
  2417. IN LPCTSTR lpOrderNum,
  2418. IN BOOL bGrowTh,
  2419. IN LPCTSTR lpSelectName,
  2420. IN CStringArray &strAryOfScenery,
  2421. IN CStringArray &strAryOfImageNum,
  2422. OUT CStringArray &strAryOfImagePath,
  2423. OUT CStringArray &strAryOfImageGoods)
  2424. {
  2425. CStringArray strTempNum; //临时相片编号如:001,002
  2426. strTempNum.Copy(strAryOfImageNum);
  2427. CStringArray strTempImagePath; //临时相片路径集
  2428. //根据选好的相片编号查找
  2429. CNetShareInfo::GetInstance()->LoadOrderBySelectedImages(nPhotoType, lpOrderNum, lpDomain, strTempNum, strTempImagePath);
  2430. CString strScenery(lpSelectName);
  2431. /*
  2432. printf("-----bGrowTh = %d---------------strScenery = %s--------------------\n", bGrowTh, lpSelectName);
  2433. */
  2434. if ( bGrowTh && ( !strScenery.IsEmpty() && strScenery != _T("全部")) )
  2435. {
  2436. // 保留套系名下的相片;
  2437. CString str;
  2438. if ( nPhotoType == 1 )
  2439. {
  2440. // 原片;
  2441. for ( int i = 0; i < strTempImagePath.GetSize(); i++)
  2442. {
  2443. str = strTempImagePath.ElementAt(i);
  2444. str = str.Mid(str.Find(lpOrderNum) + strlen(lpOrderNum) + 1);
  2445. str = str.Left(str.Find('\\'));
  2446. if ( str.CompareNoCase(strScenery) == 0 )
  2447. {
  2448. strAryOfImagePath.Add(strTempImagePath.ElementAt(i));
  2449. }
  2450. }
  2451. }
  2452. else
  2453. {
  2454. // 初修;
  2455. for ( int i = 0; i < strTempImagePath.GetSize(); i++)
  2456. {
  2457. str = strTempImagePath.ElementAt(i);
  2458. int nIndex = str.Find(lpOrderNum);
  2459. str.Insert(nIndex + strlen(lpOrderNum) + 1, strScenery + _T("\\"));
  2460. if ( PathFileExists(str) )
  2461. strAryOfImagePath.Add(strTempImagePath.ElementAt(i));
  2462. }
  2463. }
  2464. }
  2465. else
  2466. {
  2467. /*
  2468. for(int i=0; i<strTempImagePath.GetSize(); )
  2469. {
  2470. CString strPath = strTempImagePath.ElementAt(i);
  2471. strPath = strPath.Right(strPath.GetLength() - strPath.ReverseFind('\\') - 1);
  2472. strPath = strPath.Left(strPath.Find('.'));
  2473. printf("strPath = %s\n", strPath);
  2474. if(FindArray(&strTempNum, strPath) == -1)
  2475. {
  2476. printf("remove = %s\n", strTempImagePath.ElementAt(i));
  2477. strTempImagePath.RemoveAt(i);
  2478. }
  2479. else
  2480. i++;
  2481. }
  2482. */
  2483. strAryOfImagePath.Copy(strTempImagePath);
  2484. }
  2485. /*test
  2486. for(int i=0; i<strAryOfImagePath.GetSize(); i++)
  2487. printf("path10 = %s\n", strAryOfImagePath.ElementAt(i));
  2488. */
  2489. }
  2490. #endif