feecenter.vue 148 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248
  1. <template>
  2. <div>
  3. <div>
  4. <el-form :model="assemblyForm" ref="form" label-width="90px" style="margin-bottom: 4px"
  5. class="demo-ruleForm">
  6. <el-row :gutter="10">
  7. <el-col :span="6">
  8. <el-form-item label="客户名称" prop="corpCnName">
  9. <span slot="label">
  10. <span style="color: #1e9fff">客户名称</span>
  11. </span>
  12. <el-input type="age" style="width: 100%;" v-model="assemblyForm.corpCnName" size="small"
  13. autocomplete="off" disabled clearable placeholder="客户名称"></el-input>
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="6">
  17. <el-form-item label="提单号" prop="mblno">
  18. <span slot="label">
  19. <span style="color: #1e9fff">提单号</span>
  20. </span>
  21. <el-input type="age" style="width: 100%;" v-model="assemblyForm.mblno" size="small"
  22. autocomplete="off" disabled clearable placeholder="提单号"></el-input>
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="6">
  26. <el-form-item label="箱型箱量" prop="containers">
  27. <span slot="label">
  28. <span style="color: #1e9fff">箱型箱量</span>
  29. </span>
  30. <el-input type="age" style="width: 100%;" v-model="assemblyForm.quantityCntrDescr"
  31. size="small" autocomplete="off" disabled clearable placeholder="箱型箱量"></el-input>
  32. </el-form-item>
  33. </el-col>
  34. </el-row>
  35. <el-row :gutter="10" v-if="business == 1">
  36. <el-col :span="6">
  37. <el-form-item label="报价方式" prop="quotationMethod">
  38. <dic-select v-model="assemblyForm.quotationMethod" placeholder="报价方式" key="dictKey"
  39. label="dictValue" :filterable="true"
  40. url="/blade-system/dict-biz/dictionary?code=quotationMethod"
  41. :disabled="detailData.seeDisabled"></dic-select>
  42. </el-form-item>
  43. </el-col>
  44. <el-col :span="6">
  45. <el-form-item label="自定义号" prop="userDefine4">
  46. <el-input style="width: 100%;" v-model="assemblyForm.hmmEdi.userDefine4" size="small"
  47. autocomplete="off" :disabled="detailData.seeDisabled" placeholder="请输入自定义号"></el-input>
  48. </el-form-item>
  49. </el-col>
  50. <el-col :span="6">
  51. <el-form-item label="结算方式" prop="accountPeriodType">
  52. <el-input style="width: 100%;" v-model="assemblyForm.accountPeriodType" size="small"
  53. autocomplete="off" disabled placeholder=""></el-input>
  54. </el-form-item>
  55. </el-col>
  56. </el-row>
  57. </el-form>
  58. </div>
  59. <!--显示 admin,应收修改,应收查看,应收查看只有打印账单一个功能 -->
  60. <el-card
  61. v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1 ? true : roleName.indexOf('应收查看') != -1"
  62. class="box-card">
  63. <avue-crud :option="optionD" :table-loading="loadingD" :data="assemblyForm.feeCenterListD" v-model="formD"
  64. id="out-table" :header-cell-class-name="headerClassName" ref="crudD" :row-style="{ height: '20px' }"
  65. :cell-style="{ padding: '0px' }" @selection-change="handleSelectionChange($event, 'D')"
  66. @resetColumn="resetColumnTwo('crudD', 'optionD', 'optionDBack', 309.2)"
  67. @saveColumn="saveColumnTwo('crudD', 'optionD', 'optionDBack', 309.2)">
  68. <template slot="menuLeft">
  69. <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
  70. <i class="el-icon-coin"></i>
  71. <span>应收费用</span>
  72. </div>
  73. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="danger"
  74. plain size="small" :disabled="!selectionDList.length || disabled || pleasereviewType"
  75. @click="batchDelete('D')">一键删除
  76. </el-button>
  77. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="success"
  78. plain size="small" :disabled="!selectionDList.length || disabled || pleasereviewType"
  79. @click="GenerateBillsfun('D')">生成账单
  80. </el-button>
  81. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="danger"
  82. plain size="small" :disabled="!selectionDList.length || disabled || pleasereviewType"
  83. @click="RevokingBillsfun('D')">撤销账单
  84. </el-button>
  85. <el-button type="primary" plain size="small" @click="printingCostsfun('D')">打印账单</el-button>
  86. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="success"
  87. plain size="small" :disabled="!this.assemblyForm.id || disabled || pleasereviewType"
  88. @click="templateClick('D')">应收模板</el-button>
  89. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="info"
  90. plain size="small" :disabled="disabled || pleasereviewType"
  91. @click="feecenterSubmitListfun">一键保存</el-button>
  92. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="info"
  93. plain size="small" :disabled="disabled || pleasereviewType" @click="feecenterEditfun('D')">一键编辑
  94. </el-button>
  95. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="primary"
  96. plain size="small" :disabled="disabled || pleasereviewType"
  97. @click="copyfun('D')">生成应付</el-button>
  98. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="primary"
  99. plain size="small" :disabled="disabled || pleasereviewType"
  100. @click="allClick('发票申请', 'D')">发票申请</el-button>
  101. </template>
  102. <template slot="indexHeader" slot-scope="scope">
  103. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="primary"
  104. size="small" icon="el-icon-plus" circle :disabled="disabled || pleasereviewType"
  105. @click="addDfun"></el-button>
  106. </template>
  107. <template slot="index" slot-scope="scope">
  108. <span>{{ scope.index + 1 }}</span>
  109. </template>
  110. <template slot="accStatus" slot-scope="{row,size}">
  111. <span>{{ row.accStatus ? '是' : '否' }}</span>
  112. </template>
  113. <template slot="corpCnName" slot-scope="{ row }">
  114. <search-query v-if="row.edit" :datalist="corpCnNameData" :selectValue="row.shortName"
  115. :filterable="true" :clearable="true" :remote="true" :buttonIf="false"
  116. :forParameter="{ key: 'id', label: 'shortName', value: 'shortName' }"
  117. @remoteMethod="getBcorpsListfun($event, 'shortName')"
  118. @corpChange="corpChange($event, 'shortName', row, 'D')"
  119. @corpFocus="getBcorpsListfun($event, 'shortName')">
  120. </search-query>
  121. <span v-else style="color: #1e9fff" @click="corpClick(row)">{{ row.shortName }}</span>
  122. </template>
  123. <template slot="feeCnName" slot-scope="{ row }">
  124. <search-query v-if="row.edit" :datalist="feeCnNameData" :selectValue="row.feeCnName"
  125. :filterable="true" :clearable="true" :remote="true" :buttonIf="false"
  126. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  127. @remoteMethod="bfeesListfun($event, 'feeCnName')"
  128. @corpChange="corpChange($event, 'feeCnName', row, 'D')"
  129. @corpFocus="bfeesListfun($event, 'feeCnName')">
  130. </search-query>
  131. <span v-else>{{ row.feeCnName }}</span>
  132. </template>
  133. <template slot="elementsCnName" slot-scope="{ row }">
  134. <search-query v-if="row.edit" :datalist="elementsData" :selectValue="row.elementsCnName"
  135. :filterable="true" :clearable="true" :remote="true" :buttonIf="false"
  136. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  137. @remoteMethod="getBaccelementsListfun($event, 'elementsCnName')"
  138. @corpChange="corpChange($event, 'elementsCnName', row, 'D')"
  139. @corpFocus="getBaccelementsListfun($event, 'elementsCnName')">
  140. </search-query>
  141. <span v-else>{{ row.elementsCnName }}</span>
  142. </template>
  143. <template slot="paymode" slot-scope="{ row }">
  144. <search-query v-if="row.edit" :datalist="paymodeData" :selectValue="row.paymode" :clearable="true"
  145. :buttonIf="false" :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
  146. @corpChange="corpChange($event, 'paymode', row, 'D')" @corpFocus="paymodeWorkDictsfun">
  147. </search-query>
  148. <span v-else>{{ row.paymode }}</span>
  149. </template>
  150. <template slot="unitNo" slot-scope="{ row }">
  151. <search-query v-if="row.edit" :datalist="unitNoData" :selectValue="row.unitNo" :filterable="true"
  152. :clearable="true" :remote="true" :buttonIf="false"
  153. :forParameter="{ key: 'id', label: 'code', value: 'code', disabled: 'status' }"
  154. @corpFocus="getBunitsPagefun" @corpChange="corpChange($event, 'unitNo', row, 'D')">
  155. </search-query>
  156. <span v-else>{{ row.unitNo }}</span>
  157. </template>
  158. <template slot="curCode" slot-scope="{ row }">
  159. <search-query v-if="row.edit" :datalist="curCodeData" :selectValue="row.curCode" :filterable="true"
  160. :clearable="true" :remote="true" :buttonIf="false"
  161. :forParameter="{ key: 'id', label: 'code', value: 'code' }"
  162. @remoteMethod="bcurrencyGetExratefun('D')" @corpChange="corpChange($event, 'curCode', row, 'D')"
  163. @corpFocus="bcurrencyGetExratefun('D')" :disabled="row.whetherForceCurNo == 1">
  164. </search-query>
  165. <span v-else>{{ row.curCode }}</span>
  166. </template>
  167. <template slot="isTax" slot-scope="{row}">
  168. <span>{{ row.isTax ? '是' : '否' }}</span>
  169. </template>
  170. <template slot="price" slot-scope="{ row }">
  171. <el-input-number v-if="row.edit" v-model="row.price" size="small" :controls="false" :precision="2"
  172. placeholder="请输入" @blur="priceinputfun($event, row)"></el-input-number>
  173. <span v-else>{{ row.price }}</span>
  174. </template>
  175. <template slot="quantity" slot-scope="{ row }">
  176. <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :controls="false"
  177. :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
  178. <span v-else>{{ row.quantity }}</span>
  179. </template>
  180. <template slot="taxRate" slot-scope="{ row }">
  181. <el-input-number v-if="row.edit" v-model="row.taxRate" size="small" :controls="false" :precision="3"
  182. placeholder="请输入"></el-input-number>
  183. <span v-else>{{ row.taxRate }}</span>
  184. </template>
  185. <template slot="surchargeRate" slot-scope="{ row }">
  186. <el-input-number v-if="row.edit" v-model="row.surchargeRate" size="small" :controls="false"
  187. :precision="3" placeholder="请输入"></el-input-number>
  188. <span v-else>{{ row.surchargeRate }}</span>
  189. </template>
  190. <template slot="remarks" slot-scope="{ row }">
  191. <el-input v-if="row.edit" v-model="row.remarks" size="small" placeholder="请输入"></el-input>
  192. <span v-else>{{ row.remarks }}</span>
  193. </template>
  194. <template slot-scope="scope" slot="menu">
  195. <!--<el-button v-if="scope.row.edit" type="text" size="small" @click="savefun(scope.row,scope.index,'D')">保存</el-button>-->
  196. <!--<el-button v-else type="text" size="small" :disabled="scope.row.accStatus || disabled || pleasereviewType" @click="editDfun(scope.row,scope.index)">编辑</el-button>-->
  197. <el-button type="text" size="small" :disabled="scope.row.accStatus || disabled || pleasereviewType"
  198. @click="deletefun(scope.row, scope.index, 'D')">删除</el-button>
  199. </template>
  200. </avue-crud>
  201. </el-card>
  202. <!--显示 admin,应付修改,应付查看,应付查看只有打印账单一个功能 -->
  203. <el-card
  204. v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1 ? true : roleName.indexOf('应付查看') != -1"
  205. class="box-card" style="margin: 4px 0">
  206. <avue-crud :option="optionC" :table-loading="loadingC" :data="assemblyForm.feeCenterListC" v-model="formC"
  207. id="out-table" :header-cell-class-name="headerClassName" ref="crudC" :row-style="{ height: '20px' }"
  208. :cell-style="{ padding: '0px' }" @selection-change="handleSelectionChange($event, 'C')"
  209. @resetColumn="resetColumnTwo('crudC', 'optionC', 'optionCBack', 309.3)"
  210. @saveColumn="saveColumnTwo('crudC', 'optionC', 'optionCBack', 309.3)">
  211. <template slot="menuLeft">
  212. <div style="display: inline-block;margin-right: 20px" class="disabledBox meetSize">
  213. <i class="el-icon-coin"></i>
  214. <span>应付费用</span>
  215. </div>
  216. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="danger"
  217. plain size="small" :disabled="!selectionCList.length || disabled || pleasereviewType"
  218. @click="batchDelete('C')">一键删除
  219. </el-button>
  220. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="primary"
  221. plain size="small" :disabled="!selectionCList.length || disabled || pleasereviewType"
  222. @click="GenerateBillsfun('C')">生成账单
  223. </el-button>
  224. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="danger"
  225. plain size="small" :disabled="!selectionCList.length || disabled || pleasereviewType"
  226. @click="RevokingBillsfun('C')">撤销账单
  227. </el-button>
  228. <el-button type="primary" plain size="small" @click="printingCostsfun('C')">打印账单</el-button>
  229. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="success"
  230. plain size="small" :disabled="!this.assemblyForm.id || disabled || pleasereviewType"
  231. @click="templateClick('C')">应付模板
  232. </el-button>
  233. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="info"
  234. plain size="small" :disabled="disabled || pleasereviewType" @click="feecenterSubmitListfun">一键保存
  235. </el-button>
  236. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="info"
  237. plain size="small" :disabled="disabled || pleasereviewType" @click="feecenterEditfun('C')">一键编辑
  238. </el-button>
  239. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="primary"
  240. plain size="small" :disabled="disabled || pleasereviewType" @click="copyfun('C')">生成应收
  241. </el-button>
  242. <el-button type="info" plain size="small" :disabled="disabled"
  243. @click="allClick('付费申请', 'C')">付费申请</el-button>
  244. </template>
  245. <template slot="indexHeader" slot-scope="scope">
  246. <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1" type="primary"
  247. size="small" icon="el-icon-plus" circle :disabled="disabled || pleasereviewType"
  248. @click="addCfun">
  249. </el-button>
  250. </template>
  251. <template slot="index" slot-scope="scope">
  252. <span>{{ scope.index + 1 }}</span>
  253. </template>
  254. <template slot="accStatus" slot-scope="{row,size}">
  255. <span>{{ row.accStatus ? '是' : '否' }}</span>
  256. </template>
  257. <template slot="corpCnName" slot-scope="{ row }">
  258. <search-query v-if="row.edit" :datalist="corpCnNameData" :selectValue="row.shortName"
  259. :filterable="true" :clearable="true" :remote="true" :buttonIf="false"
  260. :forParameter="{ key: 'id', label: 'shortName', value: 'shortName' }"
  261. @remoteMethod="getBcorpsListfun($event, 'shortName')"
  262. @corpChange="corpChange($event, 'shortName', row, 'C')"
  263. @corpFocus="getBcorpsListfun($event, 'shortName')">
  264. </search-query>
  265. <span v-else style="color: #1e9fff" @click="corpClick(row)">{{ row.shortName }}</span>
  266. </template>
  267. <template slot="feeCnName" slot-scope="{ row }">
  268. <search-query v-if="row.edit" :datalist="feeCnNameData" :selectValue="row.feeCnName"
  269. :filterable="true" :clearable="true" :remote="true" :buttonIf="false"
  270. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  271. @remoteMethod="bfeesListfun($event, 'feeCnName')"
  272. @corpChange="corpChange($event, 'feeCnName', row, 'C')"
  273. @corpFocus="bfeesListfun($event, 'feeCnName')">
  274. </search-query>
  275. <span v-else>{{ row.feeCnName }}</span>
  276. </template>
  277. <template slot="elementsCnName" slot-scope="{ row }">
  278. <search-query v-if="row.edit" :datalist="elementsData" :selectValue="row.elementsCnName"
  279. :filterable="true" :clearable="true" :remote="true" :buttonIf="false"
  280. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  281. @remoteMethod="getBaccelementsListfun($event, 'elementsCnName')"
  282. @corpChange="corpChange($event, 'elementsCnName', row, 'C')"
  283. @corpFocus="getBaccelementsListfun($event, 'elementsCnName')">
  284. </search-query>
  285. <span v-else>{{ row.elementsCnName }}</span>
  286. </template>
  287. <template slot="paymode" slot-scope="{ row }">
  288. <search-query v-if="row.edit" :datalist="paymodeData" :selectValue="row.paymode" :clearable="true"
  289. :buttonIf="false" :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
  290. @corpChange="corpChange($event, 'paymode', row, 'C')" @corpFocus="paymodeWorkDictsfun">
  291. </search-query>
  292. <span v-else>{{ row.paymode }}</span>
  293. </template>
  294. <template slot="unitNo" slot-scope="{ row }">
  295. <search-query v-if="row.edit" :datalist="unitNoData" :selectValue="row.unitNo" :filterable="true"
  296. :clearable="true" :remote="true" :buttonIf="false"
  297. :forParameter="{ key: 'id', label: 'code', value: 'code', disabled: 'status' }"
  298. @corpFocus="getBunitsPagefun" @corpChange="corpChange($event, 'unitNo', row, 'C')">
  299. </search-query>
  300. <span v-else>{{ row.unitNo }}</span>
  301. </template>
  302. <template slot="curCode" slot-scope="{ row }">
  303. <search-query v-if="row.edit" :datalist="curCodeData" :selectValue="row.curCode" :filterable="true"
  304. :clearable="true" :remote="true" :buttonIf="false"
  305. :forParameter="{ key: 'id', label: 'code', value: 'code' }"
  306. @remoteMethod="bcurrencyGetExratefun('C')" @corpChange="corpChange($event, 'curCode', row, 'C')"
  307. @corpFocus="bcurrencyGetExratefun('C')" :disabled="row.whetherForceCurNo == 1">
  308. </search-query>
  309. <span v-else>{{ row.curCode }}</span>
  310. </template>
  311. <template slot="isTax" slot-scope="{row}">
  312. <span>{{ row.isTax ? '是' : '否' }}</span>
  313. </template>
  314. <template slot="price" slot-scope="{ row }">
  315. <el-input-number v-if="row.edit" v-model="row.price" size="small" :controls="false" :precision="2"
  316. placeholder="请输入" @blur="priceinputfun($event, row)"></el-input-number>
  317. <span v-else>{{ row.price }}</span>
  318. </template>
  319. <template slot="quantity" slot-scope="{ row }">
  320. <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :controls="false"
  321. :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
  322. <span v-else>{{ row.quantity }}</span>
  323. </template>
  324. <template slot="taxRate" slot-scope="{ row }">
  325. <el-input-number v-if="row.edit" v-model="row.taxRate" size="small" :controls="false" :precision="3"
  326. placeholder="请输入"></el-input-number>
  327. <span v-else>{{ row.taxRate }}</span>
  328. </template>
  329. <template slot="surchargeRate" slot-scope="{ row }">
  330. <el-input-number v-if="row.edit" v-model="row.surchargeRate" size="small" :controls="false"
  331. :precision="3" placeholder="请输入"></el-input-number>
  332. <span v-else>{{ row.surchargeRate }}</span>
  333. </template>
  334. <template slot="remarks" slot-scope="{ row }">
  335. <el-input v-if="row.edit" v-model="row.remarks" size="small" placeholder="请输入"></el-input>
  336. <span v-else>{{ row.remarks }}</span>
  337. </template>
  338. <template slot-scope="scope" slot="menu">
  339. <!--<el-button v-if="scope.row.edit" type="text" size="small" @click="savefun(scope.row,scope.index,'C')">保存</el-button>-->
  340. <!--<el-button v-else type="text" size="small" :disabled="scope.row.accStatus || disabled || pleasereviewType" @click="editCfun(scope.row,scope.index)">编辑</el-button>-->
  341. <el-button type="text" size="small" :disabled="scope.row.accStatus || disabled || pleasereviewType"
  342. @click="deletefun(scope.row, scope.index, 'C')">删除</el-button>
  343. </template>
  344. </avue-crud>
  345. </el-card>
  346. <avue-crud v-show="assemblyForm.feeCenterAmendList.length > 0" id="out-table" class="box-card"
  347. :header-cell-class-name="headerClassName" ref="crud" :row-style="{ height: '16px' }"
  348. :cell-style="{ padding: '0px' }" :data="assemblyForm.feeCenterAmendList" :option="amendOption"></avue-crud>
  349. <div v-if="(roleName.indexOf('admin') != -1 || roleName.indexOf('利润查看') != -1 || ((roleName.indexOf('应收修改') != -1 || roleName.indexOf('应收查看') != -1) && (roleName.indexOf('应付修改') != -1 || roleName.indexOf('应付查看') != -1))) && amendsStatus"
  350. style="display: flex;align-items: center;justify-content: space-around">
  351. <div style="width: 30%">
  352. <div class="bottomFlex" style="justify-content: space-around">
  353. <div>
  354. <div style="color: #81B337">
  355. <span>Amend应收:</span>
  356. <span class="weightnum">¥{{ assemblyForm.amountDrAmend }}元</span>
  357. </div>
  358. </div>
  359. <div>
  360. <div style="color: #6BBCD1">
  361. <span>Amend应付:</span>
  362. <span class="weightnum">¥{{ assemblyForm.amountCrAmend }}元</span>
  363. </div>
  364. </div>
  365. <div class="bottomFlex">
  366. <span>Amend利润:</span>
  367. <span>¥{{ assemblyForm.amountProfitAmend }}元</span>
  368. </div>
  369. </div>
  370. </div>
  371. <div style="width: 30%">
  372. <div class="bottomFlex" style="justify-content: space-around">
  373. <div>
  374. <div style="color: #81B337">
  375. <span>Amend应收:</span>
  376. <span class="weightnum">${{ assemblyForm.amountDrUsdAmend }}元</span>
  377. </div>
  378. </div>
  379. <div>
  380. <div style="color: #6BBCD1">
  381. <span>Amend应付:</span>
  382. <span class="weightnum">${{ assemblyForm.amountCrUsdAmend }}元</span>
  383. </div>
  384. </div>
  385. <div class="bottomFlex">
  386. <span>Amend利润:</span>
  387. <span>${{ assemblyForm.amountProfitUsdAmend }}元</span>
  388. </div>
  389. </div>
  390. </div>
  391. <div style="width: 30%">
  392. <div class="bottomFlex" style="justify-content: space-around">
  393. <div>
  394. <div style="color: #81B337">
  395. <span>Amend应收:</span>
  396. <span class="weightnum">¥{{ assemblyForm.amountDrLocAmend }}元</span>
  397. </div>
  398. </div>
  399. <div>
  400. <div style="color: #6BBCD1">
  401. <span>Amend应付:</span>
  402. <span class="weightnum">¥{{ assemblyForm.amountCrLocAmend }}元</span>
  403. </div>
  404. </div>
  405. <div class="bottomFlex">
  406. <span>Amend利润:</span>
  407. <span>¥{{ assemblyForm.amountProfitLocAmend }}元</span>
  408. </div>
  409. </div>
  410. </div>
  411. </div>
  412. <avue-crud id="out-table" class="box-card" :header-cell-class-name="headerClassName" ref="crud"
  413. :row-style="{ height: '16px' }" :cell-style="{ padding: '0px' }" :option="sumOption"
  414. :data="sumData"></avue-crud>
  415. <!--有admin 显示,有收和付各一个也显示出来-->
  416. <div v-if="roleName.indexOf('admin') != -1 || ((roleName.indexOf('应收修改') != -1 || roleName.indexOf('应收查看') != -1) && (roleName.indexOf('应付修改') != -1 || roleName.indexOf('应付查看') != -1))"
  417. style="display: flex;align-items: center;justify-content: space-around">
  418. <div style="width: 30%">
  419. <div class="bottomFlex" style="justify-content: space-around">
  420. <div>
  421. <div style="color: #81B337">
  422. <span>应收:</span>
  423. <span class="weightnum">¥{{ assemblyForm.amountDr }}元</span>
  424. </div>
  425. </div>
  426. <div>
  427. <div style="color: #6BBCD1">
  428. <span>应付:</span>
  429. <span class="weightnum">¥{{ assemblyForm.amountCr }}元</span>
  430. </div>
  431. </div>
  432. <div class="bottomFlex">
  433. <span>利润</span>
  434. <span>¥{{ assemblyForm.amountProfit }}元</span>
  435. </div>
  436. </div>
  437. </div>
  438. <div style="width: 30%">
  439. <div class="bottomFlex" style="justify-content: space-around">
  440. <div>
  441. <div style="color: #81B337">
  442. <span>应收:</span>
  443. <span class="weightnum">${{ assemblyForm.amountDrUsd }}元</span>
  444. </div>
  445. </div>
  446. <div>
  447. <div style="color: #6BBCD1">
  448. <span>应付:</span>
  449. <span class="weightnum">${{ assemblyForm.amountCrUsd }}元</span>
  450. </div>
  451. </div>
  452. <div class="bottomFlex">
  453. <span>利润</span>
  454. <span>${{ assemblyForm.amountProfitUsd }}元</span>
  455. </div>
  456. </div>
  457. </div>
  458. <div style="width: 30%">
  459. <div class="bottomFlex" style="justify-content: space-around">
  460. <div>
  461. <div style="color: #81B337">
  462. <span>应收:</span>
  463. <span class="weightnum">¥{{ assemblyForm.amountDrLoc }}元</span>
  464. </div>
  465. </div>
  466. <div>
  467. <div style="color: #6BBCD1">
  468. <span>应付:</span>
  469. <span class="weightnum">¥{{ assemblyForm.amountCrLoc }}元</span>
  470. </div>
  471. </div>
  472. <div class="bottomFlex">
  473. <span>利润</span>
  474. <span>¥{{ assemblyForm.amountProfitLoc }}元</span>
  475. </div>
  476. </div>
  477. </div>
  478. </div>
  479. <!--模板弹窗-->
  480. <el-dialog title="提示" :visible.sync="templateVisible" append-to-body width="70%" :close-on-click-modal="false"
  481. :before-close="handleClose">
  482. <div>
  483. <el-row>
  484. <el-col :span="5">
  485. <div class="box">
  486. <el-scrollbar>
  487. <basic-container>
  488. <avue-tree :option="treeOption" :data="templateData" @node-click="nodeClick">
  489. </avue-tree>
  490. </basic-container>
  491. </el-scrollbar>
  492. </div>
  493. </el-col>
  494. <el-col :span="19">
  495. <basic-container>
  496. <avue-crud :option="templateOption" :data="templateRightData" ref="templateRef"
  497. @selection-change="feeselectionChange"
  498. @resetColumn="resetColumnTwo('templateRef', 'templateOption', 'templateOptionBack', 309.5)"
  499. @saveColumn="saveColumnTwo('templateRef', 'templateOption', 'templateOptionBack', 309.5)">
  500. <template slot="menuLeft">
  501. <el-button type="primary" size="small" @click="templateExport">导 入</el-button>
  502. </template>
  503. </avue-crud>
  504. </basic-container>
  505. </el-col>
  506. </el-row>
  507. </div>
  508. <span slot="footer" class="dialog-footer">
  509. <el-button @click="templateVisible = false; feesselectionList = []; templateRightData = []">取
  510. 消</el-button>
  511. <el-button type="primary" @click="templateExport">导 入</el-button>
  512. </span>
  513. </el-dialog>
  514. <!--结算单位弹窗-->
  515. <el-dialog title="导出" :visible.sync="corpVisible" append-to-body width="70%" :close-on-click-modal="false"
  516. :before-close="handleClose">
  517. <span slot="title">
  518. <el-button type="primary" size="mini" @click.stop="exportfun">导出</el-button>
  519. </span>
  520. <div style="padding-bottom: 30px;">
  521. <el-table :data="corpDialog" border show-summary size="mini"
  522. :row-style="{ height: '20px', padding: '0px', fontSize: '12px' }"
  523. :cell-style="{ padding: '0px', fontSize: '12px' }" style="width: 100%">
  524. <el-table-column prop="corpCnName" label="客户名称" width="140px">
  525. <template slot-scope="{ row }">
  526. <span class="textoverflow">{{ row.corpCnName }}</span>
  527. </template>
  528. </el-table-column>
  529. <el-table-column prop="mblno" label="MB/L NO" width="140px" />
  530. <el-table-column sortable :prop="`amount${dcDialogType}r`"
  531. :label="`应${dcDialogType == 'D' ? '收' : '付'}金额CNY`" width="120px" />
  532. <el-table-column sortable :prop="`amount${dcDialogType}rUsd`"
  533. :label="`应${dcDialogType == 'D' ? '收' : '付'}金额USD`" width="120px" />
  534. <el-table-column sortable :prop="`amount${dcDialogType}rLoc`"
  535. :label="`应${dcDialogType == 'D' ? '收' : '付'}金额合计CNY`" width="150px" />
  536. <el-table-column sortable :prop="`stlAmount${dcDialogType}r`"
  537. :label="`已结算应${dcDialogType == 'D' ? '收' : '付'}金额CNY`" width="160px" />
  538. <el-table-column sortable :prop="`stlAmount${dcDialogType}rUsd`"
  539. :label="`已结算应${dcDialogType == 'D' ? '收' : '付'}金额USD`" width="160px" />
  540. <el-table-column sortable :prop="`stlAmount${dcDialogType}rLoc`"
  541. :label="`已结算应${dcDialogType == 'D' ? '收' : '付'}金额合计CNY`" width="180px" />
  542. </el-table>
  543. </div>
  544. </el-dialog>
  545. <!--结算单位弹窗-->
  546. <el-dialog title="打印" :visible.sync="printingDialog" append-to-body width="70%" :close-on-click-modal="false"
  547. :before-close="handleClose">
  548. <div>
  549. <el-row :gutter="10">
  550. <el-col :span="4">
  551. <avue-tree :option="reportOption" :data="reportTypeData"
  552. @node-click="reportNodeClick"></avue-tree>
  553. </el-col>
  554. <el-col :span="20">
  555. <avue-crud :option="optionPrinting" :table-loading="printingLoading" :data="PrintingData"
  556. id="out-table" :header-cell-class-name="headerClassName" :row-style="{ height: '20px' }"
  557. :cell-style="{ padding: '0px' }">
  558. <template slot-scope="scope" slot="menu">
  559. <el-button type="text" size="small"
  560. @click="dialogPreviewfun(scope.row)">打印预览</el-button>
  561. </template>
  562. </avue-crud>
  563. </el-col>
  564. </el-row>
  565. </div>
  566. <span slot="footer" class="dialog-footer">
  567. <el-button size="small" @click="printingDialog = false;">取 消</el-button>
  568. </span>
  569. </el-dialog>
  570. <el-dialog title="打印" :visible.sync="selectPrintingDialog" append-to-body width="70%"
  571. :close-on-click-modal="false" :before-close="handleClose">
  572. <div>
  573. <reportformsList ref="reportformsList" @reportRadio="reportRadio"></reportformsList>
  574. </div>
  575. <span slot="footer" class="dialog-footer">
  576. <el-button size="small" @click="selectPrintingDialog = false;">取 消</el-button>
  577. </span>
  578. </el-dialog>
  579. <!--费用打印-->
  580. <reportContainer ref="reportContainer"></reportContainer>
  581. </div>
  582. </template>
  583. <script>
  584. import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
  585. import { amendsList } from "@/api/iosBasicData/amends";
  586. import { getBcorpsDetail, getBcorpsList } from "@/api/iosBasicData/bcorps";
  587. import { bfeesList } from "@/api/iosBasicData/bfees";
  588. import { getBunitsPage } from "@/api/iosBasicData/bunits";
  589. import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
  590. import {
  591. feecenterList,
  592. feecenterRemove,
  593. feecenterSubmit, feecenterSubmitList,
  594. finaccbillsGenerateBill, finaccbillsRevokeBill, getFeeCenterCorpIds
  595. } from "@/api/iosBasicData/feecenter";
  596. import { getWorkDicts } from "@/api/system/dictbiz";
  597. import {
  598. feecenterTemplateImport,
  599. listFeeCountByCorp,
  600. losbfeestemplateGetListTemplate,
  601. accountsReceivable
  602. } from "@/api/iosBasicData/bills";
  603. import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
  604. import { popupReminder, requiredMessage } from "@/util/messageReminder";
  605. import { getBaccelementsList } from "@/api/iosBasicData/baccelements";
  606. import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
  607. import { reportsGetReportData } from "@/api/iosBasicData/reports";
  608. import reportformsList from "@/views/iosBasicData/OceanFreightImport/bills/assembly/reportformsList.vue";
  609. import { isProcurement } from "@/api/basicData/configuration";
  610. import { getList as reportsList } from "@/api/iosBasicData/reports";
  611. import { dateFormat } from "@/util/date";
  612. import { getToken } from "@/util/auth";
  613. import { similarValues } from "@/util/verifyData";
  614. import dicSelect from "@/components/dicSelect/main";
  615. import _ from "lodash";
  616. export default {
  617. components: { reportContainer, SearchQuery, reportformsList,dicSelect },
  618. props: {
  619. pid: {
  620. },
  621. assemblyForm: {
  622. type: Object
  623. },
  624. detailData: {},
  625. // 请核之后禁用
  626. pleasereviewType: {
  627. type: Boolean,
  628. default: false,
  629. },
  630. // 拷贝的详情数据
  631. copyFormData: {
  632. type: Object,
  633. default: {}
  634. },
  635. disabled: {
  636. type: Boolean,
  637. default: false,
  638. },
  639. },
  640. data() {
  641. return {
  642. amendsStatus: false,
  643. amendOption: {
  644. border: true,
  645. align: 'center',
  646. menuAlign: 'center',
  647. menu: false,
  648. header: false,
  649. addBtn: false,
  650. // height: '100px',
  651. column: [
  652. {
  653. label: "账单",
  654. prop: "accStatus",
  655. width: "60",
  656. dicData: [
  657. {
  658. label: '否',
  659. value: 0
  660. },
  661. {
  662. label: '是',
  663. value: 1
  664. }
  665. ],
  666. overHidden: true,
  667. },
  668. {
  669. label: "结算单位",
  670. prop: "corpCnName",
  671. width: "160",
  672. overHidden: true,
  673. },
  674. {
  675. label: "费用简称",
  676. prop: "feeCnName",
  677. width: "120",
  678. overHidden: true,
  679. },
  680. {
  681. label: "预付/到付",
  682. prop: "paymode",
  683. width: "120",
  684. overHidden: true,
  685. },
  686. {
  687. label: "收/付",
  688. prop: "dc",
  689. width: "120",
  690. dicData: [
  691. {
  692. label: '收',
  693. value: 'D'
  694. },
  695. {
  696. label: '付',
  697. value: 'C'
  698. }
  699. ],
  700. overHidden: true,
  701. },
  702. {
  703. label: "计量单位",
  704. prop: "unitNo",
  705. width: "120",
  706. overHidden: true,
  707. },
  708. {
  709. label: "币种",
  710. prop: "curCode",
  711. width: "120",
  712. overHidden: true,
  713. },
  714. {
  715. label: "汇率",
  716. prop: "exrate",
  717. width: "100",
  718. overHidden: true,
  719. },
  720. {
  721. label: "单价",
  722. prop: "price",
  723. width: "120",
  724. overHidden: true,
  725. },
  726. {
  727. label: "数量",
  728. prop: "quantity",
  729. width: "120",
  730. overHidden: true,
  731. },
  732. {
  733. label: "CNY(含税)",
  734. prop: "rmbAmount",
  735. width: "100",
  736. overHidden: true,
  737. },
  738. {
  739. label: "USD(含税)",
  740. prop: "usdAmount",
  741. width: "100",
  742. overHidden: true,
  743. },
  744. {
  745. label: "CNY(净额)",
  746. prop: "rmbAmountNet",
  747. width: "100",
  748. overHidden: true,
  749. },
  750. {
  751. label: "USD(净额)",
  752. prop: "usdAmountNet",
  753. width: "100",
  754. overHidden: true,
  755. },
  756. {
  757. label: "核算要素",
  758. prop: "elementsCnName",
  759. width: "120",
  760. overHidden: true,
  761. },
  762. {
  763. label: "付费申请金额",
  764. prop: "appliedAmount",
  765. width: "120",
  766. overHidden: true,
  767. },
  768. {
  769. label: "发票号",
  770. prop: "invoiceNo",
  771. width: "120",
  772. overHidden: true,
  773. },
  774. {
  775. label: "发票申请金额",
  776. prop: "appliedInvoiceAmount",
  777. width: "120",
  778. overHidden: true,
  779. },
  780. {
  781. label: "已开票金额",
  782. prop: "uninvoicedAmount",
  783. width: "120",
  784. overHidden: true,
  785. },
  786. {
  787. label: "已结算金额",
  788. prop: "stlTtlAmount",
  789. width: "120",
  790. overHidden: true,
  791. },
  792. {
  793. label: "备注",
  794. prop: "remarks",
  795. width: "100",
  796. overHidden: true,
  797. },
  798. // {
  799. // label: "税率",
  800. // prop: "taxRate",
  801. // width: "100",
  802. // },
  803. // {
  804. // label: "附加税率",
  805. // prop: "surchargeRate",
  806. // width: "100",
  807. // },
  808. {
  809. label: "单价是否含税",
  810. prop: "isTax",
  811. width: "120",
  812. overHidden: true,
  813. }
  814. ]
  815. },
  816. sumData: [],
  817. sumOption: {
  818. border: true,
  819. align: 'center',
  820. menuAlign: 'center',
  821. menu: false,
  822. header: false,
  823. addBtn: false,
  824. // height: '100px',
  825. column: [
  826. {
  827. label: '客户',
  828. prop: 'corpCnName',
  829. overHidden: true,
  830. }, {
  831. label: 'RMB应收',
  832. prop: 'rmbD',
  833. overHidden: true,
  834. }, {
  835. label: 'RMB应付',
  836. prop: 'rmbC',
  837. overHidden: true,
  838. }, {
  839. label: 'USD应收',
  840. prop: 'usdD',
  841. overHidden: true,
  842. }, {
  843. label: 'USD应付',
  844. prop: 'usdC',
  845. overHidden: true,
  846. }, {
  847. label: '合计应收',
  848. prop: 'sumD',
  849. overHidden: true,
  850. }, {
  851. label: '合计应付',
  852. prop: 'sumC',
  853. overHidden: true,
  854. }
  855. ]
  856. },
  857. reportOption: {
  858. nodeKey: "id",
  859. addBtn: false,
  860. menu: false,
  861. size: "small",
  862. props: {
  863. labelText: "标题",
  864. label: "cnName",
  865. value: "value",
  866. children: "children"
  867. }
  868. },
  869. reportTypeData: [], // 打印选择的数据
  870. reportformsObj: {}, // 打印选择的数据
  871. selectPrintingDialog: false, // 打印弹窗
  872. printingDialog: false, // 打印弹窗开关
  873. printingDC: '', // 打印弹窗选择是应收还是应付
  874. PrintingData: [], // 打印弹窗列表数据
  875. printingLoading: false, // 打印弹窗加载动画
  876. optionPrinting: {
  877. stripe: true,
  878. maxHeight: '250',
  879. calcHeight: 30,
  880. tip: false,
  881. searchShow: true,
  882. searchMenuSpan: 6,
  883. border: true,
  884. selection: true,
  885. dialogClickModal: false,
  886. refreshBtn: false,
  887. columnBtn: false,
  888. addBtn: false,
  889. viewBtn: false,
  890. delBtn: false,
  891. editBtn: false,
  892. menuWidth: '100',
  893. // menu:false,
  894. column: [
  895. {
  896. label: "币别",
  897. prop: "curCode",
  898. width: 100,
  899. cell: true,
  900. type: 'select',
  901. dicData: [{
  902. label: '全部',
  903. value: null
  904. }, {
  905. label: 'USD',
  906. value: 'USD'
  907. }, {
  908. label: 'CNY',
  909. value: 'CNY'
  910. }],
  911. overHidden: true,
  912. },
  913. {
  914. label: "客户名称",
  915. prop: "cnName",
  916. overHidden: true,
  917. },
  918. {
  919. label: "客户编号",
  920. prop: "code",
  921. overHidden: true,
  922. },
  923. ]
  924. },
  925. corpVisible: false, // 结算单位弹窗
  926. corpDialog: [], // 结算单位弹窗数据
  927. dcDialogType: '', // 结算单位弹窗dc判断
  928. corpRow: {}, // 结算单位弹窗数据
  929. optionD: {},
  930. optionDBack: {
  931. stripe: true,
  932. maxHeight: '250',
  933. calcHeight: 30,
  934. tip: false,
  935. searchShow: true,
  936. searchMenuSpan: 6,
  937. border: true,
  938. selection: true,
  939. dialogClickModal: false,
  940. addBtn: false,
  941. viewBtn: false,
  942. delBtn: false,
  943. editBtn: false,
  944. menuWidth: '100',
  945. menu: false,
  946. column: [
  947. {
  948. label: "index",
  949. prop: "index",
  950. width: "55",
  951. headerslot: true,
  952. },
  953. {
  954. label: "账单",
  955. prop: "accStatus",
  956. width: "60",
  957. overHidden: true,
  958. },
  959. {
  960. label: "结算单位",
  961. prop: "corpCnName",
  962. width: "160",
  963. overHidden: true,
  964. },
  965. {
  966. label: "费用简称",
  967. prop: "feeCnName",
  968. width: "120",
  969. overHidden: true,
  970. },
  971. {
  972. label: "预付/到付",
  973. prop: "paymode",
  974. width: "120",
  975. overHidden: true,
  976. },
  977. {
  978. label: "计量单位",
  979. prop: "unitNo",
  980. width: "120",
  981. overHidden: true,
  982. },
  983. {
  984. label: "币种",
  985. prop: "curCode",
  986. width: "120",
  987. overHidden: true,
  988. },
  989. {
  990. label: "汇率",
  991. prop: "exrate",
  992. width: "100",
  993. overHidden: true,
  994. },
  995. {
  996. label: "单价",
  997. prop: "price",
  998. width: "120",
  999. overHidden: true,
  1000. },
  1001. {
  1002. label: "数量",
  1003. prop: "quantity",
  1004. width: "120",
  1005. overHidden: true,
  1006. },
  1007. {
  1008. label: "增值税率",
  1009. prop: "taxRate",
  1010. width: "120",
  1011. hide: true,
  1012. showColumn: false,
  1013. overHidden: true,
  1014. },
  1015. {
  1016. label: "附加费率",
  1017. prop: "surchargeRate",
  1018. width: "120",
  1019. hide: true,
  1020. showColumn: false,
  1021. overHidden: true,
  1022. },
  1023. {
  1024. label: "CNY(含税)",
  1025. prop: "rmbAmount",
  1026. width: "100",
  1027. overHidden: true,
  1028. },
  1029. {
  1030. label: "USD(含税)",
  1031. prop: "usdAmount",
  1032. width: "100",
  1033. overHidden: true,
  1034. },
  1035. {
  1036. label: "CNY(净额)",
  1037. prop: "rmbAmountNet",
  1038. width: "100",
  1039. overHidden: true,
  1040. },
  1041. {
  1042. label: "USD(净额)",
  1043. prop: "usdAmountNet",
  1044. width: "100",
  1045. overHidden: true,
  1046. },
  1047. {
  1048. label: "核算要素",
  1049. prop: "elementsCnName",
  1050. width: "120",
  1051. overHidden: true,
  1052. },
  1053. {
  1054. label: "付费申请金额",
  1055. prop: "appliedAmount",
  1056. width: "120",
  1057. overHidden: true,
  1058. },
  1059. {
  1060. label: "发票号",
  1061. prop: "invoiceNo",
  1062. width: "120",
  1063. overHidden: true,
  1064. },
  1065. {
  1066. label: "发票申请金额",
  1067. prop: "appliedInvoiceAmount",
  1068. width: "120",
  1069. overHidden: true,
  1070. },
  1071. {
  1072. label: "已开票金额",
  1073. prop: "uninvoicedAmount",
  1074. width: "120",
  1075. overHidden: true,
  1076. },
  1077. {
  1078. label: "已结算金额",
  1079. prop: "stlTtlAmount",
  1080. width: "120",
  1081. overHidden: true,
  1082. },
  1083. {
  1084. label: "备注",
  1085. prop: "remarks",
  1086. width: "100",
  1087. overHidden: true,
  1088. },
  1089. // {
  1090. // label: "税率",
  1091. // prop: "taxRate",
  1092. // width: "100",
  1093. // },
  1094. // {
  1095. // label: "附加税率",
  1096. // prop: "surchargeRate",
  1097. // width: "100",
  1098. // },
  1099. {
  1100. label: "单价是否含税",
  1101. prop: "isTax",
  1102. width: "120",
  1103. overHidden: true,
  1104. },
  1105. ]
  1106. },
  1107. loadingD: false,
  1108. formD: {},
  1109. optionC: {},
  1110. optionCBack: {
  1111. stripe: true,
  1112. maxHeight: '250',
  1113. calcHeight: 30,
  1114. tip: false,
  1115. searchShow: true,
  1116. searchMenuSpan: 6,
  1117. border: true,
  1118. selection: true,
  1119. dialogClickModal: false,
  1120. addBtn: false,
  1121. viewBtn: false,
  1122. delBtn: false,
  1123. editBtn: false,
  1124. menuWidth: '100',
  1125. menu: false,
  1126. column: [
  1127. {
  1128. label: "index",
  1129. prop: "index",
  1130. width: "55",
  1131. headerslot: true,
  1132. },
  1133. {
  1134. label: "账单",
  1135. prop: "accStatus",
  1136. width: "60",
  1137. overHidden: true,
  1138. },
  1139. {
  1140. label: "结算单位",
  1141. prop: "corpCnName",
  1142. width: "160",
  1143. overHidden: true,
  1144. },
  1145. {
  1146. label: "费用简称",
  1147. prop: "feeCnName",
  1148. width: "120",
  1149. overHidden: true,
  1150. },
  1151. {
  1152. label: "预付/到付",
  1153. prop: "paymode",
  1154. width: "120",
  1155. overHidden: true,
  1156. },
  1157. {
  1158. label: "计量单位",
  1159. prop: "unitNo",
  1160. width: "120",
  1161. overHidden: true,
  1162. },
  1163. {
  1164. label: "币种",
  1165. prop: "curCode",
  1166. width: "120",
  1167. overHidden: true,
  1168. },
  1169. {
  1170. label: "汇率",
  1171. prop: "exrate",
  1172. width: "100",
  1173. overHidden: true,
  1174. },
  1175. {
  1176. label: "单价",
  1177. prop: "price",
  1178. width: "120",
  1179. overHidden: true,
  1180. },
  1181. {
  1182. label: "数量",
  1183. prop: "quantity",
  1184. width: "120",
  1185. overHidden: true,
  1186. },
  1187. {
  1188. label: "增值税率",
  1189. prop: "taxRate",
  1190. width: "120",
  1191. hide: true,
  1192. showColumn: false,
  1193. overHidden: true,
  1194. },
  1195. {
  1196. label: "附加费率",
  1197. prop: "surchargeRate",
  1198. width: "120",
  1199. hide: true,
  1200. showColumn: false,
  1201. overHidden: true,
  1202. },
  1203. {
  1204. label: "CNY(含税)",
  1205. prop: "rmbAmount",
  1206. width: "100",
  1207. overHidden: true,
  1208. },
  1209. {
  1210. label: "USD(含税)",
  1211. prop: "usdAmount",
  1212. width: "100",
  1213. overHidden: true,
  1214. },
  1215. {
  1216. label: "CNY(净额)",
  1217. prop: "rmbAmountNet",
  1218. width: "100",
  1219. overHidden: true,
  1220. },
  1221. {
  1222. label: "USD(净额)",
  1223. prop: "usdAmountNet",
  1224. width: "100",
  1225. overHidden: true,
  1226. },
  1227. {
  1228. label: "核算要素",
  1229. prop: "elementsCnName",
  1230. width: "120",
  1231. overHidden: true,
  1232. },
  1233. {
  1234. label: "付费申请金额",
  1235. prop: "appliedAmount",
  1236. width: "120",
  1237. overHidden: true,
  1238. },
  1239. {
  1240. label: "发票号",
  1241. prop: "invoiceNo",
  1242. width: "120",
  1243. overHidden: true,
  1244. },
  1245. {
  1246. label: "发票申请金额",
  1247. prop: "appliedInvoiceAmount",
  1248. width: "120",
  1249. overHidden: true,
  1250. },
  1251. {
  1252. label: "已开票金额",
  1253. prop: "uninvoicedAmount",
  1254. width: "120",
  1255. overHidden: true,
  1256. },
  1257. {
  1258. label: "已结算金额",
  1259. prop: "stlTtlAmount",
  1260. width: "120",
  1261. overHidden: true,
  1262. },
  1263. {
  1264. label: "备注",
  1265. prop: "remarks",
  1266. width: "100",
  1267. overHidden: true,
  1268. },
  1269. // {
  1270. // label: "税率",
  1271. // prop: "taxRate",
  1272. // width: "100",
  1273. // },
  1274. // {
  1275. // label: "附加税率",
  1276. // prop: "surchargeRate",
  1277. // width: "100",
  1278. // },
  1279. {
  1280. label: "单价是否含税",
  1281. prop: "isTax",
  1282. width: "120",
  1283. overHidden: true,
  1284. },
  1285. ]
  1286. },
  1287. loadingC: false,
  1288. formC: {},
  1289. // 签单方式
  1290. issuetypefData: [],
  1291. value: '',
  1292. feeCenterListD: [], // 收
  1293. feeCenterListC: [], // 付
  1294. // 客户数据
  1295. corpCnNameData: [],
  1296. // 费用数据
  1297. feeCnNameData: [],
  1298. elementsData: [], // 核算要素
  1299. // 预付到付数据
  1300. paymodeData: [],
  1301. // 计算单位数据
  1302. unitNoData: [],
  1303. // 币别数据
  1304. curCodeData: [],
  1305. // 模板弹窗
  1306. templateVisible: false,
  1307. treeOption: {
  1308. nodeKey: "id",
  1309. // lazy: true,
  1310. addBtn: false,
  1311. menu: false,
  1312. size: "small",
  1313. props: {
  1314. labelText: "标题",
  1315. label: "cnName",
  1316. value: "value",
  1317. children: "children"
  1318. }
  1319. },
  1320. // 右侧详情数据
  1321. templateRightData: [],
  1322. // 导入弹窗表格的配置
  1323. templateOption: {},
  1324. templateOptionBack: {
  1325. menu: false,
  1326. stripe: true,
  1327. addBtn: false,
  1328. editBtn: false,
  1329. delBtn: false,
  1330. viewBtn: false,
  1331. index: true,
  1332. selection: true,
  1333. column: [
  1334. {
  1335. label: '客户',
  1336. prop: 'corpCnName',
  1337. overHidden: true,
  1338. },
  1339. {
  1340. label: '客户类型',
  1341. prop: 'corpType',
  1342. overHidden: true,
  1343. },
  1344. {
  1345. label: '费用',
  1346. prop: 'feeCnName',
  1347. overHidden: true,
  1348. },
  1349. {
  1350. label: '数量',
  1351. prop: 'quantity',
  1352. overHidden: true,
  1353. },
  1354. {
  1355. label: '单价',
  1356. prop: 'price',
  1357. overHidden: true,
  1358. },
  1359. {
  1360. label: '计量单位',
  1361. prop: 'unitNo',
  1362. overHidden: true,
  1363. },
  1364. {
  1365. label: '币别',
  1366. prop: 'curCode',
  1367. overHidden: true,
  1368. }
  1369. ]
  1370. },
  1371. // 左侧数据
  1372. templateData: [],
  1373. lefttemplate: {}, // 左侧选择的数据
  1374. // 选中的数据
  1375. feesselectionList: [],
  1376. selectionDList: [], // 收选择的
  1377. selectionCList: [], // 付选择的
  1378. // 需要加判断是否必填的数据
  1379. messageData: [
  1380. {
  1381. name: '客户',
  1382. value: 'corpCnName',
  1383. },
  1384. {
  1385. name: '业务来源',
  1386. value: 'srcType',
  1387. },
  1388. {
  1389. name: 'MBLNO',
  1390. value: 'mblno',
  1391. },
  1392. // {
  1393. // name:'REF MBLNO',
  1394. // value:'refno',
  1395. // },
  1396. {
  1397. name: '船名(VSL)',
  1398. value: 'vesselCnName',
  1399. },
  1400. {
  1401. name: '航次(VOY)',
  1402. value: 'voyageNo',
  1403. },
  1404. {
  1405. name: 'ETA',
  1406. value: 'eta',
  1407. },
  1408. {
  1409. name: '装货港',
  1410. value: 'polCnName',
  1411. },
  1412. {
  1413. name: '国外收货港',
  1414. value: 'placeReceiptName',
  1415. },
  1416. {
  1417. name: '目的港',
  1418. value: 'destinationNamePrint',
  1419. },
  1420. {
  1421. name: '包装单位',
  1422. value: 'packingUnit',
  1423. },
  1424. {
  1425. name: '船公司',
  1426. value: 'carrierCnName',
  1427. },
  1428. // {
  1429. // name:'场站',
  1430. // value:'cyCnName',
  1431. // },
  1432. {
  1433. name: '所属团队',
  1434. value: 'teamId',
  1435. },
  1436. ],
  1437. roleName: [], // 当前登录人的角色权限
  1438. business: null,
  1439. }
  1440. },
  1441. async created() {
  1442. // isProcurement({ "param": "business" }).then(res => {
  1443. // this.business = res.data.data
  1444. // })
  1445. isProcurement({ "param": "if.station" }).then(res => {
  1446. console.log(res)
  1447. if (res.data.data == 1) {
  1448. this.messageData.push({
  1449. name: '场站',
  1450. value: 'cyCnName',
  1451. })
  1452. }
  1453. })
  1454. this.roleName = localStorage.getItem('roleName').split(',') // 获取角色数据
  1455. this.optionD = await this.getColumnData(this.getColumnName(309.2), this.optionDBack);
  1456. this.optionC = await this.getColumnData(this.getColumnName(309.3), this.optionCBack);
  1457. isProcurement({ "param": "business" }).then(res => {
  1458. this.business = res.data.data
  1459. if (res.data.data == 1) {
  1460. this.optionD.column.forEach(item => {
  1461. if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
  1462. item.hide = false
  1463. item.showColumn = true
  1464. }
  1465. })
  1466. this.optionC.column.forEach(item => {
  1467. if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
  1468. item.hide = false
  1469. item.showColumn = true
  1470. }
  1471. })
  1472. }
  1473. })
  1474. // 导入弹窗的表格
  1475. this.templateOption = await this.getColumnData(this.getColumnName(309.5), this.templateOptionBack);
  1476. this.getBcorpsListfun() // 获取客户数据
  1477. this.paymodeWorkDictsfun() // 获取预付/到付数据
  1478. },
  1479. methods: {
  1480. getSum() {
  1481. let sumArr = []
  1482. let corpArr = []
  1483. let newArr = []
  1484. this.sumData = []
  1485. sumArr = this.assemblyForm.feeCenterListD.concat(this.assemblyForm.feeCenterListC)
  1486. sumArr.forEach(e => {
  1487. if (e.shortName) {
  1488. corpArr.push(e.shortName)
  1489. }
  1490. })
  1491. newArr = [... new Set(corpArr)]
  1492. newArr.forEach(e => {
  1493. let rmbD = 0
  1494. let rmbC = 0
  1495. let usdD = 0
  1496. let usdC = 0
  1497. let sumD = 0
  1498. let sumC = 0
  1499. sumArr.forEach(item => {
  1500. if (e == item.shortName) {
  1501. if (item.curCode == 'CNY' && item.dc == 'D') {
  1502. rmbD += Number(item.rmbAmount)
  1503. sumD += Number(item.rmbAmount)
  1504. }
  1505. if (item.curCode == 'CNY' && item.dc == 'C') {
  1506. rmbC += Number(item.rmbAmount)
  1507. sumC += Number(item.rmbAmount)
  1508. }
  1509. if (item.curCode == 'USD' && item.dc == 'D') {
  1510. usdD += Number(item.usdAmount)
  1511. sumD += Number(item.usdAmount) * Number(item.exrate)
  1512. }
  1513. if (item.curCode == 'USD' && item.dc == 'C') {
  1514. usdC += Number(item.usdAmount)
  1515. sumC += Number(item.usdAmount) * Number(item.exrate)
  1516. }
  1517. }
  1518. })
  1519. this.sumData.push({
  1520. corpCnName: e,
  1521. rmbD: _.round(rmbD, 2),
  1522. rmbC: _.round(rmbC, 2),
  1523. usdD: _.round(usdD, 2),
  1524. usdC: _.round(usdC, 2),
  1525. sumD: _.round(sumD, 2),
  1526. sumC: _.round(sumC, 2)
  1527. })
  1528. })
  1529. },
  1530. getKeyName(key) {
  1531. const item = this.corpCnNameData.find(item => item.cnName === key);
  1532. return item ? item.shortName : key;
  1533. },
  1534. // 弹窗导出
  1535. exportfun() {
  1536. const routeData = this.$router.resolve({
  1537. path: '/api/blade-los/finaccbills/listFeeCountByCorpExport',//跳转目标窗口的地址
  1538. query: {
  1539. dc: this.corpRow.dc,
  1540. corpId: this.corpRow.corpId
  1541. }
  1542. })
  1543. window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
  1544. },
  1545. // 费用弹窗里的打印
  1546. dialogPreviewfun(row) {
  1547. if (!this.reportformsObj.id) {
  1548. this.$message.warning('请选择打印类型')
  1549. return;
  1550. }
  1551. // 获取报表数据
  1552. reportsGetReportData({
  1553. billId: this.assemblyForm.id,
  1554. reportCode: this.reportformsObj.classifyCode,
  1555. groupCode: this.reportformsObj.groupCode,
  1556. corpIds: row.id,
  1557. curCode: row.curCode,
  1558. type: 'HYJK'
  1559. }).then(res => {
  1560. this.handleReportPreview(this.reportformsObj.url, res.data.data.data)
  1561. })
  1562. },
  1563. // 打印弹窗里回调
  1564. reportRadio(val) {
  1565. // 多选打印
  1566. let idArr = this.selectionDList.map(item => {
  1567. return item.id
  1568. })
  1569. // 获取报表数据
  1570. reportsGetReportData({
  1571. billId: this.assemblyForm.id,
  1572. reportCode: val.classifyCode,
  1573. groupCode: val.groupCode,
  1574. itemIds: idArr.join(','),
  1575. type: 'HYJK'
  1576. }).then(res => {
  1577. this.handleReportPreview(val.url, res.data.data.data)
  1578. })
  1579. },
  1580. // 打印费用
  1581. printingCostsfun(dc) {
  1582. this.printingDC = dc
  1583. let groupCode = ''
  1584. let selectionArr = []
  1585. if (dc == 'D') {
  1586. groupCode = '应收,应收-账单'
  1587. selectionArr = this.selectionDList
  1588. } else {
  1589. groupCode = '应付,应付-账单'
  1590. selectionArr = this.selectionCList
  1591. }
  1592. if (selectionArr.length > 0) {
  1593. // 打开选择弹窗
  1594. this.selectPrintingDialog = true
  1595. let page = {
  1596. pageSize: 10,
  1597. currentPage: 1,
  1598. total: 0
  1599. }
  1600. this.$nextTick(() => {
  1601. this.$refs.reportformsList.onLoad(page, {
  1602. businessType: 'HYJK',
  1603. classifyCode: '费用',
  1604. groupCode: groupCode
  1605. })
  1606. })
  1607. } else {
  1608. // 没有多选弹窗
  1609. this.printingLoading = true
  1610. getFeeCenterCorpIds({
  1611. billId: this.assemblyForm.id,
  1612. dc: dc,
  1613. type: 'HYJK',
  1614. }).then(res => {
  1615. this.printingLoading = false
  1616. res.data.data.forEach(e => {
  1617. e.$cellEdit = true
  1618. e.curCode = null
  1619. })
  1620. this.PrintingData = res.data.data
  1621. })
  1622. this.reportsListfun({
  1623. businessType: 'HYJK',
  1624. classifyCode: '费用',
  1625. groupCode: groupCode
  1626. })
  1627. this.printingDialog = true
  1628. }
  1629. },
  1630. // 获取打印表格数据
  1631. reportsListfun(obj) {
  1632. reportsList(1, 50, obj).then(res => {
  1633. this.reportTypeData = res.data.data.records
  1634. // 获取第一项的值
  1635. this.reportformsObj = res.data.data.records[0]
  1636. })
  1637. },
  1638. // 打印表格选择
  1639. reportNodeClick(data) {
  1640. this.reportformsObj = data
  1641. },
  1642. // 生成应收应付
  1643. copyfun(dc) {
  1644. let selection = []
  1645. if (dc == 'D') {
  1646. selection = this.selectionDList
  1647. if (this.selectionDList.length == 0) {
  1648. this.$message.warning('请先选择要复制的数据')
  1649. return
  1650. }
  1651. } else {
  1652. selection = this.selectionCList
  1653. if (this.selectionCList.length == 0) {
  1654. this.$message.warning('请先选择要复制的数据')
  1655. return
  1656. }
  1657. }
  1658. let arr = selection.map(item => {
  1659. let obj = {}
  1660. obj.feeId = item.feeId
  1661. obj.feeCnName = item.feeCnName
  1662. obj.feeEnName = item.feeEnName
  1663. obj.feeCode = item.feeCode
  1664. obj.elementsId = item.elementsId
  1665. obj.elementsCnName = item.elementsCnName
  1666. obj.elementsEnName = item.elementsEnName
  1667. obj.elementsCode = item.elementsCode
  1668. obj.curCode = item.curCode
  1669. obj.taxRate = item.taxRate
  1670. obj.paymode = item.paymode
  1671. obj.remarks = item.remarks
  1672. obj.amount = item.amount
  1673. obj.price = item.price
  1674. obj.quantity = item.quantity
  1675. obj.rmbAmount = item.rmbAmount
  1676. obj.taxRate = item.taxRate
  1677. obj.unitNo = item.unitNo
  1678. obj.usdAmount = item.usdAmount
  1679. obj.edit = true
  1680. obj.rmbAmountNet = item.rmbAmountNet
  1681. obj.usdAmountNet = item.usdAmountNet
  1682. obj.exrate = item.exrate
  1683. return obj
  1684. })
  1685. if (dc == 'D') {
  1686. this.assemblyForm.feeCenterListC = [...arr, ...this.assemblyForm.feeCenterListC]
  1687. } else {
  1688. this.assemblyForm.feeCenterListD = [...arr, ...this.assemblyForm.feeCenterListD]
  1689. }
  1690. },
  1691. // 结算单位弹窗开启
  1692. corpClick(row) {
  1693. this.corpVisible = true
  1694. listFeeCountByCorp({
  1695. corpId: row.corpId,
  1696. dc: row.dc
  1697. }).then(res => {
  1698. this.corpRow = row
  1699. this.dcDialogType = row.dc
  1700. this.corpDialog = res.data.data
  1701. })
  1702. },
  1703. // 模板导入
  1704. templateExport() {
  1705. if (!this.lefttemplate.id) {
  1706. this.$message.warning('请选择左侧数据')
  1707. return
  1708. }
  1709. if (this.feesselectionList.length > 0) {
  1710. feecenterTemplateImport({
  1711. ...this.lefttemplate,
  1712. feesTemplateItemsList: this.feesselectionList,
  1713. billNoId: this.assemblyForm.id
  1714. }).then(res => {
  1715. if (res.data.msg.indexOf('未导入') >= 0) {
  1716. this.$message({
  1717. type: "error",
  1718. message: res.data.msg
  1719. });
  1720. } else {
  1721. this.$message({
  1722. type: "success",
  1723. message: res.data.msg
  1724. });
  1725. }
  1726. this.feesselectionList = [] // 清空多选
  1727. this.templateRightData = [] // 清空数据
  1728. this.lefttemplate = {}
  1729. this.$emit('billsDetailfun')
  1730. this.templateVisible = false
  1731. })
  1732. } else {
  1733. this.$message.warning('请先选择要导入的数据')
  1734. }
  1735. },
  1736. // 模板
  1737. templateClick(dc) {
  1738. if (popupReminder(this.assemblyForm, this.messageData)) {
  1739. this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
  1740. confirmButtonText: "确定",
  1741. cancelButtonText: "取消",
  1742. type: "warning"
  1743. })
  1744. }
  1745. if (popupReminder(this.assemblyForm, this.messageData)) {
  1746. return;
  1747. }
  1748. this.templateVisible = true
  1749. losbfeestemplateGetListTemplate(1, 50, {
  1750. dc: dc,
  1751. status: 0,
  1752. type: 'HYJK'
  1753. }).then(res => {
  1754. this.templateData = res.data.data.records
  1755. // 查第一条的明细
  1756. losbfeestemplateDetail(this.templateData[0].id).then(res => {
  1757. this.templateRightData = res.data.data.feesTemplateItemsList
  1758. })
  1759. })
  1760. },
  1761. // 左侧选择
  1762. nodeClick(e) {
  1763. this.lefttemplate = e
  1764. losbfeestemplateDetail(e.id).then(res => {
  1765. this.templateRightData = res.data.data.feesTemplateItemsList
  1766. })
  1767. },
  1768. // 右侧选择回调
  1769. feeselectionChange(list) {
  1770. this.feesselectionList = list;
  1771. },
  1772. allClick(name, type) {
  1773. if (name == '付费申请') {
  1774. if (this.selectionCList.length == 0) return this.$message.error("请选择费用");
  1775. if (this.selectionCList.length != this.selectionCList.filter(e => e.corpCnName == this.selectionCList[0].corpCnName).length) return this.$message.error("请选择相同的结算单位");
  1776. if (this.$store.getters.payAppStatus) {
  1777. this.$alert("付费申请页面已存在,请关闭付费申请再进行操作", "温馨提示", {
  1778. confirmButtonText: "确定",
  1779. type: 'warning',
  1780. callback: action => {
  1781. }
  1782. });
  1783. } else {
  1784. this.$router.push({
  1785. path: `/iosBasicData/PaymentApplication/index`,
  1786. query: {
  1787. mblno: this.assemblyForm.mblno,
  1788. corpCnName: this.selectionCList[0].corpCnName,
  1789. corpId: this.selectionCList[0].corpId
  1790. }
  1791. })
  1792. }
  1793. }
  1794. if (name == '发票申请') {
  1795. if (this.selectionDList.length == 0) return this.$message.error("请选择费用");
  1796. if (this.selectionDList.length != this.selectionDList.filter(e => e.corpCnName == this.selectionDList[0].corpCnName).length) return this.$message.error("请选择相同的结算单位");
  1797. this.$router.push({
  1798. path: `/iosBasicData/fininvoicesApplyfor/index`,
  1799. query: {
  1800. mblno: this.assemblyForm.mblno,
  1801. corpCnName: this.selectionDList[0].corpCnName,
  1802. corpId: this.selectionDList[0].corpId
  1803. }
  1804. })
  1805. }
  1806. },
  1807. // 应收新增
  1808. addDfun() {
  1809. // 判断数据需要的数据是否有 有就弹窗
  1810. if (popupReminder(this.assemblyForm, this.messageData)) {
  1811. this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
  1812. confirmButtonText: "确定",
  1813. cancelButtonText: "取消",
  1814. type: "warning"
  1815. })
  1816. }
  1817. if (popupReminder(this.assemblyForm, this.messageData)) {
  1818. return;
  1819. }
  1820. // 如果是分单 判断是否有分单号
  1821. if (this.assemblyForm.billType == 'MH') {
  1822. if (!this.assemblyForm.hblno) {
  1823. this.$message({
  1824. message: '请先选择HBLNO',
  1825. type: 'warning'
  1826. });
  1827. return;
  1828. }
  1829. }
  1830. // 判断拷贝详情的数据是否要参数
  1831. if (popupReminder(this.copyFormData, this.messageData)) {
  1832. return this.$message.warning('请先点击右上角保存按钮保存数据')
  1833. }
  1834. let obj = {
  1835. edit: true
  1836. }
  1837. if (this.assemblyForm.feeCenterListD.length != 0) {
  1838. // 结算单位
  1839. obj.corpId = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpId
  1840. obj.corpCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpCnName
  1841. obj.corpEnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpEnName
  1842. obj.shortName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].shortName
  1843. obj.dc = 'D'
  1844. if (this.business == 1) {
  1845. accountsReceivable({ corpId: this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpId }).then(res => {
  1846. this.$set(obj, 'amountLimit', res.data.data.amountLimit)
  1847. this.$set(obj, 'noAmount', res.data.data.amount)
  1848. })
  1849. }
  1850. // // 费用简称
  1851. // obj.feeId = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeId
  1852. // obj.feeCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeCnName
  1853. // obj.feeEnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeEnName
  1854. // obj.feeCode = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeCode
  1855. // // 核算要素
  1856. // obj.elementsId = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].elementsId
  1857. // obj.elementsCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].elementsCnName
  1858. // obj.elementsEnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].elementsEnName
  1859. // obj.elementsCode = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].elementsCode
  1860. // 预付/到付
  1861. obj.paymode = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].paymode
  1862. // // 计量单位
  1863. // obj.unitNo = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].unitNo
  1864. // // 币种
  1865. // obj.curCode = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].curCode
  1866. // obj.taxRate = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].taxRate
  1867. // // 汇率
  1868. // obj.exrate = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].exrate
  1869. // // 单价
  1870. // obj.price = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].price
  1871. // // 数量
  1872. // obj.quantity = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].quantity
  1873. // // 金额
  1874. // obj.rmbAmount = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].rmbAmount
  1875. // obj.usdAmount = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].usdAmount
  1876. // obj.rmbAmountNet = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].rmbAmountNet
  1877. // obj.usdAmountNet = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].usdAmountNet
  1878. this.assemblyForm.feeCenterListD.push(obj)
  1879. } else {
  1880. // 结算单位拿主表客户名称
  1881. obj.corpId = this.assemblyForm.corpId
  1882. obj.corpCnName = this.assemblyForm.corpCnName.split(' - ')[0]
  1883. obj.corpEnName = this.assemblyForm.corpEnName
  1884. obj.dc = 'D'
  1885. // 预付/到付
  1886. obj.paymode = this.assemblyForm.mpaymode
  1887. getBcorpsDetail(this.assemblyForm.corpId).then(res => {
  1888. obj.shortName = res.data.data.shortName
  1889. this.assemblyForm.feeCenterListD.push(obj)
  1890. })
  1891. }
  1892. // this.assemblyForm.feeCenterListD.push(obj)
  1893. this.$nextTick(() => {
  1894. const container = this.$refs.crudD.$el.querySelector('.el-table__body-wrapper');
  1895. if (container) {
  1896. container.scrollTop = container.scrollHeight;
  1897. }
  1898. });
  1899. },
  1900. // 应付新增
  1901. addCfun() {
  1902. // 判断数据需要的数据是否有
  1903. // 判断数据需要的数据是否有 有就弹窗
  1904. if (popupReminder(this.assemblyForm, this.messageData)) {
  1905. this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
  1906. confirmButtonText: "确定",
  1907. cancelButtonText: "取消",
  1908. type: "warning"
  1909. })
  1910. }
  1911. if (popupReminder(this.assemblyForm, this.messageData)) {
  1912. return;
  1913. }
  1914. // 如果是分单 判断是否有分单号
  1915. if (this.assemblyForm.billType == 'MH') {
  1916. if (!this.assemblyForm.hblno) {
  1917. this.$message({
  1918. message: '请先选择HBLNO',
  1919. type: 'warning'
  1920. });
  1921. return;
  1922. }
  1923. }
  1924. // 判断拷贝详情的数据是否要参数
  1925. if (popupReminder(this.copyFormData, this.messageData)) {
  1926. return this.$message.warning('请先点击右上角保存按钮保存数据')
  1927. }
  1928. let obj = {
  1929. edit: true
  1930. }
  1931. if (this.assemblyForm.feeCenterListC.length != 0) {
  1932. // 结算单位
  1933. obj.corpId = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpId
  1934. obj.corpCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpCnName
  1935. obj.corpEnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpEnName
  1936. obj.shortName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].shortName
  1937. obj.dc = 'C'
  1938. // // 费用简称
  1939. // obj.feeId = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeId
  1940. // obj.feeCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeCnName
  1941. // obj.feeEnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeEnName
  1942. // obj.feeCode = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeCode
  1943. // // 核算要素
  1944. // obj.elementsId = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].elementsId
  1945. // obj.elementsCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].elementsCnName
  1946. // obj.elementsEnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].elementsEnName
  1947. // obj.elementsCode = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].elementsCode
  1948. // 预付/到付
  1949. obj.paymode = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].paymode
  1950. // // 计量单位
  1951. // obj.unitNo = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].unitNo
  1952. // // 币种
  1953. // obj.curCode = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].curCode
  1954. // obj.taxRate = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].taxRate
  1955. // // 汇率
  1956. // obj.exrate = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].exrate
  1957. // // 单价
  1958. // obj.price = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].price
  1959. // // 数量
  1960. // obj.quantity = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].quantity
  1961. // // 金额
  1962. // obj.rmbAmount = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].rmbAmount
  1963. // obj.usdAmount = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].usdAmount
  1964. // obj.rmbAmountNet = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].rmbAmountNet
  1965. // obj.usdAmountNet = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].usdAmountNet
  1966. this.assemblyForm.feeCenterListC.push(obj)
  1967. } else {
  1968. // 结算单位拿主表客户名称
  1969. // obj.corpId = this.assemblyForm.corpId
  1970. // obj.corpCnName = this.assemblyForm.corpCnName.split(' - ')[0]
  1971. // obj.corpEnName = this.assemblyForm.corpEnName
  1972. // 预付/到付
  1973. obj.dc = 'D'
  1974. obj.paymode = this.assemblyForm.mpaymode
  1975. // getBcorpsDetail(this.assemblyForm.corpId).then(res => {
  1976. // obj.shortName = res.data.data.shortName
  1977. // this.assemblyForm.feeCenterListC.push(obj)
  1978. // })
  1979. this.assemblyForm.feeCenterListC.push(obj)
  1980. }
  1981. this.$nextTick(() => {
  1982. const container = this.$refs.crudC.$el.querySelector('.el-table__body-wrapper');
  1983. if (container) {
  1984. container.scrollTop = container.scrollHeight;
  1985. }
  1986. });
  1987. },
  1988. // 应收编辑
  1989. editDfun(row, index) {
  1990. this.$delete(this.assemblyForm.feeCenterListD[index], 'edit')
  1991. this.$set(this.assemblyForm.feeCenterListD[index], 'edit', true)
  1992. },
  1993. // 应付编辑
  1994. editCfun(row, index) {
  1995. this.$delete(this.assemblyForm.feeCenterListC[index], 'edit')
  1996. this.$set(this.assemblyForm.feeCenterListC[index], 'edit', true)
  1997. },
  1998. // 应付应付保存
  1999. savefun(row, index, dc) {
  2000. if (!this.pid) {
  2001. this.$message({
  2002. message: '请先保存数据之后才能添加',
  2003. type: 'warning'
  2004. });
  2005. return
  2006. }
  2007. let sum = '请输入'
  2008. if (!row.corpId) {
  2009. sum += ` 序号${index + 1}结算单位`
  2010. }
  2011. if (!row.feeId) {
  2012. sum += ` 序号${index + 1}费用简称`
  2013. }
  2014. if (!row.elementsId) {
  2015. sum += ` 序号${index + 1}核算要素`
  2016. }
  2017. if (!row.curCode) {
  2018. sum += ` 序号${index + 1}币种`
  2019. }
  2020. if (sum != '请输入') {
  2021. this.$confirm(sum, {
  2022. confirmButtonText: "确定",
  2023. cancelButtonText: "取消",
  2024. type: "warning"
  2025. })
  2026. return;
  2027. }
  2028. // 收付 D=收 C=付
  2029. row.dc = dc
  2030. row.pid = this.pid
  2031. row.sort = Number(index) + 1
  2032. row.businessType = this.assemblyForm.businessType // 业务类型
  2033. row.billType = this.assemblyForm.billType // 单据类型
  2034. row.billNo = this.assemblyForm.billNo // 单据编号
  2035. row.billDate = this.assemblyForm.billDate // 单据日期
  2036. row.billCorpId = this.assemblyForm.corpId // 主表客户 id
  2037. row.billCorpCnName = this.assemblyForm.corpCnName // 主表客户中文名称
  2038. row.billCorpEnName = this.assemblyForm.corpEnName // 主表客户英文名称
  2039. row.lineId = this.assemblyForm.lineId // 航线 id
  2040. row.lineCnName = this.assemblyForm.lineCnName // 航线中文名称
  2041. row.lineEnName = this.assemblyForm.lineEnName // 航线英文名称
  2042. row.vesselId = this.assemblyForm.vesselId // 船名 id
  2043. row.vesselCnName = this.assemblyForm.vesselCnName // 中文船名
  2044. row.vesselEnName = this.assemblyForm.vesselEnName // 英文船名
  2045. row.voyageNo = this.assemblyForm.voyageNo // 航次
  2046. row.mblno = this.assemblyForm.mblno // MB/L NO
  2047. row.hblno = this.assemblyForm.hblno // HB/L NO
  2048. row.etd = this.assemblyForm.etd // 开船日期
  2049. row.eta = this.assemblyForm.eta // 到港日期
  2050. row.polId = this.assemblyForm.polId // 装货港 id
  2051. row.polCode = this.assemblyForm.polCode // 装货港代码
  2052. row.polCnName = this.assemblyForm.polCnName // 装货港中文名称
  2053. row.polEnName = this.assemblyForm.polEnName // 装货港英文名称
  2054. row.podId = this.assemblyForm.podId // 卸货港 id
  2055. row.podCode = this.assemblyForm.podCode // 卸货港代码
  2056. row.podCnName = this.assemblyForm.podCnName // 卸货港中文名称
  2057. row.podEnName = this.assemblyForm.podEnName // 卸货港英文名称
  2058. row.corpArgreementNo = this.assemblyForm.corpArgreementNo // 客户约号
  2059. this.feecenterSubmitfun(row)
  2060. },
  2061. // 生成账单
  2062. GenerateBillsfun(dc) {
  2063. if (popupReminder(this.assemblyForm, this.messageData)) {
  2064. this.$confirm(popupReminder(this.assemblyForm, this.messageData), {
  2065. confirmButtonText: "确定",
  2066. cancelButtonText: "取消",
  2067. type: "warning"
  2068. })
  2069. }
  2070. if (popupReminder(this.assemblyForm, this.messageData)) {
  2071. return;
  2072. }
  2073. let selectionArr = []
  2074. if (dc == 'D') {
  2075. selectionArr = this.selectionDList
  2076. } else {
  2077. selectionArr = this.selectionCList
  2078. }
  2079. // 判断必填项
  2080. let sum = '请输入'
  2081. for (let item of selectionArr) {
  2082. if (!item.id) {
  2083. this.$message.warning(`序号${item.$index + 1}请先保存再进行生成账单`)
  2084. return
  2085. }
  2086. if (!item.corpId) {
  2087. sum += ` 序号${item.$index + 1}结算单位`
  2088. }
  2089. if (!item.feeId) {
  2090. sum += ` 序号${item.$index + 1}费用简称`
  2091. }
  2092. if (!item.elementsId) {
  2093. sum += ` 序号${item.$index + 1}核算要素`
  2094. }
  2095. if (!item.curCode) {
  2096. sum += ` 序号${item.$index + 1}币种`
  2097. }
  2098. }
  2099. if (sum != '请输入') {
  2100. this.$confirm(sum, {
  2101. confirmButtonText: "确定",
  2102. cancelButtonText: "取消",
  2103. type: "warning"
  2104. })
  2105. return;
  2106. }
  2107. this.$confirm("确定将选择数据生成账单?", {
  2108. confirmButtonText: "确定",
  2109. cancelButtonText: "取消",
  2110. type: "warning"
  2111. }).then(() => {
  2112. let billList = []
  2113. if (dc == 'D') {
  2114. for (let item of this.selectionDList) {
  2115. billList.push(item)
  2116. }
  2117. this.finaccbillsGenerateBillfun(billList)
  2118. } else {
  2119. for (let item of this.selectionCList) {
  2120. billList.push(item)
  2121. }
  2122. this.finaccbillsGenerateBillfun(billList)
  2123. }
  2124. })
  2125. },
  2126. // 撤销账单
  2127. RevokingBillsfun(dc) {
  2128. this.$confirm("确定将选择数据撤销账单?", {
  2129. confirmButtonText: "确定",
  2130. cancelButtonText: "取消",
  2131. type: "warning"
  2132. }).then(() => {
  2133. let billList = []
  2134. if (dc == 'D') {
  2135. for (let item of this.selectionDList) {
  2136. billList.push(item)
  2137. }
  2138. this.finaccbillsRevokeBillfun(billList)
  2139. } else {
  2140. for (let item of this.selectionCList) {
  2141. billList.push(item)
  2142. }
  2143. this.finaccbillsRevokeBillfun(billList)
  2144. }
  2145. })
  2146. },
  2147. // 多选
  2148. handleSelectionChange(list, dc) {
  2149. if (dc == 'D') {
  2150. this.selectionDList = list
  2151. } else {
  2152. this.selectionCList = list
  2153. }
  2154. },
  2155. // 一键删除
  2156. batchDelete(dc) {
  2157. if (dc == 'D') {
  2158. for (let item of this.selectionDList) {
  2159. if (item.accStatus == 1) {
  2160. this.$message.warning('请选择没有生成账单的数据')
  2161. return
  2162. }
  2163. }
  2164. } else {
  2165. for (let item of this.feeCenterListC) {
  2166. if (item.accStatus == 1) {
  2167. this.$message.warning('请选择没有生成账单的数据')
  2168. return
  2169. }
  2170. }
  2171. }
  2172. this.$confirm("确定将选择数据删除?", {
  2173. confirmButtonText: "确定",
  2174. cancelButtonText: "取消",
  2175. type: "warning"
  2176. }).then(() => {
  2177. let multiList = []
  2178. let arr = []
  2179. if (dc == 'D') {
  2180. multiList = this.selectionDList
  2181. arr = this.assemblyForm.feeCenterListD
  2182. } else {
  2183. multiList = this.selectionCList
  2184. arr = this.assemblyForm.feeCenterListC
  2185. }
  2186. // 获取有id 的数据
  2187. const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
  2188. let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
  2189. // 把选中的删除掉
  2190. multiList.forEach((item) => {
  2191. for (let index in arr) {
  2192. if (JSON.stringify(item) == JSON.stringify(arr[index])) {
  2193. arr.splice(Number(index), 1)
  2194. }
  2195. }
  2196. })
  2197. // 有id 的处理
  2198. if (itemsWithId.length != 0) {
  2199. feecenterRemove(arrIds.join(',')).then(res => {
  2200. this.$message.success('操作成功')
  2201. // this.$emit('billsDetailfun')
  2202. })
  2203. }
  2204. })
  2205. },
  2206. // 应收删除
  2207. deletefun(row, index, dc) {
  2208. console.log(row, index, 1580)
  2209. this.$confirm("确定将选择数据删除?", {
  2210. confirmButtonText: "确定",
  2211. cancelButtonText: "取消",
  2212. type: "warning"
  2213. }).then(() => {
  2214. if (row.id) {
  2215. // 删除接口
  2216. feecenterRemove(row.id).then(res => {
  2217. this.$message({
  2218. type: "success",
  2219. message: "操作成功!"
  2220. });
  2221. this.$emit('billsDetailfun')
  2222. })
  2223. } else {
  2224. if (dc == 'D') {
  2225. this.assemblyForm.feeCenterListD.splice(index, 1)
  2226. } else {
  2227. this.assemblyForm.feeCenterListC.splice(index, 1)
  2228. }
  2229. }
  2230. })
  2231. },
  2232. // 客户的回调
  2233. async corpChange(value, name, row, dc) {
  2234. if (name == 'shortName') {
  2235. console.log(value, name)
  2236. if (!value) {
  2237. this.$set(row, 'shortName', '')
  2238. this.$set(row, 'corpCnName', '')
  2239. this.$set(row, 'corpEnName', '')
  2240. this.$set(row, 'corpId', '')
  2241. }
  2242. for (let item of this.corpCnNameData) {
  2243. if (item.shortName == value) {
  2244. console.log(item)
  2245. this.$set(row, 'shortName', item.shortName)
  2246. this.$set(row, 'corpCnName', item.cnName)
  2247. this.$set(row, 'corpEnName', item.enName)
  2248. this.$set(row, 'corpId', item.id)
  2249. if (dc == 'D' && this.business == 1) {
  2250. accountsReceivable({ corpId: item.id }).then(res => {
  2251. this.$set(row, 'amountLimit', res.data.data.amountLimit)
  2252. this.$set(row, 'noAmount', res.data.data.amount)
  2253. })
  2254. }
  2255. }
  2256. }
  2257. } else if (name == 'feeCnName') {
  2258. if (!value) {
  2259. this.$set(row, 'feeCnName', '')
  2260. this.$set(row, 'feeEnName', '')
  2261. this.$set(row, 'feeId', '')
  2262. this.$set(row, 'feeCode', '')
  2263. if (this.business == 1) {
  2264. this.$set(row, 'whetherForceCurNo', '')
  2265. }
  2266. // 选择费用简称带出核算要素
  2267. this.$set(row, 'elementsId', '')
  2268. this.$set(row, 'elementsCnName', '')
  2269. this.$set(row, 'elementsCode', '')
  2270. this.$set(row, 'elementsEnName', '')
  2271. }
  2272. for (let item of this.feeCnNameData) {
  2273. if (item.cnName == value) {
  2274. if (value == 'PS') {
  2275. // 判断是否是分单
  2276. if (this.assemblyForm.billType == 'MH') {
  2277. this.$confirm('分单不能添加PS', {
  2278. confirmButtonText: "确定",
  2279. cancelButtonText: "取消",
  2280. type: "warning"
  2281. })
  2282. this.$set(row, 'feeCnName', '')
  2283. this.$set(row, 'feeEnName', '')
  2284. this.$set(row, 'feeId', '')
  2285. this.$set(row, 'feeCode', '')
  2286. if (this.business == 1) {
  2287. this.$set(row, 'whetherForceCurNo', '')
  2288. }
  2289. // 核算要素
  2290. this.$set(row, 'elementsId', '')
  2291. this.$set(row, 'elementsCnName', '')
  2292. this.$set(row, 'elementsCode', '')
  2293. this.$set(row, 'elementsEnName', '')
  2294. return
  2295. }
  2296. // 查询当前客户的 ps规则是否等于零和null
  2297. const psres = await getBcorpsDetail(this.assemblyForm.corpId)
  2298. if (!psres.data.data.psRate || Number(psres.data.data.psRate) == 0) {
  2299. this.$confirm('PS规则为零不能添加费用', {
  2300. confirmButtonText: "确定",
  2301. cancelButtonText: "取消",
  2302. type: "warning"
  2303. })
  2304. this.$set(row, 'feeCnName', '')
  2305. this.$set(row, 'feeEnName', '')
  2306. this.$set(row, 'feeId', '')
  2307. this.$set(row, 'feeCode', '')
  2308. if (this.business == 1) {
  2309. this.$set(row, 'whetherForceCurNo', '')
  2310. }
  2311. // 核算要素
  2312. this.$set(row, 'elementsId', '')
  2313. this.$set(row, 'elementsCnName', '')
  2314. this.$set(row, 'elementsCode', '')
  2315. this.$set(row, 'elementsEnName', '')
  2316. return
  2317. }
  2318. }
  2319. this.$set(row, 'feeCnName', item.cnName)
  2320. this.$set(row, 'feeEnName', item.enName)
  2321. this.$set(row, 'feeId', item.id)
  2322. this.$set(row, 'feeCode', item.code)
  2323. if (this.business == 1) {
  2324. this.$set(row, 'whetherForceCurNo', item.whetherForceCurNo)
  2325. }
  2326. // 选择费用简称带出核算要素
  2327. this.$set(row, 'elementsId', item.accElementId)
  2328. this.$set(row, 'elementsCnName', item.accElementName)
  2329. this.$set(row, 'elementsCode', item.elementsCode)
  2330. this.$set(row, 'elementsEnName', item.elementsEnName)
  2331. // 拿取费用简称下的计量单位
  2332. this.getBunitsPagefun(true, item, row)
  2333. // 币别
  2334. if (value == 'PS') {
  2335. this.$set(row, 'curCode', 'USD')
  2336. } else {
  2337. this.$set(row, 'curCode', item.curNo)
  2338. }
  2339. // 汇率
  2340. bcurrencyGetExrate({
  2341. date: this.assemblyForm.etd ? this.assemblyForm.etd.slice(0, 10) + ' 00:00:00' : dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00:00', // 开船日期
  2342. dc: dc
  2343. }).then(res => {
  2344. for (let item of res.data.data) {
  2345. if (item.code == row.curCode) {
  2346. this.$set(row, 'exrate', item.exrate)
  2347. }
  2348. }
  2349. })
  2350. // 计算金额
  2351. this.$set(row, 'amount', Number(row.price) * Number(row.quantity ? row.quantity : 0))
  2352. if (row.curCode == 'CNY') {
  2353. this.$set(row, 'rmbAmount', row.amount.toFixed(2))
  2354. this.$set(row, 'usdAmount', '')
  2355. this.$set(row, 'rmbAmountNet', row.amount.toFixed(2))
  2356. this.$set(row, 'usdAmountNet', '')
  2357. } else {
  2358. this.$set(row, 'usdAmount', row.amount.toFixed(2))
  2359. this.$set(row, 'rmbAmount', '')
  2360. this.$set(row, 'usdAmountNet', row.amount.toFixed(2))
  2361. this.$set(row, 'rmbAmountNet', '')
  2362. }
  2363. }
  2364. }
  2365. } else if (name == 'unitNo') {
  2366. // 计量单位
  2367. this.$set(row, name, value)
  2368. for (let item of this.unitNoData) {
  2369. if (item.code == value) {
  2370. // 按箱型
  2371. if (item.quantityRule == 1) {
  2372. // 选择的箱那边的数据
  2373. if (item.boxquantity) {
  2374. this.$set(row, 'quantity', item.boxquantity)
  2375. }
  2376. }
  2377. // 按票
  2378. if (item.quantityRule == 2) {
  2379. this.$set(row, 'quantity', 1)
  2380. }
  2381. // 按重量
  2382. if (item.quantityRule == 3) {
  2383. this.$set(row, 'quantity', this.assemblyForm.grossWeight)
  2384. }
  2385. // 按TEU
  2386. if (item.quantityRule == 4) {
  2387. this.$set(row, 'quantity', item.boxquantity)
  2388. }
  2389. // 按尺码
  2390. if (item.quantityRule == 5) {
  2391. this.$set(row, 'quantity', this.assemblyForm.measurement)
  2392. }
  2393. // 按件数
  2394. if (item.quantityRule == 6) {
  2395. this.$set(row, 'quantity', this.assemblyForm.quantity)
  2396. }
  2397. }
  2398. }
  2399. this.$set(row, 'amount', Number(row.price ? row.price : 0) * Number(row.quantity ? row.quantity : 0))
  2400. if (row.curCode == 'CNY') {
  2401. this.$set(row, 'rmbAmount', row.amount.toFixed(2))
  2402. this.$set(row, 'usdAmount', '')
  2403. this.$set(row, 'rmbAmountNet', row.amount.toFixed(2))
  2404. this.$set(row, 'usdAmountNet', '')
  2405. } else {
  2406. this.$set(row, 'usdAmount', row.amount.toFixed(2))
  2407. this.$set(row, 'rmbAmount', '')
  2408. this.$set(row, 'usdAmountNet', row.amount.toFixed(2))
  2409. this.$set(row, 'rmbAmountNet', '')
  2410. }
  2411. } else if (name == 'elementsCnName') {
  2412. if (!value) {
  2413. this.$set(row, 'elementsId', '')
  2414. this.$set(row, 'elementsCnName', '')
  2415. this.$set(row, 'elementsCode', '')
  2416. this.$set(row, 'elementsEnName', '')
  2417. }
  2418. // 核算要素
  2419. for (let item of this.elementsData) {
  2420. if (item.cnName == value) {
  2421. this.$set(row, 'elementsId', item.id)
  2422. this.$set(row, 'elementsCnName', item.cnName)
  2423. this.$set(row, 'elementsCode', item.code)
  2424. this.$set(row, 'elementsEnName', item.enName)
  2425. }
  2426. }
  2427. } else if (name == 'curCode') {
  2428. if (row.feeCnName == 'PS') {
  2429. this.$set(row, 'curCode', '')
  2430. value = 'USD'
  2431. }
  2432. for (let item of this.curCodeData) {
  2433. if (item.code == value) {
  2434. if (item.code == 'USD') {
  2435. if (Number(item.exrate) <= 1) {
  2436. this.$message.warning('当前选择的币别汇率不能小于零')
  2437. return
  2438. }
  2439. } else {
  2440. if (Number(item.exrate) == 0) {
  2441. this.$message.warning('当前选择的币别汇率不能为零')
  2442. return
  2443. }
  2444. }
  2445. this.$set(row, 'curCode', item.code)
  2446. this.$set(row, 'exrate', item.exrate)
  2447. this.$set(row, 'amount', Number(row.price) * Number(row.quantity ? row.quantity : 0))
  2448. if (row.curCode == 'CNY') {
  2449. this.$set(row, 'rmbAmount', row.amount.toFixed(2))
  2450. this.$set(row, 'usdAmount', '')
  2451. this.$set(row, 'rmbAmountNet', row.amount.toFixed(2))
  2452. this.$set(row, 'usdAmountNet', '')
  2453. } else {
  2454. this.$set(row, 'usdAmount', row.amount.toFixed(2))
  2455. this.$set(row, 'rmbAmount', '')
  2456. this.$set(row, 'usdAmountNet', row.amount.toFixed(2))
  2457. this.$set(row, 'rmbAmountNet', '')
  2458. }
  2459. }
  2460. }
  2461. } else {
  2462. this.$set(row, name, value)
  2463. }
  2464. },
  2465. // 单价
  2466. priceinputfun(value, row) {
  2467. if (Number(value) <= 0) {
  2468. this.$message({
  2469. type: "warning",
  2470. message: "单价不能输入负数!"
  2471. });
  2472. return
  2473. }
  2474. this.$set(row, 'amount', Number(row.price) * Number(row.quantity ? row.quantity : 0))
  2475. // 判断是否有币种
  2476. if (!row.curCode) {
  2477. return;
  2478. }
  2479. if (row.amountLimit && row.noAmount && row.amount) {
  2480. if ((Number(row.amount) + Number(row.noAmount)) > Number(row.amountLimit)) {
  2481. this.$message.error(`应收账款:${(Number(row.amount) + Number(row.noAmount))}超出限额:${Number(row.amountLimit)}`);
  2482. delete row.amountLimit
  2483. delete row.noAmount
  2484. }
  2485. }
  2486. if (this.business == 1 && row.feeCode == 'YWF' && row.dc == 'C') {
  2487. let ywfSumD = 0
  2488. let ywfSumC = 0
  2489. for (let item of this.assemblyForm.feeCenterListD) {
  2490. if (item.feeCode == 'YWF') {
  2491. ywfSumD += Number(item.amount)
  2492. }
  2493. }
  2494. for (let item of this.assemblyForm.feeCenterListC) {
  2495. if (item.feeCode == 'YWF') {
  2496. ywfSumC += Number(item.amount)
  2497. }
  2498. }
  2499. if (Number(ywfSumC) > (Number(ywfSumD) * 0.8)) {
  2500. this.$set(row, 'price', 0)
  2501. return this.$message.error('应付的业务费不能超过应收业务费的80%');
  2502. }
  2503. }
  2504. if (row.curCode == 'CNY') {
  2505. this.$set(row, 'rmbAmount', row.amount.toFixed(2))
  2506. this.$set(row, 'usdAmount', '')
  2507. this.$set(row, 'rmbAmountNet', row.amount.toFixed(2))
  2508. this.$set(row, 'usdAmountNet', '')
  2509. } else {
  2510. this.$set(row, 'usdAmount', row.amount.toFixed(2))
  2511. this.$set(row, 'rmbAmount', '')
  2512. this.$set(row, 'usdAmountNet', row.amount.toFixed(2))
  2513. this.$set(row, 'rmbAmountNet', '')
  2514. }
  2515. },
  2516. // 数量
  2517. quantityinputfun(row) {
  2518. if (row.quantity <= 0) {
  2519. this.$message({
  2520. type: "warning",
  2521. message: "数量不能输入负数!"
  2522. });
  2523. this.$set(row, 'quantity', 1)
  2524. return
  2525. }
  2526. this.$set(row, 'amount', Number(row.price ? row.price : 0) * Number(row.quantity))
  2527. // 判断是否有币种
  2528. if (!row.curCode) {
  2529. return;
  2530. }
  2531. if (row.amountLimit && row.noAmount && row.amount) {
  2532. if ((Number(row.amount) + Number(row.noAmount)) > Number(row.amountLimit)) {
  2533. this.$message.error(`应收账款:${(Number(row.amount) + Number(row.noAmount))}超出限额:${Number(row.amountLimit)}`);
  2534. delete row.amountLimit
  2535. delete row.noAmount
  2536. }
  2537. }
  2538. if (this.business == 1 && row.feeCode == 'YWF' && row.dc == 'C') {
  2539. let ywfSumD = 0
  2540. let ywfSumC = 0
  2541. for (let item of this.assemblyForm.feeCenterListD) {
  2542. if (item.feeCode == 'YWF') {
  2543. ywfSumD += Number(item.amount)
  2544. }
  2545. }
  2546. for (let item of this.assemblyForm.feeCenterListC) {
  2547. if (item.feeCode == 'YWF') {
  2548. ywfSumC += Number(item.amount)
  2549. }
  2550. }
  2551. if (Number(ywfSumC) > (Number(ywfSumD) * 0.8)) {
  2552. this.$set(row, 'quantity', 1)
  2553. return this.$message.error('应付的业务费不能超过应收业务费的80%');
  2554. }
  2555. }
  2556. if (row.curCode == 'CNY') {
  2557. this.$set(row, 'rmbAmount', row.amount.toFixed(2))
  2558. this.$set(row, 'usdAmount', '')
  2559. } else {
  2560. this.$set(row, 'usdAmount', row.amount.toFixed(2))
  2561. this.$set(row, 'rmbAmount', '')
  2562. }
  2563. },
  2564. // 保存接口
  2565. feecenterSubmitfun(row) {
  2566. feecenterSubmit(row).then(res => {
  2567. this.$message({
  2568. type: "success",
  2569. message: "操作成功!"
  2570. });
  2571. this.$emit('billsDetailfun')
  2572. })
  2573. },
  2574. // 获取客户数据
  2575. getBcorpsListfun(cnName) {
  2576. getBcorpsList(1, 10, { shortName: cnName, status: 0 }).then(res => {
  2577. this.corpCnNameData = res.data.data.records
  2578. // this.corpCnNameData = res.data.data.records.map(item=>{
  2579. // // 创建自定义参数暂存
  2580. // item.cnNamecode = item.cnName + ' - ' + item.code + ' - ' + item.shortName
  2581. // return item
  2582. // })
  2583. })
  2584. },
  2585. // 获取费用数据
  2586. bfeesListfun(cnName) {
  2587. bfeesList(1, 10, { cnName, status: 0, feesTypeCode: 'HYJK' }).then(res => {
  2588. this.feeCnNameData = res.data.data.records
  2589. })
  2590. },
  2591. // 获取费用信息 核算要素信息
  2592. getBaccelementsListfun(cnName) {
  2593. getBaccelementsList(1, 10, { cnName, status: 0 }).then(res => {
  2594. this.elementsData = res.data.data.records
  2595. })
  2596. },
  2597. // 获取计算属性
  2598. async getBunitsPagefun(type, feeRow, row) {
  2599. let srcBillId = null
  2600. if (this.assemblyForm.billType == 'MH') {
  2601. srcBillId = this.assemblyForm.masterId
  2602. } else {
  2603. srcBillId = this.assemblyForm.id
  2604. }
  2605. const res = await getBunitsPage({ srcBillId })
  2606. this.unitNoData = []
  2607. let boxarr40 = ['40HC', '40GP']
  2608. let boxarr20 = ['20GP']
  2609. let teunum = 0
  2610. for (let item of res.data.data) {
  2611. // 按箱型
  2612. if (item.quantityRule != 1) {
  2613. // TEU
  2614. if (item.quantityRule == 4) {
  2615. for (let data of this.assemblyForm.preContainersList) {
  2616. // 40*2 20*1
  2617. if (boxarr40.indexOf(data.cntrTypeCode) != -1) {
  2618. teunum += Number(data.quantity) * 2
  2619. } else if (boxarr20.indexOf(data.cntrTypeCode) != -1) {
  2620. teunum += Number(data.quantity)
  2621. }
  2622. }
  2623. this.unitNoData.push({ ...item, boxquantity: teunum })
  2624. } else {
  2625. this.unitNoData.push(item) // 不是TEU和不是箱的走这个
  2626. }
  2627. }
  2628. }
  2629. let arr = this.assemblyForm.preContainersList.map(item => {
  2630. return {
  2631. quantityRule: 1, // 1 是按箱量
  2632. code: item.cntrTypeCode,
  2633. boxquantity: item.quantity,
  2634. }
  2635. })
  2636. this.unitNoData = [...arr, ...this.unitNoData]
  2637. // 选择费用时带出第一条
  2638. if (type) {
  2639. let feeunitNodata = []
  2640. for (let item of this.unitNoData) {
  2641. if (item.quantityRule == feeRow.unitNo) {
  2642. feeunitNodata.push(item)
  2643. }
  2644. }
  2645. this.corpChange(feeunitNodata[0].code, 'unitNo', row)
  2646. }
  2647. },
  2648. // 获取币别数据
  2649. bcurrencyGetExratefun(dc) {
  2650. console.log(dc, 1963)
  2651. bcurrencyGetExrate({
  2652. date: this.assemblyForm.etd ? this.assemblyForm.etd.slice(0, 10) + ' 00:00:00' : dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00:00', // 开船日期
  2653. dc: dc
  2654. }).then(res => {
  2655. this.curCodeData = res.data.data
  2656. })
  2657. },
  2658. // 获取签单方式字典数据
  2659. getWorkDictsfun() {
  2660. getWorkDicts('issue_type_F').then(res => {
  2661. this.issuetypefData = res.data.data
  2662. })
  2663. },
  2664. // 获取预付到付字典数据
  2665. paymodeWorkDictsfun() {
  2666. getWorkDicts('payment_method_los').then((res) => {
  2667. this.paymodeData = res.data.data
  2668. })
  2669. },
  2670. // 预付到付货物显示值
  2671. paymodefun(value) {
  2672. for (let item of this.paymodeData) {
  2673. if (item.value == value) {
  2674. return item.label
  2675. }
  2676. }
  2677. },
  2678. // 生成账单接口
  2679. finaccbillsGenerateBillfun(list) {
  2680. const obj = {
  2681. feeCenterList: list,
  2682. businessTypeCode: 'HYZD',
  2683. billNoFormat: 'HYZD',
  2684. accountType: 'LOCAL',
  2685. refno: this.assemblyForm.refno,
  2686. polNamePrint: this.assemblyForm.polNamePrint,
  2687. podNamePrint: this.assemblyForm.podNamePrint,
  2688. teamId: this.assemblyForm.teamId,
  2689. teamName: this.assemblyForm.teamName
  2690. }
  2691. finaccbillsGenerateBill(obj).then(res => {
  2692. this.$message({
  2693. type: "success",
  2694. message: "操作成功!"
  2695. });
  2696. this.$emit('billsDetailfun')
  2697. })
  2698. },
  2699. // 撤销账单接口
  2700. finaccbillsRevokeBillfun(list) {
  2701. const obj = {
  2702. feeCenterList: list,
  2703. }
  2704. finaccbillsRevokeBill(obj).then(res => {
  2705. this.$message({
  2706. type: "success",
  2707. message: "操作成功!"
  2708. });
  2709. this.$emit('billsDetailfun')
  2710. })
  2711. },
  2712. // 一键编辑
  2713. feecenterEditfun(dc) {
  2714. if (dc == 'D') {
  2715. for (let item of this.assemblyForm.feeCenterListD) {
  2716. if (item.accStatus != 1) {
  2717. this.$delete(item, 'edit')
  2718. this.$set(item, 'edit', true)
  2719. }
  2720. }
  2721. } else {
  2722. for (let item of this.assemblyForm.feeCenterListC) {
  2723. if (item.accStatus != 1) {
  2724. this.$delete(item, 'edit')
  2725. this.$set(item, 'edit', true)
  2726. }
  2727. }
  2728. }
  2729. },
  2730. // 费用信息明细保存按钮
  2731. feecenterSubmitListfun() {
  2732. if (!this.pid) {
  2733. this.$message({
  2734. message: '请先保存数据之后才能添加',
  2735. type: 'warning'
  2736. });
  2737. return
  2738. }
  2739. let similarDataD = similarValues(this.assemblyForm.feeCenterListD, 'feeCnName', 'curCode')
  2740. if (similarDataD) {
  2741. return this.$message.error(`应收费用简称:${similarDataD.feeCnName}的币别不一致,请重新选择`);
  2742. }
  2743. let similarDataC = similarValues(this.assemblyForm.feeCenterListC, 'feeCnName', 'curCode')
  2744. if (similarDataC) {
  2745. return this.$message.error(`应付费用简称:${similarDataC.feeCnName}的币别不一致,请重新选择`);
  2746. }
  2747. // 判断必填项
  2748. let sum = '请输入'
  2749. for (let item of this.assemblyForm.feeCenterListD) {
  2750. if (!item.corpId || !item.feeId || !item.elementsId || !item.curCode) {
  2751. sum += `应收第${item.$index + 1}行${!item.corpId ? ' 结算单位' : ''}${!item.feeId ? ' 费用简称' : ''}${!item.elementsId ? ' 核算要素' : ''}${!item.curCode ? ' 币种' : ''}`
  2752. }
  2753. }
  2754. for (let item of this.assemblyForm.feeCenterListC) {
  2755. if (!item.corpId || !item.feeId || !item.elementsId || !item.curCode) {
  2756. sum += `应付第${item.$index + 1}行${!item.corpId ? ' 结算单位' : ''}${!item.feeId ? ' 费用简称' : ''}${!item.elementsId ? ' 核算要素' : ''}${!item.curCode ? ' 币种' : ''}`
  2757. }
  2758. }
  2759. if (sum != '请输入') {
  2760. this.$confirm(sum, {
  2761. confirmButtonText: "确定",
  2762. cancelButtonText: "取消",
  2763. type: "warning"
  2764. })
  2765. return;
  2766. }
  2767. this.assemblyForm.feeCenterListD.map((row, index) => {
  2768. row.dc = 'D'
  2769. row.pid = this.pid
  2770. row.sort = Number(index) + 1
  2771. row.businessType = this.assemblyForm.businessType // 业务类型
  2772. row.billType = this.assemblyForm.billType // 单据类型
  2773. row.billNo = this.assemblyForm.billNo // 单据编号
  2774. row.billDate = this.assemblyForm.billDate // 单据日期
  2775. row.billCorpId = this.assemblyForm.corpId // 主表客户 id
  2776. row.billCorpCnName = this.assemblyForm.corpCnName // 主表客户中文名称
  2777. row.billCorpEnName = this.assemblyForm.corpEnName // 主表客户英文名称
  2778. row.lineId = this.assemblyForm.lineId // 航线 id
  2779. row.lineCnName = this.assemblyForm.lineCnName // 航线中文名称
  2780. row.lineEnName = this.assemblyForm.lineEnName // 航线英文名称
  2781. row.vesselId = this.assemblyForm.vesselId // 船名 id
  2782. row.vesselCnName = this.assemblyForm.vesselCnName // 中文船名
  2783. row.vesselEnName = this.assemblyForm.vesselEnName // 英文船名
  2784. row.voyageNo = this.assemblyForm.voyageNo // 航次
  2785. row.mblno = this.assemblyForm.mblno // MB/L NO
  2786. row.hblno = this.assemblyForm.hblno // HB/L NO
  2787. row.etd = this.assemblyForm.etd // 开船日期
  2788. row.eta = this.assemblyForm.eta // 到港日期
  2789. row.polId = this.assemblyForm.polId // 装货港 id
  2790. row.polCode = this.assemblyForm.polCode // 装货港代码
  2791. row.polCnName = this.assemblyForm.polCnName // 装货港中文名称
  2792. row.polEnName = this.assemblyForm.polEnName // 装货港英文名称
  2793. row.podId = this.assemblyForm.podId // 卸货港 id
  2794. row.podCode = this.assemblyForm.podCode // 卸货港代码
  2795. row.podCnName = this.assemblyForm.podCnName // 卸货港中文名称
  2796. row.podEnName = this.assemblyForm.podEnName // 卸货港英文名称
  2797. row.corpArgreementNo = this.assemblyForm.corpArgreementNo // 客户约号
  2798. })
  2799. this.assemblyForm.feeCenterListC.map((row, index) => {
  2800. row.dc = 'C'
  2801. row.pid = this.pid
  2802. row.sort = Number(index) + 1
  2803. row.businessType = this.assemblyForm.businessType // 业务类型
  2804. row.billType = this.assemblyForm.billType // 单据类型
  2805. row.billNo = this.assemblyForm.billNo // 单据编号
  2806. row.billDate = this.assemblyForm.billDate // 单据日期
  2807. row.billCorpId = this.assemblyForm.corpId // 主表客户 id
  2808. row.billCorpCnName = this.assemblyForm.corpCnName // 主表客户中文名称
  2809. row.billCorpEnName = this.assemblyForm.corpEnName // 主表客户英文名称
  2810. row.lineId = this.assemblyForm.lineId // 航线 id
  2811. row.lineCnName = this.assemblyForm.lineCnName // 航线中文名称
  2812. row.lineEnName = this.assemblyForm.lineEnName // 航线英文名称
  2813. row.vesselId = this.assemblyForm.vesselId // 船名 id
  2814. row.vesselCnName = this.assemblyForm.vesselCnName // 中文船名
  2815. row.vesselEnName = this.assemblyForm.vesselEnName // 英文船名
  2816. row.voyageNo = this.assemblyForm.voyageNo // 航次
  2817. row.mblno = this.assemblyForm.mblno // MB/L NO
  2818. row.hblno = this.assemblyForm.hblno // HB/L NO
  2819. row.etd = this.assemblyForm.etd // 开船日期
  2820. row.eta = this.assemblyForm.eta // 到港日期
  2821. row.polId = this.assemblyForm.polId // 装货港 id
  2822. row.polCode = this.assemblyForm.polCode // 装货港代码
  2823. row.polCnName = this.assemblyForm.polCnName // 装货港中文名称
  2824. row.polEnName = this.assemblyForm.polEnName // 装货港英文名称
  2825. row.podId = this.assemblyForm.podId // 卸货港 id
  2826. row.podCode = this.assemblyForm.podCode // 卸货港代码
  2827. row.podCnName = this.assemblyForm.podCnName // 卸货港中文名称
  2828. row.podEnName = this.assemblyForm.podEnName // 卸货港英文名称
  2829. row.corpArgreementNo = this.assemblyForm.corpArgreementNo // 客户约号
  2830. })
  2831. const loading = this.$loading({
  2832. lock: true,
  2833. text: '加载中',
  2834. spinner: 'el-icon-loading',
  2835. background: 'rgba(255,255,255,0.7)'
  2836. });
  2837. feecenterSubmitList([
  2838. ...this.assemblyForm.feeCenterListD,
  2839. ...this.assemblyForm.feeCenterListC
  2840. ]).then(res => {
  2841. this.$message({
  2842. type: "success",
  2843. message: "操作成功!"
  2844. });
  2845. this.$emit('billsDetailfun')
  2846. }).finally(() => {
  2847. loading.close()
  2848. })
  2849. },
  2850. // 预览报表
  2851. handleReportPreview(url, data) {
  2852. console.log(url, 1670)
  2853. console.log(data, 1671)
  2854. Stimulsoft.Base.StiLicense.key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHn0s4gy0Fr5YoUZ9V00Y0igCSFQzwEqYBh/N77k4f0fWXTHW5rqeBNLkaurJDenJ9o97TyqHs9HfvINK18Uwzsc/bG01Rq+x3H3Rf+g7AY92gvWmp7VA2Uxa30Q97f61siWz2dE5kdBVcCnSFzC6awE74JzDcJMj8OuxplqB1CYcpoPcOjKy1PiATlC3UsBaLEXsok1xxtRMQ283r282tkh8XQitsxtTczAJBxijuJNfziYhci2jResWXK51ygOOEbVAxmpflujkJ8oEVHkOA/CjX6bGx05pNZ6oSIu9H8deF94MyqIwcdeirCe60GbIQByQtLimfxbIZnO35X3fs/94av0ODfELqrQEpLrpU6FNeHttvlMc5UVrT4K+8lPbqR8Hq0PFWmFrbVIYSi7tAVFMMe2D1C59NWyLu3AkrD3No7YhLVh7LV0Tttr/8FrcZ8xirBPcMZCIGrRIesrHxOsZH2V8t/t0GXCnLLAWX+TNvdNXkB8cF2y9ZXf1enI064yE5dwMs2fQ0yOUG/xornE'
  2855. // Stimulsoft.Base.StiLicense.Key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkcgIvwL0jnpsDqRpWg5FI5kt2G7A0tYIcUygBh1sPs7plofUOqPB1a4HBIXJB621mau2oiAIj+ysU7gKUXfjn/D5BocmduNB+ZMiDGPxFrAp3PoD0nYNkkWh8r7gBZ1v/JZSXGE3bQDrCQCNSy6mgby+iFAMV8/PuZ1z77U+Xz3fkpbm6MYQXYp3cQooLGLUti7k1TFWrnawT0iEEDJ2iRcU9wLqn2g9UiWesEZtKwI/UmEI2T7nv5NbgV+CHguu6QU4WWzFpIgW+3LUnKCT/vCDY+ymzgycw9A9+HFSzARiPzgOaAuQYrFDpzhXV+ZeX31AxWlnzjDWqpfluygSNPtGul5gyNt2CEoJD1Yom0VN9fvRonYsMsimkFFx2AwyVpPcs+JfVBtpPbTcZscnzUdmiIvxv8Gcin6sNSibM6in/uUKFt3bVgW/XeMYa7MLGF53kvBSwi78poUDigA2n12SmghLR0AHxyEDIgZGOTbNI33GWu7ZsPBeUdGu55R8w='
  2856. Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile('/reports/stimulsoft/Localization/zh-CHS.xml', true, 'zh-CHS')
  2857. Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile('/reports/stimulsoft/Localization/zh-CHS.xml')
  2858. // 工具栏
  2859. var options = new Stimulsoft.Viewer.StiViewerOptions()
  2860. options.height = '100%'
  2861. options.appearance.scrollbarsMode = true // 滚动条模式
  2862. options.toolbar.showDesignButton = false // 显示设计按钮
  2863. options.toolbar.showAboutButton = false // 显示关于按钮
  2864. options.toolbar.showResourcesButton = false // 显示资源按钮
  2865. options.toolbar.showFullScreenButton = false // 显示全屏按钮
  2866. options.toolbar.showOpenButton = false // 显示打开按钮
  2867. options.appearance.showTooltips = false // 显示工具提示
  2868. options.appearance.showDialogsHelp = false // 显示对话框帮助
  2869. options.exports.showExportToDocument = false // 显示导出到文档
  2870. options.toolbar.showParametersButton = true // 显示参数按钮
  2871. options.appearance.bookmarksPrint = true // 书签打印
  2872. // options.toolbar.showPrintButton = false // 打印按钮是否显示 下面直接自定义控制打印弹窗是否开启
  2873. // printDestination 参数:用于指定报表打印的目标位置,可以是打印机、PDF 文件或者直接打印到浏览器等。
  2874. // Stimulsoft.Viewer.StiPrintDestination.Direct:表示直接打印到打印机,即将报表内容直接发送至打印机进行打印。
  2875. // 通过设置不同的 printDestination 参数,你可以控制报表打印的行为,例如是直接打印到打印机,还是生成 PDF 文件,或者直接在浏览器中预览打印内容等。
  2876. options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct
  2877. // htmlRenderMode html渲染模式
  2878. options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table
  2879. // 是创建一个 Stimulsoft 报表查看器的实例的代码
  2880. let viewer = new Stimulsoft.Viewer.StiViewer(options, 'StiViewer', false)
  2881. // 报表
  2882. console.log("创建一个报表实例");
  2883. console.log()
  2884. let report = new window.Stimulsoft.Report.StiReport();
  2885. // 加载文件
  2886. console.log("从url加载报表");
  2887. // report.loadFile("/reports/stimulsoft/demos/SimpleList.mrt");
  2888. report.load(url)
  2889. data.pageOne = 'Page : 1 of 1'
  2890. // 处理超长数据
  2891. if (data.hshipperDetails) {
  2892. var consignerIndex2 = data.hshipperDetails.indexOf('\n')
  2893. for (let i = 0; i < 4; i++) {
  2894. consignerIndex2 = data.hshipperDetails.indexOf('\n', consignerIndex2 + 1);
  2895. }
  2896. if (consignerIndex2 != -1) {
  2897. var hshipperDetails = data.hshipperDetails.substring(consignerIndex2 + 2, data.hshipperDetails.length)
  2898. data.hshipperDetails = data.hshipperDetails.substring(0, consignerIndex2) + ' *'
  2899. data.commodityDescr += '\n*' + hshipperDetails
  2900. }
  2901. }
  2902. if (data.hconsigneeDetails) {
  2903. var consigneeIndex2 = data.hconsigneeDetails.indexOf('\n')
  2904. for (let i = 0; i < 3; i++) {
  2905. consigneeIndex2 = data.hconsigneeDetails.indexOf('\n', consigneeIndex2 + 1);
  2906. }
  2907. if (consigneeIndex2 != -1) {
  2908. var hconsigneeDetails = data.hconsigneeDetails.substring(consigneeIndex2 + 2, data.hconsigneeDetails.length)
  2909. data.hconsigneeDetails = data.hconsigneeDetails.substring(0, consigneeIndex2) + ' **'
  2910. data.commodityDescr += '\n**' + hconsigneeDetails
  2911. }
  2912. }
  2913. if (data.hnotifyDetails) {
  2914. var notifierIndex2 = data.hnotifyDetails.indexOf('\n')
  2915. for (let i = 0; i < 3; i++) {
  2916. notifierIndex2 = data.hnotifyDetails.indexOf('\n', notifierIndex2 + 1);
  2917. }
  2918. if (notifierIndex2 != -1) {
  2919. var hnotifyDetails = data.hnotifyDetails.substring(notifierIndex2 + 2, data.hnotifyDetails.length)
  2920. data.hnotifyDetails = data.hnotifyDetails.substring(0, notifierIndex2) + ' ***'
  2921. data.commodityDescr += '\n***' + hnotifyDetails
  2922. }
  2923. }
  2924. // 处理箱号
  2925. if (this.isPrintTheBoxNumber) {
  2926. data.commodityDescr += '\n.\n.\n'
  2927. }
  2928. // PLACE & DATE OF ISSUE
  2929. data.placeAndDateOfIssue = ''
  2930. if (data.issueAt) {
  2931. data.placeAndDateOfIssue += data.issueAt
  2932. }
  2933. if (data.issueDate) {
  2934. let date = new Date(data.issueDate.replace(/-/g, '/'));
  2935. let yyyy = date.getFullYear();
  2936. let mmmm = date.toDateString().split(" ")[1]
  2937. let dd = date.getDate()
  2938. data.placeAndDateOfIssue += ', ' + dd + '-' + mmmm + '-' + yyyy
  2939. }
  2940. // Total number of containers or packages received by the Carriers
  2941. if (data.preContainersList) {
  2942. let boxMap = new Map();
  2943. for (let boxQuantity of data.preContainersList) {
  2944. if (boxMap.get(boxQuantity.cntrTypeCode)) {
  2945. let v = boxMap.get(boxQuantity.cntrTypeCode)
  2946. boxMap.set(boxQuantity.cntrTypeCode, v + boxQuantity.quantity)
  2947. } else {
  2948. boxMap.set(boxQuantity.cntrTypeCode, boxQuantity.quantity)
  2949. }
  2950. }
  2951. let boxs = ''
  2952. boxMap.forEach(function (value, key, map) {
  2953. boxs += value + 'x' + key + ', '
  2954. })
  2955. boxs = boxs.substring(0, boxs.length - 2)
  2956. data.boxQuantity = boxs + ' CONTAINER(S) ONLY'
  2957. }
  2958. // Number of original B/Ls
  2959. if (data.numberOfObl) {
  2960. data.numberOfObl += ' (' + data.numberOfOblDigit + ')'
  2961. }
  2962. if (data.commodityDescr) {
  2963. var descriptionIndex2 = data.commodityDescr.indexOf('\n')
  2964. for (let i = 0; i < 19; i++) {
  2965. descriptionIndex2 = data.commodityDescr.indexOf('\n', descriptionIndex2 + 1);
  2966. }
  2967. if (descriptionIndex2 != -1) {
  2968. data.pageOne = 'Page : 1 of 2'
  2969. data.pageTwo = 'Page : 2 of 2'
  2970. var extraLongText = data.commodityDescr.substring(descriptionIndex2 + 2, data.commodityDescr.length)
  2971. data.commodityDescr = data.commodityDescr.substring(0, descriptionIndex2)
  2972. data.extraLongTips = '** TO BE CONTINUED ON ATTACHED LIST **'
  2973. data.extraLongText = extraLongText
  2974. }
  2975. }
  2976. // console.log(data.hshipperDetails, 'hshipperDetails2')
  2977. // 创建一个 Stimulsoft 数据集(DataSet)的实例的代码
  2978. var dataSet = new Stimulsoft.System.Data.DataSet(
  2979. 'reportData'
  2980. )
  2981. dataSet.readJson(data) // 用于将 JSON 格式的数据加载到数据集中。data 是包含报表数据的 JSON 对象。
  2982. // 这是一个方法调用,用于在报表中注册数据源。参数 'reportData' 是数据源的名称,
  2983. // 第二个 'reportData' 是数据源的别名,dataSet 则是之前创建的数据集实例
  2984. report.regData('reportData', 'reportData', dataSet)
  2985. // 从模版和数据加载报表
  2986. // loadReport(report, '', {})
  2987. // 这是将报表对象指定给报表查看器的属性。viewer 是报表查看器的实例,而 report 是之前创建的报表对象。
  2988. viewer.report = report;
  2989. this.$refs.reportContainer.showContainer(
  2990. () => {
  2991. setTimeout(() => {
  2992. viewer.renderHtml('reportContainer')
  2993. this.createViewerButtons(viewer)
  2994. }, 50)
  2995. },
  2996. () => {
  2997. },
  2998. )
  2999. console.log("加载成功完成!");
  3000. },
  3001. createViewerButtons(viewer) {
  3002. viewer.jsObject.collections.images['myClose.png'] =
  3003. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA0ElEQVQ4ja3TO05CQRQG4A8iOwAbtYWETndAaecK7NwCKmETtJZsSBNLobEz8ZFIJQ0UnOGSm3DnYviTybzO/895DQXGWGCVGQuMEqkRcwcfuMOLalziCaf4TIe9UG9nyMJmFRzNGoRK1BU4xxx9G7cfwostciGk+x8MqgySwDXe4tU53hVV+MNtTmAoX84JGv9NYgrHyR6DV8wUSW7hItZLm36ZVoVQxsFJLOMsPOrH/h7dQwR2cdxOTEn8DtUbPGc4V2H7Vb4Yqfedf/GYSGt8VUmxgyfuBAAAAABJRU5ErkJggg=='
  3004. const closeBtn = viewer.jsObject.SmallButton(
  3005. 'closeBtn',
  3006. '关闭',
  3007. 'myClose.png'
  3008. )
  3009. // 增加打印弹窗配置
  3010. const printBtn = viewer.jsObject.SmallButton(
  3011. 'printBtn',
  3012. '打印报表',
  3013. 'myClose.png'
  3014. )
  3015. // console.log(viewer.jsObject.print(),'1013')
  3016. // 获取 关闭按钮的dom元素位置
  3017. const toolbarTable = viewer.jsObject.controls.toolbar.firstChild.firstChild
  3018. const buttonsTable = toolbarTable.rows[0].lastChild.lastChild
  3019. const userButtonCell = buttonsTable.rows[0].insertCell(0)
  3020. // 获取打印按钮的位置
  3021. const buttonsTablePrint = toolbarTable.rows[0].childNodes[0].lastChild // 打印按钮
  3022. const userButtonPrint = buttonsTablePrint.rows[0].childNodes[0] // 打印按钮dom位置
  3023. userButtonPrint.addEventListener("click", (event) => {
  3024. console.log("打印点击");
  3025. // event.preventDefault()
  3026. });
  3027. userButtonPrint.addEventListener("mouseover", (event) => {
  3028. console.log("移入打印按钮");
  3029. console.log(event, 1035)
  3030. });
  3031. userButtonCell.className = 'stiJsViewerClearAllStyles'
  3032. userButtonCell.appendChild(closeBtn) // 添加关闭节点
  3033. // userButtonPrint.prepend(printBtn) // 在 printBtn 节点里最前面增加一个子级节点
  3034. let that = this
  3035. // 关闭按钮的监听点击
  3036. closeBtn.action = function () {
  3037. console.log(that.$refs.ReportContainer, '1022')
  3038. if (that.$refs.reportContainer)
  3039. that.$refs.reportContainer.hideContainer()
  3040. }
  3041. // // // 打印按钮监听
  3042. // printBtn.action = (e)=>{
  3043. // console.log('打印')
  3044. // window.print()
  3045. // }
  3046. },
  3047. // 表头样式
  3048. tableHeaderCellStyle({ row, column, rowIndex, columnIndex }) {
  3049. return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff"
  3050. },
  3051. // 更改表格颜色
  3052. headerClassName(tab) {
  3053. //颜色间隔
  3054. let back = ""
  3055. if (tab.columnIndex >= 0 && tab.column.level === 1) {
  3056. if (tab.columnIndex % 2 === 0) {
  3057. back = "back-one"
  3058. } else if (tab.columnIndex % 2 === 1) {
  3059. back = "back-two"
  3060. }
  3061. }
  3062. return back;
  3063. },
  3064. // 关闭弹窗
  3065. handleClose(done) {
  3066. this.feesselectionList = [] // 清空多选
  3067. this.templateRightData = [] // 清空数据
  3068. done();
  3069. // this.$confirm('确认关闭?')
  3070. // .then(_ => {
  3071. // this.feesselectionList = [] // 清空多选
  3072. // this.templateRightData = [] // 清空数据
  3073. // done();
  3074. // })
  3075. // .catch(_ => {});
  3076. },
  3077. //自定义列保存
  3078. async saveColumnTwo(ref, option, optionBack, code) {
  3079. /**
  3080. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  3081. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  3082. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  3083. */
  3084. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  3085. if (inSave) {
  3086. this.$message.success("保存成功");
  3087. //关闭窗口
  3088. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  3089. }
  3090. },
  3091. //自定义列重置
  3092. async resetColumnTwo(ref, option, optionBack, code) {
  3093. this[option] = this[optionBack];
  3094. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  3095. if (inSave) {
  3096. this.$message.success("重置成功");
  3097. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  3098. }
  3099. },
  3100. },
  3101. watch: {
  3102. // 监听业务类型 如果不是分单 可以编辑分单号
  3103. 'assemblyForm.feeCenterListD': {
  3104. // 执行方法
  3105. handler(oldValue, newValue) {
  3106. this.getSum()
  3107. },
  3108. deep: true, // 深度监听
  3109. immediate: true // 第一次改变就执行
  3110. },
  3111. // 监听箱信息数据 箱信息中有温度 自动切换 冻货
  3112. 'assemblyForm.feeCenterListC': {
  3113. // 执行方法
  3114. handler(oldValue, newValue) {
  3115. this.getSum()
  3116. },
  3117. deep: true, // 深度监听
  3118. immediate: true // 第一次改变就执行,
  3119. },
  3120. 'assemblyForm.mblno': {
  3121. // 执行方法
  3122. handler(oldValue, newValue) {
  3123. console.log(oldValue, newValue)
  3124. if (oldValue) {
  3125. amendsList(1, 10, { status: 3, mblno: this.assemblyForm.mblno, businessType: 'SIA' }).then(res => {
  3126. if (res.data.data.records.length > 0) {
  3127. this.amendsStatus = true
  3128. }
  3129. })
  3130. }
  3131. },
  3132. deep: true, // 深度监听
  3133. immediate: true // 第一次改变就执行,
  3134. }
  3135. },
  3136. }
  3137. </script>
  3138. <style scoped lang="scss">
  3139. .disabledBox {
  3140. display: flex;
  3141. align-items: center;
  3142. }
  3143. .fontSize {
  3144. font-size: 16px;
  3145. color: #81B337;
  3146. }
  3147. .meetSize {
  3148. font-size: 16px;
  3149. color: #54BCBD;
  3150. }
  3151. .bottomFlex {
  3152. display: flex;
  3153. align-items: center;
  3154. }
  3155. .weightfont {
  3156. font-size: 20px;
  3157. font-weight: bold;
  3158. }
  3159. .weightnum {
  3160. font-size: 15px;
  3161. font-weight: 500;
  3162. }
  3163. .fontText {
  3164. font-size: 16px;
  3165. font-weight: 500;
  3166. margin: 3px 0;
  3167. }
  3168. ::v-deep.el-form-item {
  3169. margin-bottom: 0px;
  3170. }
  3171. // 去掉弹框内容的默认padding值
  3172. /deep/.el-dialog .el-dialog__body {
  3173. padding: 0px 20px;
  3174. }
  3175. ::v-deep#out-table .back-one {
  3176. background: #ecf5ff !important;
  3177. text-align: center;
  3178. padding: 4px 0;
  3179. }
  3180. ::v-deep#out-table .back-two {
  3181. background: #ecf5ff !important;
  3182. text-align: center;
  3183. padding: 4px 0;
  3184. }
  3185. .textoverflow {
  3186. width: 100%;
  3187. overflow: hidden;
  3188. white-space: nowrap;
  3189. text-overflow: ellipsis;
  3190. }
  3191. </style>