| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660 |
- <template>
- <div>
- <div>
- <el-form :model="assemblyForm" ref="form" label-width="90px" style="margin-bottom: 4px" class="demo-ruleForm">
- <el-row :gutter="10">
- <el-col :span="6">
- <el-form-item label="客户名称" prop="corpCnName">
- <span slot="label">
- <span style="color: #1e9fff">{{ $t("sea118n.corpName") }}</span>
- </span>
- <el-input
- type="age"
- style="width: 100%;"
- v-model="assemblyForm.corpCnName"
- size="small"
- autocomplete="off"
- disabled
- clearable
- placeholder="客户名称"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="提单号" prop="mblno">
- <span slot="label">
- <span style="color: #1e9fff">{{ $t("sea118n.mblno") }}</span>
- </span>
- <el-input
- type="age"
- style="width: 100%;"
- v-model="assemblyForm.mblno"
- size="small"
- autocomplete="off"
- disabled
- clearable
- placeholder="提单号"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="箱型箱量" prop="containers">
- <span slot="label">
- <span style="color: #1e9fff">{{ $t("sea118n.ctnrTypeQty") }}</span>
- </span>
- <el-input
- type="age"
- style="width: 100%;"
- v-model="assemblyForm.quantityCntrDescr"
- size="small"
- autocomplete="off"
- disabled
- clearable
- placeholder="箱型箱量"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="HB/L NO" prop="hblno">
- <span slot="label">
- <span style="color: #1e9fff">HB/L NO</span>
- </span>
- <el-input
- type="age"
- style="width: 100%;"
- v-model="assemblyForm.hblno"
- size="small"
- autocomplete="off"
- disabled
- clearable
- placeholder="HB/L NO"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <!--显示 admin,应收修改,应收查看,应收查看只有打印账单一个功能 -->
- <el-card v-show="isFeeViewD" class="box-card">
- <avue-crud
- :option="optionD"
- :table-loading="loadingD"
- :data="assemblyForm.feeCenterListD"
- v-model="formD"
- id="out-table"
- :header-cell-class-name="headerClassName"
- ref="crudD"
- :row-style="{ height: '20px' }"
- :cell-style="{ padding: '0px' }"
- @selection-change="handleSelectionChange($event, 'D')"
- @resetColumn="resetColumnTwo('crudD', 'optionD', 'optionDBack', 309.2)"
- @saveColumn="saveColumnTwo('crudD', 'optionD', 'optionDBack', 309.2)"
- >
- <template slot="menuLeft">
- <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
- <i class="el-icon-coin"></i>
- <span>{{ $t("sea118n.debit") }}</span>
- </div>
- <el-button
- v-if="isFeeEditD"
- type="danger"
- plain
- size="small"
- :disabled="!selectionDList.length || disabled || isFeedDisabled"
- @click="batchDelete('D')"
- >
- {{ $t("btn118n.deleted") }}
- </el-button>
- <!-- <el-button v-if="isFeeEditD" type="success" plain size="small"
- :disabled="!selectionDList.length || disabled || pleasereviewType"
- @click="GenerateBillsfun('D')">生成账单
- </el-button>
- <el-button v-if="isFeeEditD" type="danger" plain size="small"
- :disabled="!selectionDList.length || disabled || pleasereviewType"
- @click="RevokingBillsfun('D')">撤销账单
- </el-button> -->
- <el-button type="primary" plain size="small" @click="printingCostsfun('D')">{{ $t("btn118n.printBill") }}</el-button>
- <el-button
- v-if="isFeeEditD"
- type="success"
- plain
- size="small"
- :disabled="!this.assemblyForm.id || disabled || pleasereviewType"
- @click="templateClick('D')"
- >{{ $t("btn118n.debitTemplate") }}</el-button
- >
- <el-button v-if="isFeeEditD" type="info" plain size="small" :disabled="disabled" @click="feecenterSubmitListfun">{{
- $t("btn118n.save")
- }}</el-button>
- <el-button v-if="isFeeEditD" type="info" plain size="small" :disabled="disabled" @click="feecenterEditfun('D')"
- >{{ $t("btn118n.edit") }}
- </el-button>
- <el-button v-if="isFeeEditC" type="primary" plain size="small" :disabled="disabled || pleasereviewType" @click="copyfun('D')">{{
- $t("btn118n.toCredit")
- }}</el-button>
- <el-button v-if="isFeeEditD" type="primary" plain size="small" @click="allClick('发票申请', 'D')">{{
- $t("btn118n.applyInvoice")
- }}</el-button>
- <el-button
- type="primary"
- plain
- size="small"
- :disabled="disabled || selectionDList.length == 0 || isFeedDisabled"
- @click="allClick('D费用申请')"
- >{{ $t("btn118n.applyFee") }}</el-button
- >
- <el-button
- type="danger"
- plain
- size="small"
- :disabled="disabled || selectionDList.length == 0 || isFeedDisabled"
- @click="allClick('D撤销请核')"
- >{{ $t("btn118n.unApplyFee") }}</el-button
- >
- <el-button
- type="primary"
- plain
- size="small"
- :disabled="selectionDList.length != 1 || disabled || isFeedDisabled"
- @click="allClick('D申请修改')"
- >{{ $t("btn118n.applyModify") }}</el-button
- >
- <el-button
- type="success"
- plain
- size="small"
- :disabled="selectionDList.length != 1 || disabled || isFeedDisabled"
- @click="allClick('D申请删除')"
- >{{ $t("btn118n.applyDelete") }}</el-button
- >
- <el-button
- type="danger"
- plain
- size="small"
- :disabled="selectionDList.length != 1 || disabled || isFeedDisabled"
- @click="allClick('D取消申请')"
- >{{ $t("btn118n.unAplly") }}</el-button
- >
- <el-button plain size="small" :disabled="disabled || isFeedDisabled" @click="allClick('同步结算单位', 'D')">同步收费对象</el-button>
- </template>
- <template slot="indexHeader" slot-scope="scope">
- <el-button v-if="isFeeEditD" type="primary" size="small" icon="el-icon-plus" circle :disabled="disabled" @click="addDfun"></el-button>
- </template>
- <template slot="index" slot-scope="scope">
- <span>{{ scope.index + 1 }}</span>
- </template>
- <template slot="accStatus" slot-scope="{ row, size }">
- <span>{{ row.accStatus ? "是" : "否" }}</span>
- </template>
- <template slot="auditStatus" slot-scope="{ row, size }">
- <span v-if="row.auditStatus == 0">录入</span>
- <span v-if="row.auditStatus == 1">提交审核</span>
- <span v-if="row.auditStatus == 2">审核中</span>
- <span v-if="row.auditStatus == 4" style="color:#409EFF;">审核通过</span>
- <span v-if="row.auditStatus == 5" style="color:#67C23A;">申请修改</span>
- <span v-if="row.auditStatus == 6" style="color:#F56C6C;">申请删除</span>
- </template>
- <template slot="corpType" slot-scope="{ row, index }">
- <dic-select
- v-if="row.edit"
- v-model="row.corpType"
- 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('corpType', $event, row, index)"
- ></dic-select>
- <span v-else>{{ row.corpType }}</span>
- </template>
- <template slot="corpCnName" slot-scope="{ row, index }">
- <dic-select
- v-if="row.edit"
- :key="updateSearchKey"
- v-model="row.shortName"
- placeholder="结算单位"
- label="shortName"
- res="records"
- :slotRight="true"
- rightLabel="code"
- :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + (row.corpType ? row.corpType : '')"
- :filterable="true"
- :remote="true"
- dataName="shortName"
- @selectChange="rowDicChange('shortName', $event, row)"
- ></dic-select>
- <span v-else>{{ row.shortName }}</span>
- </template>
- <template slot="generationCorpCnName" slot-scope="{ row, index }">
- <dic-select
- v-if="row.edit"
- v-model="row.generationCorpCnName"
- placeholder="代收客户"
- label="cnName"
- res="records"
- :slotRight="true"
- rightLabel="code"
- url="/blade-los/bcorps/listByType?status=0¤t=1&size=5&corpTypeName=国内直接客户,国内同行及代理,国外直接客户,国外同行及代理"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="rowDicChange('generationCorpCnName', $event, row)"
- ></dic-select>
- <span v-else>{{ row.generationCorpCnName }}</span>
- </template>
- <!-- <template slot="corpCnName" slot-scope="{ row }">
- <search-query v-if="row.edit" :datalist="corpCnNameData" :selectValue="row.shortName"
- :filterable="true" :clearable="true" :remote="true" :buttonIf="false"
- :forParameter="{ key: 'id', label: 'shortName', value: 'shortName' }"
- @remoteMethod="getBcorpsListfun($event, 'shortName')"
- @corpChange="corpChange($event, 'shortName', row, 'D')"
- @corpFocus="getBcorpsListfun($event, 'shortName')">
- </search-query>
- <span v-else style="color: #1e9fff" @click="corpClick(row)">{{ row.shortName }}</span>
- </template> -->
- <template slot="feeCnName" slot-scope="{ row }">
- <search-query
- v-if="row.edit"
- :datalist="feeCnNameData"
- :selectValue="row.feeCnName"
- :filterable="true"
- :clearable="true"
- :remote="true"
- :buttonIf="false"
- :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
- @remoteMethod="bfeesListfun($event, 'feeCnName')"
- @corpChange="corpChange($event, 'feeCnName', row, 'D')"
- @corpFocus="bfeesListfun($event, 'feeCnName')"
- >
- </search-query>
- <span v-else>{{ row.feeCnName }}</span>
- </template>
- <template slot="elementsCnName" slot-scope="{ row }">
- <search-query
- v-if="row.edit"
- :datalist="elementsData"
- :selectValue="row.elementsCnName"
- :filterable="true"
- :clearable="true"
- :remote="true"
- :buttonIf="false"
- :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
- @remoteMethod="getBaccelementsListfun($event, 'elementsCnName')"
- @corpChange="corpChange($event, 'elementsCnName', row, 'D')"
- @corpFocus="getBaccelementsListfun($event, 'elementsCnName')"
- >
- </search-query>
- <span v-else>{{ row.elementsCnName }}</span>
- </template>
- <template slot="paymode" slot-scope="{ row }">
- <search-query
- v-if="row.edit"
- :datalist="paymodeData"
- :selectValue="row.paymode"
- :clearable="true"
- :buttonIf="false"
- :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
- @corpChange="corpChange($event, 'paymode', row, 'D')"
- @corpFocus="paymodeWorkDictsfun"
- >
- </search-query>
- <span v-else>{{ row.paymode }}</span>
- </template>
- <template slot="unitNo" slot-scope="{ row }">
- <search-query
- v-if="row.edit"
- :datalist="unitNoData"
- :selectValue="row.unitNo"
- :filterable="true"
- :clearable="true"
- :remote="true"
- :buttonIf="false"
- :forParameter="{ key: 'id', label: 'code', value: 'code', disabled: 'status' }"
- @corpFocus="getBunitsPagefun"
- @corpChange="corpChange($event, 'unitNo', row, 'D')"
- >
- </search-query>
- <span v-else>{{ row.unitNo }}</span>
- </template>
- <template slot="curCode" slot-scope="{ row }">
- <search-query
- v-if="row.edit"
- :datalist="curCodeData"
- :selectValue="row.curCode"
- :filterable="true"
- :clearable="true"
- :remote="true"
- :buttonIf="false"
- :forParameter="{ key: 'id', label: 'code', value: 'code' }"
- @remoteMethod="bcurrencyGetExratefun('D')"
- @corpChange="corpChange($event, 'curCode', row, 'D')"
- @corpFocus="bcurrencyGetExratefun('D')"
- >
- </search-query>
- <span v-else>{{ row.curCode }}</span>
- </template>
- <template slot="exrate" slot-scope="{ row }">
- <el-input-number
- v-if="row.edit"
- v-model="row.exrate"
- size="small"
- :controls="false"
- :precision="5"
- placeholder="请输入"
- style="width: 100%;"
- ></el-input-number>
- <span v-else>{{ row.exrate }}</span>
- </template>
- <template slot="isTax" slot-scope="{ row }">
- <span>{{ row.isTax ? "是" : "否" }}</span>
- </template>
- <template slot="price" slot-scope="{ row }">
- <el-input-number
- v-if="row.edit"
- v-model="row.price"
- size="small"
- :controls="false"
- :precision="3"
- placeholder="请输入"
- @change="calculateTotal(row)"
- ></el-input-number>
- <span v-else>{{ row.price }}</span>
- </template>
- <template slot="quantity" slot-scope="{ row }">
- <el-input-number
- v-if="row.edit"
- v-model="row.quantity"
- size="small"
- :controls="false"
- :precision="3"
- placeholder="请输入"
- @change="calculateTotal(row)"
- ></el-input-number>
- <span v-else>{{ row.quantity }}</span>
- </template>
- <template slot="taxRate" slot-scope="{ row }">
- <el-input-number
- v-if="row.edit"
- v-model="row.taxRate"
- size="small"
- :controls="false"
- :precision="3"
- placeholder="请输入"
- @change="calculateTotal(row)"
- style="width: 100%;"
- ></el-input-number>
- <span v-else>{{ row.taxRate }}</span>
- </template>
- <template slot="uninvoicedAmount" slot-scope="{ row }">
- <el-popover trigger="click" v-if="Number(row.uninvoicedAmount)">
- <avue-crud :data="fininvoicesData" :option="fininvoicesOption"></avue-crud>
- <span style="color: #409eff; cursor: pointer" slot="reference" @click="viewFininvoices(row)">
- {{ row.uninvoicedAmount }}
- </span>
- </el-popover>
- <span v-else>{{ row.uninvoicedAmount }}</span>
- </template>
- <template slot="stlTtlAmount" slot-scope="{ row }">
- <el-popover trigger="click" v-if="Number(row.stlTtlAmount)">
- <avue-crud :data="finstlbillsData" :option="finstlbillsOption"></avue-crud>
- <span style="color: #409eff; cursor: pointer" slot="reference" @click="viewFinstlbills(row)">
- {{ row.stlTtlAmount }}
- </span>
- </el-popover>
- <span v-else>{{ row.stlTtlAmount }}</span>
- </template>
- <template slot="remarks" slot-scope="{ row }">
- <el-input v-if="row.edit" v-model="row.remarks" size="small" placeholder="请输入"></el-input>
- <span v-else>{{ row.remarks }}</span>
- </template>
- <template slot-scope="{ row, index }" slot="menu">
- <!--<el-button v-if="scope.row.edit" type="text" size="small" @click="savefun(scope.row,scope.index,'D')">保存</el-button>-->
- <!--<el-button v-else type="text" size="small" :disabled="scope.row.accStatus || disabled || pleasereviewType" @click="editDfun(scope.row,scope.index)">编辑</el-button>-->
- <!-- <el-button
- type="text"
- size="small"
- :disabled="scope.row.accStatus || disabled || pleasereviewType"
- @click="deletefun(scope.row, scope.index, 'D')"
- >删除</el-button
- > -->
- <el-button v-if="row.id" type="text" size="small" @click="rowView(row, index)">查看</el-button>
- </template>
- </avue-crud>
- </el-card>
- <!--显示 admin,应付修改,应付查看,应付查看只有打印账单一个功能 -->
- <el-card v-show="isFeeViewC" class="box-card" style="margin: 2px 0">
- <avue-crud
- :option="optionC"
- :table-loading="loadingC"
- :data="assemblyForm.feeCenterListC"
- v-model="formC"
- id="out-table"
- :header-cell-class-name="headerClassName"
- ref="crudC"
- :row-style="{ height: '20px' }"
- :cell-style="{ padding: '0px' }"
- @selection-change="handleSelectionChange($event, 'C')"
- @resetColumn="resetColumnTwo('crudC', 'optionC', 'optionCBack', 309.3)"
- @saveColumn="saveColumnTwo('crudC', 'optionC', 'optionCBack', 309.3)"
- >
- <template slot="menuLeft">
- <div style="display: inline-block;margin-right: 20px" class="disabledBox meetSize">
- <i class="el-icon-coin"></i>
- <span>{{ $t("sea118n.credit") }}</span>
- </div>
- <el-button
- v-if="isFeeEditC"
- type="danger"
- plain
- size="small"
- :disabled="!selectionCList.length || disabled || isFeecDisabled"
- @click="batchDelete('C')"
- >{{ $t("btn118n.deleted") }}
- </el-button>
- <!-- <el-button v-if="isFeeEditC" type="primary" plain size="small"
- :disabled="!selectionCList.length || disabled || pleasereviewType"
- @click="GenerateBillsfun('C')">生成账单
- </el-button>
- <el-button v-if="isFeeEditC" type="danger" plain size="small"
- :disabled="!selectionCList.length || disabled || pleasereviewType"
- @click="RevokingBillsfun('C')">撤销账单
- </el-button> -->
- <el-button type="primary" plain size="small" @click="printingCostsfun('C')">{{ $t("btn118n.printBill") }}</el-button>
- <el-button
- v-if="isFeeEditC"
- type="success"
- plain
- size="small"
- :disabled="!this.assemblyForm.id || disabled || pleasereviewType"
- @click="templateClick('C')"
- >{{ $t("btn118n.creditTemplate") }}
- </el-button>
- <el-button v-if="isFeeEditC" type="info" plain size="small" :disabled="disabled" @click="feecenterSubmitListfun"
- >{{ $t("btn118n.save") }}
- </el-button>
- <el-button v-if="isFeeEditC" type="info" plain size="small" :disabled="disabled" @click="feecenterEditfun('C')"
- >{{ $t("btn118n.edit") }}
- </el-button>
- <el-button v-if="isFeeEditC" type="primary" plain size="small" :disabled="disabled || pleasereviewType" @click="copyfun('C')"
- >{{ $t("btn118n.toDebit") }}
- </el-button>
- <el-button type="info" plain size="small" @click="allClick('付费申请', 'C')">
- {{ $t("btn118n.applyPay") }}
- </el-button>
- <el-button
- type="primary"
- plain
- size="small"
- :disabled="disabled || selectionCList.length == 0 || isFeecDisabled"
- @click="allClick('C费用申请')"
- >{{ $t("btn118n.applyFee") }}</el-button
- >
- <el-button
- type="danger"
- plain
- size="small"
- :disabled="disabled || selectionCList.length == 0 || isFeecDisabled"
- @click="allClick('C撤销请核')"
- >{{ $t("btn118n.unApplyFee") }}</el-button
- >
- <!-- <el-button type="success" plain size="small" :disabled="disabled"
- @click="allClick('提取成本')">提取成本</el-button> -->
- <el-button
- type="primary"
- plain
- size="small"
- :disabled="selectionCList.length != 1 || disabled || isFeecDisabled"
- @click="allClick('C申请修改')"
- >{{ $t("btn118n.applyModify") }}</el-button
- >
- <el-button
- type="success"
- plain
- size="small"
- :disabled="selectionCList.length != 1 || disabled || isFeecDisabled"
- @click="allClick('C申请删除')"
- >{{ $t("btn118n.applyDelete") }}</el-button
- >
- <el-button
- type="danger"
- plain
- size="small"
- :disabled="selectionCList.length != 1 || disabled || isFeecDisabled"
- @click="allClick('C取消申请')"
- >{{ $t("btn118n.unAplly") }}</el-button
- >
- <el-button plain size="small" :disabled="disabled || isFeedDisabled" @click="allClick('同步结算单位', 'C')">同步收费对象</el-button>
- </template>
- <template slot="indexHeader" slot-scope="scope">
- <el-button v-if="isFeeEditC" type="primary" size="small" icon="el-icon-plus" circle :disabled="disabled" @click="addCfun"> </el-button>
- </template>
- <template slot="index" slot-scope="scope">
- <span>{{ scope.index + 1 }}</span>
- </template>
- <template slot="auditStatus" slot-scope="{ row, size }">
- <span v-if="row.auditStatus == 0">录入</span>
- <span v-if="row.auditStatus == 1">提交审核</span>
- <span v-if="row.auditStatus == 2">审核中</span>
- <span v-if="row.auditStatus == 4" style="color:#409EFF;">审核通过</span>
- <span v-if="row.auditStatus == 5" style="color:#67C23A;">申请修改</span>
- <span v-if="row.auditStatus == 6" style="color:#F56C6C;">申请删除</span>
- </template>
- <template slot="accStatus" slot-scope="{ row, size }">
- <span>{{ row.accStatus ? "是" : "否" }}</span>
- </template>
- <!-- <template slot="corpCnName" slot-scope="{ row }">
- <search-query v-if="row.edit" :datalist="corpCnNameData" :selectValue="row.shortName"
- :filterable="true" :clearable="true" :remote="true" :buttonIf="false"
- :forParameter="{ key: 'id', label: 'shortName', value: 'shortName' }"
- @remoteMethod="getBcorpsListfun($event, 'shortName')"
- @corpChange="corpChange($event, 'shortName', row, 'C')"
- @corpFocus="getBcorpsListfun($event, 'shortName')">
- </search-query>
- <span v-else style="color: #1e9fff" @click="corpClick(row)">{{ row.shortName }}</span>
- </template> -->
- <template slot="corpType" slot-scope="{ row, index }">
- <dic-select
- v-if="row.edit"
- v-model="row.corpType"
- 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('corpType', $event, row, index)"
- ></dic-select>
- <span v-else>{{ row.corpType }}</span>
- </template>
- <template slot="corpCnName" slot-scope="{ row, index }">
- <dic-select
- v-if="row.edit"
- :key="updateSearchKey"
- v-model="row.shortName"
- placeholder="结算单位"
- label="shortName"
- res="records"
- :slotRight="true"
- rightLabel="code"
- :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + (row.corpType ? row.corpType : '')"
- :filterable="true"
- :remote="true"
- dataName="shortName"
- @selectChange="rowDicChange('shortNameC', $event, row)"
- ></dic-select>
- <span v-else>{{ row.shortName }}</span>
- </template>
- <template slot="feeCnName" slot-scope="{ row }">
- <search-query
- v-if="row.edit"
- :datalist="feeCnNameData"
- :selectValue="row.feeCnName"
- :filterable="true"
- :clearable="true"
- :remote="true"
- :buttonIf="false"
- :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
- @remoteMethod="bfeesListfun($event, 'feeCnName')"
- @corpChange="corpChange($event, 'feeCnName', row, 'C')"
- @corpFocus="bfeesListfun($event, 'feeCnName')"
- >
- </search-query>
- <span v-else>{{ row.feeCnName }}</span>
- </template>
- <template slot="elementsCnName" slot-scope="{ row }">
- <search-query
- v-if="row.edit"
- :datalist="elementsData"
- :selectValue="row.elementsCnName"
- :filterable="true"
- :clearable="true"
- :remote="true"
- :buttonIf="false"
- :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
- @remoteMethod="getBaccelementsListfun($event, 'elementsCnName')"
- @corpChange="corpChange($event, 'elementsCnName', row, 'C')"
- @corpFocus="getBaccelementsListfun($event, 'elementsCnName')"
- >
- </search-query>
- <span v-else>{{ row.elementsCnName }}</span>
- </template>
- <template slot="paymode" slot-scope="{ row }">
- <search-query
- v-if="row.edit"
- :datalist="paymodeData"
- :selectValue="row.paymode"
- :clearable="true"
- :buttonIf="false"
- :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
- @corpChange="corpChange($event, 'paymode', row, 'C')"
- @corpFocus="paymodeWorkDictsfun"
- >
- </search-query>
- <span v-else>{{ row.paymode }}</span>
- </template>
- <template slot="unitNo" slot-scope="{ row }">
- <search-query
- v-if="row.edit"
- :datalist="unitNoData"
- :selectValue="row.unitNo"
- :filterable="true"
- :clearable="true"
- :remote="true"
- :buttonIf="false"
- :forParameter="{ key: 'id', label: 'code', value: 'code', disabled: 'status' }"
- @corpFocus="getBunitsPagefun"
- @corpChange="corpChange($event, 'unitNo', row, 'C')"
- >
- </search-query>
- <span v-else>{{ row.unitNo }}</span>
- </template>
- <template slot="curCode" slot-scope="{ row }">
- <search-query
- v-if="row.edit"
- :datalist="curCodeData"
- :selectValue="row.curCode"
- :filterable="true"
- :clearable="true"
- :remote="true"
- :buttonIf="false"
- :forParameter="{ key: 'id', label: 'code', value: 'code' }"
- @remoteMethod="bcurrencyGetExratefun('C')"
- @corpChange="corpChange($event, 'curCode', row, 'C')"
- @corpFocus="bcurrencyGetExratefun('C')"
- >
- </search-query>
- <span v-else>{{ row.curCode }}</span>
- </template>
- <template slot="exrate" slot-scope="{ row }">
- <el-input-number
- v-if="row.edit"
- v-model="row.exrate"
- size="small"
- :controls="false"
- :precision="5"
- placeholder="请输入"
- style="width: 100%;"
- ></el-input-number>
- <span v-else>{{ row.exrate }}</span>
- </template>
- <template slot="isTax" slot-scope="{ row }">
- <span>{{ row.isTax ? "是" : "否" }}</span>
- </template>
- <template slot="price" slot-scope="{ row }">
- <el-input-number
- v-if="row.edit"
- v-model="row.price"
- size="small"
- :controls="false"
- :precision="3"
- placeholder="请输入"
- @change="calculateTotal(row)"
- ></el-input-number>
- <span v-else>{{ row.price }}</span>
- </template>
- <template slot="quantity" slot-scope="{ row }">
- <el-input-number
- v-if="row.edit"
- v-model="row.quantity"
- size="small"
- :controls="false"
- :precision="3"
- placeholder="请输入"
- @change="calculateTotal(row)"
- ></el-input-number>
- <span v-else>{{ row.quantity }}</span>
- </template>
- <template slot="taxRate" slot-scope="{ row }">
- <el-input-number
- v-if="row.edit"
- v-model="row.taxRate"
- size="small"
- :controls="false"
- :precision="3"
- placeholder="请输入"
- @change="calculateTotal(row)"
- style="width: 100%;"
- ></el-input-number>
- <span v-else>{{ row.taxRate }}</span>
- </template>
- <template slot="uninvoicedAmount" slot-scope="{ row }">
- <el-popover trigger="click" v-if="Number(row.uninvoicedAmount)">
- <avue-crud :data="fininvoicesData" :option="fininvoicesOption"></avue-crud>
- <span style="color: #409eff; cursor: pointer" slot="reference" @click="viewFininvoices(row)">
- {{ row.uninvoicedAmount }}
- </span>
- </el-popover>
- <span v-else>{{ row.uninvoicedAmount }}</span>
- </template>
- <template slot="stlTtlAmount" slot-scope="{ row }">
- <el-popover trigger="click" v-if="Number(row.stlTtlAmount)">
- <avue-crud :data="finstlbillsData" :option="finstlbillsOption"></avue-crud>
- <span style="color: #409eff; cursor: pointer" slot="reference" @click="viewFinstlbills(row)">
- {{ row.stlTtlAmount }}
- </span>
- </el-popover>
- <span v-else>{{ row.stlTtlAmount }}</span>
- </template>
- <template slot="remarks" slot-scope="{ row }">
- <el-input v-if="row.edit" v-model="row.remarks" size="small" placeholder="请输入"></el-input>
- <span v-else>{{ row.remarks }}</span>
- </template>
- <template slot-scope="{ row, index }" slot="menu">
- <!--<el-button v-if="scope.row.edit" type="text" size="small" @click="savefun(scope.row,scope.index,'C')">保存</el-button>-->
- <!--<el-button v-else type="text" size="small" :disabled="scope.row.accStatus || disabled || pleasereviewType" @click="editCfun(scope.row,scope.index)">编辑</el-button>-->
- <!-- <el-button
- type="text"
- size="small"
- :disabled="scope.row.accStatus || disabled || pleasereviewType"
- @click="deletefun(scope.row, scope.index, 'C')"
- >删除</el-button
- > -->
- <el-button v-if="row.id" type="text" size="small" @click="rowView(row, index)">查看</el-button>
- </template>
- </avue-crud>
- </el-card>
- <avue-crud
- v-show="assemblyForm.feeCenterAmendList.length > 0"
- id="out-table"
- class="box-card"
- :header-cell-class-name="headerClassName"
- ref="crud"
- :row-style="{ height: '16px' }"
- :cell-style="{ padding: '0px' }"
- :data="assemblyForm.feeCenterAmendList"
- :option="amendOption"
- ></avue-crud>
- <div v-if="(isProfitView || (isFeeViewD && isFeeViewC)) && amendsStatus" style="display: flex;align-items: center;justify-content: space-around">
- <div style="width: 30%">
- <div class="bottomFlex" style="justify-content: space-around">
- <div>
- <div>
- <span>本币</span>
- </div>
- </div>
- <div>
- <div style="color: #81B337">
- <span>Amend应收:</span>
- <span class="weightnum">{{ assemblyForm.amountDrAmend }}元</span>
- </div>
- </div>
- <div>
- <div style="color: #6BBCD1">
- <span>Amend应付:</span>
- <span class="weightnum">{{ assemblyForm.amountCrAmend }}元</span>
- </div>
- </div>
- <div class="bottomFlex">
- <span>Amend利润:</span>
- <span>{{ assemblyForm.amountProfitAmend }}元</span>
- </div>
- </div>
- </div>
- <div style="width: 30%">
- <div class="bottomFlex" style="justify-content: space-around">
- <div>
- <div>
- <span>外币</span>
- </div>
- </div>
- <div>
- <div style="color: #81B337">
- <span>Amend应收:</span>
- <span class="weightnum">{{ assemblyForm.amountDrUsdAmend }}元</span>
- </div>
- </div>
- <div>
- <div style="color: #6BBCD1">
- <span>Amend应付:</span>
- <span class="weightnum">{{ assemblyForm.amountCrUsdAmend }}元</span>
- </div>
- </div>
- <div class="bottomFlex">
- <span>Amend利润:</span>
- <span>{{ assemblyForm.amountProfitUsdAmend }}元</span>
- </div>
- </div>
- </div>
- <div style="width: 30%">
- <div class="bottomFlex" style="justify-content: space-around">
- <div>
- <div>
- <span>合计本币</span>
- </div>
- </div>
- <div>
- <div style="color: #81B337">
- <span>Amend应收:</span>
- <span class="weightnum">{{ assemblyForm.amountDrLocAmend }}元</span>
- </div>
- </div>
- <div>
- <div style="color: #6BBCD1">
- <span>Amend应付:</span>
- <span class="weightnum">{{ assemblyForm.amountCrLocAmend }}元</span>
- </div>
- </div>
- <div class="bottomFlex">
- <span>Amend利润:</span>
- <span>{{ assemblyForm.amountProfitLocAmend }}元</span>
- </div>
- </div>
- </div>
- </div>
- <avue-crud
- id="out-table"
- class="box-card"
- :header-cell-class-name="headerClassName"
- ref="crud"
- :row-style="{ height: '16px' }"
- :cell-style="{ padding: '0px' }"
- :option="sumOption"
- :data="sumData"
- ></avue-crud>
- <!--有admin 显示,有收和付各一个也显示出来-->
- <div v-if="isProfitView || (isFeeViewD && isFeeViewC)" style="display: flex;align-items: center;justify-content: space-around">
- <div style="width: 30%">
- <div class="bottomFlex" style="justify-content: space-around">
- <div>
- <div>
- <span>本币</span>
- </div>
- </div>
- <div>
- <div style="color: #81B337">
- <span>应收:</span>
- <span class="weightnum">{{ assemblyForm.amountDr }}元</span>
- </div>
- </div>
- <div>
- <div style="color: #6BBCD1">
- <span>应付:</span>
- <span class="weightnum">{{ assemblyForm.amountCr }}元</span>
- </div>
- </div>
- <div class="bottomFlex">
- <span>利润:</span>
- <span>{{ assemblyForm.amountProfit }}元</span>
- </div>
- </div>
- </div>
- <div style="width: 30%">
- <div class="bottomFlex" style="justify-content: space-around">
- <div>
- <div>
- <span>外币</span>
- </div>
- </div>
- <div>
- <div style="color: #81B337">
- <span>应收:</span>
- <span class="weightnum">{{ assemblyForm.amountDrUsd }}元</span>
- </div>
- </div>
- <div>
- <div style="color: #6BBCD1">
- <span>应付:</span>
- <span class="weightnum">{{ assemblyForm.amountCrUsd }}元</span>
- </div>
- </div>
- <div class="bottomFlex">
- <span>利润:</span>
- <span>{{ assemblyForm.amountProfitUsd }}元</span>
- </div>
- </div>
- </div>
- <div style="width: 30%">
- <div class="bottomFlex" style="justify-content: space-around">
- <div>
- <div>
- <span>合计本币</span>
- </div>
- </div>
- <div>
- <div style="color: #81B337">
- <span>应收:</span>
- <span class="weightnum">{{ assemblyForm.amountDrLoc }}元</span>
- </div>
- </div>
- <div>
- <div style="color: #6BBCD1">
- <span>应付:</span>
- <span class="weightnum">{{ assemblyForm.amountCrLoc }}元</span>
- </div>
- </div>
- <div class="bottomFlex">
- <span>利润:</span>
- <span>{{ assemblyForm.amountProfitLoc }}元</span>
- </div>
- </div>
- </div>
- </div>
- <!--模板弹窗-->
- <el-dialog title="费用模板" :visible.sync="templateVisible" append-to-body width="70%" :close-on-click-modal="false" :before-close="handleClose">
- <div>
- <el-row>
- <el-col :span="5">
- <div class="box">
- <el-scrollbar>
- <basic-container>
- <avue-tree :option="treeOption" :data="templateData" @node-click="nodeClick"> </avue-tree>
- </basic-container>
- </el-scrollbar>
- </div>
- </el-col>
- <el-col :span="19">
- <basic-container>
- <avue-crud
- :option="templateOption"
- :data="templateRightData"
- ref="templateRef"
- @selection-change="feeselectionChange"
- @resetColumn="resetColumnTwo('templateRef', 'templateOption', 'templateOptionBack', 309.5)"
- @saveColumn="saveColumnTwo('templateRef', 'templateOption', 'templateOptionBack', 309.5)"
- >
- <template slot="menuLeft">
- <el-button type="primary" size="small" @click="templateExport">导 入</el-button>
- </template>
- </avue-crud>
- </basic-container>
- </el-col>
- </el-row>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button
- @click="
- templateVisible = false;
- feesselectionList = [];
- templateRightData = [];
- "
- >取 消</el-button
- >
- <el-button type="primary" @click="templateExport">导 入</el-button>
- </span>
- </el-dialog>
- <!--结算单位弹窗-->
- <el-dialog title="导出" :visible.sync="corpVisible" append-to-body width="70%" :close-on-click-modal="false" :before-close="handleClose">
- <span slot="title">
- <el-button type="primary" size="mini" @click.stop="exportfun">导出</el-button>
- </span>
- <div style="padding-bottom: 30px;">
- <el-table
- :data="corpDialog"
- border
- show-summary
- size="mini"
- :row-style="{ height: '20px', padding: '0px', fontSize: '12px' }"
- :cell-style="{ padding: '0px', fontSize: '12px' }"
- style="width: 100%"
- >
- <el-table-column prop="corpCnName" label="客户名称" width="140px">
- <template slot-scope="{ row }">
- <span class="textoverflow">{{ row.corpCnName }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="mblno" label="MB/L NO" width="140px" />
- <el-table-column sortable :prop="`amount${dcDialogType}r`" :label="`应${dcDialogType == 'D' ? '收' : '付'}金额CNY`" width="120px" />
- <el-table-column sortable :prop="`amount${dcDialogType}rUsd`" :label="`应${dcDialogType == 'D' ? '收' : '付'}金额USD`" width="120px" />
- <el-table-column sortable :prop="`amount${dcDialogType}rLoc`" :label="`应${dcDialogType == 'D' ? '收' : '付'}金额合计CNY`" width="150px" />
- <el-table-column
- sortable
- :prop="`stlAmount${dcDialogType}r`"
- :label="`已结算应${dcDialogType == 'D' ? '收' : '付'}金额CNY`"
- width="160px"
- />
- <el-table-column
- sortable
- :prop="`stlAmount${dcDialogType}rUsd`"
- :label="`已结算应${dcDialogType == 'D' ? '收' : '付'}金额USD`"
- width="160px"
- />
- <el-table-column
- sortable
- :prop="`stlAmount${dcDialogType}rLoc`"
- :label="`已结算应${dcDialogType == 'D' ? '收' : '付'}金额合计CNY`"
- width="180px"
- />
- </el-table>
- </div>
- </el-dialog>
- <!--结算单位弹窗-->
- <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>
- <!--费用打印-->
- <reportContainer ref="reportContainer"></reportContainer>
- <mail-component ref="mailComponentRef" />
- <extraction-cost ref="extractionCost" @getData="getData" />
- <fee-modify
- ref="feeModify"
- :form="assemblyForm"
- @updateDetail="updateDetail"
- :curCodeDate="assemblyForm.actualEta ? assemblyForm.actualEta + ' 00:00:00' : null"
- url="/iosBasicData/OceanFreightImport/bills/index"
- pageStatus="this.$store.getters.approvalDetails"
- pageLabel="海运进口(F)"
- ></fee-modify>
- <fee-modify-view ref="feeModifyView" :form="assemblyForm"></fee-modify-view>
- <sysn-corpName ref="sysnCorpName" @update="getData"></sysn-corpName>
- </div>
- </template>
- <script>
- import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
- import { amendsList } from "@/api/iosBasicData/amends";
- import { getBcorpsDetail, getBcorpsList } from "@/api/iosBasicData/bcorps";
- import { bfeesList } from "@/api/iosBasicData/bfees";
- import { getBunitsPage } from "@/api/iosBasicData/bunits";
- import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
- import {
- feecenterList,
- feecenterRemove,
- feecenterSubmit,
- feecenterSubmitList,
- finaccbillsGenerateBill,
- finaccbillsRevokeBill,
- getFeeCenterCorpIds,
- pleaseVerifyCost,
- revokeCheckPleaseVerifyCost,
- finstlbillsGetAccBillIdList,
- fininvoicesGetAccBillIdList
- } from "@/api/iosBasicData/feecenter";
- import { getWorkDicts } from "@/api/system/dictbiz";
- import { feecenterTemplateImport, listFeeCountByCorp, losbfeestemplateGetListTemplate, templateImportBatch } from "@/api/iosBasicData/bills";
- import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
- import { popupReminder, requiredMessage } from "@/util/messageReminder";
- import { getBaccelementsList } from "@/api/iosBasicData/baccelements";
- import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
- import { reportsGetReportData } from "@/api/iosBasicData/reports";
- import reportformsList from "@/views/iosBasicData/OceanFreightImport/bills/assembly/reportformsList.vue";
- import { getList as reportsList } from "@/api/iosBasicData/reports";
- import { dateFormat } from "@/util/date";
- import { regularBurdenfloating } from "@/util/regularJudgment";
- import { isProcurement } from "@/api/basicData/configuration";
- import { getToken } from "@/util/auth";
- import extractionCost from "@/components/extractionCost/main.vue";
- import { getListTemplate, getListTemplatelist } from "@/api/iosBasicData/losbfeestemplate";
- import dicSelect from "@/components/dicSelect/main";
- import mailComponent from "@/components/iosbasic-data/mail-component.vue";
- import feeModify from "@/components/feeModify/main.vue";
- import feeModifyView from "@/components/feeModify/view.vue";
- import sysnCorpName from "./sysnCorpName";
- import _ from "lodash";
- export default {
- components: {
- extractionCost,
- dicSelect,
- reportContainer,
- SearchQuery,
- reportformsList,
- mailComponent,
- feeModify,
- feeModifyView,
- sysnCorpName
- },
- props: {
- pid: {},
- assemblyForm: {
- type: Object,
- default: {}
- },
- detailData: {},
- // 请核之后禁用
- pleasereviewType: {
- type: Boolean,
- default: false
- },
- // 拷贝的详情数据
- copyFormData: {
- type: Object,
- default: {}
- },
- disabled: {
- type: Boolean,
- default: false
- },
- showLock: {
- type: Boolean,
- default: false
- }
- },
- data() {
- return {
- fininvoicesData: [],
- fininvoicesOption: {
- header: false,
- menu: false,
- align: "center",
- column: [
- {
- label: "发票号",
- prop: "taxInvoiceNo",
- width: "200",
- overHidden: true
- },
- {
- label: "开票日期",
- prop: "invoiceDate",
- width: "150",
- overHidden: true
- },
- {
- label: "开票人",
- prop: "createUserName",
- width: "100",
- overHidden: true
- }
- ]
- },
- finstlbillsData: [],
- finstlbillsOption: {
- header: false,
- menu: false,
- align: "center",
- column: [
- {
- label: "结算单号",
- prop: "billNo",
- width: "200",
- overHidden: true
- },
- {
- label: "结算日期",
- prop: "billDate",
- width: "150",
- overHidden: true
- },
- {
- label: "结算人",
- prop: "createUserName",
- width: "100",
- overHidden: true
- }
- ]
- },
- amendsStatus: false,
- amendOption: {
- border: true,
- align: "center",
- menuAlign: "center",
- menu: false,
- header: false,
- addBtn: false,
- // height: '100px',
- column: [
- {
- label: "账单",
- prop: "accStatus",
- width: "60",
- dicData: [
- {
- label: "否",
- value: 0
- },
- {
- label: "是",
- value: 1
- }
- ],
- overHidden: true
- },
- {
- label: "结算单位",
- prop: "corpCnName",
- width: "120",
- overHidden: true
- },
- {
- label: "费用简称",
- prop: "feeCnName",
- width: "100",
- overHidden: true
- },
- {
- label: "预付/到付",
- prop: "paymode",
- width: "90",
- overHidden: true
- },
- {
- label: "收/付",
- prop: "dc",
- width: "60",
- dicData: [
- {
- label: "收",
- value: "D"
- },
- {
- label: "付",
- value: "C"
- }
- ],
- overHidden: true
- },
- {
- label: "计量单位",
- prop: "unitNo",
- width: "80",
- overHidden: true
- },
- {
- label: "币种",
- prop: "curCode",
- width: "60",
- overHidden: true
- },
- {
- label: "汇率",
- prop: "exrate",
- width: "60",
- overHidden: true
- },
- {
- label: "单价",
- prop: "price",
- width: "80",
- overHidden: true
- },
- {
- label: "数量",
- prop: "quantity",
- width: "80",
- overHidden: true
- },
- {
- label: "本币",
- prop: "rmbAmount",
- width: "80",
- overHidden: true
- },
- {
- label: "外币",
- prop: "usdAmount",
- width: "80",
- overHidden: true
- },
- // {
- // label: "CNY(净额)",
- // prop: "rmbAmountNet",
- // width: "100",
- // overHidden: true,
- // },
- // {
- // label: "USD(净额)",
- // prop: "usdAmountNet",
- // width: "100",
- // overHidden: true,
- // },
- // {
- // label: "核算要素",
- // prop: "elementsCnName",
- // width: "120",
- // hide: true,
- // overHidden: true,
- // },
- {
- label: "付费申请金额",
- prop: "appliedAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "发票申请金额",
- prop: "appliedInvoiceAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "已开票金额",
- prop: "uninvoicedAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "已结算金额",
- prop: "stlTtlAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- width: "100",
- overHidden: true
- },
- // {
- // label: "税率",
- // prop: "taxRate",
- // width: "100",
- // },
- // {
- // label: "附加税率",
- // prop: "surchargeRate",
- // width: "100",
- // },
- {
- label: "单价是否含税",
- prop: "isTax",
- width: "100",
- overHidden: true
- }
- ]
- },
- 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,
- hide: localStorage.getItem("roleName")
- ? !(
- localStorage.getItem("roleName").includes("admin") ||
- localStorage.getItem("roleName").includes("应收修改") ||
- localStorage.getItem("roleName").includes("应收查看")
- )
- : true
- },
- {
- label: "本币应付",
- prop: "rmbC",
- overHidden: true,
- hide: localStorage.getItem("roleName")
- ? !(
- localStorage.getItem("roleName").includes("admin") ||
- localStorage.getItem("roleName").includes("应付修改") ||
- localStorage.getItem("roleName").includes("应付查看")
- )
- : true
- },
- {
- label: "外币应收",
- prop: "usdD",
- overHidden: true,
- hide: localStorage.getItem("roleName")
- ? !(
- localStorage.getItem("roleName").includes("admin") ||
- localStorage.getItem("roleName").includes("应收修改") ||
- localStorage.getItem("roleName").includes("应收查看")
- )
- : true
- },
- {
- label: "外币应付",
- prop: "usdC",
- overHidden: true,
- hide: localStorage.getItem("roleName")
- ? !(
- localStorage.getItem("roleName").includes("admin") ||
- localStorage.getItem("roleName").includes("应付修改") ||
- localStorage.getItem("roleName").includes("应付查看")
- )
- : true
- },
- {
- label: "合计应收",
- prop: "sumD",
- overHidden: true,
- hide: localStorage.getItem("roleName")
- ? !(
- localStorage.getItem("roleName").includes("admin") ||
- localStorage.getItem("roleName").includes("应收修改") ||
- localStorage.getItem("roleName").includes("应收查看")
- )
- : true
- },
- {
- label: "合计应付",
- prop: "sumC",
- overHidden: true,
- hide: localStorage.getItem("roleName")
- ? !(
- localStorage.getItem("roleName").includes("admin") ||
- localStorage.getItem("roleName").includes("应付修改") ||
- localStorage.getItem("roleName").includes("应付查看")
- )
- : true
- }
- ]
- },
- reportOption: {
- nodeKey: "id",
- addBtn: false,
- menu: false,
- size: "small",
- props: {
- labelText: "标题",
- label: "cnName",
- value: "value",
- children: "children"
- }
- },
- reportTypeData: [], // 打印选择的数据
- reportformsObj: {}, // 打印选择的数据
- selectPrintingDialog: false, // 打印弹窗
- 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
- }
- ]
- },
- corpVisible: false, // 结算单位弹窗
- corpDialog: [], // 结算单位弹窗数据
- dcDialogType: "", // 结算单位弹窗dc判断
- corpRow: {}, // 结算单位弹窗数据
- optionD: {},
- optionDBack: {
- stripe: true,
- maxHeight: "250",
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- selection: true,
- dialogClickModal: false,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- editBtn: false,
- menuWidth: 60,
- menu: true,
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- headerslot: true
- },
- /* {
- label: "账单",
- prop: "accStatus",
- width: "60",
- overHidden: true,
- },*/
- {
- label: this.$t("sea118n.feeStatus"),
- prop: "auditStatus",
- overHidden: true,
- width: 80,
- type: "select",
- dicData: [
- {
- label: "录入",
- value: "0"
- },
- {
- label: "提交审核",
- value: "1"
- },
- {
- label: "审核中",
- value: "2"
- },
- {
- label: "审核通过",
- value: "4"
- }
- ]
- },
- {
- label: this.$t("sea118n.corpType"),
- prop: "corpType",
- width: "100",
- overHidden: true
- },
- {
- label: this.$t("sea118n.chargeCorp"),
- prop: "corpCnName",
- width: "120",
- overHidden: true
- },
- {
- label: "代收客户",
- prop: "generationCorpCnName",
- width: "120",
- overHidden: true
- },
- {
- label: this.$t("sea118n.feeInfo"),
- prop: "feeCnName",
- width: "100",
- overHidden: true
- },
- {
- label: "PP/CC",
- prop: "paymode",
- width: "90",
- overHidden: true
- },
- {
- label: this.$t("sea118n.unitNo"),
- prop: "unitNo",
- width: "90",
- overHidden: true
- },
- {
- label: this.$t("sea118n.currency"),
- prop: "curCode",
- width: "100",
- overHidden: true
- },
- {
- label: this.$t("sea118n.exrate"),
- prop: "exrate",
- width: "100",
- overHidden: true
- },
- {
- label: this.$t("sea118n.price"),
- prop: "price",
- width: "80",
- overHidden: true
- },
- {
- label: "税率",
- prop: "taxRate",
- width: "80",
- overHidden: true
- },
- {
- label: this.$t("sea118n.quantity"),
- prop: "quantity",
- width: "80",
- overHidden: true
- },
- {
- label: "税额",
- prop: "amountTax",
- width: "80",
- overHidden: true
- },
- {
- label: this.$t("sea118n.localCurrency"),
- prop: "rmbAmount",
- width: "80",
- overHidden: true
- },
- {
- label: this.$t("sea118n.foreignCurrency"),
- prop: "usdAmount",
- width: "80",
- overHidden: true
- },
- // {
- // label: "CNY(净额)",
- // prop: "rmbAmountNet",
- // width: "100",
- // overHidden: true,
- // },
- // {
- // label: "USD(净额)",
- // prop: "usdAmountNet",
- // width: "100",
- // overHidden: true,
- // },
- // {
- // label: "核算要素",
- // prop: "elementsCnName",
- // width: "120",
- // hide: true,
- // overHidden: true,
- // },
- {
- label: "付费申请金额",
- prop: "appliedAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "发票申请金额",
- prop: "appliedInvoiceAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "已开票金额",
- prop: "uninvoicedAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "发票号",
- prop: "invoiceNo",
- width: "100",
- overHidden: true
- },
- {
- label: "已结算金额",
- prop: "stlTtlAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "分单号",
- prop: "hblno",
- width: "100",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- width: "100",
- overHidden: true
- },
- // {
- // label: "税率",
- // prop: "taxRate",
- // width: "100",
- // },
- // {
- // label: "附加税率",
- // prop: "surchargeRate",
- // width: "100",
- // },
- {
- label: "单价是否含税",
- prop: "isTax",
- width: "120",
- overHidden: true
- },
- {
- label: this.$t("sea118n.createBy"),
- prop: "createUserName",
- width: "100",
- overHidden: true
- },
- {
- label: this.$t("sea118n.createTime"),
- prop: "createTime",
- width: "100",
- overHidden: true
- }
- ]
- },
- loadingD: false,
- formD: {},
- optionC: {},
- optionCBack: {
- stripe: true,
- maxHeight: "250",
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- selection: true,
- dialogClickModal: false,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- editBtn: false,
- menuWidth: 60,
- menu: true,
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- headerslot: true
- },
- /* {
- label: "账单",
- prop: "accStatus",
- width: "60",
- overHidden: true,
- },*/
- {
- label: this.$t("sea118n.feeStatus"),
- prop: "auditStatus",
- overHidden: true,
- width: 80,
- type: "select",
- dicData: [
- {
- label: "录入",
- value: "0"
- },
- {
- label: "提交审核",
- value: "1"
- },
- {
- label: "审核中",
- value: "2"
- },
- {
- label: "审核通过",
- value: "4"
- }
- ]
- },
- {
- label: this.$t("sea118n.corpType"),
- prop: "corpType",
- width: "100",
- overHidden: true
- },
- {
- label: this.$t("sea118n.payCorp"),
- prop: "corpCnName",
- width: "120",
- overHidden: true
- },
- {
- label: this.$t("sea118n.feeInfo"),
- prop: "feeCnName",
- width: "100",
- overHidden: true
- },
- {
- label: "PP/CC",
- prop: "paymode",
- width: "90",
- overHidden: true
- },
- {
- label: this.$t("sea118n.unitNo"),
- prop: "unitNo",
- width: "90",
- overHidden: true
- },
- {
- label: this.$t("sea118n.currency"),
- prop: "curCode",
- width: "100",
- overHidden: true
- },
- {
- label: this.$t("sea118n.exrate"),
- prop: "exrate",
- width: "100",
- overHidden: true
- },
- {
- label: this.$t("sea118n.price"),
- prop: "price",
- width: "80",
- overHidden: true
- },
- {
- label: "税率",
- prop: "taxRate",
- width: "80",
- overHidden: true
- },
- {
- label: this.$t("sea118n.quantity"),
- prop: "quantity",
- width: "80",
- overHidden: true
- },
- {
- label: "税额",
- prop: "amountTax",
- width: "80",
- overHidden: true
- },
- {
- label: this.$t("sea118n.localCurrency"),
- prop: "rmbAmount",
- width: "80",
- overHidden: true
- },
- {
- label: this.$t("sea118n.foreignCurrency"),
- prop: "usdAmount",
- width: "80",
- overHidden: true
- },
- // {
- // label: "CNY(净额)",
- // prop: "rmbAmountNet",
- // width: "100",
- // overHidden: true,
- // },
- // {
- // label: "USD(净额)",
- // prop: "usdAmountNet",
- // width: "100",
- // overHidden: true,
- // },
- // {
- // label: "核算要素",
- // prop: "elementsCnName",
- // width: "120",
- // hide: true,
- // overHidden: true,
- // },
- {
- label: "付费申请金额",
- prop: "appliedAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "发票申请金额",
- prop: "appliedInvoiceAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "已开票金额",
- prop: "uninvoicedAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "发票号",
- prop: "invoiceNo",
- width: "100",
- overHidden: true
- },
- {
- label: "已结算金额",
- prop: "stlTtlAmount",
- width: "100",
- overHidden: true
- },
- {
- label: "分单号",
- prop: "hblno",
- width: "100",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- width: "100",
- overHidden: true
- },
- // {
- // label: "税率",
- // prop: "taxRate",
- // width: "100",
- // },
- // {
- // label: "附加税率",
- // prop: "surchargeRate",
- // width: "100",
- // },
- {
- label: "单价是否含税",
- prop: "isTax",
- width: "120",
- overHidden: true
- },
- {
- label: this.$t("sea118n.createBy"),
- prop: "createUserName",
- width: "100",
- overHidden: true
- },
- {
- label: this.$t("sea118n.createTime"),
- prop: "createTime",
- width: "100",
- overHidden: true
- }
- ]
- },
- loadingC: false,
- formC: {},
- // 签单方式
- issuetypefData: [],
- value: "",
- feeCenterListD: [], // 收
- feeCenterListC: [], // 付
- // 客户数据
- corpCnNameData: [],
- // 费用数据
- feeCnNameData: [],
- elementsData: [], // 核算要素
- // 预付到付数据
- paymodeData: [],
- // 计算单位数据
- unitNoData: [],
- // 币别数据
- curCodeData: [],
- // 模板弹窗
- templateVisible: false,
- treeOption: {
- nodeKey: "id",
- // lazy: true,
- addBtn: false,
- menu: false,
- size: "small",
- props: {
- labelText: "标题",
- label: "cnName",
- value: "value",
- children: "children"
- }
- },
- // 右侧详情数据
- templateRightData: [],
- // 导入弹窗表格的配置
- templateOption: {},
- templateOptionBack: {
- height: 500,
- menu: false,
- addBtn: false,
- editBtn: false,
- delBtn: false,
- viewBtn: false,
- header: false,
- index: true,
- tip: false,
- // selection: true,
- column: [
- {
- label: "类别",
- prop: "type",
- overHidden: true
- },
- {
- label: "费用",
- prop: "feeCnName",
- overHidden: true
- },
- {
- label: "计量单位",
- prop: "unitNo",
- overHidden: true
- },
- {
- label: "单价",
- prop: "salesPrice",
- overHidden: true
- },
- {
- label: "币别",
- prop: "curCode",
- overHidden: true
- },
- {
- label: "结算单位",
- prop: "corpCnName",
- overHidden: true
- }
- ]
- },
- // 左侧数据
- templateData: [],
- lefttemplate: {}, // 左侧选择的数据
- // 选中的数据
- feesselectionList: [],
- selectionDList: [], // 收选择的
- selectionCList: [], // 付选择的
- // 需要加判断是否必填的数据
- messageData: [
- {
- name: "客户",
- value: "corpCnName"
- },
- {
- name: "业务来源",
- value: "srcType"
- },
- {
- name: "MBLNO",
- value: "mblno"
- },
- {
- name: "船名(VSL)",
- value: "vesselCnName"
- },
- {
- name: "航次(VOY)",
- value: "voyageNo"
- },
- {
- name: "ATA",
- value: "actualEta"
- },
- {
- name: "装货港",
- value: "polCnName"
- },
- {
- name: "卸货港",
- value: "podCnName"
- // 判断条件,多条件,只支持 or
- // vif: [{
- // name: 'carrierId',
- // value: 11207, // ONE 海洋网联船务(中国)有限公司
- // op: '!=',
- // }],
- },
- {
- name: "交货地",
- value: "placeDeliveryId",
- vif: [
- {
- name: "carrierId",
- value: 11207, // ONE 海洋网联船务(中国)有限公司
- op: "=="
- }
- ]
- },
- {
- name: "包装单位",
- value: "packingUnit"
- },
- {
- name: "船公司",
- value: "carrierCnName"
- },
- // {
- // name:'场站',
- // value:'cyCnName',
- // },
- {
- name: "所属团队",
- value: "teamId"
- }
- ],
- messageData2: [
- {
- name: "客户",
- value: "corpCnName"
- },
- {
- name: "业务来源",
- value: "srcType"
- },
- {
- name: "船名(VSL)",
- value: "vesselCnName"
- },
- {
- name: "航次(VOY)",
- value: "voyageNo"
- },
- {
- name: "ATA",
- value: "actualEta"
- },
- {
- name: "装货港",
- value: "polCnName"
- },
- {
- name: "卸货港",
- value: "podCnName"
- // 判断条件,多条件,只支持 or
- // vif: [{
- // name: 'carrierId',
- // value: 11207, // ONE 海洋网联船务(中国)有限公司
- // op: '!=',
- // }],
- },
- {
- name: "交货地",
- value: "placeDeliveryId",
- vif: [
- {
- name: "carrierId",
- value: 11207, // ONE 海洋网联船务(中国)有限公司
- op: "=="
- }
- ]
- },
- {
- name: "包装单位",
- value: "packingUnit"
- },
- {
- name: "船公司",
- value: "carrierCnName"
- },
- // {
- // name:'场站',
- // value:'cyCnName',
- // },
- {
- name: "所属团队",
- value: "teamId"
- }
- ],
- roleName: [], // 当前登录人的角色权限
- isAdmin: false, // 当前登录人是否有系统管理员角色
- isFeeView: false, // 当前登录人是否有应收或应付费用查看角色
- isFeeViewD: false, // 当前登录人是否有应收费用查看角色
- isFeeViewC: false, // 当前登录人是否有应付费用查看角色
- isFeeEdit: false, // 当前登录人是否有应收或应付费用修改角色
- isFeeEditD: false, // 当前登录人是否有应收费用修改角色
- isFeeEditC: false, // 当前登录人是否有应付费用修改角色
- isProfitView: false, // 当前登录人是否有利润查看角色
- idArr: [],
- updateSearchKey: new Date().getTime(),
- dc: null,
- expenseApplication: 0,
- userId: JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id
- };
- },
- async created() {
- isProcurement({
- param: "if.station"
- }).then(res => {
- console.log(res);
- if (res.data.data == 1) {
- this.messageData.push({
- name: "场站",
- value: "cyCnName"
- });
- }
- });
- this.roleName = localStorage.getItem("roleName").split(","); // 获取角色数据
- console.log("roleName", this.roleName);
- this.isAdmin = this.roleName.indexOf("admin") >= 0;
- this.isFeeViewD =
- this.isAdmin ||
- this.roleName.indexOf("应收查看") >= 0 ||
- this.roleName.indexOf("国外费用") >= 0 ||
- this.roleName.indexOf("允许修改他人费用") >= 0;
- this.isFeeViewC =
- this.isAdmin ||
- this.roleName.indexOf("应付查看") >= 0 ||
- this.roleName.indexOf("国外费用") >= 0 ||
- this.roleName.indexOf("允许修改他人费用") >= 0;
- this.isFeeView = this.isAdmin || this.isFeeViewD || this.isFeeViewC;
- this.isFeeEditD = this.isAdmin || (this.isFeeViewD && this.roleName.indexOf("应收修改") >= 0) || this.roleName.indexOf("允许修改他人费用") >= 0;
- this.isFeeEditC = this.isAdmin || (this.isFeeViewC && this.roleName.indexOf("应付修改") >= 0) || this.roleName.indexOf("允许修改他人费用") >= 0;
- this.isFeeEdit = this.isAdmin || this.isFeeEditD || this.isFeeEditC;
- this.isProfitView = this.isAdmin || this.roleName.indexOf("利润查看") >= 0;
- this.optionD = await this.getColumnData(this.getColumnName(309.2), this.optionDBack);
- this.optionC = await this.getColumnData(this.getColumnName(309.3), this.optionCBack);
- // 导入弹窗的表格
- this.templateOption = await this.getColumnData(this.getColumnName(309.5), this.templateOptionBack);
- this.getBcorpsListfun(); // 获取客户数据
- this.paymodeWorkDictsfun(); // 获取预付/到付数据
- isProcurement({ param: "expense.application" }).then(res => {
- if (res.data.data) {
- this.expenseApplication = res.data.data;
- }
- });
- },
- computed: {
- //监听 收费是否允许他人编辑
- isFeedDisabled() {
- if (this.assemblyForm.id && this.selectionDList.filter(e => e.id && e.createUser != this.userId).length > 0) {
- if (this.roleName.includes("允许修改他人费用")) {
- return false;
- } else {
- return true;
- }
- } else {
- return false;
- }
- },
- //监听 付费是否允许他人编辑
- isFeecDisabled() {
- if (this.assemblyForm.id && this.selectionCList.filter(e => e.id && e.createUser != this.userId).length > 0) {
- if (this.roleName.includes("允许修改他人费用")) {
- return false;
- } else {
- return true;
- }
- } else {
- return false;
- }
- }
- },
- methods: {
- viewFininvoices(row) {
- this.fininvoicesData = [];
- fininvoicesGetAccBillIdList({ accBillId: row.accBillId }).then(res => {
- this.fininvoicesData = res.data.data;
- });
- },
- viewFinstlbills(row) {
- this.finstlbillsData = [];
- finstlbillsGetAccBillIdList({ accBillId: row.accBillId }).then(res => {
- this.finstlbillsData = res.data.data;
- });
- },
- rowView(row, index) {
- this.$refs.feeModifyView.openDialog(row);
- },
- updateDetail() {
- this.$emit("billsDetailfun");
- },
- rowDicChange(name, row, el) {
- if (name == "shortName") {
- if (row) {
- el.corpId = row.id;
- el.shortName = row.shortName;
- el.corpEnName = row.enName;
- el.corpCnName = row.cnName;
- el.generationCorpId = row.bookingAgentId;
- el.generationCorpEnName = row.bookingAgentEnName;
- el.generationCorpCnName = row.bookingAgentCnName;
- } else {
- el.corpId = null;
- el.shortName = null;
- el.corpCnName = null;
- el.corpEnName = null;
- el.generationCorpId = null;
- el.generationCorpEnName = null;
- el.generationCorpCnName = null;
- }
- }
- if (name == "shortNameC") {
- if (row) {
- el.corpId = row.id;
- el.shortName = row.shortName;
- el.corpEnName = row.enName;
- el.corpCnName = row.cnName;
- } else {
- el.corpId = null;
- el.shortName = null;
- el.corpCnName = null;
- el.corpEnName = null;
- }
- }
- if (name == "generationCorpCnName") {
- if (row) {
- el.generationCorpId = row.id;
- el.generationCorpEnName = row.enName;
- el.generationCorpCnName = row.cnName;
- } else {
- el.generationCorpId = null;
- el.generationCorpEnName = null;
- el.generationCorpCnName = null;
- }
- }
- if (name == "corpType") {
- if (row.cnName == "国内直接客户" || row.cnName == "国内同行及代理" || row.cnName == "国外直接客户") {
- el.corpId = this.assemblyForm.corpId;
- el.shortName = this.assemblyForm.shortName;
- el.corpCnName = this.assemblyForm.corpCnName;
- el.corpEnName = this.assemblyForm.corpEnName;
- this.updateSearchKey = new Date().getTime();
- } else if (row.cnName == "国外同行及代理") {
- el.corpId = this.assemblyForm.foreignAgencyId;
- el.shortName = this.assemblyForm.foreignAgencyCnName;
- el.corpCnName = this.assemblyForm.foreignAgencyCnName;
- el.corpEnName = this.assemblyForm.foreignAgencyEnName;
- this.updateSearchKey = new Date().getTime();
- } else if (row.cnName == "船公司") {
- el.corpId = this.assemblyForm.carrierId;
- el.shortName = this.assemblyForm.carrierShortName;
- el.corpCnName = this.assemblyForm.carrierCnName;
- el.corpEnName = this.assemblyForm.carrierEnName;
- this.updateSearchKey = new Date().getTime();
- } else if (row.cnName == "场站") {
- el.corpId = this.assemblyForm.cyId;
- el.shortName = this.assemblyForm.cyCnName;
- el.corpCnName = this.assemblyForm.cyCnName;
- el.corpEnName = this.assemblyForm.cyEnName;
- this.updateSearchKey = new Date().getTime();
- } else if (row.cnName == "船代") {
- el.corpId = this.assemblyForm.shippingAgencyId;
- el.shortName = this.assemblyForm.shippingAgencyCname;
- el.corpCnName = this.assemblyForm.shippingAgencyCname;
- el.corpEnName = this.assemblyForm.shippingAgencyEname;
- this.updateSearchKey = new Date().getTime();
- } else {
- el.corpId = null;
- el.shortName = null;
- el.corpCnName = null;
- el.corpEnName = null;
- this.updateSearchKey = new Date().getTime();
- }
- }
- },
- getSum() {
- let sumArr = [];
- let corpArr = [];
- let newArr = [];
- this.sumData = [];
- sumArr = this.assemblyForm.feeCenterListD.concat(this.assemblyForm.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.rmbAmount ? item.rmbAmount : 0);
- sumD += Number(item.rmbAmount ? item.rmbAmount : 0);
- }
- if (item.curCode == this.getLocalCurrency() && item.dc == "C") {
- rmbC += Number(item.rmbAmount ? item.rmbAmount : 0);
- sumC += Number(item.rmbAmount ? item.rmbAmount : 0);
- }
- if (item.curCode != this.getLocalCurrency() && item.dc == "D") {
- usdD += Number(item.usdAmount ? item.usdAmount : 0);
- sumD += Number(item.usdAmount ? item.usdAmount : 0) * Number(item.exrate ? item.exrate : 0);
- }
- if (item.curCode != this.getLocalCurrency() && item.dc == "C") {
- usdC += Number(item.usdAmount ? item.usdAmount : 0);
- sumC += Number(item.usdAmount ? item.usdAmount : 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)
- });
- });
- },
- uniqueItems(list) {
- const unique = [];
- const seen = new Set();
- for (const item of list) {
- const key = item.id; // 假设根据id属性去重
- if (!seen.has(key)) {
- seen.add(key);
- unique.push(item);
- }
- }
- return unique;
- },
- getKeyName(key) {
- const item = this.corpCnNameData.find(item => item.cnName === key);
- return item ? item.shortName : key;
- },
- // 弹窗导出
- exportfun() {
- const routeData = this.$router.resolve({
- path: "/api/blade-los/finaccbills/listFeeCountByCorpExport", //跳转目标窗口的地址
- query: {
- dc: this.corpRow.dc,
- corpId: this.corpRow.corpId
- }
- });
- window.open(routeData.href.slice(1, routeData.href.length) + "&" + `${this.website.tokenHeader}=${getToken()}`);
- },
- // 费用弹窗里的打印
- dialogPreviewfun(row) {
- if (!this.reportformsObj.id) {
- this.$message.warning("请选择打印类型");
- return;
- }
- // 获取报表数据
- reportsGetReportData({
- billId: this.assemblyForm.id,
- reportCode: this.reportformsObj.classifyCode,
- groupCode: this.reportformsObj.groupCode,
- corpIds: row.id,
- curCode: row.curCode,
- type: "HYJK"
- }).then(res => {
- this.handleReportPreview(this.reportformsObj.url, res.data.data.data);
- });
- },
- // 打印弹窗里回调
- reportRadio(val) {
- // 多选打印
- // 获取报表数据
- reportsGetReportData({
- billId: this.assemblyForm.id,
- reportCode: val.classifyCode,
- groupCode: val.groupCode,
- itemIds: this.idArr.join(","),
- type: "HYJK"
- }).then(res => {
- this.handleReportPreview(val.url, res.data.data.data);
- });
- },
- // 打印费用
- printingCostsfun(dc) {
- this.printingDC = dc;
- let groupCode = "";
- let selectionArr = [];
- this.idArr = [];
- for (let item of this.selectionDList) {
- if (item.corpId != this.selectionDList[0].corpId) {
- return this.$message.error("请选择相同的结算单位");
- }
- }
- for (let item of this.selectionCList) {
- if (item.corpId != this.selectionCList[0].corpId) {
- return this.$message.error("请选择相同的结算单位");
- }
- }
- if (dc == "D") {
- groupCode = "应收,应收-账单";
- selectionArr = this.selectionDList;
- this.idArr = this.selectionDList.map(item => {
- return item.id;
- });
- } else {
- groupCode = "应付,应付-账单";
- selectionArr = this.selectionCList;
- this.idArr = this.selectionCList.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: "HYJK",
- classifyCode: "费用",
- groupCode: groupCode
- });
- });
- } else {
- // 没有多选弹窗
- this.printingLoading = true;
- getFeeCenterCorpIds({
- billId: this.assemblyForm.id,
- dc: dc,
- type: "HYJK"
- }).then(res => {
- this.printingLoading = false;
- res.data.data.forEach(e => {
- e.$cellEdit = true;
- e.curCode = null;
- });
- this.PrintingData = res.data.data;
- });
- this.reportsListfun({
- businessType: "HYJK",
- classifyCode: "费用",
- groupCode: groupCode
- });
- this.printingDialog = true;
- }
- },
- // 获取打印表格数据
- 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;
- },
- // 生成应收应付
- copyfun(dc) {
- let selection = [];
- if (dc == "D") {
- selection = this.selectionDList;
- if (this.selectionDList.length == 0) {
- this.$message.warning("请先选择要复制的数据");
- return;
- }
- } else {
- selection = this.selectionCList;
- if (this.selectionCList.length == 0) {
- this.$message.warning("请先选择要复制的数据");
- return;
- }
- }
- let arr = selection.map(item => {
- let obj = {};
- obj.feeId = item.feeId;
- obj.feeCnName = item.feeCnName;
- obj.feeEnName = item.feeEnName;
- obj.feeCode = item.feeCode;
- obj.elementsId = item.elementsId;
- obj.elementsCnName = item.elementsCnName;
- obj.elementsEnName = item.elementsEnName;
- obj.elementsCode = item.elementsCode;
- obj.curCode = item.curCode;
- obj.taxRate = item.taxRate;
- obj.paymode = item.paymode;
- obj.remarks = item.remarks;
- obj.amount = item.amount;
- obj.price = item.price;
- obj.quantity = item.quantity;
- obj.rmbAmount = item.rmbAmount;
- obj.taxRate = item.taxRate;
- obj.unitNo = item.unitNo;
- obj.usdAmount = item.usdAmount;
- obj.edit = true;
- obj.rmbAmountNet = item.rmbAmountNet;
- obj.usdAmountNet = item.usdAmountNet;
- obj.exrate = item.exrate;
- return obj;
- });
- if (dc == "D") {
- this.assemblyForm.feeCenterListC = [...arr, ...this.assemblyForm.feeCenterListC];
- } else {
- this.assemblyForm.feeCenterListD = [...arr, ...this.assemblyForm.feeCenterListD];
- }
- },
- // 结算单位弹窗开启
- corpClick(row) {
- this.corpVisible = true;
- listFeeCountByCorp({
- corpId: row.corpId,
- dc: row.dc
- }).then(res => {
- this.corpRow = row;
- this.dcDialogType = row.dc;
- this.corpDialog = res.data.data;
- });
- },
- // 模板导入
- templateExport() {
- if (!this.lefttemplate.id) {
- this.$message.warning("请选择左侧模版名");
- return;
- }
- let obj = {
- billsIds: this.assemblyForm.id,
- templateId: this.lefttemplate.id,
- dc: this.dc
- };
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- templateImportBatch(obj)
- .then(res => {
- this.$message.success("操作成功!");
- // this.templateDialog = false
- this.dc = null;
- this.feesselectionList = []; // 清空多选
- this.templateRightData = []; // 清空数据
- this.lefttemplate = {}; //左侧数据
- this.$emit("billsDetailfun");
- this.templateVisible = false;
- })
- .finally(() => {
- loading.close();
- });
- // if (this.feesselectionList.length > 0) {
- // console.log(this.lefttemplate)
- // feecenterTemplateImport({
- // ...this.lefttemplate,
- // feesTemplateItemsList: this.feesselectionList,
- // billNoId: this.assemblyForm.id
- // }).then(res => {
- // if (res.data.msg.indexOf('未导入') >= 0) {
- // this.$message({
- // type: "error",
- // message: res.data.msg
- // });
- // } else {
- // this.$message({
- // type: "success",
- // message: res.data.msg
- // });
- // }
- // this.feesselectionList = [] // 清空多选
- // this.templateRightData = [] // 清空数据
- // this.lefttemplate = {} //左侧数据
- // this.$emit('billsDetailfun')
- // this.templateVisible = false
- // })
- // } else {
- // this.$message.warning('请先选择要导入的数据')
- // }
- },
- // 模板
- templateClick(dc) {
- if (popupReminder(this.assemblyForm, this.messageData)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- this.dc = dc;
- this.templateVisible = true;
- let obj = {
- current: 1,
- size: 100,
- status: 0,
- type: "HYJK",
- dc: this.dc,
- shippingCompanyId: this.assemblyForm.carrierId
- };
- getListTemplate(obj).then(res => {
- this.templateData = res.data.data.records;
- this.lefttemplate = res.data.data.records[0];
- // 查第一条的明细
- getListTemplatelist({ current: 1, size: 100, pid: res.data.data.records[0].id }).then(res => {
- this.templateRightData = res.data.data.records;
- });
- });
- },
- // 左侧选择
- nodeClick(e) {
- this.lefttemplate = e;
- getListTemplatelist({ current: 1, size: 100, pid: this.lefttemplate.id }).then(res => {
- this.templateRightData = res.data.data.records;
- });
- },
- // 右侧选择回调
- feeselectionChange(list) {
- this.feesselectionList = list;
- },
- // 应收新增
- async addDfun() {
- if (await this.saveLocalCurrency(this.assemblyForm.branchId)) {
- // 判断数据需要的数据是否有 有就弹窗
- if (popupReminder(this.assemblyForm, this.messageData)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- // 如果是分单 判断是否有分单号
- if (this.assemblyForm.billType == "MH") {
- if (!this.assemblyForm.hblno) {
- this.$message({
- message: "请先选择HBLNO",
- type: "warning"
- });
- return;
- }
- }
- let obj = {
- edit: true
- };
- if (this.assemblyForm.feeCenterListD.length != 0) {
- obj.branchId = this.assemblyForm.branchId;
- obj.branchName = this.assemblyForm.branchName;
- obj.corpType = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpType;
- // 结算单位
- obj.corpId = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpId;
- obj.corpCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpCnName;
- obj.corpEnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpEnName;
- obj.shortName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].shortName;
- obj.generationCorpId = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].generationCorpId;
- obj.generationCorpEnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].generationCorpEnName;
- obj.generationCorpCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].generationCorpCnName;
- // // 费用简称
- // obj.feeId = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeId
- // obj.feeCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeCnName
- // obj.feeEnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeEnName
- // obj.feeCode = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeCode
- // // 核算要素
- // obj.elementsId = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].elementsId
- // obj.elementsCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].elementsCnName
- // obj.elementsEnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].elementsEnName
- // obj.elementsCode = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].elementsCode
- // 预付/到付
- obj.paymode = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].paymode;
- // // 计量单位
- // obj.unitNo = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].unitNo
- // // 币种
- // obj.curCode = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].curCode
- // obj.taxRate = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].taxRate
- // // 汇率
- // obj.exrate = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].exrate
- // // 单价
- // obj.price = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].price
- // // 数量
- // obj.quantity = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].quantity
- // // 金额
- // obj.rmbAmount = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].rmbAmount
- // obj.usdAmount = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].usdAmount
- // obj.rmbAmountNet = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].rmbAmountNet
- // obj.usdAmountNet = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].usdAmountNet
- this.assemblyForm.feeCenterListD.push(obj);
- } else {
- obj.branchId = this.assemblyForm.branchId;
- obj.branchName = this.assemblyForm.branchName;
- // 结算单位拿主表客户名称
- obj.corpId = this.assemblyForm.corpId;
- obj.corpCnName = this.assemblyForm.corpCnName;
- obj.corpEnName = this.assemblyForm.corpEnName;
- //
- // 预付/到付
- obj.paymode = this.assemblyForm.mpaymode;
- getBcorpsDetail(this.assemblyForm.corpId).then(res => {
- obj.shortName = res.data.data.shortName;
- obj.generationCorpId = res.data.data.bookingAgentId;
- obj.generationCorpEnName = res.data.data.bookingAgentEnName;
- obj.generationCorpCnName = res.data.data.bookingAgentCnName;
- this.assemblyForm.feeCenterListD.push(obj);
- });
- }
- this.$nextTick(() => {
- const container = this.$refs.crudD.$el.querySelector(".el-table__body-wrapper");
- if (container) {
- container.scrollTop = container.scrollHeight;
- }
- });
- }
- },
- // 应付新增
- async addCfun() {
- // 判断数据需要的数据是否有
- // 判断数据需要的数据是否有 有就弹窗
- if (await this.saveLocalCurrency(this.assemblyForm.branchId)) {
- // 判断数据需要的数据是否有
- // 判断数据需要的数据是否有 有就弹窗
- if (popupReminder(this.assemblyForm, this.messageData)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- // 如果是分单 判断是否有分单号
- if (this.assemblyForm.billType == "MH") {
- if (!this.assemblyForm.hblno) {
- this.$message({
- message: "请先选择HBLNO",
- type: "warning"
- });
- return;
- }
- }
- let obj = {
- edit: true
- };
- if (this.assemblyForm.feeCenterListC.length != 0) {
- obj.branchId = this.assemblyForm.branchId;
- obj.branchName = this.assemblyForm.branchName;
- obj.corpType = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpType;
- // 结算单位
- obj.corpId = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpId;
- obj.corpCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpCnName;
- obj.corpEnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpEnName;
- obj.shortName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].shortName;
- // // 费用简称
- // obj.feeId = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeId
- // obj.feeCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeCnName
- // obj.feeEnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeEnName
- // obj.feeCode = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeCode
- // // 核算要素
- // obj.elementsId = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].elementsId
- // obj.elementsCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].elementsCnName
- // obj.elementsEnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].elementsEnName
- // obj.elementsCode = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].elementsCode
- // 预付/到付
- obj.paymode = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].paymode;
- // // 计量单位
- // obj.unitNo = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].unitNo
- // // 币种
- // obj.curCode = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].curCode
- // obj.taxRate = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].taxRate
- // // 汇率
- // obj.exrate = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].exrate
- // // 单价
- // obj.price = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].price
- // // 数量
- // obj.quantity = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].quantity
- // // 金额
- // obj.rmbAmount = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].rmbAmount
- // obj.usdAmount = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].usdAmount
- // obj.rmbAmountNet = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].rmbAmountNet
- // obj.usdAmountNet = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].usdAmountNet
- this.assemblyForm.feeCenterListC.push(obj);
- } else {
- obj.branchId = this.assemblyForm.branchId;
- obj.branchName = this.assemblyForm.branchName;
- // 结算单位拿主表客户名称
- // obj.corpId = this.assemblyForm.corpId
- // obj.corpCnName = this.assemblyForm.corpCnName.split(' - ')[0]
- // obj.corpEnName = this.assemblyForm.corpEnName
- // 预付/到付
- obj.paymode = this.assemblyForm.mpaymode;
- // getBcorpsDetail(this.assemblyForm.corpId).then(res => {
- // obj.shortName = res.data.data.shortName
- // this.assemblyForm.feeCenterListC.push(obj)
- // })
- this.assemblyForm.feeCenterListC.push(obj);
- }
- this.$nextTick(() => {
- const container = this.$refs.crudC.$el.querySelector(".el-table__body-wrapper");
- if (container) {
- container.scrollTop = container.scrollHeight;
- }
- });
- }
- },
- // 应收编辑
- editDfun(row, index) {
- this.$delete(this.assemblyForm.feeCenterListD[index], "edit");
- this.$set(this.assemblyForm.feeCenterListD[index], "edit", true);
- },
- // 应付编辑
- editCfun(row, index) {
- this.$delete(this.assemblyForm.feeCenterListC[index], "edit");
- this.$set(this.assemblyForm.feeCenterListC[index], "edit", true);
- },
- // 应付应付保存
- savefun(row, index, dc) {
- if (!this.pid) {
- this.$message({
- message: "请先保存数据之后才能添加",
- type: "warning"
- });
- return;
- }
- let sum = "请输入";
- if (!row.corpId) {
- sum += ` 序号${index + 1}结算单位`;
- }
- if (!row.feeId) {
- sum += ` 序号${index + 1}费用简称`;
- }
- // if (!row.elementsId) {
- // sum += ` 序号${index + 1}核算要素`
- // }
- if (!row.curCode) {
- sum += ` 序号${index + 1}币种`;
- }
- if (sum != "请输入") {
- this.$confirm(sum, {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- // 收付 D=收 C=付
- row.dc = dc;
- row.pid = this.pid;
- row.sort = Number(index) + 1;
- row.businessType = this.assemblyForm.businessType; // 业务类型
- row.billType = this.assemblyForm.billType; // 单据类型
- row.billNo = this.assemblyForm.billNo; // 单据编号
- row.billDate = this.assemblyForm.billDate; // 单据日期
- row.billCorpId = this.assemblyForm.corpId; // 主表客户 id
- row.billCorpCnName = this.assemblyForm.corpCnName; // 主表客户中文名称
- row.billCorpEnName = this.assemblyForm.corpEnName; // 主表客户英文名称
- row.lineId = this.assemblyForm.lineId; // 航线 id
- row.lineCnName = this.assemblyForm.lineCnName; // 航线中文名称
- row.lineEnName = this.assemblyForm.lineEnName; // 航线英文名称
- row.vesselId = this.assemblyForm.vesselId; // 船名 id
- row.vesselCnName = this.assemblyForm.vesselCnName; // 中文船名
- row.vesselEnName = this.assemblyForm.vesselEnName; // 英文船名
- row.voyageNo = this.assemblyForm.voyageNo; // 航次
- row.mblno = this.assemblyForm.mblno; // MB/L NO
- row.hblno = this.assemblyForm.hblno; // HB/L NO
- row.etd = this.assemblyForm.etd; // 开船日期
- row.eta = this.assemblyForm.actualEta; // 到港日期
- row.polId = this.assemblyForm.polId; // 装货港 id
- row.polCode = this.assemblyForm.polCode; // 装货港代码
- row.polCnName = this.assemblyForm.polCnName; // 装货港中文名称
- row.polEnName = this.assemblyForm.polEnName; // 装货港英文名称
- row.podId = this.assemblyForm.podId; // 卸货港 id
- row.podCode = this.assemblyForm.podCode; // 卸货港代码
- row.podCnName = this.assemblyForm.podCnName; // 卸货港中文名称
- row.podEnName = this.assemblyForm.podEnName; // 卸货港英文名称
- row.corpArgreementNo = this.assemblyForm.corpArgreementNo; // 客户约号
- this.feecenterSubmitfun(row);
- },
- // 生成账单
- GenerateBillsfun(dc) {
- if (popupReminder(this.assemblyForm, this.messageData)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- let selectionArr = [];
- if (dc == "D") {
- selectionArr = this.selectionDList;
- } else {
- selectionArr = this.selectionCList;
- }
- // 判断必填项
- let sum = "请输入";
- for (let item of selectionArr) {
- if (!item.id) {
- this.$message.warning(`序号${item.$index + 1}请先保存再进行生成账单`);
- return;
- }
- if (!item.corpId) {
- sum += ` 序号${item.$index + 1}结算单位`;
- }
- if (!item.feeId) {
- sum += ` 序号${item.$index + 1}费用简称`;
- }
- // if (!item.elementsId) {
- // sum += ` 序号${item.$index + 1}核算要素`
- // }
- if (!item.curCode) {
- sum += ` 序号${item.$index + 1}币种`;
- }
- }
- if (sum != "请输入") {
- this.$confirm(sum, {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- this.$confirm("确定将选择数据生成账单?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let billList = [];
- if (dc == "D") {
- for (let item of this.selectionDList) {
- billList.push(item);
- }
- this.finaccbillsGenerateBillfun(billList);
- } else {
- for (let item of this.selectionCList) {
- billList.push(item);
- }
- this.finaccbillsGenerateBillfun(billList);
- }
- });
- },
- // 撤销账单
- RevokingBillsfun(dc) {
- this.$confirm("确定将选择数据撤销账单?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let billList = [];
- if (dc == "D") {
- for (let item of this.selectionDList) {
- billList.push(item);
- }
- this.finaccbillsRevokeBillfun(billList);
- } else {
- for (let item of this.selectionCList) {
- billList.push(item);
- }
- this.finaccbillsRevokeBillfun(billList);
- }
- });
- },
- // 多选
- handleSelectionChange(list, dc) {
- if (dc == "D") {
- this.selectionDList = list;
- } else {
- this.selectionCList = list;
- }
- },
- // 一键删除
- batchDelete(dc) {
- if (dc == "D") {
- for (let item of this.selectionDList) {
- if (item.accStatus == 1 || item.auditStatus > 0) {
- this.$message.warning("请选择没有生成账单或提交审核的数据");
- return;
- }
- }
- } else {
- for (let item of this.feeCenterListC) {
- if (item.accStatus == 1 || item.auditStatus > 0) {
- this.$message.warning("请选择没有生成账单或提交审核的数据");
- return;
- }
- }
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let multiList = [];
- let arr = [];
- if (dc == "D") {
- multiList = this.selectionDList;
- arr = this.assemblyForm.feeCenterListD;
- } else {
- multiList = this.selectionCList;
- arr = this.assemblyForm.feeCenterListC;
- }
- // 获取有id 的数据
- const itemsWithId = multiList.filter(item => item.hasOwnProperty("id"));
- 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);
- }
- }
- });
- // 有id 的处理
- if (itemsWithId.length != 0) {
- feecenterRemove(arrIds.join(",")).then(res => {
- this.$message.success("操作成功");
- this.$emit("billsDetailfun");
- });
- }
- });
- },
- // 应收删除
- deletefun(row, index, dc) {
- console.log(row, index, 1580);
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (row.id) {
- // 删除接口
- feecenterRemove(row.id).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$emit("billsDetailfun");
- });
- } else {
- if (dc == "D") {
- this.assemblyForm.feeCenterListD.splice(index, 1);
- } else {
- this.assemblyForm.feeCenterListC.splice(index, 1);
- }
- }
- });
- },
- // 客户的回调
- async corpChange(value, name, row, dc) {
- if (name == "shortName") {
- console.log(value, name);
- if (!value) {
- this.$set(row, "shortName", "");
- this.$set(row, "corpCnName", "");
- this.$set(row, "corpEnName", "");
- this.$set(row, "corpId", "");
- }
- for (let item of this.corpCnNameData) {
- if (item.shortName == value) {
- console.log(item);
- this.$set(row, "shortName", item.shortName);
- this.$set(row, "corpCnName", item.cnName);
- this.$set(row, "corpEnName", item.enName);
- this.$set(row, "corpId", item.id);
- }
- }
- } else if (name == "feeCnName") {
- if (!value) {
- this.$set(row, "feeCnName", "");
- this.$set(row, "feeEnName", "");
- this.$set(row, "feeId", "");
- this.$set(row, "feeCode", "");
- // 选择费用简称带出核算要素
- this.$set(row, "elementsId", "");
- this.$set(row, "elementsCnName", "");
- this.$set(row, "elementsCode", "");
- this.$set(row, "elementsEnName", "");
- }
- for (let item of this.feeCnNameData) {
- if (item.cnName == value) {
- if (value == "PS") {
- // 判断是否是分单
- if (this.assemblyForm.billType == "MH") {
- this.$confirm("分单不能添加PS", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- this.$set(row, "feeCnName", "");
- this.$set(row, "feeEnName", "");
- this.$set(row, "feeId", "");
- this.$set(row, "feeCode", "");
- // 核算要素
- this.$set(row, "elementsId", "");
- this.$set(row, "elementsCnName", "");
- this.$set(row, "elementsCode", "");
- this.$set(row, "elementsEnName", "");
- return;
- }
- // 查询当前客户的 ps规则是否等于零和null
- const psres = await getBcorpsDetail(this.assemblyForm.corpId);
- if (!psres.data.data.psRate || Number(psres.data.data.psRate) == 0) {
- this.$confirm("PS规则为零不能添加费用", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- this.$set(row, "feeCnName", "");
- this.$set(row, "feeEnName", "");
- this.$set(row, "feeId", "");
- this.$set(row, "feeCode", "");
- // 核算要素
- this.$set(row, "elementsId", "");
- this.$set(row, "elementsCnName", "");
- this.$set(row, "elementsCode", "");
- this.$set(row, "elementsEnName", "");
- return;
- }
- }
- this.$set(row, "feeCnName", item.cnName);
- this.$set(row, "feeEnName", item.enName);
- this.$set(row, "feeId", item.id);
- this.$set(row, "feeCode", item.code);
- // 选择费用简称带出核算要素
- this.$set(row, "elementsId", item.accElementId);
- this.$set(row, "elementsCnName", item.accElementName);
- this.$set(row, "elementsCode", item.elementsCode);
- this.$set(row, "elementsEnName", item.elementsEnName);
- // 拿取费用简称下的计量单位
- this.getBunitsPagefun(true, item, row);
- // 币别
- if (value == "PS") {
- this.$set(row, "curCode", "USD");
- } else {
- this.$set(row, "curCode", item.curNo);
- }
- await this.checkRate(
- null,
- this.assemblyForm.actualEta ? this.assemblyForm.actualEta + " 00:00:00" : null,
- dc,
- 1,
- this.assemblyForm.branchId
- );
- this.curCodeData = this.getCheckRate();
- if (this.getExchangeRate(row.curCode, dc, 1)) {
- this.$set(row, "exrate", this.getExchangeRate(row.curCode, dc, 1));
- } else {
- this.$message.error(`请维护${this.assemblyForm.branchName}的${row.curCode}币别及汇率`);
- }
- // 汇率
- // bcurrencyGetExrate({
- // date: this.assemblyForm.actualEta ? this.assemblyForm.actualEta.slice(0, 10) +
- // ' 00:00:00' : dateFormat(new Date(), "yyyy-MM-dd") +
- // ' 00:00:00', // 开船日期
- // dc: dc,
- // type: 1
- // }).then(res => {
- // for (let item of res.data.data) {
- // if (item.code == row.curCode) {
- // this.$set(row, 'exrate', item.exrate)
- // }
- // }
- // })
- // 计算金额
- this.$set(row, "amount", Number(row.price ? row.price : 0) * Number(row.quantity ? row.quantity : 0));
- if (row.curCode == this.getLocalCurrency()) {
- this.$set(row, "rmbAmount", row.amount.toFixed(2));
- this.$set(row, "usdAmount", "");
- this.$set(row, "rmbAmountNet", row.amount.toFixed(2));
- this.$set(row, "usdAmountNet", "");
- } else {
- this.$set(row, "usdAmount", row.amount.toFixed(2));
- this.$set(row, "rmbAmount", "");
- this.$set(row, "usdAmountNet", row.amount.toFixed(2));
- this.$set(row, "rmbAmountNet", "");
- }
- }
- }
- } else if (name == "unitNo") {
- console.log(value, name, row);
- // 计量单位
- this.$set(row, name, value);
- for (let item of this.unitNoData) {
- console.log(item.code, value, item, 1111);
- if (item.code == value) {
- // 按箱型
- if (item.quantityRule == "按箱量") {
- // 选择的箱那边的数据
- if (item.boxquantity) {
- this.$set(row, "quantity", item.boxquantity);
- }
- }
- // 按票
- if (item.quantityRule == "按票") {
- this.$set(row, "quantity", 1);
- }
- // 按重量
- if (item.quantityRule == "按重量") {
- this.$set(row, "quantity", this.assemblyForm.grossWeight);
- }
- // 按TEU
- if (item.quantityRule == "按TEU") {
- this.$set(row, "quantity", item.boxquantity);
- }
- // 按尺码
- if (item.quantityRule == "按尺码") {
- this.$set(row, "quantity", this.assemblyForm.measurement);
- }
- // 按件数
- if (item.quantityRule == "按件数") {
- this.$set(row, "quantity", this.assemblyForm.quantity);
- }
- }
- }
- this.$set(row, "amount", Number(row.price ? row.price : 0) * Number(row.quantity ? row.quantity : 0));
- if (row.curCode == this.getLocalCurrency()) {
- this.$set(row, "rmbAmount", row.amount.toFixed(2));
- this.$set(row, "usdAmount", "");
- this.$set(row, "rmbAmountNet", row.amount.toFixed(2));
- this.$set(row, "usdAmountNet", "");
- } else {
- this.$set(row, "usdAmount", row.amount.toFixed(2));
- this.$set(row, "rmbAmount", "");
- this.$set(row, "usdAmountNet", row.amount.toFixed(2));
- this.$set(row, "rmbAmountNet", "");
- }
- } else if (name == "elementsCnName") {
- if (!value) {
- this.$set(row, "elementsId", "");
- this.$set(row, "elementsCnName", "");
- this.$set(row, "elementsCode", "");
- this.$set(row, "elementsEnName", "");
- }
- // 核算要素
- for (let item of this.elementsData) {
- if (item.cnName == value) {
- this.$set(row, "elementsId", item.id);
- this.$set(row, "elementsCnName", item.cnName);
- this.$set(row, "elementsCode", item.code);
- this.$set(row, "elementsEnName", item.enName);
- }
- }
- } else if (name == "curCode") {
- if (row.feeCnName == "PS") {
- this.$set(row, "curCode", "");
- value = "USD";
- }
- for (let item of this.curCodeData) {
- if (item.code == value) {
- if (item.code != this.getLocalCurrency()) {
- if (Number(item.exrate) <= 0) {
- this.$message.warning("当前选择的币别汇率不能小于零");
- return;
- }
- } else {
- if (Number(item.exrate) == 0) {
- this.$message.warning("当前选择的币别汇率不能为零");
- return;
- }
- }
- this.$set(row, "curCode", item.code);
- this.$set(row, "exrate", this.getExchangeRate(item.code, dc, 1));
- // this.$set(row, 'amount', Number(row.price ? row.price : 0) * Number(row.quantity ? row
- // .quantity : 0))
- // if (row.curCode == this.getLocalCurrency()) {
- // this.$set(row, 'rmbAmount', row.amount.toFixed(2))
- // this.$set(row, 'usdAmount', '')
- // this.$set(row, 'rmbAmountNet', row.amount.toFixed(2))
- // this.$set(row, 'usdAmountNet', '')
- // } else {
- // this.$set(row, 'usdAmount', row.amount.toFixed(2))
- // this.$set(row, 'rmbAmount', '')
- // this.$set(row, 'usdAmountNet', row.amount.toFixed(2))
- // this.$set(row, 'rmbAmountNet', '')
- // }
- this.calculateTotal(row);
- }
- }
- } else {
- this.$set(row, name, value);
- }
- },
- calculateTotal(row) {
- this.$set(
- row,
- "amountTax",
- Number(Number(row.price ? row.price : 0) * (Number(row.taxRate ? row.taxRate : 0) / 100) * Number(row.quantity ? row.quantity : 0)).toFixed(2)
- );
- this.$set(
- row,
- "amount",
- Number(row.price ? row.price : 0) * (1 + Number(row.taxRate ? row.taxRate : 0) / 100) * Number(row.quantity ? row.quantity : 0)
- );
- // 判断是否有币种
- if (!row.curCode) {
- return;
- }
- // this.$set(row, 'amountTax', Number(row.price ? row.price : 0) * (Number(row.taxRate ? row.taxRate : 0) / 100) * Number(row.quantity ? row.quantity : 0))
- // this.$set(row, 'amount', Number(row.price ? row.price : 0) * (1 + Number(row.taxRate ? row.taxRate : 0) / 100) * Number(row.quantity ? row.quantity : 0))
- if (row.curCode == this.getLocalCurrency()) {
- this.$set(row, "rmbAmount", row.amount.toFixed(2));
- this.$set(row, "usdAmount", "");
- this.$set(row, "rmbAmountNet", row.amount.toFixed(2));
- this.$set(row, "usdAmountNet", "");
- } else {
- this.$set(row, "usdAmount", row.amount.toFixed(2));
- this.$set(row, "rmbAmount", "");
- this.$set(row, "usdAmountNet", row.amount.toFixed(2));
- this.$set(row, "rmbAmountNet", "");
- }
- },
- // 单价
- priceinputfun(value, row) {
- let price = Number(row.price ? row.price : 0),
- qty = Number(row.quantity ? row.quantity : 0);
- if (isNaN(price)) {
- price = 0.0;
- this.$set(row, "price", price);
- }
- if (isNaN(qty)) {
- qty = 0.0;
- this.$set(row, "quantity", qty);
- }
- /*
- if (price <= 0) {
- this.$message({
- type: "warning",
- message: "单价不能输入负数!"
- });
- return
- }
- */
- if (price.toFixed(4) == "0.0000") {
- this.$message({
- type: "warning",
- message: "单价不能为零!"
- });
- return;
- }
- this.$set(row, "amount", price * qty);
- // 判断是否有币种
- if (!row.curCode) {
- return;
- }
- if (row.curCode == this.getLocalCurrency()) {
- this.$set(row, "rmbAmount", row.amount.toFixed(2));
- this.$set(row, "usdAmount", "");
- this.$set(row, "rmbAmountNet", row.amount.toFixed(2));
- this.$set(row, "usdAmountNet", "");
- } else {
- this.$set(row, "usdAmount", row.amount.toFixed(2));
- this.$set(row, "rmbAmount", "");
- this.$set(row, "usdAmountNet", row.amount.toFixed(2));
- this.$set(row, "rmbAmountNet", "");
- }
- },
- // 数量
- quantityinputfun(row) {
- let price = Number(row.price ? row.price : 0),
- qty = Number(row.quantity ? row.quantity : 0);
- if (isNaN(price)) {
- price = 0.0;
- this.$set(row, "price", price);
- }
- if (isNaN(qty)) {
- qty = 0.0;
- this.$set(row, "quantity", qty);
- }
- if (row.quantity <= 0) {
- this.$message({
- type: "warning",
- message: "数量不能输入负数!"
- });
- this.$set(row, "quantity", 1);
- return;
- }
- this.$set(row, "amount", price * qty);
- // 判断是否有币种
- if (!row.curCode) {
- return;
- }
- if (row.curCode == this.getLocalCurrency()) {
- this.$set(row, "rmbAmount", row.amount.toFixed(2));
- this.$set(row, "usdAmount", "");
- } else {
- this.$set(row, "usdAmount", row.amount.toFixed(2));
- this.$set(row, "rmbAmount", "");
- }
- },
- // 保存接口
- feecenterSubmitfun(row) {
- feecenterSubmit(row).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$emit("billsDetailfun");
- });
- },
- // 获取客户数据
- getBcorpsListfun(cnName) {
- getBcorpsList(1, 10, {
- shortName: cnName,
- status: 0
- }).then(res => {
- this.corpCnNameData = res.data.data.records;
- // this.corpCnNameData = res.data.data.records.map(item=>{
- // // 创建自定义参数暂存
- // item.cnNamecode = item.cnName + ' - ' + item.code + ' - ' + item.shortName
- // return item
- // })
- });
- },
- // 获取费用数据
- bfeesListfun(cnName) {
- bfeesList(1, 10, {
- cnName,
- status: 0
- }).then(res => {
- this.feeCnNameData = res.data.data.records;
- });
- },
- // 获取费用信息 核算要素信息
- getBaccelementsListfun(cnName) {
- getBaccelementsList(1, 10, {
- cnName,
- status: 0
- }).then(res => {
- this.elementsData = res.data.data.records;
- });
- },
- // 获取计算属性
- async getBunitsPagefun(type, feeRow, row) {
- let srcBillId = null;
- if (this.assemblyForm.billType == "MH") {
- srcBillId = this.assemblyForm.masterId;
- } else {
- srcBillId = this.assemblyForm.id;
- }
- const res = await getBunitsPage({ srcBillId });
- console.log(res);
- this.unitNoData = [];
- let boxarr40 = ["40HC", "40GP", "40FB", "40RF", "40RH"];
- let boxarr20 = ["20GP", "20HC"];
- let teunum = 0;
- for (let item of res.data.data) {
- // 按箱型
- if (item.quantityRule != "按箱量") {
- // TEU
- if (item.quantityRule == "按TEU") {
- for (let data of this.assemblyForm.preContainersList) {
- // 40*2 20*1
- if (boxarr40.indexOf(data.cntrTypeCode) != -1) {
- teunum += Number(data.quantity) * 2;
- } else if (boxarr20.indexOf(data.cntrTypeCode) != -1) {
- teunum += Number(data.quantity);
- }
- }
- this.unitNoData.push({ ...item, boxquantity: teunum });
- } else {
- this.unitNoData.push(item); // 不是TEU和不是箱的走这个
- }
- }
- }
- let arr = this.assemblyForm.preContainersList.map(item => {
- return {
- quantityRule: "按箱量", // 1 是按箱量
- code: item.cntrTypeCode,
- boxquantity: item.quantity
- };
- });
- this.unitNoData = [...arr, ...this.unitNoData];
- console.log(this.unitNoData);
- // 选择费用时带出第一条
- if (type) {
- console.log();
- let feeunitNodata = [];
- for (let item of this.unitNoData) {
- if (item.quantityRule == feeRow.unitNo) {
- feeunitNodata.push(item);
- }
- }
- this.corpChange(feeunitNodata[0].code, "unitNo", row);
- }
- },
- // 获取币别数据
- async bcurrencyGetExratefun(dc) {
- await this.checkRate(null, this.assemblyForm.actualEta ? this.assemblyForm.actualEta + " 00:00:00" : null, dc, 1, this.assemblyForm.branchId);
- this.curCodeData = this.getCheckRate();
- // bcurrencyGetExrate({
- // date: this.assemblyForm.etd ? this.assemblyForm.etd.slice(0, 10) + ' 00:00:00' : dateFormat(
- // new Date(), "yyyy-MM-dd") + ' 00:00:00', // 开船日期
- // dc: dc,
- // type: 1
- // }).then(res => {
- // this.curCodeData = res.data.data
- // })
- },
- // 获取签单方式字典数据
- getWorkDictsfun() {
- getWorkDicts("issue_type_F").then(res => {
- this.issuetypefData = res.data.data;
- });
- },
- // 获取预付到付字典数据
- paymodeWorkDictsfun() {
- getWorkDicts("payment_method_los").then(res => {
- this.paymodeData = res.data.data;
- });
- },
- // 预付到付货物显示值
- paymodefun(value) {
- for (let item of this.paymodeData) {
- if (item.value == value) {
- return item.label;
- }
- }
- },
- // 生成账单接口
- finaccbillsGenerateBillfun(list) {
- const obj = {
- feeCenterList: list,
- businessTypeCode: "HYZD",
- billNoFormat: "HYZD",
- accountType: "LOCAL",
- refno: this.assemblyForm.refno,
- bookingNo: this.assemblyForm.bookingNo,
- polNamePrint: this.assemblyForm.polNamePrint,
- podNamePrint: this.assemblyForm.podNamePrint,
- teamId: this.assemblyForm.teamId,
- teamName: this.assemblyForm.teamName
- };
- finaccbillsGenerateBill(obj).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$emit("billsDetailfun");
- });
- },
- // 撤销账单接口
- finaccbillsRevokeBillfun(list) {
- const obj = {
- feeCenterList: list
- };
- finaccbillsRevokeBill(obj).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$emit("billsDetailfun");
- });
- },
- // 一键编辑
- feecenterEditfun(dc) {
- if (dc == "D") {
- for (let item of this.assemblyForm.feeCenterListD) {
- if ((item.accStatus != 1) & (item.auditStatus == 0)) {
- if (!item.id) {
- this.$delete(item, "edit");
- this.$set(item, "edit", true);
- }
- if (item.id && (item.createUser == this.userId || item.createUser == 0 || this.roleName.indexOf("允许修改他人费用") >= 0)) {
- this.$delete(item, "edit");
- this.$set(item, "edit", true);
- }
- }
- }
- } else {
- for (let item of this.assemblyForm.feeCenterListC) {
- if ((item.accStatus != 1) & (item.auditStatus == 0)) {
- if (!item.id) {
- this.$delete(item, "edit");
- this.$set(item, "edit", true);
- }
- if (item.id && (item.createUser == this.userId || item.createUser == 0 || this.roleName.indexOf("允许修改他人费用") >= 0)) {
- this.$delete(item, "edit");
- this.$set(item, "edit", true);
- }
- }
- }
- }
- },
- // 费用信息明细保存按钮
- feecenterSubmitListfun() {
- if (!this.pid) {
- this.$message({
- message: "请先保存数据之后才能添加",
- type: "warning"
- });
- return;
- }
- // 判断必填项
- let sum = "请输入";
- // for (let item of this.assemblyForm.feeCenterListD) {
- // if (!item.corpId) {
- // sum += ` 应收序号${item.$index + 1}结算单位`
- // }
- // if (!item.feeId) {
- // sum += ` 应收序号${item.$index + 1}费用简称`
- // }
- // if (!item.elementsId) {
- // sum += ` 应收序号${item.$index + 1}核算要素`
- // }
- // if (!item.curCode) {
- // sum += ` 应收序号${item.$index + 1}币种`
- // }
- // }
- // for (let item of this.assemblyForm.feeCenterListC) {
- // if (!item.corpId) {
- // sum += ` 应付序号${item.$index + 1}结算单位`
- // }
- // if (!item.feeId) {
- // sum += ` 应付序号${item.$index + 1}费用简称`
- // }
- // if (!item.elementsId) {
- // sum += ` 应付序号${item.$index + 1}核算要素`
- // }
- // if (!item.curCode) {
- // sum += ` 应付序号${item.$index + 1}币种`
- // }
- // }
- for (let item of this.assemblyForm.feeCenterListD) {
- if (!item.corpId || !item.feeId || !item.curCode) {
- sum += `应收第${item.$index + 1}行${!item.corpId ? " 结算单位" : ""}${!item.feeId ? " 费用简称" : ""}${!item.curCode ? " 币种" : ""}`;
- }
- }
- for (let item of this.assemblyForm.feeCenterListC) {
- if (!item.corpId || !item.feeId || !item.curCode) {
- sum += `应付第${item.$index + 1}行${!item.corpId ? " 结算单位" : ""}${!item.feeId ? " 费用简称" : ""}${!item.curCode ? " 币种" : ""}`;
- }
- }
- if (sum != "请输入") {
- this.$confirm(sum, {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- this.assemblyForm.feeCenterListD.map((row, index) => {
- row.dc = "D";
- row.pid = this.pid;
- row.sort = Number(index) + 1;
- row.businessType = this.assemblyForm.businessType; // 业务类型
- row.billType = this.assemblyForm.billType; // 单据类型
- row.billNo = this.assemblyForm.billNo; // 单据编号
- row.billDate = this.assemblyForm.billDate; // 单据日期
- row.billCorpId = this.assemblyForm.corpId; // 主表客户 id
- row.billCorpCnName = this.assemblyForm.corpCnName.split("-")[0]; // 主表客户中文名称
- row.billCorpEnName = this.assemblyForm.corpEnName; // 主表客户英文名称
- row.lineId = this.assemblyForm.lineId; // 航线 id
- row.lineCnName = this.assemblyForm.lineCnName; // 航线中文名称
- row.lineEnName = this.assemblyForm.lineEnName; // 航线英文名称
- row.vesselId = this.assemblyForm.vesselId; // 船名 id
- row.vesselCnName = this.assemblyForm.vesselCnName; // 中文船名
- row.vesselEnName = this.assemblyForm.vesselEnName; // 英文船名
- row.voyageNo = this.assemblyForm.voyageNo; // 航次
- row.mblno = this.assemblyForm.mblno; // MB/L NO
- row.hblno = this.assemblyForm.hblno; // HB/L NO
- row.etd = this.assemblyForm.etd; // 开船日期
- row.eta = this.assemblyForm.actualEta; // 到港日期
- row.polId = this.assemblyForm.polId; // 装货港 id
- row.polCode = this.assemblyForm.polCode; // 装货港代码
- row.polCnName = this.assemblyForm.polCnName; // 装货港中文名称
- row.polEnName = this.assemblyForm.polEnName; // 装货港英文名称
- row.podId = this.assemblyForm.podId; // 卸货港 id
- row.podCode = this.assemblyForm.podCode; // 卸货港代码
- row.podCnName = this.assemblyForm.podCnName; // 卸货港中文名称
- row.podEnName = this.assemblyForm.podEnName; // 卸货港英文名称
- row.corpArgreementNo = this.assemblyForm.corpArgreementNo; // 客户约号
- });
- this.assemblyForm.feeCenterListC.map((row, index) => {
- row.dc = "C";
- row.pid = this.pid;
- row.sort = Number(index) + 1;
- row.businessType = this.assemblyForm.businessType; // 业务类型
- row.billType = this.assemblyForm.billType; // 单据类型
- row.billNo = this.assemblyForm.billNo; // 单据编号
- row.billDate = this.assemblyForm.billDate; // 单据日期
- row.billCorpId = this.assemblyForm.corpId; // 主表客户 id
- row.billCorpCnName = this.assemblyForm.corpCnName; // 主表客户中文名称
- row.billCorpEnName = this.assemblyForm.corpEnName; // 主表客户英文名称
- row.lineId = this.assemblyForm.lineId; // 航线 id
- row.lineCnName = this.assemblyForm.lineCnName; // 航线中文名称
- row.lineEnName = this.assemblyForm.lineEnName; // 航线英文名称
- row.vesselId = this.assemblyForm.vesselId; // 船名 id
- row.vesselCnName = this.assemblyForm.vesselCnName; // 中文船名
- row.vesselEnName = this.assemblyForm.vesselEnName; // 英文船名
- row.voyageNo = this.assemblyForm.voyageNo; // 航次
- row.mblno = this.assemblyForm.mblno; // MB/L NO
- row.hblno = this.assemblyForm.hblno; // HB/L NO
- row.etd = this.assemblyForm.etd; // 开船日期
- row.eta = this.assemblyForm.actualEta; // 到港日期
- row.polId = this.assemblyForm.polId; // 装货港 id
- row.polCode = this.assemblyForm.polCode; // 装货港代码
- row.polCnName = this.assemblyForm.polCnName; // 装货港中文名称
- row.polEnName = this.assemblyForm.polEnName; // 装货港英文名称
- row.podId = this.assemblyForm.podId; // 卸货港 id
- row.podCode = this.assemblyForm.podCode; // 卸货港代码
- row.podCnName = this.assemblyForm.podCnName; // 卸货港中文名称
- row.podEnName = this.assemblyForm.podEnName; // 卸货港英文名称
- row.corpArgreementNo = this.assemblyForm.corpArgreementNo; // 客户约号
- });
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- feecenterSubmitList([...this.assemblyForm.feeCenterListD, ...this.assemblyForm.feeCenterListC])
- .then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$emit("billsDetailfun");
- })
- .finally(() => {
- loading.close();
- });
- },
- allClick(name, type) {
- if (name == "同步结算单位") {
- this.$refs.sysnCorpName.openDialog(this.assemblyForm.id, type);
- }
- if (name == "D申请修改") {
- for (let row of this.selectionDList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus != 4) {
- return this.$message.error("未审核通过的费用,不允许申请");
- }
- if (Number(row.appliedAmount) > 0) {
- 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.selectionDList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus != 4) {
- return this.$message.error("未审核通过的费用,不允许申请");
- }
- if (Number(row.appliedAmount) > 0) {
- 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.selectionDList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (!(row.auditStatus == 5 || row.auditStatus == 6)) {
- return this.$message.error("未申请修改或删除,不允许撤销申请");
- }
- if (Number(row.appliedAmount) > 0) {
- 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, "revoke");
- }
- }
- if (name == "C申请修改") {
- for (let row of this.selectionCList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus != 4) {
- return this.$message.error("未审核通过的费用,不允许申请");
- }
- if (Number(row.appliedAmount) > 0) {
- 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.selectionCList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus != 4) {
- return this.$message.error("未审核通过的费用,不允许申请");
- }
- this.$refs.feeModify.openDialog(row, "del");
- }
- }
- if (name == "C取消申请") {
- for (let row of this.selectionCList) {
- 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 == "付费申请") {
- if (this.selectionCList.length == 0) return this.$message.error("请选择费用");
- if (this.selectionCList.filter(e => e.auditStatus != 4).length) return this.$message.error("请选择审核通过的费用");
- if (this.selectionCList.length != this.selectionCList.filter(e => e.corpId == this.selectionCList[0].corpId).length) {
- return this.$message.error("请选择相同的结算单位");
- }
- if (this.$store.getters.payAppStatus) {
- this.$alert("付费申请页面已存在,请关闭付费申请再进行操作", "温馨提示", {
- confirmButtonText: "确定",
- type: "warning",
- callback: action => {}
- });
- } else {
- this.$router.push({
- path: `/iosBasicData/financialManagement/PaymentApplication/index`,
- query: {
- mblno: this.assemblyForm.mblno,
- corpCnName: this.selectionCList[0].corpCnName,
- corpEnName: this.selectionCList[0].corpEnName,
- corpId: this.selectionCList[0].corpId
- }
- });
- }
- }
- if (name == "发票申请") {
- if (this.selectionDList.length == 0) return this.$message.error("请选择费用");
- if (this.selectionDList.length != this.selectionDList.filter(e => e.corpId == this.selectionDList[0].corpId).length) {
- return this.$message.error("请选择相同的结算单位");
- }
- if (this.selectionDList.filter(e => e.auditStatus != 4).length) return this.$message.error("请选择审核通过的费用");
- if (this.$store.getters.finappStatus) {
- this.$alert("发票申请页面已存在,请关闭发票申请再进行操作", "温馨提示", {
- confirmButtonText: "确定",
- type: "warning",
- callback: action => {}
- });
- } else {
- this.$router.push({
- path: `/iosBasicData/financialManagement/fininvoicesApplyfor/index`,
- query: {
- mblno: this.assemblyForm.mblno,
- corpCnName: this.selectionDList[0].corpCnName,
- corpEnName: this.selectionDList[0].corpEnName,
- corpId: this.selectionDList[0].corpId
- }
- });
- }
- }
- if (name == "D费用申请") {
- // let selecList = [...this.selectionDList, ...this.selectionCList]
- for (let row of this.selectionDList) {
- 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("已申请费用,不允许重复申请");
- }
- }
- if (popupReminder(this.assemblyForm, this.messageData)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- this.$confirm("确定申请费用?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- srcId: this.assemblyForm.id,
- srcType: "HYJK",
- feeCenterList: this.selectionDList,
- url: "/iosBasicData/OceanFreightImport/bills/index",
- pageStatus: "this.$store.getters.approvalDetails",
- pageLabel: "海运进口(F)"
- };
- 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.$emit("billsDetailfun");
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- if (name == "D撤销请核") {
- // let selecList = [...this.selectionDList, ...this.selectionCList]
- if (this.assemblyForm.billType == "MH") {
- if (popupReminder(this.assemblyForm, this.messageData2)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData2), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- } else {
- if (popupReminder(this.assemblyForm, this.messageData)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- }
- for (let row of this.selectionDList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus == 0) {
- return this.$message.error("未申请费用,不允许撤销");
- }
- if (row.auditStatus > 2 && this.expenseApplication == 1) {
- return this.$message.error("费用已经审核通过,请使用申请修改和删除功能!");
- }
- }
- this.$confirm("确定撤销请核?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- srcId: this.assemblyForm.id,
- srcType: "HYJK",
- feeCenterList: this.selectionDList,
- url: "/iosBasicData/OceanFreightImport/bills/index",
- pageStatus: "this.$store.getters.approvalDetails",
- pageLabel: "海运进口(F)"
- };
- 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.$emit("billsDetailfun");
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- if (name == "C费用申请") {
- // let selecList = [...this.selectionDList, ...this.selectionCList]
- for (let row of this.selectionCList) {
- 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("已申请费用,不允许重复申请");
- }
- }
- if (popupReminder(this.assemblyForm, this.messageData)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- this.$confirm("确定申请费用?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- srcId: this.assemblyForm.id,
- srcType: "HYJK",
- feeCenterList: this.selectionCList,
- url: "/iosBasicData/OceanFreightImport/bills/index",
- pageStatus: "this.$store.getters.approvalDetails",
- pageLabel: "海运进口(F)",
- dc: "C"
- };
- 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.$emit("billsDetailfun");
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- if (name == "C撤销请核") {
- // let selecList = [...this.selectionDList, ...this.selectionCList]
- if (this.assemblyForm.billType == "MH") {
- if (popupReminder(this.assemblyForm, this.messageData2)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData2), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- } else {
- if (popupReminder(this.assemblyForm, this.messageData)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- }
- for (let row of this.selectionCList) {
- if (!row.id) {
- return this.$message.error("请保存费用明细");
- }
- if (row.auditStatus == 0) {
- return this.$message.error("未申请费用,不允许撤销");
- }
- if (row.auditStatus > 2 && this.expenseApplication == 1) {
- return this.$message.error("费用已经审核通过,请使用申请修改和删除功能!");
- }
- }
- this.$confirm("确定撤销请核?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- srcId: this.assemblyForm.id,
- srcType: "HYJK",
- feeCenterList: this.selectionCList,
- url: "/iosBasicData/OceanFreightImport/bills/index",
- pageStatus: "this.$store.getters.approvalDetails",
- pageLabel: "海运进口(F)",
- dc: "C"
- };
- 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.$emit("billsDetailfun");
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- if (name == "提取成本") {
- if (!this.assemblyForm.polId) {
- return this.$message.error("请选择装货港");
- }
- if (!this.assemblyForm.podId) {
- return this.$message.error("请选择卸货港");
- }
- if (!this.assemblyForm.carrierId) {
- return this.$message.error("请选择船公司");
- }
- let obj = {
- podId: this.assemblyForm.polId,
- destinationId: this.assemblyForm.podId,
- shippingCompanyId: this.assemblyForm.carrierId
- };
- this.$refs.extractionCost.inTemplate(obj, this.assemblyForm.id);
- }
- },
- getData() {
- this.$emit("billsDetailfun");
- },
- testMail(e) {
- console.info("eeeeeeeeeeeeeeeeeeee----", e);
- this.$refs.mailComponentRef.dialogVisible = true;
- this.$refs.mailComponentRef.formData.attachments = e.fileName;
- this.$refs.mailComponentRef.formData.fileType = e.formatName;
- this.$refs.mailComponentRef.formData.fileContent = e.data;
- },
- // 预览报表
- 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.showPrintButton = false // 打印按钮是否显示 下面直接自定义控制打印弹窗是否开启
- options.toolbar.showSendEmailButton = true; // 显示发送邮件按钮
- options.email.showEmailDialog = false;
- options.email.showExportDialog = 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()
- // }
- },
- // 表头样式
- tableHeaderCellStyle({ row, column, rowIndex, columnIndex }) {
- return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff";
- },
- // 更改表格颜色
- 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;
- },
- // 关闭弹窗
- handleClose(done) {
- this.feesselectionList = []; // 清空多选
- this.templateRightData = []; // 清空数据
- done();
- // this.$confirm('确认关闭?')
- // .then(_ => {
- // this.feesselectionList = [] // 清空多选
- // this.templateRightData = [] // 清空数据
- // done();
- // })
- // .catch(_ => {});
- },
- //自定义列保存
- async saveColumnTwo(ref, option, optionBack, code) {
- /**
- * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
- * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
- * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
- */
- const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- //自定义列重置
- async resetColumnTwo(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;
- }
- }
- },
- watch: {
- // 监听业务类型 如果不是分单 可以编辑分单号
- "assemblyForm.feeCenterListD": {
- // 执行方法
- handler(oldValue, newValue) {
- this.getSum();
- },
- deep: true, // 深度监听
- immediate: true // 第一次改变就执行
- },
- // 监听箱信息数据 箱信息中有温度 自动切换 冻货
- "assemblyForm.feeCenterListC": {
- // 执行方法
- handler(oldValue, newValue) {
- this.getSum();
- },
- deep: true, // 深度监听
- immediate: true // 第一次改变就执行,
- },
- "assemblyForm.mblno": {
- // 执行方法
- handler(oldValue, newValue) {
- console.log(oldValue, newValue);
- if (oldValue) {
- amendsList(1, 10, {
- status: 3,
- mblno: this.assemblyForm.mblno,
- businessType: "SEA"
- }).then(res => {
- if (res.data.data.records.length > 0) {
- this.amendsStatus = true;
- }
- });
- }
- },
- deep: true, // 深度监听
- immediate: true // 第一次改变就执行,
- }
- }
- };
- </script>
- <style scoped lang="scss">
- ::v-deep .box-card .el-card__body {
- padding: 4px !important;
- }
- .disabledBox {
- display: flex;
- align-items: center;
- }
- .fontSize {
- font-size: 16px;
- color: #81b337;
- }
- .meetSize {
- font-size: 16px;
- color: #54bcbd;
- }
- .bottomFlex {
- display: flex;
- align-items: center;
- }
- .weightfont {
- font-size: 20px;
- font-weight: bold;
- }
- .weightnum {
- font-size: 15px;
- font-weight: 500;
- }
- .fontText {
- font-size: 16px;
- font-weight: 500;
- margin: 3px 0;
- }
- ::v-deep.el-form-item {
- margin-bottom: 0px;
- }
- // 去掉弹框内容的默认padding值
- /deep/.el-dialog .el-dialog__body {
- padding: 0px 20px;
- }
- ::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;
- }
- .textoverflow {
- width: 100%;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- </style>
|