1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915 |
- // 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
- 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;
- }
- 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);
- }
- 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)
- ON_BN_CLICKED(IDC_RADIO16, OnRadio16)
-
- ON_NOTIFY(NM_CUSTOMDRAW, IDC_LIST2, OnCustomdrawList)
- END_MESSAGE_MAP()
- #ifdef _DEBUG
- void YearForm::AssertValid() const
- {
- MyFormView::AssertValid();
- }
- void YearForm::Dump(CDumpContext& dc) const
- {
- MyFormView::Dump(dc);
- }
- #endif //_DEBUG
- void YearForm::OnInitialUpdate()
- {
- MyFormView::OnInitialUpdate();
- #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);
- 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);
- #ifdef CHILD_VERSION
- SetDlgItemText(IDC_RADIO10, _T("引导二销"));
- #endif
- 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;
- float payout = 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));
- if(m_List1array.ElementAt(ii).ElementAt(4) == _T("支出"))
- payout += atof(m_List1array.ElementAt(ii).ElementAt(2));
- else
- income += atof(m_List1array.ElementAt(ii).ElementAt(2));
- if (m_List1array.ElementAt(ii).ElementAt(3) == _T("预约收款"))
- 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", 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);
- }
- 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()
- {
- GetParent()->SendMessage(WM_CLOSE);
- }
- void YearForm::OnChangeEDITyear()
- {
- DateChange();
- }
- void YearForm::OnChangeEDITmonth()
- {
- }
- void YearForm::OnChangeEDITday()
- {
- }
- 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 JEFF_TEST_ON // 2015开始禁用跨年数据;
- int g_nYearposPre = -1;
- if (m_year >= 2014 && m_year <= atoi(g_date.Left(4)) && g_hisyeararray.GetSize())
- {
- g_nYearpos = -1;
- bThisYear = 1;
- if (m_year == 2014)
- {
- g_nYearposPre = GetYearPos(m_year - 1);
- }
- }
- else if (m_year <= 2013 && g_hisyeararray.GetSize())
- {
- g_nYearpos = GetYearPos(m_year);
- if (g_nYearpos != -1)
- g_nYearposPre = GetYearPos(m_year - 1);
- bLastYear = 1;
- }
- #else
- 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);
- #endif
- g_sendhead.bsql = 0;
- g_sendhead.code[0] = 14; // 其它收入数据表;
- g_sendhead.code[1] = 13; // 支出;
- g_sendhead.code[2] = 16; // 订单补款视图;
- g_sendhead.code[3] = 198; // 其它2销录入表;
- 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; // 其它2销录入表;
- 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; // 其它2销录入表;
- 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) != "储值卡扣款" && 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) != "储值卡扣款" && 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(List2array.ElementAt(i).ElementAt(12));
- 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) != "储值卡扣款" && 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);
- #if JEFF_TEST_ON
- m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(1));
- #else
- m_List1array.ElementAt(pos).Add("固定费用");
- #endif
- 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(List3array.ElementAt(i).ElementAt(12));
- 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) != "储值卡扣款" && 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) != "储值卡扣款" && 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(List2array.ElementAt(i).ElementAt(12));
- 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) != "储值卡扣款" && 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) != "储值卡扣款" && 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) != "储值卡扣款" && 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) != "储值卡扣款" && 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);
- #if JEFF_TEST_ON
- m_List1array.ElementAt(pos).Add(List3array.ElementAt(i).ElementAt(1));
- #else
- m_List1array.ElementAt(pos).Add("固定费用");
- #endif
- 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(List3array.ElementAt(i).ElementAt(12));
- 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) != "储值卡扣款" && 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) != "储值卡扣款" && 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) != "储值卡扣款" && 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) != "储值卡扣款" && List2array.ElementAt(i).ElementAt(8) != "代金券")
- {
- 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) != "储值卡扣款" && 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++)
- {
- #ifndef CHILD_VERSION
- if (List11array.ElementAt(i).ElementAt(5) != "化妆二销")continue;
- #else
- 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) != "储值卡扣款" && 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++)
- {
- #ifndef CHILD_VERSION
- if (List2array.ElementAt(i).ElementAt(8) == "化妆二销")
- #else
- if (List2array.ElementAt(i).ElementAt(8) == "引导二销")//"引导二销"
- #endif
- {
- 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) != "储值卡扣款" && 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++)
- {
- #ifndef CHILD_VERSION
- if (other2salearray.ElementAt(i).ElementAt(3) == "化妆二销")
- #else
- if (other2salearray.ElementAt(i).ElementAt(3) == "引导二销")//"引导二销"
- #endif
- {
- 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) != "储值卡扣款" && 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 < 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) != "储值卡扣款" && 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) != "储值卡扣款" && 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) != "储值卡扣款" && 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) != "储值卡扣款" && 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(List2array.ElementAt(i).ElementAt(12));
- pos++;
- }
- }
- else if (m_radio1 == 11)//其它二销
- {
- 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) != "储值卡扣款" && 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++;
- }
- }
- 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();
- PaymentMethodCount();
- }
- void YearForm::OnRadio3()
- {
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio4()
- {
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio5()
- {
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio6()
- {
- UpdateData();
- m_filter.Empty();
- KindChange();
- }
- void YearForm::OnRadio7()
- {
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio8()
- {
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio9()
- {
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio10()
- {
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio11()
- {
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio12()
- {
- UpdateData();
- KindChange();
- }
- void YearForm::OnRadio13()
- {
- UpdateData();
- KindChange();
- }
- void YearForm::OnBUTprint()
- {
- 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();
- PaymentMethodCount();
- }
- void YearForm::OnCustomdrawList(NMHDR* pNMHDR, LRESULT* pResult)
- {
- NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>(pNMHDR);
- *pResult = 0;
- if (CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage)
- {
- *pResult = CDRF_NOTIFYITEMDRAW;
- }
- else if (CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage)
- {
- 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;
- *pResult = CDRF_DODEFAULT;
- }
- }
- void YearForm::OnBUTprint5()
- {
- CString str;
- m_static1.GetWindowText(str);
- ListToXLS(&m_List1, "c:\\" + str + ".xls", 1);
- }
- void YearForm::OnBUTprint4()
- {
- if (atoi(g_cominfoarray.ElementAt(0).ElementAt(115)))
- {
- SelExpendType dlg;
- dlg.m_mode = 3;
- if (dlg.DoModal() == IDOK)
- {
- m_jdd = dlg.m_sel;
- FillGrid();
- PaymentMethodCount();
- }
- }
- }
- void YearForm::OnRadio14()
- {
- UpdateData();
- if (m_radio2 == 0)m_bForKF = 0;
- else
- {
- m_bForKF = 1;
- }
- KindChange();
- }
- void YearForm::OnRadio15()
- {
- OnRadio14();
- }
- void YearForm::OnRadio16()
- {
- UpdateData();
- KindChange();
- }
- 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();
- PaymentMethodCount();
- }
- //支付方式计算
- void YearForm::PaymentMethodCount()
- {
- int addpos = 1;
- float otherpaytype[9] = {0};
- float fIncome = 0; // 收入
- float fExpenditure = 0; // 支出
- CString strName = _T("");
- for (int i = 0; i < m_List1.GetItemCount(); i++)
- {
- if (m_List1.GetItemText(i, 5 + addpos) == "现金")
- {
- switch (m_radio1)
- {
- case 0: // 全部
- {
- if(m_List1.GetItemText(i, 3 + addpos) == _T("收入"))
- fIncome += atof(m_List1.GetItemText(i, 1 + addpos));
- else
- fExpenditure += atof(m_List1.GetItemText(i, 1 + addpos));
- }
- break;
- case 3: // 支出
- {
- fExpenditure += atof(m_List1.GetItemText(i, 1 + addpos));
- }
- break;
- default: // 只计算收入
- {
- fIncome += atof(m_List1.GetItemText(i, 1 + addpos));
- }
- break;
- }
- }
- else if (m_List1.GetItemText(i, 5 + addpos) == "POS机刷卡")
- otherpaytype[1] += atof(m_List1.GetItemText(i, 1 + addpos));
- else if (m_List1.GetItemText(i, 5 + addpos) == "银行转账")
- otherpaytype[2] += atof(m_List1.GetItemText(i, 1 + addpos));
- else if (m_List1.GetItemText(i, 5 + addpos) == "储值卡扣款")
- otherpaytype[3] += atof(m_List1.GetItemText(i, 1 + addpos));
- else if (m_List1.GetItemText(i, 5 + addpos) == "积分兑换")
- otherpaytype[4] += atof(m_List1.GetItemText(i, 1 + addpos));
- else if (m_List1.GetItemText(i, 5 + addpos) == "代金券")
- otherpaytype[5] += atof(m_List1.GetItemText(i, 1 + addpos));
- else if (m_List1.GetItemText(i, 5 + addpos) == "支付宝")
- otherpaytype[6] += atof(m_List1.GetItemText(i, 1 + addpos));
- else if (m_List1.GetItemText(i, 5 + addpos) == "财付通")
- otherpaytype[7] += atof(m_List1.GetItemText(i, 1 + addpos));
- else if (m_List1.GetItemText(i, 5 + addpos) == "微信支付")
- otherpaytype[8] += atof(m_List1.GetItemText(i, 1 + addpos));
- }
-
- // 计算现金
- CString strNum = _T("");
- CString strIncome = _T("");
- CString strExpenditure = _T("");
- switch (m_radio1)
- {
- case 0: // 全部
- {
- strIncome.Format(_T("%0.2f"), fIncome);
- ::ConvertToPrice(strIncome);
- strExpenditure.Format(_T("%0.2f"), fExpenditure);
- ::ConvertToPrice(strExpenditure);
- strName = _T("收入/支出现金:");
- strNum.Format(_T("%s/%s"), strIncome, strExpenditure);
- }
- break;
- case 3: // 支出
- {
- strExpenditure.Format(_T("%0.2f"), fExpenditure);
- ::ConvertToPrice(strExpenditure);
- strName = _T("支出现金:");
- strNum = strExpenditure;
- }
- break;
- default: // 只计算收入
- {
- strIncome.Format(_T("%0.2f"), fIncome);
- ::ConvertToPrice(strIncome);
- strName = _T("收入现金:");
- strNum = strIncome;
- }
- break;
- }
- ((CStatic*)GetDlgItem(IDC_STATIC_YCash))->SetWindowText(strName);
- SetDlgItemText(IDC_YCash_EDIT, strNum);
-
- strNum.Format(_T("%0.2f"), otherpaytype[1]);
- ::ConvertToPrice(strNum);
- SetDlgItemText(IDC_YPOS_EDIT, strNum);
-
- strNum.Format(_T("%0.2f"), otherpaytype[2]);
- ::ConvertToPrice(strNum);
- SetDlgItemText(IDC_YBANK_EDIT, strNum);
-
- strNum.Format(_T("%0.2f"), otherpaytype[3]);
- ::ConvertToPrice(strNum);
- SetDlgItemText(IDC_YBANKCARD_EDIT, strNum);
-
- strNum.Format(_T("%0.2f"), otherpaytype[4]);
- ::ConvertToPrice(strNum);
- SetDlgItemText(IDC_YIntegral_EDIT, strNum);
-
- strNum.Format(_T("%0.2f"), otherpaytype[5]);
- ::ConvertToPrice(strNum);
- SetDlgItemText(IDC_YVouchers_EDIT, strNum);
-
- strNum.Format(_T("%0.2f"), otherpaytype[6]);
- ::ConvertToPrice(strNum);
- SetDlgItemText(IDC_YAlipay_EDIT, strNum);
-
- strNum.Format(_T("%0.2f"), otherpaytype[7]);
- ::ConvertToPrice(strNum);
- SetDlgItemText(IDC_YTenpay_EDIT, strNum);
-
- strNum.Format(_T("%0.2f"), otherpaytype[8]);
- ::ConvertToPrice(strNum);
- SetDlgItemText(IDC_YWechatPayment_EDIT, strNum);
- }
|