DailyForm.cpp 66 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948
  1. // DailyForm.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "DailyForm.h"
  6. #include "MyMdi.H"
  7. #include "SelExpendType.h"
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13. /////////////////////////////////////////////////////////////////////////////
  14. // DailyForm IDC_EDITmoney2
  15. IMPLEMENT_DYNCREATE(DailyForm, MyFormView)
  16. DailyForm::DailyForm()
  17. : MyFormView(DailyForm::IDD)
  18. {
  19. //{{AFX_DATA_INIT(DailyForm)
  20. m_year = atoi(g_date.Mid(0, 4));
  21. m_month = atoi(g_date.Mid(5, 2));
  22. m_day = atoi(g_date.Mid(8, 2));
  23. m_radio1 = 0;
  24. m_bInit = 0;
  25. m_timestmap = 0;
  26. m_radio2 = 0;
  27. m_bForKF = 0;
  28. //}}AFX_DATA_INIT
  29. }
  30. DailyForm::~DailyForm()
  31. {
  32. }
  33. void DailyForm::DoDataExchange(CDataExchange* pDX)
  34. {
  35. MyFormView::DoDataExchange(pDX);
  36. //{{AFX_DATA_MAP(DailyForm)
  37. DDX_Control(pDX, IDC_SPIN3, m_spinday);
  38. DDX_Control(pDX, IDC_SPIN2, m_spinmonth);
  39. DDX_Control(pDX, IDC_SPIN1, m_spinyear);
  40. DDX_Control(pDX, IDC_LIST2, m_List1);
  41. DDX_Control(pDX, IDC_STATIC1, m_static1);
  42. DDX_Text(pDX, IDC_EDITyear, m_year);
  43. DDV_MinMaxUInt(pDX, m_year, 1900, 3000);
  44. DDX_Text(pDX, IDC_EDITmonth, m_month);
  45. DDV_MinMaxUInt(pDX, m_month, 1, 12);
  46. DDX_Text(pDX, IDC_EDITday, m_day);
  47. DDV_MinMaxUInt(pDX, m_day, 1, 31);
  48. DDX_Radio(pDX, IDC_RADIO3, m_radio1);
  49. DDX_Radio(pDX, IDC_RADIO14, m_radio2);
  50. //}}AFX_DATA_MAP
  51. }
  52. BEGIN_MESSAGE_MAP(DailyForm, MyFormView)
  53. //{{AFX_MSG_MAP(DailyForm)
  54. ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
  55. ON_EN_CHANGE(IDC_EDITyear, OnChangeEDITyear)
  56. ON_EN_CHANGE(IDC_EDITmonth, OnChangeEDITmonth)
  57. ON_EN_CHANGE(IDC_EDITday, OnChangeEDITday)
  58. ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
  59. ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
  60. ON_BN_CLICKED(IDC_RADIO5, OnRadio5)
  61. ON_BN_CLICKED(IDC_RADIO6, OnRadio6)
  62. ON_BN_CLICKED(IDC_RADIO7, OnRadio7)
  63. ON_BN_CLICKED(IDC_RADIO8, OnRadio8)
  64. ON_BN_CLICKED(IDC_RADIO9, OnRadio9)
  65. ON_BN_CLICKED(IDC_RADIO10, OnRadio10)
  66. ON_BN_CLICKED(IDC_RADIO11, OnRadio11)
  67. ON_BN_CLICKED(IDC_RADIO12, OnRadio12)
  68. ON_BN_CLICKED(IDC_RADIO13, OnRadio13)
  69. ON_BN_CLICKED(IDC_BUTprint, OnBUTprint)
  70. ON_BN_CLICKED(IDC_BUTprint2, OnBUTprint2)
  71. ON_BN_CLICKED(IDC_BUTprint5, OnBUTprint5)
  72. ON_BN_CLICKED(IDC_BUTprint4, OnBUTprint4)
  73. ON_BN_CLICKED(IDC_RADIO14, OnRadio14)
  74. ON_BN_CLICKED(IDC_RADIO15, OnRadio15)
  75. ON_BN_CLICKED(IDC_RADIO16, OnRadio16)
  76. //}}AFX_MSG_MAP
  77. ON_NOTIFY(NM_CUSTOMDRAW, IDC_LIST2, OnCustomdrawList)
  78. ON_WM_SIZE()
  79. END_MESSAGE_MAP()
  80. /////////////////////////////////////////////////////////////////////////////
  81. // DailyForm diagnostics
  82. #ifdef _DEBUG
  83. void DailyForm::AssertValid() const
  84. {
  85. MyFormView::AssertValid();
  86. }
  87. void DailyForm::Dump(CDumpContext& dc) const
  88. {
  89. MyFormView::Dump(dc);
  90. }
  91. #endif //_DEBUG
  92. /////////////////////////////////////////////////////////////////////////////
  93. // DailyForm message handlers
  94. void DailyForm::OnInitialUpdate()
  95. {
  96. MyFormView::OnInitialUpdate();
  97. // TODO: Add your specialized code here and/or call the base class
  98. #ifdef DDF_VERSION
  99. GetDlgItem(IDC_STATIC10)->ShowWindow(SW_SHOW);
  100. GetDlgItem(IDC_RADIO14)->ShowWindow(SW_SHOW);
  101. GetDlgItem(IDC_RADIO15)->ShowWindow(SW_SHOW);
  102. #endif
  103. CMyMdi Mdi;
  104. Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
  105. GetDlgItem(IDC_BUTprint2)->EnableWindow(IsHasRights2new(51));
  106. // Here we create the outbar control using the splitter as its parent
  107. // and setting its id to the first pane.
  108. CRect rc2;
  109. GetWindowRect(rc2);
  110. ::MoveWindow(m_hWnd, g_rc.left, g_rc.top, g_rc.Width(), g_rc.Height(), TRUE);// Jeff,在OnSize里处理控件位置;
  111. //::MoveWindow(m_hWnd,g_rc.left-1800,g_rc.top+1800,g_rc.Width(),g_rc.Height(),TRUE);// Jeff,在OnSize里处理控件位置;
  112. EnumChildWindows(m_hWnd, (WNDENUMPROC)EnumChildProc, 0); // Jeff,在OnSize里处理控件位置;
  113. // what's g_cominfoarray mean?
  114. if (atoi(g_cominfoarray.ElementAt(0).ElementAt(115)))
  115. GetDlgItem(IDC_BUTprint4)->ShowWindow(SW_SHOW);
  116. m_static1.SetFont(&g_titlefont);
  117. if (atoi(g_cominfoarray.ElementAt(0).ElementAt(115)))
  118. m_List1.SetHeadings("id,0;项目名称,300;金额,100;项目类别,100;收入/支出,100;日期,100;支付方式,100;收银,100;财务审核,100;接单点,100");
  119. else
  120. m_List1.SetHeadings("id,0;项目名称,300;金额,100;项目类别,100;收入/支出,100;日期,100;支付方式,100;收银,100;财务审核,100");
  121. m_List1.LoadColumnInfo(107);
  122. m_spinyear.SetRange(1900, 3000);
  123. m_spinmonth.SetRange(1, 12);
  124. m_spinday.SetRange(1, 31);
  125. m_bInit = 1;
  126. DateChange();
  127. if (IsHasRights2new(23) == 0)
  128. {
  129. GetDlgItem(IDC_EDITyear)->ShowWindow(0);
  130. GetDlgItem(IDC_EDITmonth)->ShowWindow(0);
  131. GetDlgItem(IDC_EDITday)->ShowWindow(0);
  132. GetDlgItem(IDC_STATIC21)->ShowWindow(0);
  133. GetDlgItem(IDC_STATIC22)->ShowWindow(0);
  134. GetDlgItem(IDC_STATIC23)->ShowWindow(0);
  135. m_spinyear.ShowWindow(0);
  136. m_spinmonth.ShowWindow(0);
  137. m_spinday.ShowWindow(0);
  138. m_static1.GetWindowRect(rc2);
  139. CRect rc;
  140. GetDlgItem(IDC_EDITmonth)->GetWindowRect(rc);
  141. ScreenToClient(rc);
  142. ScreenToClient(rc2);
  143. rc2.right = rc.left;
  144. m_static1.MoveWindow(rc2);
  145. }
  146. }
  147. void DailyForm::FillGrid()
  148. {
  149. m_List1.DeleteAllItems2();
  150. int ii = 0;
  151. m_List1.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  152. int count = 0;
  153. if (m_jdd.IsEmpty())
  154. {
  155. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  156. {
  157. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  158. }
  159. }
  160. else
  161. {
  162. float income = 0;
  163. int dindanshu = 0;
  164. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  165. {
  166. if (m_List1array.ElementAt(ii).ElementAt(9) == m_jdd)
  167. {
  168. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  169. income += atof(m_List1array.ElementAt(ii).ElementAt(2));
  170. if (m_List1array.ElementAt(ii).ElementAt(3) == "预约收款")
  171. dindanshu++;
  172. }
  173. }
  174. CString str;
  175. str.Format("%0.2f", income);
  176. ::ConvertToPrice(str);
  177. SetDlgItemText(IDC_EDITmoney1, str);
  178. str.Format("%0.2f", income);
  179. ::ConvertToPrice(str);
  180. SetDlgItemText(IDC_EDITmoney5, str);
  181. str.Format("%0.2f", 0);
  182. ::ConvertToPrice(str);
  183. SetDlgItemText(IDC_EDITmoney2, str);
  184. str.Format("%0.2f", income);
  185. ::ConvertToPrice(str);
  186. SetDlgItemText(IDC_EDITmoney3, str);
  187. str.Format("%d", dindanshu);
  188. SetDlgItemText(IDC_EDITmoney4, str);
  189. }
  190. m_List1.m_arLabels.SetSize(count, 1);
  191. ii = count;
  192. m_List1.m_LabelCount = ii;
  193. m_List1.SetItemCountEx(ii);
  194. CString str;
  195. str.Format("单数:%d", ii);
  196. SetDlgItemText(IDC_STATIC2, str);
  197. CRect rc;
  198. GetDlgItem(IDC_STATIC2)->GetWindowRect(rc);
  199. ScreenToClient(rc);
  200. InvalidateRect(rc);
  201. }
  202. void DailyForm::OnBUTclose()
  203. {
  204. // TODO: Add your control notification handler code here
  205. GetParent()->SendMessage(WM_CLOSE);
  206. }
  207. void DailyForm::OnChangeEDITyear()
  208. {
  209. // TODO: If this is a RICHEDIT control, the control will not
  210. // send this notification unless you override the MyFormView::OnInitDialog()
  211. // function and call CRichEditCtrl().SetEventMask()
  212. // with the ENM_CHANGE flag ORed into the mask.
  213. DateChange();
  214. // TODO: Add your control notification handler code here
  215. }
  216. void DailyForm::OnChangeEDITmonth()
  217. {
  218. DateChange();
  219. }
  220. void DailyForm::OnChangeEDITday()
  221. {
  222. // TODO: If this is a RICHEDIT control, the control will not
  223. // send this notification unless you override the MyFormView::OnInitDialog()
  224. // function and call CRichEditCtrl().SetEventMask()
  225. // with the ENM_CHANGE flag ORed into the mask.
  226. DateChange();
  227. // TODO: Add your control notification handler code here
  228. }
  229. void DailyForm::DateChange()
  230. {
  231. if (m_bInit == 0)return;
  232. m_spinyear.EnableWindow(0);
  233. m_spinmonth.EnableWindow(0);
  234. m_spinday.EnableWindow(0);
  235. UpdateData();
  236. int i;
  237. int g_nYearposTemp = g_nYearpos;
  238. BOOL bLastYear = 0;
  239. BOOL bThisYear = 0;
  240. #if JEFF_TEST_ON // 2015开始禁用跨年数据;
  241. int g_nYearposPre = -1;
  242. if (m_year >= 2014 && m_year <= atoi(g_date.Left(4)) && g_hisyeararray.GetSize())
  243. {
  244. g_nYearpos = -1;
  245. bThisYear = 1;
  246. if (m_year == 2014)
  247. {
  248. g_nYearposPre = GetYearPos(m_year - 1);
  249. }
  250. }
  251. else if (m_year <= 2013 && g_hisyeararray.GetSize())
  252. {
  253. g_nYearpos = GetYearPos(m_year);
  254. if (g_nYearpos != -1)
  255. g_nYearposPre = GetYearPos(m_year - 1);
  256. bLastYear = 1;
  257. }
  258. #else
  259. if (m_year == atoi(g_date.Left(4)) && g_hisyeararray.GetSize())
  260. bThisYear = 1;
  261. else if (m_year <= atoi(g_date.Left(4)) - 1 && g_hisyeararray.GetSize())
  262. bLastYear = 1;
  263. g_nYearpos = GetYearPos(m_year);
  264. // CString ss;
  265. // ss.Format ("%d", g_nYearpos);MessageBox(ss);
  266. int g_nYearposPre = GetYearPos(m_year - 1);
  267. // ss.Format ("%d", g_nYearposPre);MessageBox(ss);
  268. #endif
  269. g_sendhead.bsql = 0;
  270. g_sendhead.code[0] = 14; // 其他收入
  271. g_sendhead.code[1] = 13; // 支出
  272. g_sendhead.code[2] = 16; // 订单收入
  273. g_sendhead.code[3] = 198; // 二销收入
  274. g_sendhead.code[4] = 216; // 充值
  275. g_sendhead.tabcount = 5;
  276. CString sql, strdate, strdate2;
  277. strdate.Format("%04d-%02d-%02d", m_year, m_month, m_day);
  278. CRect rc;
  279. m_static1.GetWindowRect(rc);
  280. ScreenToClient(rc);
  281. InvalidateRect(rc);
  282. COleDateTime dtDay(m_year, m_month, m_day, 0, 0, 0);
  283. int nDayWeek = dtDay.GetDayOfWeek() - 1; //得到星期几,1=Sunday, 2=Monday,
  284. CString DayOfWeek[7] = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
  285. CString sdate;
  286. if (nDayWeek >= 0 && nDayWeek <= 6)
  287. sdate = DayOfWeek[nDayWeek];
  288. else
  289. sdate = "无效日期";
  290. m_static1.SetWindowText(strdate + "(" + sdate + ")财务报表");
  291. sql.Format("dat='" + strdate + "' and (sale2type is null or sale2type='');dat='" + strdate + "';date='" + strdate + "';date='" + strdate + "';date='" + strdate + "'");
  292. g_pMainWnd->ProcessChatMessageRequest2(sql);
  293. if (g_bSendOK == 0)
  294. {
  295. g_nYearpos = g_nYearposTemp;
  296. m_spinyear.EnableWindow(1);
  297. m_spinmonth.EnableWindow(1);
  298. m_spinday.EnableWindow(1);
  299. return;
  300. }
  301. DataToArray(&List2array, &List3array, &List11array, &other2salearray, &memberarray);
  302. if (bLastYear)//如果是去年, 则加今年的补款
  303. {
  304. g_nYearpos = -1;//今年
  305. g_sendhead.bsql = 0;
  306. g_sendhead.code[0] = 14;
  307. g_sendhead.code[1] = 13;
  308. g_sendhead.code[2] = 16;
  309. g_sendhead.code[3] = 198;
  310. g_sendhead.code[4] = 216;
  311. g_sendhead.tabcount = 5;
  312. g_pMainWnd->ProcessChatMessageRequest2(sql);
  313. if (g_bSendOK == 0)
  314. {
  315. g_nYearpos = g_nYearposTemp;
  316. m_spinyear.EnableWindow(1);
  317. m_spinmonth.EnableWindow(1);
  318. m_spinday.EnableWindow(1);
  319. return;
  320. }
  321. CArray<CStringArray, CStringArray>ThisYearList11array;
  322. CArray<CStringArray, CStringArray>ThisYearList3array;
  323. CArray<CStringArray, CStringArray>ThisYearList2array;
  324. CArray<CStringArray, CStringArray>ThisYearother2salearray;
  325. CArray<CStringArray, CStringArray>ThisYearmemberarray;
  326. DataToArray(&ThisYearList2array, &ThisYearList3array, &ThisYearList11array, &ThisYearother2salearray, &ThisYearmemberarray);
  327. int oldsize = List11array.GetSize();
  328. List11array.SetSize(oldsize + ThisYearList11array.GetSize());
  329. for (i = oldsize; i < oldsize + ThisYearList11array.GetSize(); i++)
  330. {
  331. List11array.ElementAt(i).Copy(ThisYearList11array.ElementAt(i - oldsize));
  332. }
  333. oldsize = List3array.GetSize();
  334. List3array.SetSize(oldsize + ThisYearList3array.GetSize());
  335. for (i = oldsize; i < oldsize + ThisYearList3array.GetSize(); i++)
  336. {
  337. List3array.ElementAt(i).Copy(ThisYearList3array.ElementAt(i - oldsize));
  338. }
  339. oldsize = List2array.GetSize();
  340. List2array.SetSize(oldsize + ThisYearList2array.GetSize());
  341. for (i = oldsize; i < oldsize + ThisYearList2array.GetSize(); i++)
  342. {
  343. List2array.ElementAt(i).Copy(ThisYearList2array.ElementAt(i - oldsize));
  344. }
  345. oldsize = other2salearray.GetSize();
  346. other2salearray.SetSize(oldsize + ThisYearother2salearray.GetSize());
  347. for (i = oldsize; i < oldsize + ThisYearother2salearray.GetSize(); i++)
  348. {
  349. other2salearray.ElementAt(i).Copy(ThisYearother2salearray.ElementAt(i - oldsize));
  350. }
  351. oldsize = memberarray.GetSize();
  352. memberarray.SetSize(oldsize + ThisYearmemberarray.GetSize());
  353. for (i = oldsize; i < oldsize + ThisYearmemberarray.GetSize(); i++)
  354. {
  355. memberarray.ElementAt(i).Copy(ThisYearmemberarray.ElementAt(i - oldsize));
  356. }
  357. }
  358. if (g_nYearposPre != -1)//如果是今年, 则加去年的补款
  359. {
  360. g_nYearpos = g_nYearposPre;//去年
  361. g_sendhead.bsql = 0;
  362. g_sendhead.code[0] = 14;
  363. g_sendhead.code[1] = 13;
  364. g_sendhead.code[2] = 16;
  365. g_sendhead.code[3] = 198;
  366. g_sendhead.tabcount = 4;
  367. g_pMainWnd->ProcessChatMessageRequest2(sql);
  368. if (g_bSendOK == 0)
  369. {
  370. g_nYearpos = g_nYearposTemp;
  371. m_spinyear.EnableWindow(1);
  372. m_spinmonth.EnableWindow(1);
  373. m_spinday.EnableWindow(1);
  374. return;
  375. }
  376. CArray<CStringArray, CStringArray>ThisYearList11array;
  377. CArray<CStringArray, CStringArray>ThisYearList3array;
  378. CArray<CStringArray, CStringArray>ThisYearList2array;
  379. CArray<CStringArray, CStringArray>ThisYearother2salearray;
  380. DataToArray(&ThisYearList2array, &ThisYearList3array, &ThisYearList11array, &ThisYearother2salearray);
  381. int oldsize = List11array.GetSize();
  382. List11array.SetSize(oldsize + ThisYearList11array.GetSize());
  383. for (i = oldsize; i < oldsize + ThisYearList11array.GetSize(); i++)
  384. {
  385. List11array.ElementAt(i).Copy(ThisYearList11array.ElementAt(i - oldsize));
  386. }
  387. oldsize = List3array.GetSize();
  388. List3array.SetSize(oldsize + ThisYearList3array.GetSize());
  389. for (i = oldsize; i < oldsize + ThisYearList3array.GetSize(); i++)
  390. {
  391. List3array.ElementAt(i).Copy(ThisYearList3array.ElementAt(i - oldsize));
  392. }
  393. oldsize = List2array.GetSize();
  394. List2array.SetSize(oldsize + ThisYearList2array.GetSize());
  395. for (i = oldsize; i < oldsize + ThisYearList2array.GetSize(); i++)
  396. {
  397. List2array.ElementAt(i).Copy(ThisYearList2array.ElementAt(i - oldsize));
  398. }
  399. oldsize = other2salearray.GetSize();
  400. other2salearray.SetSize(oldsize + ThisYearother2salearray.GetSize());
  401. for (i = oldsize; i < oldsize + ThisYearother2salearray.GetSize(); i++)
  402. {
  403. other2salearray.ElementAt(i).Copy(ThisYearother2salearray.ElementAt(i - oldsize));
  404. }
  405. }
  406. g_nYearpos = g_nYearposTemp;
  407. KindChange();
  408. m_spinyear.EnableWindow(1);
  409. m_spinmonth.EnableWindow(1);
  410. m_spinday.EnableWindow(1);
  411. }
  412. void DailyForm::KindChange()
  413. {
  414. // printf("Jeff:m_bForKF=%d",m_bForKF);
  415. if (m_bForKF)
  416. {
  417. KindChange2();
  418. return;
  419. }
  420. m_jdd = "";
  421. CString str;
  422. int pos = 0;
  423. int dindanshu = 0; // 日订单数
  424. float income = 0; // 日总收入
  425. float income2 = 0; // 日营业收入
  426. float payout = 0; // 日支出
  427. int count = List2array.GetSize() + List3array.GetSize() + List11array.GetSize() + other2salearray.GetSize() + memberarray.GetSize();
  428. m_List1array.RemoveAll();
  429. m_List1array.SetSize(count);
  430. int i = 0;
  431. for (i = 0; i < memberarray.GetSize(); i++)
  432. {
  433. if (memberarray.ElementAt(i).ElementAt(6).IsEmpty())
  434. memberarray.ElementAt(i).SetAt(6, "未审核");
  435. memberarray.ElementAt(i).SetAt(0, memberarray.ElementAt(i).ElementAt(0) + ":4");
  436. }
  437. for (i = 0; i < List2array.GetSize(); i++)
  438. {
  439. if (List2array.ElementAt(i).ElementAt(10).IsEmpty())
  440. List2array.ElementAt(i).SetAt(10, "未审核");
  441. List2array.ElementAt(i).SetAt(0, List2array.ElementAt(i).ElementAt(0) + ":0");
  442. }
  443. for (i = 0; i < List3array.GetSize(); i++)
  444. {
  445. if (List3array.ElementAt(i).ElementAt(7).IsEmpty())
  446. List3array.ElementAt(i).SetAt(7, "未审核");
  447. List3array.ElementAt(i).SetAt(0, List3array.ElementAt(i).ElementAt(0) + ":1");
  448. }
  449. for (i = 0; i < List11array.GetSize(); i++)
  450. {
  451. if (List11array.ElementAt(i).ElementAt(11).IsEmpty())
  452. List11array.ElementAt(i).SetAt(11, "未审核");
  453. List11array.ElementAt(i).SetAt(10, List11array.ElementAt(i).ElementAt(10) + ":2");
  454. }
  455. for (i = 0; i < other2salearray.GetSize(); i++)
  456. {
  457. if (other2salearray.ElementAt(i).ElementAt(9).IsEmpty())
  458. other2salearray.ElementAt(i).SetAt(9, "未审核");
  459. other2salearray.ElementAt(i).SetAt(8, other2salearray.ElementAt(i).ElementAt(8) + ":3");
  460. }
  461. if (m_radio1 == 0)
  462. {
  463. for (i = 0; i < List11array.GetSize(); i++) // List11array 订单收入;
  464. {
  465. #ifdef DDF_VERSION
  466. if(List11array.ElementAt (i).ElementAt (5)=="客服二销")continue;
  467. #endif
  468. str = List11array.ElementAt(i).ElementAt(0);
  469. str += ";" + List11array.ElementAt(i).ElementAt(3);
  470. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  471. {
  472. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  473. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  474. str += "," + List11array.ElementAt(i).ElementAt(2);
  475. }
  476. else
  477. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  478. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  479. m_List1array.ElementAt(pos).Add(str);
  480. str = List11array.ElementAt(i).ElementAt(4);
  481. m_List1array.ElementAt(pos).Add(str);
  482. #if 0
  483. income+=atof(str);
  484. income2+=atof(str);
  485. #else
  486. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款") // 储值卡扣款;
  487. {
  488. income += atof(str);
  489. }
  490. income2 += atof(str);
  491. #endif
  492. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  493. m_List1array.ElementAt(pos).Add("收入");
  494. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  495. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  496. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  497. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  498. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  499. if (List11array.ElementAt(i).ElementAt(5) == "预约收款")
  500. dindanshu++;
  501. pos++;
  502. }
  503. for (i = 0; i < List2array.GetSize(); i++) // List2array 其他收入
  504. {
  505. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  506. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  507. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  508. str.Replace(";;;", ";"); str.Replace(";;", ";");
  509. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  510. m_List1array.ElementAt(pos).Add(str);
  511. str = List2array.ElementAt(i).ElementAt(2);
  512. m_List1array.ElementAt(pos).Add(str);
  513. #if 0
  514. income+=atof(str);
  515. #else
  516. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  517. {
  518. income += atof(str);
  519. }
  520. #endif
  521. if (List2array.ElementAt(i).ElementAt(8) != "")
  522. {
  523. income2 += atof(str);
  524. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(8));
  525. }
  526. else
  527. m_List1array.ElementAt(pos).Add("其它收入");
  528. m_List1array.ElementAt(pos).Add("收入");
  529. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  530. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  531. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  532. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  533. m_List1array.ElementAt(pos).Add(" ");
  534. pos++;
  535. }
  536. for (i = 0; i < other2salearray.GetSize(); i++) // other2salearray 二销收入
  537. {
  538. str = other2salearray.ElementAt(i).ElementAt(0) + ";" + other2salearray.ElementAt(i).ElementAt(1) + ";" + other2salearray.ElementAt(i).ElementAt(2);
  539. str.Replace(";;;", ";"); str.Replace(";;", ";");
  540. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(8));
  541. m_List1array.ElementAt(pos).Add(str);
  542. str = other2salearray.ElementAt(i).ElementAt(4);
  543. m_List1array.ElementAt(pos).Add(str);
  544. #if 0
  545. income+=atof(str);
  546. income2+=atof(str);
  547. #else
  548. if (other2salearray.ElementAt(i).ElementAt(7) != "储值卡扣款")
  549. {
  550. income += atof(str);
  551. }
  552. income2 += atof(str);
  553. #endif
  554. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(3));
  555. m_List1array.ElementAt(pos).Add("收入");
  556. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(5) + " " + other2salearray.ElementAt(i).ElementAt(10));
  557. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(7));
  558. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(6));
  559. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(9));
  560. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(11));
  561. pos++;
  562. }
  563. for (i = 0; i < List3array.GetSize(); i++) // List3array 支出
  564. {
  565. if (List3array.ElementAt(i).ElementAt(6).GetLength()>120)
  566. List3array.ElementAt(i).SetAt(6, List3array.ElementAt(i).ElementAt(6).Left(120) + "..");
  567. str = List3array.ElementAt(i).ElementAt(1) + ";" + List3array.ElementAt(i).ElementAt(4) + ";" + List3array.ElementAt(i).ElementAt(6);
  568. str.Replace(";;;;", ";"); str.Replace(";;;", ";"); str.Replace(";;", ";");
  569. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(0));
  570. m_List1array.ElementAt(pos).Add(str);
  571. str = List3array.ElementAt(i).ElementAt(2);
  572. m_List1array.ElementAt(pos).Add(str);
  573. payout += atof(str);
  574. #if JEFF_TEST_ON
  575. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(1));
  576. #else
  577. m_List1array.ElementAt(pos).Add("固定费用");
  578. #endif
  579. m_List1array.ElementAt(pos).Add("支出");
  580. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(3) + " " + List3array.ElementAt(i).ElementAt(8));
  581. m_List1array.ElementAt(pos).Add("现金");
  582. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(5));
  583. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(7));
  584. m_List1array.ElementAt(pos).Add(" ");
  585. pos++;
  586. }
  587. for (i = 0; i < memberarray.GetSize(); i++) // memberarray 储值卡充值
  588. {
  589. str = memberarray.ElementAt(i).ElementAt(1) + ";" + memberarray.ElementAt(i).ElementAt(5) + ";客户:" + memberarray.ElementAt(i).ElementAt(2);
  590. str.Replace(";;;", ";"); str.Replace(";;", ";");
  591. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(0));
  592. m_List1array.ElementAt(pos).Add(str);
  593. str = memberarray.ElementAt(i).ElementAt(3);
  594. m_List1array.ElementAt(pos).Add(str);
  595. income += atof(str);
  596. m_List1array.ElementAt(pos).Add("会员充值");
  597. m_List1array.ElementAt(pos).Add("收入");
  598. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(4) + " " + memberarray.ElementAt(i).ElementAt(8));
  599. if (memberarray.ElementAt(i).ElementAt(7) == "")
  600. m_List1array.ElementAt(pos).Add("现金");
  601. else
  602. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(7));
  603. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(5));
  604. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(6));
  605. m_List1array.ElementAt(pos).Add(" ");
  606. pos++;
  607. }
  608. }
  609. else if (m_radio1 == 1)//收入
  610. {
  611. for (i = 0; i < List11array.GetSize(); i++)
  612. {
  613. #ifdef DDF_VERSION
  614. if(List11array.ElementAt (i).ElementAt (5)=="客服二销")continue;
  615. #endif
  616. str = List11array.ElementAt(i).ElementAt(0);
  617. str += ";" + List11array.ElementAt(i).ElementAt(3);
  618. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  619. {
  620. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  621. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  622. str += "," + List11array.ElementAt(i).ElementAt(2);
  623. }
  624. else
  625. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  626. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  627. m_List1array.ElementAt(pos).Add(str);
  628. str = List11array.ElementAt(i).ElementAt(4);
  629. m_List1array.ElementAt(pos).Add(str);
  630. #if 0
  631. income+=atof(str);
  632. income2+=atof(str);
  633. #else
  634. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  635. {
  636. income += atof(str);
  637. }
  638. income2 += atof(str);
  639. #endif
  640. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  641. m_List1array.ElementAt(pos).Add("收入");
  642. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  643. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  644. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  645. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  646. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  647. if (List11array.ElementAt(i).ElementAt(5) == "预约收款")
  648. dindanshu++;
  649. pos++;
  650. }
  651. for (i = 0; i < List2array.GetSize(); i++)
  652. {
  653. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  654. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  655. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  656. str.Replace(";;;", ";"); str.Replace(";;", ";");
  657. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  658. m_List1array.ElementAt(pos).Add(str);
  659. str = List2array.ElementAt(i).ElementAt(2);
  660. m_List1array.ElementAt(pos).Add(str);
  661. #if 0
  662. income+=atof(str);
  663. #else
  664. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  665. {
  666. income += atof(str);
  667. }
  668. #endif
  669. if (List2array.ElementAt(i).ElementAt(8) != "")
  670. {
  671. income2 += atof(str);
  672. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(8));
  673. }
  674. else
  675. m_List1array.ElementAt(pos).Add("其它收入");
  676. m_List1array.ElementAt(pos).Add("收入");
  677. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  678. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  679. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  680. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  681. m_List1array.ElementAt(pos).Add(" ");
  682. pos++;
  683. }
  684. for (i = 0; i < other2salearray.GetSize(); i++)
  685. {
  686. str = other2salearray.ElementAt(i).ElementAt(0) + ";" + other2salearray.ElementAt(i).ElementAt(1) + ";" + other2salearray.ElementAt(i).ElementAt(2);
  687. str.Replace(";;;", ";"); str.Replace(";;", ";");
  688. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(8));
  689. m_List1array.ElementAt(pos).Add(str);
  690. str = other2salearray.ElementAt(i).ElementAt(4);
  691. m_List1array.ElementAt(pos).Add(str);
  692. #if 0
  693. income+=atof(str);
  694. income2+=atof(str);
  695. #else
  696. if (other2salearray.ElementAt(i).ElementAt(7) != "储值卡扣款")
  697. {
  698. income += atof(str);
  699. }
  700. income2 += atof(str);
  701. #endif
  702. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(3));
  703. m_List1array.ElementAt(pos).Add("收入");
  704. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(5) + " " + other2salearray.ElementAt(i).ElementAt(10));
  705. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(7));
  706. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(6));
  707. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(9));
  708. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(11));
  709. pos++;
  710. }
  711. for (i = 0; i < memberarray.GetSize(); i++)
  712. {
  713. str = memberarray.ElementAt(i).ElementAt(1) + ";" + memberarray.ElementAt(i).ElementAt(5) + ";客户:" + memberarray.ElementAt(i).ElementAt(2);
  714. str.Replace(";;;", ";"); str.Replace(";;", ";");
  715. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(0));
  716. m_List1array.ElementAt(pos).Add(str);
  717. str = memberarray.ElementAt(i).ElementAt(3);
  718. m_List1array.ElementAt(pos).Add(str);
  719. income += atof(str);
  720. m_List1array.ElementAt(pos).Add("会员充值");
  721. m_List1array.ElementAt(pos).Add("收入");
  722. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(4) + " " + memberarray.ElementAt(i).ElementAt(8));
  723. if (memberarray.ElementAt(i).ElementAt(7) == "")
  724. m_List1array.ElementAt(pos).Add("现金");
  725. else
  726. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(7));
  727. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(5));
  728. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(6));
  729. m_List1array.ElementAt(pos).Add(" ");
  730. pos++;
  731. }
  732. }
  733. else if (m_radio1 == 2)//营业收入
  734. {
  735. for (i = 0; i < List11array.GetSize(); i++)
  736. {
  737. #ifdef DDF_VERSION
  738. if(List11array.ElementAt (i).ElementAt (5)=="客服二销")continue;
  739. #endif
  740. str = List11array.ElementAt(i).ElementAt(0);
  741. str += ";" + List11array.ElementAt(i).ElementAt(3);
  742. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  743. {
  744. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  745. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  746. str += "," + List11array.ElementAt(i).ElementAt(2);
  747. }
  748. else
  749. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  750. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  751. m_List1array.ElementAt(pos).Add(str);
  752. str = List11array.ElementAt(i).ElementAt(4);
  753. m_List1array.ElementAt(pos).Add(str);
  754. #if 0
  755. income+=atof(str);
  756. income2+=atof(str);
  757. #else
  758. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  759. {
  760. income += atof(str);
  761. }
  762. income2 += atof(str);
  763. #endif
  764. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  765. m_List1array.ElementAt(pos).Add("收入");
  766. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  767. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  768. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  769. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  770. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  771. if (List11array.ElementAt(i).ElementAt(5) == "预约收款")
  772. dindanshu++;
  773. pos++;
  774. }
  775. for (i = 0; i < List2array.GetSize(); i++)
  776. {
  777. if (List2array.ElementAt(i).ElementAt(8) != "")
  778. {
  779. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  780. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  781. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  782. str.Replace(";;;", ";"); str.Replace(";;", ";");
  783. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  784. m_List1array.ElementAt(pos).Add(str);
  785. str = List2array.ElementAt(i).ElementAt(2);
  786. m_List1array.ElementAt(pos).Add(str);
  787. #if 0
  788. income+=atof(str);
  789. income2+=atof(str);
  790. #else
  791. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  792. {
  793. income += atof(str);
  794. }
  795. income2 += atof(str);
  796. #endif
  797. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(8));
  798. m_List1array.ElementAt(pos).Add("收入");
  799. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  800. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  801. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  802. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  803. m_List1array.ElementAt(pos).Add(" ");
  804. pos++;
  805. }
  806. }
  807. for (i = 0; i < other2salearray.GetSize(); i++)
  808. {
  809. str = other2salearray.ElementAt(i).ElementAt(0) + ";" + other2salearray.ElementAt(i).ElementAt(1) + ";" + other2salearray.ElementAt(i).ElementAt(2);
  810. str.Replace(";;;", ";"); str.Replace(";;", ";");
  811. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(8));
  812. m_List1array.ElementAt(pos).Add(str);
  813. str = other2salearray.ElementAt(i).ElementAt(4);
  814. m_List1array.ElementAt(pos).Add(str);
  815. #if 0
  816. income+=atof(str);
  817. income2+=atof(str);
  818. #else
  819. if (other2salearray.ElementAt(i).ElementAt(7) != "储值卡扣款")
  820. {
  821. income += atof(str);
  822. }
  823. income2 += atof(str);
  824. #endif
  825. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(3));
  826. m_List1array.ElementAt(pos).Add("收入");
  827. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(5) + " " + other2salearray.ElementAt(i).ElementAt(10));
  828. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(7));
  829. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(6));
  830. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(9));
  831. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(11));
  832. pos++;
  833. }
  834. }
  835. else if (m_radio1 == 3)//支出
  836. {
  837. for (i = 0; i < List3array.GetSize(); i++)
  838. {
  839. if (List3array.ElementAt(i).ElementAt(6).GetLength()>120)
  840. List3array.ElementAt(i).SetAt(6, List3array.ElementAt(i).ElementAt(6).Left(120) + "..");
  841. str = List3array.ElementAt(i).ElementAt(1) + ";" + List3array.ElementAt(i).ElementAt(4) + ";" + List3array.ElementAt(i).ElementAt(6);
  842. str.Replace(";;;;", ";"); str.Replace(";;;", ";"); str.Replace(";;", ";");
  843. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(0));
  844. m_List1array.ElementAt(pos).Add(str);
  845. str = List3array.ElementAt(i).ElementAt(2);
  846. m_List1array.ElementAt(pos).Add(str);
  847. payout += atof(str);
  848. #if JEFF_TEST_ON
  849. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(1));
  850. #else
  851. m_List1array.ElementAt(pos).Add("固定费用");
  852. #endif
  853. m_List1array.ElementAt(pos).Add("支出");
  854. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(3) + " " + List3array.ElementAt(i).ElementAt(8));
  855. m_List1array.ElementAt(pos).Add("现金");
  856. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(5));
  857. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(7));
  858. m_List1array.ElementAt(pos).Add(" ");
  859. pos++;
  860. }
  861. }
  862. else if (m_radio1 == 4)//定单
  863. {
  864. for (i = 0; i < List11array.GetSize(); i++)
  865. {
  866. if (List11array.ElementAt(i).ElementAt(5) != "预约收款")continue;
  867. dindanshu++;
  868. str = List11array.ElementAt(i).ElementAt(0);
  869. str += ";" + List11array.ElementAt(i).ElementAt(3);
  870. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  871. {
  872. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  873. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  874. str += "," + List11array.ElementAt(i).ElementAt(2);
  875. }
  876. else
  877. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  878. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  879. m_List1array.ElementAt(pos).Add(str);
  880. str = List11array.ElementAt(i).ElementAt(4);
  881. m_List1array.ElementAt(pos).Add(str);
  882. #if 0
  883. income+=atof(str);
  884. income2+=atof(str);
  885. #else
  886. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  887. {
  888. income += atof(str);
  889. }
  890. income2 += atof(str);
  891. #endif
  892. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  893. m_List1array.ElementAt(pos).Add("收入");
  894. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  895. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  896. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  897. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  898. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  899. pos++;
  900. }
  901. }
  902. else if (m_radio1 == 5)//补款
  903. {
  904. for (i = 0; i < List11array.GetSize(); i++)
  905. {
  906. if (List11array.ElementAt(i).ElementAt(5) != "预约补款")continue;
  907. str = List11array.ElementAt(i).ElementAt(0);
  908. str += ";" + List11array.ElementAt(i).ElementAt(3);
  909. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  910. {
  911. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  912. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  913. str += "," + List11array.ElementAt(i).ElementAt(2);
  914. }
  915. else
  916. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  917. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  918. m_List1array.ElementAt(pos).Add(str);
  919. str = List11array.ElementAt(i).ElementAt(4);
  920. m_List1array.ElementAt(pos).Add(str);
  921. #if 0
  922. income+=atof(str);
  923. income2+=atof(str);
  924. #else
  925. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  926. {
  927. income += atof(str);
  928. }
  929. income2 += atof(str);
  930. #endif
  931. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  932. m_List1array.ElementAt(pos).Add("收入");
  933. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  934. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  935. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  936. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  937. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  938. pos++;
  939. }
  940. }
  941. else if (m_radio1 == 6)//摄影二销
  942. {
  943. for (i = 0; i < List11array.GetSize(); i++)
  944. {
  945. if (List11array.ElementAt(i).ElementAt(5) != "摄影二销")continue;
  946. str = List11array.ElementAt(i).ElementAt(0);
  947. str += ";" + List11array.ElementAt(i).ElementAt(3);
  948. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  949. {
  950. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  951. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  952. str += "," + List11array.ElementAt(i).ElementAt(2);
  953. }
  954. else
  955. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  956. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  957. m_List1array.ElementAt(pos).Add(str);
  958. str = List11array.ElementAt(i).ElementAt(4);
  959. m_List1array.ElementAt(pos).Add(str);
  960. #if 0
  961. income+=atof(str);
  962. income2+=atof(str);
  963. #else
  964. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  965. {
  966. income += atof(str);
  967. }
  968. income2 += atof(str);
  969. #endif
  970. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  971. m_List1array.ElementAt(pos).Add("收入");
  972. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  973. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  974. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  975. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  976. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  977. pos++;
  978. }
  979. for (i = 0; i < List2array.GetSize(); i++)
  980. {
  981. if (List2array.ElementAt(i).ElementAt(8) == "摄影二销")
  982. {
  983. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  984. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  985. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  986. str.Replace(";;;", ";"); str.Replace(";;", ";");
  987. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  988. m_List1array.ElementAt(pos).Add(str);
  989. str = List2array.ElementAt(i).ElementAt(2);
  990. m_List1array.ElementAt(pos).Add(str);
  991. #if 0
  992. income+=atof(str);
  993. income2+=atof(str);
  994. #else
  995. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  996. {
  997. income += atof(str);
  998. }
  999. income2 += atof(str);
  1000. #endif
  1001. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(8));
  1002. m_List1array.ElementAt(pos).Add("收入");
  1003. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  1004. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  1005. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  1006. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  1007. m_List1array.ElementAt(pos).Add(" ");
  1008. pos++;
  1009. }
  1010. }
  1011. for (i = 0; i < other2salearray.GetSize(); i++)
  1012. {
  1013. if (other2salearray.ElementAt(i).ElementAt(3) == "摄影二销")
  1014. {
  1015. str = other2salearray.ElementAt(i).ElementAt(0) + ";" + other2salearray.ElementAt(i).ElementAt(1) + ";" + other2salearray.ElementAt(i).ElementAt(2);
  1016. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1017. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(8));
  1018. m_List1array.ElementAt(pos).Add(str);
  1019. str = other2salearray.ElementAt(i).ElementAt(4);
  1020. m_List1array.ElementAt(pos).Add(str);
  1021. #if 0
  1022. income+=atof(str);
  1023. income2+=atof(str);
  1024. #else
  1025. if (other2salearray.ElementAt(i).ElementAt(7) != "储值卡扣款")
  1026. {
  1027. income += atof(str);
  1028. }
  1029. income2 += atof(str);
  1030. #endif
  1031. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(3));
  1032. m_List1array.ElementAt(pos).Add("收入");
  1033. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(5) + " " + other2salearray.ElementAt(i).ElementAt(10));
  1034. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(7));
  1035. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(6));
  1036. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(9));
  1037. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(11));
  1038. pos++;
  1039. }
  1040. }
  1041. }
  1042. else if (m_radio1 == 7)//化妆二销
  1043. {
  1044. for (i = 0; i < List11array.GetSize(); i++)
  1045. {
  1046. if (List11array.ElementAt(i).ElementAt(5) != "化妆二销")continue;
  1047. str = List11array.ElementAt(i).ElementAt(0);
  1048. str += ";" + List11array.ElementAt(i).ElementAt(3);
  1049. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  1050. {
  1051. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  1052. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  1053. str += "," + List11array.ElementAt(i).ElementAt(2);
  1054. }
  1055. else
  1056. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  1057. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  1058. m_List1array.ElementAt(pos).Add(str);
  1059. str = List11array.ElementAt(i).ElementAt(4);
  1060. m_List1array.ElementAt(pos).Add(str);
  1061. #if 0
  1062. income+=atof(str);
  1063. income2+=atof(str);
  1064. #else
  1065. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  1066. {
  1067. income += atof(str);
  1068. }
  1069. income2 += atof(str);
  1070. #endif
  1071. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  1072. m_List1array.ElementAt(pos).Add("收入");
  1073. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  1074. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  1075. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  1076. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  1077. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  1078. pos++;
  1079. }
  1080. for (i = 0; i < List2array.GetSize(); i++)
  1081. {
  1082. if (List2array.ElementAt(i).ElementAt(8) == "化妆二销")
  1083. {
  1084. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  1085. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  1086. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  1087. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1088. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  1089. m_List1array.ElementAt(pos).Add(str);
  1090. str = List2array.ElementAt(i).ElementAt(2);
  1091. m_List1array.ElementAt(pos).Add(str);
  1092. #if 0
  1093. income+=atof(str);
  1094. income2+=atof(str);
  1095. #else
  1096. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  1097. {
  1098. income += atof(str);
  1099. }
  1100. income2 += atof(str);
  1101. #endif
  1102. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(8));
  1103. m_List1array.ElementAt(pos).Add("收入");
  1104. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  1105. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  1106. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  1107. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  1108. m_List1array.ElementAt(pos).Add(" ");
  1109. pos++;
  1110. }
  1111. }
  1112. for (i = 0; i < other2salearray.GetSize(); i++)
  1113. {
  1114. if (other2salearray.ElementAt(i).ElementAt(3) == "化妆二销")
  1115. {
  1116. str = other2salearray.ElementAt(i).ElementAt(0) + ";" + other2salearray.ElementAt(i).ElementAt(1) + ";" + other2salearray.ElementAt(i).ElementAt(2);
  1117. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1118. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(8));
  1119. m_List1array.ElementAt(pos).Add(str);
  1120. str = other2salearray.ElementAt(i).ElementAt(4);
  1121. m_List1array.ElementAt(pos).Add(str);
  1122. #if 0
  1123. income+=atof(str);
  1124. income2+=atof(str);
  1125. #else
  1126. if (other2salearray.ElementAt(i).ElementAt(7) != "储值卡扣款")
  1127. {
  1128. income += atof(str);
  1129. }
  1130. income2 += atof(str);
  1131. #endif
  1132. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(3));
  1133. m_List1array.ElementAt(pos).Add("收入");
  1134. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(5) + " " + other2salearray.ElementAt(i).ElementAt(10));
  1135. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(7));
  1136. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(6));
  1137. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(9));
  1138. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(11));
  1139. pos++;
  1140. }
  1141. }
  1142. }
  1143. else if (m_radio1 == 8)//套系升级二销
  1144. {
  1145. /* for( i=0; i<List11array.GetSize (); i++)
  1146. {
  1147. if(List11array.ElementAt (i).ElementAt (5)!="套系升级二销")continue;
  1148. str=List11array.ElementAt (i).ElementAt (0);
  1149. str+=";"+List11array.ElementAt (i).ElementAt (3);
  1150. if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
  1151. {
  1152. str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
  1153. if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
  1154. str+=","+List11array.ElementAt (i).ElementAt (2);
  1155. }
  1156. else
  1157. str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
  1158. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
  1159. m_List1array.ElementAt (pos).Add(str);
  1160. str=List11array.ElementAt (i).ElementAt (4);
  1161. m_List1array.ElementAt (pos).Add(str);
  1162. income+=atof(str);
  1163. income2+=atof(str);
  1164. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
  1165. m_List1array.ElementAt (pos).Add("收入");
  1166. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
  1167. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
  1168. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
  1169. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
  1170. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
  1171. pos++;
  1172. }
  1173. for( i=0; i<List2array.GetSize (); i++)
  1174. {
  1175. if(List2array.ElementAt (i).ElementAt (8)=="套系升级二销")
  1176. {
  1177. if(List2array.ElementAt (i).ElementAt (7).GetLength ()>120)
  1178. List2array.ElementAt (i).SetAt (7, List2array.ElementAt (i).ElementAt (7).Left (120)+"..");
  1179. str=List2array.ElementAt (i).ElementAt (1)+";"+List2array.ElementAt (i).ElementAt (4)+";"+List2array.ElementAt (i).ElementAt (6)+";"+List2array.ElementAt (i).ElementAt (7);
  1180. str.Replace (";;;", ";");str.Replace (";;", ";");
  1181. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (0));
  1182. m_List1array.ElementAt (pos).Add(str);
  1183. str=List2array.ElementAt (i).ElementAt (2);
  1184. m_List1array.ElementAt (pos).Add(str);
  1185. income+=atof(str);
  1186. income2+=atof(str);
  1187. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (8));
  1188. m_List1array.ElementAt (pos).Add("收入");
  1189. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (3)+" "+List2array.ElementAt (i).ElementAt (11));
  1190. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (9));
  1191. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (5));
  1192. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (10));
  1193. m_List1array.ElementAt (pos).Add(" ");
  1194. pos++;
  1195. }
  1196. }
  1197. for( i=0; i<other2salearray.GetSize (); i++)
  1198. {
  1199. if(other2salearray.ElementAt (i).ElementAt (3)=="套系升级二销")
  1200. {
  1201. str=other2salearray.ElementAt (i).ElementAt (0)+";"+other2salearray.ElementAt (i).ElementAt (1)+";"+other2salearray.ElementAt (i).ElementAt (2);
  1202. str.Replace (";;;", ";");str.Replace (";;", ";");
  1203. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (8));
  1204. m_List1array.ElementAt (pos).Add(str);
  1205. str=other2salearray.ElementAt (i).ElementAt (4);
  1206. m_List1array.ElementAt (pos).Add(str);
  1207. income+=atof(str);
  1208. income2+=atof(str);
  1209. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (3));
  1210. m_List1array.ElementAt (pos).Add("收入");
  1211. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (5)+" "+other2salearray.ElementAt (i).ElementAt (10));
  1212. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (7));
  1213. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (6));
  1214. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (9));
  1215. m_List1array.ElementAt (pos).Add(" ");
  1216. pos++;
  1217. }
  1218. }*/
  1219. for (i = 0; i < memberarray.GetSize(); i++)
  1220. {
  1221. str = memberarray.ElementAt(i).ElementAt(1) + ";" + memberarray.ElementAt(i).ElementAt(5) + ";客户:" + memberarray.ElementAt(i).ElementAt(2);
  1222. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1223. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(0));
  1224. m_List1array.ElementAt(pos).Add(str);
  1225. str = memberarray.ElementAt(i).ElementAt(3);
  1226. m_List1array.ElementAt(pos).Add(str);
  1227. income += atof(str);
  1228. m_List1array.ElementAt(pos).Add("会员充值");
  1229. m_List1array.ElementAt(pos).Add("收入");
  1230. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(4) + " " + memberarray.ElementAt(i).ElementAt(8));
  1231. if (memberarray.ElementAt(i).ElementAt(7) == "")
  1232. m_List1array.ElementAt(pos).Add("现金");
  1233. else
  1234. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(7));
  1235. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(5));
  1236. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(6));
  1237. m_List1array.ElementAt(pos).Add(" ");
  1238. pos++;
  1239. }
  1240. }
  1241. else if (m_radio1 == 9)//选片加挑
  1242. {
  1243. for (i = 0; i < List11array.GetSize(); i++)
  1244. {
  1245. if (List11array.ElementAt(i).ElementAt(5) != "选片二销")continue;
  1246. str = List11array.ElementAt(i).ElementAt(0);
  1247. str += ";" + List11array.ElementAt(i).ElementAt(3);
  1248. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  1249. {
  1250. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  1251. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  1252. str += "," + List11array.ElementAt(i).ElementAt(2);
  1253. }
  1254. else
  1255. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  1256. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  1257. m_List1array.ElementAt(pos).Add(str);
  1258. str = List11array.ElementAt(i).ElementAt(4);
  1259. m_List1array.ElementAt(pos).Add(str);
  1260. #if 0
  1261. income+=atof(str);
  1262. income2+=atof(str);
  1263. #else
  1264. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  1265. {
  1266. income += atof(str);
  1267. }
  1268. income2 += atof(str);
  1269. #endif
  1270. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  1271. m_List1array.ElementAt(pos).Add("收入");
  1272. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  1273. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  1274. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  1275. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  1276. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  1277. pos++;
  1278. }
  1279. for (i = 0; i < List2array.GetSize(); i++)
  1280. {
  1281. if (List2array.ElementAt(i).ElementAt(8) == "选片二销")
  1282. {
  1283. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  1284. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  1285. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  1286. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1287. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  1288. m_List1array.ElementAt(pos).Add(str);
  1289. str = List2array.ElementAt(i).ElementAt(2);
  1290. m_List1array.ElementAt(pos).Add(str);
  1291. #if 0
  1292. income+=atof(str);
  1293. income2+=atof(str);
  1294. #else
  1295. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  1296. {
  1297. income += atof(str);
  1298. }
  1299. income2 += atof(str);
  1300. #endif
  1301. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(8));
  1302. m_List1array.ElementAt(pos).Add("收入");
  1303. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  1304. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  1305. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  1306. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  1307. m_List1array.ElementAt(pos).Add(" ");
  1308. pos++;
  1309. }
  1310. }
  1311. for (i = 0; i < other2salearray.GetSize(); i++)
  1312. {
  1313. if (other2salearray.ElementAt(i).ElementAt(3) == "选片二销")
  1314. {
  1315. str = other2salearray.ElementAt(i).ElementAt(0) + ";" + other2salearray.ElementAt(i).ElementAt(1) + ";" + other2salearray.ElementAt(i).ElementAt(2);
  1316. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1317. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(8));
  1318. m_List1array.ElementAt(pos).Add(str);
  1319. str = other2salearray.ElementAt(i).ElementAt(4);
  1320. m_List1array.ElementAt(pos).Add(str);
  1321. #if 0
  1322. income+=atof(str);
  1323. income2+=atof(str);
  1324. #else
  1325. if (other2salearray.ElementAt(i).ElementAt(7) != "储值卡扣款")
  1326. {
  1327. income += atof(str);
  1328. }
  1329. income2 += atof(str);
  1330. #endif
  1331. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(3));
  1332. m_List1array.ElementAt(pos).Add("收入");
  1333. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(5) + " " + other2salearray.ElementAt(i).ElementAt(10));
  1334. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(7));
  1335. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(6));
  1336. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(9));
  1337. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(11));
  1338. pos++;
  1339. }
  1340. }
  1341. }
  1342. else if (m_radio1 == 10)//其它收入
  1343. {
  1344. for (i = 0; i < List2array.GetSize(); i++)
  1345. {
  1346. if (List2array.ElementAt(i).ElementAt(8) != "")continue;
  1347. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  1348. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  1349. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  1350. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1351. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  1352. m_List1array.ElementAt(pos).Add(str);
  1353. str = List2array.ElementAt(i).ElementAt(2);
  1354. m_List1array.ElementAt(pos).Add(str);
  1355. #if 0
  1356. income+=atof(str);
  1357. #else
  1358. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  1359. {
  1360. income += atof(str);
  1361. }
  1362. #endif
  1363. m_List1array.ElementAt(pos).Add("其它收入");
  1364. m_List1array.ElementAt(pos).Add("收入");
  1365. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  1366. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  1367. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  1368. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  1369. m_List1array.ElementAt(pos).Add(" ");
  1370. pos++;
  1371. }
  1372. }
  1373. m_List1array.SetSize(pos);
  1374. str.Format("%0.2f", income);
  1375. ::ConvertToPrice(str);
  1376. SetDlgItemText(IDC_EDITmoney1, str); // 总收入
  1377. str.Format("%0.2f", income2);
  1378. ::ConvertToPrice(str);
  1379. SetDlgItemText(IDC_EDITmoney5, str); // 营业收入
  1380. str.Format("%0.2f", payout);
  1381. ::ConvertToPrice(str);
  1382. SetDlgItemText(IDC_EDITmoney2, str); // 总支出
  1383. str.Format("%0.2f", income - payout);
  1384. ::ConvertToPrice(str);
  1385. SetDlgItemText(IDC_EDITmoney3, str); // 净收入
  1386. str.Format("%d", dindanshu);
  1387. SetDlgItemText(IDC_EDITmoney4, str); // 订单数;
  1388. FillGrid();
  1389. }
  1390. void DailyForm::OnRadio3()
  1391. {
  1392. // TODO: Add your control notification handler code here
  1393. UpdateData();
  1394. KindChange();
  1395. }
  1396. void DailyForm::OnRadio9()
  1397. {
  1398. // TODO: Add your control notification handler code here
  1399. UpdateData();
  1400. KindChange();
  1401. }
  1402. void DailyForm::OnRadio4()
  1403. {
  1404. // TODO: Add your control notification handler code here
  1405. UpdateData();
  1406. KindChange();
  1407. }
  1408. void DailyForm::OnRadio5()
  1409. {
  1410. // TODO: Add your control notification handler code here
  1411. UpdateData();
  1412. KindChange();
  1413. }
  1414. void DailyForm::OnRadio6()
  1415. {
  1416. // TODO: Add your control notification handler code here
  1417. UpdateData();
  1418. KindChange();
  1419. }
  1420. void DailyForm::OnRadio7()
  1421. {
  1422. // TODO: Add your control notification handler code here
  1423. UpdateData();
  1424. KindChange();
  1425. }
  1426. void DailyForm::OnRadio8()
  1427. {
  1428. // TODO: Add your control notification handler code here
  1429. UpdateData();
  1430. KindChange();
  1431. }
  1432. void DailyForm::OnRadio10()
  1433. {
  1434. // TODO: Add your control notification handler code here
  1435. UpdateData();
  1436. KindChange();
  1437. }
  1438. void DailyForm::OnRadio11()
  1439. {
  1440. // TODO: Add your control notification handler code here
  1441. UpdateData();
  1442. KindChange();
  1443. }
  1444. void DailyForm::OnRadio12()
  1445. {
  1446. // TODO: Add your control notification handler code here
  1447. UpdateData();
  1448. KindChange();
  1449. }
  1450. void DailyForm::OnRadio13()
  1451. {
  1452. // TODO: Add your control notification handler code here
  1453. UpdateData();
  1454. KindChange();
  1455. }
  1456. void DailyForm::OnRadio14()
  1457. {
  1458. // TODO: Add your control notification handler code here
  1459. UpdateData();
  1460. if (m_radio2 == 0)m_bForKF = 0;
  1461. else
  1462. {
  1463. m_bForKF = 1;
  1464. }
  1465. KindChange();
  1466. }
  1467. void DailyForm::OnRadio15()
  1468. {
  1469. // TODO: Add your control notification handler code here
  1470. OnRadio14();
  1471. }
  1472. void DailyForm::OnRadio16()
  1473. {
  1474. // TODO: Add your control notification handler code here
  1475. UpdateData();
  1476. KindChange();
  1477. //OnRadio14();
  1478. }
  1479. void DailyForm::OnBUTprint()
  1480. {
  1481. // TODO: Add your control notification handler code here
  1482. if (m_List1.GetItemCount() == 0)
  1483. {
  1484. AfxMessageBox("无内容!", MB_ICONINFORMATION);
  1485. return;
  1486. }
  1487. CArray<CStringArray, CStringArray>Listarray;
  1488. CString str, temp;
  1489. m_static1.GetWindowText(str);
  1490. CString title = g_cominfoarray.ElementAt(0).ElementAt(10) + str;
  1491. int count = m_List1.GetItemCount() / 45;
  1492. if (m_List1.GetItemCount() % 45)count++;
  1493. Listarray.SetSize(m_List1.GetItemCount() + count, 1);
  1494. int pos = 0;
  1495. float otherpaytype1 = 0;
  1496. float otherpaytype2 = 0;
  1497. float otherpaytype3 = 0;
  1498. int addpos = 1;
  1499. for (int i = 0; i < m_List1.GetItemCount(); i++)
  1500. {
  1501. if (i % 45 == 0)
  1502. {
  1503. Listarray.ElementAt(pos).Add("项目名称");
  1504. Listarray.ElementAt(pos).Add("金额");
  1505. Listarray.ElementAt(pos).Add("项目类别");
  1506. Listarray.ElementAt(pos).Add("收入/支出");
  1507. pos++;
  1508. }
  1509. for (int j = 0; j < 3; j++)
  1510. Listarray.ElementAt(pos).Add(m_List1.GetItemText(i, j + addpos));
  1511. Listarray.ElementAt(pos).Add(m_List1.GetItemText(i, 3 + addpos) + "/" + m_List1.GetItemText(i, 5 + addpos));
  1512. if (m_List1.GetItemText(i, 5 + addpos) == "POS机刷卡")
  1513. otherpaytype1 += atof(m_List1.GetItemText(i, 1 + addpos));
  1514. else if (m_List1.GetItemText(i, 5 + addpos) == "储值卡扣款")
  1515. otherpaytype2 += atof(m_List1.GetItemText(i, 1 + addpos));
  1516. else if (m_List1.GetItemText(i, 5 + addpos) == "积分兑换")
  1517. otherpaytype3 += atof(m_List1.GetItemText(i, 1 + addpos));
  1518. pos++;
  1519. }
  1520. Listarray.SetSize(pos, 1);
  1521. str = "总收入:";
  1522. GetDlgItemText(IDC_EDITmoney1, temp); str += temp;
  1523. str += " 营业收入:";
  1524. GetDlgItemText(IDC_EDITmoney5, temp); str += temp;
  1525. str += " 总支出:";
  1526. GetDlgItemText(IDC_EDITmoney2, temp); str += temp;
  1527. str += " 净收入:";
  1528. GetDlgItemText(IDC_EDITmoney3, temp); str += temp;
  1529. str += " 定单数:";
  1530. GetDlgItemText(IDC_EDITmoney4, temp); str += temp;
  1531. str += "***";
  1532. temp.Format("POS机刷卡:%d", (int)otherpaytype1);
  1533. str += temp;
  1534. temp.Format(" 储值卡扣款:%d", (int)otherpaytype2);
  1535. str += temp;
  1536. temp.Format(" 积分兑换:%d", (int)otherpaytype3);
  1537. str += temp;
  1538. CString ss;
  1539. GetDlgItemText(IDC_EDITmoney3, ss);
  1540. //temp.Format (" 现金:%d", (int) (atof(ss)-(otherpaytype1+otherpaytype2+otherpaytype3)) );
  1541. temp.Format(" 柜台现金:%d", (int)(atof(ss) - (otherpaytype1 + otherpaytype3)));
  1542. str += temp;
  1543. g_pMainWnd->PrintDailyForm(&Listarray, title, str);
  1544. }
  1545. void DailyForm::OnBUTprint2()
  1546. {
  1547. // TODO: Add your control notification handler code here
  1548. if (!IsHasRights2new(51))return;
  1549. POSITION pos;
  1550. pos = m_List1.GetFirstSelectedItemPosition();
  1551. if (pos == NULL)
  1552. {
  1553. AfxMessageBox("请先选中您要审核的项目!", MB_ICONINFORMATION);
  1554. return;
  1555. }
  1556. int iItem;
  1557. CStringArray array;
  1558. int count = 0;
  1559. while (pos)
  1560. {
  1561. count++;
  1562. if (count > 10)
  1563. {
  1564. AfxMessageBox("仅前10个项目生效,请选中少于10个项目!", MB_ICONINFORMATION);
  1565. break;
  1566. }
  1567. iItem = m_List1.GetNextSelectedItem(pos);
  1568. array.Add(m_List1.GetItemText(iItem, 0));
  1569. }
  1570. CString id, type, temp, sql;
  1571. CString financecheck = "已审核";
  1572. if (AfxMessageBox(" 此单审核是否通过? \r\n", MB_YESNO | MB_ICONINFORMATION) != IDYES)
  1573. financecheck = "未审核";
  1574. financecheck += "\\" + g_user.name;
  1575. financecheck.Replace("(", "(");
  1576. financecheck.Replace(")", ")");
  1577. int pos2;
  1578. for (int i = 0; i < array.GetSize(); i++)
  1579. {
  1580. temp = array.ElementAt(i);
  1581. pos2 = temp.Find(":");
  1582. if (pos2 == -1)continue;
  1583. id = temp.Left(pos2);
  1584. type = temp.Right(1);
  1585. if (type == "0")
  1586. {
  1587. temp.Format("***update singleincome set financecheck='%s' where id=%s", financecheck, id);
  1588. }
  1589. else if (type == "1")
  1590. {
  1591. temp.Format("***update gudingfeiyong set financecheck='%s' where id=%s", financecheck, id);
  1592. }
  1593. else if (type == "2")
  1594. {
  1595. temp.Format("***update dindanbukuan set financecheck='%s' where autoid=%s", financecheck, id);
  1596. }
  1597. else if (type == "3")
  1598. {
  1599. temp.Format("***update singleincomemoney set financecheck='%s' where autoid=%s", financecheck, id);
  1600. }
  1601. else if (type == "4")
  1602. {
  1603. temp.Format("***update memberreg3 set financecheck='%s' where id=%s", financecheck, id);
  1604. }
  1605. sql += temp;
  1606. }
  1607. sql.TrimLeft("***");
  1608. g_sendhead.bsql = 1;
  1609. g_pMainWnd->ProcessChatMessageRequest2(sql); if (g_bSendOK == 0)return;
  1610. DateChange();
  1611. }
  1612. void DailyForm::OnCustomdrawList(NMHDR* pNMHDR, LRESULT* pResult)
  1613. {
  1614. NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>(pNMHDR);
  1615. // Take the default processing unless we set this to something else below.
  1616. *pResult = 0;
  1617. // First thing - check the draw stage. If it's the control's prepaint
  1618. // stage, then tell Windows we want messages for every item.
  1619. if (CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage)
  1620. {
  1621. *pResult = CDRF_NOTIFYITEMDRAW;
  1622. }
  1623. else if (CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage)
  1624. {
  1625. // This is the prepaint stage for an item. Here's where we set the
  1626. // item's text color. Our return value will tell Windows to draw the
  1627. // item itself, but it will use the new color we set here.
  1628. // We'll cycle the colors through red, green, and light blue.
  1629. if (m_List1.m_arLabels.ElementAt(pLVCD->nmcd.dwItemSpec).ElementAt(8).Find("已审核") == -1)
  1630. pLVCD->clrText = RGB(220, 0, 0);
  1631. else
  1632. pLVCD->clrText = RGB(20, 133, 20);
  1633. if (pLVCD->nmcd.dwItemSpec % 2)
  1634. pLVCD->clrTextBk = g_gridcol1;
  1635. else
  1636. pLVCD->clrTextBk = g_gridcol2;
  1637. // Store the color back in the NMLVCUSTOMDRAW struct.
  1638. // Tell Windows to paint the control itself.
  1639. *pResult = CDRF_DODEFAULT;
  1640. }
  1641. }
  1642. void DailyForm::OnBUTprint5()
  1643. {
  1644. // TODO: Add your control notification handler code here
  1645. CString str;
  1646. m_static1.GetWindowText(str);
  1647. // m_static1.SetWindowText (strdate+"("+sdate+")财务报表");
  1648. ListToXLS(&m_List1, "c:\\" + str + ".xls", 1);
  1649. }
  1650. void DailyForm::OnBUTprint4()
  1651. {
  1652. // TODO: Add your control notification handler code here
  1653. if (atoi(g_cominfoarray.ElementAt(0).ElementAt(115)))
  1654. {
  1655. SelExpendType dlg;
  1656. dlg.m_mode = 3;
  1657. if (dlg.DoModal() == IDOK)
  1658. {
  1659. m_jdd = dlg.m_sel;
  1660. FillGrid();
  1661. }
  1662. }
  1663. }
  1664. void DailyForm::KindChange2()
  1665. {
  1666. m_jdd = "";
  1667. CString str;
  1668. int pos = 0;
  1669. int dindanshu = 0;
  1670. float income = 0;
  1671. float income2 = 0;
  1672. float payout = 0;
  1673. int count = List2array.GetSize() + List3array.GetSize() + List11array.GetSize() + other2salearray.GetSize() + memberarray.GetSize();
  1674. m_List1array.RemoveAll();
  1675. m_List1array.SetSize(count);
  1676. int i = 0;
  1677. for (i = 0; i < memberarray.GetSize(); i++)
  1678. {
  1679. if (memberarray.ElementAt(i).ElementAt(6).IsEmpty())
  1680. memberarray.ElementAt(i).SetAt(6, "未审核");
  1681. memberarray.ElementAt(i).SetAt(0, memberarray.ElementAt(i).ElementAt(0) + ":4");
  1682. }
  1683. for (i = 0; i < List2array.GetSize(); i++)
  1684. {
  1685. if (List2array.ElementAt(i).ElementAt(10).IsEmpty())
  1686. List2array.ElementAt(i).SetAt(10, "未审核");
  1687. List2array.ElementAt(i).SetAt(0, List2array.ElementAt(i).ElementAt(0) + ":0");
  1688. }
  1689. for (i = 0; i < List3array.GetSize(); i++)
  1690. {
  1691. if (List3array.ElementAt(i).ElementAt(7).IsEmpty())
  1692. List3array.ElementAt(i).SetAt(7, "未审核");
  1693. List3array.ElementAt(i).SetAt(0, List3array.ElementAt(i).ElementAt(0) + ":1");
  1694. }
  1695. for (i = 0; i < List11array.GetSize(); i++)
  1696. {
  1697. if (List11array.ElementAt(i).ElementAt(11).IsEmpty())
  1698. List11array.ElementAt(i).SetAt(11, "未审核");
  1699. List11array.ElementAt(i).SetAt(10, List11array.ElementAt(i).ElementAt(10) + ":2");
  1700. }
  1701. for (i = 0; i < other2salearray.GetSize(); i++)
  1702. {
  1703. if (other2salearray.ElementAt(i).ElementAt(9).IsEmpty())
  1704. other2salearray.ElementAt(i).SetAt(9, "未审核");
  1705. other2salearray.ElementAt(i).SetAt(8, other2salearray.ElementAt(i).ElementAt(8) + ":3");
  1706. }
  1707. //if(m_radio1==2)//营业收入
  1708. {
  1709. for (i = 0; i < List11array.GetSize(); i++)
  1710. {
  1711. if (List11array.ElementAt(i).ElementAt(5) != "客服二销")continue;
  1712. str = List11array.ElementAt(i).ElementAt(0);
  1713. str += ";" + List11array.ElementAt(i).ElementAt(3);
  1714. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  1715. {
  1716. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  1717. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  1718. str += "," + List11array.ElementAt(i).ElementAt(2);
  1719. }
  1720. else
  1721. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  1722. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  1723. m_List1array.ElementAt(pos).Add(str);
  1724. str = List11array.ElementAt(i).ElementAt(4);
  1725. m_List1array.ElementAt(pos).Add(str);
  1726. income += atof(str);
  1727. income2 += atof(str);
  1728. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  1729. m_List1array.ElementAt(pos).Add("收入");
  1730. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  1731. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  1732. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  1733. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  1734. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  1735. pos++;
  1736. }
  1737. }
  1738. m_List1array.SetSize(pos);
  1739. str.Format("%0.2f", income);
  1740. ::ConvertToPrice(str);
  1741. SetDlgItemText(IDC_EDITmoney1, str);
  1742. str.Format("%0.2f", income);
  1743. ::ConvertToPrice(str);
  1744. SetDlgItemText(IDC_EDITmoney5, str);
  1745. str.Format("%0.2f", 0);
  1746. ::ConvertToPrice(str);
  1747. SetDlgItemText(IDC_EDITmoney2, str);
  1748. str.Format("%0.2f", income);
  1749. ::ConvertToPrice(str);
  1750. SetDlgItemText(IDC_EDITmoney3, str);
  1751. str.Format("%d", 0);
  1752. SetDlgItemText(IDC_EDITmoney4, str);
  1753. FillGrid();
  1754. }
  1755. void DailyForm::OnSize(UINT nType, int cx, int cy)
  1756. {
  1757. MyFormView::OnSize(nType, cx, cy);
  1758. // TODO: 在此处添加消息处理程序代码
  1759. }