Cost.vue 247 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616
  1. <template>
  2. <div class="cost-all" v-loading.fullscreen.lock="costloading" >
  3. <div class="cost-box">
  4. <div class="cost-haed">
  5. <div class="ser-btn">
  6. <div class="ser-btn-li Cost_topFlex" style="display: flex;">
  7. <el-select size="small" v-model="diid" filterable placeholder="请选择" @change="groupChange">
  8. <el-option v-for="item in options" :key="item.id" :label="item.groupName" :value="item.id">
  9. <span v-if="item.isTrue == 'True'" style="color:#409EFF">{{ item.groupName }}</span>
  10. <span v-else style="color:gray">{{ item.groupName }}</span>
  11. </el-option>
  12. </el-select>
  13. <div style="line-height: 28px;font-size: 14px;width: 90px;color: #555;text-align: right;padding-right: 12px;">
  14. 分段类型:
  15. </div>
  16. <el-select style="width:200px" size="small" v-model="costTypevalue" placeholder="请选择" @change="costTypeSelect">
  17. <el-option v-for="item in costType" :key="item.value" :label="item.label"
  18. :value="item.value">
  19. </el-option>
  20. </el-select>
  21. </div>
  22. <div class="ser-btn-li">
  23. <el-button size="small" type="primary">导入收款账单</el-button>
  24. <el-button size="small" type="primary" @click="GetPriceCheckWord">生成收款账单</el-button>
  25. <el-button size="small" type="primary" @click="GetClientWord">导出客户报表</el-button>
  26. <el-button size="small" type="primary" @click="GetGroupCostExcel">导出成本</el-button>
  27. <!-- <el-button type="primary">一键复制</el-button> -->
  28. <el-button size="small" type="primary" @click="GroupIsShare">成本通知</el-button>
  29. <el-button size="small" type="primary" @click="save">保存设置</el-button>
  30. </div>
  31. </div>
  32. <div class="cost-input">
  33. <el-form :inline="true" class="demo-form-inline" :model='AGroupCostParameter' ref="inputs"
  34. :rules="rules">
  35. <el-form-item label="税率:" prop="tax">
  36. <el-input size="small" v-model="AGroupCostParameter.tax" placeholder="税率"></el-input>
  37. </el-form-item>
  38. <el-form-item label="货币:">
  39. <el-select size="small" v-model="AGroupCostParameter.currency" @change="changeCurrency"
  40. placeholder="请选择">
  41. <el-option v-for="item in currencyOption" :key="item.currencyId"
  42. :label="item.currencyCode" :value="item.currencyId">
  43. </el-option>
  44. </el-select>
  45. </el-form-item>
  46. <el-form-item label="汇率:" prop="rate">
  47. <el-input size="small" v-model="AGroupCostParameter.rate" placeholder="汇率"></el-input>
  48. </el-form-item>
  49. </el-form>
  50. <div v-show="costTypevalue == 'A'">
  51. <el-form :inline="true" class="demo-form-inline" :rules="HotelRules" ref="DHotel"
  52. :model="costTypeHotelNumbers.filter(item => item.type == 'Default')[0]">
  53. <el-form-item label="TBR:" prop="tbr">
  54. <el-input size="small" @blur='inSelectChangeCheck'
  55. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].tbr"
  56. placeholder="TBR"><i slot="suffix"
  57. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  58. </el-form-item>
  59. <el-form-item label="SGR:" prop="sgr">
  60. <el-input size="small" @blur='inSelectChangeCheck'
  61. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].sgr"
  62. placeholder="SGR"><i slot="suffix"
  63. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  64. </el-form-item>
  65. <el-form-item label="JS/ES:" prop="jses">
  66. <el-input size="small" @blur='inSelectChangeCheck'
  67. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].jses"
  68. placeholder="JS/ES"><i slot="suffix"
  69. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  70. </el-form-item>
  71. <el-form-item label="SUITE:" prop="suite">
  72. <el-input size="small" @blur='inSelectChangeCheck'
  73. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].suite"
  74. placeholder="SUITE"><i slot="suffix"
  75. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  76. </el-form-item>
  77. </el-form>
  78. </div>
  79. <div v-show="costTypevalue == 'B'" class="CostBShow">
  80. <el-row>
  81. <el-form ref="Asection" :inline="true" class="demo-form-inline" :rules="CostTimeRules"
  82. :model="AGroupCostParameter">
  83. <el-col :span="5">
  84. <div> <el-form-item label="第一段开始:" prop="costTypeStartTime">
  85. <el-date-picker size="small" v-model="AGroupCostParameter.costTypeStartTime" type="date"
  86. placeholder="第一段开始" format="yyyy-MM-dd"
  87. value-format="yyyy-MM-dd">
  88. </el-date-picker>
  89. </el-form-item>
  90. </div>
  91. </el-col>
  92. <el-col :span="4">
  93. <div> <el-form-item label="结束:" prop="costTypeendTime"><el-date-picker
  94. size="small" v-model="AGroupCostParameter.costTypeendTime" type="date"
  95. placeholder="结束" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
  96. </el-date-picker>
  97. </el-form-item>
  98. </div>
  99. </el-col>
  100. <el-col :span="3">
  101. <div>
  102. <el-form-item label="人数:" prop="costTypenumber"><el-input size="small" placeholder="人数"
  103. v-model.number="AGroupCostParameter.costTypenumber" clearable>
  104. </el-input>
  105. </el-form-item>
  106. </div>
  107. </el-col>
  108. </el-form>
  109. <el-form ref="AHotel" :inline="true" class="demo-form-inline" :rules="HotelRules"
  110. :model="costTypeHotelNumbers.filter(item => item.type == 'A')[0]">
  111. <el-col :span="3">
  112. <div><el-form-item label="TBR:" prop="tbr">
  113. <el-input size="small" @blur='inSelectChangeCheck'
  114. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].tbr"
  115. placeholder="TBR"><i slot="suffix"
  116. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  117. </el-form-item></div>
  118. </el-col>
  119. <el-col :span="3">
  120. <div> <el-form-item label="SGR:" prop="sgr">
  121. <el-input size="small" @blur='inSelectChangeCheck'
  122. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].sgr"
  123. placeholder="SGR"><i slot="suffix"
  124. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  125. </el-form-item></div>
  126. </el-col>
  127. <el-col :span="3">
  128. <div><el-form-item label="JS/ES:" prop="jses">
  129. <el-input size="small" @blur='inSelectChangeCheck'
  130. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].jses"
  131. placeholder="JS/ES"><i slot="suffix"
  132. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  133. </el-form-item></div>
  134. </el-col>
  135. <el-col :span="3">
  136. <div><el-form-item label="SUITE:" prop="suite">
  137. <el-input size="small" @blur='inSelectChangeCheck'
  138. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].suite"
  139. placeholder="SUITE"><i slot="suffix"
  140. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  141. </el-form-item></div>
  142. </el-col>
  143. </el-form>
  144. </el-row>
  145. <el-row>
  146. <el-form ref="Bsection" :inline="true" class="demo-form-inline" :rules="CostTimeRules"
  147. :model="BGroupCostParameter">
  148. <el-col :span="5">
  149. <div> <el-form-item label="第二段开始:" prop="costTypeStartTime">
  150. <el-date-picker size="small" v-model="BGroupCostParameter.costTypeStartTime" type="date"
  151. placeholder="第二段开始" format="yyyy-MM-dd"
  152. value-format="yyyy-MM-dd">
  153. </el-date-picker>
  154. </el-form-item>
  155. </div>
  156. </el-col>
  157. <el-col :span="4">
  158. <div> <el-form-item label="结束:" prop="costTypeendTime"><el-date-picker size="small"
  159. v-model="BGroupCostParameter.costTypeendTime" type="date"
  160. placeholder="结束" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
  161. </el-date-picker>
  162. </el-form-item>
  163. </div>
  164. </el-col>
  165. <el-col :span="3">
  166. <div>
  167. <el-form-item label="人数:" prop="costTypenumber"><el-input size="small" placeholder="人数"
  168. v-model.number="BGroupCostParameter.costTypenumber" clearable>
  169. </el-input>
  170. </el-form-item>
  171. </div>
  172. </el-col>
  173. </el-form>
  174. <el-form ref="BHotel" :inline="true" class="demo-form-inline" :rules="HotelRules"
  175. :model="costTypeHotelNumbers.filter(item => item.type == 'B')[0]">
  176. <el-col :span="3">
  177. <div>
  178. <el-form-item label="TBR:" prop="tbr">
  179. <el-input size="small" @blur='inSelectChangeCheck'
  180. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].tbr"
  181. placeholder="TBR"><i slot="suffix"
  182. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  183. </el-form-item>
  184. </div>
  185. </el-col>
  186. <el-col :span="3">
  187. <div> <el-form-item label="SGR:" prop="sgr">
  188. <el-input size="small" @blur='inSelectChangeCheck'
  189. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].sgr"
  190. placeholder="SGR"><i slot="suffix"
  191. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  192. </el-form-item></div>
  193. </el-col>
  194. <el-col :span="3">
  195. <div><el-form-item label="JS/ES:" prop="jses">
  196. <el-input size="small" @blur='inSelectChangeCheck'
  197. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].jses"
  198. placeholder="JS/ES"><i slot="suffix"
  199. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  200. </el-form-item></div>
  201. </el-col>
  202. <el-col :span="3">
  203. <div><el-form-item label="SUITE:" prop="suite">
  204. <el-input size="small" @blur='inSelectChangeCheck'
  205. v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].suite"
  206. placeholder="SUITE"><i slot="suffix"
  207. style="font-style:normal;margin-right: 10px;">间</i></el-input>
  208. </el-form-item></div>
  209. </el-col>
  210. </el-form>
  211. </el-row>
  212. </div>
  213. </div>
  214. <div class="cost-info">
  215. <div class="cost-info-li">
  216. <label>团 号:</label>
  217. <span>{{ grouptitleinfo.tourCode }}</span>
  218. </div>
  219. <div class="cost-info-li">
  220. <label>客 户:</label>
  221. <span>{{ grouptitleinfo.clientName }}</span>
  222. </div>
  223. <div class="cost-info-li">
  224. <label>出访国家:</label>
  225. <span>{{ grouptitleinfo.visitCountry }}</span>
  226. </div>
  227. <div class="cost-info-li">
  228. <label>起止日期:</label>
  229. <span>{{ grouptitleinfo.visitStartDate }} -
  230. {{ grouptitleinfo.visitEndDate
  231. }}</span>
  232. </div>
  233. <div class="cost-info-li">
  234. <label>天数/人数:</label>
  235. <span>{{ grouptitleinfo.visitDays }}天/{{ grouptitleinfo.visitPNumber }}人</span>
  236. </div>
  237. </div>
  238. </div>
  239. <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
  240. <el-checkbox-group class="form-ss"
  241. v-model="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues" @change="TopChange">
  242. <el-checkbox v-for="( item, index ) in checkOptions " :key="index" :title="item.tips"
  243. :label="item.label" @change="(val) => { topcheckboxChange(val, item.label) }"></el-checkbox>
  244. </el-checkbox-group>
  245. <el-table :stripe='true' class="tables" style="font-size:10px" :summary-method="getSummaries" show-summary
  246. show-overflow-tooltip :data="tableData" :border="true" size="small" row-class-name="row"
  247. cell-class-name="column" :highlight-current-row="true" :fit="true">
  248. <!-- :height="centerheight" -->
  249. <template v-for="( item, index ) in tableLabel ">
  250. <el-table-column :key="index" :prop="item.prop"
  251. :width="item.width != '100' ? columnWidth : item.width" :label="item.label"
  252. v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
  253. <!-- eslint-disable-next-line -->
  254. <template slot="header" slot-scope="scope">
  255. <el-tooltip effect="dark" :content="item.describe" placement="top">
  256. <div>
  257. <span class="rapAddress">{{ item.label }}</span>
  258. <span v-show="item.describe.indexOf('个人成本') != -1" style=" color:red">*</span>
  259. </div>
  260. </el-tooltip>
  261. </template>
  262. <template slot-scope="scope">
  263. <div v-if="item.prop === 'sales'">
  264. <el-input size="mini" :ref="'el-input-' + index" v-model="scope.row[item.prop]"
  265. show-word-limit />
  266. </div>
  267. <div v-else-if="item.prop === 'day'">
  268. <el-input size="mini" :ref="'el-input-' + index" v-model="scope.row[item.prop]"
  269. type="number" controls-position="right" min="0" @change="NumberSetTime(scope.row[item.prop], scope.$index)" />
  270. </div>
  271. <div v-else-if="item.prop === 'date'">
  272. <span :title="scope.row[item.prop]">
  273. <!-- <el-input placeholder="请输入日期"
  274. v-model="scope.row[item.prop]"
  275. @change="dateChange(scope.row[item.prop], scope.$index)">
  276. </el-input> -->
  277. <el-date-picker :clearable="false" size="mini" v-model="scope.row[item.prop]"
  278. type="date" value-format="yyyy-MM-dd" placeholder="选择日期">
  279. </el-date-picker>
  280. </span>
  281. <div style="position: absolute;left: 36%;">
  282. {{ GetWeek(scope.row[item.prop]) }}
  283. </div>
  284. </div>
  285. <div v-else-if="item.prop === 'sale'">
  286. <el-row class="figures-btn">
  287. <el-button @click="handleEdit(scope.$index, scope.row, 1)" size="mini"
  288. type="primary">司兼导</el-button>
  289. <el-button @click="handleEdit(scope.$index, scope.row, 2)" size="mini"
  290. type="primary">导
  291. 游</el-button>
  292. <el-button @click="handleEdit(scope.$index, scope.row, 3)" size="mini"
  293. type="primary">车数据</el-button>
  294. <el-button @click="handleEdit(scope.$index, scope.row, 4)" size="mini"
  295. type="primary">景
  296. 点</el-button>
  297. </el-row>
  298. </div>
  299. <div v-else-if="item.width == 100">
  300. <el-input type="textarea" :rows="6" placeholder="请输入内容" v-model="scope.row[item.prop]">
  301. </el-input>
  302. </div>
  303. <div v-else-if="item.prop == 'b' || item.prop == 'l' || item.prop == 'd'">
  304. <el-popover placement="top-start" title="餐食报批费用:" width="200" trigger="hover">
  305. <div>
  306. <span style="color:red;">*具体价格以当前货币汇率为准!</span><br />
  307. <div v-if="ShowMeals.length == 0">
  308. <br />
  309. <span style="color:red">暂无数据!</span>
  310. </div>
  311. <div v-else>
  312. <div v-for="( item, index ) in ShowMeals" :key="index">
  313. {{ item.countryOrCity }} &nbsp;&nbsp; <span style="color:green;">{{
  314. item.price }}</span>元/人<br>
  315. </div>
  316. </div>
  317. </div>
  318. <el-input size="mini" slot="reference"
  319. v-model="scope.row[item.prop]">
  320. </el-input>
  321. </el-popover>
  322. </div>
  323. <div
  324. v-else-if="item.prop == 'suite' || item.prop == 'jS_ES' || item.prop == 'sgr' || item.prop == 'tbr'">
  325. <el-popover placement="top-start" title="酒店报批费用:" width="200" trigger="hover">
  326. <div>
  327. <span style="color:red;">*具体价格以当前货币汇率为准!</span><br />
  328. <div v-if="ShowHotel.length == 0">
  329. <br />
  330. <span style="color:red">暂无数据!</span>
  331. </div>
  332. <div v-else>
  333. <div v-for="( item, index ) in ShowHotel" :key="index">
  334. {{ item.countryOrCity }} &nbsp;&nbsp; <span style="color:green;">{{
  335. item.price }}</span>元/人<br>
  336. </div>
  337. </div>
  338. </div>
  339. <el-input size="mini" slot="reference"
  340. v-model="scope.row[item.prop]">
  341. </el-input>
  342. </el-popover>
  343. </div>
  344. <span v-else :title="scope.row[item.prop]">
  345. <el-input size="mini" v-model="scope.row[item.prop]">
  346. </el-input></span>
  347. </template>
  348. </el-table-column>
  349. </template>
  350. <el-table-column class="czbtn" label="操作">
  351. <!-- eslint-disable-next-line -->
  352. <template slot-scope="scope">
  353. <el-button class="czbtn" size="mini" @click="insertRow(scope.$index, scope.row, 'UP')" type="primary">
  354. 插入行↑
  355. </el-button>
  356. <br />
  357. <el-button class="czbtn" style="margin: 10px 0;" size="mini" @click="handleDelete(scope.$index, scope.row, tableData)" type="danger">
  358. 删除<i class="el-icon-delete"></i>
  359. </el-button>
  360. <br />
  361. <el-button class="czbtn" size="mini" @click="insertRow(scope.$index, scope.row, 'DOWN')" type="primary">插入行↓
  362. </el-button>
  363. </template>
  364. </el-table-column>
  365. </el-table>
  366. <div style="text-align: center;padding: 10px 0;"><el-button @click="addStrip" type="primary">添 加 <i
  367. class="el-icon-plus"></i></el-button></div>
  368. <div>
  369. <el-table :data="[{ a: 1 }]" border style="width: 100%;font-size:12px">
  370. <el-table-column
  371. v-for="item in columnTotalData" :key="item.label"
  372. :width="item.width != '100' ? columnWidth : item.width"
  373. :label="item.tips ? item.tips + getCurr : ''"
  374. v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
  375. {{ item.totalPrice }}
  376. </el-table-column>
  377. <el-table-column class="czbtn">
  378. </el-table-column>
  379. </el-table>
  380. </div>
  381. <div>
  382. <el-table :data="[{ a: 1 }]" border style="width: 100%;font-size:12px">
  383. <el-table-column
  384. v-for="item in columnTotalData" :key="item.label"
  385. :width="item.width != '100' ? columnWidth : item.width"
  386. :label="item.singleTips ? item.singleTips + getCurr : ''"
  387. v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
  388. {{ item.singlePrice }}
  389. <!-- <template slot="header">
  390. <div>{{item.singleTips ? item.singleTips:''}}</div>
  391. <div v-bind="getCurr">{{getCurr().toString}}</div>
  392. </template> -->
  393. </el-table-column>
  394. <el-table-column class="czbtn">
  395. </el-table-column>
  396. </el-table>
  397. </div>
  398. <div class="sheet-box">
  399. <div class="sheet-li">
  400. <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
  401. <el-checkbox-group v-model="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues">
  402. <el-checkbox v-for="( item, index ) in sheetoneOptions " :key="index"
  403. :label="item"></el-checkbox>
  404. </el-checkbox-group>
  405. <div style="display: flex;font-size: 12px">
  406. <div :style="{ 'width': costTypevalue == 'A' ? '100%' : '49%' }">
  407. <div class="biaoge" style="width: 200px;margin-bottom:0px;margin-top: 20px;"
  408. v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes('签证') && visaCountryInfoArr.length > 0">
  409. <el-table :data="visaCountryInfoArr" border style="width: 100%">
  410. <el-table-column prop="visaCountry" label="签证国家">
  411. </el-table-column>
  412. <el-table-column prop="visaPrice" label="签证费用">
  413. </el-table-column>
  414. </el-table>
  415. </div>
  416. <div v-for="(sheetitem, index) in sheetDatal" :key="index">
  417. <div class="biaoge" :class="{ 'biaogeKz': costTypevalue == 'B' }"
  418. v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes(sheetitem.label)">
  419. <el-table :data="[{ a: 1 }]" border style="width: 100%">
  420. <el-table-column
  421. v-for="( itemsheetone, index ) in sheetitem.childList "
  422. :key="index" :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
  423. <!-- eslint-disable-next-line -->
  424. <template slot-scope="scope">
  425. <div v-if="itemsheetone.prop.indexOf(sheetitem.EnLabel) != -1">
  426. <div v-if="itemsheetone.isBind">
  427. <span>{{ AGroupCostParameter[itemsheetone.prop] }}</span>
  428. </div>
  429. <div v-else>
  430. <!-- <el-input v-model="AGroupCostParameter[itemsheetone.prop]"
  431. show-word-limit /> -->
  432. <!-- <el-input-number
  433. v-model="AGroupCostParameter[itemsheetone.prop]"
  434. @change="handleChange" :min="0" size="small"
  435. :controls="false"></el-input-number> -->
  436. <div v-if="itemsheetone.tips">
  437. <el-popover placement="top-start"
  438. :title="itemsheetone.title" width="200" trigger="hover">
  439. <!-- :content="itemsheetone.tips" -->
  440. <div v-if="itemsheetone.tips != '暂无!'">
  441. <span style="color:green">{{ itemsheetone.tips
  442. }}</span>
  443. 元/人
  444. </div>
  445. <div v-else>
  446. <span style="color:red">{{ itemsheetone.tips
  447. }}</span>
  448. </div>
  449. <el-input-number slot="reference"
  450. v-model="AGroupCostParameter[itemsheetone.prop]"
  451. @change="handleChange" :min="0" size="small"
  452. :controls="false"></el-input-number>
  453. </el-popover>
  454. </div>
  455. <div
  456. v-else-if="(typeof itemsheetone.title).toString() != 'undefined'">
  457. <el-popover placement="top-start"
  458. :title="itemsheetone.title" width="200" trigger="hover">
  459. <span style="color:red">暂无数据!</span>
  460. <el-input-number slot="reference"
  461. v-model="AGroupCostParameter[itemsheetone.prop]"
  462. @change="handleChange" :min="0" size="small"
  463. :controls="false"></el-input-number>
  464. </el-popover>
  465. </div>
  466. <div v-else>
  467. <el-input-number
  468. v-model="AGroupCostParameter[itemsheetone.prop]"
  469. @change="handleChange" :min="0" size="small"
  470. :controls="false"></el-input-number>
  471. </div>
  472. </div>
  473. </div>
  474. <div v-else-if="itemsheetone.prop === 'ZCB'">
  475. {{ calculateZCB(sheetitem.EnLabel) }}
  476. </div>
  477. <div v-else-if="itemsheetone.prop === 'DRBJ'">
  478. {{ calculateDRBJ(sheetitem.EnLabel) }}
  479. </div>
  480. <div v-else-if="itemsheetone.prop === 'ZBJ'">
  481. {{ calculateZBJ(sheetitem.EnLabel) }}
  482. </div>
  483. <div v-else-if="itemsheetone.prop === 'DRLR'">
  484. {{ calculateDRLR(sheetitem.EnLabel) }}
  485. </div>
  486. <div v-else-if="itemsheetone.prop === 'ZLR'">
  487. {{ calculateZLR(sheetitem.EnLabel) }}
  488. </div>
  489. <!-- 绑定对象属性的值 -->
  490. </template>
  491. </el-table-column>
  492. </el-table>
  493. </div>
  494. </div>
  495. </div>
  496. <div style="width: 2%;" v-show="costTypevalue != 'A'"></div>
  497. <div style="width: 49%;" v-show="costTypevalue != 'A'">
  498. <div class="biaoge"
  499. style="width: 200px;margin-bottom:0px;margin-top: 20px;visibility: hidden;"
  500. v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes('签证') && visaCountryInfoArr.length > 0">
  501. <el-table :data="visaCountryInfoArr" border style="width: 100%">
  502. <el-table-column prop="visaCountry" label="签证国家">
  503. </el-table-column>
  504. <el-table-column prop="visaPrice" label="签证费用">
  505. </el-table-column>
  506. </el-table>
  507. </div>
  508. <div v-for="( sheetitem, index ) in sheetDatal " :key="index">
  509. <div class="biaogeB"
  510. v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes(sheetitem.label)">
  511. <el-table :data="[{ a: 1 }]" border style="width: 100%"
  512. :class="{ 'hiddenElement': (sheetitem.EnLabel == 'visa' || sheetitem.EnLabel == 'bx') ? true : false }">
  513. <el-table-column v-for="(itemsheetone, index) in sheetitem.childList"
  514. :key="index" :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
  515. <!-- eslint-disable-next-line -->
  516. <template slot-scope="scope">
  517. <div v-if="itemsheetone.prop.indexOf(sheetitem.EnLabel) != -1">
  518. <div v-if="itemsheetone.isBind">
  519. <span>{{ BGroupCostParameter[itemsheetone.prop] }}</span>
  520. </div>
  521. <div v-else>
  522. <!-- <el-input v-model="BGroupCostParameter[itemsheetone.prop]"
  523. show-word-limit /> -->
  524. <el-input-number
  525. v-model="BGroupCostParameter[itemsheetone.prop]"
  526. @change="handleChange" :min="0" size="small"
  527. :controls="false"></el-input-number>
  528. </div>
  529. </div>
  530. <div v-else-if="itemsheetone.prop === 'ZCB'">
  531. {{ BcalculateZCB(sheetitem.EnLabel) }}
  532. </div>
  533. <div v-else-if="itemsheetone.prop === 'DRBJ'">
  534. {{ BcalculateDRBJ(sheetitem.EnLabel) }}
  535. </div>
  536. <div v-else-if="itemsheetone.prop === 'ZBJ'">
  537. {{ BcalculateZBJ(sheetitem.EnLabel) }}
  538. </div>
  539. <div v-else-if="itemsheetone.prop === 'DRLR'">
  540. {{ BcalculateDRLR(sheetitem.EnLabel) }}
  541. </div>
  542. <div v-else-if="itemsheetone.prop === 'ZLR'">
  543. {{ BcalculateZLR(sheetitem.EnLabel) }}
  544. </div>
  545. <!-- 绑定对象属性的值 -->
  546. </template>
  547. </el-table-column>
  548. </el-table>
  549. </div>
  550. </div>
  551. </div>
  552. </div>
  553. </div>
  554. </div>
  555. <div class="cabin-box">
  556. <div class="cabin-li">
  557. <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
  558. <el-checkbox-group v-model="CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues">
  559. <el-checkbox v-for="( item, index ) in cabinoneOptions " :key="index"
  560. :label="item"></el-checkbox>
  561. </el-checkbox-group>
  562. <div style="display: flex;">
  563. <div :style="{ 'width': costTypevalue == 'A' ? '100%' : '49%' }">
  564. <div v-for="( cabinitem, index ) in cabinDatal " :key="index">
  565. <div class="biaoge"
  566. v-if="CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues.includes(cabinitem.label)">
  567. <div style=" color: rgb(96, 98, 102);font-size: 15px;font-weight: 600;">{{
  568. cabinitem.label }}
  569. </div>
  570. <el-table :data="cabinitem.sheetInfo" border style="width: 100%">
  571. <el-table-column
  572. v-for="( itemcabinone, index ) in cabinitem.childList "
  573. :key="index" :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
  574. <template slot-scope="scope">
  575. <div v-if="itemcabinone.prop === 'toll'">
  576. <el-input size="small" :ref="'el-input-' + index"
  577. v-model="scope.row[itemcabinone.prop]" show-word-limit
  578. disabled />
  579. </div>
  580. <span
  581. v-else-if="itemcabinone.prop === 'costPerson' || itemcabinone.prop === 'singleQuote'"
  582. :title="scope.row[itemcabinone.prop]">
  583. <span v-if="itemcabinone.prop === 'singleQuote'">
  584. <span v-if="itemcabinone.tips">
  585. <el-popover placement="top-start"
  586. :title="itemcabinone.title" width="200" trigger="hover">
  587. <span v-if="itemcabinone.tips != '暂无!'"
  588. style="color:green">{{ itemcabinone.tips
  589. }}元/人</span>
  590. <span v-else style="color: red">暂无!</span>
  591. <span slot="reference">{{ scope.row[itemcabinone.prop]
  592. }}</span>
  593. </el-popover>
  594. </span>
  595. <span v-else>
  596. <el-popover placement="top-start"
  597. :title="itemcabinone.title" width="200" trigger="hover">
  598. <span style="color: red">暂无!</span>
  599. <span slot="reference">{{ scope.row[itemcabinone.prop]
  600. }}</span>
  601. </el-popover>
  602. </span>
  603. </span>
  604. <span v-else>{{ scope.row[itemcabinone.prop] }}</span>
  605. </span>
  606. <span v-else-if="itemcabinone.prop === 'totalCost'"
  607. :title="scope.row[itemcabinone.prop]">{{
  608. (scope.row['toll'] * scope.row['costPerson']).toFixed(2)
  609. }}</span>
  610. <span v-else-if="itemcabinone.prop === 'totalQuote'"
  611. :title="scope.row[itemcabinone.prop]">{{
  612. (scope.row['toll'] * scope.row['singleQuote']).toFixed(2)
  613. }}</span>
  614. <span v-else-if="itemcabinone.prop === 'singleProfit'"
  615. :title="scope.row[itemcabinone.prop]">{{
  616. ((scope.row['singleQuote'] - scope.row['costPerson'])).toFixed(2)
  617. }}</span>
  618. <span v-else-if="itemcabinone.prop === 'totalProfit'"
  619. :title="scope.row[itemcabinone.prop]">{{
  620. ((scope.row['singleQuote'] - scope.row['costPerson']) *
  621. scope.row['toll']).toFixed(2)
  622. }}</span>
  623. <span v-else :title="scope.row[itemcabinone.prop]">{{
  624. scope.row[itemcabinone.prop]
  625. }}</span>
  626. </template>
  627. </el-table-column>
  628. </el-table>
  629. </div>
  630. </div>
  631. </div>
  632. <div style="width: 2%;" v-show="costTypevalue != 'A'"></div>
  633. <div style="width: 49%;" v-show="costTypevalue != 'A'">
  634. <div v-for="( cabinitem, index ) in BcabinDatal " :key="index">
  635. <div class="biaogeB"
  636. v-if="CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues.includes(cabinitem.label)">
  637. <div style="color: rgb(96, 98, 102);font-size: 15px;font-weight: 600;">{{
  638. cabinitem.label }}
  639. </div>
  640. <el-table :data="cabinitem.sheetInfo" border style="width: 100%">
  641. <el-table-column
  642. v-for="( itemcabinone, index ) in cabinitem.childList "
  643. :key="index" :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
  644. <template slot-scope="scope">
  645. <div v-if="itemcabinone.prop === 'toll'">
  646. <el-input size="small" :ref="'el-input-' + index"
  647. v-model="scope.row[itemcabinone.prop]" show-word-limit
  648. disabled />
  649. </div>
  650. <span
  651. v-else-if="itemcabinone.prop === 'costPerson' || itemcabinone.prop === 'singleQuote'"
  652. :title="scope.row[itemcabinone.prop]">{{
  653. scope.row[itemcabinone.prop]
  654. }}</span>
  655. <span v-else-if="itemcabinone.prop === 'totalCost'"
  656. :title="scope.row[itemcabinone.prop]">{{
  657. (scope.row['toll'] * scope.row['costPerson']).toFixed(2)
  658. }}</span>
  659. <span v-else-if="itemcabinone.prop === 'totalQuote'"
  660. :title="scope.row[itemcabinone.prop]">{{
  661. (scope.row['toll'] * scope.row['singleQuote']).toFixed(2)
  662. }}</span>
  663. <span v-else-if="itemcabinone.prop === 'singleProfit'"
  664. :title="scope.row[itemcabinone.prop]">{{
  665. (scope.row['singleQuote'] - scope.row['costPerson']).toFixed(2)
  666. }}</span>
  667. <span v-else-if="itemcabinone.prop === 'totalProfit'"
  668. :title="scope.row[itemcabinone.prop]">{{
  669. ((scope.row['singleQuote'] - scope.row['costPerson']) *
  670. scope.row['toll']).toFixed(2)
  671. }}</span>
  672. <span v-else :title="scope.row[itemcabinone.prop]">{{
  673. scope.row[itemcabinone.prop]
  674. }}</span>
  675. </template>
  676. </el-table-column>
  677. </el-table>
  678. </div>
  679. </div>
  680. </div>
  681. </div>
  682. </div>
  683. </div>
  684. </div>
  685. <el-dialog :title="DialogTitle" :visible.sync="outerVisible" :width="'60%'" :close-on-click-modal="false">
  686. <div>
  687. <div style="display: flex;">
  688. <div style="width: 30%;">
  689. <el-input v-model="dialogSearchInput" placeholder="请输入城市名称"></el-input>
  690. </div>
  691. <div style="width: 2%;"></div>
  692. <!-- <div><el-button type="primary" @click="dialogSearchMethon">搜索</el-button></div> -->
  693. </div>
  694. <br />
  695. <el-table ref="singleTable" border @current-change="SelChange"
  696. :data="filterdialogSearchInput.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
  697. highlight-current-row style="width: 100%">
  698. <el-table-column v-for=" item, index in SeldialogColumn " :key="index"
  699. :prop="item.prop" :label="item.title">
  700. <template slot-scope="scope">
  701. <div>
  702. {{ scope.row[item.prop] }}
  703. </div>
  704. </template>
  705. </el-table-column>
  706. </el-table>
  707. <div class="block">
  708. <el-pagination align='center' @current-change="handleCurrentChange" :current-page="currentPage"
  709. :page-sizes="[5, 10]" :page-size="pageSize" layout="total, sizes, prev, pager, next"
  710. @size-change="handleSizeChange" :total="filterdialogSearchInput.length">
  711. </el-pagination>
  712. </div>
  713. </div>
  714. <!-- <el-dialog width="30%" title="内层 Dialog" :visible.sync="innerVisible" append-to-body>
  715. </el-dialog> -->
  716. <!-- <div slot="footer" class="dialog-footer">
  717. <el-button @click="outerVisible = false">取 消</el-button>
  718. <el-button type="primary" @click="innerVisible = true">打开内层 Dialog</el-button>
  719. </div> -->
  720. <div slot="footer" class="dialog-footer">
  721. <el-button @click="outerVisible = false; dialogSelectObject={}">取 消</el-button>
  722. <el-button type="primary" @click="confirm">确定</el-button>
  723. </div>
  724. </el-dialog>
  725. </div>
  726. </template>
  727. <script>
  728. import { co } from '@fullcalendar/core/internal-common';
  729. export default {
  730. data() {
  731. return {
  732. costloading: true,
  733. outerVisible: false,
  734. innerVisible: false,
  735. //checkList: ['DAY', 'ITIN', 'VA', 'VF', 'VRD', 'T/G S', 'DATE'], //列表默认选中
  736. checkOptions: [
  737. { label: 'DAY', tips: '时间(DATE)' },
  738. { label: 'DATE', tips: '行程描述(ITINERARY)' },
  739. { label: 'ITIN', tips: '行程描述(ITINERARY)' },
  740. { label: 'VA', tips: '车服务区域(Vehicle Area)' },
  741. { label: 'VT', tips: '车型(VEHICLE TYPE)' },
  742. { label: 'VF', tips: '车费用(VEHICLE FEES)' },
  743. { label: 'VN', tips: '车数量(VEHICLE Number)' },
  744. { label: 'VRD', tips: '用车时间(VEHICLE RENTAL DURATION)' },
  745. { label: 'T/G S', tips: '导游工资(TOUR GUIDE SALARY)' },
  746. { label: 'T/G N', tips: '导游数量(TOUR GUIDE Number)' },
  747. { label: 'T/G WH', tips: '导游工作时间(导游工作时间)' },
  748. { label: 'T/G OF', tips: '导游超时费用(TOUR GUIDE OVERTIME FEES)' },
  749. { label: 'T/G M', tips: '导游餐补(TOUR GUIDE MEALS)' },
  750. { label: 'T/G A', tips: '导游房补(TOUR GUIDE ACCOMMODATION)' },
  751. { label: 'T/G TF', tips: '导游交通费(TOUR GUIDE TRANSPORATION FEES)' },
  752. { label: 'T/G EF', tips: '导游景点费(TOUR GUIDE ENTRANCE FEES)' },
  753. { label: 'C/F M', tips: '司机餐补(CHAUFFEUR MEALS)' },
  754. { label: 'C/F OF', tips: '司机超时费用(CHAUFFEUR OVERTIME FEES)' },
  755. { label: 'B', tips: '早餐(BREAKFAST) #个人成本' },
  756. { label: 'L', tips: '午餐(LUNCH) #个人成本' },
  757. { label: 'D', tips: '晚餐(DINNER) #个人成本' },
  758. { label: 'TBR', tips: '双人间(TWIN BED ROOM) #个人成本' },
  759. { label: 'SGR', tips: '单间(SINGLE ROOM) #个人成本' },
  760. { label: 'JS/ES', tips: '小套房/豪华套房(JUNIOR SUITE/EXECUTIVE SUITE) #个人成本' },
  761. { label: 'SUITE', tips: '套房(SUITE) #个人成本' },
  762. { label: 'ACCO N', tips: '住宿地名称(ACCOMMODATION NAME)' },
  763. { label: 'T/V', tips: '公务活动费用(T/V)' },
  764. { label: '1/L', tips: '公务活动费用(1/L)' },
  765. { label: 'I/F', tips: '公务翻译费用(INTERPRETER FEES)' },
  766. { label: 'EF', tips: '景点门票(ENTRANCE FEE) #个人成本' },
  767. { label: 'B/R/F', tips: '饮料零食水果(BEVERAGE/RRESHMENT/FRUIT)' },
  768. { label: 'TE', tips: '出行物资(TRAVELLLING ESSENTIALS) #个人成本' },
  769. { label: 'T/G T', tips: '导游小费(T/G TIPS) #个人成本' },
  770. { label: 'DRV T', tips: '司机小费(DRIVER TIPS #个人成本)' },
  771. { label: 'P/C', tips: '零用金(PETTY CASH) #个人成本' },
  772. { label: 'T/L F', tips: '领队费(TOUR LEADER FEES)' },
  773. { label: 'E/C T', tips: '会务费(EXPO/CONFERENCE TICKET)' }
  774. ],
  775. tableLabel: [
  776. { label: 'DAY', width: '50', prop: 'day', describe: '天数(DAY)' },
  777. { label: 'DATE', width: '100', prop: 'date', describe: '时间(DATE)' },
  778. { label: 'ITIN', width: '100', prop: 'itin', describe: '行程描述(ITINERARY)' },
  779. { label: 'VA', width: '100', prop: 'sale', describe: '车服务区域(Vehicle Area)' }, // ??????????????
  780. { label: 'VT', width: '100', prop: 'carType', describe: '车型(VEHICLE TYPE)' },
  781. { label: 'VF', width: '60', prop: 'carCost', describe: '车费用(VEHICLE FEES)' },
  782. { label: 'VN', width: '60', prop: 'carNumber', describe: '车数量(VEHICLE Number)' },
  783. { label: 'VRD', width: '60', prop: 'carTiming', describe: '用车时间(VEHICLE RENTAL DURATION)' },
  784. { label: 'T/G S', width: '60', prop: 'tgs', describe: '导游工资(TOUR GUIDE SALARY)' },
  785. { label: 'T/G N', width: '60', prop: 'tgn', describe: '导游数量(TOUR GUIDE Number' },
  786. { label: 'T/G WH', width: '60', prop: 'tgwh', describe: '导游工作时间(导游工作时间)' },
  787. { label: 'T/G OF', width: '60', prop: 'tgof', describe: '导游超时费用(TOUR GUIDE OVERTIME FEES)' },
  788. { label: 'T/G M', width: '60', prop: 'tgm', describe: '导游餐补(TOUR GUIDE MEALS)' },
  789. { label: 'T/G A', width: '60', prop: 'tga', describe: '导游房补(TOUR GUIDE ACCOMMODATION)' },
  790. { label: 'T/G TF', width: '60', prop: 'tgtf', describe: '导游交通费(TOUR GUIDE TRANSPORATION FEES)' },
  791. { label: 'T/G EF', width: '60', prop: 'tgef', describe: '导游景点费(TOUR GUIDE ENTRANCE FEES)' },
  792. { label: 'C/F M', width: '60', prop: 'cfm', describe: '司机餐补(CHAUFFEUR MEALS)' },
  793. { label: 'C/F OF', width: '60', prop: 'cfof', describe: '司机超时费用(CHAUFFEUR OVERTIME FEES)' },
  794. { label: 'B', width: '60', prop: 'b', describe: '早餐(BREAKFAST) #个人成本' },
  795. { label: 'L', width: '60', prop: 'l', describe: '午餐(LUNCH) #个人成本' },
  796. { label: 'D', width: '60', prop: 'd', describe: '晚餐(DINNER) #个人成本' },
  797. { label: 'TBR', width: '60', prop: 'tbr', describe: '双人间(TWIN BED ROOM) #个人成本' },
  798. { label: 'SGR', width: '60', prop: 'sgr', describe: '单间(SINGLE ROOM) #个人成本' },
  799. { label: 'JS/ES', width: '60', prop: 'jS_ES', describe: '小套房/豪华套房(JUNIOR SUITE/EXECUTIVE SUITE) #个人成本' },
  800. { label: 'SUITE', width: '60', prop: 'suite', describe: '套房(SUITE) #个人成本' },
  801. { label: 'ACCO N', width: '100', prop: 'accon', describe: '住宿地名称(ACCOMMODATION NAME)' },
  802. { label: 'T/V', width: '60', prop: 'tv', describe: '公务活动费用(T/V)' },
  803. { label: '1/L', width: '60', prop: 'iL', describe: '邀请函相关费用(1/L)' },
  804. { label: 'I/F', width: '60', prop: 'if', describe: '公务翻译费用(INTERPRETER FEES)' },
  805. { label: 'EF', width: '60', prop: 'ef', describe: '景点门票(ENTRANCE FEE) #个人成本' },
  806. { label: 'B/R/F', width: '60', prop: 'b_R_F', describe: '饮料零食水果(BEVERAGE/RRESHMENT/FRUIT)' },
  807. { label: 'TE', width: '60', prop: 'te', describe: '出行物资(TRAVELLLING ESSENTIALS) #个人成本' },
  808. { label: 'T/G T', width: '60', prop: 'tgTips', describe: '导游小费(T/G TIPS) #个人成本' },
  809. { label: 'DRV T', width: '60', prop: 'drvTips', describe: '司机小费(DRIVER TIPS #个人成本)' },
  810. { label: 'P/C', width: '60', prop: 'pc', describe: '零用金(PETTY CASH) #个人成本' },
  811. { label: 'T/L F', width: '60', prop: 'tlf', describe: '领队费(TOUR LEADER FEES)' },
  812. { label: 'E/C T', width: '60', prop: 'ect', describe: '会务费(EXPO/CONFERENCE TICKET)' }
  813. ],
  814. statisticsArr: [
  815. { label: 'DAY', total: '', individual: '' },
  816. { label: 'DATE', total: '', individual: '' },
  817. { label: 'ITIN', total: '', individual: '' },
  818. { label: 'VA', total: '', individual: '' },
  819. { label: 'VT', total: '', individual: '' },
  820. { label: 'VF', total: '车费', individual: '车费人均' },
  821. { label: 'VN', total: '', individual: '' },
  822. { label: 'VRD', total: '', individual: '' },
  823. { label: 'T/G S', total: '导游工资', individual: '导游工资人均' },
  824. { label: 'T/G N', total: '', individual: '' },
  825. { label: 'T/G WH', total: '', individual: '' },
  826. { label: 'T/G OF', total: '', individual: '' },
  827. { label: 'T/G M', total: '', individual: '' },
  828. { label: 'T/G A', total: '', individual: '' },
  829. { label: 'T/G TF', total: '', individual: '' }
  830. ],
  831. tableData: [], //列表数据
  832. options: [],
  833. diid: '',
  834. currencyOption: [],
  835. currencyValueL: 'CNY',
  836. formInline: {
  837. user: '',
  838. region: ''
  839. },
  840. //sheetoneList: ['签证', '机票', '核酸检测',],
  841. sheetoneOptions: ['签证', '保险', '机票', '火车票', '船票', '核酸检测', '酒店TBR', '酒店SGR', '酒店JSES', '酒店SUITE', '地接', '公务', '零用金'],
  842. sheetDatal: [
  843. {
  844. label: '签证',
  845. EnLabel: 'visa',
  846. childList: [
  847. {
  848. childLabel: '签证单人成本(CNY)',
  849. prop: 'visaCB',
  850. tips: '这是一个tips',
  851. title: '签证报批费用:'
  852. },
  853. {
  854. childLabel: '人数',
  855. prop: 'visaRS'
  856. },
  857. {
  858. childLabel: '签证系数',
  859. prop: 'visaXS'
  860. },
  861. {
  862. childLabel: '签证总成本(CNY)',
  863. prop: 'ZCB'
  864. },
  865. {
  866. childLabel: '签证单人报价(CNY)',
  867. prop: 'DRBJ' // 系数 * 单价
  868. },
  869. {
  870. childLabel: '签证总报价(CNY)',
  871. prop: 'ZBJ' // 系数 * 单价 * 人数
  872. },
  873. {
  874. childLabel: '签证单人利润(CNY)',
  875. prop: 'DRLR' //系数 * 单价 - 单价
  876. },
  877. {
  878. childLabel: '签证总利润(CNY)',
  879. prop: 'ZLR' //(系数 * 单价 - 单价) * 人数
  880. },
  881. ],
  882. },
  883. {
  884. label: '保险',
  885. EnLabel: 'bx',
  886. childList: [
  887. {
  888. childLabel: '保险单人成本(CNY)',
  889. prop: 'bxcb',
  890. title: '保险报批费用:',
  891. tips: '这是一个tips',
  892. },
  893. {
  894. childLabel: '人数',
  895. prop: 'bxrs'
  896. },
  897. {
  898. childLabel: '保险系数',
  899. prop: 'bxxs'
  900. },
  901. {
  902. childLabel: '保险总成本(CNY)',
  903. prop: 'ZCB'
  904. },
  905. {
  906. childLabel: '保险单人报价(CNY)',
  907. prop: 'DRBJ'
  908. },
  909. {
  910. childLabel: '保险总报价(CNY)',
  911. prop: 'ZBJ'
  912. },
  913. {
  914. childLabel: '保险单人利润(CNY)',
  915. prop: 'DRLR'
  916. },
  917. {
  918. childLabel: '保险总利润(CNY)',
  919. prop: 'ZLR'
  920. },
  921. ],
  922. },
  923. {
  924. label: '火车票',
  925. EnLabel: 'hcp',
  926. childList: [
  927. {
  928. childLabel: '火车票单人成本(CNY)',
  929. prop: 'hcpcb'
  930. },
  931. {
  932. childLabel: '人数',
  933. prop: 'hcprs'
  934. },
  935. {
  936. childLabel: '火车票系数',
  937. prop: 'hcpxs'
  938. },
  939. {
  940. childLabel: '火车票总成本(CNY)',
  941. prop: 'ZCB'
  942. },
  943. {
  944. childLabel: '火车票单人报价(CNY)',
  945. prop: 'DRBJ'
  946. },
  947. {
  948. childLabel: '火车票总报价(CNY)',
  949. prop: 'ZBJ'
  950. },
  951. {
  952. childLabel: '火车票单人利润(CNY)',
  953. prop: 'DRLR'
  954. },
  955. {
  956. childLabel: '火车票总利润(CNY)',
  957. prop: 'ZLR'
  958. },
  959. ],
  960. },
  961. {
  962. label: '机票',
  963. EnLabel: 'jjc',
  964. childList: [
  965. {
  966. childLabel: '经济舱单人成本(CNY)',
  967. prop: 'jjccb',
  968. title: '经济舱报批费用:',
  969. tips: '这是一个tips',
  970. },
  971. {
  972. childLabel: '人数',
  973. prop: 'jjcrs'
  974. },
  975. {
  976. childLabel: '经济舱系数',
  977. prop: 'jjcxs'
  978. },
  979. {
  980. childLabel: '经济舱总成本(CNY)',
  981. prop: 'ZCB'
  982. },
  983. {
  984. childLabel: '经济舱单人报价(CNY)',
  985. prop: 'DRBJ'
  986. },
  987. {
  988. childLabel: '经济舱总报价(CNY)',
  989. prop: 'ZBJ'
  990. },
  991. {
  992. childLabel: '经济舱单人利润(CNY)',
  993. prop: 'DRLR'
  994. },
  995. {
  996. childLabel: '经济舱总利润(CNY)',
  997. prop: 'ZLR'
  998. },
  999. ],
  1000. },
  1001. {
  1002. label: '机票',
  1003. EnLabel: 'gwc',
  1004. childList: [
  1005. {
  1006. childLabel: '公务舱单人成本(CNY)',
  1007. prop: 'gwccb',
  1008. title: '公务舱报批费用:',
  1009. tips: '这是一个tips',
  1010. },
  1011. {
  1012. childLabel: '人数',
  1013. prop: 'gwcrs'
  1014. },
  1015. {
  1016. childLabel: '公务舱系数',
  1017. prop: 'gwcxs'
  1018. },
  1019. {
  1020. childLabel: '公务舱总成本(CNY)',
  1021. prop: 'ZCB'
  1022. },
  1023. {
  1024. childLabel: '公务舱单人报价(CNY)',
  1025. prop: 'DRBJ'
  1026. },
  1027. {
  1028. childLabel: '公务舱总报价(CNY)',
  1029. prop: 'ZBJ'
  1030. },
  1031. {
  1032. childLabel: '公务舱单人利润(CNY)',
  1033. prop: 'DRLR'
  1034. },
  1035. {
  1036. childLabel: '公务舱总利润(CNY)',
  1037. prop: 'ZLR'
  1038. },
  1039. ],
  1040. },
  1041. {
  1042. label: '船票',
  1043. EnLabel: 'cp',
  1044. childList: [
  1045. {
  1046. childLabel: '船票单人成本(CNY)',
  1047. prop: 'cpcb'
  1048. },
  1049. {
  1050. childLabel: '人数',
  1051. prop: 'cprs'
  1052. },
  1053. {
  1054. childLabel: '船票系数',
  1055. prop: 'cpxs'
  1056. },
  1057. {
  1058. childLabel: '船票总成本(CNY)',
  1059. prop: 'ZCB'
  1060. },
  1061. {
  1062. childLabel: '船票单人报价(CNY)',
  1063. prop: 'DRBJ'
  1064. },
  1065. {
  1066. childLabel: '船票总报价(CNY)',
  1067. prop: 'ZBJ'
  1068. },
  1069. {
  1070. childLabel: '船票单人利润(CNY)',
  1071. prop: 'DRLR'
  1072. },
  1073. {
  1074. childLabel: '船票总利润(CNY)',
  1075. prop: 'ZLR'
  1076. },
  1077. ],
  1078. },
  1079. {
  1080. label: '核酸检测',
  1081. EnLabel: 'hs',
  1082. childList: [
  1083. {
  1084. childLabel: '核酸检测单人成本(CNY)',
  1085. prop: 'hscb',
  1086. title: '核酸检测报批费用:',
  1087. tips: '这是一个tips',
  1088. },
  1089. {
  1090. childLabel: '人数',
  1091. prop: 'hsrs'
  1092. },
  1093. {
  1094. childLabel: '核酸检测系数',
  1095. prop: 'hsxs'
  1096. },
  1097. {
  1098. childLabel: '核酸检测总成本(CNY)',
  1099. prop: 'ZCB'
  1100. },
  1101. {
  1102. childLabel: '核酸检测单人报价(CNY)',
  1103. prop: 'DRBJ'
  1104. },
  1105. {
  1106. childLabel: '核酸检测总报价(CNY)',
  1107. prop: 'ZBJ'
  1108. },
  1109. {
  1110. childLabel: '核酸检测单人利润(CNY)',
  1111. prop: 'DRLR'
  1112. },
  1113. {
  1114. childLabel: '核酸检测总利润(CNY)',
  1115. prop: 'ZLR'
  1116. },
  1117. ],
  1118. },
  1119. //---
  1120. {
  1121. label: '酒店TBR',
  1122. EnLabel: 'tbr',
  1123. childList: [
  1124. {
  1125. childLabel: '酒店TBR单间成本(CNY)',
  1126. prop: 'tbrcb',
  1127. isBind: true
  1128. },
  1129. {
  1130. childLabel: '间数',
  1131. prop: 'tbrNumber'
  1132. },
  1133. {
  1134. childLabel: '酒店TBR系数',
  1135. prop: 'tbrxs'
  1136. },
  1137. {
  1138. childLabel: '酒店TBR总成本(CNY)',
  1139. prop: 'ZCB'
  1140. },
  1141. {
  1142. childLabel: '酒店TBR单间报价(CNY)',
  1143. prop: 'DRBJ'
  1144. },
  1145. {
  1146. childLabel: '酒店TBR总报价(CNY)',
  1147. prop: 'ZBJ'
  1148. },
  1149. {
  1150. childLabel: '酒店TBR单间利润(CNY)',
  1151. prop: 'DRLR'
  1152. },
  1153. {
  1154. childLabel: '酒店TBR总利润(CNY)',
  1155. prop: 'ZLR'
  1156. },
  1157. ],
  1158. },
  1159. {
  1160. label: '酒店SGR',
  1161. EnLabel: 'sgr',
  1162. childList: [
  1163. {
  1164. childLabel: '酒店SGR单间成本(CNY)',
  1165. prop: 'sgrcb',
  1166. isBind: true
  1167. },
  1168. {
  1169. childLabel: '间数',
  1170. prop: 'sgrNumber'
  1171. },
  1172. {
  1173. childLabel: '酒店SGR系数',
  1174. prop: 'sgrxs'
  1175. },
  1176. {
  1177. childLabel: '酒店SGR总成本(CNY)',
  1178. prop: 'ZCB'
  1179. },
  1180. {
  1181. childLabel: '酒店SGR单间报价(CNY)',
  1182. prop: 'DRBJ'
  1183. },
  1184. {
  1185. childLabel: '酒店SGR总报价(CNY)',
  1186. prop: 'ZBJ'
  1187. },
  1188. {
  1189. childLabel: '酒店SGR单间利润(CNY)',
  1190. prop: 'DRLR'
  1191. },
  1192. {
  1193. childLabel: '酒店SGR总利润(CNY)',
  1194. prop: 'ZLR'
  1195. },
  1196. ],
  1197. },
  1198. {
  1199. label: '酒店JSES',
  1200. EnLabel: 'jses',
  1201. childList: [
  1202. {
  1203. childLabel: '酒店JSES单间成本(CNY)',
  1204. prop: 'jsescb',
  1205. isBind: true
  1206. },
  1207. {
  1208. childLabel: '间数',
  1209. prop: 'jsesNumber'
  1210. },
  1211. {
  1212. childLabel: '酒店JSES系数',
  1213. prop: 'jsesxs'
  1214. },
  1215. {
  1216. childLabel: '酒店JSES总成本(CNY)',
  1217. prop: 'ZCB'
  1218. },
  1219. {
  1220. childLabel: '酒店JSES单间报价(CNY)',
  1221. prop: 'DRBJ'
  1222. },
  1223. {
  1224. childLabel: '酒店JSES总报价(CNY)',
  1225. prop: 'ZBJ'
  1226. },
  1227. {
  1228. childLabel: '酒店JSES单间利润(CNY)',
  1229. prop: 'DRLR'
  1230. },
  1231. {
  1232. childLabel: '酒店JSES总利润(CNY)',
  1233. prop: 'ZLR'
  1234. },
  1235. ],
  1236. },
  1237. {
  1238. label: '酒店SUITE',
  1239. EnLabel: 'suite',
  1240. childList: [
  1241. {
  1242. childLabel: '酒店SUITE单间成本(CNY)',
  1243. prop: 'suitecb',
  1244. isBind: true
  1245. },
  1246. {
  1247. childLabel: '间数',
  1248. prop: 'suiteNumber'
  1249. },
  1250. {
  1251. childLabel: '酒店SUITE系数',
  1252. prop: 'suitexs'
  1253. },
  1254. {
  1255. childLabel: '酒店SUITE总成本(CNY)',
  1256. prop: 'ZCB'
  1257. },
  1258. {
  1259. childLabel: '酒店SUITE单间报价(CNY)',
  1260. prop: 'DRBJ'
  1261. },
  1262. {
  1263. childLabel: '酒店SUITE总报价(CNY)',
  1264. prop: 'ZBJ'
  1265. },
  1266. {
  1267. childLabel: '酒店SUITE单间利润(CNY)',
  1268. prop: 'DRLR'
  1269. },
  1270. {
  1271. childLabel: '酒店SUITE总利润(CNY)',
  1272. prop: 'ZLR'
  1273. },
  1274. ],
  1275. },
  1276. {
  1277. label: '地接',
  1278. EnLabel: 'dj',
  1279. childList: [
  1280. {
  1281. childLabel: '地接单人成本(CNY)',
  1282. prop: 'djcb',
  1283. isBind: true
  1284. },
  1285. {
  1286. childLabel: '人数', //实体类无地接人数
  1287. prop: 'djrs'
  1288. },
  1289. {
  1290. childLabel: '地接系数',
  1291. prop: 'djxs'
  1292. },
  1293. {
  1294. childLabel: '地接总成本(CNY)',
  1295. prop: 'ZCB'
  1296. },
  1297. {
  1298. childLabel: '地接单人报价(CNY)',
  1299. prop: 'DRBJ'
  1300. },
  1301. {
  1302. childLabel: '地接总报价(CNY)',
  1303. prop: 'ZBJ'
  1304. },
  1305. {
  1306. childLabel: '地接单人利润(CNY)',
  1307. prop: 'DRLR'
  1308. },
  1309. {
  1310. childLabel: '地接总利润(CNY)',
  1311. prop: 'ZLR'
  1312. },
  1313. ],
  1314. },
  1315. {
  1316. label: '公务',
  1317. EnLabel: 'gw',
  1318. childList: [
  1319. {
  1320. childLabel: '公务单人成本(CNY)',
  1321. prop: 'gwcb',
  1322. isBind: true
  1323. },
  1324. {
  1325. childLabel: '人数',
  1326. prop: 'gwrs'
  1327. },
  1328. {
  1329. childLabel: '公务系数',
  1330. prop: 'gwxs'
  1331. },
  1332. {
  1333. childLabel: '公务总成本(CNY)',
  1334. prop: 'ZCB'
  1335. },
  1336. {
  1337. childLabel: '公务单人报价(CNY)',
  1338. prop: 'DRBJ'
  1339. },
  1340. {
  1341. childLabel: '公务总报价(CNY)',
  1342. prop: 'ZBJ'
  1343. },
  1344. {
  1345. childLabel: '公务单人利润(CNY)',
  1346. prop: 'DRLR'
  1347. },
  1348. {
  1349. childLabel: '公务总利润(CNY)',
  1350. prop: 'ZLR'
  1351. },
  1352. ],
  1353. },
  1354. {
  1355. label: '零用金',
  1356. EnLabel: 'lyj',
  1357. childList: [
  1358. {
  1359. childLabel: '零用金单人成本(CNY)',
  1360. prop: 'lyjcb',
  1361. isBind: true
  1362. },
  1363. {
  1364. childLabel: '人数',
  1365. prop: 'lyjrs'
  1366. },
  1367. {
  1368. childLabel: '零用金系数',
  1369. prop: 'lyjxs'
  1370. },
  1371. {
  1372. childLabel: '零用金总成本(CNY)',
  1373. prop: 'ZCB'
  1374. },
  1375. {
  1376. childLabel: '零用金单人报价(CNY)',
  1377. prop: 'DRBJ'
  1378. },
  1379. {
  1380. childLabel: '零用金总报价(CNY)',
  1381. prop: 'ZBJ'
  1382. },
  1383. {
  1384. childLabel: '零用金单人利润(CNY)',
  1385. prop: 'DRLR'
  1386. },
  1387. {
  1388. childLabel: '零用金总利润(CNY)',
  1389. prop: 'ZLR'
  1390. },
  1391. ],
  1392. },
  1393. ],
  1394. //cabinoneList: ['经济舱 TBR', '经济舱 SGR', '核酸检测', '团组预算明细'],
  1395. cabinoneOptions: ['经济舱 TBR', '经济舱 SGR', '公务舱 SGR', '公务舱 JS/ES', '公务舱 SUITE', '经济舱 SUITE'],
  1396. cabinDatal: [
  1397. {
  1398. label: '经济舱 TBR',
  1399. childList: [
  1400. {
  1401. childLabel: '单人成本(CNY)',
  1402. prop: 'costPerson'
  1403. },
  1404. {
  1405. childLabel: '人数',
  1406. prop: 'toll'
  1407. },
  1408. {
  1409. childLabel: '总成本(CNY)',
  1410. prop: 'totalCost'
  1411. },
  1412. {
  1413. childLabel: '单人报价(CNY)',
  1414. prop: 'singleQuote',
  1415. title: '报批(单人经济舱总报价):',
  1416. tips: '这是一个tips',
  1417. },
  1418. {
  1419. childLabel: '总报价(CNY)',
  1420. prop: 'totalQuote'
  1421. },
  1422. {
  1423. childLabel: '单人利润(CNY)',
  1424. prop: 'singleProfit'
  1425. },
  1426. {
  1427. childLabel: '总利润(CNY)',
  1428. prop: 'totalProfit'
  1429. },
  1430. ],
  1431. sheetInfo: [
  1432. {
  1433. costPerson: 1,
  1434. toll: 11,
  1435. totalCost: 137597.76,
  1436. singleQuote: 102203.71,
  1437. totalQuote: 35394.05,
  1438. singleProfit: 35394.05,
  1439. totalProfit: 35394.05
  1440. },
  1441. ]
  1442. },
  1443. {
  1444. label: '经济舱 SGR',
  1445. childList: [
  1446. {
  1447. childLabel: '单人成本(CNY)',
  1448. prop: 'costPerson'
  1449. },
  1450. {
  1451. childLabel: '人数',
  1452. prop: 'toll'
  1453. },
  1454. {
  1455. childLabel: '总成本(CNY)',
  1456. prop: 'totalCost'
  1457. },
  1458. {
  1459. childLabel: '单人报价(CNY)',
  1460. prop: 'singleQuote',
  1461. title: '报批(单人经济舱总报价):',
  1462. tips: '这是一个tips',
  1463. },
  1464. {
  1465. childLabel: '总报价(CNY)',
  1466. prop: 'totalQuote'
  1467. },
  1468. {
  1469. childLabel: '单人利润(CNY)',
  1470. prop: 'singleProfit'
  1471. },
  1472. {
  1473. childLabel: '总利润(CNY)',
  1474. prop: 'totalProfit'
  1475. },
  1476. ],
  1477. sheetInfo: [
  1478. {
  1479. costPerson: 1,
  1480. toll: 11,
  1481. totalCost: 137597.76,
  1482. singleQuote: 102203.71,
  1483. totalQuote: 35394.05,
  1484. singleProfit: 35394.05,
  1485. totalProfit: 35394.05
  1486. },
  1487. ]
  1488. },
  1489. {
  1490. label: '公务舱 SGR',
  1491. childList: [
  1492. {
  1493. childLabel: '单人成本(CNY)',
  1494. prop: 'costPerson'
  1495. },
  1496. {
  1497. childLabel: '人数',
  1498. prop: 'toll'
  1499. },
  1500. {
  1501. childLabel: '总成本(CNY)',
  1502. prop: 'totalCost'
  1503. },
  1504. {
  1505. childLabel: '单人报价(CNY)',
  1506. prop: 'singleQuote',
  1507. title: '报批(单人公务舱总报价):',
  1508. tips: '这是一个tips',
  1509. },
  1510. {
  1511. childLabel: '总报价(CNY)',
  1512. prop: 'totalQuote'
  1513. },
  1514. {
  1515. childLabel: '单人利润(CNY)',
  1516. prop: 'singleProfit'
  1517. },
  1518. {
  1519. childLabel: '总利润(CNY)',
  1520. prop: 'totalProfit'
  1521. },
  1522. ],
  1523. sheetInfo: [
  1524. {
  1525. costPerson: 1,
  1526. toll: 11,
  1527. totalCost: 137597.76,
  1528. singleQuote: 102203.71,
  1529. totalQuote: 35394.05,
  1530. singleProfit: 35394.05,
  1531. totalProfit: 35394.05
  1532. },
  1533. ]
  1534. },
  1535. {
  1536. label: '公务舱 JS/ES',
  1537. childList: [
  1538. {
  1539. childLabel: '单人成本(CNY)',
  1540. prop: 'costPerson'
  1541. },
  1542. {
  1543. childLabel: '人数',
  1544. prop: 'toll'
  1545. },
  1546. {
  1547. childLabel: '总成本(CNY)',
  1548. prop: 'totalCost'
  1549. },
  1550. {
  1551. childLabel: '单人报价(CNY)',
  1552. prop: 'singleQuote',
  1553. title: '报批(单人公务舱总报价):',
  1554. tips: '这是一个tips',
  1555. },
  1556. {
  1557. childLabel: '总报价(CNY)',
  1558. prop: 'totalQuote'
  1559. },
  1560. {
  1561. childLabel: '单人利润(CNY)',
  1562. prop: 'singleProfit'
  1563. },
  1564. {
  1565. childLabel: '总利润(CNY)',
  1566. prop: 'totalProfit'
  1567. },
  1568. ],
  1569. sheetInfo: [
  1570. {
  1571. costPerson: 1,
  1572. toll: 11,
  1573. totalCost: 137597.76,
  1574. singleQuote: 102203.71,
  1575. totalQuote: 35394.05,
  1576. singleProfit: 35394.05,
  1577. totalProfit: 35394.05
  1578. },
  1579. ]
  1580. },
  1581. {
  1582. label: '公务舱 SUITE',
  1583. childList: [
  1584. {
  1585. childLabel: '单人成本(CNY)',
  1586. prop: 'costPerson'
  1587. },
  1588. {
  1589. childLabel: '人数',
  1590. prop: 'toll'
  1591. },
  1592. {
  1593. childLabel: '总成本(CNY)',
  1594. prop: 'totalCost'
  1595. },
  1596. {
  1597. childLabel: '单人报价(CNY)',
  1598. prop: 'singleQuote',
  1599. title: '报批(单人公务舱总报价):',
  1600. tips: '这是一个tips',
  1601. },
  1602. {
  1603. childLabel: '总报价(CNY)',
  1604. prop: 'totalQuote'
  1605. },
  1606. {
  1607. childLabel: '单人利润(CNY)',
  1608. prop: 'singleProfit'
  1609. },
  1610. {
  1611. childLabel: '总利润(CNY)',
  1612. prop: 'totalProfit'
  1613. },
  1614. ],
  1615. sheetInfo: [
  1616. {
  1617. costPerson: 1,
  1618. toll: 11,
  1619. totalCost: 137597.76,
  1620. singleQuote: 102203.71,
  1621. totalQuote: 35394.05,
  1622. singleProfit: 35394.05,
  1623. totalProfit: 35394.05
  1624. },
  1625. ]
  1626. }
  1627. ,
  1628. {
  1629. label: '经济舱 SUITE',
  1630. childList: [
  1631. {
  1632. childLabel: '单人成本(CNY)',
  1633. prop: 'costPerson'
  1634. },
  1635. {
  1636. childLabel: '人数',
  1637. prop: 'toll'
  1638. },
  1639. {
  1640. childLabel: '总成本(CNY)',
  1641. prop: 'totalCost'
  1642. },
  1643. {
  1644. childLabel: '单人报价(CNY)',
  1645. prop: 'singleQuote',
  1646. title: '报批(单人经济舱总报价):',
  1647. tips: '这是一个tips',
  1648. },
  1649. {
  1650. childLabel: '总报价(CNY)',
  1651. prop: 'totalQuote'
  1652. },
  1653. {
  1654. childLabel: '单人利润(CNY)',
  1655. prop: 'singleProfit'
  1656. },
  1657. {
  1658. childLabel: '总利润(CNY)',
  1659. prop: 'totalProfit'
  1660. },
  1661. ],
  1662. sheetInfo: [
  1663. {
  1664. costPerson: 1,
  1665. toll: 11,
  1666. totalCost: 137597.76,
  1667. singleQuote: 102203.71,
  1668. totalQuote: 35394.05,
  1669. singleProfit: 35394.05,
  1670. totalProfit: 35394.05
  1671. },
  1672. ]
  1673. },
  1674. {
  1675. label: '团组预算明细',
  1676. childList: [
  1677. {
  1678. childLabel: '团组成本(CNY)',
  1679. prop: 'groupCosts'
  1680. },
  1681. {
  1682. childLabel: '团组报价(CNY)',
  1683. prop: 'gtroupQuotes'
  1684. },
  1685. {
  1686. childLabel: '团组利润(CNY)',
  1687. prop: 'groupProfit'
  1688. }
  1689. ],
  1690. sheetInfo: [
  1691. {
  1692. groupCosts: 1,
  1693. gtroupQuotes: 11,
  1694. groupProfit: 137597.76,
  1695. },
  1696. ]
  1697. }
  1698. ],
  1699. BcabinDatal: [
  1700. {
  1701. label: '经济舱 TBR',
  1702. childList: [
  1703. {
  1704. childLabel: '单人成本(CNY)',
  1705. prop: 'costPerson'
  1706. },
  1707. {
  1708. childLabel: '人数',
  1709. prop: 'toll'
  1710. },
  1711. {
  1712. childLabel: '总成本(CNY)',
  1713. prop: 'totalCost'
  1714. },
  1715. {
  1716. childLabel: '单人报价(CNY)',
  1717. prop: 'singleQuote',
  1718. title: '报批(单人经济舱总报价):',
  1719. tips: '这是一个tips',
  1720. },
  1721. {
  1722. childLabel: '总报价(CNY)',
  1723. prop: 'totalQuote'
  1724. },
  1725. {
  1726. childLabel: '单人利润(CNY)',
  1727. prop: 'singleProfit'
  1728. },
  1729. {
  1730. childLabel: '总利润(CNY)',
  1731. prop: 'totalProfit'
  1732. },
  1733. ],
  1734. sheetInfo: [
  1735. {
  1736. costPerson: 0,
  1737. toll: 0,
  1738. totalCost: 137597.76,
  1739. singleQuote: 102203.71,
  1740. totalQuote: 35394.05,
  1741. singleProfit: 35394.05,
  1742. totalProfit: 35394.05
  1743. },
  1744. ]
  1745. },
  1746. {
  1747. label: '经济舱 SGR',
  1748. childList: [
  1749. {
  1750. childLabel: '单人成本(CNY)',
  1751. prop: 'costPerson'
  1752. },
  1753. {
  1754. childLabel: '人数',
  1755. prop: 'toll'
  1756. },
  1757. {
  1758. childLabel: '总成本(CNY)',
  1759. prop: 'totalCost'
  1760. },
  1761. {
  1762. childLabel: '单人报价(CNY)',
  1763. prop: 'singleQuote',
  1764. title: '报批(单人经济舱总报价):',
  1765. tips: '这是一个tips',
  1766. },
  1767. {
  1768. childLabel: '总报价(CNY)',
  1769. prop: 'totalQuote'
  1770. },
  1771. {
  1772. childLabel: '单人利润(CNY)',
  1773. prop: 'singleProfit'
  1774. },
  1775. {
  1776. childLabel: '总利润(CNY)',
  1777. prop: 'totalProfit'
  1778. },
  1779. ],
  1780. sheetInfo: [
  1781. {
  1782. costPerson: 1,
  1783. toll: 11,
  1784. totalCost: 137597.76,
  1785. singleQuote: 102203.71,
  1786. totalQuote: 35394.05,
  1787. singleProfit: 35394.05,
  1788. totalProfit: 35394.05
  1789. },
  1790. ]
  1791. },
  1792. {
  1793. label: '公务舱 SGR',
  1794. childList: [
  1795. {
  1796. childLabel: '单人成本(CNY)',
  1797. prop: 'costPerson'
  1798. },
  1799. {
  1800. childLabel: '人数',
  1801. prop: 'toll'
  1802. },
  1803. {
  1804. childLabel: '总成本(CNY)',
  1805. prop: 'totalCost'
  1806. },
  1807. {
  1808. childLabel: '单人报价(CNY)',
  1809. prop: 'singleQuote',
  1810. title: '报批(单人公务舱总报价):',
  1811. tips: '这是一个tips',
  1812. },
  1813. {
  1814. childLabel: '总报价(CNY)',
  1815. prop: 'totalQuote'
  1816. },
  1817. {
  1818. childLabel: '单人利润(CNY)',
  1819. prop: 'singleProfit'
  1820. },
  1821. {
  1822. childLabel: '总利润(CNY)',
  1823. prop: 'totalProfit'
  1824. },
  1825. ],
  1826. sheetInfo: [
  1827. {
  1828. costPerson: 1,
  1829. toll: 11,
  1830. totalCost: 137597.76,
  1831. singleQuote: 102203.71,
  1832. totalQuote: 35394.05,
  1833. singleProfit: 35394.05,
  1834. totalProfit: 35394.05
  1835. },
  1836. ]
  1837. },
  1838. {
  1839. label: '公务舱 JS/ES',
  1840. childList: [
  1841. {
  1842. childLabel: '单人成本(CNY)',
  1843. prop: 'costPerson'
  1844. },
  1845. {
  1846. childLabel: '人数',
  1847. prop: 'toll'
  1848. },
  1849. {
  1850. childLabel: '总成本(CNY)',
  1851. prop: 'totalCost'
  1852. },
  1853. {
  1854. childLabel: '单人报价(CNY)',
  1855. prop: 'singleQuote',
  1856. title: '报批(单人公务舱总报价):',
  1857. tips: '这是一个tips',
  1858. },
  1859. {
  1860. childLabel: '总报价(CNY)',
  1861. prop: 'totalQuote'
  1862. },
  1863. {
  1864. childLabel: '单人利润(CNY)',
  1865. prop: 'singleProfit'
  1866. },
  1867. {
  1868. childLabel: '总利润(CNY)',
  1869. prop: 'totalProfit'
  1870. },
  1871. ],
  1872. sheetInfo: [
  1873. {
  1874. costPerson: 1,
  1875. toll: 11,
  1876. totalCost: 137597.76,
  1877. singleQuote: 102203.71,
  1878. totalQuote: 35394.05,
  1879. singleProfit: 35394.05,
  1880. totalProfit: 35394.05
  1881. },
  1882. ]
  1883. },
  1884. {
  1885. label: '公务舱 SUITE',
  1886. childList: [
  1887. {
  1888. childLabel: '单人成本(CNY)',
  1889. prop: 'costPerson'
  1890. },
  1891. {
  1892. childLabel: '人数',
  1893. prop: 'toll'
  1894. },
  1895. {
  1896. childLabel: '总成本(CNY)',
  1897. prop: 'totalCost'
  1898. },
  1899. {
  1900. childLabel: '单人报价(CNY)',
  1901. prop: 'singleQuote',
  1902. title: '报批(单人公务舱总报价):',
  1903. tips: '这是一个tips',
  1904. },
  1905. {
  1906. childLabel: '总报价(CNY)',
  1907. prop: 'totalQuote'
  1908. },
  1909. {
  1910. childLabel: '单人利润(CNY)',
  1911. prop: 'singleProfit'
  1912. },
  1913. {
  1914. childLabel: '总利润(CNY)',
  1915. prop: 'totalProfit'
  1916. },
  1917. ],
  1918. sheetInfo: [
  1919. {
  1920. costPerson: 1,
  1921. toll: 11,
  1922. totalCost: 137597.76,
  1923. singleQuote: 102203.71,
  1924. totalQuote: 35394.05,
  1925. singleProfit: 35394.05,
  1926. totalProfit: 35394.05
  1927. },
  1928. ]
  1929. }
  1930. ,
  1931. {
  1932. label: '经济舱 SUITE',
  1933. childList: [
  1934. {
  1935. childLabel: '单人成本(CNY)',
  1936. prop: 'costPerson'
  1937. },
  1938. {
  1939. childLabel: '人数',
  1940. prop: 'toll'
  1941. },
  1942. {
  1943. childLabel: '总成本(CNY)',
  1944. prop: 'totalCost'
  1945. },
  1946. {
  1947. childLabel: '单人报价(CNY)',
  1948. prop: 'singleQuote',
  1949. title: '报批(单人经济舱总报价):',
  1950. tips: '这是一个tips',
  1951. },
  1952. {
  1953. childLabel: '总报价(CNY)',
  1954. prop: 'totalQuote'
  1955. },
  1956. {
  1957. childLabel: '单人利润(CNY)',
  1958. prop: 'singleProfit'
  1959. },
  1960. {
  1961. childLabel: '总利润(CNY)',
  1962. prop: 'totalProfit'
  1963. },
  1964. ],
  1965. sheetInfo: [
  1966. {
  1967. costPerson: 1,
  1968. toll: 11,
  1969. totalCost: 137597.76,
  1970. singleQuote: 102203.71,
  1971. totalQuote: 35394.05,
  1972. singleProfit: 35394.05,
  1973. totalProfit: 35394.05
  1974. },
  1975. ]
  1976. }
  1977. ],
  1978. costType: [
  1979. {
  1980. value: 'A',
  1981. label: '单段模式'
  1982. },
  1983. {
  1984. value: 'B',
  1985. label: '双段模式'
  1986. }
  1987. ],
  1988. userId: 0,
  1989. token: '',
  1990. costTypevalue: 'A',
  1991. grouptitleinfo: {},
  1992. costTypeHotelNumbers: [{
  1993. "sgr": 0,
  1994. "tbr": 0,
  1995. "jses": 0,
  1996. "suite": 0,
  1997. "type": "Default",
  1998. "diid": 0,
  1999. id: 0,
  2000. },
  2001. {
  2002. "sgr": 0,
  2003. "tbr": 0,
  2004. "jses": 0,
  2005. "suite": 0,
  2006. "type": "A",
  2007. "diid": 0,
  2008. id: 0,
  2009. },
  2010. {
  2011. "sgr": 0,
  2012. "tbr": 0,
  2013. "jses": 0,
  2014. "suite": 0,
  2015. "type": "B",
  2016. "diid": 0,
  2017. id: 0,
  2018. }],
  2019. CheckBoxListSelect: [
  2020. {
  2021. "diid": 0,
  2022. "cbType": "Top",
  2023. "cbValues": ['DAY', 'DATE', 'ITIN', 'VA', 'VT', 'VF', 'VRD', 'T/G S', 'T/G WH', 'C/F M', 'L', 'D', 'SGR', 'SUITE', 'ACCO N', 'T/V', 'EF', 'B/R/F', 'TE', 'DRV T', 'P/C'] //"string"
  2024. },
  2025. {
  2026. "diid": 0,
  2027. "cbType": "Left",
  2028. "cbValues": ['签证', '机票', '保险','火车票','地接','公务','零用金'] //"string"
  2029. },
  2030. {
  2031. "diid": 0,
  2032. "cbType": "Right",
  2033. "cbValues": ['公务舱 SGR', '经济舱 SGR', '团组预算明细'] //"string"
  2034. }
  2035. ],
  2036. AGroupCostParameter: {
  2037. "id": 0,
  2038. "diId": 0,
  2039. "currency": "CNY",
  2040. "rate": 0,
  2041. "tax": 0,
  2042. "ffys": 0,
  2043. "hotelXS": 0,
  2044. "jjccb": 0,
  2045. "jjcxs": 0,
  2046. "jjcrs": 0,
  2047. "gwccb": 0,
  2048. "gwcxs": 0,
  2049. "gwcrs": 0,
  2050. "hcpcb": 0,
  2051. "hcpxs": 0,
  2052. "hcprs": 0,
  2053. "cpcb": 0,
  2054. "cpxs": 0,
  2055. "cprs": 0,
  2056. "bxcb": 0,
  2057. "bxxs": 0,
  2058. "bxrs": 0,
  2059. "hscb": 0,
  2060. "hsxs": 0,
  2061. "hsrs": 0,
  2062. "visaCB": 0,
  2063. "visaXS": 0,
  2064. "visaRS": 0,
  2065. "gwcb": 0,
  2066. "gwxs": 0,
  2067. "gwrs": 0,
  2068. "djcb": 0,
  2069. "djrs": 0,
  2070. "djxs": 0,
  2071. "sgrcb": 0,
  2072. "sgrNumber": 0,
  2073. "sgrxs": 0,
  2074. "tbrcb": 0,
  2075. "tbrNumber": 0,
  2076. "tbrxs": 0,
  2077. "jsescb": 0,
  2078. "jsesNumber": 0,
  2079. "jsesxs": 0,
  2080. "suitecb": 0,
  2081. "suiteNumber": 0,
  2082. "suitexs": 0,
  2083. "lyjcb": 0,
  2084. "lyjxs": 0,
  2085. "lyjrs": 0,
  2086. "isShare": 0,
  2087. "costType": "A",
  2088. "costTypeStartTime": "",
  2089. "costTypeendTime": "",
  2090. "costTypenumber": 0
  2091. },
  2092. BGroupCostParameter: {
  2093. "id": 0,
  2094. "diId": 0,
  2095. "currency": "",
  2096. "rate": 0,
  2097. "tax": 0,
  2098. "ffys": 0,
  2099. "hotelXS": 0,
  2100. "jjccb": 0,
  2101. "jjcxs": 0,
  2102. "jjcrs": 0,
  2103. "gwccb": 0,
  2104. "gwcxs": 0,
  2105. "gwcrs": 0,
  2106. "hcpcb": 0,
  2107. "hcpxs": 0,
  2108. "hcprs": 0,
  2109. "cpcb": 0,
  2110. "cpxs": 0,
  2111. "cprs": 0,
  2112. "bxcb": 0,
  2113. "bxxs": 0,
  2114. "bxrs": 0,
  2115. "hscb": 0,
  2116. "hsxs": 0,
  2117. "hsrs": 0,
  2118. "visaCB": 0,
  2119. "visaXS": 0,
  2120. "visaRS": 0,
  2121. "gwcb": 0,
  2122. "gwxs": 0,
  2123. "gwrs": 0,
  2124. "djcb": 0,
  2125. "djxs": 0,
  2126. "djrs": 0,
  2127. "sgrcb": 0,
  2128. "sgrNumber": 0,
  2129. "sgrxs": 0,
  2130. "tbrcb": 0,
  2131. "tbrNumber": 0,
  2132. "tbrxs": 0,
  2133. "jsescb": 0,
  2134. "jsesNumber": 0,
  2135. "jsesxs": 0,
  2136. "suitecb": 0,
  2137. "suiteNumber": 0,
  2138. "suitexs": 0,
  2139. "lyjcb": 0,
  2140. "lyjxs": 0,
  2141. "lyjrs": 0,
  2142. "isShare": 0,
  2143. "costType": "B",
  2144. "costTypeStartTime": "",
  2145. "costTypeendTime": "",
  2146. "costTypenumber": 0
  2147. },
  2148. dialogColumn: [
  2149. {
  2150. index: 1, data: [
  2151. { title: "国家", prop: "country" },
  2152. { title: "城市", prop: "city" },
  2153. { title: "服务类型", prop: "serviceType" },
  2154. { title: "用车类型", prop: "carType" },
  2155. { title: "用车报价", prop: "offer" },
  2156. { title: "车兼导费用", prop: "cgCost" },
  2157. { title: "用车时长", prop: "runingTime" },
  2158. { title: "车超时费用/时", prop: "overtimeFee" },
  2159. { title: "司兼导超时费/时", prop: "cgOvertimeFee" },
  2160. { title: "币种", prop: "currency" },
  2161. { title: "备注", prop: "remark" }
  2162. ]
  2163. },
  2164. {
  2165. index: 2, data: [
  2166. { title: "国家", prop: "country" },
  2167. { title: "城市", prop: "city" },
  2168. { title: "导游服务类型", prop: "serviceType" },
  2169. { title: "导游工资", prop: "price" },
  2170. { title: "翻译工资", prop: "translationPrice" },
  2171. { title: "超时费用", prop: "overtimeFee" },
  2172. { title: "币种", prop: "currency" },
  2173. { title: "备注", prop: "remark" }
  2174. ]
  2175. },
  2176. {
  2177. index: 3, data: [
  2178. { title: "国家", prop: "country" },
  2179. { title: "城市", prop: "city" },
  2180. { title: "车类型", prop: "carType" },
  2181. { title: "服务类型", prop: "serviceType" },
  2182. { title: "用车时间", prop: "when" },
  2183. { title: "工资", prop: "price" },
  2184. { title: "超时费用", prop: "overtimeFee" },
  2185. { title: "币种", prop: "currency" },
  2186. { title: "备注", prop: "remark" }
  2187. ]
  2188. },
  2189. {
  2190. index: 4, data: [
  2191. { title: "国家", prop: "country" },
  2192. { title: "城市", prop: "city" },
  2193. { title: "景点", prop: "scenicSpot" },
  2194. { title: "景点项目描述", prop: "scenicSpotDetail" },
  2195. { title: "景点价格", prop: "price" },
  2196. { title: "币种", prop: "currency" },
  2197. { title: "景点地址", prop: "address" }
  2198. ]
  2199. }
  2200. // 司兼导
  2201. // 导游
  2202. // 车数据
  2203. // 景点
  2204. ],
  2205. dialogTableData: [],
  2206. SeldialogColumn: [],
  2207. DialogTitle: '',
  2208. pageSize: 5,
  2209. currentPage: 1,
  2210. dialogSearchInput: '',
  2211. selectRow: {},
  2212. rowIndex: 0,
  2213. sumTopPrice: [],
  2214. DJLables: ['VF', 'T/G S', 'T/G OF', 'T/G M', 'T/G A', 'T/G TF', 'T/G EF', 'C/F M', 'C/F OF', 'B', 'L', 'D', 'EF', 'B/R/F', 'TE', 'T/G T', 'DRV T', 'T/L F'],
  2215. GwLables: ['T/V', 'E/C T', 'I/F', '1/L'],
  2216. OtherCostProperty: ['visaCB', 'hcpcb', 'cpcb', 'bxcb', 'hscb', 'djcb', 'gwcb', 'lyjcb'],
  2217. OtherCostPropertyBJ: ['visa', 'hcp', 'cp', 'bx', 'hs', 'dj', 'gw', 'lyj'],
  2218. peopleNumber: 1,
  2219. centerheight: 700,
  2220. defaultheight: 50,
  2221. rules: {
  2222. rate: [
  2223. { pattern: /^-?\d+\.?\d*$/, message: '请输入正确数据', trigger: 'blur', required: true, }
  2224. ],
  2225. tax: [
  2226. { pattern: /^-?\d+\.?\d*$/, message: '请输入正确数据', trigger: 'blur', required: true, }
  2227. ],
  2228. },
  2229. HotelRules: {
  2230. sgr: [
  2231. { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
  2232. ],
  2233. tbr: [
  2234. { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
  2235. ],
  2236. suite: [
  2237. { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
  2238. ],
  2239. jses: [
  2240. { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
  2241. ],
  2242. },
  2243. CostTimeRules: {
  2244. costTypeendTime: [
  2245. { message: '请输入结束时间', trigger: 'blur', required: true, },
  2246. ],
  2247. costTypenumber: [
  2248. { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
  2249. ],
  2250. costTypeStartTime: [
  2251. { message: '请输入开始时间', trigger: 'blur', required: true, },
  2252. ],
  2253. },
  2254. titleText: [],
  2255. vehicleLables: ['VF', 'T/G OF', 'T/G S', 'T/G TF', 'C/F OF'],
  2256. DJMeal: ['B', 'L', 'D'],
  2257. SubsidizedMeals: ['T/G M', 'C/F M'],
  2258. NightRepair: ['T/G A'],
  2259. AttractionsTickets: ['T/G EF', 'EF'],
  2260. MiscellaneousFees: ['B/R/F', 'TE', 'T/L F'],
  2261. ATip: ['T/G T', 'DRV T'],
  2262. visaCountryInfoArr: [],
  2263. equalWhere: [
  2264. { "Visa": "visa" },
  2265. { "HeSuan": "hs" },
  2266. { "Insurance": "bx" },
  2267. { "JJC": "jjc" },
  2268. { "GWC": "gwc" }
  2269. ],
  2270. ShowBaoPi: [
  2271. ],
  2272. dialogSelectObject: {
  2273. },
  2274. columnTotalData: [
  2275. {
  2276. "label": "DAY",
  2277. "tips": "",
  2278. "totalPrice": 0,
  2279. "singlePrice": 0,
  2280. "singleTips": "",
  2281. "width": 50,
  2282. },
  2283. {
  2284. "label": "DATE",
  2285. "tips": "",
  2286. "totalPrice": 0,
  2287. "singlePrice": 0,
  2288. "singleTips": "",
  2289. "width": 100,
  2290. },
  2291. {
  2292. "label": "ITIN",
  2293. "tips": "",
  2294. "totalPrice": 0,
  2295. "singlePrice": 0,
  2296. "singleTips": "",
  2297. "width": 100,
  2298. },
  2299. {
  2300. "label": "VA",
  2301. "tips": "",
  2302. "totalPrice": 0,
  2303. "singlePrice": 0,
  2304. "singleTips": "",
  2305. "width": 100,
  2306. },
  2307. {
  2308. "label": "VT",
  2309. "tips": "",
  2310. "totalPrice": 0,
  2311. "singlePrice": 0,
  2312. "singleTips": "",
  2313. "width": 100,
  2314. },
  2315. {
  2316. "label": "VF",
  2317. "tips": "车费用\n",
  2318. "totalPrice": 0,
  2319. "singlePrice": 0,
  2320. "singleTips": "车费用人均\n",
  2321. "width": 60,
  2322. },
  2323. {
  2324. "label": "VN",
  2325. "tips": "",
  2326. "totalPrice": 0,
  2327. "singlePrice": 0,
  2328. "singleTips": "",
  2329. "width": 60,
  2330. },
  2331. {
  2332. "label": "VRD",
  2333. "tips": "",
  2334. "totalPrice": 0,
  2335. "singlePrice": 0,
  2336. "singleTips": "",
  2337. "width": 60,
  2338. },
  2339. {
  2340. "label": "T/G S",
  2341. "tips": "导游工资\n",
  2342. "totalPrice": 0,
  2343. "singlePrice": 0,
  2344. "singleTips": "导游工资人均\n",
  2345. "width": 60,
  2346. },
  2347. {
  2348. "label": "T/G N",
  2349. "tips": "",
  2350. "totalPrice": 0,
  2351. "singlePrice": 0,
  2352. "singleTips": "",
  2353. "width": 60,
  2354. },
  2355. {
  2356. "label": "T/G WH",
  2357. "tips": "",
  2358. "totalPrice": 0,
  2359. "singlePrice": 0,
  2360. "singleTips": "",
  2361. "width": 60,
  2362. },
  2363. {
  2364. "label": "T/G OF",
  2365. "tips": "导游超时费用\n",
  2366. "totalPrice": 0,
  2367. "singlePrice": 0,
  2368. "singleTips": "导游超时费用人均\n",
  2369. "width": 60,
  2370. },
  2371. {
  2372. "label": "T/G M",
  2373. "tips": "导游餐补\n",
  2374. "totalPrice": 0,
  2375. "singlePrice": 0,
  2376. "singleTips": "导游餐补人均\n",
  2377. "width": 60,
  2378. },
  2379. {
  2380. "label": "T/G A",
  2381. "tips": "导游房补\n",
  2382. "totalPrice": 0,
  2383. "singlePrice": 0,
  2384. "singleTips": "导游房补人均\n",
  2385. "width": 60,
  2386. },
  2387. {
  2388. "label": "T/G TF",
  2389. "tips": "导游交通费\n",
  2390. "totalPrice": 0,
  2391. "singlePrice": 0,
  2392. "singleTips": "导游交通费人均\n",
  2393. "width": 60,
  2394. },
  2395. {
  2396. "label": "T/G EF",
  2397. "tips": "导游景点费\n",
  2398. "totalPrice": 0,
  2399. "singlePrice": 0,
  2400. "singleTips": "导游景点费人均\n",
  2401. "width": 60,
  2402. },
  2403. {
  2404. "label": "C/F M",
  2405. "tips": "司机餐补\n",
  2406. "totalPrice": 0,
  2407. "singlePrice": 0,
  2408. "singleTips": "司机餐补人均\n",
  2409. "width": 60,
  2410. },
  2411. {
  2412. "label": "C/F OF",
  2413. "tips": "司机超时费用\n",
  2414. "totalPrice": 0,
  2415. "singlePrice": 0,
  2416. "singleTips": "司机超时费用人均\n",
  2417. "width": 60,
  2418. },
  2419. {
  2420. "label": "B",
  2421. "tips": "早餐费用\n",
  2422. "totalPrice": 0,
  2423. "singlePrice": 0,
  2424. "singleTips": "早餐费用人均\n",
  2425. "width": 60,
  2426. },
  2427. {
  2428. "label": "L",
  2429. "tips": "午餐费用\n",
  2430. "totalPrice": 0,
  2431. "singlePrice": 0,
  2432. "singleTips": "午餐费用人均\n",
  2433. "width": 60,
  2434. },
  2435. {
  2436. "label": "D",
  2437. "tips": "晚餐费用\n",
  2438. "totalPrice": 0,
  2439. "singlePrice": 0,
  2440. "singleTips": "晚餐费用人均\n",
  2441. "width": 60,
  2442. },
  2443. {
  2444. "label": "TBR",
  2445. "tips": "双人间费用\n",
  2446. "totalPrice": 0,
  2447. "singlePrice": 0,
  2448. "singleTips": "双人间费用人均\n",
  2449. "width": 60,
  2450. },
  2451. {
  2452. "label": "SGR",
  2453. "tips": "单间费用\n",
  2454. "totalPrice": 0,
  2455. "singlePrice": 0,
  2456. "singleTips": "单间费用人均\n",
  2457. "width": 60,
  2458. },
  2459. {
  2460. "label": "JS/ES",
  2461. "tips": "小套房/豪华套房费用\n",
  2462. "totalPrice": 0,
  2463. "singlePrice": 0,
  2464. "singleTips": "小套房/豪华套房费用人均\n",
  2465. "width": 60,
  2466. },
  2467. {
  2468. "label": "SUITE",
  2469. "tips": "套房费用\n",
  2470. "totalPrice": 0,
  2471. "singlePrice": 0,
  2472. "singleTips": "套房费用人均\n",
  2473. "width": 60,
  2474. },
  2475. {
  2476. "label": "ACCO N",
  2477. "tips": "",
  2478. "totalPrice": 0,
  2479. "singlePrice": 0,
  2480. "singleTips": "",
  2481. "width": 100,
  2482. },
  2483. {
  2484. "label": "T/V",
  2485. "tips": "公务活动费用\n",
  2486. "totalPrice": 0,
  2487. "singlePrice": 0,
  2488. "singleTips": "公务活动费用人均\n",
  2489. "width": 60,
  2490. },
  2491. {
  2492. "label": "1/L",
  2493. "tips": "公务活动费用\n",
  2494. "totalPrice": 0,
  2495. "singlePrice": 0,
  2496. "singleTips": "公务活动费用人均\n",
  2497. "width": 60,
  2498. },
  2499. {
  2500. "label": "I/F",
  2501. "tips": "公务翻译费用\n",
  2502. "totalPrice": 0,
  2503. "singlePrice": 0,
  2504. "singleTips": "公务翻译费用人均\n",
  2505. "width": 60,
  2506. },
  2507. {
  2508. "label": "EF",
  2509. "tips": "景点门票\n",
  2510. "totalPrice": 0,
  2511. "singlePrice": 0,
  2512. "singleTips": "景点门票人均\n",
  2513. "width": 60,
  2514. },
  2515. {
  2516. "label": "B/R/F",
  2517. "tips": "饮料零食水果\n",
  2518. "totalPrice": 0,
  2519. "singlePrice": 0,
  2520. "singleTips": "饮料零食水果人均\n",
  2521. "width": 60,
  2522. },
  2523. {
  2524. "label": "TE",
  2525. "tips": "出行物资\n",
  2526. "totalPrice": 0,
  2527. "singlePrice": 0,
  2528. "singleTips": "出行物资人均\n",
  2529. "width": 60,
  2530. },
  2531. {
  2532. "label": "T/G T",
  2533. "tips": "导游小费\n",
  2534. "totalPrice": 0,
  2535. "singlePrice": 0,
  2536. "singleTips": "导游小费人均\n",
  2537. "width": 60,
  2538. },
  2539. {
  2540. "label": "DRV T",
  2541. "tips": "司机小费\n",
  2542. "totalPrice": 0,
  2543. "singlePrice": 0,
  2544. "singleTips": "司机小费人均\n",
  2545. "width": 60,
  2546. },
  2547. {
  2548. "label": "P/C",
  2549. "tips": "零用金\n",
  2550. "totalPrice": 0,
  2551. "singlePrice": 0,
  2552. "singleTips": "零用金人均\n",
  2553. "width": 60,
  2554. },
  2555. {
  2556. "label": "T/L F",
  2557. "tips": "领队费\n",
  2558. "totalPrice": 0,
  2559. "singlePrice": 0,
  2560. "singleTips": "领队费人均\n",
  2561. "width": 60,
  2562. },
  2563. {
  2564. "label": "E/C T",
  2565. "tips": "会务费\n",
  2566. "totalPrice": 0,
  2567. "singlePrice": 0,
  2568. "singleTips": "会务费人均\n",
  2569. "width": 60,
  2570. }
  2571. ]
  2572. };
  2573. },
  2574. watch: {
  2575. costTypeHotelNumbers:{
  2576. handler(val){
  2577. for(var i=0;i<val.length;i++){
  2578. console.log(val[i]);
  2579. if(val[i].tbr==''){
  2580. val[i].tbr=0
  2581. }
  2582. if(val[i].sgr==''){
  2583. val[i].sgr=0
  2584. }
  2585. if(val[i].jses==''){
  2586. val[i].jses=0
  2587. }
  2588. if(val[i].suite==''){
  2589. val[i].suite=0
  2590. }
  2591. }
  2592. },
  2593. deep:true
  2594. },
  2595. 'tableData.length': {
  2596. handler(newValue, oldValue) {
  2597. if (newValue !== oldValue) {
  2598. if (this.tableData.length > 3) {
  2599. this.centerheight = 700;
  2600. } else {
  2601. this.centerheight = this.defaultheight + (this.tableData.length * 230) - ((this.tableData.length - 1) * 50);
  2602. }
  2603. ////console.log('高度' + this.centerheight);
  2604. }
  2605. }
  2606. }
  2607. },
  2608. methods: {
  2609. getSummaries(param) {
  2610. var that = this;
  2611. //console.log(param)
  2612. const { columns, data } = param;
  2613. const sums = [];
  2614. const sums1 = [];
  2615. const texts = [];
  2616. var prices = [];
  2617. var BUpdate= []
  2618. var thisData = data;
  2619. var ATime = { start: that.addOneDay(that.AGroupCostParameter.costTypeStartTime, 0), end: that.addOneDay(that.AGroupCostParameter.costTypeendTime, 0) };
  2620. var BTime = { start: that.addOneDay(that.BGroupCostParameter.costTypeStartTime, 0), end: that.addOneDay(that.BGroupCostParameter.costTypeendTime, 0) };
  2621. ////console.log('ATime,BTime', ATime, BTime);
  2622. var data1 = [];
  2623. var data2 = [];
  2624. ////console.log('datas', data);
  2625. if (that.costTypevalue == 'B') {
  2626. for (var i = 0; i < thisData.length; i++) {
  2627. var forTime = thisData[i].date;
  2628. if (forTime == '' && i != 0) {
  2629. forTime = thisData[i - 1].date;
  2630. }
  2631. if (forTime) {
  2632. forTime = new Date(forTime).getDate();
  2633. }
  2634. if (forTime >= new Date(ATime.start).getDate() && forTime <= new Date(ATime.end).getDate()) {
  2635. data1.push(thisData[i])
  2636. }
  2637. if (forTime >= new Date(BTime.start).getDate() && forTime <= new Date(BTime.end).getDate()) {
  2638. data2.push(thisData[i])
  2639. }
  2640. }
  2641. thisData = data1;
  2642. if (isNaN(Number(that.AGroupCostParameter.costTypenumber)) || Number(that.AGroupCostParameter.costTypenumber) < 1) {
  2643. that.peopleNumber = 1;
  2644. } else {
  2645. that.peopleNumber = Number(that.AGroupCostParameter.costTypenumber);
  2646. }
  2647. }
  2648. //console.log('3data', thisData, data1, data2);
  2649. columns.forEach((column, index) => {
  2650. if (index === 0) {
  2651. prices[index] = "总计:";
  2652. that.lableSetPrice(column.label, '', '');
  2653. return;
  2654. }
  2655. if (column.label == 'DATE' || column.label == 'ITIN' || column.label == 'VT' || column.label == 'VN' || column.label == 'ACCO N' || column.label == 'VA' || column.label == 'VRD' || column.label == 'T/G N' || column.label == 'T/G WH' || column.label == '操作') {
  2656. prices[index] = "——";
  2657. that.lableSetPrice(column.label, '', '');
  2658. return;
  2659. }
  2660. const values = thisData.map(item => Number(item[column.property]));
  2661. if (!values.every(value => isNaN(value))) {
  2662. sums[index] = values.reduce((prev, curr) => {
  2663. const value = Number(curr);
  2664. if (!isNaN(value)) {
  2665. return prev + curr;
  2666. } else {
  2667. return prev;
  2668. }
  2669. }, 0);
  2670. if (column.label == 'B' || column.label == 'L' || column.label == 'D' || column.label == 'EF' || column.label == 'TE' || column.label == 'T/G T' || column.label == 'P/C' || column.label == 'DRV T' || column.label == 'DRV T') {
  2671. that.lableSetPrice(column.label, (sums[index] * that.peopleNumber).toFixed(2), (sums[index]).toFixed(2));
  2672. prices[index] = '共' + (sums[index] * that.peopleNumber).toFixed(2) + ' ' + this.AGroupCostParameter.currency + '\r\n人均' + (sums[index]).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
  2673. }
  2674. else if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR') {
  2675. that.lableSetPrice(column.label, (sums[index]).toFixed(2), (sums[index]).toFixed(2));
  2676. prices[index] = '共' + (sums[index]).toFixed(2) + ' ' + this.AGroupCostParameter.currency + '\r\n人均' + (sums[index]).toFixed(2) + " " + this.AGroupCostParameter.currency
  2677. }
  2678. else {
  2679. that.lableSetPrice(column.label, sums[index].toFixed(2), (sums[index] / that.peopleNumber).toFixed(2));
  2680. prices[index] = '共' + sums[index].toFixed(2) + ' ' + this.AGroupCostParameter.currency + '\r\n人均' + (sums[index] / that.peopleNumber).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
  2681. sums[index] = parseFloat((sums[index] / that.peopleNumber).toFixed(2));
  2682. }
  2683. } else {
  2684. prices[index] = 'N/A';
  2685. }
  2686. if (that.costTypevalue == 'B') {
  2687. const values1 = data2.map(item => Number(item[column.property]));
  2688. if (!values1.every(value => isNaN(value))) {
  2689. sums1[index] = values1.reduce((prev, curr) => {
  2690. const value = Number(curr);
  2691. if (!isNaN(value)) {
  2692. return prev + curr;
  2693. } else {
  2694. return prev;
  2695. }
  2696. }, 0);
  2697. if (column.label == 'B' || column.label == 'L' || column.label == 'D' || column.label == 'EF' || column.label == 'TE' || column.label == 'T/G T' || column.label == 'P/C' || column.label == 'DRV T' || column.label == 'DRV T') {
  2698. BUpdate.push({label:column.label, total:(sums1[index] * that.BGroupCostParameter.costTypenumber).toFixed(2),single:(sums1[index]).toFixed(2)});
  2699. prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + (sums1[index] * that.BGroupCostParameter.costTypenumber).toFixed(2) + " " + this.AGroupCostParameter.currency + '\r\n人均' + (sums1[index]).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
  2700. }
  2701. else if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR') {
  2702. BUpdate.push({label:column.label, total:(sums1[index]).toFixed(2), single:(sums1[index]).toFixed(2)});
  2703. prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + (sums1[index]).toFixed(2) + " " + this.AGroupCostParameter.currency + '\r\n人均' + (sums1[index]).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
  2704. }
  2705. else {
  2706. BUpdate.push({label:column.label, total:sums1[index].toFixed(2), single:(sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2)});
  2707. prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + sums1[index].toFixed(2) + " " + this.AGroupCostParameter.currency + '\r\n人均' + (sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + ' 人均(' + sums[index] + ')';
  2708. sums1[index] = ((sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2));
  2709. }
  2710. } else {
  2711. prices[index] = 'A段费用' + prices[index] + ' B段费用' + 'N/A';
  2712. }
  2713. }
  2714. var fliterList = that.sumTopPrice.filter(function (x) {
  2715. return x.name == column.property;
  2716. })
  2717. if (fliterList.length == 0) {
  2718. that.sumTopPrice.push({ name: column.property, label: column.label, Aprice: sums[index], Bprice: sums1[index] == undefined ? 0 : sums1[index] });
  2719. } else {
  2720. fliterList[0].Aprice = sums[index];
  2721. fliterList[0].Bprice = sums1[index] == undefined ? 0 : sums1[index];
  2722. }
  2723. var TextfliterList = texts.filter(function (x) {
  2724. return x.label == column.label;
  2725. })
  2726. var text = prices[index];
  2727. if (TextfliterList.length == 0) {
  2728. texts.push({ label: column.label, text: text });
  2729. } else {
  2730. TextfliterList.text = text;
  2731. }
  2732. });
  2733. this.titleText = texts;
  2734. ////console.log(that.sumTopPrice, 'sumTopPrice---------------');
  2735. this.CalculatedPrice();
  2736. //////console.log(that.sumTopPrice, '------------');
  2737. setTimeout(() => {
  2738. this.setLastTitle(prices);
  2739. if(that.costTypevalue == 'B'){
  2740. //遍历bupdate
  2741. BUpdate.forEach(function (item) {
  2742. that.BlableSetPrice(item.label, item.total, item.single);
  2743. })
  2744. }
  2745. }, 1000);
  2746. return prices;
  2747. },
  2748. handleEdit(index, row, buttonIndex) {
  2749. //////console.log(index, row, buttonIndex);
  2750. this.rowIndex = index; // 行的索引
  2751. var api = '';
  2752. switch (buttonIndex) {
  2753. case 1:
  2754. api = 'GetCarGuides';
  2755. this.DialogTitle = '选择车导数据';
  2756. break;
  2757. case 2:
  2758. api = 'GetGuidesInfo';
  2759. this.DialogTitle = '导游信息';
  2760. break;
  2761. case 3:
  2762. api = 'GetCarInfo';
  2763. this.DialogTitle = '选择车数据';
  2764. break;
  2765. case 4:
  2766. api = 'GetScenicSpotInfo';
  2767. this.DialogTitle = '景点信息';
  2768. break;
  2769. }
  2770. if (api == '') {
  2771. this.$message.error('程序异常!');
  2772. return;
  2773. }
  2774. var dataC = this.dialogColumn.filter(x => x.index == buttonIndex);
  2775. if (dataC.length == 0) {
  2776. this.SeldialogColumn = [];
  2777. } else {
  2778. this.SeldialogColumn = dataC[0].data;
  2779. }
  2780. var that = this;
  2781. this.$axios.post('/api/Groups/' + api, {}, {
  2782. headers: {
  2783. 'Authorization': that.token,
  2784. }
  2785. }).then(resp => {
  2786. ////console.log(resp.data.data, '------------------------------------');
  2787. that.outerVisible = true;
  2788. if (resp.data.code == 200) {
  2789. that.dialogTableData = resp.data.data;
  2790. } else {
  2791. that.$message.error('获取数据失败!' + resp.data.msg);
  2792. }
  2793. })
  2794. },
  2795. handleDelete(index, row, rows) {
  2796. ////console.log(index, row, rows);
  2797. this.$confirm('此操作将删除该条信息, 是否继续?', '提示', {
  2798. confirmButtonText: '确定',
  2799. cancelButtonText: '取消',
  2800. type: 'warning'
  2801. }).then(() => {
  2802. this.$message({
  2803. message: '已删除',
  2804. type: 'success',
  2805. offset: 50
  2806. });
  2807. rows.splice(index, 1);
  2808. }).catch(() => {
  2809. this.$message({
  2810. type: 'info',
  2811. message: '已取消删除'
  2812. });
  2813. });
  2814. },
  2815. addStrip() {
  2816. var souerLength = this.tableData.length - 1;
  2817. var dataStr = "";
  2818. var day = '-';
  2819. if (souerLength >= 0) {
  2820. dataStr = this.tableData[souerLength].date;
  2821. dataStr = this.addOneDay(dataStr, 1);
  2822. var getDay = this.tableData[souerLength].day;
  2823. if (getDay) {
  2824. day = parseInt(getDay) + 1;
  2825. }else{
  2826. try{
  2827. day = parseInt(this.tableData[souerLength - 1].day) + 1;
  2828. dataStr = this.addOneDay(this.tableData[souerLength - 1].date, 1)
  2829. }catch(e){
  2830. dataStr = "";
  2831. day = '-';
  2832. }
  2833. }
  2834. }
  2835. this.tableData.push(
  2836. {
  2837. "diid": this.diid,
  2838. "day": day,
  2839. "date": dataStr,
  2840. "itin": "",
  2841. "carType": "",
  2842. "carCost": "",
  2843. "carNumber": "",
  2844. "carTiming": "",
  2845. "tgs": "",
  2846. "tgwh": "",
  2847. "tgn": "",
  2848. "tgof": "",
  2849. "tgm": "",
  2850. "tga": "",
  2851. "tgtf": "",
  2852. "tgef": "",
  2853. "cfs": "",
  2854. "cfm": "",
  2855. "cfof": "",
  2856. "b": "",
  2857. "l": "",
  2858. "d": "",
  2859. "tbr": "",
  2860. "sgr": "",
  2861. "jS_ES": "",
  2862. "suite": "",
  2863. "accon": "",
  2864. "tv": "",
  2865. "iL": "",
  2866. "if": "",
  2867. "ef": "",
  2868. "b_R_F": "",
  2869. "te": "",
  2870. "tgTips": "",
  2871. "drvTips": "",
  2872. "pc": "",
  2873. "tlf": "",
  2874. "ect": "",
  2875. "id": 1,
  2876. }
  2877. )
  2878. },
  2879. loadData(id) {
  2880. this.costloading = true;
  2881. this.tableData = [];
  2882. var that = this;
  2883. this.$axios.post('/api/Groups/GroupCostInit', {
  2884. Diid: id
  2885. }, {
  2886. headers: {
  2887. 'Authorization': that.token,
  2888. }
  2889. }).then(resp => {
  2890. ////console.log(resp.data.data, '------------------------------------');
  2891. if (resp.data.code == 200) {
  2892. that.options = resp.data.data.groupList;
  2893. that.grouptitleinfo = resp.data.data.groupInfo.data;
  2894. that.diid = that.grouptitleinfo.id;
  2895. localStorage.setItem('costLoadData', JSON.stringify({
  2896. diid: that.diid
  2897. }))
  2898. that.QueryRate();
  2899. for (var i = 0; i < that.CheckBoxListSelect.length; i++) {
  2900. that.CheckBoxListSelect[i].diid = that.diid;
  2901. }
  2902. if (resp.data.data.groupChecks.length > 0) {
  2903. resp.data.data.groupChecks.forEach(item => {
  2904. for (var i = 0; i < that.CheckBoxListSelect.length; i++) {
  2905. if (item.cbType == that.CheckBoxListSelect[i].cbType) {
  2906. that.CheckBoxListSelect[i].cbValues = item.cbValues.split(',');
  2907. ////console.log(item.cbValues.split(','));
  2908. break;
  2909. }
  2910. if (that.CheckBoxListSelect[i].diid == 0) {
  2911. that.CheckBoxListSelect[i].diid = that.diid;
  2912. }
  2913. }
  2914. })
  2915. } else {
  2916. that.CheckBoxListSelect = [
  2917. {
  2918. "diid": that.diid,
  2919. "cbType": "Top",
  2920. "cbValues": ['DAY', 'DATE', 'ITIN', 'VA', 'VT', 'VF', 'VRD', 'T/G S', 'T/G WH', 'C/F M', 'L', 'D', 'SGR', 'SUITE', 'ACCO N', 'T/V', 'EF', 'B/R/F', 'TE', 'DRV T', 'P/C'] //"string"
  2921. },
  2922. {
  2923. "diid": that.diid,
  2924. "cbType": "Left",
  2925. "cbValues": ['签证', '机票', '保险','火车票','地接','公务','零用金'] //"string"
  2926. },
  2927. {
  2928. "diid": that.diid,
  2929. "cbType": "Right",
  2930. "cbValues": ['公务舱 SGR', '经济舱 SGR', '团组预算明细'] //"string"
  2931. }
  2932. ]
  2933. }
  2934. that.grouptitleinfo.visitStartDate = that.grouptitleinfo.visitStartDate.split(' ')[0];
  2935. that.grouptitleinfo.visitEndDate = that.grouptitleinfo.visitEndDate.split(' ')[0];
  2936. that.peopleNumber = that.grouptitleinfo.visitPNumber > 0 ? that.grouptitleinfo.visitPNumber : 1;
  2937. if (resp.data.data.groupCost.length > 0) {
  2938. that.tableData = resp.data.data.groupCost;
  2939. console.log(that.tableData);
  2940. for(var i=0;i<that.tableData.length;i++){
  2941. for (var prop in that.tableData[i]) {
  2942. console.log(that.tableData[i][prop]);
  2943. if(that.tableData[i][prop]==0){
  2944. that.tableData[i][prop]=''
  2945. }
  2946. }
  2947. }
  2948. } else {
  2949. that.tableData = [
  2950. {
  2951. "diid": that.diid,
  2952. "day": "-",
  2953. "date": "",
  2954. "itin": "",
  2955. "carType": "",
  2956. "carCost": "",
  2957. "carNumber": "",
  2958. "carTiming":"",
  2959. "tgs": "",
  2960. "tgwh": "",
  2961. "tgn": "",
  2962. "tgof": "",
  2963. "tgm": "",
  2964. "tga": "",
  2965. "tgtf": "",
  2966. "tgef": "",
  2967. "cfs": "",
  2968. "cfm": "",
  2969. "cfof": "",
  2970. "b": "",
  2971. "l": "",
  2972. "d": "",
  2973. "tbr": "",
  2974. "sgr": "",
  2975. "jS_ES": "",
  2976. "suite": "",
  2977. "accon": "",
  2978. "tv": "",
  2979. "iL": "",
  2980. "if": "",
  2981. "ef": "",
  2982. "b_R_F":"",
  2983. "te": "",
  2984. "tgTips": "",
  2985. "drvTips": "",
  2986. "pc": "",
  2987. "tlf": "",
  2988. "ect": "",
  2989. "id": 1,
  2990. }
  2991. ]
  2992. }
  2993. if (resp.data.data.groupCostParameter.length > 0) {
  2994. var acostvalue = resp.data.data.groupCostParameter.filter(x => x.costType == 'A')[0];
  2995. if (acostvalue != undefined) {
  2996. that.AGroupCostParameter = acostvalue;
  2997. var result = Number(that.AGroupCostParameter.currency);
  2998. if (isNaN(result)) {
  2999. } else {
  3000. that.AGroupCostParameter.currency = result;
  3001. }
  3002. } else {
  3003. that.AGroupCostParameter = {
  3004. "id": 0,
  3005. "diId": 0,
  3006. "currency": "CNY",
  3007. "rate": 0,
  3008. "tax": 0,
  3009. "ffys": 0,
  3010. "hotelXS": 0,
  3011. "jjccb": 0,
  3012. "jjcxs": 0,
  3013. "jjcrs": 0,
  3014. "gwccb": 0,
  3015. "gwcxs": 0,
  3016. "gwcrs": 0,
  3017. "hcpcb": 0,
  3018. "hcpxs": 0,
  3019. "hcprs": 0,
  3020. "cpcb": 0,
  3021. "cpxs": 0,
  3022. "cprs": 0,
  3023. "bxcb": 0,
  3024. "bxxs": 0,
  3025. "bxrs": 0,
  3026. "hscb": 0,
  3027. "hsxs": 0,
  3028. "hsrs": 0,
  3029. "visaCB": 0,
  3030. "visaXS": 0,
  3031. "visaRS": 0,
  3032. "gwcb": 0,
  3033. "gwxs": 0,
  3034. "gwrs": 0,
  3035. "djcb": 0,
  3036. "djrs": 0,
  3037. "djxs": 0,
  3038. "sgrcb": 0,
  3039. "sgrNumber": 0,
  3040. "sgrxs": 0,
  3041. "tbrcb": 0,
  3042. "tbrNumber": 0,
  3043. "tbrxs": 0,
  3044. "jsescb": 0,
  3045. "jsesNumber": 0,
  3046. "jsesxs": 0,
  3047. "suitecb": 0,
  3048. "suiteNumber": 0,
  3049. "suitexs": 0,
  3050. "lyjcb": 0,
  3051. "lyjxs": 0,
  3052. "lyjrs": 0,
  3053. "isShare": 0,
  3054. "costType": "A",
  3055. "costTypeStartTime": "",
  3056. "costTypeendTime": "",
  3057. "costTypenumber": 0
  3058. };
  3059. }
  3060. var bcostvalue = resp.data.data.groupCostParameter.filter(x => x.costType == 'B')[0];
  3061. if (bcostvalue != undefined) {
  3062. that.BGroupCostParameter = bcostvalue;
  3063. } else {
  3064. that.BGroupCostParameter = {
  3065. "id": 0,
  3066. "diId": 0,
  3067. "currency": "",
  3068. "rate": 0,
  3069. "tax": 0,
  3070. "ffys": 0,
  3071. "hotelXS": 0,
  3072. "jjccb": 0,
  3073. "jjcxs": 0,
  3074. "jjcrs": 0,
  3075. "gwccb": 0,
  3076. "gwcxs": 0,
  3077. "gwcrs": 0,
  3078. "hcpcb": 0,
  3079. "hcpxs": 0,
  3080. "hcprs": 0,
  3081. "cpcb": 0,
  3082. "cpxs": 0,
  3083. "cprs": 0,
  3084. "bxcb": 0,
  3085. "bxxs": 0,
  3086. "bxrs": 0,
  3087. "hscb": 0,
  3088. "hsxs": 0,
  3089. "hsrs": 0,
  3090. "visaCB": 0,
  3091. "visaXS": 0,
  3092. "visaRS": 0,
  3093. "gwcb": 0,
  3094. "gwxs": 0,
  3095. "gwrs": 0,
  3096. "djcb": 0,
  3097. "djxs": 0,
  3098. "djrs": 0,
  3099. "sgrcb": 0,
  3100. "sgrNumber": 0,
  3101. "sgrxs": 0,
  3102. "tbrcb": 0,
  3103. "tbrNumber": 0,
  3104. "tbrxs": 0,
  3105. "jsescb": 0,
  3106. "jsesNumber": 0,
  3107. "jsesxs": 0,
  3108. "suitecb": 0,
  3109. "suiteNumber": 0,
  3110. "suitexs": 0,
  3111. "lyjcb": 0,
  3112. "lyjxs": 0,
  3113. "lyjrs": 0,
  3114. "isShare": 0,
  3115. "costType": "B",
  3116. "costTypeStartTime": "",
  3117. "costTypeendTime": "",
  3118. "costTypenumber": 0
  3119. };
  3120. }
  3121. if (resp.data.data.groupCostParameter.length > 1) {
  3122. that.costTypevalue = "B";
  3123. } else {
  3124. that.costTypevalue = "A";
  3125. }
  3126. if (that.AGroupCostParameter.costTypeStartTime) {
  3127. that.AGroupCostParameter.costTypeStartTime = new Date(that.AGroupCostParameter.costTypeStartTime);
  3128. }
  3129. if (that.AGroupCostParameter.costTypeendTime) {
  3130. that.AGroupCostParameter.costTypeendTime = new Date(that.AGroupCostParameter.costTypeendTime);
  3131. }
  3132. if (that.BGroupCostParameter.costTypeStartTime) {
  3133. that.BGroupCostParameter.costTypeStartTime = new Date(that.BGroupCostParameter.costTypeStartTime);
  3134. }
  3135. if (that.BGroupCostParameter.costTypeendTime) {
  3136. that.BGroupCostParameter.costTypeendTime = new Date(that.BGroupCostParameter.costTypeendTime);
  3137. }
  3138. } else {
  3139. that.AGroupCostParameter = {
  3140. "id": 0,
  3141. "diId": 0,
  3142. "currency": "CNY",
  3143. "rate": 0,
  3144. "tax": 0,
  3145. "ffys": 0,
  3146. "hotelXS": 0,
  3147. "jjccb": 0,
  3148. "jjcxs": 0,
  3149. "jjcrs": 0,
  3150. "gwccb": 0,
  3151. "gwcxs": 0,
  3152. "gwcrs": 0,
  3153. "hcpcb": 0,
  3154. "hcpxs": 0,
  3155. "hcprs": 0,
  3156. "cpcb": 0,
  3157. "cpxs": 0,
  3158. "cprs": 0,
  3159. "bxcb": 0,
  3160. "bxxs": 0,
  3161. "bxrs": 0,
  3162. "hscb": 0,
  3163. "hsxs": 0,
  3164. "hsrs": 0,
  3165. "visaCB": 0,
  3166. "visaXS": 0,
  3167. "visaRS": 0,
  3168. "gwcb": 0,
  3169. "gwxs": 0,
  3170. "gwrs": 0,
  3171. "djcb": 0,
  3172. "djrs": 0,
  3173. "djxs": 0,
  3174. "sgrcb": 0,
  3175. "sgrNumber": 0,
  3176. "sgrxs": 0,
  3177. "tbrcb": 0,
  3178. "tbrNumber": 0,
  3179. "tbrxs": 0,
  3180. "jsescb": 0,
  3181. "jsesNumber": 0,
  3182. "jsesxs": 0,
  3183. "suitecb": 0,
  3184. "suiteNumber": 0,
  3185. "suitexs": 0,
  3186. "lyjcb": 0,
  3187. "lyjxs": 0,
  3188. "lyjrs": 0,
  3189. "isShare": 0,
  3190. "costType": "A",
  3191. "costTypeStartTime": "",
  3192. "costTypeendTime": "",
  3193. "costTypenumber": 0
  3194. };
  3195. that.BGroupCostParameter = {
  3196. "id": 0,
  3197. "diId": 0,
  3198. "currency": "",
  3199. "rate": 0,
  3200. "tax": 0,
  3201. "ffys": 0,
  3202. "hotelXS": 0,
  3203. "jjccb": 0,
  3204. "jjcxs": 0,
  3205. "jjcrs": 0,
  3206. "gwccb": 0,
  3207. "gwcxs": 0,
  3208. "gwcrs": 0,
  3209. "hcpcb": 0,
  3210. "hcpxs": 0,
  3211. "hcprs": 0,
  3212. "cpcb": 0,
  3213. "cpxs": 0,
  3214. "cprs": 0,
  3215. "bxcb": 0,
  3216. "bxxs": 0,
  3217. "bxrs": 0,
  3218. "hscb": 0,
  3219. "hsxs": 0,
  3220. "hsrs": 0,
  3221. "visaCB": 0,
  3222. "visaXS": 0,
  3223. "visaRS": 0,
  3224. "gwcb": 0,
  3225. "gwxs": 0,
  3226. "gwrs": 0,
  3227. "djcb": 0,
  3228. "djxs": 0,
  3229. "djrs": 0,
  3230. "sgrcb": 0,
  3231. "sgrNumber": 0,
  3232. "sgrxs": 0,
  3233. "tbrcb": 0,
  3234. "tbrNumber": 0,
  3235. "tbrxs": 0,
  3236. "jsescb": 0,
  3237. "jsesNumber": 0,
  3238. "jsesxs": 0,
  3239. "suitecb": 0,
  3240. "suiteNumber": 0,
  3241. "suitexs": 0,
  3242. "lyjcb": 0,
  3243. "lyjxs": 0,
  3244. "lyjrs": 0,
  3245. "isShare": 0,
  3246. "costType": "B",
  3247. "costTypeStartTime": "",
  3248. "costTypeendTime": "",
  3249. "costTypenumber": 0
  3250. };
  3251. that.AGroupCostParameter.diId = that.diid;
  3252. that.BGroupCostParameter.diId = that.diid;
  3253. that.costTypevalue = 'A';
  3254. }
  3255. let hotelNumber = resp.data.data.hotelNumber;
  3256. if (hotelNumber.length > 0) {
  3257. for (var i = 0; i < hotelNumber.length; i++) {
  3258. //替换costTypeHotelNumbers ;
  3259. Array.forEach(that.costTypeHotelNumbers, (item, index) => {
  3260. if (hotelNumber[i]['type'] == item.type) {
  3261. that.$set(that.costTypeHotelNumbers, index, hotelNumber[i]);
  3262. }
  3263. })
  3264. }
  3265. } else {
  3266. that.costTypeHotelNumbers = [{
  3267. "sgr": 0,
  3268. "tbr": 0,
  3269. "jses": 0,
  3270. "suite": 0,
  3271. "type": "Default",
  3272. "diid": 0,
  3273. id: 0,
  3274. },
  3275. {
  3276. "sgr": 0,
  3277. "tbr": 0,
  3278. "jses": 0,
  3279. "suite": 0,
  3280. "type": "A",
  3281. "diid": 0,
  3282. id: 0,
  3283. },
  3284. {
  3285. "sgr": 0,
  3286. "tbr": 0,
  3287. "jses": 0,
  3288. "suite": 0,
  3289. "type": "B",
  3290. "diid": 0,
  3291. id: 0,
  3292. }]
  3293. }
  3294. if (resp.data.data.visaCountryInfoArr.length > 0) {
  3295. that.visaCountryInfoArr = resp.data.data.visaCountryInfoArr;
  3296. } else {
  3297. that.visaCountryInfoArr = [];
  3298. }
  3299. if (resp.data.data.baoPi.length > 0) {
  3300. //that.sheetDatal
  3301. const baoPi = resp.data.data.baoPi;
  3302. for (var i = 0; i < baoPi.length; i++) {
  3303. for (var j = 0; j < that.equalWhere.length; j++) {
  3304. let item = that.equalWhere[j];
  3305. for (var p in item) {
  3306. if (baoPi[i].type == p) {
  3307. ////console.log("key:" + p + "已经匹配 value:" + item[p]);
  3308. for (var m = 0; m < that.sheetDatal.length; m++) {
  3309. if (that.sheetDatal[m].EnLabel == item[p]) {
  3310. ////console.log(" 1 key:" + that.sheetDatal[m].EnLabel + "已经匹配 1 value:" + baoPi[i].price);
  3311. that.sheetDatal[m].childList[0].tips = baoPi[i].price;
  3312. }
  3313. }
  3314. }
  3315. }
  3316. }
  3317. }
  3318. var Meals = baoPi.filter(x => {
  3319. return x.type == "Meals"
  3320. })
  3321. var Hotel = baoPi.filter(x => {
  3322. return x.type == "Hotel"
  3323. })
  3324. var GongZa = baoPi.filter(x => {
  3325. return x.type == "GongZa"
  3326. })
  3327. var SumAirJJC = baoPi.filter(x => {
  3328. return x.type == "SumAirJJC"
  3329. })
  3330. var SumAirGWC = baoPi.filter(x => {
  3331. return x.type == "SumAirGWC"
  3332. })
  3333. if (SumAirJJC.length > 0) {
  3334. for (var i = 0; i < that.cabinDatal.length; i++) {
  3335. if (that.cabinDatal[i].label.indexOf('经济舱') != -1) {
  3336. that.cabinDatal[i].childList[3].tips = SumAirJJC[0].price
  3337. }
  3338. }
  3339. }
  3340. if (SumAirGWC.length > 0) {
  3341. for (var i = 0; i < that.cabinDatal.length; i++) {
  3342. if (that.cabinDatal[i].label.indexOf('公务舱') != -1) {
  3343. that.cabinDatal[i].childList[3].tips = SumAirGWC[0].price
  3344. }
  3345. }
  3346. }
  3347. if (Meals.length > 0) {
  3348. that.ShowBaoPi.push(Meals[0]);
  3349. }
  3350. if (Hotel.length > 0) {
  3351. that.ShowBaoPi.push(Hotel[0]);
  3352. }
  3353. if (GongZa.length > 0) {
  3354. that.ShowBaoPi.push(GongZa[0]);
  3355. }
  3356. } else {
  3357. for (var m = 0; m < that.sheetDatal.length; m++) {
  3358. if (that.sheetDatal[m].childList[0].tips) {
  3359. that.sheetDatal[m].childList[0].tips = "暂无!";
  3360. }
  3361. }
  3362. for (var i = 0; i < that.cabinDatal.length; i++) {
  3363. if (that.cabinDatal[i].label.indexOf('经济舱') != -1) {
  3364. that.cabinDatal[i].childList[3].tips = '暂无!'
  3365. }
  3366. if (that.cabinDatal[i].label.indexOf('公务舱') != -1) {
  3367. that.cabinDatal[i].childList[3].tips = '暂无!'
  3368. }
  3369. }
  3370. that.ShowBaoPi = [];
  3371. }
  3372. that.GivePeopleNumber();
  3373. }
  3374. that.inSelectChangeCheck();
  3375. that.costloading = false;
  3376. }).catch(err => {
  3377. that.costloading = false;
  3378. this.$message({
  3379. message: '网络异常!',
  3380. type: 'error'
  3381. });
  3382. })
  3383. },
  3384. groupChange() {
  3385. this.clearFormVerify();
  3386. this.loadData(this.diid);
  3387. },
  3388. save() {
  3389. return new Promise(async (resolve, reject) => {
  3390. var that = this;
  3391. var Data = { diid: this.diid, userid: this.userId };
  3392. var isTrue = await this.formVerify();
  3393. if (isTrue) {
  3394. Data.checkBoxs = this.CheckBoxListSelect.map(x => {
  3395. return {
  3396. diid: x.diid,
  3397. cbType: x.cbType,
  3398. cbValues: x.cbValues.join(',')
  3399. };
  3400. });
  3401. Data.groupCosts = this.tableData;
  3402. Data.costTypeHotelNumbers = this.costTypeHotelNumbers.map(x => {
  3403. return {
  3404. id: x.id,
  3405. sgr: x.sgr,
  3406. tbr: x.tbr,
  3407. jses: x.jses,
  3408. suite: x.suite,
  3409. type: x.type,
  3410. diid: that.diid
  3411. };
  3412. });
  3413. this.AGroupCostParameter.currency = this.AGroupCostParameter.currency.toString();
  3414. this.AGroupCostParameter.diId = this.diid;
  3415. this.BGroupCostParameter.diId = this.diid;
  3416. var Aparam = Object.assign({}, this.AGroupCostParameter);
  3417. var Bparam = Object.assign({}, this.BGroupCostParameter);
  3418. if (that.AGroupCostParameter.costTypeStartTime) {
  3419. Aparam.costTypeStartTime = this.addOneDay(that.AGroupCostParameter.costTypeStartTime, 0);
  3420. }
  3421. if (that.AGroupCostParameter.costTypeendTime) {
  3422. Aparam.costTypeendTime = this.addOneDay(that.AGroupCostParameter.costTypeendTime, 0);
  3423. }
  3424. if (that.BGroupCostParameter.costTypeStartTime) {
  3425. Bparam.costTypeStartTime = this.addOneDay(that.BGroupCostParameter.costTypeStartTime, 0);
  3426. }
  3427. if (that.BGroupCostParameter.costTypeendTime) {
  3428. Bparam.costTypeendTime = this.addOneDay(that.BGroupCostParameter.costTypeendTime, 0);
  3429. }
  3430. if (this.costTypevalue == "A") {
  3431. Data.groupCostParameters = [Aparam];
  3432. } else {
  3433. Data.groupCostParameters = [Aparam, Bparam];
  3434. }
  3435. var ResultCostArr = this.Dataformat();
  3436. Data.groupCosts = ResultCostArr;
  3437. ////console.log(Data, "save-------Data");
  3438. var that = this;
  3439. this.$axios.post('/api/Groups/SaveGroupCost', Data, {
  3440. headers: {
  3441. 'Authorization': that.token,
  3442. }
  3443. }).then(resp => {
  3444. ////console.log(resp.data.data, '------------------------------------');
  3445. if (resp.data.code == 200) {
  3446. this.$message({
  3447. message: '保存成功!',
  3448. type: 'success'
  3449. });
  3450. resolve(true);
  3451. } else {
  3452. this.$message.error('保存失败!' + resp.data.msg);
  3453. resolve(false);
  3454. }
  3455. var result = Number(that.AGroupCostParameter.currency);
  3456. if (isNaN(result)) {
  3457. } else {
  3458. that.AGroupCostParameter.currency = result;
  3459. }
  3460. })
  3461. } else {
  3462. this.$message.error('请输入完整!');
  3463. }
  3464. })
  3465. },
  3466. TopChange() {
  3467. },
  3468. calculateZCB(EnLabelParam) {
  3469. if (EnLabelParam == undefined) {
  3470. return 0.00;
  3471. }
  3472. var sum = 0.00;
  3473. if (this.AGroupCostParameter[EnLabelParam + 'CB'] != undefined) {
  3474. sum = (parseFloat(this.AGroupCostParameter[EnLabelParam + 'CB']) * parseInt(this.AGroupCostParameter[EnLabelParam + 'RS']));
  3475. } else if (this.AGroupCostParameter[EnLabelParam + 'cb'] != undefined) {
  3476. sum = (parseFloat(this.AGroupCostParameter[EnLabelParam + 'cb']) * parseInt(this.AGroupCostParameter[EnLabelParam + 'rs'] != undefined ? this.AGroupCostParameter[EnLabelParam + 'rs'] : this.AGroupCostParameter[EnLabelParam + 'Number']));
  3477. }
  3478. if (isNaN(sum)) {
  3479. sum = 0.00;
  3480. }
  3481. return sum.toFixed(2);
  3482. },
  3483. calculateDRBJ(EnLabelParam) {
  3484. if (EnLabelParam == undefined) {
  3485. return 0.00;
  3486. }
  3487. var sum = 0.00;
  3488. if (this.AGroupCostParameter[EnLabelParam + 'CB'] != undefined) {
  3489. sum = (parseFloat(this.AGroupCostParameter[EnLabelParam + 'CB']) * parseFloat(this.AGroupCostParameter[EnLabelParam + 'XS']));
  3490. } else if (this.AGroupCostParameter[EnLabelParam + 'cb'] != undefined) {
  3491. sum = (parseFloat(this.AGroupCostParameter[EnLabelParam + 'cb']) * parseFloat(this.AGroupCostParameter[EnLabelParam + 'xs']));
  3492. }
  3493. if (isNaN(sum)) {
  3494. sum = 0.00;
  3495. }
  3496. return sum.toFixed(2);
  3497. },
  3498. calculateZBJ(EnLabelParam) {
  3499. if (EnLabelParam == undefined) {
  3500. return 0.00;
  3501. }
  3502. var sum = 0.00;
  3503. var drbj = this.calculateDRBJ(EnLabelParam);
  3504. if (this.AGroupCostParameter[EnLabelParam + 'RS'] != undefined) {
  3505. sum = drbj * parseInt(this.AGroupCostParameter[EnLabelParam + 'RS']);
  3506. } else if (this.AGroupCostParameter[EnLabelParam + 'rs'] != undefined) {
  3507. sum = drbj * parseInt(this.AGroupCostParameter[EnLabelParam + 'rs']);
  3508. } else if (this.AGroupCostParameter[EnLabelParam + 'Number'] != undefined) {
  3509. sum = drbj * parseInt(this.AGroupCostParameter[EnLabelParam + 'Number']);
  3510. }
  3511. if (isNaN(sum)) {
  3512. sum = 0.00;
  3513. }
  3514. return sum.toFixed(2);
  3515. },
  3516. calculateDRLR(EnLabelParam) {
  3517. if (EnLabelParam == undefined) {
  3518. return 0.00;
  3519. }
  3520. var sum = 0.00;
  3521. var drbj = this.calculateDRBJ(EnLabelParam);
  3522. if (this.AGroupCostParameter[EnLabelParam + 'CB'] != undefined) {
  3523. sum = (drbj - parseFloat(this.AGroupCostParameter[EnLabelParam + 'CB']));
  3524. } else if (this.AGroupCostParameter[EnLabelParam + 'cb'] != undefined) {
  3525. sum = (drbj - parseFloat(this.AGroupCostParameter[EnLabelParam + 'cb']));
  3526. }
  3527. if (isNaN(sum)) {
  3528. sum = 0.00;
  3529. }
  3530. return sum.toFixed(2);
  3531. },
  3532. calculateZLR(EnLabelParam) {
  3533. if (EnLabelParam == undefined) {
  3534. return 0.00;
  3535. }
  3536. var sum = 0.00;
  3537. var drlr = this.calculateDRLR(EnLabelParam);
  3538. if (this.AGroupCostParameter[EnLabelParam + 'RS'] != undefined) {
  3539. sum = drlr * parseInt(this.AGroupCostParameter[EnLabelParam + 'RS']);
  3540. } else if (this.AGroupCostParameter[EnLabelParam + 'rs'] != undefined) {
  3541. sum = drlr * parseInt(this.AGroupCostParameter[EnLabelParam + 'rs']);
  3542. } else if (this.AGroupCostParameter[EnLabelParam + 'Number'] != undefined) {
  3543. sum = drlr * parseInt(this.AGroupCostParameter[EnLabelParam + 'Number']);
  3544. }
  3545. if (isNaN(sum)) {
  3546. sum = 0.00;
  3547. }
  3548. return sum.toFixed(2);
  3549. },
  3550. BcalculateZCB(EnLabelParam) {
  3551. if (EnLabelParam == undefined) {
  3552. return 0.00;
  3553. }
  3554. var sum = 0.00;
  3555. if (this.BGroupCostParameter[EnLabelParam + 'CB'] != undefined) {
  3556. sum = (parseFloat(this.BGroupCostParameter[EnLabelParam + 'CB']) * parseInt(this.BGroupCostParameter[EnLabelParam + 'RS']));
  3557. } else if (this.BGroupCostParameter[EnLabelParam + 'cb'] != undefined) {
  3558. sum = (parseFloat(this.BGroupCostParameter[EnLabelParam + 'cb']) * parseInt(this.BGroupCostParameter[EnLabelParam + 'rs'] != undefined ? this.BGroupCostParameter[EnLabelParam + 'rs'] : this.BGroupCostParameter[EnLabelParam + 'Number']));
  3559. }
  3560. if (isNaN(sum)) {
  3561. sum = 0.00;
  3562. }
  3563. return sum.toFixed(2);;
  3564. },
  3565. BcalculateDRBJ(EnLabelParam) {
  3566. if (EnLabelParam == undefined) {
  3567. return 0.00;
  3568. }
  3569. var sum = 0.00;
  3570. if (this.BGroupCostParameter[EnLabelParam + 'CB'] != undefined) {
  3571. sum = (parseFloat(this.BGroupCostParameter[EnLabelParam + 'CB']) * parseFloat(this.BGroupCostParameter[EnLabelParam + 'XS']));
  3572. } else if (this.BGroupCostParameter[EnLabelParam + 'cb'] != undefined) {
  3573. sum = (parseFloat(this.BGroupCostParameter[EnLabelParam + 'cb']) * parseFloat(this.BGroupCostParameter[EnLabelParam + 'xs']));
  3574. }
  3575. if (isNaN(sum)) {
  3576. sum = 0.00;
  3577. }
  3578. return sum.toFixed(2);;
  3579. },
  3580. BcalculateZBJ(EnLabelParam) {
  3581. if (EnLabelParam == undefined) {
  3582. return 0.00;
  3583. }
  3584. var sum = 0.00;
  3585. var drbj = this.BcalculateDRBJ(EnLabelParam);
  3586. if (this.BGroupCostParameter[EnLabelParam + 'RS'] != undefined) {
  3587. sum = drbj * parseInt(this.BGroupCostParameter[EnLabelParam + 'RS']);
  3588. } else if (this.BGroupCostParameter[EnLabelParam + 'rs'] != undefined) {
  3589. sum = drbj * parseInt(this.BGroupCostParameter[EnLabelParam + 'rs']);
  3590. } else if (this.BGroupCostParameter[EnLabelParam + 'Number'] != undefined) {
  3591. sum = drbj * parseInt(this.BGroupCostParameter[EnLabelParam + 'Number']);
  3592. }
  3593. if (isNaN(sum)) {
  3594. sum = 0.00;
  3595. }
  3596. return sum.toFixed(2);
  3597. },
  3598. BcalculateDRLR(EnLabelParam) {
  3599. if (EnLabelParam == undefined) {
  3600. return 0.00;
  3601. }
  3602. var sum = 0.00;
  3603. var drbj = this.BcalculateDRBJ(EnLabelParam);
  3604. if (this.BGroupCostParameter[EnLabelParam + 'CB'] != undefined) {
  3605. sum = drbj - parseFloat(this.BGroupCostParameter[EnLabelParam + 'CB']);
  3606. } else if (this.BGroupCostParameter[EnLabelParam + 'cb'] != undefined) {
  3607. sum = drbj - parseFloat(this.BGroupCostParameter[EnLabelParam + 'cb']);
  3608. }
  3609. if (isNaN(sum)) {
  3610. sum = 0.00;
  3611. }
  3612. return sum.toFixed(2);;
  3613. },
  3614. BcalculateZLR(EnLabelParam) {
  3615. if (EnLabelParam == undefined) {
  3616. return 0.00;
  3617. }
  3618. var sum = 0.00;
  3619. var drlr = this.BcalculateDRLR(EnLabelParam);
  3620. if (this.BGroupCostParameter[EnLabelParam + 'RS'] != undefined) {
  3621. sum = drlr * parseInt(this.BGroupCostParameter[EnLabelParam + 'RS']);
  3622. } else if (this.BGroupCostParameter[EnLabelParam + 'rs'] != undefined) {
  3623. sum = drlr * parseInt(this.BGroupCostParameter[EnLabelParam + 'rs']);
  3624. } else if (this.BGroupCostParameter[EnLabelParam + 'Number'] != undefined) {
  3625. sum = drlr * parseInt(this.BGroupCostParameter[EnLabelParam + 'Number']);
  3626. }
  3627. if (isNaN(sum)) {
  3628. sum = 0.00;
  3629. }
  3630. return sum.toFixed(2);;
  3631. },
  3632. handleCurrentChange(val) {
  3633. this.currentPage = val;
  3634. },
  3635. SelChange(row, oldrow) {
  3636. ////console.log(row, oldrow);
  3637. this.dialogSelectObject = row;
  3638. },
  3639. handleSizeChange(val) {
  3640. this.currentPage = 1;
  3641. this.pageSize = val;
  3642. },
  3643. CalculatedPrice() {
  3644. let rate = Number(this.AGroupCostParameter.rate);
  3645. let Djsum = 0;
  3646. let BDjsum = 0;
  3647. var that = this;
  3648. this.DJLables.forEach(function (item) {
  3649. that.sumTopPrice.forEach(function (item1) {
  3650. if (item == item1.label) {
  3651. var Aprice = Number(item1.Aprice);
  3652. if (!isNaN(Aprice)) {
  3653. Djsum += Aprice;
  3654. }
  3655. var Bprice = Number(item1.Bprice);
  3656. if (!isNaN(Bprice)) {
  3657. BDjsum += Bprice;
  3658. }
  3659. }
  3660. })
  3661. })
  3662. Djsum = Number((Djsum * rate).toFixed(2));
  3663. BDjsum = Number((BDjsum * rate).toFixed(2));
  3664. let GWsum = 0;
  3665. let BGWsum = 0;
  3666. this.GwLables.forEach(function (item) {
  3667. that.sumTopPrice.forEach(function (item1) {
  3668. if (item == item1.label) {
  3669. var Aprice = Number(item1.Aprice);
  3670. if (!isNaN(Aprice)) {
  3671. GWsum += Aprice;
  3672. }
  3673. var Bprice = Number(item1.Bprice);
  3674. if (!isNaN(Bprice)) {
  3675. BGWsum += Bprice;
  3676. }
  3677. }
  3678. })
  3679. })
  3680. GWsum = Number((GWsum * rate).toFixed(2));
  3681. BGWsum = Number((BGWsum * rate).toFixed(2));
  3682. let LYJsum = 0;
  3683. let BLYJsum = 0;
  3684. var lyjList = that.sumTopPrice.filter((x) => {
  3685. return x.label == 'P/C';
  3686. })
  3687. if (lyjList.length > 0) {
  3688. LYJsum = lyjList[0].Aprice;
  3689. BLYJsum = lyjList[0].Bprice;
  3690. }
  3691. LYJsum = isNaN(LYJsum) ? 0 : LYJsum;
  3692. BLYJsum = isNaN(BLYJsum) ? 0 : BLYJsum;
  3693. LYJsum = Number((LYJsum * rate).toFixed(2));
  3694. BLYJsum = Number((BLYJsum * rate).toFixed(2));
  3695. let SGRsum = 0;
  3696. let BSGRsum = 0;
  3697. var SGRList = that.sumTopPrice.filter((x) => {
  3698. return x.label == 'SGR';
  3699. })
  3700. if (SGRList.length > 0) {
  3701. SGRsum = SGRList[0].Aprice;
  3702. BSGRsum = SGRList[0].Bprice;
  3703. }
  3704. SGRsum = isNaN(SGRsum) ? 0 : SGRsum;
  3705. BSGRsum = isNaN(BSGRsum) ? 0 : BSGRsum;
  3706. SGRsum = (SGRsum * rate).toFixed(2);
  3707. BSGRsum = (BSGRsum * rate).toFixed(2);
  3708. let TBRsum = 0;
  3709. let BTBRsum = 0;
  3710. var TBRList = that.sumTopPrice.filter((x) => {
  3711. return x.label == 'TBR';
  3712. })
  3713. if (TBRList.length > 0) {
  3714. TBRsum = TBRList[0].Aprice * 2;
  3715. BTBRsum = TBRList[0].Bprice * 2;
  3716. }
  3717. TBRsum = isNaN(TBRsum) ? 0 : TBRsum;
  3718. BTBRsum = isNaN(BTBRsum) ? 0 : BTBRsum;
  3719. TBRsum = (TBRsum * rate).toFixed(2);
  3720. BTBRsum = (BTBRsum * rate).toFixed(2);
  3721. let JSESsum = 0;
  3722. let BJSESsum = 0;
  3723. var JSESList = that.sumTopPrice.filter((x) => {
  3724. return x.label == 'JS/ES';
  3725. })
  3726. if (JSESList.length > 0) {
  3727. JSESsum = JSESList[0].Aprice;
  3728. BJSESsum = JSESList[0].Bprice;
  3729. }
  3730. JSESsum = isNaN(JSESsum) ? 0 : JSESsum;
  3731. BJSESsum = isNaN(BJSESsum) ? 0 : BJSESsum;
  3732. JSESsum = JSESsum * rate;
  3733. BJSESsum = BJSESsum * rate;
  3734. let SUITEsum = 0;
  3735. let BSUITEsum = 0;
  3736. var SUITEList = that.sumTopPrice.filter((x) => {
  3737. return x.label == 'SUITE';
  3738. })
  3739. if (SUITEList.length > 0) {
  3740. SUITEsum = SUITEList[0].Aprice;
  3741. BSUITEsum = SUITEList[0].Bprice;
  3742. }
  3743. SUITEsum = isNaN(SUITEsum) ? 0 : SUITEsum;
  3744. BSUITEsum = isNaN(BSUITEsum) ? 0 : BSUITEsum;
  3745. SUITEsum = SUITEsum * rate;
  3746. BSUITEsum = BSUITEsum * rate;
  3747. // ////console.log(Djsum, GWsum, LYJsum, 'Djsum,GWsum,LYJsum');
  3748. // ////console.log(SGRsum, TBRsum, JSESsum, SUITEsum, 'SGRsum,TBRsum,JSESsum,SUITEsum');
  3749. var sgrfilter = this.costTypeHotelNumbers.filter(x => {
  3750. return x.type == 'Default'
  3751. })
  3752. let Bsgrfilter = {};
  3753. if (this.costTypevalue == 'B') {
  3754. sgrfilter = this.costTypeHotelNumbers.filter(x => {
  3755. return x.type == 'A'
  3756. })
  3757. Bsgrfilter = this.costTypeHotelNumbers.filter(x => {
  3758. return x.type == 'B'
  3759. })
  3760. Bsgrfilter = Bsgrfilter[0];
  3761. }
  3762. sgrfilter = sgrfilter[0];
  3763. let hotelRooms = {
  3764. "SGR": sgrfilter.sgr,
  3765. "TBR": sgrfilter.tbr,
  3766. "JSES": sgrfilter.jses,
  3767. "SUITE": sgrfilter.suite
  3768. };
  3769. let flights = {
  3770. "经济舱": this.AGroupCostParameter.jjcrs,
  3771. "公务舱": this.AGroupCostParameter.gwcrs
  3772. };
  3773. let result = {};
  3774. for (let flight of ["经济舱", "公务舱"]) {
  3775. if (flight === "经济舱") {
  3776. this.matchRooms(hotelRooms, flights, ["SGR", "TBR", "JSES", "SUITE"], flight, result);
  3777. } else if (flight === "公务舱") {
  3778. this.matchRooms(hotelRooms, flights, ["SUITE", "JSES", "SGR", "TBR"], flight, result);
  3779. }
  3780. }
  3781. var rightCheckArr = [];
  3782. if (this.costTypevalue == 'B') {
  3783. let BhotelRooms = {
  3784. "SGR": Bsgrfilter.sgr,
  3785. "TBR": Bsgrfilter.tbr,
  3786. "JSES": Bsgrfilter.jses,
  3787. "SUITE": Bsgrfilter.suite
  3788. };
  3789. let Bflights = {
  3790. "经济舱": this.BGroupCostParameter.jjcrs,
  3791. "公务舱": this.BGroupCostParameter.gwcrs
  3792. };
  3793. let Bresult = {};
  3794. for (let flight of ["经济舱", "公务舱"]) {
  3795. if (flight === "经济舱") {
  3796. this.matchRooms(BhotelRooms, Bflights, ["SGR", "TBR", "JSES", "SUITE"], flight, Bresult);
  3797. } else if (flight === "公务舱") {
  3798. this.matchRooms(BhotelRooms, Bflights, ["SUITE", "JSES", "SGR", "TBR"], flight, Bresult);
  3799. }
  3800. }
  3801. var BtxtJJCSGRRS = (Bresult.hasOwnProperty("经济舱SGR") ? Bresult["经济舱SGR"] : 0)
  3802. var BlblGWCSGRRS = (Bresult.hasOwnProperty("公务舱SGR") ? Bresult["公务舱SGR"] : 0)
  3803. var BtxtJJCTBRRS = (Bresult.hasOwnProperty("经济舱TBR") ? Bresult["经济舱TBR"] * 2 : 0)
  3804. var BtxtGWCJSESRS = (Bresult.hasOwnProperty("公务舱JSES") ? Bresult["公务舱JSES"] : 0)
  3805. var BJJCSUITERS = (Bresult.hasOwnProperty("经济舱SUITE") ? Bresult["经济舱SUITE"] : 0)
  3806. var BtxtGWCSUITERS = (Bresult.hasOwnProperty("公务舱SUITE") ? Bresult["公务舱SUITE"] : 0)
  3807. if(BtxtJJCSGRRS > 0){
  3808. rightCheckArr.push('经济舱 SGR');
  3809. }
  3810. if(BlblGWCSGRRS > 0){
  3811. rightCheckArr.push('公务舱 SGR');
  3812. }
  3813. if(BtxtJJCTBRRS > 0){
  3814. rightCheckArr.push('经济舱 TBR');
  3815. }
  3816. if(BtxtGWCJSESRS > 0){
  3817. rightCheckArr.push('公务舱 JSES');
  3818. }
  3819. if(BJJCSUITERS > 0){
  3820. rightCheckArr.push('经济舱 SUITE');
  3821. }
  3822. if(BtxtGWCSUITERS > 0){
  3823. rightCheckArr.push('公务舱 SUITE');
  3824. }
  3825. this.BcabinDatal[0].sheetInfo[0].toll = BtxtJJCTBRRS;
  3826. this.BcabinDatal[1].sheetInfo[0].toll = BtxtJJCSGRRS;
  3827. this.BcabinDatal[2].sheetInfo[0].toll = BlblGWCSGRRS;
  3828. this.BcabinDatal[3].sheetInfo[0].toll = BtxtGWCJSESRS;
  3829. this.BcabinDatal[4].sheetInfo[0].toll = BtxtGWCSUITERS;
  3830. this.BcabinDatal[5].sheetInfo[0].toll = BJJCSUITERS;
  3831. this.BGroupCostParameter.djcb = BDjsum;
  3832. this.BGroupCostParameter.gwcb = BGWsum;
  3833. this.BGroupCostParameter.lyjcb = BLYJsum;
  3834. this.BGroupCostParameter.sgrcb = BSGRsum;
  3835. this.BGroupCostParameter.tbrcb = BTBRsum;
  3836. this.BGroupCostParameter.jsescb = BJSESsum;
  3837. this.BGroupCostParameter.suitecb = BSUITEsum;
  3838. var BleftSum = this.BOtherCost();
  3839. let BJJCSGR = (BleftSum + Number(this.BGroupCostParameter.sgrcb) + Number(this.BGroupCostParameter.jjccb));
  3840. let BJJCTBR = BleftSum + (Number(this.BGroupCostParameter.tbrcb) / 2) + Number(this.BGroupCostParameter.jjccb);
  3841. let BJJCSUITE = BleftSum + Number(this.BGroupCostParameter.suitecb) + Number(this.BGroupCostParameter.jjccb);
  3842. let BGWCSUITE = (BleftSum + Number(this.BGroupCostParameter.suitecb) + Number(this.BGroupCostParameter.gwccb)).toFixed(2);
  3843. let BGWCSGR = BleftSum + Number(this.BGroupCostParameter.sgrcb) + Number(this.BGroupCostParameter.gwccb);
  3844. let BGWCJSES = BleftSum + Number(this.BGroupCostParameter.jsescb) + Number(this.BGroupCostParameter.gwccb);
  3845. BJJCSGR = BJJCSGR.toFixed(2);
  3846. var BrightSum = 0;
  3847. this.OtherCostPropertyBJ.forEach((x) => {
  3848. BrightSum += Number(that.BcalculateDRBJ(x));
  3849. })
  3850. let BJJCSGRDRBJ = (BrightSum + Number(that.BcalculateDRBJ('jjc')) + Number(that.BcalculateDRBJ('sgr'))).toFixed(2);
  3851. let BJJCTBRDRBJ = BrightSum + (Number(that.BcalculateDRBJ('tbr')) / 2) + Number(that.BcalculateDRBJ('jjc'));
  3852. let BJJCSUITEDRBJ = BrightSum + Number(that.BcalculateDRBJ('suite')) + Number(that.BcalculateDRBJ('jjc'));
  3853. let BGWCSUITEDRBJ = BrightSum + Number(that.BcalculateDRBJ('suite')) + Number(that.BcalculateDRBJ('gwc'));
  3854. let BGWCSGRDRBJ = BrightSum + Number(that.BcalculateDRBJ('sgr')) + Number(that.BcalculateDRBJ('gwc'));
  3855. let BGWCJSESDRBJ = BrightSum + Number(that.BcalculateDRBJ('jses')) + Number(that.BcalculateDRBJ('gwc'));
  3856. this.BcabinDatal[0].sheetInfo[0].costPerson = BJJCTBR;
  3857. this.BcabinDatal[0].sheetInfo[0].singleQuote = BJJCTBRDRBJ;
  3858. this.BcabinDatal[1].sheetInfo[0].costPerson = BJJCSGR;
  3859. this.BcabinDatal[1].sheetInfo[0].singleQuote = BJJCSGRDRBJ;
  3860. this.BcabinDatal[2].sheetInfo[0].costPerson = BGWCSGR;
  3861. this.BcabinDatal[2].sheetInfo[0].singleQuote = BGWCSGRDRBJ;
  3862. this.BcabinDatal[3].sheetInfo[0].costPerson = BGWCJSES;
  3863. this.BcabinDatal[3].sheetInfo[0].singleQuote = BGWCJSESDRBJ;
  3864. this.BcabinDatal[4].sheetInfo[0].costPerson = BGWCSUITE;
  3865. this.BcabinDatal[4].sheetInfo[0].singleQuote = BGWCSUITEDRBJ;
  3866. this.BcabinDatal[5].sheetInfo[0].costPerson = BJJCSUITE;
  3867. this.BcabinDatal[5].sheetInfo[0].singleQuote = BJJCSUITEDRBJ;
  3868. }
  3869. var txtJJCSGRRS = (result.hasOwnProperty("经济舱SGR") ? result["经济舱SGR"] : 0)
  3870. var lblGWCSGRRS = (result.hasOwnProperty("公务舱SGR") ? result["公务舱SGR"] : 0)
  3871. var txtJJCTBRRS = (result.hasOwnProperty("经济舱TBR") ? result["经济舱TBR"] * 2 : 0)
  3872. var txtGWCJSESRS = (result.hasOwnProperty("公务舱JSES") ? result["公务舱JSES"] : 0)
  3873. var JJCSUITERS = (result.hasOwnProperty("经济舱SUITE") ? result["经济舱SUITE"] : 0)
  3874. var txtGWCSUITERS = (result.hasOwnProperty("公务舱SUITE") ? result["公务舱SUITE"] : 0)
  3875. if(txtJJCSGRRS > 0){
  3876. rightCheckArr.push('经济舱 SGR');
  3877. }
  3878. if(lblGWCSGRRS > 0){
  3879. rightCheckArr.push('公务舱 SGR');
  3880. }
  3881. if(txtJJCTBRRS > 0){
  3882. rightCheckArr.push('经济舱 TBR');
  3883. }
  3884. if(txtGWCJSESRS > 0){
  3885. rightCheckArr.push('公务舱 JSES');
  3886. }
  3887. if(JJCSUITERS > 0){
  3888. rightCheckArr.push('经济舱 SUITE');
  3889. }
  3890. if(txtGWCSUITERS > 0){
  3891. rightCheckArr.push('公务舱 SUITE');
  3892. }
  3893. rightCheckArr.push('团组预算明细');
  3894. rightCheckArr = [...new Set(rightCheckArr)];
  3895. try{
  3896. console.log('rightCheckArr',rightCheckArr);
  3897. this.CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues = rightCheckArr;
  3898. }catch(e){}
  3899. this.cabinDatal[0].sheetInfo[0].toll = txtJJCTBRRS;
  3900. this.cabinDatal[1].sheetInfo[0].toll = txtJJCSGRRS;
  3901. this.cabinDatal[2].sheetInfo[0].toll = lblGWCSGRRS;
  3902. this.cabinDatal[3].sheetInfo[0].toll = txtGWCJSESRS;
  3903. this.cabinDatal[4].sheetInfo[0].toll = txtGWCSUITERS;
  3904. this.cabinDatal[5].sheetInfo[0].toll = JJCSUITERS;
  3905. this.AGroupCostParameter.djcb = Djsum;
  3906. this.AGroupCostParameter.gwcb = GWsum;
  3907. this.AGroupCostParameter.lyjcb = LYJsum;
  3908. this.AGroupCostParameter.sgrcb = SGRsum;
  3909. this.AGroupCostParameter.tbrcb = TBRsum;
  3910. this.AGroupCostParameter.jsescb = JSESsum;
  3911. this.AGroupCostParameter.suitecb = SUITEsum;
  3912. var leftSum = this.OtherCost();
  3913. let JJCSGR = (leftSum + Number(this.AGroupCostParameter.sgrcb) + Number(this.AGroupCostParameter.jjccb)).toFixed(2);
  3914. let JJCTBR = (leftSum + (Number(this.AGroupCostParameter.tbrcb) / 2) + Number(this.AGroupCostParameter.jjccb)).toFixed(2);
  3915. let JJCSUITE = (leftSum + Number(this.AGroupCostParameter.suitecb) + Number(this.AGroupCostParameter.jjccb)).toFixed(2);
  3916. let GWCSUITE = (leftSum + Number(this.AGroupCostParameter.suitecb) + Number(this.AGroupCostParameter.gwccb)).toFixed(2);
  3917. let GWCSGR = (leftSum + Number(this.AGroupCostParameter.sgrcb) + Number(this.AGroupCostParameter.gwccb)).toFixed(2);
  3918. let GWCJSES = (leftSum + Number(this.AGroupCostParameter.jsescb) + Number(this.AGroupCostParameter.gwccb)).toFixed(2);
  3919. //////console.log(JJCSGR, JJCTBR, JJCSUITE, GWCSUITE, GWCSGR, GWCJSES, '666--------------------------');
  3920. var rightSum = 0;
  3921. this.OtherCostPropertyBJ.forEach((x) => {
  3922. rightSum += Number(that.calculateDRBJ(x));
  3923. })
  3924. let JJCSGRDRBJ = (rightSum + Number(that.calculateDRBJ('jjc')) + Number(that.calculateDRBJ('sgr'))).toFixed(2);
  3925. let JJCTBRDRBJ = (rightSum + (Number(that.calculateDRBJ('tbr')) / 2) + Number(that.calculateDRBJ('jjc'))).toFixed(2);
  3926. let JJCSUITEDRBJ = (rightSum + Number(that.calculateDRBJ('suite')) + Number(that.calculateDRBJ('jjc'))).toFixed(2);
  3927. let GWCSUITEDRBJ = (rightSum + Number(that.calculateDRBJ('suite')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);
  3928. let GWCSGRDRBJ = (rightSum + Number(that.calculateDRBJ('sgr')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);
  3929. let GWCJSESDRBJ = (rightSum + Number(that.calculateDRBJ('jses')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);
  3930. this.cabinDatal[0].sheetInfo[0].costPerson = JJCTBR;
  3931. this.cabinDatal[0].sheetInfo[0].singleQuote = JJCTBRDRBJ;
  3932. this.cabinDatal[1].sheetInfo[0].costPerson = JJCSGR;
  3933. this.cabinDatal[1].sheetInfo[0].singleQuote = JJCSGRDRBJ;
  3934. this.cabinDatal[2].sheetInfo[0].costPerson = GWCSGR;
  3935. this.cabinDatal[2].sheetInfo[0].singleQuote = GWCSGRDRBJ;
  3936. this.cabinDatal[3].sheetInfo[0].costPerson = GWCJSES;
  3937. this.cabinDatal[3].sheetInfo[0].singleQuote = GWCJSESDRBJ;
  3938. this.cabinDatal[4].sheetInfo[0].costPerson = GWCSUITE;
  3939. this.cabinDatal[4].sheetInfo[0].singleQuote = GWCSUITEDRBJ;
  3940. this.cabinDatal[5].sheetInfo[0].costPerson = JJCSUITE;
  3941. this.cabinDatal[5].sheetInfo[0].singleQuote = JJCSUITEDRBJ;
  3942. let groupCosts = 0;
  3943. let gtroupQuotes = 0;
  3944. for (var i = 0; i < this.cabinDatal.length; i++) {
  3945. var forNumber = Number(this.cabinDatal[i].sheetInfo[0]['toll']);
  3946. if (!isNaN(forNumber) && forNumber > 0) {
  3947. groupCosts += (Number(this.cabinDatal[i].sheetInfo[0]['costPerson']) * forNumber);
  3948. gtroupQuotes += (Number(this.cabinDatal[i].sheetInfo[0]['singleQuote']) * forNumber);
  3949. }
  3950. }
  3951. if (this.costTypevalue == 'B') {
  3952. for (var i = 0; i < this.BcabinDatal.length; i++) {
  3953. var forNumber = Number(this.BcabinDatal[i].sheetInfo[0]['toll']);
  3954. if (!isNaN(forNumber) && forNumber > 0) {
  3955. groupCosts += (Number(this.BcabinDatal[i].sheetInfo[0]['costPerson']) * forNumber);
  3956. gtroupQuotes += (Number(this.BcabinDatal[i].sheetInfo[0]['singleQuote']) * forNumber);
  3957. }
  3958. }
  3959. }
  3960. let groupProfit = gtroupQuotes - groupCosts;
  3961. var cabinDatalLast = this.cabinDatal.filter(function (x) {
  3962. return x.label == '团组预算明细'
  3963. })
  3964. groupCosts = groupCosts.toFixed(2);
  3965. gtroupQuotes = gtroupQuotes.toFixed(2);
  3966. groupProfit = groupProfit.toFixed(2);
  3967. cabinDatalLast[0].sheetInfo[0]['groupCosts'] = groupCosts;
  3968. cabinDatalLast[0].sheetInfo[0]['gtroupQuotes'] = gtroupQuotes;
  3969. cabinDatalLast[0].sheetInfo[0]['groupProfit'] = groupProfit;
  3970. //costTypeHotelNumbers{
  3971. // "sgr": 0,
  3972. // "tbr": 0,
  3973. // "jses": 0,
  3974. // "suite": 0,
  3975. // "type": "Default",
  3976. // "diid": 0,
  3977. // id: 0,
  3978. // }
  3979. //////console.log(groupCosts, gtroupQuotes, groupProfit, 'groupCosts, gtroupQuotes, groupProfit');
  3980. },
  3981. OtherCost() {
  3982. // txtVisaCost.Text +txtHCPCB.Text + txtCPCB.Text
  3983. // txtBXCB.Text +txtHSCB.Text) +lblDJDRCB.Text + lblGWDRCD.Text + lblLYJDRCB.Text
  3984. var that = this;
  3985. let sum = 0;
  3986. this.OtherCostProperty.forEach((x) => {
  3987. var param = that.AGroupCostParameter[x];
  3988. if (param != undefined) {
  3989. sum += Number(param);
  3990. }
  3991. })
  3992. return sum;
  3993. },
  3994. BOtherCost() {
  3995. // txtVisaCost.Text +txtHCPCB.Text + txtCPCB.Text
  3996. // txtBXCB.Text +txtHSCB.Text) +lblDJDRCB.Text + lblGWDRCD.Text + lblLYJDRCB.Text
  3997. var that = this;
  3998. let sum = 0;
  3999. this.OtherCostProperty.forEach((x) => {
  4000. var param;
  4001. if (x == 'visaCB' || x == 'bxcb') {
  4002. param = that.AGroupCostParameter[x];
  4003. } else {
  4004. param = that.BGroupCostParameter[x];
  4005. }
  4006. if (param != undefined) {
  4007. sum += Number(param);
  4008. }
  4009. })
  4010. return sum;
  4011. },
  4012. matchRooms(hotelRooms, flights, roomTypes, flightType, result) {
  4013. for (let roomType of roomTypes) {
  4014. while (hotelRooms[roomType] > 0 && flights[flightType] > 0) {
  4015. hotelRooms[roomType]--;
  4016. flights[flightType]--;
  4017. if (roomType === "TBR") {
  4018. flights[flightType]--; //双人间在减少1
  4019. }
  4020. if (result.hasOwnProperty(flightType + roomType)) {
  4021. result[flightType + roomType]++;
  4022. } else {
  4023. result[flightType + roomType] = 1;
  4024. }
  4025. }
  4026. }
  4027. },
  4028. NumberSetTime(number, index) {
  4029. ////console.log(number, index, this.grouptitleinfo.visitStartDate);
  4030. number = parseInt(number);
  4031. if (!isNaN(number)) {
  4032. var time = this.addOneDay(this.grouptitleinfo.visitStartDate, number - 1)
  4033. this.tableData[index].date = time;
  4034. } else {
  4035. this.tableData[index].date = '';
  4036. this.tableData[index].day = '';
  4037. }
  4038. },
  4039. addOneDay(dateString, number) {
  4040. if (!dateString) {
  4041. return "";
  4042. }
  4043. let date = new Date(dateString);
  4044. date.setDate(date.getDate() + number);
  4045. let year = date.getFullYear();
  4046. let month = date.getMonth() + 1;
  4047. let day = date.getDate();
  4048. month = month < 10 ? '0' + month : month;
  4049. day = day < 10 ? '0' + day : day;
  4050. return `${year}-${month}-${day}`;
  4051. },
  4052. costTypeSelect(val) {
  4053. ////console.log('costTypeSelect--------------------------------------------------------', val);
  4054. },
  4055. async formVerify() {
  4056. return new Promise((resolve, reject) => {
  4057. var forFormList = [];
  4058. if (this.costTypevalue == 'A') {
  4059. forFormList = ['inputs', 'DHotel'];
  4060. } else {
  4061. forFormList = ['inputs', 'AHotel', 'Asection', 'BHotel', 'Bsection'];
  4062. }
  4063. var that = this;
  4064. for (var i = 0; i < forFormList.length; i++) {
  4065. that.$refs[forFormList[i]].validate((valid) => {
  4066. if (valid) {
  4067. } else {
  4068. resolve(valid);
  4069. }
  4070. });
  4071. }
  4072. resolve(true);
  4073. })
  4074. },
  4075. clearFormVerify() {
  4076. var forFormList = ['inputs', 'AHotel', 'Asection', 'BHotel', 'Bsection', 'DHotel'];
  4077. this.$nextTick(() => {
  4078. for (var i = 0; i < forFormList.length; i++) {
  4079. this.$refs[forFormList[i]].resetFields();
  4080. }
  4081. })
  4082. },
  4083. topcheckboxChange(val, label) {
  4084. // console.log(val, label, 'topcheckboxChangeval');
  4085. var that = this;
  4086. if (!val) {
  4087. this.$confirm('此操作将清空整列数据, 是否继续?', '提示', {
  4088. confirmButtonText: '确定',
  4089. cancelButtonText: '取消',
  4090. type: 'warning'
  4091. }).then(() => {
  4092. if(label=='SGR'){
  4093. this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0].sgr=0
  4094. }
  4095. if(label=='TBR'){
  4096. this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0].tbr=0
  4097. }
  4098. if(label=='JS/ES'){
  4099. this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0].jses=0
  4100. }
  4101. if(label=='SUITE'){
  4102. this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0].suite=0
  4103. }
  4104. ////console.log('确定清空数据');
  4105. var fliterList = this.sumTopPrice.filter(x => x.label == label);
  4106. if (fliterList.length != 0) {
  4107. fliterList[0].Aprice = 0;
  4108. fliterList[0].Bprice = 0;
  4109. }
  4110. fliterList = that.tableLabel.filter(x => x.label == label);
  4111. if (fliterList.length != 0) {
  4112. var obj = {
  4113. "diid": that.diid,
  4114. "day": "-",
  4115. "date": "",
  4116. "itin": "",
  4117. "carType": "",
  4118. "carCost": "",
  4119. "carNumber": "",
  4120. "carTiming": "",
  4121. "tgs": "",
  4122. "tgwh": "",
  4123. "tgn": "",
  4124. "tgof": "",
  4125. "tgm": "",
  4126. "tga": "",
  4127. "tgtf": "",
  4128. "tgef": "",
  4129. "cfs": "",
  4130. "cfm": "",
  4131. "cfof": "",
  4132. "b": "",
  4133. "l": "",
  4134. "d": "",
  4135. "tbr": "",
  4136. "sgr": "",
  4137. "jS_ES": "",
  4138. "suite": "",
  4139. "accon": "",
  4140. "tv": "",
  4141. "iL": "",
  4142. "if": "",
  4143. "ef": "",
  4144. "b_R_F": "",
  4145. "te": "",
  4146. "tgTips": "",
  4147. "drvTips": "",
  4148. "pc": "",
  4149. "tlf": "",
  4150. "ect": "",
  4151. "id": 1,
  4152. };
  4153. var prop = fliterList[0].prop;
  4154. var initval = obj[prop];
  4155. for (var i = 0; i < that.tableData.length; i++) {
  4156. that.tableData[i][prop] = initval;
  4157. }
  4158. ////console.log(that.tableData, 'that.tableData数据');
  4159. }
  4160. this.$message({
  4161. message: '已清除!',
  4162. type: 'success',
  4163. offset: 50
  4164. });
  4165. }).catch(() => {
  4166. this.$message({
  4167. type: 'info',
  4168. message: '已取消操作'
  4169. });
  4170. if (!that.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(label)) {
  4171. that.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.push(label);
  4172. }
  4173. });
  4174. }
  4175. },
  4176. GroupIsShare() {
  4177. this.$axios.post('/api/Groups/GroupIsShare', { diid: this.diid }, {
  4178. headers: {
  4179. 'Authorization': this.token,
  4180. }
  4181. }).then(resp => {
  4182. ////console.log(resp.data.data, '------------------------------------');
  4183. if (resp.data.code == 200) {
  4184. this.$message({
  4185. message: '操作成功!' + resp.data.msg,
  4186. type: 'success'
  4187. });
  4188. } else {
  4189. this.$message.error('操作失败!' + resp.data.msg);
  4190. }
  4191. })
  4192. },
  4193. GetPriceCheckWord() {
  4194. var that = this;
  4195. var airs = [
  4196. ];
  4197. var sgrfilter = this.costTypeHotelNumbers.filter(x => {
  4198. return x.type == 'Default'
  4199. })
  4200. let Bsgrfilter = {};
  4201. if (this.costTypevalue == 'B') {
  4202. sgrfilter = this.costTypeHotelNumbers.filter(x => {
  4203. return x.type == 'A'
  4204. })
  4205. Bsgrfilter = this.costTypeHotelNumbers.filter(x => {
  4206. return x.type == 'B'
  4207. })
  4208. Bsgrfilter = Bsgrfilter[0];
  4209. }
  4210. sgrfilter = sgrfilter[0];
  4211. let hotelRooms = {
  4212. "SGR": sgrfilter.sgr,
  4213. "TBR": sgrfilter.tbr,
  4214. "JSES": sgrfilter.jses,
  4215. "SUITE": sgrfilter.suite
  4216. };
  4217. let flights = {
  4218. "经济舱": this.AGroupCostParameter.jjcrs,
  4219. "公务舱": this.AGroupCostParameter.gwcrs
  4220. };
  4221. let result = {};
  4222. for (let flight of ["经济舱", "公务舱"]) {
  4223. if (flight === "经济舱") {
  4224. this.matchRooms(hotelRooms, flights, ["SGR", "TBR", "JSES", "SUITE"], flight, result);
  4225. } else if (flight === "公务舱") {
  4226. this.matchRooms(hotelRooms, flights, ["SUITE", "JSES", "SGR", "TBR"], flight, result);
  4227. }
  4228. }
  4229. if (this.costTypevalue == 'B') {
  4230. let BhotelRooms = {
  4231. "SGR": Bsgrfilter.sgr,
  4232. "TBR": Bsgrfilter.tbr,
  4233. "JSES": Bsgrfilter.jses,
  4234. "SUITE": Bsgrfilter.suite
  4235. };
  4236. let Bflights = {
  4237. "经济舱": this.BGroupCostParameter.jjcrs,
  4238. "公务舱": this.BGroupCostParameter.gwcrs
  4239. };
  4240. let Bresult = {};
  4241. for (let flight of ["经济舱", "公务舱"]) {
  4242. if (flight === "经济舱") {
  4243. this.matchRooms(BhotelRooms, Bflights, ["SGR", "TBR", "JSES", "SUITE"], flight, Bresult);
  4244. } else if (flight === "公务舱") {
  4245. this.matchRooms(BhotelRooms, Bflights, ["SUITE", "JSES", "SGR", "TBR"], flight, Bresult);
  4246. }
  4247. }
  4248. var BtxtJJCSGRRS = (Bresult.hasOwnProperty("经济舱SGR") ? Bresult["经济舱SGR"] : 0)
  4249. var BlblGWCSGRRS = (Bresult.hasOwnProperty("公务舱SGR") ? Bresult["公务舱SGR"] : 0)
  4250. var BtxtJJCTBRRS = (Bresult.hasOwnProperty("经济舱TBR") ? Bresult["经济舱TBR"] * 2 : 0)
  4251. var BtxtGWCJSESRS = (Bresult.hasOwnProperty("公务舱JSES") ? Bresult["公务舱JSES"] : 0)
  4252. var BJJCSUITERS = (Bresult.hasOwnProperty("经济舱SUITE") ? Bresult["经济舱SUITE"] : 0)
  4253. var BtxtGWCSUITERS = (Bresult.hasOwnProperty("公务舱SUITE") ? Bresult["公务舱SUITE"] : 0)
  4254. var BrightSum = 0;
  4255. this.OtherCostPropertyBJ.forEach((x) => {
  4256. BrightSum += Number(that.BcalculateDRBJ(x));
  4257. })
  4258. let BJJCSGRDRBJ = BrightSum + Number(that.BcalculateDRBJ('jjc')) + Number(that.BcalculateDRBJ('sgr'));
  4259. let BJJCTBRDRBJ = BrightSum + (Number(that.BcalculateDRBJ('tbr')) / 2) + Number(that.BcalculateDRBJ('jjc'));
  4260. let BJJCSUITEDRBJ = BrightSum + Number(that.BcalculateDRBJ('suite')) + Number(that.BcalculateDRBJ('jjc'));
  4261. let BGWCSUITEDRBJ = BrightSum + Number(that.BcalculateDRBJ('suite')) + Number(that.BcalculateDRBJ('gwc'));
  4262. let BGWCSGRDRBJ = BrightSum + Number(that.BcalculateDRBJ('sgr')) + Number(that.BcalculateDRBJ('gwc'));
  4263. let BGWCJSESDRBJ = BrightSum + Number(that.BcalculateDRBJ('jses')) + Number(that.BcalculateDRBJ('gwc'));
  4264. airs.push({
  4265. "code": "JJCTBR",
  4266. "number": BtxtJJCTBRRS,
  4267. "price": BJJCTBRDRBJ,
  4268. "costType": "B"
  4269. });
  4270. airs.push({
  4271. "code": "JJCSGR",
  4272. "number": BtxtJJCSGRRS,
  4273. "price": BJJCSGRDRBJ,
  4274. "costType": "B"
  4275. });
  4276. airs.push({
  4277. "code": "GWCSGR",
  4278. "number": BlblGWCSGRRS,
  4279. "price": BGWCSGRDRBJ,
  4280. "costType": "B"
  4281. });
  4282. airs.push({
  4283. "code": "GWCJSES",
  4284. "number": BtxtGWCJSESRS,
  4285. "price": BGWCJSESDRBJ,
  4286. "costType": "B"
  4287. });
  4288. airs.push({
  4289. "code": "GWCSUITE",
  4290. "number": BtxtGWCSUITERS,
  4291. "price": BGWCSUITEDRBJ,
  4292. "costType": "B"
  4293. });
  4294. airs.push({
  4295. "code": "JJCSUITE",
  4296. "number": BJJCSUITERS,
  4297. "price": BJJCSUITEDRBJ,
  4298. "costType": "B"
  4299. });
  4300. }
  4301. var txtJJCSGRRS = (result.hasOwnProperty("经济舱SGR") ? result["经济舱SGR"] : 0)
  4302. var lblGWCSGRRS = (result.hasOwnProperty("公务舱SGR") ? result["公务舱SGR"] : 0)
  4303. var txtJJCTBRRS = (result.hasOwnProperty("经济舱TBR") ? result["经济舱TBR"] * 2 : 0)
  4304. var txtGWCJSESRS = (result.hasOwnProperty("公务舱JSES") ? result["公务舱JSES"] : 0)
  4305. var JJCSUITERS = (result.hasOwnProperty("经济舱SUITE") ? result["经济舱SUITE"] : 0)
  4306. var txtGWCSUITERS = (result.hasOwnProperty("公务舱SUITE") ? result["公务舱SUITE"] : 0)
  4307. var rightSum = 0;
  4308. this.OtherCostPropertyBJ.forEach((x) => {
  4309. rightSum += Number(that.calculateDRBJ(x));
  4310. })
  4311. let JJCSGRDRBJ = (rightSum + Number(that.calculateDRBJ('jjc')) + Number(that.calculateDRBJ('sgr'))).toFixed(2);
  4312. let JJCTBRDRBJ = (rightSum + (Number(that.calculateDRBJ('tbr')) / 2) + Number(that.calculateDRBJ('jjc'))).toFixed(2);
  4313. let JJCSUITEDRBJ = (rightSum + Number(that.calculateDRBJ('suite')) + Number(that.calculateDRBJ('jjc'))).toFixed(2);
  4314. let GWCSUITEDRBJ = (rightSum + Number(that.calculateDRBJ('suite')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);
  4315. let GWCSGRDRBJ = (rightSum + Number(that.calculateDRBJ('sgr')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);
  4316. let GWCJSESDRBJ = (rightSum + Number(that.calculateDRBJ('jses')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);
  4317. airs.push({
  4318. "code": "JJCTBR",
  4319. "number": txtJJCTBRRS,
  4320. "price": JJCTBRDRBJ,
  4321. "costType": "A"
  4322. });
  4323. airs.push({
  4324. "code": "JJCSGR",
  4325. "number": txtJJCSGRRS,
  4326. "price": JJCSGRDRBJ,
  4327. "costType": "A"
  4328. });
  4329. airs.push({
  4330. "code": "GWCSGR",
  4331. "number": lblGWCSGRRS,
  4332. "price": GWCSGRDRBJ,
  4333. "costType": "A"
  4334. });
  4335. airs.push({
  4336. "code": "GWCJSES",
  4337. "number": txtGWCJSESRS,
  4338. "price": GWCJSESDRBJ,
  4339. "costType": "A"
  4340. });
  4341. airs.push({
  4342. "code": "GWCSUITE",
  4343. "number": txtGWCSUITERS,
  4344. "price": GWCSUITEDRBJ,
  4345. "costType": "A"
  4346. });
  4347. airs.push({
  4348. "code": "JJCSUITE",
  4349. "number": JJCSUITERS,
  4350. "price": JJCSUITEDRBJ,
  4351. "costType": "A"
  4352. });
  4353. var that = this;
  4354. this.$axios.post('/api/Groups/ExportPriceCheckWordFile', { diid: this.diid, airs: airs }, {
  4355. headers: {
  4356. 'Authorization': this.token,
  4357. }
  4358. }).then(resp => {
  4359. ////console.log(resp, '------------------------------------');
  4360. try {
  4361. if (resp.data.code != 200) {
  4362. throw resp.data.msg;
  4363. }
  4364. var file = resp.data.data;
  4365. that.fileDownload(file.data, file.strFileName);
  4366. } catch (error) {
  4367. this.$message.error('操作失败!' + error.message);
  4368. }
  4369. })
  4370. },
  4371. fileDownload(data, filename) {
  4372. let blob = this.base64toBlob(data);
  4373. let link = document.createElement('a');
  4374. link.href = window.URL.createObjectURL(blob);
  4375. link.download = filename;
  4376. link.click();
  4377. },
  4378. base64toBlob(base64, type = 'application/octet-stream') {
  4379. const bstr = atob(base64);
  4380. let n = bstr.length;
  4381. const u8arr = new Uint8Array(n);
  4382. while (n--) {
  4383. u8arr[n] = bstr.charCodeAt(n);
  4384. }
  4385. return new Blob([u8arr], { type });
  4386. },
  4387. async GetGroupCostExcel() {
  4388. ////console.log(this.titleText, 'this.titleText');
  4389. var isTrue = await this.save();
  4390. if (!isTrue) {
  4391. this.$message.error('请检查数据!');
  4392. return;
  4393. }
  4394. var that = this;
  4395. var group = this.options.filter(function (x) {
  4396. return x.id == that.diid
  4397. })
  4398. if (group.length == 0) {
  4399. this.$message.error('请选择团组!' + resp.data.msg);
  4400. return;
  4401. }
  4402. var resultCurr = Number(this.AGroupCostParameter.currency);
  4403. if (isNaN(resultCurr)) {
  4404. resultCurr = this.AGroupCostParameter.currency;
  4405. } else {
  4406. for (let index = 0; index < this.currencyOption.length; index++) {
  4407. if (this.currencyOption[index].currencyId == resultCurr) {
  4408. resultCurr = this.currencyOption[index].currencyCode;
  4409. }
  4410. }
  4411. }
  4412. var data = {
  4413. diid: this.diid,
  4414. costType: this.costTypevalue,
  4415. title: {
  4416. groupNumber: Number(this.grouptitleinfo.visitPNumber),
  4417. teamName: group[0].groupName,
  4418. tax: this.AGroupCostParameter.tax,
  4419. currency: resultCurr,
  4420. rate: this.AGroupCostParameter.rate
  4421. },
  4422. leftInfo: {
  4423. },
  4424. rightInfo: {
  4425. },
  4426. titleModel: {
  4427. }
  4428. };
  4429. var leftObject = this.GetDomLeftValue();
  4430. var rightObject = this.GetDomRightValue();
  4431. data.leftInfo = leftObject;
  4432. data.rightInfo = rightObject;
  4433. data.titleModel = this.titleText;
  4434. ////console.log(data);
  4435. this.$axios.post('/api/Groups/ExportGroupCostExcelFile', data, {
  4436. headers: {
  4437. 'Authorization': this.token,
  4438. }
  4439. }).then(resp => {
  4440. ////console.log(resp, '------------------------------------');
  4441. if (resp.data.code == 200) {
  4442. var file = resp.data.data;
  4443. that.fileDownload(file.data, file.strFileName);
  4444. } else {
  4445. that.$message.error('操作失败!' + resp.data.msg);
  4446. }
  4447. })
  4448. },
  4449. GetDomLeftValue() {
  4450. var AllResult = [];
  4451. var boxDoms = document.querySelectorAll(".sheet-box .biaoge");
  4452. var titleClassName = 'el-table__header-wrapper';
  4453. var bodyClassName = 'el-table__body-wrapper';
  4454. var result = [];
  4455. for (var i = 0; i < boxDoms.length; i++) {
  4456. var chiBoxs = boxDoms[i].children[0].children;
  4457. var info = {};
  4458. info.index = i;
  4459. for (var j = 0; j < chiBoxs.length; j++) {
  4460. if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
  4461. info.title = chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
  4462. } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
  4463. var title = info.title;
  4464. if (title.indexOf('酒店') != -1 || title.indexOf('地接') != -1 || title.indexOf('公务单人') != -1 || title.indexOf('零用金') != -1) {
  4465. info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span').innerText : '0';
  4466. } else {
  4467. info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input').value : '0';
  4468. }
  4469. info.rs = chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input').value : '0';
  4470. info.xs = chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input').value : '0';
  4471. }
  4472. }
  4473. result.push(info)
  4474. }
  4475. AllResult.push({ type: "A", leftinfoNumber: result })
  4476. if (this.costTypevalue == 'B') {
  4477. var boxDoms = document.querySelectorAll(".sheet-box .biaogeB");
  4478. var result = [];
  4479. for (var i = 0; i < boxDoms.length; i++) {
  4480. var chiBoxs = boxDoms[i].children[0].children;
  4481. var info = {};
  4482. info.index = i;
  4483. for (var j = 0; j < chiBoxs.length; j++) {
  4484. if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
  4485. info.title = chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
  4486. } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
  4487. var title = info.title;
  4488. if (title.indexOf('酒店') != -1 || title.indexOf('地接') != -1 || title.indexOf('公务单人') != -1 || title.indexOf('零用金') != -1) {
  4489. info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span').innerText : '0';
  4490. } else {
  4491. info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input').value : '0';
  4492. }
  4493. info.rs = chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input').value : '0';
  4494. info.xs = chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input').value : '0';
  4495. }
  4496. }
  4497. result.push(info)
  4498. }
  4499. AllResult.push({ type: "B", leftinfoNumber: result })
  4500. }
  4501. return AllResult;
  4502. },
  4503. GetDomRightValue() {
  4504. var AllResult = [];
  4505. var boxDoms = document.querySelectorAll(".cabin-li .biaoge");
  4506. var titleClassName = 'el-table__header-wrapper';
  4507. var bodyClassName = 'el-table__body-wrapper';
  4508. var result = [];
  4509. for (var i = 0; i < boxDoms.length - 1; i++) {
  4510. var chiBoxs = boxDoms[i].children[1].children;
  4511. var info = {};
  4512. info.index = i;
  4513. for (var j = 0; j < chiBoxs.length; j++) {
  4514. if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
  4515. info.title = boxDoms[i].children[0].innerText + chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
  4516. } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
  4517. info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span').innerText : '0';
  4518. info.rs = chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input').value : '0';
  4519. info.xs = chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('span').innerText : '0';
  4520. info.bj = chiBoxs[j].querySelectorAll('tbody tr td')[3].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[3].querySelector('span').innerText : '0';
  4521. }
  4522. }
  4523. result.push(info)
  4524. }
  4525. AllResult.push({ type: "A", rightInfoNumber: result })
  4526. if (this.costTypevalue == 'B') {
  4527. var boxDoms = document.querySelectorAll(".cabin-li .biaogeB");
  4528. var result = [];
  4529. for (var i = 0; i < boxDoms.length; i++) {
  4530. var chiBoxs = boxDoms[i].children[1].children;
  4531. var info = {};
  4532. info.index = i;
  4533. for (var j = 0; j < chiBoxs.length; j++) {
  4534. if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
  4535. info.title = boxDoms[i].children[0].innerText + chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
  4536. } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
  4537. info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span').innerText : '0';
  4538. info.rs = chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input').value : '0';
  4539. info.xs = chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('span').innerText : '0';
  4540. info.bj = chiBoxs[j].querySelectorAll('tbody tr td')[3].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[3].querySelector('span').innerText : '0';
  4541. }
  4542. }
  4543. result.push(info)
  4544. }
  4545. AllResult.push({ type: "B", rightInfoNumber: result })
  4546. }
  4547. return AllResult;
  4548. },
  4549. setLastTitle(list) {
  4550. let summaryRow = document.querySelectorAll('.el-table__footer-wrapper .cell');
  4551. for (var i = 0; i < summaryRow.length; i++) {
  4552. let summaryRowOne = summaryRow[i];
  4553. if (summaryRowOne.innerHTML == '总计:' || summaryRowOne.innerHTML == '——') {
  4554. } else {
  4555. summaryRowOne.setAttribute('title', list[i]);
  4556. }
  4557. }
  4558. },
  4559. GetClientWord() {
  4560. var that = this;
  4561. var data = {
  4562. "diid": this.diid,
  4563. "costType": this.costTypevalue,
  4564. "rate": this.AGroupCostParameter.rate,
  4565. "carGuides1": "",
  4566. "meal": "",
  4567. "subsidizedMeals": "",
  4568. "nightRepair": "",
  4569. "attractionsTickets": "",
  4570. "miscellaneousFees": "",
  4571. "aTip": "",
  4572. "tzZCost": "",
  4573. "leftInfo": '',
  4574. };
  4575. var vehicleResult = this.GetDJLableBJ(this.vehicleLables);
  4576. var DJMealResult = this.GetDJLableBJ(this.DJMeal);
  4577. var SubsidizedMealsResult = this.GetDJLableBJ(this.SubsidizedMeals);
  4578. var NightRepairResult = this.GetDJLableBJ(this.NightRepair);
  4579. var AttractionsTicketsResult = this.GetDJLableBJ(this.AttractionsTickets);
  4580. var DJMealResult = this.GetDJLableBJ(this.DJMeal);
  4581. var ATipResult = this.GetDJLableBJ(this.ATipResult);
  4582. data.leftInfo = this.GetDomLeftValue();
  4583. // vehicleLables: ['VF', 'T/G OF', 'T/G S', 'T/G TF', 'C/F OF'],
  4584. // DJMeal: ['B', 'L', 'D'],
  4585. // SubsidizedMeals: ['T/G M', 'C/F M'],
  4586. // NightRepair: ['T/G A'],
  4587. // AttractionsTickets: ['T/G EF', 'EF'],
  4588. // MiscellaneousFees: ['B/R/F', 'TE', 'T/L F'],
  4589. // ATip: ['T/G T', 'DRV T'],
  4590. if (this.costTypevalue === "B") {
  4591. data.carGuides1 = "RMB A段费用 " + vehicleResult.sum + " B段费用 RMB" + vehicleResult.Bsum;
  4592. data.meal = "RMB A段费用 " + DJMealResult.sum + " B段费用 RMB" + DJMealResult.Bsum;
  4593. data.subsidizedMeals = "RMB A段费用 " + SubsidizedMealsResult.sum + " B段费用 RMB" + SubsidizedMealsResult.Bsum;
  4594. data.nightRepair = "RMB A段费用 " + NightRepairResult.sum + " B段费用 RMB" + NightRepairResult.Bsum;
  4595. data.attractionsTickets = "RMB A段费用 " + AttractionsTicketsResult.sum + " B段费用 RMB" + AttractionsTicketsResult.Bsum;
  4596. data.miscellaneousFees = "RMB A段费用 " + DJMealResult.sum + " B段费用 RMB" + DJMealResult.Bsum;
  4597. data.aTip = "RMB A段费用 " + ATipResult.sum + " B段费用 RMB" + ATipResult.Bsum;
  4598. } else {
  4599. data.carGuides1 = "RMB " + vehicleResult.sum;
  4600. data.meal = "RMB " + DJMealResult.sum;
  4601. data.subsidizedMeals = "RMB " + SubsidizedMealsResult.sum;
  4602. data.nightRepair = "RMB " + NightRepairResult.sum;
  4603. data.attractionsTickets = "RMB " + AttractionsTicketsResult.sum;
  4604. data.miscellaneousFees = "RMB " + DJMealResult.sum;
  4605. data.aTip = "RMB " + ATipResult.sum;
  4606. }
  4607. var cabinDatalLast = this.cabinDatal.filter(function (x) {
  4608. return x.label == '团组预算明细'
  4609. })
  4610. data.tzZCost = cabinDatalLast[0].sheetInfo[0].gtroupQuotes;
  4611. this.$axios.post('/api/Groups/ExportClientWordFile', data, {
  4612. headers: {
  4613. 'Authorization': this.token,
  4614. }
  4615. }).then(resp => {
  4616. ////console.log(resp, '------------------------------------');
  4617. if (resp.data.code == 200) {
  4618. var file = resp.data.data;
  4619. that.fileDownload(file.data, file.strFileName);
  4620. } else {
  4621. that.$message.error('操作失败!' + resp.data.msg);
  4622. }
  4623. })
  4624. },
  4625. insertRow(index, rowParam, oper) {
  4626. var that = this;
  4627. var row = {
  4628. "diid": this.diid,
  4629. "day": rowParam.day,
  4630. "date": "",
  4631. "itin": "",
  4632. "carType": "",
  4633. "carCost": "",
  4634. "carNumber": "",
  4635. "carTiming": "",
  4636. "tgs": "",
  4637. "tgwh": "",
  4638. "tgn": "",
  4639. "tgof": "",
  4640. "tgm": "",
  4641. "tga": "",
  4642. "tgtf": "",
  4643. "tgef": "",
  4644. "cfs": "",
  4645. "cfm": "",
  4646. "cfof": "",
  4647. "b": "",
  4648. "l": "",
  4649. "d": "",
  4650. "tbr": "",
  4651. "sgr": "",
  4652. "jS_ES": "",
  4653. "suite": "",
  4654. "accon": "",
  4655. "tv": "",
  4656. "iL": "",
  4657. "if": "",
  4658. "ef": "",
  4659. "b_R_F": "",
  4660. "te": "",
  4661. "tgTips": "",
  4662. "drvTips": "",
  4663. "pc": "",
  4664. "tlf": "",
  4665. "ect": "",
  4666. "id": 1,
  4667. };
  4668. if (oper == 'UP') {
  4669. if (rowParam.date) {
  4670. row.date = this.addOneDay(rowParam.date, -1);
  4671. }
  4672. that.tableData.splice(index, 0, row)
  4673. } else {
  4674. if (rowParam.date) {
  4675. row.date = this.addOneDay(rowParam.date, 1);
  4676. }
  4677. that.tableData.splice(index + 1, 0, row)
  4678. }
  4679. ////console.log('that.tableData', that.tableData)
  4680. var thisDay = 1;
  4681. for (var i = 0; i < that.tableData.length; i++) {
  4682. ////console.log("iiiiiiiiiiiiiiii", i, Number(that.tableData.day))
  4683. if (Number(that.tableData[i].day) > 0) {
  4684. that.tableData[i].day = thisDay;
  4685. thisDay++;
  4686. }
  4687. }
  4688. },
  4689. Dataformat() {
  4690. var that = this;
  4691. var oldSoure = JSON.stringify(that.tableData);
  4692. var souer = {
  4693. "diid": this.diid,
  4694. "day": "-",
  4695. "date": "",
  4696. "itin": "",
  4697. "carType": "",
  4698. "carCost": 0,
  4699. "carNumber": 0,
  4700. "carTiming": 0,
  4701. "tgs": 0,
  4702. "tgwh": 0,
  4703. "tgn": 0,
  4704. "tgof": 0,
  4705. "tgm": 0,
  4706. "tga": 0,
  4707. "tgtf": 0,
  4708. "tgef": 0,
  4709. "cfs": 0,
  4710. "cfm": 0,
  4711. "cfof": 0,
  4712. "b": 0,
  4713. "l": 0,
  4714. "d": 0,
  4715. "tbr": 0,
  4716. "sgr": 0,
  4717. "jS_ES": 0,
  4718. "suite": 0,
  4719. "accon": "",
  4720. "tv": 0,
  4721. "iL": 0,
  4722. "if": 0,
  4723. "ef": 0,
  4724. "b_R_F": 0,
  4725. "te": 0,
  4726. "tgTips": 0,
  4727. "drvTips": 0,
  4728. "pc": 0,
  4729. "tlf": 0,
  4730. "ect": 0,
  4731. "id": 1,
  4732. };
  4733. var numberList = [];
  4734. for (var key in souer) {
  4735. if (typeof souer[key] == 'number') {
  4736. numberList.push(key);
  4737. }
  4738. }
  4739. ////console.log(numberList, "numberList!");
  4740. ////console.log(that.tableData, "that.tableData!");
  4741. for (var i = 0; i < that.tableData.length; i++) {
  4742. that.tableData[i].day = that.tableData[i].day.toString();
  4743. for (var j = 0; j < numberList.length; j++) {
  4744. if (that.tableData[i][numberList[j]] === "") {
  4745. ////console.log(i + "行数据异常!", numberList[j]);
  4746. that.tableData[i][numberList[j]] = 0;
  4747. }
  4748. }
  4749. }
  4750. var NewSoure = [...that.tableData];
  4751. that.tableData = JSON.parse(oldSoure);
  4752. return NewSoure;
  4753. },
  4754. dateChange(val, index) {
  4755. const regex = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/
  4756. if (!regex.test(val)) {
  4757. this.$message.error('日期格式不正确!应该为YYYY-MM-DD格式!');
  4758. this.tableData[index].date = "";
  4759. }
  4760. },
  4761. GetDJLableBJ(lableList) {
  4762. var that = this;
  4763. var result = { sum: 0, Bsum: 0 };
  4764. if (typeof lableList != "object" || lableList['length'] == undefined) {
  4765. return result
  4766. }
  4767. let Djsum = 0;
  4768. let BDjsum = 0;
  4769. for (var i = 0; i < lableList.length; i++) {
  4770. that.sumTopPrice.forEach(function (item1) {
  4771. if (lableList[i] == item1.label) {
  4772. var Aprice = Number(item1.Aprice);
  4773. if (!isNaN(Aprice)) {
  4774. Djsum += Aprice;
  4775. }
  4776. var Bprice = Number(item1.Bprice);
  4777. if (!isNaN(Bprice)) {
  4778. BDjsum += Bprice;
  4779. }
  4780. }
  4781. })
  4782. }
  4783. Djsum = Djsum * this.AGroupCostParameter.rate * this.AGroupCostParameter.djxs;
  4784. BDjsum = BDjsum * this.AGroupCostParameter.rate * this.BGroupCostParameter.djxs;
  4785. if (isNaN(Djsum)) {
  4786. Djsum = 0;
  4787. }
  4788. if (isNaN(BDjsum)) {
  4789. BDjsum = 0;
  4790. }
  4791. result.sum = Djsum.toFixed(2);
  4792. result.Bsum = BDjsum.toFixed(2);
  4793. return result;
  4794. },
  4795. handleChange(currentValue, oldValue) {
  4796. ////console.log(currentValue, oldValue);
  4797. if (currentValue == undefined) {
  4798. }
  4799. },
  4800. GetWeek(date) {
  4801. if (date) {
  4802. try {
  4803. var myDate = new Date(date);
  4804. var myDay = myDate.getDay();//获取存储当前日期
  4805. var weekday = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
  4806. return weekday[myDay];
  4807. } catch (e) {
  4808. ////console.log("时间格式不正确!")
  4809. return "时间格式不正确!";
  4810. }
  4811. }
  4812. return '';
  4813. },
  4814. confirm() {
  4815. debugger;
  4816. this.outerVisible = false;
  4817. if (this.dialogSelectObject == null) {
  4818. this.dialogSelectObject = {};
  4819. }
  4820. if (Object.keys(this.dialogSelectObject).length != 0) {
  4821. const possibleDialogTitles = ['选择车导数据', '导游信息', '选择车数据', '景点信息'];
  4822. const indexBtn = possibleDialogTitles.indexOf(this.DialogTitle);
  4823. if (indexBtn != -1) {
  4824. if (indexBtn == 0) {
  4825. this.bindCD();
  4826. } else if (indexBtn == 1) {
  4827. this.bindDY();
  4828. } else if (indexBtn == 2) {
  4829. this.bindCSJ();
  4830. } else if (indexBtn == 3) {
  4831. this.bindJD();
  4832. }
  4833. }
  4834. }
  4835. this.dialogSelectObject = {};
  4836. },
  4837. bindCD() {
  4838. debugger;
  4839. var offer = this.dialogSelectObject.offer.match(/\d+/g) != null ? Number(this.dialogSelectObject.offer.match(/\d+/g)[0]) : 0;
  4840. var cgCost = this.dialogSelectObject.cgCost.match(/\d+/g) != null ? Number(this.dialogSelectObject.cgCost.match(/\d+/g)[0]) : 0;
  4841. var cgOvertimeFee = this.dialogSelectObject.cgOvertimeFee.match(/\d+/g) != null ? Number(this.dialogSelectObject.cgOvertimeFee.match(/\d+/g)[0]) : 0;
  4842. var overtimeFee = this.dialogSelectObject.overtimeFee.match(/\d+/g) != null ? Number(this.dialogSelectObject.overtimeFee.match(/\d+/g)[0]) : 0;
  4843. var runingTime = this.dialogSelectObject.runingTime.match(/\d+/g) != null ? Number(this.dialogSelectObject.runingTime.match(/\d+/g)[0]) : 0;
  4844. var row = this.tableData[this.rowIndex];
  4845. var carNumber = row.carNumber;
  4846. row['carCost'] = (carNumber * offer).toFixed(2);
  4847. row['tgs'] = cgCost.toFixed(2);
  4848. row['carTiming'] = runingTime.toFixed(2);
  4849. var carType = this.dialogSelectObject.city + "/" + this.dialogSelectObject.carType + "/" + this.dialogSelectObject.serviceType + "\n";
  4850. row['carType'] = carType;
  4851. },
  4852. bindDY() {
  4853. debugger;
  4854. var row = this.tableData[this.rowIndex];
  4855. var tgn = row.tgn;
  4856. var price = this.dialogSelectObject.price.match(/\d+/g) != null ? Number(this.dialogSelectObject.price.match(/\d+/g)[0]) : 0;
  4857. var translationPrice = this.dialogSelectObject.translationPrice.match(/\d+/g) != null ? Number(this.dialogSelectObject.translationPrice.match(/\d+/g)[0]) : 0;
  4858. var when = this.dialogSelectObject.when.match(/\d+/g) != null ? Number(this.dialogSelectObject.when.match(/\d+/g)[0]) : 0;
  4859. row['tgs'] = (tgn * price).toFixed(2);
  4860. row['if'] = translationPrice.toFixed(2);
  4861. row['tgwh'] = when.toFixed(2);
  4862. },
  4863. bindCSJ() {
  4864. debugger;
  4865. var row = this.tableData[this.rowIndex];
  4866. var carType = this.dialogSelectObject.city + "/" + this.dialogSelectObject.carType + "/" + this.dialogSelectObject.serviceType + "\n";
  4867. var toPrice = this.dialogSelectObject.price.match(/\d+/g) != null ? Number(this.dialogSelectObject.price.match(/\d+/g)[0]) : 0;
  4868. var when = this.dialogSelectObject.when.match(/\d+/g) != null ? Number(this.dialogSelectObject.when.match(/\d+/g)[0]) : 0;
  4869. row['carType'] = carType;
  4870. row['carCost'] = toPrice.toFixed(2);
  4871. row['carTiming'] = when.toFixed(2);
  4872. },
  4873. bindJD() {
  4874. debugger;
  4875. var row = this.tableData[this.rowIndex];
  4876. var Price = this.dialogSelectObject.price;
  4877. row['ef'] = Price.toFixed(2);
  4878. },
  4879. QueryRate() {
  4880. var url = "/api/Business/PostGroupTeamRateByDiIdAndCTableId"
  4881. var that = this
  4882. this.$axios({
  4883. method: 'post',
  4884. url: url,
  4885. headers: {
  4886. Authorization: 'Bearer ' + that.token
  4887. },
  4888. data: {
  4889. "portType": 1,
  4890. "diId": this.diid,
  4891. "cTable": 85
  4892. }
  4893. }).then(function (res) {
  4894. if (res.data.code == 200) {
  4895. //汇率
  4896. //console.log("汇率--", res.data.data);
  4897. that.currencyOption = res.data.data.teamRates;
  4898. }
  4899. })
  4900. },
  4901. changeCurrency(data) {
  4902. //console.log('data', data);
  4903. for (let index = 0; index < this.currencyOption.length; index++) {
  4904. if (this.currencyOption[index].currencyId == data) {
  4905. this.AGroupCostParameter.rate = this.currencyOption[index].rate;
  4906. break;
  4907. }
  4908. }
  4909. },
  4910. inSelectChangeCheck() {
  4911. //console.log('inSelectChangeCheck');
  4912. var arr = [];
  4913. var pusharr = [];
  4914. var topArr = [];
  4915. var topPushArr = [];
  4916. if (this.costTypevalue == 'A') {
  4917. var defaultP = this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0];
  4918. if (defaultP.sgr == 0) {
  4919. arr.push('酒店SGR');
  4920. topArr.push('SGR')
  4921. } else {
  4922. pusharr.push('酒店SGR');
  4923. topPushArr.push('SGR')
  4924. }
  4925. if (defaultP.tbr == 0) {
  4926. arr.push('酒店TBR');
  4927. topArr.push('TBR')
  4928. } else {
  4929. pusharr.push('酒店TBR');
  4930. topPushArr.push('TBR')
  4931. }
  4932. if (defaultP.jses == 0) {
  4933. arr.push('酒店JSES');
  4934. topArr.push('JS/ES')
  4935. } else {
  4936. pusharr.push('酒店JSES');
  4937. topPushArr.push('JS/ES')
  4938. }
  4939. if (defaultP.suite == 0) {
  4940. topArr.push('SUITE')
  4941. arr.push('酒店SUITE');
  4942. }
  4943. else {
  4944. pusharr.push('酒店SUITE');
  4945. topPushArr.push('SUITE')
  4946. }
  4947. } else {
  4948. var HotelA = this.costTypeHotelNumbers.filter(item => item.type == 'A')[0];
  4949. var HotelB = this.costTypeHotelNumbers.filter(item => item.type == 'B')[0];
  4950. if (HotelA.sgr == 0 && HotelB.sgr == 0) { arr.push('酒店SGR'); } else {
  4951. pusharr.push('酒店SGR');
  4952. }
  4953. if (HotelA.tbr == 0 && HotelB.tbr == 0) { arr.push('酒店TBR'); } else {
  4954. pusharr.push('酒店TBR');
  4955. }
  4956. if (HotelA.jses == 0 && HotelB.jses == 0) { arr.push('酒店JSES'); } else {
  4957. pusharr.push('酒店JSES');
  4958. }
  4959. if (HotelA.suite == 0 && HotelB.suite == 0) { arr.push('酒店SUITE'); } else {
  4960. pusharr.push('酒店SUITE');
  4961. }
  4962. }
  4963. var leftCheck = this.CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues;
  4964. var topCheck = this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues;
  4965. var resultArr = leftCheck.filter(item => !arr.includes(item));
  4966. var topResultArr = topCheck.filter(item => !topArr.includes(item));
  4967. resultArr = [...resultArr, ...pusharr];
  4968. resultArr = [...new Set(resultArr)];
  4969. //console.log('resultArr', resultArr);
  4970. topResultArr = [...topResultArr, ...topPushArr];
  4971. topResultArr = [...new Set(topResultArr)];
  4972. this.CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues = resultArr;
  4973. this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues = topResultArr;
  4974. },
  4975. GivePeopleNumber() {
  4976. var number = this.grouptitleinfo.visitPNumber;
  4977. if (this.AGroupCostParameter.visaRS == 0) {
  4978. this.AGroupCostParameter.visaRS = number;
  4979. }
  4980. if (this.AGroupCostParameter.bxrs == 0) {
  4981. this.AGroupCostParameter.bxrs = number;
  4982. }
  4983. if (this.AGroupCostParameter.djrs == 0) {
  4984. this.AGroupCostParameter.djrs = number;
  4985. }
  4986. if (this.AGroupCostParameter.lyjrs == 0) {
  4987. this.AGroupCostParameter.lyjrs = number;
  4988. }
  4989. if (this.AGroupCostParameter.gwrs == 0) {
  4990. this.AGroupCostParameter.gwrs = number;
  4991. }
  4992. },
  4993. lableSetPrice(lable, total, single) {
  4994. //遍历this.columnTotalData
  4995. for (var i = 0; i < this.columnTotalData.length; i++) {
  4996. if (this.columnTotalData[i].label == lable) {
  4997. this.columnTotalData[i].totalPrice = total;
  4998. this.columnTotalData[i].singlePrice = single;
  4999. break
  5000. }
  5001. }
  5002. },
  5003. BlableSetPrice(lable, total, single) {
  5004. for (var i = 0; i < this.columnTotalData.length; i++) {
  5005. if (this.columnTotalData[i].label == lable) {
  5006. var aT = Number(this.columnTotalData[i].totalPrice).toFixed(2);
  5007. var aS = Number(this.columnTotalData[i].singlePrice).toFixed(2);
  5008. if(!isNaN(aT)){
  5009. this.columnTotalData[i].totalPrice = 'A段费用' + aT +'\r\n B段费用' + total;
  5010. }
  5011. if(!isNaN(aS)){
  5012. this.columnTotalData[i].singlePrice = 'A段费用' + aS + '\r\n B段费用' + single;
  5013. }
  5014. break
  5015. }
  5016. }
  5017. },
  5018. },
  5019. updated(){
  5020. this.$emit('transfer',true)
  5021. },
  5022. destroyed(){
  5023. this.$emit('transfer',false)
  5024. },
  5025. mounted() {
  5026. this.token = JSON.parse(localStorage.getItem('userinif')).token;
  5027. this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
  5028. var costLoadData = localStorage.getItem('costLoadData');
  5029. document.querySelectorAll('.el-table__footer')[0].style.display = "none"
  5030. if (costLoadData) {
  5031. var JSONP = JSON.parse(costLoadData);
  5032. var diidP = Number(JSONP.diid);
  5033. this.loadData(isNaN(diidP) ? -1 : diidP);
  5034. } else {
  5035. this.loadData(-1);
  5036. }
  5037. window.Vue = this;
  5038. },
  5039. computed: {
  5040. defaultCostTypeHotelNumber() {
  5041. const defaultItems = this.costTypeHotelNumbers.filter(item => item.type == 'Default');
  5042. return defaultItems[0];
  5043. },
  5044. filterdialogSearchInput() {
  5045. var that = this;
  5046. return this.dialogTableData.filter(function (x) {
  5047. return x.city.indexOf(that.dialogSearchInput) != -1 || x.country.indexOf(that.dialogSearchInput) != -1;
  5048. })
  5049. },
  5050. columnWidth() {
  5051. console.log(this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length);
  5052. if (this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 22) {
  5053. return 74
  5054. }
  5055. else if(22<=this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 26){
  5056. return 59
  5057. }
  5058. else{
  5059. return 55
  5060. }
  5061. },
  5062. ShowMeals() {
  5063. if (this.ShowBaoPi.length > 0) {
  5064. var result = this.ShowBaoPi.filter(x => x.type == 'Meals')[0];
  5065. if (result) {
  5066. return result.content;
  5067. } else {
  5068. return [];
  5069. }
  5070. }
  5071. return [];
  5072. },
  5073. ShowHotel() {
  5074. if (this.ShowBaoPi.length > 0) {
  5075. var result = this.ShowBaoPi.filter(x => x.type == 'Hotel')[0];
  5076. if (result) {
  5077. return result.content;
  5078. } else {
  5079. return [];
  5080. }
  5081. }
  5082. return [];
  5083. },
  5084. ShowGongZa() {
  5085. if (this.ShowBaoPi.length > 0) {
  5086. var result = this.ShowBaoPi.filter(x => x.type == 'GongZa')[0];
  5087. if (result) {
  5088. return result.content;
  5089. } else {
  5090. return [];
  5091. }
  5092. }
  5093. return [];
  5094. },
  5095. getCurr() {
  5096. var currStr = '';
  5097. var curr = this.AGroupCostParameter.currency;
  5098. var currResult = Number(curr);
  5099. if (isNaN(currResult)) {
  5100. currStr = curr;
  5101. } else {
  5102. for (let index = 0; index < this.currencyOption.length; index++) {
  5103. if (this.currencyOption[index].currencyId == currResult) {
  5104. currStr = this.currencyOption[index].currencyCode;
  5105. break;
  5106. }
  5107. }
  5108. }
  5109. return currStr;
  5110. },
  5111. }
  5112. }
  5113. </script>
  5114. <style lang="less" scoped>
  5115. /deep/ .el-table th.el-table__cell > .cell {
  5116. white-space: pre-wrap;
  5117. }
  5118. /deep/ .el-table--striped .el-table__body tr.el-table__row--striped td {
  5119. background: #F0F9FF;
  5120. }
  5121. </style>
  5122. <style>
  5123. .cost-box {
  5124. background-color: #fff;
  5125. padding: 10px;
  5126. box-shadow: 0 0 5px #0005;
  5127. border-radius: 10px;
  5128. }
  5129. .cost-box .el-button+.el-button {
  5130. margin-left: 0;
  5131. }
  5132. .fade-enter-active,
  5133. .fade-leave-active {
  5134. transition: opacity 1;
  5135. }
  5136. .fade-enter,
  5137. .fade-leave-to {
  5138. opacity: 0;
  5139. }
  5140. .cost-haed {
  5141. margin-bottom: 10px;
  5142. }
  5143. .ser-btn {
  5144. display: flex;
  5145. justify-content: space-between;
  5146. margin-bottom: 5px;
  5147. }
  5148. .cost-info {
  5149. display: flex;
  5150. }
  5151. .cost-info-li {
  5152. margin-right: 30px;
  5153. }
  5154. .cost-info-li label {
  5155. color: #606266;
  5156. font-size: 15px;
  5157. font-weight: 600;
  5158. }
  5159. .cost-info-li span {
  5160. color: #606266;
  5161. font-size: 14px;
  5162. }
  5163. .cost-box .el-checkbox-group {
  5164. margin: 5px 0;
  5165. }
  5166. .form-ss .el-checkbox {
  5167. width: 100px;
  5168. margin: 5px 0;
  5169. }
  5170. .sheet-box {
  5171. margin-top: 30px;
  5172. }
  5173. .cabin-box {
  5174. margin-top: 30px;
  5175. }
  5176. .biaoge,
  5177. .biaogeB {
  5178. margin-bottom: 30px;
  5179. }
  5180. .rapAddress {
  5181. overflow: hidden;
  5182. white-space: nowrap;
  5183. text-overflow: ellipsis;
  5184. }
  5185. .cost-box .cabin-box .cost-box .el-checkbox {
  5186. margin-right: 20px;
  5187. }
  5188. .cost-box .el-table .cell {
  5189. text-align: center;
  5190. padding-left: 5px;
  5191. padding-right: 5px;
  5192. font-size: 12px;
  5193. }
  5194. .figures-btn {
  5195. display: flex;
  5196. flex-direction: column;
  5197. align-items: center;
  5198. }
  5199. .figures-btn .el-button--mini {
  5200. width: 67px;
  5201. margin: 2px 0;
  5202. margin-left: 0;
  5203. }
  5204. .CostBShow .el-col-3 .el-form-item__content {
  5205. width: 60%;
  5206. }
  5207. .CostBShow .el-form-item__content {
  5208. width: 65%;
  5209. }
  5210. .CostBShow .el-date-editor--date {
  5211. width: 100%;
  5212. }
  5213. .Cost_topFlex .el-select {
  5214. width: 400px;
  5215. }
  5216. .hiddenElement {
  5217. visibility: hidden;
  5218. }
  5219. .cost-all .el-table__footer-wrapper .cell {
  5220. white-space: pre;
  5221. }
  5222. .cost-all .el-date-editor.el-input,
  5223. .el-date-editor.el-input__inner {
  5224. width: 100%;
  5225. }
  5226. .biaogeB .el-table .el-input--small {
  5227. width: 60%;
  5228. }
  5229. .biaogeKz .el-table .el-input--small {
  5230. width: 60%;
  5231. }
  5232. .czbtn {
  5233. width: 70px;
  5234. }
  5235. .tables .el-textarea {
  5236. font-size: 12px;
  5237. }
  5238. .tables .el-button--mini {
  5239. font-size: 12px;
  5240. }
  5241. .tables .el-textarea__inner {
  5242. padding: 0;
  5243. }
  5244. .tables .el-input--suffix .el-input__inner {
  5245. padding-right: 0px;
  5246. padding-left: 0px;
  5247. }
  5248. .tables .el-date-editor .el-icon-date {
  5249. display: none;
  5250. }
  5251. .form-ss .el-checkbox__label {
  5252. font-size: 12px;
  5253. }
  5254. .tables .el-input--mini {
  5255. font-size: 12px;
  5256. }
  5257. .tables .el-input__inner{
  5258. padding: 0;
  5259. text-align: center;
  5260. }
  5261. .sheet-box .el-table th.el-table__cell>.cell{
  5262. font-size: 12px;
  5263. }
  5264. .sheet-box .el-input__inner{
  5265. font-size: 12px;
  5266. }
  5267. .cost-all .el-form-item{
  5268. margin-bottom: 5px;
  5269. }
  5270. </style>