| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041 |
- <template>
- <div>
- <div class="customer-head">
- <div class="customer-back">
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="goBack()">返回列表 </el-button>
- </div>
- <div class="add-customer-btn">
- <el-button size="small" style="margin-right: 8px" :disabled="!form.id" @click="$refs.print.openDialog()">预 览 </el-button>
- <el-button
- v-if="roleName.indexOf('admin') != -1"
- size="small"
- style="margin-right: 8px"
- :disabled="!form.id"
- @click="$refs.report.openDialog()"
- >报表设计
- </el-button>
- <el-button
- class="el-button--small-yh"
- style="margin-left: 6px;"
- type="primary"
- size="small"
- v-if="editButton"
- :disabled="
- showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)
- "
- @click="inEdit"
- >编 辑
- </el-button>
- <el-button
- class="el-button--small-yh"
- v-else
- style="margin-left: 6px;"
- type="primary"
- size="small"
- :disabled="isSaveBtn || form.buxStaus == '已确认'"
- @click="submit"
- >保 存
- </el-button>
- <!-- <el-button type="success" size="small" v-if="form.buxStaus == '录入'" @click.stop="confirm">确认费用</el-button> -->
- <!-- <el-button type="danger" size="small" v-if="form.buxStaus == '已确认'" @click.stop="revoke">撤销费用</el-button> -->
- <!-- <el-button v-if="form.status == '审核提交'" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
- size="small" @click="revokeApplication">撤销单据请核
- </el-button> -->
- <!-- <el-dropdown style="line-height: 0">
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
- size="small">
- 审 批<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown> -->
- </div>
- </div>
- <div style="margin-top: 50px">
- <el-tabs type="border-card">
- <el-tab-pane label="基础信息">
- <trade-card title="基础信息">
- <avue-form :option="optionForm" v-model="form" ref="form">
- <tempalte slot="purchaseCompanyName">
- <dic-select
- v-model="form.purchaseCompanyName"
- placeholder="结算单位"
- key="id"
- label="shortName"
- res="records"
- url="/blade-los/bcorps/selectList?status=0¤t=1&size=5"
- :filterable="true"
- :remote="true"
- dataName="shortName"
- :slotRight="true"
- rightLabel="code"
- @selectChange="dicChange('purchaseCompanyName', $event)"
- :disabled="form.buxStaus == '已确认'"
- ></dic-select>
- </tempalte>
- <tempalte slot="purchaseDate">
- <el-date-picker
- v-model="form.purchaseDate"
- type="date"
- size="small"
- placeholder="请选择 业务日期"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd HH:mm:ss"
- @change="dicChange('purchaseDate', $event)"
- :disabled="editDisabled || (form.id && form.buxStaus == '已确认')"
- >
- </el-date-picker>
- </tempalte>
- </avue-form>
- </trade-card>
- <trade-card title="箱明细">
- <avue-crud
- :option="option"
- :data="form.tradingBoxItemsList"
- id="out-table"
- ref="crud"
- :header-cell-class-name="headerClassName"
- :row-style="{ height: '20px', padding: '0px' }"
- :cell-style="{ height: '20px', padding: '0px' }"
- @selection-change="selectionChange"
- @select="selectHandle"
- @row-update="rowUpdate"
- @resetColumn="resetColumn('crud', 'option', 'optionBack', 477)"
- @saveColumn="saveColumn('crud', 'option', 'optionBack', 477)"
- >
- <template slot="menuLeft">
- <el-button
- type="info"
- plain
- size="small"
- :disabled="editDisabled || !form.id || form.buxStaus == '已确认'"
- @click="allClick('一键保存')"
- >一键保存</el-button
- >
- <el-button
- type="info"
- plain
- size="small"
- :disabled="editDisabled || form.tradingBoxItemsList.length == 0 || form.buxStaus == '已确认'"
- @click="allClick('一键编辑')"
- >一键编辑</el-button
- >
- <el-button
- type="danger"
- plain
- size="small"
- :disabled="editDisabled || selectionList.length == 0 || form.buxStaus == '已确认'"
- @click="allClick('批量删除')"
- >批量删除</el-button
- >
- <el-button type="success" size="small" @click="allClick('导入')" :disabled="!form.id">导入</el-button>
- <!-- <el-button type="info" size="small" @click="allClick('启用')"
- :disabled="selectionList.length == 0">启用</el-button> -->
- <!-- <el-button type="primary" size="small" @click="allClick('卖箱')">卖箱</el-button> -->
- <el-button size="small" style="margin-right: 8px" :disabled="!form.id || true" @click="$refs.print.openDialog()">打印报表 </el-button>
- <span style="margin: 0 20px;color:#67C23A;"> 金额本币合计:{{ CNYSUM }} </span>
- <span style="margin: 0 20px;color:#F56C6C;"> 金额外币合计:{{ USDSUM }} </span>
- </template>
- <template slot="indexHeader" slot-scope="{ row, index }">
- <el-button
- type="primary"
- size="mini"
- icon="el-icon-plus"
- :disabled="editDisabled || form.buxStaus == '已确认'"
- circle
- @click="addRow()"
- >
- </el-button>
- </template>
- <template slot="index" slot-scope="{ row, index }">
- <span>{{ index + 1 }}</span>
- </template>
- <tempalte slot="codeForm" slot-scope="{ row }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.code"
- placeholder="箱号"
- key="id"
- label="code"
- res="records"
- url="/blade-los/archives/list?current=1&size=20&status=待使用"
- :filterable="true"
- :remote="true"
- dataName="code"
- @selectChange="rowDicChange('code', $event, row)"
- >
- </dic-select>
- <span v-else>{{ row.code }}</span>
- </tempalte>
- <template slot="boxTypeForm" slot-scope="{ row }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.boxType"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bcntrtypes/list?status=0¤t=1&size=20"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="rowDicChange('boxType', $event, row)"
- ></dic-select>
- <span v-else>{{ row.boxType }}</span>
- </template>
- <template slot="currencyForm" slot-scope="{ row }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.currency"
- placeholder="币别"
- label="code"
- :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + form.purchaseDate + '&type=1'"
- :filterable="true"
- @selectChange="rowDicChange('currency', $event, row)"
- ></dic-select>
- <span v-else>{{ row.currency }}</span>
- </template>
- <tempalte slot="originalBoxEastNameForm" slot-scope="{ row }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.originalBoxEastName"
- placeholder="箱东"
- key="id"
- label="shortName"
- res="records"
- url="/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=箱东"
- :filterable="true"
- :remote="true"
- dataName="shortName"
- @selectChange="rowDicChange('originalBoxEastName', $event, row)"
- :slotRight="true"
- rightLabel="code"
- >
- </dic-select>
- <span v-else>{{ row.originalBoxEastName }}</span>
- </tempalte>
- <tempalte slot="stationCnameForm" slot-scope="{ row }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.stationCname"
- placeholder="场站"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=场站&status=0"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="rowDicChange('stationCname', $event, row)"
- :slotRight="true"
- rightLabel="code"
- ></dic-select>
- <span v-else>{{ row.stationCname }}</span>
- </tempalte>
- <tempalte slot="restrictedPortsNameForm" slot-scope="{ row }">
- <dic-select
- v-show="row.$cellEdit"
- v-model="row.restrictedPortsName"
- placeholder="港口"
- key="id"
- label="code"
- url="/blade-los/bports/listAll?status=0"
- :filterable="true"
- :multiple="true"
- :collapseTags="true"
- @selectChange="rowDicChange('restrictedPortsName', $event, row)"
- dataType="string"
- :slotRight="true"
- rightLabel="code"
- ></dic-select>
- <span v-show="!row.$cellEdit">{{ row.restrictedPortsName }}</span>
- </tempalte>
- <tempalte slot="restrictingShippingCompaniesNameForm" slot-scope="{ row }">
- <dic-select
- v-show="row.$cellEdit"
- v-model="row.restrictingShippingCompaniesName"
- placeholder="船公司"
- key="id"
- label="cnName"
- url="/blade-los/bcorps/listAll?status=0&corpTypeName=船公司"
- :filterable="true"
- :multiple="true"
- :collapseTags="true"
- :slotRight="true"
- rightLabel="code"
- @selectChange="rowDicChange('restrictingShippingCompaniesName', $event, row)"
- dataType="string"
- ></dic-select>
- <span v-show="!row.$cellEdit">{{ row.restrictingShippingCompaniesName }}</span>
- </tempalte>
- </avue-crud>
- </trade-card>
- <trade-card title="操作记录">
- <avue-form :option="optionForm2" v-model="form" ref="form2"> </avue-form>
- </trade-card>
- </el-tab-pane>
- <el-tab-pane label="费用信息">
- <el-card
- v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1 ? true : roleName.indexOf('应付查看') != -1"
- class="box-card"
- style="margin: 2px 0"
- >
- <avue-crud
- :option="feedOption"
- :data="feeCenterListD"
- id="out-table"
- ref="crud2"
- :header-cell-class-name="headerClassName"
- :row-style="{ height: '20px' }"
- :cell-style="{ padding: '0px' }"
- @selection-change="feedChange"
- @row-update="rowUpdate"
- @resetColumn="resetColumn('crud2', 'feedOption', 'feedOptionBack', 463)"
- @saveColumn="saveColumn('crud2', 'feedOption', 'feedOptionBack', 463)"
- >
- <template slot="menuLeft">
- <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
- <i class="el-icon-coin"></i>
- <span>应收费用</span>
- </div>
- <el-button type="info" plain size="small" :disabled="form.buxStaus == '已确认'" @click="allClick('D费用一键保存')"
- >一键保存</el-button
- >
- <el-button type="info" plain size="small" :disabled="form.buxStaus == '已确认'" @click="allClick('D费用一键编辑')"
- >一键编辑</el-button
- >
- <el-button
- type="danger"
- plain
- size="small"
- :disabled="selectionfeedList.length == 0 || form.buxStaus == '已确认'"
- @click="allClick('D费用批量删除')"
- >批量删除</el-button
- >
- <el-button
- type="primary"
- plain
- size="small"
- :disabled="selectionfeedList.length == 0 || form.buxStaus == '已确认'"
- @click="allClick('D费用申请')"
- >请核费用</el-button
- >
- <el-button
- type="danger"
- plain
- size="small"
- :disabled="selectionfeedList.length == 0 || form.buxStaus == '已确认'"
- @click="allClick('D撤销请核')"
- >撤销请核</el-button
- >
- <el-button type="primary" plain size="small" :disabled="selectionfeedList.length != 1" @click="allClick('D申请修改')"
- >申请修改</el-button
- >
- <el-button type="success" plain size="small" :disabled="selectionfeedList.length != 1" @click="allClick('D申请删除')"
- >申请删除</el-button
- >
- <el-button type="danger" plain size="small" :disabled="selectionfeedList.length != 1" @click="allClick('D取消申请')"
- >取消申请</el-button
- >
- <el-button type="primary" plain size="small" @click="printingCostsfun('D')">打印账单</el-button>
- </template>
- <template slot="indexHeader" slot-scope="{ row, index }">
- <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="form.buxStaus == '已确认'" circle @click="feedAddRow()">
- </el-button>
- </template>
- <template slot="index" slot-scope="{ row, index }">
- <span>{{ index + 1 }}</span>
- </template>
- <template slot="billTypeForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.billType"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bcorpstypedefine/list?current=1&size=20"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="rowDicChange('billType', $event, row)"
- ></dic-select>
- <span v-else>{{ row.billType }}</span>
- </template>
- <template slot="cntrNoForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.cntrNo"
- key="id"
- label="code"
- :mockData="form.tradingBoxItemsList"
- :filterable="true"
- ></dic-select>
- <span v-else>{{ row.cntrNo }}</span>
- </template>
- <template slot="corpCnNameForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- :key="updateSearchKey"
- v-model="row.corpCnName"
- placeholder="付费对象"
- label="shortName"
- res="records"
- :slotRight="true"
- rightLabel="code"
- :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + row.billType"
- :filterable="true"
- :remote="true"
- dataName="shortName"
- @selectChange="rowDicChange('corpCnName', $event, row)"
- ></dic-select>
- <span v-else>{{ row.corpCnName }}</span>
- </template>
- <template slot="feeCnNameForm" slot-scope="{ row }">
- <dic-select
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.feeCnName"
- key="id"
- placeholder="费用名称"
- label="cnName"
- res="records"
- url="/blade-los/bfees/list?status=0¤t=1&size=20"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="rowDicChange('feeCnName', $event, row)"
- ></dic-select>
- <span v-else>{{ row.feeCnName }}</span>
- </template>
- <template slot="curCodeForm" slot-scope="{ row }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.curCode"
- placeholder="币别"
- label="code"
- :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + form.purchaseDate + '&type=1'"
- :filterable="true"
- @selectChange="rowDicChange('curCodeD', $event, row)"
- ></dic-select>
- <span v-else>{{ row.curCode }}</span>
- </template>
- <template slot="exrateForm" slot-scope="{ row }">
- <el-input-number
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.exrate"
- :controls="false"
- placeholder="请输入 汇率"
- size="small"
- style="width: 100%;"
- ></el-input-number>
- <span v-else>{{ row.exrate }}</span>
- </template>
- <template slot="unitNoForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.unitNo"
- label="cnName"
- url="/blade-los/bunits/listAll?status=0"
- :filterable="true"
- ></dic-select>
- <span v-else>{{ row.unitNo }}</span>
- </template>
- <template slot="priceForm" slot-scope="{ row }">
- <el-input-number
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.price"
- :controls="false"
- placeholder="请输入 成本价"
- size="small"
- style="width: 100%;"
- :precision="2"
- @change="countChange(row)"
- ></el-input-number>
- <span v-else>{{ row.price }}</span>
- </template>
- <template slot="quantityForm" slot-scope="{ row }">
- <el-input-number
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.quantity"
- :controls="false"
- placeholder="请输入 成本价"
- size="small"
- style="width: 100%;"
- :precision="0"
- @change="countChange(row)"
- ></el-input-number>
- <span v-else>{{ row.quantity }}</span>
- </template>
- <template slot="remarks" slot-scope="{ row }">
- <el-input
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.remarks"
- placeholder="请输入 备注"
- size="small"
- style="width: 100%;"
- ></el-input>
- <span v-else>{{ row.remarks }}</span>
- </template>
- </avue-crud>
- </el-card>
- <el-card
- v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1 ? true : roleName.indexOf('应付查看') != -1"
- class="box-card"
- style="margin: 2px 0"
- >
- <avue-crud
- :option="feecOption"
- :data="feeCenterListC"
- id="out-table"
- ref="crud3"
- :header-cell-class-name="headerClassName"
- :row-style="{ height: '20px' }"
- :cell-style="{ padding: '0px' }"
- @selection-change="feecChange"
- @row-update="rowUpdate"
- @resetColumn="resetColumn('crud3', 'feecOption', 'feecOptionBack', 464)"
- @saveColumn="saveColumn('crud3', 'feecOption', 'feecOptionBack', 464)"
- >
- <template slot="menuLeft">
- <div style="display: inline-block;margin-right: 20px" class="disabledBox meetSize">
- <i class="el-icon-coin"></i>
- <span>应付费用</span>
- </div>
- <el-button type="info" plain size="small" :disabled="form.buxStaus == '已确认'" @click="allClick('C费用一键保存')"
- >一键保存</el-button
- >
- <el-button type="info" plain size="small" :disabled="form.buxStaus == '已确认'" @click="allClick('C费用一键编辑')"
- >一键编辑</el-button
- >
- <el-button
- type="danger"
- plain
- size="small"
- :disabled="selectionfeecList.length == 0 || form.buxStaus == '已确认'"
- @click="allClick('C费用批量删除')"
- >批量删除</el-button
- >
- <el-button
- type="primary"
- plain
- size="small"
- :disabled="selectionfeecList.length == 0 || form.buxStaus == '已确认'"
- @click="allClick('C费用申请')"
- >请核费用</el-button
- >
- <el-button
- type="danger"
- plain
- size="small"
- :disabled="selectionfeecList.length == 0 || form.buxStaus == '已确认'"
- @click="allClick('C撤销请核')"
- >撤销请核</el-button
- >
- <el-button type="primary" plain size="small" :disabled="selectionfeecList.length != 1" @click="allClick('C申请修改')"
- >申请修改</el-button
- >
- <el-button type="success" plain size="small" :disabled="selectionfeecList.length != 1" @click="allClick('C申请删除')"
- >申请删除</el-button
- >
- <el-button type="danger" plain size="small" :disabled="selectionfeecList.length != 1" @click="allClick('C取消申请')"
- >取消申请</el-button
- >
- <el-button type="primary" plain size="small" @click="printingCostsfun('C')">打印账单</el-button>
- </template>
- <template slot="indexHeader" slot-scope="{ row, index }">
- <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="form.buxStaus == '已确认'" circle @click="feecAddRow()">
- </el-button>
- </template>
- <template slot="index" slot-scope="{ row, index }">
- <span>{{ index + 1 }}</span>
- </template>
- <template slot="billTypeForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.billType"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bcorpstypedefine/list?status=0¤t=1&size=20"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="rowDicChange('billType', $event, row, index)"
- ></dic-select>
- <span v-else>{{ row.billType }}</span>
- </template>
- <template slot="cntrNoForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.cntrNo"
- key="id"
- label="code"
- :mockData="form.tradingBoxItemsList"
- :filterable="true"
- ></dic-select>
- <span v-else>{{ row.cntrNo }}</span>
- </template>
- <template slot="corpCnNameForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- :key="updateSearchKey"
- v-model="row.corpCnName"
- placeholder="付费对象"
- label="shortName"
- res="records"
- :slotRight="true"
- rightLabel="code"
- :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + row.billType"
- :filterable="true"
- :remote="true"
- dataName="shortName"
- @selectChange="rowDicChange('corpCnName', $event, row)"
- ></dic-select>
- <span v-else>{{ row.corpCnName }}</span>
- </template>
- <template slot="feeCnNameForm" slot-scope="{ row }">
- <dic-select
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.feeCnName"
- key="id"
- placeholder="费用名称"
- label="cnName"
- res="records"
- url="/blade-los/bfees/list?status=0¤t=1&size=20"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="rowDicChange('feeCnName', $event, row)"
- ></dic-select>
- <span v-else>{{ row.feeCnName }}</span>
- </template>
- <template slot="curCodeForm" slot-scope="{ row }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.curCode"
- placeholder="币别"
- label="code"
- :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + form.purchaseDate + '&type=1'"
- :filterable="true"
- @selectChange="rowDicChange('curCodeC', $event, row)"
- ></dic-select>
- <span v-else>{{ row.curCode }}</span>
- </template>
- <template slot="exrateForm" slot-scope="{ row }">
- <el-input-number
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.exrate"
- :controls="false"
- placeholder="请输入 汇率"
- size="small"
- style="width: 100%;"
- ></el-input-number>
- <span v-else>{{ row.exrate }}</span>
- </template>
- <template slot="unitNoForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.unitNo"
- label="cnName"
- url="/blade-los/bunits/listAll?status=0"
- :filterable="true"
- ></dic-select>
- <span v-else>{{ row.unitNo }}</span>
- </template>
- <template slot="priceForm" slot-scope="{ row }">
- <el-input-number
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.price"
- :controls="false"
- placeholder="请输入 成本价"
- size="small"
- style="width: 100%;"
- :precision="2"
- @change="countChange(row)"
- ></el-input-number>
- <span v-else>{{ row.price }}</span>
- </template>
- <template slot="quantityForm" slot-scope="{ row }">
- <el-input-number
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.quantity"
- :controls="false"
- placeholder="请输入 成本价"
- size="small"
- style="width: 100%;"
- :precision="0"
- @change="countChange(row)"
- ></el-input-number>
- <span v-else>{{ row.quantity }}</span>
- </template>
- <template slot="remarks" slot-scope="{ row }">
- <el-input
- v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
- v-model="row.remarks"
- placeholder="请输入 备注"
- size="small"
- style="width: 100%;"
- ></el-input>
- <span v-else>{{ row.remarks }}</span>
- </template>
- </avue-crud>
- </el-card>
- <avue-crud
- id="out-table"
- class="box-card"
- :header-cell-class-name="headerClassName"
- ref="crud4"
- :row-style="{ height: '16px' }"
- :cell-style="{ padding: '0px' }"
- :option="sumOption"
- :data="sumData"
- ></avue-crud>
- <div
- v-if="
- roleName.indexOf('admin') != -1 ||
- roleName.indexOf('利润查看') != -1 ||
- ((roleName.indexOf('应收修改') != -1 || roleName.indexOf('应收查看') != -1) &&
- (roleName.indexOf('应付修改') != -1 || roleName.indexOf('应付查看') != -1))
- "
- style="display: flex;align-items: center;justify-content: space-around"
- >
- <div style="width: 30%">
- <div style="display: flex;align-items: center;justify-content: space-around">
- <div>
- <div>
- <span>本币:</span>
- </div>
- </div>
- <div>
- <div style="color: #81B337">
- <span>应收:</span>
- <span class="weightnum">{{ form.amountD ? form.amountD : 0 }}元</span>
- </div>
- </div>
- <div>
- <div style="color: #6BBCD1">
- <span>应付:</span>
- <span class="weightnum">{{ form.amountC ? form.amountC : 0 }}元</span>
- </div>
- </div>
- <div class="bottomFlex">
- <span>利润</span>
- <span>{{ form.profit ? form.profit : 0 }}元</span>
- </div>
- </div>
- </div>
- <div style="width: 30%">
- <div style="display: flex;align-items: center;justify-content: space-around">
- <div>
- <div>
- <span>外币:</span>
- </div>
- </div>
- <div>
- <div style="color: #81B337">
- <span>应收:</span>
- <span class="weightnum">{{ form.amountDUsd ? form.amountDUsd : 0 }}元</span>
- </div>
- </div>
- <div>
- <div style="color: #6BBCD1">
- <span>应付:</span>
- <span class="weightnum">{{ form.amountCUsd ? form.amountCUsd : 0 }}元</span>
- </div>
- </div>
- <div class="bottomFlex">
- <span>利润</span>
- <span>{{ form.profitUsd ? form.profitUsd : 0 }}元</span>
- </div>
- </div>
- </div>
- <div style="width: 30%">
- <div style="display: flex;align-items: center;justify-content: space-around">
- <div>
- <div>
- <span>本币:</span>
- </div>
- </div>
- <div>
- <div style="color: #81B337">
- <span>应收:</span>
- <span class="weightnum">{{ form.totalAmountD ? form.totalAmountD : 0 }}元</span>
- </div>
- </div>
- <div>
- <div style="color: #6BBCD1">
- <span>应付:</span>
- <span class="weightnum">{{ form.totalAmountC ? form.totalAmountC : 0 }}元</span>
- </div>
- </div>
- <div class="bottomFlex">
- <span>利润</span>
- <span>{{ form.totalProfit ? form.totalProfit : 0 }}元</span>
- </div>
- </div>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane label="文件中心">
- <containerTitle title="上传附件"></containerTitle>
- <c-upload
- :data="form.tradingBoxFilesList"
- :enumerationValue="76"
- deleteUrl="/api/blade-los/tradingBoxFiles/remove"
- display
- :disabled="editButton"
- ></c-upload>
- </el-tab-pane>
- </el-tabs>
- </div>
- <reports :id="form.id" :assemblyForm="form" businessValue="XGFY" ref="report"></reports>
- <business-reports :id="form.id" :itemIds="itemIds" ref="print" businessValue="XGFY" :type="true"></business-reports>
- <business-reports
- :id="form.id"
- :itemIds="itemCIds"
- ref="printD"
- businessValue="XGFY"
- classifyCode="费用"
- groupCode="应收"
- :selecList="selectionfeedList"
- ></business-reports>
- <business-reports
- :id="form.id"
- :itemIds="itemCIds"
- ref="printC"
- businessValue="XGFY"
- classifyCode="费用"
- groupCode="应付"
- :selecList="selectionfeecList"
- ></business-reports>
- <!--审核弹窗-->
- <el-dialog
- append-to-body
- title="审批进度"
- class="el-dialogDeep"
- :visible.sync="checkScheduleDialog"
- width="40%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- v-dialog-drag
- >
- <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
- </el-dialog>
- <!-- 启用 -->
- <el-dialog append-to-body title="放箱号" :visible.sync="activationDialog" width="30%" :before-close="activationClose" v-dialog-drag>
- <span>
- <avue-form ref="form2" v-model="activationForm" :option="activationOption">
- <tempalte slot="polCname">
- <dic-select
- v-model="activationForm.polCname"
- placeholder="港口"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bports/list?status=0"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="dicChange('polCname', $event)"
- ></dic-select>
- </tempalte>
- <tempalte slot="podCname">
- <dic-select
- v-model="activationForm.podCname"
- placeholder="港口"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bports/list?status=0"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="dicChange('podCname2', $event)"
- :disabled="editDisabled"
- ></dic-select>
- </tempalte>
- </avue-form>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="activationDialog = false" size="mini">取 消</el-button>
- <el-button type="primary" @click.stop="activationSubmit" size="mini">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog title="导入数据" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false" v-dialog-drag>
- <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore" :upload-after="onSuccess">
- <template slot="excelTemplate">
- <el-button type="primary" @click="handleGet"> 点击下载<i class="el-icon-download el-icon--right"></i> </el-button>
- </template>
- </avue-form>
- <p style="text-align: center;color: #DC0505">
- 温馨提示 第一次导入时请先下载模板
- </p>
- </el-dialog>
- <fee-modify
- ref="feeModify"
- :form="form"
- @updateDetail="updateDetail"
- url="/boxManagement/boxCost/index"
- pageStatus=""
- pageLabel="箱管费用"
- ></fee-modify>
- <fee-modify-view ref="feeModifyView" :form="form"></fee-modify-view>
- <reportContainer ref="reportContainer"></reportContainer>
- <!--结算单位弹窗-->
- <el-dialog title="打印" :visible.sync="printingDialog" append-to-body width="70%" :close-on-click-modal="false" :before-close="handleClose">
- <div>
- <el-row :gutter="10">
- <el-col :span="4">
- <avue-tree :option="reportOption" :data="reportTypeData" @node-click="reportNodeClick"></avue-tree>
- </el-col>
- <el-col :span="20">
- <avue-crud
- :option="optionPrinting"
- :table-loading="printingLoading"
- :data="PrintingData"
- id="out-table"
- :header-cell-class-name="headerClassName"
- :row-style="{ height: '20px' }"
- :cell-style="{ padding: '0px' }"
- >
- <template slot-scope="scope" slot="menu">
- <el-button type="text" size="small" @click="dialogPreviewfun(scope.row)">打印预览</el-button>
- </template>
- </avue-crud>
- </el-col>
- </el-row>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button size="small" @click="printingDialog = false">取 消</el-button>
- </span>
- </el-dialog>
- <el-dialog title="打印" :visible.sync="selectPrintingDialog" append-to-body width="70%" :close-on-click-modal="false" :before-close="handleClose">
- <div>
- <reportformsList ref="reportformsList" @reportRadio="reportRadio"></reportformsList>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button size="small" @click="selectPrintingDialog = false">取 消</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- detail,
- submit,
- pleaseCheck,
- repealCancel,
- tradingBoxItem,
- tradingBoxFees,
- submitItemList,
- submitFeeList,
- enable,
- copyAgent,
- confirm,
- revoke,
- pleaseVerifyCost,
- revokeCheckPleaseVerifyCost
- } from "@/api/boxManagement/buyContainer/index.js";
- import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
- import { getFeeCenterCorpIds } from "@/api/iosBasicData/feecenter";
- import dicSelect from "@/components/dicSelect/main";
- import checkSchedule from "@/components/checkH/checkSchedule.vue";
- import businessReports from "@/components/boxManagement/businessReports.vue";
- import reports from "@/components/boxManagement/reports.vue";
- import feeModify from "@/components/feeModify/boxMain.vue";
- import feeModifyView from "@/components/feeModify/view.vue";
- import { dateFormat } from "@/util/date";
- import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
- import { getToken } from "@/util/auth";
- import { reportsGetReportData } from "@/api/boxManagement/reports";
- import reportformsList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsList.vue";
- import { getList as reportsList } from "@/api/iosBasicData/reports";
- import _ from "lodash";
- import { Header } from "element-ui";
- export default {
- name: "detailsPage",
- data() {
- return {
- CNYSUM: 0,
- USDSUM: 0,
- sumData: [],
- sumOption: {
- border: true,
- align: "center",
- menuAlign: "center",
- menu: false,
- header: false,
- addBtn: false,
- // height: '100px',
- column: [
- {
- label: "客户",
- prop: "corpCnName",
- overHidden: true
- },
- {
- label: "本币应收",
- prop: "rmbD",
- overHidden: true
- },
- {
- label: "本币应付",
- prop: "rmbC",
- overHidden: true
- },
- {
- label: "外币应收",
- prop: "usdD",
- overHidden: true
- },
- {
- label: "外币应付",
- prop: "usdC",
- overHidden: true
- },
- {
- label: "合计应收",
- prop: "sumD",
- overHidden: true
- },
- {
- label: "合计应付",
- prop: "sumC",
- overHidden: true
- }
- ]
- },
- boxSelectionList: [],
- rulesList: [],
- rtOption: {
- border: true,
- align: "center",
- menuWidth: 120,
- // menu: false,
- editBtn: false,
- delBtn: false,
- header: false,
- addBtn: false,
- height: "400px",
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- fixed: true,
- headerslot: true
- },
- {
- label: "起",
- prop: "riseDays",
- cell: true,
- type: "number",
- controls: false,
- overHidden: true
- },
- {
- label: "止",
- prop: "stopDays",
- cell: true,
- type: "number",
- controls: false,
- overHidden: true
- },
- {
- label: "费率",
- prop: "rate",
- cell: true,
- type: "number",
- controls: false,
- overHidden: true
- },
- {
- label: "币别",
- prop: "curCode",
- cell: true,
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- overHidden: true
- }
- ]
- },
- rtDialog: false,
- excelBox: false,
- excelForm: {},
- excelLoading: false,
- excelOption: {
- submitBtn: false,
- emptyBtn: false,
- column: [
- {
- label: "模板下载",
- prop: "excelTemplate",
- formslot: true,
- span: 24
- },
- {
- label: "模板上传",
- prop: "excelFile",
- type: "upload",
- drag: true,
- loadText: "模板上传中,请稍等",
- span: 24,
- propsHttp: {
- res: "data"
- },
- tip: "请上传 .xls,.xlsx 标准格式文件",
- action: "/api/blade-los/tradingBoxItem/importBoxItem"
- }
- ]
- },
- activationForm: {},
- activationOption: {
- menuBtn: false,
- span: 6,
- disabled: false,
- column: [
- {
- label: "放箱号",
- prop: "containerNumber",
- span: 24,
- rules: [
- {
- required: true,
- message: " ",
- trigger: "blur"
- }
- ]
- },
- {
- label: "起运港",
- prop: "polCname",
- span: 24,
- rules: [
- {
- required: true,
- message: " ",
- trigger: "blur"
- }
- ]
- },
- {
- label: "目的港",
- prop: "podCname",
- span: 24,
- rules: [
- {
- required: true,
- message: " ",
- trigger: "blur"
- }
- ]
- },
- {
- label: "启用日期",
- prop: "activationDate",
- span: 24,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- rules: [
- {
- required: true,
- message: "",
- trigger: "blur"
- }
- ]
- }
- ]
- },
- activationDialog: false,
- itemCIds: null,
- feeType: null,
- selectionList: [],
- selectionfeedList: [],
- selectionfeecList: [],
- checkId: "", // 审核需要的id
- batchNo: "",
- checkScheduleDialog: false, // 审核弹窗
- editButton: false,
- editDisabled: false,
- form: {
- type: "XGFY",
- purchaseDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
- tradingBoxItemsList: [],
- feeCenterList: [],
- tradingBoxFilesList: []
- },
- oldForm: {},
- optionForm: {
- menuBtn: false,
- span: 6,
- disabled: false,
- labelWidth: 100,
- column: [
- {
- label: "结算单位",
- prop: "purchaseCompanyName",
- rules: [
- {
- required: true,
- message: " ",
- trigger: "blur"
- }
- ],
- disabled: false
- },
- {
- label: "合同号",
- prop: "contractNo",
- rules: [
- {
- required: true,
- message: " ",
- trigger: "blur"
- }
- ],
- disabled: false
- },
- {
- label: "业务日期",
- prop: "purchaseDate",
- // type: "date",
- // format: "yyyy-MM-dd",
- // valueFormat: "yyyy-MM-dd HH:mm:ss",
- rules: [
- {
- required: true,
- message: " ",
- trigger: "blur"
- }
- ],
- disabled: false
- },
- {
- label: "箱量",
- prop: "boxNumber",
- disabled: false
- },
- {
- label: "业务状态",
- prop: "buxStaus",
- disabled: true
- },
- {
- label: "备注",
- prop: "remarks",
- type: "textarea",
- minRows: 2,
- span: 18
- }
- ]
- },
- optionForm2: {
- menuBtn: false,
- span: 5,
- disabled: true,
- labelWidth: 100,
- column: [
- {
- label: "系统号",
- prop: "sysNo",
- disabled: true
- },
- {
- label: "制单人",
- prop: "createUserName",
- disabled: true,
- span: 4
- },
- {
- label: "制单日期",
- prop: "createTime",
- disabled: true
- },
- {
- label: "修改人",
- prop: "updateUserName",
- disabled: true,
- span: 4
- },
- {
- label: "修改日期",
- prop: "updateTime",
- disabled: true
- }
- ]
- },
- option: {},
- optionBack: {
- // height: 'auto',
- maxHeight: 340,
- calcHeight: 30,
- menuWidth: 60,
- searchMenuSpan: 18,
- tip: false,
- border: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: "center",
- menu: false,
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- fixed: true,
- headerslot: true
- },
- // {
- // label: "是否启用",
- // prop: "whetherEnable",
- // overHidden: true,
- // },
- // {
- // label: '放箱号',
- // prop: 'containerNumber',
- // overHidden: true,
- // width: 100,
- // },
- {
- label: "箱号",
- prop: "code",
- width: 140,
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: "请输入箱号",
- trigger: "blur"
- }
- ]
- },
- // {
- // label: '代理名称',
- // prop: 'agentName',
- // cell: true,
- // slot: true,
- // formslot: true,
- // overHidden: true,
- // width: 100
- // },
- {
- label: "箱型",
- prop: "boxType",
- width: 100,
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: "请选择箱型",
- trigger: "blur"
- }
- ]
- },
- {
- label: "箱属",
- prop: "boxBelongsTo",
- overHidden: true,
- cell: true,
- width: 100,
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxBelongsTo",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- rules: [
- {
- required: true,
- message: "请选择箱属",
- trigger: "blur"
- }
- ]
- },
- {
- label: "放箱号类型",
- prop: "boxCategory",
- overHidden: true,
- cell: true,
- width: 100,
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxCategory",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- rules: [
- {
- required: true,
- message: "请选择放箱号类型",
- trigger: "blur"
- }
- ]
- },
- {
- label: "维修部位",
- prop: "repairLocation",
- cell: true,
- overHidden: true,
- width: 100
- },
- {
- label: "箱况",
- prop: "boxCondition",
- overHidden: true,
- cell: true,
- width: 100,
- type: "select",
- dicData: [
- {
- label: "新",
- value: "新"
- },
- {
- label: "旧",
- value: "旧"
- }
- ],
- rules: [
- {
- required: true,
- message: "请选择箱况",
- trigger: "blur"
- }
- ]
- },
- {
- label: "箱状态",
- prop: "status",
- width: 100,
- overHidden: true
- },
- {
- label: "箱好坏",
- prop: "boxStatus",
- width: 100,
- cell: true,
- overHidden: true,
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_status",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- rules: [
- {
- required: true,
- message: "请选择箱好坏",
- trigger: "blur"
- }
- ]
- },
- {
- label: "箱动态",
- prop: "boxDynamics",
- width: 100,
- overHidden: true
- },
- {
- label: "金额",
- prop: "amount",
- cell: true,
- type: "number",
- controls: false,
- overHidden: true,
- width: 100,
- rules: [
- {
- required: true,
- message: "请输入金额",
- trigger: "blur"
- }
- ]
- },
- {
- label: "币别",
- prop: "currency",
- width: 100,
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: "请选择币别",
- trigger: "blur"
- }
- ]
- },
- {
- label: "汇率",
- prop: "exrate",
- cell: true,
- type: "number",
- controls: false,
- overHidden: true,
- width: 100,
- rules: [
- {
- required: true,
- message: "请输入汇率",
- trigger: "blur"
- }
- ]
- },
- {
- label: "箱东",
- prop: "boxEastName",
- overHidden: true,
- width: 100
- },
- {
- label: "原箱东",
- prop: "originalBoxEastName",
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- width: 100
- },
- {
- label: "场站",
- prop: "stationCname",
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- width: 100,
- rules: [
- {
- required: true,
- message: "请选择场站",
- trigger: "blur"
- }
- ]
- },
- {
- label: "限制港口",
- prop: "restrictedPortsName",
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- width: 200
- },
- {
- label: "限制船公司",
- prop: "restrictingShippingCompaniesName",
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- width: 200
- },
- {
- label: "启用日期",
- prop: "activationDate",
- // cell: true,
- overHidden: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss"
- },
- {
- label: "制单人",
- prop: "createUserName",
- overHidden: true
- },
- {
- label: "制单日期",
- prop: "createTime",
- type: "date",
- overHidden: true,
- width: 120,
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss"
- },
- {
- label: "修改人",
- prop: "updateUserName",
- overHidden: true
- },
- {
- label: "修改日期",
- prop: "updateTime",
- type: "date",
- overHidden: true,
- width: 120,
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss"
- },
- {
- label: "备注",
- prop: "remarks",
- cell: true,
- width: 150,
- overHidden: true
- }
- ]
- },
- feedOption: {},
- feedOptionBack: {
- // height: 'auto',
- maxHeight: "250",
- calcHeight: 30,
- menuWidth: 60,
- tip: false,
- border: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: "center",
- menu: false,
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- fixed: true,
- headerslot: true
- },
- // {
- // label: '账单状态',
- // prop: 'accStatus',
- // overHidden: true,
- // width: 80,
- // type: 'select',
- // dicData: [{
- // label: '未生成',
- // value: 0,
- // }, {
- // label: '已生成',
- // value: 1,
- // }],
- // },
- {
- label: "费用状态",
- prop: "auditStatus",
- overHidden: true,
- width: 80,
- type: "select",
- dicData: [
- {
- label: "录入",
- value: "0"
- },
- {
- label: "提交审核",
- value: "1"
- },
- {
- label: "审核中",
- value: "2"
- },
- {
- label: "审核通过",
- value: "4"
- },
- {
- label: "申请修改",
- value: "5"
- },
- {
- label: "申请删除",
- value: "6"
- }
- ]
- },
- {
- label: "类别",
- prop: "billType",
- width: 100,
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择类别",
- trigger: "blur"
- }
- ]
- },
- {
- label: "收费对象",
- prop: "corpCnName",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择付费对象",
- trigger: "blur"
- }
- ]
- },
- {
- label: "箱号",
- prop: "cntrNo",
- width: 140,
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true
- },
- {
- label: "费用名称",
- prop: "feeCnName",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择费用名称",
- trigger: "blur"
- }
- ]
- },
- {
- label: "计量单位",
- prop: "unitNo",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true
- },
- {
- label: "币别",
- prop: "curCode",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择币别",
- trigger: "blur"
- }
- ]
- },
- {
- label: "汇率",
- prop: "exrate",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true
- },
- {
- label: "单价",
- prop: "price",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请输入单价",
- trigger: "blur"
- }
- ]
- },
- {
- label: "数量",
- prop: "quantity",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请输入数量",
- trigger: "blur"
- }
- ]
- },
- {
- label: "本币",
- prop: "amountCNY",
- width: "100",
- overHidden: true
- },
- {
- label: "外币",
- prop: "amountUSD",
- width: "100",
- overHidden: true
- },
- {
- label: "付费申请金额",
- prop: "appliedAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "申请发票金额",
- prop: "appliedInvoiceAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "已开票金额",
- prop: "uninvoicedAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "已结算金额",
- prop: "stlTtlAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "制单人",
- prop: "createUserName",
- width: "100",
- overHidden: true
- },
- {
- label: "制单日期",
- prop: "createTime",
- width: "120",
- overHidden: true
- },
- {
- label: "修改人",
- prop: "updateUserName",
- width: "100",
- overHidden: true
- },
- {
- label: "修改日期",
- prop: "updateTime",
- width: "120",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- // cell: true,
- width: 150,
- overHidden: true
- }
- ]
- },
- feecOption: {},
- feecOptionBack: {
- // height: 'auto',
- maxHeight: "250",
- calcHeight: 30,
- menuWidth: 60,
- tip: false,
- border: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: "center",
- menu: false,
- summaryText: "合计",
- showSummary: true,
- sumColumnList: [
- {
- name: "amount",
- type: "sum",
- decimals: 2
- },
- {
- name: "amountLoc",
- type: "sum",
- decimals: 2
- },
- {
- name: "appliedInvoiceAmount",
- type: "sum",
- decimals: 2
- },
- {
- name: "uninvoicedAmount",
- type: "sum",
- decimals: 2
- },
- {
- name: "stlTtlAmount",
- type: "sum",
- decimals: 2
- }
- ],
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- fixed: true,
- headerslot: true
- },
- // {
- // label: '账单状态',
- // prop: 'accStatus',
- // overHidden: true,
- // width: 80,
- // type: 'select',
- // dicData: [{
- // label: '未生成',
- // value: 0,
- // }, {
- // label: '已生成',
- // value: 1,
- // }],
- // },
- {
- label: "费用状态",
- prop: "auditStatus",
- overHidden: true,
- width: 80,
- type: "select",
- dicData: [
- {
- label: "录入",
- value: "0"
- },
- {
- label: "提交审核",
- value: "1"
- },
- {
- label: "审核中",
- value: "2"
- },
- {
- label: "审核通过",
- value: "4"
- },
- {
- label: "申请修改",
- value: "5"
- },
- {
- label: "申请删除",
- value: "6"
- }
- ]
- },
- {
- label: "类别",
- prop: "billType",
- width: 100,
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择类别",
- trigger: "blur"
- }
- ]
- },
- {
- label: "收费对象",
- prop: "corpCnName",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择付费对象",
- trigger: "blur"
- }
- ]
- },
- {
- label: "箱号",
- prop: "cntrNo",
- width: 140,
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true
- },
- {
- label: "费用名称",
- prop: "feeCnName",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择费用名称",
- trigger: "blur"
- }
- ]
- },
- {
- label: "计量单位",
- prop: "unitNo",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true
- },
- {
- label: "币别",
- prop: "curCode",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择币别",
- trigger: "blur"
- }
- ]
- },
- {
- label: "汇率",
- prop: "exrate",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true
- },
- {
- label: "单价",
- prop: "price",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请输入单价",
- trigger: "blur"
- }
- ]
- },
- {
- label: "数量",
- prop: "quantity",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请输入数量",
- trigger: "blur"
- }
- ]
- },
- {
- label: "本币",
- prop: "amountCNY",
- width: "100",
- overHidden: true
- },
- {
- label: "外币",
- prop: "amountUSD",
- width: "100",
- overHidden: true
- },
- {
- label: "付费申请金额",
- prop: "appliedAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "申请发票金额",
- prop: "appliedInvoiceAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "已开票金额",
- prop: "uninvoicedAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "已结算金额",
- prop: "stlTtlAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "制单人",
- prop: "createUserName",
- width: "100",
- overHidden: true
- },
- {
- label: "制单日期",
- prop: "createTime",
- width: "120",
- overHidden: true
- },
- {
- label: "修改人",
- prop: "updateUserName",
- width: "100",
- overHidden: true
- },
- {
- label: "修改日期",
- prop: "updateTime",
- width: "120",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- // cell: true,
- width: 150,
- overHidden: true
- }
- ]
- },
- feeCenterListD: [],
- feeCenterListC: [],
- roleName: [],
- updateSearchKey: new Date().getTime(),
- updateFormKey: new Date().getTime(),
- deptId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
- printingDialog: false, // 打印弹窗开关
- printingDC: "", // 打印弹窗选择是应收还是应付
- PrintingData: [], // 打印弹窗列表数据
- printingLoading: false, // 打印弹窗加载动画
- optionPrinting: {
- stripe: true,
- maxHeight: "250",
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- selection: true,
- dialogClickModal: false,
- refreshBtn: false,
- columnBtn: false,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- editBtn: false,
- menuWidth: "100",
- column: [
- {
- label: "币别",
- prop: "curCode",
- width: 100,
- cell: true,
- type: "select",
- dicData: [
- {
- label: "全部",
- value: null
- },
- {
- label: "USD",
- value: "USD"
- },
- {
- label: "CNY",
- value: "CNY"
- }
- ],
- overHidden: true
- },
- {
- label: "客户名称",
- prop: "cnName",
- overHidden: true
- },
- {
- label: "客户编号",
- prop: "code",
- overHidden: true
- }
- ]
- },
- reportOption: {
- nodeKey: "id",
- addBtn: false,
- menu: false,
- size: "small",
- props: {
- labelText: "标题",
- label: "cnName",
- value: "value",
- children: "children"
- }
- },
- reportTypeData: [], // 打印选择的数据
- reportformsObj: {}, // 打印选择的数据
- selectPrintingDialog: false, // 打印弹窗
- idArr:[],
- };
- },
- components: {
- dicSelect,
- checkSchedule,
- businessReports,
- reports,
- feeModify,
- feeModifyView,
- reportformsList,
- reportContainer
- },
- props: {
- detailData: Object
- },
- async created() {
- this.roleName = localStorage.getItem("roleName").split(",");
- this.option = await this.getColumnData(this.getColumnName(477), this.optionBack);
- this.feedOption = await this.getColumnData(this.getColumnName(463), this.feedOptionBack);
- this.feecOption = await this.getColumnData(this.getColumnName(464), this.feecOptionBack);
- if (this.detailData.id) {
- // this.editButton = true
- // this.editDisabled = true
- // this.optionForm.disabled = true
- this.getDetail(this.detailData.id);
- }
- if (this.$route.query.params) {
- this.getDetail(this.$route.query.params);
- }
- if (this.detailData.copyId) {
- this.getCopydate(this.detailData.copyId);
- }
- this.saveLocalCurrency(this.deptId);
- },
- methods: {
- // 预览报表
- handleReportPreview(url, data) {
- console.log(url, 1670);
- console.log(data, 1671);
- Stimulsoft.Base.StiLicense.key =
- "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHn0s4gy0Fr5YoUZ9V00Y0igCSFQzwEqYBh/N77k4f0fWXTHW5rqeBNLkaurJDenJ9o97TyqHs9HfvINK18Uwzsc/bG01Rq+x3H3Rf+g7AY92gvWmp7VA2Uxa30Q97f61siWz2dE5kdBVcCnSFzC6awE74JzDcJMj8OuxplqB1CYcpoPcOjKy1PiATlC3UsBaLEXsok1xxtRMQ283r282tkh8XQitsxtTczAJBxijuJNfziYhci2jResWXK51ygOOEbVAxmpflujkJ8oEVHkOA/CjX6bGx05pNZ6oSIu9H8deF94MyqIwcdeirCe60GbIQByQtLimfxbIZnO35X3fs/94av0ODfELqrQEpLrpU6FNeHttvlMc5UVrT4K+8lPbqR8Hq0PFWmFrbVIYSi7tAVFMMe2D1C59NWyLu3AkrD3No7YhLVh7LV0Tttr/8FrcZ8xirBPcMZCIGrRIesrHxOsZH2V8t/t0GXCnLLAWX+TNvdNXkB8cF2y9ZXf1enI064yE5dwMs2fQ0yOUG/xornE";
- // Stimulsoft.Base.StiLicense.Key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkcgIvwL0jnpsDqRpWg5FI5kt2G7A0tYIcUygBh1sPs7plofUOqPB1a4HBIXJB621mau2oiAIj+ysU7gKUXfjn/D5BocmduNB+ZMiDGPxFrAp3PoD0nYNkkWh8r7gBZ1v/JZSXGE3bQDrCQCNSy6mgby+iFAMV8/PuZ1z77U+Xz3fkpbm6MYQXYp3cQooLGLUti7k1TFWrnawT0iEEDJ2iRcU9wLqn2g9UiWesEZtKwI/UmEI2T7nv5NbgV+CHguu6QU4WWzFpIgW+3LUnKCT/vCDY+ymzgycw9A9+HFSzARiPzgOaAuQYrFDpzhXV+ZeX31AxWlnzjDWqpfluygSNPtGul5gyNt2CEoJD1Yom0VN9fvRonYsMsimkFFx2AwyVpPcs+JfVBtpPbTcZscnzUdmiIvxv8Gcin6sNSibM6in/uUKFt3bVgW/XeMYa7MLGF53kvBSwi78poUDigA2n12SmghLR0AHxyEDIgZGOTbNI33GWu7ZsPBeUdGu55R8w='
- Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile("/reports/stimulsoft/Localization/zh-CHS.xml", true, "zh-CHS");
- Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("/reports/stimulsoft/Localization/zh-CHS.xml");
- // 工具栏
- var options = new Stimulsoft.Viewer.StiViewerOptions();
- options.height = "100%";
- options.appearance.scrollbarsMode = true; // 滚动条模式
- options.toolbar.showDesignButton = false; // 显示设计按钮
- options.toolbar.showAboutButton = false; // 显示关于按钮
- options.toolbar.showResourcesButton = false; // 显示资源按钮
- options.toolbar.showFullScreenButton = false; // 显示全屏按钮
- options.toolbar.showOpenButton = false; // 显示打开按钮
- options.appearance.showTooltips = false; // 显示工具提示
- options.appearance.showDialogsHelp = false; // 显示对话框帮助
- options.exports.showExportToDocument = false; // 显示导出到文档
- options.toolbar.showParametersButton = true; // 显示参数按钮
- options.appearance.bookmarksPrint = true; // 书签打印
- options.toolbar.showSendEmailButton = true; // 显示发送邮件按钮
- options.email.showEmailDialog = false;
- options.email.showExportDialog = false;
- // options.toolbar.showPrintButton = false // 打印按钮是否显示 下面直接自定义控制打印弹窗是否开启
- // printDestination 参数:用于指定报表打印的目标位置,可以是打印机、PDF 文件或者直接打印到浏览器等。
- // Stimulsoft.Viewer.StiPrintDestination.Direct:表示直接打印到打印机,即将报表内容直接发送至打印机进行打印。
- // 通过设置不同的 printDestination 参数,你可以控制报表打印的行为,例如是直接打印到打印机,还是生成 PDF 文件,或者直接在浏览器中预览打印内容等。
- options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct;
- // htmlRenderMode html渲染模式
- options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table;
- // 是创建一个 Stimulsoft 报表查看器的实例的代码
- let viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
- viewer.onEmailReport = this.testMail;
- // 报表
- console.log("创建一个报表实例");
- console.log();
- let report = new window.Stimulsoft.Report.StiReport();
- // 加载文件
- console.log("从url加载报表");
- // report.loadFile("/reports/stimulsoft/demos/SimpleList.mrt");
- report.load(url);
- // data.pageOne = "Page : 1 of 1";
- // // 处理超长数据
- // if (data.hshipperDetails) {
- // var consignerIndex2 = data.hshipperDetails.indexOf("\n");
- // for (let i = 0; i < 4; i++) {
- // consignerIndex2 = data.hshipperDetails.indexOf("\n", consignerIndex2 + 1);
- // }
- // if (consignerIndex2 != -1) {
- // var hshipperDetails = data.hshipperDetails.substring(consignerIndex2 + 2, data.hshipperDetails.length);
- // data.hshipperDetails = data.hshipperDetails.substring(0, consignerIndex2) + " *";
- // data.commodityDescr += "\n*" + hshipperDetails;
- // }
- // }
- // if (data.hconsigneeDetails) {
- // var consigneeIndex2 = data.hconsigneeDetails.indexOf("\n");
- // for (let i = 0; i < 3; i++) {
- // consigneeIndex2 = data.hconsigneeDetails.indexOf("\n", consigneeIndex2 + 1);
- // }
- // if (consigneeIndex2 != -1) {
- // var hconsigneeDetails = data.hconsigneeDetails.substring(consigneeIndex2 + 2, data.hconsigneeDetails.length);
- // data.hconsigneeDetails = data.hconsigneeDetails.substring(0, consigneeIndex2) + " **";
- // data.commodityDescr += "\n**" + hconsigneeDetails;
- // }
- // }
- // if (data.hnotifyDetails) {
- // var notifierIndex2 = data.hnotifyDetails.indexOf("\n");
- // for (let i = 0; i < 3; i++) {
- // notifierIndex2 = data.hnotifyDetails.indexOf("\n", notifierIndex2 + 1);
- // }
- // if (notifierIndex2 != -1) {
- // var hnotifyDetails = data.hnotifyDetails.substring(notifierIndex2 + 2, data.hnotifyDetails.length);
- // data.hnotifyDetails = data.hnotifyDetails.substring(0, notifierIndex2) + " ***";
- // data.commodityDescr += "\n***" + hnotifyDetails;
- // }
- // }
- // // 处理箱号
- // if (this.isPrintTheBoxNumber) {
- // data.commodityDescr += "\n.\n.\n";
- // }
- // // PLACE & DATE OF ISSUE
- // data.placeAndDateOfIssue = "";
- // if (data.issueAt) {
- // data.placeAndDateOfIssue += data.issueAt;
- // }
- // if (data.issueDate) {
- // let date = new Date(data.issueDate.replace(/-/g, "/"));
- // let yyyy = date.getFullYear();
- // let mmmm = date.toDateString().split(" ")[1];
- // let dd = date.getDate();
- // data.placeAndDateOfIssue += ", " + dd + "-" + mmmm + "-" + yyyy;
- // }
- // // Total number of containers or packages received by the Carriers
- // if (data.preContainersList) {
- // let boxMap = new Map();
- // for (let boxQuantity of data.preContainersList) {
- // if (boxMap.get(boxQuantity.cntrTypeCode)) {
- // let v = boxMap.get(boxQuantity.cntrTypeCode);
- // boxMap.set(boxQuantity.cntrTypeCode, v + boxQuantity.quantity);
- // } else {
- // boxMap.set(boxQuantity.cntrTypeCode, boxQuantity.quantity);
- // }
- // }
- // let boxs = "";
- // boxMap.forEach(function(value, key, map) {
- // boxs += value + "x" + key + ", ";
- // });
- // boxs = boxs.substring(0, boxs.length - 2);
- // data.boxQuantity = boxs + " CONTAINER(S) ONLY";
- // }
- // // Number of original B/Ls
- // if (data.numberOfObl) {
- // data.numberOfObl += " (" + data.numberOfOblDigit + ")";
- // }
- // if (data.commodityDescr) {
- // var descriptionIndex2 = data.commodityDescr.indexOf("\n");
- // for (let i = 0; i < 19; i++) {
- // descriptionIndex2 = data.commodityDescr.indexOf("\n", descriptionIndex2 + 1);
- // }
- // if (descriptionIndex2 != -1) {
- // data.pageOne = "Page : 1 of 2";
- // data.pageTwo = "Page : 2 of 2";
- // var extraLongText = data.commodityDescr.substring(descriptionIndex2 + 2, data.commodityDescr.length);
- // data.commodityDescr = data.commodityDescr.substring(0, descriptionIndex2);
- // data.extraLongTips = "** TO BE CONTINUED ON ATTACHED LIST **";
- // data.extraLongText = extraLongText;
- // }
- // }
- // console.log(data.hshipperDetails, 'hshipperDetails2')
- // 创建一个 Stimulsoft 数据集(DataSet)的实例的代码
- var dataSet = new Stimulsoft.System.Data.DataSet("reportData");
- dataSet.readJson(data); // 用于将 JSON 格式的数据加载到数据集中。data 是包含报表数据的 JSON 对象。
- // 这是一个方法调用,用于在报表中注册数据源。参数 'reportData' 是数据源的名称,
- // 第二个 'reportData' 是数据源的别名,dataSet 则是之前创建的数据集实例
- report.regData("reportData", "reportData", dataSet);
- // 从模版和数据加载报表
- // loadReport(report, '', {})
- // 这是将报表对象指定给报表查看器的属性。viewer 是报表查看器的实例,而 report 是之前创建的报表对象。
- viewer.report = report;
- this.$refs.reportContainer.showContainer(
- () => {
- setTimeout(() => {
- viewer.renderHtml("reportContainer");
- this.createViewerButtons(viewer);
- }, 50);
- },
- () => {}
- );
- console.log("加载成功完成!");
- },
- createViewerButtons(viewer) {
- viewer.jsObject.collections.images["myClose.png"] =
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA0ElEQVQ4ja3TO05CQRQG4A8iOwAbtYWETndAaecK7NwCKmETtJZsSBNLobEz8ZFIJQ0UnOGSm3DnYviTybzO/895DQXGWGCVGQuMEqkRcwcfuMOLalziCaf4TIe9UG9nyMJmFRzNGoRK1BU4xxx9G7cfwostciGk+x8MqgySwDXe4tU53hVV+MNtTmAoX84JGv9NYgrHyR6DV8wUSW7hItZLm36ZVoVQxsFJLOMsPOrH/h7dQwR2cdxOTEn8DtUbPGc4V2H7Vb4Yqfedf/GYSGt8VUmxgyfuBAAAAABJRU5ErkJggg==";
- const closeBtn = viewer.jsObject.SmallButton("closeBtn", "关闭", "myClose.png");
- // 增加打印弹窗配置
- const printBtn = viewer.jsObject.SmallButton("printBtn", "打印报表", "myClose.png");
- // console.log(viewer.jsObject.print(),'1013')
- // 获取 关闭按钮的dom元素位置
- const toolbarTable = viewer.jsObject.controls.toolbar.firstChild.firstChild;
- const buttonsTable = toolbarTable.rows[0].lastChild.lastChild;
- const userButtonCell = buttonsTable.rows[0].insertCell(0);
- // 获取打印按钮的位置
- const buttonsTablePrint = toolbarTable.rows[0].childNodes[0].lastChild; // 打印按钮
- const userButtonPrint = buttonsTablePrint.rows[0].childNodes[0]; // 打印按钮dom位置
- userButtonPrint.addEventListener("click", event => {
- console.log("打印点击");
- // event.preventDefault()
- });
- userButtonPrint.addEventListener("mouseover", event => {
- console.log("移入打印按钮");
- console.log(event, 1035);
- });
- userButtonCell.className = "stiJsViewerClearAllStyles";
- userButtonCell.appendChild(closeBtn); // 添加关闭节点
- // userButtonPrint.prepend(printBtn) // 在 printBtn 节点里最前面增加一个子级节点
- let that = this;
- // 关闭按钮的监听点击
- closeBtn.action = function() {
- console.log(that.$refs.ReportContainer, "1022");
- if (that.$refs.reportContainer) that.$refs.reportContainer.hideContainer();
- };
- // // // 打印按钮监听
- // printBtn.action = (e)=>{
- // console.log('打印')
- // window.print()
- // }
- },
- // 打印费用
- printingCostsfun(dc) {
- this.printingDC = dc;
- let groupCode = "";
- let selectionArr = [];
- this.idArr = [];
- for (let item of this.selectionfeedList) {
- if (item.corpId != this.selectionfeedList[0].corpId) {
- return this.$message.error("请选择相同的结算单位");
- }
- }
- for (let item of this.selectionfeecList) {
- if (item.corpId != this.selectionfeecList[0].corpId) {
- return this.$message.error("请选择相同的结算单位");
- }
- }
- if (dc == "D") {
- groupCode = "应收";
- selectionArr = this.selectionfeedList;
- this.idArr = this.selectionfeedList.map(item => {
- return item.id;
- });
- } else {
- groupCode = "应付";
- selectionArr = this.selectionfeecList;
- this.idArr = this.selectionfeecList.map(item => {
- return item.id;
- });
- }
- if (selectionArr.length > 0) {
- // 打开选择弹窗
- this.selectPrintingDialog = true;
- let page = {
- pageSize: 10,
- currentPage: 1,
- total: 0
- };
- this.$nextTick(() => {
- this.$refs.reportformsList.onLoad(page, {
- businessType: "XGFY",
- classifyCode: "费用",
- groupCode: groupCode
- });
- });
- } else {
- // 没有多选弹窗
- this.printingLoading = true;
- getFeeCenterCorpIds({
- billId: this.form.id,
- dc: dc,
- type: "XGFY"
- }).then(res => {
- this.printingLoading = false;
- res.data.data.forEach(e => {
- e.$cellEdit = true;
- e.curCode = null;
- });
- this.PrintingData = res.data.data;
- });
- this.reportsListfun({
- businessType: "XGFY",
- classifyCode: "费用",
- groupCode: groupCode
- });
- this.printingDialog = true;
- }
- },
- // 费用弹窗里的打印
- dialogPreviewfun(row) {
- if (!this.reportformsObj.id) {
- this.$message.warning("请选择打印类型");
- return;
- }
- // 获取报表数据
- reportsGetReportData({
- billId: this.form.id,
- reportCode: this.reportformsObj.classifyCode,
- groupCode: this.reportformsObj.groupCode,
- corpIds: row.id,
- curCode: row.curCode,
- type: "XGFY"
- }).then(res => {
- this.handleReportPreview(this.reportformsObj.url, res.data.data.data);
- });
- },
- // 打印弹窗里回调
- reportRadio(val) {
- // 多选打印
- // 获取报表数据
- reportsGetReportData({
- billId: this.form.id,
- reportCode: val.classifyCode,
- groupCode: val.groupCode,
- itemIds: this.idArr.join(","),
- type: "XGFY"
- }).then(res => {
- this.handleReportPreview(val.url, res.data.data.data);
- });
- },
- // 获取打印表格数据
- reportsListfun(obj) {
- reportsList(1, 50, obj).then(res => {
- this.reportTypeData = res.data.data.records;
- // 获取第一项的值
- this.reportformsObj = res.data.data.records[0];
- });
- },
- // 打印表格选择
- reportNodeClick(data) {
- this.reportformsObj = data;
- },
- openRtDialog(row) {
- this.rulesList = row.rentTermList;
- this.rtDialog = true;
- },
- rowSave(row, list) {
- console.log(row);
- row.rentTermList = list;
- this.rtDialog = false;
- },
- countChange(row) {
- if (row.curCode == this.getLocalCurrency()) {
- row.amountCNY = _.round(_.multiply(row.price, row.quantity), 2);
- row.amountUSD = 0;
- } else {
- row.amountCNY = 0;
- row.amountUSD = _.round(_.multiply(row.price, row.quantity), 2);
- }
- },
- activationSubmit() {
- this.$refs["form2"].validate((valid, done) => {
- done();
- if (valid) {
- let obj = {
- id: this.form.id,
- ...this.activationForm,
- tradingBoxItemsList: this.selectionList
- };
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- enable(obj)
- .then(res => {
- this.$message.success("操作成功!");
- this.getDetail(this.form.id);
- this.activationDialog = false;
- })
- .finally(() => {
- loading.close();
- });
- } else {
- return false;
- }
- });
- },
- uploadBefore(file, done, loading) {
- done();
- loading = true;
- },
- // 上传成功
- onSuccess(res, done, loading, column) {
- if (res.length > 0) {
- this.$message.success("上传成功!");
- }
- this.excelBox = false;
- // this.$message.success("导入成功!");
- this.getDetail(this.form.id);
- loading = false;
- done();
- },
- // 下载模板
- handleGet() {
- window.open(`/api/blade-los/tradingBoxItem/boxItemTemplate?${this.website.tokenHeader}=${getToken()}&type=4`);
- },
- async dicChange(name, row) {
- if (name == "purchaseCompanyName") {
- if (row) {
- this.form.purchaseCompanyId = row.id;
- } else {
- this.form.purchaseCompanyId = null;
- this.form.purchaseCompanyName = null;
- }
- }
- if (name == "addressCname") {
- if (row) {
- this.form.addressId = row.id;
- this.form.addressCode = row.code;
- this.form.addressEname = row.enName;
- this.form.cyText = row.addressId;
- this.form.stationId = null;
- this.form.stationCode = null;
- this.form.stationCname = null;
- this.form.stationEname = null;
- this.updateFormKey = new Date().getTime();
- } else {
- this.form.addressId = null;
- this.form.addressCode = null;
- this.form.addressEname = null;
- this.form.addressCname = null;
- this.form.cyText = null;
- this.form.stationId = null;
- this.form.stationCode = null;
- this.form.stationCname = null;
- this.form.stationEname = null;
- }
- }
- if (name == "stationCname") {
- if (row) {
- this.form.stationId = row.id;
- this.form.stationCode = row.code;
- this.form.stationEname = row.enName;
- } else {
- this.form.stationId = null;
- this.form.stationCode = null;
- this.form.stationCname = null;
- this.form.stationEname = null;
- }
- }
- if (name == "podCname") {
- if (row) {
- this.form.podId = row.id;
- this.form.podCode = row.code;
- this.form.podEname = row.enName;
- } else {
- this.form.podId = null;
- this.form.podCode = null;
- this.form.podEname = null;
- this.form.podCname = null;
- }
- }
- // if (name == 'podCname') {
- // if (row) {
- // this.form.podId = row.id
- // this.form.podCode = row.code
- // this.form.podEname = row.enName
- // } else {
- // this.form.podId = null
- // this.form.podCode = null
- // this.form.podEname = null
- // this.form.podCname = null
- // }
- // }
- if (name == "polCname") {
- if (row) {
- this.activationForm.polId = row.id;
- this.activationForm.polCode = row.code;
- this.activationForm.polEname = row.enName;
- } else {
- this.activationForm.polId = null;
- this.activationForm.polCode = null;
- this.activationForm.polEname = null;
- this.activationForm.polCname = null;
- }
- }
- if (name == "podCname2") {
- if (row) {
- this.activationForm.podId = row.id;
- this.activationForm.podCode = row.code;
- this.activationForm.podEname = row.enName;
- } else {
- this.activationForm.podId = null;
- this.activationForm.podCode = null;
- this.activationForm.podEname = null;
- this.activationForm.podCname = null;
- }
- }
- if (name == "purchaseDate") {
- if (row) {
- await this.checkRate(null, row, null, 1, this.deptId);
- this.form.tradingBoxItemsList.forEach(item => {
- item.exrate = this.getExchangeRate(item.currency, "C", 1);
- });
- this.feeCenterListD.forEach(item => {
- item.exrate = this.getExchangeRate(item.curCode, "C", 1);
- });
- this.feeCenterListC.forEach(item => {
- item.exrate = this.getExchangeRate(item.curCode, "C", 1);
- });
- }
- }
- },
- rowDicChange(name, row, el, index) {
- if (name == "code") {
- if (row) {
- el.boxType = row.typeName;
- // el.boxCondition = row.boxCondition
- el.stationId = row.stationId;
- el.stationCode = row.stationCode;
- el.stationCname = row.stationCname;
- el.stationEname = row.stationEname;
- el.stationCname = row.stationCname;
- el.restrictedPortsIds = row.restrictedPortsIds;
- el.restrictedPortsName = row.restrictedPortsName;
- el.restrictingShippingCompaniesIds = row.restrictingShippingCompaniesIds;
- el.restrictingShippingCompaniesName = row.restrictingShippingCompaniesName;
- el.activationDate = row.activationDate;
- } else {
- el.code = null;
- el.boxType = null;
- el.boxCondition = null;
- el.stationId = null;
- el.stationCode = null;
- el.stationCname = null;
- el.stationEname = null;
- el.stationCname = null;
- el.restrictedPortsIds = null;
- el.restrictedPortsName = null;
- el.restrictingShippingCompaniesIds = null;
- el.restrictingShippingCompaniesName = null;
- el.activationDate = null;
- }
- }
- if (name == "currency") {
- if (row) {
- el.exrate = row.exratePayable;
- } else {
- el.exrate = null;
- }
- }
- if (name == "curCodeD") {
- if (row) {
- el.exrate = row.exrateReceivable;
- this.countChange(el);
- } else {
- el.exrate = null;
- el.amountCNY = 0;
- el.amountUSD = 0;
- }
- }
- if (name == "curCodeC") {
- if (row) {
- el.exrate = row.exratePayable;
- this.countChange(el);
- } else {
- el.exrate = null;
- el.amountCNY = 0;
- el.amountUSD = 0;
- }
- }
- if (name == "feeCnName") {
- if (row) {
- el.feeId = row.id;
- el.feeCode = row.code;
- } else {
- el.feeId = null;
- el.feeCode = null;
- el.feeCnName = null;
- }
- }
- if (name == "boxType") {
- if (row) {
- el.boxTypeId = row.id;
- } else {
- el.boxTypeId = null;
- el.boxType = null;
- }
- }
- if (name == "stationCname") {
- if (row) {
- el.stationId = row.id;
- el.stationCode = row.code;
- el.stationEname = row.enName;
- } else {
- el.stationId = null;
- el.stationCode = null;
- el.stationCname = null;
- el.stationEname = null;
- }
- }
- if (name == "billType") {
- el.corpId = null;
- el.shortName = null;
- el.corpCnName = null;
- el.corpEnName = null;
- this.updateSearchKey = new Date().getTime();
- }
- if (name == "corpCnName") {
- if (row) {
- el.corpId = row.id;
- el.shortName = row.shortName;
- el.corpEnName = row.enName;
- } else {
- el.corpId = null;
- el.shortName = null;
- el.corpCnName = null;
- el.corpEnName = null;
- }
- }
- if (name == "restrictedPortsName") {
- if (row) {
- el.restrictedPortsIds = row.ids;
- el.restrictedPortsName = row.names;
- } else {
- el.restrictedPortsIds = null;
- el.restrictedPortsName = null;
- }
- }
- if (name == "restrictingShippingCompaniesName") {
- if (row) {
- el.restrictingShippingCompaniesIds = row.ids;
- el.restrictingShippingCompaniesName = row.names;
- } else {
- el.restrictingShippingCompaniesIds = null;
- el.restrictingShippingCompaniesName = null;
- }
- }
- if (name == "originalBoxEastName") {
- if (row) {
- el.originalBoxEastId = row.id;
- } else {
- el.originalBoxEastId = null;
- el.originalBoxEastName = null;
- }
- }
- },
- rowEdit(row) {
- if (row.$cellEdit == true) {
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- },
- rowItemEdit(row) {
- if (row.$cellEdit == true) {
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- },
- rowItemDel(row, index) {
- this.$confirm("确定删除数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (row.id) {
- tradingBoxItem({ ids: row.id }).then(res => {
- this.rulesList.splice(index, 1);
- this.$message.success("成功删除");
- });
- } else {
- this.rulesList.splice(index, 1);
- }
- });
- },
- rtAddRow() {
- this.rulesList.push({ curCode: this.getLocalCurrency(), $cellEdit: true });
- },
- async addRow() {
- if (!this.form.id) {
- return this.$message.error("请保存数据");
- }
- await this.checkRate(null, this.form.purchaseDate, null, 1, this.deptId);
- this.$refs.crud.dicInit();
- this.form.tradingBoxItemsList.push({
- pid: this.form.id,
- boxBelongsTo: "SOC",
- boxCategory: "自有箱",
- boxStatus: "好",
- boxCondition: this.form.boxCondition,
- stationId: this.form.stationId,
- stationCode: this.form.stationCode,
- stationCname: this.form.stationCname,
- stationEname: this.form.stationEname,
- currency: "USD",
- exrate: this.getExchangeRate("USD", "C", 1),
- status: "空箱入场",
- $cellEdit: true
- });
- },
- async feedAddRow() {
- if (!this.form.id) {
- return this.$message.error("请保存数据");
- }
- await this.checkRate(null, this.form.purchaseDate, null, 1, this.deptId);
- this.feeCenterListD.push({
- pid: this.form.id,
- feesType: 1,
- dc: "D",
- billType: "箱东",
- curCode: this.getLocalCurrency(),
- exrate: this.getExchangeRate(this.getLocalCurrency(), "D", 1),
- $cellEdit: true
- });
- },
- async feecAddRow() {
- if (!this.form.id) {
- return this.$message.error("请保存数据");
- }
- await this.checkRate(null, this.form.purchaseDate, null, 1, this.deptId);
- this.feeCenterListC.push({
- pid: this.form.id,
- feesType: 1,
- dc: "C",
- billType: "箱东",
- curCode: this.getLocalCurrency(),
- exrate: this.getExchangeRate(this.getLocalCurrency(), "C", 1),
- $cellEdit: true
- });
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- boxSelectionChange(list) {
- this.boxSelectionList = list;
- },
- feedChange(list) {
- let ids = [];
- list.forEach(e => {
- ids.push(e.id);
- });
- if (ids.length) {
- this.itemCIds = ids.join(",");
- } else {
- this.itemCIds = null;
- }
- this.selectionfeedList = list;
- },
- feecChange(list) {
- let ids = [];
- list.forEach(e => {
- ids.push(e.id);
- });
- if (ids.length) {
- this.itemCIds = ids.join(",");
- } else {
- this.itemCIds = null;
- }
- this.selectionfeecList = list;
- },
- getDetail(id) {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- detail({ id: id })
- .then(res => {
- res.data.data.feeCenterList.forEach(row => {
- if (row.curCode == this.getLocalCurrency()) {
- row.amountCNY = row.amount;
- row.amountUSD = 0;
- }
- if (row.curCode != this.getLocalCurrency()) {
- row.amountUSD = row.amount;
- row.amountCNY = 0;
- }
- if (row.auditStatus > 0) {
- this.editDisabled = true;
- this.optionForm.disabled = true;
- }
- });
- this.feeCenterListD = res.data.data.feeCenterList.filter(item => item.dc == "D");
- this.feeCenterListC = res.data.data.feeCenterList.filter(item => item.dc == "C");
- this.form = res.data.data;
- this.updateFormKey = new Date().getTime();
- })
- .finally(() => {
- loading.close();
- });
- },
- getCopydate(id) {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- copyAgent({ id: id })
- .then(res => {
- this.form = res.data.data;
- this.updateFormKey = new Date().getTime();
- })
- .finally(() => {
- loading.close();
- });
- },
- inEdit() {
- this.editButton = false;
- if (this.form.status == "录入") {
- this.editDisabled = false;
- this.optionForm.disabled = false;
- }
- },
- rowDel(row, index) {
- this.$confirm("确定删除数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (row.id) {
- tradingBoxItem({ ids: row.id }).then(res => {
- this.form.tradingBoxItemsList.splice(index, 1);
- this.$message.success("成功删除");
- });
- } else {
- this.form.tradingBoxItemsList.splice(index, 1);
- }
- });
- },
- polRowDel(row, index) {
- this.$confirm("确定删除数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (row.id) {
- tradingBoxFees({ ids: row.id }).then(res => {
- this.form.feeCenterList.splice(index, 1);
- this.$message.success("成功删除");
- });
- } else {
- this.form.feeCenterList.splice(index, 1);
- }
- });
- },
- podRowDel(row, index) {
- this.$confirm("确定删除数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (row.id) {
- tradingBoxFees({ ids: row.id }).then(res => {
- this.podFeeList.splice(index, 1);
- this.$message.success("成功删除");
- });
- } else {
- this.podFeeList.splice(index, 1);
- }
- });
- },
- allClick(name) {
- if (name == "一键保存") {
- if (!this.form.tradingBoxItemsList.length) {
- return this.$message.error("请添加数据");
- }
- for (let row of this.form.tradingBoxItemsList) {
- if (
- !row.code ||
- !row.boxType ||
- !row.boxBelongsTo ||
- !row.boxCategory ||
- !row.boxStatus ||
- !row.boxCondition ||
- !row.amount ||
- !row.currency ||
- !row.exrate ||
- !row.stationCname ||
- !row.status
- ) {
- this.$refs.crud.rowCell(row, row.$index);
- return this.$message.error("请完善箱明细信息");
- }
- }
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- submitItemList(this.form.tradingBoxItemsList)
- .then(res => {
- this.$message.success("保存成功");
- this.form.tradingBoxItemsList = res.data.data;
- })
- .finally(() => {
- loading.close();
- });
- }
- if (name == "一键编辑") {
- // for (let row of this.form.tradingBoxItemsList) {
- // if (row.whetherEnable != '是') {
- // this.$set(row, "$cellEdit", true);
- // }
- // }
- this.$refs.crud.dicInit();
- }
- if (name == "批量删除") {
- // for (let item of this.selectionList) {
- // if (item.whetherEnable == '是') {
- // return this.$message.error("启用状态不能删除!");
- // }
- // }
- let multiList = [];
- let arr = [];
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- multiList = this.selectionList;
- arr = this.form.tradingBoxItemsList;
- // 获取有id 的数据
- const itemsWithId = multiList.filter(item => item.id != null);
- let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
- // 把选中的删除掉
- multiList.forEach(item => {
- for (let index in arr) {
- if (JSON.stringify(item) == JSON.stringify(arr[index])) {
- arr.splice(Number(index), 1);
- }
- }
- });
- if (itemsWithId.length != 0) {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- tradingBoxItem({ ids: arrIds.join(",") })
- .then(res => {
- this.$message.success("删除成功");
- })
- .finally(() => {
- loading.close();
- });
- }
- });
- }
- if (name == "导入") {
- this.excelOption.column.forEach(item => {
- if (item.prop == "excelFile") {
- item.action = "/api/blade-los/tradingBoxItem/importBoxItem?type=4&id=" + this.form.id;
- }
- });
- this.excelBox = true;
- }
- if (name == "起租") {
- this.$confirm("是否起租?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {});
- }
- if (name == "生成租金") {
- this.$confirm("是否生成租金?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {});
- }
- if (name == "退租") {
- this.$confirm("是否退租?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {});
- }
- if (name == "导入") {
- this.excelBox = true;
- }
- if (name == "启用") {
- for (let item of this.selectionList) {
- if (item.whetherEnable == "是") {
- return this.$message.error("请勿重复启用");
- }
- }
- this.activationForm = {};
- this.activationDialog = true;
- }
- if (name == "D费用一键保存") {
- if (!this.feeCenterListD.length) {
- return this.$message.error("请添加数据");
- }
- for (let row of this.feeCenterListD) {
- row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
- if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
- this.$refs.crud2.rowCell(row, row.$index);
- return this.$message.error("请完善费用明细");
- }
- }
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- submitFeeList(this.feeCenterListD)
- .then(res => {
- this.$message.success("保存成功");
- this.getDetail(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- }
- if (name == "D费用一键编辑") {
- for (let row of this.feeCenterListD) {
- if (!row.stlPid && (row.accStatus == 0 || row.auditStatus == 0)) {
- this.$set(row, "$cellEdit", true);
- }
- }
- }
- if (name == "D费用批量删除") {
- for (let row of this.selectionfeedList) {
- if (row.automaticGenerated == 1) {
- return this.$message.error("系统自动生成的费用不允许删除");
- }
- if (row.stlPid && row.accStatus != 0) {
- return this.$message.error("已生成账单,不允许删除");
- }
- if (row.stlPid && row.auditStatus != 0) {
- return this.$message.error("已申请费用,不允许删除");
- }
- }
- let multiList = [];
- let arr = [];
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- multiList = this.selectionfeedList;
- arr = this.feeCenterListD;
- // 获取有id 的数据
- const itemsWithId = multiList.filter(item => item.id != null);
- let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
- // 把选中的删除掉
- multiList.forEach(item => {
- for (let index in arr) {
- if (JSON.stringify(item) == JSON.stringify(arr[index])) {
- arr.splice(Number(index), 1);
- }
- }
- });
- if (itemsWithId.length != 0) {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- tradingBoxFees({ ids: arrIds.join(",") })
- .then(res => {
- this.$message.success("删除成功");
- })
- .finally(() => {
- loading.close();
- });
- }
- });
- }
- if (name == "C费用一键保存") {
- if (!this.feeCenterListC.length) {
- return this.$message.error("请添加数据");
- }
- for (let row of this.feeCenterListC) {
- row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
- if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
- this.$refs.crud2.rowCell(row, row.$index);
- return this.$message.error("请完善费用明细");
- }
- }
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- submitFeeList(this.feeCenterListC)
- .then(res => {
- this.$message.success("保存成功");
- this.getDetail(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- }
- if (name == "C费用一键编辑") {
- for (let row of this.feeCenterListC) {
- if (!row.stlPid && (row.accStatus == 0 || row.auditStatus == 0)) {
- this.$set(row, "$cellEdit", true);
- }
- }
- }
- if (name == "C费用批量删除") {
- for (let row of this.selectionfeecList) {
- if (row.automaticGenerated == 1) {
- return this.$message.error("系统自动生成的费用不允许删除");
- }
- if (row.stlPid && row.accStatus != 0) {
- return this.$message.error("已生成账单,不允许删除");
- }
- if (row.stlPid && row.auditStatus != 0) {
- return this.$message.error("已申请费用,不允许删除");
- }
- }
- let multiList = [];
- let arr = [];
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- multiList = this.selectionfeecList;
- arr = this.feeCenterListC;
- // 获取有id 的数据
- const itemsWithId = multiList.filter(item => item.id != null);
- let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
- // 把选中的删除掉
- multiList.forEach(item => {
- for (let index in arr) {
- if (JSON.stringify(item) == JSON.stringify(arr[index])) {
- arr.splice(Number(index), 1);
- }
- }
- });
- if (itemsWithId.length != 0) {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- tradingBoxFees({ ids: arrIds.join(",") })
- .then(res => {
- this.$message.success("删除成功");
- })
- .finally(() => {
- loading.close();
- });
- }
- });
- }
- if (name == "D费用申请") {
- // let selecList = [...this.selectionfeedList, ...this.selectionfeecList]
- for (let row of this.selectionfeedList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.stlPid && row.accStatus != 0) {
- return this.$message.error("已生成账单,不允许重复申请");
- }
- if (row.stlPid && row.auditStatus != 0) {
- return this.$message.error("已申请费用,不允许重复申请");
- }
- }
- this.$confirm("确定申请费用?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- srcId: this.form.id,
- srcType: this.form.type,
- feeCenterList: this.selectionfeedList,
- url: "/boxManagement/boxCost/index",
- pageStatus: "",
- pageLabel: "箱管费用"
- };
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- pleaseVerifyCost(obj)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetail(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- if (name == "D撤销请核") {
- for (let row of this.selectionfeedList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus == 0) {
- return this.$message.error("未申请费用,不允许撤销");
- }
- if (row.auditStatus > 2) {
- return this.$message.error("费用已经审核通过,请使用申请修改和删除功能!");
- }
- }
- this.$confirm("确定撤销请核?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- srcId: this.form.id,
- srcType: this.form.type,
- feeCenterList: this.selectionfeedList,
- url: "/boxManagement/boxCost/index",
- pageStatus: "",
- pageLabel: "箱管费用"
- };
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- revokeCheckPleaseVerifyCost(obj)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetail(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- if (name == "D申请修改") {
- for (let row of this.selectionfeedList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus != 4) {
- return this.$message.error("未审核通过的费用,不允许申请");
- }
- if (Number(row.appliedInvoiceAmount) > 0) {
- return this.$message.error("请选择未申请发票的费用?");
- }
- if (Number(row.uninvoicedAmount) > 0) {
- return this.$message.error("请选择未开票的费用?");
- }
- if (Number(row.stlTtlAmount) > 0) {
- return this.$message.error("请选择未结算的费用?");
- }
- this.$refs.feeModify.openDialog(row, "fix");
- }
- }
- if (name == "D申请删除") {
- for (let row of this.selectionfeedList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus != 4) {
- return this.$message.error("未审核通过的费用,不允许申请");
- }
- if (Number(row.appliedInvoiceAmount) > 0) {
- return this.$message.error("请选择未申请发票的费用?");
- }
- if (Number(row.uninvoicedAmount) > 0) {
- return this.$message.error("请选择未开票的费用?");
- }
- if (Number(row.stlTtlAmount) > 0) {
- return this.$message.error("请选择未结算的费用?");
- }
- this.$refs.feeModify.openDialog(row, "del");
- }
- }
- if (name == "D取消申请") {
- for (let row of this.selectionfeedList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (!(row.auditStatus == 5 || row.auditStatus == 6)) {
- return this.$message.error("未申请修改或删除,不允许撤销申请");
- }
- this.$refs.feeModify.openDialog(row, "revoke");
- }
- }
- if (name == "C费用申请") {
- for (let row of this.selectionfeecList) {
- if (row.stlPid && row.accStatus != 0) {
- return this.$message.error("已生成账单,不允许重复申请");
- }
- if (row.stlPid && row.auditStatus != 0) {
- return this.$message.error("已申请费用,不允许重复申请");
- }
- }
- this.$confirm("确定申请费用?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- srcId: this.form.id,
- srcType: this.form.type,
- feeCenterList: this.selectionfeecList,
- url: "/boxManagement/boxCost/index",
- pageStatus: "",
- pageLabel: "箱管费用"
- };
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- pleaseVerifyCost(obj)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetail(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- if (name == "C撤销请核") {
- for (let row of this.selectionfeecList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus == 0) {
- return this.$message.error("未申请费用,不允许撤销");
- }
- if (row.auditStatus > 2) {
- return this.$message.error("费用已经审核通过,请使用申请修改和删除功能!");
- }
- }
- this.$confirm("确定撤销请核?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- srcId: this.form.id,
- srcType: this.form.type,
- feeCenterList: this.selectionfeecList,
- url: "/boxManagement/boxCost/index",
- pageStatus: "",
- pageLabel: "箱管费用"
- };
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- revokeCheckPleaseVerifyCost(obj)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetail(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- if (name == "C申请修改") {
- for (let row of this.selectionfeecList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus != 4) {
- return this.$message.error("未审核通过的费用,不允许申请");
- }
- if (Number(row.appliedInvoiceAmount) > 0) {
- return this.$message.error("请选择未申请发票的费用?");
- }
- if (Number(row.uninvoicedAmount) > 0) {
- return this.$message.error("请选择未开票的费用?");
- }
- if (Number(row.stlTtlAmount) > 0) {
- return this.$message.error("请选择未结算的费用?");
- }
- this.$refs.feeModify.openDialog(row, "fix");
- }
- }
- if (name == "C申请删除") {
- for (let row of this.selectionfeecList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus != 4) {
- return this.$message.error("未审核通过的费用,不允许申请");
- }
- if (Number(row.appliedInvoiceAmount) > 0) {
- return this.$message.error("请选择未申请发票的费用?");
- }
- if (Number(row.uninvoicedAmount) > 0) {
- return this.$message.error("请选择未开票的费用?");
- }
- if (Number(row.stlTtlAmount) > 0) {
- return this.$message.error("请选择未结算的费用?");
- }
- this.$refs.feeModify.openDialog(row, "del");
- }
- }
- if (name == "C取消申请") {
- for (let row of this.selectionfeecList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (!(row.auditStatus == 5 || row.auditStatus == 6)) {
- return this.$message.error("未申请修改或删除,不允许撤销申请");
- }
- this.$refs.feeModify.openDialog(row, "revoke");
- }
- }
- },
- submit(type) {
- this.$refs["form"].validate((valid, done) => {
- done();
- if (valid) {
- for (let row of this.form.tradingBoxItemsList) {
- if (
- !row.code ||
- !row.boxType ||
- !row.boxBelongsTo ||
- !row.boxCategory ||
- !row.boxStatus ||
- !row.boxCondition ||
- !row.amount ||
- !row.currency ||
- !row.exrate ||
- !row.stationCname ||
- !row.status
- ) {
- this.$refs.crud.rowCell(row, row.$index);
- return this.$message.error("请完善箱明细信息");
- }
- }
- for (let row of this.feeCenterListD) {
- row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
- if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
- this.$refs.crud2.rowCell(row, row.$index);
- return this.$message.error("请完善应收费用明细");
- }
- }
- for (let row of this.feeCenterListC) {
- row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
- if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
- this.$refs.crud3.rowCell(row, row.$index);
- return this.$message.error("请完善应付费用明细");
- }
- }
- this.form.feeCenterList = [...this.feeCenterListD, ...this.feeCenterListC];
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- submit(this.form)
- .then(res => {
- this.$message.success("保存成功");
- this.getDetail(res.data.data.id);
- })
- .finally(() => {
- loading.close();
- });
- } else {
- return false;
- }
- });
- },
- confirm() {
- this.$confirm("确认费用?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- confirm(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetail(res.data.data.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- },
- revoke() {
- this.$confirm("确定撤销费用?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- revoke(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetail(res.data.data.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- },
- updateDetail() {
- this.getDetail(this.form.id);
- },
- application() {
- this.$confirm("确定请核数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- id: this.form.id,
- url: "/iosBasicData/costcenter/coc/index",
- pageStatus: "",
- pageLabel: "航线成本(COC)"
- };
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- pleaseCheck(obj)
- .then(res => {
- this.$message.success("请核成功");
- this.getDetail(res.data.data.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- },
- revokeApplication() {
- this.$confirm("确定撤销请核?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- id: this.form.id
- };
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- repealCancel(obj)
- .then(res => {
- this.$message.success("撤销请核成功");
- this.getDetail(res.data.data.id);
- this.editDisabled = false;
- })
- .finally(() => {
- loading.close();
- });
- });
- },
- //请核关闭
- choceScheduleFun() {
- this.checkScheduleDialog = false;
- },
- //自定义列保存
- async saveColumn(ref, option, optionBack, code) {
- const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- //自定义列重置
- async resetColumn(ref, option, optionBack, code) {
- this[option] = this[optionBack];
- const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
- if (inSave) {
- this.$message.success("重置成功");
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- // 更改表格颜色
- headerClassName(tab) {
- //颜色间隔
- let back = "";
- if (tab.columnIndex >= 0 && tab.column.level === 1) {
- if (tab.columnIndex % 2 === 0) {
- back = "back-one";
- } else if (tab.columnIndex % 2 === 1) {
- back = "back-two";
- }
- }
- return back;
- },
- goBack(type) {
- this.$emit("goBack");
- },
- getSum() {
- let sumArr = [];
- let corpArr = [];
- let newArr = [];
- this.sumData = [];
- sumArr = this.feeCenterListD.concat(this.feeCenterListC);
- sumArr.forEach(e => {
- if (e.shortName) {
- corpArr.push(e.shortName);
- }
- });
- newArr = [...new Set(corpArr)];
- newArr.forEach(e => {
- let rmbD = 0;
- let rmbC = 0;
- let usdD = 0;
- let usdC = 0;
- let sumD = 0;
- let sumC = 0;
- sumArr.forEach(item => {
- if (e == item.shortName) {
- if (item.curCode == this.getLocalCurrency() && item.dc == "D") {
- rmbD += Number(item.amountCNY ? item.amountCNY : 0);
- sumD += Number(item.amountCNY ? item.amountCNY : 0);
- }
- if (item.curCode == this.getLocalCurrency() && item.dc == "C") {
- rmbC += Number(item.amountCNY ? item.amountCNY : 0);
- sumC += Number(item.amountCNY ? item.amountCNY : 0);
- }
- if (item.curCode != this.getLocalCurrency() && item.dc == "D") {
- usdD += Number(item.amountUSD ? item.amountUSD : 0);
- sumD += Number(item.amountUSD ? item.amountUSD : 0) * Number(item.exrate ? item.exrate : 0);
- }
- if (item.curCode != this.getLocalCurrency() && item.dc == "C") {
- usdC += Number(item.amountUSD ? item.amountUSD : 0);
- sumC += Number(item.amountUSD ? item.amountUSD : 0) * Number(item.exrate ? item.exrate : 0);
- }
- }
- });
- this.sumData.push({
- corpCnName: e,
- rmbD: _.round(rmbD, 2),
- rmbC: _.round(rmbC, 2),
- usdD: _.round(usdD, 2),
- usdC: _.round(usdC, 2),
- sumD: _.round(sumD, 2),
- sumC: _.round(sumC, 2)
- });
- });
- }
- },
- watch: {
- // 监听业务类型 如果不是分单 可以编辑分单号
- "form.tradingBoxItemsList": {
- // 执行方法
- handler(oldValue, newValue) {
- this.CNYSUM = 0;
- this.USDSUM = 0;
- this.form.tradingBoxItemsList.forEach(item => {
- if (item.currency == this.getLocalCurrency()) {
- this.CNYSUM = _.round(_.add(this.CNYSUM ? Number(this.CNYSUM) : 0, item.amount ? Number(item.amount) : 0), 2);
- }
- if (item.currency != this.getLocalCurrency()) {
- this.USDSUM = _.round(_.add(this.USDSUM ? Number(this.USDSUM) : 0, item.amount ? Number(item.amount) : 0), 2);
- }
- });
- },
- deep: true, // 深度监听
- immediate: true // 第一次改变就执行
- },
- // 监听业务类型 如果不是分单 可以编辑分单号
- feeCenterListD: {
- // 执行方法
- handler(oldValue, newValue) {
- this.getSum();
- },
- deep: true, // 深度监听
- immediate: true // 第一次改变就执行
- },
- // 监听箱信息数据 箱信息中有温度 自动切换 冻货
- feeCenterListC: {
- // 执行方法
- handler(oldValue, newValue) {
- this.getSum();
- },
- deep: true, // 深度监听
- immediate: true // 第一次改变就执行,
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-form-item__error {
- display: none !important;
- }
- ::v-deep .el-form-item {
- margin-bottom: 8px !important;
- }
- ::v-deep .el-table .cell {
- padding: 0 2px !important;
- .el-form-item {
- margin-bottom: 0px !important;
- }
- }
- ::v-deep .avue-crud .el-table .el-form-item__label {
- left: -1px;
- }
- // ::v-deep#out-table .back-one {
- // background: #ecf5ff !important;
- // }
- // ::v-deep#out-table .back-two {
- // background: #ecf5ff !important;
- // }
- ::v-deep #out-table .back-one {
- background: #ecf5ff !important;
- text-align: center;
- padding: 4px 0;
- }
- ::v-deep #out-table .back-two {
- background: #ecf5ff !important;
- text-align: center;
- padding: 4px 0;
- }
- ::v-deep .el-table--small td,
- .el-table--small th {
- padding: 2px !important;
- }
- ::v-deep .el-card__body {
- padding: 3px 10px;
- }
- ::v-deep .box-card .el-card__body {
- padding: 4px !important;
- }
- .disabledBox {
- display: flex;
- align-items: center;
- }
- .meetSize {
- font-size: 16px;
- color: #54bcbd;
- }
- .fontSize {
- font-size: 16px;
- color: #81b337;
- }
- </style>
|