DesignFrom.cpp 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671
  1. // DesignFrom.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "DesignFrom.h"
  6. #include "MyMdi.H"
  7. #include "ModifyDinDan.h"
  8. #include "InputPsw.h"
  9. #include "TakeMoney2.h"
  10. #include "ImportPhoto.h"
  11. #include "ClientRequirement.h"
  12. #include "ChoosePhotoSkin2.h"
  13. #include "./helper/ffsco.h"
  14. #include "SelectPhotoDlg.h"
  15. #include "ShowPic.h"
  16. #include "Login2.h"
  17. #include "ShowCut.h"
  18. #include "CompressOption.h"
  19. #ifdef _DEBUG
  20. #define new DEBUG_NEW
  21. #undef THIS_FILE
  22. static char THIS_FILE[] = __FILE__;
  23. #endif
  24. #pragma comment(lib, "Shlwapi.lib")
  25. IMPLEMENT_DYNCREATE(DesignFrom, MyFormView)
  26. DesignFrom::DesignFrom() : MyFormView(DesignFrom::IDD)
  27. {
  28. m_filter = _T("");
  29. m_nAdd = 0;
  30. if (g_bAllBranch)
  31. {
  32. m_nAdd = 1;
  33. }
  34. }
  35. DesignFrom::~DesignFrom()
  36. {
  37. }
  38. void DesignFrom::DoDataExchange(CDataExchange* pDX)
  39. {
  40. MyFormView::DoDataExchange(pDX);
  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. }
  46. BEGIN_MESSAGE_MAP(DesignFrom, MyFormView)
  47. ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
  48. ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
  49. ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
  50. ON_WM_TIMER()
  51. ON_BN_CLICKED(IDC_BUTshowphoto, OnBUTshowphoto)
  52. ON_BN_CLICKED(IDC_BUTexportphoto, OnBUTexportphoto)
  53. ON_BN_CLICKED(IDC_BUTimportphoto, OnBUTimportphoto)
  54. ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
  55. ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST2, OnItemchangedList2)
  56. ON_BN_CLICKED(IDC_BUTimportphoto2, OnBUTimportphoto2)
  57. ON_BN_CLICKED(IDC_BUTimportphoto3, OnBUTimportphoto3)
  58. ON_NOTIFY(NM_CLICK, IDC_LIST2, OnClickList2)
  59. ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
  60. ON_BN_CLICKED(IDC_BTNSEARCHFILTER, OnBtnsearchfilter)
  61. ON_BN_CLICKED(IDC_BUTprint3, OnBUTprint3)
  62. END_MESSAGE_MAP()
  63. #ifdef _DEBUG
  64. void DesignFrom::AssertValid() const
  65. {
  66. MyFormView::AssertValid();
  67. }
  68. void DesignFrom::Dump(CDumpContext& dc) const
  69. {
  70. MyFormView::Dump(dc);
  71. }
  72. #endif //_DEBUG
  73. /////////////////////////////////////////////////////////////////////////////
  74. void DesignFrom::OnInitialUpdate()
  75. {
  76. MyFormView::OnInitialUpdate();
  77. CMyMdi Mdi;
  78. Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
  79. GetDlgItem(IDC_BUTimportphoto3)->EnableWindow(IsHasRights2new(12));
  80. GetDlgItem(IDC_BUTTON3)->EnableWindow(IsHasRights2new(12));
  81. GetDlgItem(IDC_BUTshowphoto)->EnableWindow(IsHasRights2new(15));
  82. CRect rc2;
  83. GetWindowRect(rc2);
  84. ::MoveWindow(m_hWnd, g_rc.left, g_rc.top, g_rc.Width(), g_rc.Height(), TRUE);
  85. EnumChildWindows(m_hWnd, (WNDENUMPROC)EnumChildProc, 0);
  86. if (g_bAllBranch == 0)
  87. {
  88. int idarray[] = { IDC_BUTexportphoto, IDC_BUTimportphoto, IDC_BUTimportphoto2, IDC_BUTimportphoto3, IDC_BUTshowphoto, IDC_BUTTON3, IDC_BUTclose };
  89. int idcount = 7;
  90. int btnwid;
  91. CRect prerc;
  92. for (int a = idcount - 2; a >= 0; a--)
  93. {
  94. GetDlgItem(idarray[a + 1])->GetWindowRect(prerc);
  95. ScreenToClient(prerc);
  96. GetDlgItem(idarray[a])->GetWindowRect(rc2);
  97. ScreenToClient(rc2);
  98. btnwid = rc2.Width();
  99. rc2.right = prerc.left;
  100. rc2.left = rc2.right - btnwid;
  101. GetDlgItem(idarray[a])->MoveWindow(rc2);
  102. }
  103. }
  104. else
  105. {
  106. GetDlgItem(IDC_BUTshowphoto)->ShowWindow(0);
  107. GetDlgItem(IDC_BUTprint3)->ShowWindow(1);
  108. int idarray[] = { IDC_BUTprint3, IDC_BUTexportphoto, IDC_BUTimportphoto, IDC_BUTimportphoto2, IDC_BUTimportphoto3, IDC_BUTTON3, IDC_BUTclose };
  109. int idcount = 7;
  110. int btnwid;
  111. CRect prerc;
  112. for (int a = idcount - 2; a >= 0; a--)
  113. {
  114. GetDlgItem(idarray[a + 1])->GetWindowRect(prerc);
  115. ScreenToClient(prerc);
  116. GetDlgItem(idarray[a])->GetWindowRect(rc2);
  117. ScreenToClient(rc2);
  118. btnwid = rc2.Width();
  119. rc2.right = prerc.left;
  120. rc2.left = rc2.right - btnwid;
  121. GetDlgItem(idarray[a])->MoveWindow(rc2);
  122. }
  123. }
  124. m_static1.SetFont(&g_titlefont);
  125. // Jeff.在精修状态后添加精修日期;
  126. if (g_bAllBranch == 0)
  127. {
  128. #ifdef CHILD_VERSION
  129. // 19 列;
  130. m_List1.SetHeadings("订单号,100;家长姓名,100;宝宝姓名,100;精修,100;精修日期,100;设计,100;设计日期,100;看设计,100;看设计日期,100;加急,100;取件日期,100;看设计要求,100;接单人,100;看设计人,100;设计师,100;套系名称,100;套系价格,100;手机,100;固定电话,100");
  131. #else
  132. // 19 列;
  133. m_List1.SetHeadings("订单号,100;男宾姓名,100;女宾姓名,100;精修,100;精修日期,100;设计,100;设计日期,100;看设计,100;看设计日期,100;加急,100;取件日期,100;看设计要求,100;接单人,100;看设计人,100;设计师,100;套系名称,100;套系价格,100;男宾电话,100;女宾电话,100");
  134. #endif
  135. m_List1.LoadColumnInfo(119);
  136. }
  137. else
  138. {
  139. #ifdef CHILD_VERSION
  140. // 20 列;
  141. m_List1.SetHeadings("店名,100;订单号,100;家长姓名,100;宝宝姓名,100;精修,100;精修日期,100;设计,100;设计日期,100;看设计,100;看设计日期,100;加急,100;取件日期,100;看设计要求,100;接单人,100;看设计人,100;设计师,100;套系名称,100;套系价格,100;手机,100;固定电话,100");
  142. #else
  143. m_List1.SetHeadings("店名,100;订单号,100;男宾姓名,100;女宾姓名,100;精修,100;精修日期,100;设计,100;设计日期,100;看设计,100;看设计日期,100;加急,100;取件日期,100;看设计要求,100;接单人,100;看设计人,100;设计师,100;套系名称,100;套系价格,100;男宾电话,100;女宾电话,100");
  144. #endif
  145. m_List1.LoadColumnInfo(199);
  146. }
  147. GetData();
  148. m_combo1.AddString(g_user.name);
  149. m_combo1.GetWindowRect(rc2);
  150. ScreenToClient(rc2);
  151. rc2.bottom += 200;
  152. m_combo1.MoveWindow(rc2);
  153. GetDlgItem(IDC_BUTclose)->GetWindowRect(rc2);
  154. SetComboHei(&m_combo1, rc2.Height());
  155. GetDlgItem(IDC_BUTexportphoto)->EnableWindow(IsHasRights2new(11));
  156. }
  157. void DesignFrom::FillGrid(BOOL bStatus)
  158. {
  159. if (g_bSearchFilter) // 开启条件查询;
  160. {
  161. m_List1.DeleteAllItems2();
  162. int ii = 0;
  163. m_List1.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  164. int count = 0;
  165. {
  166. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  167. {
  168. if (g_filterdate1 != "")
  169. {
  170. // 查询条件==设计日期; 原本在列5
  171. if (m_List1array.ElementAt(ii).ElementAt(6 + m_nAdd) < g_filterdate1 || m_List1array.ElementAt(ii).ElementAt(6 + m_nAdd) > g_filterdate2)
  172. continue;
  173. }
  174. if (g_waiter1 != "")
  175. {
  176. // 查询条件==设计师; 原本在列13
  177. if (m_List1array.ElementAt(ii).ElementAt(14 + m_nAdd) != g_waiter1)
  178. continue;
  179. }
  180. if (g_bAllBranch && g_filterbranch != "")
  181. {
  182. if (m_List1array.ElementAt(ii).ElementAt(0) != g_filterbranch)
  183. continue;
  184. }
  185. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  186. }
  187. }
  188. m_List1.m_arLabels.SetSize(count, 1);
  189. ii = count;
  190. m_List1.m_LabelCount = ii;
  191. m_List1.SetItemCountEx(ii);
  192. CString str;
  193. str.Format("单数:%d", ii);
  194. SetDlgItemText(IDC_STATIC2, str);
  195. }
  196. else // 未开启条件查询;
  197. {
  198. m_List1.DeleteAllItems2();
  199. int ii = 0;
  200. m_List1.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  201. int count = 0;
  202. if (m_filter.IsEmpty())
  203. {
  204. if (bStatus)
  205. {
  206. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  207. {
  208. // 查询条件==精修状态&&设计状态(原本列4);
  209. if (m_List1array.ElementAt(ii).ElementAt(3 + m_nAdd) == "OK" && m_List1array.ElementAt(ii).ElementAt(5 + m_nAdd) != "OK")
  210. {
  211. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  212. }
  213. }
  214. }
  215. else
  216. {
  217. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  218. {
  219. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  220. }
  221. }
  222. }
  223. else
  224. {
  225. if (bStatus)
  226. {
  227. int type = GetType(m_filter);
  228. if (type == 1)//电话
  229. {
  230. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  231. {
  232. // 查询条件==精修状态&&设计状态 &&(手机(原列16)||座机(原列17))
  233. if (m_List1array.ElementAt(ii).ElementAt(3 + m_nAdd) == "OK" &&
  234. m_List1array.ElementAt(ii).ElementAt(5 + m_nAdd) != "OK" &&
  235. (m_List1array.ElementAt(ii).ElementAt(17 + m_nAdd).Find(m_filter) != -1 || m_List1array.ElementAt(ii).ElementAt(18 + m_nAdd).Find(m_filter) != -1))
  236. {
  237. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  238. }
  239. }
  240. }
  241. else if (type == 2)//拼音
  242. {
  243. m_filter.MakeUpper();
  244. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  245. {
  246. // 查询条件==精修状态&&设计状态 &&(拼音1(原列18)||拼音2(原列19))
  247. if (m_List1array.ElementAt(ii).ElementAt(3 + m_nAdd) == "OK"
  248. &&m_List1array.ElementAt(ii).ElementAt(5 + m_nAdd) != "OK"
  249. && (m_List1array.ElementAt(ii).ElementAt(19 + m_nAdd).Find(m_filter) != -1 || m_List1array.ElementAt(ii).ElementAt(20 + m_nAdd).Find(m_filter) != -1))
  250. {
  251. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  252. }
  253. }
  254. }
  255. else
  256. {
  257. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  258. {
  259. // 查询条件==精修状态&&设计状态 &&(……)
  260. if (m_List1array.ElementAt(ii).ElementAt(3 + m_nAdd) == "OK" &&
  261. m_List1array.ElementAt(ii).ElementAt(5 + m_nAdd) != "OK" &&
  262. (m_List1array.ElementAt(ii).ElementAt(0).Find(m_filter) != -1 || \
  263. m_List1array.ElementAt(ii).ElementAt(1).Find(m_filter) != -1 || \
  264. m_List1array.ElementAt(ii).ElementAt(2).Find(m_filter) != -1 || \
  265. m_List1array.ElementAt(ii).ElementAt(3).Find(m_filter) != -1 || \
  266. m_List1array.ElementAt(ii).ElementAt(12).Find(m_filter) != -1 || \
  267. m_List1array.ElementAt(ii).ElementAt(13).Find(m_filter) != -1 || \
  268. m_List1array.ElementAt(ii).ElementAt(14).Find(m_filter) != -1 || \
  269. m_List1array.ElementAt(ii).ElementAt(15).Find(m_filter) != -1 || \
  270. m_List1array.ElementAt(ii).ElementAt(16).Find(m_filter) != -1 || \
  271. m_List1array.ElementAt(ii).ElementAt(17).Find(m_filter) != -1 || \
  272. m_List1array.ElementAt(ii).ElementAt(18).Find(m_filter) != -1 || \
  273. m_List1array.ElementAt(ii).ElementAt(19).Find(m_filter) != -1))
  274. {
  275. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  276. }
  277. }
  278. }
  279. }
  280. else
  281. {
  282. int type = GetType(m_filter);
  283. if (type == 1)//电话
  284. {
  285. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  286. {
  287. // 查询条件==手机(原列16)||座机(原列17)
  288. if (m_List1array.ElementAt(ii).ElementAt(17 + m_nAdd).Find(m_filter) != -1 ||
  289. m_List1array.ElementAt(ii).ElementAt(18 + m_nAdd).Find(m_filter) != -1)
  290. {
  291. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  292. }
  293. }
  294. }
  295. else if (type == 2)//拼音
  296. {
  297. m_filter.MakeUpper();
  298. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  299. {
  300. // 查询条件==精拼音1(原列18)||拼音2(原列19)
  301. if (m_List1array.ElementAt(ii).ElementAt(19 + m_nAdd).Find(m_filter) != -1 ||
  302. m_List1array.ElementAt(ii).ElementAt(20 + m_nAdd).Find(m_filter) != -1)
  303. {
  304. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  305. }
  306. }
  307. }
  308. else
  309. {
  310. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  311. {
  312. if (m_List1array.ElementAt(ii).ElementAt(0).Find(m_filter) != -1 ||
  313. m_List1array.ElementAt(ii).ElementAt(1).Find(m_filter) != -1 ||
  314. m_List1array.ElementAt(ii).ElementAt(2).Find(m_filter) != -1 ||
  315. m_List1array.ElementAt(ii).ElementAt(3).Find(m_filter) != -1 ||
  316. m_List1array.ElementAt(ii).ElementAt(12).Find(m_filter) != -1 ||
  317. m_List1array.ElementAt(ii).ElementAt(13).Find(m_filter) != -1 ||
  318. m_List1array.ElementAt(ii).ElementAt(14).Find(m_filter) != -1 ||
  319. m_List1array.ElementAt(ii).ElementAt(15).Find(m_filter) != -1 ||
  320. m_List1array.ElementAt(ii).ElementAt(16).Find(m_filter) != -1 ||
  321. m_List1array.ElementAt(ii).ElementAt(17).Find(m_filter) != -1 ||
  322. m_List1array.ElementAt(ii).ElementAt(18).Find(m_filter) != -1 ||
  323. m_List1array.ElementAt(ii).ElementAt(19).Find(m_filter) != -1)
  324. {
  325. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  326. }
  327. }
  328. }
  329. }
  330. }
  331. m_List1.m_arLabels.SetSize(count, 1);
  332. ii = count;
  333. m_List1.m_LabelCount = ii;
  334. m_List1.SetItemCountEx(ii);
  335. CString str;
  336. str.Format("单数:%d", ii);
  337. SetDlgItemText(IDC_STATIC2, str);
  338. }
  339. if (!g_id.IsEmpty())
  340. {
  341. for (int i = 0; i < m_List1.GetItemCount(); i++)
  342. {
  343. if (g_id == m_List1.GetItemText(i, 0 + m_nAdd))
  344. {
  345. m_List1.SetItemState(i, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
  346. m_List1.EnsureVisible(i, FALSE);
  347. break;
  348. }
  349. }
  350. }
  351. }
  352. void DesignFrom::OnBUTclose()
  353. {
  354. GetParent()->SendMessage(WM_CLOSE);
  355. }
  356. void DesignFrom::OnSelchangeCombo1()
  357. {
  358. SetTimer(1, 100, NULL);
  359. }
  360. void DesignFrom::OnTimer(UINT nIDEvent)
  361. {
  362. KillTimer(nIDEvent);
  363. OnButton1();
  364. }
  365. BOOL DesignFrom::PreTranslateMessage(MSG* pMsg)
  366. {
  367. try
  368. {
  369. if (pMsg->message == WM_KEYDOWN)
  370. {
  371. switch (pMsg->wParam)
  372. {
  373. case VK_RETURN:
  374. OnButton1();
  375. return 1;
  376. case 0x43: // copy
  377. if ((GetKeyState(VK_CONTROL) & 0x80))
  378. {
  379. GetFocus()->SendMessage(WM_COPY);
  380. return TRUE;
  381. }
  382. break;
  383. case 0x56: //Ctrl + V:
  384. if ((GetKeyState(VK_CONTROL) & 0x80))
  385. {
  386. GetFocus()->SendMessage(WM_PASTE);
  387. return TRUE;
  388. }
  389. break;
  390. case 0x58: // cut
  391. if ((GetKeyState(VK_CONTROL) & 0x80))
  392. {
  393. GetFocus()->SendMessage(WM_CUT);
  394. return TRUE;
  395. }
  396. break;
  397. case 0x5A: //undo
  398. case 0x59: //redo
  399. if ((GetKeyState(VK_CONTROL) & 0x80))
  400. {
  401. GetFocus()->SendMessage(WM_UNDO);
  402. return TRUE;
  403. }
  404. break;
  405. }
  406. }
  407. else if (pMsg->message == WM_LBUTTONDBLCLK)
  408. {
  409. CPoint pt;
  410. CRect rc, rc2;
  411. ::GetCursorPos(&pt);
  412. m_List1.GetWindowRect(rc2);
  413. if (rc2.PtInRect(pt) == 0)
  414. return MyFormView::PreTranslateMessage(pMsg);
  415. pt.x -= rc2.left;
  416. pt.y -= rc2.top;
  417. POSITION pos;
  418. pos = m_List1.GetFirstSelectedItemPosition();
  419. if (pos == NULL)return MyFormView::PreTranslateMessage(pMsg);
  420. int iItem = m_List1.GetNextSelectedItem(pos);
  421. m_List1.GetSubItemRect(iItem, 11 + m_nAdd, LVIR_BOUNDS, rc);
  422. if (rc.PtInRect(pt))
  423. {
  424. CClientRequirement dlg;
  425. CString id = m_List1.GetItemText(iItem, 0 + m_nAdd);
  426. CString str;
  427. if (g_bAllBranch == 0)
  428. {
  429. for (int i = 0; i < m_List1arraybak.GetSize(); i++)
  430. {
  431. if (m_List1arraybak.ElementAt(i).ElementAt(0 + m_nAdd) == id)
  432. {
  433. str = m_List1arraybak.ElementAt(i).ElementAt(11 + m_nAdd);
  434. break;
  435. }
  436. }
  437. }
  438. else
  439. {
  440. CString branch = m_List1.GetItemText(iItem, 0);
  441. for (int i = 0; i < m_List1arraybak.GetSize(); i++)
  442. {
  443. if (m_List1arraybak.ElementAt(i).ElementAt(0 + m_nAdd) == id && branch == m_List1array.ElementAt(i).ElementAt(0))
  444. {
  445. str = m_List1arraybak.ElementAt(i).ElementAt(11 + m_nAdd);
  446. break;
  447. }
  448. }
  449. }
  450. dlg.m_bz2 = str;
  451. dlg.m_bSave = 0;
  452. dlg.DoModal();
  453. }
  454. }
  455. return MyFormView::PreTranslateMessage(pMsg);
  456. }
  457. catch (...)
  458. {
  459. }
  460. }
  461. extern int CALLBACK BrowseProc(HWND hwnd, UINT msg, LPARAM lParam, LPARAM lpData);
  462. /*{
  463. switch(msg)
  464. {
  465. case BFFM_INITIALIZED:
  466. SendMessage(hwnd, BFFM_SETSELECTION, TRUE, NULL);
  467. break;
  468. case BFFM_SELCHANGED:
  469. {
  470. char szFileName[MAX_PATH];
  471. LPITEMIDLIST pidlCurrent = (LPITEMIDLIST)lParam;
  472. SHGetPathFromIDList(pidlCurrent, szFileName);
  473. SendMessage(hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM)szFileName);
  474. }
  475. break;
  476. }
  477. return 0;
  478. }*/
  479. void DesignFrom::GetSavePath(CString &path)
  480. {
  481. char lpszDisplayName[MAX_PATH], szFileName[MAX_PATH];
  482. LPITEMIDLIST pidlDesktop, pidlCurrent;
  483. if (SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidlDesktop) == NOERROR)
  484. {
  485. BROWSEINFO bi;
  486. bi.hwndOwner = this->m_hWnd;
  487. bi.pidlRoot = pidlDesktop;
  488. bi.pszDisplayName = lpszDisplayName;
  489. bi.lpszTitle = "\n文档保存的目录:";
  490. bi.ulFlags = BIF_STATUSTEXT&BIF_RETURNONLYFSDIRS;
  491. bi.lpfn = BrowseProc;
  492. bi.lParam = 0;
  493. bi.iImage = 0;
  494. pidlCurrent = SHBrowseForFolder(&bi);
  495. SHGetPathFromIDList(pidlCurrent, szFileName);
  496. path = szFileName;
  497. }
  498. }
  499. int DesignFrom::FindArray(CStringArray *pArray, CString Str)
  500. {
  501. for (int i = 0; i < pArray->GetSize(); i++)
  502. {
  503. if (pArray->ElementAt(i) == Str)
  504. return i;
  505. }
  506. return -1;
  507. }
  508. //-----------------------------------------------------------------
  509. // remark by Jeff 2014-12-12
  510. // 函数:GetNo
  511. // 描述:从str中解析出每个相片名,然后存入空的CStringArray中;
  512. // 参数:
  513. // str:选好的相片名串,如:"001,002,003" 后分隔符改为"|",结果应是"001|002|003"
  514. // array:空的数组,用来存放解析后的相片名;
  515. // 返回:
  516. // 注意:更换分隔符造成的问题,在该函数已解决;
  517. //-----------------------------------------------------------------
  518. void DesignFrom::GetNo(CString str, CStringArray &array)
  519. {
  520. if (!str.IsEmpty())
  521. {
  522. int pos = str.Find(",");
  523. while (pos != -1)
  524. {
  525. if (FindArray(&array, str.Left(pos)) == -1)
  526. array.Add(str.Left(pos));
  527. str = str.Right(str.GetLength() - pos - 1);
  528. pos = str.Find(",");
  529. }
  530. if (FindArray(&array, str) == -1)
  531. array.Add(str);
  532. }
  533. }
  534. //-----------------------------------------------------------------
  535. // remark by Jeff 2014-12-12
  536. // 函数:GetSelName
  537. // 描述:
  538. // 参数:
  539. // name:由GetNo解析出来后的单个相片名,如:"001"
  540. // spnamearray:订单下的商品数组,case 50所得;
  541. // 返回:
  542. // 注意:更换分隔符造成的问题,在该函数已解决;
  543. //-----------------------------------------------------------------
  544. CString DesignFrom::GetSelName(CString name, CArray<CStringArray, CStringArray>&spnamearray)
  545. {
  546. CString ret;
  547. name = "," + name + ",";
  548. CString str;
  549. for (int i = 0; i < spnamearray.GetSize(); i++)
  550. {
  551. str = "," + spnamearray.ElementAt(i).ElementAt(6) + ",";
  552. if (str.Find(name) != -1)
  553. {
  554. ret += spnamearray.ElementAt(i).ElementAt(5);
  555. ret += ";";
  556. }
  557. }
  558. ret.TrimRight(";");
  559. ret.Replace("*", "x");
  560. return ret;
  561. }
  562. //-----------------------------------------------------------------
  563. // remark by Jeff 2014-12-12
  564. // 函数:GetSelName2
  565. // 描述:
  566. // 参数:
  567. // name:由GetNo解析出来后的单个相片名,如:"001"
  568. // spnamearray:订单下的商品数组,case 50所得;
  569. // 返回:
  570. // 注意:更换分隔符造成的问题,在该函数已解决;
  571. //-----------------------------------------------------------------
  572. CString DesignFrom::GetSelName2(CString name, CArray<CStringArray, CStringArray>&spnamearray)
  573. {
  574. CString ret;
  575. name = "," + name + ",";
  576. CString str;
  577. for (int i = 0; i < spnamearray.GetSize(); i++)
  578. {
  579. str = "," + spnamearray.ElementAt(i).ElementAt(8) + ",";
  580. if (str.Find(name) != -1)
  581. {
  582. ret += spnamearray.ElementAt(i).ElementAt(5);
  583. ret += ";";
  584. }
  585. }
  586. ret.TrimRight(";");
  587. ret.Replace("*", "x");
  588. return ret;
  589. }
  590. void DesignFrom::OnBUTexportphoto() // 导出精修好的片 按钮;
  591. {
  592. if (IsHasRights2new(11) == 0)return;
  593. POSITION pos;
  594. pos = m_List1.GetFirstSelectedItemPosition();
  595. if (pos == NULL)
  596. {
  597. AfxMessageBox("请先选中您要导出片的定单!", MB_ICONINFORMATION);
  598. return;
  599. }
  600. int iItem = m_List1.GetNextSelectedItem(pos);
  601. CString id = m_List1.GetItemText(iItem, 0 + m_nAdd);
  602. CString branch;
  603. if (g_bAllBranch)
  604. branch = m_List1.GetItemText(iItem, 0);
  605. CString path;
  606. if (g_bAllBranch)
  607. {
  608. CString branchpath = GetBranchPhotoPath(branch);
  609. path = g_path4 + branchpath + "\\";
  610. }
  611. else
  612. path = g_path4 + "\\";
  613. path += id;
  614. path += "\\";
  615. CStringArray array;
  616. CString dir;
  617. GetSavePath(dir);
  618. if (dir.IsEmpty())
  619. {
  620. return;
  621. }
  622. CString name1 = m_List1.GetItemText(iItem, 1 + m_nAdd);
  623. CString name2 = m_List1.GetItemText(iItem, 2 + m_nAdd);
  624. dir.TrimRight('\\');
  625. dir += "\\";
  626. dir += id;
  627. dir += g_branchname;
  628. if (g_bAllBranch)
  629. {
  630. if (GetBranchPhotoPath(branch) != "")
  631. dir += branch;
  632. }
  633. dir += name1;
  634. dir += name2;
  635. dir += "精修好的片";
  636. dir += "\\";
  637. ::CreateDirectory(dir, NULL);
  638. CStringArray desarray;
  639. CStringArray dirarray;
  640. CString savepath = dir;
  641. CString str;
  642. if (1)
  643. {
  644. using namespace helper_coffs;
  645. ffsco o;
  646. o.dirs(1);
  647. o.find(LPCSTR(path), LPCSTR("*.*"));
  648. ffsco::typeT coo;
  649. ffsco::typeT::iterator it;
  650. coo = o.co_dir();
  651. for (it = coo.begin(); coo.end() != it; it++)
  652. {
  653. str = (*it).c_str();
  654. if (FindArray(&dirarray, str) == -1)
  655. {
  656. dirarray.Add(str);
  657. if (str != dirarray.ElementAt(0))
  658. {
  659. str = savepath + str.Right(str.GetLength() - dirarray.ElementAt(0).GetLength());
  660. if (::CheckFolderFileExist(str) == 0)
  661. ::CreateDirectory(str, NULL);
  662. }
  663. }
  664. }
  665. }
  666. if (1)
  667. {
  668. for (int i = 0; i < dirarray.GetSize(); i++)
  669. {
  670. using namespace helper_coffs;
  671. ffsco o;
  672. o.dirs(0);
  673. o.find(LPCSTR(dirarray.ElementAt(i)), LPCSTR("*.jpg"));
  674. ffsco::typeT coo;
  675. ffsco::typeT::iterator it;
  676. coo = o.co_file();
  677. for (it = coo.begin(); coo.end() != it; it++)
  678. {
  679. str = (*it).c_str();
  680. if (str.GetAt(str.ReverseFind('\\') + 1) == 's')continue;
  681. if (str.GetAt(str.ReverseFind('\\') + 1) == 'm')continue;
  682. array.Add(str);
  683. desarray.Add(savepath + dirarray.ElementAt(i).Right(dirarray.ElementAt(i).GetLength() - dirarray.ElementAt(0).GetLength()) + str.Right(str.GetLength() - str.ReverseFind('\\') - 1));
  684. }
  685. }
  686. }
  687. if (array.GetSize() == 0)
  688. {
  689. AfxMessageBox("此单未导片!", MB_ICONINFORMATION);
  690. return;
  691. }
  692. CCompressOption comoptdlg;
  693. comoptdlg.DoModal();
  694. //----------------------------------------------------------------------------------------------
  695. //----------------------------------------------------------------------------------------------
  696. // 导出精修好片;
  697. //----------------------------------------------------------------------------------------------
  698. //----------------------------------------------------------------------------------------------
  699. ImportPhoto dlg;
  700. dlg.m_nOutputSize = comoptdlg.m_nsize; // 1.导出精修片时的尺寸;
  701. dlg.m_mode = 1; // 2.未知;
  702. dlg.m_pArray = &array; // 3.作为导出源的精修片路径集合;
  703. dlg.m_pDesArray = &desarray; // 4.作为导出目标的精修片路径集合;
  704. dlg.m_savepath = dir; // 5.保存导出精修片的目录;
  705. dlg.DoModal();
  706. AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  707. // CString str;
  708. str = " 导出精修片 ";
  709. str += "客人:";
  710. str += name1 + name2 + id;
  711. WriteLog(str);
  712. {
  713. ShowCut dlg;
  714. dlg.m_branch = branch;
  715. dlg.m_mode = 1;
  716. dlg.m_id = id;
  717. dlg.DoModal();
  718. }
  719. }
  720. void DesignFrom::OnBUTimportphoto() // 导入设计版 按钮;
  721. {
  722. POSITION pos;
  723. pos = m_List1.GetFirstSelectedItemPosition();
  724. if (pos == NULL)
  725. {
  726. AfxMessageBox("请先选中您要导片的定单!", MB_ICONINFORMATION);
  727. return;
  728. }
  729. int iItem = m_List1.GetNextSelectedItem(pos);
  730. CString branch;
  731. CString id = m_List1.GetItemText(iItem, 0 + m_nAdd);
  732. if (g_bAllBranch)
  733. branch = m_List1.GetItemText(iItem, 0);
  734. // 原本4,5,改为5,6
  735. CString oldstatus = m_List1.GetItemText(iItem, 5 + m_nAdd);
  736. CString time10 = m_List1.GetItemText(iItem, 6 + m_nAdd);
  737. CString name = m_List1.GetItemText(iItem, 1 + m_nAdd) + "," + m_List1.GetItemText(iItem, 2 + m_nAdd);
  738. name.TrimLeft(",");
  739. name.TrimRight(",");
  740. name = "客人:" + name;
  741. CString phone = m_List1.GetItemText(iItem, 16 + m_nAdd) + "," + m_List1.GetItemText(iItem, 17 + m_nAdd);
  742. phone.TrimLeft(",");
  743. phone.TrimRight(",");
  744. phone = "电话:" + phone;
  745. #ifdef ENTERPRISE_VERSION
  746. if (::CheckFolderFileExist(g_path3) == 0)
  747. ::CreateDirectory(g_path3, NULL);
  748. #endif
  749. if (!::CheckFolderFileExist(g_path3))
  750. {
  751. AfxMessageBox("设计片保存机器目录未设置, 请通知系统管理员!", MB_ICONINFORMATION);
  752. return;
  753. }
  754. CString savepath;
  755. if (g_bAllBranch)
  756. {
  757. CString branchpath = GetBranchPhotoPath(branch);
  758. savepath = g_path3 + branchpath + "\\";
  759. if (::CheckFolderFileExist(savepath) == 0)
  760. ::CreateDirectory(savepath, NULL);
  761. }
  762. else
  763. savepath = g_path3 + "\\";
  764. savepath += id + "\\";
  765. if (::CheckFolderFileExist(savepath) == 0)
  766. ::CreateDirectory(savepath, NULL);
  767. /* IsGrowthTx growthtxdlg;
  768. growthtxdlg.m_id=id;
  769. growthtxdlg.DoModal ();
  770. if(growthtxdlg.m_bReturnOK==0)
  771. return;
  772. if(growthtxdlg.m_bGrowthTx && growthtxdlg.m_seltxname.IsEmpty ())
  773. return;
  774. if(!growthtxdlg.m_seltxname.IsEmpty ())
  775. {
  776. savepath+=growthtxdlg.m_seltxname+"\\";
  777. if(::CheckFolderFileExist (savepath)==0)
  778. ::CreateDirectory (savepath, NULL);
  779. }*/
  780. CString srcdir; CString str;
  781. GetSavePath(srcdir);
  782. if (srcdir.IsEmpty())
  783. {
  784. CString status5;
  785. if (AfxMessageBox("客照是否全部设计完毕?", MB_YESNO | MB_ICONINFORMATION) == IDYES)
  786. status5 = "OK";
  787. else
  788. status5 = "设计中";
  789. CString sql;
  790. if (time10.IsEmpty())
  791. sql = "update dindan set status5='" + status5 + "',time10='" + g_date + "' where id='" + id + "'";
  792. else
  793. sql = "update dindan set status5='" + status5 + "' where id='" + id + "'";
  794. g_sendhead.bsql = 1;
  795. if (g_bAllBranch)
  796. {
  797. g_branchip = GetIP(branch);
  798. g_pMainWnd->OnDisconnect();
  799. g_branchname = branch;
  800. g_bBranchModify = 1;
  801. g_pMainWnd->ProcessChatMessageRequest2(sql);
  802. g_pMainWnd->OnDisconnect();
  803. g_bBranchModify = 0;
  804. g_branchip = g_branchname = "";
  805. }
  806. else
  807. g_pMainWnd->ProcessChatMessageRequest2(sql);
  808. if (g_bSendOK == 0)return;
  809. if (g_bAllBranch == 0)
  810. {
  811. GetData();
  812. }
  813. else
  814. {
  815. for (int i = 0; i < m_List1array.GetSize(); i++)
  816. {
  817. if (id == m_List1array.ElementAt(i).ElementAt(1) && branch == m_List1array.ElementAt(i).ElementAt(0))
  818. {
  819. m_List1array.ElementAt(i).SetAt(4 + m_nAdd, status5);
  820. if (time10.IsEmpty())
  821. m_List1array.ElementAt(i).SetAt(5 + m_nAdd, g_date);
  822. FillGrid();
  823. break;
  824. }
  825. }
  826. }
  827. return;
  828. }
  829. if (srcdir.GetLength() < 4)
  830. {
  831. AfxMessageBox("请选择正确的您文件所在的目录!", MB_ICONSTOP);
  832. return;
  833. }
  834. if (oldstatus != "未设计")
  835. {
  836. CString str;
  837. str.Format("%s\r\n%s\r\n此单已导入过设计片, 确认您选中的照片没有导入过吗? 否则会覆盖原来的照片, 是否继续?", name, phone);
  838. if (AfxMessageBox(str, MB_YESNO | MB_ICONSTOP) != IDYES)
  839. return;
  840. }
  841. else
  842. {
  843. CString str;
  844. str.Format("%s\r\n%s\r\n确认您选中的照片与客户资料相符吗? 是否继续?", name, phone);
  845. if (AfxMessageBox(str, MB_YESNO | MB_ICONINFORMATION) != IDYES)
  846. return;
  847. }
  848. CStringArray array;
  849. CStringArray desarray;
  850. CStringArray dirarray;
  851. if (1)
  852. {
  853. // 1.获取源目录下的所有子目录;
  854. using namespace helper_coffs;
  855. ffsco o;
  856. o.dirs(1);
  857. o.find(LPCSTR(srcdir), LPCSTR("*.*"));
  858. ffsco::typeT coo;
  859. ffsco::typeT::iterator it;
  860. coo = o.co_dir();
  861. for (it = coo.begin(); coo.end() != it; it++)
  862. {
  863. str = (*it).c_str();
  864. if (FindArray(&dirarray, str) == -1)
  865. {
  866. dirarray.Add(str);
  867. if (str != dirarray.ElementAt(0))
  868. {
  869. str = savepath + str.Right(str.GetLength() - dirarray.ElementAt(0).GetLength());
  870. if (::CheckFolderFileExist(str) == 0)
  871. ::CreateDirectory(str, NULL);
  872. }
  873. }
  874. }
  875. }
  876. if (1)
  877. {
  878. // 2.从每个子目录下查找所有的相片;
  879. for (int i = 0; i < dirarray.GetSize(); i++)
  880. {
  881. using namespace helper_coffs;
  882. ffsco o;
  883. o.dirs(0);
  884. o.find(LPCSTR(dirarray.ElementAt(i)), LPCSTR("*.jpg"));
  885. ffsco::typeT coo;
  886. ffsco::typeT::iterator it;
  887. coo = o.co_file();
  888. for (it = coo.begin(); coo.end() != it; it++)
  889. {
  890. str = (*it).c_str();
  891. array.Add(str);
  892. desarray.Add(savepath + dirarray.ElementAt(i).Right(dirarray.ElementAt(i).GetLength() - dirarray.ElementAt(0).GetLength()) + str.Right(str.GetLength() - str.ReverseFind('\\') - 1));
  893. }
  894. }
  895. }
  896. if (array.GetSize() == 0)return;
  897. //----------------------------------------------------------------------------------------------
  898. //----------------------------------------------------------------------------------------------
  899. // 导入设计的片;
  900. //----------------------------------------------------------------------------------------------
  901. //----------------------------------------------------------------------------------------------
  902. ImportPhoto dlg;
  903. dlg.m_branch = branch; // 1.订单分店名;
  904. dlg.m_nphototype = 3; // 2.未知;
  905. dlg.m_pArray = &array; // 3.作为源的设计片路径集合;
  906. dlg.m_pDesArray = &desarray; // 4.作为目标的设计片路径集合;
  907. dlg.m_savepath = savepath; // 5.导出时的保存目录;
  908. #ifdef ENTERPRISE_VERSION
  909. // if(!g_branchname.IsEmpty ())
  910. {
  911. dlg.m_bSaveUploadTask = g_bSaveUploadTask4;
  912. dlg.m_sel = g_cominfoarraylocal.ElementAt(0).ElementAt(81);
  913. dlg.m_uploadtaskarray.Add(id + ";" + name);
  914. dlg.m_uploadtaskarray.Add("");
  915. dlg.m_uploadtaskarray.Add("");
  916. dlg.m_uploadtaskarray.Add("");
  917. dlg.m_uploadtaskarray.Add("");
  918. dlg.m_uploadtaskarray.Add("");
  919. dlg.m_uploadtaskarray.Add("");
  920. dlg.m_uploadtaskarray.Add("");
  921. dlg.m_uploadtaskarray.Add("");
  922. dlg.m_uploadtaskarray.Add("");
  923. }
  924. #endif
  925. dlg.DoModal();
  926. CString status5;
  927. if (AfxMessageBox("客照是否全部设计完毕?", MB_YESNO | MB_ICONINFORMATION) == IDYES)
  928. status5 = "OK";
  929. else
  930. status5 = "设计中";
  931. CString sql;
  932. if (time10.IsEmpty())
  933. sql = "update dindan set status5='" + status5 + "',waiter4='" + g_user.name + "',time10='" + g_date + "' where id='" + id + "'";
  934. else
  935. sql = "update dindan set status5='" + status5 + "',waiter4='" + g_user.name + "' where id='" + id + "'";
  936. g_sendhead.bsql = 1;
  937. if (g_bAllBranch)
  938. {
  939. g_branchip = GetIP(branch);
  940. g_pMainWnd->OnDisconnect();
  941. g_branchname = branch;
  942. g_bBranchModify = 1;
  943. g_pMainWnd->ProcessChatMessageRequest2(sql);
  944. g_pMainWnd->OnDisconnect();
  945. g_bBranchModify = 0;
  946. g_branchip = g_branchname = "";
  947. }
  948. else
  949. g_pMainWnd->ProcessChatMessageRequest2(sql);
  950. if (g_bSendOK == 0)return;
  951. savepath += "ok";
  952. ::DeleteFile(savepath);
  953. AfxMessageBox("导入客照成功!", MB_ICONINFORMATION);
  954. if (g_bAllBranch == 0)
  955. {
  956. GetData();
  957. }
  958. else
  959. {
  960. for (int i = 0; i < m_List1array.GetSize(); i++)
  961. {
  962. if (id == m_List1array.ElementAt(i).ElementAt(1) && branch == m_List1array.ElementAt(i).ElementAt(0))
  963. {
  964. m_List1array.ElementAt(i).SetAt(4 + m_nAdd, status5);
  965. if (time10.IsEmpty())
  966. m_List1array.ElementAt(i).SetAt(5 + m_nAdd, g_date);
  967. m_List1array.ElementAt(i).SetAt(13 + m_nAdd, g_user.name);
  968. FillGrid();
  969. break;
  970. }
  971. }
  972. }
  973. }
  974. // Jeff:选设计版按钮;
  975. void DesignFrom::OnBUTshowphoto() //Jeff:选设计版按钮;
  976. {
  977. // TODO: Add your control notification handler code here
  978. POSITION pos;
  979. pos = m_List1.GetFirstSelectedItemPosition();
  980. if (pos == NULL)
  981. {
  982. AfxMessageBox("请先选中您要查看的定单!", MB_ICONINFORMATION);
  983. return;
  984. }
  985. int iItem = m_List1.GetNextSelectedItem(pos);
  986. CString status = m_List1.GetItemText(iItem, 4);
  987. CString id = m_List1.GetItemText(iItem, 0);
  988. CString status2 = m_List1.GetItemText(iItem, 5);
  989. ChoosePhotoSkin2 dlg; // 选设计对话框;
  990. dlg.m_Runingmode = 1;
  991. dlg.SetLiaPath("3.lia");
  992. dlg.m_strOrderNumber = id;
  993. dlg.m_path = g_path3 + "\\";
  994. dlg.m_path += id;
  995. dlg.m_path += "\\";
  996. //AfxMessageBox(dlg.m_path);//Jeff Box;
  997. dlg.DoModal();
  998. g_bInSkin = 0;
  999. // printf("Jeff:ChoosePhotoSkin2::m_id=%s\n ChoosePhotoSkin2::m_path=%s\n ChoosePhotoSkin2::m_mode\n\n",dlg.m_id,dlg.m_path,dlg.m_mode);// Jeff Printf;
  1000. for (int i = 0; i < m_List1array.GetSize(); i++)
  1001. {
  1002. if (id == m_List1array.ElementAt(i).ElementAt(0))
  1003. {
  1004. m_List1array.ElementAt(i).SetAt(10, dlg.m_bz3);
  1005. m_List1array.ElementAt(i).SetAt(6, dlg.m_status8);
  1006. m_List1array.ElementAt(i).SetAt(9, dlg.m_time5);
  1007. if (dlg.m_status8 != "OK")
  1008. m_List1array.ElementAt(i).SetAt(4, "设计中");
  1009. else
  1010. m_List1array.ElementAt(i).SetAt(4, "OK");
  1011. FillGrid();
  1012. break;
  1013. }
  1014. }
  1015. }
  1016. void DesignFrom::OnButton1() // 查询 按钮;
  1017. {
  1018. UpdateData();
  1019. m_filter.TrimLeft();
  1020. m_filter.TrimRight();
  1021. FillGrid();
  1022. }
  1023. // 已选未设计 按钮; "已选未设计"命名不合理,不知是"已选片OK未设计"还是"已精修未设计",意义待定
  1024. void DesignFrom::OnButton2() // 已精修未设计 按钮;
  1025. {
  1026. UpdateData();
  1027. m_filter.TrimLeft();
  1028. m_filter.TrimRight();
  1029. FillGrid(1);
  1030. }
  1031. void DesignFrom::OnItemchangedList2(NMHDR* pNMHDR, LRESULT* pResult)
  1032. {
  1033. NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
  1034. POSITION pos;
  1035. pos = m_List1.GetFirstSelectedItemPosition();
  1036. if (pos == NULL)
  1037. {
  1038. return;
  1039. }
  1040. int iItem = m_List1.GetNextSelectedItem(pos);
  1041. // CString waiter4=m_List1.GetItemText (iItem, 11);
  1042. if (IsHasRights2new(7) || IsHasRights2new(49))
  1043. {
  1044. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(1);
  1045. // GetDlgItem(IDC_BUTimportphoto2)->EnableWindow(1);
  1046. }
  1047. else
  1048. {
  1049. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(0);
  1050. // GetDlgItem(IDC_BUTimportphoto2)->EnableWindow(0);
  1051. }
  1052. /* if(waiter4.IsEmpty () && IsHasRights2new(7) || IsHasRights2new(49) )
  1053. {
  1054. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(1);
  1055. GetDlgItem(IDC_BUTimportphoto2)->EnableWindow(1);
  1056. }
  1057. else if(waiter4==g_user.name && IsHasRights2new(7) )
  1058. {
  1059. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(1);
  1060. GetDlgItem(IDC_BUTimportphoto2)->EnableWindow(1);
  1061. }
  1062. else
  1063. {
  1064. GetDlgItem(IDC_BUTimportphoto)->EnableWindow(0);
  1065. GetDlgItem(IDC_BUTimportphoto2)->EnableWindow(0);
  1066. }*/
  1067. *pResult = 0;
  1068. }
  1069. void DesignFrom::OnBUTimportphoto2() // 查看 按钮;
  1070. {
  1071. POSITION pos;
  1072. pos = m_List1.GetFirstSelectedItemPosition();
  1073. if (pos == NULL)
  1074. {
  1075. AfxMessageBox("请先选中您要查看的定单!", MB_ICONINFORMATION);
  1076. return;
  1077. }
  1078. int iItem = m_List1.GetNextSelectedItem(pos);
  1079. CString branch;
  1080. CString id = m_List1.GetItemText(iItem, 0 + m_nAdd);
  1081. if (g_bAllBranch)
  1082. branch = m_List1.GetItemText(iItem, 0);
  1083. CString name = m_List1.GetItemText(iItem, 1 + m_nAdd) + "," + m_List1.GetItemText(iItem, 2 + m_nAdd);
  1084. name.TrimLeft(",");
  1085. name.TrimRight(",");
  1086. name = "客人:" + name;
  1087. ShowPic dlg;
  1088. dlg.m_id = id;
  1089. dlg.m_name = name;
  1090. dlg.m_name2 = m_List1.GetItemText(iItem, 1 + m_nAdd) + m_List1.GetItemText(iItem, 2 + m_nAdd);
  1091. // 设计要求(原列10)
  1092. dlg.remark = m_List1.GetItemText(iItem, 11 + m_nAdd);
  1093. dlg.m_mode = 5;
  1094. if (g_bAllBranch)
  1095. {
  1096. dlg.m_branch = branch;
  1097. CString branchpath = GetBranchPhotoPath(branch);
  1098. dlg.m_path = g_path3 + branchpath + "\\";
  1099. }
  1100. else
  1101. dlg.m_path = g_path3 + "\\";
  1102. dlg.m_path += id;
  1103. dlg.m_path += "\\";
  1104. dlg.DoModal();
  1105. }
  1106. void DesignFrom::OnBUTimportphoto3() // 导出 (设计好的片) 按钮;
  1107. {
  1108. if (IsHasRights2new(12) == 0)return;
  1109. POSITION pos;
  1110. pos = m_List1.GetFirstSelectedItemPosition();
  1111. if (pos == NULL)
  1112. {
  1113. AfxMessageBox("请先选中您要导出片的定单!", MB_ICONINFORMATION);
  1114. return;
  1115. }
  1116. int iItem = m_List1.GetNextSelectedItem(pos);
  1117. CString id = m_List1.GetItemText(iItem, 0 + m_nAdd);
  1118. CString branch;
  1119. if (g_bAllBranch)
  1120. branch = m_List1.GetItemText(iItem, 0);
  1121. CString path;
  1122. if (g_bAllBranch)
  1123. {
  1124. CString branchpath = GetBranchPhotoPath(branch);
  1125. path = g_path3 + branchpath + "\\";
  1126. }
  1127. else
  1128. path = g_path3 + "\\";
  1129. path += id;
  1130. path += "\\";
  1131. CStringArray array;
  1132. CString dir;
  1133. GetSavePath(dir);
  1134. if (dir.IsEmpty())
  1135. {
  1136. return;
  1137. }
  1138. CString name1 = m_List1.GetItemText(iItem, 1 + m_nAdd);
  1139. CString name2 = m_List1.GetItemText(iItem, 2 + m_nAdd);
  1140. CString remark = m_List1.GetItemText(iItem, 11 + m_nAdd); // 设计要求,原列10
  1141. dir.TrimRight('\\');
  1142. dir += "\\";
  1143. dir += id;
  1144. dir += g_branchname;
  1145. if (g_bAllBranch)
  1146. {
  1147. if (GetBranchPhotoPath(branch) != "")
  1148. dir += branch;
  1149. }
  1150. dir += name1;
  1151. dir += name2;
  1152. dir += "设计好的片";
  1153. dir += "\\";
  1154. ::CreateDirectory(dir, NULL);
  1155. CStringArray desarray;
  1156. CStringArray dirarray;
  1157. CString savepath = dir;
  1158. CString str;
  1159. if (1)
  1160. {
  1161. using namespace helper_coffs;
  1162. ffsco o;
  1163. o.dirs(1);
  1164. o.find(LPCSTR(path), LPCSTR("*.*"));
  1165. ffsco::typeT coo;
  1166. ffsco::typeT::iterator it;
  1167. coo = o.co_dir();
  1168. for (it = coo.begin(); coo.end() != it; it++)
  1169. {
  1170. str = (*it).c_str();
  1171. if (FindArray(&dirarray, str) == -1)
  1172. {
  1173. dirarray.Add(str);
  1174. if (str != dirarray.ElementAt(0))
  1175. {
  1176. str = savepath + str.Right(str.GetLength() - dirarray.ElementAt(0).GetLength());
  1177. if (::CheckFolderFileExist(str) == 0)
  1178. ::CreateDirectory(str, NULL);
  1179. }
  1180. }
  1181. }
  1182. }
  1183. if (1)
  1184. {
  1185. for (int i = 0; i < dirarray.GetSize(); i++)
  1186. {
  1187. using namespace helper_coffs;
  1188. ffsco o;
  1189. o.dirs(0);
  1190. o.find(LPCSTR(dirarray.ElementAt(i)), LPCSTR("*.jpg"));
  1191. ffsco::typeT coo;
  1192. ffsco::typeT::iterator it;
  1193. coo = o.co_file();
  1194. for (it = coo.begin(); coo.end() != it; it++)
  1195. {
  1196. str = (*it).c_str();
  1197. if (str.GetAt(str.ReverseFind('\\') + 1) == 's')continue;
  1198. if (str.GetAt(str.ReverseFind('\\') + 1) == 'm')continue;
  1199. array.Add(str);
  1200. desarray.Add(savepath + dirarray.ElementAt(i).Right(dirarray.ElementAt(i).GetLength() - dirarray.ElementAt(0).GetLength()) + str.Right(str.GetLength() - str.ReverseFind('\\') - 1));
  1201. }
  1202. }
  1203. }
  1204. if (array.GetSize() == 0)
  1205. {
  1206. AfxMessageBox("此单未导片!", MB_ICONINFORMATION);
  1207. return;
  1208. }
  1209. CStdioFile fp;
  1210. fp.Open(dir + "客户要求.txt", CFile::modeCreate | CFile::modeWrite);
  1211. fp.WriteString(remark);
  1212. fp.Close();
  1213. CCompressOption comoptdlg;
  1214. comoptdlg.DoModal();
  1215. //----------------------------------------------------------------------------------------------
  1216. //----------------------------------------------------------------------------------------------
  1217. // 导出设计好片;
  1218. //----------------------------------------------------------------------------------------------
  1219. //----------------------------------------------------------------------------------------------
  1220. ImportPhoto dlg;
  1221. dlg.m_nOutputSize = comoptdlg.m_nsize; // 1.导出设计好的片的尺寸;
  1222. dlg.m_mode = 1; // 2.未知;
  1223. dlg.m_pArray = &array; // 3.作为导出时的源设计片路径集合;
  1224. dlg.m_pDesArray = &desarray; // 4.作为导出时的目标设计片路径集合;
  1225. dlg.m_savepath = dir; // 5.导出设计片时的保存路径;
  1226. dlg.DoModal();
  1227. AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  1228. // CString str;
  1229. str = " 导出设计片 ";
  1230. str += "客人:";
  1231. str += name1 + name2 + id;
  1232. WriteLog(str);
  1233. }
  1234. void DesignFrom::OnClickList2(NMHDR* pNMHDR, LRESULT* pResult)
  1235. {
  1236. POSITION pos;
  1237. pos = m_List1.GetFirstSelectedItemPosition();
  1238. if (pos == NULL)return;
  1239. int iItem = m_List1.GetNextSelectedItem(pos);
  1240. g_id = m_List1.GetItemText(iItem, 0 + m_nAdd);
  1241. *pResult = 0;
  1242. }
  1243. // 需要处理更换分隔符造成的问题;
  1244. // 已处理分隔符问题;
  1245. void DesignFrom::OnButton3() // 导出选设计 按钮;
  1246. {
  1247. if (IsHasRights2new(12) == 0)return;
  1248. UpdateData();
  1249. POSITION pos;
  1250. pos = m_List1.GetFirstSelectedItemPosition();
  1251. if (pos == NULL)
  1252. {
  1253. AfxMessageBox("请先选中您要导片的定单!", MB_ICONINFORMATION);
  1254. return;
  1255. }
  1256. int iItem = m_List1.GetNextSelectedItem(pos);
  1257. CString id = m_List1.GetItemText(iItem, 0 + m_nAdd);
  1258. CString branch;
  1259. if (g_bAllBranch)
  1260. branch = m_List1.GetItemText(iItem, 0);
  1261. CString name1 = m_List1.GetItemText(iItem, 1 + m_nAdd);
  1262. CString name2 = m_List1.GetItemText(iItem, 2 + m_nAdd);
  1263. #ifdef CHILD_VERSION
  1264. CString filter = "id='" + id + "';id='" + id + "';id='" + id + "' and name<>'入册' and name<>'入底'";
  1265. #else
  1266. CString filter = "id='" + id + "';id='" + id + "';id='" + id + "' and kind<>'2' and name<>'入册' and name<>'入底'";
  1267. #endif
  1268. g_sendhead.bsql = 0;
  1269. g_sendhead.code[0] = 50;
  1270. g_sendhead.code[1] = 11;
  1271. g_sendhead.code[2] = 56;
  1272. g_sendhead.tabcount = 3;
  1273. if (g_bAllBranch)
  1274. {
  1275. g_branchip = GetIP(branch);
  1276. g_pMainWnd->OnDisconnect();
  1277. g_branchname = branch;
  1278. g_bBranchModify = 1;
  1279. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1280. g_pMainWnd->OnDisconnect();
  1281. g_bBranchModify = 0;
  1282. g_branchip = g_branchname = "";
  1283. }
  1284. else
  1285. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1286. if (g_bSendOK == 0)return;
  1287. CArray<CStringArray, CStringArray>sparray;
  1288. CArray<CStringArray, CStringArray>sparray2;
  1289. DataToArray(&sparray, &g_List1array, &sparray2);
  1290. CString path;
  1291. if (g_bAllBranch)
  1292. {
  1293. CString branchpath = GetBranchPhotoPath(branch);
  1294. path = g_path3 + branchpath + "\\";
  1295. }
  1296. else
  1297. path = g_path3 + "\\";
  1298. path += id;
  1299. path += "\\";
  1300. ////////////////////////////////////////
  1301. CString str, spname;
  1302. CStringArray noarray;
  1303. CStringArray spnamearray;
  1304. for (int i = 0; i < sparray.GetSize(); i++)
  1305. {
  1306. str = sparray.ElementAt(i).ElementAt(8);
  1307. spname = sparray.ElementAt(i).ElementAt(5);
  1308. GetNo(str, noarray);
  1309. }
  1310. if (noarray.GetSize() == 0)
  1311. {
  1312. AfxMessageBox("此单未选设计版!", MB_ICONINFORMATION);
  1313. return;
  1314. }
  1315. spnamearray.SetSize(noarray.GetSize());
  1316. for (i = 0; i < noarray.GetSize(); i++)
  1317. {
  1318. str = noarray.ElementAt(i);
  1319. spnamearray.SetAt(i, GetSelName2(str, sparray));
  1320. }
  1321. CString dir;
  1322. GetSavePath(dir);
  1323. if (dir.IsEmpty())return;
  1324. dir.TrimRight('\\');
  1325. dir += "\\";
  1326. dir += id;
  1327. dir += g_branchname;
  1328. if (g_bAllBranch)
  1329. {
  1330. if (GetBranchPhotoPath(branch) != "")
  1331. dir += branch;
  1332. }
  1333. dir += name1;
  1334. dir += name2;
  1335. dir += "选设计";
  1336. dir += "\\";
  1337. CStringArray array;
  1338. CStringArray spnamearray2;
  1339. CString src, des;
  1340. for (i = 0; i < noarray.GetSize(); i++)
  1341. {
  1342. src.Format("%s%s.jpg", path, noarray.ElementAt(i));
  1343. if (PathFileExists(src))
  1344. {
  1345. array.Add(src);
  1346. src = spnamearray.ElementAt(i);
  1347. spnamearray2.Add(spnamearray.ElementAt(i));
  1348. }
  1349. else
  1350. AfxMessageBox("未找到设计版:" + src.Right(src.GetLength() - src.ReverseFind('\\') - 1), MB_ICONINFORMATION);
  1351. }
  1352. ::CreateDirectory(dir, NULL);
  1353. //----------------------------------------------------------------------------------------------
  1354. //----------------------------------------------------------------------------------------------
  1355. // 导出选设计的片;
  1356. //----------------------------------------------------------------------------------------------
  1357. //----------------------------------------------------------------------------------------------
  1358. ImportPhoto dlg;
  1359. dlg.m_mode = 1; // 1.未知;
  1360. dlg.m_bOrigin = 1; // 2.未知;
  1361. dlg.m_pArray = &array; // 3.作为导出源的选好的设计片路径集合;
  1362. dlg.m_pArray2 = &spnamearray2; // 4.作为导出目标的选好的设计片路径集合;
  1363. dlg.m_savepath = dir; // 5.保存选好的设计片的目录;
  1364. dlg.DoModal();
  1365. //////////////
  1366. if (g_List1array.GetSize())
  1367. {
  1368. CStdioFile fp;
  1369. fp.Open(dir + "客户要求.txt", CFile::modeCreate | CFile::modeWrite);
  1370. fp.WriteString("选设计要求:\n");
  1371. fp.WriteString(g_List1array.ElementAt(0).ElementAt(57));
  1372. fp.WriteString("\n");
  1373. fp.WriteString("\n");
  1374. fp.WriteString("设计版替换照片:\n");
  1375. CString replace = g_List1array.ElementAt(0).ElementAt(59);
  1376. if (!replace.IsEmpty())
  1377. {
  1378. replace.Delete(0, 1);
  1379. replace.Replace("$", "\n");
  1380. }
  1381. fp.WriteString(replace);
  1382. fp.WriteString("\n");
  1383. fp.WriteString("\n");
  1384. fp.WriteString("订单要求:\n");
  1385. fp.WriteString(g_List1array.ElementAt(0).ElementAt(38));
  1386. fp.WriteString("\n");
  1387. fp.WriteString("\n");
  1388. fp.WriteString("客人产品:\n");
  1389. CString str;
  1390. str = "产品名称";
  1391. FillLength(str, 20);
  1392. str += "数量";
  1393. FillLength(str, 30);
  1394. str += "加急";
  1395. FillLength(str, 40);
  1396. str += "取件日期";
  1397. FillLength(str, 50);
  1398. fp.WriteString(str);
  1399. fp.WriteString("\n");
  1400. for (int i = 0; i < sparray2.GetSize(); i++)
  1401. {
  1402. str.Empty();
  1403. str = sparray2.ElementAt(i).ElementAt(0);
  1404. FillLength(str, 20);
  1405. str += sparray2.ElementAt(i).ElementAt(1);
  1406. FillLength(str, 30);
  1407. str += sparray2.ElementAt(i).ElementAt(18);
  1408. FillLength(str, 40);
  1409. str += sparray2.ElementAt(i).ElementAt(19);
  1410. FillLength(str, 50);
  1411. fp.WriteString(str);
  1412. fp.WriteString("\n");
  1413. }
  1414. fp.Close();
  1415. }
  1416. //////////////
  1417. AfxMessageBox("导片成功!", MB_ICONINFORMATION);
  1418. // CString str;
  1419. str = " 导出选设计片 ";
  1420. str += "客人:";
  1421. str += name1 + name2 + id;
  1422. WriteLog(str);
  1423. }
  1424. void DesignFrom::HidePrice()
  1425. {
  1426. #ifdef LKAY_VERSION
  1427. if (IsHasRights2new(31))return;
  1428. for (int i = 0; i < m_List1array.GetSize(); i++)
  1429. {
  1430. m_List1array.ElementAt(i).SetAt(14 + m_nAdd, "***");
  1431. m_List1array.ElementAt(i).SetAt(15 + m_nAdd, "***");
  1432. m_List1array.ElementAt(i).SetAt(16 + m_nAdd, "***");
  1433. m_List1array.ElementAt(i).SetAt(17 + m_nAdd, "***");
  1434. }
  1435. #else
  1436. if (IsHasRights2new(31))return;
  1437. for (int i = 0; i < m_List1array.GetSize(); i++)
  1438. {
  1439. m_List1array.ElementAt(i).SetAt(16 + m_nAdd, "***");
  1440. m_List1array.ElementAt(i).SetAt(17 + m_nAdd, "***");
  1441. }
  1442. #endif
  1443. }
  1444. void DesignFrom::OnBtnsearchfilter() // 条件查询 按钮;
  1445. {
  1446. SearchFilter dlg;
  1447. dlg.m_mode = 4;
  1448. if (dlg.DoModal() == IDOK)FillGrid();
  1449. g_bSearchFilter = 0;
  1450. }
  1451. void DesignFrom::GetData()
  1452. {
  1453. if (g_bAllBranch == 0)
  1454. {
  1455. if (g_bShowOK == 0)
  1456. {
  1457. #ifdef LKAY_VERSION
  1458. CString filter = "status3='未取' and (dindantype<>'意向客户' or dindantype is null)";
  1459. #else
  1460. CString filter = "status3='未取'";
  1461. #endif
  1462. g_sendhead.bsql = 0;
  1463. g_sendhead.code[0] = 31;
  1464. g_sendhead.tabcount = 1;
  1465. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1466. if (g_bSendOK == 0)return;
  1467. }
  1468. else
  1469. {
  1470. g_sendhead.bsql = 0;
  1471. g_sendhead.code[0] = 31;
  1472. g_sendhead.tabcount = 1;
  1473. #ifdef LKAY_VERSION
  1474. CString filter = "dindantype<>'意向客户' or dindantype is null";
  1475. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1476. #else
  1477. g_pMainWnd->ProcessChatMessageRequest2(1);
  1478. #endif
  1479. if (g_bSendOK == 0)return;
  1480. }
  1481. DataToArray(&m_List1array);
  1482. }
  1483. else
  1484. {
  1485. //////////////数据汇总
  1486. m_List1array.RemoveAll();
  1487. CString branch;
  1488. for (int i = -1; i < g_brancharray.GetSize() - 1; i++)
  1489. {
  1490. if (i != -1)
  1491. {
  1492. branch = g_brancharray.ElementAt(i).ElementAt(0);
  1493. g_branchip = g_brancharray.ElementAt(i).ElementAt(1);
  1494. g_pMainWnd->OnDisconnect();
  1495. g_branchname = branch;
  1496. g_bBranchModify = 1;
  1497. }
  1498. else
  1499. branch = g_brancharray.ElementAt(g_brancharray.GetSize() - 1).ElementAt(0);
  1500. if (g_bShowOK == 0)
  1501. {
  1502. CString filter = "status3='未取'";
  1503. g_sendhead.bsql = 0;
  1504. g_sendhead.code[0] = 31;
  1505. g_sendhead.tabcount = 1;
  1506. g_pMainWnd->ProcessChatMessageRequest2(filter);
  1507. if (g_bSendOK == 0)continue;
  1508. }
  1509. else
  1510. {
  1511. g_sendhead.bsql = 0;
  1512. g_sendhead.code[0] = 31;
  1513. g_sendhead.tabcount = 1;
  1514. g_pMainWnd->ProcessChatMessageRequest2(1);
  1515. if (g_bSendOK == 0)continue;
  1516. }
  1517. CArray<CStringArray, CStringArray>List1array;
  1518. DataToArray(&List1array);
  1519. int size = m_List1array.GetSize();
  1520. for (int j = 0; j < List1array.GetSize(); j++)
  1521. {
  1522. size++;
  1523. m_List1array.SetSize(size, 1);
  1524. size--;
  1525. m_List1array.ElementAt(size).Copy(List1array.ElementAt(j));
  1526. m_List1array.ElementAt(size).InsertAt(0, branch);
  1527. size++;
  1528. }
  1529. }
  1530. g_pMainWnd->OnDisconnect();
  1531. g_bBranchModify = 0;
  1532. g_branchip = g_branchname = "";
  1533. }
  1534. m_List1arraybak.SetSize(m_List1array.GetSize(), 1);
  1535. for (int ii = 0; ii < m_List1array.GetSize(); ii++)
  1536. {
  1537. m_List1arraybak.ElementAt(ii).Copy(m_List1array.ElementAt(ii));
  1538. // 设计要求;原列10
  1539. if (m_List1array.ElementAt(ii).ElementAt(11).GetLength() > 256)
  1540. {
  1541. m_List1array.ElementAt(ii).SetAt(11, m_List1array.ElementAt(ii).ElementAt(11).Left(256) + "...");
  1542. }
  1543. }
  1544. HidePrice();
  1545. FillGrid();
  1546. }
  1547. void DesignFrom::OnBUTprint3() // 更新数据 按钮;
  1548. {
  1549. GetData();
  1550. }