| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248 |
- <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">客户名称</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">提单号</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">箱型箱量</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-row>
- <el-row :gutter="10" v-if="business == 1">
- <el-col :span="6">
- <el-form-item label="报价方式" prop="quotationMethod">
- <dic-select v-model="assemblyForm.quotationMethod" placeholder="报价方式" key="dictKey"
- label="dictValue" :filterable="true"
- url="/blade-system/dict-biz/dictionary?code=quotationMethod"
- :disabled="detailData.seeDisabled"></dic-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="自定义号" prop="userDefine4">
- <el-input style="width: 100%;" v-model="assemblyForm.hmmEdi.userDefine4" size="small"
- autocomplete="off" :disabled="detailData.seeDisabled" placeholder="请输入自定义号"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="结算方式" prop="accountPeriodType">
- <el-input style="width: 100%;" v-model="assemblyForm.accountPeriodType" size="small"
- autocomplete="off" disabled placeholder=""></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <!--显示 admin,应收修改,应收查看,应收查看只有打印账单一个功能 -->
- <el-card
- v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1 ? true : roleName.indexOf('应收查看') != -1"
- 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>应收费用</span>
- </div>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="danger"
- plain size="small" :disabled="!selectionDList.length || disabled || pleasereviewType"
- @click="batchDelete('D')">一键删除
- </el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="success"
- plain size="small" :disabled="!selectionDList.length || disabled || pleasereviewType"
- @click="GenerateBillsfun('D')">生成账单
- </el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" 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')">打印账单</el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="success"
- plain size="small" :disabled="!this.assemblyForm.id || disabled || pleasereviewType"
- @click="templateClick('D')">应收模板</el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="info"
- plain size="small" :disabled="disabled || pleasereviewType"
- @click="feecenterSubmitListfun">一键保存</el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="info"
- plain size="small" :disabled="disabled || pleasereviewType" @click="feecenterEditfun('D')">一键编辑
- </el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="primary"
- plain size="small" :disabled="disabled || pleasereviewType"
- @click="copyfun('D')">生成应付</el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="primary"
- plain size="small" :disabled="disabled || pleasereviewType"
- @click="allClick('发票申请', 'D')">发票申请</el-button>
- </template>
- <template slot="indexHeader" slot-scope="scope">
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="primary"
- size="small" icon="el-icon-plus" circle :disabled="disabled || pleasereviewType"
- @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="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')" :disabled="row.whetherForceCurNo == 1">
- </search-query>
- <span v-else>{{ row.curCode }}</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="2"
- placeholder="请输入" @blur="priceinputfun($event, 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="请输入" @blur="quantityinputfun(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="请输入"></el-input-number>
- <span v-else>{{ row.taxRate }}</span>
- </template>
- <template slot="surchargeRate" slot-scope="{ row }">
- <el-input-number v-if="row.edit" v-model="row.surchargeRate" size="small" :controls="false"
- :precision="3" placeholder="请输入"></el-input-number>
- <span v-else>{{ row.surchargeRate }}</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="scope" 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>
- </template>
- </avue-crud>
- </el-card>
- <!--显示 admin,应付修改,应付查看,应付查看只有打印账单一个功能 -->
- <el-card
- v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1 ? true : roleName.indexOf('应付查看') != -1"
- class="box-card" style="margin: 4px 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>应付费用</span>
- </div>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="danger"
- plain size="small" :disabled="!selectionCList.length || disabled || pleasereviewType"
- @click="batchDelete('C')">一键删除
- </el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="primary"
- plain size="small" :disabled="!selectionCList.length || disabled || pleasereviewType"
- @click="GenerateBillsfun('C')">生成账单
- </el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" 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')">打印账单</el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="success"
- plain size="small" :disabled="!this.assemblyForm.id || disabled || pleasereviewType"
- @click="templateClick('C')">应付模板
- </el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="info"
- plain size="small" :disabled="disabled || pleasereviewType" @click="feecenterSubmitListfun">一键保存
- </el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="info"
- plain size="small" :disabled="disabled || pleasereviewType" @click="feecenterEditfun('C')">一键编辑
- </el-button>
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="primary"
- plain size="small" :disabled="disabled || pleasereviewType" @click="copyfun('C')">生成应收
- </el-button>
- <el-button type="info" plain size="small" :disabled="disabled"
- @click="allClick('付费申请', 'C')">付费申请</el-button>
- </template>
- <template slot="indexHeader" slot-scope="scope">
- <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="primary"
- size="small" icon="el-icon-plus" circle :disabled="disabled || pleasereviewType"
- @click="addCfun">
- </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="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="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')" :disabled="row.whetherForceCurNo == 1">
- </search-query>
- <span v-else>{{ row.curCode }}</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="2"
- placeholder="请输入" @blur="priceinputfun($event, 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="请输入" @blur="quantityinputfun(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="请输入"></el-input-number>
- <span v-else>{{ row.taxRate }}</span>
- </template>
- <template slot="surchargeRate" slot-scope="{ row }">
- <el-input-number v-if="row.edit" v-model="row.surchargeRate" size="small" :controls="false"
- :precision="3" placeholder="请输入"></el-input-number>
- <span v-else>{{ row.surchargeRate }}</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="scope" 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>
- </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="(roleName.indexOf('admin') != -1 || roleName.indexOf('利润查看') != -1 || ((roleName.indexOf('应收修改') != -1 || roleName.indexOf('应收查看') != -1) && (roleName.indexOf('应付修改') != -1 || roleName.indexOf('应付查看') != -1))) && 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 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 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 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="roleName.indexOf('admin') != -1 || ((roleName.indexOf('应收修改') != -1 || roleName.indexOf('应收查看') != -1) && (roleName.indexOf('应付修改') != -1 || roleName.indexOf('应付查看') != -1))"
- style="display: flex;align-items: center;justify-content: space-around">
- <div style="width: 30%">
- <div class="bottomFlex" style="justify-content: space-around">
- <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 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 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>
- </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
- } from "@/api/iosBasicData/feecenter";
- import { getWorkDicts } from "@/api/system/dictbiz";
- import {
- feecenterTemplateImport,
- listFeeCountByCorp,
- losbfeestemplateGetListTemplate,
- accountsReceivable
- } 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 { isProcurement } from "@/api/basicData/configuration";
- import { getList as reportsList } from "@/api/iosBasicData/reports";
- import { dateFormat } from "@/util/date";
- import { getToken } from "@/util/auth";
- import { similarValues } from "@/util/verifyData";
- import dicSelect from "@/components/dicSelect/main";
- import _ from "lodash";
- export default {
- components: { reportContainer, SearchQuery, reportformsList,dicSelect },
- props: {
- pid: {
- },
- assemblyForm: {
- type: Object
- },
- detailData: {},
- // 请核之后禁用
- pleasereviewType: {
- type: Boolean,
- default: false,
- },
- // 拷贝的详情数据
- copyFormData: {
- type: Object,
- default: {}
- },
- disabled: {
- type: Boolean,
- default: false,
- },
- },
- data() {
- return {
- 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: "160",
- overHidden: true,
- },
- {
- label: "费用简称",
- prop: "feeCnName",
- width: "120",
- overHidden: true,
- },
- {
- label: "预付/到付",
- prop: "paymode",
- width: "120",
- overHidden: true,
- },
- {
- label: "收/付",
- prop: "dc",
- width: "120",
- dicData: [
- {
- label: '收',
- value: 'D'
- },
- {
- label: '付',
- value: 'C'
- }
- ],
- overHidden: true,
- },
- {
- label: "计量单位",
- prop: "unitNo",
- width: "120",
- overHidden: true,
- },
- {
- label: "币种",
- prop: "curCode",
- width: "120",
- overHidden: true,
- },
- {
- label: "汇率",
- prop: "exrate",
- width: "100",
- overHidden: true,
- },
- {
- label: "单价",
- prop: "price",
- width: "120",
- overHidden: true,
- },
- {
- label: "数量",
- prop: "quantity",
- width: "120",
- overHidden: true,
- },
- {
- label: "CNY(含税)",
- prop: "rmbAmount",
- width: "100",
- overHidden: true,
- },
- {
- label: "USD(含税)",
- prop: "usdAmount",
- width: "100",
- overHidden: true,
- },
- {
- label: "CNY(净额)",
- prop: "rmbAmountNet",
- width: "100",
- overHidden: true,
- },
- {
- label: "USD(净额)",
- prop: "usdAmountNet",
- width: "100",
- overHidden: true,
- },
- {
- label: "核算要素",
- prop: "elementsCnName",
- width: "120",
- overHidden: true,
- },
- {
- label: "付费申请金额",
- prop: "appliedAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "发票号",
- prop: "invoiceNo",
- width: "120",
- overHidden: true,
- },
- {
- label: "发票申请金额",
- prop: "appliedInvoiceAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "已开票金额",
- prop: "uninvoicedAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "已结算金额",
- prop: "stlTtlAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "备注",
- prop: "remarks",
- width: "100",
- overHidden: true,
- },
- // {
- // label: "税率",
- // prop: "taxRate",
- // width: "100",
- // },
- // {
- // label: "附加税率",
- // prop: "surchargeRate",
- // width: "100",
- // },
- {
- label: "单价是否含税",
- prop: "isTax",
- width: "120",
- 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: 'RMB应收',
- prop: 'rmbD',
- overHidden: true,
- }, {
- label: 'RMB应付',
- prop: 'rmbC',
- overHidden: true,
- }, {
- label: 'USD应收',
- prop: 'usdD',
- overHidden: true,
- }, {
- label: 'USD应付',
- prop: 'usdC',
- overHidden: true,
- }, {
- label: '合计应收',
- prop: 'sumD',
- overHidden: true,
- }, {
- label: '合计应付',
- prop: 'sumC',
- overHidden: 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',
- // menu:false,
- 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: '100',
- menu: false,
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- headerslot: true,
- },
- {
- label: "账单",
- prop: "accStatus",
- width: "60",
- overHidden: true,
- },
- {
- label: "结算单位",
- prop: "corpCnName",
- width: "160",
- overHidden: true,
- },
- {
- label: "费用简称",
- prop: "feeCnName",
- width: "120",
- overHidden: true,
- },
- {
- label: "预付/到付",
- prop: "paymode",
- width: "120",
- overHidden: true,
- },
- {
- label: "计量单位",
- prop: "unitNo",
- width: "120",
- overHidden: true,
- },
- {
- label: "币种",
- prop: "curCode",
- width: "120",
- overHidden: true,
- },
- {
- label: "汇率",
- prop: "exrate",
- width: "100",
- overHidden: true,
- },
- {
- label: "单价",
- prop: "price",
- width: "120",
- overHidden: true,
- },
- {
- label: "数量",
- prop: "quantity",
- width: "120",
- overHidden: true,
- },
- {
- label: "增值税率",
- prop: "taxRate",
- width: "120",
- hide: true,
- showColumn: false,
- overHidden: true,
- },
- {
- label: "附加费率",
- prop: "surchargeRate",
- width: "120",
- hide: true,
- showColumn: false,
- overHidden: true,
- },
- {
- label: "CNY(含税)",
- prop: "rmbAmount",
- width: "100",
- overHidden: true,
- },
- {
- label: "USD(含税)",
- prop: "usdAmount",
- width: "100",
- overHidden: true,
- },
- {
- label: "CNY(净额)",
- prop: "rmbAmountNet",
- width: "100",
- overHidden: true,
- },
- {
- label: "USD(净额)",
- prop: "usdAmountNet",
- width: "100",
- overHidden: true,
- },
- {
- label: "核算要素",
- prop: "elementsCnName",
- width: "120",
- overHidden: true,
- },
- {
- label: "付费申请金额",
- prop: "appliedAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "发票号",
- prop: "invoiceNo",
- width: "120",
- overHidden: true,
- },
- {
- label: "发票申请金额",
- prop: "appliedInvoiceAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "已开票金额",
- prop: "uninvoicedAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "已结算金额",
- prop: "stlTtlAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "备注",
- prop: "remarks",
- width: "100",
- overHidden: true,
- },
- // {
- // label: "税率",
- // prop: "taxRate",
- // width: "100",
- // },
- // {
- // label: "附加税率",
- // prop: "surchargeRate",
- // width: "100",
- // },
- {
- label: "单价是否含税",
- prop: "isTax",
- width: "120",
- 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: '100',
- menu: false,
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- headerslot: true,
- },
- {
- label: "账单",
- prop: "accStatus",
- width: "60",
- overHidden: true,
- },
- {
- label: "结算单位",
- prop: "corpCnName",
- width: "160",
- overHidden: true,
- },
- {
- label: "费用简称",
- prop: "feeCnName",
- width: "120",
- overHidden: true,
- },
- {
- label: "预付/到付",
- prop: "paymode",
- width: "120",
- overHidden: true,
- },
- {
- label: "计量单位",
- prop: "unitNo",
- width: "120",
- overHidden: true,
- },
- {
- label: "币种",
- prop: "curCode",
- width: "120",
- overHidden: true,
- },
- {
- label: "汇率",
- prop: "exrate",
- width: "100",
- overHidden: true,
- },
- {
- label: "单价",
- prop: "price",
- width: "120",
- overHidden: true,
- },
- {
- label: "数量",
- prop: "quantity",
- width: "120",
- overHidden: true,
- },
- {
- label: "增值税率",
- prop: "taxRate",
- width: "120",
- hide: true,
- showColumn: false,
- overHidden: true,
- },
- {
- label: "附加费率",
- prop: "surchargeRate",
- width: "120",
- hide: true,
- showColumn: false,
- overHidden: true,
- },
- {
- label: "CNY(含税)",
- prop: "rmbAmount",
- width: "100",
- overHidden: true,
- },
- {
- label: "USD(含税)",
- prop: "usdAmount",
- width: "100",
- overHidden: true,
- },
- {
- label: "CNY(净额)",
- prop: "rmbAmountNet",
- width: "100",
- overHidden: true,
- },
- {
- label: "USD(净额)",
- prop: "usdAmountNet",
- width: "100",
- overHidden: true,
- },
- {
- label: "核算要素",
- prop: "elementsCnName",
- width: "120",
- overHidden: true,
- },
- {
- label: "付费申请金额",
- prop: "appliedAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "发票号",
- prop: "invoiceNo",
- width: "120",
- overHidden: true,
- },
- {
- label: "发票申请金额",
- prop: "appliedInvoiceAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "已开票金额",
- prop: "uninvoicedAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "已结算金额",
- prop: "stlTtlAmount",
- width: "120",
- overHidden: true,
- },
- {
- label: "备注",
- prop: "remarks",
- width: "100",
- overHidden: true,
- },
- // {
- // label: "税率",
- // prop: "taxRate",
- // width: "100",
- // },
- // {
- // label: "附加税率",
- // prop: "surchargeRate",
- // width: "100",
- // },
- {
- label: "单价是否含税",
- prop: "isTax",
- width: "120",
- 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: {
- menu: false,
- stripe: true,
- addBtn: false,
- editBtn: false,
- delBtn: false,
- viewBtn: false,
- index: true,
- selection: true,
- column: [
- {
- label: '客户',
- prop: 'corpCnName',
- overHidden: true,
- },
- {
- label: '客户类型',
- prop: 'corpType',
- overHidden: true,
- },
- {
- label: '费用',
- prop: 'feeCnName',
- overHidden: true,
- },
- {
- label: '数量',
- prop: 'quantity',
- overHidden: true,
- },
- {
- label: '单价',
- prop: 'price',
- overHidden: true,
- },
- {
- label: '计量单位',
- prop: 'unitNo',
- overHidden: true,
- },
- {
- label: '币别',
- prop: 'curCode',
- overHidden: true,
- }
- ]
- },
- // 左侧数据
- templateData: [],
- lefttemplate: {}, // 左侧选择的数据
- // 选中的数据
- feesselectionList: [],
- selectionDList: [], // 收选择的
- selectionCList: [], // 付选择的
- // 需要加判断是否必填的数据
- messageData: [
- {
- name: '客户',
- value: 'corpCnName',
- },
- {
- name: '业务来源',
- value: 'srcType',
- },
- {
- name: 'MBLNO',
- value: 'mblno',
- },
- // {
- // name:'REF MBLNO',
- // value:'refno',
- // },
- {
- name: '船名(VSL)',
- value: 'vesselCnName',
- },
- {
- name: '航次(VOY)',
- value: 'voyageNo',
- },
- {
- name: 'ETA',
- value: 'eta',
- },
- {
- name: '装货港',
- value: 'polCnName',
- },
- {
- name: '国外收货港',
- value: 'placeReceiptName',
- },
- {
- name: '目的港',
- value: 'destinationNamePrint',
- },
- {
- name: '包装单位',
- value: 'packingUnit',
- },
- {
- name: '船公司',
- value: 'carrierCnName',
- },
- // {
- // name:'场站',
- // value:'cyCnName',
- // },
- {
- name: '所属团队',
- value: 'teamId',
- },
- ],
- roleName: [], // 当前登录人的角色权限
- business: null,
- }
- },
- async created() {
- // isProcurement({ "param": "business" }).then(res => {
- // this.business = res.data.data
- // })
- 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(',') // 获取角色数据
- this.optionD = await this.getColumnData(this.getColumnName(309.2), this.optionDBack);
- this.optionC = await this.getColumnData(this.getColumnName(309.3), this.optionCBack);
- isProcurement({ "param": "business" }).then(res => {
- this.business = res.data.data
- if (res.data.data == 1) {
- this.optionD.column.forEach(item => {
- if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
- item.hide = false
- item.showColumn = true
- }
- })
- this.optionC.column.forEach(item => {
- if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
- item.hide = false
- item.showColumn = true
- }
- })
- }
- })
- // 导入弹窗的表格
- this.templateOption = await this.getColumnData(this.getColumnName(309.5), this.templateOptionBack);
- this.getBcorpsListfun() // 获取客户数据
- this.paymodeWorkDictsfun() // 获取预付/到付数据
- },
- methods: {
- 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 == 'CNY' && item.dc == 'D') {
- rmbD += Number(item.rmbAmount)
- sumD += Number(item.rmbAmount)
- }
- if (item.curCode == 'CNY' && item.dc == 'C') {
- rmbC += Number(item.rmbAmount)
- sumC += Number(item.rmbAmount)
- }
- if (item.curCode == 'USD' && item.dc == 'D') {
- usdD += Number(item.usdAmount)
- sumD += Number(item.usdAmount) * Number(item.exrate)
- }
- if (item.curCode == 'USD' && item.dc == 'C') {
- usdC += Number(item.usdAmount)
- sumC += Number(item.usdAmount) * Number(item.exrate)
- }
- }
- })
- 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)
- })
- })
- },
- 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) {
- // 多选打印
- let idArr = this.selectionDList.map(item => {
- return item.id
- })
- // 获取报表数据
- reportsGetReportData({
- billId: this.assemblyForm.id,
- reportCode: val.classifyCode,
- groupCode: val.groupCode,
- itemIds: idArr.join(','),
- type: 'HYJK'
- }).then(res => {
- this.handleReportPreview(val.url, res.data.data.data)
- })
- },
- // 打印费用
- printingCostsfun(dc) {
- this.printingDC = dc
- let groupCode = ''
- let selectionArr = []
- if (dc == 'D') {
- groupCode = '应收,应收-账单'
- selectionArr = this.selectionDList
- } else {
- groupCode = '应付,应付-账单'
- selectionArr = this.selectionCList
- }
- 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
- }
- if (this.feesselectionList.length > 0) {
- 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"
- })
- }
- if (popupReminder(this.assemblyForm, this.messageData)) {
- return;
- }
- this.templateVisible = true
- losbfeestemplateGetListTemplate(1, 50, {
- dc: dc,
- status: 0,
- type: 'HYJK'
- }).then(res => {
- this.templateData = res.data.data.records
- // 查第一条的明细
- losbfeestemplateDetail(this.templateData[0].id).then(res => {
- this.templateRightData = res.data.data.feesTemplateItemsList
- })
- })
- },
- // 左侧选择
- nodeClick(e) {
- this.lefttemplate = e
- losbfeestemplateDetail(e.id).then(res => {
- this.templateRightData = res.data.data.feesTemplateItemsList
- })
- },
- // 右侧选择回调
- feeselectionChange(list) {
- this.feesselectionList = list;
- },
- allClick(name, type) {
- if (name == '付费申请') {
- if (this.selectionCList.length == 0) return this.$message.error("请选择费用");
- if (this.selectionCList.length != this.selectionCList.filter(e => e.corpCnName == this.selectionCList[0].corpCnName).length) return this.$message.error("请选择相同的结算单位");
- if (this.$store.getters.payAppStatus) {
- this.$alert("付费申请页面已存在,请关闭付费申请再进行操作", "温馨提示", {
- confirmButtonText: "确定",
- type: 'warning',
- callback: action => {
- }
- });
- } else {
- this.$router.push({
- path: `/iosBasicData/PaymentApplication/index`,
- query: {
- mblno: this.assemblyForm.mblno,
- corpCnName: this.selectionCList[0].corpCnName,
- 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.corpCnName == this.selectionDList[0].corpCnName).length) return this.$message.error("请选择相同的结算单位");
- this.$router.push({
- path: `/iosBasicData/fininvoicesApplyfor/index`,
- query: {
- mblno: this.assemblyForm.mblno,
- corpCnName: this.selectionDList[0].corpCnName,
- corpId: this.selectionDList[0].corpId
- }
- })
- }
- },
- // 应收新增
- addDfun() {
- // 判断数据需要的数据是否有 有就弹窗
- if (popupReminder(this.assemblyForm, this.messageData)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- }
- if (popupReminder(this.assemblyForm, this.messageData)) {
- return;
- }
- // 如果是分单 判断是否有分单号
- if (this.assemblyForm.billType == 'MH') {
- if (!this.assemblyForm.hblno) {
- this.$message({
- message: '请先选择HBLNO',
- type: 'warning'
- });
- return;
- }
- }
- // 判断拷贝详情的数据是否要参数
- if (popupReminder(this.copyFormData, this.messageData)) {
- return this.$message.warning('请先点击右上角保存按钮保存数据')
- }
- let obj = {
- edit: true
- }
- if (this.assemblyForm.feeCenterListD.length != 0) {
- // 结算单位
- 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.dc = 'D'
- if (this.business == 1) {
- accountsReceivable({ corpId: this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpId }).then(res => {
- this.$set(obj, 'amountLimit', res.data.data.amountLimit)
- this.$set(obj, 'noAmount', res.data.data.amount)
- })
- }
- // // 费用简称
- // 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.corpId = this.assemblyForm.corpId
- obj.corpCnName = this.assemblyForm.corpCnName.split(' - ')[0]
- obj.corpEnName = this.assemblyForm.corpEnName
- obj.dc = 'D'
- // 预付/到付
- obj.paymode = this.assemblyForm.mpaymode
- getBcorpsDetail(this.assemblyForm.corpId).then(res => {
- obj.shortName = res.data.data.shortName
- this.assemblyForm.feeCenterListD.push(obj)
- })
- }
- // this.assemblyForm.feeCenterListD.push(obj)
- this.$nextTick(() => {
- const container = this.$refs.crudD.$el.querySelector('.el-table__body-wrapper');
- if (container) {
- container.scrollTop = container.scrollHeight;
- }
- });
- },
- // 应付新增
- addCfun() {
- // 判断数据需要的数据是否有
- // 判断数据需要的数据是否有 有就弹窗
- if (popupReminder(this.assemblyForm, this.messageData)) {
- this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- }
- if (popupReminder(this.assemblyForm, this.messageData)) {
- return;
- }
- // 如果是分单 判断是否有分单号
- if (this.assemblyForm.billType == 'MH') {
- if (!this.assemblyForm.hblno) {
- this.$message({
- message: '请先选择HBLNO',
- type: 'warning'
- });
- return;
- }
- }
- // 判断拷贝详情的数据是否要参数
- if (popupReminder(this.copyFormData, this.messageData)) {
- return this.$message.warning('请先点击右上角保存按钮保存数据')
- }
- let obj = {
- edit: true
- }
- if (this.assemblyForm.feeCenterListC.length != 0) {
- // 结算单位
- 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.dc = 'C'
- // // 费用简称
- // 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.corpId = this.assemblyForm.corpId
- // obj.corpCnName = this.assemblyForm.corpCnName.split(' - ')[0]
- // obj.corpEnName = this.assemblyForm.corpEnName
- // 预付/到付
- obj.dc = 'D'
- 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.eta // 到港日期
- 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"
- })
- }
- if (popupReminder(this.assemblyForm, this.messageData)) {
- 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) {
- this.$message.warning('请选择没有生成账单的数据')
- return
- }
- }
- } else {
- for (let item of this.feeCenterListC) {
- if (item.accStatus == 1) {
- 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)
- if (dc == 'D' && this.business == 1) {
- accountsReceivable({ corpId: item.id }).then(res => {
- this.$set(row, 'amountLimit', res.data.data.amountLimit)
- this.$set(row, 'noAmount', res.data.data.amount)
- })
- }
- }
- }
- } else if (name == 'feeCnName') {
- if (!value) {
- this.$set(row, 'feeCnName', '')
- this.$set(row, 'feeEnName', '')
- this.$set(row, 'feeId', '')
- this.$set(row, 'feeCode', '')
- if (this.business == 1) {
- this.$set(row, 'whetherForceCurNo', '')
- }
- // 选择费用简称带出核算要素
- 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', '')
- if (this.business == 1) {
- this.$set(row, 'whetherForceCurNo', '')
- }
- // 核算要素
- 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', '')
- if (this.business == 1) {
- this.$set(row, 'whetherForceCurNo', '')
- }
- // 核算要素
- 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)
- if (this.business == 1) {
- this.$set(row, 'whetherForceCurNo', item.whetherForceCurNo)
- }
- // 选择费用简称带出核算要素
- 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)
- }
- // 汇率
- 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
- }).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) * Number(row.quantity ? row.quantity : 0))
- if (row.curCode == 'CNY') {
- 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') {
- // 计量单位
- this.$set(row, name, value)
- for (let item of this.unitNoData) {
- if (item.code == value) {
- // 按箱型
- if (item.quantityRule == 1) {
- // 选择的箱那边的数据
- if (item.boxquantity) {
- this.$set(row, 'quantity', item.boxquantity)
- }
- }
- // 按票
- if (item.quantityRule == 2) {
- this.$set(row, 'quantity', 1)
- }
- // 按重量
- if (item.quantityRule == 3) {
- this.$set(row, 'quantity', this.assemblyForm.grossWeight)
- }
- // 按TEU
- if (item.quantityRule == 4) {
- this.$set(row, 'quantity', item.boxquantity)
- }
- // 按尺码
- if (item.quantityRule == 5) {
- this.$set(row, 'quantity', this.assemblyForm.measurement)
- }
- // 按件数
- if (item.quantityRule == 6) {
- 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 == 'CNY') {
- 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 == 'USD') {
- if (Number(item.exrate) <= 1) {
- this.$message.warning('当前选择的币别汇率不能小于零')
- return
- }
- } else {
- if (Number(item.exrate) == 0) {
- this.$message.warning('当前选择的币别汇率不能为零')
- return
- }
- }
- this.$set(row, 'curCode', item.code)
- this.$set(row, 'exrate', item.exrate)
- this.$set(row, 'amount', Number(row.price) * Number(row.quantity ? row.quantity : 0))
- if (row.curCode == 'CNY') {
- 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 {
- this.$set(row, name, value)
- }
- },
- // 单价
- priceinputfun(value, row) {
- if (Number(value) <= 0) {
- this.$message({
- type: "warning",
- message: "单价不能输入负数!"
- });
- return
- }
- this.$set(row, 'amount', Number(row.price) * Number(row.quantity ? row.quantity : 0))
- // 判断是否有币种
- if (!row.curCode) {
- return;
- }
- if (row.amountLimit && row.noAmount && row.amount) {
- if ((Number(row.amount) + Number(row.noAmount)) > Number(row.amountLimit)) {
- this.$message.error(`应收账款:${(Number(row.amount) + Number(row.noAmount))}超出限额:${Number(row.amountLimit)}`);
- delete row.amountLimit
- delete row.noAmount
- }
- }
- if (this.business == 1 && row.feeCode == 'YWF' && row.dc == 'C') {
- let ywfSumD = 0
- let ywfSumC = 0
- for (let item of this.assemblyForm.feeCenterListD) {
- if (item.feeCode == 'YWF') {
- ywfSumD += Number(item.amount)
- }
- }
- for (let item of this.assemblyForm.feeCenterListC) {
- if (item.feeCode == 'YWF') {
- ywfSumC += Number(item.amount)
- }
- }
- if (Number(ywfSumC) > (Number(ywfSumD) * 0.8)) {
- this.$set(row, 'price', 0)
- return this.$message.error('应付的业务费不能超过应收业务费的80%');
- }
- }
- if (row.curCode == 'CNY') {
- 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) {
- if (row.quantity <= 0) {
- this.$message({
- type: "warning",
- message: "数量不能输入负数!"
- });
- this.$set(row, 'quantity', 1)
- return
- }
- this.$set(row, 'amount', Number(row.price ? row.price : 0) * Number(row.quantity))
- // 判断是否有币种
- if (!row.curCode) {
- return;
- }
- if (row.amountLimit && row.noAmount && row.amount) {
- if ((Number(row.amount) + Number(row.noAmount)) > Number(row.amountLimit)) {
- this.$message.error(`应收账款:${(Number(row.amount) + Number(row.noAmount))}超出限额:${Number(row.amountLimit)}`);
- delete row.amountLimit
- delete row.noAmount
- }
- }
- if (this.business == 1 && row.feeCode == 'YWF' && row.dc == 'C') {
- let ywfSumD = 0
- let ywfSumC = 0
- for (let item of this.assemblyForm.feeCenterListD) {
- if (item.feeCode == 'YWF') {
- ywfSumD += Number(item.amount)
- }
- }
- for (let item of this.assemblyForm.feeCenterListC) {
- if (item.feeCode == 'YWF') {
- ywfSumC += Number(item.amount)
- }
- }
- if (Number(ywfSumC) > (Number(ywfSumD) * 0.8)) {
- this.$set(row, 'quantity', 1)
- return this.$message.error('应付的业务费不能超过应收业务费的80%');
- }
- }
- if (row.curCode == 'CNY') {
- 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, feesTypeCode: 'HYJK' }).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 })
- this.unitNoData = []
- let boxarr40 = ['40HC', '40GP']
- let boxarr20 = ['20GP']
- let teunum = 0
- for (let item of res.data.data) {
- // 按箱型
- if (item.quantityRule != 1) {
- // TEU
- if (item.quantityRule == 4) {
- 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, // 1 是按箱量
- code: item.cntrTypeCode,
- boxquantity: item.quantity,
- }
- })
- this.unitNoData = [...arr, ...this.unitNoData]
- // 选择费用时带出第一条
- if (type) {
- let feeunitNodata = []
- for (let item of this.unitNoData) {
- if (item.quantityRule == feeRow.unitNo) {
- feeunitNodata.push(item)
- }
- }
- this.corpChange(feeunitNodata[0].code, 'unitNo', row)
- }
- },
- // 获取币别数据
- bcurrencyGetExratefun(dc) {
- console.log(dc, 1963)
- 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
- }).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,
- 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) {
- this.$delete(item, 'edit')
- this.$set(item, 'edit', true)
- }
- }
- } else {
- for (let item of this.assemblyForm.feeCenterListC) {
- if (item.accStatus != 1) {
- this.$delete(item, 'edit')
- this.$set(item, 'edit', true)
- }
- }
- }
- },
- // 费用信息明细保存按钮
- feecenterSubmitListfun() {
- if (!this.pid) {
- this.$message({
- message: '请先保存数据之后才能添加',
- type: 'warning'
- });
- return
- }
- let similarDataD = similarValues(this.assemblyForm.feeCenterListD, 'feeCnName', 'curCode')
- if (similarDataD) {
- return this.$message.error(`应收费用简称:${similarDataD.feeCnName}的币别不一致,请重新选择`);
- }
- let similarDataC = similarValues(this.assemblyForm.feeCenterListC, 'feeCnName', 'curCode')
- if (similarDataC) {
- return this.$message.error(`应付费用简称:${similarDataC.feeCnName}的币别不一致,请重新选择`);
- }
- // 判断必填项
- let sum = '请输入'
- for (let item of this.assemblyForm.feeCenterListD) {
- if (!item.corpId || !item.feeId || !item.elementsId || !item.curCode) {
- sum += `应收第${item.$index + 1}行${!item.corpId ? ' 结算单位' : ''}${!item.feeId ? ' 费用简称' : ''}${!item.elementsId ? ' 核算要素' : ''}${!item.curCode ? ' 币种' : ''}`
- }
- }
- for (let item of this.assemblyForm.feeCenterListC) {
- if (!item.corpId || !item.feeId || !item.elementsId || !item.curCode) {
- sum += `应付第${item.$index + 1}行${!item.corpId ? ' 结算单位' : ''}${!item.feeId ? ' 费用简称' : ''}${!item.elementsId ? ' 核算要素' : ''}${!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 // 主表客户中文名称
- 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.eta // 到港日期
- 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.eta // 到港日期
- 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()
- })
- },
- // 预览报表
- 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 // 打印按钮是否显示 下面直接自定义控制打印弹窗是否开启
- // 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)
- // 报表
- 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: 'SIA' }).then(res => {
- if (res.data.data.records.length > 0) {
- this.amendsStatus = true
- }
- })
- }
- },
- deep: true, // 深度监听
- immediate: true // 第一次改变就执行,
- }
- },
- }
- </script>
- <style scoped lang="scss">
- .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>
|