DailyForm.cpp 66 KB

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