BeautifySkinFrom.cpp 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229
  1. // BeautifySkinFrom.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "BeautifySkinFrom.h"
  6. #include "MyMdi.H"
  7. #include "ModifyDinDan.h"
  8. #include "InputPsw.h"
  9. #include "ImportPhoto.h"
  10. #include "ShowPic.h"
  11. #include "SelProvider.h"
  12. #include "CompressOption.h"
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18. //#pragma comment(lib, "Shlwapi.lib")
  19. /////////////////////////////////////////////////////////////////////////////
  20. // BeautifySkinFrom
  21. IMPLEMENT_DYNCREATE(BeautifySkinFrom, MyFormView)
  22. BeautifySkinFrom::BeautifySkinFrom()
  23. : MyFormView(BeautifySkinFrom::IDD)
  24. {
  25. //{{AFX_DATA_INIT(BeautifySkinFrom)
  26. m_filter = _T("");
  27. m_nAdd=0;
  28. //}}AFX_DATA_INIT
  29. if(g_bAllBranch)
  30. {
  31. m_nAdd=1;
  32. }
  33. }
  34. BeautifySkinFrom::~BeautifySkinFrom()
  35. {
  36. }
  37. void BeautifySkinFrom::DoDataExchange(CDataExchange* pDX)
  38. {
  39. MyFormView::DoDataExchange(pDX);
  40. //{{AFX_DATA_MAP(BeautifySkinFrom)
  41. DDX_Control(pDX, IDC_COMBO1, m_combo1);
  42. DDX_Control(pDX, IDC_LIST2, m_List1);
  43. DDX_Control(pDX, IDC_STATIC1, m_static1);
  44. DDX_CBString(pDX, IDC_COMBO1, m_filter);
  45. //}}AFX_DATA_MAP
  46. }
  47. BEGIN_MESSAGE_MAP(BeautifySkinFrom, MyFormView)
  48. //{{AFX_MSG_MAP(BeautifySkinFrom)
  49. ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
  50. ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
  51. ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
  52. ON_WM_TIMER()
  53. ON_BN_CLICKED(IDC_BUTimportphoto, OnBUTimportphoto)
  54. ON_BN_CLICKED(IDC_BUTshowphoto, OnBUTshowphoto)
  55. ON_BN_CLICKED(IDC_BUTexportphoto, OnBUTexportphoto)
  56. ON_BN_CLICKED(IDC_BUTexportphoto2, OnBUTexportphoto2)
  57. ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
  58. ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST2, OnItemchangedList2)
  59. ON_NOTIFY(NM_CLICK, IDC_LIST2, OnClickList2)
  60. ON_BN_CLICKED(IDC_BTNSEARCHFILTER, OnBtnsearchfilter)
  61. ON_BN_CLICKED(IDC_BUTprint3, OnBUTprint3)
  62. //}}AFX_MSG_MAP
  63. END_MESSAGE_MAP()
  64. /////////////////////////////////////////////////////////////////////////////
  65. // BeautifySkinFrom diagnostics
  66. #ifdef _DEBUG
  67. void BeautifySkinFrom::AssertValid() const
  68. {
  69. MyFormView::AssertValid();
  70. }
  71. void BeautifySkinFrom::Dump(CDumpContext& dc) const
  72. {
  73. MyFormView::Dump(dc);
  74. }
  75. #endif //_DEBUG
  76. /////////////////////////////////////////////////////////////////////////////
  77. // BeautifySkinFrom message handlers
  78. void BeautifySkinFrom::OnInitialUpdate()
  79. {
  80. MyFormView::OnInitialUpdate();
  81. // TODO: Add your specialized code here and/or call the base class
  82. CMyMdi Mdi;
  83. Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
  84. // Here we create the outbar control using the splitter as its parent
  85. // and setting its id to the first pane.
  86. CRect rc2;
  87. GetWindowRect(rc2);
  88. ::MoveWindow(m_hWnd,g_rc.left,g_rc.top,g_rc.Width(),g_rc.Height(),TRUE);
  89. EnumChildWindows(m_hWnd,(WNDENUMPROC)EnumChildProc,0);
  90. int idarray[]={IDC_BUTprint3,IDC_BUTexportphoto,IDC_BUTimportphoto,IDC_BUTshowphoto,IDC_BUTexportphoto2,IDC_BUTclose};
  91. int idcount=6;
  92. int btnwid;
  93. CRect prerc;
  94. for(int a=idcount-2; a>=0; a--)
  95. {
  96. GetDlgItem(idarray[a+1])->GetWindowRect (prerc);
  97. ScreenToClient(prerc);
  98. GetDlgItem(idarray[a])->GetWindowRect (rc2);
  99. ScreenToClient(rc2);
  100. btnwid=rc2.Width ();
  101. rc2.right =prerc.left ;
  102. rc2.left =rc2.right -btnwid;
  103. GetDlgItem(idarray[a])->MoveWindow (rc2);
  104. }
  105. m_static1.SetFont (&g_titlefont);
  106. if(g_bAllBranch==0)
  107. {
  108. #ifdef CHILD_VERSION
  109. m_List1.SetHeadings("订单号,100;家长姓名,100;宝宝姓名,100;拍照,100;修片,100;修片日期,100;加急,100;选片日期,100;摄影师,100;修片人,100;接单人,100;套系名称,100;套系价格,100;手机,100;固定电话,100" );
  110. #else
  111. m_List1.SetHeadings("订单号,100;男宾姓名,100;女宾姓名,100;拍照,100;修片,100;修片日期,100;加急,100;选片日期,100;摄影师,100;修片人,100;接单人,100;套系名称,100;套系价格,100;男宾电话,100;女宾电话,100" );
  112. #endif
  113. m_List1.LoadColumnInfo (118);
  114. }
  115. else
  116. {
  117. #ifdef CHILD_VERSION
  118. m_List1.SetHeadings("店名,100;订单号,100;家长姓名,100;宝宝姓名,100;拍照,100;修片,100;修片日期,100;加急,100;选片日期,100;摄影师,100;修片人,100;接单人,100;套系名称,100;套系价格,100;手机,100;固定电话,100" );
  119. #else
  120. m_List1.SetHeadings("店名,100;订单号,100;男宾姓名,100;女宾姓名,100;拍照,100;修片,100;修片日期,100;加急,100;选片日期,100;摄影师,100;修片人,100;接单人,100;套系名称,100;套系价格,100;男宾电话,100;女宾电话,100" );
  121. #endif
  122. m_List1.LoadColumnInfo (197);GetDlgItem(IDC_BUTprint3)->ShowWindow (1);
  123. }
  124. GetData();
  125. m_combo1.AddString (g_user.name);
  126. m_combo1.GetWindowRect (rc2);
  127. ScreenToClient(rc2);
  128. rc2.bottom +=200;
  129. m_combo1.MoveWindow (rc2);
  130. GetDlgItem(IDC_BUTclose)->GetWindowRect(rc2);
  131. SetComboHei(&m_combo1, rc2.Height ());
  132. GetDlgItem(IDC_BUTexportphoto)->EnableWindow(IsHasRights2new(8));
  133. GetDlgItem(IDC_BUTexportphoto2)->EnableWindow(IsHasRights2new(9));
  134. }
  135. void BeautifySkinFrom::FillGrid(BOOL bStatus)
  136. {
  137. if(g_bSearchFilter)
  138. {
  139. m_List1.DeleteAllItems2 ();
  140. int ii=0;
  141. m_List1.m_arLabels.SetSize( m_List1array.GetSize (), 1 );
  142. int count=0;
  143. {
  144. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  145. {
  146. if(g_filterdate1!="")
  147. {
  148. if(m_List1array.ElementAt (ii).ElementAt (5+m_nAdd)<g_filterdate1 || m_List1array.ElementAt (ii).ElementAt (5+m_nAdd)>g_filterdate2)
  149. continue;
  150. }
  151. if(g_waiter1!="")
  152. {
  153. if(m_List1array.ElementAt (ii).ElementAt (9+m_nAdd)!=g_waiter1)
  154. continue;
  155. }
  156. if(g_bAllBranch && g_filterbranch!="")
  157. {
  158. if(m_List1array.ElementAt (ii).ElementAt (0)!= g_filterbranch)
  159. continue;
  160. }
  161. if(1)
  162. {
  163. m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
  164. }
  165. }
  166. }
  167. m_List1.m_arLabels.SetSize(count, 1);
  168. ii=count;
  169. m_List1.m_LabelCount=ii;
  170. m_List1.SetItemCountEx (ii);
  171. CString str;
  172. str.Format ("单数:%d", ii);
  173. SetDlgItemText(IDC_STATIC2, str);
  174. }
  175. else
  176. {
  177. m_List1.DeleteAllItems2 ();
  178. int ii=0;
  179. m_List1.m_arLabels.SetSize( m_List1array.GetSize (), 1 );
  180. int count=0;
  181. if(m_filter.IsEmpty ())
  182. {
  183. if(bStatus)
  184. {
  185. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  186. {
  187. if( (m_List1array.ElementAt (ii).ElementAt (3+m_nAdd)=="OK"||m_List1array.ElementAt (ii).ElementAt (3+m_nAdd)=="拍摄中") && m_List1array.ElementAt (ii).ElementAt (4+m_nAdd)!="OK")
  188. m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
  189. }
  190. }
  191. else
  192. {
  193. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  194. {
  195. m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
  196. }
  197. }
  198. }
  199. else
  200. {
  201. if(bStatus)
  202. {
  203. int type=GetType(m_filter);
  204. if(type==1)//电话
  205. {
  206. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  207. {
  208. if((m_List1array.ElementAt (ii).ElementAt (3+m_nAdd)=="OK"||m_List1array.ElementAt (ii).ElementAt (3+m_nAdd)=="拍摄中")&&m_List1array.ElementAt (ii).ElementAt (4+m_nAdd)!="OK" && (m_List1array.ElementAt (ii).ElementAt (13+m_nAdd).Find (m_filter)!=-1 || \
  209. m_List1array.ElementAt (ii).ElementAt (14+m_nAdd).Find (m_filter)!=-1) )
  210. {
  211. m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
  212. }
  213. }
  214. }
  215. else if(type==2)//拼音
  216. {
  217. m_filter.MakeUpper ();
  218. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  219. {
  220. if((m_List1array.ElementAt (ii).ElementAt (3+m_nAdd)=="OK"||m_List1array.ElementAt (ii).ElementAt (3+m_nAdd)=="拍摄中")&&m_List1array.ElementAt (ii).ElementAt (4+m_nAdd)!="OK" &&(m_List1array.ElementAt (ii).ElementAt (15+m_nAdd).Find (m_filter)!=-1 || \
  221. m_List1array.ElementAt (ii).ElementAt (16+m_nAdd).Find (m_filter)!=-1))
  222. {
  223. m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
  224. }
  225. }
  226. }
  227. else
  228. {
  229. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  230. {
  231. if((m_List1array.ElementAt (ii).ElementAt (3+m_nAdd)=="OK"||m_List1array.ElementAt (ii).ElementAt (3+m_nAdd)=="拍摄中")&&m_List1array.ElementAt (ii).ElementAt (4+m_nAdd)!="OK" &&(m_List1array.ElementAt (ii).ElementAt (0).Find (m_filter)!=-1 ||\
  232. m_List1array.ElementAt (ii).ElementAt (1).Find (m_filter)!=-1 || \
  233. m_List1array.ElementAt (ii).ElementAt (2).Find (m_filter)!=-1 || \
  234. m_List1array.ElementAt (ii).ElementAt (8).Find (m_filter)!=-1 || \
  235. m_List1array.ElementAt (ii).ElementAt (9).Find (m_filter)!=-1 || \
  236. m_List1array.ElementAt (ii).ElementAt (10).Find (m_filter)!=-1|| \
  237. m_List1array.ElementAt (ii).ElementAt (11).Find (m_filter)!=-1|| \
  238. m_List1array.ElementAt (ii).ElementAt (13).Find (m_filter)!=-1 || \
  239. m_List1array.ElementAt (ii).ElementAt (14).Find (m_filter)!=-1 || \
  240. m_List1array.ElementAt (ii).ElementAt (15).Find (m_filter)!=-1) )
  241. {
  242. m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
  243. }
  244. }
  245. }
  246. }
  247. else
  248. {
  249. int type=GetType(m_filter);
  250. if(type==1)//电话
  251. {
  252. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  253. {
  254. if(m_List1array.ElementAt (ii).ElementAt (13+m_nAdd).Find (m_filter)!=-1 || \
  255. m_List1array.ElementAt (ii).ElementAt (14+m_nAdd).Find (m_filter)!=-1)
  256. {
  257. m_List1.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_List1.m_arLabels.GetSize (); ii++)
  265. {
  266. if(m_List1array.ElementAt (ii).ElementAt (15+m_nAdd).Find (m_filter)!=-1 || \
  267. m_List1array.ElementAt (ii).ElementAt (16+m_nAdd).Find (m_filter)!=-1)
  268. {
  269. m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
  270. }
  271. }
  272. }
  273. else
  274. {
  275. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  276. {
  277. if(m_List1array.ElementAt (ii).ElementAt (0).Find (m_filter)!=-1 ||\
  278. m_List1array.ElementAt (ii).ElementAt (1).Find (m_filter)!=-1 || \
  279. m_List1array.ElementAt (ii).ElementAt (2).Find (m_filter)!=-1 || \
  280. m_List1array.ElementAt (ii).ElementAt (3).Find (m_filter)!=-1 || \
  281. m_List1array.ElementAt (ii).ElementAt (8).Find (m_filter)!=-1 || \
  282. m_List1array.ElementAt (ii).ElementAt (9).Find (m_filter)!=-1 || \
  283. m_List1array.ElementAt (ii).ElementAt (10).Find (m_filter)!=-1|| \
  284. m_List1array.ElementAt (ii).ElementAt (11).Find (m_filter)!=-1|| \
  285. m_List1array.ElementAt (ii).ElementAt (13).Find (m_filter)!=-1 || \
  286. m_List1array.ElementAt (ii).ElementAt (14).Find (m_filter)!=-1 || \
  287. m_List1array.ElementAt (ii).ElementAt (15).Find (m_filter)!=-1 )
  288. {
  289. m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
  290. }
  291. }
  292. }
  293. }
  294. }
  295. m_List1.m_arLabels.SetSize(count, 1);
  296. ii=count;
  297. m_List1.m_LabelCount=ii;
  298. m_List1.SetItemCountEx (ii);
  299. CString str;
  300. str.Format ("单数:%d", ii);
  301. SetDlgItemText(IDC_STATIC2, str);
  302. }
  303. if(!g_id.IsEmpty ())
  304. {
  305. for(int i=0; i<m_List1.GetItemCount (); i++)
  306. {
  307. if(g_id==m_List1.GetItemText (i, 0+m_nAdd))
  308. {
  309. m_List1.SetItemState(i,LVIS_SELECTED|LVIS_FOCUSED,LVIS_SELECTED|LVIS_FOCUSED);
  310. m_List1.EnsureVisible(i,FALSE);
  311. break;
  312. }
  313. }
  314. }
  315. }
  316. void BeautifySkinFrom::OnBUTclose()
  317. {
  318. // TODO: Add your control notification handler code here
  319. GetParent()->SendMessage(WM_CLOSE);
  320. }
  321. void BeautifySkinFrom::OnSelchangeCombo1()
  322. {
  323. // TODO: Add your control notification handler code here
  324. SetTimer(1, 100, NULL);
  325. }
  326. void BeautifySkinFrom::OnTimer(UINT nIDEvent)
  327. {
  328. // TODO: Add your message handler code here and/or call default
  329. KillTimer(nIDEvent);
  330. OnButton1();
  331. }
  332. BOOL BeautifySkinFrom::PreTranslateMessage(MSG* pMsg)
  333. {
  334. // TODO: Add your specialized code here and/or call the base class
  335. try
  336. {
  337. if(pMsg->message==WM_KEYDOWN)
  338. {
  339. switch (pMsg->wParam)
  340. {
  341. case VK_RETURN:
  342. OnButton1();
  343. return 1;
  344. case 0x43: // copy
  345. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  346. {
  347. GetFocus()->SendMessage(WM_COPY);
  348. return TRUE;
  349. }
  350. break;
  351. case 0x56: //Ctrl + V:
  352. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  353. {
  354. GetFocus()->SendMessage(WM_PASTE);
  355. return TRUE;
  356. }
  357. break;
  358. case 0x58: // cut
  359. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  360. {
  361. GetFocus()->SendMessage(WM_CUT);
  362. return TRUE;
  363. }
  364. break;
  365. case 0x5A: //undo
  366. case 0x59: //redo
  367. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  368. {
  369. GetFocus()->SendMessage(WM_UNDO);
  370. return TRUE;
  371. }
  372. break;
  373. }
  374. }
  375. return MyFormView::PreTranslateMessage(pMsg);
  376. }
  377. catch(...)
  378. {
  379. }
  380. }
  381. BOOL GetFileNo2(CString dir, CString no)
  382. {
  383. int pos=no.Find("-");
  384. if(pos!=-1)no=no.Left(pos);
  385. CString path;
  386. CString path2;
  387. CString path3;
  388. CString path4;
  389. CString temp;
  390. CStringArray array;
  391. using namespace helper_coffs;
  392. ffsco o;
  393. o.dirs(1);
  394. o.find(LPCSTR(dir), LPCSTR("*.*"));
  395. ffsco::typeT coo;
  396. ffsco::typeT::iterator it;
  397. coo = o.co_dir();
  398. for (it = coo.begin();
  399. coo.end() != it;
  400. it ++)
  401. {
  402. temp=(*it).c_str();
  403. if(::FindArray (&array, temp)==-1)
  404. array.Add (temp);
  405. }
  406. for(int i=0; i<array.GetSize (); i++)
  407. {
  408. dir=array.ElementAt (i);
  409. path.Format ("%s%s.jpg", dir, no);
  410. path2.Format ("%s%s.raw", dir, no);
  411. path3.Format ("%s%s.cr2", dir, no);
  412. path4.Format ("%s%s.NEF", dir, no);
  413. if(::CheckFileExist (path) || ::CheckFileExist (path2) || ::CheckFileExist (path3) || ::CheckFileExist (path4))
  414. {
  415. return 1;
  416. }
  417. }
  418. return 0;
  419. }
  420. void BeautifySkinFrom::OnBUTimportphoto()
  421. {
  422. // TODO: Add your control notification handler code here
  423. POSITION pos;
  424. pos=m_List1.GetFirstSelectedItemPosition();
  425. if(pos==NULL)
  426. {
  427. AfxMessageBox("请先选中您要导片的定单!", MB_ICONINFORMATION);
  428. return;
  429. }
  430. int iItem=m_List1.GetNextSelectedItem(pos);
  431. CString branch;
  432. CString id=m_List1.GetItemText (iItem, 0+m_nAdd);
  433. if(g_bAllBranch)
  434. branch=m_List1.GetItemText (iItem, 0);
  435. CString oldstatus=m_List1.GetItemText (iItem, 4+m_nAdd);
  436. CString time8=m_List1.GetItemText (iItem, 5+m_nAdd);
  437. CString name=m_List1.GetItemText (iItem, 1+m_nAdd)+","+m_List1.GetItemText (iItem, 2+m_nAdd);
  438. name.TrimLeft (",");
  439. name.TrimRight (",");
  440. name="客人:"+name;
  441. CString phone=m_List1.GetItemText (iItem, 13+m_nAdd)+","+m_List1.GetItemText (iItem, 14+m_nAdd);
  442. phone.TrimLeft (",");
  443. phone.TrimRight (",");
  444. phone="电话:"+phone;
  445. if(g_path2.IsEmpty ())
  446. {
  447. AfxMessageBox("未设置已修片保存机器, 请通知系统管理员!", MB_ICONINFORMATION);
  448. return;
  449. }
  450. #ifdef ENTERPRISE_VERSION
  451. if(::CheckFolderFileExist (g_path2)==0)
  452. ::CreateDirectory (g_path2, NULL);
  453. #endif
  454. if(!::CheckFolderFileExist (g_path2))
  455. {
  456. AfxMessageBox("已修片保存机器目录未设置, 请通知系统管理员!", MB_ICONINFORMATION);
  457. return;
  458. }
  459. CString savepath;
  460. if(g_bAllBranch)
  461. {
  462. CString branchpath=GetBranchPhotoPath(branch);
  463. savepath=g_path2+branchpath+"\\";
  464. if(::CheckFolderFileExist (savepath)==0)
  465. ::CreateDirectory (savepath, NULL);
  466. }
  467. else
  468. savepath=g_path2+"\\";
  469. savepath+=id+"\\";
  470. if(::CheckFolderFileExist (savepath)==0)
  471. ::CreateDirectory (savepath, NULL);
  472. IsGrowthTx growthtxdlg;
  473. growthtxdlg.m_strOrderNumber=id;
  474. growthtxdlg.DoModal ();
  475. if(growthtxdlg.m_bReturnOK==0)
  476. return;
  477. if(growthtxdlg.m_bGrowthTx && growthtxdlg.m_seltxname.IsEmpty ())
  478. return;
  479. if(!growthtxdlg.m_seltxname.IsEmpty ())
  480. {
  481. savepath+=growthtxdlg.m_seltxname+"\\";
  482. if(::CheckFolderFileExist (savepath)==0)
  483. ::CreateDirectory (savepath, NULL);
  484. }
  485. CFileDialog fdlg(true, NULL,"openfile", OFN_ALLOWMULTISELECT,"jpg文件(*.jpg)|*.jpg||");
  486. TCHAR szBuffer[60000]={0};
  487. fdlg.m_ofn.lpstrFile = szBuffer;
  488. fdlg.m_ofn.nMaxFile = 60000;
  489. if(fdlg.DoModal ()!=IDOK)
  490. {
  491. CString status4;
  492. if(AfxMessageBox("客照是否全部修饰完毕?", MB_YESNO|MB_ICONINFORMATION)==IDYES)
  493. status4="OK";
  494. else
  495. status4="修片中";
  496. CString sql;
  497. if(time8.IsEmpty ())
  498. sql="update dindan set status4='"+status4+"',time8='"+g_date+"' where id='"+id+"'";
  499. else
  500. sql="update dindan set status4='"+status4+"' where id='"+id+"'";
  501. g_sendhead.bsql=1;
  502. if(g_bAllBranch)
  503. {
  504. g_branchip=GetIP(branch);
  505. g_pMainWnd->OnDisconnect();
  506. g_branchname=branch;
  507. g_bBranchModify=1;
  508. g_pMainWnd->ProcessChatMessageRequest2(sql);
  509. g_pMainWnd->OnDisconnect();g_bBranchModify=0;g_branchip=g_branchname="";
  510. }
  511. else
  512. g_pMainWnd->ProcessChatMessageRequest2(sql);
  513. if(g_bSendOK==0)return;
  514. if(g_bAllBranch==0)
  515. {
  516. GetData();
  517. }
  518. else
  519. {
  520. for(int i=0; i<m_List1array.GetSize (); i++)
  521. {
  522. if(id==m_List1array.ElementAt (i).ElementAt (1) && branch==m_List1array.ElementAt (i).ElementAt (0))
  523. {
  524. m_List1array.ElementAt (i).SetAt (4+m_nAdd, status4);
  525. if(time8.IsEmpty ())
  526. m_List1array.ElementAt (i).SetAt (5+m_nAdd, g_date);
  527. // m_List1array.ElementAt (i).SetAt (9+m_nAdd, g_user.name);
  528. FillGrid();
  529. break;
  530. }
  531. }
  532. }
  533. return;
  534. }
  535. pos=fdlg.GetStartPosition ();
  536. CStringArray array;
  537. CString str,temp;
  538. CString savepath2;
  539. if(g_bAllBranch)
  540. {
  541. CString branchpath=GetBranchPhotoPath(branch);
  542. savepath2=g_path1+branchpath+"\\";
  543. }
  544. else
  545. savepath2=g_path1+"\\";
  546. savepath2+=id+"\\";
  547. if(!growthtxdlg.m_seltxname.IsEmpty ())
  548. {
  549. savepath2+=growthtxdlg.m_seltxname+"\\";
  550. }
  551. while(pos!=NULL)
  552. {
  553. str=fdlg.GetNextPathName (pos); array.Add(str);
  554. temp=str.Right (str.GetLength ()-str.ReverseFind ('\\')-1);
  555. temp=temp.Left (temp.ReverseFind ('.'));
  556. if(CheckOK(temp)==0)
  557. {
  558. temp.Format ("%s.jpg\r\n照片必须从软件中'导出原片'处导出修片后再导入!", temp);
  559. AfxMessageBox(temp, MB_ICONSTOP);
  560. return;
  561. }
  562. if(0)//GetFileNo2(savepath2, temp)==0)
  563. {
  564. temp.Format ("%s.jpg\r\n原片中没有这张照片,照片必须从软件中'导出原片'处导出修片后再导入!", temp);
  565. AfxMessageBox(temp, MB_ICONSTOP);
  566. return;
  567. }
  568. }
  569. if(array.GetSize ()==0)return;
  570. if(oldstatus!="未修")
  571. {
  572. str.Format ("%s\r\n%s\r\n此单已导入过修片,确认您选中的照片没有导入过吗? 否则会覆盖原来的照片, 是否继续?", name, phone );
  573. if(AfxMessageBox(str, MB_YESNO|MB_ICONSTOP)!=IDYES)
  574. return;
  575. }
  576. else
  577. {
  578. CString str;
  579. str.Format ("%s\r\n%s\r\n确认您选中的照片与客户资料相符吗? 是否继续?", name, phone );
  580. if(AfxMessageBox(str, MB_YESNO|MB_ICONINFORMATION)!=IDYES)
  581. return;
  582. }
  583. CCompressOption comoptdlg;
  584. comoptdlg.DoModal ();
  585. ImportPhoto dlg;
  586. dlg.m_branch=branch;
  587. dlg.m_nphototype=1;
  588. dlg.m_nOutputSize=comoptdlg.m_nsize;
  589. dlg.m_pArray=&array;
  590. dlg.m_savepath =savepath;
  591. #ifdef ENTERPRISE_VERSION
  592. // if(!g_branchname.IsEmpty ())
  593. {
  594. dlg.m_bSaveUploadTask=g_bSaveUploadTask2;
  595. dlg.m_sel=g_cominfoarraylocal.ElementAt(0).ElementAt(79);
  596. dlg.m_uploadtaskarray .Add (id+";"+name);
  597. dlg.m_uploadtaskarray .Add ("");
  598. dlg.m_uploadtaskarray .Add ("");
  599. dlg.m_uploadtaskarray .Add ("");
  600. dlg.m_uploadtaskarray .Add ("");
  601. dlg.m_uploadtaskarray .Add ("");
  602. dlg.m_uploadtaskarray .Add ("");
  603. dlg.m_uploadtaskarray .Add ("");
  604. dlg.m_uploadtaskarray .Add ("");
  605. dlg.m_uploadtaskarray .Add ("");
  606. }
  607. #endif
  608. dlg.DoModal ();
  609. CString status4;
  610. if(AfxMessageBox("客照是否全部修饰完毕?", MB_YESNO|MB_ICONINFORMATION)==IDYES)
  611. status4="OK";
  612. else
  613. status4="修片中";
  614. CString sql;
  615. if(time8.IsEmpty ())
  616. sql="update dindan set status4='"+status4+"',waiter5='"+g_user.name+"',time8='"+g_date+"' where id='"+id+"'";
  617. else
  618. sql="update dindan set status4='"+status4+"',waiter5='"+g_user.name+"' where id='"+id+"'";
  619. g_sendhead.bsql=1;
  620. if(g_bAllBranch)
  621. {
  622. g_branchip=GetIP(branch);
  623. g_pMainWnd->OnDisconnect();
  624. g_branchname=branch;
  625. g_bBranchModify=1;
  626. g_pMainWnd->ProcessChatMessageRequest2(sql);
  627. g_pMainWnd->OnDisconnect();g_bBranchModify=0;g_branchip=g_branchname="";
  628. }
  629. else
  630. g_pMainWnd->ProcessChatMessageRequest2(sql);
  631. if(g_bSendOK==0)return;
  632. savepath+="ok";
  633. ::DeleteFile (savepath);
  634. AfxMessageBox("导入客照成功!", MB_ICONINFORMATION);
  635. if(g_bAllBranch==0)
  636. {
  637. GetData();
  638. }
  639. else
  640. {
  641. for(int i=0; i<m_List1array.GetSize (); i++)
  642. {
  643. if(id==m_List1array.ElementAt (i).ElementAt (1) && branch==m_List1array.ElementAt (i).ElementAt (0))
  644. {
  645. m_List1array.ElementAt (i).SetAt (4+m_nAdd, status4);
  646. if(time8.IsEmpty ())
  647. m_List1array.ElementAt (i).SetAt (5+m_nAdd, g_date);
  648. m_List1array.ElementAt (i).SetAt (9+m_nAdd, g_user.name);
  649. FillGrid();
  650. break;
  651. }
  652. }
  653. }
  654. }
  655. void BeautifySkinFrom::OnBUTshowphoto()
  656. {
  657. // TODO: Add your control notification handler code here
  658. POSITION pos;
  659. pos=m_List1.GetFirstSelectedItemPosition();
  660. if(pos==NULL)
  661. {
  662. AfxMessageBox("请先选中您要查看的定单!", MB_ICONINFORMATION);
  663. return;
  664. }
  665. int iItem=m_List1.GetNextSelectedItem(pos);
  666. CString branch;
  667. CString id=m_List1.GetItemText (iItem, 0+m_nAdd);
  668. if(g_bAllBranch)
  669. branch=m_List1.GetItemText (iItem, 0);
  670. CString name=m_List1.GetItemText (iItem, 1+m_nAdd)+","+m_List1.GetItemText (iItem, 2+m_nAdd);
  671. name.TrimLeft (",");
  672. name.TrimRight (",");
  673. name="客人:"+name;
  674. ShowPic dlg;
  675. dlg.m_id=id;
  676. dlg.m_name=name;
  677. dlg.m_mode=2;
  678. if(g_bAllBranch)
  679. {
  680. dlg.m_branch=branch;
  681. CString branchpath=GetBranchPhotoPath(branch);
  682. dlg.m_path=g_path2+branchpath+"\\";
  683. }
  684. else
  685. dlg.m_path=g_path2+"\\";
  686. dlg.m_path+=id;
  687. dlg.m_path +="\\";
  688. dlg.DoModal ();
  689. }
  690. void BeautifySkinFrom::OnBUTexportphoto() // 导出原片;
  691. {
  692. // TODO: Add your control notification handler code here
  693. if(IsHasRights2new(8)==0)return;
  694. POSITION pos;
  695. pos=m_List1.GetFirstSelectedItemPosition();
  696. if(pos==NULL)
  697. {
  698. AfxMessageBox("请先选中您要导出片的定单!", MB_ICONINFORMATION);
  699. return;
  700. }
  701. int iItem=m_List1.GetNextSelectedItem(pos);
  702. CString id=m_List1.GetItemText (iItem, 0+m_nAdd);
  703. CString branch;
  704. if(g_bAllBranch)
  705. branch=m_List1.GetItemText (iItem, 0);
  706. CString path;
  707. if(g_bAllBranch)
  708. {
  709. CString branchpath=GetBranchPhotoPath(branch);
  710. path=g_path1+branchpath+"\\";
  711. }
  712. else
  713. path=g_path1+"\\";
  714. path+=id;
  715. path +="\\";
  716. CString temp;
  717. CStringArray array; CStringArray dirarray;
  718. using namespace helper_coffs;
  719. IsGrowthTx growthtxdlg;
  720. growthtxdlg.m_mode=1;
  721. growthtxdlg.m_strOrderNumber=id;
  722. growthtxdlg.DoModal ();
  723. if(growthtxdlg.m_bReturnOK==0)
  724. return;
  725. if(growthtxdlg.m_bGrowthTx && growthtxdlg.m_seltxname.IsEmpty ())
  726. return;
  727. if(!growthtxdlg.m_seltxname.IsEmpty ())
  728. {
  729. if(growthtxdlg.m_seltxname!="全部")
  730. {
  731. path+=growthtxdlg.m_seltxname;
  732. path+="\\";
  733. }
  734. }
  735. else
  736. {
  737. ffsco o;
  738. o.dirs(1);
  739. o.find(LPCSTR(path), LPCSTR("*.*"));
  740. ffsco::typeT coo;
  741. ffsco::typeT::iterator it;
  742. coo = o.co_dir();
  743. for (it = coo.begin();
  744. coo.end() != it;
  745. it ++)
  746. {
  747. temp=(*it).c_str();
  748. if(::FindArray (&dirarray, temp)==-1 && temp!=path)
  749. {
  750. dirarray.Add (temp);
  751. }
  752. }
  753. if(dirarray.GetSize ())
  754. {
  755. SelProvider dlg;
  756. dlg.m_mode =1;
  757. dlg.m_pArray =&dirarray;
  758. if(dlg.DoModal ()!=IDOK)return;
  759. if(dlg.m_provider!="全部")
  760. {
  761. path+=dlg.m_provider;
  762. path+="\\";
  763. }
  764. }
  765. }
  766. ffsco o;
  767. o.dirs(1);
  768. o.find(LPCSTR(path), LPCSTR("*.*"));
  769. ffsco::typeT coo;
  770. ffsco::typeT::iterator it;
  771. coo = o.co_file();
  772. for (it = coo.begin();
  773. coo.end() != it;
  774. it ++)
  775. {
  776. temp=(*it).c_str();
  777. if(temp.Find ("uploadtask")!=-1)continue;
  778. if(temp.GetAt (temp.ReverseFind ('\\')+1)!='s' && temp.GetAt (temp.ReverseFind ('\\')+1)!='m')
  779. {
  780. array.Add (temp);
  781. }
  782. }
  783. if(array.GetSize ()==0)
  784. {
  785. AfxMessageBox("此单未导片!", MB_ICONINFORMATION);
  786. return;
  787. }
  788. CString dir;
  789. GetSavePath(dir);
  790. if(dir.IsEmpty())
  791. {
  792. return;
  793. }
  794. CString name1=m_List1.GetItemText (iItem, 1+m_nAdd);
  795. CString name2=m_List1.GetItemText (iItem, 2+m_nAdd);
  796. dir.TrimRight ('\\');
  797. dir+="\\";
  798. dir+=id;
  799. dir+=g_branchname;
  800. if(g_bAllBranch)
  801. {
  802. if(GetBranchPhotoPath(branch)!="")
  803. dir+=branch;
  804. }
  805. name1.Replace("\"",""); // Jeff.add at 2014.07.30.去除姓名中存在非法的文件夹创建字符;
  806. name2.Replace("\"",""); // Jeff.add at 2014.07.30.去除姓名中存在非法的文件夹创建字符;
  807. dir+=name1;
  808. dir+=name2;
  809. dir+="原片";
  810. dir+="\\";
  811. ::CreateDirectory (dir, NULL);
  812. CCompressOption comoptdlg;
  813. comoptdlg.DoModal ();
  814. ImportPhoto dlg;
  815. dlg.m_nOutputSize=comoptdlg.m_nsize;
  816. dlg.m_bOrigin =1;
  817. dlg.m_mode =1;
  818. dlg.m_pArray=&array;
  819. dlg.m_savepath =dir;
  820. dlg.DoModal (); AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  821. CString str;
  822. str=" 导出原片 ";
  823. str+="客人:";
  824. str+=name1+name2+id;
  825. WriteLog(str);
  826. }
  827. void BeautifySkinFrom::OnBUTexportphoto2()
  828. {
  829. if(IsHasRights2new(9)==0)return;
  830. // TODO: Add your control notification handler code here
  831. POSITION pos;
  832. pos=m_List1.GetFirstSelectedItemPosition();
  833. if(pos==NULL)
  834. {
  835. AfxMessageBox("请先选中您要导出片的定单!", MB_ICONINFORMATION);
  836. return;
  837. }
  838. int iItem=m_List1.GetNextSelectedItem(pos);
  839. CString id=m_List1.GetItemText (iItem, 0+m_nAdd);
  840. CString branch;
  841. if(g_bAllBranch)
  842. branch=m_List1.GetItemText (iItem, 0);
  843. CString path;
  844. if(g_bAllBranch)
  845. {
  846. CString branchpath=GetBranchPhotoPath(branch);
  847. path=g_path2+branchpath+"\\";
  848. }
  849. else
  850. path=g_path2+"\\";
  851. path+=id;
  852. path +="\\";
  853. CString temp;
  854. CStringArray array; CStringArray dirarray;
  855. using namespace helper_coffs;
  856. IsGrowthTx growthtxdlg;
  857. growthtxdlg.m_mode=1;
  858. growthtxdlg.m_strOrderNumber=id;
  859. growthtxdlg.DoModal ();
  860. if(growthtxdlg.m_bReturnOK==0)
  861. return;
  862. if(growthtxdlg.m_bGrowthTx && growthtxdlg.m_seltxname.IsEmpty ())
  863. return;
  864. if(!growthtxdlg.m_seltxname.IsEmpty ())
  865. {
  866. if(growthtxdlg.m_seltxname!="全部")
  867. {
  868. path+=growthtxdlg.m_seltxname;
  869. path+="\\";
  870. }
  871. }
  872. ffsco o;
  873. o.dirs(1);
  874. o.find(LPCSTR(path), LPCSTR("*.jpg"));
  875. ffsco::typeT coo;
  876. ffsco::typeT::iterator it;
  877. coo = o.co_file();
  878. for (it = coo.begin();
  879. coo.end() != it;
  880. it ++)
  881. {
  882. temp=(*it).c_str();
  883. if(temp.Find ("uploadtask")!=-1)continue;
  884. if(temp.GetAt (temp.ReverseFind ('\\')+1)!='s' && temp.GetAt (temp.ReverseFind ('\\')+1)!='m')
  885. {
  886. array.Add (temp);
  887. }
  888. }
  889. if(array.GetSize ()==0)
  890. {
  891. AfxMessageBox("此单未导片!", MB_ICONINFORMATION);
  892. return;
  893. }
  894. CString dir;
  895. GetSavePath(dir);
  896. if(dir.IsEmpty())
  897. {
  898. return;
  899. }
  900. CString name1=m_List1.GetItemText (iItem, 1+m_nAdd);
  901. CString name2=m_List1.GetItemText (iItem, 2+m_nAdd);
  902. dir.TrimRight ('\\');
  903. dir+="\\";
  904. dir+=id;
  905. dir+=g_branchname;
  906. if(g_bAllBranch)
  907. {
  908. if(GetBranchPhotoPath(branch)!="")
  909. dir+=branch;
  910. }
  911. dir+=name1;
  912. dir+=name2;
  913. dir+="修好的片";
  914. dir+="\\";
  915. ::CreateDirectory (dir, NULL);
  916. CCompressOption comoptdlg;
  917. comoptdlg.DoModal ();
  918. ImportPhoto dlg;
  919. dlg.m_nOutputSize=comoptdlg.m_nsize;
  920. dlg.m_mode =1;
  921. dlg.m_pArray=&array;
  922. dlg.m_savepath =dir;
  923. dlg.DoModal (); AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  924. CString str;
  925. str=" 导出初修片 ";
  926. str+="客人:";
  927. str+=name1+name2+id;
  928. WriteLog(str);
  929. }
  930. void BeautifySkinFrom::OnButton1()
  931. {
  932. // TODO: Add your control notification handler code here
  933. UpdateData();
  934. m_filter.TrimLeft ();
  935. m_filter.TrimRight ();
  936. FillGrid();
  937. }
  938. void BeautifySkinFrom::OnButton2()
  939. {
  940. // TODO: Add your control notification handler code here
  941. UpdateData();
  942. m_filter.TrimLeft ();
  943. m_filter.TrimRight ();
  944. FillGrid(1);
  945. }
  946. void BeautifySkinFrom::OnItemchangedList2(NMHDR* pNMHDR, LRESULT* pResult)
  947. {
  948. NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
  949. // TODO: Add your control notification handler code here
  950. POSITION pos;
  951. pos=m_List1.GetFirstSelectedItemPosition();
  952. if(pos==NULL)
  953. {
  954. return;
  955. }
  956. int iItem=m_List1.GetNextSelectedItem(pos);
  957. if(IsHasRights2new(5) || IsHasRights2new(49))
  958. {
  959. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(1);
  960. }
  961. else
  962. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(0);
  963. *pResult = 0;
  964. }
  965. BOOL BeautifySkinFrom::CheckOK(CString name)
  966. {
  967. int pos=name.Find("-");
  968. if(pos!=-1)name=name.Left(pos);
  969. if(name.GetLength ()>4)return 0;
  970. for(int i=0; i<name.GetLength (); i++)
  971. {
  972. if(name.GetAt (i)<'0'||name.GetAt (i)>'9')return 0;
  973. }
  974. return 1;
  975. }
  976. void BeautifySkinFrom::OnClickList2(NMHDR* pNMHDR, LRESULT* pResult)
  977. {
  978. // TODO: Add your control notification handler code here
  979. POSITION pos;
  980. pos=m_List1.GetFirstSelectedItemPosition();
  981. if(pos==NULL)return;
  982. int iItem=m_List1.GetNextSelectedItem(pos);
  983. g_id = m_List1.GetItemText (iItem, 0+m_nAdd);
  984. *pResult = 0;
  985. }
  986. void BeautifySkinFrom::HidePrice()
  987. {
  988. #ifdef LKAY_VERSION
  989. if(IsHasRights2new(31))return;
  990. for(int i=0; i< m_List1array.GetSize (); i++)
  991. {
  992. m_List1array.ElementAt (i).SetAt (14+m_nAdd, "***");
  993. m_List1array.ElementAt (i).SetAt (11+m_nAdd, "***");
  994. m_List1array.ElementAt (i).SetAt (12+m_nAdd, "***");
  995. m_List1array.ElementAt (i).SetAt (13+m_nAdd, "***");
  996. }
  997. #else
  998. if(IsHasRights2new(31))return;
  999. for(int i=0; i< m_List1array.GetSize (); i++)
  1000. {
  1001. m_List1array.ElementAt (i).SetAt (13+m_nAdd, "***");
  1002. m_List1array.ElementAt (i).SetAt (14+m_nAdd, "***");
  1003. }
  1004. #endif
  1005. }
  1006. void BeautifySkinFrom::OnBtnsearchfilter()
  1007. {
  1008. // TODO: Add your control notification handler code here
  1009. SearchFilter dlg;
  1010. dlg.m_mode =1;
  1011. if(dlg.DoModal ()==IDOK)FillGrid();
  1012. g_bSearchFilter=0;
  1013. }
  1014. void BeautifySkinFrom::GetData()
  1015. {
  1016. if(g_bAllBranch==0)
  1017. {
  1018. if(g_bShowOK==0)
  1019. {
  1020. #ifdef LKAY_VERSION
  1021. CString filter="status3='未取' and (dindantype<>'意向客户' or dindantype is null)";
  1022. #else
  1023. CString filter="status3='未取'";
  1024. #endif
  1025. g_sendhead.bsql=0;
  1026. g_sendhead.code[0]=184;
  1027. g_sendhead.tabcount=1;
  1028. g_pMainWnd->ProcessChatMessageRequest2(filter);if(g_bSendOK==0)return;
  1029. }
  1030. else
  1031. {
  1032. g_sendhead.bsql=0;
  1033. g_sendhead.code[0]=184;
  1034. g_sendhead.tabcount=1;
  1035. #ifdef LKAY_VERSION
  1036. CString filter="dindantype<>'意向客户' or dindantype is null";
  1037. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1038. #else
  1039. g_pMainWnd->ProcessChatMessageRequest2(1);
  1040. #endif
  1041. if(g_bSendOK==0)return;
  1042. }
  1043. DataToArray(&m_List1array);
  1044. }
  1045. else
  1046. {
  1047. //////////////数据汇总
  1048. m_List1array.RemoveAll ();
  1049. CString branch;
  1050. for(int i=-1; i<g_brancharray.GetSize ()-1; i++)
  1051. {
  1052. if(i!=-1)
  1053. {
  1054. branch=g_brancharray.ElementAt (i).ElementAt (0);
  1055. g_branchip=g_brancharray.ElementAt (i).ElementAt (1);
  1056. g_pMainWnd->OnDisconnect();
  1057. g_branchname=branch;
  1058. g_bBranchModify=1;
  1059. }
  1060. else
  1061. branch=g_brancharray.ElementAt (g_brancharray.GetSize ()-1).ElementAt (0);
  1062. if(g_bShowOK==0)
  1063. {
  1064. CString filter="status3='未取'";
  1065. g_sendhead.bsql=0;
  1066. g_sendhead.code[0]=184;
  1067. g_sendhead.tabcount=1;
  1068. g_pMainWnd->ProcessChatMessageRequest2(filter);if(g_bSendOK==0)continue;
  1069. }
  1070. else
  1071. {
  1072. g_sendhead.bsql=0;
  1073. g_sendhead.code[0]=184;
  1074. g_sendhead.tabcount=1;
  1075. g_pMainWnd->ProcessChatMessageRequest2(1);if(g_bSendOK==0)continue;
  1076. }
  1077. CArray<CStringArray, CStringArray>List1array;
  1078. DataToArray(&List1array);
  1079. int size=m_List1array.GetSize ();
  1080. for(int j=0; j<List1array.GetSize (); j++)
  1081. {
  1082. size++;
  1083. m_List1array.SetSize(size , 1 );
  1084. size--;
  1085. m_List1array.ElementAt (size).Copy (List1array.ElementAt (j));
  1086. m_List1array.ElementAt (size).InsertAt (0, branch);
  1087. size++;
  1088. }
  1089. }
  1090. g_pMainWnd->OnDisconnect();
  1091. g_bBranchModify=0;g_branchip=g_branchname="";
  1092. }
  1093. HidePrice();
  1094. FillGrid();
  1095. }
  1096. void BeautifySkinFrom::OnBUTprint3()
  1097. {
  1098. // TODO: Add your control notification handler code here
  1099. GetData();
  1100. }