123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839 |
- // YearForm.cpp : implementation file
- //
- #include "stdafx.h"
- #include "ylgl.h"
- #include "YearForm.h"
- #include "MyMdi.H"
- #include "SelExpendType.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // YearForm
- IMPLEMENT_DYNCREATE(YearForm, MyFormView)
- YearForm::YearForm()
- : MyFormView(YearForm::IDD)
- {
- m_year = atoi(g_date.Mid (0,4));
- m_month = atoi(g_date.Mid (5,2));
- m_day = atoi(g_date.Mid (8,2));
- m_radio1 = 0;
- m_bInit=0;
- m_timestmap=0;
- m_radio2 = 0;
- m_bForKF=0;
- //}}AFX_DATA_INIT
- }
- YearForm::~YearForm()
- {
- }
- void YearForm::DoDataExchange(CDataExchange* pDX)
- {
- MyFormView::DoDataExchange(pDX);
- DDX_Control(pDX, IDC_SPIN3, m_spinday);
- DDX_Control(pDX, IDC_SPIN2, m_spinmonth);
- DDX_Control(pDX, IDC_SPIN1, m_spinyear);
- DDX_Control(pDX, IDC_LIST2, m_List1);
- DDX_Control(pDX, IDC_STATIC1, m_static1);
- DDX_Text(pDX, IDC_EDITyear, m_year);
- DDV_MinMaxUInt(pDX, m_year, 1900, 3000);
- DDX_Text(pDX, IDC_EDITmonth, m_month);
- DDV_MinMaxUInt(pDX, m_month, 1, 12);
- DDX_Text(pDX, IDC_EDITday, m_day);
- DDV_MinMaxUInt(pDX, m_day, 1, 31);
- DDX_Radio(pDX, IDC_RADIO3, m_radio1);
- DDX_Radio(pDX, IDC_RADIO14, m_radio2);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(YearForm, MyFormView)
- ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
- ON_EN_CHANGE(IDC_EDITyear, OnChangeEDITyear)
- ON_EN_CHANGE(IDC_EDITmonth, OnChangeEDITmonth)
- ON_EN_CHANGE(IDC_EDITday, OnChangeEDITday)
- ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
- ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
- ON_BN_CLICKED(IDC_RADIO5, OnRadio5)
- ON_BN_CLICKED(IDC_RADIO6, OnRadio6)
- ON_BN_CLICKED(IDC_RADIO7, OnRadio7)
- ON_BN_CLICKED(IDC_RADIO8, OnRadio8)
- ON_BN_CLICKED(IDC_RADIO9, OnRadio9)
- ON_BN_CLICKED(IDC_RADIO10, OnRadio10)
- ON_BN_CLICKED(IDC_RADIO11, OnRadio11)
- ON_BN_CLICKED(IDC_RADIO12, OnRadio12)
- ON_BN_CLICKED(IDC_RADIO13, OnRadio13)
- ON_BN_CLICKED(IDC_BUTprint, OnBUTprint)
- ON_BN_CLICKED(IDC_BUTprint5, OnBUTprint5)
- ON_BN_CLICKED(IDC_BUTprint4, OnBUTprint4)
- ON_BN_CLICKED(IDC_RADIO14, OnRadio14)
- ON_BN_CLICKED(IDC_RADIO15, OnRadio15)
- //}}AFX_MSG_MAP
- ON_NOTIFY(NM_CUSTOMDRAW, IDC_LIST2, OnCustomdrawList)
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // YearForm diagnostics
- #ifdef _DEBUG
- void YearForm::AssertValid() const
- {
- MyFormView::AssertValid();
- }
- void YearForm::Dump(CDumpContext& dc) const
- {
- MyFormView::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // YearForm message handlers
- void YearForm::OnInitialUpdate()
- {
- MyFormView::OnInitialUpdate();
- // TODO: Add your specialized code here and/or call the base class
- #ifdef DDF_VERSION
- GetDlgItem(IDC_STATIC10)->ShowWindow(SW_SHOW);
- GetDlgItem(IDC_RADIO14)->ShowWindow(SW_SHOW);
- GetDlgItem(IDC_RADIO15)->ShowWindow(SW_SHOW);
- #endif
- CMyMdi Mdi;
- Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
-
- // Here we create the outbar control using the splitter as its parent
- // and setting its id to the first pane.
- CRect rc2;
- GetWindowRect(rc2);
- ::MoveWindow(m_hWnd,g_rc.left,g_rc.top,g_rc.Width(),g_rc.Height(),TRUE);
- EnumChildWindows(m_hWnd,(WNDENUMPROC)EnumChildProc,0);
- m_static1.SetFont (&g_titlefont);
- if(atoi(g_cominfoarray.ElementAt(0).ElementAt(115)))
- GetDlgItem(IDC_BUTprint4)->ShowWindow(SW_SHOW);
- if(atoi(g_cominfoarray.ElementAt(0).ElementAt(115)))
- m_List1.SetHeadings("id,0;项目名称,300;金额,100;项目类别,100;收入/支出,100;日期,100;支付方式,100;收银,100;财务审核,100;接单点,100" );
- else
- m_List1.SetHeadings("id,0;项目名称,300;金额,100;项目类别,100;收入/支出,100;日期,100;支付方式,100;收银,100;财务审核,100" );
- m_List1.LoadColumnInfo (107);
-
- m_spinyear.SetRange (1900, 3000);
- m_spinmonth.SetRange (1, 12);
- m_spinday.SetRange (1, 31);
-
- m_bInit=1;
- DateChange();
- }
- void YearForm::FillGrid()
- {
- m_List1.DeleteAllItems2 ();
- int ii=0;
- m_List1.m_arLabels.SetSize( m_List1array.GetSize (), 1 );
- int count=0;
- CString str;
- if(m_filter.IsEmpty () && m_jdd.IsEmpty ())
- {
- for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
- {
- m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
- }
- }
- else if(m_jdd.IsEmpty ()==0)
- {
- float income=0;
- int dindanshu=0;
- for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
- {
- if(m_List1array.ElementAt (ii).ElementAt (9)==m_jdd)
- {
- m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
- income+=atof(m_List1array.ElementAt (ii).ElementAt (2));
- if(m_List1array.ElementAt (ii).ElementAt (3)=="预约收款")
- dindanshu++;
- }
- }
- CString str;
- str.Format ("%0.2f", income);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney1, str);
- str.Format ("%0.2f", income);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney5, str);
- str.Format ("%0.2f", 0);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney2, str);
- str.Format ("%0.2f", income);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney3, str);
- str.Format ("%d", dindanshu);
- SetDlgItemText(IDC_EDITmoney4, str);
- }
- else
- {
- float payout=0;
- for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
- {
- if(m_List1array.ElementAt (ii).ElementAt (1).Find (m_filter+";")!=-1)
- {
- m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
-
- payout+=atof(m_List1array.ElementAt (ii).ElementAt (2));
- }
- }
- str.Format ("%0.2f", payout);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney2, str);
- str.Format ("%0.2f", -payout);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney3, str);
- }
- m_List1.m_arLabels.SetSize(count, 1);
- ii=count;
- m_List1.m_LabelCount=ii;
- m_List1.SetItemCountEx (ii);
-
- str.Format ("单数:%d", ii);
- SetDlgItemText(IDC_STATIC2, str);
- CRect rc;
- GetDlgItem(IDC_STATIC2)->GetWindowRect (rc);
- ScreenToClient(rc);
- InvalidateRect(rc);
- }
- void YearForm::OnBUTclose()
- {
- // TODO: Add your control notification handler code here
- GetParent()->SendMessage(WM_CLOSE);
- }
- void YearForm::OnChangeEDITyear()
- {
- // TODO: If this is a RICHEDIT control, the control will not
- // send this notification unless you override the MyFormView::OnInitDialog()
- // function and call CRichEditCtrl().SetEventMask()
- // with the ENM_CHANGE flag ORed into the mask.
- DateChange();
- // TODO: Add your control notification handler code here
- }
- void YearForm::OnChangeEDITmonth()
- {
- // TODO: If this is a RICHEDIT control, the control will not
- // send this notification unless you override the MyFormView::OnInitDialog()
- // function and call CRichEditCtrl().SetEventMask()
- // with the ENM_CHANGE flag ORed into the mask.
- // DateChange();
- // TODO: Add your control notification handler code here
- }
- void YearForm::OnChangeEDITday()
- {
- // TODO: If this is a RICHEDIT control, the control will not
- // send this notification unless you override the MyFormView::OnInitDialog()
- // function and call CRichEditCtrl().SetEventMask()
- // with the ENM_CHANGE flag ORed into the mask.
- // DateChange();
- // TODO: Add your control notification handler code here
- }
- void YearForm::DateChange()
- {
- if(m_bInit==0)return;
- m_spinyear.EnableWindow(0);
- m_spinmonth.EnableWindow(0);
- m_spinday.EnableWindow(0);
- UpdateData();
- int i;
- int g_nYearposTemp=g_nYearpos;
- BOOL bLastYear=0;
- BOOL bThisYear=0;
- if(m_year==atoi(g_date.Left (4)) && g_hisyeararray.GetSize () )
- bThisYear=1;
- else if(m_year<=atoi(g_date.Left (4))-1 && g_hisyeararray.GetSize ())
- bLastYear=1;
- g_nYearpos=GetYearPos(m_year);
- int g_nYearposPre=GetYearPos(m_year-1);
- g_sendhead.bsql=0;
- g_sendhead.code[0]=14;
- g_sendhead.code[1]=13;
- g_sendhead.code[2]=16;
- g_sendhead.code[3]=198;
- g_sendhead.code[4]=216;
- g_sendhead.tabcount=5;
- CString sql,strdate,strdate2;
- strdate.Format ("%04d-%02d-%02d", m_year, 1, 1);
- strdate2.Format ("%04d-%02d-%02d", m_year, 12, 31);
- CRect rc;
- m_static1.GetWindowRect (rc);
- ScreenToClient(rc);
- InvalidateRect(rc);
- m_static1.SetWindowText (strdate.Left (4)+"年财务表");
- sql.Format ("dat>='"+strdate+"' and dat<='"+strdate2+"' and (sale2type is null or sale2type='');dat>='"+strdate+"' and dat<='"+strdate2+"';date>='"+strdate+"' and date<='"+strdate2+"';date>='"+strdate+"' and date<='"+strdate2+"';date>='"+strdate+"' and date<='"+strdate2+"'");
- g_pMainWnd->ProcessChatMessageRequest2(sql);
- if(g_bSendOK==0)
- {
- g_nYearpos=g_nYearposTemp;
- m_spinyear.EnableWindow(1);
- m_spinmonth.EnableWindow(1);
- m_spinday.EnableWindow(1);
- return;
- }
- DataToArray(&List2array,&List3array,&List11array,&other2salearray,&memberarray);
- if(bLastYear)//如果是去年, 则加今年的补款
- {
- g_nYearpos=-1;//今年
- g_sendhead.bsql=0;
- g_sendhead.code[0]=14;
- g_sendhead.code[1]=13;
- g_sendhead.code[2]=16;
- g_sendhead.code[3]=198;
- g_sendhead.code[4]=216;
- g_sendhead.tabcount=5;
- g_pMainWnd->ProcessChatMessageRequest2(sql);
- if(g_bSendOK==0)
- {
- g_nYearpos=g_nYearposTemp;
- m_spinyear.EnableWindow(1);
- m_spinmonth.EnableWindow(1);
- m_spinday.EnableWindow(1);
- return;
- }
- CArray<CStringArray, CStringArray>ThisYearList11array;
- CArray<CStringArray, CStringArray>ThisYearList3array;
- CArray<CStringArray, CStringArray>ThisYearList2array;
- CArray<CStringArray, CStringArray>ThisYearother2salearray;
- CArray<CStringArray, CStringArray>ThisYearmemberarray;
- DataToArray(&ThisYearList2array, &ThisYearList3array, &ThisYearList11array, &ThisYearother2salearray, &ThisYearmemberarray);
- int oldsize=List11array.GetSize ();
- List11array.SetSize(oldsize+ThisYearList11array.GetSize ());
- for(i=oldsize; i<oldsize+ThisYearList11array.GetSize (); i++)
- {
- List11array.ElementAt (i).Copy(ThisYearList11array.ElementAt (i-oldsize));
- }
- oldsize=List3array.GetSize ();
- List3array.SetSize(oldsize+ThisYearList3array.GetSize ());
- for(i=oldsize; i<oldsize+ThisYearList3array.GetSize (); i++)
- {
- List3array.ElementAt (i).Copy(ThisYearList3array.ElementAt (i-oldsize));
- }
- oldsize=List2array.GetSize ();
- List2array.SetSize(oldsize+ThisYearList2array.GetSize ());
- for(i=oldsize; i<oldsize+ThisYearList2array.GetSize (); i++)
- {
- List2array.ElementAt (i).Copy(ThisYearList2array.ElementAt (i-oldsize));
- }
- oldsize=other2salearray.GetSize ();
- other2salearray.SetSize(oldsize+ThisYearother2salearray.GetSize ());
- for(i=oldsize; i<oldsize+ThisYearother2salearray.GetSize (); i++)
- {
- other2salearray.ElementAt (i).Copy(ThisYearother2salearray.ElementAt (i-oldsize));
- }
- oldsize=memberarray.GetSize ();
- memberarray.SetSize(oldsize+ThisYearmemberarray.GetSize ());
- for(i=oldsize; i<oldsize+ThisYearmemberarray.GetSize (); i++)
- {
- memberarray.ElementAt (i).Copy(ThisYearmemberarray.ElementAt (i-oldsize));
- }
- }
- if(g_nYearposPre!=-1)//如果是今年, 则加去年的补款
- {
- g_nYearpos=g_nYearposPre;//去年
- g_sendhead.bsql=0;
- g_sendhead.code[0]=14;
- g_sendhead.code[1]=13;
- g_sendhead.code[2]=16;
- g_sendhead.code[3]=198;
- g_sendhead.tabcount=4;
- g_pMainWnd->ProcessChatMessageRequest2(sql);
- if(g_bSendOK==0)
- {
- g_nYearpos=g_nYearposTemp;
- m_spinyear.EnableWindow(1);
- m_spinmonth.EnableWindow(1);
- m_spinday.EnableWindow(1);
- return;
- }
- CArray<CStringArray, CStringArray>ThisYearList11array;
- CArray<CStringArray, CStringArray>ThisYearList3array;
- CArray<CStringArray, CStringArray>ThisYearList2array;
- CArray<CStringArray, CStringArray>ThisYearother2salearray;
- DataToArray(&ThisYearList2array, &ThisYearList3array, &ThisYearList11array, &ThisYearother2salearray);
- int oldsize=List11array.GetSize ();
- List11array.SetSize(oldsize+ThisYearList11array.GetSize ());
- for(i=oldsize; i<oldsize+ThisYearList11array.GetSize (); i++)
- {
- List11array.ElementAt (i).Copy(ThisYearList11array.ElementAt (i-oldsize));
- }
-
- oldsize=List3array.GetSize ();
- List3array.SetSize(oldsize+ThisYearList3array.GetSize ());
- for(i=oldsize; i<oldsize+ThisYearList3array.GetSize (); i++)
- {
- List3array.ElementAt (i).Copy(ThisYearList3array.ElementAt (i-oldsize));
- }
-
- oldsize=List2array.GetSize ();
- List2array.SetSize(oldsize+ThisYearList2array.GetSize ());
- for(i=oldsize; i<oldsize+ThisYearList2array.GetSize (); i++)
- {
- List2array.ElementAt (i).Copy(ThisYearList2array.ElementAt (i-oldsize));
- }
-
- oldsize=other2salearray.GetSize ();
- other2salearray.SetSize(oldsize+ThisYearother2salearray.GetSize ());
- for(i=oldsize; i<oldsize+ThisYearother2salearray.GetSize (); i++)
- {
- other2salearray.ElementAt (i).Copy(ThisYearother2salearray.ElementAt (i-oldsize));
- }
- }
- g_nYearpos=g_nYearposTemp;
- KindChange();
- m_spinyear.EnableWindow(1);
- m_spinmonth.EnableWindow(1);
- m_spinday.EnableWindow(1);
- }
- void YearForm::KindChange()
- {
- if(m_bForKF)
- {
- KindChange2();
- return;
- }
- m_jdd="";
- CString str;
- int pos=0;
- int dindanshu=0;
- float income=0;
- float income2=0;
- float payout=0;
- int count=List2array.GetSize ()+List3array.GetSize ()+List11array.GetSize ()+other2salearray.GetSize ()+memberarray.GetSize ();
- m_List1array.RemoveAll ();
- m_List1array.SetSize(count);
- int i=0;
-
- if(m_radio1==3)
- {
- if(payoutdlg.GetSafeHwnd ()==NULL)
- {
- payoutdlg.Create (IDD_DLGPayOutSet, this);
- CRect rc;
- m_List1.GetWindowRect (rc);
- payoutdlg.MoveWindow2 (rc);
- payoutdlg.m_pParent=this;
- payoutdlg.m_mode=1;
- }
- payoutdlg.ShowWindow (SW_SHOW);
- }
- else
- {
- m_filter.Empty ();
- if(payoutdlg.GetSafeHwnd ())payoutdlg.ShowWindow (SW_HIDE);
- }
-
- for(i=0; i<memberarray.GetSize (); i++)
- {
- if(memberarray.ElementAt (i).ElementAt (6).IsEmpty ())
- memberarray.ElementAt (i).SetAt (6, "未审核");
- memberarray.ElementAt (i).SetAt (0, memberarray.ElementAt (i).ElementAt (0)+":4");
- }
- for(i=0; i<List2array.GetSize (); i++)
- {
- if(List2array.ElementAt (i).ElementAt (10).IsEmpty ())
- List2array.ElementAt (i).SetAt (10, "未审核");
- List2array.ElementAt (i).SetAt (0, List2array.ElementAt (i).ElementAt (0)+":0");
- }
- for(i=0; i<List3array.GetSize (); i++)
- {
- if(List3array.ElementAt (i).ElementAt (7).IsEmpty ())
- List3array.ElementAt (i).SetAt (7, "未审核");
- List3array.ElementAt (i).SetAt (0, List3array.ElementAt (i).ElementAt (0)+":1");
- }
- for(i=0; i<List11array.GetSize (); i++)
- {
- if(List11array.ElementAt (i).ElementAt (11).IsEmpty ())
- List11array.ElementAt (i).SetAt (11, "未审核");
- List11array.ElementAt (i).SetAt (10, List11array.ElementAt (i).ElementAt (10)+":2");
- }
- for(i=0; i<other2salearray.GetSize (); i++)
- {
- if(other2salearray.ElementAt (i).ElementAt (9).IsEmpty ())
- other2salearray.ElementAt (i).SetAt (9, "未审核");
- other2salearray.ElementAt (i).SetAt (8, other2salearray.ElementAt (i).ElementAt (8)+":3");
- }
- if(m_radio1==0)
- {
- for( i=0; i<List11array.GetSize (); i++)
- {
- #ifdef DDF_VERSION
- if(List11array.ElementAt (i).ElementAt (5)=="客服二销")continue;
- #endif
- str=List11array.ElementAt (i).ElementAt (0);
- str+=";"+List11array.ElementAt (i).ElementAt (3);
- if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
- {
- str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
- if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
- str+=","+List11array.ElementAt (i).ElementAt (2);
- }
- else
- str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
-
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(str);
- str=List11array.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if ( List11array.ElementAt(i).ElementAt(8) != "储值卡扣款") // 储值卡扣款;
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
- if(List11array.ElementAt (i).ElementAt (5)=="预约收款")
- dindanshu++;
- pos++;
- }
-
-
- for( i=0; i<List2array.GetSize (); i++)
- {
- if(List2array.ElementAt (i).ElementAt (7).GetLength ()>120)
- List2array.ElementAt (i).SetAt (7, List2array.ElementAt (i).ElementAt (7).Left (120)+"..");
-
- str=List2array.ElementAt (i).ElementAt (1)+";"+List2array.ElementAt (i).ElementAt (4)+";"+List2array.ElementAt (i).ElementAt (6)+";"+List2array.ElementAt (i).ElementAt (7);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=List2array.ElementAt (i).ElementAt (2);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- #else
- if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
- {
- income+=atof(str);
- }
- #endif
- if(List2array.ElementAt (i).ElementAt (8)!="")
- {
- income2+=atof(str);
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (8));
- }
- else
- m_List1array.ElementAt (pos).Add("其它收入");
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (3)+" "+List2array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- for( i=0; i<other2salearray.GetSize (); i++)
- {
- str=other2salearray.ElementAt (i).ElementAt (0)+";"+other2salearray.ElementAt (i).ElementAt (1)+";"+other2salearray.ElementAt (i).ElementAt (2);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(str);
- str=other2salearray.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if (other2salearray.ElementAt(i).ElementAt(7) !="储值卡扣款")
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (3));
-
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (5)+" "+other2salearray.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (7));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (6));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (11));
- pos++;
- }
-
- for( i=0; i<List3array.GetSize (); i++)
- {
- if(List3array.ElementAt (i).ElementAt (6).GetLength ()>120)
- List3array.ElementAt (i).SetAt (6, List3array.ElementAt (i).ElementAt (6).Left (120)+"..");
-
- str=List3array.ElementAt (i).ElementAt (1)+";"+List3array.ElementAt (i).ElementAt (4)+";"+List3array.ElementAt (i).ElementAt (6);
- str.Replace (";;;;", ";");str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(List3array.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=List3array.ElementAt (i).ElementAt (2);
- m_List1array.ElementAt (pos).Add(str);
- payout+=atof(str);
- m_List1array.ElementAt (pos).Add("固定费用");
- m_List1array.ElementAt (pos).Add("支出");
- m_List1array.ElementAt (pos).Add(List3array.ElementAt (i).ElementAt (3)+" "+List3array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add("现金");
- m_List1array.ElementAt (pos).Add(List3array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(List3array.ElementAt (i).ElementAt (7));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- for( i=0; i<memberarray.GetSize (); i++)
- {
- str=memberarray.ElementAt (i).ElementAt (1)+";"+memberarray.ElementAt (i).ElementAt (5)+";客户:"+memberarray.ElementAt (i).ElementAt (2);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=memberarray.ElementAt (i).ElementAt (3);
- m_List1array.ElementAt (pos).Add(str);
- income+=atof(str);
- m_List1array.ElementAt (pos).Add("会员充值");
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (4)+" "+memberarray.ElementAt (i).ElementAt (8));
-
- if(memberarray.ElementAt (i).ElementAt (7)=="")
- m_List1array.ElementAt (pos).Add("现金");
- else
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (7));
-
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (6));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
-
- }
- else if(m_radio1==1)//收入
- {
- for( i=0; i<List11array.GetSize (); i++)
- {
- #ifdef DDF_VERSION
- if(List11array.ElementAt (i).ElementAt (5)=="客服二销")continue;
- #endif
- str=List11array.ElementAt (i).ElementAt (0);
- str+=";"+List11array.ElementAt (i).ElementAt (3);
- if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
- {
- str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
- if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
- str+=","+List11array.ElementAt (i).ElementAt (2);
- }
- else
- str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
-
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(str);
- str=List11array.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if ( List11array.ElementAt(i).ElementAt(8) != "储值卡扣款") // 储值卡扣款;
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
- if(List11array.ElementAt (i).ElementAt (5)=="预约收款")
- dindanshu++;
- pos++;
- }
-
- for( i=0; i<List2array.GetSize (); i++)
- {
- if(List2array.ElementAt (i).ElementAt (7).GetLength ()>120)
- List2array.ElementAt (i).SetAt (7, List2array.ElementAt (i).ElementAt (7).Left (120)+"..");
- str=List2array.ElementAt (i).ElementAt (1)+";"+List2array.ElementAt (i).ElementAt (4)+";"+List2array.ElementAt (i).ElementAt (6)+";"+List2array.ElementAt (i).ElementAt (7);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=List2array.ElementAt (i).ElementAt (2);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- #else
- if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
- {
- income+=atof(str);
- }
- #endif
- if(List2array.ElementAt (i).ElementAt (8)!="")
- {
- income2+=atof(str);
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (8));
- }
- else
- m_List1array.ElementAt (pos).Add("其它收入");
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (3)+" "+List2array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- for( i=0; i<other2salearray.GetSize (); i++)
- {
- str=other2salearray.ElementAt (i).ElementAt (0)+";"+other2salearray.ElementAt (i).ElementAt (1)+";"+other2salearray.ElementAt (i).ElementAt (2);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(str);
- str=other2salearray.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if (other2salearray.ElementAt(i).ElementAt(7) !="储值卡扣款")
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (3));
-
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (5)+" "+other2salearray.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (7));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (6));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (11));
- pos++;
- }
- for( i=0; i<memberarray.GetSize (); i++)
- {
- str=memberarray.ElementAt (i).ElementAt (1)+";"+memberarray.ElementAt (i).ElementAt (5)+";客户:"+memberarray.ElementAt (i).ElementAt (2);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=memberarray.ElementAt (i).ElementAt (3);
- m_List1array.ElementAt (pos).Add(str);
- income+=atof(str);
- m_List1array.ElementAt (pos).Add("会员充值");
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (4)+" "+memberarray.ElementAt (i).ElementAt (8));
-
- if(memberarray.ElementAt (i).ElementAt (7)=="")
- m_List1array.ElementAt (pos).Add("现金");
- else
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (7));
-
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (6));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- }
- else if(m_radio1==2)//营业收入
- {
- for( i=0; i<List11array.GetSize (); i++)
- {
- #ifdef DDF_VERSION
- if(List11array.ElementAt (i).ElementAt (5)=="客服二销")continue;
- #endif
- str=List11array.ElementAt (i).ElementAt (0);
- str+=";"+List11array.ElementAt (i).ElementAt (3);
- if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
- {
- str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
- if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
- str+=","+List11array.ElementAt (i).ElementAt (2);
- }
- else
- str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
-
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(str);
- str=List11array.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if ( List11array.ElementAt(i).ElementAt(8) != "储值卡扣款") // 储值卡扣款;
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
- if(List11array.ElementAt (i).ElementAt (5)=="预约收款")
- dindanshu++;
- pos++;
- }
- for( i=0; i<List2array.GetSize (); i++)
- {
- if(List2array.ElementAt (i).ElementAt (8)!="")
- {
- if(List2array.ElementAt (i).ElementAt (7).GetLength ()>120)
- List2array.ElementAt (i).SetAt (7, List2array.ElementAt (i).ElementAt (7).Left (120)+"..");
- str=List2array.ElementAt (i).ElementAt (1)+";"+List2array.ElementAt (i).ElementAt (4)+";"+List2array.ElementAt (i).ElementAt (6)+";"+List2array.ElementAt (i).ElementAt (7);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=List2array.ElementAt (i).ElementAt (2);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (3)+" "+List2array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- }
- for( i=0; i<other2salearray.GetSize (); i++)
- {
- str=other2salearray.ElementAt (i).ElementAt (0)+";"+other2salearray.ElementAt (i).ElementAt (1)+";"+other2salearray.ElementAt (i).ElementAt (2);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(str);
- str=other2salearray.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if (other2salearray.ElementAt(i).ElementAt(7) !="储值卡扣款")
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (3));
-
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (5)+" "+other2salearray.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (7));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (6));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (11));
- pos++;
- }
- }
- else if(m_radio1==3)//支出
- {
- for( i=0; i<List3array.GetSize (); i++)
- {
- if(List3array.ElementAt (i).ElementAt (6).GetLength ()>120)
- List3array.ElementAt (i).SetAt (6, List3array.ElementAt (i).ElementAt (6).Left (120)+"..");
- str=List3array.ElementAt (i).ElementAt (1)+";"+List3array.ElementAt (i).ElementAt (4)+";"+List3array.ElementAt (i).ElementAt (6);
- str.Replace (";;;;", ";");str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(List3array.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=List3array.ElementAt (i).ElementAt (2);
- m_List1array.ElementAt (pos).Add(str);
- payout+=atof(str);
- m_List1array.ElementAt (pos).Add("固定费用");
- m_List1array.ElementAt (pos).Add("支出");
- m_List1array.ElementAt (pos).Add(List3array.ElementAt (i).ElementAt (3)+" "+List3array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add("现金");
- m_List1array.ElementAt (pos).Add(List3array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(List3array.ElementAt (i).ElementAt (7));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- }
- else if(m_radio1==4)//定单
- {
- for( i=0; i<List11array.GetSize (); i++)
- {
- if(List11array.ElementAt (i).ElementAt (5)!="预约收款")continue;
- dindanshu++;
- str=List11array.ElementAt (i).ElementAt (0);
- str+=";"+List11array.ElementAt (i).ElementAt (3);
- if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
- {
- str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
- if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
- str+=","+List11array.ElementAt (i).ElementAt (2);
- }
- else
- str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
-
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(str);
- str=List11array.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if ( List11array.ElementAt(i).ElementAt(8) != "储值卡扣款") // 储值卡扣款;
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
- pos++;
- }
- }
- else if(m_radio1==5)//补款
- {
- for( i=0; i<List11array.GetSize (); i++)
- {
- if(List11array.ElementAt (i).ElementAt (5)!="预约补款")continue;
- str=List11array.ElementAt (i).ElementAt (0);
- str+=";"+List11array.ElementAt (i).ElementAt (3);
- if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
- {
- str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
- if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
- str+=","+List11array.ElementAt (i).ElementAt (2);
- }
- else
- str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
-
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(str);
- str=List11array.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if ( List11array.ElementAt(i).ElementAt(8) != "储值卡扣款") // 储值卡扣款;
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
- pos++;
- }
- }
- else if(m_radio1==6)//摄影二销
- {
- for( i=0; i<List11array.GetSize (); i++)
- {
- if(List11array.ElementAt (i).ElementAt (5)!="摄影二销")continue;
- str=List11array.ElementAt (i).ElementAt (0);
- str+=";"+List11array.ElementAt (i).ElementAt (3);
- if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
- {
- str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
- if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
- str+=","+List11array.ElementAt (i).ElementAt (2);
- }
- else
- str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
-
-
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(str);
- str=List11array.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if ( List11array.ElementAt(i).ElementAt(8) != "储值卡扣款") // 储值卡扣款;
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
- pos++;
- }
- for( i=0; i<List2array.GetSize (); i++)
- {
- if(List2array.ElementAt (i).ElementAt (8)=="摄影二销")
- {
- if(List2array.ElementAt (i).ElementAt (7).GetLength ()>120)
- List2array.ElementAt (i).SetAt (7, List2array.ElementAt (i).ElementAt (7).Left (120)+"..");
- str=List2array.ElementAt (i).ElementAt (1)+";"+List2array.ElementAt (i).ElementAt (4)+";"+List2array.ElementAt (i).ElementAt (6)+";"+List2array.ElementAt (i).ElementAt (7);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=List2array.ElementAt (i).ElementAt (2);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (3)+" "+List2array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- }
- for( i=0; i<other2salearray.GetSize (); i++)
- {
- if(other2salearray.ElementAt (i).ElementAt (3)=="摄影二销")
- {
- str=other2salearray.ElementAt (i).ElementAt (0)+";"+other2salearray.ElementAt (i).ElementAt (1)+";"+other2salearray.ElementAt (i).ElementAt (2);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(str);
- str=other2salearray.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if (other2salearray.ElementAt(i).ElementAt(7) !="储值卡扣款")
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (3));
-
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (5)+" "+other2salearray.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (7));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (6));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (11));
- pos++;
- }
- }
-
- }
- else if(m_radio1==7)//化妆二销
- {
- for( i=0; i<List11array.GetSize (); i++)
- {
- if(List11array.ElementAt (i).ElementAt (5)!="化妆二销")continue;
- str=List11array.ElementAt (i).ElementAt (0);
- str+=";"+List11array.ElementAt (i).ElementAt (3);
- if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
- {
- str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
- if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
- str+=","+List11array.ElementAt (i).ElementAt (2);
- }
- else
- str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
-
-
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(str);
- str=List11array.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if ( List11array.ElementAt(i).ElementAt(8) != "储值卡扣款") // 储值卡扣款;
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
- pos++;
- }
- for( i=0; i<List2array.GetSize (); i++)
- {
- if(List2array.ElementAt (i).ElementAt (8)=="化妆二销")
- {
- if(List2array.ElementAt (i).ElementAt (7).GetLength ()>120)
- List2array.ElementAt (i).SetAt (7, List2array.ElementAt (i).ElementAt (7).Left (120)+"..");
- str=List2array.ElementAt (i).ElementAt (1)+";"+List2array.ElementAt (i).ElementAt (4)+";"+List2array.ElementAt (i).ElementAt (6)+";"+List2array.ElementAt (i).ElementAt (7);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=List2array.ElementAt (i).ElementAt (2);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (3)+" "+List2array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- }
- for( i=0; i<other2salearray.GetSize (); i++)
- {
- if(other2salearray.ElementAt (i).ElementAt (3)=="化妆二销")
- {
- str=other2salearray.ElementAt (i).ElementAt (0)+";"+other2salearray.ElementAt (i).ElementAt (1)+";"+other2salearray.ElementAt (i).ElementAt (2);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(str);
- str=other2salearray.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if (other2salearray.ElementAt(i).ElementAt(7) !="储值卡扣款")
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (3));
-
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (5)+" "+other2salearray.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (7));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (6));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (11));
- pos++;
- }
- }
-
- }
- else if(m_radio1==8)//套系升级二销
- {
- /* for( i=0; i<List11array.GetSize (); i++)
- {
- if(List11array.ElementAt (i).ElementAt (5)!="套系升级二销")continue;
- str=List11array.ElementAt (i).ElementAt (0);
- str+=";"+List11array.ElementAt (i).ElementAt (3);
- if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
- {
- str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
- if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
- str+=","+List11array.ElementAt (i).ElementAt (2);
-
- }
- else
- str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
-
-
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(str);
- str=List11array.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- income+=atof(str);
- income2+=atof(str);
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
- pos++;
- }
- for( i=0; i<List2array.GetSize (); i++)
- {
- if(List2array.ElementAt (i).ElementAt (8)=="套系升级二销")
- {
- if(List2array.ElementAt (i).ElementAt (7).GetLength ()>120)
- List2array.ElementAt (i).SetAt (7, List2array.ElementAt (i).ElementAt (7).Left (120)+"..");
- str=List2array.ElementAt (i).ElementAt (1)+";"+List2array.ElementAt (i).ElementAt (4)+";"+List2array.ElementAt (i).ElementAt (6)+";"+List2array.ElementAt (i).ElementAt (7);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=List2array.ElementAt (i).ElementAt (2);
- m_List1array.ElementAt (pos).Add(str);
- income+=atof(str);
- income2+=atof(str);
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (3)+" "+List2array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- }
- for( i=0; i<other2salearray.GetSize (); i++)
- {
- if(other2salearray.ElementAt (i).ElementAt (3)=="套系升级二销")
- {
- str=other2salearray.ElementAt (i).ElementAt (0)+";"+other2salearray.ElementAt (i).ElementAt (1)+";"+other2salearray.ElementAt (i).ElementAt (2);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(str);
- str=other2salearray.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- income+=atof(str);
- income2+=atof(str);
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (3));
-
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (5)+" "+other2salearray.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (7));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (6));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- }*/
-
- for( i=0; i<memberarray.GetSize (); i++)
- {
- str=memberarray.ElementAt (i).ElementAt (1)+";"+memberarray.ElementAt (i).ElementAt (5)+";客户:"+memberarray.ElementAt (i).ElementAt (2);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=memberarray.ElementAt (i).ElementAt (3);
- m_List1array.ElementAt (pos).Add(str);
- income+=atof(str);
- m_List1array.ElementAt (pos).Add("会员充值");
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (4)+" "+memberarray.ElementAt (i).ElementAt (8));
-
- if(memberarray.ElementAt (i).ElementAt (7)=="")
- m_List1array.ElementAt (pos).Add("现金");
- else
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (7));
-
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(memberarray.ElementAt (i).ElementAt (6));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- }
- else if(m_radio1==9)//选片加挑
- {
- for( i=0; i<List11array.GetSize (); i++)
- {
- if(List11array.ElementAt (i).ElementAt (5)!="选片二销")continue;
- str=List11array.ElementAt (i).ElementAt (0);
- str+=";"+List11array.ElementAt (i).ElementAt (3);
- if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
- {
- str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
- if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
- str+=","+List11array.ElementAt (i).ElementAt (2);
- }
- else
- str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
-
-
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(str);
- str=List11array.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if ( List11array.ElementAt(i).ElementAt(8) != "储值卡扣款") // 储值卡扣款;
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
-
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
- pos++;
- }
- for( i=0; i<List2array.GetSize (); i++)
- {
- if(List2array.ElementAt (i).ElementAt (8)=="选片二销")
- {
- if(List2array.ElementAt (i).ElementAt (7).GetLength ()>120)
- List2array.ElementAt (i).SetAt (7, List2array.ElementAt (i).ElementAt (7).Left (120)+"..");
- str=List2array.ElementAt (i).ElementAt (1)+";"+List2array.ElementAt (i).ElementAt (4)+";"+List2array.ElementAt (i).ElementAt (6)+";"+List2array.ElementAt (i).ElementAt (7);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=List2array.ElementAt (i).ElementAt (2);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (3)+" "+List2array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- }
- for( i=0; i<other2salearray.GetSize (); i++)
- {
- if(other2salearray.ElementAt (i).ElementAt (3)=="选片二销")
- {
- str=other2salearray.ElementAt (i).ElementAt (0)+";"+other2salearray.ElementAt (i).ElementAt (1)+";"+other2salearray.ElementAt (i).ElementAt (2);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(str);
- str=other2salearray.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- income2+=atof(str);
- #else
- if (other2salearray.ElementAt(i).ElementAt(7) !="储值卡扣款")
- {
- income+=atof(str);
- }
- income2+=atof(str);
- #endif
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (3));
-
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (5)+" "+other2salearray.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (7));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (6));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(other2salearray.ElementAt (i).ElementAt (11));
- pos++;
- }
- }
- }
- else if(m_radio1==10)//其它收入
- {
- for( i=0; i<List2array.GetSize (); i++)
- {
- if(List2array.ElementAt (i).ElementAt (8)!="")continue;
- if(List2array.ElementAt (i).ElementAt (7).GetLength ()>120)
- List2array.ElementAt (i).SetAt (7, List2array.ElementAt (i).ElementAt (7).Left (120)+"..");
- str=List2array.ElementAt (i).ElementAt (1)+";"+List2array.ElementAt (i).ElementAt (4)+";"+List2array.ElementAt (i).ElementAt (6)+";"+List2array.ElementAt (i).ElementAt (7);
- str.Replace (";;;", ";");str.Replace (";;", ";");
-
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (0));
- m_List1array.ElementAt (pos).Add(str);
- str=List2array.ElementAt (i).ElementAt (2);
- m_List1array.ElementAt (pos).Add(str);
- #if 0
- income+=atof(str);
- #else
- if (List2array.ElementAt(i).ElementAt(9) != "储值卡扣款")
- {
- income+=atof(str);
- }
- #endif
- m_List1array.ElementAt (pos).Add("其它收入");
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (3)+" "+List2array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add(List2array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(" ");
- pos++;
- }
- }
-
-
- m_List1array.SetSize(pos);
- str.Format ("%0.2f", income);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney1, str);
-
- str.Format ("%0.2f", income2);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney5, str);
-
- str.Format ("%0.2f", payout);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney2, str);
-
- str.Format ("%0.2f", income-payout);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney3, str);
-
- str.Format ("%d", dindanshu);
- SetDlgItemText(IDC_EDITmoney4, str);
- FillGrid();
- }
- void YearForm::OnRadio3()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio4()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio5()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio6()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- m_filter.Empty ();
- KindChange();
- }
- void YearForm::OnRadio7()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio8()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio9()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio10()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio11()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio12()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio13()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- KindChange();
- }
- void YearForm::OnBUTprint()
- {
- // TODO: Add your control notification handler code here
- if(m_List1.GetItemCount ()==0)
- {
- AfxMessageBox("无内容!", MB_ICONINFORMATION);
- return;
- }
- CArray<CStringArray, CStringArray>Listarray;
- CString str,temp;
- m_static1.GetWindowText (str);
- CString title=g_cominfoarray.ElementAt (0).ElementAt (10)+str;
- int count=m_List1.GetItemCount ()/45;
- if(m_List1.GetItemCount ()%45)count++;
- Listarray.SetSize(m_List1.GetItemCount ()+count, 1);
- int pos=0;
- float otherpaytype1=0;
- float otherpaytype2=0;
- float otherpaytype3=0;
- int addpos=1;
- for(int i=0; i<m_List1.GetItemCount (); i++)
- {
- if(i%45==0)
- {
- Listarray.ElementAt (pos).Add ("项目名称");
- Listarray.ElementAt (pos).Add ("金额");
- Listarray.ElementAt (pos).Add ("项目类别");
- Listarray.ElementAt (pos).Add ("收入/支出");
- pos++;
- }
- for(int j=0; j<3; j++)
- Listarray.ElementAt (pos).Add (m_List1.GetItemText (i, j+addpos));
-
- Listarray.ElementAt (pos).Add (m_List1.GetItemText (i, 3+addpos)+"/"+m_List1.GetItemText (i, 5+addpos));
- if(m_List1.GetItemText (i, 5+addpos)=="POS机刷卡")
- otherpaytype1+=atof(m_List1.GetItemText (i, 1+addpos));
- else if(m_List1.GetItemText (i, 5+addpos)=="储值卡扣款")
- otherpaytype2+=atof(m_List1.GetItemText (i, 1+addpos));
- else if(m_List1.GetItemText (i, 5+addpos)=="积分兑换")
- otherpaytype3+=atof(m_List1.GetItemText (i, 1+addpos));
- pos++;
- }
- Listarray.SetSize(pos, 1);
- str="总收入:";
- GetDlgItemText(IDC_EDITmoney1, temp);str+=temp;
- str+=" 营业收入:";
- GetDlgItemText(IDC_EDITmoney5, temp);str+=temp;
- str+=" 总支出:";
- GetDlgItemText(IDC_EDITmoney2, temp);str+=temp;
- str+=" 净收入:";
- GetDlgItemText(IDC_EDITmoney3, temp);str+=temp;
- str+=" 定单数:";
- GetDlgItemText(IDC_EDITmoney4, temp);str+=temp;
- str+="***";
- temp.Format ("POS机刷卡:%d", (int)otherpaytype1);
- str+=temp;
- temp.Format (" 储值卡扣款:%d", (int)otherpaytype2);
- str+=temp;
- temp.Format (" 积分兑换:%d", (int)otherpaytype3);
- str+=temp;
- CString ss;
- GetDlgItemText(IDC_EDITmoney3, ss);
- //temp.Format (" 现金:%d", (int) (atof(ss)-(otherpaytype1+otherpaytype2+otherpaytype3)) );
- temp.Format (" 柜台现金:%d", (int) (atof(ss)-(otherpaytype1+otherpaytype3)) );
- str+=temp;
- g_pMainWnd->PrintDailyForm(&Listarray, title, str);
- }
- void YearForm::TypeChange(CString str)
- {
- m_filter=str;
- FillGrid();
- }
- void YearForm::OnCustomdrawList ( NMHDR* pNMHDR, LRESULT* pResult )
- {
- NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );
- // Take the default processing unless we set this to something else below.
- *pResult = 0;
- // First thing - check the draw stage. If it's the control's prepaint
- // stage, then tell Windows we want messages for every item.
- if ( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )
- {
- *pResult = CDRF_NOTIFYITEMDRAW;
- }
- else if ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
- {
- // This is the prepaint stage for an item. Here's where we set the
- // item's text color. Our return value will tell Windows to draw the
- // item itself, but it will use the new color we set here.
- // We'll cycle the colors through red, green, and light blue.
- if(m_List1.m_arLabels.ElementAt (pLVCD->nmcd.dwItemSpec).ElementAt (8).Find("已审核")==-1)
- pLVCD->clrText = RGB(220,0,0);
- else
- pLVCD->clrText = RGB(20,133,20);
-
- if(pLVCD->nmcd.dwItemSpec%2)
- pLVCD->clrTextBk = g_gridcol1;
- else
- pLVCD->clrTextBk = g_gridcol2;
- // Store the color back in the NMLVCUSTOMDRAW struct.
- // Tell Windows to paint the control itself.
- *pResult = CDRF_DODEFAULT;
- }
- }
- void YearForm::OnBUTprint5()
- {
- // TODO: Add your control notification handler code here
- CString str;
- m_static1.GetWindowText(str);
- ListToXLS(&m_List1, "c:\\"+str+".xls", 1);
- }
- void YearForm::OnBUTprint4()
- {
- // TODO: Add your control notification handler code here
- if(atoi(g_cominfoarray.ElementAt(0).ElementAt(115)))
- {
- SelExpendType dlg;
- dlg.m_mode=3;
- if(dlg.DoModal()==IDOK)
- {
- m_jdd=dlg.m_sel;
- FillGrid();
- }
- }
- }
- void YearForm::OnRadio14()
- {
- // TODO: Add your control notification handler code here
- UpdateData();
- if(m_radio2==0)m_bForKF=0;
- else
- {
- m_bForKF=1;
- }
- KindChange();
- }
- void YearForm::OnRadio15()
- {
- // TODO: Add your control notification handler code here
- OnRadio14();
- }
- void YearForm::KindChange2()
- {
- m_jdd="";
- CString str;
- int pos=0;
- int dindanshu=0;
- float income=0;
- float income2=0;
- float payout=0;
- int count=List2array.GetSize ()+List3array.GetSize ()+List11array.GetSize ()+other2salearray.GetSize ()+memberarray.GetSize ();
- m_List1array.RemoveAll ();
- m_List1array.SetSize(count);
- int i=0;
- {
- m_filter.Empty ();
- if(payoutdlg.GetSafeHwnd ())payoutdlg.ShowWindow (SW_HIDE);
- }
- for(i=0; i<memberarray.GetSize (); i++)
- {
- if(memberarray.ElementAt (i).ElementAt (6).IsEmpty ())
- memberarray.ElementAt (i).SetAt (6, "未审核");
- memberarray.ElementAt (i).SetAt (0, memberarray.ElementAt (i).ElementAt (0)+":4");
- }
- for(i=0; i<List2array.GetSize (); i++)
- {
- if(List2array.ElementAt (i).ElementAt (10).IsEmpty ())
- List2array.ElementAt (i).SetAt (10, "未审核");
- List2array.ElementAt (i).SetAt (0, List2array.ElementAt (i).ElementAt (0)+":0");
- }
- for(i=0; i<List3array.GetSize (); i++)
- {
- if(List3array.ElementAt (i).ElementAt (7).IsEmpty ())
- List3array.ElementAt (i).SetAt (7, "未审核");
- List3array.ElementAt (i).SetAt (0, List3array.ElementAt (i).ElementAt (0)+":1");
- }
- for(i=0; i<List11array.GetSize (); i++)
- {
- if(List11array.ElementAt (i).ElementAt (11).IsEmpty ())
- List11array.ElementAt (i).SetAt (11, "未审核");
- List11array.ElementAt (i).SetAt (10, List11array.ElementAt (i).ElementAt (10)+":2");
- }
- for(i=0; i<other2salearray.GetSize (); i++)
- {
- if(other2salearray.ElementAt (i).ElementAt (9).IsEmpty ())
- other2salearray.ElementAt (i).SetAt (9, "未审核");
- other2salearray.ElementAt (i).SetAt (8, other2salearray.ElementAt (i).ElementAt (8)+":3");
- }
-
-
- //if(m_radio1==2)//营业收入
- {
- for( i=0; i<List11array.GetSize (); i++)
- {
- if(List11array.ElementAt (i).ElementAt (5)!="客服二销")continue;
- str=List11array.ElementAt (i).ElementAt (0);
- str+=";"+List11array.ElementAt (i).ElementAt (3);
- if(!List11array.ElementAt (i).ElementAt (1).IsEmpty ())
- {
- str+=";客户:"+List11array.ElementAt (i).ElementAt (1);
- if(!List11array.ElementAt (i).ElementAt (2).IsEmpty ())
- str+=","+List11array.ElementAt (i).ElementAt (2);
- }
- else
- str+=";客户:"+List11array.ElementAt (i).ElementAt (2);
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (10));
- m_List1array.ElementAt (pos).Add(str);
- str=List11array.ElementAt (i).ElementAt (4);
- m_List1array.ElementAt (pos).Add(str);
- income+=atof(str);
- income2+=atof(str);
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (5));
- m_List1array.ElementAt (pos).Add("收入");
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (7)+" "+List11array.ElementAt (i).ElementAt (13));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (8));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (9));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (11));
- m_List1array.ElementAt (pos).Add(List11array.ElementAt (i).ElementAt (12));
-
-
- pos++;
- }
- }
- m_List1array.SetSize(pos);
- str.Format ("%0.2f", income);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney1, str);
- str.Format ("%0.2f", income);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney5, str);
- str.Format ("%0.2f", 0);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney2, str);
- str.Format ("%0.2f", income);
- ::ConvertToPrice (str);
- SetDlgItemText(IDC_EDITmoney3, str);
- str.Format ("%d", 0);
- SetDlgItemText(IDC_EDITmoney4, str);
- FillGrid();
- }
|