feecenter.vue 177 KB

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