DailyForm.cpp 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940
  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. m_List1array.ElementAt(pos).Add("固定费用");
  575. m_List1array.ElementAt(pos).Add("支出");
  576. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(3) + " " + List3array.ElementAt(i).ElementAt(8));
  577. m_List1array.ElementAt(pos).Add("现金");
  578. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(5));
  579. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(7));
  580. m_List1array.ElementAt(pos).Add(" ");
  581. pos++;
  582. }
  583. for (i = 0; i < memberarray.GetSize(); i++) // memberarray 储值卡充值
  584. {
  585. str = memberarray.ElementAt(i).ElementAt(1) + ";" + memberarray.ElementAt(i).ElementAt(5) + ";客户:" + memberarray.ElementAt(i).ElementAt(2);
  586. str.Replace(";;;", ";"); str.Replace(";;", ";");
  587. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(0));
  588. m_List1array.ElementAt(pos).Add(str);
  589. str = memberarray.ElementAt(i).ElementAt(3);
  590. m_List1array.ElementAt(pos).Add(str);
  591. income += atof(str);
  592. m_List1array.ElementAt(pos).Add("会员充值");
  593. m_List1array.ElementAt(pos).Add("收入");
  594. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(4) + " " + memberarray.ElementAt(i).ElementAt(8));
  595. if (memberarray.ElementAt(i).ElementAt(7) == "")
  596. m_List1array.ElementAt(pos).Add("现金");
  597. else
  598. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(7));
  599. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(5));
  600. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(6));
  601. m_List1array.ElementAt(pos).Add(" ");
  602. pos++;
  603. }
  604. }
  605. else if (m_radio1 == 1)//收入
  606. {
  607. for (i = 0; i < List11array.GetSize(); i++)
  608. {
  609. #ifdef DDF_VERSION
  610. if(List11array.ElementAt (i).ElementAt (5)=="客服二销")continue;
  611. #endif
  612. str = List11array.ElementAt(i).ElementAt(0);
  613. str += ";" + List11array.ElementAt(i).ElementAt(3);
  614. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  615. {
  616. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  617. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  618. str += "," + List11array.ElementAt(i).ElementAt(2);
  619. }
  620. else
  621. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  622. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  623. m_List1array.ElementAt(pos).Add(str);
  624. str = List11array.ElementAt(i).ElementAt(4);
  625. m_List1array.ElementAt(pos).Add(str);
  626. #if 0
  627. income+=atof(str);
  628. income2+=atof(str);
  629. #else
  630. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  631. {
  632. income += atof(str);
  633. }
  634. income2 += atof(str);
  635. #endif
  636. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  637. m_List1array.ElementAt(pos).Add("收入");
  638. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  639. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  640. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  641. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  642. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  643. if (List11array.ElementAt(i).ElementAt(5) == "预约收款")
  644. dindanshu++;
  645. pos++;
  646. }
  647. for (i = 0; i < List2array.GetSize(); i++)
  648. {
  649. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  650. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  651. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  652. str.Replace(";;;", ";"); str.Replace(";;", ";");
  653. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  654. m_List1array.ElementAt(pos).Add(str);
  655. str = List2array.ElementAt(i).ElementAt(2);
  656. m_List1array.ElementAt(pos).Add(str);
  657. #if 0
  658. income+=atof(str);
  659. #else
  660. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  661. {
  662. income += atof(str);
  663. }
  664. #endif
  665. if (List2array.ElementAt(i).ElementAt(8) != "")
  666. {
  667. income2 += atof(str);
  668. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(8));
  669. }
  670. else
  671. m_List1array.ElementAt(pos).Add("其它收入");
  672. m_List1array.ElementAt(pos).Add("收入");
  673. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  674. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  675. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  676. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  677. m_List1array.ElementAt(pos).Add(" ");
  678. pos++;
  679. }
  680. for (i = 0; i < other2salearray.GetSize(); i++)
  681. {
  682. str = other2salearray.ElementAt(i).ElementAt(0) + ";" + other2salearray.ElementAt(i).ElementAt(1) + ";" + other2salearray.ElementAt(i).ElementAt(2);
  683. str.Replace(";;;", ";"); str.Replace(";;", ";");
  684. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(8));
  685. m_List1array.ElementAt(pos).Add(str);
  686. str = other2salearray.ElementAt(i).ElementAt(4);
  687. m_List1array.ElementAt(pos).Add(str);
  688. #if 0
  689. income+=atof(str);
  690. income2+=atof(str);
  691. #else
  692. if (other2salearray.ElementAt(i).ElementAt(7) != "储值卡扣款")
  693. {
  694. income += atof(str);
  695. }
  696. income2 += atof(str);
  697. #endif
  698. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(3));
  699. m_List1array.ElementAt(pos).Add("收入");
  700. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(5) + " " + other2salearray.ElementAt(i).ElementAt(10));
  701. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(7));
  702. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(6));
  703. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(9));
  704. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(11));
  705. pos++;
  706. }
  707. for (i = 0; i < memberarray.GetSize(); i++)
  708. {
  709. str = memberarray.ElementAt(i).ElementAt(1) + ";" + memberarray.ElementAt(i).ElementAt(5) + ";客户:" + memberarray.ElementAt(i).ElementAt(2);
  710. str.Replace(";;;", ";"); str.Replace(";;", ";");
  711. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(0));
  712. m_List1array.ElementAt(pos).Add(str);
  713. str = memberarray.ElementAt(i).ElementAt(3);
  714. m_List1array.ElementAt(pos).Add(str);
  715. income += atof(str);
  716. m_List1array.ElementAt(pos).Add("会员充值");
  717. m_List1array.ElementAt(pos).Add("收入");
  718. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(4) + " " + memberarray.ElementAt(i).ElementAt(8));
  719. if (memberarray.ElementAt(i).ElementAt(7) == "")
  720. m_List1array.ElementAt(pos).Add("现金");
  721. else
  722. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(7));
  723. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(5));
  724. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(6));
  725. m_List1array.ElementAt(pos).Add(" ");
  726. pos++;
  727. }
  728. }
  729. else if (m_radio1 == 2)//营业收入
  730. {
  731. for (i = 0; i < List11array.GetSize(); i++)
  732. {
  733. #ifdef DDF_VERSION
  734. if(List11array.ElementAt (i).ElementAt (5)=="客服二销")continue;
  735. #endif
  736. str = List11array.ElementAt(i).ElementAt(0);
  737. str += ";" + List11array.ElementAt(i).ElementAt(3);
  738. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  739. {
  740. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  741. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  742. str += "," + List11array.ElementAt(i).ElementAt(2);
  743. }
  744. else
  745. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  746. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  747. m_List1array.ElementAt(pos).Add(str);
  748. str = List11array.ElementAt(i).ElementAt(4);
  749. m_List1array.ElementAt(pos).Add(str);
  750. #if 0
  751. income+=atof(str);
  752. income2+=atof(str);
  753. #else
  754. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  755. {
  756. income += atof(str);
  757. }
  758. income2 += atof(str);
  759. #endif
  760. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  761. m_List1array.ElementAt(pos).Add("收入");
  762. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  763. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  764. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  765. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  766. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  767. if (List11array.ElementAt(i).ElementAt(5) == "预约收款")
  768. dindanshu++;
  769. pos++;
  770. }
  771. for (i = 0; i < List2array.GetSize(); i++)
  772. {
  773. if (List2array.ElementAt(i).ElementAt(8) != "")
  774. {
  775. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  776. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  777. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  778. str.Replace(";;;", ";"); str.Replace(";;", ";");
  779. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  780. m_List1array.ElementAt(pos).Add(str);
  781. str = List2array.ElementAt(i).ElementAt(2);
  782. m_List1array.ElementAt(pos).Add(str);
  783. #if 0
  784. income+=atof(str);
  785. income2+=atof(str);
  786. #else
  787. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  788. {
  789. income += atof(str);
  790. }
  791. income2 += atof(str);
  792. #endif
  793. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(8));
  794. m_List1array.ElementAt(pos).Add("收入");
  795. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  796. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  797. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  798. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  799. m_List1array.ElementAt(pos).Add(" ");
  800. pos++;
  801. }
  802. }
  803. for (i = 0; i < other2salearray.GetSize(); i++)
  804. {
  805. str = other2salearray.ElementAt(i).ElementAt(0) + ";" + other2salearray.ElementAt(i).ElementAt(1) + ";" + other2salearray.ElementAt(i).ElementAt(2);
  806. str.Replace(";;;", ";"); str.Replace(";;", ";");
  807. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(8));
  808. m_List1array.ElementAt(pos).Add(str);
  809. str = other2salearray.ElementAt(i).ElementAt(4);
  810. m_List1array.ElementAt(pos).Add(str);
  811. #if 0
  812. income+=atof(str);
  813. income2+=atof(str);
  814. #else
  815. if (other2salearray.ElementAt(i).ElementAt(7) != "储值卡扣款")
  816. {
  817. income += atof(str);
  818. }
  819. income2 += atof(str);
  820. #endif
  821. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(3));
  822. m_List1array.ElementAt(pos).Add("收入");
  823. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(5) + " " + other2salearray.ElementAt(i).ElementAt(10));
  824. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(7));
  825. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(6));
  826. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(9));
  827. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(11));
  828. pos++;
  829. }
  830. }
  831. else if (m_radio1 == 3)//支出
  832. {
  833. for (i = 0; i < List3array.GetSize(); i++)
  834. {
  835. if (List3array.ElementAt(i).ElementAt(6).GetLength()>120)
  836. List3array.ElementAt(i).SetAt(6, List3array.ElementAt(i).ElementAt(6).Left(120) + "..");
  837. str = List3array.ElementAt(i).ElementAt(1) + ";" + List3array.ElementAt(i).ElementAt(4) + ";" + List3array.ElementAt(i).ElementAt(6);
  838. str.Replace(";;;;", ";"); str.Replace(";;;", ";"); str.Replace(";;", ";");
  839. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(0));
  840. m_List1array.ElementAt(pos).Add(str);
  841. str = List3array.ElementAt(i).ElementAt(2);
  842. m_List1array.ElementAt(pos).Add(str);
  843. payout += atof(str);
  844. m_List1array.ElementAt(pos).Add("固定费用");
  845. m_List1array.ElementAt(pos).Add("支出");
  846. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(3) + " " + List3array.ElementAt(i).ElementAt(8));
  847. m_List1array.ElementAt(pos).Add("现金");
  848. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(5));
  849. m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(7));
  850. m_List1array.ElementAt(pos).Add(" ");
  851. pos++;
  852. }
  853. }
  854. else if (m_radio1 == 4)//定单
  855. {
  856. for (i = 0; i < List11array.GetSize(); i++)
  857. {
  858. if (List11array.ElementAt(i).ElementAt(5) != "预约收款")continue;
  859. dindanshu++;
  860. str = List11array.ElementAt(i).ElementAt(0);
  861. str += ";" + List11array.ElementAt(i).ElementAt(3);
  862. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  863. {
  864. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  865. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  866. str += "," + List11array.ElementAt(i).ElementAt(2);
  867. }
  868. else
  869. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  870. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  871. m_List1array.ElementAt(pos).Add(str);
  872. str = List11array.ElementAt(i).ElementAt(4);
  873. m_List1array.ElementAt(pos).Add(str);
  874. #if 0
  875. income+=atof(str);
  876. income2+=atof(str);
  877. #else
  878. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  879. {
  880. income += atof(str);
  881. }
  882. income2 += atof(str);
  883. #endif
  884. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  885. m_List1array.ElementAt(pos).Add("收入");
  886. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  887. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  888. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  889. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  890. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  891. pos++;
  892. }
  893. }
  894. else if (m_radio1 == 5)//补款
  895. {
  896. for (i = 0; i < List11array.GetSize(); i++)
  897. {
  898. if (List11array.ElementAt(i).ElementAt(5) != "预约补款")continue;
  899. str = List11array.ElementAt(i).ElementAt(0);
  900. str += ";" + List11array.ElementAt(i).ElementAt(3);
  901. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  902. {
  903. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  904. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  905. str += "," + List11array.ElementAt(i).ElementAt(2);
  906. }
  907. else
  908. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  909. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  910. m_List1array.ElementAt(pos).Add(str);
  911. str = List11array.ElementAt(i).ElementAt(4);
  912. m_List1array.ElementAt(pos).Add(str);
  913. #if 0
  914. income+=atof(str);
  915. income2+=atof(str);
  916. #else
  917. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  918. {
  919. income += atof(str);
  920. }
  921. income2 += atof(str);
  922. #endif
  923. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  924. m_List1array.ElementAt(pos).Add("收入");
  925. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  926. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  927. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  928. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  929. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  930. pos++;
  931. }
  932. }
  933. else if (m_radio1 == 6)//摄影二销
  934. {
  935. for (i = 0; i < List11array.GetSize(); i++)
  936. {
  937. if (List11array.ElementAt(i).ElementAt(5) != "摄影二销")continue;
  938. str = List11array.ElementAt(i).ElementAt(0);
  939. str += ";" + List11array.ElementAt(i).ElementAt(3);
  940. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  941. {
  942. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  943. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  944. str += "," + List11array.ElementAt(i).ElementAt(2);
  945. }
  946. else
  947. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  948. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  949. m_List1array.ElementAt(pos).Add(str);
  950. str = List11array.ElementAt(i).ElementAt(4);
  951. m_List1array.ElementAt(pos).Add(str);
  952. #if 0
  953. income+=atof(str);
  954. income2+=atof(str);
  955. #else
  956. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  957. {
  958. income += atof(str);
  959. }
  960. income2 += atof(str);
  961. #endif
  962. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  963. m_List1array.ElementAt(pos).Add("收入");
  964. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  965. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  966. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  967. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  968. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  969. pos++;
  970. }
  971. for (i = 0; i < List2array.GetSize(); i++)
  972. {
  973. if (List2array.ElementAt(i).ElementAt(8) == "摄影二销")
  974. {
  975. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  976. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  977. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  978. str.Replace(";;;", ";"); str.Replace(";;", ";");
  979. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  980. m_List1array.ElementAt(pos).Add(str);
  981. str = List2array.ElementAt(i).ElementAt(2);
  982. m_List1array.ElementAt(pos).Add(str);
  983. #if 0
  984. income+=atof(str);
  985. income2+=atof(str);
  986. #else
  987. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  988. {
  989. income += atof(str);
  990. }
  991. income2 += atof(str);
  992. #endif
  993. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(8));
  994. m_List1array.ElementAt(pos).Add("收入");
  995. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  996. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  997. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  998. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  999. m_List1array.ElementAt(pos).Add(" ");
  1000. pos++;
  1001. }
  1002. }
  1003. for (i = 0; i < other2salearray.GetSize(); i++)
  1004. {
  1005. if (other2salearray.ElementAt(i).ElementAt(3) == "摄影二销")
  1006. {
  1007. str = other2salearray.ElementAt(i).ElementAt(0) + ";" + other2salearray.ElementAt(i).ElementAt(1) + ";" + other2salearray.ElementAt(i).ElementAt(2);
  1008. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1009. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(8));
  1010. m_List1array.ElementAt(pos).Add(str);
  1011. str = other2salearray.ElementAt(i).ElementAt(4);
  1012. m_List1array.ElementAt(pos).Add(str);
  1013. #if 0
  1014. income+=atof(str);
  1015. income2+=atof(str);
  1016. #else
  1017. if (other2salearray.ElementAt(i).ElementAt(7) != "储值卡扣款")
  1018. {
  1019. income += atof(str);
  1020. }
  1021. income2 += atof(str);
  1022. #endif
  1023. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(3));
  1024. m_List1array.ElementAt(pos).Add("收入");
  1025. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(5) + " " + other2salearray.ElementAt(i).ElementAt(10));
  1026. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(7));
  1027. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(6));
  1028. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(9));
  1029. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(11));
  1030. pos++;
  1031. }
  1032. }
  1033. }
  1034. else if (m_radio1 == 7)//化妆二销
  1035. {
  1036. for (i = 0; i < List11array.GetSize(); i++)
  1037. {
  1038. if (List11array.ElementAt(i).ElementAt(5) != "化妆二销")continue;
  1039. str = List11array.ElementAt(i).ElementAt(0);
  1040. str += ";" + List11array.ElementAt(i).ElementAt(3);
  1041. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  1042. {
  1043. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  1044. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  1045. str += "," + List11array.ElementAt(i).ElementAt(2);
  1046. }
  1047. else
  1048. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  1049. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  1050. m_List1array.ElementAt(pos).Add(str);
  1051. str = List11array.ElementAt(i).ElementAt(4);
  1052. m_List1array.ElementAt(pos).Add(str);
  1053. #if 0
  1054. income+=atof(str);
  1055. income2+=atof(str);
  1056. #else
  1057. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  1058. {
  1059. income += atof(str);
  1060. }
  1061. income2 += atof(str);
  1062. #endif
  1063. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  1064. m_List1array.ElementAt(pos).Add("收入");
  1065. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  1066. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  1067. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  1068. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  1069. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  1070. pos++;
  1071. }
  1072. for (i = 0; i < List2array.GetSize(); i++)
  1073. {
  1074. if (List2array.ElementAt(i).ElementAt(8) == "化妆二销")
  1075. {
  1076. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  1077. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  1078. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  1079. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1080. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  1081. m_List1array.ElementAt(pos).Add(str);
  1082. str = List2array.ElementAt(i).ElementAt(2);
  1083. m_List1array.ElementAt(pos).Add(str);
  1084. #if 0
  1085. income+=atof(str);
  1086. income2+=atof(str);
  1087. #else
  1088. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  1089. {
  1090. income += atof(str);
  1091. }
  1092. income2 += atof(str);
  1093. #endif
  1094. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(8));
  1095. m_List1array.ElementAt(pos).Add("收入");
  1096. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  1097. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  1098. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  1099. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  1100. m_List1array.ElementAt(pos).Add(" ");
  1101. pos++;
  1102. }
  1103. }
  1104. for (i = 0; i < other2salearray.GetSize(); i++)
  1105. {
  1106. if (other2salearray.ElementAt(i).ElementAt(3) == "化妆二销")
  1107. {
  1108. str = other2salearray.ElementAt(i).ElementAt(0) + ";" + other2salearray.ElementAt(i).ElementAt(1) + ";" + other2salearray.ElementAt(i).ElementAt(2);
  1109. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1110. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(8));
  1111. m_List1array.ElementAt(pos).Add(str);
  1112. str = other2salearray.ElementAt(i).ElementAt(4);
  1113. m_List1array.ElementAt(pos).Add(str);
  1114. #if 0
  1115. income+=atof(str);
  1116. income2+=atof(str);
  1117. #else
  1118. if (other2salearray.ElementAt(i).ElementAt(7) != "储值卡扣款")
  1119. {
  1120. income += atof(str);
  1121. }
  1122. income2 += atof(str);
  1123. #endif
  1124. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(3));
  1125. m_List1array.ElementAt(pos).Add("收入");
  1126. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(5) + " " + other2salearray.ElementAt(i).ElementAt(10));
  1127. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(7));
  1128. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(6));
  1129. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(9));
  1130. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(11));
  1131. pos++;
  1132. }
  1133. }
  1134. }
  1135. else if (m_radio1 == 8)//套系升级二销
  1136. {
  1137. /* for( i=0; i<List11array.GetSize (); i++)
  1138. {
  1139. if(List11array.ElementAt (i).ElementAt (5)!="套系升级二销")continue;
  1140. str=List11array.ElementAt (i).ElementAt (0);
  1141. str+=";"+List11array.ElementAt (i).ElementAt (3);
  1142. if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
  1143. {
  1144. str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
  1145. if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
  1146. str+=","+List11array.ElementAt (i).ElementAt (2);
  1147. }
  1148. else
  1149. str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
  1150. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
  1151. m_List1array.ElementAt (pos).Add(str);
  1152. str=List11array.ElementAt (i).ElementAt (4);
  1153. m_List1array.ElementAt (pos).Add(str);
  1154. income+=atof(str);
  1155. income2+=atof(str);
  1156. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
  1157. m_List1array.ElementAt (pos).Add("收入");
  1158. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
  1159. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
  1160. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
  1161. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
  1162. m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
  1163. pos++;
  1164. }
  1165. for( i=0; i<List2array.GetSize (); i++)
  1166. {
  1167. if(List2array.ElementAt (i).ElementAt (8)=="套系升级二销")
  1168. {
  1169. if(List2array.ElementAt (i).ElementAt (7).GetLength ()>120)
  1170. List2array.ElementAt (i).SetAt (7, List2array.ElementAt (i).ElementAt (7).Left (120)+"..");
  1171. str=List2array.ElementAt (i).ElementAt (1)+";"+List2array.ElementAt (i).ElementAt (4)+";"+List2array.ElementAt (i).ElementAt (6)+";"+List2array.ElementAt (i).ElementAt (7);
  1172. str.Replace (";;;", ";");str.Replace (";;", ";");
  1173. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (0));
  1174. m_List1array.ElementAt (pos).Add(str);
  1175. str=List2array.ElementAt (i).ElementAt (2);
  1176. m_List1array.ElementAt (pos).Add(str);
  1177. income+=atof(str);
  1178. income2+=atof(str);
  1179. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (8));
  1180. m_List1array.ElementAt (pos).Add("收入");
  1181. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (3)+" "+List2array.ElementAt (i).ElementAt (11));
  1182. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (9));
  1183. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (5));
  1184. m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (10));
  1185. m_List1array.ElementAt (pos).Add(" ");
  1186. pos++;
  1187. }
  1188. }
  1189. for( i=0; i<other2salearray.GetSize (); i++)
  1190. {
  1191. if(other2salearray.ElementAt (i).ElementAt (3)=="套系升级二销")
  1192. {
  1193. str=other2salearray.ElementAt (i).ElementAt (0)+";"+other2salearray.ElementAt (i).ElementAt (1)+";"+other2salearray.ElementAt (i).ElementAt (2);
  1194. str.Replace (";;;", ";");str.Replace (";;", ";");
  1195. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (8));
  1196. m_List1array.ElementAt (pos).Add(str);
  1197. str=other2salearray.ElementAt (i).ElementAt (4);
  1198. m_List1array.ElementAt (pos).Add(str);
  1199. income+=atof(str);
  1200. income2+=atof(str);
  1201. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (3));
  1202. m_List1array.ElementAt (pos).Add("收入");
  1203. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (5)+" "+other2salearray.ElementAt (i).ElementAt (10));
  1204. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (7));
  1205. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (6));
  1206. m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (9));
  1207. m_List1array.ElementAt (pos).Add(" ");
  1208. pos++;
  1209. }
  1210. }*/
  1211. for (i = 0; i < memberarray.GetSize(); i++)
  1212. {
  1213. str = memberarray.ElementAt(i).ElementAt(1) + ";" + memberarray.ElementAt(i).ElementAt(5) + ";客户:" + memberarray.ElementAt(i).ElementAt(2);
  1214. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1215. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(0));
  1216. m_List1array.ElementAt(pos).Add(str);
  1217. str = memberarray.ElementAt(i).ElementAt(3);
  1218. m_List1array.ElementAt(pos).Add(str);
  1219. income += atof(str);
  1220. m_List1array.ElementAt(pos).Add("会员充值");
  1221. m_List1array.ElementAt(pos).Add("收入");
  1222. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(4) + " " + memberarray.ElementAt(i).ElementAt(8));
  1223. if (memberarray.ElementAt(i).ElementAt(7) == "")
  1224. m_List1array.ElementAt(pos).Add("现金");
  1225. else
  1226. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(7));
  1227. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(5));
  1228. m_List1array.ElementAt(pos).Add(memberarray.ElementAt(i).ElementAt(6));
  1229. m_List1array.ElementAt(pos).Add(" ");
  1230. pos++;
  1231. }
  1232. }
  1233. else if (m_radio1 == 9)//选片加挑
  1234. {
  1235. for (i = 0; i < List11array.GetSize(); i++)
  1236. {
  1237. if (List11array.ElementAt(i).ElementAt(5) != "选片二销")continue;
  1238. str = List11array.ElementAt(i).ElementAt(0);
  1239. str += ";" + List11array.ElementAt(i).ElementAt(3);
  1240. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  1241. {
  1242. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  1243. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  1244. str += "," + List11array.ElementAt(i).ElementAt(2);
  1245. }
  1246. else
  1247. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  1248. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  1249. m_List1array.ElementAt(pos).Add(str);
  1250. str = List11array.ElementAt(i).ElementAt(4);
  1251. m_List1array.ElementAt(pos).Add(str);
  1252. #if 0
  1253. income+=atof(str);
  1254. income2+=atof(str);
  1255. #else
  1256. if (List11array.ElementAt(i).ElementAt(8) != "储值卡扣款")
  1257. {
  1258. income += atof(str);
  1259. }
  1260. income2 += atof(str);
  1261. #endif
  1262. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  1263. m_List1array.ElementAt(pos).Add("收入");
  1264. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  1265. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  1266. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  1267. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  1268. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  1269. pos++;
  1270. }
  1271. for (i = 0; i < List2array.GetSize(); i++)
  1272. {
  1273. if (List2array.ElementAt(i).ElementAt(8) == "选片二销")
  1274. {
  1275. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  1276. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  1277. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  1278. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1279. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  1280. m_List1array.ElementAt(pos).Add(str);
  1281. str = List2array.ElementAt(i).ElementAt(2);
  1282. m_List1array.ElementAt(pos).Add(str);
  1283. #if 0
  1284. income+=atof(str);
  1285. income2+=atof(str);
  1286. #else
  1287. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  1288. {
  1289. income += atof(str);
  1290. }
  1291. income2 += atof(str);
  1292. #endif
  1293. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(8));
  1294. m_List1array.ElementAt(pos).Add("收入");
  1295. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  1296. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  1297. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  1298. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  1299. m_List1array.ElementAt(pos).Add(" ");
  1300. pos++;
  1301. }
  1302. }
  1303. for (i = 0; i < other2salearray.GetSize(); i++)
  1304. {
  1305. if (other2salearray.ElementAt(i).ElementAt(3) == "选片二销")
  1306. {
  1307. str = other2salearray.ElementAt(i).ElementAt(0) + ";" + other2salearray.ElementAt(i).ElementAt(1) + ";" + other2salearray.ElementAt(i).ElementAt(2);
  1308. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1309. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(8));
  1310. m_List1array.ElementAt(pos).Add(str);
  1311. str = other2salearray.ElementAt(i).ElementAt(4);
  1312. m_List1array.ElementAt(pos).Add(str);
  1313. #if 0
  1314. income+=atof(str);
  1315. income2+=atof(str);
  1316. #else
  1317. if (other2salearray.ElementAt(i).ElementAt(7) != "储值卡扣款")
  1318. {
  1319. income += atof(str);
  1320. }
  1321. income2 += atof(str);
  1322. #endif
  1323. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(3));
  1324. m_List1array.ElementAt(pos).Add("收入");
  1325. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(5) + " " + other2salearray.ElementAt(i).ElementAt(10));
  1326. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(7));
  1327. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(6));
  1328. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(9));
  1329. m_List1array.ElementAt(pos).Add(other2salearray.ElementAt(i).ElementAt(11));
  1330. pos++;
  1331. }
  1332. }
  1333. }
  1334. else if (m_radio1 == 10)//其它收入
  1335. {
  1336. for (i = 0; i < List2array.GetSize(); i++)
  1337. {
  1338. if (List2array.ElementAt(i).ElementAt(8) != "")continue;
  1339. if (List2array.ElementAt(i).ElementAt(7).GetLength()>120)
  1340. List2array.ElementAt(i).SetAt(7, List2array.ElementAt(i).ElementAt(7).Left(120) + "..");
  1341. str = List2array.ElementAt(i).ElementAt(1) + ";" + List2array.ElementAt(i).ElementAt(4) + ";" + List2array.ElementAt(i).ElementAt(6) + ";" + List2array.ElementAt(i).ElementAt(7);
  1342. str.Replace(";;;", ";"); str.Replace(";;", ";");
  1343. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(0));
  1344. m_List1array.ElementAt(pos).Add(str);
  1345. str = List2array.ElementAt(i).ElementAt(2);
  1346. m_List1array.ElementAt(pos).Add(str);
  1347. #if 0
  1348. income+=atof(str);
  1349. #else
  1350. if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
  1351. {
  1352. income += atof(str);
  1353. }
  1354. #endif
  1355. m_List1array.ElementAt(pos).Add("其它收入");
  1356. m_List1array.ElementAt(pos).Add("收入");
  1357. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(3) + " " + List2array.ElementAt(i).ElementAt(11));
  1358. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(9));
  1359. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(5));
  1360. m_List1array.ElementAt(pos).Add(List2array.ElementAt(i).ElementAt(10));
  1361. m_List1array.ElementAt(pos).Add(" ");
  1362. pos++;
  1363. }
  1364. }
  1365. m_List1array.SetSize(pos);
  1366. str.Format("%0.2f", income);
  1367. ::ConvertToPrice(str);
  1368. SetDlgItemText(IDC_EDITmoney1, str); // 总收入
  1369. str.Format("%0.2f", income2);
  1370. ::ConvertToPrice(str);
  1371. SetDlgItemText(IDC_EDITmoney5, str); // 营业收入
  1372. str.Format("%0.2f", payout);
  1373. ::ConvertToPrice(str);
  1374. SetDlgItemText(IDC_EDITmoney2, str); // 总支出
  1375. str.Format("%0.2f", income - payout);
  1376. ::ConvertToPrice(str);
  1377. SetDlgItemText(IDC_EDITmoney3, str); // 净收入
  1378. str.Format("%d", dindanshu);
  1379. SetDlgItemText(IDC_EDITmoney4, str); // 订单数;
  1380. FillGrid();
  1381. }
  1382. void DailyForm::OnRadio3()
  1383. {
  1384. // TODO: Add your control notification handler code here
  1385. UpdateData();
  1386. KindChange();
  1387. }
  1388. void DailyForm::OnRadio9()
  1389. {
  1390. // TODO: Add your control notification handler code here
  1391. UpdateData();
  1392. KindChange();
  1393. }
  1394. void DailyForm::OnRadio4()
  1395. {
  1396. // TODO: Add your control notification handler code here
  1397. UpdateData();
  1398. KindChange();
  1399. }
  1400. void DailyForm::OnRadio5()
  1401. {
  1402. // TODO: Add your control notification handler code here
  1403. UpdateData();
  1404. KindChange();
  1405. }
  1406. void DailyForm::OnRadio6()
  1407. {
  1408. // TODO: Add your control notification handler code here
  1409. UpdateData();
  1410. KindChange();
  1411. }
  1412. void DailyForm::OnRadio7()
  1413. {
  1414. // TODO: Add your control notification handler code here
  1415. UpdateData();
  1416. KindChange();
  1417. }
  1418. void DailyForm::OnRadio8()
  1419. {
  1420. // TODO: Add your control notification handler code here
  1421. UpdateData();
  1422. KindChange();
  1423. }
  1424. void DailyForm::OnRadio10()
  1425. {
  1426. // TODO: Add your control notification handler code here
  1427. UpdateData();
  1428. KindChange();
  1429. }
  1430. void DailyForm::OnRadio11()
  1431. {
  1432. // TODO: Add your control notification handler code here
  1433. UpdateData();
  1434. KindChange();
  1435. }
  1436. void DailyForm::OnRadio12()
  1437. {
  1438. // TODO: Add your control notification handler code here
  1439. UpdateData();
  1440. KindChange();
  1441. }
  1442. void DailyForm::OnRadio13()
  1443. {
  1444. // TODO: Add your control notification handler code here
  1445. UpdateData();
  1446. KindChange();
  1447. }
  1448. void DailyForm::OnRadio14()
  1449. {
  1450. // TODO: Add your control notification handler code here
  1451. UpdateData();
  1452. if (m_radio2 == 0)m_bForKF = 0;
  1453. else
  1454. {
  1455. m_bForKF = 1;
  1456. }
  1457. KindChange();
  1458. }
  1459. void DailyForm::OnRadio15()
  1460. {
  1461. // TODO: Add your control notification handler code here
  1462. OnRadio14();
  1463. }
  1464. void DailyForm::OnRadio16()
  1465. {
  1466. // TODO: Add your control notification handler code here
  1467. UpdateData();
  1468. KindChange();
  1469. //OnRadio14();
  1470. }
  1471. void DailyForm::OnBUTprint()
  1472. {
  1473. // TODO: Add your control notification handler code here
  1474. if (m_List1.GetItemCount() == 0)
  1475. {
  1476. AfxMessageBox("无内容!", MB_ICONINFORMATION);
  1477. return;
  1478. }
  1479. CArray<CStringArray, CStringArray>Listarray;
  1480. CString str, temp;
  1481. m_static1.GetWindowText(str);
  1482. CString title = g_cominfoarray.ElementAt(0).ElementAt(10) + str;
  1483. int count = m_List1.GetItemCount() / 45;
  1484. if (m_List1.GetItemCount() % 45)count++;
  1485. Listarray.SetSize(m_List1.GetItemCount() + count, 1);
  1486. int pos = 0;
  1487. float otherpaytype1 = 0;
  1488. float otherpaytype2 = 0;
  1489. float otherpaytype3 = 0;
  1490. int addpos = 1;
  1491. for (int i = 0; i < m_List1.GetItemCount(); i++)
  1492. {
  1493. if (i % 45 == 0)
  1494. {
  1495. Listarray.ElementAt(pos).Add("项目名称");
  1496. Listarray.ElementAt(pos).Add("金额");
  1497. Listarray.ElementAt(pos).Add("项目类别");
  1498. Listarray.ElementAt(pos).Add("收入/支出");
  1499. pos++;
  1500. }
  1501. for (int j = 0; j < 3; j++)
  1502. Listarray.ElementAt(pos).Add(m_List1.GetItemText(i, j + addpos));
  1503. Listarray.ElementAt(pos).Add(m_List1.GetItemText(i, 3 + addpos) + "/" + m_List1.GetItemText(i, 5 + addpos));
  1504. if (m_List1.GetItemText(i, 5 + addpos) == "POS机刷卡")
  1505. otherpaytype1 += atof(m_List1.GetItemText(i, 1 + addpos));
  1506. else if (m_List1.GetItemText(i, 5 + addpos) == "储值卡扣款")
  1507. otherpaytype2 += atof(m_List1.GetItemText(i, 1 + addpos));
  1508. else if (m_List1.GetItemText(i, 5 + addpos) == "积分兑换")
  1509. otherpaytype3 += atof(m_List1.GetItemText(i, 1 + addpos));
  1510. pos++;
  1511. }
  1512. Listarray.SetSize(pos, 1);
  1513. str = "总收入:";
  1514. GetDlgItemText(IDC_EDITmoney1, temp); str += temp;
  1515. str += " 营业收入:";
  1516. GetDlgItemText(IDC_EDITmoney5, temp); str += temp;
  1517. str += " 总支出:";
  1518. GetDlgItemText(IDC_EDITmoney2, temp); str += temp;
  1519. str += " 净收入:";
  1520. GetDlgItemText(IDC_EDITmoney3, temp); str += temp;
  1521. str += " 定单数:";
  1522. GetDlgItemText(IDC_EDITmoney4, temp); str += temp;
  1523. str += "***";
  1524. temp.Format("POS机刷卡:%d", (int)otherpaytype1);
  1525. str += temp;
  1526. temp.Format(" 储值卡扣款:%d", (int)otherpaytype2);
  1527. str += temp;
  1528. temp.Format(" 积分兑换:%d", (int)otherpaytype3);
  1529. str += temp;
  1530. CString ss;
  1531. GetDlgItemText(IDC_EDITmoney3, ss);
  1532. //temp.Format (" 现金:%d", (int) (atof(ss)-(otherpaytype1+otherpaytype2+otherpaytype3)) );
  1533. temp.Format(" 柜台现金:%d", (int)(atof(ss) - (otherpaytype1 + otherpaytype3)));
  1534. str += temp;
  1535. g_pMainWnd->PrintDailyForm(&Listarray, title, str);
  1536. }
  1537. void DailyForm::OnBUTprint2()
  1538. {
  1539. // TODO: Add your control notification handler code here
  1540. if (!IsHasRights2new(51))return;
  1541. POSITION pos;
  1542. pos = m_List1.GetFirstSelectedItemPosition();
  1543. if (pos == NULL)
  1544. {
  1545. AfxMessageBox("请先选中您要审核的项目!", MB_ICONINFORMATION);
  1546. return;
  1547. }
  1548. int iItem;
  1549. CStringArray array;
  1550. int count = 0;
  1551. while (pos)
  1552. {
  1553. count++;
  1554. if (count > 10)
  1555. {
  1556. AfxMessageBox("仅前10个项目生效,请选中少于10个项目!", MB_ICONINFORMATION);
  1557. break;
  1558. }
  1559. iItem = m_List1.GetNextSelectedItem(pos);
  1560. array.Add(m_List1.GetItemText(iItem, 0));
  1561. }
  1562. CString id, type, temp, sql;
  1563. CString financecheck = "已审核";
  1564. if (AfxMessageBox(" 此单审核是否通过? \r\n", MB_YESNO | MB_ICONINFORMATION) != IDYES)
  1565. financecheck = "未审核";
  1566. financecheck += "\\" + g_user.name;
  1567. financecheck.Replace("(", "(");
  1568. financecheck.Replace(")", ")");
  1569. int pos2;
  1570. for (int i = 0; i < array.GetSize(); i++)
  1571. {
  1572. temp = array.ElementAt(i);
  1573. pos2 = temp.Find(":");
  1574. if (pos2 == -1)continue;
  1575. id = temp.Left(pos2);
  1576. type = temp.Right(1);
  1577. if (type == "0")
  1578. {
  1579. temp.Format("***update singleincome set financecheck='%s' where id=%s", financecheck, id);
  1580. }
  1581. else if (type == "1")
  1582. {
  1583. temp.Format("***update gudingfeiyong set financecheck='%s' where id=%s", financecheck, id);
  1584. }
  1585. else if (type == "2")
  1586. {
  1587. temp.Format("***update dindanbukuan set financecheck='%s' where autoid=%s", financecheck, id);
  1588. }
  1589. else if (type == "3")
  1590. {
  1591. temp.Format("***update singleincomemoney set financecheck='%s' where autoid=%s", financecheck, id);
  1592. }
  1593. else if (type == "4")
  1594. {
  1595. temp.Format("***update memberreg3 set financecheck='%s' where id=%s", financecheck, id);
  1596. }
  1597. sql += temp;
  1598. }
  1599. sql.TrimLeft("***");
  1600. g_sendhead.bsql = 1;
  1601. g_pMainWnd->ProcessChatMessageRequest2(sql); if (g_bSendOK == 0)return;
  1602. DateChange();
  1603. }
  1604. void DailyForm::OnCustomdrawList(NMHDR* pNMHDR, LRESULT* pResult)
  1605. {
  1606. NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>(pNMHDR);
  1607. // Take the default processing unless we set this to something else below.
  1608. *pResult = 0;
  1609. // First thing - check the draw stage. If it's the control's prepaint
  1610. // stage, then tell Windows we want messages for every item.
  1611. if (CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage)
  1612. {
  1613. *pResult = CDRF_NOTIFYITEMDRAW;
  1614. }
  1615. else if (CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage)
  1616. {
  1617. // This is the prepaint stage for an item. Here's where we set the
  1618. // item's text color. Our return value will tell Windows to draw the
  1619. // item itself, but it will use the new color we set here.
  1620. // We'll cycle the colors through red, green, and light blue.
  1621. if (m_List1.m_arLabels.ElementAt(pLVCD->nmcd.dwItemSpec).ElementAt(8).Find("已审核") == -1)
  1622. pLVCD->clrText = RGB(220, 0, 0);
  1623. else
  1624. pLVCD->clrText = RGB(20, 133, 20);
  1625. if (pLVCD->nmcd.dwItemSpec % 2)
  1626. pLVCD->clrTextBk = g_gridcol1;
  1627. else
  1628. pLVCD->clrTextBk = g_gridcol2;
  1629. // Store the color back in the NMLVCUSTOMDRAW struct.
  1630. // Tell Windows to paint the control itself.
  1631. *pResult = CDRF_DODEFAULT;
  1632. }
  1633. }
  1634. void DailyForm::OnBUTprint5()
  1635. {
  1636. // TODO: Add your control notification handler code here
  1637. CString str;
  1638. m_static1.GetWindowText(str);
  1639. // m_static1.SetWindowText (strdate+"("+sdate+")财务报表");
  1640. ListToXLS(&m_List1, "c:\\" + str + ".xls", 1);
  1641. }
  1642. void DailyForm::OnBUTprint4()
  1643. {
  1644. // TODO: Add your control notification handler code here
  1645. if (atoi(g_cominfoarray.ElementAt(0).ElementAt(115)))
  1646. {
  1647. SelExpendType dlg;
  1648. dlg.m_mode = 3;
  1649. if (dlg.DoModal() == IDOK)
  1650. {
  1651. m_jdd = dlg.m_sel;
  1652. FillGrid();
  1653. }
  1654. }
  1655. }
  1656. void DailyForm::KindChange2()
  1657. {
  1658. m_jdd = "";
  1659. CString str;
  1660. int pos = 0;
  1661. int dindanshu = 0;
  1662. float income = 0;
  1663. float income2 = 0;
  1664. float payout = 0;
  1665. int count = List2array.GetSize() + List3array.GetSize() + List11array.GetSize() + other2salearray.GetSize() + memberarray.GetSize();
  1666. m_List1array.RemoveAll();
  1667. m_List1array.SetSize(count);
  1668. int i = 0;
  1669. for (i = 0; i < memberarray.GetSize(); i++)
  1670. {
  1671. if (memberarray.ElementAt(i).ElementAt(6).IsEmpty())
  1672. memberarray.ElementAt(i).SetAt(6, "未审核");
  1673. memberarray.ElementAt(i).SetAt(0, memberarray.ElementAt(i).ElementAt(0) + ":4");
  1674. }
  1675. for (i = 0; i < List2array.GetSize(); i++)
  1676. {
  1677. if (List2array.ElementAt(i).ElementAt(10).IsEmpty())
  1678. List2array.ElementAt(i).SetAt(10, "未审核");
  1679. List2array.ElementAt(i).SetAt(0, List2array.ElementAt(i).ElementAt(0) + ":0");
  1680. }
  1681. for (i = 0; i < List3array.GetSize(); i++)
  1682. {
  1683. if (List3array.ElementAt(i).ElementAt(7).IsEmpty())
  1684. List3array.ElementAt(i).SetAt(7, "未审核");
  1685. List3array.ElementAt(i).SetAt(0, List3array.ElementAt(i).ElementAt(0) + ":1");
  1686. }
  1687. for (i = 0; i < List11array.GetSize(); i++)
  1688. {
  1689. if (List11array.ElementAt(i).ElementAt(11).IsEmpty())
  1690. List11array.ElementAt(i).SetAt(11, "未审核");
  1691. List11array.ElementAt(i).SetAt(10, List11array.ElementAt(i).ElementAt(10) + ":2");
  1692. }
  1693. for (i = 0; i < other2salearray.GetSize(); i++)
  1694. {
  1695. if (other2salearray.ElementAt(i).ElementAt(9).IsEmpty())
  1696. other2salearray.ElementAt(i).SetAt(9, "未审核");
  1697. other2salearray.ElementAt(i).SetAt(8, other2salearray.ElementAt(i).ElementAt(8) + ":3");
  1698. }
  1699. //if(m_radio1==2)//营业收入
  1700. {
  1701. for (i = 0; i < List11array.GetSize(); i++)
  1702. {
  1703. if (List11array.ElementAt(i).ElementAt(5) != "客服二销")continue;
  1704. str = List11array.ElementAt(i).ElementAt(0);
  1705. str += ";" + List11array.ElementAt(i).ElementAt(3);
  1706. if (!List11array.ElementAt(i).ElementAt(1).IsEmpty())
  1707. {
  1708. str += ";客户:" + List11array.ElementAt(i).ElementAt(1);
  1709. if (!List11array.ElementAt(i).ElementAt(2).IsEmpty())
  1710. str += "," + List11array.ElementAt(i).ElementAt(2);
  1711. }
  1712. else
  1713. str += ";客户:" + List11array.ElementAt(i).ElementAt(2);
  1714. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(10));
  1715. m_List1array.ElementAt(pos).Add(str);
  1716. str = List11array.ElementAt(i).ElementAt(4);
  1717. m_List1array.ElementAt(pos).Add(str);
  1718. income += atof(str);
  1719. income2 += atof(str);
  1720. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(5));
  1721. m_List1array.ElementAt(pos).Add("收入");
  1722. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(7) + " " + List11array.ElementAt(i).ElementAt(13));
  1723. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(8));
  1724. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(9));
  1725. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(11));
  1726. m_List1array.ElementAt(pos).Add(List11array.ElementAt(i).ElementAt(12));
  1727. pos++;
  1728. }
  1729. }
  1730. m_List1array.SetSize(pos);
  1731. str.Format("%0.2f", income);
  1732. ::ConvertToPrice(str);
  1733. SetDlgItemText(IDC_EDITmoney1, str);
  1734. str.Format("%0.2f", income);
  1735. ::ConvertToPrice(str);
  1736. SetDlgItemText(IDC_EDITmoney5, str);
  1737. str.Format("%0.2f", 0);
  1738. ::ConvertToPrice(str);
  1739. SetDlgItemText(IDC_EDITmoney2, str);
  1740. str.Format("%0.2f", income);
  1741. ::ConvertToPrice(str);
  1742. SetDlgItemText(IDC_EDITmoney3, str);
  1743. str.Format("%d", 0);
  1744. SetDlgItemText(IDC_EDITmoney4, str);
  1745. FillGrid();
  1746. }
  1747. void DailyForm::OnSize(UINT nType, int cx, int cy)
  1748. {
  1749. MyFormView::OnSize(nType, cx, cy);
  1750. // TODO: 在此处添加消息处理程序代码
  1751. }