| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489 |
- <template>
- <div class="borderless" v-loading="pageLoading">
- <div class="customer-head">
- <div class="customer-back">
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="backToList">返回列表 </el-button>
- <el-button v-if="form.id && pageIds.length" type="text" @click="lastPage">上一票</el-button>
- <el-button v-if="form.id && pageIds.length" type="text" @click="nextPage">下一票</el-button>
- </div>
- <div class="add-customer-btn">
- <el-button v-if="form.id" size="small" type="success" @click="allClick('指示')">指示</el-button>
- <el-button size="small" :loading="saveLoading" :disabled="!form.id" @click="previewreportfun">预 览</el-button>
- <el-button size="small" v-if="roleName.indexOf('admin') != -1" :loading="saveLoading" :disabled="!form.id" @click="DesignreportDialog = true"
- >报表设计
- </el-button>
- <el-button type="success" size="small" :disabled="!form.id" plain @click="newbillFun">新建账单 </el-button>
- <el-button
- size="small"
- type="danger"
- plain
- :disabled="!form.id || editPower"
- v-if="form.status == 3"
- :loading="saveLoading"
- @click="finstlbillsRevokeReconciliationfun"
- >撤销完成
- </el-button>
- <el-button
- size="small"
- type="success"
- plain
- :disabled="!form.id || editPower"
- v-if="form.status == 2"
- :loading="saveLoading"
- @click="submit('确认完成')"
- >确认完成
- </el-button>
- <el-button size="small" type="primary" v-if="editSave" :disabled="submitType || editPower" :loading="saveLoading" @click="editHandle"
- >编 辑
- </el-button>
- <el-button size="small" type="primary" v-else :disabled="submitType" :loading="saveLoading" @click="editCustomer()">保 存 </el-button>
- </div>
- </div>
- <div style="margin: 55px 5px 0px 5px;'">
- <el-card class="box-card">
- <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm">
- <el-row>
- <el-row>
- <el-col :span="11">
- <el-form-item label="对账单位" prop="corpCnName">
- <el-col :span="10">
- <search-query
- :datalist="corpData"
- :selectValue="form.corpCnName"
- :clearable="true"
- :disabled="editSave || tableData.length || InvoicingList.length"
- :filterable="true"
- :remote="true"
- :buttonIf="false"
- placeholder="请选择对账单位"
- :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
- @corpChange="corpChange($event, 'corpCnName')"
- @remoteMethod="corpBcorpsListfun"
- @corpFocus="corpBcorpsListfun"
- >
- </search-query>
- </el-col>
- <el-col :span="9">
- <span style="padding-left: 20px"></span>
- <el-input
- style="width: 100%;"
- v-model="form.corpEnName"
- size="small"
- autocomplete="off"
- :disabled="editSave"
- clearable
- placeholder="对账单位"
- >
- </el-input>
- </el-col>
- <el-col :span="5">
- <el-checkbox
- style="width: 100%;text-align: right"
- size="medium"
- :true-label="1"
- :false-label="0"
- :disabled="editSave"
- v-model="form.corpIsSigned"
- >已签约
- </el-checkbox>
- </el-col>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="船 名" prop="vesselCnName">
- <el-input
- style="width: 100%;"
- v-model="form.vesselCnName"
- size="small"
- autocomplete="off"
- :disabled="editSave"
- clearable
- placeholder="请输入船名"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="航 次" prop="voyageNo">
- <el-input
- style="width: 100%;"
- v-model="form.voyageNo"
- size="small"
- autocomplete="off"
- :disabled="editSave"
- clearable
- placeholder="请输入航次"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="3">
- <el-form-item label="审核" prop="isApproved" label-width="50px">
- <search-query
- :datalist="allyesnoData"
- :selectValue="form.isApproved"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
- @corpChange="corpChange($event, 'isApproved')"
- @corpFocus="allyesnoWorkDictsfun"
- >
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="费用名称" prop="feeCnName">
- <dic-select
- v-model="form.feeCnName"
- placeholder="费用名称"
- key="id"
- label="cnName"
- url="/blade-los/bfees/listAll"
- :filterable="true"
- :multiple="true"
- :collapseTags="true"
- :disabled="editSave"
- dataType="string"
- ></dic-select>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="业务编号" prop="businessNo">
- <el-input
- style="width: 100%;"
- v-model="form.businessNo"
- size="small"
- autocomplete="off"
- :disabled="editSave"
- clearable
- placeholder="请输入业务编号"
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="账单编号" prop="accountNo">
- <el-input
- style="width: 100%;"
- v-model="form.accountNo"
- size="small"
- autocomplete="off"
- :disabled="editSave"
- clearable
- placeholder="请输入账单编号"
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="MBL NO" prop="mblno">
- <el-input
- style="width: 100%;"
- v-model="form.mblno"
- size="small"
- autocomplete="off"
- :disabled="editSave"
- clearable
- placeholder="请输入MBL NO"
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="HBL NO" prop="hblno">
- <el-input
- style="width: 100%;"
- v-model="form.hblno"
- size="small"
- autocomplete="off"
- :disabled="editSave"
- clearable
- placeholder="请输入HBL NO"
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="3">
- <el-form-item label="对账" prop="isChecked" label-width="50px">
- <search-query
- :datalist="isCheckedData"
- :selectValue="form.isChecked"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
- @corpChange="corpChange($event, 'isChecked')"
- @corpFocus="allyesnoWorkDictsfun"
- >
- </search-query>
- </el-form-item>
- </el-col>
- <!--<el-col :span="4">-->
- <!-- <el-form-item label="对账" prop="isChecked" label-width="50px">-->
- <!-- <search-query :datalist="allyesnoData"-->
- <!-- :selectValue="form.isChecked"-->
- <!-- :clearable="true"-->
- <!-- :disabled="editSave"-->
- <!-- :buttonIf="false"-->
- <!-- :forParameter="{ key:'dictKey', label:'dictValue', value:'dictKey'}"-->
- <!-- @corpChange="corpChange($event,'isChecked')"-->
- <!-- @corpFocus="allyesnoWorkDictsfun" >-->
- <!-- </search-query>-->
- <!-- </el-form-item>-->
- <!--</el-col>-->
- <el-col :span="4">
- <el-form-item label="业务开始日期" prop="businessDateStart">
- <el-date-picker
- v-model="form.businessDateStart"
- clearable
- style="width: 100%;"
- type="date"
- size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="请选择业务开始日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="业务结束日期" prop="businessDateEnd">
- <el-date-picker
- v-model="form.businessDateEnd"
- clearable
- style="width: 100%;"
- type="date"
- size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="请选择业务结束日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="财务开始日期" prop="accountDateFrom">
- <el-date-picker
- v-model="form.accountDateFrom"
- clearable
- style="width: 100%;"
- type="date"
- size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="请选择财务开始日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="财务结束日期" prop="accountDateTo">
- <el-date-picker
- v-model="form.accountDateTo"
- clearable
- style="width: 100%;"
- type="date"
- size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="请选择财务结束日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="审核开始期间" prop="auditDateFrom">
- <el-date-picker
- v-model="form.auditDateFrom"
- clearable
- style="width: 100%;"
- type="date"
- size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="请选择审核开始日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="审核结束期间" prop="auditDateTo">
- <el-date-picker
- v-model="form.auditDateTo"
- clearable
- style="width: 100%;"
- type="date"
- size="small"
- :disabled="editSave"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="请选择审核结束日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <expand :showBtn="true" :showSpan="true">
- <el-row>
- <el-col :span="5">
- <el-form-item label="操作员" prop="updateUserName">
- <search-query
- :datalist="updateUserData"
- :selectValue="form.updateUserName"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :filterable="true"
- :remote="true"
- :forParameter="{ key: 'id', label: 'name', value: 'name' }"
- @corpChange="corpChange($event, 'updateUserName')"
- @remoteMethod="updateUserUserGetListfun"
- @corpFocus="updateUserUserGetListfun"
- >
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="BKNO" prop="bookingNo">
- <el-input
- style="width: 100%;"
- v-model="form.bookingNo"
- size="small"
- autocomplete="off"
- :disabled="editSave"
- clearable
- placeholder="请输入BKNO"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="协议签订人" prop="corpAccRemarks">
- <el-input
- style="width: 100%;"
- v-model="form.corpAccRemarks"
- size="small"
- autocomplete="off"
- :disabled="editSave"
- clearable
- placeholder="请输入协议签订人"
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="业务类型" prop="businessTypes">
- <dic-select
- v-model="form.businessTypes"
- placeholder="业务类型"
- key="id"
- label="label"
- keyValue="value"
- :activateCreated="false"
- :mockData="businessTypesData"
- :filterable="true"
- :multiple="true"
- :collapseTags="true"
- :disabled="editSave"
- dataType="string"
- ></dic-select>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="发票" prop="isInvoice" label-width="50px">
- <search-query
- :datalist="isInvoiceData"
- :selectValue="form.isInvoice"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
- @corpChange="corpChange($event, 'isInvoice')"
- @corpFocus="invoiceWorkDictsfun"
- >
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="收 / 付" prop="dc">
- <search-query
- :datalist="dcData"
- :selectValue="form.dc"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- placeholder="请选择收/付"
- @corpChange="corpChange($event, 'dc')"
- >
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="币别" prop="curCode">
- <search-query
- :datalist="curCodeData"
- :selectValue="form.curCode"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :filterable="true"
- :remote="true"
- placeholder="请选择币别"
- :forParameter="{ key: 'id', label: 'code', value: 'code' }"
- @corpChange="corpChange($event, 'curCode')"
- @remoteMethod="getRateListfun"
- @corpFocus="getRateListfun"
- >
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="10">
- <el-form-item label="业务来源" prop="srcType">
- <el-col :span="10">
- <search-query
- :datalist="srcTypeData"
- :selectValue="form.srcType"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- placeholder="请选择业务来源"
- @corpChange="corpChange($event, 'srcType')"
- >
- </search-query>
- </el-col>
- <el-col :span="13" :offset="1">
- <search-query
- :datalist="srcData"
- :selectValue="form.srcCnName"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :filterable="true"
- :remote="true"
- placeholder="请选择详情"
- :forParameter="srcforParameter"
- @corpChange="corpChange($event, 'srcCnName')"
- @remoteMethod="salesuserGetListfun"
- >
- </search-query>
- </el-col>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="签收" prop="isSignfor" label-width="50px">
- <search-query
- :datalist="allyesnoData"
- :selectValue="form.isSignfor"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
- @corpChange="corpChange($event, 'isSignfor')"
- @corpFocus="allyesnoWorkDictsfun"
- >
- </search-query>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="对账单号" prop="checkNo">
- <el-input
- style="width: 100%;"
- v-model="form.billNo"
- size="small"
- autocomplete="off"
- :disabled="true"
- clearable
- placeholder="请输入对账单号"
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="对账日期" prop="billDate">
- <el-date-picker
- v-model="form.billDate"
- clearable
- style="width: 100%;"
- type="date"
- size="small"
- :disabled="editSave"
- value-format="yyyy-MM-dd HH:mm"
- placeholder="请选择对账日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="限定金额" prop="limitedAmount">
- <el-input
- style="width: 100%;"
- v-model="form.limitedAmount"
- size="small"
- autocomplete="off"
- :disabled="editSave"
- clearable
- placeholder="请输入限定金额"
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="备注" prop="remarks">
- <el-input
- style="width: 100%;"
- v-model="form.remarks"
- size="small"
- autocomplete="off"
- :disabled="editSave"
- clearable
- placeholder="请输入备注"
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="4">
- <el-form-item label="销账" prop="isCleared" label-width="50px">
- <search-query
- :datalist="isClearedData"
- :selectValue="form.isCleared"
- :clearable="true"
- :disabled="editSave"
- :buttonIf="false"
- :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
- @corpChange="corpChange($event, 'isCleared')"
- @corpFocus="allyesnoWorkDictsfun"
- >
- </search-query>
- </el-form-item>
- </el-col>
- </el-row>
- </expand>
- <el-row>
- <el-col span="24">
- <div style="text-align: right">
- <el-button size="small" type="primary" :disabled="editSave" :loading="saveLoading" @click="retrievalfun">检 索</el-button>
- <el-button size="small" :disabled="queryData.length > 0" @click="ResetFilter">重置条件 </el-button>
- </div>
- </el-col>
- </el-row>
- </el-row>
- </el-form>
- </el-card>
- <!-- <el-card style="margin-top: 10px">
-
- </el-card> -->
- <el-card style="margin-top: 10px">
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="查询结果" name="1">
- <queryfinstlbillsitems
- :queryData="queryData"
- :form="form"
- :handleSelectionData="handleSelectionData"
- :brfalse="!editSave"
- @handleSelectionChange="addSelectionChange"
- >
- <template slot="menuLeft">
- <div style="display: flex;">
- <el-button size="small" type="success" style="margin-right: 8px" :disabled="editSave" :loading="saveLoading" @click="allCell"
- >确认选定行
- </el-button>
- <div class="bottomFlex" style="color: #81B337;margin-right: 20px;">
- <span>应收:</span>
- <span class="weightnum">¥{{ amountDSubSum || 0 }}</span>
- </div>
- <div class="bottomFlex" style="color: #81B337;margin-right: 20px;">
- <span></span>
- <span class="weightnum">${{ amountDSubUsdSum || 0 }}</span>
- </div>
- <div class="bottomFlex" style="color: #6BBCD1;margin-right: 20px;">
- <span>应付:</span>
- <span class="weightnum">¥{{ amountCSubSum || 0 }}</span>
- </div>
- <div class="bottomFlex" style="color: #6BBCD1;margin-right: 20px;">
- <span></span>
- <span class="weightnum">${{ amountCSubUsdSum || 0 }}</span>
- </div>
- </div>
- </template>
- </queryfinstlbillsitems>
- </el-tab-pane>
- <el-tab-pane label="选定数据" name="2">
- <finstlbillsitems
- :tableData="tableData"
- :form="form"
- :handleSelectionData="handleSelectionData"
- :brfalse="!editSave"
- @handleSelectionChange="handleSelectionChange"
- >
- <template slot="menuLeft">
- <div style="display: flex;">
- <el-button size="small" type="danger" style="margin-left: 10px" :disabled="editSave" :loading="saveLoading" @click="batchDeletefun"
- >一键删除
- </el-button>
- <el-button size="small" type="primary" style="margin-left: 10px" :disabled="editSave" :loading="saveLoading" @click="editHandle"
- >一键编辑
- </el-button>
- <!-- <el-button size="small" type="primary" style="margin-right: 8px" :loading="saveLoading" @click="Confirminvoicefun('2')"
- >不开发票
- </el-button>
- <el-button size="small" type="warning" style="margin-right: 8px" :loading="saveLoading" @click="Notinvoicingfun('2')"
- >取消不开发票
- </el-button>
- <el-button size="small" type="primary" style="margin-right: 8px" :loading="saveLoading" @click="Confirminvoicefun('1')"
- >确认开票
- </el-button>
- <el-button size="small" type="warning" style="margin-right: 8px" :loading="saveLoading" @click="Notinvoicingfun('1')"
- >撤销开票
- </el-button> -->
- <el-button
- size="small"
- type="primary"
- style="margin-right: 8px"
- :disabled="!form.id || editSave || handleSelectionData.length == 0"
- :loading="saveLoading"
- @click="ConfirmReceiptfun"
- >批量签收
- </el-button>
- <el-button
- size="small"
- type="danger"
- style="margin-right: 8px"
- :disabled="!form.id || editSave || handleSelectionData.length == 0"
- :loading="saveLoading"
- @click="RevokeReceiptfun"
- >撤销签收
- </el-button>
- <el-button
- size="small"
- type="primary"
- style="margin-right: 8px"
- :disabled="!form.id || editSave || handleSelectionData.length == 0"
- :loading="saveLoading"
- @click="batchConfirm"
- >批量对账
- </el-button>
- <el-button
- size="small"
- type="danger"
- style="margin-right: 8px"
- :disabled="!form.id || editSave || handleSelectionData.length == 0"
- :loading="saveLoading"
- @click="batchRevoke"
- >撤销对账
- </el-button>
- <div class="bottomFlex" style="color: #81B337;margin-right: 20px;">
- <span>应收:</span>
- <span class="weightnum">¥{{ amountDSubSum2 || 0 }}</span>
- </div>
- <div class="bottomFlex" style="color: #81B337;margin-right: 20px;">
- <span></span>
- <span class="weightnum">${{ amountDSubUsdSum2 || 0 }}</span>
- </div>
- <div class="bottomFlex" style="color: #6BBCD1;margin-right: 20px;">
- <span>应付:</span>
- <span class="weightnum">¥{{ amountCSubSum2 || 0 }}</span>
- </div>
- <div class="bottomFlex" style="color: #6BBCD1;margin-right: 20px;">
- <span></span>
- <span class="weightnum">${{ amountCSubUsdSum2 || 0 }}</span>
- </div>
- </div>
- </template>
- </finstlbillsitems>
- </el-tab-pane>
- <el-tab-pane label="开票明细" name="3">
- <div style="margin-bottom: 10px;display: flex;">
- <el-button style="margin-left: 10px" :disabled="!form.id" size="small" type="primary" @click="addRow">新增</el-button>
- <el-button
- style="margin-left: 10px"
- :disabled="!form.id || invoicingCheckboxData.length == 0"
- size="small"
- type="success"
- @click="invoicingfun"
- >生成发票单</el-button
- >
- <el-button
- style="margin-left: 10px"
- :disabled="!form.id || invoicingCheckboxData.length == 0"
- size="small"
- type="danger"
- @click="invoicingRevokefun"
- >撤销生成发票单</el-button
- >
- <el-button :disabled="!form.id || invoicingCheckboxData.length == 0" size="small" type="danger" @click="invoicingBatchDelete"
- >一键删除</el-button
- >
- </div>
- <fininvoiceitemdetail
- :form="form"
- :tableData="InvoicingList"
- :handleSelectionData="invoicingCheckboxData"
- @handleSelectionChange="invoicingCheckboxChange"
- @deletefun="invoiceDeletionfun"
- @savefun="invoiceSavefun"
- >
- </fininvoiceitemdetail>
- </el-tab-pane>
- </el-tabs>
- </el-card>
- </div>
- <el-card style="margin-top: 10px">
- <el-row>
- <el-col :span="3">
- <div class="bottomFlex" style="color: #6BBCD1">
- <span>应付:</span>
- <span class="weightnum">¥{{ form.amountCr || 0 }}</span>
- </div>
- </el-col>
- <el-col :span="3">
- <div class="bottomFlex" style="color: #6BBCD1">
- <span>应付:</span>
- <span class="weightnum">${{ form.amountCrUsd || 0 }}</span>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="bottomFlex" style="color: #6BBCD1">
- <span>应付合计:</span>
- <span class="weightnum">¥{{ form.amountCrLoc || 0 }}</span>
- </div>
- </el-col>
- <el-col :span="3">
- <div class="bottomFlex" style="color: #81B337">
- <span>应收:</span>
- <span class="weightnum">¥{{ form.amountDr || 0 }}</span>
- </div>
- </el-col>
- <el-col :span="3">
- <div class="bottomFlex" style="color: #81B337">
- <span>应收:</span>
- <span class="weightnum">${{ form.amountDrUsd || 0 }}</span>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="bottomFlex" style="color: #81B337">
- <span>应收合计:</span>
- <span class="weightnum">¥{{ form.amountDrLoc || 0 }}</span>
- </div>
- </el-col>
- </el-row>
- </el-card>
- <!--选择数据弹窗-->
- <el-dialog title="选择数据" class="el-dialogDeep" :visible.sync="retrievePopupsType" append-to-body width="70%" :close-on-click-modal="false">
- <div>
- <avue-crud :option="retrievePopupsOption" :data="retrievePopupsData" ref="retrievePopupsRef" id="out-table">
- <template slot="menu" slot-scope="{ row }">
- <el-button type="text" icon="" size="small" @click.stop="retrievePopupsSelect(row)">选择 </el-button>
- </template>
- </avue-crud>
- </div>
- </el-dialog>
- <!--设计报表弹窗-->
- <el-dialog
- append-to-body
- title="设计报表"
- class="el-dialogDeep"
- :visible.sync="DesignreportDialog"
- width="70%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- v-dialog-drag
- >
- <reports :id="form.id" :assemblyForm="form" businessValue="DZZX"></reports>
- </el-dialog>
- <!--预览-->
- <el-dialog
- title="打印"
- :visible.sync="selectPrintingDialog"
- append-to-body
- width="70%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- v-dialog-drag
- >
- <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>
- <cashier-item ref="cashier" @update="updateCashier" :disabled="form.status == 3"></cashier-item>
- </div>
- </template>
- <script>
- import fininvoiceitemdetail from "@/views/iosBasicData/finstlbills/assembly/fininvoiceitemdetail.vue";
- import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
- import { getWorkDicts } from "@/api/system/dictbiz";
- import { getRateList } from "@/api/iosBasicData/rateManagement";
- import { getList as userGetList } from "@/api/system/user";
- import { getBvesselsList } from "@/api/iosBasicData/bvessels";
- import { getBcorpslistByType } from "@/api/iosBasicData/bcorps";
- import { getDeptLazyTree } from "@/api/system/dept";
- import {
- finstlbillsConfirmReconciliation,
- finstlbillsConfirmSignFor,
- finstlbillsDetail,
- finstlbillslistAccBillV1,
- finstlbillsRevokeReconciliation,
- finstlbillsRevokeSignFor,
- finstlbillsSubmit,
- finstlbillsitemsRemove,
- finstlbillslistAccBillByCorp,
- finstlbillsConfirmInvoicing,
- finstlbillsRevokeInvoicing,
- batchConfirmReconciliation,
- batchRevokeReconciliation,
- generateInvoice,
- revokeInvoice
- } from "@/api/iosBasicData/finstlbills";
- import expand from "@/components/basic-container/expand.vue";
- import queryfinstlbillsitems from "@/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue";
- import finstlbillsitems from "@/views/iosBasicData/finstlbills/assembly/finstlbillsitems2.vue";
- import { dateFormat } from "@/util/date";
- import reports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue";
- import reportformsList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsList.vue";
- import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
- import { getList as getreportsList, reportsGetReportData } from "@/api/iosBasicData/reports";
- import dicSelect from "@/components/dicSelect/main";
- import cashierItem from "./assembly/cashierItem.vue";
- import { getListAllDetail } from "@/api/iosBasicData/cashier.js";
- import { fininvoiceitemdetailRemove, fininvoiceitemdetailSubmit } from "@/api/iosBasicData/fininvoices";
- export default {
- components: {
- reportContainer,
- reportformsList,
- reports,
- SearchQuery,
- expand,
- finstlbillsitems,
- dicSelect,
- queryfinstlbillsitems,
- cashierItem,
- fininvoiceitemdetail
- },
- props: {
- // 编辑还是保存
- editSave: {
- type: Boolean,
- default: true
- },
- pageIds: {
- type: Array, // 指定 prop 的类型为 Array
- default: () => [] // 提供一个默认值,这里使用函数形式返回一个空数组
- }
- },
- data() {
- return {
- InvoicingList: [], // 开票明细数据
- invoicingCheckboxData: [],
- amountDSubSum: 0,
- amountDSubUsdSum: 0,
- amountCSubSum: 0,
- amountCSubUsdSum: 0,
- amountDSubSum2: 0,
- amountDSubUsdSum2: 0,
- amountCSubSum2: 0,
- amountCSubUsdSum2: 0,
- activeName: "1",
- retrievePopupsType: false, // 弹窗开启关闭
- retrievePopupsData: [], // 选择弹窗数据
- retrievePopupsOption: {
- border: true,
- calcHeight: 30,
- tip: false,
- height: "auto",
- index: true,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- editBtn: false,
- refreshBtn: false,
- columnBtn: false,
- menuWidth: "60",
- column: [
- {
- label: "客户中文名",
- prop: "cnName",
- overHidden: true
- },
- {
- label: "客户英文文名",
- prop: "cnName",
- overHidden: true
- }
- ]
- },
- DesignreportDialog: false, // 设计报表弹窗
- selectPrintingDialog: false, // 预览报表
- statusType: false, // 确认发票
- tableData: [],
- queryData: [],
- addData: [],
- pageLoading: false, // 全屏加载动画
- saveLoading: false, // 按钮动画
- // 绑定的数据
- form: {
- billDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00", // 对账日期 默认 当天
- isApproved: "0",
- isSignfor: "2",
- isCleared: null, // 销账
- isChecked: "0",
- isInvoice: "0",
- accountDate: [],
- approvedDate: []
- },
- handleSelectionData: [], // 表格选择的数据
- corpData: [], // 对账单位 数据
- allyesnoData: [], // 全部是否字典数据
- isCheckedData: [], // 对账状态字典数据
- isClearedData: [], // 销项
- isInvoiceData: [], // 发票字典
- // 收 / 付
- dcData: [
- {
- label: "收",
- value: "D"
- },
- {
- label: "付",
- value: "C"
- }
- ],
- curCodeData: [], // 币别
- updateUserData: [], // 操作员
- srcTypeData: [
- {
- label: "公司",
- value: "OWN"
- },
- {
- label: "代理",
- value: "AGENT"
- },
- {
- label: "业务员",
- value: "SALES"
- }
- ], // 业务来源
- srcData: [], // 业务来源数据
- srcforParameter: {},
- // 业务类型
- businessTypesData: [
- {
- label: "海运出口",
- value: "SE"
- },
- {
- label: "海运进口",
- value: "SI"
- }
- ],
- submitType: false, // 是否提交
- roleName: [], // 当前的角色权限
- saberUserInfo: {}, // 当前登录人信息
- editPower: false // 当前是否可以编辑
- };
- },
- created() {
- this.roleName = localStorage.getItem("roleName").split(",");
- // 获取当前登录人个人信息
- this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content;
- this.allyesnoWorkDictsfun(); // 获取 字典数据
- this.invoiceWorkDictsfun(); // 获取 发票的数据
- },
- methods: {
- addRow() {
- this.InvoicingList.push({
- pid: this.form.id,
- number: 1,
- price: 0,
- amountRate: 0,
- edit: true
- });
- },
- lastPage() {
- if (this.pageIds.length) {
- const index = this.pageIds.indexOf(this.form.id);
- if (index == 0) {
- return this.$message.error("没有上一票了");
- }
- const lastIndex = index - 1;
- // if (this.form.id) {
- // this.unLock({
- // moduleName: "SE",
- // tableName: "SE_order",
- // billId: this.form.id,
- // billNo: this.form.mblno
- // });
- // }
- this.finstlbillsDetailfun(this.pageIds[lastIndex]);
- }
- },
- nextPage() {
- if (this.pageIds.length) {
- const index = this.pageIds.indexOf(this.form.id);
- if (this.pageIds[this.pageIds.length - 1] == this.form.id) {
- return this.$message.error("没有下一票了");
- }
- const nextIndex = index + 1;
- // if (this.form.id) {
- // this.unLock({
- // moduleName: "SE",
- // tableName: "SE_order",
- // billId: this.form.id,
- // billNo: this.form.mblno
- // });
- // }
- this.finstlbillsDetailfun(this.pageIds[nextIndex]);
- }
- },
- // 打印
- reportRadio(val) {
- // 获取报表数据
- reportsGetReportData({
- billId: this.form.id,
- reportCode: val.classifyCode,
- groupCode: val.groupCode,
- type: "DZZX"
- }).then(res => {
- this.handleReportPreview(val.url, res.data.data.data);
- });
- },
- // 报表预览
- previewreportfun() {
- getreportsList(1, 10, {
- businessType: "DZZX"
- // classifyCode:'结算中心',
- // groupCode:'付费结算'
- }).then(res => {
- if (res.data.data.records.length == 1) {
- this.reportRadio(res.data.data.records[0]);
- } else {
- this.saveLoading = true;
- this.selectPrintingDialog = true;
- this.saveLoading = false;
- let page = {
- pageSize: 10,
- currentPage: 1,
- total: 0
- };
- this.$nextTick(() => {
- this.$refs.reportformsList.onLoad(page, {
- businessType: "DZZX"
- // classifyCode:'结算中心',
- // groupCode:'付费结算'
- });
- });
- }
- });
- },
- finstlbillsRevokeReconciliation,
- // 下拉回调
- corpChange(value, name) {
- // 对账单位
- if (name == "corpCnName") {
- if (!value) {
- this.$set(this.form, "corpId", "");
- this.$set(this.form, "corpCnName", "");
- this.$set(this.form, "corpEnName", "");
- this.$set(this.form, "corpArgreementNo", "");
- }
- for (let item of this.corpData) {
- if (item.cnName == value) {
- this.$set(this.form, "corpId", item.id);
- this.$set(this.form, "corpCnName", item.cnName);
- this.$set(this.form, "corpEnName", item.enName);
- this.$set(this.form, "corpArgreementNo", item.enName);
- }
- }
- }
- // 业务来源
- else if (name == "srcType") {
- if (!value) {
- this.$set(this.form, "srcType", "");
- return;
- }
- this.$set(this.form, name, value);
- if (value == "OWN") {
- this.srcforParameter = { key: "id", label: "title", value: "title" };
- this.ownDeptLazyTreefun();
- } else if (value == "AGENT") {
- this.srcforParameter = { key: "id", label: "cnName", value: "cnName" };
- this.srcBcorpsListfun();
- } else if (value == "SALES") {
- this.srcforParameter = { key: "id", label: "name", value: "name" };
- this.salesuserGetListfun();
- } else {
- }
- }
- // 业务来源选择
- else if (name == "srcCnName") {
- if (!value) {
- this.$set(this.form, "srcId", "");
- this.$set(this.form, "srcCnName", "");
- this.$set(this.form, "srcEnName", "");
- return;
- }
- for (let item of this.srcData) {
- if (item[this.srcforParameter.value] == value) {
- if (this.form.srcType == "OWN") {
- // 公司
- this.$set(this.form, "srcId", item.id);
- this.$set(this.form, "srcCnName", item.title);
- this.$set(this.form, "srcEnName", item.title);
- } else if (this.form.srcType == "SALES") {
- // 业务员
- this.$set(this.form, "srcId", item.id);
- this.$set(this.form, "srcCnName", item.name);
- this.$set(this.form, "srcEnName", item.name);
- } else if (this.form.srcType == "AGENT") {
- // 代理
- this.$set(this.form, "srcId", item.id);
- this.$set(this.form, "srcCnName", item.cnName);
- this.$set(this.form, "srcEnName", item.enName);
- } else {
- }
- }
- }
- }
- // 操作员
- else if (name == "updateUserName") {
- for (let item of this.updateUserData) {
- if (item.name == value) {
- this.$set(this.form, "updateUser", item.id);
- this.$set(this.form, "updateUserName", item.name);
- }
- }
- } else {
- this.$set(this.form, name, value);
- }
- },
- invoicingCheckboxChange(arr) {
- this.invoicingCheckboxData = arr;
- },
- // 开票明细单个删除
- invoiceDeletionfun(id, index) {
- if (id) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (id) {
- fininvoiceitemdetailRemove(id).then(res => {
- this.$message.success("操作成功");
- this.InvoicingList.splice(index, 1);
- });
- }
- });
- } else {
- this.InvoicingList.splice(index, 1);
- }
- },
- // 开票明细编辑完成保存
- invoiceSavefun(row, index) {
- if (!row.invoiceCompanyId) {
- return this.$message.error("开票单位不能为空");
- }
- if (!row.curCode) {
- return this.$message.error("币别不能为空");
- }
- if (!Number(row.exrate)) {
- return this.$message.error("汇率不能为空或0");
- }
- if (Number(row.price ? row.price : 0) <= 0) {
- return this.$message.error("单价不能为非正数");
- }
- fininvoiceitemdetailSubmit(row).then(res => {
- this.$message.success("操作成功");
- for (let [key, value] of Object.entries(res.data.data)) {
- this.$set(row, key, value);
- }
- this.$set(row, "edit", false);
- });
- },
- // 开票一键删除
- invoicingBatchDelete() {
- if (this.invoicingCheckboxData.length == 0) {
- return this.$message.warning("请选择要删除的数据");
- }
- for (let item of this.invoicingCheckboxData) {
- if (item.invoiceStatus == 1) {
- return this.$message.error("请选择未开开票明细");
- }
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- // 获取有id 的数据
- const itemsWithId = this.invoicingCheckboxData.filter(item => item.hasOwnProperty("id"));
- let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
- // 把选中的删除掉
- this.invoicingCheckboxData.forEach(item => {
- for (let index in this.InvoicingList) {
- if (item.id == this.InvoicingList[index].id) {
- this.InvoicingList.splice(Number(index), 1);
- }
- }
- });
- // 有id 的处理
- if (itemsWithId.length != 0) {
- fininvoiceitemdetailRemove(arrIds.join(",")).then(res => {
- this.$message.success("操作成功");
- });
- }
- });
- },
- // 确认开票信息
- invoicingfun() {
- if (this.invoicingCheckboxData.length == 0) {
- this.$message.error("请选择数据");
- return;
- }
- for (let item of this.invoicingCheckboxData) {
- if (!item.id) {
- return this.$message.error("请保存开票明细");
- }
- if (item.invoiceStatus == 1) {
- return this.$message.error("请选择未开开票明细");
- }
- }
- this.form.billNoFormat = "HYDZ";
- this.form.businessTypeCode = "HYDZ";
- this.form.businessType = "CHK"; // 对账单
- this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
- this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
- this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
- // 保留id
- this.form.finStlBillsItemsList = this.tableData;
- let obj = {
- ...this.form,
- finInvoiceItemDetailList: this.invoicingCheckboxData
- };
- this.$confirm("是否生成发票单?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- // 开票项目
- generateInvoice(obj).then(res => {
- this.$message.warning("操作成功");
- this.finstlbillsDetailfun(this.form.id, "finstlbills");
- });
- });
- },
- // 撤销开票信息
- invoicingRevokefun() {
- if (this.invoicingCheckboxData.length == 0) {
- this.$message.warning("请选择数据");
- return;
- }
- if (this.invoicingCheckboxData.length == 0) {
- this.$message.error("请选择数据");
- return;
- }
- for (let item of this.invoicingCheckboxData) {
- if (!item.id) {
- return this.$message.error("请保存开票明细");
- }
- if (item.invoiceStatus == 0) {
- return this.$message.error("请选择已开开票明细");
- }
- }
- this.form.billNoFormat = "HYDZ";
- this.form.businessTypeCode = "HYDZ";
- this.form.businessType = "CHK"; // 对账单
- this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
- this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
- this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
- // 保留id
- this.form.finStlBillsItemsList = this.tableData;
- let obj = {
- ...this.form,
- finInvoiceItemDetailList: this.invoicingCheckboxData
- };
- this.$confirm("是否撤销生成发票单?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- // 撤销开票项目
- revokeInvoice(this.form).then(res => {
- this.$message.warning("操作成功");
- this.finstlbillsDetailfun(this.form.id, "finstlbills");
- });
- });
- },
- // 编辑
- editHandle() {
- if (this.form.status != 3) {
- this.editSave = false;
- }
- },
- // 保存
- editCustomer(type) {
- // 对账单位
- if (!this.form.corpId) {
- this.$message.warning("请选择对账单位");
- return;
- }
- if (!this.form.id) {
- // 是否选择从表数据
- if (this.addData.length == 0) {
- this.$message.warning("请选择对账数据");
- return;
- }
- }
- // for (let item of this.handleSelectionData) {
- // if (!item.currentStlCurCode) {
- // this.$message.warning("请选择本次结算币种");
- // return;
- // }
- // }
- this.form.billNoFormat = "HYDZ";
- this.form.businessTypeCode = "HYDZ";
- this.form.businessType = "CHK"; // 对账单
- this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
- this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
- this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
- let addList = this.addData.map((item, index) => {
- item.lineNo = Number(index) + 1;
- item.pType = item.businessType;
- item.accDate = item.billDate;
- if (item.currentStlCurCode == "CNY") {
- item.currentStlAmount = item.currentStlAmountRMB;
- } else {
- item.currentStlAmount = item.currentStlAmountUSD;
- }
- delete item.id;
- delete item.accountDc;
- return item;
- });
- this.form.finStlBillsItemsList = this.tableData.concat(addList);
- this.form.finStlBillsItemsList = this.form.finStlBillsItemsList.map((item, index) => {
- if (item.currentStlCurCode == "CNY") {
- item.currentStlAmount = item.currentStlAmountRMB;
- } else {
- item.currentStlAmount = item.currentStlAmountUSD;
- }
- return item;
- });
- for (let row of this.InvoicingList) {
- if (!row.invoiceCompanyId) {
- return this.$message.error("开票单位不能为空");
- }
- if (!row.curCode) {
- return this.$message.error("币别不能为空");
- }
- if (!Number(row.exrate)) {
- return this.$message.error("汇率不能为空或0");
- }
- if (Number(row.price ? row.price : 0) <= 0) {
- return this.$message.error("单价不能为非正数");
- }
- }
- this.form.finInvoiceItemDetailList = this.InvoicingList;
- this.saveLoading = true; // 加载动画
- this.pageLoading = true;
- // 判断是单独点击保存还是点击确认对账
- if (type == "toAddEdit") {
- finstlbillsSubmit(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.$emit(type);
- })
- .finally(() => {
- this.pageLoading = false;
- this.saveLoading = false;
- });
- } else if (type == "确认完成") {
- finstlbillsSubmit(this.form)
- .then(res => {
- this.form = res.data.data;
- this.finstlbillsConfirmReconciliationfun();
- })
- .catch(() => {
- this.pageLoading = false;
- this.saveLoading = false;
- });
- } else {
- finstlbillsSubmit(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.finstlbillsDetailfun(res.data.data.id, type);
- })
- .finally(() => {
- this.pageLoading = false;
- this.saveLoading = false;
- });
- }
- },
- newbillFun() {
- if (this.submitType) {
- this.$emit("toAddEdit");
- } else {
- this.$confirm("是否需要保存?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.editCustomer("toAddEdit");
- })
- .catch(() => {
- this.$emit("toAddEdit");
- });
- }
- },
- allClick(name) {
- if (name == "指示") {
- this.$refs.cashier.openDialog(this.form, this.tableData, "auto");
- }
- },
- updateCashier() {
- this.finstlbillsDetailfun(this.form.id, "updateCashier");
- },
- submit(type) {
- for (let item of this.tableData) {
- if (item.isChecked != 1) {
- return this.$message.error("明细数据未完成对账!");
- }
- }
- // if (this.form.cashierStatus == 0) {
- // return this.$message.error("请申请" + (this.form.dc == "D" ? "收费!" : "付费!"));
- // }
- getListAllDetail({ srcId: this.form.id }).then(res => {
- // if (res.data.data.length == 0) {
- // return this.$message.error("请在指示维护费用");
- // }
- // for (let item of res.data.data) {
- // if (item.status == 0) {
- // return this.$message.error("请在指示维护" + (this.form.dc == "D" ? "未收款数据!" : "未支付数据!"));
- // }
- // }
- if (
- Number(this.form.amountDr) != Number(this.form.actualAmountDr) ||
- Number(this.form.amountCr) != Number(this.form.actualAmountCr) ||
- Number(this.form.amountDrUsd) != Number(this.form.actualAmountDrUsd) ||
- Number(this.form.amountCrUsd) != Number(this.form.actualAmountCrUsd)
- ) {
- this.$confirm("对账金额与实际金额不符是否完成?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.$confirm("确定进行确认完成操作?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.editCustomer(type);
- })
- .catch(() => {
- this.pageLoading = false;
- this.saveLoading = false;
- });
- });
- } else {
- this.$confirm("确定进行确认完成操作?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.editCustomer(type);
- })
- .catch(() => {
- this.pageLoading = false;
- this.saveLoading = false;
- });
- }
- });
- },
- // 详情接口
- finstlbillsDetailfun(id, type) {
- if (type == "finstlbills") {
- this.activeName = "3";
- } else {
- this.activeName = "2";
- }
- this.pageLoading = true;
- finstlbillsDetail(id)
- .then(res => {
- this.form = res.data.data;
- if (type == "query") {
- this.finstlbillslistAccBillV1fun();
- }
- if (
- this.roleName.indexOf("admin") == -1
- ? this.roleName.indexOf("允许修改他人业务") == -1
- ? this.saberUserInfo.user_id != this.form.createUser
- : false
- : false
- ) {
- this.editPower = true;
- } else {
- this.editPower = false;
- }
- // 判断是否已经提交过了
- if (this.form.billStatus == 1) {
- this.submitType = true;
- } else {
- this.submitType = false;
- }
- this.tableData = this.form.finStlBillsItemsList.map(item => {
- if (item.curCode == "CNY") {
- this.$set(item, "amountRMB", item.amount);
- this.$set(item, "currentInvoiceAmountRMB", Number(item.currentInvoiceAmount ? item.currentInvoiceAmount : 0));
- this.$set(item, "unsettledAmountRMB", Number(item.amount ? item.amount : 0));
- this.$set(item, "currentStlAmountRMB", Number(item.currentStlAmount ? item.currentStlAmount : 0));
- this.$set(item, "currentStlAmountUSD", Number(0));
- } else {
- this.$set(item, "amountUSD", item.amount);
- this.$set(item, "currentInvoiceAmountUSD", item.currentInvoiceAmount);
- this.$set(item, "unsettledAmountUSD", Number(item.amount ? item.amount : 0));
- this.$set(item, "currentStlAmountUSD", Number(item.currentStlAmount ? item.currentStlAmount : 0));
- this.$set(item, "currentStlAmountRMB", Number(0));
- }
- this.$set(item, "costDate", []);
- return item;
- });
- this.InvoicingList = this.form.finInvoiceItemDetailList.map(item => {
- item.edit = false;
- return item;
- });
- this.form.isSignfor = this.form.isSignfor + "";
- this.form.isApproved = this.form.isApproved + "";
- this.form.isCleared = this.form.isCleared + "";
- this.form.isChecked = this.form.isChecked + "";
- this.form.billStatus = this.form.billStatus + "";
- this.form.isInvoice = this.form.isInvoice + "";
- if (type == "updateCashier") {
- this.$refs.cashier.openDialog(this.form);
- }
- })
- .finally(() => {
- this.pageLoading = false;
- });
- },
- // 重置条件
- ResetFilter() {
- this.form = {
- billDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00", // 对账日期 默认 当天
- isApproved: "0",
- isSignfor: "2",
- isCleared: null, // 销账
- isChecked: "0",
- isInvoice: "0",
- accountDate: [],
- approvedDate: []
- };
- },
- // 弹窗选择
- retrievePopupsSelect(row) {
- // this.form = row
- this.$set(this.form, "corpId", row.id);
- this.$set(this.form, "corpCnName", row.cnName);
- this.$set(this.form, "corpEnName", row.enName);
- this.$set(this.form, "corpArgreementNo", row.enName);
- this.retrievePopupsType = false;
- this.finstlbillslistAccBillV1fun("检索");
- },
- // 检索
- retrievalfun() {
- this.activeName = "1";
- // 判断是否有对账单位
- if (!this.form.corpId && (this.form.businessNo || this.form.accountNo || this.form.hblno || this.form.mblno)) {
- console.log("新接口");
- this.finstlbillslistAccBillByCorpfun();
- } else {
- if (!this.form.corpId) {
- return this.$message.warning("请填写对账单位");
- }
- console.log("原来的接口");
- this.finstlbillslistAccBillV1fun("检索");
- }
- },
- // 检索出的弹窗
- finstlbillslistAccBillByCorpfun() {
- // delete this.form.id;
- // let obj = JSON.parse(JSON.stringify(this.form))
- let obj = {};
- obj.type = "1";
- obj.auditStatus = this.form.isApproved; // 审核状态 0 新建费用 1 已请核 2 审核中 3 驳回 4 通过
- obj.corpCnName = this.form.corpId; // 对账单位
- obj.isSignfor = this.form.isSignfor; // 是否已签收(0 否 1是)
- obj.dc = this.form.dc; // 收付 D=收 C=付
- obj.curCode = this.form.curCode; // 币别
- obj.srcType = this.form.srcType; // 业务来源
- obj.srcCnName = this.form.srcId; // 业务员id
- obj.isCleared = this.form.isCleared; // 是否销账(0 未销账 3 部分销账 9 销账)
- obj.accBillNo = this.form.accountNo; // 账单编号 ACCT NO
- obj.billNo = this.form.businessNo; // 单据编号 JOB NO
- obj.mblno = this.form.mblno; // MB/L NO
- obj.hblno = this.form.hblno; // HB/L NO
- obj.isChecked = this.form.isChecked; // 是否对账(0 未对账 1 已对账)
- obj.queryAmount = this.form.queryAmount; // 查询金额
- obj.businessType = this.form.businessTypes; // 业务类型
- obj.invoiceStatus = this.form.isInvoice; // 发票状态 0 = 未开 9=已开 2 待开 3 不开
- obj.vesselCnName = this.form.vesselCnName; // 中文船名
- obj.invoiceNo = this.form.invoiceNo; // 发票号
- obj.bookingNo = this.form.bookingNo; // 订舱号 BKNO
- obj.createUserName = this.form.updateUser ? this.form.updateUser : null; // 操作员id
- obj.receivableAdvance = this.form.receivableAdvance; // 预收帐款
- obj.threeInspectionsNo = this.form.threeInspectionsNo; // 三检单号
- obj.voyageNo = this.form.voyageNo; // 航次
- obj.businessDateStart = this.form.businessDateStart; // 业务开始日期
- obj.businessDateEnd = this.form.businessDateEnd; // 业务结束日期
- obj.billDateStart = this.form.accountDateFrom; // 财务开始日期
- obj.billDateEnd = this.form.accountDateTo; // 财务开始日期
- obj.approveTimeStart = this.form.auditDateFrom; // 审核开始日期
- obj.approveTimeEnd = this.form.auditDateTo; // 审核结束日期
- obj.feeCnName = this.form.feeCnName;
- finstlbillslistAccBillByCorp(obj).then(res => {
- this.retrievePopupsType = true;
- this.retrievePopupsData = res.data.data;
- });
- },
- // 检索接口
- finstlbillslistAccBillV1fun(type) {
- // delete this.form.id;
- // let obj = JSON.parse(JSON.stringify(this.form))
- let obj = {};
- obj.type = "1";
- obj.auditStatus = this.form.isApproved; // 审核状态 0 新建费用 1 已请核 2 审核中 3 驳回 4 通过
- obj.corpCnName = this.form.corpId; // 对账单位
- obj.isSignfor = this.form.isSignfor; // 是否已签收(0 否 1是)
- obj.dc = this.form.dc; // 收付 D=收 C=付
- obj.curCode = this.form.curCode; // 币别
- obj.srcType = this.form.srcType; // 业务来源
- obj.srcCnName = this.form.srcId; // 业务员id
- obj.isCleared = this.form.isCleared; // 是否销账(0 未销账 3 部分销账 9 销账)
- obj.accBillNo = this.form.accountNo; // 账单编号 ACCT NO
- obj.billNo = this.form.businessNo; // 单据编号 JOB NO
- obj.mblno = this.form.mblno; // MB/L NO
- obj.hblno = this.form.hblno; // HB/L NO
- obj.isChecked = this.form.isChecked; // 是否对账(0 未对账 1 已对账)
- obj.queryAmount = this.form.queryAmount; // 查询金额
- obj.businessType = this.form.businessTypes; // 业务类型
- obj.invoiceStatus = this.form.isInvoice; // 发票状态 0 = 未开 9=已开 2 待开 3 不开
- obj.vesselCnName = this.form.vesselCnName; // 中文船名
- obj.invoiceNo = this.form.invoiceNo; // 发票号
- obj.bookingNo = this.form.bookingNo; // 订舱号 BKNO
- obj.createUserName = this.form.updateUser ? this.form.updateUser : null; // 操作员id
- obj.receivableAdvance = this.form.receivableAdvance; // 预收帐款
- obj.threeInspectionsNo = this.form.threeInspectionsNo; // 三检单号
- obj.voyageNo = this.form.voyageNo; // 航次
- obj.businessDateStart = this.form.businessDateStart; // 业务开始日期
- obj.businessDateEnd = this.form.businessDateEnd; // 业务结束日期
- obj.billDateStart = this.form.accountDateFrom; // 财务开始日期
- obj.billDateEnd = this.form.accountDateTo; // 财务开始日期
- obj.approveTimeStart = this.form.auditDateFrom; // 审核开始日期
- obj.approveTimeEnd = this.form.auditDateTo; // 审核结束日期
- obj.feeCnName = this.form.feeCnName;
- finstlbillslistAccBillV1(obj).then(res => {
- res.data.data.forEach((item, index) => {
- item.accBillId = item.id;
- delete item.id;
- item.lineNo = Number(index) + 1;
- this.$set(item, "currentStlCurCode", item.curCode);
- this.$set(item, "currentStlExrate", item.exrate);
- item.accBillNo = item.billNo;
- item.billNo = item.businessBillDivideNo ? item.businessBillDivideNo : item.businessBillNo;
- item.dc = item.accountDc; // 收付
- item.isSignfor = 0;
- item.isChecked = 0;
- if (item.curCode == "CNY") {
- this.$set(item, "amountRMB", item.amount);
- this.$set(item, "currentInvoiceAmountRMB", Number(item.currentInvoiceAmount ? item.currentInvoiceAmount : 0));
- // this.$set(item, "unsettledAmountRMB", Number(item.unsettledAmount ? item.unsettledAmount : 0));
- this.$set(item, "currentStlAmountRMB", Number(item.reconciliationCurrentAmount ? item.reconciliationCurrentAmount : 0));
- this.$set(item, "currentStlAmountUSD", Number(0));
- } else {
- this.$set(item, "amountUSD", item.amount);
- this.$set(item, "currentInvoiceAmountUSD", Number(item.currentInvoiceAmount ? item.currentInvoiceAmount : 0));
- // this.$set(item, "unsettledAmountUSD", Number(item.unsettledAmount ? item.unsettledAmount : 0));
- this.$set(item, "currentStlAmountUSD", Number(item.reconciliationCurrentAmount ? item.reconciliationCurrentAmount : 0));
- this.$set(item, "currentStlAmountRMB", Number(0));
- }
- });
- this.queryData = [];
- for (let item of res.data.data) {
- if (this.tableData.filter(row => row.accBillNo == item.accBillNo).length == 0) {
- this.queryData.push(item);
- }
- }
- if (this.queryData.length == 0 && type == "检索") {
- this.$message.warning("当前检索暂无数据!");
- }
- });
- },
- // 确认发票
- Confirminvoicefun(type) {
- if (this.handleSelectionData.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- for (let item of this.handleSelectionData) {
- if (item.isInvoice == 3) {
- this.$message.error("已不开发票,请重新选择");
- return;
- }
- }
- for (let item of this.handleSelectionData) {
- if (item.isInvoice == 2) {
- this.$message.error("已确认开票,请重新选择");
- return;
- }
- }
- this.$confirm("确定将选择数据确认开票?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.finstlbillsConfirmInvoicingfun(type);
- });
- },
- // 不开发票
- Notinvoicingfun(type) {
- if (this.handleSelectionData.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- if (type == 1) {
- for (let item of this.handleSelectionData) {
- if (item.isInvoice == 1) {
- this.$message.error("未确认开票,请重新选择");
- return;
- }
- if (item.isInvoice == 3) {
- this.$message.error("已不开发票,请重新选择");
- return;
- }
- }
- }
- if (type == 2) {
- for (let item of this.handleSelectionData) {
- if (item.isInvoice == 1) {
- this.$message.error("未不开发票,请重新选择");
- return;
- }
- if (item.isInvoice == 2) {
- this.$message.error("已确认开票,请重新选择");
- return;
- }
- }
- }
- this.$confirm("确定将选择数据撤销签收?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.finstlbillsRevokeInvoicingfun();
- });
- },
- // 确认发票接口
- finstlbillsConfirmInvoicingfun(type) {
- this.form.billNoFormat = "HYDZ";
- this.form.businessTypeCode = "HYDZ";
- this.form.businessType = "CHK"; //对账单
- this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
- this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
- this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
- // 保留id
- this.form.finStlBillsItemsList = this.handleSelectionData;
- let obj = {
- ...this.form,
- type: type
- };
- this.pageLoading = true;
- finstlbillsConfirmInvoicing(obj)
- .then(res => {
- this.$message.success("操作成功");
- this.finstlbillsDetailfun(res.data.data.id);
- })
- .finally(() => {
- this.pageLoading = false;
- });
- },
- // 撤销发票接口
- finstlbillsRevokeInvoicingfun() {
- this.form.billNoFormat = "HYDZ";
- this.form.businessTypeCode = "HYDZ";
- this.form.businessType = "CHK"; // 对账单
- this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
- this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
- this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
- this.form.finStlBillsItemsList = this.handleSelectionData;
- this.pageLoading = true;
- finstlbillsRevokeInvoicing(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.finstlbillsDetailfun(res.data.data.id);
- })
- .finally(() => {
- this.pageLoading = false;
- });
- },
- // 对账确认
- finstlbillsConfirmReconciliationfun() {
- this.pageLoading = true;
- this.saveLoading = true;
- this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
- this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
- this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
- (this.form.url = "/iosBasicData/finstlbills/index"), (this.form.pageStatus = "this.$store.getters.paidapplication");
- this.form.pageLabel = "对账中心(F)";
- finstlbillsConfirmReconciliation(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.editSave = true;
- this.finstlbillsDetailfun(res.data.data.id);
- })
- .finally(() => {
- this.pageLoading = false;
- this.saveLoading = false;
- });
- },
- // 对账撤销
- finstlbillsRevokeReconciliationfun() {
- this.$confirm("确定进行撤销对账操作?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.pageLoading = true;
- this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
- this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
- this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
- finstlbillsRevokeReconciliation(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.finstlbillsDetailfun(res.data.data.id);
- })
- .finally(() => {
- this.pageLoading = false;
- });
- });
- },
- // 确认签收
- ConfirmReceiptfun() {
- if (this.handleSelectionData.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- for (let item of this.handleSelectionData) {
- if (item.isSignfor == 1) {
- this.$message.warning("请选择未签收的数据进行签收");
- return;
- }
- }
- this.$confirm("确定将选择数据签收?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.finstlbillsConfirmSignForfun();
- });
- },
- // 撤销签收
- RevokeReceiptfun() {
- if (this.handleSelectionData.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- for (let item of this.handleSelectionData) {
- if (item.isSignfor == 0) {
- this.$message.warning("请选择已签收的数据进行撤销");
- return;
- }
- }
- this.$confirm("确定将选择数据撤销签收?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.finstlbillsRevokeSignForfun();
- });
- },
- batchConfirm() {
- if (this.handleSelectionData.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- for (let item of this.handleSelectionData) {
- // if (item.isSignfor == 0) {
- // return this.$message.error("请选择已签收的数据");
- // }
- if (item.isChecked == 1) {
- return this.$message.error("请选择未对账的数据");
- }
- }
- this.$confirm("是否对账?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.form.billNoFormat = "HYDZ";
- this.form.businessTypeCode = "HYDZ";
- this.form.businessType = "CHK"; //对账单
- this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
- this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
- this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
- // 保留id
- this.form.finStlBillsItemsList = this.handleSelectionData;
- this.pageLoading = true;
- batchConfirmReconciliation(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.finstlbillsDetailfun(this.form.id);
- })
- .finally(() => {
- this.pageLoading = false;
- });
- });
- },
- batchRevoke() {
- if (this.handleSelectionData.length === 0) {
- this.$message.error("请选择至少一条数据");
- return;
- }
- // for (let item of this.handleSelectionData) {
- // if (item.isChecked == 0) {
- // return this.$message.error("请选择已对账的数据");
- // }
- // }
- this.$confirm("是否撤销对账?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.form.billNoFormat = "HYDZ";
- this.form.businessTypeCode = "HYDZ";
- this.form.businessType = "CHK"; // 对账单
- this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
- this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
- this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
- this.form.finStlBillsItemsList = this.handleSelectionData;
- this.pageLoading = true;
- batchRevokeReconciliation(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.finstlbillsDetailfun(res.data.data.id);
- })
- .finally(() => {
- this.pageLoading = false;
- });
- });
- },
- // 一键删除
- batchDeletefun() {
- if (this.handleSelectionData.length == 0) {
- return this.$message.warning("请选择要删除的数据");
- }
- for (let item of this.handleSelectionData) {
- if (item.isSignfor == 1) {
- this.$message.error("已签收数据,不允许删除");
- return;
- }
- }
- for (let item of this.handleSelectionData) {
- if (item.isChecked == 1) {
- this.$message.error("已对账数据,不允许删除");
- return;
- }
- }
- for (let item of this.handleSelectionData) {
- if (item.isInvoice == 3) {
- this.$message.error("已不开发票,请重新选择");
- return;
- }
- }
- for (let item of this.handleSelectionData) {
- if (item.isInvoice == 2) {
- this.$message.error("已确认开票,请重新选择");
- return;
- }
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- // 获取有id 的数据
- const itemsWithId = this.handleSelectionData.filter(item => item.hasOwnProperty("id"));
- let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
- // 把选中的删除掉
- this.handleSelectionData.forEach(item => {
- for (let index in this.tableData) {
- if (item.accBillNo == this.tableData[index].accBillNo) {
- this.tableData.splice(Number(index), 1);
- }
- }
- });
- // 有id 的处理
- if (itemsWithId.length != 0) {
- finstlbillsitemsRemove(arrIds.join(",")).then(res => {
- this.$message.success("操作成功");
- this.finstlbillsDetailfun(this.form.id);
- });
- }
- });
- },
- // 确认选定行
- allCell() {
- if (this.addData.length == 0) {
- return this.$message.error("请选择明细");
- }
- for (let item of this.addData) {
- if (item.currentStlAmountRMB == 0 && item.currentStlAmountUSD == 0) {
- return this.$message.error("账单编号:" + item.accBillNo + "的对账数据不允许选定");
- }
- }
- this.editCustomer("query");
- },
- // 确认选定行
- addSelectionChange(arr) {
- this.amountDSubSum = 0;
- this.amountDSubUsdSum = 0;
- this.amountCSubSum = 0;
- this.amountCSubUsdSum = 0;
- if (arr.length) {
- arr.forEach(e => {
- console.log(e.accountDc);
- if (e.dc == "D") {
- this.amountDSubSum += Number(e.currentStlAmountRMB ? e.currentStlAmountRMB : 0);
- this.amountDSubUsdSum += Number(e.currentStlAmountUSD ? e.currentStlAmountUSD : 0);
- }
- if (e.dc == "C") {
- this.amountCSubSum += Number(e.currentStlAmountRMB ? e.currentStlAmountRMB : 0);
- this.amountCSubUsdSum += Number(e.currentStlAmountUSD ? e.currentStlAmountUSD : 0);
- }
- });
- }
- this.addData = arr;
- },
- // 下面表格多选
- handleSelectionChange(arr) {
- this.amountDSubSum2 = 0;
- this.amountDSubUsdSum2 = 0;
- this.amountCSubSum2 = 0;
- this.amountCSubUsdSum2 = 0;
- if (arr.length) {
- arr.forEach(e => {
- if (e.dc == "D") {
- this.amountDSubSum2 += Number(e.currentStlAmountRMB ? e.currentStlAmountRMB : 0);
- this.amountDSubUsdSum2 += Number(e.currentStlAmountUSD ? e.currentStlAmountUSD : 0);
- }
- if (e.dc == "C") {
- this.amountCSubSum2 += Number(e.currentStlAmountRMB ? e.currentStlAmountRMB : 0);
- this.amountCSubUsdSum2 += Number(e.currentStlAmountUSD ? e.currentStlAmountUSD : 0);
- }
- });
- }
- this.handleSelectionData = arr;
- },
- //返回列表
- backToList() {
- this.$emit("goBack");
- },
- // 请求的接口
- // 确认签收接口
- finstlbillsConfirmSignForfun() {
- this.form.billNoFormat = "HYDZ";
- this.form.businessTypeCode = "HYDZ";
- this.form.businessType = "CHK"; //对账单
- this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
- this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
- this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
- // 保留id
- this.form.finStlBillsItemsList = this.handleSelectionData;
- this.pageLoading = true;
- finstlbillsConfirmSignFor(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.finstlbillsDetailfun(res.data.data.id);
- })
- .finally(() => {
- this.pageLoading = false;
- });
- },
- // 撤销签收接口
- finstlbillsRevokeSignForfun() {
- this.form.billNoFormat = "HYDZ";
- this.form.businessTypeCode = "HYDZ";
- this.form.businessType = "CHK"; // 对账单
- this.form.accountDateFrom = this.form.accountDateFrom ? this.form.accountDateFrom.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.accountDateTo = this.form.accountDateTo ? this.form.accountDateTo.slice(0, 10) + " 00:00:00" : null; // 财务开始日期
- this.form.auditDateFrom = this.form.auditDateFrom ? this.form.auditDateFrom.slice(0, 10) + " 00:00:00" : null;
- this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) + " 00:00:00" : null;
- this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) + " 00:00:00" : null;
- this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + " 00:00:00" : null;
- this.form.finStlBillsItemsList = this.handleSelectionData;
- this.pageLoading = true;
- finstlbillsRevokeSignFor(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.finstlbillsDetailfun(res.data.data.id);
- })
- .finally(() => {
- this.pageLoading = false;
- });
- },
- // 获取 全部是否 接口
- allyesnoWorkDictsfun() {
- // 全部/是/否
- getWorkDicts("all_yes_no").then(res => {
- this.allyesnoData = res.data.data;
- });
- // 对账字典
- getWorkDicts("los_check_status").then(res => {
- this.isCheckedData = res.data.data;
- });
- // 销账(F)
- getWorkDicts("write_off_los").then(res => {
- this.isClearedData = [{ dictValue: "全部", dictKey: null }, ...res.data.data];
- });
- },
- // 获取发票的字典数据
- invoiceWorkDictsfun() {
- getWorkDicts("invoice_los").then(res => {
- this.isInvoiceData = res.data.data;
- });
- },
- // 获取币别数据
- getRateListfun(cnName) {
- getRateList({ current: 1, size: 10, cnName }).then(res => {
- this.curCodeData = res.data.data.records;
- });
- },
- // 获取操作员数据
- updateUserUserGetListfun(account) {
- userGetList(1, 10, { account }).then(res => {
- this.updateUserData = res.data.data.records;
- });
- },
- // 获取公司名称 用户管理左侧
- ownDeptLazyTreefun() {
- getDeptLazyTree(0).then(res => {
- this.srcData = res.data.data;
- });
- },
- // 获取业务来源代理数据
- srcBcorpsListfun(cnName) {
- let corpTypeName = "国内直接客户,国内同行及代理,国外直接客户,国外同行及代理";
- getBcorpslistByType(1, 10, { cnName, corpTypeName }).then(res => {
- this.srcData = res.data.data.records;
- });
- },
- // 获取业务员数据
- salesuserGetListfun(account = undefined, type = false) {
- userGetList(1, 10, { account }).then(res => {
- this.srcData = res.data.data.records;
- });
- },
- // 获取对账单位数据
- corpBcorpsListfun(cnName) {
- getBcorpslistByType(1, 10, { cnName }).then(res => {
- this.corpData = res.data.data.records;
- });
- },
- // 预览报表
- 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()
- // }
- }
- }
- };
- </script>
- <style scoped>
- ::v-deep.el-form-item {
- margin-bottom: 0;
- }
- .bottomFlex {
- display: flex;
- align-items: center;
- }
- .weightfont {
- font-size: 20px;
- font-weight: bold;
- }
- .weightnum {
- font-size: 15px;
- font-weight: 500;
- }
- </style>
|