BeautifySkinFrom.cpp 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216
  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(PathFileExists (path) || PathFileExists (path2) || PathFileExists (path3) || PathFileExists (path4))
  414. {
  415. return 1;
  416. }
  417. }
  418. return 0;
  419. }
  420. void BeautifySkinFrom::OnBUTimportphoto() // 导入修好的片;
  421. {
  422. POSITION pos;
  423. pos=m_List1.GetFirstSelectedItemPosition();
  424. if(pos==NULL)
  425. {
  426. AfxMessageBox("请先选中您要导片的定单!", MB_ICONINFORMATION);
  427. return;
  428. }
  429. int iItem=m_List1.GetNextSelectedItem(pos);
  430. CString branch;
  431. CString id=m_List1.GetItemText (iItem, 0+m_nAdd);
  432. if(g_bAllBranch)
  433. branch=m_List1.GetItemText (iItem, 0);
  434. CString oldstatus=m_List1.GetItemText (iItem, 4+m_nAdd);
  435. CString time8=m_List1.GetItemText (iItem, 5+m_nAdd);
  436. CString name=m_List1.GetItemText (iItem, 1+m_nAdd)+","+m_List1.GetItemText (iItem, 2+m_nAdd);
  437. name.TrimLeft (",");
  438. name.TrimRight (",");
  439. name="客人:"+name;
  440. CString phone=m_List1.GetItemText (iItem, 13+m_nAdd)+","+m_List1.GetItemText (iItem, 14+m_nAdd);
  441. phone.TrimLeft (",");
  442. phone.TrimRight (",");
  443. phone="电话:"+phone;
  444. if(g_path2.IsEmpty ())
  445. {
  446. AfxMessageBox("未设置已修片保存机器, 请通知系统管理员!", MB_ICONINFORMATION);
  447. return;
  448. }
  449. #ifdef ENTERPRISE_VERSION
  450. if(::CheckFolderFileExist (g_path2)==0)
  451. ::CreateDirectory (g_path2, NULL);
  452. #endif
  453. if(!::CheckFolderFileExist (g_path2))
  454. {
  455. AfxMessageBox("已修片保存机器目录未设置, 请通知系统管理员!", MB_ICONINFORMATION);
  456. return;
  457. }
  458. CString savepath;
  459. if(g_bAllBranch)
  460. {
  461. CString branchpath=GetBranchPhotoPath(branch);
  462. savepath=g_path2+branchpath+"\\";
  463. if(::CheckFolderFileExist (savepath)==0)
  464. ::CreateDirectory (savepath, NULL);
  465. }
  466. else
  467. savepath=g_path2+"\\";
  468. savepath+=id+"\\";
  469. if(::CheckFolderFileExist (savepath)==0)
  470. ::CreateDirectory (savepath, NULL);
  471. IsGrowthTx growthtxdlg;
  472. growthtxdlg.m_strOrderNumber=id;
  473. growthtxdlg.DoModal ();
  474. if(growthtxdlg.m_bReturnOK==0)
  475. return;
  476. if(growthtxdlg.m_bGrowthTx && growthtxdlg.m_seltxname.IsEmpty ())
  477. return;
  478. if(!growthtxdlg.m_seltxname.IsEmpty ())
  479. {
  480. savepath+=growthtxdlg.m_seltxname+"\\";
  481. if(::CheckFolderFileExist (savepath)==0)
  482. ::CreateDirectory (savepath, NULL);
  483. }
  484. CFileDialog fdlg(true, NULL,"openfile", OFN_ALLOWMULTISELECT,"jpg文件(*.jpg)|*.jpg||");
  485. TCHAR szBuffer[60000]={0};
  486. fdlg.m_ofn.lpstrFile = szBuffer;
  487. fdlg.m_ofn.nMaxFile = 60000;
  488. if(fdlg.DoModal ()!=IDOK)
  489. {
  490. CString status4;
  491. if(AfxMessageBox("客照是否全部修饰完毕?", MB_YESNO|MB_ICONINFORMATION)==IDYES)
  492. status4="OK";
  493. else
  494. status4="修片中";
  495. CString sql;
  496. if(time8.IsEmpty ())
  497. sql="update dindan set status4='"+status4+"',time8='"+g_date+"' where id='"+id+"'";
  498. else
  499. sql="update dindan set status4='"+status4+"' where id='"+id+"'";
  500. g_sendhead.bsql=1;
  501. if(g_bAllBranch)
  502. {
  503. g_branchip=GetIP(branch);
  504. g_pMainWnd->OnDisconnect();
  505. g_branchname=branch;
  506. g_bBranchModify=1;
  507. g_pMainWnd->ProcessChatMessageRequest2(sql);
  508. g_pMainWnd->OnDisconnect();
  509. g_bBranchModify = 0;
  510. g_branchip = g_branchname = "";
  511. }
  512. else
  513. g_pMainWnd->ProcessChatMessageRequest2(sql);
  514. if(g_bSendOK==0)return;
  515. if(g_bAllBranch==0)
  516. {
  517. GetData();
  518. }
  519. else
  520. {
  521. for(int i=0; i<m_List1array.GetSize (); i++)
  522. {
  523. if(id==m_List1array.ElementAt (i).ElementAt (1) && branch==m_List1array.ElementAt (i).ElementAt (0))
  524. {
  525. m_List1array.ElementAt (i).SetAt (4+m_nAdd, status4);
  526. if(time8.IsEmpty ())
  527. m_List1array.ElementAt (i).SetAt (5+m_nAdd, g_date);
  528. // m_List1array.ElementAt (i).SetAt (9+m_nAdd, g_user.name);
  529. FillGrid();
  530. break;
  531. }
  532. }
  533. }
  534. return;
  535. }
  536. pos=fdlg.GetStartPosition ();
  537. CStringArray array;
  538. CString str,temp;
  539. CString savepath2;
  540. if(g_bAllBranch)
  541. {
  542. CString branchpath=GetBranchPhotoPath(branch);
  543. savepath2=g_path1+branchpath+"\\";
  544. }
  545. else
  546. savepath2=g_path1+"\\";
  547. savepath2+=id+"\\";
  548. if(!growthtxdlg.m_seltxname.IsEmpty ())
  549. {
  550. savepath2+=growthtxdlg.m_seltxname+"\\";
  551. }
  552. while(pos!=NULL)
  553. {
  554. str = fdlg.GetNextPathName(pos);
  555. array.Add(str);
  556. temp=str.Right (str.GetLength ()-str.ReverseFind ('\\')-1);
  557. temp=temp.Left (temp.ReverseFind ('.'));
  558. if(CheckOK(temp)==0)
  559. {
  560. temp.Format ("%s.jpg\r\n照片必须从软件中'导出原片'处导出修片后再导入!", temp);
  561. AfxMessageBox(temp, MB_ICONSTOP);
  562. return;
  563. }
  564. if(0)//GetFileNo2(savepath2, temp)==0)
  565. {
  566. temp.Format ("%s.jpg\r\n原片中没有这张照片,照片必须从软件中'导出原片'处导出修片后再导入!", temp);
  567. AfxMessageBox(temp, MB_ICONSTOP);
  568. return;
  569. }
  570. }
  571. if(array.GetSize ()==0)return;
  572. if(oldstatus!="未修")
  573. {
  574. str.Format ("%s\r\n%s\r\n此单已导入过修片,确认您选中的照片没有导入过吗? 否则会覆盖原来的照片, 是否继续?", name, phone );
  575. if(AfxMessageBox(str, MB_YESNO|MB_ICONSTOP)!=IDYES)
  576. return;
  577. }
  578. else
  579. {
  580. CString str;
  581. str.Format ("%s\r\n%s\r\n确认您选中的照片与客户资料相符吗? 是否继续?", name, phone );
  582. if(AfxMessageBox(str, MB_YESNO|MB_ICONINFORMATION)!=IDYES)
  583. return;
  584. }
  585. CCompressOption comoptdlg;
  586. comoptdlg.DoModal ();
  587. //----------------------------------------------------------------------------------------------
  588. //----------------------------------------------------------------------------------------------
  589. //----------------------------------------------------------------------------------------------
  590. // 导入修好的相片;
  591. ImportPhoto dlg;
  592. dlg.m_branch=branch; // 分店名;
  593. dlg.m_nphototype=1; // 未知;
  594. dlg.m_nOutputSize=comoptdlg.m_nsize; // 导入初修片时的尺寸???
  595. dlg.m_pArray=&array; // 被导入的相片路径;
  596. dlg.m_savepath =savepath; // 初修片保存的目录;
  597. #ifdef ENTERPRISE_VERSION
  598. // if(!g_branchname.IsEmpty ())
  599. {
  600. dlg.m_bSaveUploadTask=g_bSaveUploadTask2;
  601. dlg.m_sel=g_cominfoarraylocal.ElementAt(0).ElementAt(79);
  602. dlg.m_uploadtaskarray .Add (id+";"+name);
  603. dlg.m_uploadtaskarray .Add ("");
  604. dlg.m_uploadtaskarray .Add ("");
  605. dlg.m_uploadtaskarray .Add ("");
  606. dlg.m_uploadtaskarray .Add ("");
  607. dlg.m_uploadtaskarray .Add ("");
  608. dlg.m_uploadtaskarray .Add ("");
  609. dlg.m_uploadtaskarray .Add ("");
  610. dlg.m_uploadtaskarray .Add ("");
  611. dlg.m_uploadtaskarray .Add ("");
  612. }
  613. #endif
  614. dlg.DoModal ();
  615. CString status4;
  616. if(AfxMessageBox("客照是否全部修饰完毕?", MB_YESNO|MB_ICONINFORMATION)==IDYES)
  617. status4="OK";
  618. else
  619. status4="修片中";
  620. CString sql;
  621. if(time8.IsEmpty ())
  622. sql="update dindan set status4='"+status4+"',waiter5='"+g_user.name+"',time8='"+g_date+"' where id='"+id+"'";
  623. else
  624. sql="update dindan set status4='"+status4+"',waiter5='"+g_user.name+"' where id='"+id+"'";
  625. g_sendhead.bsql=1;
  626. if(g_bAllBranch)
  627. {
  628. g_branchip=GetIP(branch);
  629. g_pMainWnd->OnDisconnect();
  630. g_branchname=branch;
  631. g_bBranchModify=1;
  632. g_pMainWnd->ProcessChatMessageRequest2(sql);
  633. g_pMainWnd->OnDisconnect();g_bBranchModify=0;g_branchip=g_branchname="";
  634. }
  635. else
  636. g_pMainWnd->ProcessChatMessageRequest2(sql);
  637. if(g_bSendOK==0)return;
  638. savepath+="ok";
  639. ::DeleteFile (savepath); // 删除ok文件;
  640. AfxMessageBox("导入客照成功!", MB_ICONINFORMATION);
  641. if(g_bAllBranch==0)
  642. {
  643. GetData();
  644. }
  645. else
  646. {
  647. for(int i=0; i<m_List1array.GetSize (); i++)
  648. {
  649. if(id==m_List1array.ElementAt (i).ElementAt (1) && branch==m_List1array.ElementAt (i).ElementAt (0))
  650. {
  651. m_List1array.ElementAt (i).SetAt (4+m_nAdd, status4);
  652. if(time8.IsEmpty ())
  653. m_List1array.ElementAt (i).SetAt (5+m_nAdd, g_date);
  654. m_List1array.ElementAt (i).SetAt (9+m_nAdd, g_user.name);
  655. FillGrid();
  656. break;
  657. }
  658. }
  659. }
  660. }
  661. void BeautifySkinFrom::OnBUTshowphoto() // 查看修好的片;
  662. {
  663. // TODO: Add your control notification handler code here
  664. POSITION pos;
  665. pos=m_List1.GetFirstSelectedItemPosition();
  666. if(pos==NULL)
  667. {
  668. AfxMessageBox("请先选中您要查看的定单!", MB_ICONINFORMATION);
  669. return;
  670. }
  671. int iItem=m_List1.GetNextSelectedItem(pos);
  672. CString branch;
  673. CString id=m_List1.GetItemText (iItem, 0+m_nAdd);
  674. if(g_bAllBranch)
  675. branch=m_List1.GetItemText (iItem, 0);
  676. CString name=m_List1.GetItemText (iItem, 1+m_nAdd)+","+m_List1.GetItemText (iItem, 2+m_nAdd);
  677. name.TrimLeft (",");
  678. name.TrimRight (",");
  679. name="客人:"+name;
  680. ShowPic dlg;
  681. dlg.m_id=id;
  682. dlg.m_name=name;
  683. dlg.m_mode=2;
  684. if(g_bAllBranch)
  685. {
  686. dlg.m_branch=branch;
  687. CString branchpath=GetBranchPhotoPath(branch);
  688. dlg.m_path=g_path2+branchpath+"\\";
  689. }
  690. else
  691. dlg.m_path=g_path2+"\\";
  692. dlg.m_path+=id;
  693. dlg.m_path +="\\";
  694. dlg.DoModal ();
  695. }
  696. void BeautifySkinFrom::OnBUTexportphoto() // 导出原片;
  697. {
  698. if(IsHasRights2new(8)==0)return;
  699. POSITION pos;
  700. pos=m_List1.GetFirstSelectedItemPosition();
  701. if(pos==NULL)
  702. {
  703. AfxMessageBox("请先选中您要导出片的定单!", MB_ICONINFORMATION);
  704. return;
  705. }
  706. int iItem=m_List1.GetNextSelectedItem(pos);
  707. CString id=m_List1.GetItemText (iItem, 0+m_nAdd);
  708. CString branch;
  709. if(g_bAllBranch)
  710. branch=m_List1.GetItemText (iItem, 0);
  711. CString path;
  712. if(g_bAllBranch)
  713. {
  714. CString branchpath=GetBranchPhotoPath(branch);
  715. path=g_path1+branchpath+"\\";
  716. }
  717. else
  718. path=g_path1+"\\";
  719. path+=id;
  720. path +="\\";
  721. CString temp;
  722. CStringArray array; CStringArray dirarray;
  723. using namespace helper_coffs;
  724. IsGrowthTx growthtxdlg;
  725. growthtxdlg.m_mode=1;
  726. growthtxdlg.m_strOrderNumber=id;
  727. growthtxdlg.DoModal ();
  728. if(growthtxdlg.m_bReturnOK==0)
  729. return;
  730. if(growthtxdlg.m_bGrowthTx && growthtxdlg.m_seltxname.IsEmpty ())
  731. return;
  732. if(!growthtxdlg.m_seltxname.IsEmpty ())
  733. {
  734. if(growthtxdlg.m_seltxname!="全部")
  735. {
  736. path+=growthtxdlg.m_seltxname;
  737. path+="\\";
  738. }
  739. }
  740. else
  741. {
  742. // 1.查找原片目录下的所有子文件夹;
  743. ffsco o;
  744. o.dirs(1);
  745. o.find(LPCSTR(path), LPCSTR("*.*"));
  746. ffsco::typeT coo;
  747. ffsco::typeT::iterator it;
  748. coo = o.co_dir();
  749. for (it = coo.begin();coo.end() != it;it ++)
  750. {
  751. temp=(*it).c_str();
  752. if(::FindArray (&dirarray, temp)==-1 && temp!=path)
  753. {
  754. dirarray.Add (temp);
  755. }
  756. }
  757. if(dirarray.GetSize ())
  758. {
  759. SelProvider dlg;
  760. dlg.m_mode =1;
  761. dlg.m_pArray =&dirarray;
  762. if(dlg.DoModal ()!=IDOK)return;
  763. if(dlg.m_provider!="全部")
  764. {
  765. path+=dlg.m_provider;
  766. path+="\\";
  767. }
  768. }
  769. }
  770. // 1.查找原片目录下的所有文件;
  771. ffsco o;
  772. o.dirs(1);
  773. o.find(LPCSTR(path), LPCSTR("*.*"));
  774. ffsco::typeT coo;
  775. ffsco::typeT::iterator it;
  776. coo = o.co_file();
  777. for (it = coo.begin();coo.end() != it;it ++)
  778. {
  779. temp=(*it).c_str();
  780. if(temp.Find ("uploadtask")!=-1)continue;
  781. if(temp.GetAt (temp.ReverseFind ('\\')+1)!='s' && temp.GetAt (temp.ReverseFind ('\\')+1)!='m')
  782. {
  783. array.Add (temp);
  784. }
  785. }
  786. if(array.GetSize ()==0)
  787. {
  788. AfxMessageBox("此单未导片!", MB_ICONINFORMATION);
  789. return;
  790. }
  791. CString dir;
  792. GetSavePath(dir);
  793. if(dir.IsEmpty())
  794. {
  795. return;
  796. }
  797. CString name1=m_List1.GetItemText (iItem, 1+m_nAdd);
  798. CString name2=m_List1.GetItemText (iItem, 2+m_nAdd);
  799. dir.TrimRight ('\\');
  800. dir+="\\";
  801. dir+=id;
  802. dir+=g_branchname;
  803. if(g_bAllBranch)
  804. {
  805. if(GetBranchPhotoPath(branch)!="")
  806. dir+=branch;
  807. }
  808. name1.Replace("\"",""); // Jeff.add at 2014.07.30.去除姓名中存在非法的文件夹创建字符;
  809. name2.Replace("\"",""); // Jeff.add at 2014.07.30.去除姓名中存在非法的文件夹创建字符;
  810. dir+=name1;
  811. dir+=name2;
  812. dir+="原片";
  813. dir+="\\";
  814. ::CreateDirectory (dir, NULL);
  815. // 压缩选项对话框;
  816. CCompressOption comoptdlg;
  817. comoptdlg.DoModal();
  818. //----------------------------------------------------------------------------------------------
  819. //----------------------------------------------------------------------------------------------
  820. //----------------------------------------------------------------------------------------------
  821. // 从原片中导出相片制作初修片;
  822. ImportPhoto dlg;
  823. dlg.m_nOutputSize=comoptdlg.m_nsize; // 导出相片时的尺寸;
  824. dlg.m_bOrigin =1; // 未知;
  825. dlg.m_mode =1; // 未知;
  826. dlg.m_pArray=&array; // 被导出的相片路径集合;
  827. dlg.m_savepath =dir; // 导出相片存放的目录;
  828. dlg.DoModal ();
  829. AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  830. CString str;
  831. str=" 导出原片 ";
  832. str+="客人:";
  833. str+=name1+name2+id;
  834. WriteLog(str);
  835. }
  836. void BeautifySkinFrom::OnBUTexportphoto2() // 导出修好的片;
  837. {
  838. if(IsHasRights2new(9)==0)return;
  839. POSITION pos;
  840. pos=m_List1.GetFirstSelectedItemPosition();
  841. if(pos==NULL)
  842. {
  843. AfxMessageBox("请先选中您要导出片的定单!", MB_ICONINFORMATION);
  844. return;
  845. }
  846. int iItem=m_List1.GetNextSelectedItem(pos);
  847. CString id=m_List1.GetItemText (iItem, 0+m_nAdd);
  848. CString branch;
  849. if(g_bAllBranch)
  850. branch=m_List1.GetItemText (iItem, 0);
  851. CString path;
  852. if(g_bAllBranch)
  853. {
  854. CString branchpath=GetBranchPhotoPath(branch);
  855. path=g_path2+branchpath+"\\";
  856. }
  857. else
  858. path=g_path2+"\\";
  859. path+=id;
  860. path +="\\";
  861. CString temp;
  862. CStringArray array; CStringArray dirarray;
  863. using namespace helper_coffs;
  864. IsGrowthTx growthtxdlg;
  865. growthtxdlg.m_mode=1;
  866. growthtxdlg.m_strOrderNumber=id;
  867. growthtxdlg.DoModal ();
  868. if(growthtxdlg.m_bReturnOK==0)
  869. return;
  870. if(growthtxdlg.m_bGrowthTx && growthtxdlg.m_seltxname.IsEmpty ())
  871. return;
  872. if(!growthtxdlg.m_seltxname.IsEmpty ())
  873. {
  874. if(growthtxdlg.m_seltxname!="全部")
  875. {
  876. path+=growthtxdlg.m_seltxname;
  877. path+="\\";
  878. }
  879. }
  880. ffsco o;
  881. o.dirs(1);
  882. o.find(LPCSTR(path), LPCSTR("*.jpg"));
  883. ffsco::typeT coo;
  884. ffsco::typeT::iterator it;
  885. coo = o.co_file();
  886. for (it = coo.begin();coo.end() != it;it ++)
  887. {
  888. temp=(*it).c_str();
  889. if(temp.Find ("uploadtask")!=-1)continue;
  890. if(temp.GetAt (temp.ReverseFind ('\\')+1)!='s' && temp.GetAt (temp.ReverseFind ('\\')+1)!='m')
  891. {
  892. array.Add (temp);
  893. }
  894. }
  895. if(array.GetSize ()==0)
  896. {
  897. AfxMessageBox("此单未导片!", MB_ICONINFORMATION);
  898. return;
  899. }
  900. CString dir;
  901. GetSavePath(dir);
  902. if(dir.IsEmpty())
  903. return;
  904. CString name1=m_List1.GetItemText (iItem, 1+m_nAdd);
  905. CString name2=m_List1.GetItemText (iItem, 2+m_nAdd);
  906. dir.TrimRight ('\\');
  907. dir+="\\";
  908. dir+=id;
  909. dir+=g_branchname;
  910. if(g_bAllBranch)
  911. {
  912. if(GetBranchPhotoPath(branch)!="")
  913. dir+=branch;
  914. }
  915. dir+=name1;
  916. dir+=name2;
  917. dir+="修好的片";
  918. dir+="\\";
  919. ::CreateDirectory (dir, NULL);
  920. CCompressOption comoptdlg;
  921. comoptdlg.DoModal ();
  922. //----------------------------------------------------------------------------------------------
  923. //----------------------------------------------------------------------------------------------
  924. //----------------------------------------------------------------------------------------------
  925. // 导出修好的片;
  926. //----------------------------------------------------------------------------------------------
  927. ImportPhoto dlg;
  928. dlg.m_nOutputSize=comoptdlg.m_nsize;
  929. dlg.m_mode =1;
  930. dlg.m_pArray=&array;
  931. dlg.m_savepath =dir;
  932. dlg.DoModal (); AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  933. CString str;
  934. str=" 导出初修片 ";
  935. str+="客人:";
  936. str+=name1+name2+id;
  937. WriteLog(str);
  938. }
  939. void BeautifySkinFrom::OnButton1()
  940. {
  941. // TODO: Add your control notification handler code here
  942. UpdateData();
  943. m_filter.TrimLeft ();
  944. m_filter.TrimRight ();
  945. FillGrid();
  946. }
  947. void BeautifySkinFrom::OnButton2()
  948. {
  949. // TODO: Add your control notification handler code here
  950. UpdateData();
  951. m_filter.TrimLeft ();
  952. m_filter.TrimRight ();
  953. FillGrid(1);
  954. }
  955. void BeautifySkinFrom::OnItemchangedList2(NMHDR* pNMHDR, LRESULT* pResult)
  956. {
  957. NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
  958. // TODO: Add your control notification handler code here
  959. POSITION pos;
  960. pos=m_List1.GetFirstSelectedItemPosition();
  961. if(pos==NULL)
  962. {
  963. return;
  964. }
  965. int iItem=m_List1.GetNextSelectedItem(pos);
  966. if(IsHasRights2new(5) || IsHasRights2new(49))
  967. {
  968. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(1);
  969. }
  970. else
  971. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(0);
  972. *pResult = 0;
  973. }
  974. BOOL BeautifySkinFrom::CheckOK(CString name)
  975. {
  976. int pos=name.Find("-");
  977. if(pos!=-1)name=name.Left(pos);
  978. if(name.GetLength ()>4)return 0;
  979. for(int i=0; i<name.GetLength (); i++)
  980. {
  981. if(name.GetAt (i)<'0'||name.GetAt (i)>'9')return 0;
  982. }
  983. return 1;
  984. }
  985. void BeautifySkinFrom::OnClickList2(NMHDR* pNMHDR, LRESULT* pResult)
  986. {
  987. // TODO: Add your control notification handler code here
  988. POSITION pos;
  989. pos=m_List1.GetFirstSelectedItemPosition();
  990. if(pos==NULL)return;
  991. int iItem=m_List1.GetNextSelectedItem(pos);
  992. g_id = m_List1.GetItemText (iItem, 0+m_nAdd);
  993. *pResult = 0;
  994. }
  995. void BeautifySkinFrom::HidePrice()
  996. {
  997. #ifdef LKAY_VERSION
  998. if(IsHasRights2new(31))return;
  999. for(int i=0; i< m_List1array.GetSize (); i++)
  1000. {
  1001. m_List1array.ElementAt (i).SetAt (14+m_nAdd, "***");
  1002. m_List1array.ElementAt (i).SetAt (11+m_nAdd, "***");
  1003. m_List1array.ElementAt (i).SetAt (12+m_nAdd, "***");
  1004. m_List1array.ElementAt (i).SetAt (13+m_nAdd, "***");
  1005. }
  1006. #else
  1007. if(IsHasRights2new(31))return;
  1008. for(int i=0; i< m_List1array.GetSize (); i++)
  1009. {
  1010. m_List1array.ElementAt (i).SetAt (13+m_nAdd, "***");
  1011. m_List1array.ElementAt (i).SetAt (14+m_nAdd, "***");
  1012. }
  1013. #endif
  1014. }
  1015. void BeautifySkinFrom::OnBtnsearchfilter()
  1016. {
  1017. // TODO: Add your control notification handler code here
  1018. SearchFilter dlg;
  1019. dlg.m_mode =1;
  1020. if(dlg.DoModal ()==IDOK)FillGrid();
  1021. g_bSearchFilter=0;
  1022. }
  1023. void BeautifySkinFrom::GetData()
  1024. {
  1025. if(g_bAllBranch==0)
  1026. {
  1027. if(g_bShowOK==0)
  1028. {
  1029. #ifdef LKAY_VERSION
  1030. CString filter="status3='未取' and (dindantype<>'意向客户' or dindantype is null)";
  1031. #else
  1032. CString filter="status3='未取'";
  1033. #endif
  1034. g_sendhead.bsql=0;
  1035. g_sendhead.code[0]=184;
  1036. g_sendhead.tabcount=1;
  1037. g_pMainWnd->ProcessChatMessageRequest2(filter);if(g_bSendOK==0)return;
  1038. }
  1039. else
  1040. {
  1041. g_sendhead.bsql=0;
  1042. g_sendhead.code[0]=184;
  1043. g_sendhead.tabcount=1;
  1044. #ifdef LKAY_VERSION
  1045. CString filter="dindantype<>'意向客户' or dindantype is null";
  1046. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1047. #else
  1048. g_pMainWnd->ProcessChatMessageRequest2(1);
  1049. #endif
  1050. if(g_bSendOK==0)return;
  1051. }
  1052. DataToArray(&m_List1array);
  1053. }
  1054. else
  1055. {
  1056. //////////////数据汇总
  1057. m_List1array.RemoveAll ();
  1058. CString branch;
  1059. for(int i=-1; i<g_brancharray.GetSize ()-1; i++)
  1060. {
  1061. if(i!=-1)
  1062. {
  1063. branch=g_brancharray.ElementAt (i).ElementAt (0);
  1064. g_branchip=g_brancharray.ElementAt (i).ElementAt (1);
  1065. g_pMainWnd->OnDisconnect();
  1066. g_branchname=branch;
  1067. g_bBranchModify=1;
  1068. }
  1069. else
  1070. branch=g_brancharray.ElementAt (g_brancharray.GetSize ()-1).ElementAt (0);
  1071. if(g_bShowOK==0)
  1072. {
  1073. CString filter="status3='未取'";
  1074. g_sendhead.bsql=0;
  1075. g_sendhead.code[0]=184;
  1076. g_sendhead.tabcount=1;
  1077. g_pMainWnd->ProcessChatMessageRequest2(filter);if(g_bSendOK==0)continue;
  1078. }
  1079. else
  1080. {
  1081. g_sendhead.bsql=0;
  1082. g_sendhead.code[0]=184;
  1083. g_sendhead.tabcount=1;
  1084. g_pMainWnd->ProcessChatMessageRequest2(1);if(g_bSendOK==0)continue;
  1085. }
  1086. CArray<CStringArray, CStringArray>List1array;
  1087. DataToArray(&List1array);
  1088. int size=m_List1array.GetSize ();
  1089. for(int j=0; j<List1array.GetSize (); j++)
  1090. {
  1091. size++;
  1092. m_List1array.SetSize(size , 1 );
  1093. size--;
  1094. m_List1array.ElementAt (size).Copy (List1array.ElementAt (j));
  1095. m_List1array.ElementAt (size).InsertAt (0, branch);
  1096. size++;
  1097. }
  1098. }
  1099. g_pMainWnd->OnDisconnect();
  1100. g_bBranchModify=0;g_branchip=g_branchname="";
  1101. }
  1102. HidePrice();
  1103. FillGrid();
  1104. }
  1105. void BeautifySkinFrom::OnBUTprint3()
  1106. {
  1107. // TODO: Add your control notification handler code here
  1108. GetData();
  1109. }