detailsPage.vue 132 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041
  1. <template>
  2. <div>
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="goBack()">返回列表 </el-button>
  6. </div>
  7. <div class="add-customer-btn">
  8. <el-button size="small" style="margin-right: 8px" :disabled="!form.id" @click="$refs.print.openDialog()">预 览 </el-button>
  9. <el-button
  10. v-if="roleName.indexOf('admin') != -1"
  11. size="small"
  12. style="margin-right: 8px"
  13. :disabled="!form.id"
  14. @click="$refs.report.openDialog()"
  15. >报表设计
  16. </el-button>
  17. <el-button
  18. class="el-button--small-yh"
  19. style="margin-left: 6px;"
  20. type="primary"
  21. size="small"
  22. v-if="editButton"
  23. :disabled="
  24. showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)
  25. "
  26. @click="inEdit"
  27. >编 辑
  28. </el-button>
  29. <el-button
  30. class="el-button--small-yh"
  31. v-else
  32. style="margin-left: 6px;"
  33. type="primary"
  34. size="small"
  35. :disabled="isSaveBtn || form.buxStaus == '已确认'"
  36. @click="submit"
  37. >保 存
  38. </el-button>
  39. <!-- <el-button type="success" size="small" v-if="form.buxStaus == '录入'" @click.stop="confirm">确认费用</el-button> -->
  40. <!-- <el-button type="danger" size="small" v-if="form.buxStaus == '已确认'" @click.stop="revoke">撤销费用</el-button> -->
  41. <!-- <el-button v-if="form.status == '审核提交'" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
  42. size="small" @click="revokeApplication">撤销单据请核
  43. </el-button> -->
  44. <!-- <el-dropdown style="line-height: 0">
  45. <el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
  46. size="small">
  47. 审 批<i class="el-icon-arrow-down el-icon--right"></i>
  48. </el-button>
  49. <el-dropdown-menu slot="dropdown">
  50. <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
  51. </el-dropdown-item>
  52. </el-dropdown-menu>
  53. </el-dropdown> -->
  54. </div>
  55. </div>
  56. <div style="margin-top: 50px">
  57. <el-tabs type="border-card">
  58. <el-tab-pane label="基础信息">
  59. <trade-card title="基础信息">
  60. <avue-form :option="optionForm" v-model="form" ref="form">
  61. <tempalte slot="purchaseCompanyName">
  62. <dic-select
  63. v-model="form.purchaseCompanyName"
  64. placeholder="结算单位"
  65. key="id"
  66. label="shortName"
  67. res="records"
  68. url="/blade-los/bcorps/selectList?status=0&current=1&size=5"
  69. :filterable="true"
  70. :remote="true"
  71. dataName="shortName"
  72. :slotRight="true"
  73. rightLabel="code"
  74. @selectChange="dicChange('purchaseCompanyName', $event)"
  75. :disabled="form.buxStaus == '已确认'"
  76. ></dic-select>
  77. </tempalte>
  78. <tempalte slot="purchaseDate">
  79. <el-date-picker
  80. v-model="form.purchaseDate"
  81. type="date"
  82. size="small"
  83. placeholder="请选择 业务日期"
  84. format="yyyy-MM-dd"
  85. value-format="yyyy-MM-dd HH:mm:ss"
  86. @change="dicChange('purchaseDate', $event)"
  87. :disabled="editDisabled || (form.id && form.buxStaus == '已确认')"
  88. >
  89. </el-date-picker>
  90. </tempalte>
  91. </avue-form>
  92. </trade-card>
  93. <trade-card title="箱明细">
  94. <avue-crud
  95. :option="option"
  96. :data="form.tradingBoxItemsList"
  97. id="out-table"
  98. ref="crud"
  99. :header-cell-class-name="headerClassName"
  100. :row-style="{ height: '20px', padding: '0px' }"
  101. :cell-style="{ height: '20px', padding: '0px' }"
  102. @selection-change="selectionChange"
  103. @select="selectHandle"
  104. @row-update="rowUpdate"
  105. @resetColumn="resetColumn('crud', 'option', 'optionBack', 477)"
  106. @saveColumn="saveColumn('crud', 'option', 'optionBack', 477)"
  107. >
  108. <template slot="menuLeft">
  109. <el-button
  110. type="info"
  111. plain
  112. size="small"
  113. :disabled="editDisabled || !form.id || form.buxStaus == '已确认'"
  114. @click="allClick('一键保存')"
  115. >一键保存</el-button
  116. >
  117. <el-button
  118. type="info"
  119. plain
  120. size="small"
  121. :disabled="editDisabled || form.tradingBoxItemsList.length == 0 || form.buxStaus == '已确认'"
  122. @click="allClick('一键编辑')"
  123. >一键编辑</el-button
  124. >
  125. <el-button
  126. type="danger"
  127. plain
  128. size="small"
  129. :disabled="editDisabled || selectionList.length == 0 || form.buxStaus == '已确认'"
  130. @click="allClick('批量删除')"
  131. >批量删除</el-button
  132. >
  133. <el-button type="success" size="small" @click="allClick('导入')" :disabled="!form.id">导入</el-button>
  134. <!-- <el-button type="info" size="small" @click="allClick('启用')"
  135. :disabled="selectionList.length == 0">启用</el-button> -->
  136. <!-- <el-button type="primary" size="small" @click="allClick('卖箱')">卖箱</el-button> -->
  137. <el-button size="small" style="margin-right: 8px" :disabled="!form.id || true" @click="$refs.print.openDialog()">打印报表 </el-button>
  138. <span style="margin: 0 20px;color:#67C23A;"> 金额本币合计:{{ CNYSUM }} </span>
  139. <span style="margin: 0 20px;color:#F56C6C;"> 金额外币合计:{{ USDSUM }} </span>
  140. </template>
  141. <template slot="indexHeader" slot-scope="{ row, index }">
  142. <el-button
  143. type="primary"
  144. size="mini"
  145. icon="el-icon-plus"
  146. :disabled="editDisabled || form.buxStaus == '已确认'"
  147. circle
  148. @click="addRow()"
  149. >
  150. </el-button>
  151. </template>
  152. <template slot="index" slot-scope="{ row, index }">
  153. <span>{{ index + 1 }}</span>
  154. </template>
  155. <tempalte slot="codeForm" slot-scope="{ row }">
  156. <dic-select
  157. v-if="row.$cellEdit"
  158. v-model="row.code"
  159. placeholder="箱号"
  160. key="id"
  161. label="code"
  162. res="records"
  163. url="/blade-los/archives/list?current=1&size=20&status=待使用"
  164. :filterable="true"
  165. :remote="true"
  166. dataName="code"
  167. @selectChange="rowDicChange('code', $event, row)"
  168. >
  169. </dic-select>
  170. <span v-else>{{ row.code }}</span>
  171. </tempalte>
  172. <template slot="boxTypeForm" slot-scope="{ row }">
  173. <dic-select
  174. v-if="row.$cellEdit"
  175. v-model="row.boxType"
  176. key="id"
  177. label="cnName"
  178. res="records"
  179. url="/blade-los/bcntrtypes/list?status=0&current=1&size=20"
  180. :filterable="true"
  181. :remote="true"
  182. dataName="cnName"
  183. @selectChange="rowDicChange('boxType', $event, row)"
  184. ></dic-select>
  185. <span v-else>{{ row.boxType }}</span>
  186. </template>
  187. <template slot="currencyForm" slot-scope="{ row }">
  188. <dic-select
  189. v-if="row.$cellEdit"
  190. v-model="row.currency"
  191. placeholder="币别"
  192. label="code"
  193. :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + form.purchaseDate + '&type=1'"
  194. :filterable="true"
  195. @selectChange="rowDicChange('currency', $event, row)"
  196. ></dic-select>
  197. <span v-else>{{ row.currency }}</span>
  198. </template>
  199. <tempalte slot="originalBoxEastNameForm" slot-scope="{ row }">
  200. <dic-select
  201. v-if="row.$cellEdit"
  202. v-model="row.originalBoxEastName"
  203. placeholder="箱东"
  204. key="id"
  205. label="shortName"
  206. res="records"
  207. url="/blade-los/bcorps/selectList?status=0&current=1&size=5&corpTypeName=箱东"
  208. :filterable="true"
  209. :remote="true"
  210. dataName="shortName"
  211. @selectChange="rowDicChange('originalBoxEastName', $event, row)"
  212. :slotRight="true"
  213. rightLabel="code"
  214. >
  215. </dic-select>
  216. <span v-else>{{ row.originalBoxEastName }}</span>
  217. </tempalte>
  218. <tempalte slot="stationCnameForm" slot-scope="{ row }">
  219. <dic-select
  220. v-if="row.$cellEdit"
  221. v-model="row.stationCname"
  222. placeholder="场站"
  223. key="id"
  224. label="cnName"
  225. res="records"
  226. url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=场站&status=0"
  227. :filterable="true"
  228. :remote="true"
  229. dataName="cnName"
  230. @selectChange="rowDicChange('stationCname', $event, row)"
  231. :slotRight="true"
  232. rightLabel="code"
  233. ></dic-select>
  234. <span v-else>{{ row.stationCname }}</span>
  235. </tempalte>
  236. <tempalte slot="restrictedPortsNameForm" slot-scope="{ row }">
  237. <dic-select
  238. v-show="row.$cellEdit"
  239. v-model="row.restrictedPortsName"
  240. placeholder="港口"
  241. key="id"
  242. label="code"
  243. url="/blade-los/bports/listAll?status=0"
  244. :filterable="true"
  245. :multiple="true"
  246. :collapseTags="true"
  247. @selectChange="rowDicChange('restrictedPortsName', $event, row)"
  248. dataType="string"
  249. :slotRight="true"
  250. rightLabel="code"
  251. ></dic-select>
  252. <span v-show="!row.$cellEdit">{{ row.restrictedPortsName }}</span>
  253. </tempalte>
  254. <tempalte slot="restrictingShippingCompaniesNameForm" slot-scope="{ row }">
  255. <dic-select
  256. v-show="row.$cellEdit"
  257. v-model="row.restrictingShippingCompaniesName"
  258. placeholder="船公司"
  259. key="id"
  260. label="cnName"
  261. url="/blade-los/bcorps/listAll?status=0&corpTypeName=船公司"
  262. :filterable="true"
  263. :multiple="true"
  264. :collapseTags="true"
  265. :slotRight="true"
  266. rightLabel="code"
  267. @selectChange="rowDicChange('restrictingShippingCompaniesName', $event, row)"
  268. dataType="string"
  269. ></dic-select>
  270. <span v-show="!row.$cellEdit">{{ row.restrictingShippingCompaniesName }}</span>
  271. </tempalte>
  272. </avue-crud>
  273. </trade-card>
  274. <trade-card title="操作记录">
  275. <avue-form :option="optionForm2" v-model="form" ref="form2"> </avue-form>
  276. </trade-card>
  277. </el-tab-pane>
  278. <el-tab-pane label="费用信息">
  279. <el-card
  280. v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1 ? true : roleName.indexOf('应付查看') != -1"
  281. class="box-card"
  282. style="margin: 2px 0"
  283. >
  284. <avue-crud
  285. :option="feedOption"
  286. :data="feeCenterListD"
  287. id="out-table"
  288. ref="crud2"
  289. :header-cell-class-name="headerClassName"
  290. :row-style="{ height: '20px' }"
  291. :cell-style="{ padding: '0px' }"
  292. @selection-change="feedChange"
  293. @row-update="rowUpdate"
  294. @resetColumn="resetColumn('crud2', 'feedOption', 'feedOptionBack', 463)"
  295. @saveColumn="saveColumn('crud2', 'feedOption', 'feedOptionBack', 463)"
  296. >
  297. <template slot="menuLeft">
  298. <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
  299. <i class="el-icon-coin"></i>
  300. <span>应收费用</span>
  301. </div>
  302. <el-button type="info" plain size="small" :disabled="form.buxStaus == '已确认'" @click="allClick('D费用一键保存')"
  303. >一键保存</el-button
  304. >
  305. <el-button type="info" plain size="small" :disabled="form.buxStaus == '已确认'" @click="allClick('D费用一键编辑')"
  306. >一键编辑</el-button
  307. >
  308. <el-button
  309. type="danger"
  310. plain
  311. size="small"
  312. :disabled="selectionfeedList.length == 0 || form.buxStaus == '已确认'"
  313. @click="allClick('D费用批量删除')"
  314. >批量删除</el-button
  315. >
  316. <el-button
  317. type="primary"
  318. plain
  319. size="small"
  320. :disabled="selectionfeedList.length == 0 || form.buxStaus == '已确认'"
  321. @click="allClick('D费用申请')"
  322. >请核费用</el-button
  323. >
  324. <el-button
  325. type="danger"
  326. plain
  327. size="small"
  328. :disabled="selectionfeedList.length == 0 || form.buxStaus == '已确认'"
  329. @click="allClick('D撤销请核')"
  330. >撤销请核</el-button
  331. >
  332. <el-button type="primary" plain size="small" :disabled="selectionfeedList.length != 1" @click="allClick('D申请修改')"
  333. >申请修改</el-button
  334. >
  335. <el-button type="success" plain size="small" :disabled="selectionfeedList.length != 1" @click="allClick('D申请删除')"
  336. >申请删除</el-button
  337. >
  338. <el-button type="danger" plain size="small" :disabled="selectionfeedList.length != 1" @click="allClick('D取消申请')"
  339. >取消申请</el-button
  340. >
  341. <el-button type="primary" plain size="small" @click="printingCostsfun('D')">打印账单</el-button>
  342. </template>
  343. <template slot="indexHeader" slot-scope="{ row, index }">
  344. <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="form.buxStaus == '已确认'" circle @click="feedAddRow()">
  345. </el-button>
  346. </template>
  347. <template slot="index" slot-scope="{ row, index }">
  348. <span>{{ index + 1 }}</span>
  349. </template>
  350. <template slot="billTypeForm" slot-scope="{ row, index }">
  351. <dic-select
  352. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  353. v-model="row.billType"
  354. key="id"
  355. label="cnName"
  356. res="records"
  357. url="/blade-los/bcorpstypedefine/list?current=1&size=20"
  358. :filterable="true"
  359. :remote="true"
  360. dataName="cnName"
  361. @selectChange="rowDicChange('billType', $event, row)"
  362. ></dic-select>
  363. <span v-else>{{ row.billType }}</span>
  364. </template>
  365. <template slot="cntrNoForm" slot-scope="{ row, index }">
  366. <dic-select
  367. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  368. v-model="row.cntrNo"
  369. key="id"
  370. label="code"
  371. :mockData="form.tradingBoxItemsList"
  372. :filterable="true"
  373. ></dic-select>
  374. <span v-else>{{ row.cntrNo }}</span>
  375. </template>
  376. <template slot="corpCnNameForm" slot-scope="{ row, index }">
  377. <dic-select
  378. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  379. :key="updateSearchKey"
  380. v-model="row.corpCnName"
  381. placeholder="付费对象"
  382. label="shortName"
  383. res="records"
  384. :slotRight="true"
  385. rightLabel="code"
  386. :url="'/blade-los/bcorps/selectList?status=0&current=1&size=5&corpTypeName=' + row.billType"
  387. :filterable="true"
  388. :remote="true"
  389. dataName="shortName"
  390. @selectChange="rowDicChange('corpCnName', $event, row)"
  391. ></dic-select>
  392. <span v-else>{{ row.corpCnName }}</span>
  393. </template>
  394. <template slot="feeCnNameForm" slot-scope="{ row }">
  395. <dic-select
  396. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  397. v-model="row.feeCnName"
  398. key="id"
  399. placeholder="费用名称"
  400. label="cnName"
  401. res="records"
  402. url="/blade-los/bfees/list?status=0&current=1&size=20"
  403. :filterable="true"
  404. :remote="true"
  405. dataName="cnName"
  406. @selectChange="rowDicChange('feeCnName', $event, row)"
  407. ></dic-select>
  408. <span v-else>{{ row.feeCnName }}</span>
  409. </template>
  410. <template slot="curCodeForm" slot-scope="{ row }">
  411. <dic-select
  412. v-if="row.$cellEdit"
  413. v-model="row.curCode"
  414. placeholder="币别"
  415. label="code"
  416. :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + form.purchaseDate + '&type=1'"
  417. :filterable="true"
  418. @selectChange="rowDicChange('curCodeD', $event, row)"
  419. ></dic-select>
  420. <span v-else>{{ row.curCode }}</span>
  421. </template>
  422. <template slot="exrateForm" slot-scope="{ row }">
  423. <el-input-number
  424. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  425. v-model="row.exrate"
  426. :controls="false"
  427. placeholder="请输入 汇率"
  428. size="small"
  429. style="width: 100%;"
  430. ></el-input-number>
  431. <span v-else>{{ row.exrate }}</span>
  432. </template>
  433. <template slot="unitNoForm" slot-scope="{ row, index }">
  434. <dic-select
  435. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  436. v-model="row.unitNo"
  437. label="cnName"
  438. url="/blade-los/bunits/listAll?status=0"
  439. :filterable="true"
  440. ></dic-select>
  441. <span v-else>{{ row.unitNo }}</span>
  442. </template>
  443. <template slot="priceForm" slot-scope="{ row }">
  444. <el-input-number
  445. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  446. v-model="row.price"
  447. :controls="false"
  448. placeholder="请输入 成本价"
  449. size="small"
  450. style="width: 100%;"
  451. :precision="2"
  452. @change="countChange(row)"
  453. ></el-input-number>
  454. <span v-else>{{ row.price }}</span>
  455. </template>
  456. <template slot="quantityForm" slot-scope="{ row }">
  457. <el-input-number
  458. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  459. v-model="row.quantity"
  460. :controls="false"
  461. placeholder="请输入 成本价"
  462. size="small"
  463. style="width: 100%;"
  464. :precision="0"
  465. @change="countChange(row)"
  466. ></el-input-number>
  467. <span v-else>{{ row.quantity }}</span>
  468. </template>
  469. <template slot="remarks" slot-scope="{ row }">
  470. <el-input
  471. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  472. v-model="row.remarks"
  473. placeholder="请输入 备注"
  474. size="small"
  475. style="width: 100%;"
  476. ></el-input>
  477. <span v-else>{{ row.remarks }}</span>
  478. </template>
  479. </avue-crud>
  480. </el-card>
  481. <el-card
  482. v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1 ? true : roleName.indexOf('应付查看') != -1"
  483. class="box-card"
  484. style="margin: 2px 0"
  485. >
  486. <avue-crud
  487. :option="feecOption"
  488. :data="feeCenterListC"
  489. id="out-table"
  490. ref="crud3"
  491. :header-cell-class-name="headerClassName"
  492. :row-style="{ height: '20px' }"
  493. :cell-style="{ padding: '0px' }"
  494. @selection-change="feecChange"
  495. @row-update="rowUpdate"
  496. @resetColumn="resetColumn('crud3', 'feecOption', 'feecOptionBack', 464)"
  497. @saveColumn="saveColumn('crud3', 'feecOption', 'feecOptionBack', 464)"
  498. >
  499. <template slot="menuLeft">
  500. <div style="display: inline-block;margin-right: 20px" class="disabledBox meetSize">
  501. <i class="el-icon-coin"></i>
  502. <span>应付费用</span>
  503. </div>
  504. <el-button type="info" plain size="small" :disabled="form.buxStaus == '已确认'" @click="allClick('C费用一键保存')"
  505. >一键保存</el-button
  506. >
  507. <el-button type="info" plain size="small" :disabled="form.buxStaus == '已确认'" @click="allClick('C费用一键编辑')"
  508. >一键编辑</el-button
  509. >
  510. <el-button
  511. type="danger"
  512. plain
  513. size="small"
  514. :disabled="selectionfeecList.length == 0 || form.buxStaus == '已确认'"
  515. @click="allClick('C费用批量删除')"
  516. >批量删除</el-button
  517. >
  518. <el-button
  519. type="primary"
  520. plain
  521. size="small"
  522. :disabled="selectionfeecList.length == 0 || form.buxStaus == '已确认'"
  523. @click="allClick('C费用申请')"
  524. >请核费用</el-button
  525. >
  526. <el-button
  527. type="danger"
  528. plain
  529. size="small"
  530. :disabled="selectionfeecList.length == 0 || form.buxStaus == '已确认'"
  531. @click="allClick('C撤销请核')"
  532. >撤销请核</el-button
  533. >
  534. <el-button type="primary" plain size="small" :disabled="selectionfeecList.length != 1" @click="allClick('C申请修改')"
  535. >申请修改</el-button
  536. >
  537. <el-button type="success" plain size="small" :disabled="selectionfeecList.length != 1" @click="allClick('C申请删除')"
  538. >申请删除</el-button
  539. >
  540. <el-button type="danger" plain size="small" :disabled="selectionfeecList.length != 1" @click="allClick('C取消申请')"
  541. >取消申请</el-button
  542. >
  543. <el-button type="primary" plain size="small" @click="printingCostsfun('C')">打印账单</el-button>
  544. </template>
  545. <template slot="indexHeader" slot-scope="{ row, index }">
  546. <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="form.buxStaus == '已确认'" circle @click="feecAddRow()">
  547. </el-button>
  548. </template>
  549. <template slot="index" slot-scope="{ row, index }">
  550. <span>{{ index + 1 }}</span>
  551. </template>
  552. <template slot="billTypeForm" slot-scope="{ row, index }">
  553. <dic-select
  554. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  555. v-model="row.billType"
  556. key="id"
  557. label="cnName"
  558. res="records"
  559. url="/blade-los/bcorpstypedefine/list?status=0&current=1&size=20"
  560. :filterable="true"
  561. :remote="true"
  562. dataName="cnName"
  563. @selectChange="rowDicChange('billType', $event, row, index)"
  564. ></dic-select>
  565. <span v-else>{{ row.billType }}</span>
  566. </template>
  567. <template slot="cntrNoForm" slot-scope="{ row, index }">
  568. <dic-select
  569. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  570. v-model="row.cntrNo"
  571. key="id"
  572. label="code"
  573. :mockData="form.tradingBoxItemsList"
  574. :filterable="true"
  575. ></dic-select>
  576. <span v-else>{{ row.cntrNo }}</span>
  577. </template>
  578. <template slot="corpCnNameForm" slot-scope="{ row, index }">
  579. <dic-select
  580. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  581. :key="updateSearchKey"
  582. v-model="row.corpCnName"
  583. placeholder="付费对象"
  584. label="shortName"
  585. res="records"
  586. :slotRight="true"
  587. rightLabel="code"
  588. :url="'/blade-los/bcorps/selectList?status=0&current=1&size=5&corpTypeName=' + row.billType"
  589. :filterable="true"
  590. :remote="true"
  591. dataName="shortName"
  592. @selectChange="rowDicChange('corpCnName', $event, row)"
  593. ></dic-select>
  594. <span v-else>{{ row.corpCnName }}</span>
  595. </template>
  596. <template slot="feeCnNameForm" slot-scope="{ row }">
  597. <dic-select
  598. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  599. v-model="row.feeCnName"
  600. key="id"
  601. placeholder="费用名称"
  602. label="cnName"
  603. res="records"
  604. url="/blade-los/bfees/list?status=0&current=1&size=20"
  605. :filterable="true"
  606. :remote="true"
  607. dataName="cnName"
  608. @selectChange="rowDicChange('feeCnName', $event, row)"
  609. ></dic-select>
  610. <span v-else>{{ row.feeCnName }}</span>
  611. </template>
  612. <template slot="curCodeForm" slot-scope="{ row }">
  613. <dic-select
  614. v-if="row.$cellEdit"
  615. v-model="row.curCode"
  616. placeholder="币别"
  617. label="code"
  618. :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + form.purchaseDate + '&type=1'"
  619. :filterable="true"
  620. @selectChange="rowDicChange('curCodeC', $event, row)"
  621. ></dic-select>
  622. <span v-else>{{ row.curCode }}</span>
  623. </template>
  624. <template slot="exrateForm" slot-scope="{ row }">
  625. <el-input-number
  626. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  627. v-model="row.exrate"
  628. :controls="false"
  629. placeholder="请输入 汇率"
  630. size="small"
  631. style="width: 100%;"
  632. ></el-input-number>
  633. <span v-else>{{ row.exrate }}</span>
  634. </template>
  635. <template slot="unitNoForm" slot-scope="{ row, index }">
  636. <dic-select
  637. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  638. v-model="row.unitNo"
  639. label="cnName"
  640. url="/blade-los/bunits/listAll?status=0"
  641. :filterable="true"
  642. ></dic-select>
  643. <span v-else>{{ row.unitNo }}</span>
  644. </template>
  645. <template slot="priceForm" slot-scope="{ row }">
  646. <el-input-number
  647. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  648. v-model="row.price"
  649. :controls="false"
  650. placeholder="请输入 成本价"
  651. size="small"
  652. style="width: 100%;"
  653. :precision="2"
  654. @change="countChange(row)"
  655. ></el-input-number>
  656. <span v-else>{{ row.price }}</span>
  657. </template>
  658. <template slot="quantityForm" slot-scope="{ row }">
  659. <el-input-number
  660. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  661. v-model="row.quantity"
  662. :controls="false"
  663. placeholder="请输入 成本价"
  664. size="small"
  665. style="width: 100%;"
  666. :precision="0"
  667. @change="countChange(row)"
  668. ></el-input-number>
  669. <span v-else>{{ row.quantity }}</span>
  670. </template>
  671. <template slot="remarks" slot-scope="{ row }">
  672. <el-input
  673. v-if="row.$cellEdit && !(row.automaticGenerated == 1)"
  674. v-model="row.remarks"
  675. placeholder="请输入 备注"
  676. size="small"
  677. style="width: 100%;"
  678. ></el-input>
  679. <span v-else>{{ row.remarks }}</span>
  680. </template>
  681. </avue-crud>
  682. </el-card>
  683. <avue-crud
  684. id="out-table"
  685. class="box-card"
  686. :header-cell-class-name="headerClassName"
  687. ref="crud4"
  688. :row-style="{ height: '16px' }"
  689. :cell-style="{ padding: '0px' }"
  690. :option="sumOption"
  691. :data="sumData"
  692. ></avue-crud>
  693. <div
  694. v-if="
  695. roleName.indexOf('admin') != -1 ||
  696. roleName.indexOf('利润查看') != -1 ||
  697. ((roleName.indexOf('应收修改') != -1 || roleName.indexOf('应收查看') != -1) &&
  698. (roleName.indexOf('应付修改') != -1 || roleName.indexOf('应付查看') != -1))
  699. "
  700. style="display: flex;align-items: center;justify-content: space-around"
  701. >
  702. <div style="width: 30%">
  703. <div style="display: flex;align-items: center;justify-content: space-around">
  704. <div>
  705. <div>
  706. <span>本币:</span>
  707. </div>
  708. </div>
  709. <div>
  710. <div style="color: #81B337">
  711. <span>应收:</span>
  712. <span class="weightnum">{{ form.amountD ? form.amountD : 0 }}元</span>
  713. </div>
  714. </div>
  715. <div>
  716. <div style="color: #6BBCD1">
  717. <span>应付:</span>
  718. <span class="weightnum">{{ form.amountC ? form.amountC : 0 }}元</span>
  719. </div>
  720. </div>
  721. <div class="bottomFlex">
  722. <span>利润</span>
  723. <span>{{ form.profit ? form.profit : 0 }}元</span>
  724. </div>
  725. </div>
  726. </div>
  727. <div style="width: 30%">
  728. <div style="display: flex;align-items: center;justify-content: space-around">
  729. <div>
  730. <div>
  731. <span>外币:</span>
  732. </div>
  733. </div>
  734. <div>
  735. <div style="color: #81B337">
  736. <span>应收:</span>
  737. <span class="weightnum">{{ form.amountDUsd ? form.amountDUsd : 0 }}元</span>
  738. </div>
  739. </div>
  740. <div>
  741. <div style="color: #6BBCD1">
  742. <span>应付:</span>
  743. <span class="weightnum">{{ form.amountCUsd ? form.amountCUsd : 0 }}元</span>
  744. </div>
  745. </div>
  746. <div class="bottomFlex">
  747. <span>利润</span>
  748. <span>{{ form.profitUsd ? form.profitUsd : 0 }}元</span>
  749. </div>
  750. </div>
  751. </div>
  752. <div style="width: 30%">
  753. <div style="display: flex;align-items: center;justify-content: space-around">
  754. <div>
  755. <div>
  756. <span>本币:</span>
  757. </div>
  758. </div>
  759. <div>
  760. <div style="color: #81B337">
  761. <span>应收:</span>
  762. <span class="weightnum">{{ form.totalAmountD ? form.totalAmountD : 0 }}元</span>
  763. </div>
  764. </div>
  765. <div>
  766. <div style="color: #6BBCD1">
  767. <span>应付:</span>
  768. <span class="weightnum">{{ form.totalAmountC ? form.totalAmountC : 0 }}元</span>
  769. </div>
  770. </div>
  771. <div class="bottomFlex">
  772. <span>利润</span>
  773. <span>{{ form.totalProfit ? form.totalProfit : 0 }}元</span>
  774. </div>
  775. </div>
  776. </div>
  777. </div>
  778. </el-tab-pane>
  779. <el-tab-pane label="文件中心">
  780. <containerTitle title="上传附件"></containerTitle>
  781. <c-upload
  782. :data="form.tradingBoxFilesList"
  783. :enumerationValue="76"
  784. deleteUrl="/api/blade-los/tradingBoxFiles/remove"
  785. display
  786. :disabled="editButton"
  787. ></c-upload>
  788. </el-tab-pane>
  789. </el-tabs>
  790. </div>
  791. <reports :id="form.id" :assemblyForm="form" businessValue="XGFY" ref="report"></reports>
  792. <business-reports :id="form.id" :itemIds="itemIds" ref="print" businessValue="XGFY" :type="true"></business-reports>
  793. <business-reports
  794. :id="form.id"
  795. :itemIds="itemCIds"
  796. ref="printD"
  797. businessValue="XGFY"
  798. classifyCode="费用"
  799. groupCode="应收"
  800. :selecList="selectionfeedList"
  801. ></business-reports>
  802. <business-reports
  803. :id="form.id"
  804. :itemIds="itemCIds"
  805. ref="printC"
  806. businessValue="XGFY"
  807. classifyCode="费用"
  808. groupCode="应付"
  809. :selecList="selectionfeecList"
  810. ></business-reports>
  811. <!--审核弹窗-->
  812. <el-dialog
  813. append-to-body
  814. title="审批进度"
  815. class="el-dialogDeep"
  816. :visible.sync="checkScheduleDialog"
  817. width="40%"
  818. :close-on-click-modal="false"
  819. :destroy-on-close="true"
  820. :close-on-press-escape="false"
  821. v-dialog-drag
  822. >
  823. <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
  824. </el-dialog>
  825. <!-- 启用 -->
  826. <el-dialog append-to-body title="放箱号" :visible.sync="activationDialog" width="30%" :before-close="activationClose" v-dialog-drag>
  827. <span>
  828. <avue-form ref="form2" v-model="activationForm" :option="activationOption">
  829. <tempalte slot="polCname">
  830. <dic-select
  831. v-model="activationForm.polCname"
  832. placeholder="港口"
  833. key="id"
  834. label="cnName"
  835. res="records"
  836. url="/blade-los/bports/list?status=0"
  837. :filterable="true"
  838. :remote="true"
  839. dataName="cnName"
  840. @selectChange="dicChange('polCname', $event)"
  841. ></dic-select>
  842. </tempalte>
  843. <tempalte slot="podCname">
  844. <dic-select
  845. v-model="activationForm.podCname"
  846. placeholder="港口"
  847. key="id"
  848. label="cnName"
  849. res="records"
  850. url="/blade-los/bports/list?status=0"
  851. :filterable="true"
  852. :remote="true"
  853. dataName="cnName"
  854. @selectChange="dicChange('podCname2', $event)"
  855. :disabled="editDisabled"
  856. ></dic-select>
  857. </tempalte>
  858. </avue-form>
  859. </span>
  860. <span slot="footer" class="dialog-footer">
  861. <el-button @click="activationDialog = false" size="mini">取 消</el-button>
  862. <el-button type="primary" @click.stop="activationSubmit" size="mini">确 定</el-button>
  863. </span>
  864. </el-dialog>
  865. <el-dialog title="导入数据" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false" v-dialog-drag>
  866. <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore" :upload-after="onSuccess">
  867. <template slot="excelTemplate">
  868. <el-button type="primary" @click="handleGet"> 点击下载<i class="el-icon-download el-icon--right"></i> </el-button>
  869. </template>
  870. </avue-form>
  871. <p style="text-align: center;color: #DC0505">
  872. 温馨提示 第一次导入时请先下载模板
  873. </p>
  874. </el-dialog>
  875. <fee-modify
  876. ref="feeModify"
  877. :form="form"
  878. @updateDetail="updateDetail"
  879. url="/boxManagement/boxCost/index"
  880. pageStatus=""
  881. pageLabel="箱管费用"
  882. ></fee-modify>
  883. <fee-modify-view ref="feeModifyView" :form="form"></fee-modify-view>
  884. <reportContainer ref="reportContainer"></reportContainer>
  885. <!--结算单位弹窗-->
  886. <el-dialog title="打印" :visible.sync="printingDialog" append-to-body width="70%" :close-on-click-modal="false" :before-close="handleClose">
  887. <div>
  888. <el-row :gutter="10">
  889. <el-col :span="4">
  890. <avue-tree :option="reportOption" :data="reportTypeData" @node-click="reportNodeClick"></avue-tree>
  891. </el-col>
  892. <el-col :span="20">
  893. <avue-crud
  894. :option="optionPrinting"
  895. :table-loading="printingLoading"
  896. :data="PrintingData"
  897. id="out-table"
  898. :header-cell-class-name="headerClassName"
  899. :row-style="{ height: '20px' }"
  900. :cell-style="{ padding: '0px' }"
  901. >
  902. <template slot-scope="scope" slot="menu">
  903. <el-button type="text" size="small" @click="dialogPreviewfun(scope.row)">打印预览</el-button>
  904. </template>
  905. </avue-crud>
  906. </el-col>
  907. </el-row>
  908. </div>
  909. <span slot="footer" class="dialog-footer">
  910. <el-button size="small" @click="printingDialog = false">取 消</el-button>
  911. </span>
  912. </el-dialog>
  913. <el-dialog title="打印" :visible.sync="selectPrintingDialog" append-to-body width="70%" :close-on-click-modal="false" :before-close="handleClose">
  914. <div>
  915. <reportformsList ref="reportformsList" @reportRadio="reportRadio"></reportformsList>
  916. </div>
  917. <span slot="footer" class="dialog-footer">
  918. <el-button size="small" @click="selectPrintingDialog = false">取 消</el-button>
  919. </span>
  920. </el-dialog>
  921. </div>
  922. </template>
  923. <script>
  924. import {
  925. detail,
  926. submit,
  927. pleaseCheck,
  928. repealCancel,
  929. tradingBoxItem,
  930. tradingBoxFees,
  931. submitItemList,
  932. submitFeeList,
  933. enable,
  934. copyAgent,
  935. confirm,
  936. revoke,
  937. pleaseVerifyCost,
  938. revokeCheckPleaseVerifyCost
  939. } from "@/api/boxManagement/buyContainer/index.js";
  940. import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
  941. import { getFeeCenterCorpIds } from "@/api/iosBasicData/feecenter";
  942. import dicSelect from "@/components/dicSelect/main";
  943. import checkSchedule from "@/components/checkH/checkSchedule.vue";
  944. import businessReports from "@/components/boxManagement/businessReports.vue";
  945. import reports from "@/components/boxManagement/reports.vue";
  946. import feeModify from "@/components/feeModify/boxMain.vue";
  947. import feeModifyView from "@/components/feeModify/view.vue";
  948. import { dateFormat } from "@/util/date";
  949. import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
  950. import { getToken } from "@/util/auth";
  951. import { reportsGetReportData } from "@/api/boxManagement/reports";
  952. import reportformsList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsList.vue";
  953. import { getList as reportsList } from "@/api/iosBasicData/reports";
  954. import _ from "lodash";
  955. import { Header } from "element-ui";
  956. export default {
  957. name: "detailsPage",
  958. data() {
  959. return {
  960. CNYSUM: 0,
  961. USDSUM: 0,
  962. sumData: [],
  963. sumOption: {
  964. border: true,
  965. align: "center",
  966. menuAlign: "center",
  967. menu: false,
  968. header: false,
  969. addBtn: false,
  970. // height: '100px',
  971. column: [
  972. {
  973. label: "客户",
  974. prop: "corpCnName",
  975. overHidden: true
  976. },
  977. {
  978. label: "本币应收",
  979. prop: "rmbD",
  980. overHidden: true
  981. },
  982. {
  983. label: "本币应付",
  984. prop: "rmbC",
  985. overHidden: true
  986. },
  987. {
  988. label: "外币应收",
  989. prop: "usdD",
  990. overHidden: true
  991. },
  992. {
  993. label: "外币应付",
  994. prop: "usdC",
  995. overHidden: true
  996. },
  997. {
  998. label: "合计应收",
  999. prop: "sumD",
  1000. overHidden: true
  1001. },
  1002. {
  1003. label: "合计应付",
  1004. prop: "sumC",
  1005. overHidden: true
  1006. }
  1007. ]
  1008. },
  1009. boxSelectionList: [],
  1010. rulesList: [],
  1011. rtOption: {
  1012. border: true,
  1013. align: "center",
  1014. menuWidth: 120,
  1015. // menu: false,
  1016. editBtn: false,
  1017. delBtn: false,
  1018. header: false,
  1019. addBtn: false,
  1020. height: "400px",
  1021. column: [
  1022. {
  1023. label: "index",
  1024. prop: "index",
  1025. width: "55",
  1026. fixed: true,
  1027. headerslot: true
  1028. },
  1029. {
  1030. label: "起",
  1031. prop: "riseDays",
  1032. cell: true,
  1033. type: "number",
  1034. controls: false,
  1035. overHidden: true
  1036. },
  1037. {
  1038. label: "止",
  1039. prop: "stopDays",
  1040. cell: true,
  1041. type: "number",
  1042. controls: false,
  1043. overHidden: true
  1044. },
  1045. {
  1046. label: "费率",
  1047. prop: "rate",
  1048. cell: true,
  1049. type: "number",
  1050. controls: false,
  1051. overHidden: true
  1052. },
  1053. {
  1054. label: "币别",
  1055. prop: "curCode",
  1056. cell: true,
  1057. type: "select",
  1058. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  1059. props: {
  1060. label: "dictValue",
  1061. value: "dictValue"
  1062. },
  1063. overHidden: true
  1064. }
  1065. ]
  1066. },
  1067. rtDialog: false,
  1068. excelBox: false,
  1069. excelForm: {},
  1070. excelLoading: false,
  1071. excelOption: {
  1072. submitBtn: false,
  1073. emptyBtn: false,
  1074. column: [
  1075. {
  1076. label: "模板下载",
  1077. prop: "excelTemplate",
  1078. formslot: true,
  1079. span: 24
  1080. },
  1081. {
  1082. label: "模板上传",
  1083. prop: "excelFile",
  1084. type: "upload",
  1085. drag: true,
  1086. loadText: "模板上传中,请稍等",
  1087. span: 24,
  1088. propsHttp: {
  1089. res: "data"
  1090. },
  1091. tip: "请上传 .xls,.xlsx 标准格式文件",
  1092. action: "/api/blade-los/tradingBoxItem/importBoxItem"
  1093. }
  1094. ]
  1095. },
  1096. activationForm: {},
  1097. activationOption: {
  1098. menuBtn: false,
  1099. span: 6,
  1100. disabled: false,
  1101. column: [
  1102. {
  1103. label: "放箱号",
  1104. prop: "containerNumber",
  1105. span: 24,
  1106. rules: [
  1107. {
  1108. required: true,
  1109. message: " ",
  1110. trigger: "blur"
  1111. }
  1112. ]
  1113. },
  1114. {
  1115. label: "起运港",
  1116. prop: "polCname",
  1117. span: 24,
  1118. rules: [
  1119. {
  1120. required: true,
  1121. message: " ",
  1122. trigger: "blur"
  1123. }
  1124. ]
  1125. },
  1126. {
  1127. label: "目的港",
  1128. prop: "podCname",
  1129. span: 24,
  1130. rules: [
  1131. {
  1132. required: true,
  1133. message: " ",
  1134. trigger: "blur"
  1135. }
  1136. ]
  1137. },
  1138. {
  1139. label: "启用日期",
  1140. prop: "activationDate",
  1141. span: 24,
  1142. type: "date",
  1143. format: "yyyy-MM-dd",
  1144. valueFormat: "yyyy-MM-dd HH:mm:ss",
  1145. rules: [
  1146. {
  1147. required: true,
  1148. message: "",
  1149. trigger: "blur"
  1150. }
  1151. ]
  1152. }
  1153. ]
  1154. },
  1155. activationDialog: false,
  1156. itemCIds: null,
  1157. feeType: null,
  1158. selectionList: [],
  1159. selectionfeedList: [],
  1160. selectionfeecList: [],
  1161. checkId: "", // 审核需要的id
  1162. batchNo: "",
  1163. checkScheduleDialog: false, // 审核弹窗
  1164. editButton: false,
  1165. editDisabled: false,
  1166. form: {
  1167. type: "XGFY",
  1168. purchaseDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
  1169. tradingBoxItemsList: [],
  1170. feeCenterList: [],
  1171. tradingBoxFilesList: []
  1172. },
  1173. oldForm: {},
  1174. optionForm: {
  1175. menuBtn: false,
  1176. span: 6,
  1177. disabled: false,
  1178. labelWidth: 100,
  1179. column: [
  1180. {
  1181. label: "结算单位",
  1182. prop: "purchaseCompanyName",
  1183. rules: [
  1184. {
  1185. required: true,
  1186. message: " ",
  1187. trigger: "blur"
  1188. }
  1189. ],
  1190. disabled: false
  1191. },
  1192. {
  1193. label: "合同号",
  1194. prop: "contractNo",
  1195. rules: [
  1196. {
  1197. required: true,
  1198. message: " ",
  1199. trigger: "blur"
  1200. }
  1201. ],
  1202. disabled: false
  1203. },
  1204. {
  1205. label: "业务日期",
  1206. prop: "purchaseDate",
  1207. // type: "date",
  1208. // format: "yyyy-MM-dd",
  1209. // valueFormat: "yyyy-MM-dd HH:mm:ss",
  1210. rules: [
  1211. {
  1212. required: true,
  1213. message: " ",
  1214. trigger: "blur"
  1215. }
  1216. ],
  1217. disabled: false
  1218. },
  1219. {
  1220. label: "箱量",
  1221. prop: "boxNumber",
  1222. disabled: false
  1223. },
  1224. {
  1225. label: "业务状态",
  1226. prop: "buxStaus",
  1227. disabled: true
  1228. },
  1229. {
  1230. label: "备注",
  1231. prop: "remarks",
  1232. type: "textarea",
  1233. minRows: 2,
  1234. span: 18
  1235. }
  1236. ]
  1237. },
  1238. optionForm2: {
  1239. menuBtn: false,
  1240. span: 5,
  1241. disabled: true,
  1242. labelWidth: 100,
  1243. column: [
  1244. {
  1245. label: "系统号",
  1246. prop: "sysNo",
  1247. disabled: true
  1248. },
  1249. {
  1250. label: "制单人",
  1251. prop: "createUserName",
  1252. disabled: true,
  1253. span: 4
  1254. },
  1255. {
  1256. label: "制单日期",
  1257. prop: "createTime",
  1258. disabled: true
  1259. },
  1260. {
  1261. label: "修改人",
  1262. prop: "updateUserName",
  1263. disabled: true,
  1264. span: 4
  1265. },
  1266. {
  1267. label: "修改日期",
  1268. prop: "updateTime",
  1269. disabled: true
  1270. }
  1271. ]
  1272. },
  1273. option: {},
  1274. optionBack: {
  1275. // height: 'auto',
  1276. maxHeight: 340,
  1277. calcHeight: 30,
  1278. menuWidth: 60,
  1279. searchMenuSpan: 18,
  1280. tip: false,
  1281. border: true,
  1282. addBtn: false,
  1283. viewBtn: false,
  1284. editBtn: false,
  1285. delBtn: false,
  1286. refreshBtn: false,
  1287. selection: true,
  1288. align: "center",
  1289. menu: false,
  1290. column: [
  1291. {
  1292. label: "index",
  1293. prop: "index",
  1294. width: "55",
  1295. fixed: true,
  1296. headerslot: true
  1297. },
  1298. // {
  1299. // label: "是否启用",
  1300. // prop: "whetherEnable",
  1301. // overHidden: true,
  1302. // },
  1303. // {
  1304. // label: '放箱号',
  1305. // prop: 'containerNumber',
  1306. // overHidden: true,
  1307. // width: 100,
  1308. // },
  1309. {
  1310. label: "箱号",
  1311. prop: "code",
  1312. width: 140,
  1313. cell: true,
  1314. slot: true,
  1315. formslot: true,
  1316. overHidden: true,
  1317. rules: [
  1318. {
  1319. required: true,
  1320. message: "请输入箱号",
  1321. trigger: "blur"
  1322. }
  1323. ]
  1324. },
  1325. // {
  1326. // label: '代理名称',
  1327. // prop: 'agentName',
  1328. // cell: true,
  1329. // slot: true,
  1330. // formslot: true,
  1331. // overHidden: true,
  1332. // width: 100
  1333. // },
  1334. {
  1335. label: "箱型",
  1336. prop: "boxType",
  1337. width: 100,
  1338. cell: true,
  1339. slot: true,
  1340. formslot: true,
  1341. overHidden: true,
  1342. rules: [
  1343. {
  1344. required: true,
  1345. message: "请选择箱型",
  1346. trigger: "blur"
  1347. }
  1348. ]
  1349. },
  1350. {
  1351. label: "箱属",
  1352. prop: "boxBelongsTo",
  1353. overHidden: true,
  1354. cell: true,
  1355. width: 100,
  1356. type: "select",
  1357. dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxBelongsTo",
  1358. props: {
  1359. label: "dictValue",
  1360. value: "dictValue"
  1361. },
  1362. rules: [
  1363. {
  1364. required: true,
  1365. message: "请选择箱属",
  1366. trigger: "blur"
  1367. }
  1368. ]
  1369. },
  1370. {
  1371. label: "放箱号类型",
  1372. prop: "boxCategory",
  1373. overHidden: true,
  1374. cell: true,
  1375. width: 100,
  1376. type: "select",
  1377. dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxCategory",
  1378. props: {
  1379. label: "dictValue",
  1380. value: "dictValue"
  1381. },
  1382. rules: [
  1383. {
  1384. required: true,
  1385. message: "请选择放箱号类型",
  1386. trigger: "blur"
  1387. }
  1388. ]
  1389. },
  1390. {
  1391. label: "维修部位",
  1392. prop: "repairLocation",
  1393. cell: true,
  1394. overHidden: true,
  1395. width: 100
  1396. },
  1397. {
  1398. label: "箱况",
  1399. prop: "boxCondition",
  1400. overHidden: true,
  1401. cell: true,
  1402. width: 100,
  1403. type: "select",
  1404. dicData: [
  1405. {
  1406. label: "新",
  1407. value: "新"
  1408. },
  1409. {
  1410. label: "旧",
  1411. value: "旧"
  1412. }
  1413. ],
  1414. rules: [
  1415. {
  1416. required: true,
  1417. message: "请选择箱况",
  1418. trigger: "blur"
  1419. }
  1420. ]
  1421. },
  1422. {
  1423. label: "箱状态",
  1424. prop: "status",
  1425. width: 100,
  1426. overHidden: true
  1427. },
  1428. {
  1429. label: "箱好坏",
  1430. prop: "boxStatus",
  1431. width: 100,
  1432. cell: true,
  1433. overHidden: true,
  1434. type: "select",
  1435. dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_status",
  1436. props: {
  1437. label: "dictValue",
  1438. value: "dictValue"
  1439. },
  1440. rules: [
  1441. {
  1442. required: true,
  1443. message: "请选择箱好坏",
  1444. trigger: "blur"
  1445. }
  1446. ]
  1447. },
  1448. {
  1449. label: "箱动态",
  1450. prop: "boxDynamics",
  1451. width: 100,
  1452. overHidden: true
  1453. },
  1454. {
  1455. label: "金额",
  1456. prop: "amount",
  1457. cell: true,
  1458. type: "number",
  1459. controls: false,
  1460. overHidden: true,
  1461. width: 100,
  1462. rules: [
  1463. {
  1464. required: true,
  1465. message: "请输入金额",
  1466. trigger: "blur"
  1467. }
  1468. ]
  1469. },
  1470. {
  1471. label: "币别",
  1472. prop: "currency",
  1473. width: 100,
  1474. cell: true,
  1475. slot: true,
  1476. formslot: true,
  1477. overHidden: true,
  1478. rules: [
  1479. {
  1480. required: true,
  1481. message: "请选择币别",
  1482. trigger: "blur"
  1483. }
  1484. ]
  1485. },
  1486. {
  1487. label: "汇率",
  1488. prop: "exrate",
  1489. cell: true,
  1490. type: "number",
  1491. controls: false,
  1492. overHidden: true,
  1493. width: 100,
  1494. rules: [
  1495. {
  1496. required: true,
  1497. message: "请输入汇率",
  1498. trigger: "blur"
  1499. }
  1500. ]
  1501. },
  1502. {
  1503. label: "箱东",
  1504. prop: "boxEastName",
  1505. overHidden: true,
  1506. width: 100
  1507. },
  1508. {
  1509. label: "原箱东",
  1510. prop: "originalBoxEastName",
  1511. cell: true,
  1512. slot: true,
  1513. formslot: true,
  1514. overHidden: true,
  1515. width: 100
  1516. },
  1517. {
  1518. label: "场站",
  1519. prop: "stationCname",
  1520. cell: true,
  1521. slot: true,
  1522. formslot: true,
  1523. overHidden: true,
  1524. width: 100,
  1525. rules: [
  1526. {
  1527. required: true,
  1528. message: "请选择场站",
  1529. trigger: "blur"
  1530. }
  1531. ]
  1532. },
  1533. {
  1534. label: "限制港口",
  1535. prop: "restrictedPortsName",
  1536. cell: true,
  1537. slot: true,
  1538. formslot: true,
  1539. overHidden: true,
  1540. width: 200
  1541. },
  1542. {
  1543. label: "限制船公司",
  1544. prop: "restrictingShippingCompaniesName",
  1545. cell: true,
  1546. slot: true,
  1547. formslot: true,
  1548. overHidden: true,
  1549. width: 200
  1550. },
  1551. {
  1552. label: "启用日期",
  1553. prop: "activationDate",
  1554. // cell: true,
  1555. overHidden: true,
  1556. type: "date",
  1557. format: "yyyy-MM-dd",
  1558. valueFormat: "yyyy-MM-dd HH:mm:ss"
  1559. },
  1560. {
  1561. label: "制单人",
  1562. prop: "createUserName",
  1563. overHidden: true
  1564. },
  1565. {
  1566. label: "制单日期",
  1567. prop: "createTime",
  1568. type: "date",
  1569. overHidden: true,
  1570. width: 120,
  1571. format: "yyyy-MM-dd",
  1572. valueFormat: "yyyy-MM-dd HH:mm:ss"
  1573. },
  1574. {
  1575. label: "修改人",
  1576. prop: "updateUserName",
  1577. overHidden: true
  1578. },
  1579. {
  1580. label: "修改日期",
  1581. prop: "updateTime",
  1582. type: "date",
  1583. overHidden: true,
  1584. width: 120,
  1585. format: "yyyy-MM-dd",
  1586. valueFormat: "yyyy-MM-dd HH:mm:ss"
  1587. },
  1588. {
  1589. label: "备注",
  1590. prop: "remarks",
  1591. cell: true,
  1592. width: 150,
  1593. overHidden: true
  1594. }
  1595. ]
  1596. },
  1597. feedOption: {},
  1598. feedOptionBack: {
  1599. // height: 'auto',
  1600. maxHeight: "250",
  1601. calcHeight: 30,
  1602. menuWidth: 60,
  1603. tip: false,
  1604. border: true,
  1605. addBtn: false,
  1606. viewBtn: false,
  1607. editBtn: false,
  1608. delBtn: false,
  1609. refreshBtn: false,
  1610. selection: true,
  1611. align: "center",
  1612. menu: false,
  1613. column: [
  1614. {
  1615. label: "index",
  1616. prop: "index",
  1617. width: "55",
  1618. fixed: true,
  1619. headerslot: true
  1620. },
  1621. // {
  1622. // label: '账单状态',
  1623. // prop: 'accStatus',
  1624. // overHidden: true,
  1625. // width: 80,
  1626. // type: 'select',
  1627. // dicData: [{
  1628. // label: '未生成',
  1629. // value: 0,
  1630. // }, {
  1631. // label: '已生成',
  1632. // value: 1,
  1633. // }],
  1634. // },
  1635. {
  1636. label: "费用状态",
  1637. prop: "auditStatus",
  1638. overHidden: true,
  1639. width: 80,
  1640. type: "select",
  1641. dicData: [
  1642. {
  1643. label: "录入",
  1644. value: "0"
  1645. },
  1646. {
  1647. label: "提交审核",
  1648. value: "1"
  1649. },
  1650. {
  1651. label: "审核中",
  1652. value: "2"
  1653. },
  1654. {
  1655. label: "审核通过",
  1656. value: "4"
  1657. },
  1658. {
  1659. label: "申请修改",
  1660. value: "5"
  1661. },
  1662. {
  1663. label: "申请删除",
  1664. value: "6"
  1665. }
  1666. ]
  1667. },
  1668. {
  1669. label: "类别",
  1670. prop: "billType",
  1671. width: 100,
  1672. overHidden: true,
  1673. cell: true,
  1674. slot: true,
  1675. formslot: true,
  1676. rules: [
  1677. {
  1678. required: true,
  1679. message: "请选择类别",
  1680. trigger: "blur"
  1681. }
  1682. ]
  1683. },
  1684. {
  1685. label: "收费对象",
  1686. prop: "corpCnName",
  1687. width: "100",
  1688. overHidden: true,
  1689. cell: true,
  1690. slot: true,
  1691. formslot: true,
  1692. rules: [
  1693. {
  1694. required: true,
  1695. message: "请选择付费对象",
  1696. trigger: "blur"
  1697. }
  1698. ]
  1699. },
  1700. {
  1701. label: "箱号",
  1702. prop: "cntrNo",
  1703. width: 140,
  1704. cell: true,
  1705. slot: true,
  1706. formslot: true,
  1707. overHidden: true
  1708. },
  1709. {
  1710. label: "费用名称",
  1711. prop: "feeCnName",
  1712. width: "100",
  1713. overHidden: true,
  1714. cell: true,
  1715. slot: true,
  1716. formslot: true,
  1717. rules: [
  1718. {
  1719. required: true,
  1720. message: "请选择费用名称",
  1721. trigger: "blur"
  1722. }
  1723. ]
  1724. },
  1725. {
  1726. label: "计量单位",
  1727. prop: "unitNo",
  1728. width: "100",
  1729. overHidden: true,
  1730. cell: true,
  1731. slot: true,
  1732. formslot: true
  1733. },
  1734. {
  1735. label: "币别",
  1736. prop: "curCode",
  1737. width: "100",
  1738. overHidden: true,
  1739. cell: true,
  1740. slot: true,
  1741. formslot: true,
  1742. rules: [
  1743. {
  1744. required: true,
  1745. message: "请选择币别",
  1746. trigger: "blur"
  1747. }
  1748. ]
  1749. },
  1750. {
  1751. label: "汇率",
  1752. prop: "exrate",
  1753. width: "100",
  1754. overHidden: true,
  1755. cell: true,
  1756. slot: true,
  1757. formslot: true
  1758. },
  1759. {
  1760. label: "单价",
  1761. prop: "price",
  1762. width: "100",
  1763. overHidden: true,
  1764. cell: true,
  1765. slot: true,
  1766. formslot: true,
  1767. rules: [
  1768. {
  1769. required: true,
  1770. message: "请输入单价",
  1771. trigger: "blur"
  1772. }
  1773. ]
  1774. },
  1775. {
  1776. label: "数量",
  1777. prop: "quantity",
  1778. width: "100",
  1779. overHidden: true,
  1780. cell: true,
  1781. slot: true,
  1782. formslot: true,
  1783. rules: [
  1784. {
  1785. required: true,
  1786. message: "请输入数量",
  1787. trigger: "blur"
  1788. }
  1789. ]
  1790. },
  1791. {
  1792. label: "本币",
  1793. prop: "amountCNY",
  1794. width: "100",
  1795. overHidden: true
  1796. },
  1797. {
  1798. label: "外币",
  1799. prop: "amountUSD",
  1800. width: "100",
  1801. overHidden: true
  1802. },
  1803. {
  1804. label: "付费申请金额",
  1805. prop: "appliedAmount",
  1806. width: "100",
  1807. overHidden: true
  1808. },
  1809. {
  1810. label: "申请发票金额",
  1811. prop: "appliedInvoiceAmount",
  1812. width: "120",
  1813. overHidden: true
  1814. },
  1815. {
  1816. label: "已开票金额",
  1817. prop: "uninvoicedAmount",
  1818. width: "120",
  1819. overHidden: true
  1820. },
  1821. {
  1822. label: "已结算金额",
  1823. prop: "stlTtlAmount",
  1824. width: "120",
  1825. overHidden: true
  1826. },
  1827. {
  1828. label: "制单人",
  1829. prop: "createUserName",
  1830. width: "100",
  1831. overHidden: true
  1832. },
  1833. {
  1834. label: "制单日期",
  1835. prop: "createTime",
  1836. width: "120",
  1837. overHidden: true
  1838. },
  1839. {
  1840. label: "修改人",
  1841. prop: "updateUserName",
  1842. width: "100",
  1843. overHidden: true
  1844. },
  1845. {
  1846. label: "修改日期",
  1847. prop: "updateTime",
  1848. width: "120",
  1849. overHidden: true
  1850. },
  1851. {
  1852. label: "备注",
  1853. prop: "remarks",
  1854. // cell: true,
  1855. width: 150,
  1856. overHidden: true
  1857. }
  1858. ]
  1859. },
  1860. feecOption: {},
  1861. feecOptionBack: {
  1862. // height: 'auto',
  1863. maxHeight: "250",
  1864. calcHeight: 30,
  1865. menuWidth: 60,
  1866. tip: false,
  1867. border: true,
  1868. addBtn: false,
  1869. viewBtn: false,
  1870. editBtn: false,
  1871. delBtn: false,
  1872. refreshBtn: false,
  1873. selection: true,
  1874. align: "center",
  1875. menu: false,
  1876. summaryText: "合计",
  1877. showSummary: true,
  1878. sumColumnList: [
  1879. {
  1880. name: "amount",
  1881. type: "sum",
  1882. decimals: 2
  1883. },
  1884. {
  1885. name: "amountLoc",
  1886. type: "sum",
  1887. decimals: 2
  1888. },
  1889. {
  1890. name: "appliedInvoiceAmount",
  1891. type: "sum",
  1892. decimals: 2
  1893. },
  1894. {
  1895. name: "uninvoicedAmount",
  1896. type: "sum",
  1897. decimals: 2
  1898. },
  1899. {
  1900. name: "stlTtlAmount",
  1901. type: "sum",
  1902. decimals: 2
  1903. }
  1904. ],
  1905. column: [
  1906. {
  1907. label: "index",
  1908. prop: "index",
  1909. width: "55",
  1910. fixed: true,
  1911. headerslot: true
  1912. },
  1913. // {
  1914. // label: '账单状态',
  1915. // prop: 'accStatus',
  1916. // overHidden: true,
  1917. // width: 80,
  1918. // type: 'select',
  1919. // dicData: [{
  1920. // label: '未生成',
  1921. // value: 0,
  1922. // }, {
  1923. // label: '已生成',
  1924. // value: 1,
  1925. // }],
  1926. // },
  1927. {
  1928. label: "费用状态",
  1929. prop: "auditStatus",
  1930. overHidden: true,
  1931. width: 80,
  1932. type: "select",
  1933. dicData: [
  1934. {
  1935. label: "录入",
  1936. value: "0"
  1937. },
  1938. {
  1939. label: "提交审核",
  1940. value: "1"
  1941. },
  1942. {
  1943. label: "审核中",
  1944. value: "2"
  1945. },
  1946. {
  1947. label: "审核通过",
  1948. value: "4"
  1949. },
  1950. {
  1951. label: "申请修改",
  1952. value: "5"
  1953. },
  1954. {
  1955. label: "申请删除",
  1956. value: "6"
  1957. }
  1958. ]
  1959. },
  1960. {
  1961. label: "类别",
  1962. prop: "billType",
  1963. width: 100,
  1964. overHidden: true,
  1965. cell: true,
  1966. slot: true,
  1967. formslot: true,
  1968. rules: [
  1969. {
  1970. required: true,
  1971. message: "请选择类别",
  1972. trigger: "blur"
  1973. }
  1974. ]
  1975. },
  1976. {
  1977. label: "收费对象",
  1978. prop: "corpCnName",
  1979. width: "100",
  1980. overHidden: true,
  1981. cell: true,
  1982. slot: true,
  1983. formslot: true,
  1984. rules: [
  1985. {
  1986. required: true,
  1987. message: "请选择付费对象",
  1988. trigger: "blur"
  1989. }
  1990. ]
  1991. },
  1992. {
  1993. label: "箱号",
  1994. prop: "cntrNo",
  1995. width: 140,
  1996. cell: true,
  1997. slot: true,
  1998. formslot: true,
  1999. overHidden: true
  2000. },
  2001. {
  2002. label: "费用名称",
  2003. prop: "feeCnName",
  2004. width: "100",
  2005. overHidden: true,
  2006. cell: true,
  2007. slot: true,
  2008. formslot: true,
  2009. rules: [
  2010. {
  2011. required: true,
  2012. message: "请选择费用名称",
  2013. trigger: "blur"
  2014. }
  2015. ]
  2016. },
  2017. {
  2018. label: "计量单位",
  2019. prop: "unitNo",
  2020. width: "100",
  2021. overHidden: true,
  2022. cell: true,
  2023. slot: true,
  2024. formslot: true
  2025. },
  2026. {
  2027. label: "币别",
  2028. prop: "curCode",
  2029. width: "100",
  2030. overHidden: true,
  2031. cell: true,
  2032. slot: true,
  2033. formslot: true,
  2034. rules: [
  2035. {
  2036. required: true,
  2037. message: "请选择币别",
  2038. trigger: "blur"
  2039. }
  2040. ]
  2041. },
  2042. {
  2043. label: "汇率",
  2044. prop: "exrate",
  2045. width: "100",
  2046. overHidden: true,
  2047. cell: true,
  2048. slot: true,
  2049. formslot: true
  2050. },
  2051. {
  2052. label: "单价",
  2053. prop: "price",
  2054. width: "100",
  2055. overHidden: true,
  2056. cell: true,
  2057. slot: true,
  2058. formslot: true,
  2059. rules: [
  2060. {
  2061. required: true,
  2062. message: "请输入单价",
  2063. trigger: "blur"
  2064. }
  2065. ]
  2066. },
  2067. {
  2068. label: "数量",
  2069. prop: "quantity",
  2070. width: "100",
  2071. overHidden: true,
  2072. cell: true,
  2073. slot: true,
  2074. formslot: true,
  2075. rules: [
  2076. {
  2077. required: true,
  2078. message: "请输入数量",
  2079. trigger: "blur"
  2080. }
  2081. ]
  2082. },
  2083. {
  2084. label: "本币",
  2085. prop: "amountCNY",
  2086. width: "100",
  2087. overHidden: true
  2088. },
  2089. {
  2090. label: "外币",
  2091. prop: "amountUSD",
  2092. width: "100",
  2093. overHidden: true
  2094. },
  2095. {
  2096. label: "付费申请金额",
  2097. prop: "appliedAmount",
  2098. width: "100",
  2099. overHidden: true
  2100. },
  2101. {
  2102. label: "申请发票金额",
  2103. prop: "appliedInvoiceAmount",
  2104. width: "120",
  2105. overHidden: true
  2106. },
  2107. {
  2108. label: "已开票金额",
  2109. prop: "uninvoicedAmount",
  2110. width: "120",
  2111. overHidden: true
  2112. },
  2113. {
  2114. label: "已结算金额",
  2115. prop: "stlTtlAmount",
  2116. width: "120",
  2117. overHidden: true
  2118. },
  2119. {
  2120. label: "制单人",
  2121. prop: "createUserName",
  2122. width: "100",
  2123. overHidden: true
  2124. },
  2125. {
  2126. label: "制单日期",
  2127. prop: "createTime",
  2128. width: "120",
  2129. overHidden: true
  2130. },
  2131. {
  2132. label: "修改人",
  2133. prop: "updateUserName",
  2134. width: "100",
  2135. overHidden: true
  2136. },
  2137. {
  2138. label: "修改日期",
  2139. prop: "updateTime",
  2140. width: "120",
  2141. overHidden: true
  2142. },
  2143. {
  2144. label: "备注",
  2145. prop: "remarks",
  2146. // cell: true,
  2147. width: 150,
  2148. overHidden: true
  2149. }
  2150. ]
  2151. },
  2152. feeCenterListD: [],
  2153. feeCenterListC: [],
  2154. roleName: [],
  2155. updateSearchKey: new Date().getTime(),
  2156. updateFormKey: new Date().getTime(),
  2157. deptId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
  2158. printingDialog: false, // 打印弹窗开关
  2159. printingDC: "", // 打印弹窗选择是应收还是应付
  2160. PrintingData: [], // 打印弹窗列表数据
  2161. printingLoading: false, // 打印弹窗加载动画
  2162. optionPrinting: {
  2163. stripe: true,
  2164. maxHeight: "250",
  2165. calcHeight: 30,
  2166. tip: false,
  2167. searchShow: true,
  2168. searchMenuSpan: 6,
  2169. border: true,
  2170. selection: true,
  2171. dialogClickModal: false,
  2172. refreshBtn: false,
  2173. columnBtn: false,
  2174. addBtn: false,
  2175. viewBtn: false,
  2176. delBtn: false,
  2177. editBtn: false,
  2178. menuWidth: "100",
  2179. column: [
  2180. {
  2181. label: "币别",
  2182. prop: "curCode",
  2183. width: 100,
  2184. cell: true,
  2185. type: "select",
  2186. dicData: [
  2187. {
  2188. label: "全部",
  2189. value: null
  2190. },
  2191. {
  2192. label: "USD",
  2193. value: "USD"
  2194. },
  2195. {
  2196. label: "CNY",
  2197. value: "CNY"
  2198. }
  2199. ],
  2200. overHidden: true
  2201. },
  2202. {
  2203. label: "客户名称",
  2204. prop: "cnName",
  2205. overHidden: true
  2206. },
  2207. {
  2208. label: "客户编号",
  2209. prop: "code",
  2210. overHidden: true
  2211. }
  2212. ]
  2213. },
  2214. reportOption: {
  2215. nodeKey: "id",
  2216. addBtn: false,
  2217. menu: false,
  2218. size: "small",
  2219. props: {
  2220. labelText: "标题",
  2221. label: "cnName",
  2222. value: "value",
  2223. children: "children"
  2224. }
  2225. },
  2226. reportTypeData: [], // 打印选择的数据
  2227. reportformsObj: {}, // 打印选择的数据
  2228. selectPrintingDialog: false, // 打印弹窗
  2229. idArr:[],
  2230. };
  2231. },
  2232. components: {
  2233. dicSelect,
  2234. checkSchedule,
  2235. businessReports,
  2236. reports,
  2237. feeModify,
  2238. feeModifyView,
  2239. reportformsList,
  2240. reportContainer
  2241. },
  2242. props: {
  2243. detailData: Object
  2244. },
  2245. async created() {
  2246. this.roleName = localStorage.getItem("roleName").split(",");
  2247. this.option = await this.getColumnData(this.getColumnName(477), this.optionBack);
  2248. this.feedOption = await this.getColumnData(this.getColumnName(463), this.feedOptionBack);
  2249. this.feecOption = await this.getColumnData(this.getColumnName(464), this.feecOptionBack);
  2250. if (this.detailData.id) {
  2251. // this.editButton = true
  2252. // this.editDisabled = true
  2253. // this.optionForm.disabled = true
  2254. this.getDetail(this.detailData.id);
  2255. }
  2256. if (this.$route.query.params) {
  2257. this.getDetail(this.$route.query.params);
  2258. }
  2259. if (this.detailData.copyId) {
  2260. this.getCopydate(this.detailData.copyId);
  2261. }
  2262. this.saveLocalCurrency(this.deptId);
  2263. },
  2264. methods: {
  2265. // 预览报表
  2266. handleReportPreview(url, data) {
  2267. console.log(url, 1670);
  2268. console.log(data, 1671);
  2269. Stimulsoft.Base.StiLicense.key =
  2270. "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHn0s4gy0Fr5YoUZ9V00Y0igCSFQzwEqYBh/N77k4f0fWXTHW5rqeBNLkaurJDenJ9o97TyqHs9HfvINK18Uwzsc/bG01Rq+x3H3Rf+g7AY92gvWmp7VA2Uxa30Q97f61siWz2dE5kdBVcCnSFzC6awE74JzDcJMj8OuxplqB1CYcpoPcOjKy1PiATlC3UsBaLEXsok1xxtRMQ283r282tkh8XQitsxtTczAJBxijuJNfziYhci2jResWXK51ygOOEbVAxmpflujkJ8oEVHkOA/CjX6bGx05pNZ6oSIu9H8deF94MyqIwcdeirCe60GbIQByQtLimfxbIZnO35X3fs/94av0ODfELqrQEpLrpU6FNeHttvlMc5UVrT4K+8lPbqR8Hq0PFWmFrbVIYSi7tAVFMMe2D1C59NWyLu3AkrD3No7YhLVh7LV0Tttr/8FrcZ8xirBPcMZCIGrRIesrHxOsZH2V8t/t0GXCnLLAWX+TNvdNXkB8cF2y9ZXf1enI064yE5dwMs2fQ0yOUG/xornE";
  2271. // Stimulsoft.Base.StiLicense.Key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkcgIvwL0jnpsDqRpWg5FI5kt2G7A0tYIcUygBh1sPs7plofUOqPB1a4HBIXJB621mau2oiAIj+ysU7gKUXfjn/D5BocmduNB+ZMiDGPxFrAp3PoD0nYNkkWh8r7gBZ1v/JZSXGE3bQDrCQCNSy6mgby+iFAMV8/PuZ1z77U+Xz3fkpbm6MYQXYp3cQooLGLUti7k1TFWrnawT0iEEDJ2iRcU9wLqn2g9UiWesEZtKwI/UmEI2T7nv5NbgV+CHguu6QU4WWzFpIgW+3LUnKCT/vCDY+ymzgycw9A9+HFSzARiPzgOaAuQYrFDpzhXV+ZeX31AxWlnzjDWqpfluygSNPtGul5gyNt2CEoJD1Yom0VN9fvRonYsMsimkFFx2AwyVpPcs+JfVBtpPbTcZscnzUdmiIvxv8Gcin6sNSibM6in/uUKFt3bVgW/XeMYa7MLGF53kvBSwi78poUDigA2n12SmghLR0AHxyEDIgZGOTbNI33GWu7ZsPBeUdGu55R8w='
  2272. Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile("/reports/stimulsoft/Localization/zh-CHS.xml", true, "zh-CHS");
  2273. Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("/reports/stimulsoft/Localization/zh-CHS.xml");
  2274. // 工具栏
  2275. var options = new Stimulsoft.Viewer.StiViewerOptions();
  2276. options.height = "100%";
  2277. options.appearance.scrollbarsMode = true; // 滚动条模式
  2278. options.toolbar.showDesignButton = false; // 显示设计按钮
  2279. options.toolbar.showAboutButton = false; // 显示关于按钮
  2280. options.toolbar.showResourcesButton = false; // 显示资源按钮
  2281. options.toolbar.showFullScreenButton = false; // 显示全屏按钮
  2282. options.toolbar.showOpenButton = false; // 显示打开按钮
  2283. options.appearance.showTooltips = false; // 显示工具提示
  2284. options.appearance.showDialogsHelp = false; // 显示对话框帮助
  2285. options.exports.showExportToDocument = false; // 显示导出到文档
  2286. options.toolbar.showParametersButton = true; // 显示参数按钮
  2287. options.appearance.bookmarksPrint = true; // 书签打印
  2288. options.toolbar.showSendEmailButton = true; // 显示发送邮件按钮
  2289. options.email.showEmailDialog = false;
  2290. options.email.showExportDialog = false;
  2291. // options.toolbar.showPrintButton = false // 打印按钮是否显示 下面直接自定义控制打印弹窗是否开启
  2292. // printDestination 参数:用于指定报表打印的目标位置,可以是打印机、PDF 文件或者直接打印到浏览器等。
  2293. // Stimulsoft.Viewer.StiPrintDestination.Direct:表示直接打印到打印机,即将报表内容直接发送至打印机进行打印。
  2294. // 通过设置不同的 printDestination 参数,你可以控制报表打印的行为,例如是直接打印到打印机,还是生成 PDF 文件,或者直接在浏览器中预览打印内容等。
  2295. options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct;
  2296. // htmlRenderMode html渲染模式
  2297. options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table;
  2298. // 是创建一个 Stimulsoft 报表查看器的实例的代码
  2299. let viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
  2300. viewer.onEmailReport = this.testMail;
  2301. // 报表
  2302. console.log("创建一个报表实例");
  2303. console.log();
  2304. let report = new window.Stimulsoft.Report.StiReport();
  2305. // 加载文件
  2306. console.log("从url加载报表");
  2307. // report.loadFile("/reports/stimulsoft/demos/SimpleList.mrt");
  2308. report.load(url);
  2309. // data.pageOne = "Page : 1 of 1";
  2310. // // 处理超长数据
  2311. // if (data.hshipperDetails) {
  2312. // var consignerIndex2 = data.hshipperDetails.indexOf("\n");
  2313. // for (let i = 0; i < 4; i++) {
  2314. // consignerIndex2 = data.hshipperDetails.indexOf("\n", consignerIndex2 + 1);
  2315. // }
  2316. // if (consignerIndex2 != -1) {
  2317. // var hshipperDetails = data.hshipperDetails.substring(consignerIndex2 + 2, data.hshipperDetails.length);
  2318. // data.hshipperDetails = data.hshipperDetails.substring(0, consignerIndex2) + " *";
  2319. // data.commodityDescr += "\n*" + hshipperDetails;
  2320. // }
  2321. // }
  2322. // if (data.hconsigneeDetails) {
  2323. // var consigneeIndex2 = data.hconsigneeDetails.indexOf("\n");
  2324. // for (let i = 0; i < 3; i++) {
  2325. // consigneeIndex2 = data.hconsigneeDetails.indexOf("\n", consigneeIndex2 + 1);
  2326. // }
  2327. // if (consigneeIndex2 != -1) {
  2328. // var hconsigneeDetails = data.hconsigneeDetails.substring(consigneeIndex2 + 2, data.hconsigneeDetails.length);
  2329. // data.hconsigneeDetails = data.hconsigneeDetails.substring(0, consigneeIndex2) + " **";
  2330. // data.commodityDescr += "\n**" + hconsigneeDetails;
  2331. // }
  2332. // }
  2333. // if (data.hnotifyDetails) {
  2334. // var notifierIndex2 = data.hnotifyDetails.indexOf("\n");
  2335. // for (let i = 0; i < 3; i++) {
  2336. // notifierIndex2 = data.hnotifyDetails.indexOf("\n", notifierIndex2 + 1);
  2337. // }
  2338. // if (notifierIndex2 != -1) {
  2339. // var hnotifyDetails = data.hnotifyDetails.substring(notifierIndex2 + 2, data.hnotifyDetails.length);
  2340. // data.hnotifyDetails = data.hnotifyDetails.substring(0, notifierIndex2) + " ***";
  2341. // data.commodityDescr += "\n***" + hnotifyDetails;
  2342. // }
  2343. // }
  2344. // // 处理箱号
  2345. // if (this.isPrintTheBoxNumber) {
  2346. // data.commodityDescr += "\n.\n.\n";
  2347. // }
  2348. // // PLACE & DATE OF ISSUE
  2349. // data.placeAndDateOfIssue = "";
  2350. // if (data.issueAt) {
  2351. // data.placeAndDateOfIssue += data.issueAt;
  2352. // }
  2353. // if (data.issueDate) {
  2354. // let date = new Date(data.issueDate.replace(/-/g, "/"));
  2355. // let yyyy = date.getFullYear();
  2356. // let mmmm = date.toDateString().split(" ")[1];
  2357. // let dd = date.getDate();
  2358. // data.placeAndDateOfIssue += ", " + dd + "-" + mmmm + "-" + yyyy;
  2359. // }
  2360. // // Total number of containers or packages received by the Carriers
  2361. // if (data.preContainersList) {
  2362. // let boxMap = new Map();
  2363. // for (let boxQuantity of data.preContainersList) {
  2364. // if (boxMap.get(boxQuantity.cntrTypeCode)) {
  2365. // let v = boxMap.get(boxQuantity.cntrTypeCode);
  2366. // boxMap.set(boxQuantity.cntrTypeCode, v + boxQuantity.quantity);
  2367. // } else {
  2368. // boxMap.set(boxQuantity.cntrTypeCode, boxQuantity.quantity);
  2369. // }
  2370. // }
  2371. // let boxs = "";
  2372. // boxMap.forEach(function(value, key, map) {
  2373. // boxs += value + "x" + key + ", ";
  2374. // });
  2375. // boxs = boxs.substring(0, boxs.length - 2);
  2376. // data.boxQuantity = boxs + " CONTAINER(S) ONLY";
  2377. // }
  2378. // // Number of original B/Ls
  2379. // if (data.numberOfObl) {
  2380. // data.numberOfObl += " (" + data.numberOfOblDigit + ")";
  2381. // }
  2382. // if (data.commodityDescr) {
  2383. // var descriptionIndex2 = data.commodityDescr.indexOf("\n");
  2384. // for (let i = 0; i < 19; i++) {
  2385. // descriptionIndex2 = data.commodityDescr.indexOf("\n", descriptionIndex2 + 1);
  2386. // }
  2387. // if (descriptionIndex2 != -1) {
  2388. // data.pageOne = "Page : 1 of 2";
  2389. // data.pageTwo = "Page : 2 of 2";
  2390. // var extraLongText = data.commodityDescr.substring(descriptionIndex2 + 2, data.commodityDescr.length);
  2391. // data.commodityDescr = data.commodityDescr.substring(0, descriptionIndex2);
  2392. // data.extraLongTips = "** TO BE CONTINUED ON ATTACHED LIST **";
  2393. // data.extraLongText = extraLongText;
  2394. // }
  2395. // }
  2396. // console.log(data.hshipperDetails, 'hshipperDetails2')
  2397. // 创建一个 Stimulsoft 数据集(DataSet)的实例的代码
  2398. var dataSet = new Stimulsoft.System.Data.DataSet("reportData");
  2399. dataSet.readJson(data); // 用于将 JSON 格式的数据加载到数据集中。data 是包含报表数据的 JSON 对象。
  2400. // 这是一个方法调用,用于在报表中注册数据源。参数 'reportData' 是数据源的名称,
  2401. // 第二个 'reportData' 是数据源的别名,dataSet 则是之前创建的数据集实例
  2402. report.regData("reportData", "reportData", dataSet);
  2403. // 从模版和数据加载报表
  2404. // loadReport(report, '', {})
  2405. // 这是将报表对象指定给报表查看器的属性。viewer 是报表查看器的实例,而 report 是之前创建的报表对象。
  2406. viewer.report = report;
  2407. this.$refs.reportContainer.showContainer(
  2408. () => {
  2409. setTimeout(() => {
  2410. viewer.renderHtml("reportContainer");
  2411. this.createViewerButtons(viewer);
  2412. }, 50);
  2413. },
  2414. () => {}
  2415. );
  2416. console.log("加载成功完成!");
  2417. },
  2418. createViewerButtons(viewer) {
  2419. viewer.jsObject.collections.images["myClose.png"] =
  2420. "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA0ElEQVQ4ja3TO05CQRQG4A8iOwAbtYWETndAaecK7NwCKmETtJZsSBNLobEz8ZFIJQ0UnOGSm3DnYviTybzO/895DQXGWGCVGQuMEqkRcwcfuMOLalziCaf4TIe9UG9nyMJmFRzNGoRK1BU4xxx9G7cfwostciGk+x8MqgySwDXe4tU53hVV+MNtTmAoX84JGv9NYgrHyR6DV8wUSW7hItZLm36ZVoVQxsFJLOMsPOrH/h7dQwR2cdxOTEn8DtUbPGc4V2H7Vb4Yqfedf/GYSGt8VUmxgyfuBAAAAABJRU5ErkJggg==";
  2421. const closeBtn = viewer.jsObject.SmallButton("closeBtn", "关闭", "myClose.png");
  2422. // 增加打印弹窗配置
  2423. const printBtn = viewer.jsObject.SmallButton("printBtn", "打印报表", "myClose.png");
  2424. // console.log(viewer.jsObject.print(),'1013')
  2425. // 获取 关闭按钮的dom元素位置
  2426. const toolbarTable = viewer.jsObject.controls.toolbar.firstChild.firstChild;
  2427. const buttonsTable = toolbarTable.rows[0].lastChild.lastChild;
  2428. const userButtonCell = buttonsTable.rows[0].insertCell(0);
  2429. // 获取打印按钮的位置
  2430. const buttonsTablePrint = toolbarTable.rows[0].childNodes[0].lastChild; // 打印按钮
  2431. const userButtonPrint = buttonsTablePrint.rows[0].childNodes[0]; // 打印按钮dom位置
  2432. userButtonPrint.addEventListener("click", event => {
  2433. console.log("打印点击");
  2434. // event.preventDefault()
  2435. });
  2436. userButtonPrint.addEventListener("mouseover", event => {
  2437. console.log("移入打印按钮");
  2438. console.log(event, 1035);
  2439. });
  2440. userButtonCell.className = "stiJsViewerClearAllStyles";
  2441. userButtonCell.appendChild(closeBtn); // 添加关闭节点
  2442. // userButtonPrint.prepend(printBtn) // 在 printBtn 节点里最前面增加一个子级节点
  2443. let that = this;
  2444. // 关闭按钮的监听点击
  2445. closeBtn.action = function() {
  2446. console.log(that.$refs.ReportContainer, "1022");
  2447. if (that.$refs.reportContainer) that.$refs.reportContainer.hideContainer();
  2448. };
  2449. // // // 打印按钮监听
  2450. // printBtn.action = (e)=>{
  2451. // console.log('打印')
  2452. // window.print()
  2453. // }
  2454. },
  2455. // 打印费用
  2456. printingCostsfun(dc) {
  2457. this.printingDC = dc;
  2458. let groupCode = "";
  2459. let selectionArr = [];
  2460. this.idArr = [];
  2461. for (let item of this.selectionfeedList) {
  2462. if (item.corpId != this.selectionfeedList[0].corpId) {
  2463. return this.$message.error("请选择相同的结算单位");
  2464. }
  2465. }
  2466. for (let item of this.selectionfeecList) {
  2467. if (item.corpId != this.selectionfeecList[0].corpId) {
  2468. return this.$message.error("请选择相同的结算单位");
  2469. }
  2470. }
  2471. if (dc == "D") {
  2472. groupCode = "应收";
  2473. selectionArr = this.selectionfeedList;
  2474. this.idArr = this.selectionfeedList.map(item => {
  2475. return item.id;
  2476. });
  2477. } else {
  2478. groupCode = "应付";
  2479. selectionArr = this.selectionfeecList;
  2480. this.idArr = this.selectionfeecList.map(item => {
  2481. return item.id;
  2482. });
  2483. }
  2484. if (selectionArr.length > 0) {
  2485. // 打开选择弹窗
  2486. this.selectPrintingDialog = true;
  2487. let page = {
  2488. pageSize: 10,
  2489. currentPage: 1,
  2490. total: 0
  2491. };
  2492. this.$nextTick(() => {
  2493. this.$refs.reportformsList.onLoad(page, {
  2494. businessType: "XGFY",
  2495. classifyCode: "费用",
  2496. groupCode: groupCode
  2497. });
  2498. });
  2499. } else {
  2500. // 没有多选弹窗
  2501. this.printingLoading = true;
  2502. getFeeCenterCorpIds({
  2503. billId: this.form.id,
  2504. dc: dc,
  2505. type: "XGFY"
  2506. }).then(res => {
  2507. this.printingLoading = false;
  2508. res.data.data.forEach(e => {
  2509. e.$cellEdit = true;
  2510. e.curCode = null;
  2511. });
  2512. this.PrintingData = res.data.data;
  2513. });
  2514. this.reportsListfun({
  2515. businessType: "XGFY",
  2516. classifyCode: "费用",
  2517. groupCode: groupCode
  2518. });
  2519. this.printingDialog = true;
  2520. }
  2521. },
  2522. // 费用弹窗里的打印
  2523. dialogPreviewfun(row) {
  2524. if (!this.reportformsObj.id) {
  2525. this.$message.warning("请选择打印类型");
  2526. return;
  2527. }
  2528. // 获取报表数据
  2529. reportsGetReportData({
  2530. billId: this.form.id,
  2531. reportCode: this.reportformsObj.classifyCode,
  2532. groupCode: this.reportformsObj.groupCode,
  2533. corpIds: row.id,
  2534. curCode: row.curCode,
  2535. type: "XGFY"
  2536. }).then(res => {
  2537. this.handleReportPreview(this.reportformsObj.url, res.data.data.data);
  2538. });
  2539. },
  2540. // 打印弹窗里回调
  2541. reportRadio(val) {
  2542. // 多选打印
  2543. // 获取报表数据
  2544. reportsGetReportData({
  2545. billId: this.form.id,
  2546. reportCode: val.classifyCode,
  2547. groupCode: val.groupCode,
  2548. itemIds: this.idArr.join(","),
  2549. type: "XGFY"
  2550. }).then(res => {
  2551. this.handleReportPreview(val.url, res.data.data.data);
  2552. });
  2553. },
  2554. // 获取打印表格数据
  2555. reportsListfun(obj) {
  2556. reportsList(1, 50, obj).then(res => {
  2557. this.reportTypeData = res.data.data.records;
  2558. // 获取第一项的值
  2559. this.reportformsObj = res.data.data.records[0];
  2560. });
  2561. },
  2562. // 打印表格选择
  2563. reportNodeClick(data) {
  2564. this.reportformsObj = data;
  2565. },
  2566. openRtDialog(row) {
  2567. this.rulesList = row.rentTermList;
  2568. this.rtDialog = true;
  2569. },
  2570. rowSave(row, list) {
  2571. console.log(row);
  2572. row.rentTermList = list;
  2573. this.rtDialog = false;
  2574. },
  2575. countChange(row) {
  2576. if (row.curCode == this.getLocalCurrency()) {
  2577. row.amountCNY = _.round(_.multiply(row.price, row.quantity), 2);
  2578. row.amountUSD = 0;
  2579. } else {
  2580. row.amountCNY = 0;
  2581. row.amountUSD = _.round(_.multiply(row.price, row.quantity), 2);
  2582. }
  2583. },
  2584. activationSubmit() {
  2585. this.$refs["form2"].validate((valid, done) => {
  2586. done();
  2587. if (valid) {
  2588. let obj = {
  2589. id: this.form.id,
  2590. ...this.activationForm,
  2591. tradingBoxItemsList: this.selectionList
  2592. };
  2593. const loading = this.$loading({
  2594. lock: true,
  2595. text: "加载中",
  2596. spinner: "el-icon-loading",
  2597. background: "rgba(255,255,255,0.7)"
  2598. });
  2599. enable(obj)
  2600. .then(res => {
  2601. this.$message.success("操作成功!");
  2602. this.getDetail(this.form.id);
  2603. this.activationDialog = false;
  2604. })
  2605. .finally(() => {
  2606. loading.close();
  2607. });
  2608. } else {
  2609. return false;
  2610. }
  2611. });
  2612. },
  2613. uploadBefore(file, done, loading) {
  2614. done();
  2615. loading = true;
  2616. },
  2617. // 上传成功
  2618. onSuccess(res, done, loading, column) {
  2619. if (res.length > 0) {
  2620. this.$message.success("上传成功!");
  2621. }
  2622. this.excelBox = false;
  2623. // this.$message.success("导入成功!");
  2624. this.getDetail(this.form.id);
  2625. loading = false;
  2626. done();
  2627. },
  2628. // 下载模板
  2629. handleGet() {
  2630. window.open(`/api/blade-los/tradingBoxItem/boxItemTemplate?${this.website.tokenHeader}=${getToken()}&type=4`);
  2631. },
  2632. async dicChange(name, row) {
  2633. if (name == "purchaseCompanyName") {
  2634. if (row) {
  2635. this.form.purchaseCompanyId = row.id;
  2636. } else {
  2637. this.form.purchaseCompanyId = null;
  2638. this.form.purchaseCompanyName = null;
  2639. }
  2640. }
  2641. if (name == "addressCname") {
  2642. if (row) {
  2643. this.form.addressId = row.id;
  2644. this.form.addressCode = row.code;
  2645. this.form.addressEname = row.enName;
  2646. this.form.cyText = row.addressId;
  2647. this.form.stationId = null;
  2648. this.form.stationCode = null;
  2649. this.form.stationCname = null;
  2650. this.form.stationEname = null;
  2651. this.updateFormKey = new Date().getTime();
  2652. } else {
  2653. this.form.addressId = null;
  2654. this.form.addressCode = null;
  2655. this.form.addressEname = null;
  2656. this.form.addressCname = null;
  2657. this.form.cyText = null;
  2658. this.form.stationId = null;
  2659. this.form.stationCode = null;
  2660. this.form.stationCname = null;
  2661. this.form.stationEname = null;
  2662. }
  2663. }
  2664. if (name == "stationCname") {
  2665. if (row) {
  2666. this.form.stationId = row.id;
  2667. this.form.stationCode = row.code;
  2668. this.form.stationEname = row.enName;
  2669. } else {
  2670. this.form.stationId = null;
  2671. this.form.stationCode = null;
  2672. this.form.stationCname = null;
  2673. this.form.stationEname = null;
  2674. }
  2675. }
  2676. if (name == "podCname") {
  2677. if (row) {
  2678. this.form.podId = row.id;
  2679. this.form.podCode = row.code;
  2680. this.form.podEname = row.enName;
  2681. } else {
  2682. this.form.podId = null;
  2683. this.form.podCode = null;
  2684. this.form.podEname = null;
  2685. this.form.podCname = null;
  2686. }
  2687. }
  2688. // if (name == 'podCname') {
  2689. // if (row) {
  2690. // this.form.podId = row.id
  2691. // this.form.podCode = row.code
  2692. // this.form.podEname = row.enName
  2693. // } else {
  2694. // this.form.podId = null
  2695. // this.form.podCode = null
  2696. // this.form.podEname = null
  2697. // this.form.podCname = null
  2698. // }
  2699. // }
  2700. if (name == "polCname") {
  2701. if (row) {
  2702. this.activationForm.polId = row.id;
  2703. this.activationForm.polCode = row.code;
  2704. this.activationForm.polEname = row.enName;
  2705. } else {
  2706. this.activationForm.polId = null;
  2707. this.activationForm.polCode = null;
  2708. this.activationForm.polEname = null;
  2709. this.activationForm.polCname = null;
  2710. }
  2711. }
  2712. if (name == "podCname2") {
  2713. if (row) {
  2714. this.activationForm.podId = row.id;
  2715. this.activationForm.podCode = row.code;
  2716. this.activationForm.podEname = row.enName;
  2717. } else {
  2718. this.activationForm.podId = null;
  2719. this.activationForm.podCode = null;
  2720. this.activationForm.podEname = null;
  2721. this.activationForm.podCname = null;
  2722. }
  2723. }
  2724. if (name == "purchaseDate") {
  2725. if (row) {
  2726. await this.checkRate(null, row, null, 1, this.deptId);
  2727. this.form.tradingBoxItemsList.forEach(item => {
  2728. item.exrate = this.getExchangeRate(item.currency, "C", 1);
  2729. });
  2730. this.feeCenterListD.forEach(item => {
  2731. item.exrate = this.getExchangeRate(item.curCode, "C", 1);
  2732. });
  2733. this.feeCenterListC.forEach(item => {
  2734. item.exrate = this.getExchangeRate(item.curCode, "C", 1);
  2735. });
  2736. }
  2737. }
  2738. },
  2739. rowDicChange(name, row, el, index) {
  2740. if (name == "code") {
  2741. if (row) {
  2742. el.boxType = row.typeName;
  2743. // el.boxCondition = row.boxCondition
  2744. el.stationId = row.stationId;
  2745. el.stationCode = row.stationCode;
  2746. el.stationCname = row.stationCname;
  2747. el.stationEname = row.stationEname;
  2748. el.stationCname = row.stationCname;
  2749. el.restrictedPortsIds = row.restrictedPortsIds;
  2750. el.restrictedPortsName = row.restrictedPortsName;
  2751. el.restrictingShippingCompaniesIds = row.restrictingShippingCompaniesIds;
  2752. el.restrictingShippingCompaniesName = row.restrictingShippingCompaniesName;
  2753. el.activationDate = row.activationDate;
  2754. } else {
  2755. el.code = null;
  2756. el.boxType = null;
  2757. el.boxCondition = null;
  2758. el.stationId = null;
  2759. el.stationCode = null;
  2760. el.stationCname = null;
  2761. el.stationEname = null;
  2762. el.stationCname = null;
  2763. el.restrictedPortsIds = null;
  2764. el.restrictedPortsName = null;
  2765. el.restrictingShippingCompaniesIds = null;
  2766. el.restrictingShippingCompaniesName = null;
  2767. el.activationDate = null;
  2768. }
  2769. }
  2770. if (name == "currency") {
  2771. if (row) {
  2772. el.exrate = row.exratePayable;
  2773. } else {
  2774. el.exrate = null;
  2775. }
  2776. }
  2777. if (name == "curCodeD") {
  2778. if (row) {
  2779. el.exrate = row.exrateReceivable;
  2780. this.countChange(el);
  2781. } else {
  2782. el.exrate = null;
  2783. el.amountCNY = 0;
  2784. el.amountUSD = 0;
  2785. }
  2786. }
  2787. if (name == "curCodeC") {
  2788. if (row) {
  2789. el.exrate = row.exratePayable;
  2790. this.countChange(el);
  2791. } else {
  2792. el.exrate = null;
  2793. el.amountCNY = 0;
  2794. el.amountUSD = 0;
  2795. }
  2796. }
  2797. if (name == "feeCnName") {
  2798. if (row) {
  2799. el.feeId = row.id;
  2800. el.feeCode = row.code;
  2801. } else {
  2802. el.feeId = null;
  2803. el.feeCode = null;
  2804. el.feeCnName = null;
  2805. }
  2806. }
  2807. if (name == "boxType") {
  2808. if (row) {
  2809. el.boxTypeId = row.id;
  2810. } else {
  2811. el.boxTypeId = null;
  2812. el.boxType = null;
  2813. }
  2814. }
  2815. if (name == "stationCname") {
  2816. if (row) {
  2817. el.stationId = row.id;
  2818. el.stationCode = row.code;
  2819. el.stationEname = row.enName;
  2820. } else {
  2821. el.stationId = null;
  2822. el.stationCode = null;
  2823. el.stationCname = null;
  2824. el.stationEname = null;
  2825. }
  2826. }
  2827. if (name == "billType") {
  2828. el.corpId = null;
  2829. el.shortName = null;
  2830. el.corpCnName = null;
  2831. el.corpEnName = null;
  2832. this.updateSearchKey = new Date().getTime();
  2833. }
  2834. if (name == "corpCnName") {
  2835. if (row) {
  2836. el.corpId = row.id;
  2837. el.shortName = row.shortName;
  2838. el.corpEnName = row.enName;
  2839. } else {
  2840. el.corpId = null;
  2841. el.shortName = null;
  2842. el.corpCnName = null;
  2843. el.corpEnName = null;
  2844. }
  2845. }
  2846. if (name == "restrictedPortsName") {
  2847. if (row) {
  2848. el.restrictedPortsIds = row.ids;
  2849. el.restrictedPortsName = row.names;
  2850. } else {
  2851. el.restrictedPortsIds = null;
  2852. el.restrictedPortsName = null;
  2853. }
  2854. }
  2855. if (name == "restrictingShippingCompaniesName") {
  2856. if (row) {
  2857. el.restrictingShippingCompaniesIds = row.ids;
  2858. el.restrictingShippingCompaniesName = row.names;
  2859. } else {
  2860. el.restrictingShippingCompaniesIds = null;
  2861. el.restrictingShippingCompaniesName = null;
  2862. }
  2863. }
  2864. if (name == "originalBoxEastName") {
  2865. if (row) {
  2866. el.originalBoxEastId = row.id;
  2867. } else {
  2868. el.originalBoxEastId = null;
  2869. el.originalBoxEastName = null;
  2870. }
  2871. }
  2872. },
  2873. rowEdit(row) {
  2874. if (row.$cellEdit == true) {
  2875. this.$set(row, "$cellEdit", false);
  2876. } else {
  2877. this.$set(row, "$cellEdit", true);
  2878. }
  2879. },
  2880. rowItemEdit(row) {
  2881. if (row.$cellEdit == true) {
  2882. this.$set(row, "$cellEdit", false);
  2883. } else {
  2884. this.$set(row, "$cellEdit", true);
  2885. }
  2886. },
  2887. rowItemDel(row, index) {
  2888. this.$confirm("确定删除数据?", {
  2889. confirmButtonText: "确定",
  2890. cancelButtonText: "取消",
  2891. type: "warning"
  2892. }).then(() => {
  2893. if (row.id) {
  2894. tradingBoxItem({ ids: row.id }).then(res => {
  2895. this.rulesList.splice(index, 1);
  2896. this.$message.success("成功删除");
  2897. });
  2898. } else {
  2899. this.rulesList.splice(index, 1);
  2900. }
  2901. });
  2902. },
  2903. rtAddRow() {
  2904. this.rulesList.push({ curCode: this.getLocalCurrency(), $cellEdit: true });
  2905. },
  2906. async addRow() {
  2907. if (!this.form.id) {
  2908. return this.$message.error("请保存数据");
  2909. }
  2910. await this.checkRate(null, this.form.purchaseDate, null, 1, this.deptId);
  2911. this.$refs.crud.dicInit();
  2912. this.form.tradingBoxItemsList.push({
  2913. pid: this.form.id,
  2914. boxBelongsTo: "SOC",
  2915. boxCategory: "自有箱",
  2916. boxStatus: "好",
  2917. boxCondition: this.form.boxCondition,
  2918. stationId: this.form.stationId,
  2919. stationCode: this.form.stationCode,
  2920. stationCname: this.form.stationCname,
  2921. stationEname: this.form.stationEname,
  2922. currency: "USD",
  2923. exrate: this.getExchangeRate("USD", "C", 1),
  2924. status: "空箱入场",
  2925. $cellEdit: true
  2926. });
  2927. },
  2928. async feedAddRow() {
  2929. if (!this.form.id) {
  2930. return this.$message.error("请保存数据");
  2931. }
  2932. await this.checkRate(null, this.form.purchaseDate, null, 1, this.deptId);
  2933. this.feeCenterListD.push({
  2934. pid: this.form.id,
  2935. feesType: 1,
  2936. dc: "D",
  2937. billType: "箱东",
  2938. curCode: this.getLocalCurrency(),
  2939. exrate: this.getExchangeRate(this.getLocalCurrency(), "D", 1),
  2940. $cellEdit: true
  2941. });
  2942. },
  2943. async feecAddRow() {
  2944. if (!this.form.id) {
  2945. return this.$message.error("请保存数据");
  2946. }
  2947. await this.checkRate(null, this.form.purchaseDate, null, 1, this.deptId);
  2948. this.feeCenterListC.push({
  2949. pid: this.form.id,
  2950. feesType: 1,
  2951. dc: "C",
  2952. billType: "箱东",
  2953. curCode: this.getLocalCurrency(),
  2954. exrate: this.getExchangeRate(this.getLocalCurrency(), "C", 1),
  2955. $cellEdit: true
  2956. });
  2957. },
  2958. selectionChange(list) {
  2959. this.selectionList = list;
  2960. },
  2961. boxSelectionChange(list) {
  2962. this.boxSelectionList = list;
  2963. },
  2964. feedChange(list) {
  2965. let ids = [];
  2966. list.forEach(e => {
  2967. ids.push(e.id);
  2968. });
  2969. if (ids.length) {
  2970. this.itemCIds = ids.join(",");
  2971. } else {
  2972. this.itemCIds = null;
  2973. }
  2974. this.selectionfeedList = list;
  2975. },
  2976. feecChange(list) {
  2977. let ids = [];
  2978. list.forEach(e => {
  2979. ids.push(e.id);
  2980. });
  2981. if (ids.length) {
  2982. this.itemCIds = ids.join(",");
  2983. } else {
  2984. this.itemCIds = null;
  2985. }
  2986. this.selectionfeecList = list;
  2987. },
  2988. getDetail(id) {
  2989. const loading = this.$loading({
  2990. lock: true,
  2991. text: "加载中",
  2992. spinner: "el-icon-loading",
  2993. background: "rgba(255,255,255,0.7)"
  2994. });
  2995. detail({ id: id })
  2996. .then(res => {
  2997. res.data.data.feeCenterList.forEach(row => {
  2998. if (row.curCode == this.getLocalCurrency()) {
  2999. row.amountCNY = row.amount;
  3000. row.amountUSD = 0;
  3001. }
  3002. if (row.curCode != this.getLocalCurrency()) {
  3003. row.amountUSD = row.amount;
  3004. row.amountCNY = 0;
  3005. }
  3006. if (row.auditStatus > 0) {
  3007. this.editDisabled = true;
  3008. this.optionForm.disabled = true;
  3009. }
  3010. });
  3011. this.feeCenterListD = res.data.data.feeCenterList.filter(item => item.dc == "D");
  3012. this.feeCenterListC = res.data.data.feeCenterList.filter(item => item.dc == "C");
  3013. this.form = res.data.data;
  3014. this.updateFormKey = new Date().getTime();
  3015. })
  3016. .finally(() => {
  3017. loading.close();
  3018. });
  3019. },
  3020. getCopydate(id) {
  3021. const loading = this.$loading({
  3022. lock: true,
  3023. text: "加载中",
  3024. spinner: "el-icon-loading",
  3025. background: "rgba(255,255,255,0.7)"
  3026. });
  3027. copyAgent({ id: id })
  3028. .then(res => {
  3029. this.form = res.data.data;
  3030. this.updateFormKey = new Date().getTime();
  3031. })
  3032. .finally(() => {
  3033. loading.close();
  3034. });
  3035. },
  3036. inEdit() {
  3037. this.editButton = false;
  3038. if (this.form.status == "录入") {
  3039. this.editDisabled = false;
  3040. this.optionForm.disabled = false;
  3041. }
  3042. },
  3043. rowDel(row, index) {
  3044. this.$confirm("确定删除数据?", {
  3045. confirmButtonText: "确定",
  3046. cancelButtonText: "取消",
  3047. type: "warning"
  3048. }).then(() => {
  3049. if (row.id) {
  3050. tradingBoxItem({ ids: row.id }).then(res => {
  3051. this.form.tradingBoxItemsList.splice(index, 1);
  3052. this.$message.success("成功删除");
  3053. });
  3054. } else {
  3055. this.form.tradingBoxItemsList.splice(index, 1);
  3056. }
  3057. });
  3058. },
  3059. polRowDel(row, index) {
  3060. this.$confirm("确定删除数据?", {
  3061. confirmButtonText: "确定",
  3062. cancelButtonText: "取消",
  3063. type: "warning"
  3064. }).then(() => {
  3065. if (row.id) {
  3066. tradingBoxFees({ ids: row.id }).then(res => {
  3067. this.form.feeCenterList.splice(index, 1);
  3068. this.$message.success("成功删除");
  3069. });
  3070. } else {
  3071. this.form.feeCenterList.splice(index, 1);
  3072. }
  3073. });
  3074. },
  3075. podRowDel(row, index) {
  3076. this.$confirm("确定删除数据?", {
  3077. confirmButtonText: "确定",
  3078. cancelButtonText: "取消",
  3079. type: "warning"
  3080. }).then(() => {
  3081. if (row.id) {
  3082. tradingBoxFees({ ids: row.id }).then(res => {
  3083. this.podFeeList.splice(index, 1);
  3084. this.$message.success("成功删除");
  3085. });
  3086. } else {
  3087. this.podFeeList.splice(index, 1);
  3088. }
  3089. });
  3090. },
  3091. allClick(name) {
  3092. if (name == "一键保存") {
  3093. if (!this.form.tradingBoxItemsList.length) {
  3094. return this.$message.error("请添加数据");
  3095. }
  3096. for (let row of this.form.tradingBoxItemsList) {
  3097. if (
  3098. !row.code ||
  3099. !row.boxType ||
  3100. !row.boxBelongsTo ||
  3101. !row.boxCategory ||
  3102. !row.boxStatus ||
  3103. !row.boxCondition ||
  3104. !row.amount ||
  3105. !row.currency ||
  3106. !row.exrate ||
  3107. !row.stationCname ||
  3108. !row.status
  3109. ) {
  3110. this.$refs.crud.rowCell(row, row.$index);
  3111. return this.$message.error("请完善箱明细信息");
  3112. }
  3113. }
  3114. const loading = this.$loading({
  3115. lock: true,
  3116. text: "加载中",
  3117. spinner: "el-icon-loading",
  3118. background: "rgba(255,255,255,0.7)"
  3119. });
  3120. submitItemList(this.form.tradingBoxItemsList)
  3121. .then(res => {
  3122. this.$message.success("保存成功");
  3123. this.form.tradingBoxItemsList = res.data.data;
  3124. })
  3125. .finally(() => {
  3126. loading.close();
  3127. });
  3128. }
  3129. if (name == "一键编辑") {
  3130. // for (let row of this.form.tradingBoxItemsList) {
  3131. // if (row.whetherEnable != '是') {
  3132. // this.$set(row, "$cellEdit", true);
  3133. // }
  3134. // }
  3135. this.$refs.crud.dicInit();
  3136. }
  3137. if (name == "批量删除") {
  3138. // for (let item of this.selectionList) {
  3139. // if (item.whetherEnable == '是') {
  3140. // return this.$message.error("启用状态不能删除!");
  3141. // }
  3142. // }
  3143. let multiList = [];
  3144. let arr = [];
  3145. this.$confirm("确定将选择数据删除?", {
  3146. confirmButtonText: "确定",
  3147. cancelButtonText: "取消",
  3148. type: "warning"
  3149. }).then(() => {
  3150. multiList = this.selectionList;
  3151. arr = this.form.tradingBoxItemsList;
  3152. // 获取有id 的数据
  3153. const itemsWithId = multiList.filter(item => item.id != null);
  3154. let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
  3155. // 把选中的删除掉
  3156. multiList.forEach(item => {
  3157. for (let index in arr) {
  3158. if (JSON.stringify(item) == JSON.stringify(arr[index])) {
  3159. arr.splice(Number(index), 1);
  3160. }
  3161. }
  3162. });
  3163. if (itemsWithId.length != 0) {
  3164. const loading = this.$loading({
  3165. lock: true,
  3166. text: "加载中",
  3167. spinner: "el-icon-loading",
  3168. background: "rgba(255,255,255,0.7)"
  3169. });
  3170. tradingBoxItem({ ids: arrIds.join(",") })
  3171. .then(res => {
  3172. this.$message.success("删除成功");
  3173. })
  3174. .finally(() => {
  3175. loading.close();
  3176. });
  3177. }
  3178. });
  3179. }
  3180. if (name == "导入") {
  3181. this.excelOption.column.forEach(item => {
  3182. if (item.prop == "excelFile") {
  3183. item.action = "/api/blade-los/tradingBoxItem/importBoxItem?type=4&id=" + this.form.id;
  3184. }
  3185. });
  3186. this.excelBox = true;
  3187. }
  3188. if (name == "起租") {
  3189. this.$confirm("是否起租?", "提示", {
  3190. confirmButtonText: "确定",
  3191. cancelButtonText: "取消",
  3192. type: "warning"
  3193. }).then(() => {});
  3194. }
  3195. if (name == "生成租金") {
  3196. this.$confirm("是否生成租金?", "提示", {
  3197. confirmButtonText: "确定",
  3198. cancelButtonText: "取消",
  3199. type: "warning"
  3200. }).then(() => {});
  3201. }
  3202. if (name == "退租") {
  3203. this.$confirm("是否退租?", "提示", {
  3204. confirmButtonText: "确定",
  3205. cancelButtonText: "取消",
  3206. type: "warning"
  3207. }).then(() => {});
  3208. }
  3209. if (name == "导入") {
  3210. this.excelBox = true;
  3211. }
  3212. if (name == "启用") {
  3213. for (let item of this.selectionList) {
  3214. if (item.whetherEnable == "是") {
  3215. return this.$message.error("请勿重复启用");
  3216. }
  3217. }
  3218. this.activationForm = {};
  3219. this.activationDialog = true;
  3220. }
  3221. if (name == "D费用一键保存") {
  3222. if (!this.feeCenterListD.length) {
  3223. return this.$message.error("请添加数据");
  3224. }
  3225. for (let row of this.feeCenterListD) {
  3226. row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
  3227. if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
  3228. this.$refs.crud2.rowCell(row, row.$index);
  3229. return this.$message.error("请完善费用明细");
  3230. }
  3231. }
  3232. const loading = this.$loading({
  3233. lock: true,
  3234. text: "加载中",
  3235. spinner: "el-icon-loading",
  3236. background: "rgba(255,255,255,0.7)"
  3237. });
  3238. submitFeeList(this.feeCenterListD)
  3239. .then(res => {
  3240. this.$message.success("保存成功");
  3241. this.getDetail(this.form.id);
  3242. })
  3243. .finally(() => {
  3244. loading.close();
  3245. });
  3246. }
  3247. if (name == "D费用一键编辑") {
  3248. for (let row of this.feeCenterListD) {
  3249. if (!row.stlPid && (row.accStatus == 0 || row.auditStatus == 0)) {
  3250. this.$set(row, "$cellEdit", true);
  3251. }
  3252. }
  3253. }
  3254. if (name == "D费用批量删除") {
  3255. for (let row of this.selectionfeedList) {
  3256. if (row.automaticGenerated == 1) {
  3257. return this.$message.error("系统自动生成的费用不允许删除");
  3258. }
  3259. if (row.stlPid && row.accStatus != 0) {
  3260. return this.$message.error("已生成账单,不允许删除");
  3261. }
  3262. if (row.stlPid && row.auditStatus != 0) {
  3263. return this.$message.error("已申请费用,不允许删除");
  3264. }
  3265. }
  3266. let multiList = [];
  3267. let arr = [];
  3268. this.$confirm("确定将选择数据删除?", {
  3269. confirmButtonText: "确定",
  3270. cancelButtonText: "取消",
  3271. type: "warning"
  3272. }).then(() => {
  3273. multiList = this.selectionfeedList;
  3274. arr = this.feeCenterListD;
  3275. // 获取有id 的数据
  3276. const itemsWithId = multiList.filter(item => item.id != null);
  3277. let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
  3278. // 把选中的删除掉
  3279. multiList.forEach(item => {
  3280. for (let index in arr) {
  3281. if (JSON.stringify(item) == JSON.stringify(arr[index])) {
  3282. arr.splice(Number(index), 1);
  3283. }
  3284. }
  3285. });
  3286. if (itemsWithId.length != 0) {
  3287. const loading = this.$loading({
  3288. lock: true,
  3289. text: "加载中",
  3290. spinner: "el-icon-loading",
  3291. background: "rgba(255,255,255,0.7)"
  3292. });
  3293. tradingBoxFees({ ids: arrIds.join(",") })
  3294. .then(res => {
  3295. this.$message.success("删除成功");
  3296. })
  3297. .finally(() => {
  3298. loading.close();
  3299. });
  3300. }
  3301. });
  3302. }
  3303. if (name == "C费用一键保存") {
  3304. if (!this.feeCenterListC.length) {
  3305. return this.$message.error("请添加数据");
  3306. }
  3307. for (let row of this.feeCenterListC) {
  3308. row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
  3309. if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
  3310. this.$refs.crud2.rowCell(row, row.$index);
  3311. return this.$message.error("请完善费用明细");
  3312. }
  3313. }
  3314. const loading = this.$loading({
  3315. lock: true,
  3316. text: "加载中",
  3317. spinner: "el-icon-loading",
  3318. background: "rgba(255,255,255,0.7)"
  3319. });
  3320. submitFeeList(this.feeCenterListC)
  3321. .then(res => {
  3322. this.$message.success("保存成功");
  3323. this.getDetail(this.form.id);
  3324. })
  3325. .finally(() => {
  3326. loading.close();
  3327. });
  3328. }
  3329. if (name == "C费用一键编辑") {
  3330. for (let row of this.feeCenterListC) {
  3331. if (!row.stlPid && (row.accStatus == 0 || row.auditStatus == 0)) {
  3332. this.$set(row, "$cellEdit", true);
  3333. }
  3334. }
  3335. }
  3336. if (name == "C费用批量删除") {
  3337. for (let row of this.selectionfeecList) {
  3338. if (row.automaticGenerated == 1) {
  3339. return this.$message.error("系统自动生成的费用不允许删除");
  3340. }
  3341. if (row.stlPid && row.accStatus != 0) {
  3342. return this.$message.error("已生成账单,不允许删除");
  3343. }
  3344. if (row.stlPid && row.auditStatus != 0) {
  3345. return this.$message.error("已申请费用,不允许删除");
  3346. }
  3347. }
  3348. let multiList = [];
  3349. let arr = [];
  3350. this.$confirm("确定将选择数据删除?", {
  3351. confirmButtonText: "确定",
  3352. cancelButtonText: "取消",
  3353. type: "warning"
  3354. }).then(() => {
  3355. multiList = this.selectionfeecList;
  3356. arr = this.feeCenterListC;
  3357. // 获取有id 的数据
  3358. const itemsWithId = multiList.filter(item => item.id != null);
  3359. let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
  3360. // 把选中的删除掉
  3361. multiList.forEach(item => {
  3362. for (let index in arr) {
  3363. if (JSON.stringify(item) == JSON.stringify(arr[index])) {
  3364. arr.splice(Number(index), 1);
  3365. }
  3366. }
  3367. });
  3368. if (itemsWithId.length != 0) {
  3369. const loading = this.$loading({
  3370. lock: true,
  3371. text: "加载中",
  3372. spinner: "el-icon-loading",
  3373. background: "rgba(255,255,255,0.7)"
  3374. });
  3375. tradingBoxFees({ ids: arrIds.join(",") })
  3376. .then(res => {
  3377. this.$message.success("删除成功");
  3378. })
  3379. .finally(() => {
  3380. loading.close();
  3381. });
  3382. }
  3383. });
  3384. }
  3385. if (name == "D费用申请") {
  3386. // let selecList = [...this.selectionfeedList, ...this.selectionfeecList]
  3387. for (let row of this.selectionfeedList) {
  3388. if (!row.id) {
  3389. return this.$message.error("请保存费用明细");
  3390. }
  3391. if (row.stlPid && row.accStatus != 0) {
  3392. return this.$message.error("已生成账单,不允许重复申请");
  3393. }
  3394. if (row.stlPid && row.auditStatus != 0) {
  3395. return this.$message.error("已申请费用,不允许重复申请");
  3396. }
  3397. }
  3398. this.$confirm("确定申请费用?", {
  3399. confirmButtonText: "确定",
  3400. cancelButtonText: "取消",
  3401. type: "warning"
  3402. }).then(() => {
  3403. let obj = {};
  3404. obj = {
  3405. srcId: this.form.id,
  3406. srcType: this.form.type,
  3407. feeCenterList: this.selectionfeedList,
  3408. url: "/boxManagement/boxCost/index",
  3409. pageStatus: "",
  3410. pageLabel: "箱管费用"
  3411. };
  3412. const loading = this.$loading({
  3413. lock: true,
  3414. text: "加载中",
  3415. spinner: "el-icon-loading",
  3416. background: "rgba(255,255,255,0.7)"
  3417. });
  3418. pleaseVerifyCost(obj)
  3419. .then(res => {
  3420. this.$message.success("操作成功");
  3421. this.getDetail(this.form.id);
  3422. })
  3423. .finally(() => {
  3424. loading.close();
  3425. });
  3426. });
  3427. }
  3428. if (name == "D撤销请核") {
  3429. for (let row of this.selectionfeedList) {
  3430. if (!row.id) {
  3431. return this.$message.error("请保存费用明细");
  3432. }
  3433. if (row.auditStatus == 0) {
  3434. return this.$message.error("未申请费用,不允许撤销");
  3435. }
  3436. if (row.auditStatus > 2) {
  3437. return this.$message.error("费用已经审核通过,请使用申请修改和删除功能!");
  3438. }
  3439. }
  3440. this.$confirm("确定撤销请核?", {
  3441. confirmButtonText: "确定",
  3442. cancelButtonText: "取消",
  3443. type: "warning"
  3444. }).then(() => {
  3445. let obj = {};
  3446. obj = {
  3447. srcId: this.form.id,
  3448. srcType: this.form.type,
  3449. feeCenterList: this.selectionfeedList,
  3450. url: "/boxManagement/boxCost/index",
  3451. pageStatus: "",
  3452. pageLabel: "箱管费用"
  3453. };
  3454. const loading = this.$loading({
  3455. lock: true,
  3456. text: "加载中",
  3457. spinner: "el-icon-loading",
  3458. background: "rgba(255,255,255,0.7)"
  3459. });
  3460. revokeCheckPleaseVerifyCost(obj)
  3461. .then(res => {
  3462. this.$message.success("操作成功");
  3463. this.getDetail(this.form.id);
  3464. })
  3465. .finally(() => {
  3466. loading.close();
  3467. });
  3468. });
  3469. }
  3470. if (name == "D申请修改") {
  3471. for (let row of this.selectionfeedList) {
  3472. if (!row.id) {
  3473. return this.$message.error("请保存费用明细");
  3474. }
  3475. if (row.auditStatus != 4) {
  3476. return this.$message.error("未审核通过的费用,不允许申请");
  3477. }
  3478. if (Number(row.appliedInvoiceAmount) > 0) {
  3479. return this.$message.error("请选择未申请发票的费用?");
  3480. }
  3481. if (Number(row.uninvoicedAmount) > 0) {
  3482. return this.$message.error("请选择未开票的费用?");
  3483. }
  3484. if (Number(row.stlTtlAmount) > 0) {
  3485. return this.$message.error("请选择未结算的费用?");
  3486. }
  3487. this.$refs.feeModify.openDialog(row, "fix");
  3488. }
  3489. }
  3490. if (name == "D申请删除") {
  3491. for (let row of this.selectionfeedList) {
  3492. if (!row.id) {
  3493. return this.$message.error("请保存费用明细");
  3494. }
  3495. if (row.auditStatus != 4) {
  3496. return this.$message.error("未审核通过的费用,不允许申请");
  3497. }
  3498. if (Number(row.appliedInvoiceAmount) > 0) {
  3499. return this.$message.error("请选择未申请发票的费用?");
  3500. }
  3501. if (Number(row.uninvoicedAmount) > 0) {
  3502. return this.$message.error("请选择未开票的费用?");
  3503. }
  3504. if (Number(row.stlTtlAmount) > 0) {
  3505. return this.$message.error("请选择未结算的费用?");
  3506. }
  3507. this.$refs.feeModify.openDialog(row, "del");
  3508. }
  3509. }
  3510. if (name == "D取消申请") {
  3511. for (let row of this.selectionfeedList) {
  3512. if (!row.id) {
  3513. return this.$message.error("请保存费用明细");
  3514. }
  3515. if (!(row.auditStatus == 5 || row.auditStatus == 6)) {
  3516. return this.$message.error("未申请修改或删除,不允许撤销申请");
  3517. }
  3518. this.$refs.feeModify.openDialog(row, "revoke");
  3519. }
  3520. }
  3521. if (name == "C费用申请") {
  3522. for (let row of this.selectionfeecList) {
  3523. if (row.stlPid && row.accStatus != 0) {
  3524. return this.$message.error("已生成账单,不允许重复申请");
  3525. }
  3526. if (row.stlPid && row.auditStatus != 0) {
  3527. return this.$message.error("已申请费用,不允许重复申请");
  3528. }
  3529. }
  3530. this.$confirm("确定申请费用?", {
  3531. confirmButtonText: "确定",
  3532. cancelButtonText: "取消",
  3533. type: "warning"
  3534. }).then(() => {
  3535. let obj = {};
  3536. obj = {
  3537. srcId: this.form.id,
  3538. srcType: this.form.type,
  3539. feeCenterList: this.selectionfeecList,
  3540. url: "/boxManagement/boxCost/index",
  3541. pageStatus: "",
  3542. pageLabel: "箱管费用"
  3543. };
  3544. const loading = this.$loading({
  3545. lock: true,
  3546. text: "加载中",
  3547. spinner: "el-icon-loading",
  3548. background: "rgba(255,255,255,0.7)"
  3549. });
  3550. pleaseVerifyCost(obj)
  3551. .then(res => {
  3552. this.$message.success("操作成功");
  3553. this.getDetail(this.form.id);
  3554. })
  3555. .finally(() => {
  3556. loading.close();
  3557. });
  3558. });
  3559. }
  3560. if (name == "C撤销请核") {
  3561. for (let row of this.selectionfeecList) {
  3562. if (!row.id) {
  3563. return this.$message.error("请保存费用明细");
  3564. }
  3565. if (row.auditStatus == 0) {
  3566. return this.$message.error("未申请费用,不允许撤销");
  3567. }
  3568. if (row.auditStatus > 2) {
  3569. return this.$message.error("费用已经审核通过,请使用申请修改和删除功能!");
  3570. }
  3571. }
  3572. this.$confirm("确定撤销请核?", {
  3573. confirmButtonText: "确定",
  3574. cancelButtonText: "取消",
  3575. type: "warning"
  3576. }).then(() => {
  3577. let obj = {};
  3578. obj = {
  3579. srcId: this.form.id,
  3580. srcType: this.form.type,
  3581. feeCenterList: this.selectionfeecList,
  3582. url: "/boxManagement/boxCost/index",
  3583. pageStatus: "",
  3584. pageLabel: "箱管费用"
  3585. };
  3586. const loading = this.$loading({
  3587. lock: true,
  3588. text: "加载中",
  3589. spinner: "el-icon-loading",
  3590. background: "rgba(255,255,255,0.7)"
  3591. });
  3592. revokeCheckPleaseVerifyCost(obj)
  3593. .then(res => {
  3594. this.$message.success("操作成功");
  3595. this.getDetail(this.form.id);
  3596. })
  3597. .finally(() => {
  3598. loading.close();
  3599. });
  3600. });
  3601. }
  3602. if (name == "C申请修改") {
  3603. for (let row of this.selectionfeecList) {
  3604. if (!row.id) {
  3605. return this.$message.error("请保存费用明细");
  3606. }
  3607. if (row.auditStatus != 4) {
  3608. return this.$message.error("未审核通过的费用,不允许申请");
  3609. }
  3610. if (Number(row.appliedInvoiceAmount) > 0) {
  3611. return this.$message.error("请选择未申请发票的费用?");
  3612. }
  3613. if (Number(row.uninvoicedAmount) > 0) {
  3614. return this.$message.error("请选择未开票的费用?");
  3615. }
  3616. if (Number(row.stlTtlAmount) > 0) {
  3617. return this.$message.error("请选择未结算的费用?");
  3618. }
  3619. this.$refs.feeModify.openDialog(row, "fix");
  3620. }
  3621. }
  3622. if (name == "C申请删除") {
  3623. for (let row of this.selectionfeecList) {
  3624. if (!row.id) {
  3625. return this.$message.error("请保存费用明细");
  3626. }
  3627. if (row.auditStatus != 4) {
  3628. return this.$message.error("未审核通过的费用,不允许申请");
  3629. }
  3630. if (Number(row.appliedInvoiceAmount) > 0) {
  3631. return this.$message.error("请选择未申请发票的费用?");
  3632. }
  3633. if (Number(row.uninvoicedAmount) > 0) {
  3634. return this.$message.error("请选择未开票的费用?");
  3635. }
  3636. if (Number(row.stlTtlAmount) > 0) {
  3637. return this.$message.error("请选择未结算的费用?");
  3638. }
  3639. this.$refs.feeModify.openDialog(row, "del");
  3640. }
  3641. }
  3642. if (name == "C取消申请") {
  3643. for (let row of this.selectionfeecList) {
  3644. if (!row.id) {
  3645. return this.$message.error("请保存费用明细");
  3646. }
  3647. if (!(row.auditStatus == 5 || row.auditStatus == 6)) {
  3648. return this.$message.error("未申请修改或删除,不允许撤销申请");
  3649. }
  3650. this.$refs.feeModify.openDialog(row, "revoke");
  3651. }
  3652. }
  3653. },
  3654. submit(type) {
  3655. this.$refs["form"].validate((valid, done) => {
  3656. done();
  3657. if (valid) {
  3658. for (let row of this.form.tradingBoxItemsList) {
  3659. if (
  3660. !row.code ||
  3661. !row.boxType ||
  3662. !row.boxBelongsTo ||
  3663. !row.boxCategory ||
  3664. !row.boxStatus ||
  3665. !row.boxCondition ||
  3666. !row.amount ||
  3667. !row.currency ||
  3668. !row.exrate ||
  3669. !row.stationCname ||
  3670. !row.status
  3671. ) {
  3672. this.$refs.crud.rowCell(row, row.$index);
  3673. return this.$message.error("请完善箱明细信息");
  3674. }
  3675. }
  3676. for (let row of this.feeCenterListD) {
  3677. row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
  3678. if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
  3679. this.$refs.crud2.rowCell(row, row.$index);
  3680. return this.$message.error("请完善应收费用明细");
  3681. }
  3682. }
  3683. for (let row of this.feeCenterListC) {
  3684. row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
  3685. if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
  3686. this.$refs.crud3.rowCell(row, row.$index);
  3687. return this.$message.error("请完善应付费用明细");
  3688. }
  3689. }
  3690. this.form.feeCenterList = [...this.feeCenterListD, ...this.feeCenterListC];
  3691. const loading = this.$loading({
  3692. lock: true,
  3693. text: "加载中",
  3694. spinner: "el-icon-loading",
  3695. background: "rgba(255,255,255,0.7)"
  3696. });
  3697. submit(this.form)
  3698. .then(res => {
  3699. this.$message.success("保存成功");
  3700. this.getDetail(res.data.data.id);
  3701. })
  3702. .finally(() => {
  3703. loading.close();
  3704. });
  3705. } else {
  3706. return false;
  3707. }
  3708. });
  3709. },
  3710. confirm() {
  3711. this.$confirm("确认费用?", {
  3712. confirmButtonText: "确定",
  3713. cancelButtonText: "取消",
  3714. type: "warning"
  3715. }).then(() => {
  3716. const loading = this.$loading({
  3717. lock: true,
  3718. text: "加载中",
  3719. spinner: "el-icon-loading",
  3720. background: "rgba(255,255,255,0.7)"
  3721. });
  3722. confirm(this.form)
  3723. .then(res => {
  3724. this.$message.success("操作成功");
  3725. this.getDetail(res.data.data.id);
  3726. })
  3727. .finally(() => {
  3728. loading.close();
  3729. });
  3730. });
  3731. },
  3732. revoke() {
  3733. this.$confirm("确定撤销费用?", {
  3734. confirmButtonText: "确定",
  3735. cancelButtonText: "取消",
  3736. type: "warning"
  3737. }).then(() => {
  3738. const loading = this.$loading({
  3739. lock: true,
  3740. text: "加载中",
  3741. spinner: "el-icon-loading",
  3742. background: "rgba(255,255,255,0.7)"
  3743. });
  3744. revoke(this.form)
  3745. .then(res => {
  3746. this.$message.success("操作成功");
  3747. this.getDetail(res.data.data.id);
  3748. })
  3749. .finally(() => {
  3750. loading.close();
  3751. });
  3752. });
  3753. },
  3754. updateDetail() {
  3755. this.getDetail(this.form.id);
  3756. },
  3757. application() {
  3758. this.$confirm("确定请核数据?", {
  3759. confirmButtonText: "确定",
  3760. cancelButtonText: "取消",
  3761. type: "warning"
  3762. }).then(() => {
  3763. let obj = {};
  3764. obj = {
  3765. id: this.form.id,
  3766. url: "/iosBasicData/costcenter/coc/index",
  3767. pageStatus: "",
  3768. pageLabel: "航线成本(COC)"
  3769. };
  3770. const loading = this.$loading({
  3771. lock: true,
  3772. text: "加载中",
  3773. spinner: "el-icon-loading",
  3774. background: "rgba(255,255,255,0.7)"
  3775. });
  3776. pleaseCheck(obj)
  3777. .then(res => {
  3778. this.$message.success("请核成功");
  3779. this.getDetail(res.data.data.id);
  3780. })
  3781. .finally(() => {
  3782. loading.close();
  3783. });
  3784. });
  3785. },
  3786. revokeApplication() {
  3787. this.$confirm("确定撤销请核?", {
  3788. confirmButtonText: "确定",
  3789. cancelButtonText: "取消",
  3790. type: "warning"
  3791. }).then(() => {
  3792. let obj = {};
  3793. obj = {
  3794. id: this.form.id
  3795. };
  3796. const loading = this.$loading({
  3797. lock: true,
  3798. text: "加载中",
  3799. spinner: "el-icon-loading",
  3800. background: "rgba(255,255,255,0.7)"
  3801. });
  3802. repealCancel(obj)
  3803. .then(res => {
  3804. this.$message.success("撤销请核成功");
  3805. this.getDetail(res.data.data.id);
  3806. this.editDisabled = false;
  3807. })
  3808. .finally(() => {
  3809. loading.close();
  3810. });
  3811. });
  3812. },
  3813. //请核关闭
  3814. choceScheduleFun() {
  3815. this.checkScheduleDialog = false;
  3816. },
  3817. //自定义列保存
  3818. async saveColumn(ref, option, optionBack, code) {
  3819. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  3820. if (inSave) {
  3821. this.$message.success("保存成功");
  3822. //关闭窗口
  3823. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  3824. }
  3825. },
  3826. //自定义列重置
  3827. async resetColumn(ref, option, optionBack, code) {
  3828. this[option] = this[optionBack];
  3829. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  3830. if (inSave) {
  3831. this.$message.success("重置成功");
  3832. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  3833. }
  3834. },
  3835. // 更改表格颜色
  3836. headerClassName(tab) {
  3837. //颜色间隔
  3838. let back = "";
  3839. if (tab.columnIndex >= 0 && tab.column.level === 1) {
  3840. if (tab.columnIndex % 2 === 0) {
  3841. back = "back-one";
  3842. } else if (tab.columnIndex % 2 === 1) {
  3843. back = "back-two";
  3844. }
  3845. }
  3846. return back;
  3847. },
  3848. goBack(type) {
  3849. this.$emit("goBack");
  3850. },
  3851. getSum() {
  3852. let sumArr = [];
  3853. let corpArr = [];
  3854. let newArr = [];
  3855. this.sumData = [];
  3856. sumArr = this.feeCenterListD.concat(this.feeCenterListC);
  3857. sumArr.forEach(e => {
  3858. if (e.shortName) {
  3859. corpArr.push(e.shortName);
  3860. }
  3861. });
  3862. newArr = [...new Set(corpArr)];
  3863. newArr.forEach(e => {
  3864. let rmbD = 0;
  3865. let rmbC = 0;
  3866. let usdD = 0;
  3867. let usdC = 0;
  3868. let sumD = 0;
  3869. let sumC = 0;
  3870. sumArr.forEach(item => {
  3871. if (e == item.shortName) {
  3872. if (item.curCode == this.getLocalCurrency() && item.dc == "D") {
  3873. rmbD += Number(item.amountCNY ? item.amountCNY : 0);
  3874. sumD += Number(item.amountCNY ? item.amountCNY : 0);
  3875. }
  3876. if (item.curCode == this.getLocalCurrency() && item.dc == "C") {
  3877. rmbC += Number(item.amountCNY ? item.amountCNY : 0);
  3878. sumC += Number(item.amountCNY ? item.amountCNY : 0);
  3879. }
  3880. if (item.curCode != this.getLocalCurrency() && item.dc == "D") {
  3881. usdD += Number(item.amountUSD ? item.amountUSD : 0);
  3882. sumD += Number(item.amountUSD ? item.amountUSD : 0) * Number(item.exrate ? item.exrate : 0);
  3883. }
  3884. if (item.curCode != this.getLocalCurrency() && item.dc == "C") {
  3885. usdC += Number(item.amountUSD ? item.amountUSD : 0);
  3886. sumC += Number(item.amountUSD ? item.amountUSD : 0) * Number(item.exrate ? item.exrate : 0);
  3887. }
  3888. }
  3889. });
  3890. this.sumData.push({
  3891. corpCnName: e,
  3892. rmbD: _.round(rmbD, 2),
  3893. rmbC: _.round(rmbC, 2),
  3894. usdD: _.round(usdD, 2),
  3895. usdC: _.round(usdC, 2),
  3896. sumD: _.round(sumD, 2),
  3897. sumC: _.round(sumC, 2)
  3898. });
  3899. });
  3900. }
  3901. },
  3902. watch: {
  3903. // 监听业务类型 如果不是分单 可以编辑分单号
  3904. "form.tradingBoxItemsList": {
  3905. // 执行方法
  3906. handler(oldValue, newValue) {
  3907. this.CNYSUM = 0;
  3908. this.USDSUM = 0;
  3909. this.form.tradingBoxItemsList.forEach(item => {
  3910. if (item.currency == this.getLocalCurrency()) {
  3911. this.CNYSUM = _.round(_.add(this.CNYSUM ? Number(this.CNYSUM) : 0, item.amount ? Number(item.amount) : 0), 2);
  3912. }
  3913. if (item.currency != this.getLocalCurrency()) {
  3914. this.USDSUM = _.round(_.add(this.USDSUM ? Number(this.USDSUM) : 0, item.amount ? Number(item.amount) : 0), 2);
  3915. }
  3916. });
  3917. },
  3918. deep: true, // 深度监听
  3919. immediate: true // 第一次改变就执行
  3920. },
  3921. // 监听业务类型 如果不是分单 可以编辑分单号
  3922. feeCenterListD: {
  3923. // 执行方法
  3924. handler(oldValue, newValue) {
  3925. this.getSum();
  3926. },
  3927. deep: true, // 深度监听
  3928. immediate: true // 第一次改变就执行
  3929. },
  3930. // 监听箱信息数据 箱信息中有温度 自动切换 冻货
  3931. feeCenterListC: {
  3932. // 执行方法
  3933. handler(oldValue, newValue) {
  3934. this.getSum();
  3935. },
  3936. deep: true, // 深度监听
  3937. immediate: true // 第一次改变就执行,
  3938. }
  3939. }
  3940. };
  3941. </script>
  3942. <style lang="scss" scoped>
  3943. ::v-deep .el-form-item__error {
  3944. display: none !important;
  3945. }
  3946. ::v-deep .el-form-item {
  3947. margin-bottom: 8px !important;
  3948. }
  3949. ::v-deep .el-table .cell {
  3950. padding: 0 2px !important;
  3951. .el-form-item {
  3952. margin-bottom: 0px !important;
  3953. }
  3954. }
  3955. ::v-deep .avue-crud .el-table .el-form-item__label {
  3956. left: -1px;
  3957. }
  3958. // ::v-deep#out-table .back-one {
  3959. // background: #ecf5ff !important;
  3960. // }
  3961. // ::v-deep#out-table .back-two {
  3962. // background: #ecf5ff !important;
  3963. // }
  3964. ::v-deep #out-table .back-one {
  3965. background: #ecf5ff !important;
  3966. text-align: center;
  3967. padding: 4px 0;
  3968. }
  3969. ::v-deep #out-table .back-two {
  3970. background: #ecf5ff !important;
  3971. text-align: center;
  3972. padding: 4px 0;
  3973. }
  3974. ::v-deep .el-table--small td,
  3975. .el-table--small th {
  3976. padding: 2px !important;
  3977. }
  3978. ::v-deep .el-card__body {
  3979. padding: 3px 10px;
  3980. }
  3981. ::v-deep .box-card .el-card__body {
  3982. padding: 4px !important;
  3983. }
  3984. .disabledBox {
  3985. display: flex;
  3986. align-items: center;
  3987. }
  3988. .meetSize {
  3989. font-size: 16px;
  3990. color: #54bcbd;
  3991. }
  3992. .fontSize {
  3993. font-size: 16px;
  3994. color: #81b337;
  3995. }
  3996. </style>