BeautifySkinFrom2.cpp 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731
  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. WriteOptLog(_T("导入精修,订单号:%s"),strOrderNum);
  537. }
  538. // 结束;
  539. #else
  540. POSITION pos;
  541. pos = m_FurtherList.GetFirstSelectedItemPosition();
  542. if (pos == NULL)
  543. {
  544. AfxMessageBox("请先选中您要导片的定单!", MB_ICONINFORMATION);
  545. return;
  546. }
  547. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  548. CString branch;
  549. CString id = m_FurtherList.GetItemText(iItem, 0 + m_nAdd);
  550. if (g_bAllBranch)
  551. branch = m_FurtherList.GetItemText(iItem, 0);
  552. CString oldstatus = m_FurtherList.GetItemText(iItem, 6 + m_nAdd);
  553. CString time9 = m_FurtherList.GetItemText(iItem, 7 + m_nAdd);
  554. CString name = m_FurtherList.GetItemText(iItem, 1 + m_nAdd) + "," + m_FurtherList.GetItemText(iItem, 2 + m_nAdd);
  555. name.TrimLeft(",");
  556. name.TrimRight(",");
  557. name = "客人:" + name;
  558. CString phone = m_FurtherList.GetItemText(iItem, 15 + m_nAdd) + "," + m_FurtherList.GetItemText(iItem, 16 + m_nAdd);
  559. phone.TrimLeft(",");
  560. phone.TrimRight(",");
  561. phone = "电话:" + phone;
  562. CString strDomain = _T("");
  563. CString savepath = _T("");
  564. if (g_bAllBranch)
  565. strDomain = GetDomainFromBranch(branch);
  566. else
  567. {
  568. if(g_branchname != _T(""))
  569. strDomain = GetDomainFromBranch(g_branchname);
  570. }
  571. //////////////////////////////////////////////////////////////////////////
  572. // 获取可用的共享目录;
  573. #if USE_SHARE_FLORD // 2015.04.13
  574. TCHAR szSharePath[MAX_PATH];
  575. //if( GetEnableShareDirectory(3,id,branch,szSharePath) )
  576. if (CNetShareInfo::GetInstance()->GetEnableShareDirectory(3, id, strDomain, szSharePath))
  577. {
  578. savepath.Format("%s\\",szSharePath);
  579. }
  580. else
  581. {
  582. AfxMessageBox(_T("没有可用的共享目录!"));
  583. return;
  584. }
  585. #else
  586. savepath += id + "\\";
  587. #endif
  588. //////////////////////////////////////////////////////////////////////////
  589. if (::CheckFolderFileExist(savepath) == 0)
  590. {
  591. if ( !CreateDirectory(savepath, NULL) )
  592. {
  593. DWORD dwError = GetLastError();
  594. AfxMessageBox(_T("创建精修订单目录失败"));
  595. return;
  596. }
  597. }
  598. CString srcdir; CString str;
  599. GetSavePath(srcdir);
  600. if (srcdir.IsEmpty())
  601. {
  602. CString status6;
  603. if (AfxMessageBox("客照是否全部精修完毕?", MB_YESNO | MB_ICONINFORMATION) == IDYES)
  604. status6 = "OK";
  605. else
  606. status6 = "修片中";
  607. CString sql;
  608. if (time9.IsEmpty())
  609. sql = "update dindan set status6='" + status6 + "',time9='" + g_date + "' where id='" + id + "'";
  610. else
  611. sql = "update dindan set status6='" + status6 + "' where id='" + id + "'";
  612. g_sendhead.bsql = 1;
  613. if (g_bAllBranch)
  614. {
  615. g_branchip = GetIP(branch);
  616. g_pMainWnd->OnDisconnect();
  617. g_branchname = branch;
  618. g_bBranchModify = 1;
  619. g_pMainWnd->ProcessChatMessageRequest2(sql);
  620. g_pMainWnd->OnDisconnect();
  621. g_bBranchModify = 0;
  622. g_branchip = g_branchname = "";
  623. }
  624. else
  625. g_pMainWnd->ProcessChatMessageRequest2(sql);
  626. if (g_bSendOK == 0)return;
  627. if (g_bAllBranch == 0)
  628. {
  629. GetData();
  630. }
  631. else
  632. {
  633. for (int i = 0; i < m_List1array.GetSize(); i++)
  634. {
  635. if (id == m_List1array.ElementAt(i).ElementAt(1) && branch == m_List1array.ElementAt(i).ElementAt(0))
  636. {
  637. m_List1array.ElementAt(i).SetAt(6 + m_nAdd, status6);
  638. if (time9.IsEmpty())
  639. m_List1array.ElementAt(i).SetAt(7 + m_nAdd, g_date);
  640. FillGrid();
  641. break;
  642. }
  643. }
  644. }
  645. return;
  646. }
  647. if (srcdir.GetLength() < 4)
  648. {
  649. AfxMessageBox("请选择正确的您文件所在的目录!", MB_ICONSTOP);
  650. return;
  651. }
  652. if (oldstatus != "未修")
  653. {
  654. str.Format("%s\r\n%s\r\n此单已导入过修片,确认您选中的照片没有导入过吗? 否则会覆盖原来的照片, 是否继续?", name, phone);
  655. if (AfxMessageBox(str, MB_YESNO | MB_ICONSTOP) != IDYES)
  656. return;
  657. }
  658. else
  659. {
  660. str.Format("%s\r\n%s\r\n确认您选中的照片与客户资料相符吗? 是否继续?", name, phone);
  661. if (AfxMessageBox(str, MB_YESNO | MB_ICONINFORMATION) != IDYES)
  662. return;
  663. }
  664. CStringArray array;
  665. CStringArray desarray;
  666. CStringArray dirarray;
  667. if (1)
  668. {
  669. // 1.获取源目录下的所有文件,包含子目录;
  670. using namespace helper_coffs;
  671. ffsco o;
  672. o.dirs(1);
  673. o.find(LPCSTR(srcdir), LPCSTR("*.*"));
  674. ffsco::typeT coo;
  675. ffsco::typeT::iterator it;
  676. coo = o.co_dir();
  677. for (it = coo.begin(); coo.end() != it; it++)
  678. {
  679. str = (*it).c_str();
  680. if (FindArray(&dirarray, str) == -1)
  681. {
  682. dirarray.Add(str);
  683. if (str != dirarray.ElementAt(0))
  684. {
  685. str = savepath + str.Right(str.GetLength() - dirarray.ElementAt(0).GetLength());
  686. if (::CheckFolderFileExist(str) == 0)
  687. ::CreateDirectory(str, NULL);
  688. }
  689. }
  690. }
  691. }
  692. if (1)
  693. {
  694. // 2.从每个子目录下查找所有的相片;
  695. for (int i = 0; i < dirarray.GetSize(); i++)
  696. {
  697. using namespace helper_coffs;
  698. ffsco o;
  699. o.dirs(0);
  700. o.find(LPCSTR(dirarray.ElementAt(i)), LPCSTR("*.jpg"));
  701. ffsco::typeT coo;
  702. ffsco::typeT::iterator it;
  703. coo = o.co_file();
  704. for (it = coo.begin();coo.end() != it;it++)
  705. {
  706. str = (*it).c_str();
  707. array.Add(str);
  708. desarray.Add(savepath + dirarray.ElementAt(i).Right(dirarray.ElementAt(i).GetLength() - dirarray.ElementAt(0).GetLength()) + str.Right(str.GetLength() - str.ReverseFind('\\') - 1));
  709. }
  710. }
  711. }
  712. if (array.GetSize() == 0)return;
  713. ImportPhoto dlg;
  714. #if USE_SHARE_FLORD
  715. dlg.m_id = id; // add by 2015-07-06 Jeff;
  716. #endif
  717. dlg.m_branch = branch;
  718. dlg.m_nphototype = 2;
  719. dlg.m_bOverWrite = 1;
  720. dlg.m_pArray = &array;
  721. dlg.m_pDesArray = &desarray;
  722. dlg.m_savepath = savepath;
  723. #ifdef ENTERPRISE_VERSION
  724. // if(!g_branchname.IsEmpty ())
  725. {
  726. dlg.m_bSaveUploadTask = g_bSaveUploadTask3;
  727. dlg.m_sel = g_cominfoarraylocal.ElementAt(0).ElementAt(80);
  728. dlg.m_uploadtaskarray.Add(id + ";" + name);
  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. dlg.m_uploadtaskarray.Add("");
  738. }
  739. #endif
  740. dlg.DoModal();
  741. CString status6;
  742. if (AfxMessageBox("客照是否全部精修完毕?", MB_YESNO | MB_ICONINFORMATION) == IDYES)
  743. status6 = "OK";
  744. else
  745. status6 = "修片中";
  746. CString sql;
  747. if (time9.IsEmpty())
  748. sql = "update dindan set status6='" + status6 + "',waiter7='" + g_user.name + "',time9='" + g_date + "' where id='" + id + "'";
  749. else
  750. sql = "update dindan set status6='" + status6 + "',waiter7='" + g_user.name + "' where id='" + id + "'";
  751. g_sendhead.bsql = 1;
  752. if (g_bAllBranch)
  753. {
  754. g_branchip = GetIP(branch);
  755. g_pMainWnd->OnDisconnect();
  756. g_branchname = branch;
  757. g_bBranchModify = 1;
  758. g_pMainWnd->ProcessChatMessageRequest2(sql);
  759. g_pMainWnd->OnDisconnect();
  760. g_bBranchModify = 0;
  761. g_branchip = g_branchname = "";
  762. }
  763. else
  764. g_pMainWnd->ProcessChatMessageRequest2(sql);
  765. if (g_bSendOK == 0)return;
  766. savepath += "ok";
  767. ::DeleteFile(savepath); // 删除ok文件;
  768. AfxMessageBox("导入客照成功!", MB_ICONINFORMATION);
  769. if (g_bAllBranch == 0)
  770. {
  771. GetData();
  772. }
  773. else
  774. {
  775. for (int i = 0; i < m_List1array.GetSize(); i++)
  776. {
  777. if (id == m_List1array.ElementAt(i).ElementAt(1) && branch == m_List1array.ElementAt(i).ElementAt(0))
  778. {
  779. m_List1array.ElementAt(i).SetAt(6 + m_nAdd, status6);
  780. if (time9.IsEmpty())
  781. m_List1array.ElementAt(i).SetAt(7 + m_nAdd, g_date);
  782. m_List1array.ElementAt(i).SetAt(11 + m_nAdd, g_user.name);
  783. FillGrid();
  784. break;
  785. }
  786. }
  787. }
  788. #endif
  789. }
  790. void BeautifySkinFrom2::OnBUTshowphoto() // 查看精修片;
  791. {
  792. POSITION pos;
  793. pos = m_FurtherList.GetFirstSelectedItemPosition();
  794. if (pos == NULL)
  795. {
  796. AfxMessageBox("请先选中您要查看的定单!", MB_ICONINFORMATION);
  797. return;
  798. }
  799. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  800. CString branch;
  801. CString id = m_FurtherList.GetItemText(iItem, 0 + m_nAdd);
  802. if (g_bAllBranch)
  803. branch = m_FurtherList.GetItemText(iItem, 0);
  804. CString name = m_FurtherList.GetItemText(iItem, 1 + m_nAdd) + "," + m_FurtherList.GetItemText(iItem, 2 + m_nAdd);
  805. name.TrimLeft(",");
  806. name.TrimRight(",");
  807. name = "客人:" + name;
  808. ShowPic dlg;
  809. dlg.m_id = id;
  810. dlg.m_name = name;
  811. dlg.m_mode = 3;
  812. if(g_branchname == _T(""))
  813. dlg.m_path = g_path1 + "\\";
  814. else
  815. {
  816. dlg.m_branch = GetDomainFromBranch(g_branchname);
  817. CString branchpath = GetBranchPhotoPath(g_branchname);
  818. dlg.m_path = g_path1 + branchpath + "\\";
  819. }
  820. #ifndef USE_KERNEL_DLL
  821. #if USE_SHARE_FLORD
  822. // 根据域名,相片类型,订单号查找相片;
  823. dlg.m_aryOfShareDirectory.RemoveAll();
  824. CNetShareInfo::GetInstance()->LoadOrderImages(dlg.m_mode, dlg.m_id, g_domain, dlg.m_patharray1, &dlg.m_aryOfShareDirectory);
  825. #endif
  826. #endif
  827. dlg.m_path += id;
  828. dlg.m_path += "\\";
  829. dlg.DoModal();
  830. }
  831. //-----------------------------------------------------------------
  832. // remark by Jeff 2014-12-12
  833. // 函数:GetNo
  834. // 描述:从str中解析出每个相片名,然后存入空的CStringArray中;
  835. // 参数:
  836. // str:选好的相片名串,如:"001,002,003" 后分隔符改为"|",结果应是"001|002|003"
  837. // array:空的数组,用来存放解析后的相片名;
  838. // 返回:
  839. // 注意:更换分隔符造成的问题,在该函数已解决;
  840. //-----------------------------------------------------------------
  841. void BeautifySkinFrom2::GetNo(CString str, CStringArray &array)
  842. {
  843. if (!str.IsEmpty())
  844. {
  845. #ifdef USE_SEP_VEB
  846. int pos = str.Find(SEPS_VEB);
  847. #else
  848. int pos = str.Find(",");
  849. #endif
  850. while (pos != -1)
  851. {
  852. if (FindArray(&array, str.Left(pos)) == -1)
  853. array.Add(str.Left(pos));
  854. str = str.Right(str.GetLength() - pos - 1);
  855. #ifdef USE_SEP_VEB
  856. pos = str.Find(SEPS_VEB);
  857. #else
  858. pos = str.Find(",");
  859. #endif
  860. }
  861. if (FindArray(&array, str) == -1)
  862. array.Add(str);
  863. }
  864. }
  865. //-----------------------------------------------------------------
  866. // remark by Jeff 2014-12-12
  867. // 函数:GetSelName
  868. // 描述:
  869. // 参数:
  870. // name:由GetNo解析出来后的单个相片名,如:"001"
  871. // spnamearray:订单下的商品数组,case 50所得;
  872. // 返回:
  873. // 注意:更换分隔符造成的问题,在该函数已解决;
  874. //-----------------------------------------------------------------
  875. CString BeautifySkinFrom2::GetSelName(CString name, CArray<CStringArray, CStringArray>&spnamearray)
  876. {
  877. CString ret;
  878. #ifdef USE_SEP_VEB
  879. name = SEPS_VEB + name + SEPS_VEB;
  880. #else
  881. name = "," + name + ",";
  882. #endif
  883. CString str;
  884. for (int i = 0; i < spnamearray.GetSize(); i++)
  885. {
  886. #ifdef USE_SEP_VEB
  887. str = SEPS_VEB + spnamearray.ElementAt(i).ElementAt(6) + SEPS_VEB;
  888. #else
  889. str = "," + spnamearray.ElementAt(i).ElementAt(6) + ",";
  890. #endif
  891. if (str.Find(name) != -1)
  892. {
  893. ret += spnamearray.ElementAt(i).ElementAt(5);
  894. ret += ";";
  895. }
  896. }
  897. ret.TrimRight(";");
  898. ret.Replace("*", "x");
  899. return ret;
  900. }
  901. CString GetPathFromNo2(CString dir, CString no)
  902. {
  903. CString sRet;
  904. dir.TrimRight('\\');
  905. dir += "\\";
  906. CStringArray dirarray;
  907. CString temp;
  908. using namespace helper_coffs;
  909. ffsco o;
  910. o.dirs(1);
  911. o.find(LPCSTR(dir), LPCSTR("*.*"));
  912. ffsco::typeT coo;
  913. ffsco::typeT::iterator it;
  914. coo = o.co_dir();
  915. for (it = coo.begin();coo.end() != it;it++)
  916. {
  917. temp = (*it).c_str();
  918. if (::FindArray(&dirarray, temp) == -1 && temp != dir)
  919. {
  920. dirarray.Add(temp);
  921. }
  922. }
  923. for (int i = 0; i < dirarray.GetSize(); i++)
  924. {
  925. temp = dirarray.ElementAt(i);
  926. sRet.Format("%s%s.jpg", temp, no);
  927. if (::PathFileExists(sRet))return sRet;
  928. sRet.Replace(".jpg", ".raw");
  929. if (::PathFileExists(sRet))return sRet;
  930. sRet.Replace(".raw", ".nef");
  931. if (::PathFileExists(sRet))return sRet;
  932. sRet.Replace(".nef", ".cr2");
  933. if (::PathFileExists(sRet))return sRet;
  934. sRet.Replace(".cr2", ".jpg");
  935. if (::PathFileExists(sRet))return sRet;
  936. }
  937. return dir + no + ".jpg";
  938. }
  939. CString GetPathFromNo3(CString dir, CString no)
  940. {
  941. CString sRet;
  942. dir.TrimRight('\\');
  943. dir += "\\";
  944. CStringArray dirarray;
  945. CString temp;
  946. using namespace helper_coffs;
  947. ffsco o;
  948. o.dirs(1);
  949. o.find(LPCSTR(dir), LPCSTR("*.*"));
  950. ffsco::typeT coo;
  951. ffsco::typeT::iterator it;
  952. coo = o.co_dir();
  953. for (it = coo.begin();coo.end() != it;it++)
  954. {
  955. temp = (*it).c_str();
  956. if (::FindArray(&dirarray, temp) == -1 && temp != dir)
  957. {
  958. dirarray.Add(temp);
  959. }
  960. }
  961. for (int i = 0; i < dirarray.GetSize(); i++)
  962. {
  963. temp = dirarray.ElementAt(i);
  964. sRet.Format("%s%s.jpg", temp, no);
  965. if (::PathFileExists(sRet))return sRet;
  966. }
  967. return dir + no + ".jpg";
  968. }
  969. // 导出裁剪后的效果图;
  970. void BeautifySkinFrom2::OnBUTexportphoto() // 导出选好的片 按钮;
  971. {
  972. #ifdef USE_KERNEL_DLL
  973. // 判断用户是否有权限导出选好的片;
  974. if ( !IsHasRights2new(10) )
  975. {
  976. AfxMessageBox(_T("您没有权限导出选好的片!"));
  977. return;
  978. }
  979. // 获取列表信息;
  980. POSITION pos = m_FurtherList.GetFirstSelectedItemPosition();
  981. if ( pos == NULL )
  982. {
  983. AfxMessageBox(__T("请选中您要导片的订单!"));
  984. return;
  985. }
  986. INT nItemCount = m_FurtherList.GetItemCount();
  987. INT nSelectedItem = m_FurtherList.GetNextSelectedItem(pos);
  988. // 获取域名、订单号、景点名、顾客信息、选片人、选片状态、选片日期;
  989. CString strBranchName = _T("");
  990. CString strBranchId = _T("");
  991. CString strOrderNum = _T("");
  992. CString strScenery = _T("");
  993. CString strCustomerInfo = _T("");
  994. CString strXuanpianRen = _T("");
  995. CString strXuanpianState = _T("");
  996. CString strXuanpianDate = _T("");
  997. // 获取订单号;
  998. strOrderNum = m_FurtherList.GetItemText(nSelectedItem, 0 + m_nAdd);
  999. // 获取顾客信息;
  1000. strCustomerInfo = m_FurtherList.GetItemText(nSelectedItem, 1 + m_nAdd) + _T(",") + m_FurtherList.GetItemText(nSelectedItem, 2 + m_nAdd);
  1001. // 获取选片状态;
  1002. strXuanpianState = m_FurtherList.GetItemText(nSelectedItem, 4 + m_nAdd);
  1003. // 获取选片日期;
  1004. strXuanpianRen = m_FurtherList.GetItemText(nSelectedItem, 5 + m_nAdd);
  1005. if ( strXuanpianState == _T("未选") )
  1006. {
  1007. MessageBox(_T("此单未选片!"), _T("影楼管理"), MB_OK | MB_TOPMOST | MB_ICONINFORMATION );
  1008. return;
  1009. }
  1010. // 获取域名;
  1011. if ( g_bAllBranch )
  1012. {// 多店汇总;
  1013. strBranchName = m_FurtherList.GetItemText(nSelectedItem, 0);
  1014. strBranchId = GetDomainFromBranch(strBranchName);
  1015. }
  1016. else
  1017. {
  1018. if ( g_branchname.IsEmpty() )
  1019. {// 连接本店时;
  1020. strBranchId = g_domain;
  1021. }
  1022. else
  1023. {//连接分店时;
  1024. strBranchName = g_branchname;
  1025. strBranchId = GetDomainFromBranch( g_branchname );
  1026. }
  1027. }
  1028. // 获取景点名,需要读取dindanjd表获取,目前只支持儿童成长套系订单;
  1029. IsGrowthTx IsGrowthtxdlg;
  1030. IsGrowthtxdlg.m_mode = 1;
  1031. IsGrowthtxdlg.m_strOrderNumber = strOrderNum;
  1032. IsGrowthtxdlg.DoModal();
  1033. if( IsGrowthtxdlg.m_bReturnOK == 0 || (IsGrowthtxdlg.m_bGrowthTx && IsGrowthtxdlg.m_seltxname.IsEmpty()) )
  1034. {
  1035. return;
  1036. }
  1037. if ( IsGrowthtxdlg.m_bGrowthTx )
  1038. {
  1039. // 读取dindanjd表里的成长套系名,并返回选中的成长套系名;
  1040. strScenery = IsGrowthtxdlg.m_seltxname;
  1041. if ( strScenery == _T("全部") )
  1042. {
  1043. strScenery.Empty();
  1044. }
  1045. }
  1046. /////////////////////////////////////////////////////////////////////////////////////////////////
  1047. // 与服务器通信获取指定条件的订单商品信息;
  1048. CString strSQL = _T("");
  1049. #ifdef CHILD_VERSION
  1050. if ( IsGrowthtxdlg.m_bGrowthTx && !strScenery.IsEmpty() )
  1051. strSQL.Format(_T("id='%s' and growthtxname = '%s'; id='%s'; id='%s' and name <> '入册' and name <> '入底'"), strOrderNum, strScenery, strOrderNum, strOrderNum);
  1052. else
  1053. strSQL.Format(_T("id='%s'; id='%s'; id='%s' and name <> '入册' and name <> '入底'"), strOrderNum, strOrderNum, strOrderNum);
  1054. #else
  1055. strSQL.Format(_T("id='%s'; id='%s'; id='%s' and kind <> '2' and name <> '入册' and name <> '入底'"), strOrderNum, strOrderNum, strOrderNum);
  1056. #endif//CHILD_VERSION
  1057. g_sendhead.bsql = FALSE;
  1058. g_sendhead.code[0] = 50; // dindansp;
  1059. g_sendhead.code[1] = 11; // dindan;
  1060. g_sendhead.code[2] = 56; // dindansp;
  1061. g_sendhead.tabcount = 3;
  1062. if( g_bAllBranch )
  1063. {//多店汇总时;
  1064. g_branchip = GetBranchIPbyId(strBranchId);
  1065. g_pMainWnd->OnDisconnect();
  1066. g_branchname = strBranchName;
  1067. g_bBranchModify = TRUE;
  1068. g_pMainWnd->ProcessChatMessageRequest2(strSQL);
  1069. g_pMainWnd->OnDisconnect();
  1070. g_bBranchModify = FALSE;
  1071. g_branchip = g_branchname = _T("");
  1072. }
  1073. else
  1074. {// 连接本店或分店时;
  1075. g_pMainWnd->ProcessChatMessageRequest2(strSQL);
  1076. }
  1077. if( !g_bSendOK )
  1078. return ;
  1079. CArray<CStringArray, CStringArray> Arydindan;
  1080. CArray<CStringArray, CStringArray> Arydindansp;
  1081. CArray<CStringArray, CStringArray> Arydindansp2;
  1082. DataToArray( &Arydindansp, &Arydindan, &Arydindansp2 );
  1083. CString strTemp = _T("");
  1084. CStringArray AryImgNums;
  1085. CStringArray AryPerImgGoods;
  1086. // 获取所有dindansp记录no字段中的相片编号;
  1087. int i = 0;
  1088. int nSize = Arydindansp.GetSize();
  1089. for ( i = 0; i < nSize; i++)
  1090. {
  1091. strTemp = Arydindansp.ElementAt(i).ElementAt(6); // dindansp表中的no字段;
  1092. GetNo(strTemp, AryImgNums);
  1093. }
  1094. // 获取每张相片编号对应的商品,每个商品间用分号隔开;
  1095. nSize = AryImgNums.GetSize();
  1096. AryPerImgGoods.SetSize(nSize);
  1097. for ( i = 0; i < nSize; i++ )
  1098. {
  1099. strTemp = AryImgNums.ElementAt(i);
  1100. AryPerImgGoods.SetAt(i, GetSelName(strTemp, Arydindansp));
  1101. }
  1102. // 由于VC6.0传CStringArray给VC9.0DLL 时,会产生无法避免的兼容性问题,故使用CString传;
  1103. CString strImgNums = _T("");
  1104. for ( i = 0; i < AryImgNums.GetSize(); i++ )
  1105. {
  1106. strImgNums += AryImgNums.ElementAt(i);
  1107. strImgNums += _T("?|?");
  1108. }
  1109. CString strPerImgGoods = _T("");
  1110. for ( i = 0; i < AryPerImgGoods.GetSize(); i++ )
  1111. {// 商品名称,应该禁止包含非法字符;
  1112. strPerImgGoods += AryPerImgGoods.ElementAt(i);
  1113. strPerImgGoods += _T("?|?");
  1114. }
  1115. // 再选择导出的是初修片、原片、初修+原片,并且是否按产品生成文件夹分类相片或者相片名后带产品名;
  1116. SelectPhotoDlg selectdlg;
  1117. selectdlg.DoModal();
  1118. BOOL bExportWithName = selectdlg.m_check1;
  1119. INT bExportMode = selectdlg.m_mode; // 0 原片+初修, 1 原片, 2 初修;
  1120. // 保存导出相片的路径;
  1121. CString strSaveDirectory = _T("");
  1122. if ( g_pIMGProcess == NULL )
  1123. {
  1124. return ;
  1125. }
  1126. ImgExportInterface *pExport = NULL;
  1127. g_pIMGProcess->QueryInterface(IID_ImgExportInterface, (void**)&pExport);
  1128. if ( pExport )
  1129. {// 导出选好的片;
  1130. HGLOBAL hMemery = pExport->ExportSelectedBeautifyImg(
  1131. strBranchId,
  1132. strOrderNum,
  1133. strCustomerInfo,
  1134. !strScenery.IsEmpty(),
  1135. strScenery,
  1136. _T("*.jpg|*.jpeg"),
  1137. INVALID_COPY_PIX,
  1138. _T("*.nef|*.cr2|*.raw|"),
  1139. FALSE,
  1140. bExportWithName,
  1141. IsGrowthtxdlg.m_bGrowthTx,
  1142. bExportMode,
  1143. strImgNums,
  1144. strPerImgGoods,
  1145. Arydindan.ElementAt(0).ElementAt(60)
  1146. );
  1147. WriteOptLog(_T("导出选好的片,订单号:%s"),strOrderNum);
  1148. if ( hMemery )
  1149. {
  1150. CString strDir = _T("");
  1151. TCHAR* pszSaveDirectory = (TCHAR*)GlobalLock(hMemery);
  1152. GlobalUnlock(hMemery);
  1153. // 输出输出要求内容;
  1154. strDir.Format(_T("%s\\客户要求.txt"), pszSaveDirectory);
  1155. if ( Arydindan.GetSize() )
  1156. {
  1157. CStdioFile fp;
  1158. fp.Open(strDir, CFile::modeCreate | CFile::modeWrite);
  1159. fp.WriteString(_T("选片要求:\n"));
  1160. fp.WriteString(Arydindan.ElementAt(0).ElementAt(39) + _T(" ") + Arydindan.ElementAt(0).ElementAt(75));
  1161. fp.WriteString(_T("\n"));
  1162. fp.WriteString(_T("\n"));
  1163. fp.WriteString(_T("订单要求:\n"));
  1164. fp.WriteString(Arydindan.ElementAt(0).ElementAt(38));
  1165. fp.WriteString(_T("\n"));
  1166. fp.WriteString(_T("\n"));
  1167. fp.WriteString(_T("客人产品:\n"));
  1168. CString str;
  1169. str = _T("产品名称");
  1170. FillLength(str, 30);
  1171. str += _T("数量");
  1172. FillLength(str, 40);
  1173. #ifdef LKAY_VERSION
  1174. str += _T("P数");
  1175. FillLength(str, 50);
  1176. str += _T("加急");
  1177. FillLength(str, 60);
  1178. str += _T("取件日期");
  1179. FillLength(str, 70);
  1180. #else
  1181. str += _T("加急");
  1182. FillLength(str, 50);
  1183. str += _T("取件日期");
  1184. FillLength(str, 60);
  1185. #endif
  1186. fp.WriteString(str);
  1187. fp.WriteString(_T("\n"));
  1188. for (int i = 0; i < Arydindansp2.GetSize(); i++)
  1189. {
  1190. str.Empty();
  1191. str = Arydindansp2.ElementAt(i).ElementAt(0);
  1192. FillLength(str, 30);
  1193. str += Arydindansp2.ElementAt(i).ElementAt(1);
  1194. FillLength(str, 40);
  1195. #ifdef LKAY_VERSION
  1196. str += Arydindansp2.ElementAt(i).ElementAt(29); //p数
  1197. FillLength(str, 50);
  1198. str += Arydindansp2.ElementAt(i).ElementAt(18);
  1199. FillLength(str, 60);
  1200. str += Arydindansp2.ElementAt(i).ElementAt(19);
  1201. FillLength(str, 70);
  1202. #else
  1203. str += Arydindansp2.ElementAt(i).ElementAt(18);
  1204. FillLength(str, 50);
  1205. str += Arydindansp2.ElementAt(i).ElementAt(19);
  1206. FillLength(str, 60);
  1207. #endif
  1208. fp.WriteString(str);
  1209. fp.WriteString(_T("\n"));
  1210. }
  1211. fp.Close();
  1212. }
  1213. // 导出条形码位图;
  1214. if ( g_bExportBarCode )
  1215. {
  1216. for ( int j = Arydindansp.GetSize() - 1; j >= 0; j-- )
  1217. {
  1218. if ( Arydindansp.ElementAt(j).ElementAt(6).IsEmpty() )
  1219. Arydindansp.RemoveAt(j);
  1220. }
  1221. if ( !bExportWithName )
  1222. {
  1223. for ( int i = 0; i < Arydindansp.GetSize(); i++ )
  1224. {
  1225. strDir.Format(_T("%s\\%s"), pszSaveDirectory, Arydindansp.ElementAt(i).ElementAt(5));
  1226. if ( PathFileExists(strDir) )
  1227. {
  1228. // 商品目录存在才导出;
  1229. 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);
  1230. }
  1231. }
  1232. }
  1233. pExport->ExportOrderBarCodeImg(0, g_screenwid, g_screenhei*3, 1, 40, Arydindansp, pszSaveDirectory);
  1234. }
  1235. }
  1236. OutputDebugString(_T("导出选好的片!\n"));
  1237. }
  1238. pExport->Release();
  1239. // 结束;
  1240. #else
  1241. // 1.判断权限;
  1242. if (IsHasRights2new(10) == 0)return;
  1243. #if USE_SHARE_FLORD
  1244. BOOL bOfmat = FALSE;
  1245. BOOL bGrowth = FALSE;
  1246. BOOL bExportWithName = FALSE;
  1247. CString name1,name2,branch,strdomain,strOrderNumber,strGrowhTx = _T("");
  1248. CStringArray array,spnamearray2;
  1249. OUT CArray<CStringArray, CStringArray> sparray2;
  1250. GetCurSelRecord(name1,name2,strOrderNumber,branch,strdomain);
  1251. int nResult = GetImageWithGoods(branch,strdomain,strOrderNumber,bGrowth,strGrowhTx,bExportWithName,array,spnamearray2,sparray2);
  1252. if ( nResult == -1 )
  1253. {
  1254. // 没有任务相片存在于共享目录中;
  1255. return;
  1256. }
  1257. CString strSaveDiretory;
  1258. GetSavePath(strSaveDiretory);
  1259. if(strSaveDiretory.IsEmpty())return;
  1260. strSaveDiretory.TrimRight ('\\');
  1261. strSaveDiretory+="\\";
  1262. strSaveDiretory+=strOrderNumber;
  1263. strSaveDiretory+=g_branchname;
  1264. if(g_bAllBranch)
  1265. {
  1266. if(GetBranchPhotoPath(branch)!="")
  1267. strSaveDiretory+=branch;
  1268. }
  1269. strSaveDiretory+=name1;
  1270. strSaveDiretory+=name2;
  1271. strSaveDiretory+="选片";
  1272. strSaveDiretory+="\\";
  1273. if ( nResult == 3 )
  1274. {
  1275. // 选择导出的是初修,但初修无片,导出原片;
  1276. strSaveDiretory.Delete(strSaveDiretory.GetLength()-1, 1);
  1277. strSaveDiretory += _T("(未修)\\");
  1278. bOfmat = TRUE;
  1279. }
  1280. ::CreateDirectory (strSaveDiretory, NULL);
  1281. #else
  1282. // 2.获取选中列的信息,如订单号;
  1283. UpdateData();
  1284. POSITION pos;
  1285. pos = m_FurtherList.GetFirstSelectedItemPosition();
  1286. if (pos == NULL)
  1287. {
  1288. AfxMessageBox("请先选中您要导片的定单!", MB_ICONINFORMATION);
  1289. return;
  1290. }
  1291. // 2.1.获取订单的选片状态;
  1292. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  1293. CString status2 = m_FurtherList.GetItemText(iItem, 4 + m_nAdd);
  1294. if (status2 != "OK")
  1295. {
  1296. AfxMessageBox("此单未选片!", MB_ICONINFORMATION);
  1297. return;
  1298. }
  1299. // 2.2.获取订单号;
  1300. BOOL bOfmat = 0;
  1301. CString strOrderNumber = m_FurtherList.GetItemText(iItem, 0 + m_nAdd); // 订单号;
  1302. CString branch;
  1303. if (g_bAllBranch)
  1304. branch = m_FurtherList.GetItemText(iItem, 0);
  1305. CString name1 = m_FurtherList.GetItemText(iItem, 1 + m_nAdd);
  1306. CString name2 = m_FurtherList.GetItemText(iItem, 2 + m_nAdd);
  1307. // 3.1.选片成长套系对话框;
  1308. IsGrowthTx growthtxdlg;
  1309. growthtxdlg.m_mode = 1;
  1310. growthtxdlg.m_strOrderNumber = strOrderNumber;
  1311. growthtxdlg.DoModal(); // 非成长套系的,直接退出;
  1312. BOOL m_bGrowthTX = growthtxdlg.m_bGrowthTx;
  1313. CString m_seltxname = growthtxdlg.m_seltxname;
  1314. #ifdef CHILD_VERSION
  1315. CString filter = "id='" + strOrderNumber + "';id='" + strOrderNumber + "';id='" + strOrderNumber + "' and name<>'入册' and name<>'入底'";
  1316. if (m_seltxname != "" && m_seltxname != "全部")
  1317. {
  1318. filter = "id='" + strOrderNumber + "' and growthtxname='" + m_seltxname + "';id='" + strOrderNumber + "';id='" + strOrderNumber + "' and name<>'入册' and name<>'入底'";
  1319. }
  1320. #else
  1321. CString filter="id='"+strOrderNumber+"';id='"+strOrderNumber+"';id='"+strOrderNumber+"' and kind<>'2' and name<>'入册' and name<>'入底'";
  1322. #endif //#ifdef CHILD_VERSION
  1323. g_sendhead.bsql = 0;
  1324. g_sendhead.code[0] = 50; // dindansp
  1325. g_sendhead.code[1] = 11; // dindan
  1326. g_sendhead.code[2] = 56; // dindansp
  1327. g_sendhead.tabcount = 3;
  1328. if (g_bAllBranch)
  1329. {
  1330. g_branchip = GetIP(branch);
  1331. g_pMainWnd->OnDisconnect();
  1332. g_branchname = branch;
  1333. g_bBranchModify = 1;
  1334. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1335. g_pMainWnd->OnDisconnect();
  1336. g_bBranchModify = 0;
  1337. g_branchip = g_branchname = "";
  1338. }
  1339. else
  1340. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1341. if (g_bSendOK == 0)return;
  1342. CArray<CStringArray, CStringArray>sparray;
  1343. CArray<CStringArray, CStringArray>sparray2;
  1344. DataToArray(&sparray, &g_List1array, &sparray2);
  1345. CString strSrcDiretory; // 相片源目录;
  1346. if (g_bAllBranch)
  1347. {
  1348. CString branchpath = GetBranchPhotoPath(branch);
  1349. strSrcDiretory = g_path2 + branchpath + "\\";
  1350. }
  1351. else
  1352. strSrcDiretory = g_path2 + "\\";
  1353. // 4.照片类型选择对话框;(客户原片、初修片)
  1354. SelectPhotoDlg selectdlg;
  1355. selectdlg.DoModal();
  1356. strSrcDiretory += strOrderNumber;
  1357. strSrcDiretory += "\\";
  1358. if (m_seltxname != "" && m_seltxname != "全部")
  1359. {
  1360. strSrcDiretory += m_seltxname;
  1361. strSrcDiretory += "\\";
  1362. }
  1363. ////////////////////////////////////////
  1364. CString str, spname;
  1365. CStringArray noarray;
  1366. CStringArray spnamearray;
  1367. for (int i = 0; i < sparray.GetSize(); i++)
  1368. {
  1369. str = sparray.ElementAt(i).ElementAt(6); // 选好的片的相片名串;
  1370. spname = sparray.ElementAt(i).ElementAt(5); // 选好的片对应的商品名;
  1371. GetNo(str, noarray);
  1372. }
  1373. /*
  1374. for(int k=0; k<noarray; k++)
  1375. printf("no str=%s\n", noarray.ElementAt(k));
  1376. */
  1377. if (noarray.GetSize() == 0)
  1378. {
  1379. AfxMessageBox("此单未选片!", MB_ICONINFORMATION);
  1380. return;
  1381. }
  1382. spnamearray.SetSize(noarray.GetSize());
  1383. for (i = 0; i < noarray.GetSize(); i++)
  1384. {
  1385. str = noarray.ElementAt(i);
  1386. spnamearray.SetAt(i, GetSelName(str, sparray));//+"-"+str );
  1387. }
  1388. CString strSaveDiretory; // 导出选好片的目录;
  1389. GetSavePath(strSaveDiretory);
  1390. if (strSaveDiretory.IsEmpty())return;
  1391. strSaveDiretory.TrimRight('\\');
  1392. strSaveDiretory += "\\";
  1393. strSaveDiretory += strOrderNumber;
  1394. strSaveDiretory += g_branchname;
  1395. if (g_bAllBranch)
  1396. {
  1397. if (GetBranchPhotoPath(branch) != "")
  1398. strSaveDiretory += branch;
  1399. }
  1400. strSaveDiretory += name1;
  1401. strSaveDiretory += name2;
  1402. strSaveDiretory += "选片";
  1403. strSaveDiretory += "\\";
  1404. CStringArray array;
  1405. CStringArray spnamearray2;
  1406. CString src, des;
  1407. // printf("m_mode = %d, m_seltxname = %s, m_bGrowthTX = %d, SrcDir = %s\n", selectdlg.m_mode, m_seltxname, m_bGrowthTX, strSrcDiretory);
  1408. if (selectdlg.m_mode == 0)
  1409. {
  1410. for (i = 0; i < noarray.GetSize(); i++)
  1411. {
  1412. if ((m_seltxname != "" && m_seltxname != "全部") || m_bGrowthTX == 0)
  1413. src.Format("%s%s.jpg", strSrcDiretory, noarray.ElementAt(i));
  1414. else
  1415. src = GetPathFromNo3(strSrcDiretory, noarray.ElementAt(i));
  1416. // printf("src1 = %s\n", src);
  1417. if (PathFileExists(src))
  1418. {
  1419. // printf("exists src = %s\n", src);
  1420. array.Add(src);
  1421. if (1)//selectdlg.m_check1)
  1422. spnamearray2.Add(spnamearray.ElementAt(i));
  1423. else
  1424. spnamearray2.Add(noarray.ElementAt(i));
  1425. }
  1426. else
  1427. AfxMessageBox("未找到初修过的文件:" + src.Right(src.GetLength() - src.ReverseFind('\\') - 1), MB_ICONINFORMATION);
  1428. }
  1429. }
  1430. // printf("arraySize1 = %d\n", array.GetSize());
  1431. if (array.GetSize() == 0)
  1432. {
  1433. if (selectdlg.m_mode == 0)
  1434. AfxMessageBox("注意:此单未修片, 导出的是原片!", MB_ICONINFORMATION);
  1435. if (g_bAllBranch)
  1436. {
  1437. CString branchpath = GetBranchPhotoPath(branch);
  1438. strSrcDiretory = g_path1 + branchpath + "\\";
  1439. }
  1440. else
  1441. strSrcDiretory = g_path1 + "\\";
  1442. strSrcDiretory += strOrderNumber;
  1443. strSrcDiretory += "\\";
  1444. strSaveDiretory.Delete(strSaveDiretory.GetLength() - 1, 1);
  1445. strSaveDiretory += "(未修)\\";
  1446. bOfmat = 1;
  1447. for (i = 0; i < noarray.GetSize(); i++)
  1448. {
  1449. // src.Format ("%s%s.jpg", strSrcDiretory, noarray.ElementAt (i));
  1450. src = GetPathFromNo2(strSrcDiretory, noarray.ElementAt(i));
  1451. // printf("src2 = %s\n", src);
  1452. if (PathFileExists(src))
  1453. {
  1454. // printf("exists src = %s\n", src);
  1455. array.Add(src);
  1456. if (1)//selectdlg.m_check1)
  1457. spnamearray2.Add(spnamearray.ElementAt(i));
  1458. else
  1459. spnamearray2.Add(noarray.ElementAt(i));
  1460. }
  1461. else
  1462. AfxMessageBox("未找到原片文件:" + src.Right(src.GetLength() - src.ReverseFind('\\') - 1), MB_ICONINFORMATION);
  1463. }
  1464. }
  1465. // printf("arraySize2 = %d\n", array.GetSize());
  1466. if (array.GetSize() == 0)
  1467. {
  1468. AfxMessageBox("此单未导入原片!", MB_ICONINFORMATION);
  1469. return;
  1470. }
  1471. ::CreateDirectory(strSaveDiretory, NULL);
  1472. #endif //#if USE_SHARE_FLORD
  1473. // 3.导出相片处理对象;
  1474. ImportPhoto dlg;
  1475. dlg.m_name = name1 + name2;
  1476. #if USE_SHARE_FLORD
  1477. dlg.m_bAddname = bExportWithName;
  1478. #else
  1479. dlg.m_bAddname = selectdlg.m_check1;
  1480. #endif
  1481. dlg.m_bOfmat = bOfmat;
  1482. dlg.m_mode = 1;
  1483. dlg.m_bOrigin = 1;
  1484. dlg.m_pArray = &array;
  1485. dlg.m_pArray2 = &spnamearray2;
  1486. dlg.m_savepath = strSaveDiretory;
  1487. dlg.DoModal();
  1488. //////////////
  1489. if (g_List1array.GetSize())
  1490. {
  1491. CStdioFile fp;
  1492. fp.Open(strSaveDiretory + "客户要求.txt", CFile::modeCreate | CFile::modeWrite);
  1493. fp.WriteString("选片要求:\n");
  1494. fp.WriteString(g_List1array.ElementAt(0).ElementAt(39) + " " + g_List1array.ElementAt(0).ElementAt(75));
  1495. fp.WriteString("\n");
  1496. fp.WriteString("\n");
  1497. fp.WriteString("订单要求:\n");
  1498. fp.WriteString(g_List1array.ElementAt(0).ElementAt(38));
  1499. fp.WriteString("\n");
  1500. fp.WriteString("\n");
  1501. fp.WriteString("客人产品:\n");
  1502. CString str;
  1503. str = "产品名称";
  1504. FillLength(str, 30);
  1505. str += "数量";
  1506. FillLength(str, 40);
  1507. #ifdef LKAY_VERSION
  1508. str += "P数";
  1509. FillLength(str, 50);
  1510. str += "加急";
  1511. FillLength(str, 60);
  1512. str += "取件日期";
  1513. FillLength(str, 70);
  1514. #else
  1515. str += "加急";
  1516. FillLength(str, 50);
  1517. str += "取件日期";
  1518. FillLength(str, 60);
  1519. #endif
  1520. fp.WriteString(str);
  1521. fp.WriteString("\n");
  1522. for (int i = 0; i < sparray2.GetSize(); i++)
  1523. {
  1524. str.Empty();
  1525. str = sparray2.ElementAt(i).ElementAt(0);
  1526. FillLength(str, 30);
  1527. str += sparray2.ElementAt(i).ElementAt(1);
  1528. FillLength(str, 40);
  1529. #ifdef LKAY_VERSION
  1530. str += sparray2.ElementAt(i).ElementAt(29);//p数
  1531. FillLength(str, 50);
  1532. str += sparray2.ElementAt(i).ElementAt(18);
  1533. FillLength(str, 60);
  1534. str += sparray2.ElementAt(i).ElementAt(19);
  1535. FillLength(str, 70);
  1536. #else
  1537. str += sparray2.ElementAt(i).ElementAt(18);
  1538. FillLength(str, 50);
  1539. str += sparray2.ElementAt(i).ElementAt(19);
  1540. FillLength(str, 60);
  1541. #endif
  1542. fp.WriteString(str);
  1543. fp.WriteString("\n");
  1544. }
  1545. fp.Close();
  1546. }
  1547. //////////////
  1548. AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  1549. #if JEFF_TEST_ON // 导出裁剪效果图;
  1550. //strSrcDiretory; // 源相片目录;
  1551. //strSaveDiretory;// 导出选好片的目录;
  1552. if (FALSE == g_List1array.ElementAt(0).ElementAt(60).IsEmpty())
  1553. #if USE_SHARE_FLORD
  1554. ;
  1555. #else
  1556. // 使用多级共享目录,需要重写该函数;
  1557. ExportCutImageToFile(g_List1array.ElementAt(0).ElementAt(60), strSrcDiretory, strSaveDiretory+_T("裁剪效果\\"));
  1558. #endif
  1559. #else
  1560. {
  1561. ShowCut dlg;
  1562. dlg.m_branch = branch;
  1563. dlg.m_mode = 1;
  1564. dlg.m_id = strOrderNumber;
  1565. dlg.DoModal();
  1566. }
  1567. #endif
  1568. CString strlog;
  1569. strlog = " 导出选片 ";
  1570. strlog += "客人:";
  1571. strlog += name1 + name2 + strOrderNumber;
  1572. WriteLog(_T("精修导出选好的片"), strlog);
  1573. #endif
  1574. }
  1575. void BeautifySkinFrom2::OnBUTexportphoto2() // 导出精修的片 按钮;
  1576. {
  1577. #ifdef USE_KERNEL_DLL
  1578. // 判断登陆用户是否有导出原片的权限;
  1579. if ( !IsHasRights2new(11) )
  1580. {
  1581. AfxMessageBox(_T("您无权限导出原片!"),MB_ICONINFORMATION);
  1582. return;
  1583. }
  1584. // 获取列表信息:域名、订单号、景点名、顾客信息;
  1585. POSITION pos = m_FurtherList.GetFirstSelectedItemPosition();
  1586. if ( pos == NULL )
  1587. {
  1588. AfxMessageBox(_T("请选中您要导出原片的订单!"), MB_ICONINFORMATION);
  1589. return;
  1590. }
  1591. INT nItemCount = m_FurtherList.GetItemCount();
  1592. INT nSelectedItem = m_FurtherList.GetNextSelectedItem(pos);
  1593. CString strBranchId = _T("");
  1594. CString strOrderNum = _T("");
  1595. // 初修列表不支持景点名,需要从其他地方获取;
  1596. CString strScenery = _T("");
  1597. CString strCustomerInfo = _T("");
  1598. // 获取域名;
  1599. if ( g_bAllBranch )
  1600. {// 多店汇总时;
  1601. strBranchId = GetDomainFromBranch( m_FurtherList.GetItemText(nSelectedItem, 0) );
  1602. }
  1603. else
  1604. {
  1605. if ( g_branchname.IsEmpty() )
  1606. {// 连接本店时;
  1607. strBranchId = g_domain;
  1608. }
  1609. else
  1610. {// 连接分店时;
  1611. strBranchId = GetDomainFromBranch( g_branchname );
  1612. }
  1613. }
  1614. // 获取订单号;
  1615. strOrderNum = m_FurtherList.GetItemText(nSelectedItem, 0 + m_nAdd);
  1616. // 获取顾客信息;
  1617. strCustomerInfo = m_FurtherList.GetItemText(nSelectedItem, 1 + m_nAdd) + _T(",") + m_FurtherList.GetItemText(nSelectedItem, 2 + m_nAdd);
  1618. // 获取景点名,需要读取dindanjd表获取,目前只支持儿童成长套系订单;
  1619. IsGrowthTx IsGrowthtxdlg;
  1620. IsGrowthtxdlg.m_mode = 1;
  1621. IsGrowthtxdlg.m_strOrderNumber = strOrderNum;
  1622. IsGrowthtxdlg.DoModal();
  1623. if( IsGrowthtxdlg.m_bReturnOK == 0 || (IsGrowthtxdlg.m_bGrowthTx && IsGrowthtxdlg.m_seltxname.IsEmpty()) )
  1624. {
  1625. return;
  1626. }
  1627. if ( IsGrowthtxdlg.m_bGrowthTx )
  1628. {
  1629. // 读取dindanjd表里的成长套系名,并返回选中的成长套系名;
  1630. strScenery = IsGrowthtxdlg.m_seltxname;
  1631. if ( strScenery == _T("全部") )
  1632. {
  1633. strScenery.Empty();
  1634. }
  1635. }
  1636. // 导出原片时,是否压缩导出;
  1637. DWORD dwExportPix = INVALID_COPY_PIX; // 通过其他对话框,选择导出时压缩的像素;
  1638. /////////////////////////////////////////////////////////////////////////////////////////////////
  1639. if ( g_pIMGProcess == NULL )
  1640. {
  1641. return ;
  1642. }
  1643. // 获取完信息,开始导出原片;
  1644. ImgExportInterface *pExport = NULL;
  1645. g_pIMGProcess->QueryInterface(IID_ImgExportInterface, (void**)&pExport);
  1646. if ( pExport )
  1647. {
  1648. pExport->ExportFurtherImg(
  1649. TRUE,
  1650. strBranchId,
  1651. strOrderNum,
  1652. strCustomerInfo,
  1653. !strScenery.IsEmpty(),
  1654. strScenery,
  1655. _T("*.jpg|*.jpeg"),
  1656. dwExportPix,
  1657. _T("*.nef|*.cr2|*.raw|*.ra2"),
  1658. FALSE,
  1659. FALSE
  1660. );
  1661. }
  1662. g_pIMGProcess->Release();
  1663. WriteOptLog(_T("导出精修,订单号:%s"),strOrderNum);
  1664. // 结束;
  1665. #else
  1666. if (IsHasRights2new(11) == 0)return;
  1667. POSITION pos;
  1668. pos = m_FurtherList.GetFirstSelectedItemPosition();
  1669. if (pos == NULL)
  1670. {
  1671. AfxMessageBox("请先选中您要导出片的定单!", MB_ICONINFORMATION);
  1672. return;
  1673. }
  1674. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  1675. CString id = m_FurtherList.GetItemText(iItem, 0 + m_nAdd);
  1676. #if USE_SHARE_FLORD
  1677. CString branch;
  1678. if(g_bAllBranch)
  1679. branch=m_FurtherList.GetItemText (iItem, 0);
  1680. CString strDomain = _T("");
  1681. CString savepath = _T("");
  1682. if (g_bAllBranch)
  1683. {
  1684. if(branch != _T(""))
  1685. strDomain = GetDomainFromBranch(branch);
  1686. }
  1687. else
  1688. {
  1689. if(g_branchname != _T(""))
  1690. strDomain = GetDomainFromBranch(g_branchname);
  1691. }
  1692. // 导出原片时,可以选择只导出单独的景点相片;(如果是儿童版的成长套系,可以导出某个套系的相片)
  1693. // 得到源相片;
  1694. CStringArray array;
  1695. CNetShareInfo::GetInstance()->LoadOrderImages(3, id, strDomain,array);
  1696. // printf("size=%d\n", array.GetSize());
  1697. if(array.GetSize ()==0)
  1698. {
  1699. AfxMessageBox("此单未导片!", MB_ICONINFORMATION);
  1700. return;
  1701. }
  1702. // 获取保存的路径;
  1703. CString dir;
  1704. GetSavePath(dir);
  1705. if(dir.IsEmpty())
  1706. {
  1707. return;
  1708. }
  1709. CString name1=m_FurtherList.GetItemText (iItem, 1+m_nAdd);
  1710. CString name2=m_FurtherList.GetItemText (iItem, 2+m_nAdd);
  1711. dir.TrimRight ('\\');
  1712. dir+="\\";
  1713. dir+=id;
  1714. dir+=g_branchname;
  1715. if(g_bAllBranch)
  1716. {
  1717. if(GetBranchPhotoPath(branch)!="")
  1718. dir+=branch;
  1719. }
  1720. dir+=name1;
  1721. dir+=name2;
  1722. dir+="精修好的片";
  1723. dir+="\\";
  1724. ::CreateDirectory (dir, NULL);
  1725. // 新的相片路径;
  1726. int nIndex = 0;
  1727. CString strTemp;
  1728. CStringArray desarray;
  1729. for ( int i = 0; i < array.GetSize(); i++ )
  1730. {
  1731. // 获取到订单号以后的路径字符;
  1732. strTemp = array.ElementAt(i).Mid(array.ElementAt(i).Find(id) + id.GetLength() + 1 );
  1733. desarray.Add(dir + strTemp);
  1734. if ( (nIndex = strTemp.Find("\\")) != -1 )
  1735. {
  1736. strTemp = strTemp.Left( nIndex + 1 );
  1737. CreateDirectory(dir + strTemp, NULL);
  1738. }
  1739. }
  1740. #else
  1741. CString branch;
  1742. if (g_bAllBranch)
  1743. branch = m_FurtherList.GetItemText(iItem, 0);
  1744. CString path;
  1745. if (g_bAllBranch)
  1746. {
  1747. CString branchpath = GetBranchPhotoPath(branch);
  1748. path = g_path4 + branchpath + "\\";
  1749. }
  1750. else
  1751. path = g_path4 + "\\";
  1752. path += id;
  1753. path += "\\";
  1754. CStringArray array;
  1755. CString dir;
  1756. GetSavePath(dir);
  1757. if (dir.IsEmpty())
  1758. {
  1759. return;
  1760. }
  1761. CString name1 = m_FurtherList.GetItemText(iItem, 1 + m_nAdd);
  1762. CString name2 = m_FurtherList.GetItemText(iItem, 2 + m_nAdd);
  1763. dir.TrimRight('\\');
  1764. dir += "\\";
  1765. dir += id;
  1766. dir += g_branchname;
  1767. if (g_bAllBranch)
  1768. {
  1769. if (GetBranchPhotoPath(branch) != "")
  1770. dir += branch;
  1771. }
  1772. dir += name1;
  1773. dir += name2;
  1774. dir += "精修好的片";
  1775. dir += "\\";
  1776. ::CreateDirectory(dir, NULL);
  1777. CStringArray desarray;
  1778. CStringArray dirarray;
  1779. CString savepath = dir;
  1780. CString str;
  1781. if (1)
  1782. {
  1783. using namespace helper_coffs;
  1784. ffsco o;
  1785. o.dirs(1);
  1786. o.find(LPCSTR(path), LPCSTR("*.*"));
  1787. ffsco::typeT coo;
  1788. ffsco::typeT::iterator it;
  1789. coo = o.co_dir();
  1790. for (it = coo.begin();coo.end() != it;it++)
  1791. {
  1792. str = (*it).c_str();
  1793. if (FindArray(&dirarray, str) == -1)
  1794. {
  1795. dirarray.Add(str);
  1796. if (str != dirarray.ElementAt(0))
  1797. {
  1798. str = savepath + str.Right(str.GetLength() - dirarray.ElementAt(0).GetLength());
  1799. if (::CheckFolderFileExist(str) == 0)
  1800. ::CreateDirectory(str, NULL);
  1801. }
  1802. }
  1803. }
  1804. }
  1805. if (1)
  1806. {
  1807. for (int i = 0; i < dirarray.GetSize(); i++)
  1808. {
  1809. using namespace helper_coffs;
  1810. ffsco o;
  1811. o.dirs(0);
  1812. o.find(LPCSTR(dirarray.ElementAt(i)), LPCSTR("*.jpg"));
  1813. ffsco::typeT coo;
  1814. ffsco::typeT::iterator it;
  1815. coo = o.co_file();
  1816. for (it = coo.begin();coo.end() != it;it++)
  1817. {
  1818. str = (*it).c_str();
  1819. if (str.GetAt(str.ReverseFind('\\') + 1) == 's')continue;
  1820. if (str.GetAt(str.ReverseFind('\\') + 1) == 'm')continue;
  1821. array.Add(str);
  1822. desarray.Add(savepath + dirarray.ElementAt(i).Right(dirarray.ElementAt(i).GetLength() - dirarray.ElementAt(0).GetLength()) + str.Right(str.GetLength() - str.ReverseFind('\\') - 1));
  1823. }
  1824. }
  1825. }
  1826. if (array.GetSize() == 0)
  1827. {
  1828. AfxMessageBox("此单未导片!", MB_ICONINFORMATION);
  1829. return;
  1830. }
  1831. #endif
  1832. CCompressOption comoptdlg;
  1833. comoptdlg.DoModal();
  1834. ImportPhoto dlg;
  1835. dlg.m_nOutputSize = comoptdlg.m_nsize;
  1836. dlg.m_mode = 1;
  1837. dlg.m_pArray = &array;
  1838. dlg.m_pDesArray = &desarray;
  1839. dlg.m_savepath = dir;
  1840. dlg.DoModal(); AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  1841. CString str;
  1842. str = " 导出精修片 ";
  1843. str += "客人:";
  1844. str += name1 + name2 + id;
  1845. WriteLog(_T("导出精修片"), str);
  1846. #endif
  1847. }
  1848. void BeautifySkinFrom2::OnButton1()
  1849. {
  1850. UpdateData();
  1851. m_filter.TrimLeft();
  1852. m_filter.TrimRight();
  1853. FillGrid();
  1854. }
  1855. void BeautifySkinFrom2::OnButton2() // 已选未修 按钮;
  1856. {
  1857. UpdateData();
  1858. m_filter.TrimLeft();
  1859. m_filter.TrimRight();
  1860. FillGrid(1);
  1861. }
  1862. void BeautifySkinFrom2::OnItemchangedList2(NMHDR* pNMHDR, LRESULT* pResult)
  1863. {
  1864. NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
  1865. POSITION pos;
  1866. pos = m_FurtherList.GetFirstSelectedItemPosition();
  1867. if (pos == NULL)
  1868. {
  1869. return;
  1870. }
  1871. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  1872. if (IsHasRights2new(6) || IsHasRights2new(49))
  1873. {
  1874. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(1);
  1875. }
  1876. else
  1877. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(0);
  1878. /* if(waiter7.IsEmpty () && IsHasRights2new(6) || IsHasRights2new(49))
  1879. {
  1880. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(1);
  1881. }
  1882. else if(waiter7==g_user.name && IsHasRights2new(6) )
  1883. {
  1884. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(1);
  1885. }
  1886. else
  1887. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(0);*/
  1888. *pResult = 0;
  1889. }
  1890. void BeautifySkinFrom2::OnClickList2(NMHDR* pNMHDR, LRESULT* pResult)
  1891. {
  1892. POSITION pos;
  1893. pos = m_FurtherList.GetFirstSelectedItemPosition();
  1894. if (pos == NULL)return;
  1895. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  1896. g_id = m_FurtherList.GetItemText(iItem, 0 + m_nAdd);
  1897. *pResult = 0;
  1898. }
  1899. void BeautifySkinFrom2::HidePrice()
  1900. {
  1901. #ifdef LKAY_VERSION
  1902. if (IsHasRights2new(31))return;
  1903. for (int i = 0; i < m_List1array.GetSize(); i++)
  1904. {
  1905. m_List1array.ElementAt(i).SetAt(14 + m_nAdd, "***");
  1906. m_List1array.ElementAt(i).SetAt(15 + m_nAdd, "***");
  1907. m_List1array.ElementAt(i).SetAt(16 + m_nAdd, "***");
  1908. m_List1array.ElementAt(i).SetAt(13 + m_nAdd, "***");
  1909. }
  1910. #else
  1911. if (IsHasRights2new(31))return;
  1912. for (int i = 0; i < m_List1array.GetSize(); i++)
  1913. {
  1914. m_List1array.ElementAt(i).SetAt(17 + m_nAdd, "***");
  1915. m_List1array.ElementAt(i).SetAt(18 + m_nAdd, "***");
  1916. }
  1917. #endif
  1918. }
  1919. void BeautifySkinFrom2::OnBtnsearchfilter()
  1920. {
  1921. SearchFilter dlg;
  1922. dlg.m_mode = 3;
  1923. if (dlg.DoModal() == IDOK)FillGrid();
  1924. g_bSearchFilter = 0;
  1925. }
  1926. void BeautifySkinFrom2::GetData()
  1927. {
  1928. if (g_bAllBranch == 0)
  1929. {
  1930. if (g_bShowOK == 0)
  1931. {
  1932. #ifdef LKAY_VERSION
  1933. CString filter = "status3='未取' and (dindantype<>'意向客户' or dindantype is null)";
  1934. #else
  1935. CString filter = "status3='未取'";
  1936. #endif
  1937. g_sendhead.bsql = 0;
  1938. g_sendhead.code[0] = 35;
  1939. g_sendhead.tabcount = 1;
  1940. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1941. if (g_bSendOK == 0)return;
  1942. }
  1943. else
  1944. {
  1945. g_sendhead.bsql = 0;
  1946. g_sendhead.code[0] = 35;
  1947. g_sendhead.tabcount = 1;
  1948. #ifdef LKAY_VERSION
  1949. CString filter = "dindantype<>'意向客户' or dindantype is null";
  1950. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1951. #else
  1952. g_pMainWnd->ProcessChatMessageRequest2(1);
  1953. #endif
  1954. if (g_bSendOK == 0)return;
  1955. }
  1956. DataToArray(&m_List1array);
  1957. }
  1958. else
  1959. {
  1960. //////////////数据汇总
  1961. m_List1array.RemoveAll();
  1962. CString branch;
  1963. for (int i = -1; i < g_brancharray.GetSize() - 1; i++)
  1964. {
  1965. if (i != -1)
  1966. {
  1967. branch = g_brancharray.ElementAt(i).ElementAt(0);
  1968. g_branchip = g_brancharray.ElementAt(i).ElementAt(1);
  1969. g_pMainWnd->OnDisconnect();
  1970. g_branchname = branch;
  1971. g_bBranchModify = 1;
  1972. }
  1973. else
  1974. branch = g_brancharray.ElementAt(g_brancharray.GetSize() - 1).ElementAt(0);
  1975. if (g_bShowOK == 0)
  1976. {
  1977. CString filter = "status3='未取'";
  1978. g_sendhead.bsql = 0;
  1979. g_sendhead.code[0] = 35;
  1980. g_sendhead.tabcount = 1;
  1981. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1982. if (g_bSendOK == 0)continue;
  1983. }
  1984. else
  1985. {
  1986. g_sendhead.bsql = 0;
  1987. g_sendhead.code[0] = 35;
  1988. g_sendhead.tabcount = 1;
  1989. g_pMainWnd->ProcessChatMessageRequest2(1);
  1990. if (g_bSendOK == 0)continue;
  1991. }
  1992. CArray<CStringArray, CStringArray>List1array;
  1993. DataToArray(&List1array);
  1994. int size = m_List1array.GetSize();
  1995. for (int j = 0; j < List1array.GetSize(); j++)
  1996. {
  1997. size++;
  1998. m_List1array.SetSize(size, 1);
  1999. size--;
  2000. m_List1array.ElementAt(size).Copy(List1array.ElementAt(j));
  2001. m_List1array.ElementAt(size).InsertAt(0, branch);
  2002. size++;
  2003. }
  2004. }
  2005. g_pMainWnd->OnDisconnect();
  2006. g_bBranchModify = 0; g_branchip = g_branchname = "";
  2007. }
  2008. HidePrice();
  2009. FillGrid();
  2010. }
  2011. void BeautifySkinFrom2::OnBUTprint3()
  2012. {
  2013. GetData();
  2014. }
  2015. // Jeff.没看到调用的地方,也没有关联任何按钮控件.
  2016. // 应该是废弃的函数;
  2017. void BeautifySkinFrom2::OnBUTexportphotoAddName()
  2018. {
  2019. if (IsHasRights2new(10) == 0)return;
  2020. UpdateData();
  2021. POSITION pos;
  2022. pos = m_FurtherList.GetFirstSelectedItemPosition();
  2023. if (pos == NULL)
  2024. {
  2025. AfxMessageBox("请先选中您要导片的定单!", MB_ICONINFORMATION);
  2026. return;
  2027. }
  2028. int iItem = m_FurtherList.GetNextSelectedItem(pos);
  2029. CString status2 = m_FurtherList.GetItemText(iItem, 4);
  2030. if (status2 != "OK")
  2031. {
  2032. AfxMessageBox("此单未选片!", MB_ICONINFORMATION);
  2033. return;
  2034. }
  2035. CString id = m_FurtherList.GetItemText(iItem, 0);
  2036. CString name1 = m_FurtherList.GetItemText(iItem, 1);
  2037. CString name2 = m_FurtherList.GetItemText(iItem, 2);
  2038. CString filter = "id='" + id + "';id='" + id + "'";
  2039. g_sendhead.bsql = 0;
  2040. g_sendhead.code[0] = 50;
  2041. g_sendhead.code[1] = 11;
  2042. g_sendhead.tabcount = 2;
  2043. g_pMainWnd->ProcessChatMessageRequest2(filter);
  2044. if (g_bSendOK == 0)return;
  2045. CArray<CStringArray, CStringArray>sparray;
  2046. DataToArray(&sparray, &g_List1array);
  2047. CString path = g_path2 + "\\";
  2048. SelectPhotoDlg selectdlg;
  2049. selectdlg.DoModal();
  2050. path += id;
  2051. path += "\\";
  2052. ////////////////////////////////////////
  2053. CString str, spname;
  2054. CStringArray noarray;
  2055. CStringArray spnamearray;
  2056. int i = 0;
  2057. for ( i = 0; i < sparray.GetSize(); i++)
  2058. {
  2059. str = sparray.ElementAt(i).ElementAt(6);
  2060. spname = sparray.ElementAt(i).ElementAt(5);
  2061. GetNo(str, noarray);
  2062. }
  2063. if (noarray.GetSize() == 0)
  2064. {
  2065. AfxMessageBox("此单未选片!", MB_ICONINFORMATION);
  2066. return;
  2067. }
  2068. spnamearray.SetSize(noarray.GetSize());
  2069. for (i = 0; i < noarray.GetSize(); i++)
  2070. {
  2071. str = noarray.ElementAt(i);
  2072. spnamearray.SetAt(i, GetSelName(str, sparray) + "-" + str);
  2073. }
  2074. CString dir;
  2075. GetSavePath(dir);
  2076. if (dir.IsEmpty())return;
  2077. dir.TrimRight('\\');
  2078. dir += "\\";
  2079. dir += id;
  2080. dir += name1;
  2081. dir += name2;
  2082. dir += "选片";
  2083. dir += "\\";
  2084. CStringArray array;
  2085. CStringArray spnamearray2;
  2086. CString src, des;
  2087. //selectdlg.m_mode: 1=原片 2=初修 0=初修+原片
  2088. if (selectdlg.m_mode == 2)
  2089. {
  2090. for (i = 0; i < noarray.GetSize(); i++)
  2091. {
  2092. src.Format("%s%s.jpg", path, noarray.ElementAt(i));
  2093. if (::CheckFolderFileExist(src))
  2094. {
  2095. array.Add(src);
  2096. if (selectdlg.m_check1)
  2097. spnamearray2.Add(spnamearray.ElementAt(i));
  2098. else
  2099. spnamearray2.Add(noarray.ElementAt(i));
  2100. }
  2101. else
  2102. AfxMessageBox("未找到初修过的文件:" + src.Right(src.GetLength() - src.ReverseFind('\\') - 1), MB_ICONINFORMATION);
  2103. }
  2104. }
  2105. if (array.GetSize() == 0)
  2106. {
  2107. if (selectdlg.m_mode == 2)
  2108. AfxMessageBox("注意:此单未修片, 导出的是原片!", MB_ICONINFORMATION);
  2109. path = g_path1 + "\\";
  2110. path += id;
  2111. path += "\\";
  2112. dir.Delete(dir.GetLength() - 1, 1);
  2113. dir += "(未修)\\";
  2114. for (i = 0; i < noarray.GetSize(); i++)
  2115. {
  2116. src = GetPathFromNo2(path, noarray.ElementAt(i));
  2117. if (PathFileExists(src))
  2118. {
  2119. array.Add(src);
  2120. if (selectdlg.m_check1)
  2121. spnamearray2.Add(spnamearray.ElementAt(i));
  2122. else
  2123. spnamearray2.Add(noarray.ElementAt(i));
  2124. }
  2125. }
  2126. }
  2127. if (array.GetSize() == 0)
  2128. {
  2129. AfxMessageBox("此单未导入原片!", MB_ICONINFORMATION);
  2130. return;
  2131. }
  2132. ::CreateDirectory(dir, NULL);
  2133. ImportPhoto dlg;
  2134. dlg.m_mode = 1;
  2135. dlg.m_pArray = &array;
  2136. dlg.m_pArray2 = &spnamearray2;
  2137. dlg.m_savepath = dir;
  2138. dlg.DoModal();
  2139. //////////////
  2140. if (g_List1array.GetSize())
  2141. {
  2142. CStdioFile fp;
  2143. fp.Open(dir + "客户要求.txt", CFile::modeCreate | CFile::modeWrite);
  2144. fp.WriteString(g_List1array.ElementAt(0).ElementAt(39));
  2145. fp.Close();
  2146. }
  2147. //////////////
  2148. AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  2149. }
  2150. #if USE_SHARE_FLORD
  2151. /************************************************************************/
  2152. /*
  2153. 函数:GetCurSelRecord
  2154. 描述:获取当前List列表选中的项记录;
  2155. 参数:
  2156. OUT:strName1 选中项的顾客1姓名;
  2157. OUT:strName2 选中项的顾客2姓名;
  2158. OUT:strOrderNum 选中项的订单号;
  2159. OUT:strDomain 选中项的所在分店域名,本店为空;
  2160. 返回:
  2161. 调用约定:
  2162. 注意:
  2163. */
  2164. /************************************************************************/
  2165. void BeautifySkinFrom2::GetCurSelRecord(
  2166. OUT CString &strName1,
  2167. OUT CString &strName2,
  2168. OUT CString &strOrderNum,
  2169. OUT CString &strBranch,
  2170. OUT CString &strDomain)
  2171. {
  2172. UpdateData();
  2173. // 获取所中行;
  2174. POSITION pos = m_FurtherList.GetFirstSelectedItemPosition();
  2175. if ( pos == NULL)
  2176. {
  2177. AfxMessageBox(_T("请先选中您要导片的定单!"), MB_ICONINFORMATION);
  2178. return;
  2179. }
  2180. int nItem = m_FurtherList.GetNextSelectedItem(pos);
  2181. // 获取选片状态, m_nAdd作用?;
  2182. CString strStatus = m_FurtherList.GetItemText(nItem,4 + m_nAdd);
  2183. if ( strStatus != _T("OK") )
  2184. {
  2185. AfxMessageBox(_T("此单未选片!"), MB_ICONINFORMATION);
  2186. return;
  2187. }
  2188. strOrderNum = m_FurtherList.GetItemText(nItem, 0 + m_nAdd);
  2189. strName1 = m_FurtherList.GetItemText(nItem, 1 + m_nAdd);
  2190. strName2 = m_FurtherList.GetItemText(nItem, 2 + m_nAdd);
  2191. if ( g_bAllBranch )
  2192. {
  2193. // 多店汇总时;
  2194. strBranch = m_FurtherList.GetItemText(nItem, 0);
  2195. strDomain = GetDomainFromBranch(strBranch);
  2196. }
  2197. else
  2198. {
  2199. if(g_branchname != _T(""))
  2200. {
  2201. strBranch = g_branchname;
  2202. strDomain = GetDomainFromBranch(g_branchname);
  2203. }
  2204. }
  2205. }
  2206. /************************************************************************/
  2207. /*
  2208. 函数:GetImageWithGoods
  2209. 描述:获取每张相片对应的商品串;
  2210. 参数:
  2211. IN: strBranch 分店名(多店汇总时)
  2212. IN: strDomain 分店域名(多店汇总或分店连接时);
  2213. IN: strOrderNum 订单号;
  2214. OUT: bGrowth 是否是儿童套系;
  2215. OUT: strSelGrowth 若bGrowth为TRUE,则这里为选中的成长套系名称;
  2216. OUT: bExportWithName 导出选好的片是否带商品名;
  2217. OUT: strAryOfImagePath 选中的相片路径;
  2218. OUT: strEachImageOfGoods与strAryOfImagePath元素位置对应,每一个元素都是strAryOfImagePath元素的商品表(用分号隔开);
  2219. 返回:返回导出的相片类型,== -1 无相片, 1 == 原片,0 == 初修片, 3 == 无初修,使用原片, //== 4 选择的是原片,但原片空....
  2220. 调用约定:
  2221. 注意:
  2222. */
  2223. /************************************************************************/
  2224. int BeautifySkinFrom2::GetImageWithGoods(
  2225. IN CString &strBranch,
  2226. IN CString &strDomain,
  2227. IN CString &strOrderNum,
  2228. OUT BOOL &bGrowth,
  2229. OUT CString &strSelGrowth,
  2230. OUT BOOL &bExportWithName,
  2231. OUT CStringArray &strAryOfImagePath,
  2232. OUT CStringArray &strAryOfEachImageOfGoods,
  2233. OUT CArray<CStringArray, CStringArray> &sparray2)
  2234. {
  2235. // 若是儿童成长套系,则弹出选项框;
  2236. CStringArray strAryOfScenery;
  2237. IsGrowthTx growthtxdlg;
  2238. growthtxdlg.m_mode = 1;
  2239. growthtxdlg.m_pAryOfScenery = &strAryOfScenery;
  2240. growthtxdlg.m_strOrderNumber = strOrderNum;
  2241. growthtxdlg.DoModal();
  2242. bGrowth = growthtxdlg.m_bGrowthTx;
  2243. strSelGrowth = growthtxdlg.m_seltxname;
  2244. // 与服务器通信获取指定条件的订单商品信息;
  2245. CString strFilter = _T("");
  2246. #ifdef CHILD_VERSION
  2247. if ( !strSelGrowth.IsEmpty() && strSelGrowth != _T("全部") )
  2248. {
  2249. strFilter.Format(_T("id='%s' and growthtxname = '%s'; id='%s'; id='%s' and name <> '入册' and name <> '入底'"), strOrderNum, strSelGrowth, strOrderNum, strOrderNum);
  2250. }
  2251. else
  2252. {
  2253. strFilter.Format(_T("id='%s'; id='%s'; id='%s' and name <> '入册' and name <> '入底'"), strOrderNum, strOrderNum, strOrderNum);
  2254. }
  2255. #else
  2256. strFilter.Format(_T("id='%s'; id='%s'; id='%s' and kind <> '2' and name <> '入册' and name <> '入底'"), strOrderNum, strOrderNum, strOrderNum);
  2257. #endif
  2258. g_sendhead.bsql = 0;
  2259. g_sendhead.code[0] = 50;
  2260. g_sendhead.code[1] = 11;
  2261. g_sendhead.code[2] = 56;
  2262. g_sendhead.tabcount = 3;
  2263. if( !g_bAllBranch )
  2264. {
  2265. g_pMainWnd->ProcessChatMessageRequest2(strFilter);
  2266. }
  2267. else
  2268. {
  2269. g_branchip = GetIP(strBranch);
  2270. g_pMainWnd->OnDisconnect();
  2271. g_branchname = strBranch;
  2272. g_bBranchModify = 1;
  2273. g_pMainWnd->ProcessChatMessageRequest2(strFilter);
  2274. g_pMainWnd->OnDisconnect();
  2275. g_bBranchModify = 0;
  2276. g_branchip = g_branchname = _T("");
  2277. }
  2278. if( !g_bSendOK )
  2279. return -1;
  2280. CArray<CStringArray, CStringArray> sparray;
  2281. //CArray<CStringArray, CStringArray> sparray2;
  2282. DataToArray( &sparray, &g_List1array, &sparray2 );
  2283. CString strTemp;
  2284. CStringArray strAryOfImageNum; // 所有相片的数字编号;
  2285. // 获取所有dindansp记录no字段中的相片编号;
  2286. int i = 0;
  2287. int nSize = sparray.GetSize();
  2288. for ( i = 0; i < nSize; i++)
  2289. {
  2290. strTemp = sparray.ElementAt(i).ElementAt(6); // dindansp表中的no字段;
  2291. // WriteTextLog(_T("no:") + strTemp);
  2292. GetNo(strTemp, strAryOfImageNum);
  2293. }
  2294. if ( strAryOfImageNum.GetSize() == 0 )
  2295. {
  2296. AfxMessageBox(_T("此单未选片!"),MB_ICONINFORMATION);
  2297. return -1;
  2298. }
  2299. // 获取每个相片编号关联的商品集合,用分号隔开;
  2300. strAryOfEachImageOfGoods.SetSize(strAryOfImageNum.GetSize());
  2301. nSize = strAryOfImageNum.GetSize();
  2302. for( int n = 0; n < nSize; n++)
  2303. {
  2304. strTemp = strAryOfImageNum.ElementAt(n);
  2305. // WriteTextLog(_T("关联的号码:") + strTemp);
  2306. CString strspnames = GetSelName(strTemp, sparray);
  2307. // WriteTextLog(_T("关联的商品:") + strspnames);
  2308. strAryOfEachImageOfGoods.SetAt(n, strspnames);
  2309. }
  2310. CStringArray strTempImageGoods;
  2311. strTempImageGoods.Copy(strAryOfEachImageOfGoods);
  2312. SelectPhotoDlg selectdlg;
  2313. selectdlg.DoModal();
  2314. bExportWithName = selectdlg.m_check1;
  2315. int nPhotoType = selectdlg.m_mode; //mode模式:2.初修 1.原片 0.初修+原片 //相片类型1=原片 2=初修 3=精修 4=设计
  2316. // 遍历所有共享目录,查找相片路径;
  2317. CStringArray imagePathArr;
  2318. CStringArray imageNumArr;
  2319. imageNumArr.Copy(strAryOfImageNum);
  2320. if(nPhotoType == 0)
  2321. {
  2322. // printf(_T("原片+初修\n"));
  2323. for(i=2; i>0; --i)
  2324. {
  2325. imagePathArr.RemoveAll();
  2326. LoadExistsImagesEx(i, strDomain, strOrderNum, bGrowth, strSelGrowth, strAryOfScenery, imageNumArr, imagePathArr, strAryOfEachImageOfGoods);
  2327. if(strAryOfImagePath.GetSize() == 0)
  2328. strAryOfImagePath.Append(imagePathArr);
  2329. else
  2330. {
  2331. int nSize = strAryOfImagePath.GetSize();
  2332. for(int j=0; j<nSize; j++)
  2333. {
  2334. //去掉相同的相片
  2335. CString strName1 = strAryOfImagePath.ElementAt(j);
  2336. strName1 = strName1.Right(strName1.GetLength() - strName1.ReverseFind('\\') - 1);
  2337. for(int k=0; k<imagePathArr.GetSize(); k++)
  2338. {
  2339. CString strName2 = imagePathArr.ElementAt(k);
  2340. strName2 = strName2.Right(strName2.GetLength() - strName2.ReverseFind('\\') - 1);
  2341. if(strName1 == strName2)
  2342. {
  2343. imagePathArr.RemoveAt(k);
  2344. break;
  2345. }
  2346. }
  2347. }
  2348. if(imagePathArr.GetSize() > 0)
  2349. strAryOfImagePath.Append(imagePathArr);
  2350. }
  2351. }
  2352. }
  2353. else
  2354. {
  2355. LoadExistsImagesEx(nPhotoType, strDomain, strOrderNum, bGrowth, strSelGrowth, strAryOfScenery, imageNumArr, imagePathArr, strAryOfEachImageOfGoods);
  2356. if(imagePathArr.GetSize() > 0)
  2357. strAryOfImagePath.Copy(imagePathArr);
  2358. }
  2359. if ( strAryOfImagePath.GetSize() == 0 && nPhotoType == 2)
  2360. {
  2361. AfxMessageBox(_T("注意:此单未修片, 导出的是原片!"), MB_ICONINFORMATION);
  2362. nPhotoType = 1;
  2363. strAryOfImagePath.RemoveAll();
  2364. strAryOfEachImageOfGoods.RemoveAll();
  2365. strAryOfEachImageOfGoods.Copy(strTempImageGoods);
  2366. LoadExistsImagesEx(nPhotoType,strDomain,strOrderNum,bGrowth,strSelGrowth,strAryOfScenery,imageNumArr,imagePathArr,strAryOfEachImageOfGoods);
  2367. if(imagePathArr.GetSize() > 0)
  2368. strAryOfImagePath.Append(imagePathArr);
  2369. return strAryOfImagePath.GetSize() ? 3 : -1;
  2370. }
  2371. //按编号排序
  2372. CStringArray tempPathArr;
  2373. tempPathArr.Copy(strAryOfImagePath);
  2374. strAryOfImagePath.RemoveAll();
  2375. for(int j=0; j<imageNumArr.GetSize(); j++)
  2376. {
  2377. BOOL bExists = FALSE;
  2378. CString strNum = imageNumArr.ElementAt(j);
  2379. for(i=0; i<tempPathArr.GetSize(); i++)
  2380. {
  2381. CString strFile = tempPathArr.ElementAt(i);
  2382. strFile = strFile.Mid(strFile.ReverseFind('\\')+1);
  2383. int nPos = strFile.Find(_T("."));
  2384. if(nPos == -1)
  2385. continue;
  2386. strFile = strFile.Left(nPos);
  2387. if(strNum.CompareNoCase(strFile) == 0)
  2388. {
  2389. strAryOfImagePath.Add(tempPathArr.ElementAt(i));
  2390. bExists = TRUE;
  2391. break;
  2392. }
  2393. }
  2394. if(!bExists)
  2395. strAryOfImagePath.Add(_T(""));
  2396. }
  2397. return strAryOfImagePath.GetSize() ? selectdlg.m_mode : -1;
  2398. }
  2399. /************************************************************************/
  2400. /*
  2401. 函数:LoadExistsImagesEx
  2402. 描述:加载存在的相片编号文件;
  2403. 参数:
  2404. IN:nPhotoType 导出的相片类型;
  2405. IN:lpDomain 域名;
  2406. IN:lpOrderNum 订单号;
  2407. IN:bGrowTh 是否儿童成长套系;
  2408. IN:lpSelectName 选中的成长套系名;
  2409. IN:strAryOfScenery 订单下的景点名或儿童成长套系名数组;
  2410. IN:strAryOfImageNum 订单选好商品的相片编号数组;
  2411. OUT:strAryOfImagePath 存在于共享目录的相片编号文件路径数组;
  2412. OUT:strAryOfImageGoods 存在于共享目录的相片关联的商品数组;
  2413. 返回:
  2414. 调用约定:
  2415. 注意:
  2416. */
  2417. /************************************************************************/
  2418. void BeautifySkinFrom2::LoadExistsImagesEx(IN const int &nPhotoType,
  2419. IN LPCTSTR lpDomain,
  2420. IN LPCTSTR lpOrderNum,
  2421. IN BOOL bGrowTh,
  2422. IN LPCTSTR lpSelectName,
  2423. IN CStringArray &strAryOfScenery,
  2424. IN CStringArray &strAryOfImageNum,
  2425. OUT CStringArray &strAryOfImagePath,
  2426. OUT CStringArray &strAryOfImageGoods)
  2427. {
  2428. CStringArray strTempNum; //临时相片编号如:001,002
  2429. strTempNum.Copy(strAryOfImageNum);
  2430. CStringArray strTempImagePath; //临时相片路径集
  2431. //根据选好的相片编号查找
  2432. CNetShareInfo::GetInstance()->LoadOrderBySelectedImages(nPhotoType, lpOrderNum, lpDomain, strTempNum, strTempImagePath);
  2433. CString strScenery(lpSelectName);
  2434. /*
  2435. printf("-----bGrowTh = %d---------------strScenery = %s--------------------\n", bGrowTh, lpSelectName);
  2436. */
  2437. if ( bGrowTh && ( !strScenery.IsEmpty() && strScenery != _T("全部")) )
  2438. {
  2439. // 保留套系名下的相片;
  2440. CString str;
  2441. if ( nPhotoType == 1 )
  2442. {
  2443. // 原片;
  2444. for ( int i = 0; i < strTempImagePath.GetSize(); i++)
  2445. {
  2446. str = strTempImagePath.ElementAt(i);
  2447. str = str.Mid(str.Find(lpOrderNum) + strlen(lpOrderNum) + 1);
  2448. str = str.Left(str.Find('\\'));
  2449. if ( str.CompareNoCase(strScenery) == 0 )
  2450. {
  2451. strAryOfImagePath.Add(strTempImagePath.ElementAt(i));
  2452. }
  2453. }
  2454. }
  2455. else
  2456. {
  2457. // 初修;
  2458. for ( int i = 0; i < strTempImagePath.GetSize(); i++)
  2459. {
  2460. str = strTempImagePath.ElementAt(i);
  2461. int nIndex = str.Find(lpOrderNum);
  2462. str.Insert(nIndex + strlen(lpOrderNum) + 1, strScenery + _T("\\"));
  2463. if ( PathFileExists(str) )
  2464. strAryOfImagePath.Add(strTempImagePath.ElementAt(i));
  2465. }
  2466. }
  2467. }
  2468. else
  2469. {
  2470. /*
  2471. for(int i=0; i<strTempImagePath.GetSize(); )
  2472. {
  2473. CString strPath = strTempImagePath.ElementAt(i);
  2474. strPath = strPath.Right(strPath.GetLength() - strPath.ReverseFind('\\') - 1);
  2475. strPath = strPath.Left(strPath.Find('.'));
  2476. printf("strPath = %s\n", strPath);
  2477. if(FindArray(&strTempNum, strPath) == -1)
  2478. {
  2479. printf("remove = %s\n", strTempImagePath.ElementAt(i));
  2480. strTempImagePath.RemoveAt(i);
  2481. }
  2482. else
  2483. i++;
  2484. }
  2485. */
  2486. strAryOfImagePath.Copy(strTempImagePath);
  2487. }
  2488. /*test
  2489. for(int i=0; i<strAryOfImagePath.GetSize(); i++)
  2490. printf("path10 = %s\n", strAryOfImagePath.ElementAt(i));
  2491. */
  2492. }
  2493. #endif