| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013 |
- //
- // SalesDataAnalysisVC.m
- // IBOSS-HJ
- //
- // Created by 关宏厚 on 2020/12/30.
- // Copyright © 2020 elongtian. All rights reserved.
- //
- #import "SalesDataAnalysisVC.h"
- @interface SalesDataAnalysisVC ()
- {
- UIScrollView *scroll;
- UIView *content;
- UIView *salesStatusContent;
- CAShapeLayer *btnSalesStatusCustomMaskLayer;
- CAShapeLayer *btnSalesStatusRecentlyThirtyDaysMaskLayer;
- NSInteger topMargin;
- UIView *vDate;
- UIView *collectionContent;
- UIView *salesAmountContent;
- UIView *orderStatusContent;
- UIView *repairStatusContent;
-
- UIView *shoppingGuideFilingContent;
-
- UIView *deliveryStatusContent;
-
- UIView *installStatusContent;
-
- UIView *salesAchievementContent;
- UIView *nextThreeDaysNeedDeliveyCountView;
- UIView *orderAmountContent;
- UILabel *lblSalesAmount;
- UILabel *lblCollectionAmount;
- UILabel *lblSalesAddCustomer;
-
- UILabel *lblOrderCustomerCount;
-
- UILabel *lblUnsubscribeCustomerCount;
-
- UILabel *lblOrderAmount;
-
- UILabel *lblUnsubscribeAmount;
-
- UIView *vCollectionStatusDate;
-
- UILabel *lblSalesCustomerCount;
-
- UILabel *lblSalesAchievementPercent;
-
- CAShapeLayer *btnSalesStatusChannelMaskLayer;
-
- CAShapeLayer *btnSalesStatusDepartmentMaskLayer;
-
- CAShapeLayer *btnCollectionStatusChannelMaskLayer;
-
- CAShapeLayer *btnCollectionStatusDepartmentMaskLayer;
-
- CAShapeLayer *btnCollectionStatusCustomMaskLayer;
- CAShapeLayer *btnCollectionStatusRecentlyThirtyDaysMaskLayer;
-
- UIView *collectionAmountContent;
-
- CAShapeLayer *btnOrderStatusCustomMaskLayer;
- CAShapeLayer *btnOrderStatusRecentlyThirtyDaysMaskLayer;
-
-
- CAShapeLayer *btnOrderStatusChannelMaskLayer;
-
- CAShapeLayer *btnOrderStatusDepartmentMaskLayer;
-
- CAShapeLayer *btnSalesAchievementCustomMaskLayer;
-
- CAShapeLayer *btnSalesAchievementCurrentMonthMaskLayer;
-
- UIView *vOrderStatusDate;
-
- UILabel *lblSalesAchievementPlanAmount;
-
- UILabel *lblSalesAchievementSalesAmount;
-
- CAShapeLayer *btnSalesAchievementDepartmentMaskLayer;
-
- CAShapeLayer *btnSalesAchievementStaffMaskLayer;
-
- UILabel *lblFilingCustomerCount;
-
- UILabel *lblTransactionCustomerCount;
-
- UILabel *lblTransactionPercent;
-
- UILabel *lblDeliveryPercent;
-
- UILabel *lblInstallPercent;
-
- UILabel *lblRepairPercent;
-
- UILabel *lblNeedDeliveryCustomerCount;
- UILabel *lblDeliveredCustomerCount;
-
- UILabel *lblNeedInstallCustomerCount;
- UILabel *lblInstalledCustomerCount;
-
- UILabel *lblNeedRepairCustomerCount;
- UILabel *lblRepairedCustomerCount;
-
- UILabel *lblNextDayNeedDeliveryCount;
-
- UILabel *lblNextTwoDaysNeedDeliveryCount;
-
- UILabel *lblNextThreeDaysNeedDeliveryCount;
-
- UILabel *lblNextDayNeedInstallCount;
-
- UILabel *lblNextTwoDaysNeedInstallCount;
-
- UILabel *lblNextThreeDaysNeedInstallCount;
-
- UILabel *lblNextDayNeedRepairCount;
-
- UILabel *lblNextTwoDaysNeedRepairCount;
-
- UILabel *lblNextThreeDaysNeedRepairCount;
- NSMutableArray *salesStatusXArray;
- NSMutableArray *salesStatusYArray;
-
- NSMutableArray *collectionStatusXArray;
- NSMutableArray *collectionStatusYArray;
-
- NSMutableArray *orderStatusXArray;
- NSMutableArray *orderStatusYArray;
-
- NSMutableArray *salesAchievementXArray;
- NSMutableArray *salesAchievementYArray;
- NSMutableArray *salesAchievementTitleArray;
- NSMutableArray *shoppingGuideXArray;
- NSMutableArray *shoppingGuideYArray;
- NSMutableArray *shoppingGuideTitleArray;
- CGFloat height;
- NSString *typeId;
-
- NSString *salesAchievementTypeId;
- NSString *cashStatusTypeId;
- NSString *orderStatusTypeId;
- UIView *nextDayNeedDeliveyCountView;
- UIView *nextDayNeedInstallCountView;
- UIView *nextDayNeedRepairCountView;
-
- CustomBorderView *salesStatusBorderV;
-
- CustomBorderView *collectionStatusBorderV;
-
- CustomBorderView *orderStatusBorderV;
-
- CustomBorderView *shoppingGuidePieBorderV;
-
- CustomBorderView *shoppingGuideChartBorderV;
-
- CustomBorderView *deliveryStatusBorderV;
-
- CustomBorderView *installStatusBorderV;
-
- CustomBorderView *repairStatusBorderV;
-
- CustomBorderView *salesAchievementBorderV;
-
- CustomBorderView *salesAchievementPieBorderV;
-
- int borderWidth;
- }
- @end
- @implementation SalesDataAnalysisVC
- #pragma mark - 公共函数
- - (void)viewDidLoad {
- [super viewDidLoad];
- topMargin=15;
- typeId=@"1";
- height=0;
- borderWidth=1;
- cashStatusTypeId=@"1";
- orderStatusTypeId=@"1";
- salesAchievementTypeId=@"0";
- salesStatusXArray=[[NSMutableArray alloc]init];
- salesStatusYArray=[[NSMutableArray alloc]init];
- collectionStatusXArray=[[NSMutableArray alloc]init];
- collectionStatusYArray=[[NSMutableArray alloc]init];
- NSArray *initDateArray= [DateFormat getMonthFirstLastDay];
- _shoppingGuideStartDate=[initDateArray objectAtIndex:0];
- _shoppingGuideEndDate=[DateFormat getCurrentDate];
-
- _deliveryStatusStartDate=[initDateArray objectAtIndex:0];
- _deliveryStatusEndDate=[DateFormat getCurrentDate];
-
- _installStatusStartDate=[initDateArray objectAtIndex:0];
- _installStatusEndDate=[DateFormat getCurrentDate];
-
- _repairStatusStartDate=[initDateArray objectAtIndex:0];
- _repairStatusEndDate=[DateFormat getCurrentDate];
-
- orderStatusXArray=[[NSMutableArray alloc]init];
- orderStatusYArray=[[NSMutableArray alloc]init];
-
- salesAchievementXArray=[[NSMutableArray alloc]init];
- // [salesAchievementXArray addObject:@"总经办"];
- // [salesAchievementXArray addObject:@"工程部"];
- // [salesAchievementXArray addObject:@"采购中心"];
-
- salesAchievementYArray=[[NSMutableArray alloc]init];
- // NSMutableDictionary *dic=[[NSMutableDictionary alloc]init];
- // [dic setObject:@"40000" forKey:@"planAmount"];
- // [dic setObject:@"38000" forKey:@"saleAmount"];
- // [salesAchievementYArray addObject:dic];
-
- // NSMutableDictionary *dic1=[[NSMutableDictionary alloc]init];
- // [dic1 setObject:@"30000" forKey:@"planAmount"];
- // [dic1 setObject:@"20000" forKey:@"saleAmount"];
- // [salesAchievementYArray addObject:dic1];
- //
- // NSMutableDictionary *dic2=[[NSMutableDictionary alloc]init];
- // [dic2 setObject:@"35000" forKey:@"planAmount"];
- // [dic2 setObject:@"23000" forKey:@"saleAmount"];
- // [salesAchievementYArray addObject:dic2];
- salesAchievementTitleArray=[[NSMutableArray alloc]init];
- [salesAchievementTitleArray addObject:@"任务额"];
- [salesAchievementTitleArray addObject:@"销售额"];
-
- shoppingGuideXArray=[[NSMutableArray alloc]init];
- shoppingGuideTitleArray=[[NSMutableArray alloc]init];
- [shoppingGuideTitleArray addObject:@"成交客户数"];
- [shoppingGuideTitleArray addObject:@"报备客户数"];
-
- shoppingGuideYArray=[[NSMutableArray alloc]init];
-
- [self loadNavStyle];
- [self initUI];
- [self startLoading];
- _salesStatusStartDate=[initDateArray objectAtIndex:0];
- _salesStatusEndDate=[DateFormat getCurrentDate];
- _collectionStatusStartDate=[initDateArray objectAtIndex:0];
- _collectionStatusEndDate=[DateFormat getCurrentDate];
- // _orderStatusStartDate=[DateFormat getCurrentDate];
-
- _orderStatusStartDate=[initDateArray objectAtIndex:0];
- _orderStatusEndDate=[DateFormat getCurrentDate];
- cashStatusTypeId=@"1";
- _salesAchievementMonth=[DateFormat getCurrentNoSeparateMonth];
- [self asyncConcurrent];
- }
- #pragma mark - 私有函数
- /**
- 切换销售利润按钮颜色
- */
- -(void)changeSalesStatusButtonColor
- {
- btnSalesStatusCustomMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- _btnSalesStatusToday.layer.borderColor=[UIColor lightGrayColor].CGColor;
- _btnSalesStatusYesterday.layer.borderColor=[UIColor lightGrayColor].CGColor;
- _btnSalesStatusRecentlySevenDays.layer.borderColor=[UIColor lightGrayColor].CGColor;
- btnSalesStatusRecentlyThirtyDaysMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
-
- [_btnSalesStatusCustom setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- [_btnSalesStatusToday setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- [_btnSalesStatusYesterday setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- [_btnSalesStatusRecentlySevenDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- [_btnSalesStatusRecentlyThirtyDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- }
- -(void)changeOrderStatusButtonColor
- {
- btnOrderStatusCustomMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- [_btnOrderStatusCustom setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- _btnOrderStatusToday.layer.borderColor=[UIColor lightGrayColor].CGColor;
- [_btnOrderStatusToday setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnOrderStatusYesterday.layer.borderColor=[UIColor lightGrayColor].CGColor;
- [_btnOrderStatusYesterday setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnOrderStatusRecentlySevenDays.layer.borderColor=[UIColor lightGrayColor].CGColor;
- [_btnOrderStatusRecentlySevenDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- btnOrderStatusRecentlyThirtyDaysMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
-
- [_btnOrderStatusRecentlyThirtyDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- }
- -(void)changeCashStatusButtonColor
- {
- btnCollectionStatusCustomMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
-
- [_btnCollectionStatusCustom setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnCollectionStatusToday.layer.borderColor=[UIColor lightGrayColor].CGColor;
- [_btnCollectionStatusToday setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnCollectionStatusYesterday.layer.borderColor=[UIColor lightGrayColor].CGColor;
- [_btnCollectionStatusYesterday setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnCollectionStatusRecentlySevenDays.layer.borderColor=[UIColor lightGrayColor].CGColor;
- [_btnCollectionStatusRecentlySevenDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- btnCollectionStatusRecentlyThirtyDaysMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
-
- [_btnCollectionStatusRecentlyThirtyDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- }
- -(void)clearSalesStatusData
- {
- lblSalesAmount.text=@"0.00";
- lblSalesAddCustomer.text=@"0";
- lblSalesCustomerCount.text=@"0";
- }
- -(void)clearCollectionStatusData
- {
- lblCollectionAmount.text=@"0.00";
-
- }
- -(void)clearOrderStatusData
- {
- lblOrderCustomerCount.text=@"0";
- lblUnsubscribeCustomerCount.text=@"0";
- lblOrderAmount.text=@"0.00";
- lblUnsubscribeAmount.text=@"0.00";
-
- }
- -(void)clearSalesAchievementData
- {
- lblSalesAchievementPercent.text=@"完成率0.00%";
- lblSalesAchievementSalesAmount.text=@"0.00";
- lblSalesAchievementPlanAmount.text=@"0.00";
- }
- -(void)clearShoppingGuideFilingData
- {
- lblFilingCustomerCount.text=@"0";
- lblTransactionCustomerCount.text=@"0";
- lblTransactionPercent.text=@"成交率0.00%";
-
- }
- -(void)clearDeliveryData
- {
- lblDeliveredCustomerCount.text=@"0";
- lblNeedDeliveryCustomerCount.text=@"0";
- lblNextDayNeedDeliveryCount.text=@"0";
- lblNextTwoDaysNeedDeliveryCount.text=@"0";
- lblNextThreeDaysNeedDeliveryCount.text=@"0";
- lblDeliveryPercent.text=@"完成率0.00%";
- }
- -(void)clearInstallData
- {
- lblNeedInstallCustomerCount.text=@"0";
- lblInstalledCustomerCount.text=@"0";
- lblNextDayNeedInstallCount.text=@"0";
- lblNextTwoDaysNeedInstallCount.text=@"0";
- lblNextThreeDaysNeedInstallCount.text=@"0";
- lblInstallPercent.text=@"完成率0.00%";
- }
- -(void)clearRepairData
- {
- lblNeedRepairCustomerCount.text=@"0";
- lblRepairedCustomerCount.text=@"0";
- lblNextDayNeedRepairCount.text=@"0";
- lblNextTwoDaysNeedRepairCount.text=@"0";
- lblNextThreeDaysNeedRepairCount.text=@"0";
- }
- /**
- 导航按钮样式
- */
- -(void)loadNavStyle
- {
- self.navigationItem.title=@"销售数据分析";
-
- //返回
- UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
- [button setBackgroundImage:[UIImage imageNamed:@"icon_back"]
- forState:UIControlStateNormal];
- [button addTarget:self action:@selector(goBack)
- forControlEvents:UIControlEventTouchUpInside];
- button.frame = CGRectMake(0, 0, 15, 18);
-
- UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
- self.navigationItem.leftBarButtonItem = menuButton;
- }
- /**
- 获取y轴最大值
- */
- -(double)getYAxisMaximumValue:(NSMutableArray*) yValueArray
- {
- double maximumValue=[[yValueArray objectAtIndex:0]doubleValue];
- for(int i=1;i<yValueArray.count;i++)
- {
- double yValue=[[yValueArray objectAtIndex:i]doubleValue];
- if(yValue>maximumValue)
- {
- maximumValue=yValue;
- }
- }
-
- return maximumValue;
- }
- /**
- 获取y轴最小值
- */
- -(double)getYAxisMinimumValue:(NSMutableArray*) yValueArray
- {
- double minimumValue=[[yValueArray objectAtIndex:0]doubleValue];
- for(int i=1;i<yValueArray.count;i++)
- {
- double yValue=[[yValueArray objectAtIndex:i]doubleValue];
- if(yValue<minimumValue)
- {
- minimumValue=yValue;
- }
- }
-
- return minimumValue;
- }
- /**
- 选择销售状态开始日期
- */
- - (void)btnSelectStartDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempSalesStatusStartDate=date;
- } andCompletionBlock:^(void){
- _salesStatusStartDate = _tempSalesStatusStartDate;
- [weakself.btnSalesStatusStartDate setTitle:_salesStatusStartDate forState:UIControlStateNormal];
- [self startLoading];
- [salesStatusXArray removeAllObjects];
- [salesStatusYArray removeAllObjects];
- [self clearSalesStatusData];
-
- [self loadSalesStatusData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- /**
- 选择销售状态结束日期
- */
- - (void)btnSelectEndDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempSalesStatusEndDate=date;
- } andCompletionBlock:^(void){
- _salesStatusEndDate = _tempSalesStatusEndDate;
- [weakself.btnSalesStatusEndDate setTitle:_salesStatusEndDate forState:UIControlStateNormal];
- [salesStatusXArray removeAllObjects];
- [salesStatusYArray removeAllObjects];
- [self clearSalesStatusData];
- [self startLoading];
-
- [self loadSalesStatusData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)selectCollectionStatusCustomDateData
- {
- vCollectionStatusDate.hidden=NO;
- vCollectionStatusDate.frame=CGRectMake(0, CGRectGetMaxY(_btnCollectionStatusCustom.frame)+topMargin, Screen_Width, 25);
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
- salesAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(salesStatusBorderV.frame)+10);
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
- // }
-
- collectionAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnCollectionStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(collectionStatusBorderV.frame)+10);
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
-
- height=CGRectGetMaxY(collectionContent.frame);
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
- //}
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
-
-
- // orderStatusContent.frame=CGRectMake(10, CGRectGetMaxY(collectionContent.frame)+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
- //
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
-
- _collectionStatusStartDate=[DateFormat getCurrentDate];
- _collectionStatusEndDate=[DateFormat getCurrentDate];
- [_btnCollectionStatusStartDate setTitle:_collectionStatusStartDate forState:UIControlStateNormal];
- [_btnCollectionStatusEndDate setTitle:_collectionStatusEndDate forState:UIControlStateNormal];
- [self changeCashStatusButtonColor];
- btnCollectionStatusCustomMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnCollectionStatusCustom setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- }
- -(void)selectCustomDateData
- {
- vDate.hidden=NO;
- vDate.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin, Screen_Width, 25);
- salesAmountContent.frame=CGRectMake(0, CGRectGetMaxY(vDate.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(salesStatusBorderV.frame)+10);
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
-
- collectionContent.frame=CGRectMake(10, CGRectGetMaxY(salesStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
- height=CGRectGetMaxY(collectionContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
- // }
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- //}
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
-
- _salesStatusStartDate=[DateFormat getCurrentDate];
- _salesStatusEndDate=[DateFormat getCurrentDate];
- [_btnSalesStatusStartDate setTitle:_salesStatusStartDate forState:UIControlStateNormal];
- [_btnSalesStatusEndDate setTitle:_salesStatusEndDate forState:UIControlStateNormal];
- [self changeSalesStatusButtonColor];
- btnSalesStatusCustomMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnSalesStatusCustom setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- }
- -(void)selectSevenDaysData
- {
- vDate.hidden=YES;
- [self changeSalesStatusButtonColor];
- _btnSalesStatusRecentlySevenDays.layer.borderColor=[UIColor redColor].CGColor;
- [_btnSalesStatusRecentlySevenDays setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
- _salesStatusStartDate=[DateFormat getDateBefore:7];
- _salesStatusEndDate=[DateFormat getCurrentDate];
- salesAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(salesStatusBorderV.frame)+10);
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
- height=CGRectGetMaxY(collectionContent.frame);
-
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
- // }
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
- // collectionContent.frame=CGRectMake(10, CGRectGetMaxY(salesStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
- //
- // orderStatusContent.frame=CGRectMake(10, CGRectGetMaxY(collectionContent.frame)+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
- //
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
-
- [salesStatusXArray removeAllObjects];
- [salesStatusYArray removeAllObjects];
- [self clearSalesStatusData];
- [self startLoading];
- [self loadSalesStatusData];
- }
- -(void)selectThirtyDaysData
- {
- vDate.hidden=YES;
- [self changeSalesStatusButtonColor];
- _btnSalesStatusRecentlyThirtyDays.layer.borderColor=[UIColor redColor].CGColor;
- [_btnSalesStatusRecentlyThirtyDays setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
- _salesStatusStartDate=[DateFormat getDateBefore:30];
- _salesStatusEndDate=[DateFormat getCurrentDate];
- salesAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(salesStatusBorderV.frame)+10);
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
-
- height=CGRectGetMaxY(salesStatusContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
- height=CGRectGetMaxY(collectionContent.frame);
-
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
- //}
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- // }
- //
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
- //
- // collectionContent.frame=CGRectMake(10, CGRectGetMaxY(salesStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
- //
- // orderStatusContent.frame=CGRectMake(10, CGRectGetMaxY(collectionContent.frame)+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
- //
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- //
-
- [salesStatusXArray removeAllObjects];
- [salesStatusYArray removeAllObjects];
- [self clearSalesStatusData];
- [self startLoading];
- [self loadSalesStatusData];
- }
- -(void)selectTodayDateData
- {
- vDate.hidden=YES;
- [salesStatusXArray removeAllObjects];
- [salesStatusYArray removeAllObjects];
- [self changeSalesStatusButtonColor];
- _btnSalesStatusToday.layer.borderColor=[UIColor redColor].CGColor;
- [_btnSalesStatusToday setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- _salesStatusStartDate=[DateFormat getCurrentDate];
- _salesStatusEndDate=[DateFormat getCurrentDate];
- salesAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(salesStatusBorderV.frame)+10);
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
-
- height=CGRectGetMaxY(salesStatusContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
- height=CGRectGetMaxY(collectionContent.frame);
-
- //}
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
- //}
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
- //
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
-
- // collectionContent.frame=CGRectMake(10, CGRectGetMaxY(salesStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
- //
- // orderStatusContent.frame=CGRectMake(10, CGRectGetMaxY(collectionContent.frame)+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
- //
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
-
- [self clearSalesStatusData];
- [self startLoading];
- [self loadSalesStatusData];
- }
- -(void)selectYesterdayDateData
- {
- vDate.hidden=YES;
- [salesStatusXArray removeAllObjects];
- [salesStatusYArray removeAllObjects];
- [self changeSalesStatusButtonColor];
- _btnSalesStatusYesterday.layer.borderColor=[UIColor redColor].CGColor;
- [_btnSalesStatusYesterday setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
- _salesStatusStartDate=[DateFormat getDateBefore:1];
- _salesStatusEndDate=[DateFormat getDateBefore:1];
- salesAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(salesStatusBorderV.frame)+10);
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
-
- height=CGRectGetMaxY(salesStatusContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
- height=CGRectGetMaxY(collectionContent.frame);
-
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
- // }
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
- //
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
- //
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- //}
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
- // collectionContent.frame=CGRectMake(10, CGRectGetMaxY(salesStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
- //
- // orderStatusContent.frame=CGRectMake(10, CGRectGetMaxY(collectionContent.frame)+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
- //
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
-
- [self clearSalesStatusData];
-
- [self startLoading];
- [self loadSalesStatusData];
- }
- -(void)selectCollectionStatusYesterdayDateData
- {
- [self changeCashStatusButtonColor];
- vCollectionStatusDate.hidden=YES;
- [collectionStatusXArray removeAllObjects];
- [collectionStatusYArray removeAllObjects];
- _btnCollectionStatusYesterday.layer.borderColor=[UIColor redColor].CGColor;
- [_btnCollectionStatusYesterday setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- _collectionStatusStartDate=[DateFormat getDateBefore:1];
- _collectionStatusEndDate=[DateFormat getDateBefore:1];
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
- salesAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(salesStatusBorderV.frame)+10);
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
- // }
-
- collectionAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnCollectionStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(collectionStatusBorderV.frame)+10);
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
-
- height=CGRectGetMaxY(collectionContent.frame);
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
- // }
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- //}
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
-
- // orderStatusContent.frame=CGRectMake(10, CGRectGetMaxY(collectionContent.frame)+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
- //
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- [self clearCollectionStatusData];
- [self startLoading];
- [self loadCashData];
- }
- -(void)selectOrderStatusCustomDateData
- {
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
-
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
- // }
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
-
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
-
- height=CGRectGetMaxY(collectionContent.frame);
- // }
-
- vOrderStatusDate.hidden=NO;
- vOrderStatusDate.frame=CGRectMake(0, CGRectGetMaxY(_btnOrderStatusCustom.frame)+topMargin, Screen_Width, 25);
-
- orderAmountContent.frame=CGRectMake(0, CGRectGetMaxY(vOrderStatusDate.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(orderStatusBorderV.frame)+10);
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
-
- height=CGRectGetMaxY(orderStatusContent.frame);
-
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
- //
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_REPAIR_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
-
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
-
- _orderStatusStartDate=[DateFormat getCurrentDate];
- _orderStatusEndDate=[DateFormat getCurrentDate];
- [_btnOrderStatusStartDate setTitle:_orderStatusStartDate forState:UIControlStateNormal];
- [_btnOrderStatusEndDate setTitle:_orderStatusEndDate forState:UIControlStateNormal];
- [self changeOrderStatusButtonColor];
- btnOrderStatusCustomMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnOrderStatusCustom setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- }
- -(void)selectOrderStatusYesterdayDateData
- {
- [self changeOrderStatusButtonColor];
- vOrderStatusDate.hidden=YES;
- [orderStatusXArray removeAllObjects];
- [orderStatusYArray removeAllObjects];
- _btnOrderStatusYesterday.layer.borderColor=[UIColor redColor].CGColor;
- [_btnOrderStatusYesterday setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
- _orderStatusStartDate=[DateFormat getDateBefore:1];
- _orderStatusEndDate=[DateFormat getDateBefore:1];
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
- //
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
- // }
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
-
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
-
- height=CGRectGetMaxY(collectionContent.frame);
- // }
- orderAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnOrderStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(orderStatusBorderV.frame)+10);
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
-
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
-
- [self clearOrderStatusData];
- [self startLoading];
- [self loadOrderStatusData];
- }
- -(void)selectOrderStatusTodayDateData
- {
- [self changeOrderStatusButtonColor];
- vOrderStatusDate.hidden=YES;
- [orderStatusXArray removeAllObjects];
- [orderStatusYArray removeAllObjects];
- _btnOrderStatusToday.layer.borderColor=[UIColor redColor].CGColor;
- [_btnOrderStatusToday setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
- _orderStatusStartDate=[DateFormat getCurrentDate];
- _orderStatusEndDate=[DateFormat getCurrentDate];
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
-
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
- // }
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
-
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
-
- height=CGRectGetMaxY(collectionContent.frame);
- // }
- orderAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnOrderStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(orderStatusBorderV.frame)+10);
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
-
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- [self clearOrderStatusData];
- [self startLoading];
- [self loadOrderStatusData];
- }
- -(void)selectOrderStatusSevenDaysData
- {
- [self changeOrderStatusButtonColor];
- vOrderStatusDate.hidden=YES;
- [orderStatusXArray removeAllObjects];
- [orderStatusYArray removeAllObjects];
- _btnOrderStatusRecentlySevenDays.layer.borderColor=[UIColor redColor].CGColor;
- [_btnOrderStatusRecentlySevenDays setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
- _orderStatusStartDate=[DateFormat getDateBefore:7];
- _orderStatusEndDate=[DateFormat getCurrentDate];
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
-
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
- // }
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
-
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
-
- height=CGRectGetMaxY(collectionContent.frame);
- // }
- orderAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnOrderStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(orderStatusBorderV.frame)+10);
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
- height=CGRectGetMaxY(orderStatusContent.frame);
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
-
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- [self clearOrderStatusData];
- [self startLoading];
- [self loadOrderStatusData];
- }
- -(void)selectOrderStatusThirtyDaysData
- {
- [self changeOrderStatusButtonColor];
- vOrderStatusDate.hidden=YES;
- [orderStatusXArray removeAllObjects];
- [orderStatusYArray removeAllObjects];
- btnOrderStatusRecentlyThirtyDaysMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnOrderStatusRecentlyThirtyDays setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
- _orderStatusStartDate=[DateFormat getDateBefore:30];
- _orderStatusEndDate=[DateFormat getCurrentDate];
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
-
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
- // }
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
-
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
-
- height=CGRectGetMaxY(collectionContent.frame);
- // }
- orderAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnOrderStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(orderStatusBorderV.frame)+10);
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- //}
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
-
- [self clearOrderStatusData];
- [self startLoading];
- [self loadOrderStatusData];
- }
- -(void)selectCollectionStatusTodayDateData
- {
- [self changeCashStatusButtonColor];
- vCollectionStatusDate.hidden=YES;
- [collectionStatusXArray removeAllObjects];
- [collectionStatusYArray removeAllObjects];
- _btnCollectionStatusToday.layer.borderColor=[UIColor redColor].CGColor;
- [_btnCollectionStatusToday setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- _collectionStatusStartDate=[DateFormat getCurrentDate];
- _collectionStatusEndDate=[DateFormat getCurrentDate];
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
- salesAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(salesStatusBorderV.frame)+10);
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
- // }
-
- collectionAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnCollectionStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(collectionStatusBorderV.frame)+10);
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
-
- height=CGRectGetMaxY(collectionContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
- // }
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
-
- // orderStatusContent.frame=CGRectMake(10, CGRectGetMaxY(collectionContent.frame)+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
- //
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- [self clearCollectionStatusData];
- [self startLoading];
- [self loadCashData];
- }
- -(void)selectCollectionStatusSevenDaysData
- {
- vCollectionStatusDate.hidden=YES;
- [collectionStatusXArray removeAllObjects];
- [collectionStatusYArray removeAllObjects];
- [self changeCashStatusButtonColor];
- _btnCollectionStatusRecentlySevenDays.layer.borderColor=[UIColor redColor].CGColor;
- [_btnCollectionStatusRecentlySevenDays setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- _collectionStatusStartDate=[DateFormat getDateBefore:7];
- _collectionStatusEndDate=[DateFormat getCurrentDate];
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
- salesAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(salesStatusBorderV.frame)+10);
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
- // }
-
- collectionAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnCollectionStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(collectionStatusBorderV.frame)+10);
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
-
- height=CGRectGetMaxY(collectionContent.frame);
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
- // }
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
-
- // orderStatusContent.frame=CGRectMake(10, CGRectGetMaxY(collectionContent.frame)+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
- //
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- [self clearCollectionStatusData];
- [self startLoading];
- [self loadCashData];
- }
- -(void)selectCollectionStatusThirtyDaysData
- {
- vCollectionStatusDate.hidden=YES;
- [collectionStatusXArray removeAllObjects];
- [collectionStatusYArray removeAllObjects];
- [self changeCashStatusButtonColor];
- btnCollectionStatusRecentlyThirtyDaysMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnCollectionStatusRecentlyThirtyDays setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- _collectionStatusStartDate=[DateFormat getDateBefore:30];
- _collectionStatusEndDate=[DateFormat getCurrentDate];
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
- salesAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(salesStatusBorderV.frame)+10);
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
- height=CGRectGetMaxY(salesStatusContent.frame);
- // }
-
- collectionAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnCollectionStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(collectionStatusBorderV.frame)+10);
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
-
- height=CGRectGetMaxY(collectionContent.frame);
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
-
- height=CGRectGetMaxY(orderStatusContent.frame);
- // }
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound)
- // {
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
-
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound)
- // {
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- height=CGRectGetMaxY(deliveryStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
-
- height=CGRectGetMaxY(installStatusContent.frame);
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound)
- // {
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
-
- // orderStatusContent.frame=CGRectMake(10, CGRectGetMaxY(collectionContent.frame)+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
- //
- // shoppingGuideFilingContent.frame=CGRectMake(10, CGRectGetMaxY(orderStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- // deliveryStatusContent.frame=CGRectMake(10, CGRectGetMaxY(shoppingGuideFilingContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- // installStatusContent.frame=CGRectMake(10, CGRectGetMaxY(deliveryStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- //
- // repairStatusContent.frame=CGRectMake(10, CGRectGetMaxY(installStatusContent.frame)+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- [self clearCollectionStatusData];
- [self startLoading];
- [self loadCashData];
- }
- -(void)initUI
- {
- int rowHeight=50;
- content=[UIView new];
- content.frame=CGRectMake(0, 0,Screen_Width,0);
- scroll=[[UIScrollView alloc]init];
- scroll.frame=CGRectMake(0,0, Screen_Width, Screen_Height);
- [self.view addSubview:scroll];
- [scroll addSubview:content];
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
-
- salesStatusContent=[UIView new];
- salesStatusContent.frame=CGRectMake(10, 10,Screen_Width,0);
- salesStatusContent.backgroundColor=[UIColor whiteColor];
- [content addSubview:salesStatusContent];
- UIView *salesStatusTitleView = [[UIView alloc]init];
-
- salesStatusTitleView.frame = CGRectMake(0,0 ,Screen_Width, 45);
-
- UIView *salesStatusImgView=[UIImageView new];
- salesStatusImgView.frame=CGRectMake(10, 10,10 , 25);
- [salesStatusImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [salesStatusTitleView addSubview:salesStatusImgView];
-
- UILabel *titleSalesStatus = [[UILabel alloc]init];
- titleSalesStatus.frame = CGRectMake(CGRectGetMaxX(salesStatusImgView.frame)+10, 10, 100, 25);
- titleSalesStatus.text = @"销售情况";
- titleSalesStatus.textColor = [UIColor blackColor];
- titleSalesStatus.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [salesStatusTitleView addSubview:titleSalesStatus];
- [salesStatusContent addSubview:salesStatusTitleView];
-
- UIView *separator=[UIView new];
- separator.frame=CGRectMake(0,salesStatusTitleView.frame.size.height-1, salesStatusTitleView.frame.size.width-20, 0.5);
- [separator setBackgroundColor:[UIColor lightGrayColor]];
- [salesStatusTitleView addSubview:separator ];
-
-
- _btnSalesStatusCustom = [[UIButton alloc] initWithFrame:CGRectMake(Screen_Width/2-175-10,CGRectGetMaxY(salesStatusTitleView.frame)+topMargin, 70, 35)];
- [_btnSalesStatusCustom setTitle:@"自定义" forState:UIControlStateNormal];
- [_btnSalesStatusCustom setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnSalesStatusCustom.titleLabel.font = [UIFont systemFontOfSize: 10.0];
-
- [_btnSalesStatusCustom addTarget:self action:@selector(selectCustomDateData) forControlEvents:UIControlEventTouchUpInside];
- UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:_btnSalesStatusCustom.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerBottomLeft cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer = [CAShapeLayer layer];
- maskLayer.frame = _btnSalesStatusCustom.bounds;
- maskLayer.path = maskPath.CGPath;
- _btnSalesStatusCustom.layer.mask = maskLayer;
-
- [salesStatusContent addSubview:_btnSalesStatusCustom];
-
- btnSalesStatusCustomMaskLayer = [CAShapeLayer layer];
- btnSalesStatusCustomMaskLayer.frame = _btnSalesStatusCustom.bounds;
- btnSalesStatusCustomMaskLayer.path = maskPath.CGPath;
- btnSalesStatusCustomMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnSalesStatusCustomMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnSalesStatusCustomMaskLayer.lineWidth=1;
- [_btnSalesStatusCustom.layer addSublayer:btnSalesStatusCustomMaskLayer];
-
- _btnSalesStatusYesterday = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnSalesStatusCustom.frame),CGRectGetMaxY(salesStatusTitleView.frame)+topMargin, 70, 35)];
-
- [_btnSalesStatusYesterday setTitle:[DateFormat getDateBefore:1] forState:UIControlStateNormal];
- _btnSalesStatusYesterday.layer.cornerRadius=0;
- _btnSalesStatusYesterday.layer.borderWidth=1;
- [_btnSalesStatusYesterday addTarget:self action:@selector(selectYesterdayDateData) forControlEvents:UIControlEventTouchUpInside];
- [_btnSalesStatusYesterday setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- [_btnSalesStatusYesterday.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
- _btnSalesStatusYesterday.layer.borderColor=[UIColor lightGrayColor].CGColor;
-
- _btnSalesStatusYesterday.titleLabel.font = [UIFont systemFontOfSize: 10.0];
-
- [salesStatusContent addSubview:_btnSalesStatusYesterday];
-
- _btnSalesStatusToday = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnSalesStatusYesterday.frame),CGRectGetMaxY(salesStatusTitleView.frame)+topMargin, 70, 35)];
-
- [_btnSalesStatusToday setTitle: [DateFormat getCurrentDate]forState:UIControlStateNormal];
- _btnSalesStatusToday.layer.cornerRadius=0;
- _btnSalesStatusToday.layer.borderWidth=1;
- _btnSalesStatusToday.titleLabel.font = [UIFont systemFontOfSize: 10.0];
- [_btnSalesStatusToday addTarget:self action:@selector(selectTodayDateData) forControlEvents:UIControlEventTouchUpInside];
- [_btnSalesStatusToday setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- [_btnSalesStatusToday.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
- _btnSalesStatusToday.layer.borderColor=[UIColor redColor].CGColor;
- [salesStatusContent addSubview:_btnSalesStatusToday];
-
-
- _btnSalesStatusRecentlySevenDays = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnSalesStatusToday.frame),CGRectGetMaxY(salesStatusTitleView.frame)+topMargin, 70, 35)];
-
- [_btnSalesStatusRecentlySevenDays setTitle:@"近7天" forState:UIControlStateNormal];
-
- _btnSalesStatusRecentlySevenDays.titleLabel.font = [UIFont systemFontOfSize: 10.0];
- _btnSalesStatusRecentlySevenDays.layer.cornerRadius=0;
- _btnSalesStatusRecentlySevenDays.layer.borderWidth=1;
- [_btnSalesStatusRecentlySevenDays addTarget:self action:@selector(selectSevenDaysData) forControlEvents:UIControlEventTouchUpInside];
- [_btnSalesStatusRecentlySevenDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- [_btnSalesStatusRecentlySevenDays.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
- _btnSalesStatusRecentlySevenDays.layer.borderColor=[UIColor lightGrayColor].CGColor;
- [salesStatusContent addSubview:_btnSalesStatusRecentlySevenDays];
-
- _btnSalesStatusRecentlyThirtyDays = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnSalesStatusRecentlySevenDays.frame),CGRectGetMaxY(salesStatusTitleView.frame)+topMargin, 70, 35)];
-
-
- [_btnSalesStatusRecentlyThirtyDays setTitle:@"近30天" forState:UIControlStateNormal];
- _btnSalesStatusRecentlyThirtyDays.titleLabel.font = [UIFont systemFontOfSize: 10.0];
- [_btnSalesStatusRecentlyThirtyDays addTarget:self action:@selector(selectThirtyDaysData) forControlEvents:UIControlEventTouchUpInside];
- [_btnSalesStatusRecentlyThirtyDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- UIBezierPath *maskPath2 = [UIBezierPath bezierPathWithRoundedRect:_btnSalesStatusRecentlyThirtyDays.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer2 = [CAShapeLayer layer];
- maskLayer2.frame = _btnSalesStatusRecentlyThirtyDays.bounds;
- maskLayer2.path = maskPath2.CGPath;
- _btnSalesStatusRecentlyThirtyDays.layer.mask = maskLayer2;
-
- [salesStatusContent addSubview:_btnSalesStatusRecentlyThirtyDays];
-
- btnSalesStatusRecentlyThirtyDaysMaskLayer = [CAShapeLayer layer];
- btnSalesStatusRecentlyThirtyDaysMaskLayer.frame = _btnSalesStatusRecentlyThirtyDays.bounds;
- btnSalesStatusRecentlyThirtyDaysMaskLayer.path = maskPath2.CGPath;
- btnSalesStatusRecentlyThirtyDaysMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnSalesStatusRecentlyThirtyDaysMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnSalesStatusRecentlyThirtyDaysMaskLayer.lineWidth=1;
- [_btnSalesStatusRecentlyThirtyDays.layer addSublayer:btnSalesStatusRecentlyThirtyDaysMaskLayer];
-
-
- vDate =[UIView new];
- vDate.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin, Screen_Width, 0);
- [salesStatusContent addSubview:vDate];
- vDate.hidden=YES;
- _btnSalesStatusStartDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnSalesStatusStartDate setTitle:_salesStatusStartDate forState:UIControlStateNormal];
- [_btnSalesStatusStartDate setBackgroundColor:[UIColor whiteColor]];
- [_btnSalesStatusStartDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnSalesStatusStartDate.titleLabel.font= [UIFont systemFontOfSize:14];
- [_btnSalesStatusStartDate addTarget:self action:@selector(btnSelectStartDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnSalesStatusStartDate.frame = CGRectMake(Screen_Width/2-110 ,0 , 100, 25);
- [vDate addSubview:_btnSalesStatusStartDate];
-
- UILabel *separatorLbl=[UILabel new];
- separatorLbl.frame=CGRectMake(CGRectGetMaxX(_btnSalesStatusStartDate.frame), 0, 20, 25);
- separatorLbl.text=@"--";
- separatorLbl.textColor = [UIColor blackColor];
- separatorLbl.font = [UIFont systemFontOfSize: 14];
- [vDate addSubview:separatorLbl];
-
- _btnSalesStatusEndDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnSalesStatusEndDate setTitle:_salesStatusEndDate forState:UIControlStateNormal];
- [_btnSalesStatusEndDate setBackgroundColor:[UIColor whiteColor]];
- [_btnSalesStatusEndDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnSalesStatusEndDate.titleLabel.font= [UIFont systemFontOfSize:14];
- [_btnSalesStatusEndDate addTarget:self action:@selector(btnSelectEndDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnSalesStatusEndDate.frame = CGRectMake(CGRectGetMaxX(separatorLbl.frame) ,0 , 100, 25);
- [vDate addSubview:_btnSalesStatusEndDate];
-
- salesAmountContent =[[UIView alloc]init];
-
- salesAmountContent.frame = CGRectMake(0,CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin, Screen_Width, 0);
- [salesStatusContent addSubview:salesAmountContent];
-
- UIView *salesAmountView= [[UIView alloc]init];
- salesAmountView.frame = CGRectMake(0,0, Screen_Width, 25);
- UILabel *lblTitleSalesAmount = [[UILabel alloc]init];
- lblTitleSalesAmount.frame = CGRectMake(Screen_Width/2-110, 0, 110, 25);
- lblTitleSalesAmount.text = @"销售金额:";
- lblTitleSalesAmount.textColor = [UIColor redColor];
- lblTitleSalesAmount.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [salesAmountView addSubview:lblTitleSalesAmount];
-
- lblSalesAmount = [[UILabel alloc]init];
- lblSalesAmount.frame = CGRectMake(CGRectGetMaxX(lblTitleSalesAmount.frame), 0, 150, 25);
- lblSalesAmount.textColor = [UIColor redColor];
- lblSalesAmount.text=@"0.00";
- lblSalesAmount.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [salesAmountView addSubview:lblSalesAmount];
- [salesAmountContent addSubview:salesAmountView];
-
- UIView *salesAddCustomerView = [[UIView alloc]init];
-
- salesAddCustomerView.frame = CGRectMake(0,CGRectGetMaxY(salesAmountView.frame)+topMargin,Screen_Width/2, rowHeight);
- lblSalesAddCustomer= [[UILabel alloc]init];
- lblSalesAddCustomer.frame = CGRectMake(0, 0,salesAddCustomerView.frame.size.width, 25);
- lblSalesAddCustomer.textAlignment=UITextAlignmentCenter;
- lblSalesAddCustomer.textColor = [UIColor blackColor];
- lblSalesAddCustomer.text=@"0";
- lblSalesAddCustomer.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [salesAddCustomerView addSubview:lblSalesAddCustomer];
-
- UILabel *lblTitleSalesAddCustomer = [[UILabel alloc]init];
- lblTitleSalesAddCustomer.frame = CGRectMake(0,CGRectGetMaxY(lblSalesAddCustomer.frame),salesAddCustomerView.frame.size.width, 25);
- lblTitleSalesAddCustomer.text = @"销售新增客户";
- lblTitleSalesAddCustomer.textColor = [UIColor blackColor];
- lblTitleSalesAddCustomer.textAlignment=UITextAlignmentCenter;
- lblTitleSalesAddCustomer.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [salesAddCustomerView addSubview:lblTitleSalesAddCustomer];
- [salesAmountContent addSubview:salesAddCustomerView];
-
- UIView *middleSeparator=[UIView new];
-
- middleSeparator.frame=CGRectMake(Screen_Width/2, CGRectGetMaxY(salesAmountView.frame)+topMargin, 0.5, 45);
- middleSeparator.backgroundColor=[UIColor lightGrayColor];
- [salesAmountContent addSubview:middleSeparator];
-
-
- UIView *salesCustomerCountView = [[UIView alloc]init];
-
- salesCustomerCountView.frame = CGRectMake(Screen_Width/2,CGRectGetMaxY(salesAmountView.frame)+topMargin, Screen_Width/2, rowHeight);
- lblSalesCustomerCount = [[UILabel alloc]init];
- lblSalesCustomerCount.frame = CGRectMake(0, 0, salesCustomerCountView.frame.size.width, 25);
- lblSalesCustomerCount.textAlignment=UITextAlignmentCenter;
- lblSalesCustomerCount.text=@"0";
- lblSalesCustomerCount.textColor = [UIColor blackColor];
- lblSalesCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [salesCustomerCountView addSubview:lblSalesCustomerCount];
-
- UILabel *lblSalesCustomerCountTitle = [[UILabel alloc]init];
- lblSalesCustomerCountTitle.frame = CGRectMake(0,CGRectGetMaxY(lblSalesCustomerCount.frame), salesCustomerCountView.frame.size.width, 25);
- lblSalesCustomerCountTitle.text = @"销售客户数";
- lblSalesCustomerCountTitle.textAlignment=UITextAlignmentCenter;
- lblSalesCustomerCountTitle.textColor = [UIColor blackColor];
- lblSalesCustomerCountTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [salesCustomerCountView addSubview:lblSalesCustomerCountTitle];
- [salesAmountContent addSubview:salesCustomerCountView];
-
-
- _btnSalesStatusDepartment = [[UIButton alloc] initWithFrame:CGRectMake(Screen_Width/2-70,CGRectGetMaxY(salesAddCustomerView.frame)+topMargin, 70, 35)];
- [_btnSalesStatusDepartment setTitle:@"部门" forState:UIControlStateNormal];
- [_btnSalesStatusDepartment setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- _btnSalesStatusDepartment.titleLabel.font = [UIFont systemFontOfSize: 12.0];
- [_btnSalesStatusDepartment addTarget:self action:@selector(goSalesStatus:) forControlEvents:UIControlEventTouchUpInside];
- _btnSalesStatusDepartment.tag=1001;
-
- UIBezierPath *maskPath7 = [UIBezierPath bezierPathWithRoundedRect:_btnSalesStatusDepartment.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerBottomLeft cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer8 = [CAShapeLayer layer];
- maskLayer8.frame = _btnSalesStatusDepartment.bounds;
- maskLayer8.path = maskPath7.CGPath;
- _btnSalesStatusDepartment.layer.mask = maskLayer8;
-
- [salesAmountContent addSubview:_btnSalesStatusDepartment];
-
- btnSalesStatusDepartmentMaskLayer = [CAShapeLayer layer];
- btnSalesStatusDepartmentMaskLayer.frame = _btnSalesStatusDepartment.bounds;
- btnSalesStatusDepartmentMaskLayer.path = maskPath7.CGPath;
- btnSalesStatusDepartmentMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnSalesStatusDepartmentMaskLayer.strokeColor=[UIColor redColor].CGColor;
- btnSalesStatusDepartmentMaskLayer.lineWidth=1;
- [_btnSalesStatusDepartment.layer addSublayer:btnSalesStatusDepartmentMaskLayer];
-
- _btnSalesStatusChannel = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnSalesStatusDepartment.frame),CGRectGetMaxY(salesAddCustomerView.frame)+topMargin, 70, 35)];
- [_btnSalesStatusChannel setTitle:@"渠道" forState:UIControlStateNormal];
- [_btnSalesStatusChannel setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- _btnSalesStatusChannel.tag=1000;
- [_btnSalesStatusChannel addTarget:self action:@selector(goSalesStatus:) forControlEvents:UIControlEventTouchUpInside];
- _btnSalesStatusChannel.titleLabel.font = [UIFont systemFontOfSize: 12.0];
- UIBezierPath *maskPath5 = [UIBezierPath bezierPathWithRoundedRect:_btnSalesStatusChannel.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer5 = [CAShapeLayer layer];
- maskLayer5.frame = _btnSalesStatusChannel.bounds;
- maskLayer5.path = maskPath5.CGPath;
- _btnSalesStatusChannel.layer.mask = maskLayer5;
-
- [salesAmountContent addSubview:_btnSalesStatusChannel];
-
- btnSalesStatusChannelMaskLayer = [CAShapeLayer layer];
- btnSalesStatusChannelMaskLayer.frame = _btnSalesStatusChannel.bounds;
- btnSalesStatusChannelMaskLayer.path = maskPath5.CGPath;
- btnSalesStatusChannelMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnSalesStatusChannelMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnSalesStatusChannelMaskLayer.lineWidth=1;
- [_btnSalesStatusChannel.layer addSublayer:btnSalesStatusChannelMaskLayer];
-
- salesStatusBorderV=[CustomBorderView new];
- salesStatusBorderV.frame=CGRectMake(5, CGRectGetMaxY(_btnSalesStatusDepartment.frame)+topMargin,Screen_Width-30, 350);
- [salesStatusBorderV setBackgroundColor:[UIColor whiteColor]];
- [salesStatusBorderV drawBoardLine:borderWidth cornerRadius:2 color:[UIColor hexColor:@"D5CDCD"]];
- [salesAmountContent addSubview:salesStatusBorderV];
-
- _salesStatusChartView=[[BarChartView alloc]init];
- _salesStatusChartView.frame=CGRectMake(0,0,salesStatusBorderV.frame.size.width, 350);
-
-
- [salesStatusBorderV addSubview:_salesStatusChartView];
-
- salesAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnSalesStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(salesStatusBorderV.frame)+10);
-
-
-
- salesStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAmountContent.frame)+10);
-
- height=CGRectGetMaxY(salesStatusContent.frame);
-
- salesStatusContent.layer.cornerRadius=CornerRadius;
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
- //收款状态
- collectionContent=[UIView new];
- collectionContent.backgroundColor=[UIColor whiteColor];
- collectionContent.frame=CGRectMake(10,height+10, Screen_Width-20, 0);
- [content addSubview:collectionContent];
-
- UIView *collectionStatusTitleView = [[UIView alloc]init];
-
- collectionStatusTitleView.frame = CGRectMake(0,0 ,Screen_Width, 45);
-
- UIView *collectionStatusImgView=[UIImageView new];
- collectionStatusImgView.frame=CGRectMake(10, 10,10 , 25);
- [collectionStatusImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [collectionStatusTitleView addSubview:collectionStatusImgView];
-
- UILabel *titleCollectionStatus = [[UILabel alloc]init];
- titleCollectionStatus.frame = CGRectMake(CGRectGetMaxX(collectionStatusImgView.frame)+10, 10, 100, 25);
- titleCollectionStatus.text = @"收款情况";
- titleCollectionStatus.textColor = [UIColor blackColor];
- titleCollectionStatus.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [collectionStatusTitleView addSubview:titleCollectionStatus];
- [collectionContent addSubview:collectionStatusTitleView];
-
- UIView *separator1=[UIView new];
- separator1.frame=CGRectMake(0,collectionStatusTitleView.frame.size.height-1, collectionStatusTitleView.frame.size.width-20, 0.5);
- [separator1 setBackgroundColor:[UIColor lightGrayColor]];
- [collectionStatusTitleView addSubview:separator1 ];
-
-
-
- _btnCollectionStatusCustom = [[UIButton alloc] initWithFrame:CGRectMake(Screen_Width/2-175-10,CGRectGetMaxY(collectionStatusTitleView.frame)+topMargin, 70, 35)];
- [_btnCollectionStatusCustom setTitle:@"自定义" forState:UIControlStateNormal];
- [_btnCollectionStatusCustom setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnCollectionStatusCustom.titleLabel.font = [UIFont systemFontOfSize: 10.0];
-
- [_btnCollectionStatusCustom addTarget:self action:@selector(selectCollectionStatusCustomDateData) forControlEvents:UIControlEventTouchUpInside];
- UIBezierPath *maskPath1 = [UIBezierPath bezierPathWithRoundedRect:_btnCollectionStatusCustom.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerBottomLeft cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer1 = [CAShapeLayer layer];
- maskLayer1.frame = _btnCollectionStatusCustom.bounds;
- maskLayer1.path = maskPath1.CGPath;
- _btnCollectionStatusCustom.layer.mask = maskLayer1;
-
- [collectionContent addSubview:_btnCollectionStatusCustom];
-
- btnCollectionStatusCustomMaskLayer = [CAShapeLayer layer];
- btnCollectionStatusCustomMaskLayer.frame = _btnSalesStatusCustom.bounds;
- btnCollectionStatusCustomMaskLayer.path = maskPath1.CGPath;
- btnCollectionStatusCustomMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnCollectionStatusCustomMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnCollectionStatusCustomMaskLayer.lineWidth=1;
- [_btnCollectionStatusCustom.layer addSublayer:btnCollectionStatusCustomMaskLayer];
-
- _btnCollectionStatusYesterday = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnCollectionStatusCustom.frame),CGRectGetMaxY(collectionStatusTitleView.frame)+topMargin, 70, 35)];
-
- [_btnCollectionStatusYesterday setTitle:[DateFormat getDateBefore:1] forState:UIControlStateNormal];
- _btnCollectionStatusYesterday.layer.cornerRadius=0;
- _btnCollectionStatusYesterday.layer.borderWidth=1;
- [_btnCollectionStatusYesterday addTarget:self action:@selector(selectCollectionStatusYesterdayDateData) forControlEvents:UIControlEventTouchUpInside];
- [_btnCollectionStatusYesterday setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- [_btnCollectionStatusYesterday.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
- _btnCollectionStatusYesterday.layer.borderColor=[UIColor lightGrayColor].CGColor;
-
- _btnCollectionStatusYesterday.titleLabel.font = [UIFont systemFontOfSize: 10.0];
-
- [collectionContent addSubview:_btnCollectionStatusYesterday];
-
- _btnCollectionStatusToday = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnCollectionStatusYesterday.frame),CGRectGetMaxY(collectionStatusTitleView.frame)+topMargin, 70, 35)];
-
- [_btnCollectionStatusToday setTitle: [DateFormat getCurrentDate]forState:UIControlStateNormal];
- _btnCollectionStatusToday.layer.cornerRadius=0;
- _btnCollectionStatusToday.layer.borderWidth=1;
- _btnCollectionStatusToday.titleLabel.font = [UIFont systemFontOfSize: 10.0];
- [_btnCollectionStatusToday addTarget:self action:@selector(selectCollectionStatusTodayDateData) forControlEvents:UIControlEventTouchUpInside];
- [_btnCollectionStatusToday setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- [_btnCollectionStatusToday.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
- _btnCollectionStatusToday.layer.borderColor=[UIColor redColor].CGColor;
- [collectionContent addSubview:_btnCollectionStatusToday];
-
-
- _btnCollectionStatusRecentlySevenDays = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnCollectionStatusToday.frame),CGRectGetMaxY(collectionStatusTitleView.frame)+topMargin, 70, 35)];
-
- [_btnCollectionStatusRecentlySevenDays setTitle:@"近7天" forState:UIControlStateNormal];
-
- _btnCollectionStatusRecentlySevenDays.titleLabel.font = [UIFont systemFontOfSize: 10.0];
- _btnCollectionStatusRecentlySevenDays.layer.cornerRadius=0;
- _btnCollectionStatusRecentlySevenDays.layer.borderWidth=1;
- [_btnCollectionStatusRecentlySevenDays addTarget:self action:@selector(selectCollectionStatusSevenDaysData) forControlEvents:UIControlEventTouchUpInside];
- [_btnCollectionStatusRecentlySevenDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- [_btnCollectionStatusRecentlySevenDays.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
- _btnCollectionStatusRecentlySevenDays.layer.borderColor=[UIColor lightGrayColor].CGColor;
- [collectionContent addSubview:_btnCollectionStatusRecentlySevenDays];
-
- _btnCollectionStatusRecentlyThirtyDays = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnCollectionStatusRecentlySevenDays.frame),CGRectGetMaxY(collectionStatusTitleView.frame)+topMargin, 70, 35)];
-
-
- [_btnCollectionStatusRecentlyThirtyDays setTitle:@"近30天" forState:UIControlStateNormal];
- _btnCollectionStatusRecentlyThirtyDays.titleLabel.font = [UIFont systemFontOfSize: 10.0];
- [_btnCollectionStatusRecentlyThirtyDays addTarget:self action:@selector(selectCollectionStatusThirtyDaysData) forControlEvents:UIControlEventTouchUpInside];
- [_btnCollectionStatusRecentlyThirtyDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- UIBezierPath *maskPath4 = [UIBezierPath bezierPathWithRoundedRect:_btnCollectionStatusRecentlyThirtyDays.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer4 = [CAShapeLayer layer];
- maskLayer4.frame = _btnCollectionStatusRecentlyThirtyDays.bounds;
- maskLayer4.path = maskPath4.CGPath;
- _btnCollectionStatusRecentlyThirtyDays.layer.mask = maskLayer4;
-
- [collectionContent addSubview:_btnCollectionStatusRecentlyThirtyDays];
-
- btnCollectionStatusRecentlyThirtyDaysMaskLayer = [CAShapeLayer layer];
- btnCollectionStatusRecentlyThirtyDaysMaskLayer.frame = _btnCollectionStatusRecentlyThirtyDays.bounds;
- btnCollectionStatusRecentlyThirtyDaysMaskLayer.path = maskPath4.CGPath;
- btnCollectionStatusRecentlyThirtyDaysMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnCollectionStatusRecentlyThirtyDaysMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnCollectionStatusRecentlyThirtyDaysMaskLayer.lineWidth=1;
- [_btnCollectionStatusRecentlyThirtyDays.layer addSublayer:btnCollectionStatusRecentlyThirtyDaysMaskLayer];
-
-
- vCollectionStatusDate =[UIView new];
- vCollectionStatusDate.frame=CGRectMake(0, CGRectGetMaxY(_btnCollectionStatusCustom.frame)+topMargin, Screen_Width, 0);
- [collectionContent addSubview:vCollectionStatusDate];
- vCollectionStatusDate.hidden=YES;
- _btnCollectionStatusStartDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnCollectionStatusStartDate setTitle:_collectionStatusStartDate forState:UIControlStateNormal];
- [_btnCollectionStatusStartDate setBackgroundColor:[UIColor whiteColor]];
- [_btnCollectionStatusStartDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnCollectionStatusStartDate.titleLabel.font= [UIFont systemFontOfSize:14];
- [_btnCollectionStatusStartDate addTarget:self action:@selector(btnSelectCollectionStatusStartDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnCollectionStatusStartDate.frame = CGRectMake(Screen_Width/2-110 ,0 , 100, 25);
- [vCollectionStatusDate addSubview:_btnCollectionStatusStartDate];
-
- UILabel *separatorCollectionStatusLbl=[UILabel new];
- separatorCollectionStatusLbl.frame=CGRectMake(CGRectGetMaxX(_btnCollectionStatusStartDate.frame), 0, 20, 25);
- separatorCollectionStatusLbl.text=@"--";
- separatorCollectionStatusLbl.textColor = [UIColor blackColor];
- separatorCollectionStatusLbl.font = [UIFont systemFontOfSize: 14];
- [vCollectionStatusDate addSubview:separatorCollectionStatusLbl];
-
- _btnCollectionStatusEndDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnCollectionStatusEndDate setTitle:_collectionStatusEndDate forState:UIControlStateNormal];
- [_btnCollectionStatusEndDate setBackgroundColor:[UIColor whiteColor]];
- [_btnCollectionStatusEndDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnCollectionStatusEndDate.titleLabel.font= [UIFont systemFontOfSize:14];
- [_btnSalesStatusEndDate addTarget:self action:@selector(btnSelectCollectionStatusEndDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnCollectionStatusEndDate.frame = CGRectMake(CGRectGetMaxX(separatorCollectionStatusLbl.frame) ,0 , 100, 25);
- [vCollectionStatusDate addSubview:_btnCollectionStatusEndDate];
-
-
-
- collectionAmountContent =[[UIView alloc]init];
-
- collectionAmountContent.frame = CGRectMake(0,CGRectGetMaxY(_btnCollectionStatusCustom.frame)+topMargin, Screen_Width, 0);
- [collectionContent addSubview:collectionAmountContent];
-
- UIView *collectionAmountView= [[UIView alloc]init];
- collectionAmountView.frame = CGRectMake(0,0, Screen_Width, 25);
- UILabel *lblTitleCollectionAmount = [[UILabel alloc]init];
- lblTitleCollectionAmount.frame = CGRectMake(Screen_Width/2-110, 0, 110, 25);
- lblTitleCollectionAmount.text = @"收款金额:";
- lblTitleCollectionAmount.textColor = [UIColor redColor];
- lblTitleCollectionAmount.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [collectionAmountView addSubview:lblTitleCollectionAmount];
-
- lblCollectionAmount = [[UILabel alloc]init];
- lblCollectionAmount.frame = CGRectMake(CGRectGetMaxX(lblTitleCollectionAmount.frame), 0, 150, 25);
- lblCollectionAmount.textColor = [UIColor redColor];
- lblCollectionAmount.text=@"0.00";
- lblCollectionAmount.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [collectionAmountView addSubview:lblCollectionAmount];
- [collectionAmountContent addSubview:collectionAmountView];
-
-
-
- _btnCollectionStatusDepartment = [[UIButton alloc] initWithFrame:CGRectMake(Screen_Width/2-70,CGRectGetMaxY(collectionAmountView.frame)+topMargin, 70, 35)];
- [_btnCollectionStatusDepartment setTitle:@"部门" forState:UIControlStateNormal];
- [_btnCollectionStatusDepartment setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- _btnCollectionStatusDepartment.titleLabel.font = [UIFont systemFontOfSize: 12.0];
- [_btnCollectionStatusDepartment addTarget:self action:@selector(goCollectionStatus:) forControlEvents:UIControlEventTouchUpInside];
- _btnCollectionStatusDepartment.tag=1003;
-
- UIBezierPath *maskPath8 = [UIBezierPath bezierPathWithRoundedRect:_btnCollectionStatusDepartment.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerBottomLeft cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer9 = [CAShapeLayer layer];
- maskLayer9.frame = _btnCollectionStatusDepartment.bounds;
- maskLayer9.path = maskPath8.CGPath;
- _btnCollectionStatusDepartment.layer.mask = maskLayer9;
-
- [collectionAmountContent addSubview:_btnCollectionStatusDepartment];
-
- btnCollectionStatusDepartmentMaskLayer = [CAShapeLayer layer];
- btnCollectionStatusDepartmentMaskLayer.frame = _btnSalesStatusDepartment.bounds;
- btnCollectionStatusDepartmentMaskLayer.path = maskPath8.CGPath;
- btnCollectionStatusDepartmentMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnCollectionStatusDepartmentMaskLayer.strokeColor=[UIColor redColor].CGColor;
- btnCollectionStatusDepartmentMaskLayer.lineWidth=1;
- [_btnCollectionStatusDepartment.layer addSublayer:btnCollectionStatusDepartmentMaskLayer];
-
- _btnCollectionStatusChannel = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnCollectionStatusDepartment.frame),CGRectGetMaxY(collectionAmountView.frame)+topMargin, 70, 35)];
- [_btnCollectionStatusChannel setTitle:@"渠道" forState:UIControlStateNormal];
- [_btnCollectionStatusChannel setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- _btnCollectionStatusChannel.tag=1004;
- [_btnCollectionStatusChannel addTarget:self action:@selector(goCollectionStatus:) forControlEvents:UIControlEventTouchUpInside];
- _btnCollectionStatusChannel.titleLabel.font = [UIFont systemFontOfSize: 12.0];
- UIBezierPath *maskPath11 = [UIBezierPath bezierPathWithRoundedRect:_btnCollectionStatusChannel.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer11 = [CAShapeLayer layer];
- maskLayer11.frame = _btnCollectionStatusChannel.bounds;
- maskLayer11.path = maskPath11.CGPath;
- _btnCollectionStatusChannel.layer.mask = maskLayer11;
-
- [collectionAmountContent addSubview:_btnCollectionStatusChannel];
-
- btnCollectionStatusChannelMaskLayer = [CAShapeLayer layer];
- btnCollectionStatusChannelMaskLayer.frame = _btnCollectionStatusChannel.bounds;
- btnCollectionStatusChannelMaskLayer.path = maskPath11.CGPath;
- btnCollectionStatusChannelMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnCollectionStatusChannelMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnCollectionStatusChannelMaskLayer.lineWidth=1;
- [_btnCollectionStatusChannel.layer addSublayer:btnCollectionStatusChannelMaskLayer];
-
- collectionStatusBorderV=[CustomBorderView new];
- collectionStatusBorderV.frame=CGRectMake(5, CGRectGetMaxY(_btnCollectionStatusDepartment.frame)+topMargin,Screen_Width-30, 350);
- [collectionStatusBorderV setBackgroundColor:[UIColor whiteColor]];
- [collectionStatusBorderV drawBoardLine:borderWidth cornerRadius:2 color:[UIColor hexColor:@"D5CDCD"]];
- [collectionAmountContent addSubview:collectionStatusBorderV];
-
- _collectionStatusChartView=[[BarChartView alloc]init];
- _collectionStatusChartView.frame=CGRectMake(0, 0,collectionStatusBorderV.frame.size.width, 350);
- [collectionStatusBorderV addSubview:_collectionStatusChartView];
-
- collectionAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnCollectionStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(collectionStatusBorderV.frame)+10);
-
-
-
- collectionContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(collectionAmountContent.frame)+10);
- collectionContent.layer.cornerRadius=CornerRadius;
-
- height=CGRectGetMaxY(collectionContent.frame);
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- //订单情况
- orderStatusContent=[UIView new];
- orderStatusContent.backgroundColor=[UIColor whiteColor];
- orderStatusContent.frame=CGRectMake(10,height+10, Screen_Width-20, 0);
- [content addSubview:orderStatusContent];
-
-
- UIView *orderStatusTitleView = [[UIView alloc]init];
-
- orderStatusTitleView.frame = CGRectMake(0,0 ,Screen_Width, 45);
-
- UIView *orderStatusImgView=[UIImageView new];
- orderStatusImgView.frame=CGRectMake(10, 10,10 , 25);
- [orderStatusImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [orderStatusTitleView addSubview:orderStatusImgView];
-
- UILabel *titleOrderStatus = [[UILabel alloc]init];
- titleOrderStatus.frame = CGRectMake(CGRectGetMaxX(orderStatusImgView.frame)+10, 10, 100, 25);
- titleOrderStatus.text = @"订单情况";
- titleOrderStatus.textColor = [UIColor blackColor];
- titleOrderStatus.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [orderStatusTitleView addSubview:titleOrderStatus];
- [orderStatusContent addSubview:orderStatusTitleView];
-
- UIView *separator2=[UIView new];
- separator2.frame=CGRectMake(0,orderStatusTitleView.frame.size.height-1, orderStatusTitleView.frame.size.width-20, 0.5);
- [separator2 setBackgroundColor:[UIColor lightGrayColor]];
- [orderStatusTitleView addSubview:separator2 ];
-
-
-
- _btnOrderStatusCustom = [[UIButton alloc] initWithFrame:CGRectMake(Screen_Width/2-175-10,CGRectGetMaxY(orderStatusTitleView.frame)+topMargin, 70, 35)];
- [_btnOrderStatusCustom setTitle:@"自定义" forState:UIControlStateNormal];
- [_btnOrderStatusCustom setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnOrderStatusCustom.titleLabel.font = [UIFont systemFontOfSize: 10.0];
-
- [_btnOrderStatusCustom addTarget:self action:@selector(selectOrderStatusCustomDateData) forControlEvents:UIControlEventTouchUpInside];
- UIBezierPath *maskPath13 = [UIBezierPath bezierPathWithRoundedRect:_btnOrderStatusCustom.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerBottomLeft cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer13 = [CAShapeLayer layer];
- maskLayer13.frame = _btnOrderStatusCustom.bounds;
- maskLayer13.path = maskPath13.CGPath;
- _btnOrderStatusCustom.layer.mask = maskLayer13;
-
- [orderStatusContent addSubview:_btnOrderStatusCustom];
-
- btnOrderStatusCustomMaskLayer = [CAShapeLayer layer];
- btnOrderStatusCustomMaskLayer.frame = _btnOrderStatusCustom.bounds;
- btnOrderStatusCustomMaskLayer.path = maskPath13.CGPath;
- btnOrderStatusCustomMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnOrderStatusCustomMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnOrderStatusCustomMaskLayer.lineWidth=1;
- [_btnOrderStatusCustom.layer addSublayer:btnOrderStatusCustomMaskLayer];
-
- _btnOrderStatusYesterday = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnOrderStatusCustom.frame),CGRectGetMaxY(orderStatusTitleView.frame)+topMargin, 70, 35)];
-
- [_btnOrderStatusYesterday setTitle:[DateFormat getDateBefore:1] forState:UIControlStateNormal];
- _btnOrderStatusYesterday.layer.cornerRadius=0;
- _btnOrderStatusYesterday.layer.borderWidth=1;
- [_btnOrderStatusYesterday addTarget:self action:@selector(selectOrderStatusYesterdayDateData) forControlEvents:UIControlEventTouchUpInside];
- [_btnOrderStatusYesterday setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- [_btnOrderStatusYesterday.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
- _btnOrderStatusYesterday.layer.borderColor=[UIColor lightGrayColor].CGColor;
-
- _btnOrderStatusYesterday.titleLabel.font = [UIFont systemFontOfSize: 10.0];
-
- [orderStatusContent addSubview:_btnOrderStatusYesterday];
-
- _btnOrderStatusToday = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnOrderStatusYesterday.frame),CGRectGetMaxY(orderStatusTitleView.frame)+topMargin, 70, 35)];
-
- [_btnOrderStatusToday setTitle: [DateFormat getCurrentDate]forState:UIControlStateNormal];
- _btnOrderStatusToday.layer.cornerRadius=0;
- _btnOrderStatusToday.layer.borderWidth=1;
- _btnOrderStatusToday.titleLabel.font = [UIFont systemFontOfSize: 10.0];
- [_btnOrderStatusToday addTarget:self action:@selector(selectOrderStatusTodayDateData) forControlEvents:UIControlEventTouchUpInside];
- [_btnOrderStatusToday setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- [_btnOrderStatusToday.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
- _btnOrderStatusToday.layer.borderColor=[UIColor redColor].CGColor;
- [orderStatusContent addSubview:_btnOrderStatusToday];
-
-
- _btnOrderStatusRecentlySevenDays = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnOrderStatusToday.frame),CGRectGetMaxY(orderStatusTitleView.frame)+topMargin, 70, 35)];
-
- [_btnOrderStatusRecentlySevenDays setTitle:@"近7天" forState:UIControlStateNormal];
-
- _btnOrderStatusRecentlySevenDays.titleLabel.font = [UIFont systemFontOfSize: 10.0];
- _btnOrderStatusRecentlySevenDays.layer.cornerRadius=0;
- _btnOrderStatusRecentlySevenDays.layer.borderWidth=1;
- [_btnOrderStatusRecentlySevenDays addTarget:self action:@selector(selectOrderStatusSevenDaysData) forControlEvents:UIControlEventTouchUpInside];
- [_btnOrderStatusRecentlySevenDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- [_btnOrderStatusRecentlySevenDays.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
- _btnOrderStatusRecentlySevenDays.layer.borderColor=[UIColor lightGrayColor].CGColor;
- [orderStatusContent addSubview:_btnOrderStatusRecentlySevenDays];
-
- _btnOrderStatusRecentlyThirtyDays = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnOrderStatusRecentlySevenDays.frame),CGRectGetMaxY(orderStatusTitleView.frame)+topMargin, 70, 35)];
-
-
- [_btnOrderStatusRecentlyThirtyDays setTitle:@"近30天" forState:UIControlStateNormal];
- _btnOrderStatusRecentlyThirtyDays.titleLabel.font = [UIFont systemFontOfSize: 10.0];
- [_btnOrderStatusRecentlyThirtyDays addTarget:self action:@selector(selectOrderStatusThirtyDaysData) forControlEvents:UIControlEventTouchUpInside];
- [_btnOrderStatusRecentlyThirtyDays setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- UIBezierPath *maskPath15 = [UIBezierPath bezierPathWithRoundedRect:_btnOrderStatusRecentlyThirtyDays.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer15 = [CAShapeLayer layer];
- maskLayer15.frame = _btnOrderStatusRecentlyThirtyDays.bounds;
- maskLayer15.path = maskPath15.CGPath;
- _btnOrderStatusRecentlyThirtyDays.layer.mask = maskLayer15;
-
- [orderStatusContent addSubview:_btnOrderStatusRecentlyThirtyDays];
-
- btnOrderStatusRecentlyThirtyDaysMaskLayer = [CAShapeLayer layer];
- btnOrderStatusRecentlyThirtyDaysMaskLayer.frame = _btnOrderStatusRecentlyThirtyDays.bounds;
- btnOrderStatusRecentlyThirtyDaysMaskLayer.path = maskPath15.CGPath;
- btnOrderStatusRecentlyThirtyDaysMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnOrderStatusRecentlyThirtyDaysMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnOrderStatusRecentlyThirtyDaysMaskLayer.lineWidth=1;
- [_btnOrderStatusRecentlyThirtyDays.layer addSublayer:btnOrderStatusRecentlyThirtyDaysMaskLayer];
-
-
- vOrderStatusDate =[UIView new];
- vOrderStatusDate.frame=CGRectMake(0, CGRectGetMaxY(_btnOrderStatusCustom.frame)+topMargin, Screen_Width, 0);
- [orderStatusContent addSubview:vOrderStatusDate];
- vOrderStatusDate.hidden=YES;
- _btnOrderStatusStartDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnOrderStatusStartDate setTitle:_orderStatusStartDate forState:UIControlStateNormal];
- [_btnOrderStatusStartDate setBackgroundColor:[UIColor whiteColor]];
- [_btnOrderStatusStartDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnOrderStatusStartDate.titleLabel.font= [UIFont systemFontOfSize:14];
- [_btnOrderStatusStartDate addTarget:self action:@selector(btnSelectOrderStatusStartDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnOrderStatusStartDate.frame = CGRectMake(Screen_Width/2-110 ,0 , 100, 25);
- [vOrderStatusDate addSubview:_btnOrderStatusStartDate];
-
- UILabel *separatorOrderStatusLbl=[UILabel new];
- separatorOrderStatusLbl.frame=CGRectMake(CGRectGetMaxX(_btnOrderStatusStartDate.frame), 0, 20, 25);
- separatorOrderStatusLbl.text=@"--";
- separatorOrderStatusLbl.textColor = [UIColor blackColor];
- separatorOrderStatusLbl.font = [UIFont systemFontOfSize: 14];
- [vOrderStatusDate addSubview:separatorOrderStatusLbl];
-
- _btnOrderStatusEndDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnOrderStatusEndDate setTitle:_orderStatusEndDate forState:UIControlStateNormal];
- [_btnOrderStatusEndDate setBackgroundColor:[UIColor whiteColor]];
- [_btnOrderStatusEndDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnOrderStatusEndDate.titleLabel.font= [UIFont systemFontOfSize:14];
- [_btnOrderStatusEndDate addTarget:self action:@selector(btnSelectOrderStatusEndDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnOrderStatusEndDate.frame = CGRectMake(CGRectGetMaxX(separatorOrderStatusLbl.frame) ,0 , 100, 25);
- [vOrderStatusDate addSubview:_btnOrderStatusEndDate];
-
-
-
- orderAmountContent =[[UIView alloc]init];
-
- orderAmountContent.frame = CGRectMake(0,CGRectGetMaxY(_btnOrderStatusCustom.frame)+topMargin, Screen_Width, 0);
- [orderStatusContent addSubview:orderAmountContent];
-
-
-
- UIView *orderCustomerCountView = [[UIView alloc]init];
-
- orderCustomerCountView.frame = CGRectMake(0,topMargin,Screen_Width/2, rowHeight);
- lblOrderCustomerCount= [[UILabel alloc]init];
- lblOrderCustomerCount.frame = CGRectMake(0, 0,orderCustomerCountView.frame.size.width, 25);
- lblOrderCustomerCount.textAlignment=UITextAlignmentCenter;
- lblOrderCustomerCount.textColor = [UIColor blackColor];
- lblOrderCustomerCount.text=@"0";
- lblOrderCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [orderCustomerCountView addSubview:lblOrderCustomerCount];
-
- UILabel *lblTitleOrderCustomerCount = [[UILabel alloc]init];
- lblTitleOrderCustomerCount.frame = CGRectMake(0,CGRectGetMaxY(lblOrderCustomerCount.frame),orderCustomerCountView.frame.size.width, 25);
- lblTitleOrderCustomerCount.text = @"开单户数";
- lblTitleOrderCustomerCount.textColor = [UIColor blackColor];
- lblTitleOrderCustomerCount.textAlignment=UITextAlignmentCenter;
- lblTitleOrderCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [orderCustomerCountView addSubview:lblTitleOrderCustomerCount];
- [orderAmountContent addSubview:orderCustomerCountView];
-
-
- UIView *unsubscribeCustomerCountView = [[UIView alloc]init];
-
- unsubscribeCustomerCountView.frame = CGRectMake(0,CGRectGetMaxY(orderCustomerCountView.frame)+topMargin,Screen_Width/2, rowHeight);
- lblUnsubscribeCustomerCount= [[UILabel alloc]init];
- lblUnsubscribeCustomerCount.frame = CGRectMake(0, 0,unsubscribeCustomerCountView.frame.size.width, 25);
- lblUnsubscribeCustomerCount.textAlignment=UITextAlignmentCenter;
- lblUnsubscribeCustomerCount.textColor = [UIColor blackColor];
- lblUnsubscribeCustomerCount.text=@"0";
- lblUnsubscribeCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [unsubscribeCustomerCountView addSubview:lblUnsubscribeCustomerCount];
-
- UILabel *lblTitleUnsubscribeCustomerCount = [[UILabel alloc]init];
- lblTitleUnsubscribeCustomerCount.frame = CGRectMake(0,CGRectGetMaxY(lblUnsubscribeCustomerCount.frame),unsubscribeCustomerCountView.frame.size.width, 25);
- lblTitleUnsubscribeCustomerCount.text = @"退订户数";
- lblTitleUnsubscribeCustomerCount.textColor = [UIColor blackColor];
- lblTitleUnsubscribeCustomerCount.textAlignment=UITextAlignmentCenter;
- lblTitleUnsubscribeCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [unsubscribeCustomerCountView addSubview:lblTitleUnsubscribeCustomerCount];
- [orderAmountContent addSubview:unsubscribeCustomerCountView];
-
- UIView *middleSeparator1=[UIView new];
-
- middleSeparator1.frame=CGRectMake(Screen_Width/2,topMargin, 0.5, 45);
- middleSeparator1.backgroundColor=[UIColor lightGrayColor];
- [orderAmountContent addSubview:middleSeparator1];
-
-
- UIView *orderAmountView = [[UIView alloc]init];
-
- orderAmountView.frame = CGRectMake(Screen_Width/2,topMargin, Screen_Width/2, rowHeight);
- lblOrderAmount = [[UILabel alloc]init];
- lblOrderAmount.frame = CGRectMake(0, 0, orderAmountView.frame.size.width, 25);
- lblOrderAmount.textAlignment=UITextAlignmentCenter;
- lblOrderAmount.text=@"0.00";
- lblOrderAmount.textColor = [UIColor blackColor];
- lblOrderAmount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [orderAmountView addSubview:lblOrderAmount];
-
- UILabel *lblOrderAmountTitle = [[UILabel alloc]init];
- lblOrderAmountTitle.frame = CGRectMake(0,CGRectGetMaxY(lblOrderAmount.frame), orderAmountView.frame.size.width, 25);
- lblOrderAmountTitle.text = @"开单金额";
- lblOrderAmountTitle.textAlignment=UITextAlignmentCenter;
- lblOrderAmountTitle.textColor = [UIColor blackColor];
- lblOrderAmountTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [orderAmountView addSubview:lblOrderAmountTitle];
- [orderAmountContent addSubview:orderAmountView];
-
- UIView *unsubscribeAmountView = [[UIView alloc]init];
-
- unsubscribeAmountView.frame = CGRectMake(Screen_Width/2,CGRectGetMaxY(orderAmountView.frame)+topMargin, Screen_Width/2, rowHeight);
- lblUnsubscribeAmount = [[UILabel alloc]init];
- lblUnsubscribeAmount.frame = CGRectMake(0, 0, unsubscribeAmountView.frame.size.width, 25);
- lblUnsubscribeAmount.textAlignment=UITextAlignmentCenter;
- lblUnsubscribeAmount.text=@"0.00";
- lblUnsubscribeAmount.textColor = [UIColor blackColor];
- lblUnsubscribeAmount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [unsubscribeAmountView addSubview:lblUnsubscribeAmount];
-
- UILabel *lblUnsubscribeAmountTitle= [[UILabel alloc]init];
- lblUnsubscribeAmountTitle.frame = CGRectMake(0,CGRectGetMaxY(lblUnsubscribeAmount.frame), unsubscribeAmountView.frame.size.width, 25);
- lblUnsubscribeAmountTitle.text = @"退订金额";
- lblUnsubscribeAmountTitle.textAlignment=UITextAlignmentCenter;
- lblUnsubscribeAmountTitle.textColor = [UIColor blackColor];
- lblUnsubscribeAmountTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [unsubscribeAmountView addSubview:lblUnsubscribeAmountTitle];
- [orderAmountContent addSubview:unsubscribeAmountView];
-
-
- _btnOrderStatusDepartment = [[UIButton alloc] initWithFrame:CGRectMake(Screen_Width/2-70,CGRectGetMaxY(unsubscribeCustomerCountView.frame)+topMargin, 70, 35)];
- [_btnOrderStatusDepartment setTitle:@"部门" forState:UIControlStateNormal];
- [_btnOrderStatusDepartment setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
- _btnOrderStatusDepartment.titleLabel.font = [UIFont systemFontOfSize: 12.0];
- [_btnOrderStatusDepartment addTarget:self action:@selector(goOrderStatus:) forControlEvents:UIControlEventTouchUpInside];
- _btnOrderStatusDepartment.tag=1005;
-
- UIBezierPath *maskPath16 = [UIBezierPath bezierPathWithRoundedRect:_btnOrderStatusDepartment.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerBottomLeft cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer16 = [CAShapeLayer layer];
- maskLayer16.frame = _btnOrderStatusDepartment.bounds;
- maskLayer16.path = maskPath16.CGPath;
- _btnOrderStatusDepartment.layer.mask = maskLayer16;
-
- [orderAmountContent addSubview:_btnOrderStatusDepartment];
-
- btnOrderStatusDepartmentMaskLayer = [CAShapeLayer layer];
- btnOrderStatusDepartmentMaskLayer.frame = _btnOrderStatusDepartment.bounds;
-
- btnOrderStatusDepartmentMaskLayer.path = maskPath16.CGPath;
- btnOrderStatusDepartmentMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnOrderStatusDepartmentMaskLayer.strokeColor=[UIColor redColor].CGColor;
- btnOrderStatusDepartmentMaskLayer.lineWidth=1;
- [_btnOrderStatusDepartment.layer addSublayer:btnOrderStatusDepartmentMaskLayer];
-
- _btnOrderStatusChannel = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnOrderStatusDepartment.frame),CGRectGetMaxY(unsubscribeCustomerCountView.frame)+topMargin, 70, 35)];
- [_btnOrderStatusChannel setTitle:@"渠道" forState:UIControlStateNormal];
- [_btnOrderStatusChannel setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- _btnOrderStatusChannel.tag=1006;
- [_btnOrderStatusChannel addTarget:self action:@selector(goOrderStatus:) forControlEvents:UIControlEventTouchUpInside];
- _btnOrderStatusChannel.titleLabel.font = [UIFont systemFontOfSize: 12.0];
- UIBezierPath *maskPath19 = [UIBezierPath bezierPathWithRoundedRect:_btnOrderStatusChannel.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer19 = [CAShapeLayer layer];
- maskLayer19.frame = _btnOrderStatusChannel.bounds;
- maskLayer19.path = maskPath19.CGPath;
- _btnOrderStatusChannel.layer.mask = maskLayer19;
-
- [orderAmountContent addSubview:_btnOrderStatusChannel];
-
- btnOrderStatusChannelMaskLayer = [CAShapeLayer layer];
- btnOrderStatusChannelMaskLayer.frame = _btnOrderStatusChannel.bounds;
- btnOrderStatusChannelMaskLayer.path = maskPath19.CGPath;
- btnOrderStatusChannelMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnOrderStatusChannelMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnOrderStatusChannelMaskLayer.lineWidth=1;
- [_btnOrderStatusChannel.layer addSublayer:btnOrderStatusChannelMaskLayer];
-
-
-
- orderStatusBorderV=[CustomBorderView new];
- orderStatusBorderV.frame=CGRectMake(5, CGRectGetMaxY(_btnOrderStatusDepartment.frame)+topMargin,Screen_Width-30, 350);
- [orderStatusBorderV setBackgroundColor:[UIColor whiteColor]];
- [orderStatusBorderV drawBoardLine:borderWidth cornerRadius:2 color:[UIColor hexColor:@"D5CDCD"]];
- [orderAmountContent addSubview:orderStatusBorderV];
- _orderStatusChartView=[[BarChartView alloc]init];
- _orderStatusChartView.frame=CGRectMake(0,0,orderStatusBorderV.frame.size.width, 350);
- [orderStatusBorderV addSubview:_orderStatusChartView];
-
-
- orderAmountContent.frame=CGRectMake(0, CGRectGetMaxY(_btnOrderStatusCustom.frame)+topMargin,Screen_Width-20,CGRectGetMaxY(orderStatusBorderV.frame)+10);
-
-
- orderStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(orderAmountContent.frame)+10);
- orderStatusContent.layer.cornerRadius=CornerRadius;
- height=CGRectGetMaxY(orderStatusContent.frame);
-
- // }
-
-
- salesAchievementContent=[UIView new];
- salesAchievementContent.backgroundColor=[UIColor whiteColor];
- salesAchievementContent.frame=CGRectMake(10,height+10, Screen_Width-20, 0);
- [content addSubview:salesAchievementContent];
-
- UIView *salesAchievementTitleView = [[UIView alloc]init];
-
- salesAchievementTitleView.frame = CGRectMake(0,0 ,Screen_Width, 45);
-
- UIView *salesAchievementImgView=[UIImageView new];
- salesAchievementImgView.frame=CGRectMake(10, 10,10 , 25);
- [salesAchievementImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [salesAchievementTitleView addSubview:salesAchievementImgView];
-
- UILabel *titleSalesAchievement = [[UILabel alloc]init];
- titleSalesAchievement.frame = CGRectMake(CGRectGetMaxX(salesAchievementImgView.frame)+10, 10, 100, 25);
- titleSalesAchievement.text = @"销售业绩";
- titleSalesAchievement.textColor = [UIColor blackColor];
- titleSalesAchievement.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [salesAchievementTitleView addSubview:titleSalesAchievement];
- [salesAchievementContent addSubview:salesAchievementTitleView];
-
- UIView *separator3=[UIView new];
- separator3.frame=CGRectMake(0,salesAchievementTitleView.frame.size.height-1, orderStatusTitleView.frame.size.width-20, 0.5);
- [separator3 setBackgroundColor:[UIColor lightGrayColor]];
- [salesAchievementTitleView addSubview:separator3 ];
-
-
-
- _btnSalesAchievementCustom= [[UIButton alloc] initWithFrame:CGRectMake(Screen_Width/2-90,CGRectGetMaxY(salesAchievementTitleView.frame)+topMargin, 70, 35)];
- [_btnSalesAchievementCustom setTitle:@"自定义" forState:UIControlStateNormal];
- [_btnSalesAchievementCustom setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- _btnSalesAchievementCustom.titleLabel.font = [UIFont systemFontOfSize: 12.0];
- [_btnSalesAchievementCustom addTarget:self action:@selector(selectSalesAchievementCustomDate) forControlEvents:UIControlEventTouchUpInside];
-
- UIBezierPath *maskPath20 = [UIBezierPath bezierPathWithRoundedRect:_btnSalesAchievementCustom.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerBottomLeft cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer20 = [CAShapeLayer layer];
- maskLayer20.frame = _btnSalesAchievementCustom.bounds;
- maskLayer20.path = maskPath20.CGPath;
- _btnSalesAchievementCustom.layer.mask = maskLayer20;
-
- btnSalesAchievementCustomMaskLayer= [CAShapeLayer layer];
- btnSalesAchievementCustomMaskLayer.frame = _btnSalesAchievementCustom.bounds;
- btnSalesAchievementCustomMaskLayer.path = maskPath20.CGPath;
- btnSalesAchievementCustomMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnSalesAchievementCustomMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnSalesAchievementCustomMaskLayer.lineWidth=1;
- [_btnSalesAchievementCustom.layer addSublayer:btnSalesAchievementCustomMaskLayer];
-
- [salesAchievementContent addSubview:_btnSalesAchievementCustom];
-
-
- _btnSalesAchievemmentToday = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnSalesAchievementCustom.frame),CGRectGetMaxY(salesAchievementTitleView.frame)+topMargin, 70, 35)];
- _btnSalesAchievemmentToday.titleLabel.font = [UIFont systemFontOfSize: 12.0];
- [_btnSalesAchievemmentToday setTitle:[DateFormat getCurrentMonth] forState:UIControlStateNormal];
- [_btnSalesAchievemmentToday setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
- [_btnSalesAchievemmentToday addTarget:self action:@selector(getSalesAchievementCurrentMonth) forControlEvents:UIControlEventTouchUpInside];
-
-
- UIBezierPath *maskPath22 = [UIBezierPath bezierPathWithRoundedRect:_btnSalesAchievemmentToday.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer22 = [CAShapeLayer layer];
- maskLayer22.frame = _btnSalesAchievemmentToday.bounds;
- maskLayer22.path = maskPath22.CGPath;
- _btnSalesAchievemmentToday.layer.mask = maskLayer22;
-
- btnSalesAchievementCurrentMonthMaskLayer= [CAShapeLayer layer];
- btnSalesAchievementCurrentMonthMaskLayer.frame = _btnSalesAchievemmentToday.bounds;
- btnSalesAchievementCurrentMonthMaskLayer.path = maskPath22.CGPath;
- btnSalesAchievementCurrentMonthMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnSalesAchievementCurrentMonthMaskLayer.strokeColor=[UIColor redColor].CGColor;
- btnSalesAchievementCurrentMonthMaskLayer.lineWidth=1;
- [_btnSalesAchievemmentToday.layer addSublayer:btnSalesAchievementCurrentMonthMaskLayer];
-
- [salesAchievementContent addSubview:_btnSalesAchievemmentToday];
-
-
- salesAchievementPieBorderV=[CustomBorderView new];
- salesAchievementPieBorderV.frame=CGRectMake(5, CGRectGetMaxY(_btnSalesAchievementCustom.frame)+topMargin,Screen_Width-30, 200);
- [salesAchievementPieBorderV setBackgroundColor:[UIColor whiteColor]];
- [salesAchievementPieBorderV drawBoardLine:borderWidth cornerRadius:2 color:[UIColor hexColor:@"D5CDCD"]];
- [salesAchievementContent addSubview:salesAchievementPieBorderV];
-
- _salesAchievementChart = [[MyView alloc]initWithFrame:CGRectMake(0,0, salesAchievementPieBorderV.frame.size.width,200)];
- [salesAchievementPieBorderV addSubview:_salesAchievementChart];
-
-
- UIView *percentView = [[UIView alloc]init];
-
- percentView.frame = CGRectMake(0,CGRectGetMaxY(salesAchievementPieBorderV.frame)-30, Screen_Width, 25);
-
- lblSalesAchievementPercent= [[UILabel alloc]init];
- lblSalesAchievementPercent.frame = CGRectMake(0, 0, percentView.frame.size.width, 25);
- lblSalesAchievementPercent.textColor = [UIColor blackColor];
- lblSalesAchievementPercent.text=@"完成率0.00%";
- lblSalesAchievementPercent.font = [UIFont systemFontOfSize:22];
- lblSalesAchievementPercent.textAlignment=NSTextAlignmentCenter;
- [percentView addSubview:lblSalesAchievementPercent];
- [salesAchievementContent addSubview:percentView];
-
- UIView *planAmountView = [[UIView alloc]init];
-
- planAmountView.frame = CGRectMake(0,CGRectGetMaxY(percentView.frame)+topMargin, Screen_Width/2, rowHeight);
-
- lblSalesAchievementPlanAmount = [[UILabel alloc]init];
- lblSalesAchievementPlanAmount.frame = CGRectMake(0, 0, planAmountView.frame.size.width, 25);
- lblSalesAchievementPlanAmount.textColor = [UIColor blackColor];
- lblSalesAchievementPlanAmount.text=@"0.00";
- lblSalesAchievementPlanAmount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- lblSalesAchievementPlanAmount.textAlignment=NSTextAlignmentCenter;
- [planAmountView addSubview:lblSalesAchievementPlanAmount];
-
- UILabel *lblTitleSalesAchievementPlanAmount = [[UILabel alloc]init];
- lblTitleSalesAchievementPlanAmount.frame = CGRectMake(0,CGRectGetMaxY(lblSalesAchievementPlanAmount.frame),planAmountView.frame.size.width, 25);
- lblTitleSalesAchievementPlanAmount.text = @"任务额";
- lblTitleSalesAchievementPlanAmount.textColor = [UIColor blackColor];
- lblTitleSalesAchievementPlanAmount.textAlignment=NSTextAlignmentCenter;
- lblTitleSalesAchievementPlanAmount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [planAmountView addSubview:lblTitleSalesAchievementPlanAmount];
-
- [salesAchievementContent addSubview:planAmountView];
-
-
- UIView *middleSeparator7=[UIView new];
-
- middleSeparator7.frame=CGRectMake(Screen_Width/2, CGRectGetMaxY(percentView.frame)+topMargin,0.5, 45);
- middleSeparator7.backgroundColor=[UIColor lightGrayColor];
- [salesAchievementContent addSubview:middleSeparator7];
-
-
- UIView *achievementSalesAmountView = [[UIView alloc]init];
- achievementSalesAmountView.frame = CGRectMake(Screen_Width/2,CGRectGetMaxY(percentView.frame)+topMargin,Screen_Width/2,rowHeight);
- lblSalesAchievementSalesAmount = [[UILabel alloc]init];
- lblSalesAchievementSalesAmount.frame = CGRectMake(0, 0,achievementSalesAmountView.frame.size.width, 25);
- lblSalesAchievementSalesAmount.text=@"0.00";
- lblSalesAchievementSalesAmount.textColor = [UIColor blackColor];
- lblSalesAchievementSalesAmount.textAlignment=NSTextAlignmentCenter;
- lblSalesAchievementSalesAmount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [achievementSalesAmountView addSubview:lblSalesAchievementSalesAmount];
-
- UILabel *lblAchievementSalesAmountTitle= [[UILabel alloc]init];
- lblAchievementSalesAmountTitle.frame = CGRectMake(0,CGRectGetMaxY(lblSalesAchievementSalesAmount.frame), achievementSalesAmountView.frame.size.width, 25);
- lblAchievementSalesAmountTitle.text = @"销售金额";
- lblAchievementSalesAmountTitle.textAlignment=NSTextAlignmentCenter;
- lblAchievementSalesAmountTitle.textColor = [UIColor blackColor];
- lblAchievementSalesAmountTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [achievementSalesAmountView addSubview:lblAchievementSalesAmountTitle];
- [salesAchievementContent addSubview:achievementSalesAmountView];
-
-
- _btnSalesAchievementDepartment = [[UIButton alloc] initWithFrame:CGRectMake(Screen_Width/2-70,CGRectGetMaxY(planAmountView.frame)+topMargin, 70, 35)];
- [_btnSalesAchievementDepartment setTitle:@"部门" forState:UIControlStateNormal];
- [_btnSalesAchievementDepartment setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- _btnSalesAchievementDepartment.titleLabel.font = [UIFont systemFontOfSize: 12.0];
- [_btnSalesAchievementDepartment addTarget:self action:@selector(goSalesAchievement:) forControlEvents:UIControlEventTouchUpInside];
- _btnSalesAchievementDepartment.tag=1007;
-
- UIBezierPath *maskPath23 = [UIBezierPath bezierPathWithRoundedRect:_btnSalesAchievementDepartment.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerBottomLeft cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer24 = [CAShapeLayer layer];
- maskLayer24.frame = _btnSalesAchievementDepartment.bounds;
- maskLayer24.path = maskPath23.CGPath;
- _btnSalesAchievementDepartment.layer.mask = maskLayer24;
-
- [salesAchievementContent addSubview:_btnSalesAchievementDepartment];
-
- btnSalesAchievementDepartmentMaskLayer = [CAShapeLayer layer];
- btnSalesAchievementDepartmentMaskLayer.frame = _btnSalesAchievementDepartment.bounds;
-
- btnSalesAchievementDepartmentMaskLayer.path = maskPath23.CGPath;
- btnSalesAchievementDepartmentMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnSalesAchievementDepartmentMaskLayer.strokeColor=[UIColor redColor].CGColor;
- btnSalesAchievementDepartmentMaskLayer.lineWidth=1;
- [_btnSalesAchievementDepartment.layer addSublayer:btnSalesAchievementDepartmentMaskLayer];
-
- _btnSalesAchievementStaff = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_btnSalesAchievementDepartment.frame),CGRectGetMaxY(planAmountView.frame)+topMargin, 70, 35)];
- [_btnSalesAchievementStaff setTitle:@"业务员" forState:UIControlStateNormal];
- [_btnSalesAchievementStaff setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- _btnSalesAchievementStaff.tag=1008;
- [_btnSalesAchievementStaff addTarget:self action:@selector(goSalesAchievement:) forControlEvents:UIControlEventTouchUpInside];
- _btnSalesAchievementStaff.titleLabel.font = [UIFont systemFontOfSize: 12.0];
- UIBezierPath *maskPath26 = [UIBezierPath bezierPathWithRoundedRect:_btnSalesAchievementStaff.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer26 = [CAShapeLayer layer];
- maskLayer26.frame = _btnSalesAchievementStaff.bounds;
- maskLayer26.path = maskPath26.CGPath;
- _btnSalesAchievementStaff.layer.mask = maskLayer26;
-
- [salesAchievementContent addSubview:_btnSalesAchievementStaff];
-
- btnSalesAchievementStaffMaskLayer = [CAShapeLayer layer];
- btnSalesAchievementStaffMaskLayer.frame = _btnSalesAchievementStaff.bounds;
- btnSalesAchievementStaffMaskLayer.path = maskPath26.CGPath;
- btnSalesAchievementStaffMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnSalesAchievementStaffMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnSalesAchievementStaffMaskLayer.lineWidth=1;
- [_btnSalesAchievementStaff.layer addSublayer:btnSalesAchievementStaffMaskLayer];
-
- salesAchievementBorderV=[CustomBorderView new];
- salesAchievementBorderV.frame=CGRectMake(5, CGRectGetMaxY(_btnSalesAchievementDepartment.frame)+topMargin,Screen_Width-30, 350);
- [salesAchievementBorderV setBackgroundColor:[UIColor whiteColor]];
- [salesAchievementBorderV drawBoardLine:borderWidth cornerRadius:2 color:[UIColor hexColor:@"D5CDCD"]];
- [salesAchievementContent addSubview:salesAchievementBorderV];
-
- _salesAchievementChartView=[[BarChartView alloc]init];
- _salesAchievementChartView.frame=CGRectMake(0,0,salesAchievementBorderV.frame.size.width, 350);
- [salesAchievementBorderV addSubview:_salesAchievementChartView];
-
-
- salesAchievementContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(salesAchievementBorderV.frame)+10);
- salesAchievementContent.layer.cornerRadius=CornerRadius;
-
- [content addSubview:salesAchievementContent];
-
- height=CGRectGetMaxY(salesAchievementContent.frame);
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound){
- shoppingGuideFilingContent=[UIView new];
- shoppingGuideFilingContent.backgroundColor=[UIColor whiteColor];
- shoppingGuideFilingContent.frame=CGRectMake(10,height+10, Screen_Width-20, 0);
- [content addSubview:shoppingGuideFilingContent];
-
-
- UIView *shoppingGuideFilingTitleView = [[UIView alloc]init];
-
- shoppingGuideFilingTitleView.frame = CGRectMake(0,0 ,Screen_Width, 45);
-
- UIView *shoppingGuideFilingImgView=[UIImageView new];
- shoppingGuideFilingImgView.frame=CGRectMake(10, 10,10 , 25);
- [shoppingGuideFilingImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [shoppingGuideFilingTitleView addSubview:shoppingGuideFilingImgView];
-
- UILabel *titleShoppingGuideFiling = [[UILabel alloc]init];
- titleShoppingGuideFiling.frame = CGRectMake(CGRectGetMaxX(shoppingGuideFilingImgView.frame)+10, 10, 300, 25);
- titleShoppingGuideFiling.text = @"导购报备/成交客户排行(前5名)";
- titleShoppingGuideFiling.textColor = [UIColor blackColor];
- titleShoppingGuideFiling.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [shoppingGuideFilingTitleView addSubview:titleShoppingGuideFiling];
- [shoppingGuideFilingContent addSubview:shoppingGuideFilingTitleView];
-
- UIView *separator4=[UIView new];
- separator4.frame=CGRectMake(0,shoppingGuideFilingTitleView.frame.size.height-1, shoppingGuideFilingTitleView.frame.size.width-20, 0.5);
- [separator4 setBackgroundColor:[UIColor lightGrayColor]];
- [shoppingGuideFilingTitleView addSubview:separator4 ];
-
-
-
- UIView *vShoppingGuideFilingDate =[UIView new];
- vShoppingGuideFilingDate.frame=CGRectMake(0, CGRectGetMaxY(shoppingGuideFilingTitleView.frame)+topMargin, Screen_Width, 25);
- [shoppingGuideFilingContent addSubview:vShoppingGuideFilingDate];
-
- _btnShoppingGuideStartDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnShoppingGuideStartDate setTitle:_shoppingGuideStartDate forState:UIControlStateNormal];
- [_btnShoppingGuideStartDate setBackgroundColor:[UIColor whiteColor]];
- [_btnShoppingGuideStartDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnShoppingGuideStartDate.titleLabel.font= [UIFont systemFontOfSize:18];
- [_btnShoppingGuideStartDate addTarget:self action:@selector(btnSelectShoppingGuideStartDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnShoppingGuideStartDate.frame = CGRectMake(Screen_Width/2-120 ,0 , 110, 25);
- [vShoppingGuideFilingDate addSubview:_btnShoppingGuideStartDate];
-
- UILabel *separatorShoppingGuideLbl=[UILabel new];
- separatorShoppingGuideLbl.frame=CGRectMake(CGRectGetMaxX(_btnShoppingGuideStartDate.frame), 0, 20, 25);
- separatorShoppingGuideLbl.text=@"--";
- separatorShoppingGuideLbl.textColor = [UIColor blackColor];
- separatorShoppingGuideLbl.font = [UIFont systemFontOfSize: 18];
- [vShoppingGuideFilingDate addSubview:separatorShoppingGuideLbl];
-
- _btnShoppingGuideEndDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnShoppingGuideEndDate setTitle:_shoppingGuideEndDate forState:UIControlStateNormal];
- [_btnShoppingGuideEndDate setBackgroundColor:[UIColor whiteColor]];
- [_btnShoppingGuideEndDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnShoppingGuideEndDate.titleLabel.font= [UIFont systemFontOfSize:18];
- [_btnShoppingGuideEndDate addTarget:self action:@selector(btnSelectShoppingGuideEndDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnShoppingGuideEndDate.frame = CGRectMake(CGRectGetMaxX(separatorShoppingGuideLbl.frame) ,0 , 110, 25);
- [vShoppingGuideFilingDate addSubview:_btnShoppingGuideEndDate];
-
- UIView *filingCustomerCountView = [[UIView alloc]init];
-
- filingCustomerCountView.frame = CGRectMake(0,CGRectGetMaxY(vShoppingGuideFilingDate.frame)+topMargin,Screen_Width/2, rowHeight);
- lblFilingCustomerCount= [[UILabel alloc]init];
- lblFilingCustomerCount.frame = CGRectMake(0, 0,filingCustomerCountView.frame.size.width, 25);
- lblFilingCustomerCount.textAlignment=UITextAlignmentCenter;
- lblFilingCustomerCount.textColor = [UIColor blackColor];
- lblFilingCustomerCount.text=@"0";
- lblFilingCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [filingCustomerCountView addSubview:lblFilingCustomerCount];
-
- UILabel *lblTitleFilingCustomerCount = [[UILabel alloc]init];
- lblTitleFilingCustomerCount.frame = CGRectMake(0,CGRectGetMaxY(lblFilingCustomerCount.frame),filingCustomerCountView.frame.size.width, 25);
- lblTitleFilingCustomerCount.text = @"报备客户数";
- lblTitleFilingCustomerCount.textColor = [UIColor blackColor];
- lblTitleFilingCustomerCount.textAlignment=UITextAlignmentCenter;
- lblTitleFilingCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [filingCustomerCountView addSubview:lblTitleFilingCustomerCount];
- [shoppingGuideFilingContent addSubview:filingCustomerCountView];
-
- UIView *middleSeparator6=[UIView new];
-
- middleSeparator6.frame=CGRectMake(Screen_Width/2, CGRectGetMaxY(vShoppingGuideFilingDate.frame)+topMargin, 0.5, 45);
- middleSeparator6.backgroundColor=[UIColor lightGrayColor];
- [shoppingGuideFilingContent addSubview:middleSeparator6];
-
-
- UIView *transactionCustomerCountView = [[UIView alloc]init];
-
- transactionCustomerCountView.frame = CGRectMake(Screen_Width/2,CGRectGetMaxY(vShoppingGuideFilingDate.frame)+topMargin, Screen_Width/2, rowHeight);
- lblTransactionCustomerCount = [[UILabel alloc]init];
- lblTransactionCustomerCount.frame = CGRectMake(0, 0, transactionCustomerCountView.frame.size.width, 25);
- lblTransactionCustomerCount.textAlignment=UITextAlignmentCenter;
- lblTransactionCustomerCount.text=@"0";
- lblTransactionCustomerCount.textColor = [UIColor blackColor];
- lblTransactionCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [transactionCustomerCountView addSubview:lblTransactionCustomerCount];
-
- UILabel *lblTransactionCustomerCountTitle = [[UILabel alloc]init];
- lblTransactionCustomerCountTitle.frame = CGRectMake(0,CGRectGetMaxY(lblTransactionCustomerCount.frame), transactionCustomerCountView.frame.size.width, 25);
- lblTransactionCustomerCountTitle.text = @"成交客户数";
- lblTransactionCustomerCountTitle.textAlignment=UITextAlignmentCenter;
- lblTransactionCustomerCountTitle.textColor = [UIColor blackColor];
- lblTransactionCustomerCountTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [transactionCustomerCountView addSubview:lblTransactionCustomerCountTitle];
- [shoppingGuideFilingContent addSubview:transactionCustomerCountView];
-
-
- shoppingGuidePieBorderV=[CustomBorderView new];
- shoppingGuidePieBorderV.frame=CGRectMake(5, CGRectGetMaxY(filingCustomerCountView.frame)+topMargin,Screen_Width-30, 200);
- [shoppingGuidePieBorderV setBackgroundColor:[UIColor whiteColor]];
- [shoppingGuidePieBorderV drawBoardLine:borderWidth cornerRadius:2 color:[UIColor hexColor:@"D5CDCD"]];
- [shoppingGuideFilingContent addSubview:shoppingGuidePieBorderV];
-
- _transactionView = [[MyView alloc]initWithFrame:CGRectMake(5,5, shoppingGuidePieBorderV.frame.size.width-10,190)];
- [shoppingGuidePieBorderV addSubview:_transactionView];
-
-
- UIView *transactionPercentView = [[UIView alloc]init];
-
- transactionPercentView.frame = CGRectMake(5,CGRectGetMaxY(shoppingGuidePieBorderV.frame)-30, shoppingGuideFilingContent.frame.size.width-10, 25);
-
- lblTransactionPercent= [[UILabel alloc]init];
- lblTransactionPercent.frame = CGRectMake(0, 0, transactionPercentView.frame.size.width, 25);
- lblTransactionPercent.textColor = [UIColor blackColor];
- lblTransactionPercent.text=@"成交率0.00%";
- lblTransactionPercent.font = [UIFont systemFontOfSize:22];
- lblTransactionPercent.textAlignment=NSTextAlignmentCenter;
- [transactionPercentView addSubview:lblTransactionPercent];
- [shoppingGuideFilingContent addSubview:transactionPercentView];
-
-
-
- shoppingGuideChartBorderV=[CustomBorderView new];
- shoppingGuideChartBorderV.frame=CGRectMake(5, CGRectGetMaxY(transactionPercentView.frame)+topMargin,Screen_Width-30, 350);
- [shoppingGuideChartBorderV setBackgroundColor:[UIColor whiteColor]];
- [shoppingGuideChartBorderV drawBoardLine:borderWidth cornerRadius:2 color:[UIColor hexColor:@"D5CDCD"]];
- [shoppingGuideFilingContent addSubview:shoppingGuideChartBorderV];
- _transactionChartView=[[HorizontalBarChartView alloc]init];
- _transactionChartView.frame=CGRectMake(0, 0,shoppingGuideChartBorderV.frame.size.width, 350);
- [shoppingGuideChartBorderV addSubview:_transactionChartView];
-
-
-
- shoppingGuideFilingContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(shoppingGuideChartBorderV.frame)+10);
- shoppingGuideFilingContent.layer.cornerRadius=CornerRadius;
- height=CGRectGetMaxY(shoppingGuideFilingContent.frame);
- // }
-
- //
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound){
- //配送情况
- deliveryStatusContent=[UIView new];
- deliveryStatusContent.backgroundColor=[UIColor whiteColor];
- deliveryStatusContent.frame=CGRectMake(10,height+10, Screen_Width-20, 0);
- [content addSubview:deliveryStatusContent];
-
- UIView *deliveryStatusTitleView = [[UIView alloc]init];
-
- deliveryStatusTitleView.frame = CGRectMake(0,0 ,Screen_Width, 45);
-
- UIView *deliveryStatusImgView=[UIImageView new];
- deliveryStatusImgView.frame=CGRectMake(10, 10,10 , 25);
- [deliveryStatusImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [deliveryStatusTitleView addSubview:deliveryStatusImgView];
-
- UILabel *titleDeliveryStatus = [[UILabel alloc]init];
- titleDeliveryStatus.frame = CGRectMake(CGRectGetMaxX(deliveryStatusImgView.frame)+10, 10, 100, 25);
- titleDeliveryStatus.text = @"配送情况";
- titleDeliveryStatus.textColor = [UIColor blackColor];
- titleDeliveryStatus.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [deliveryStatusTitleView addSubview:titleDeliveryStatus];
- [deliveryStatusContent addSubview:deliveryStatusTitleView];
-
- UIView *separator7=[UIView new];
- separator7.frame=CGRectMake(0,deliveryStatusTitleView.frame.size.height-1, deliveryStatusTitleView.frame.size.width-20, 0.5);
- [separator7 setBackgroundColor:[UIColor lightGrayColor]];
- [deliveryStatusTitleView addSubview:separator7 ];
-
-
-
- UIView *vDeliveryStatusDate =[UIView new];
- vDeliveryStatusDate.frame=CGRectMake(0, CGRectGetMaxY(deliveryStatusTitleView.frame)+topMargin, Screen_Width, 25);
- [deliveryStatusContent addSubview:vDeliveryStatusDate];
-
- _btnDeliveryStatusStartDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnDeliveryStatusStartDate setTitle:_shoppingGuideStartDate forState:UIControlStateNormal];
- [_btnDeliveryStatusStartDate setBackgroundColor:[UIColor whiteColor]];
- [_btnDeliveryStatusStartDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnDeliveryStatusStartDate.titleLabel.font= [UIFont systemFontOfSize:18];
- [_btnDeliveryStatusStartDate addTarget:self action:@selector(btnSelectDeliveryStatusStartDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnDeliveryStatusStartDate.frame = CGRectMake(Screen_Width/2-120 ,0 , 110, 25);
- [vDeliveryStatusDate addSubview:_btnDeliveryStatusStartDate];
-
- UILabel *separatorDeliveryStatusLbl=[UILabel new];
- separatorDeliveryStatusLbl.frame=CGRectMake(CGRectGetMaxX(_btnDeliveryStatusStartDate.frame), 0, 20, 25);
- separatorDeliveryStatusLbl.text=@"--";
- separatorDeliveryStatusLbl.textColor = [UIColor blackColor];
- separatorDeliveryStatusLbl.font = [UIFont systemFontOfSize: 18];
- [vDeliveryStatusDate addSubview:separatorDeliveryStatusLbl];
-
- _btnDeliveryStatusEndDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnDeliveryStatusEndDate setTitle:_deliveryStatusEndDate forState:UIControlStateNormal];
- [_btnDeliveryStatusEndDate setBackgroundColor:[UIColor whiteColor]];
- [_btnDeliveryStatusEndDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnDeliveryStatusEndDate.titleLabel.font= [UIFont systemFontOfSize:18];
- [_btnDeliveryStatusEndDate addTarget:self action:@selector(btnSelectDeliveryStatusEndDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnDeliveryStatusEndDate.frame = CGRectMake(CGRectGetMaxX(separatorDeliveryStatusLbl.frame) ,0 , 110, 25);
- [vDeliveryStatusDate addSubview:_btnDeliveryStatusEndDate];
-
-
- deliveryStatusBorderV=[CustomBorderView new];
- deliveryStatusBorderV.frame=CGRectMake(5, CGRectGetMaxY(vDeliveryStatusDate.frame)+topMargin,Screen_Width-30, 200);
- [deliveryStatusBorderV setBackgroundColor:[UIColor whiteColor]];
- [deliveryStatusBorderV drawBoardLine:borderWidth cornerRadius:2 color:[UIColor hexColor:@"D5CDCD"]];
- [deliveryStatusContent addSubview:deliveryStatusBorderV];
-
- _deliveryStatusView = [[MyView alloc]initWithFrame:CGRectMake(0,0 ,deliveryStatusBorderV.frame.size.width-10,190)];
- [deliveryStatusBorderV addSubview:_deliveryStatusView];
-
-
- UIView *deliveryPercentView = [[UIView alloc]init];
-
- deliveryPercentView.frame = CGRectMake(5,CGRectGetMaxY(deliveryStatusBorderV.frame)-30, Screen_Width-30, 25);
-
- lblDeliveryPercent= [[UILabel alloc]init];
- lblDeliveryPercent.frame = CGRectMake(0, 0, deliveryPercentView.frame.size.width, 25);
- lblDeliveryPercent.textColor = [UIColor blackColor];
- lblDeliveryPercent.font = [UIFont systemFontOfSize:22]; lblDeliveryPercent.text=@"完成率0.00%";
- lblDeliveryPercent.textAlignment=NSTextAlignmentCenter;
- [deliveryPercentView addSubview:lblDeliveryPercent];
- [deliveryStatusContent addSubview:deliveryPercentView];
-
-
- UIView *needDeliveryCustomerCountView = [[UIView alloc]init];
-
- needDeliveryCustomerCountView.frame = CGRectMake(0,CGRectGetMaxY(deliveryPercentView.frame)+topMargin,Screen_Width/2, rowHeight);
- lblNeedDeliveryCustomerCount= [[UILabel alloc]init];
- lblNeedDeliveryCustomerCount.frame = CGRectMake(0, 0,needDeliveryCustomerCountView.frame.size.width, 25);
- lblNeedDeliveryCustomerCount.textAlignment=UITextAlignmentCenter;
- lblNeedDeliveryCustomerCount.textColor = [UIColor blackColor];
- lblNeedDeliveryCustomerCount.text=@"0";
- lblNeedDeliveryCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [needDeliveryCustomerCountView addSubview:lblNeedDeliveryCustomerCount];
-
- UILabel *lblTitleNeedDeliveryCustomerCount = [[UILabel alloc]init];
- lblTitleNeedDeliveryCustomerCount.frame = CGRectMake(0,CGRectGetMaxY(lblNeedDeliveryCustomerCount.frame),needDeliveryCustomerCountView.frame.size.width, 25);
- lblTitleNeedDeliveryCustomerCount.text = @"需配送数";
- lblTitleNeedDeliveryCustomerCount.textColor = [UIColor blackColor];
- lblTitleNeedDeliveryCustomerCount.textAlignment=UITextAlignmentCenter;
- lblTitleNeedDeliveryCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [needDeliveryCustomerCountView addSubview:lblTitleNeedDeliveryCustomerCount];
- [deliveryStatusContent addSubview:needDeliveryCustomerCountView];
-
- UIView *middleSeparator8=[UIView new];
-
- middleSeparator8.frame=CGRectMake(Screen_Width/2, CGRectGetMaxY(deliveryPercentView.frame)+topMargin, 0.5, 45);
- middleSeparator8.backgroundColor=[UIColor lightGrayColor];
- [deliveryStatusContent addSubview:middleSeparator8];
-
-
- UIView *deliveredCustomerCountView = [[UIView alloc]init];
-
- deliveredCustomerCountView.frame = CGRectMake(Screen_Width/2,CGRectGetMaxY(deliveryPercentView.frame)+topMargin, Screen_Width/2, rowHeight);
- lblDeliveredCustomerCount = [[UILabel alloc]init];
- lblDeliveredCustomerCount.frame = CGRectMake(0, 0, deliveredCustomerCountView.frame.size.width, 25);
- lblDeliveredCustomerCount.textAlignment=UITextAlignmentCenter;
- lblDeliveredCustomerCount.text=@"0";
- lblDeliveredCustomerCount.textColor = [UIColor blackColor];
- lblDeliveredCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [deliveredCustomerCountView addSubview:lblDeliveredCustomerCount];
-
- UILabel *lblDeliveredCustomerCountTitle = [[UILabel alloc]init];
- lblDeliveredCustomerCountTitle.frame = CGRectMake(0,CGRectGetMaxY(lblDeliveredCustomerCount.frame), deliveredCustomerCountView.frame.size.width, 25);
- lblDeliveredCustomerCountTitle.text = @"已配送数";
- lblDeliveredCustomerCountTitle.textAlignment=UITextAlignmentCenter;
- lblDeliveredCustomerCountTitle.textColor = [UIColor blackColor];
- lblDeliveredCustomerCountTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [deliveredCustomerCountView addSubview:lblDeliveredCustomerCountTitle];
- [deliveryStatusContent addSubview:deliveredCustomerCountView];
-
-
- nextDayNeedDeliveyCountView = [[UIView alloc]init];
-
- nextDayNeedDeliveyCountView.frame = CGRectMake(0,CGRectGetMaxY(needDeliveryCustomerCountView.frame)+topMargin,Screen_Width/3, rowHeight);
- lblNextDayNeedDeliveryCount= [[UILabel alloc]init];
- lblNextDayNeedDeliveryCount.frame = CGRectMake(0, 0,nextDayNeedDeliveyCountView.frame.size.width, 25);
- lblNextDayNeedDeliveryCount.textAlignment=UITextAlignmentCenter;
- lblNextDayNeedDeliveryCount.textColor = [UIColor blackColor];
- lblNextDayNeedDeliveryCount.text=@"0";
- lblNextDayNeedDeliveryCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextDayNeedDeliveyCountView addSubview:lblNextDayNeedDeliveryCount];
-
- UILabel *lblTitleNextDayNeedDeliveryCount = [[UILabel alloc]init];
- lblTitleNextDayNeedDeliveryCount.frame = CGRectMake(0,CGRectGetMaxY(lblNextDayNeedDeliveryCount.frame),nextDayNeedDeliveyCountView.frame.size.width, 50);
- lblTitleNextDayNeedDeliveryCount.text = @"未来1天需配送数";
- lblTitleNextDayNeedDeliveryCount.textColor = [UIColor blackColor];
- lblTitleNextDayNeedDeliveryCount.textAlignment=UITextAlignmentCenter;
- lblTitleNextDayNeedDeliveryCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
-
- [lblTitleNextDayNeedDeliveryCount setLineBreakMode:NSLineBreakByWordWrapping];
- lblTitleNextDayNeedDeliveryCount.numberOfLines = 0;
- [nextDayNeedDeliveyCountView addSubview:lblTitleNextDayNeedDeliveryCount];
- [deliveryStatusContent addSubview:nextDayNeedDeliveyCountView];
-
-
-
- UIView *nextTwoDaysNeedDeliveyCountView = [[UIView alloc]init];
-
- nextTwoDaysNeedDeliveyCountView.frame = CGRectMake(Screen_Width/3,CGRectGetMaxY(needDeliveryCustomerCountView.frame)+topMargin,Screen_Width/3, rowHeight);
- lblNextTwoDaysNeedDeliveryCount= [[UILabel alloc]init];
- lblNextTwoDaysNeedDeliveryCount.frame = CGRectMake(0, 0,nextTwoDaysNeedDeliveyCountView.frame.size.width, 25);
- lblNextTwoDaysNeedDeliveryCount.textAlignment=UITextAlignmentCenter;
- lblNextTwoDaysNeedDeliveryCount.textColor = [UIColor blackColor];
- lblNextTwoDaysNeedDeliveryCount.text=@"0";
- lblNextTwoDaysNeedDeliveryCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextTwoDaysNeedDeliveyCountView addSubview:lblNextTwoDaysNeedDeliveryCount];
-
- UILabel *lblTitleNextTwoDaysNeedDeliveryCount = [[UILabel alloc]init];
- lblTitleNextTwoDaysNeedDeliveryCount.frame = CGRectMake(0,CGRectGetMaxY(lblNextTwoDaysNeedDeliveryCount.frame),nextTwoDaysNeedDeliveyCountView.frame.size.width,50);
- lblTitleNextTwoDaysNeedDeliveryCount.text = @"未来2天需配送数";
- lblTitleNextTwoDaysNeedDeliveryCount.textColor = [UIColor blackColor];
- lblTitleNextTwoDaysNeedDeliveryCount.textAlignment=UITextAlignmentCenter;
- [lblTitleNextTwoDaysNeedDeliveryCount setLineBreakMode:NSLineBreakByWordWrapping];
- lblTitleNextTwoDaysNeedDeliveryCount.numberOfLines = 0;
- lblTitleNextTwoDaysNeedDeliveryCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextTwoDaysNeedDeliveyCountView addSubview:lblTitleNextTwoDaysNeedDeliveryCount];
- [deliveryStatusContent addSubview:nextTwoDaysNeedDeliveyCountView];
-
-
- nextThreeDaysNeedDeliveyCountView= [[UIView alloc]init];
-
- nextThreeDaysNeedDeliveyCountView.frame = CGRectMake(Screen_Width/3*2,CGRectGetMaxY(needDeliveryCustomerCountView.frame)+topMargin,Screen_Width/3, rowHeight);
- [deliveryStatusContent addSubview:nextThreeDaysNeedDeliveyCountView];
- lblNextThreeDaysNeedDeliveryCount= [[UILabel alloc]init];
- lblNextThreeDaysNeedDeliveryCount.frame = CGRectMake(0, 0,nextThreeDaysNeedDeliveyCountView.frame.size.width, 25);
- lblNextThreeDaysNeedDeliveryCount.textAlignment=UITextAlignmentCenter;
- lblNextThreeDaysNeedDeliveryCount.textColor = [UIColor blackColor];
- lblNextThreeDaysNeedDeliveryCount.text=@"0";
- lblNextThreeDaysNeedDeliveryCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextThreeDaysNeedDeliveyCountView addSubview:lblNextThreeDaysNeedDeliveryCount];
-
- UILabel *lblTitleNextThreeDaysNeedDeliveryCount = [[UILabel alloc]init];
- lblTitleNextThreeDaysNeedDeliveryCount.frame = CGRectMake(0,CGRectGetMaxY(lblNextThreeDaysNeedDeliveryCount.frame),nextThreeDaysNeedDeliveyCountView.frame.size.width-10, 50);
- lblTitleNextThreeDaysNeedDeliveryCount.text = @"未来3天需配送数";
- lblTitleNextThreeDaysNeedDeliveryCount.textColor = [UIColor blackColor];
- [lblTitleNextThreeDaysNeedDeliveryCount setLineBreakMode:NSLineBreakByWordWrapping];
- lblTitleNextThreeDaysNeedDeliveryCount.numberOfLines = 0;
- lblTitleNextThreeDaysNeedDeliveryCount.textAlignment=UITextAlignmentCenter;
- lblTitleNextThreeDaysNeedDeliveryCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextThreeDaysNeedDeliveyCountView addSubview:lblTitleNextThreeDaysNeedDeliveryCount];
-
-
-
- deliveryStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedDeliveyCountView.frame)+30);
- deliveryStatusContent.layer.cornerRadius=CornerRadius;
- height=CGRectGetMaxY(deliveryStatusContent.frame);
-
-
- //}
-
- //
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound){
-
- installStatusContent=[UIView new];
- installStatusContent.backgroundColor=[UIColor whiteColor];
- installStatusContent.frame=CGRectMake(10,height+10, Screen_Width-20, 0);
- [content addSubview:installStatusContent];
-
- UIView *installStatusTitleView = [[UIView alloc]init];
-
- installStatusTitleView.frame = CGRectMake(0,0 ,Screen_Width, 45);
-
- UIView *installStatusImgView=[UIImageView new];
- installStatusImgView.frame=CGRectMake(10, 10,10 , 25);
- [installStatusImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [installStatusTitleView addSubview:installStatusImgView];
-
- UILabel *titleInstallStatus = [[UILabel alloc]init];
- titleInstallStatus.frame = CGRectMake(CGRectGetMaxX(installStatusImgView.frame)+10, 10, 100, 25);
- titleInstallStatus.text = @"安装情况";
- titleInstallStatus.textColor = [UIColor blackColor];
- titleInstallStatus.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [installStatusTitleView addSubview:titleInstallStatus];
- [installStatusContent addSubview:installStatusTitleView];
-
- UIView *separator8=[UIView new];
- separator8.frame=CGRectMake(0,installStatusTitleView.frame.size.height-1, installStatusTitleView.frame.size.width-20, 0.5);
- [separator8 setBackgroundColor:[UIColor lightGrayColor]];
- [installStatusTitleView addSubview:separator8];
-
- UIView *vInstallStatusDate =[UIView new];
- vInstallStatusDate.frame=CGRectMake(0, CGRectGetMaxY(installStatusTitleView.frame)+topMargin, Screen_Width, 25);
- [installStatusContent addSubview:vInstallStatusDate];
-
- _btnInstallStatusStartDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnInstallStatusStartDate setTitle:_installStatusStartDate forState:UIControlStateNormal];
- [_btnInstallStatusStartDate setBackgroundColor:[UIColor whiteColor]];
- [_btnInstallStatusStartDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnInstallStatusStartDate.titleLabel.font= [UIFont systemFontOfSize:18];
- [_btnInstallStatusStartDate addTarget:self action:@selector(btnSelectInstallStatusStartDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnInstallStatusStartDate.frame = CGRectMake(Screen_Width/2-120 ,0 , 110, 25);
- [vInstallStatusDate addSubview:_btnInstallStatusStartDate];
-
- UILabel *separatorInstallStatusLbl=[UILabel new];
- separatorInstallStatusLbl.frame=CGRectMake(CGRectGetMaxX(_btnInstallStatusStartDate.frame), 0, 20, 25);
- separatorInstallStatusLbl.text=@"--";
- separatorInstallStatusLbl.textColor = [UIColor blackColor];
- separatorInstallStatusLbl.font = [UIFont systemFontOfSize: 18];
- [vInstallStatusDate addSubview:separatorInstallStatusLbl];
-
- _btnInstallStatusEndDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnInstallStatusEndDate setTitle:_installStatusEndDate forState:UIControlStateNormal];
- [_btnInstallStatusEndDate setBackgroundColor:[UIColor whiteColor]];
- [_btnInstallStatusEndDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnInstallStatusEndDate.titleLabel.font= [UIFont systemFontOfSize:18];
- [_btnInstallStatusEndDate addTarget:self action:@selector(btnSelectInstallStatusEndDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnInstallStatusEndDate.frame = CGRectMake(CGRectGetMaxX(separatorInstallStatusLbl.frame) ,0 , 110, 25);
- [vInstallStatusDate addSubview:_btnInstallStatusEndDate];
-
-
- installStatusBorderV=[CustomBorderView new];
- installStatusBorderV.frame=CGRectMake(5, CGRectGetMaxY(vInstallStatusDate.frame)+topMargin,Screen_Width-30, 200);
- [installStatusBorderV setBackgroundColor:[UIColor whiteColor]];
- [installStatusBorderV drawBoardLine:borderWidth cornerRadius:2 color:[UIColor hexColor:@"D5CDCD"]];
- [installStatusContent addSubview:installStatusBorderV];
-
- _installStatusView = [[MyView alloc]initWithFrame:CGRectMake(5,5, installStatusBorderV.frame.size.width-10,190)];
- [installStatusBorderV addSubview:_installStatusView];
-
-
- UIView *installPercentView = [[UIView alloc]init];
-
- installPercentView.frame = CGRectMake(5,CGRectGetMaxY(installStatusBorderV.frame)-30, Screen_Width-30, 25);
-
- lblInstallPercent= [[UILabel alloc]init];
- lblInstallPercent.frame = CGRectMake(0, 0, installPercentView.frame.size.width, 25);
- lblInstallPercent.textColor = [UIColor blackColor];
- lblInstallPercent.font = [UIFont systemFontOfSize:22];
- lblInstallPercent.text=@"完成率0%";
- lblInstallPercent.textAlignment=NSTextAlignmentCenter;
- [installPercentView addSubview:lblInstallPercent];
- [installStatusContent addSubview:installPercentView];
-
-
-
- UIView *needInstallCustomerCountView = [[UIView alloc]init];
-
- needInstallCustomerCountView.frame = CGRectMake(0,CGRectGetMaxY(installPercentView.frame)+topMargin,Screen_Width/2, rowHeight);
- lblNeedInstallCustomerCount= [[UILabel alloc]init];
- lblNeedInstallCustomerCount.frame = CGRectMake(0, 0,needInstallCustomerCountView.frame.size.width, 25);
- lblNeedInstallCustomerCount.textAlignment=UITextAlignmentCenter;
- lblNeedInstallCustomerCount.textColor = [UIColor blackColor];
- lblNeedInstallCustomerCount.text=@"0";
- lblNeedInstallCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [needInstallCustomerCountView addSubview:lblNeedInstallCustomerCount];
-
- UILabel *lblTitleNeedInstallCustomerCount = [[UILabel alloc]init];
- lblTitleNeedInstallCustomerCount.frame = CGRectMake(0,CGRectGetMaxY(lblNeedInstallCustomerCount.frame),needInstallCustomerCountView.frame.size.width, 25);
- lblTitleNeedInstallCustomerCount.text = @"需安装数";
- lblTitleNeedInstallCustomerCount.textColor = [UIColor blackColor];
- lblTitleNeedInstallCustomerCount.textAlignment=UITextAlignmentCenter;
- lblTitleNeedInstallCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [needInstallCustomerCountView addSubview:lblTitleNeedInstallCustomerCount];
- [installStatusContent addSubview:needInstallCustomerCountView];
-
- UIView *middleSeparator9=[UIView new];
-
- middleSeparator9.frame=CGRectMake(Screen_Width/2, CGRectGetMaxY(installPercentView.frame)+topMargin, 0.5, 45);
- middleSeparator9.backgroundColor=[UIColor lightGrayColor];
- [installStatusContent addSubview:middleSeparator9];
-
-
- UIView *installedCustomerCountView = [[UIView alloc]init];
-
- installedCustomerCountView.frame = CGRectMake(Screen_Width/2,CGRectGetMaxY(installPercentView.frame)+topMargin, Screen_Width/2, rowHeight);
- lblInstalledCustomerCount = [[UILabel alloc]init];
- lblInstalledCustomerCount.frame = CGRectMake(0, 0, installedCustomerCountView.frame.size.width, 25);
- lblInstalledCustomerCount.textAlignment=UITextAlignmentCenter;
- lblInstalledCustomerCount.text=@"0";
- lblInstalledCustomerCount.textColor = [UIColor blackColor];
- lblInstalledCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [installedCustomerCountView addSubview:lblInstalledCustomerCount];
-
- UILabel *lblInstalledCustomerCountTitle = [[UILabel alloc]init];
- lblInstalledCustomerCountTitle.frame = CGRectMake(0,CGRectGetMaxY(lblInstalledCustomerCount.frame), installedCustomerCountView.frame.size.width, 25);
- lblInstalledCustomerCountTitle.text = @"已安装数";
- lblInstalledCustomerCountTitle.textAlignment=UITextAlignmentCenter;
- lblInstalledCustomerCountTitle.textColor = [UIColor blackColor];
- lblInstalledCustomerCountTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [installedCustomerCountView addSubview:lblInstalledCustomerCountTitle];
- [installStatusContent addSubview:installedCustomerCountView];
-
-
-
-
- nextDayNeedInstallCountView= [[UIView alloc]init];
-
- nextDayNeedInstallCountView.frame = CGRectMake(0,CGRectGetMaxY(needInstallCustomerCountView.frame)+topMargin,Screen_Width/3, rowHeight);
- lblNextDayNeedInstallCount= [[UILabel alloc]init];
- lblNextDayNeedInstallCount.frame = CGRectMake(0, 0,nextDayNeedInstallCountView.frame.size.width, 25);
- lblNextDayNeedInstallCount.textAlignment=UITextAlignmentCenter;
- lblNextDayNeedInstallCount.textColor = [UIColor blackColor];
- lblNextDayNeedInstallCount.text=@"0";
- lblNextDayNeedInstallCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextDayNeedInstallCountView addSubview:lblNextDayNeedInstallCount];
-
- UILabel *lblTitleNextDayNeedInstallCount = [[UILabel alloc]init];
- lblTitleNextDayNeedInstallCount.frame = CGRectMake(0,CGRectGetMaxY(lblNextDayNeedInstallCount.frame),nextDayNeedInstallCountView.frame.size.width, 50);
- lblTitleNextDayNeedInstallCount.text = @"未来1天需安装数";
- lblTitleNextDayNeedInstallCount.textColor = [UIColor blackColor];
- lblTitleNextDayNeedInstallCount.textAlignment=UITextAlignmentCenter;
- lblTitleNextDayNeedInstallCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
-
- [lblTitleNextDayNeedInstallCount setLineBreakMode:NSLineBreakByWordWrapping];
- lblTitleNextDayNeedInstallCount.numberOfLines = 0;
- [nextDayNeedInstallCountView addSubview:lblTitleNextDayNeedInstallCount];
- [installStatusContent addSubview:nextDayNeedInstallCountView];
-
-
-
- UIView *nextTwoDaysNeedInstallCountView = [[UIView alloc]init];
-
- nextTwoDaysNeedInstallCountView.frame = CGRectMake(Screen_Width/3,CGRectGetMaxY(needInstallCustomerCountView.frame)+topMargin,Screen_Width/3, rowHeight);
- lblNextTwoDaysNeedInstallCount= [[UILabel alloc]init];
- lblNextTwoDaysNeedInstallCount.frame = CGRectMake(0, 0,nextTwoDaysNeedInstallCountView.frame.size.width, 25);
- lblNextTwoDaysNeedInstallCount.textAlignment=UITextAlignmentCenter;
- lblNextTwoDaysNeedInstallCount.textColor = [UIColor blackColor];
- lblNextTwoDaysNeedInstallCount.text=@"0";
- lblNextTwoDaysNeedInstallCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextTwoDaysNeedInstallCountView addSubview:lblNextTwoDaysNeedInstallCount];
-
- UILabel *lblTitleNextTwoDaysNeedInstallCount = [[UILabel alloc]init];
- lblTitleNextTwoDaysNeedInstallCount.frame = CGRectMake(0,CGRectGetMaxY(lblNextTwoDaysNeedInstallCount.frame),nextTwoDaysNeedInstallCountView.frame.size.width,50);
- lblTitleNextTwoDaysNeedInstallCount.text = @"未来2天需安装数";
- lblTitleNextTwoDaysNeedInstallCount.textColor = [UIColor blackColor];
- lblTitleNextTwoDaysNeedInstallCount.textAlignment=UITextAlignmentCenter;
- [lblTitleNextTwoDaysNeedInstallCount setLineBreakMode:NSLineBreakByWordWrapping];
- lblTitleNextTwoDaysNeedInstallCount.numberOfLines = 0;
- lblTitleNextTwoDaysNeedInstallCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextTwoDaysNeedInstallCountView addSubview:lblTitleNextTwoDaysNeedInstallCount];
- [installStatusContent addSubview:nextTwoDaysNeedInstallCountView];
-
-
- UIView *nextThreeDaysNeedInstallCountView = [[UIView alloc]init];
-
- nextThreeDaysNeedInstallCountView.frame = CGRectMake(Screen_Width/3*2,CGRectGetMaxY(needInstallCustomerCountView.frame)+topMargin,Screen_Width/3, rowHeight);
- [installStatusContent addSubview:nextThreeDaysNeedInstallCountView];
-
- lblNextThreeDaysNeedInstallCount= [[UILabel alloc]init];
- lblNextThreeDaysNeedInstallCount.frame = CGRectMake(0, 0,nextThreeDaysNeedInstallCountView.frame.size.width, 25);
- lblNextThreeDaysNeedInstallCount.textAlignment=UITextAlignmentCenter;
- lblNextThreeDaysNeedInstallCount.textColor = [UIColor blackColor];
- lblNextThreeDaysNeedInstallCount.text=@"0";
- lblNextThreeDaysNeedInstallCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextThreeDaysNeedInstallCountView addSubview:lblNextThreeDaysNeedInstallCount];
-
- UILabel *lblTitleNextThreeDaysNeedInstallCount = [[UILabel alloc]init];
- lblTitleNextThreeDaysNeedInstallCount.frame = CGRectMake(0,CGRectGetMaxY(lblNextThreeDaysNeedInstallCount.frame),nextThreeDaysNeedDeliveyCountView.frame.size.width-10, 50);
- lblTitleNextThreeDaysNeedInstallCount.text = @"未来3天需安装数";
- lblTitleNextThreeDaysNeedInstallCount.textColor = [UIColor blackColor];
- [lblTitleNextThreeDaysNeedInstallCount setLineBreakMode:NSLineBreakByWordWrapping];
- lblTitleNextThreeDaysNeedInstallCount.numberOfLines = 0;
- lblTitleNextThreeDaysNeedInstallCount.textAlignment=UITextAlignmentCenter;
- lblTitleNextThreeDaysNeedInstallCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextThreeDaysNeedInstallCountView addSubview:lblTitleNextThreeDaysNeedInstallCount];
-
-
- installStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedInstallCountView.frame)+30);
- installStatusContent.layer.cornerRadius=CornerRadius;
- height=CGRectGetMaxY(installStatusContent.frame);
-
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_REPAIR_STATUS_IPHONE].location!=NSNotFound){
-
- //维修情况
- repairStatusContent=[UIView new];
- repairStatusContent.backgroundColor=[UIColor whiteColor];
- repairStatusContent.frame=CGRectMake(10,height+10, Screen_Width-20, 0);
- [content addSubview:repairStatusContent];
-
- UIView *repairStatusTitleView = [[UIView alloc]init];
-
- repairStatusTitleView.frame = CGRectMake(0,0 ,Screen_Width, 45);
-
- UIView *repairStatusImgView=[UIImageView new];
- repairStatusImgView.frame=CGRectMake(10, 10,10 , 25);
- [repairStatusImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [repairStatusTitleView addSubview:repairStatusImgView];
-
- UILabel *titleRepairStatus = [[UILabel alloc]init];
- titleRepairStatus.frame = CGRectMake(CGRectGetMaxX(repairStatusImgView.frame)+10, 10, 100, 25);
- titleRepairStatus.text = @"维修情况";
- titleRepairStatus.textColor = [UIColor blackColor];
- titleRepairStatus.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [repairStatusTitleView addSubview:titleRepairStatus];
- [repairStatusContent addSubview:repairStatusTitleView];
-
- UIView *separator10=[UIView new];
- separator10.frame=CGRectMake(0,repairStatusTitleView.frame.size.height-1, repairStatusTitleView.frame.size.width-20, 0.5);
- [separator10 setBackgroundColor:[UIColor lightGrayColor]];
- [repairStatusTitleView addSubview:separator10];
-
-
- UIView *vRepairStatusDate =[UIView new];
- vRepairStatusDate.frame=CGRectMake(0, CGRectGetMaxY(repairStatusTitleView.frame)+topMargin, Screen_Width, 25);
- [repairStatusContent addSubview:vRepairStatusDate];
-
- _btnRepairStatusStartDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnRepairStatusStartDate setTitle:_repairStatusStartDate forState:UIControlStateNormal];
- [_btnRepairStatusStartDate setBackgroundColor:[UIColor whiteColor]];
- [_btnRepairStatusStartDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnRepairStatusStartDate.titleLabel.font= [UIFont systemFontOfSize:18];
- [_btnRepairStatusStartDate addTarget:self action:@selector(btnSelectRepairStatusStartDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnRepairStatusStartDate.frame = CGRectMake(Screen_Width/2-120 ,0 , 110, 25);
- [vRepairStatusDate addSubview:_btnRepairStatusStartDate];
-
- UILabel *separatorRepairStatusLbl=[UILabel new];
- separatorRepairStatusLbl.frame=CGRectMake(CGRectGetMaxX(_btnRepairStatusStartDate.frame), 0, 20, 25);
- separatorRepairStatusLbl.text=@"--";
- separatorRepairStatusLbl.textColor = [UIColor blackColor];
- separatorRepairStatusLbl.font = [UIFont systemFontOfSize: 18];
- [vRepairStatusDate addSubview:separatorRepairStatusLbl];
-
- _btnRepairStatusEndDate = [UIButton buttonWithType:UIButtonTypeCustom];
- [_btnRepairStatusEndDate setTitle:_repairStatusEndDate forState:UIControlStateNormal];
- [_btnRepairStatusEndDate setBackgroundColor:[UIColor whiteColor]];
- [_btnRepairStatusEndDate setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- _btnRepairStatusEndDate.titleLabel.font= [UIFont systemFontOfSize:18];
- [_btnRepairStatusEndDate addTarget:self action:@selector(btnSelectRepairStatusEndDate) forControlEvents:UIControlEventTouchUpInside];
-
- _btnRepairStatusEndDate.frame = CGRectMake(CGRectGetMaxX(separatorRepairStatusLbl.frame) ,0 , 110, 25);
- [vRepairStatusDate addSubview:_btnRepairStatusEndDate];
-
- repairStatusBorderV=[CustomBorderView new];
- repairStatusBorderV.frame=CGRectMake(5, CGRectGetMaxY(vRepairStatusDate.frame)+topMargin,Screen_Width-30, 200);
- [repairStatusBorderV setBackgroundColor:[UIColor whiteColor]];
- [repairStatusBorderV drawBoardLine:borderWidth cornerRadius:2 color:[UIColor hexColor:@"D5CDCD"]];
- [repairStatusContent addSubview:repairStatusBorderV];
-
- _repairStatusView = [[MyView alloc]initWithFrame:CGRectMake(5,5, repairStatusBorderV.frame.size.width-10,190)];
- [repairStatusBorderV addSubview:_repairStatusView];
-
- UIView *repairPercentView = [[UIView alloc]init];
-
- repairPercentView.frame = CGRectMake(5,CGRectGetMaxY(repairStatusBorderV.frame)-30, Screen_Width-30, 25);
-
- lblRepairPercent= [[UILabel alloc]init];
- lblRepairPercent.frame = CGRectMake(0, 0, repairPercentView.frame.size.width, 25);
- lblRepairPercent.textColor = [UIColor blackColor];
- lblRepairPercent.font = [UIFont systemFontOfSize:22];
- lblRepairPercent.text=@"完成率0%";
- lblRepairPercent.textAlignment=NSTextAlignmentCenter;
- [repairPercentView addSubview:lblRepairPercent];
- [repairStatusContent addSubview:repairPercentView];
-
-
- UIView *needRepairCustomerCountView = [[UIView alloc]init];
-
- needRepairCustomerCountView.frame = CGRectMake(0,CGRectGetMaxY(repairPercentView.frame)+topMargin,Screen_Width/2, rowHeight);
- lblNeedRepairCustomerCount= [[UILabel alloc]init];
- lblNeedRepairCustomerCount.frame = CGRectMake(0, 0,needRepairCustomerCountView.frame.size.width, 25);
- lblNeedRepairCustomerCount.textAlignment=UITextAlignmentCenter;
- lblNeedRepairCustomerCount.textColor = [UIColor blackColor];
- lblNeedRepairCustomerCount.text=@"0";
- lblNeedRepairCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [needRepairCustomerCountView addSubview:lblNeedRepairCustomerCount];
-
- UILabel *lblTitleNeedRepairCustomerCount = [[UILabel alloc]init];
- lblTitleNeedRepairCustomerCount.frame = CGRectMake(0,CGRectGetMaxY(lblNeedRepairCustomerCount.frame),needRepairCustomerCountView.frame.size.width, 25);
-
- lblTitleNeedRepairCustomerCount.text = @"需维修数";
- lblTitleNeedRepairCustomerCount.textColor = [UIColor blackColor];
- lblTitleNeedRepairCustomerCount.textAlignment=UITextAlignmentCenter;
- lblTitleNeedRepairCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [needRepairCustomerCountView addSubview:lblTitleNeedRepairCustomerCount];
- [repairStatusContent addSubview:needRepairCustomerCountView];
-
- UIView *middleSeparator10=[UIView new];
-
- middleSeparator10.frame=CGRectMake(Screen_Width/2, CGRectGetMaxY(repairPercentView.frame)+topMargin, 0.5, 45);
- middleSeparator10.backgroundColor=[UIColor lightGrayColor];
- [repairStatusContent addSubview:middleSeparator10];
-
-
- UIView *repairedCustomerCountView = [[UIView alloc]init];
-
- repairedCustomerCountView.frame = CGRectMake(Screen_Width/2,CGRectGetMaxY(repairPercentView.frame)+topMargin, Screen_Width/2, rowHeight);
- lblRepairedCustomerCount = [[UILabel alloc]init];
- lblRepairedCustomerCount.frame = CGRectMake(0, 0, repairedCustomerCountView.frame.size.width, 25);
- lblRepairedCustomerCount.textAlignment=UITextAlignmentCenter;
- lblRepairedCustomerCount.text=@"0";
- lblRepairedCustomerCount.textColor = [UIColor blackColor];
- lblRepairedCustomerCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [repairedCustomerCountView addSubview:lblRepairedCustomerCount];
-
- UILabel *lblRepairedCustomerCountTitle = [[UILabel alloc]init];
- lblRepairedCustomerCountTitle.frame = CGRectMake(0,CGRectGetMaxY(lblRepairedCustomerCount.frame), repairedCustomerCountView.frame.size.width, 25);
- lblRepairedCustomerCountTitle.text = @"已维修数";
- lblRepairedCustomerCountTitle.textAlignment=UITextAlignmentCenter;
- lblRepairedCustomerCountTitle.textColor = [UIColor blackColor];
- lblRepairedCustomerCountTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [repairedCustomerCountView addSubview:lblRepairedCustomerCountTitle];
- [repairStatusContent addSubview:repairedCustomerCountView];
-
-
-
- nextDayNeedRepairCountView= [[UIView alloc]init];
-
- nextDayNeedRepairCountView.frame = CGRectMake(0,CGRectGetMaxY(needRepairCustomerCountView.frame)+topMargin,Screen_Width/3, rowHeight);
- lblNextDayNeedRepairCount= [[UILabel alloc]init];
- lblNextDayNeedRepairCount.frame = CGRectMake(0, 0,nextDayNeedRepairCountView.frame.size.width, 25);
- lblNextDayNeedRepairCount.textAlignment=UITextAlignmentCenter;
- lblNextDayNeedRepairCount.textColor = [UIColor blackColor];
- lblNextDayNeedRepairCount.text=@"0";
- lblNextDayNeedRepairCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextDayNeedRepairCountView addSubview:lblNextDayNeedRepairCount];
-
- UILabel *lblTitleNextDayNeedRepairCount = [[UILabel alloc]init];
- lblTitleNextDayNeedRepairCount.frame = CGRectMake(0,CGRectGetMaxY(lblNextDayNeedRepairCount.frame),nextDayNeedInstallCountView.frame.size.width, 50);
- lblTitleNextDayNeedRepairCount.text = @"未来1天需维修数";
- lblTitleNextDayNeedRepairCount.textColor = [UIColor blackColor];
- lblTitleNextDayNeedRepairCount.textAlignment=UITextAlignmentCenter;
- lblTitleNextDayNeedRepairCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
-
- [lblTitleNextDayNeedRepairCount setLineBreakMode:NSLineBreakByWordWrapping];
- lblTitleNextDayNeedRepairCount.numberOfLines = 0;
- [nextDayNeedRepairCountView addSubview:lblTitleNextDayNeedRepairCount];
- [repairStatusContent addSubview:nextDayNeedRepairCountView];
-
-
-
- UIView *nextTwoDaysNeedRepairCountView = [[UIView alloc]init];
-
- nextTwoDaysNeedRepairCountView.frame = CGRectMake(Screen_Width/3,CGRectGetMaxY(needRepairCustomerCountView.frame)+topMargin,Screen_Width/3, rowHeight);
- lblNextTwoDaysNeedRepairCount= [[UILabel alloc]init];
- lblNextTwoDaysNeedRepairCount.frame = CGRectMake(0, 0,nextTwoDaysNeedRepairCountView.frame.size.width, 25);
- lblNextTwoDaysNeedRepairCount.textAlignment=UITextAlignmentCenter;
- lblNextTwoDaysNeedRepairCount.textColor = [UIColor blackColor];
- lblNextTwoDaysNeedRepairCount.text=@"0";
- lblNextTwoDaysNeedRepairCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextTwoDaysNeedRepairCountView addSubview:lblNextTwoDaysNeedRepairCount];
-
- UILabel *lblTitleNextTwoDaysNeedRepairCount = [[UILabel alloc]init];
- lblTitleNextTwoDaysNeedRepairCount.frame = CGRectMake(0,CGRectGetMaxY(lblNextTwoDaysNeedRepairCount.frame),nextTwoDaysNeedRepairCountView.frame.size.width,50);
- lblTitleNextTwoDaysNeedRepairCount.text = @"未来2天需维修数";
- lblTitleNextTwoDaysNeedRepairCount.textColor = [UIColor blackColor];
- lblTitleNextTwoDaysNeedRepairCount.textAlignment=UITextAlignmentCenter;
- [lblTitleNextTwoDaysNeedRepairCount setLineBreakMode:NSLineBreakByWordWrapping];
- lblTitleNextTwoDaysNeedRepairCount.numberOfLines = 0;
- lblTitleNextTwoDaysNeedRepairCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextTwoDaysNeedRepairCountView addSubview:lblTitleNextTwoDaysNeedRepairCount];
- [repairStatusContent addSubview:nextTwoDaysNeedRepairCountView];
-
-
- UIView *nextThreeDaysNeedRepairCountView = [[UIView alloc]init];
-
- nextThreeDaysNeedRepairCountView.frame = CGRectMake(Screen_Width/3*2,CGRectGetMaxY(needRepairCustomerCountView.frame)+topMargin,Screen_Width/3, rowHeight);
- [repairStatusContent addSubview:nextThreeDaysNeedRepairCountView];
-
- lblNextThreeDaysNeedRepairCount= [[UILabel alloc]init];
- lblNextThreeDaysNeedRepairCount.frame = CGRectMake(0, 0,nextThreeDaysNeedRepairCountView.frame.size.width, 25);
- lblNextThreeDaysNeedRepairCount.textAlignment=UITextAlignmentCenter;
- lblNextThreeDaysNeedRepairCount.textColor = [UIColor blackColor];
- lblNextThreeDaysNeedRepairCount.text=@"0";
- lblNextThreeDaysNeedRepairCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextThreeDaysNeedRepairCountView addSubview:lblNextThreeDaysNeedRepairCount];
-
- UILabel *lblTitleNextThreeDaysNeedRepairCount = [[UILabel alloc]init];
- lblTitleNextThreeDaysNeedRepairCount.frame = CGRectMake(0,CGRectGetMaxY(lblNextThreeDaysNeedRepairCount.frame),nextThreeDaysNeedRepairCountView.frame.size.width-10, 50);
- lblTitleNextThreeDaysNeedRepairCount.text = @"未来3天需维修数";
- lblTitleNextThreeDaysNeedRepairCount.textColor = [UIColor blackColor];
- [lblTitleNextThreeDaysNeedRepairCount setLineBreakMode:NSLineBreakByWordWrapping];
- lblTitleNextThreeDaysNeedRepairCount.numberOfLines = 0;
- lblTitleNextThreeDaysNeedRepairCount.textAlignment=UITextAlignmentCenter;
- lblTitleNextThreeDaysNeedRepairCount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize18];
- [nextThreeDaysNeedRepairCountView addSubview:lblTitleNextThreeDaysNeedRepairCount];
-
- repairStatusContent.frame=CGRectMake(10, height+10,Screen_Width-20,CGRectGetMaxY(nextDayNeedRepairCountView.frame)+30);
- repairStatusContent.layer.cornerRadius=CornerRadius;
-
- height=CGRectGetMaxY(repairStatusContent.frame);
- // }
- content.frame=CGRectMake(0, 0,Screen_Width,height);
- scroll.contentSize = CGSizeMake(self.view.frame.size.width, height+rectStatusHeight+rectNavHeight+100);
-
- }
- -(void)goSalesAchievement:(UIButton*)sender
- {
- [self changeSalesAchievementDepartmentStaffColor];
-
- if(sender.tag==1007)
- {
- salesAchievementTypeId=@"0";
- btnSalesAchievementDepartmentMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnSalesAchievementDepartment setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- }
- else{
- salesAchievementTypeId=@"1";
- btnSalesAchievementStaffMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnSalesAchievementStaff setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- }
-
- [salesAchievementXArray removeAllObjects];
- [salesAchievementYArray removeAllObjects];
- [self startLoading];
- [self loadSalesAchievementData];
- }
- -(void)goSalesStatus:(UIButton*)sender
- {
- [self changeSalesStatusChannelDepartmentColor];
- if(sender.tag==1000)
- {
- typeId=@"0";
- btnSalesStatusChannelMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnSalesStatusChannel setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- }
- else{
- typeId=@"1";
- btnSalesStatusDepartmentMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnSalesStatusDepartment setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- }
- [salesStatusXArray removeAllObjects];
- [salesStatusYArray removeAllObjects];
- [self startLoading];
- [self loadSalesStatusData];
- }
- -(void)goOrderStatus:(UIButton*)sender
- {
-
- [self changeOrderStatusChannelDepartmentColor];
-
- if(sender.tag==1006)
- {
- orderStatusTypeId=@"0";
- btnOrderStatusChannelMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnOrderStatusChannel setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- }
- else{
- orderStatusTypeId=@"1";
- btnOrderStatusDepartmentMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnOrderStatusDepartment setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- }
- [orderStatusXArray removeAllObjects];
- [orderStatusYArray removeAllObjects];
- [self startLoading];
- [self loadOrderStatusData];
-
- }
- -(void)goCollectionStatus:(UIButton*)sender
- {
- [self changeCollectionStatusChannelDepartmentColor];
- if(sender.tag==1003)
- {
- cashStatusTypeId=@"1";
- btnCollectionStatusDepartmentMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnCollectionStatusDepartment setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
- }
-
- if(sender.tag==1004)
- {
- cashStatusTypeId=@"0";
- btnCollectionStatusChannelMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnCollectionStatusChannel setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- }
-
- [collectionStatusXArray removeAllObjects];
- [collectionStatusYArray removeAllObjects];
- [self startLoading];
- [self loadCashData];
- }
- /**
- 画两个柱状图
- */
- -(void)drawTwoBarchart:(NSMutableArray*)barchartArray receivablesTitleArray:(NSMutableArray*)receivablesTitleArry barChartView:(BarChartView*) chartView
- axisValueFormatter:(id<ChartAxisValueFormatter>)formatter xAxisLabelCount:(NSInteger)count maximumValue:(double)maximumValue
- minimumValue:(double)minimumValue
- {
- chartView.delegate = self;
- chartView.extraBottomOffset=20;
- chartView.chartDescription.enabled = NO;
- chartView.pinchZoomEnabled = NO;
- chartView.drawBarShadowEnabled = NO;
- chartView.drawGridBackgroundEnabled = NO;
- chartView.maxVisibleCount = 60;
-
- BalloonMarker *marker = [[BalloonMarker alloc]
- initWithColor: [UIColor colorWithWhite:210/255. alpha:1.0]
- font: [UIFont systemFontOfSize:12.0]
- textColor: UIColor.whiteColor
- insets: UIEdgeInsetsMake(8.0, 8.0, 20.0, 8.0)];
- marker.chartView = chartView;
- marker.minimumSize = CGSizeMake(80.f, 40.f);
- chartView.marker = marker;
-
- ChartLegend *legend = chartView.legend;
- legend.horizontalAlignment = ChartLegendHorizontalAlignmentCenter;
- legend.verticalAlignment = ChartLegendVerticalAlignmentBottom;
- legend.orientation = ChartLegendOrientationHorizontal ;
- legend.drawInside = NO;
- legend.font = [UIFont fontWithName:@"HelveticaNeue-Light" size:12.0f];
- legend.yOffset = 1.0;
- legend.xOffset = 1.0;
- legend.yEntrySpace =1;
-
- ChartXAxis *xAxis = chartView.xAxis;
- xAxis.labelFont = [UIFont fontWithName:@"HelveticaNeue-Light" size:10.f];
- xAxis.axisMinimum = 0.0;
- xAxis.granularity = 1.0f;
- xAxis.labelCount=count;
- xAxis.labelRotationAngle=20;
- xAxis.drawGridLinesEnabled=NO;
- xAxis.centerAxisLabelsEnabled = YES;
- xAxis.labelPosition = XAxisLabelPositionBottom;
- xAxis.valueFormatter =formatter ;
-
-
- ChartYAxis *leftAxis = chartView.leftAxis;
- leftAxis.labelFont = [UIFont fontWithName:@"HelveticaNeue-Light" size:10.f];
- leftAxis.valueFormatter = [[YAxisValueFormatter alloc] init];
- leftAxis.drawGridLinesEnabled = YES;
- leftAxis.gridColor = [UIColor colorWithRed:200/255.0f green:200/255.0f blue:200/255.0f alpha:1];//网格线颜色
- leftAxis.spaceTop = 0.35;
- leftAxis.granularityEnabled=YES;
- leftAxis.gridLineWidth =1;
- if(minimumValue<0)
- {
- leftAxis.axisMinimum = minimumValue;
- }
- else
- {
- leftAxis.axisMinimum=0;
- }
-
- leftAxis.axisMaximum=maximumValue+100;
- leftAxis.decimals=2;
- // leftAxis.granularity=maximumValue/5;
- chartView.rightAxis.enabled = NO;
-
- float groupSpace = 0.1f;
- float barSpace = 0.15f;
- float barWidth = 0.3f;
- NSMutableArray *yVals1 = [[NSMutableArray alloc] init];
- NSMutableArray *yVals2 = [[NSMutableArray alloc] init];
-
-
- int start =0;
- long end = barchartArray.count;
-
- for (int i = start; i < end; i++)
- {
-
- NSMutableDictionary *barchartDic=barchartArray[i];
- double y1=0;
- double y2=0;
-
-
- if([[barchartDic allKeys] containsObject:@"planAmount"])
- {
- y1= [[barchartDic objectForKey:@"planAmount"]doubleValue];
- }
-
- if([[barchartDic allKeys] containsObject:@"saleAmount"])
- {
- y2=[[barchartDic objectForKey:@"saleAmount"]doubleValue];
- }
-
-
- [yVals1 addObject:[[BarChartDataEntry alloc]
- initWithX:i
- y:y1]];
-
- [yVals2 addObject:[[BarChartDataEntry alloc]
- initWithX:i
- y:y2]];
-
-
-
-
- }
-
- BarChartDataSet *set1 = nil, *set2 = nil;
-
- if (chartView.data.dataSetCount > 0)
- {
- set1 = (BarChartDataSet *)chartView.data.dataSets[0];
- set2 = (BarChartDataSet *)chartView.data.dataSets[1];
-
- [set1 replaceEntries:yVals1];
- [set2 replaceEntries:yVals2];
-
-
- BarChartData *data = chartView.barData;
-
- chartView.xAxis.axisMinimum = start;
- chartView.xAxis.axisMaximum = [data groupWidthWithGroupSpace:groupSpace barSpace: barSpace] * end + start;
- [data groupBarsFromX: start groupSpace: groupSpace barSpace: barSpace];
-
- [chartView.data notifyDataChanged];
- [chartView notifyDataSetChanged];
- }
- else
- {
- set1 = [[BarChartDataSet alloc] initWithEntries:yVals1 label:receivablesTitleArry[0]];
- [set1 setColor:[UIColor colorWithRed:70/255.0f green:116/255.0f blue:193/255.0f alpha:1]];
-
- set2 = [[BarChartDataSet alloc] initWithEntries:yVals2 label:receivablesTitleArry[1]];
- [set2 setColor:[UIColor colorWithRed:235/255.0f green:125/255.0f blue:60/255.0f alpha:1]];
- [set1 setDrawValuesEnabled:NO];
- [set2 setDrawValuesEnabled:NO];
-
-
- NSMutableArray *dataSets = [[NSMutableArray alloc] init];
- [dataSets addObject:set1];
- [dataSets addObject:set2];
-
-
- BarChartData *data = [[BarChartData alloc] initWithDataSets:dataSets];
- [data setValueFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:10.f]];
- data.barWidth = barWidth;
-
- // restrict the x-axis range
- chartView.xAxis.axisMinimum = start;
-
- // groupWidthWithGroupSpace(...) is a helper that calculates the width each group needs based on the provided parameters
- chartView.xAxis.axisMaximum = start+ [data groupWidthWithGroupSpace:groupSpace barSpace: barSpace] * end;
-
- [data groupBarsFromX: start groupSpace: groupSpace barSpace: barSpace];
-
- chartView.data = data;
- }
- }
- -(void)drawHorizontalTwoBarchart:(NSMutableArray*)barchartArray receivablesTitleArray:(NSMutableArray*)receivablesTitleArry barChartView:(HorizontalBarChartView*) chartView
- axisValueFormatter:(id<ChartAxisValueFormatter>)formatter xAxisLabelCount:(NSInteger)count maximumValue:(double)maximumValue
- minimumValue:(double)minimumValue
- {
- chartView.delegate = self;
- chartView.extraBottomOffset=20;
- chartView.chartDescription.enabled = NO;
- chartView.pinchZoomEnabled = NO;
- chartView.drawBarShadowEnabled = NO;
- chartView.drawGridBackgroundEnabled = NO;
- chartView.maxVisibleCount = 60;
-
- BalloonMarker *marker = [[BalloonMarker alloc]
- initWithColor: [UIColor colorWithWhite:210/255. alpha:1.0]
- font: [UIFont systemFontOfSize:12.0]
- textColor: UIColor.whiteColor
- insets: UIEdgeInsetsMake(8.0, 8.0, 20.0, 8.0)];
- marker.chartView = chartView;
- marker.minimumSize = CGSizeMake(80.f, 40.f);
- chartView.marker = marker;
-
- ChartLegend *legend = chartView.legend;
- legend.horizontalAlignment = ChartLegendHorizontalAlignmentCenter;
- legend.verticalAlignment = ChartLegendVerticalAlignmentBottom;
- legend.orientation = ChartLegendOrientationHorizontal ;
- legend.drawInside = NO;
- legend.font = [UIFont fontWithName:@"HelveticaNeue-Light" size:12.0f];
- legend.yOffset = 1.0;
- legend.xOffset = 1.0;
- legend.yEntrySpace =1;
-
- ChartXAxis *xAxis = chartView.xAxis;
- xAxis.labelFont = [UIFont fontWithName:@"HelveticaNeue-Light" size:10.f];
- xAxis.axisMinimum = 0.0;
- xAxis.granularity = 1.0f;
- xAxis.labelCount=count;
- xAxis.labelRotationAngle=20;
- xAxis.drawGridLinesEnabled=NO;
- xAxis.centerAxisLabelsEnabled = YES;
- xAxis.labelPosition = XAxisLabelPositionBottom;
- xAxis.valueFormatter =formatter ;
-
-
- ChartYAxis *leftAxis = chartView.leftAxis;
- leftAxis.labelFont = [UIFont fontWithName:@"HelveticaNeue-Light" size:10.f];
- leftAxis.valueFormatter = [[YAxisValueFormatter alloc] init];
- leftAxis.drawGridLinesEnabled = YES;
- leftAxis.gridColor = [UIColor colorWithRed:200/255.0f green:200/255.0f blue:200/255.0f alpha:1];//网格线颜色
- leftAxis.spaceTop = 0.35;
- leftAxis.granularityEnabled=YES;
- leftAxis.gridLineWidth =1;
- if(minimumValue<0)
- {
- leftAxis.axisMinimum = minimumValue;
- }
- else
- {
- leftAxis.axisMinimum=0;
- }
-
- leftAxis.axisMaximum=maximumValue+100;
- leftAxis.decimals=2;
- // leftAxis.granularity=maximumValue/5;
- chartView.rightAxis.enabled = NO;
-
- float groupSpace = 0.1f;
- float barSpace = 0.15f;
- float barWidth = 0.3f;
- NSMutableArray *yVals1 = [[NSMutableArray alloc] init];
- NSMutableArray *yVals2 = [[NSMutableArray alloc] init];
-
-
- int start =0;
- long end = barchartArray.count;
-
- for (int i = start; i < end; i++)
- {
-
- NSMutableDictionary *barchartDic=barchartArray[i];
- double y1=0;
- double y2=0;
-
-
- if([[barchartDic allKeys] containsObject:@"transactionCount"])
- {
- y1= [[barchartDic objectForKey:@"transactionCount"]doubleValue];
- }
-
- if([[barchartDic allKeys] containsObject:@"filingCount"])
- {
- y2=[[barchartDic objectForKey:@"filingCount"]doubleValue];
- }
-
-
- [yVals1 addObject:[[BarChartDataEntry alloc]
- initWithX:i
- y:y1]];
-
- [yVals2 addObject:[[BarChartDataEntry alloc]
- initWithX:i
- y:y2]];
-
-
-
-
- }
-
- BarChartDataSet *set1 = nil, *set2 = nil;
-
- if (chartView.data.dataSetCount > 0)
- {
- set1 = (BarChartDataSet *)chartView.data.dataSets[0];
- set2 = (BarChartDataSet *)chartView.data.dataSets[1];
-
- [set1 replaceEntries:yVals1];
- [set2 replaceEntries:yVals2];
-
-
- BarChartData *data = chartView.barData;
-
- chartView.xAxis.axisMinimum = start;
- chartView.xAxis.axisMaximum = [data groupWidthWithGroupSpace:groupSpace barSpace: barSpace] * end + start;
- [data groupBarsFromX: start groupSpace: groupSpace barSpace: barSpace];
-
- [chartView.data notifyDataChanged];
- [chartView notifyDataSetChanged];
- }
- else
- {
- set1 = [[BarChartDataSet alloc] initWithEntries:yVals1 label:receivablesTitleArry[0]];
- [set1 setColor:[UIColor colorWithRed:70/255.0f green:116/255.0f blue:193/255.0f alpha:1]];
-
- set2 = [[BarChartDataSet alloc] initWithEntries:yVals2 label:receivablesTitleArry[1]];
- [set2 setColor:[UIColor colorWithRed:235/255.0f green:125/255.0f blue:60/255.0f alpha:1]];
- [set1 setDrawValuesEnabled:NO];
- [set2 setDrawValuesEnabled:NO];
-
-
- NSMutableArray *dataSets = [[NSMutableArray alloc] init];
- [dataSets addObject:set1];
- [dataSets addObject:set2];
-
-
- BarChartData *data = [[BarChartData alloc] initWithDataSets:dataSets];
- [data setValueFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:10.f]];
- data.barWidth = barWidth;
-
- // restrict the x-axis range
- chartView.xAxis.axisMinimum = start;
-
- // groupWidthWithGroupSpace(...) is a helper that calculates the width each group needs based on the provided parameters
- chartView.xAxis.axisMaximum = start+ [data groupWidthWithGroupSpace:groupSpace barSpace: barSpace] * end;
-
- [data groupBarsFromX: start groupSpace: groupSpace barSpace: barSpace];
-
- chartView.data = data;
- }
- }
- /**
- 切换渠道部门按钮颜色
- */
- -(void)changeSalesStatusChannelDepartmentColor
- {
- btnSalesStatusChannelMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- [_btnSalesStatusChannel setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- btnSalesStatusDepartmentMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- [_btnSalesStatusDepartment setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- }
- -(void)changeSalesAchievementDepartmentStaffColor
- {
- btnSalesAchievementDepartmentMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- [_btnSalesAchievementDepartment setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- btnSalesAchievementStaffMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- [_btnSalesAchievementStaff setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- }
- -(void)changeOrderStatusChannelDepartmentColor
- {
- btnOrderStatusChannelMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- [_btnOrderStatusChannel setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- btnOrderStatusDepartmentMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- [_btnOrderStatusDepartment setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- }
- -(void)selectSalesAchievementCustomDate
- {
- [self changeSalesAchievementMonthColor];
- [_btnSalesAchievementCustom setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- btnSalesAchievementCustomMaskLayer.strokeColor=[UIColor redColor].CGColor;
- ITDatePickerController *datePickerController = [[ITDatePickerController alloc] init];
- datePickerController.tag = 100;
- datePickerController.delegate = self;
- datePickerController.showToday = NO;
- datePickerController.defaultDate = nil;
- [self presentViewController:datePickerController animated:YES completion:nil];
- }
- -(void)getSalesAchievementCurrentMonth
- {
- [self changeSalesAchievementMonthColor];
- btnSalesAchievementCurrentMonthMaskLayer.strokeColor=[UIColor redColor].CGColor;
- [_btnSalesAchievemmentToday setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
-
- //NSDate转NSString
- _salesAchievementMonth = [DateFormat getCurrentNoSeparateMonth];
- [_btnSalesAchievemmentToday setTitle: [DateFormat getCurrentMonth] forState:UIControlStateNormal];
- [self clearSalesAchievementData];
- [self startLoading];
- [self loadSalesAchievementData];
-
- }
- -(void)changeSalesAchievementMonthColor
- {
- btnSalesAchievementCustomMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- [_btnSalesAchievementCustom setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- btnSalesAchievementCurrentMonthMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- [_btnSalesAchievemmentToday setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- }
- /**
- 切换收款状态渠道部门按钮颜色
- */
- -(void)changeCollectionStatusChannelDepartmentColor
- {
- btnCollectionStatusChannelMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- [_btnCollectionStatusChannel setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- btnCollectionStatusDepartmentMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- [_btnCollectionStatusDepartment setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- }
- -(void)btnSelectShoppingGuideStartDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempShoppingGuideStartDate=date;
- } andCompletionBlock:^(void){
- _shoppingGuideStartDate = _tempShoppingGuideStartDate;
- [weakself.btnShoppingGuideStartDate setTitle:_shoppingGuideStartDate forState:UIControlStateNormal];
- [self clearShoppingGuideFilingData];
- [self startLoading];
-
- [self loadShoppingGuideData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)btnSelectShoppingGuideEndDate
- {
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempShoppingGuideEndDate=date;
- } andCompletionBlock:^(void){
- _shoppingGuideEndDate = _tempShoppingGuideEndDate;
- [_btnShoppingGuideEndDate setTitle:_shoppingGuideEndDate forState:UIControlStateNormal];
- [self clearShoppingGuideFilingData];
- [self startLoading];
-
- [self loadShoppingGuideData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)btnSelectCollectionStatusStartDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempCollectionStatusStartDate=date;
- } andCompletionBlock:^(void){
- _collectionStatusStartDate = _tempCollectionStatusStartDate;
- [weakself.btnCollectionStatusStartDate setTitle:_collectionStatusStartDate forState:UIControlStateNormal];
- [self startLoading];
- [collectionStatusXArray removeAllObjects];
- [collectionStatusYArray removeAllObjects];
- [self clearCollectionStatusData];
- [self loadCashData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)btnSelectDeliveryStatusStartDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempDeliveryStatusStartDate=date;
- } andCompletionBlock:^(void){
- _deliveryStatusStartDate = _tempDeliveryStatusStartDate;
- [weakself.btnDeliveryStatusStartDate setTitle:_deliveryStatusStartDate forState:UIControlStateNormal];
- [self startLoading];
-
- [self clearDeliveryData];
- [self loadDeliveryData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)btnSelectDeliveryStatusEndDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempDeliveryStatusEndDate=date;
- } andCompletionBlock:^(void){
- _deliveryStatusEndDate = _tempDeliveryStatusEndDate;
- [weakself.btnDeliveryStatusEndDate setTitle:_deliveryStatusEndDate forState:UIControlStateNormal];
- [self startLoading];
-
- [self clearDeliveryData];
- [self loadDeliveryData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)btnSelectCollectionStatusEndDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempCollectionStatusEndDate=date;
- } andCompletionBlock:^(void){
- _collectionStatusEndDate = _tempCollectionStatusEndDate;
- [weakself.btnCollectionStatusEndDate setTitle:_collectionStatusEndDate forState:UIControlStateNormal];
- [self startLoading];
- [collectionStatusXArray removeAllObjects];
- [collectionStatusYArray removeAllObjects];
- [self clearCollectionStatusData];
- [self loadCashData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)btnSelectInstallStatusStartDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempInstallStatusStartDate=date;
- } andCompletionBlock:^(void){
- _installStatusStartDate = _tempInstallStatusStartDate;
- [weakself.btnInstallStatusStartDate setTitle:_installStatusStartDate forState:UIControlStateNormal];
- [self startLoading];
-
- [self clearInstallData];
- [self loadInstallData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)btnSelectInstallStatusEndDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempInstallStatusEndDate=date;
- } andCompletionBlock:^(void){
- _installStatusEndDate = _tempInstallStatusEndDate;
- [weakself.btnInstallStatusEndDate setTitle:_installStatusEndDate forState:UIControlStateNormal];
- [self startLoading];
-
- [self clearInstallData];
- [self loadInstallData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)btnSelectRepairStatusStartDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempRepairStatusStartDate=date;
- } andCompletionBlock:^(void){
- _repairStatusStartDate = _tempRepairStatusStartDate;
- [weakself.btnRepairStatusStartDate setTitle:_repairStatusStartDate forState:UIControlStateNormal];
- [self startLoading];
-
- [self clearRepairData];
- [self loadRepairData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)btnSelectRepairStatusEndDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempRepairStatusEndDate=date;
- } andCompletionBlock:^(void){
- _repairStatusEndDate = _tempRepairStatusEndDate;
- [weakself.btnRepairStatusEndDate setTitle:_repairStatusEndDate forState:UIControlStateNormal];
- [self startLoading];
-
- [self clearRepairData];
- [self loadRepairData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)btnSelectOrderStatusStartDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempOrderStatusStartDate=date;
- } andCompletionBlock:^(void){
- _orderStatusStartDate = _tempOrderStatusStartDate;
- [weakself.btnOrderStatusStartDate setTitle:_orderStatusStartDate forState:UIControlStateNormal];
- [self startLoading];
- [orderStatusXArray removeAllObjects];
- [orderStatusYArray removeAllObjects];
- [self clearOrderStatusData];
- [self loadOrderStatusData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- -(void)btnSelectOrderStatusEndDate
- {
- __weak typeof(self) weakself=self;
- _dealDatePicker = [BRDatePickerView PickerAlertWithTitle:@""];
- [_dealDatePicker configureSelectionBlock:^(NSString *date){
- _tempOrderStatusEndDate=date;
- } andCompletionBlock:^(void){
- _orderStatusEndDate = _tempOrderStatusEndDate;
- [weakself.btnOrderStatusEndDate setTitle:_orderStatusEndDate forState:UIControlStateNormal];
- [self clearOrderStatusData];
- [self startLoading];
- [orderStatusXArray removeAllObjects];
- [orderStatusYArray removeAllObjects];
-
- [self loadOrderStatusData];
- } andCancelBlock:^(void){
-
- }];
- [_dealDatePicker show];
- }
- /**
- 画单个柱状图
- */
- -(void)drawSingleBarchart:(NSMutableArray*)barchartArray chartView:(BarChartView*)chart
- axisValueFormatter:(id<ChartAxisValueFormatter>)formatter xAxisLabelCount:(NSInteger)count maximumValue:(double)maximumValue minimumValue:(double)minimumValue
- {
-
- chart.chartDescription.enabled = NO;
- chart.legend.enabled = NO;
- chart.drawGridBackgroundEnabled = NO;
- chart.dragEnabled = YES;
- [chart setScaleEnabled:YES];
- chart.pinchZoomEnabled = NO;
- chart.extraBottomOffset=20;
- chart.rightAxis.enabled = NO;
- chart.delegate = self;
- chart.drawBarShadowEnabled = NO;
- chart.drawValueAboveBarEnabled = YES;
- BalloonMarker *marker = [[BalloonMarker alloc]
- initWithColor: [UIColor colorWithWhite:210/255. alpha:1.0]
- font: [UIFont systemFontOfSize:12.0]
- textColor: UIColor.whiteColor
- insets: UIEdgeInsetsMake(8.0, 8.0, 20.0, 8.0)];
- marker.chartView = chart;
- marker.minimumSize = CGSizeMake(80.f, 40.f);
- chart.marker = marker;
- chart.maxVisibleCount = 60;
-
- ChartXAxis *xAxis = chart.xAxis;
- xAxis.labelPosition = XAxisLabelPositionBottom;
- xAxis.labelFont = [UIFont systemFontOfSize:10.f];
- xAxis.drawGridLinesEnabled = NO;
- xAxis.granularity = 1.0; // only intervals of 1 day
- xAxis.labelCount = count;
- xAxis.labelRotationAngle=20;
- xAxis.valueFormatter = formatter;
-
-
- ChartYAxis *leftAxis = chart.leftAxis;
- leftAxis.labelFont = [UIFont systemFontOfSize:10.f];
- leftAxis.axisMaximum=maximumValue+100;
- leftAxis.labelPosition = YAxisLabelPositionOutsideChart;
- leftAxis.spaceTop = 0.15;
- if(minimumValue<0)
- {
-
- leftAxis.axisMinimum =minimumValue;
- }
- else{
- leftAxis.axisMinimum = 0.0;
- }
-
- double start = 0;
- NSMutableArray *yVals1 = [[NSMutableArray alloc] init];
-
-
- for (int i = start; i < barchartArray.count; i++)
- {
- BarChartDataEntry *dataEntry;
-
- dataEntry= [[BarChartDataEntry alloc] initWithX:i y:[[barchartArray objectAtIndex:i]doubleValue] icon: [UIImage imageNamed:@"icon"] ];
- [yVals1 addObject:dataEntry];
-
-
- }
-
- BarChartDataSet *set1 = nil;
- UIColor *blueColor= [UIColor colorWithRed:70/255.0f green:116/255.0f blue:193/255.0f alpha:1];
-
- NSMutableArray *colorArray=[[NSMutableArray alloc]init];
- [colorArray addObject:blueColor];
-
-
- if (chart.data.dataSetCount > 0)
- {
- set1 = (BarChartDataSet *)chart.data.dataSets[0];
- [set1 replaceEntries: yVals1];
-
- [chart.data notifyDataChanged];
- [chart notifyDataSetChanged];
- }
- else
- {
- set1 = [[BarChartDataSet alloc] initWithEntries:yVals1 label:@"资金"];
- [set1 setColors:colorArray];
-
- set1.drawIconsEnabled = NO;
- [set1 setDrawValuesEnabled:NO];
- NSMutableArray *dataSets = [[NSMutableArray alloc] init];
- [dataSets addObject:set1];
-
-
- BarChartData *data = [[BarChartData alloc] initWithDataSets:dataSets];
- [data setValueFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:10.0f]];
-
- data.barWidth = 0.5f;
-
- chart.data = data;
- }
- }
- /**
- * 异步执行 + 并发队列
- * 特点:可以开启多个线程,任务交替(同时)执行。
- */
- - (void)asyncConcurrent {
-
- dispatch_queue_t queue = dispatch_queue_create("com.test.queue", DISPATCH_QUEUE_CONCURRENT);
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SALES_STATUS_IPHONE].location!=NSNotFound){
- dispatch_async(queue, ^{
- // 追加任务 1
- [NSThread sleepForTimeInterval:1]; // 模拟耗时操作
- [self loadSalesStatusData];
-
- });
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_COLLECTION_STATUS_IPHONE].location!=NSNotFound){
- dispatch_async(queue, ^{
- // 追加任务 1
- [NSThread sleepForTimeInterval:1]; // 模拟耗时操作
- [self loadCashData];
-
- });
- //}
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_ORDER_STATUS_IPHONE].location!=NSNotFound){
- dispatch_async(queue, ^{
- // 追加任务 1
- [NSThread sleepForTimeInterval:1]; // 模拟耗时操作
- [self loadOrderStatusData];
-
- });
-
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_SHOPPING_GUIDE_IPHONE].location!=NSNotFound){
- dispatch_async(queue, ^{
- // 追加任务 1
- [NSThread sleepForTimeInterval:1]; // 模拟耗时操作
- [self loadShoppingGuideData];
-
- });
-
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_DELIVERY_STATUS_IPHONE].location!=NSNotFound){
- dispatch_async(queue, ^{
- // 追加任务 1
- [NSThread sleepForTimeInterval:1]; // 模拟耗时操作
- [self loadDeliveryData];
-
- });
-
- // }
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_INSTALL_STATUS_IPHONE].location!=NSNotFound){
- dispatch_async(queue, ^{
- // 追加任务 1
- [NSThread sleepForTimeInterval:1]; // 模拟耗时操作
- [self loadInstallData];
-
- });
-
- // }
-
-
- // if([kkRights rangeOfString: FUNCTION_SALES_DATA_REPAIR_STATUS_IPHONE].location!=NSNotFound){
- dispatch_async(queue, ^{
- // 追加任务 1
- [NSThread sleepForTimeInterval:1]; // 模拟耗时操作
- [self loadRepairData];
-
- });
-
- // }
-
- dispatch_async(queue, ^{
- // 追加任务 1
- [NSThread sleepForTimeInterval:1]; // 模拟耗时操作
- [self loadSalesAchievementData];
-
- });
- }
- -(void)loadDeliveryData
- {
- NSString *urlStr = [NSString stringWithFormat:@"%@", ServerURL];
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetSalesStatisticalAnalysisDistributionDataIphone" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
-
- _deliveryDownManager = [[ASIDownManager alloc] init];
- _deliveryDownManager.delegate = self;
- _deliveryDownManager.onRequestSuccess = @selector(onDeliveryStatusLoadFinish:);
- _deliveryDownManager.onRequestFail = @selector(onDeliveryStatusLoadFail:);
- [_deliveryDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
- }
- -(void)loadRepairData
- {
- NSString *urlStr = [NSString stringWithFormat:@"%@", ServerURL];
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetSalesStatisticalAnalysisRepairDataIphone" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
-
- _repairDownManager = [[ASIDownManager alloc] init];
- _repairDownManager.delegate = self;
- _repairDownManager.onRequestSuccess = @selector(onRepairStatusLoadFinish:);
- _repairDownManager.onRequestFail = @selector(onRepairStatusLoadFail:);
- [_repairDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
- }
- -(void)loadInstallData
- {
- NSString *urlStr = [NSString stringWithFormat:@"%@", ServerURL];
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetSalesStatisticalAnalysisInstallationDataIphone" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
-
- _installDownManager = [[ASIDownManager alloc] init];
- _installDownManager.delegate = self;
- _installDownManager.onRequestSuccess = @selector(onInstallStatusLoadFinish:);
- _installDownManager.onRequestFail = @selector(onInstallStatusLoadFail:);
- [_installDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
- }
- /**
- 加载销售利润数据源
- */
- -(void)loadSalesStatusData
- {
- NSString *urlStr = [NSString stringWithFormat:@"%@", ServerURL];
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetSalesStatisticalAnalysisSaleDataIphone" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
- [dict setObject:typeId forKeyedSubscript:@"TypeID"];
- [dict setObject:_salesStatusStartDate forKeyedSubscript:@"AccountDateFrom"];
- [dict setObject:_salesStatusEndDate forKeyedSubscript:@"AccountDateTo"];
- _salesStatusDownManager = [[ASIDownManager alloc] init];
- _salesStatusDownManager.delegate = self;
- _salesStatusDownManager.onRequestSuccess = @selector(onSalesStatusLoadFinish:);
- _salesStatusDownManager.onRequestFail = @selector(onSalesStatusLoadFail:);
- [_salesStatusDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
- }
- -(void)loadSalesAchievementData
- {
- NSString *urlStr = [NSString stringWithFormat:@"%@", ServerURL];
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetSalesStatisticalAnalysisAchievementDataIphone" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
- [dict setObject:salesAchievementTypeId forKeyedSubscript:@"TypeID"];
- [dict setObject:_salesAchievementMonth forKeyedSubscript:@"AccountMonth"];
-
- _salesAchievementDownManager = [[ASIDownManager alloc] init];
- _salesAchievementDownManager.delegate = self;
- _salesAchievementDownManager.onRequestSuccess = @selector(onSalesAchievementLoadFinish:);
- _salesAchievementDownManager.onRequestFail = @selector(onSalesAchievementLoadFail:);
- [_salesAchievementDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
- }
- -(void)loadOrderStatusData
- {
- NSString *urlStr = [NSString stringWithFormat:@"%@", ServerURL];
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetSalesStatisticalAnalysisOrderData" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
- [dict setObject:orderStatusTypeId forKeyedSubscript:@"TypeID"];
- [dict setObject:_orderStatusStartDate forKeyedSubscript:@"AccountDateFrom"];
- [dict setObject:_orderStatusEndDate forKeyedSubscript:@"AccountDateTo"];
- _orderStatusDownManager = [[ASIDownManager alloc] init];
- _orderStatusDownManager.delegate = self;
- _orderStatusDownManager.onRequestSuccess = @selector(onOrderStatusLoadFinish:);
- _orderStatusDownManager.onRequestFail = @selector(onOrderStatusLoadFail:);
- [_orderStatusDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
- }
- -(void)loadShoppingGuideData
- {
- NSString *urlStr = [NSString stringWithFormat:@"%@", ServerURL];
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetSalesStatisticalAnalysisRecordDataIphone" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
- [dict setObject:_shoppingGuideStartDate forKeyedSubscript:@"AccountDateFrom"];
- [dict setObject:_shoppingGuideEndDate forKeyedSubscript:@"AccountDateTo"];
-
- _shoppingGuideDownManager = [[ASIDownManager alloc] init];
- _shoppingGuideDownManager.delegate = self;
- _shoppingGuideDownManager.onRequestSuccess = @selector(onShoppingGuideLoadFinish:);
- _shoppingGuideDownManager.onRequestFail = @selector(onShoppingGuideLoadFail:);
- [_shoppingGuideDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
- }
- -(void)loadCashData
- {
- NSString *urlStr = [NSString stringWithFormat:@"%@", ServerURL];
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetSalesStatisticalAnalysisCashDataIphone" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
- [dict setObject:cashStatusTypeId forKeyedSubscript:@"TypeID"];
- [dict setObject:_collectionStatusStartDate forKeyedSubscript:@"AccountDateFrom"];
- [dict setObject:_collectionStatusEndDate forKeyedSubscript:@"AccountDateTo"];
- _cashStatusDownManager = [[ASIDownManager alloc] init];
- _cashStatusDownManager.delegate = self;
- _cashStatusDownManager.onRequestSuccess = @selector(onCashStatusLoadFinish:);
- _cashStatusDownManager.onRequestFail = @selector(onCashStatusLoadFail:);
- [_cashStatusDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
- }
- #pragma mark - 代理函数
- - (void)datePickerController:(ITDatePickerController *)datePickerController didSelectedDate:(NSDate *)date dateString:(NSString *)dateString {
- NSInteger tag = datePickerController.tag;
- if (datePickerController.tag == 100) {
-
- NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
- [dateFormatter setDateFormat:@"yyyy-MM"] ;
-
- NSDateFormatter *dateFormatter1 = [[NSDateFormatter alloc] init];
- [dateFormatter1 setDateFormat:@"yyyyMM"];
- //NSDate转NSString
- _salesAchievementMonth = [dateFormatter1 stringFromDate:date];
- [_btnSalesAchievementCustom setTitle: [dateFormatter stringFromDate:date] forState:UIControlStateNormal];
- [self clearSalesAchievementData];
- [self startLoading];
- [self loadSalesAchievementData];
- }
-
-
-
-
-
- }
- -(void)onSalesAchievementLoadFinish:(ASIDownManager *)sender {
- [self stopLoading];
- RequestResultModel *resultModel = [RequestResultModel dk_modelWithJSON:sender.mWebStr];
- int status= resultModel.status;
- if(status==0)
- {
- NSDictionary *resultDic=(NSDictionary*)[resultModel result];
- NSArray *tableArray= [resultDic objectForKey:@"Table"];
- if(tableArray!=nil&&tableArray.count>0)
- {
- double totalAmount=0;
- double totalPlanAmount=0;
- NSMutableArray *salesAchievementArray=[[NSMutableArray alloc]init];
- for(int i=0;i<tableArray.count;i++)
- {
- NSDictionary *dic=[tableArray objectAtIndex:i];
- double amount= [[dic objectForKey:@"Amount"]doubleValue];
- double planAmount= [[dic objectForKey:@"PlanAmount"]doubleValue];
- NSString *name=[dic objectForKey:@"Name"];
- NSString *amountStr=[NSString stringWithFormat:@"%.2f",amount];
- NSString *planAmountStr=[NSString stringWithFormat:@"%.2f",amount];
-
- NSMutableDictionary *dic2=[[NSMutableDictionary alloc]init];
- [dic2 setObject:planAmountStr forKey:@"planAmount"];
- [dic2 setObject:amountStr forKey:@"saleAmount"];
- [salesAchievementArray addObject:amountStr];
- [salesAchievementArray addObject:planAmountStr];
- [salesAchievementYArray addObject:dic2];
- [salesAchievementXArray addObject:name];
- totalAmount+=amount;
- totalPlanAmount+=planAmount;
- }
-
- NSString *totalAmountStr=[NSString stringWithFormat:@"%.2f",totalAmount];
- NSString *totalPlanAmountStr=[NSString stringWithFormat:@"%.2f",totalPlanAmount];
- double percent;
- if(totalPlanAmount==0)
- {
- percent=0;
- }
- percent= totalAmount/totalPlanAmount*100;
-
- [_salesAchievementChart progress:percent ];
- lblSalesAchievementPercent.text=[NSString stringWithFormat:@"%@%.2f%@",@"完成率",percent,@"%"];
-
- totalAmountStr=[Util thousandSeparatorFormat:totalAmountStr];
- totalPlanAmountStr=[Util thousandSeparatorFormat:totalPlanAmountStr];
- lblSalesAchievementPlanAmount.text=totalPlanAmountStr;
- lblSalesAchievementSalesAmount.text=totalAmountStr;
-
- IntAxisValueFormatter *formatter3=[[IntAxisValueFormatter alloc]init];
- [formatter3 setTitle:salesAchievementXArray];
- double maximumValue3= [self getYAxisMaximumValue:salesAchievementArray];
- double minimumValue3=[self getYAxisMinimumValue:salesAchievementArray];
- [self drawTwoBarchart:salesAchievementYArray receivablesTitleArray:salesAchievementTitleArray barChartView:_salesAchievementChartView axisValueFormatter:formatter3 xAxisLabelCount:salesAchievementXArray.count maximumValue:maximumValue3 minimumValue:minimumValue3];
-
- }
- else
- {
- [ _salesAchievementChartView clear];
- [_salesAchievementChartView notifyDataSetChanged];
- }
-
- }
- }
- -(void)onSalesAchievementLoadFail:(ASIDownManager *)sender {
- [self stopLoading];
-
- }
- -(void)onRepairStatusLoadFinish:(ASIDownManager *)sender {
- [self stopLoading];
-
- RequestResultModel *resultModel = [RequestResultModel dk_modelWithJSON:sender.mWebStr];
- int status= resultModel.status;
- if(status==0)
- {
- NSDictionary *resultDic=(NSDictionary*)[resultModel result];
- NSArray *resultArray=[resultDic objectForKey:@"Table"];
-
- if(resultArray!=nil&&resultArray.count>0)
- {
- NSDictionary *dic=[resultArray objectAtIndex:0];
- int repairNo= [[dic objectForKey:@"RepairNo"]intValue];
- int repairOkNo= [[dic objectForKey:@"RepairOkNo"]intValue];
- int repairNoOne= [[dic objectForKey:@"RepairNo_One"]intValue];
- int repairNoTwo=[[dic objectForKey:@"RepairNo_Two"]intValue];
- int repairNoThree=[[dic objectForKey:@"RepairNo_Three"]intValue];
-
- lblNeedRepairCustomerCount.text=[NSString stringWithFormat:@"%d",repairNo];
- lblRepairedCustomerCount.text=[NSString stringWithFormat:@"%d",repairOkNo];
- lblNextDayNeedRepairCount.text=[NSString stringWithFormat:@"%d",repairNoOne];
-
- lblNextTwoDaysNeedRepairCount.text=[NSString stringWithFormat:@"%d",repairNoTwo];
- lblNextThreeDaysNeedRepairCount.text=[NSString stringWithFormat:@"%d",repairNoThree];
-
- double percent=0;
- if(repairNo==0)
- {
- percent=0;
- }
- else{
- percent= repairOkNo/repairNo*100;
- }
-
- [_repairStatusView progress:percent ];
-
- lblRepairPercent.text=[NSString stringWithFormat:@"%@%.2f%@",@"完成率",percent,@"%"];
-
- }
-
- }
- }
- -(void)onRepairStatusLoadFail:(ASIDownManager *)sender {
- [self stopLoading];
-
- }
- -(void)onDeliveryStatusLoadFinish:(ASIDownManager *)sender {
- [self stopLoading];
-
- RequestResultModel *resultModel = [RequestResultModel dk_modelWithJSON:sender.mWebStr];
- int status= resultModel.status;
- if(status==0)
- {
- NSDictionary *resultDic=(NSDictionary*)[resultModel result];
- NSArray *resultArray=[resultDic objectForKey:@"Table"];
- if(resultArray!=nil&&resultArray.count>0)
- {
- NSDictionary *dic=[resultArray objectAtIndex:0];
- int deliveryNo= [[dic objectForKey:@"DeliveryNo"]intValue];
- int deliveryOkNo= [[dic objectForKey:@"DeliveryOkNo"]intValue];
- int deliveryNoOne= [[dic objectForKey:@"DeliveryNo_One"]intValue];
- int deliveryNoTwo=[[dic objectForKey:@"DeliveryNo_Two"]intValue];
- int deliveryNoThree=[[dic objectForKey:@"DeliveryNo_Three"]intValue];
-
- lblNeedDeliveryCustomerCount.text=[NSString stringWithFormat:@"%d",deliveryNo];
- lblDeliveredCustomerCount.text=[NSString stringWithFormat:@"%d",deliveryOkNo];
- lblNextDayNeedDeliveryCount.text=[NSString stringWithFormat:@"%d",deliveryNoOne];
- lblNextTwoDaysNeedDeliveryCount.text=[NSString stringWithFormat:@"%d",deliveryNoTwo];
- lblNextThreeDaysNeedDeliveryCount.text=[NSString stringWithFormat:@"%d",deliveryNoThree];
-
-
-
- double percent=0;
- if(deliveryNo==0)
- {
- percent=0;
- }
- else{
- percent= deliveryOkNo/deliveryNo*100;
- }
-
- [_deliveryStatusView progress:percent ];
-
- lblDeliveryPercent.text=[NSString stringWithFormat:@"%@%.2f%@",@"完成率",percent,@"%"];
-
-
- }
- }
-
-
- }
- -(void)onDeliveryStatusLoadFail:(ASIDownManager *)sender {
- [self stopLoading];
-
- }
- -(void)onInstallStatusLoadFinish:(ASIDownManager *)sender {
- [self stopLoading];
-
- RequestResultModel *resultModel = [RequestResultModel dk_modelWithJSON:sender.mWebStr];
- int status= resultModel.status;
- if(status==0)
- {
- NSDictionary *resultDic=(NSDictionary*)[resultModel result];
- if(resultDic!=nil)
- {
- NSArray *resultArray=[resultDic objectForKey:@"Table"];
- if(resultArray!=nil&&resultArray.count>0)
- {
- NSDictionary *dic=[resultArray objectAtIndex:0];
- int installNo= [[dic objectForKey:@"InstallationNo"]intValue];
- int installOkNo= [[dic objectForKey:@"InstallationOkNo"]intValue];
- int installNoOne= [[dic objectForKey:@"InstallationNo_One"]intValue];
- int installNoTwo=[[dic objectForKey:@"InstallationNo_Two"]intValue];
- int installNoThree=[[dic objectForKey:@"InstallationNo_Three"]intValue];
-
- lblNeedInstallCustomerCount.text=[NSString stringWithFormat:@"%d",installNo];
- lblInstalledCustomerCount.text=[NSString stringWithFormat:@"%d",installOkNo];
- lblNextDayNeedInstallCount.text=[NSString stringWithFormat:@"%d",installNoOne];
- lblNextTwoDaysNeedInstallCount.text=[NSString stringWithFormat:@"%d",installNoTwo];
- lblNextThreeDaysNeedInstallCount.text=[NSString stringWithFormat:@"%d",installNoThree];
-
- double percent=0;
- if(installNo==0)
- {
- percent=0;
- }
- else{
- percent= installOkNo/installNo*100;
- }
- [_installStatusView progress:percent];
-
- lblInstallPercent.text=[NSString stringWithFormat:@"%@%.2f%@",@"完成率",percent,@"%"];
- }
- }
- }
-
- }
- -(void)onInstallStatusLoadFail:(ASIDownManager *)sender {
-
- [self stopLoading];
- }
- -(void)onShoppingGuideLoadFinish:(ASIDownManager *)sender {
-
- [self stopLoading];
-
- RequestResultModel *resultModel = [RequestResultModel dk_modelWithJSON:sender.mWebStr];
- int status= resultModel.status;
- if(status==0)
- {
- NSDictionary *resultDic=(NSDictionary*)[resultModel result];
- if(resultDic!=nil)
- {
- NSArray *table1Array= [resultDic objectForKey:@"Table1"];
- NSArray *tableArray= [resultDic objectForKey:@"Table"];
- if(table1Array!=nil&&table1Array.count>0)
- {
- NSDictionary *table1Dic=[table1Array objectAtIndex:0];
- int num= [[table1Dic objectForKey:@"Num"]intValue];
- int okNum= [[table1Dic objectForKey:@"OkNum"]intValue];
- double transactionPercent=0;
- if(num==0)
- {
- transactionPercent=0;
- }
- else{
- transactionPercent= okNum/num*100;
- }
- lblFilingCustomerCount.text=[NSString stringWithFormat:@"%d",num];
- lblTransactionCustomerCount.text=[NSString stringWithFormat:@"%d",okNum];
-
- [_transactionView progress:transactionPercent ];
-
- }
-
- if(tableArray!=nil&&tableArray.count>0)
- {
- NSMutableArray *yArray=[[NSMutableArray alloc]init];
- for(int i=0;i<tableArray.count;i++)
- {
- NSDictionary *tableDic=[tableArray objectAtIndex:i];
- int num= [[tableDic objectForKey:@"Num"]intValue];
- NSString *numStr=[NSString stringWithFormat:@"%d",num];
-
- int okNum=[[tableDic objectForKey:@"OkNum"]intValue];
- NSString *okNumStr=[NSString stringWithFormat:@"%d",okNum];
- NSString *name=[tableDic objectForKey:@"Name"];
- [shoppingGuideXArray addObject:name];
- NSMutableDictionary *dic=[[NSMutableDictionary alloc]init];
- [dic setObject:okNumStr forKey:@"transactionCount"];
- [dic setObject:numStr forKey:@"filingCount"];
- [shoppingGuideYArray addObject:dic];
- [yArray addObject:numStr];
- [yArray addObject:okNumStr];
- }
-
- IntAxisValueFormatter *formatter4=[[IntAxisValueFormatter alloc]init];
- [formatter4 setTitle:shoppingGuideXArray];
- double maximumValue= [self getYAxisMaximumValue:yArray];
- double minimumValue=[self getYAxisMinimumValue:yArray];
- [self drawHorizontalTwoBarchart:shoppingGuideYArray receivablesTitleArray:shoppingGuideTitleArray barChartView:_transactionChartView axisValueFormatter:formatter4 xAxisLabelCount:shoppingGuideXArray.count maximumValue:maximumValue minimumValue:minimumValue];
- }
- }
-
- }
- }
- -(void)onShoppingGuideLoadFail:(ASIDownManager *)sender {
- [self stopLoading];
-
- }
- -(void)onOrderStatusLoadFinish:(ASIDownManager *)sender {
-
- [self stopLoading];
-
- RequestResultModel *resultModel = [RequestResultModel dk_modelWithJSON:sender.mWebStr];
- int status= resultModel.status;
- if(status==0)
- {
- NSDictionary *resultDic=(NSDictionary*)resultModel.result;
- if(resultDic!=nil)
- {
- NSArray *resultArray=[resultDic objectForKey:@"Table"];
- if(resultArray!=nil&&resultArray.count>0)
- {
- for(int i=0;i<resultArray.count;i++)
- {
- NSDictionary *dic=[resultArray objectAtIndex:i];
- double amount=[[dic objectForKey:@"Amount"]doubleValue];
- NSString *amountStr=[NSString stringWithFormat:@"%.2f",amount];
- NSString *name=[dic objectForKey:@"Name"];
- [orderStatusXArray addObject:name];
- [orderStatusYArray addObject:amountStr];
- }
-
- IntAxisValueFormatter *formatter2=[[IntAxisValueFormatter alloc]init];
- [formatter2 setTitle:orderStatusXArray];
- double maximumValue2= [self getYAxisMaximumValue:orderStatusYArray];
- double minimumValue2=[self getYAxisMinimumValue:orderStatusYArray];
-
- [self drawSingleBarchart:orderStatusYArray chartView:_orderStatusChartView axisValueFormatter:formatter2 xAxisLabelCount:orderStatusXArray.count maximumValue:maximumValue2 minimumValue:minimumValue2];
- }
-
- NSArray *table1Array=[resultDic objectForKey:@"Table1"];
- if(table1Array!=nil&&table1Array.count>0)
- {
- NSDictionary *table1Dic=[table1Array objectAtIndex:0];
- int customerReturnNo=[[table1Dic objectForKey:@"CustomerReturnNo"]intValue];
- int customerNo=[[table1Dic objectForKey:@"CustomerNo"]intValue];
- double amount=[[table1Dic objectForKey:@"Amount"]doubleValue];
- double returnAmount=[[table1Dic objectForKey:@"ReturnAmount"]doubleValue];
- lblOrderCustomerCount.text=[NSString stringWithFormat:@"%d",customerNo];
- lblUnsubscribeCustomerCount.text=[NSString stringWithFormat:@"%d",customerReturnNo];
- NSString *amountStr=[NSString stringWithFormat:@"%.2f",amount];
- amountStr=[Util thousandSeparatorFormat:amountStr];
- lblOrderAmount.text=amountStr;
- NSString *returnAmountStr=[NSString stringWithFormat:@"%.2f",returnAmount];
- returnAmountStr=[Util thousandSeparatorFormat:returnAmountStr];
- lblUnsubscribeAmount.text=returnAmountStr;
-
- }
- }
-
-
-
- }
- }
- -(void)onOrderStatusLoadFail:(ASIDownManager *)sender {
- [self stopLoading];
-
- }
- -(void)onCashStatusLoadFinish:(ASIDownManager *)sender {
-
- [self stopLoading];
- RequestResultModel *resultModel = [RequestResultModel dk_modelWithJSON:sender.mWebStr];
- int status= resultModel.status;
- if(status==0)
- {
- NSDictionary *resultDic=(NSDictionary*)resultModel.result;
- if(resultDic!=nil)
- {
- NSArray *resultArray=[resultDic objectForKey:@"Table"];
- if(resultArray!=nil&&resultArray.count>0)
- {
- double totalAmount=0;
- for(int i=0;i<resultArray.count;i++)
- {
- NSDictionary *dic=[resultArray objectAtIndex:i];
- double amount=[[dic objectForKey:@"Amount"]doubleValue];
- totalAmount+=amount;
- NSString *amountStr=[NSString stringWithFormat:@"%.2f",amount];
- NSString *name=[dic objectForKey:@"Name"];
- [collectionStatusXArray addObject:name];
- [collectionStatusYArray addObject:amountStr];
-
- }
-
- NSString *totalAmountStr=[NSString stringWithFormat:@"%.2f",totalAmount];
- totalAmountStr =[Util thousandSeparatorFormat:totalAmountStr];
- lblCollectionAmount.text=totalAmountStr;
-
- IntAxisValueFormatter *formatter1=[[IntAxisValueFormatter alloc]init];
- [formatter1 setTitle:collectionStatusXArray];
- double maximumValue1= [self getYAxisMaximumValue:collectionStatusYArray];
- double minimumValue1=[self getYAxisMinimumValue:collectionStatusYArray];
-
- [self drawSingleBarchart:collectionStatusYArray chartView:_collectionStatusChartView axisValueFormatter:formatter1 xAxisLabelCount:collectionStatusXArray.count maximumValue:maximumValue1 minimumValue:minimumValue1];
-
-
- }
-
-
- }
-
- }
- }
- -(void)onCashStatusLoadFail:(ASIDownManager *)sender {
-
- [self stopLoading];
-
- }
- -(void)onSalesStatusLoadFinish:(ASIDownManager *)sender {
-
- [self stopLoading];
- RequestResultModel *resultModel = [RequestResultModel dk_modelWithJSON:sender.mWebStr];
- int status= resultModel.status;
- if(status==0)
- {
- NSDictionary *resultDic=(NSDictionary*)resultModel.result;
- if(resultDic!=nil)
- {
- NSArray *tableArray= [resultDic objectForKey:@"Table"];
- NSArray *table1Array= [resultDic objectForKey:@"Table1"];
- if(table1Array!=nil&&table1Array.count>0)
- {
- NSDictionary *table1Dic= [table1Array objectAtIndex:0];
- int customerNewNo=[[table1Dic objectForKey:@"CustomerNewNo"]intValue];
- int customerNo=[[table1Dic objectForKey:@"CustomerNo"]intValue];
- lblSalesAddCustomer.text=[NSString stringWithFormat:@"%d",customerNewNo];
- lblSalesCustomerCount.text=[NSString stringWithFormat:@"%d",customerNo];
-
- }
- if(tableArray!=nil&&tableArray.count>0)
- {
- double totalAmount=0;
- for(int i=0;i<tableArray.count;i++)
- {
- NSDictionary *tableDic=[tableArray objectAtIndex:i];
- double amount= [[tableDic objectForKey:@"Amount"]doubleValue];
- NSString *amountStr=[NSString stringWithFormat:@"%.2f",amount];
- NSString *name=[tableDic objectForKey:@"Name"];
- totalAmount+=amount;
- [salesStatusYArray addObject:amountStr];
- [salesStatusXArray addObject:name];
- }
-
- NSString *totalAmountStr=[NSString stringWithFormat:@"%.2f",totalAmount];
-
- totalAmountStr= [Util thousandSeparatorFormat:totalAmountStr];
- lblSalesAmount.text=totalAmountStr;
-
- IntAxisValueFormatter *formatter=[[IntAxisValueFormatter alloc]init];
- [formatter setTitle:salesStatusXArray];
- double maximumValue= [self getYAxisMaximumValue:salesStatusYArray];
- double minimumValue=[self getYAxisMinimumValue:salesStatusYArray];
-
- [self drawSingleBarchart:salesStatusYArray chartView:_salesStatusChartView axisValueFormatter:formatter xAxisLabelCount:salesStatusXArray.count maximumValue:maximumValue minimumValue:minimumValue];
-
- }
-
-
-
- }
-
- }
-
- }
- -(void)onSalesStatusLoadFail:(ASIDownManager *)sender {
-
- [self stopLoading];
- }
- @end
|