index.vue 159 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911
  1. <template>
  2. <div class="app-container">
  3. <div v-if="login == 3">
  4. <kaihe-index />
  5. </div>
  6. <div v-else>
  7. <div v-show="mainTable == false">
  8. <el-form
  9. :model="tablefilter"
  10. ref="queryParams_s"
  11. v-show="showSearch"
  12. label-width="90px"
  13. >
  14. <el-row>
  15. <el-col :span="6">
  16. <el-form-item label="结算单位" prop="fCorpid">
  17. <el-select
  18. v-model="tablefilter.fCorpid"
  19. placeholder="请选择结算单位"
  20. filterable
  21. remote
  22. clearable
  23. size="small"
  24. style="width: 100%"
  25. @keyup.enter.native="handleQuery"
  26. :remote-method="corpsRemoteMethod"
  27. >
  28. <el-option
  29. v-for="(dict, index) in fMblnoOptions"
  30. :key="index.fId"
  31. :label="dict.fName"
  32. :value="dict.fId"
  33. ></el-option>
  34. </el-select>
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="6">
  38. <el-form-item label="状态" prop="fBillstatus">
  39. <el-select
  40. v-model="tablefilter.fBillstatus"
  41. placeholder="请选择状态"
  42. clearable
  43. style="width: 100%"
  44. >
  45. <el-option label="保存" value="1" />
  46. <el-option label="暂存" value="2" />
  47. <el-option label="审批驳回" value="3" />
  48. <el-option label="提交审核" value="4" />
  49. <el-option label="审批中" value="5" />
  50. <el-option label="审核完成" value="6" />
  51. </el-select>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :span="6">
  55. <el-form-item label="系统编号" prop="fBillno">
  56. <el-input
  57. v-model="tablefilter.fBillno"
  58. placeholder="请输入系统编号"
  59. clearable
  60. size="small"
  61. style="width: 100%"
  62. @keyup.enter.native="handleQuery"
  63. />
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="6">
  67. <el-form-item label="对账金额" prop="amount">
  68. <el-input
  69. v-model="tablefilter.firstMoney"
  70. placeholder="金额区间"
  71. style="width: 48%; margin-right: 4%"
  72. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  73. @keyup.enter.native="handleQuery"
  74. />
  75. <el-input
  76. v-model="tablefilter.lastMoney"
  77. placeholder="金额区间"
  78. @change="changeMoney"
  79. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  80. style="width: 48%"
  81. @keyup.enter.native="handleQuery"
  82. />
  83. </el-form-item>
  84. </el-col>
  85. </el-row>
  86. <el-row>
  87. <div v-show="show">
  88. <el-col :span="6">
  89. <el-form-item label="备注" prop="fRemarks">
  90. <el-input
  91. v-model="tablefilter.fRemarks"
  92. placeholder="请输入备注"
  93. clearable
  94. style="width: 100%"
  95. @keyup.enter.native="handleQuery"
  96. />
  97. </el-form-item>
  98. </el-col>
  99. <el-col :span="6">
  100. <el-form-item label="对账日期" prop="timeInterval">
  101. <el-date-picker
  102. v-model="tablefilter.timeInterval"
  103. size="small"
  104. style="width: 100%"
  105. value-format="yyyy-MM-dd"
  106. :default-time="['00:00:00', '23:59:59']"
  107. type="daterange"
  108. range-separator="-"
  109. start-placeholder="开始日期"
  110. end-placeholder="结束日期"
  111. ></el-date-picker>
  112. </el-form-item>
  113. </el-col>
  114. </div>
  115. </el-row>
  116. </el-form>
  117. <el-row :gutter="10" class="mb8">
  118. <el-col :span="1.5">
  119. <el-button
  120. type="primary"
  121. icon="el-icon-plus"
  122. size="mini"
  123. @click="handleAdd"
  124. v-hasPermi="['finance:contrast:add']"
  125. >新增</el-button
  126. >
  127. </el-col>
  128. <el-col :span="1.5">
  129. <el-button
  130. type="success"
  131. icon="el-icon-edit"
  132. size="mini"
  133. :disabled="single"
  134. @click="handleUpdate"
  135. v-hasPermi="['warehouse:contrast:edit']"
  136. >修改</el-button
  137. >
  138. </el-col>
  139. <el-col :span="1.5">
  140. <el-button
  141. type="warning"
  142. icon="el-icon-download"
  143. size="mini"
  144. @click="handleExport"
  145. v-hasPermi="['finance:contrast:export']"
  146. >导出</el-button
  147. >
  148. </el-col>
  149. <div class="tabSetting">
  150. <div style="margin-right: 20px">
  151. <el-button
  152. type="cyan"
  153. icon="el-icon-search"
  154. size="mini"
  155. @click="handleQuery"
  156. >搜索</el-button
  157. >
  158. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  159. >重置</el-button
  160. >
  161. <el-button
  162. v-show="show"
  163. @click="show = !show"
  164. icon="el-icon-arrow-up"
  165. size="mini"
  166. >展开</el-button
  167. >
  168. <el-button
  169. v-show="!show"
  170. @click="show = !show"
  171. icon="el-icon-arrow-down"
  172. size="mini"
  173. >展开</el-button
  174. >
  175. </div>
  176. <right-toolbar
  177. :showSearch.sync="showSearch"
  178. @queryTable="getList"
  179. ></right-toolbar>
  180. <div style="margin: 0 12px">
  181. <el-button
  182. icon="el-icon-setting"
  183. size="mini"
  184. circle
  185. @click="showSetting = !showSetting"
  186. v-if="typevalue != 2"
  187. ></el-button>
  188. <el-button
  189. icon="el-icon-setting"
  190. size="mini"
  191. circle
  192. @click="showSetting6 = !showSetting6"
  193. v-else
  194. ></el-button>
  195. </div>
  196. </div>
  197. </el-row>
  198. <el-dialog
  199. title="自定义列显示"
  200. :visible.sync="showSetting"
  201. width="700px"
  202. v-dialogDrag
  203. >
  204. <template slot="title">
  205. <div class="avue-crud__dialog__header">
  206. <span class="el-dialog__title">
  207. <span
  208. style="
  209. display: inline-block;
  210. width: 3px;
  211. height: 20px;
  212. margin-right: 5px;
  213. float: left;
  214. margin-top: 2px;
  215. "
  216. ></span>
  217. </span>
  218. </div>
  219. </template>
  220. <div>配置排序列数据(拖动调整顺序)</div>
  221. <div style="margin-left: 17px">
  222. <el-checkbox
  223. v-model="allCheck"
  224. label="全选"
  225. @change="allChecked"
  226. ></el-checkbox>
  227. </div>
  228. <div style="padding: 4px; display: flex; justify-content: center">
  229. <draggable
  230. v-model="setRowList"
  231. group="site"
  232. animation="300"
  233. @start="onStart"
  234. @end="onEnd"
  235. handle=".indraggable"
  236. >
  237. <transition-group>
  238. <div
  239. v-for="item in setRowList"
  240. :key="item.surface"
  241. class="listStyle"
  242. >
  243. <div style="width: 500px" class="indraggable">
  244. <div class="progress" :style="{ width: item.width + 'px' }">
  245. <el-checkbox
  246. :label="item.name"
  247. v-model="item.checked"
  248. :true-label="0"
  249. :false-label="1"
  250. >{{ item.name }}
  251. </el-checkbox>
  252. </div>
  253. </div>
  254. <el-input-number
  255. v-model.number="item.width"
  256. controls-position="right"
  257. :min="1"
  258. :max="500"
  259. size="mini"
  260. ></el-input-number>
  261. </div>
  262. </transition-group>
  263. </draggable>
  264. </div>
  265. <span slot="footer" class="dialog-footer">
  266. <el-button @click="showSetting = false">取 消</el-button>
  267. <el-button @click="delRow" type="danger">重 置</el-button>
  268. <el-button type="primary" @click="save()">确 定</el-button>
  269. </span>
  270. </el-dialog>
  271. <el-table
  272. v-loading="loading"
  273. :data="contrastList"
  274. @selection-change="handleSelectionChange"
  275. show-summary
  276. :summary-method="listTotal"
  277. v-if="typevalue != 2"
  278. >
  279. <el-table-column width="100" align="center" type="selection" />
  280. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  281. <el-table-column
  282. label="行号"
  283. align="center"
  284. type="index"
  285. fixed="left"
  286. />
  287. <el-table-column
  288. v-for="(item, index) in getRowList"
  289. :key="index"
  290. :label="item.name"
  291. :width="item.width"
  292. :prop="item.label"
  293. align="center"
  294. :fixed="item.fixed"
  295. :show-overflow-tooltip="true"
  296. />
  297. <el-table-column
  298. label="操作"
  299. align="center"
  300. class-name="small-padding fixed-width"
  301. min-width="180"
  302. fixed="right"
  303. >
  304. <template slot-scope="scope">
  305. <el-button
  306. size="mini"
  307. type="text"
  308. icon="el-icon-view"
  309. @click="check(scope.row, 0)"
  310. v-hasPermi="['finance:contrast:edit']"
  311. >查看</el-button
  312. >
  313. <el-button
  314. size="mini"
  315. type="text"
  316. icon="el-icon-view"
  317. @click="check(scope.row, 1)"
  318. v-hasPermi="['finance:contrast:edit']"
  319. v-if="
  320. scope.row.fBillstatus == '提交审核' ||
  321. scope.row.fBillstatus == '审核中'
  322. "
  323. >审批进度</el-button
  324. >
  325. <el-button
  326. size="mini"
  327. type="text"
  328. icon="el-icon-edit"
  329. @click="handleUpdate(scope.row)"
  330. v-hasPermi="['finance:contrast:edit']"
  331. v-if="
  332. scope.row.fBillstatus == '保存' ||
  333. scope.row.fBillstatus == '暂存' ||
  334. scope.row.fBillstatus == '审批驳回' ||
  335. scope.row.fBillstatus == '新建'
  336. "
  337. >
  338. 修改</el-button
  339. >
  340. <el-button
  341. size="mini"
  342. type="text"
  343. icon="el-icon-delete"
  344. @click="handleDelete(scope.row)"
  345. v-hasPermi="['finance:contrast:remove']"
  346. v-if="
  347. scope.row.fBillstatus == '保存' ||
  348. scope.row.fBillstatus == '暂存' ||
  349. scope.row.fBillstatus == '审批驳回' ||
  350. scope.row.fBillstatus == '新建'
  351. "
  352. >删除</el-button
  353. >
  354. </template>
  355. </el-table-column>
  356. </el-table>
  357. <el-dialog
  358. title="自定义列显示"
  359. :visible.sync="showSetting6"
  360. width="700px"
  361. v-dialogDrag
  362. >
  363. <template slot="title">
  364. <div class="avue-crud__dialog__header">
  365. <span class="el-dialog__title">
  366. <span
  367. style="
  368. display: inline-block;
  369. width: 3px;
  370. height: 20px;
  371. margin-right: 5px;
  372. float: left;
  373. margin-top: 2px;
  374. "
  375. ></span>
  376. </span>
  377. </div>
  378. </template>
  379. <div>配置排序列数据(拖动调整顺序)</div>
  380. <div style="margin-left: 17px">
  381. <el-checkbox
  382. v-model="allCheck6"
  383. label="全选"
  384. @change="allChecked6"
  385. ></el-checkbox>
  386. </div>
  387. <div style="padding: 4px; display: flex; justify-content: center">
  388. <draggable
  389. v-model="setRowList6"
  390. group="site"
  391. animation="300"
  392. @start="onStart"
  393. @end="onEnd"
  394. handle=".indraggable"
  395. >
  396. <transition-group>
  397. <div
  398. v-for="item in setRowList6"
  399. :key="item.surface"
  400. class="listStyle"
  401. >
  402. <div style="width: 500px" class="indraggable">
  403. <div class="progress" :style="{ width: item.width + 'px' }">
  404. <el-checkbox
  405. :label="item.name"
  406. v-model="item.checked"
  407. :true-label="0"
  408. :false-label="1"
  409. >{{ item.name }}
  410. </el-checkbox>
  411. </div>
  412. </div>
  413. <el-input-number
  414. v-model.number="item.width"
  415. controls-position="right"
  416. :min="1"
  417. :max="500"
  418. size="mini"
  419. ></el-input-number>
  420. </div>
  421. </transition-group>
  422. </draggable>
  423. </div>
  424. <span slot="footer" class="dialog-footer">
  425. <el-button @click="showSetting6 = false">取 消</el-button>
  426. <el-button @click="delRow6" type="danger">重 置</el-button>
  427. <el-button type="primary" @click="save6()">确 定</el-button>
  428. </span>
  429. </el-dialog>
  430. <el-table
  431. v-loading="loading"
  432. :data="contrastList"
  433. @selection-change="handleSelectionChange"
  434. show-summary
  435. :summary-method="listTotal"
  436. v-if="typevalue == 2"
  437. >
  438. <el-table-column width="100" align="center" type="selection" />
  439. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  440. <el-table-column
  441. label="行号"
  442. align="center"
  443. type="index"
  444. fixed="left"
  445. />
  446. <el-table-column
  447. v-for="(item, index) in getRowList6"
  448. :key="index"
  449. :label="item.name"
  450. :width="item.width"
  451. :prop="item.label"
  452. align="center"
  453. :fixed="item.fixed"
  454. :show-overflow-tooltip="true"
  455. />
  456. <el-table-column
  457. label="操作"
  458. align="center"
  459. class-name="small-padding fixed-width"
  460. min-width="180"
  461. fixed="right"
  462. >
  463. <template slot-scope="scope">
  464. <el-button
  465. size="mini"
  466. type="text"
  467. icon="el-icon-view"
  468. @click="check(scope.row, 0)"
  469. v-hasPermi="['finance:contrast:edit']"
  470. >查看</el-button
  471. >
  472. <el-button
  473. size="mini"
  474. type="text"
  475. icon="el-icon-view"
  476. @click="check(scope.row, 1)"
  477. v-hasPermi="['finance:contrast:edit']"
  478. v-if="
  479. scope.row.fBillstatus == '提交审核' ||
  480. scope.row.fBillstatus == '审核中'
  481. "
  482. >审批进度</el-button
  483. >
  484. <el-button
  485. size="mini"
  486. type="text"
  487. icon="el-icon-edit"
  488. @click="handleUpdate(scope.row)"
  489. v-hasPermi="['finance:contrast:edit']"
  490. v-if="
  491. scope.row.fBillstatus == '保存' ||
  492. scope.row.fBillstatus == '暂存' ||
  493. scope.row.fBillstatus == '审批驳回' ||
  494. scope.row.fBillstatus == '新建'
  495. "
  496. >
  497. 修改</el-button
  498. >
  499. <el-button
  500. size="mini"
  501. type="text"
  502. icon="el-icon-delete"
  503. @click="handleDelete(scope.row)"
  504. v-hasPermi="['finance:contrast:remove']"
  505. v-if="
  506. scope.row.fBillstatus == '保存' ||
  507. scope.row.fBillstatus == '暂存' ||
  508. scope.row.fBillstatus == '审批驳回' ||
  509. scope.row.fBillstatus == '新建'
  510. "
  511. >删除</el-button
  512. >
  513. </template>
  514. </el-table-column>
  515. </el-table>
  516. <pagination
  517. v-show="total > 0"
  518. :total="total"
  519. :page.sync="tablefilter.pageNum"
  520. :limit.sync="tablefilter.pageSize"
  521. @pagination="getList"
  522. />
  523. </div>
  524. <!-- 新增修改页面-->
  525. <div v-if="mainTable == true">
  526. <el-form
  527. ref="ruless"
  528. :model="queryParams"
  529. :rules="ruless"
  530. label-width="78px"
  531. :inline="true"
  532. v-show="showSearch"
  533. >
  534. <el-form-item label="结算单位" prop="fCorpid">
  535. <el-select
  536. v-model="queryParams.fCorpid"
  537. placeholder="请选择结算单位"
  538. filterable
  539. remote
  540. clearable
  541. :disabled="doNot"
  542. style="width: 200px"
  543. size="small"
  544. @keyup.enter.native="handleQuery"
  545. :remote-method="corpsRemoteMethod"
  546. >
  547. <el-option
  548. v-for="(dict, index) in fMblnoOptions"
  549. :key="index.fId"
  550. :label="dict.fName"
  551. :value="dict.fId"
  552. ></el-option>
  553. </el-select>
  554. </el-form-item>
  555. <!-- <el-form-item label="提单号" prop="tMblno">
  556. <el-input v-model="TWareHouseFees.tMblno" placeholder="" :disabled="true"/>
  557. </el-form-item> -->
  558. <el-form-item label="业务日期">
  559. <el-date-picker
  560. v-model="queryParams.fAccbilldate"
  561. size="small"
  562. style="width: 200px"
  563. value-format="yyyy-MM-dd"
  564. type="date"
  565. :disabled="notChange"
  566. placeholder="选择账单日期"
  567. >
  568. </el-date-picker>
  569. </el-form-item>
  570. <el-form-item
  571. label="制单日期"
  572. prop="createTime"
  573. v-if="typevalue == 2"
  574. >
  575. <el-date-picker
  576. v-model="queryParams.createTime"
  577. size="small"
  578. style="width: 200px"
  579. value-format="timestamp"
  580. type="date"
  581. disabled
  582. placeholder="选择制单日期"
  583. >
  584. </el-date-picker>
  585. </el-form-item>
  586. <el-form-item label="系统编号" prop="fBillno">
  587. <el-input
  588. v-model="queryParams.fBillno"
  589. placeholder=""
  590. clearable
  591. size="small"
  592. :disabled="true"
  593. style="width: 200px"
  594. @keyup.enter.native="handleQuery"
  595. />
  596. </el-form-item>
  597. <el-form-item label="录入人" prop="createBy">
  598. <el-input
  599. v-model="queryParams.createBy"
  600. disabled
  601. size="small"
  602. style="width: 200px"
  603. />
  604. </el-form-item>
  605. <el-form-item label="备注" prop="fRemarks">
  606. <el-input
  607. v-model="queryParams.fRemarks"
  608. size="small"
  609. style="width: 200px"
  610. :disabled="notChange"
  611. />
  612. </el-form-item>
  613. <div
  614. style="width: 100%; display: flex; justify-content: space-between"
  615. >
  616. <div style="display: flex">
  617. <el-button
  618. icon="el-icon-arrow-left"
  619. type="danger"
  620. v-if="cancelButton === true"
  621. size="mini"
  622. @click="cancel"
  623. >返回列表</el-button
  624. >
  625. <el-button
  626. icon="el-icon-arrow-left"
  627. type="danger"
  628. v-if="cancelButton === false"
  629. size="mini"
  630. @click="homePage"
  631. >返回首页</el-button
  632. >
  633. <el-button
  634. type="warning"
  635. size="mini"
  636. @click="reconciliation"
  637. :disabled="notChange"
  638. v-if="queryParams.fBillstatus < '4'"
  639. >检索</el-button
  640. >
  641. <el-button
  642. type="primary"
  643. size="mini"
  644. @click="confirmReconciliation"
  645. :disabled="notChange"
  646. v-if="queryParams.fBillstatus < '4'"
  647. >确认对账</el-button
  648. >
  649. <el-button type="warning" size="mini" @click="handleExportItems"
  650. >导出</el-button
  651. >
  652. <el-button
  653. type="success"
  654. size="mini"
  655. @click="backrRconciliation"
  656. v-if="queryParams.fBillstatus === '6'"
  657. >撤销对账</el-button
  658. >
  659. <!-- <el-button type="info" size="small" @click="exportData">导出</el-button>-->
  660. <el-button
  661. type="danger"
  662. size="mini"
  663. :disabled="disappear"
  664. v-if="queryParams.fBillstatus === '4'"
  665. @click="backApproval('f_billstatus')"
  666. >撤销审批</el-button
  667. >
  668. <el-button
  669. v-if="approve === true && queryParams.fBillstatus >= '4' && queryParams.fBillstatus < '6'"
  670. size="mini"
  671. @click="goApproval('f_billstatus')"
  672. >审批</el-button
  673. >
  674. <el-button
  675. type="primary"
  676. size="mini"
  677. v-if="queryParams.fBillstatus >= '3'"
  678. @click="addOrUpdateHandle('f_billstatus')"
  679. >查看审批流</el-button
  680. >
  681. <el-button
  682. type="success"
  683. size="mini"
  684. @click="submitForm(typevalue, 0)"
  685. :disabled="notChange"
  686. >保 存</el-button
  687. >
  688. <el-button
  689. @click="addPage"
  690. type="primary"
  691. :disabled="notChange"
  692. size="mini"
  693. >新 增</el-button
  694. >
  695. </div>
  696. <div style="margin: 0 12px">
  697. <el-button
  698. v-if="typevalue != 2"
  699. icon="el-icon-setting"
  700. size="mini"
  701. circle
  702. @click="showSetting2 = !showSetting2"
  703. ></el-button>
  704. <el-button
  705. v-if="typevalue == 2"
  706. icon="el-icon-setting"
  707. size="mini"
  708. circle
  709. @click="showSetting4 = !showSetting4"
  710. ></el-button>
  711. </div>
  712. </div>
  713. <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
  714. </el-form>
  715. <el-dialog
  716. title="自定义列显示"
  717. :visible.sync="showSetting2"
  718. width="700px"
  719. v-dialogDrag
  720. append-to-body
  721. >
  722. <template slot="title">
  723. <div class="avue-crud__dialog__header">
  724. <span class="el-dialog__title">
  725. <span
  726. style="
  727. display: inline-block;
  728. width: 3px;
  729. height: 20px;
  730. margin-right: 5px;
  731. float: left;
  732. margin-top: 2px;
  733. "
  734. ></span>
  735. </span>
  736. </div>
  737. </template>
  738. <div>配置排序列数据(拖动调整顺序)</div>
  739. <div style="margin-left: 17px">
  740. <el-checkbox
  741. v-model="allCheck2"
  742. label="全选"
  743. @change="allChecked2"
  744. ></el-checkbox>
  745. </div>
  746. <div style="padding: 4px; display: flex; justify-content: center">
  747. <draggable
  748. v-model="setRowList2"
  749. group="site"
  750. animation="300"
  751. @start="onStart"
  752. @end="onEnd"
  753. handle=".indraggable"
  754. >
  755. <transition-group>
  756. <div
  757. v-for="item in setRowList2"
  758. :key="item.surface"
  759. class="listStyle"
  760. >
  761. <div style="width: 500px" class="indraggable">
  762. <div class="progress" :style="{ width: item.width + 'px' }">
  763. <el-checkbox
  764. :label="item.name"
  765. v-model="item.checked"
  766. :true-label="0"
  767. :false-label="1"
  768. >{{ item.name }}
  769. </el-checkbox>
  770. </div>
  771. </div>
  772. <el-input-number
  773. v-model.number="item.width"
  774. controls-position="right"
  775. :min="1"
  776. :max="500"
  777. size="mini"
  778. ></el-input-number>
  779. </div>
  780. </transition-group>
  781. </draggable>
  782. </div>
  783. <span slot="footer" class="dialog-footer">
  784. <el-button @click="showSetting2 = false">取 消</el-button>
  785. <el-button @click="delRow2" type="danger">重 置</el-button>
  786. <el-button type="primary" @click="save2()">确 定</el-button>
  787. </span>
  788. </el-dialog>
  789. <el-table
  790. v-loading="loading"
  791. :data="DzfeeList"
  792. @selection-change="handleSelectionChange_s"
  793. show-summary
  794. :summary-method="listTotal"
  795. v-if="typevalue != 2"
  796. >
  797. <el-table-column label="行号" align="center" type="index" />
  798. <el-table-column
  799. v-for="(item, index) in getRowList2"
  800. :key="index"
  801. :label="item.name"
  802. :width="item.width"
  803. :prop="item.label"
  804. align="center"
  805. :fixed="item.fixed"
  806. :show-overflow-tooltip="true"
  807. sortable
  808. >
  809. <template slot-scope="scope">
  810. <span v-if="item.label == 'fBsdate'">{{
  811. scope.row.fBsdate
  812. ? scope.row.fBsdate.slice(0, 10)
  813. : scope.row.fReviewDate
  814. }}</span>
  815. <span v-if="item.label == 'fSrcdc' && login == 3">{{
  816. scope.row.fSrcdc == "D" ? "收" : "付"
  817. }}</span>
  818. <span v-else>{{ scope.row[item.label] }}</span>
  819. </template>
  820. </el-table-column>
  821. <!-- <el-table-column label="提单号" align="center" prop="fMblno" />
  822. <el-table-column label="业务日期" align="center" prop="fBsdate">
  823. <template slot-scope="scope">
  824. <span v-if="scope.row.fBsdate === undefined">无</span>
  825. <span v-else>{{ scope.row.fBsdate.slice(0, 10) }}</span>
  826. </template>
  827. </el-table-column>
  828. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  829. <el-table-column label="收/付" align="center" prop="fSrcdc">
  830. <template slot-scope="scope">
  831. <span v-if="scope.row.fSrcdc == 'D'">收</span>
  832. <span v-else-if="scope.row.fSrcdc == 'C'">付</span>
  833. </template>
  834. </el-table-column>
  835. <el-table-column label="金额" align="center" prop="fAmtdr" />
  836. <el-table-column label="计价单位" align="center" prop="fFeeunitid" />
  837. <el-table-column label="数量" align="center" prop="fQty" />
  838. <el-table-column label="单价" align="center" prop="fUnitprice" />
  839. <el-table-column label="本次金额" align="center" prop="fAmt" />
  840. <el-table-column label="作业类型" align="center" prop="fBusinessType" />
  841. <el-table-column label="业务类型" align="center" prop="fBilltype">
  842. <template slot-scope="scope">
  843. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  844. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  845. <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>
  846. <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>
  847. <span v-else-if="scope.row.fBilltype == 'JSCCF'">仓储费</span>
  848. <span v-else>{{ scope.row.fBilltype }}</span>
  849. </template>
  850. </el-table-column>
  851. <el-table-column label="来源编号" align="center" prop="srcBillNo" />
  852. <el-table-column label="提单号" align="center" prop="fMblno" />
  853. <el-table-column label="货物品名" align="center" prop="fProductName" />
  854. <el-table-column label="品牌" align="center" prop="fMarks" />
  855. <el-table-column label="计费起始日期" align="center" prop="fChargedate">
  856. <template slot-scope="scope">
  857. <span v-if="scope.row.fChargedate === undefined">无</span>
  858. <span v-else>{{ scope.row.fChargedate.slice(0, 10) }}</span>
  859. </template>
  860. </el-table-column>
  861. <el-table-column
  862. label="计费截止日期"
  863. align="center"
  864. prop="fBillingDeadline"
  865. >
  866. <template slot-scope="scope">
  867. <span v-if="scope.row.fBillingDeadline === undefined">无</span>
  868. <span v-else>{{ scope.row.fBillingDeadline.slice(0, 10) }}</span>
  869. </template>
  870. </el-table-column>
  871. <el-table-column label="计费天数" align="center" prop="fBillingDays" />
  872. <el-table-column
  873. label="库存天数"
  874. align="center"
  875. prop="fInventoryDays"
  876. />
  877. <el-table-column label="备注" align="center" prop="fRemarks" /> -->
  878. <el-table-column
  879. label="操作"
  880. align="center"
  881. class-name="small-padding fixed-width"
  882. >
  883. <template slot-scope="scope">
  884. <el-button
  885. size="mini"
  886. type="text"
  887. icon="el-icon-delete"
  888. :disabled="notChange"
  889. @click.native.prevent="deleteRow(scope.$index, DzfeeList)"
  890. >删除
  891. </el-button>
  892. </template>
  893. </el-table-column>
  894. </el-table>
  895. <el-dialog
  896. title="自定义列显示"
  897. :visible.sync="showSetting4"
  898. width="700px"
  899. v-dialogDrag
  900. append-to-body
  901. >
  902. <template slot="title">
  903. <div class="avue-crud__dialog__header">
  904. <span class="el-dialog__title">
  905. <span
  906. style="
  907. display: inline-block;
  908. width: 3px;
  909. height: 20px;
  910. margin-right: 5px;
  911. float: left;
  912. margin-top: 2px;
  913. "
  914. ></span>
  915. </span>
  916. </div>
  917. </template>
  918. <div>配置排序列数据(拖动调整顺序)</div>
  919. <div style="margin-left: 17px">
  920. <el-checkbox
  921. v-model="allCheck4"
  922. label="全选"
  923. @change="allChecked4"
  924. ></el-checkbox>
  925. </div>
  926. <div style="padding: 4px; display: flex; justify-content: center">
  927. <draggable
  928. v-model="setRowList4"
  929. group="site"
  930. animation="300"
  931. @start="onStart"
  932. @end="onEnd"
  933. handle=".indraggable"
  934. >
  935. <transition-group>
  936. <div
  937. v-for="item in setRowList4"
  938. :key="item.surface"
  939. class="listStyle"
  940. >
  941. <div style="width: 500px" class="indraggable">
  942. <div class="progress" :style="{ width: item.width + 'px' }">
  943. <el-checkbox
  944. :label="item.name"
  945. v-model="item.checked"
  946. :true-label="0"
  947. :false-label="1"
  948. >{{ item.name }}
  949. </el-checkbox>
  950. </div>
  951. </div>
  952. <el-input-number
  953. v-model.number="item.width"
  954. controls-position="right"
  955. :min="1"
  956. :max="500"
  957. size="mini"
  958. ></el-input-number>
  959. </div>
  960. </transition-group>
  961. </draggable>
  962. </div>
  963. <span slot="footer" class="dialog-footer">
  964. <el-button @click="showSetting4 = false">取 消</el-button>
  965. <el-button @click="delRow4" type="danger">重 置</el-button>
  966. <el-button type="primary" @click="save4()">确 定</el-button>
  967. </span>
  968. </el-dialog>
  969. <el-table
  970. v-loading="loading"
  971. :data="DzfeeList"
  972. @selection-change="handleSelectionChange_s"
  973. show-summary
  974. :summary-method="listTotal"
  975. v-if="typevalue == 2"
  976. >
  977. <el-table-column label="行号" align="center" type="index" />
  978. <el-table-column
  979. v-for="(item, index) in getRowList4"
  980. :key="index"
  981. :label="item.name"
  982. :width="item.width"
  983. :prop="item.label"
  984. align="center"
  985. :fixed="item.fixed"
  986. :show-overflow-tooltip="true"
  987. sortable
  988. >
  989. <!-- <template slot-scope="scope">
  990. <span v-if="item.label == 'fBsdate'">{{
  991. scope.row.fBsdate
  992. ? scope.row.fBsdate.slice(0, 10)
  993. : scope.row.fReviewDate
  994. }}</span>
  995. <span v-if="item.label == 'fSrcdc' && login == 3">{{
  996. scope.row.fSrcdc == "D" ? "收" : "付"
  997. }}</span>
  998. <span v-else>{{ scope.row[item.label] }}</span>
  999. </template> -->
  1000. </el-table-column>
  1001. <el-table-column
  1002. label="操作"
  1003. fixed="right"
  1004. align="center"
  1005. class-name="small-padding fixed-width"
  1006. >
  1007. <template slot-scope="scope">
  1008. <el-button
  1009. size="mini"
  1010. type="text"
  1011. icon="el-icon-delete"
  1012. :disabled="notChange"
  1013. @click.native.prevent="deleteRow(scope.$index, DzfeeList)"
  1014. >删除
  1015. </el-button>
  1016. </template>
  1017. </el-table-column>
  1018. </el-table>
  1019. <div slot="footer" class="dialog-footer">
  1020. <add-or-update
  1021. v-if="addOrUpdateVisible"
  1022. ref="addOrUpdate"
  1023. @refreshDataList="getDataList"
  1024. ></add-or-update>
  1025. <approval-comments
  1026. v-if="addOrUpdateVisib"
  1027. ref="ApprovalComments"
  1028. @refreshDataList="returnData"
  1029. ></approval-comments>
  1030. </div>
  1031. <!-- 添加或修改财务数据主对话框 -->
  1032. <el-dialog
  1033. v-dialogDrag
  1034. :fullscreen="dialogFull"
  1035. :close-on-click-modal="false"
  1036. width="78%"
  1037. :title="title"
  1038. :visible.sync="innerVisible"
  1039. append-to-body
  1040. >
  1041. <template slot="title">
  1042. <div class="avue-crud__dialog__header">
  1043. <span
  1044. class="el-dialog__title"
  1045. style="font-size: 18px; font-weight: bold; color: #606266"
  1046. >
  1047. <span
  1048. style="
  1049. display: inline-block;
  1050. width: 3px;
  1051. height: 20px;
  1052. margin-right: 5px;
  1053. float: left;
  1054. margin-top: 2px;
  1055. "
  1056. ></span
  1057. >检索
  1058. </span>
  1059. <div class="avue-crud__dialog__menu enlarge" @click="full">
  1060. <i
  1061. style="
  1062. cursor: pointer;
  1063. display: block;
  1064. width: 12px;
  1065. height: 12px;
  1066. border: 1px solid #909399;
  1067. border-top: 3px solid #909399;
  1068. margin-top: -3px;
  1069. "
  1070. ></i>
  1071. </div>
  1072. </div>
  1073. </template>
  1074. <el-form
  1075. :model="TWareHouseFees"
  1076. ref="feeListRules"
  1077. :rules="feeListRules"
  1078. label-width="78px"
  1079. >
  1080. <el-row>
  1081. <el-col :span="6">
  1082. <el-form-item label="结算单位" prop="fToCorpid">
  1083. <el-select
  1084. v-model="TWareHouseFees.fToCorpid"
  1085. placeholder="请选择结算单位"
  1086. :disabled="doNot"
  1087. filterable
  1088. remote
  1089. clearable
  1090. style="width: 100%"
  1091. size="small"
  1092. @keyup.enter.native="handleQuery"
  1093. :remote-method="corpsRemoteMethod"
  1094. >
  1095. <el-option
  1096. v-for="(dict, index) in fMblnoOptions"
  1097. :key="index.fId"
  1098. :label="dict.fName"
  1099. :value="dict.fId"
  1100. ></el-option>
  1101. </el-select>
  1102. </el-form-item>
  1103. </el-col>
  1104. <el-col :span="6">
  1105. <el-form-item label="业务日期" prop="acceptDateList">
  1106. <el-date-picker
  1107. v-model="TWareHouseFees.acceptDateList"
  1108. size="small"
  1109. unlink-panels
  1110. style="width: 100%"
  1111. value-format="yyyy-MM-dd"
  1112. :default-time="['00:00:00', '23:59:59']"
  1113. type="daterange"
  1114. range-separator="-"
  1115. start-placeholder="开始日期"
  1116. end-placeholder="结束日期"
  1117. ></el-date-picker>
  1118. </el-form-item>
  1119. </el-col>
  1120. <el-col :span="6">
  1121. <el-form-item label="提单号" prop="fMblno">
  1122. <el-input
  1123. clearable
  1124. v-model="TWareHouseFees.fMblno"
  1125. placeholder="请输入提单号"
  1126. style="width: 100%"
  1127. size="small"
  1128. />
  1129. </el-form-item>
  1130. </el-col>
  1131. <el-col :span="6">
  1132. <el-form-item label="应收应付" prop="fDc">
  1133. <el-select
  1134. v-model="TWareHouseFees.fDc"
  1135. size="small"
  1136. style="width: 100%"
  1137. >
  1138. <el-option label="应收" value="D" />
  1139. <el-option label="应付" value="C" />
  1140. </el-select>
  1141. </el-form-item>
  1142. </el-col>
  1143. <el-col :span="6">
  1144. <el-form-item label="是否对账" prop="fReconciliation">
  1145. <el-select
  1146. v-model="TWareHouseFees.fReconciliation"
  1147. size="small"
  1148. style="width: 100%"
  1149. >
  1150. <el-option label="是" value="1" />
  1151. <el-option label="否" value="0" />
  1152. </el-select>
  1153. </el-form-item>
  1154. </el-col>
  1155. <el-col :span="6">
  1156. <el-form-item label="费用名称" prop="fFeeid">
  1157. <template>
  1158. <el-select
  1159. v-model="TWareHouseFees.fFeeid"
  1160. filterable
  1161. :disabled="browseStatus"
  1162. remote
  1163. size="small"
  1164. style="width: 100%"
  1165. :remote-method="fWRemoteMethod"
  1166. placeholder="费用名称"
  1167. multiple
  1168. >
  1169. <el-option
  1170. v-for="item in fWbuOptions"
  1171. :key="item.fId"
  1172. :label="item.fName"
  1173. :value="item.fId"
  1174. >
  1175. </el-option>
  1176. </el-select>
  1177. </template>
  1178. </el-form-item>
  1179. </el-col>
  1180. <el-col :span="6">
  1181. <el-form-item
  1182. label="仓储业务"
  1183. prop="fFeeid"
  1184. v-if="typevalue == 1 || typevalue == 3"
  1185. >
  1186. <el-select
  1187. v-model="TWareHouseFees.fBilltype"
  1188. size="small"
  1189. style="width: 100%"
  1190. @change="changefBilltype"
  1191. placeholder="请选择仓储业务"
  1192. >
  1193. <el-option label="入库" value="SJRK"></el-option>
  1194. <el-option label="出库" value="SJCK"></el-option>
  1195. <el-option label="货权转移" value="HQZY"></el-option>
  1196. <el-option label="调拨" value="CKDB"></el-option>
  1197. </el-select>
  1198. </el-form-item>
  1199. </el-col>
  1200. <el-col :span="6">
  1201. <el-form-item label="作业类型" prop="fBusinessType">
  1202. <el-select
  1203. v-model="TWareHouseFees.fBusinessType"
  1204. filterable
  1205. :disabled="browseStatus"
  1206. remote
  1207. size="small"
  1208. style="width: 100%"
  1209. placeholder="作业类型"
  1210. multiple
  1211. >
  1212. <el-option
  1213. v-for="(dict, index) in businessTypeOption"
  1214. :key="index.dictValue"
  1215. :label="dict.dictLabel"
  1216. :value="dict.dictValue"
  1217. >
  1218. </el-option>
  1219. </el-select>
  1220. </el-form-item>
  1221. </el-col>
  1222. </el-row>
  1223. <el-row>
  1224. <el-col :span="8">
  1225. <el-form-item
  1226. label="审核日期"
  1227. v-if="typevalue == 1 || typevalue == 3"
  1228. >
  1229. <el-date-picker
  1230. style="width: 100%"
  1231. size="small"
  1232. v-model="TWareHouseFees.timeExamine"
  1233. type="daterange"
  1234. start-placeholder="开始日期"
  1235. end-placeholder="结束日期"
  1236. value-format="yyyy-MM-dd"
  1237. :default-time="['00:00:00', '23:59:59']"
  1238. unlink-panels
  1239. >
  1240. </el-date-picker>
  1241. </el-form-item>
  1242. </el-col>
  1243. <el-col :span="8">
  1244. <el-form-item
  1245. label="对账日期"
  1246. label-width="85px"
  1247. prop="timeReconci"
  1248. v-if="TWareHouseFees.fReconciliation == '1'"
  1249. >
  1250. <el-date-picker
  1251. v-model="TWareHouseFees.timeReconci"
  1252. size="small"
  1253. style="width: 240px"
  1254. value-format="yyyy-MM-dd"
  1255. type="daterange"
  1256. start-placeholder="开始日期"
  1257. end-placeholder="结束日期"
  1258. :default-time="['00:00:00', '23:59:59']"
  1259. ></el-date-picker>
  1260. </el-form-item>
  1261. </el-col>
  1262. <el-col :span="8" style="width: 320px">
  1263. <el-form-item label="结算方式" prop="fBusinessType">
  1264. <el-select
  1265. v-model="TWareHouseFees.stlTypeid"
  1266. filterable
  1267. remote
  1268. size="small"
  1269. style="width: 160px"
  1270. placeholder="选择结算方式"
  1271. clearable
  1272. >
  1273. <el-option
  1274. v-for="(item, index) in fStltypeOptions"
  1275. :key="index.dictValue"
  1276. :label="item.dictLabel"
  1277. :value="item.dictValue"
  1278. >
  1279. </el-option>
  1280. </el-select>
  1281. </el-form-item>
  1282. </el-col>
  1283. </el-row>
  1284. <div style="margin-right: 20px; float: right">
  1285. <el-button type="cyan" size="mini" @click="searchFee(typevalue)"
  1286. >搜索</el-button
  1287. >
  1288. <el-button type="info" size="mini" @click="resetQuery_s"
  1289. >重置</el-button
  1290. >
  1291. <el-button
  1292. icon="el-icon-setting"
  1293. size="mini"
  1294. circle
  1295. @click="showSetting3 = !showSetting3"
  1296. v-if="typevalue != 2"
  1297. ></el-button>
  1298. <el-button
  1299. icon="el-icon-setting"
  1300. size="mini"
  1301. circle
  1302. @click="showSetting5 = !showSetting5"
  1303. v-if="typevalue == 2"
  1304. ></el-button>
  1305. </div>
  1306. <el-dialog
  1307. title="自定义列显示"
  1308. :visible.sync="showSetting3"
  1309. width="700px"
  1310. v-dialogDrag
  1311. append-to-body
  1312. >
  1313. <template slot="title">
  1314. <div class="avue-crud__dialog__header">
  1315. <span class="el-dialog__title">
  1316. <span
  1317. style="
  1318. display: inline-block;
  1319. width: 3px;
  1320. height: 20px;
  1321. margin-right: 5px;
  1322. float: left;
  1323. margin-top: 2px;
  1324. "
  1325. ></span>
  1326. </span>
  1327. </div>
  1328. </template>
  1329. <div>配置排序列数据(拖动调整顺序)</div>
  1330. <div style="margin-left: 17px">
  1331. <el-checkbox
  1332. v-model="allCheck3"
  1333. label="全选"
  1334. @change="allChecked3"
  1335. ></el-checkbox>
  1336. </div>
  1337. <div style="padding: 4px; display: flex; justify-content: center">
  1338. <draggable
  1339. v-model="setRowList3"
  1340. group="site"
  1341. animation="300"
  1342. @start="onStart"
  1343. @end="onEnd"
  1344. handle=".indraggable"
  1345. >
  1346. <transition-group>
  1347. <div
  1348. v-for="item in setRowList3"
  1349. :key="item.surface"
  1350. class="listStyle"
  1351. >
  1352. <div style="width: 500px" class="indraggable">
  1353. <div
  1354. class="progress"
  1355. :style="{ width: item.width + 'px' }"
  1356. >
  1357. <el-checkbox
  1358. :label="item.name"
  1359. v-model="item.checked"
  1360. :true-label="0"
  1361. :false-label="1"
  1362. >{{ item.name }}
  1363. </el-checkbox>
  1364. </div>
  1365. </div>
  1366. <el-input-number
  1367. v-model.number="item.width"
  1368. controls-position="right"
  1369. :min="1"
  1370. :max="500"
  1371. size="mini"
  1372. ></el-input-number>
  1373. </div>
  1374. </transition-group>
  1375. </draggable>
  1376. </div>
  1377. <span slot="footer" class="dialog-footer">
  1378. <el-button @click="showSetting3 = false">取 消</el-button>
  1379. <el-button @click="delRow3" type="danger">重 置</el-button>
  1380. <el-button type="primary" @click="save3()">确 定</el-button>
  1381. </span>
  1382. </el-dialog>
  1383. <el-table
  1384. v-loading="loading"
  1385. :data="feeList"
  1386. ref="feeList"
  1387. show-summary
  1388. :summary-method="getSum"
  1389. @selection-change="handleSelectionChange_s"
  1390. v-if="typevalue != 2"
  1391. >
  1392. <el-table-column type="selection" width="55" align="center" />
  1393. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  1394. <el-table-column label="行号" align="center" type="index" />
  1395. <el-table-column
  1396. v-for="(item, index) in getRowList3"
  1397. :key="index"
  1398. :label="item.name"
  1399. :width="item.width"
  1400. :prop="item.label"
  1401. align="center"
  1402. :fixed="item.fixed"
  1403. :show-overflow-tooltip="true"
  1404. sortable
  1405. >
  1406. <template slot-scope="scope">
  1407. <span v-if="item.label == 'fName'">{{
  1408. scope.row.fName
  1409. }}</span>
  1410. <span v-if="item.label == 'fFeesName'">{{
  1411. scope.row.fFeesName
  1412. }}</span>
  1413. <span v-if="item.label == 'fMblno'">{{
  1414. scope.row.fMblno
  1415. }}</span>
  1416. <span v-if="item.label == 'fProductName'">{{
  1417. scope.row.fProductName
  1418. }}</span>
  1419. <span v-if="item.label == 'fBsdate'">{{
  1420. scope.row.fBsdate
  1421. ? scope.row.fBsdate.slice(0, 10)
  1422. : scope.row.fReviewDate
  1423. }}</span>
  1424. <span v-if="item.label == 'fBilltype'">
  1425. <template>
  1426. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  1427. <span v-else-if="scope.row.fBilltype == 'SJCK'"
  1428. >出库</span
  1429. >
  1430. <span v-else-if="scope.row.fBilltype == 'CKDB'"
  1431. >调拨</span
  1432. >
  1433. <span v-else-if="scope.row.fBilltype == 'HQZY'"
  1434. >货权转移</span
  1435. >
  1436. <span v-else-if="scope.row.fBilltype == 'JSCCF'"
  1437. >仓储费</span
  1438. >
  1439. <span v-else-if="scope.row.fBilltype == '1000'"
  1440. >计划下达</span
  1441. >
  1442. <span v-else-if="scope.row.fBilltype == '1010'"
  1443. >业务调度</span
  1444. >
  1445. <span v-else-if="scope.row.fBilltype == '1020'"
  1446. >车队派车</span
  1447. >
  1448. <span v-else-if="scope.row.fBilltype == '1030'"
  1449. >司机接单</span
  1450. >
  1451. <span v-else-if="scope.row.fBilltype == '1080'"
  1452. >司机出车</span
  1453. >
  1454. <span v-else-if="scope.row.fBilltype == '1040'"
  1455. >司机提箱</span
  1456. >
  1457. <span v-else-if="scope.row.fBilltype == '1050'"
  1458. >司机装卸柜</span
  1459. >
  1460. <span v-else-if="scope.row.fBilltype == '1060'"
  1461. >司机还卸柜</span
  1462. >
  1463. <span v-else-if="scope.row.fBilltype == '1070'"
  1464. >司机回单</span
  1465. >
  1466. <span v-else-if="scope.row.fBilltype == '1090'"
  1467. >费用补充</span
  1468. >
  1469. <span v-else-if="scope.row.fBilltype == 'KHDD'"
  1470. >凯和订单</span
  1471. >
  1472. </template>
  1473. </span>
  1474. <span v-if="item.label == 'fBusinessType'">{{
  1475. scope.row.fBusinessType
  1476. }}</span>
  1477. <span v-if="item.label == 'fReviewDate'">{{
  1478. scope.row.fReviewDate
  1479. }}</span>
  1480. <span v-if="item.label == 'fAmtdr'">{{
  1481. scope.row.fAmtdr
  1482. }}</span>
  1483. <el-input
  1484. v-model="scope.row.fAmt"
  1485. v-if="item.label == 'fAmt'"
  1486. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1487. @change="imgChangeI(scope.row)"
  1488. />
  1489. <span v-if="item.label == 'fFeeName'">{{
  1490. scope.row.fFeeName
  1491. }}</span>
  1492. <el-input
  1493. v-model="scope.row.fRemarks"
  1494. v-if="item.label == 'fRemarks'"
  1495. />
  1496. </template>
  1497. </el-table-column>
  1498. <!-- <el-table-column-->
  1499. <!-- label="货权方"-->
  1500. <!-- align="center"-->
  1501. <!-- prop="fName"-->
  1502. <!-- width="200px"-->
  1503. <!-- />-->
  1504. <!-- <el-table-column-->
  1505. <!-- label="结算单位"-->
  1506. <!-- align="center"-->
  1507. <!-- prop="fFeesName"-->
  1508. <!-- width="200px"-->
  1509. <!-- />-->
  1510. <!-- &lt;!&ndash; <el-table-column label="账单日期" align="center" prop="fAccbilldate"/> &ndash;&gt;-->
  1511. <!-- <el-table-column label="提单号" align="center" prop="fMblno" />-->
  1512. <!-- <el-table-column v-if="typevalue == 1 || typevalue == 2" label="品名" align="center" prop="fProductName" />-->
  1513. <!-- <el-table-column v-if="typevalue == 1 || typevalue == 2" label="业务日期" align="center">-->
  1514. <!-- <template slot-scope="scope" v-if="scope.row.fBsdate">-->
  1515. <!-- <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>-->
  1516. <!-- </template>-->
  1517. <!-- </el-table-column>-->
  1518. <!-- <el-table-column v-if="typevalue == 1 || typevalue == 2" label="业务类型" align="center" prop="fBilltype">-->
  1519. <!-- <template slot-scope="scope">-->
  1520. <!-- <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>-->
  1521. <!-- <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>-->
  1522. <!-- <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>-->
  1523. <!-- <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>-->
  1524. <!-- <span v-else-if="scope.row.fBilltype == 'JSCCF'">仓储费</span>-->
  1525. <!-- <span v-else-if="scope.row.fBilltype == '1000'">计划下达</span>-->
  1526. <!-- <span v-else-if="scope.row.fBilltype == '1010'">业务调度</span>-->
  1527. <!-- <span v-else-if="scope.row.fBilltype == '1020'">车队派车</span>-->
  1528. <!-- <span v-else-if="scope.row.fBilltype == '1030'">司机接单</span>-->
  1529. <!-- <span v-else-if="scope.row.fBilltype == '1080'">司机出车</span>-->
  1530. <!-- <span v-else-if="scope.row.fBilltype == '1040'">司机提箱</span>-->
  1531. <!-- <span v-else-if="scope.row.fBilltype == '1050'"-->
  1532. <!-- >司机装卸柜</span-->
  1533. <!-- >-->
  1534. <!-- <span v-else-if="scope.row.fBilltype == '1060'"-->
  1535. <!-- >司机还卸柜</span-->
  1536. <!-- >-->
  1537. <!-- <span v-else-if="scope.row.fBilltype == '1070'">司机回单</span>-->
  1538. <!-- <span v-else-if="scope.row.fBilltype == '1090'">费用补充</span>-->
  1539. <!-- </template>-->
  1540. <!-- </el-table-column>-->
  1541. <!-- <el-table-column-->
  1542. <!-- label="作业类型"-->
  1543. <!-- align="center"-->
  1544. <!-- prop="fBusinessType"-->
  1545. <!-- />-->
  1546. <!-- &lt;!&ndash; <el-table-column label="单据类型" align="center" prop="fBilltype" />&ndash;&gt;-->
  1547. <!-- <el-table-column-->
  1548. <!-- label="审核日期"-->
  1549. <!-- align="center"-->
  1550. <!-- prop="fReviewDate"-->
  1551. <!-- />-->
  1552. <!-- <el-table-column label="金额" align="center" prop="fAmtdr" />-->
  1553. <!-- <el-table-column-->
  1554. <!-- label="本次金额"-->
  1555. <!-- align="center"-->
  1556. <!-- prop="fAmt"-->
  1557. <!-- width="100"-->
  1558. <!-- >-->
  1559. <!-- <template slot-scope="scope">-->
  1560. <!-- <el-input-->
  1561. <!-- v-model="scope.row.fAmt"-->
  1562. <!-- placeholder="请输入本次金额"-->
  1563. <!-- clearable-->
  1564. <!-- size="small"-->
  1565. <!-- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
  1566. <!-- @change="imgChangeI(scope.row)"-->
  1567. <!-- />-->
  1568. <!-- </template>-->
  1569. <!-- </el-table-column>-->
  1570. <!-- <el-table-column label="费用名称" align="center" prop="fFeeName" />-->
  1571. <!-- <el-table-column label="备注" align="center" prop="fRemarks">-->
  1572. <!-- <template slot-scope="scope">-->
  1573. <!-- <el-input-->
  1574. <!-- v-model="scope.row.fRemarks"-->
  1575. <!-- placeholder="请输入备注"-->
  1576. <!-- clearable-->
  1577. <!-- size="small"-->
  1578. <!-- width="100"-->
  1579. <!-- />-->
  1580. <!-- </template>-->
  1581. <!-- </el-table-column>-->
  1582. </el-table>
  1583. <el-dialog
  1584. title="自定义列显示"
  1585. :visible.sync="showSetting5"
  1586. width="700px"
  1587. v-dialogDrag
  1588. append-to-body
  1589. >
  1590. <template slot="title">
  1591. <div class="avue-crud__dialog__header">
  1592. <span class="el-dialog__title">
  1593. <span
  1594. style="
  1595. display: inline-block;
  1596. width: 3px;
  1597. height: 20px;
  1598. margin-right: 5px;
  1599. float: left;
  1600. margin-top: 2px;
  1601. "
  1602. ></span>
  1603. </span>
  1604. </div>
  1605. </template>
  1606. <div>配置排序列数据(拖动调整顺序)</div>
  1607. <div style="margin-left: 17px">
  1608. <el-checkbox
  1609. v-model="allCheck5"
  1610. label="全选"
  1611. @change="allChecked5"
  1612. ></el-checkbox>
  1613. </div>
  1614. <div style="padding: 4px; display: flex; justify-content: center">
  1615. <draggable
  1616. v-model="setRowList5"
  1617. group="site"
  1618. animation="300"
  1619. @start="onStart"
  1620. @end="onEnd"
  1621. handle=".indraggable"
  1622. >
  1623. <transition-group>
  1624. <div
  1625. v-for="item in setRowList5"
  1626. :key="item.surface"
  1627. class="listStyle"
  1628. >
  1629. <div style="width: 500px" class="indraggable">
  1630. <div
  1631. class="progress"
  1632. :style="{ width: item.width + 'px' }"
  1633. >
  1634. <el-checkbox
  1635. :label="item.name"
  1636. v-model="item.checked"
  1637. :true-label="0"
  1638. :false-label="1"
  1639. >{{ item.name }}
  1640. </el-checkbox>
  1641. </div>
  1642. </div>
  1643. <el-input-number
  1644. v-model.number="item.width"
  1645. controls-position="right"
  1646. :min="1"
  1647. :max="500"
  1648. size="mini"
  1649. ></el-input-number>
  1650. </div>
  1651. </transition-group>
  1652. </draggable>
  1653. </div>
  1654. <span slot="footer" class="dialog-footer">
  1655. <el-button @click="showSetting5 = false">取 消</el-button>
  1656. <el-button @click="delRow5" type="danger">重 置</el-button>
  1657. <el-button type="primary" @click="save5()">确 定</el-button>
  1658. </span>
  1659. </el-dialog>
  1660. <el-table
  1661. v-loading="loading"
  1662. :data="feeList"
  1663. ref="feeList"
  1664. show-summary
  1665. :summary-method="getSum"
  1666. @selection-change="handleSelectionChange_s"
  1667. v-if="typevalue == 2"
  1668. >
  1669. <el-table-column type="selection" width="55" align="center" />
  1670. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  1671. <el-table-column label="行号" align="center" type="index" />
  1672. <el-table-column
  1673. v-for="(item, index) in getRowList5"
  1674. :key="index"
  1675. :label="item.name"
  1676. :width="item.width"
  1677. :prop="item.label"
  1678. align="center"
  1679. :fixed="item.fixed"
  1680. :show-overflow-tooltip="true"
  1681. sortable
  1682. >
  1683. <template slot-scope="scope">
  1684. <span v-if="item.label == 'fAmt'">
  1685. <el-input
  1686. v-model="scope.row.fAmt"
  1687. v-input-limit="2"
  1688. @change="changeAmt(scope.row.fAmt, scope.$index)"
  1689. />
  1690. </span>
  1691. <span v-else>{{ scope.row[item.label] }}</span>
  1692. </template>
  1693. </el-table-column>
  1694. </el-table>
  1695. </el-form>
  1696. <div slot="footer" class="dialog-footer">
  1697. <el-button
  1698. type="primary"
  1699. @click="confirmImport"
  1700. v-if="typevalue != 2"
  1701. >确 定</el-button
  1702. >
  1703. <el-button
  1704. type="primary"
  1705. @click="confirmImport2"
  1706. v-if="typevalue == 2"
  1707. >确 定</el-button
  1708. >
  1709. <el-button @click="signOut">取 消</el-button>
  1710. </div>
  1711. </el-dialog>
  1712. </div>
  1713. </div>
  1714. </div>
  1715. </template>
  1716. <script>
  1717. import {
  1718. RevocationApproval,
  1719. backFee,
  1720. detailFee,
  1721. Cfee,
  1722. listFee,
  1723. getFee,
  1724. delFee,
  1725. addFee,
  1726. updateFee,
  1727. exportFee,
  1728. importFee,
  1729. importFleet,
  1730. addFleet,
  1731. listFleet,
  1732. getFleet,
  1733. delFleet,
  1734. detailFleet,
  1735. confirmFleet,
  1736. listCorps,
  1737. exporItems,
  1738. contrastExport,
  1739. exportWarehousebillsitems
  1740. } from "@/api/finance/contrast";
  1741. // import { listCorps } from "@/api/basicdata/corps";
  1742. import { listFees } from "@/api/basicdata/fees";
  1743. import AddOrUpdate from "@/views/viewApproval";
  1744. import { queryUserVal } from "@/api/warehouseBusiness/agreement";
  1745. import moment from "moment";
  1746. import print from "print-js";
  1747. import ApprovalComments from "@/views/startApproval";
  1748. import Global from "@/layout/components/global";
  1749. import Cookies from "js-cookie";
  1750. import { addSet, select, resetModule } from "@/api/system/set";
  1751. import draggable from "vuedraggable";
  1752. import Vue from "vue";
  1753. import { MessageBox } from "element-ui";
  1754. import kaiheIndex from "./kaihe-index.vue";
  1755. Vue.directive("dialogDrag", {
  1756. bind(el, binding, vnode, oldVnode) {
  1757. const dialogHeaderEl = el.querySelector(".el-dialog__header");
  1758. const dragDom = el.querySelector(".el-dialog");
  1759. const enlarge = el.querySelector(".enlarge");
  1760. dialogHeaderEl.style.cursor = "move";
  1761. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  1762. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
  1763. if (enlarge) {
  1764. enlarge.onclick = (e) => {
  1765. dragDom.style.top = "0px";
  1766. dragDom.style.left = "0px";
  1767. };
  1768. }
  1769. dialogHeaderEl.onmousedown = (e) => {
  1770. // 鼠标按下,计算当前元素距离可视区的距离
  1771. const disX = e.clientX - dialogHeaderEl.offsetLeft;
  1772. const disY = e.clientY - dialogHeaderEl.offsetTop;
  1773. // 获取到的值带px 正则匹配替换
  1774. let styL, styT;
  1775. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  1776. if (sty.left.includes("%")) {
  1777. styL =
  1778. +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
  1779. styT =
  1780. +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
  1781. } else {
  1782. styL = +sty.left.replace(/\px/g, "");
  1783. styT = +sty.top.replace(/\px/g, "");
  1784. }
  1785. document.onmousemove = function (e) {
  1786. // 通过事件委托,计算移动的距离
  1787. const l = e.clientX - disX;
  1788. const t = e.clientY - disY;
  1789. // 移动当前元素
  1790. if (t + styT >= 0) {
  1791. dragDom.style.top = `${t + styT}px`;
  1792. }
  1793. dragDom.style.left = `${l + styL}px`;
  1794. // 将此时的位置传出去
  1795. // binding.value({x:e.pageX,y:e.pageY})
  1796. };
  1797. document.onmouseup = function (e) {
  1798. document.onmousemove = null;
  1799. document.onmouseup = null;
  1800. };
  1801. };
  1802. },
  1803. });
  1804. export default {
  1805. name: "Fee",
  1806. data() {
  1807. return {
  1808. login: Cookies.get("sysType"),
  1809. show: false,
  1810. mainTable: false,
  1811. //全屏放大
  1812. dialogFull: false,
  1813. drag: false,
  1814. typeoptions: [
  1815. {
  1816. value: "1",
  1817. label: "仓储",
  1818. },
  1819. {
  1820. value: "2",
  1821. label: "车队",
  1822. },
  1823. {
  1824. value: "3",
  1825. label: "船务",
  1826. },
  1827. ],
  1828. typevalue: "",
  1829. tableDate: [
  1830. {
  1831. surface: "1",
  1832. label: "fBillno",
  1833. name: "系统编号",
  1834. checked: 0,
  1835. width: 100,
  1836. },
  1837. // {
  1838. // surface: "2",
  1839. // label: "fCtrlcorpid",
  1840. // name: "货权方",
  1841. // checked: 0,
  1842. // width: 100,
  1843. // },
  1844. {
  1845. surface: "3",
  1846. label: "fCorpidName",
  1847. name: "结算单位",
  1848. checked: 0,
  1849. width: 100,
  1850. },
  1851. {
  1852. surface: "4",
  1853. label: "fAccbilldate",
  1854. name: "对账日期",
  1855. checked: 0,
  1856. width: 100,
  1857. },
  1858. {
  1859. surface: "5",
  1860. label: "tMblno",
  1861. name: "提单号",
  1862. checked: 0,
  1863. width: 100,
  1864. },
  1865. {
  1866. surface: "6",
  1867. label: "fAmtdr",
  1868. name: "金额",
  1869. checked: 0,
  1870. width: 100,
  1871. },
  1872. {
  1873. surface: "7",
  1874. label: "fAmtcr",
  1875. name: "对账金额",
  1876. checked: 0,
  1877. width: 100,
  1878. },
  1879. {
  1880. surface: "8",
  1881. label: "fRemarks",
  1882. name: "备注",
  1883. checked: 0,
  1884. width: 100,
  1885. },
  1886. {
  1887. surface: "9",
  1888. label: "fBillstatus",
  1889. name: "状态",
  1890. checked: 0,
  1891. width: 100,
  1892. },
  1893. ],
  1894. tableDate2: [
  1895. {
  1896. surface: "1",
  1897. label: "fMblno",
  1898. name: "提单号",
  1899. checked: 0,
  1900. width: 100,
  1901. },
  1902. {
  1903. surface: "2",
  1904. label: "fBsdate",
  1905. name: "业务日期",
  1906. checked: 0,
  1907. width: 100,
  1908. },
  1909. {
  1910. surface: "3",
  1911. label: "fFeeName",
  1912. name: "费用名称",
  1913. checked: 0,
  1914. width: 100,
  1915. },
  1916. {
  1917. surface: "4",
  1918. label: "fSrcdcName",
  1919. name: "收/付",
  1920. checked: 0,
  1921. width: 100,
  1922. },
  1923. {
  1924. surface: "5",
  1925. label: "fAmtdr",
  1926. name: "金额",
  1927. checked: 0,
  1928. width: 100,
  1929. },
  1930. {
  1931. surface: "6",
  1932. label: "fFeeunitid",
  1933. name: "计价单位",
  1934. checked: 0,
  1935. width: 100,
  1936. },
  1937. {
  1938. surface: "7",
  1939. label: "fQty",
  1940. name: "数量",
  1941. checked: 0,
  1942. width: 100,
  1943. },
  1944. {
  1945. surface: "8",
  1946. label: "fUnitprice",
  1947. name: "单价",
  1948. checked: 0,
  1949. width: 100,
  1950. },
  1951. {
  1952. surface: "9",
  1953. label: "fAmt",
  1954. name: "本次金额",
  1955. checked: 0,
  1956. width: 100,
  1957. },
  1958. {
  1959. surface: "10",
  1960. label: "fBusinessType",
  1961. name: "作业类型",
  1962. checked: 0,
  1963. width: 100,
  1964. },
  1965. {
  1966. surface: "11",
  1967. label: "fBilltype",
  1968. name: "业务类型",
  1969. checked: 0,
  1970. width: 100,
  1971. },
  1972. {
  1973. surface: "12",
  1974. label: "srcBillNo",
  1975. name: "来源编号",
  1976. checked: 0,
  1977. width: 100,
  1978. },
  1979. {
  1980. surface: "13",
  1981. label: "fProductName",
  1982. name: "货物品名",
  1983. checked: 0,
  1984. width: 100,
  1985. },
  1986. {
  1987. surface: "14",
  1988. label: "fMarks",
  1989. name: "品牌",
  1990. checked: 0,
  1991. width: 100,
  1992. },
  1993. {
  1994. surface: "15",
  1995. label: "fChargedate",
  1996. name: "计费起始日期",
  1997. checked: 0,
  1998. width: 100,
  1999. },
  2000. {
  2001. surface: "16",
  2002. label: "fBillingDeadline",
  2003. name: "计费截止日期",
  2004. checked: 0,
  2005. width: 100,
  2006. },
  2007. {
  2008. surface: "17",
  2009. label: "fBillingDays",
  2010. name: "计费天数",
  2011. checked: 0,
  2012. width: 100,
  2013. },
  2014. {
  2015. surface: "18",
  2016. label: "fInventoryDays",
  2017. name: "库存天数",
  2018. checked: 0,
  2019. width: 100,
  2020. },
  2021. {
  2022. surface: "19",
  2023. label: "fRemarks",
  2024. name: "备注",
  2025. checked: 0,
  2026. width: 100,
  2027. },
  2028. {
  2029. surface: "20",
  2030. label: "carLoadDate",
  2031. name: "提箱日期",
  2032. checked: 0,
  2033. width: 100,
  2034. },
  2035. ],
  2036. tableDate3: [
  2037. // {
  2038. // surface: "1",
  2039. // label: "fName",
  2040. // name: "货权方",
  2041. // checked: 0,
  2042. // width: 100,
  2043. // },
  2044. {
  2045. surface: "2",
  2046. label: "fFeesName",
  2047. name: "结算单位",
  2048. checked: 0,
  2049. width: 100,
  2050. },
  2051. {
  2052. surface: "3",
  2053. label: "fMblno",
  2054. name: "提单号",
  2055. checked: 0,
  2056. width: 100,
  2057. },
  2058. {
  2059. surface: "4",
  2060. label: "fProductName",
  2061. name: "品名",
  2062. checked: 0,
  2063. width: 100,
  2064. },
  2065. {
  2066. surface: "5",
  2067. label: "fBsdate",
  2068. name: "业务日期",
  2069. checked: 0,
  2070. width: 100,
  2071. },
  2072. {
  2073. surface: "6",
  2074. label: "fBilltype",
  2075. name: "业务类型",
  2076. checked: 0,
  2077. width: 100,
  2078. },
  2079. {
  2080. surface: "7",
  2081. label: "fBusinessType",
  2082. name: "作业类型",
  2083. checked: 0,
  2084. width: 100,
  2085. },
  2086. {
  2087. surface: "8",
  2088. label: "fReviewDate",
  2089. name: "审核日期",
  2090. checked: 0,
  2091. width: 100,
  2092. },
  2093. {
  2094. surface: "9",
  2095. label: "fAmtdr",
  2096. name: "金额",
  2097. checked: 0,
  2098. width: 100,
  2099. },
  2100. {
  2101. surface: "10",
  2102. label: "fAmt",
  2103. name: "本次金额",
  2104. checked: 0,
  2105. width: 100,
  2106. },
  2107. {
  2108. surface: "11",
  2109. label: "fFeeName",
  2110. name: "费用名称",
  2111. checked: 0,
  2112. width: 100,
  2113. },
  2114. {
  2115. surface: "12",
  2116. label: "fRemarks",
  2117. name: "备注",
  2118. checked: 0,
  2119. width: 100,
  2120. },
  2121. ],
  2122. tableDate4: [
  2123. {
  2124. surface: "1",
  2125. label: "fFeesName",
  2126. name: "客户名称",
  2127. checked: 0,
  2128. width: 100,
  2129. },
  2130. {
  2131. surface: "2",
  2132. label: "fMblno",
  2133. name: "提单号",
  2134. checked: 0,
  2135. width: 100,
  2136. },
  2137. {
  2138. surface: "3",
  2139. label: "orderNo",
  2140. name: "运单号",
  2141. checked: 0,
  2142. width: 100,
  2143. },
  2144. {
  2145. surface: "4",
  2146. label: "carregNo",
  2147. name: "车牌号",
  2148. checked: 0,
  2149. width: 100,
  2150. },
  2151. {
  2152. surface: "5",
  2153. label: "billType",
  2154. name: "业务类型",
  2155. checked: 0,
  2156. width: 100,
  2157. },
  2158. {
  2159. surface: "6",
  2160. label: "acceptDate",
  2161. name: "接单日期",
  2162. checked: 0,
  2163. width: 100,
  2164. },
  2165. {
  2166. surface: "7",
  2167. label: "loadAddr",
  2168. name: "提箱地点",
  2169. checked: 0,
  2170. width: 100,
  2171. },
  2172. {
  2173. surface: "8",
  2174. label: "mdLoadAddr",
  2175. name: "卸货地点",
  2176. checked: 0,
  2177. width: 100,
  2178. },
  2179. {
  2180. surface: "9",
  2181. label: "fQty",
  2182. name: "箱量",
  2183. checked: 0,
  2184. width: 100,
  2185. },
  2186. {
  2187. surface: "10",
  2188. label: "cntrId",
  2189. name: "箱型",
  2190. checked: 0,
  2191. width: 100,
  2192. },
  2193. {
  2194. surface: "11",
  2195. label: "driverName",
  2196. name: "司机",
  2197. checked: 0,
  2198. width: 100,
  2199. },
  2200. {
  2201. surface: "12",
  2202. label: "fFeeName",
  2203. name: "费用名称",
  2204. checked: 0,
  2205. width: 100,
  2206. },
  2207. {
  2208. surface: "13",
  2209. label: "fAmtdr",
  2210. name: "费用金额",
  2211. checked: 0,
  2212. width: 100,
  2213. },
  2214. {
  2215. surface: "14",
  2216. label: "fAmt",
  2217. name: "本次金额",
  2218. checked: 0,
  2219. width: 100,
  2220. },
  2221. ],
  2222. tableDate5: [
  2223. {
  2224. surface: "1",
  2225. label: "fFeesName",
  2226. name: "客户名称",
  2227. checked: 0,
  2228. width: 100,
  2229. },
  2230. {
  2231. surface: "2",
  2232. label: "fMblno",
  2233. name: "提单号",
  2234. checked: 0,
  2235. width: 100,
  2236. },
  2237. {
  2238. surface: "3",
  2239. label: "orderNo",
  2240. name: "运单号",
  2241. checked: 0,
  2242. width: 100,
  2243. },
  2244. {
  2245. surface: "4",
  2246. label: "carregNo",
  2247. name: "车牌号",
  2248. checked: 0,
  2249. width: 100,
  2250. },
  2251. {
  2252. surface: "5",
  2253. label: "billType",
  2254. name: "业务类型",
  2255. checked: 0,
  2256. width: 100,
  2257. },
  2258. {
  2259. surface: "6",
  2260. label: "acceptDate",
  2261. name: "接单日期",
  2262. checked: 0,
  2263. width: 100,
  2264. },
  2265. {
  2266. surface: "7",
  2267. label: "loadAddr",
  2268. name: "提箱地点",
  2269. checked: 0,
  2270. width: 100,
  2271. },
  2272. {
  2273. surface: "8",
  2274. label: "mdLoadAddr",
  2275. name: "卸货地点",
  2276. checked: 0,
  2277. width: 100,
  2278. },
  2279. {
  2280. surface: "9",
  2281. label: "fQty",
  2282. name: "箱量",
  2283. checked: 0,
  2284. width: 100,
  2285. },
  2286. {
  2287. surface: "10",
  2288. label: "cntrId",
  2289. name: "箱型",
  2290. checked: 0,
  2291. width: 100,
  2292. },
  2293. {
  2294. surface: "11",
  2295. label: "driverName",
  2296. name: "司机",
  2297. checked: 0,
  2298. width: 100,
  2299. },
  2300. {
  2301. surface: "12",
  2302. label: "fFeeName",
  2303. name: "费用名称",
  2304. checked: 0,
  2305. width: 100,
  2306. },
  2307. {
  2308. surface: "13",
  2309. label: "fAmount",
  2310. name: "费用金额",
  2311. checked: 0,
  2312. width: 100,
  2313. },
  2314. {
  2315. surface: "14",
  2316. label: "fAmt",
  2317. name: "本次金额",
  2318. checked: 0,
  2319. width: 100,
  2320. },
  2321. ],
  2322. tableDate6: [
  2323. {
  2324. surface: "1",
  2325. label: "fBillno",
  2326. name: "系统编号",
  2327. checked: 0,
  2328. width: 100,
  2329. },
  2330. {
  2331. surface: "2",
  2332. label: "fCorpidName",
  2333. name: "对账单位",
  2334. checked: 0,
  2335. width: 100,
  2336. },
  2337. {
  2338. surface: "3",
  2339. label: "amt",
  2340. name: "金额",
  2341. checked: 0,
  2342. width: 100,
  2343. },
  2344. {
  2345. surface: "4",
  2346. label: "createBy",
  2347. name: "制单人",
  2348. checked: 0,
  2349. width: 100,
  2350. },
  2351. {
  2352. surface: "5",
  2353. label: "fAccbilldate",
  2354. name: "对账日期",
  2355. checked: 0,
  2356. width: 100,
  2357. },
  2358. {
  2359. surface: "6",
  2360. label: "createTime",
  2361. name: "制单日期",
  2362. checked: 0,
  2363. width: 100,
  2364. },
  2365. {
  2366. surface: "7",
  2367. label: "fBillstatus",
  2368. name: "状态",
  2369. checked: 0,
  2370. width: 100,
  2371. },
  2372. {
  2373. surface: "8",
  2374. label: "fRemarks",
  2375. name: "备注",
  2376. checked: 0,
  2377. width: 100,
  2378. },
  2379. ],
  2380. setRowList: [],
  2381. getRowList: [],
  2382. allCheck: false,
  2383. showSetting: false,
  2384. setRowList2: [],
  2385. getRowList2: [],
  2386. allCheck2: false,
  2387. showSetting2: false,
  2388. setRowList3: [],
  2389. getRowList3: [],
  2390. allCheck3: false,
  2391. showSetting3: false,
  2392. setRowList4: [],
  2393. getRowList4: [],
  2394. allCheck4: false,
  2395. showSetting4: false,
  2396. setRowList5: [],
  2397. getRowList5: [],
  2398. allCheck5: false,
  2399. showSetting5: false,
  2400. setRowList6: [],
  2401. getRowList6: [],
  2402. allCheck6: false,
  2403. showSetting6: false,
  2404. //控制结算单位是否可操作
  2405. doNot: false,
  2406. jFeetunitOptions: [],
  2407. // 总条数
  2408. total: 0,
  2409. totAL: 0,
  2410. Ttime: 0,
  2411. colseButton: true,
  2412. approval: [],
  2413. disappear: false,
  2414. addIndex: [],
  2415. addOrUpdateVisible: false,
  2416. addOrUpdateVisib: false,
  2417. contrastId: 210,
  2418. // 审批状态
  2419. approve: false,
  2420. // 打印表
  2421. printObject: [],
  2422. //登陆人
  2423. Lander: "",
  2424. openPrint: false,
  2425. statrGo: true,
  2426. state_s: true,
  2427. notChange: false,
  2428. browseStatus: false,
  2429. options: "",
  2430. dateRange: "",
  2431. // 遮罩层
  2432. loading: true,
  2433. fAccbilldate: "",
  2434. // 选中数组
  2435. ids: [],
  2436. // 非单个禁用
  2437. single: true,
  2438. // 非多个禁用
  2439. multiple: true,
  2440. // 显示搜索条件
  2441. showSearch: true,
  2442. // 财务数据主表格数据
  2443. feeList: [],
  2444. // 客户(客户数据)
  2445. fMblnoOptions: [],
  2446. fFeeunitidOptions: [],
  2447. fWbuOptions: [],
  2448. KHblnoOptions: [],
  2449. //打开内部弹窗
  2450. innerVisible: false,
  2451. selection: "",
  2452. // 弹出层标题
  2453. title: "",
  2454. // 操作人
  2455. Operator: "",
  2456. // 是否显示弹出层
  2457. open: false,
  2458. dialogVisible: false,
  2459. // 财务对账表格
  2460. DzfeeList: [],
  2461. // 财务主页面表格
  2462. contrastList: [],
  2463. empty: [],
  2464. nothing: [],
  2465. Fee: [],
  2466. //导入从表传主表
  2467. pass: {
  2468. fAmtdr: "", //应收合计
  2469. fAmtcr: "", //应付合计
  2470. fMblno: "", //提单号
  2471. fName: "", //货权方
  2472. fFeesName: "", //结算单位
  2473. fCorpid: "", //结算单位ID
  2474. },
  2475. hide: false,
  2476. cancelButton: true,
  2477. businessTypeOption: [],
  2478. // 传值对象
  2479. TWareHouseFees: {
  2480. fCorpid: "",
  2481. fToCorpid: "",
  2482. fMblno: "",
  2483. fStatementNo: "",
  2484. fFeeid: "",
  2485. timeExamine: "",
  2486. timeInterval: "",
  2487. fDc: "D",
  2488. fReconciliation: "0",
  2489. timeReconci: "",
  2490. fBusinessType: "",
  2491. fBilltype: "SJRK",
  2492. },
  2493. // 查询参数
  2494. queryParams: {
  2495. pageNum: 1,
  2496. pageSize: 10,
  2497. fBillno: null,
  2498. fCtrlcorpid: null,
  2499. fCorpid: null,
  2500. tMblno: null,
  2501. fAmtdr: null,
  2502. fAmtcr: null,
  2503. fId: null,
  2504. fBilltype: null,
  2505. fBillstatus: null,
  2506. fRemarks: null,
  2507. fAccbilldate: null,
  2508. fDeptid: null,
  2509. createBy: null,
  2510. timeReconci: null,
  2511. fSystemType: Cookies.get("sysType"),
  2512. },
  2513. // 主表查询参数
  2514. tablefilter: {
  2515. pageNum: 1,
  2516. pageSize: 10,
  2517. fCtrlcorpid: null,
  2518. fCorpid: null,
  2519. fBillstatus: null,
  2520. fBillno: null,
  2521. amount: [],
  2522. firstMoney: null,
  2523. lastMoney: null,
  2524. fRemarks: null,
  2525. timeInterval: null,
  2526. },
  2527. // 表单参数
  2528. form: {},
  2529. // 表单校验
  2530. ruless: {
  2531. fCtrlcorpid: [{ required: true, message: " ", trigger: "blur" }],
  2532. fCorpid: [{ required: true, message: " ", trigger: "blur" }],
  2533. fAccbilldate: [{ required: true, message: " ", trigger: "blur" }],
  2534. },
  2535. feeListRules: {
  2536. fDc: [{ required: true, message: " ", trigger: "blur" }],
  2537. fToCorpid: [{ required: true, message: " ", trigger: "blur" }],
  2538. fReconciliation: [{ required: true, message: " ", trigger: "blur" }],
  2539. timeExamine: [{ required: true, message: " ", trigger: "blur" }],
  2540. },
  2541. fStltypeOptions: [],
  2542. };
  2543. },
  2544. components: {
  2545. draggable,
  2546. AddOrUpdate,
  2547. ApprovalComments,
  2548. kaiheIndex,
  2549. },
  2550. created() {
  2551. this.setRowList = this.tableDate;
  2552. this.getRowList = this.tableDate;
  2553. this.setRowList2 = this.tableDate2;
  2554. this.getRowList2 = this.tableDate2;
  2555. this.setRowList3 = this.tableDate3;
  2556. this.getRowList3 = this.tableDate3;
  2557. this.setRowList4 = this.tableDate4;
  2558. this.getRowList4 = this.tableDate4;
  2559. this.setRowList5 = this.tableDate5;
  2560. this.getRowList5 = this.tableDate5;
  2561. this.setRowList6 = this.tableDate6;
  2562. this.getRowList6 = this.tableDate6;
  2563. this.typevalue = Cookies.get("sysType");
  2564. this.getList();
  2565. this.register();
  2566. this.getDicts("data_unitfees").then((response) => {
  2567. this.jFeetunitOptions = response.data;
  2568. });
  2569. this.getDicts("st_in_type").then((response) => {
  2570. this.businessTypeOption = response.data;
  2571. });
  2572. this.getDicts("data_stltype_type").then((response) => {
  2573. this.fStltypeOptions = response.data;
  2574. });
  2575. this.getRow();
  2576. this.getRow2();
  2577. this.getRow3();
  2578. this.getRow4();
  2579. this.getRow5();
  2580. this.getRow6();
  2581. this.corpsRemoteMethod();
  2582. },
  2583. activated() {
  2584. if (this.$route.query.data) {
  2585. let data = JSON.parse(this.$route.query.data);
  2586. if (data.key === 1) {
  2587. this.handleAdd();
  2588. } else {
  2589. this.Jump();
  2590. }
  2591. }
  2592. },
  2593. methods: {
  2594. changeMoney() {
  2595. if (
  2596. parseInt(this.tablefilter.lastMoney) <
  2597. parseInt(this.tablefilter.firstMoney)
  2598. ) {
  2599. this.$message.error("第二个金额不能小于第一个金额,请重新输入");
  2600. this.tablefilter.lastMoney = "";
  2601. }
  2602. },
  2603. addPage() {
  2604. MessageBox.confirm("是否已保存?", {
  2605. confirmButtonText: "确定",
  2606. cancelButtonText: "取消",
  2607. type: "warning",
  2608. }).then(() => {
  2609. this.handleAdd();
  2610. });
  2611. },
  2612. full() {
  2613. this.dialogFull = !this.dialogFull;
  2614. },
  2615. //列设置全选
  2616. allChecked() {
  2617. if (this.allCheck == true) {
  2618. this.setRowList.map((e) => {
  2619. return (e.checked = 0);
  2620. });
  2621. } else {
  2622. this.setRowList.map((e) => {
  2623. return (e.checked = 1);
  2624. });
  2625. }
  2626. },
  2627. //查询列数据
  2628. getRow() {
  2629. let that = this;
  2630. this.data = {
  2631. tableName: "对账列表页",
  2632. userId: Cookies.get("userName"),
  2633. };
  2634. select(this.data).then((res) => {
  2635. if (res.data.length != 0) {
  2636. this.getRowList = res.data.filter((e) => e.checked == 0);
  2637. this.setRowList = res.data;
  2638. this.setRowList = this.setRowList.reduce((res, item) => {
  2639. res.push({
  2640. surface: item.surface,
  2641. label: item.label,
  2642. name: item.name,
  2643. checked: item.checked,
  2644. width: item.width,
  2645. fixed: item.fixed,
  2646. });
  2647. return res;
  2648. }, []);
  2649. }
  2650. });
  2651. },
  2652. //保存列设置
  2653. save() {
  2654. this.showSetting = false;
  2655. this.data = {
  2656. tableName: "对账列表页",
  2657. userId: Cookies.get("userName"),
  2658. sysTableSetList: this.setRowList,
  2659. };
  2660. addSet(this.data).then((res) => {
  2661. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  2662. });
  2663. },
  2664. //重置列表
  2665. delRow() {
  2666. this.data = {
  2667. tableName: "对账列表页",
  2668. userId: Cookies.get("userName"),
  2669. };
  2670. resetModule(this.data).then((res) => {
  2671. if (res.code == 200) {
  2672. this.showSetting = false;
  2673. this.setRowList = this.getRowList = this.$options.data().tableDate;
  2674. }
  2675. });
  2676. },
  2677. //列设置全选
  2678. allChecked2() {
  2679. if (this.allCheck2 == true) {
  2680. this.setRowList2.map((e) => {
  2681. return (e.checked = 0);
  2682. });
  2683. } else {
  2684. this.setRowList2.map((e) => {
  2685. return (e.checked = 1);
  2686. });
  2687. }
  2688. },
  2689. //查询列数据
  2690. getRow2() {
  2691. let that = this;
  2692. this.data = {
  2693. tableName: "-列表对账明细",
  2694. userId: Cookies.get("userName"),
  2695. };
  2696. select(this.data).then((res) => {
  2697. if (res.data.length != 0) {
  2698. this.getRowList2 = res.data.filter((e) => e.checked == 0);
  2699. this.setRowList2 = res.data;
  2700. this.setRowList2 = this.setRowList2.reduce((res, item) => {
  2701. res.push({
  2702. surface: item.surface,
  2703. label: item.label,
  2704. name: item.name,
  2705. checked: item.checked,
  2706. width: item.width,
  2707. fixed: item.fixed,
  2708. });
  2709. return res;
  2710. }, []);
  2711. }
  2712. });
  2713. },
  2714. //保存列设置
  2715. save2() {
  2716. this.showSetting2 = false;
  2717. this.data = {
  2718. tableName: "-列表对账明细",
  2719. userId: Cookies.get("userName"),
  2720. sysTableSetList: this.setRowList2,
  2721. };
  2722. addSet(this.data).then((res) => {
  2723. this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0);
  2724. });
  2725. },
  2726. //重置列表
  2727. delRow2() {
  2728. this.data = {
  2729. tableName: "-列表对账明细",
  2730. userId: Cookies.get("userName"),
  2731. };
  2732. resetModule(this.data).then((res) => {
  2733. if (res.code == 200) {
  2734. this.showSetting2 = false;
  2735. this.setRowList2 = this.getRowList2 = this.$options.data().tableDate2;
  2736. }
  2737. });
  2738. },
  2739. //列设置全选
  2740. allChecked3() {
  2741. if (this.allCheck3 == true) {
  2742. this.setRowList3.map((e) => {
  2743. return (e.checked = 0);
  2744. });
  2745. } else {
  2746. this.setRowList3.map((e) => {
  2747. return (e.checked = 1);
  2748. });
  2749. }
  2750. },
  2751. //查询列数据
  2752. getRow3() {
  2753. let that = this;
  2754. this.data = {
  2755. tableName: "_弹窗对账明细",
  2756. userId: Cookies.get("userName"),
  2757. };
  2758. select(this.data).then((res) => {
  2759. if (res.data.length != 0) {
  2760. this.getRowList3 = res.data.filter((e) => e.checked == 0);
  2761. this.setRowList3 = res.data;
  2762. this.setRowList3 = this.setRowList3.reduce((res, item) => {
  2763. res.push({
  2764. surface: item.surface,
  2765. label: item.label,
  2766. name: item.name,
  2767. checked: item.checked,
  2768. width: item.width,
  2769. fixed: item.fixed,
  2770. });
  2771. return res;
  2772. }, []);
  2773. }
  2774. });
  2775. },
  2776. //保存列设置
  2777. save3() {
  2778. this.showSetting3 = false;
  2779. this.data = {
  2780. tableName: "_弹窗对账明细",
  2781. userId: Cookies.get("userName"),
  2782. sysTableSetList: this.setRowList3,
  2783. };
  2784. addSet(this.data).then((res) => {
  2785. this.getRowList3 = this.setRowList3.filter((e) => e.checked == 0);
  2786. });
  2787. },
  2788. //重置列表
  2789. delRow3() {
  2790. this.data = {
  2791. tableName: "_弹窗对账明细",
  2792. userId: Cookies.get("userName"),
  2793. };
  2794. resetModule(this.data).then((res) => {
  2795. if (res.code == 200) {
  2796. this.showSetting3 = false;
  2797. this.setRowList3 = this.getRowList3 = this.$options.data().tableDate3;
  2798. }
  2799. });
  2800. },
  2801. //列设置全选
  2802. allChecked4() {
  2803. if (this.allCheck4 == true) {
  2804. this.setRowList4.map((e) => {
  2805. return (e.checked = 0);
  2806. });
  2807. } else {
  2808. this.setRowList4.map((e) => {
  2809. return (e.checked = 1);
  2810. });
  2811. }
  2812. },
  2813. //查询列数据
  2814. getRow4() {
  2815. let that = this;
  2816. this.data = {
  2817. tableName: "车队_列表对账明细",
  2818. userId: Cookies.get("userName"),
  2819. };
  2820. select(this.data).then((res) => {
  2821. if (res.data.length != 0) {
  2822. this.getRowList4 = res.data.filter((e) => e.checked == 0);
  2823. this.setRowList4 = res.data;
  2824. this.setRowList4 = this.setRowList4.reduce((res, item) => {
  2825. res.push({
  2826. surface: item.surface,
  2827. label: item.label,
  2828. name: item.name,
  2829. checked: item.checked,
  2830. width: item.width,
  2831. fixed: item.fixed,
  2832. });
  2833. return res;
  2834. }, []);
  2835. }
  2836. });
  2837. },
  2838. //保存列设置
  2839. save4() {
  2840. this.showSetting4 = false;
  2841. this.data = {
  2842. tableName: "车队_列表对账明细",
  2843. userId: Cookies.get("userName"),
  2844. sysTableSetList: this.setRowList4,
  2845. };
  2846. addSet(this.data).then((res) => {
  2847. this.getRowList4 = this.setRowList4.filter((e) => e.checked == 0);
  2848. });
  2849. },
  2850. //重置列表
  2851. delRow4() {
  2852. this.data = {
  2853. tableName: "车队_列表对账明细",
  2854. userId: Cookies.get("userName"),
  2855. };
  2856. resetModule(this.data).then((res) => {
  2857. if (res.code == 200) {
  2858. this.showSetting4 = false;
  2859. this.setRowList4 = this.getRowList4 = this.$options.data().tableDate4;
  2860. }
  2861. });
  2862. },
  2863. //列设置全选
  2864. allChecked5() {
  2865. if (this.allCheck5 == true) {
  2866. this.setRowList5.map((e) => {
  2867. return (e.checked = 0);
  2868. });
  2869. } else {
  2870. this.setRowList5.map((e) => {
  2871. return (e.checked = 1);
  2872. });
  2873. }
  2874. },
  2875. //查询列数据
  2876. getRow5() {
  2877. let that = this;
  2878. this.data = {
  2879. tableName: "车队_弹窗对账明细",
  2880. userId: Cookies.get("userName"),
  2881. };
  2882. select(this.data).then((res) => {
  2883. if (res.data.length != 0) {
  2884. this.getRowList5 = res.data.filter((e) => e.checked == 0);
  2885. this.setRowList5 = res.data;
  2886. this.setRowList5 = this.setRowList5.reduce((res, item) => {
  2887. res.push({
  2888. surface: item.surface,
  2889. label: item.label,
  2890. name: item.name,
  2891. checked: item.checked,
  2892. width: item.width,
  2893. fixed: item.fixed,
  2894. });
  2895. return res;
  2896. }, []);
  2897. }
  2898. });
  2899. },
  2900. //保存列设置
  2901. save5() {
  2902. this.showSetting5 = false;
  2903. this.data = {
  2904. tableName: "车队_弹窗对账明细",
  2905. userId: Cookies.get("userName"),
  2906. sysTableSetList: this.setRowList5,
  2907. };
  2908. addSet(this.data).then((res) => {
  2909. this.getRowList5 = this.setRowList5.filter((e) => e.checked == 0);
  2910. });
  2911. },
  2912. //重置列表
  2913. delRow5() {
  2914. this.data = {
  2915. tableName: "车队_弹窗对账明细",
  2916. userId: Cookies.get("userName"),
  2917. };
  2918. resetModule(this.data).then((res) => {
  2919. if (res.code == 200) {
  2920. this.showSetting5 = false;
  2921. this.setRowList5 = this.getRowList5 = this.$options.data().tableDate5;
  2922. }
  2923. });
  2924. },
  2925. //列设置全选
  2926. allChecked6() {
  2927. if (this.allCheck6 == true) {
  2928. this.setRowList6.map((e) => {
  2929. return (e.checked = 0);
  2930. });
  2931. } else {
  2932. this.setRowList6.map((e) => {
  2933. return (e.checked = 1);
  2934. });
  2935. }
  2936. },
  2937. //查询列数据
  2938. getRow6() {
  2939. let that = this;
  2940. this.data = {
  2941. tableName: "车队_对账列表页",
  2942. userId: Cookies.get("userName"),
  2943. };
  2944. select(this.data).then((res) => {
  2945. if (res.data.length != 0) {
  2946. this.getRowList6 = res.data.filter((e) => e.checked == 0);
  2947. this.setRowList6 = res.data;
  2948. this.setRowList6 = this.setRowList6.reduce((res, item) => {
  2949. res.push({
  2950. surface: item.surface,
  2951. label: item.label,
  2952. name: item.name,
  2953. checked: item.checked,
  2954. width: item.width,
  2955. fixed: item.fixed,
  2956. });
  2957. return res;
  2958. }, []);
  2959. }
  2960. });
  2961. },
  2962. //保存列设置
  2963. save6() {
  2964. this.showSetting6 = false;
  2965. this.data = {
  2966. tableName: "车队_对账列表页",
  2967. userId: Cookies.get("userName"),
  2968. sysTableSetList: this.setRowList6,
  2969. };
  2970. addSet(this.data).then((res) => {
  2971. this.getRowList6 = this.setRowList6.filter((e) => e.checked == 0);
  2972. });
  2973. },
  2974. //重置列表
  2975. delRow6() {
  2976. this.data = {
  2977. tableName: "车队_对账列表页",
  2978. userId: Cookies.get("userName"),
  2979. };
  2980. resetModule(this.data).then((res) => {
  2981. if (res.code == 200) {
  2982. this.showSetting6 = false;
  2983. this.setRowList6 = this.getRowList6 = this.$options.data().tableDate5;
  2984. }
  2985. });
  2986. },
  2987. //开始拖拽事件
  2988. onStart() {
  2989. this.drag = true;
  2990. },
  2991. //拖拽结束事件
  2992. onEnd() {
  2993. this.drag = false;
  2994. },
  2995. //对账页面合计
  2996. listTotal(param) {
  2997. const { columns, data } = param;
  2998. const sums = [];
  2999. if (data.length > 0) {
  3000. columns.forEach((column, index) => {
  3001. if (index === 0) {
  3002. sums[index] = "合计";
  3003. }
  3004. if (
  3005. column.label == "金额" ||
  3006. column.label == "对账金额" ||
  3007. column.label == "本次金额" ||
  3008. column.label == "费用金额"
  3009. ) {
  3010. const values = data.map((item) => Number(item[column.property]));
  3011. if (!values.every((value) => isNaN(value))) {
  3012. sums[index] = values.reduce((prev, curr) => {
  3013. const value = Number(curr);
  3014. if (!isNaN(value)) {
  3015. return (Number(prev) + Number(curr)).toSuperFixed(2);
  3016. } else {
  3017. return Number(prev).toSuperFixed(2);
  3018. }
  3019. }, 0);
  3020. }
  3021. }
  3022. });
  3023. // if (!data[0].fSrcdc) {
  3024. // columns.forEach((column, index) => {
  3025. // if (index === 0) {
  3026. // sums[index] = "合计";
  3027. // }
  3028. // if (
  3029. // column.label == "金额" ||
  3030. // column.label == "对账金额" ||
  3031. // column.label == "本次金额" ||
  3032. // column.label == "费用金额"
  3033. // ) {
  3034. // const values = data.map((item) => Number(item[column.property]));
  3035. // if (!values.every((value) => isNaN(value))) {
  3036. // sums[index] = values.reduce((prev, curr) => {
  3037. // const value = Number(curr);
  3038. // if (!isNaN(value)) {
  3039. // return prev + curr;
  3040. // } else {
  3041. // return prev;
  3042. // }
  3043. // }, 0);
  3044. // }
  3045. // }
  3046. // });
  3047. // } else {
  3048. // columns.forEach((column, index) => {
  3049. // if (index === 0) {
  3050. // sums[index] = "合计";
  3051. // }
  3052. // if (
  3053. // column.label == "金额" ||
  3054. // column.label == "对账金额" ||
  3055. // column.label == "本次金额" ||
  3056. // column.label == "费用金额"
  3057. // ) {
  3058. // let number = 0;
  3059. // data.forEach((item) => {
  3060. // if (item.fSrcdc == "D") {
  3061. // number = number + Number(item[column.property]);
  3062. // } else {
  3063. // number = number - Number(item[column.property]);
  3064. // }
  3065. // });
  3066. // sums[index] = number;
  3067. // }
  3068. // });
  3069. // }
  3070. }
  3071. return sums;
  3072. },
  3073. //财务主取消
  3074. signOut() {
  3075. if (this.DzfeeList.length == 0) {
  3076. this.doNot = false;
  3077. } else {
  3078. this.doNot = true;
  3079. }
  3080. this.innerVisible = false;
  3081. this.feeList = [];
  3082. },
  3083. // 审批跳转
  3084. Jump() {
  3085. this.approval = this.$route.query.data;
  3086. if (this.approval) {
  3087. this.colseButton = false;
  3088. this.approval = JSON.parse(this.approval);
  3089. this.hide = false;
  3090. this.doNot = true;
  3091. this.notChange = true;
  3092. this.approve = true;
  3093. this.mainTable = true;
  3094. this.disappear = true;
  3095. this.cancelButton = false;
  3096. this.reset();
  3097. this.pass = {
  3098. fAmtdr: "", //应收合计
  3099. fAmtcr: "", //应付合计
  3100. fMblno: "", //提单号
  3101. fName: "", //货权方
  3102. fFeesName: "", //结算单位
  3103. fCorpid: "", //结算单位ID
  3104. };
  3105. getFee(this.approval.billId).then((response) => {
  3106. this.Operator = response.data.tFee.createBy;
  3107. if (response.data.feeDoList != 0) {
  3108. response.data.feeDoList.map((e) => {
  3109. if (e.fBillingDeadline) {
  3110. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  3111. }
  3112. if (e.fBsdate) {
  3113. e.fBsdate = e.fBsdate.slice(0, 10);
  3114. }
  3115. if (e.fChargedate) {
  3116. e.fChargedate = e.fChargedate.slice(0, 10);
  3117. }
  3118. // if (e.fSrcdc) {
  3119. // if (e.fSrcdc == "D") {
  3120. // e.fSrcdc = "收";
  3121. // } else {
  3122. // e.fSrcdc = "付";
  3123. // }
  3124. // }
  3125. });
  3126. }
  3127. this.DzfeeList = response.data.feeDoList;
  3128. this.fWbuOptions = response.data.feesList;
  3129. this.queryParams = response.data.tFee;
  3130. this.fWbuOptions = response.data.feesList;
  3131. this.fMblnoOptions = response.data.corps;
  3132. this.mainTable = true;
  3133. this.title = "修改财务数据主";
  3134. });
  3135. }
  3136. },
  3137. homepaGe() {
  3138. let view = {
  3139. fullPath: "/finance/contrast",
  3140. hash: "",
  3141. matched: Array(2),
  3142. meta: Object,
  3143. name: "Contrast",
  3144. params: Object,
  3145. path: "/finance/contrast",
  3146. query: Object,
  3147. title: "对账",
  3148. };
  3149. this.$router.push({ path: "/index" });
  3150. this.$store
  3151. .dispatch("tagsView/delView", view)
  3152. .then(({ visitedViews }) => {
  3153. if (this.isActive(view)) {
  3154. this.toLastView(visitedViews, view);
  3155. }
  3156. });
  3157. Global.$emit("removeCache", "closeSelectedTag", view);
  3158. },
  3159. homePage() {
  3160. this.open = false;
  3161. let view = {
  3162. fullPath: "/finance/contrast",
  3163. hash: "",
  3164. matched: Array(2),
  3165. meta: Object,
  3166. name: "Contrast",
  3167. params: Object,
  3168. path: "/finance/contrast",
  3169. query: Object,
  3170. title: "对账",
  3171. };
  3172. this.$router.push({ path: "/index" });
  3173. this.$store
  3174. .dispatch("tagsView/delView", view)
  3175. .then(({ visitedViews }) => {
  3176. if (this.isActive(view)) {
  3177. this.toLastView(visitedViews, view);
  3178. }
  3179. });
  3180. Global.$emit("removeCache", "closeSelectedTag", view);
  3181. },
  3182. // 撤销审批
  3183. backApproval(status) {
  3184. if (Cookies.get("sysType") == 3) {
  3185. let data = {
  3186. id: this.queryParams.fId,
  3187. actId: 430,
  3188. billId: this.queryParams.fId,
  3189. fidStatus: status,
  3190. };
  3191. RevocationApproval(data).then((response) => {
  3192. if (response.code === 200) {
  3193. this.msgSuccess("撤销审批成功");
  3194. this.disappear = true;
  3195. this.mainTable = false;
  3196. this.open = false;
  3197. this.getList();
  3198. }
  3199. });
  3200. } else {
  3201. let data = {
  3202. id: this.queryParams.fId,
  3203. actId: this.contrastId,
  3204. billId: this.queryParams.fId,
  3205. fidStatus: status,
  3206. };
  3207. RevocationApproval(data).then((response) => {
  3208. this.msgSuccess("撤销审批成功");
  3209. this.disappear = true;
  3210. this.open = false;
  3211. this.mainTable = false;
  3212. this.getList();
  3213. });
  3214. }
  3215. },
  3216. returnData() {
  3217. this.addOrUpdateVisib = false;
  3218. this.open = false;
  3219. this.homepaGe();
  3220. },
  3221. getDataList() {
  3222. this.addOrUpdateVisible = false;
  3223. },
  3224. // 审批按钮
  3225. goApproval(status) {
  3226. this.addOrUpdateVisib = true;
  3227. this.$nextTick(() => {
  3228. if (Cookies.get("sysType") == 3) {
  3229. this.$refs.ApprovalComments.init(this.queryParams.fId, status, 430);
  3230. } else {
  3231. this.$refs.ApprovalComments.init(
  3232. this.queryParams.fId,
  3233. status,
  3234. this.contrastId
  3235. );
  3236. }
  3237. });
  3238. },
  3239. // 查看审批流
  3240. addOrUpdateHandle(status) {
  3241. this.addOrUpdateVisible = true;
  3242. this.addOrUpdateVisib = false;
  3243. let id = null;
  3244. if (this.queryParams.fId) {
  3245. id = this.queryParams.fId;
  3246. } else {
  3247. id = this.queryParams.id;
  3248. }
  3249. this.$nextTick(() => {
  3250. if (Cookies.get("sysType") == 3) {
  3251. this.$refs.addOrUpdate.init(id, 430, status);
  3252. } else {
  3253. this.$refs.addOrUpdate.init(id, this.contrastId, status);
  3254. }
  3255. });
  3256. },
  3257. // 撤销对账
  3258. backrRconciliation() {
  3259. this.queryParams.fBillstatus = "1";
  3260. let formDate = new window.FormData();
  3261. formDate.append("tFee", JSON.stringify(this.queryParams));
  3262. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList));
  3263. backFee(formDate).then((response) => {
  3264. this.msgSuccess("撤回成功");
  3265. this.open = false;
  3266. this.mainTable = false;
  3267. this.reset();
  3268. this.getList();
  3269. });
  3270. },
  3271. // 打印功能
  3272. printing() {
  3273. if (this.DzfeeList.length !== 0) {
  3274. this.openPrint = true;
  3275. this.printObject = this.DzfeeList;
  3276. } else {
  3277. this.$message.error("无数据,请检查是否有数据");
  3278. }
  3279. },
  3280. // 确认打印
  3281. printSomething() {
  3282. // 此处的style即为打印时的样式
  3283. const style =
  3284. "table tr td,th { border-collapse: collapse;padding:15px;border:.5px #000 solid;text-align:center;}";
  3285. // "@media print {} }";
  3286. print({
  3287. printable: "print_area2",
  3288. type: "html",
  3289. header: "对账表",
  3290. headerStyle: "text-align:center;color:#000;width:100%;",
  3291. style: style, // 亦可使用引入的外部css;
  3292. scanStyles: false,
  3293. });
  3294. },
  3295. // 确认对账按钮功能
  3296. confirmReconciliation() {
  3297. this.$refs["ruless"].validate((valid) => {
  3298. if (valid) {
  3299. if (this.DzfeeList.length) {
  3300. // this.queryParams.fBillstatus = '4'
  3301. let formDate = new window.FormData();
  3302. formDate.append("tFee", JSON.stringify(this.queryParams));
  3303. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList));
  3304. if (Cookies.get("sysType") == 1) {
  3305. Cfee(formDate).then((response) => {
  3306. this.open = false;
  3307. this.msgSuccess("操作成功");
  3308. this.getList();
  3309. });
  3310. this.handleAdd();
  3311. } else if (Cookies.get("sysType") == 2) {
  3312. confirmFleet(formDate).then((response) => {
  3313. if (response.code == 200) {
  3314. this.open = false;
  3315. this.notChange = true;
  3316. this.$set(this.queryParams, "fBillstatus", 6);
  3317. this.msgSuccess("操作成功");
  3318. this.getList();
  3319. }
  3320. });
  3321. } else if (Cookies.get("sysType") == 3) {
  3322. formDate.append("billsType", "KHDZ");
  3323. Cfee(formDate).then((response) => {
  3324. this.queryParams.fId = response.data.tFee.fId;
  3325. this.queryParams.fBillno = response.data.tFee.fBillno;
  3326. this.$message.success("操作成功");
  3327. this.doNot = true;
  3328. this.notChange = true;
  3329. this.$set(this.queryParams, "fBillstatus", "4");
  3330. // this.queryParams.fBillstatus = '4'
  3331. if (this.Operator == this.Lander) {
  3332. this.disappear = false;
  3333. }
  3334. this.getList();
  3335. });
  3336. }
  3337. } else {
  3338. this.$message.error("表单为空不允许操作");
  3339. }
  3340. }
  3341. });
  3342. },
  3343. //导出
  3344. handleExportItems() {
  3345. let fIds = 0;
  3346. if (Cookies.get("sysType") == 2) {
  3347. fIds = this.queryParams.id;
  3348. } else {
  3349. fIds = this.queryParams.fId;
  3350. }
  3351. if (fIds !== null) {
  3352. this.$confirm("是否确认导出所有计费物资明细数据?", "警告", {
  3353. confirmButtonText: "确定",
  3354. cancelButtonText: "取消",
  3355. type: "warning",
  3356. })
  3357. .then(function () {
  3358. if (Cookies.get("sysType") == 2) {
  3359. return exporItems(fIds);
  3360. } else {
  3361. return exportWarehousebillsitems(fIds);
  3362. }
  3363. })
  3364. .then((response) => {
  3365. this.download(response.msg);
  3366. });
  3367. } else {
  3368. this.$message("请先保存");
  3369. }
  3370. },
  3371. // 对账按钮功能
  3372. reconciliation() {
  3373. if (!this.queryParams.fSystemType) {
  3374. return this.$message("请先选择业务类型");
  3375. }
  3376. if (!this.queryParams.fCorpid) {
  3377. return this.$message.error("请先选择结算单位");
  3378. }
  3379. this.queryParameter = {
  3380. fToCorpid: this.queryParams.fCorpid,
  3381. fReconciliation: 0,
  3382. fDc: 'D'
  3383. };
  3384. importFee(this.queryParameter).then((response) => {
  3385. this.feeList = response.rows;
  3386. if (this.feeList.length !== 0) {
  3387. this.$message.success("查询成功");
  3388. this.totAL = 0;
  3389. this.Ttime = 0;
  3390. for (let item in this.feeList) {
  3391. this.totAL += Number(this.feeList[item].fAmt);
  3392. this.Ttime += Number(this.feeList[item].fAmtdr);
  3393. this.$set(
  3394. this.feeList[item],
  3395. "fBsdate",
  3396. this.feeList[item].fBsdate.substring(0, 10)
  3397. );
  3398. }
  3399. } else {
  3400. this.$message.error("暂无数据");
  3401. }
  3402. });
  3403. this.innerVisible = true;
  3404. this.feeList = [];
  3405. // this.TWareHouseFees = {
  3406. // fCorpid: "",
  3407. // fToCorpid: this.queryParams.fCorpid,
  3408. // fMblno: "",
  3409. // fStatementNo: "",
  3410. // fFeeid: "",
  3411. // timeExamine: "",
  3412. // timeInterval: "",
  3413. // fSrcdc: "",
  3414. // fReconciliation: "0",
  3415. // timeReconci: "",
  3416. // fDc: "D",
  3417. // fBilltype: "",
  3418. // };
  3419. this.TWareHouseFees = {
  3420. fToCorpid: this.queryParams.fCorpid,
  3421. fReconciliation: "0",
  3422. fDc: "D",
  3423. };
  3424. if (this.queryParams.fCorpid) {
  3425. this.doNot = true;
  3426. }
  3427. },
  3428. changeAmt(row, index) {
  3429. if (row > this.feeList[index].fAmount) {
  3430. this.$message.error("本次金额不能大于原定金额");
  3431. this.feeList[index].fAmt = this.feeList[index].fAmount;
  3432. }
  3433. },
  3434. // 默认录入人
  3435. register() {
  3436. queryUserVal().then((response) => {
  3437. this.Lander = response.user.userName;
  3438. });
  3439. },
  3440. // 合计
  3441. getSum(param) {
  3442. const { columns, data } = param;
  3443. const sums = [];
  3444. columns.forEach((column, index) => {
  3445. if (this.selection.length == 0) {
  3446. if (index === 0) {
  3447. sums[index] = "合计";
  3448. } else if (
  3449. column.label == "金额" ||
  3450. column.label == "本次金额" ||
  3451. column.label == "费用金额"
  3452. ) {
  3453. const values = data.map((item) => Number(item[column.property]));
  3454. if (!values.every((value) => isNaN(value))) {
  3455. sums[index] = values.reduce((prev, curr) => {
  3456. const value = Number(curr);
  3457. if (!isNaN(value)) {
  3458. return (Number(prev) + Number(curr)).toSuperFixed(2);
  3459. } else {
  3460. return Number(prev).toSuperFixed(2);
  3461. }
  3462. }, 0);
  3463. }
  3464. }
  3465. } else {
  3466. if (index === 0) {
  3467. sums[index] = "合计";
  3468. } else if (column.label == "金额" || column.label == "本次金额") {
  3469. const values = this.selection.map((selection) =>
  3470. Number(selection[column.property])
  3471. );
  3472. if (!values.every((value) => isNaN(value))) {
  3473. sums[index] = values.reduce((prev, curr) => {
  3474. const value = Number(curr);
  3475. if (!isNaN(value)) {
  3476. return (Number(prev) + Number(curr)).toSuperFixed(2);
  3477. } else {
  3478. return Number(prev).toSuperFixed(2);
  3479. }
  3480. }, 0);
  3481. }
  3482. }
  3483. }
  3484. });
  3485. return sums;
  3486. },
  3487. // 导入多选框
  3488. handleSelectionChange_s(selection) {
  3489. // this.totAL = 0;
  3490. // this.Ttime = 0;
  3491. this.selection = selection;
  3492. // if (this.selection.length == 0) {
  3493. // for (let item in this.feeList) {
  3494. // this.totAL += Number(this.feeList[item].fAmt);
  3495. // this.Ttime += Number(this.feeList[item].fAmtdr);
  3496. // }
  3497. // } else {
  3498. // for (let index in selection) {
  3499. // this.totAL += Number(selection[index].fAmt);
  3500. // this.Ttime += Number(selection[index].fAmtdr);
  3501. // }
  3502. // }
  3503. },
  3504. // 多选框选中数据
  3505. handleSelectionChange(selection) {
  3506. this.totAL = 0;
  3507. this.ids = selection.map((item) => item.fId);
  3508. this.single =
  3509. selection.filter((e) => e.fBillstatus == "暂存").length != 1 ||
  3510. selection.length != 1;
  3511. this.multiple = !selection.length;
  3512. },
  3513. // 金额筛选
  3514. imgChangeI(row) {
  3515. if (row.fAmt && Number(row.fAmt) > Number(row.fAmtdr)) {
  3516. this.$set(row, "fAmt", row.fAmtdr);
  3517. this.state_s = true;
  3518. }
  3519. if (this.selection.length !== 0) {
  3520. this.totAL = 0;
  3521. this.Ttime = 0;
  3522. for (let item in this.selection) {
  3523. this.totAL += Number(this.selection[item].fAmt);
  3524. this.Ttime += Number(this.selection[item].fAmtdr);
  3525. }
  3526. } else {
  3527. this.totAL = 0;
  3528. this.Ttime = 0;
  3529. for (let item in this.feeList) {
  3530. this.totAL += Number(this.feeList[item].fAmt);
  3531. this.Ttime += Number(this.feeList[item].fAmtdr);
  3532. }
  3533. }
  3534. },
  3535. /* 添加财务数据主 导入*/
  3536. confirmImport() {
  3537. this.doNot = true;
  3538. this.hide = true;
  3539. this.pass.fAmtdr = 0;
  3540. this.pass.fAmtcr = 0;
  3541. for (let item in this.selection) {
  3542. this.pass.fAmtcr = Number(this.pass.fAmtcr);
  3543. this.pass.fAmtdr = Number(this.pass.fAmtdr);
  3544. this.pass.fAmtcr += Number(this.selection[item].fAmt);
  3545. this.pass.fAmtdr += Number(this.selection[item].fAmtdr);
  3546. }
  3547. // this.pass.fAmtcr.toFixed(2);
  3548. if (this.state_s == true) {
  3549. if (this.selection.length == "0") {
  3550. this.$message.error("未选择导入行");
  3551. } else {
  3552. let Num = [];
  3553. for (let item in this.selection) {
  3554. this.empty.push(this.selection[item].fMblno);
  3555. this.nothing.push(this.selection[item].fName);
  3556. if (this.DzfeeList.length === 0) {
  3557. this.DzfeeList = this.DzfeeList.concat(this.selection);
  3558. this.DzfeeList.forEach(data => {
  3559. data.fId = null
  3560. })
  3561. //去重提单号
  3562. this.empty = new Set(this.empty);
  3563. this.empty = Array.from(this.empty);
  3564. //去重货权方
  3565. this.nothing = new Set(this.nothing);
  3566. this.nothing = Array.from(this.nothing);
  3567. if (this.empty.length <= 1) {
  3568. this.pass.fMblno = this.empty[0];
  3569. } else {
  3570. this.pass.fMblno = this.empty[0] + "...";
  3571. }
  3572. if (this.nothing.length <= 1) {
  3573. this.pass.fName = this.nothing[0];
  3574. } else {
  3575. this.pass.fName = this.nothing[0] + "...";
  3576. }
  3577. // this.DzfeeList = this.DzfeeList.concat(this.Fee)
  3578. this.queryParams.tMblno = this.pass.fMblno; //提单号
  3579. this.queryParams.fCorpid = this.TWareHouseFees.fToCorpid;
  3580. this.queryParams.fCtrlcorpid = this.pass.fName;
  3581. this.queryParams.fAmtcr = this.pass.fAmtcr;
  3582. this.queryParams.fAmtdr = this.pass.fAmtdr;
  3583. this.innerVisible = false;
  3584. this.feeList = [];
  3585. // this.feeList = this.DzfeeList
  3586. this.TWareHouseFees = {
  3587. fCorpid: "",
  3588. fToCorpid: "",
  3589. fMblno: "",
  3590. fStatementNo: "",
  3591. fFeeid: "",
  3592. timeExamine: "",
  3593. timeInterval: "",
  3594. fSrcdc: "",
  3595. fReconciliation: "0",
  3596. timeReconci: "",
  3597. fDc: "D",
  3598. };
  3599. return;
  3600. }
  3601. }
  3602. for (let li in this.DzfeeList) {
  3603. for (let item in this.selection) {
  3604. if (this.selection[item].fSrcid !== this.DzfeeList[li].fSrcid) {
  3605. this.Fee = this.DzfeeList.concat(this.selection);
  3606. let result = [];
  3607. let obj = {};
  3608. for (let lis in this.Fee) {
  3609. if (!obj[this.Fee[lis].fSrcid]) {
  3610. result.push(this.Fee[lis]);
  3611. obj[this.Fee[lis].fSrcid] = true;
  3612. }
  3613. }
  3614. //去重提单号
  3615. this.empty = new Set(this.empty);
  3616. this.empty = Array.from(this.empty);
  3617. //去重货权方
  3618. this.nothing = new Set(this.nothing);
  3619. this.nothing = Array.from(this.nothing);
  3620. if (this.empty.length <= 1) {
  3621. this.pass.fMblno = this.empty[0];
  3622. } else {
  3623. this.pass.fMblno = this.empty[0] + "...";
  3624. }
  3625. if (this.nothing.length <= 1) {
  3626. this.pass.fName = this.nothing[0];
  3627. } else {
  3628. this.pass.fName = this.nothing[0] + "...";
  3629. }
  3630. // this.DzfeeList = this.DzfeeList.concat(this.Fee)
  3631. this.queryParams.tMblno = this.pass.fMblno; //提单号
  3632. this.queryParams.fCorpid = this.TWareHouseFees.fToCorpid;
  3633. this.queryParams.fCtrlcorpid = this.pass.fName;
  3634. this.queryParams.fAmtcr = this.pass.fAmtcr;
  3635. this.queryParams.fAmtdr = this.pass.fAmtdr;
  3636. this.innerVisible = false;
  3637. this.feeList = [];
  3638. // this.feeList = this.DzfeeList
  3639. this.TWareHouseFees = {
  3640. fCorpid: "",
  3641. fToCorpid: this.queryParams.fCorpid,
  3642. fMblno: "",
  3643. fStatementNo: "",
  3644. fFeeid: "",
  3645. timeExamine: "",
  3646. timeInterval: "",
  3647. fSrcdc: "",
  3648. fReconciliation: "0",
  3649. timeReconci: "",
  3650. fDc: "D",
  3651. };
  3652. this.DzfeeList = result;
  3653. this.DzfeeList.forEach(data => {
  3654. data.fId = null
  3655. })
  3656. } else {
  3657. let i = Number(li) + 1;
  3658. Num += i + "、";
  3659. }
  3660. }
  3661. }
  3662. if (Num.length != 0) {
  3663. MessageBox.confirm(
  3664. "从表的第" +
  3665. Num.slice(0, Num.length - 1) +
  3666. "行重复,如本次金额变更,请删除后重新选择",
  3667. "提示",
  3668. {
  3669. confirmButtonText: "确定",
  3670. cancelButtonText: "取消",
  3671. type: "warning",
  3672. }
  3673. );
  3674. }
  3675. }
  3676. } else if (this.state_s == false) {
  3677. this.$message.error("本次金额不能大于原定金额");
  3678. }
  3679. },
  3680. /* 添加财务数据主 导入*/
  3681. confirmImport2() {
  3682. this.doNot = true;
  3683. this.hide = true;
  3684. this.pass.fAmtdr = 0;
  3685. this.pass.fAmtcr = 0;
  3686. this.selection.map((e) => {
  3687. e.fAmtdr = e.fAmount;
  3688. e.fAmtcr = e.fAmt;
  3689. });
  3690. for (let item in this.selection) {
  3691. this.pass.fAmtcr = Number(this.pass.fAmtcr);
  3692. this.pass.fAmtdr = Number(this.pass.fAmtdr);
  3693. this.pass.fAmtcr += Number(this.selection[item].fAmtcr);
  3694. this.pass.fAmtdr += Number(this.selection[item].fAmtdr);
  3695. }
  3696. // this.pass.fAmtcr.toFixed(2);
  3697. if (this.state_s == true) {
  3698. if (this.selection.length == "0") {
  3699. this.$message.error("未选择导入行");
  3700. } else {
  3701. let Num = [];
  3702. for (let item in this.selection) {
  3703. this.empty.push(this.selection[item].fMblno);
  3704. this.nothing.push(this.selection[item].fName);
  3705. if (this.DzfeeList.length === 0) {
  3706. this.DzfeeList = this.DzfeeList.concat(this.selection);
  3707. //去重提单号
  3708. this.empty = new Set(this.empty);
  3709. this.empty = Array.from(this.empty);
  3710. //去重货权方
  3711. this.nothing = new Set(this.nothing);
  3712. this.nothing = Array.from(this.nothing);
  3713. if (this.empty.length <= 1) {
  3714. this.pass.fMblno = this.empty[0];
  3715. } else {
  3716. this.pass.fMblno = this.empty[0] + "...";
  3717. }
  3718. if (this.nothing.length <= 1) {
  3719. this.pass.fName = this.nothing[0];
  3720. } else {
  3721. this.pass.fName = this.nothing[0] + "...";
  3722. }
  3723. // this.DzfeeList = this.DzfeeList.concat(this.Fee)
  3724. this.queryParams.tMblno = this.pass.fMblno; //提单号
  3725. this.queryParams.fCorpid = this.TWareHouseFees.fToCorpid;
  3726. this.queryParams.fCtrlcorpid = this.pass.fName;
  3727. this.queryParams.fAmtcr = this.pass.fAmtcr;
  3728. this.queryParams.fAmtdr = this.pass.fAmtdr;
  3729. this.innerVisible = false;
  3730. this.feeList = [];
  3731. // this.feeList = this.DzfeeList
  3732. this.TWareHouseFees = {
  3733. fCorpid: "",
  3734. fToCorpid: "",
  3735. fMblno: "",
  3736. fStatementNo: "",
  3737. fFeeid: "",
  3738. timeExamine: "",
  3739. timeInterval: "",
  3740. fSrcdc: "",
  3741. fReconciliation: "0",
  3742. timeReconci: "",
  3743. fDc: "D",
  3744. };
  3745. return;
  3746. }
  3747. }
  3748. for (let li in this.DzfeeList) {
  3749. for (let item in this.selection) {
  3750. if (this.selection[item].fSrcid !== this.DzfeeList[li].fSrcid) {
  3751. this.Fee = this.DzfeeList.concat(this.selection);
  3752. let result = [];
  3753. let obj = {};
  3754. for (let lis in this.Fee) {
  3755. if (!obj[this.Fee[lis].fSrcid]) {
  3756. result.push(this.Fee[lis]);
  3757. obj[this.Fee[lis].fSrcid] = true;
  3758. }
  3759. }
  3760. //去重提单号
  3761. this.empty = new Set(this.empty);
  3762. this.empty = Array.from(this.empty);
  3763. //去重货权方
  3764. this.nothing = new Set(this.nothing);
  3765. this.nothing = Array.from(this.nothing);
  3766. if (this.empty.length <= 1) {
  3767. this.pass.fMblno = this.empty[0];
  3768. } else {
  3769. this.pass.fMblno = this.empty[0] + "...";
  3770. }
  3771. if (this.nothing.length <= 1) {
  3772. this.pass.fName = this.nothing[0];
  3773. } else {
  3774. this.pass.fName = this.nothing[0] + "...";
  3775. }
  3776. // this.DzfeeList = this.DzfeeList.concat(this.Fee)
  3777. this.queryParams.tMblno = this.pass.fMblno; //提单号
  3778. this.queryParams.fCorpid = this.TWareHouseFees.fToCorpid;
  3779. this.queryParams.fCtrlcorpid = this.pass.fName;
  3780. this.queryParams.fAmtcr = this.pass.fAmtcr;
  3781. this.queryParams.fAmtdr = this.pass.fAmtdr;
  3782. this.innerVisible = false;
  3783. this.feeList = [];
  3784. // this.feeList = this.DzfeeList
  3785. this.TWareHouseFees = {
  3786. fCorpid: "",
  3787. fToCorpid: this.queryParams.fCorpid,
  3788. fMblno: "",
  3789. fStatementNo: "",
  3790. fFeeid: "",
  3791. timeExamine: "",
  3792. timeInterval: "",
  3793. fSrcdc: "",
  3794. fReconciliation: "0",
  3795. timeReconci: "",
  3796. fDc: "D",
  3797. };
  3798. this.DzfeeList = result;
  3799. } else {
  3800. let i = Number(li) + 1;
  3801. Num += i + "、";
  3802. }
  3803. }
  3804. }
  3805. if (Num.length != 0) {
  3806. MessageBox.confirm(
  3807. "从表的第" +
  3808. Num.slice(0, Num.length - 1) +
  3809. "行重复,如本次金额变更,请删除后重新选择",
  3810. "提示",
  3811. {
  3812. confirmButtonText: "确定",
  3813. cancelButtonText: "取消",
  3814. type: "warning",
  3815. }
  3816. );
  3817. }
  3818. }
  3819. } else if (this.state_s == false) {
  3820. this.$message.error("本次金额不能大于原定金额");
  3821. }
  3822. },
  3823. // imgChangeI(fAmtdr,fAmt){
  3824. // if (fAmt <= fAmtdr){
  3825. // this.state_s = true
  3826. // }else if(fAmt > fAmtdr){
  3827. // this.$message.error('本次金额不能大于原定金额');
  3828. // this.state_s = false
  3829. // }
  3830. // },
  3831. // 导入搜索
  3832. searchFee(type) {
  3833. this.feeList = [];
  3834. this.$refs["feeListRules"].validate((valid) => {
  3835. if (valid) {
  3836. if (type == 1) {
  3837. importFee(this.TWareHouseFees).then((response) => {
  3838. this.feeList = response.rows;
  3839. if (this.feeList.length !== 0) {
  3840. this.$message.success("查询成功");
  3841. this.totAL = 0;
  3842. this.Ttime = 0;
  3843. for (let item in this.feeList) {
  3844. this.totAL += Number(this.feeList[item].fAmt);
  3845. this.Ttime += Number(this.feeList[item].fAmtdr);
  3846. this.$set(
  3847. this.feeList[item],
  3848. "fBsdate",
  3849. this.feeList[item].fBsdate.substring(0, 10)
  3850. );
  3851. }
  3852. } else {
  3853. this.$message.error("暂无数据");
  3854. }
  3855. });
  3856. } else if (type == 2) {
  3857. importFleet(this.TWareHouseFees).then((response) => {
  3858. this.feeList = response.rows;
  3859. if (this.feeList.length !== 0) {
  3860. this.$message.success("查询成功");
  3861. this.totAL = 0;
  3862. this.Ttime = 0;
  3863. for (let item in this.feeList) {
  3864. this.totAL += Number(this.feeList[item].fAmt);
  3865. this.Ttime += Number(this.feeList[item].fAmtdr);
  3866. this.$set(
  3867. this.feeList[item],
  3868. "fBsdate",
  3869. this.feeList[item].fBsdate.substring(0, 10)
  3870. );
  3871. }
  3872. } else {
  3873. this.$message.error("暂无数据");
  3874. }
  3875. });
  3876. } else if (type == 3) {
  3877. this.TWareHouseFees.fSystemType = this.queryParams.fSystemType;
  3878. importFee(this.TWareHouseFees).then((response) => {
  3879. this.feeList = response.rows;
  3880. if (this.feeList.length !== 0) {
  3881. this.$message.success("查询成功");
  3882. this.totAL = 0;
  3883. this.Ttime = 0;
  3884. for (let item in this.feeList) {
  3885. this.totAL += Number(this.feeList[item].fAmt);
  3886. this.Ttime += Number(this.feeList[item].fAmtdr);
  3887. if (this.feeList[item].fBsdate) {
  3888. this.$set(
  3889. this.feeList[item],
  3890. "fBsdate",
  3891. this.feeList[item].fBsdate.substring(0, 10)
  3892. );
  3893. }
  3894. }
  3895. } else {
  3896. this.$message.error("暂无数据");
  3897. }
  3898. });
  3899. }
  3900. }
  3901. });
  3902. },
  3903. /** 打开导入表弹窗 */
  3904. openImportTable() {
  3905. this.$refs.import.show();
  3906. },
  3907. /** 查询财务数据主列表 */
  3908. getList() {
  3909. this.loading = true;
  3910. this.getDicts("approval_process").then((response) => {
  3911. // this.feeList = response.rows;
  3912. this.options = response.data;
  3913. });
  3914. if (Cookies.get("sysType") == 1) {
  3915. listFee(this.tablefilter).then((response) => {
  3916. this.contrastList = response.rows;
  3917. this.total = response.total;
  3918. this.loading = false;
  3919. });
  3920. } else if (Cookies.get("sysType") == 2) {
  3921. listFleet(this.tablefilter).then((response) => {
  3922. this.contrastList = response.rows;
  3923. this.total = response.total;
  3924. this.loading = false;
  3925. });
  3926. } else if (Cookies.get("sysType") == 3) {
  3927. this.tablefilter.fBilltype = "KHDZ";
  3928. if (this.tablefilter.firstMoney || this.tablefilter.lastMoney) {
  3929. if (
  3930. this.tablefilter.firstMoney == "" ||
  3931. this.tablefilter.lastMoney == ""
  3932. ) {
  3933. this.$message.error("实付合计为金额区间,请填写完整");
  3934. this.tablefilter.amount = [];
  3935. } else if (
  3936. !this.tablefilter.firstMoney ||
  3937. !this.tablefilter.lastMoney
  3938. ) {
  3939. this.$message.error("实付合计为金额区间,请填写完整");
  3940. } else {
  3941. this.tablefilter.amount[0] = this.tablefilter.firstMoney;
  3942. this.tablefilter.amount[1] = this.tablefilter.lastMoney;
  3943. }
  3944. } else {
  3945. this.tablefilter.amount = [];
  3946. }
  3947. listFee(this.tablefilter).then((response) => {
  3948. this.contrastList = response.rows;
  3949. this.total = response.total;
  3950. this.loading = false;
  3951. });
  3952. }
  3953. },
  3954. // 取消按钮
  3955. cancel() {
  3956. if (this.notChange == true) {
  3957. this.mainTable = false;
  3958. } else {
  3959. this.$confirm("返回列表,是否保存?", "提示", {
  3960. confirmButtonText: "保存",
  3961. cancelButtonText: "取消",
  3962. type: "warning",
  3963. })
  3964. .then(() => {
  3965. this.submitForm(Cookies.get("sysType"), 1);
  3966. })
  3967. .catch(() => {
  3968. this.mainTable = false;
  3969. this.getList();
  3970. });
  3971. }
  3972. },
  3973. // 表单重置
  3974. reset() {
  3975. this.form = {
  3976. fId: null,
  3977. fBillno: null,
  3978. fCtrlcorpid: null,
  3979. fCorpid: null,
  3980. tMblno: null,
  3981. fAmtdr: null,
  3982. fAmtcr: null,
  3983. fBilltype: null,
  3984. fBillstatus: "0",
  3985. fRemarks: null,
  3986. fAccbilldate: null,
  3987. delFlag: null,
  3988. createBy: null,
  3989. fDeptid: null,
  3990. createTime: null,
  3991. updateBy: null,
  3992. updateTime: null,
  3993. };
  3994. this.resetForm("form");
  3995. },
  3996. /** 搜索按钮操作 */
  3997. handleQuery() {
  3998. this.queryParams.pageNum = 1;
  3999. this.getList();
  4000. // this.searchFee()
  4001. },
  4002. changefBilltype() {
  4003. this.businessTypeOption = [];
  4004. if (this.TWareHouseFees.fBilltype == "SJRK") {
  4005. this.getDicts("st_in_type").then((response) => {
  4006. this.businessTypeOption = response.data;
  4007. });
  4008. } else if (this.TWareHouseFees.fBilltype == "SJCK") {
  4009. this.getDicts("st_out_type").then((response) => {
  4010. this.businessTypeOption = response.data;
  4011. });
  4012. } else if (this.TWareHouseFees.fBilltype == "HQZY") {
  4013. this.getDicts("st_trans_type").then((response) => {
  4014. this.businessTypeOption = response.data;
  4015. });
  4016. }
  4017. },
  4018. /** 重置按钮操作 */
  4019. resetQuery() {
  4020. // this.resetForm("queryParams_s");
  4021. this.tablefilter = {
  4022. pageNum: 1,
  4023. pageSize: 10,
  4024. fBillno: null,
  4025. fCtrlcorpid: null,
  4026. fCorpid: null,
  4027. timeInterval: null,
  4028. };
  4029. this.handleQuery();
  4030. this.TWareHouseFees = {
  4031. fCorpid: "",
  4032. fToCorpid: "",
  4033. fMblno: "",
  4034. fStatementNo: "",
  4035. fFeeid: "",
  4036. timeExamine: "",
  4037. timeInterval: "",
  4038. fSrcdc: "",
  4039. fReconciliation: "0",
  4040. };
  4041. },
  4042. //导入重置按钮
  4043. resetQuery_s() {
  4044. this.TWareHouseFees = {
  4045. fCorpid: null,
  4046. fToCorpid: null,
  4047. fMblno: null,
  4048. fStatementNo: null,
  4049. fFeeid: null,
  4050. timeExamine: null,
  4051. timeInterval: null,
  4052. fDc: "D",
  4053. fReconciliation: "0",
  4054. };
  4055. },
  4056. // 多选框选中数据
  4057. // handleSelectionChange(selection) {
  4058. // this.ids = selection.map(item => item.fId)
  4059. // this.single = selection.length!==1
  4060. // this.multiple = !selection.length
  4061. // },
  4062. // handleSelectionChanGe(selection){
  4063. // if(selection.length > 0) {
  4064. // this.statrGo = false
  4065. // }else{
  4066. // this.statrGo = true
  4067. // }
  4068. // },
  4069. /** 新增按钮操作 */
  4070. handleAdd() {
  4071. queryUserVal().then((response) => {
  4072. this.queryParams.createBy = response.user.userName;
  4073. this.queryParams.createTime = Date.parse(new Date());
  4074. });
  4075. this.queryParams.fSystemType = "";
  4076. this.doNot = false;
  4077. this.notChange = false;
  4078. this.hide = true;
  4079. this.reset();
  4080. this.DzfeeList = [];
  4081. this.pass = {
  4082. fAmtdr: "", //应收合计
  4083. fAmtcr: "", //应付合计
  4084. fMblno: "", //提单号
  4085. fName: "", //货权方
  4086. fFeesName: "", //结算单位
  4087. fCorpid: "", //结算单位ID
  4088. };
  4089. this.mainTable = true;
  4090. this.title = "添加财务数据主";
  4091. this.queryParams = {
  4092. pageNum: 1,
  4093. pageSize: 10,
  4094. fBillno: null,
  4095. fCtrlcorpid: null,
  4096. fCorpid: null,
  4097. tMblno: null,
  4098. fAmtdr: null,
  4099. fId: null,
  4100. fAmtcr: null,
  4101. fBilltype: null,
  4102. fBillstatus: null,
  4103. fRemarks: null,
  4104. fAccbilldate: null,
  4105. fDeptid: null,
  4106. createBy: null,
  4107. timeReconci: null,
  4108. fSystemType: Cookies.get("sysType"),
  4109. };
  4110. },
  4111. // 查看按钮
  4112. check(row, res) {
  4113. this.doNot = true;
  4114. this.notChange = true;
  4115. if (Cookies.get("sysType") == 1) {
  4116. getFee(row.fId).then((response) => {
  4117. this.Operator = response.data.tFee.createBy;
  4118. if (response.data.feeDoList != 0) {
  4119. response.data.feeDoList.map((e) => {
  4120. if (e.fBillingDeadline) {
  4121. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4122. }
  4123. if (e.fBsdate) {
  4124. e.fBsdate = e.fBsdate.slice(0, 10);
  4125. }
  4126. if (e.fChargedate) {
  4127. e.fChargedate = e.fChargedate.slice(0, 10);
  4128. }
  4129. // if (e.fSrcdc) {
  4130. // if (e.fSrcdc == "D") {
  4131. // e.fSrcdc = "收";
  4132. // } else {
  4133. // e.fSrcdc = "付";
  4134. // }
  4135. // }
  4136. });
  4137. }
  4138. this.DzfeeList = response.data.feeDoList;
  4139. this.fWbuOptions = response.data.feesList;
  4140. this.queryParams = response.data.tFee;
  4141. this.queryParams.fSystemType = response.data.tFee.fsystemType;
  4142. this.fWbuOptions = response.data.feesList;
  4143. this.fMblnoOptions = response.data.corps;
  4144. this.mainTable = true;
  4145. this.disappear = true;
  4146. this.title = "修改财务数据主";
  4147. if (res == 1) {
  4148. this.notChange = true;
  4149. if (this.Operator == this.Lander) {
  4150. this.disappear = false;
  4151. this.reset();
  4152. this.pass = {
  4153. fAmtdr: "", //应收合计
  4154. fAmtcr: "", //应付合计
  4155. fMblno: "", //提单号
  4156. fName: "", //货权方
  4157. fFeesName: "", //结算单位
  4158. fCorpid: "", //结算单位ID
  4159. };
  4160. const fId = row.fId || this.ids;
  4161. getFee(fId).then((response) => {
  4162. if (response.data.feeDoList != 0) {
  4163. response.data.feeDoList.map((e) => {
  4164. if (e.fBillingDeadline) {
  4165. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4166. }
  4167. if (e.fBsdate) {
  4168. e.fBsdate = e.fBsdate.slice(0, 10);
  4169. }
  4170. if (e.fChargedate) {
  4171. e.fChargedate = e.fChargedate.slice(0, 10);
  4172. }
  4173. // if (e.fSrcdc) {
  4174. // if (e.fSrcdc == "D") {
  4175. // e.fSrcdc = "收";
  4176. // } else {
  4177. // e.fSrcdc = "付";
  4178. // }
  4179. // }
  4180. });
  4181. }
  4182. this.DzfeeList = response.data.feeDoList;
  4183. this.fWbuOptions = response.data.feesList;
  4184. this.queryParams = response.data.tFee;
  4185. this.queryParams.fSystemType = response.data.tFee.fsystemType;
  4186. this.fWbuOptions = response.data.feesList;
  4187. this.fMblnoOptions = response.data.corps;
  4188. this.mainTable = true;
  4189. });
  4190. } else {
  4191. this.notChange = true;
  4192. }
  4193. } else {
  4194. this.notChange = true;
  4195. this.reset();
  4196. this.pass = {
  4197. fAmtdr: "", //应收合计
  4198. fAmtcr: "", //应付合计
  4199. fMblno: "", //提单号
  4200. fName: "", //货权方
  4201. fFeesName: "", //结算单位
  4202. fCorpid: "", //结算单位ID
  4203. };
  4204. const fId = row.fId || this.ids;
  4205. getFee(fId).then((response) => {
  4206. if (response.data.feeDoList != 0) {
  4207. response.data.feeDoList.map((e) => {
  4208. if (e.fBillingDeadline) {
  4209. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4210. }
  4211. if (e.fBsdate) {
  4212. e.fBsdate = e.fBsdate.slice(0, 10);
  4213. }
  4214. if (e.fChargedate) {
  4215. e.fChargedate = e.fChargedate.slice(0, 10);
  4216. }
  4217. // if (e.fSrcdc) {
  4218. // if (e.fSrcdc == "D") {
  4219. // e.fSrcdc = "收";
  4220. // } else {
  4221. // e.fSrcdc = "付";
  4222. // }
  4223. // }
  4224. });
  4225. }
  4226. this.DzfeeList = response.data.feeDoList;
  4227. this.fWbuOptions = response.data.feesList;
  4228. this.queryParams = response.data.tFee;
  4229. this.queryParams.fSystemType = response.data.tFee.fsystemType;
  4230. this.fWbuOptions = response.data.feesList;
  4231. this.fMblnoOptions = response.data.corps;
  4232. this.mainTable = true;
  4233. });
  4234. }
  4235. });
  4236. } else if (Cookies.get("sysType") == 2) {
  4237. getFleet(row.fId).then((response) => {
  4238. this.Operator = response.data.tFee.createBy;
  4239. if (response.data.feeDoList != 0) {
  4240. response.data.feeDoList.map((e) => {
  4241. if (e.fBillingDeadline) {
  4242. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4243. }
  4244. if (e.fBsdate) {
  4245. e.fBsdate = e.fBsdate.slice(0, 10);
  4246. }
  4247. if (e.fChargedate) {
  4248. e.fChargedate = e.fChargedate.slice(0, 10);
  4249. }
  4250. // if (e.fSrcdc) {
  4251. // if (e.fSrcdc == "D") {
  4252. // e.fSrcdc = "收";
  4253. // } else {
  4254. // e.fSrcdc = "付";
  4255. // }
  4256. // }
  4257. });
  4258. }
  4259. this.DzfeeList = response.data.feeDoList;
  4260. this.fWbuOptions = response.data.feesList;
  4261. this.queryParams = response.data.tFee;
  4262. this.fWbuOptions = response.data.feesList;
  4263. this.fMblnoOptions = response.data.corps;
  4264. this.mainTable = true;
  4265. this.disappear = true;
  4266. this.title = "修改财务数据主";
  4267. if (res == 1) {
  4268. this.notChange = true;
  4269. if (this.Operator == this.Lander) {
  4270. this.disappear = false;
  4271. this.reset();
  4272. this.pass = {
  4273. fAmtdr: "", //应收合计
  4274. fAmtcr: "", //应付合计
  4275. fMblno: "", //提单号
  4276. fName: "", //货权方
  4277. fFeesName: "", //结算单位
  4278. fCorpid: "", //结算单位ID
  4279. };
  4280. const fId = row.fId || this.ids;
  4281. getFleet(fId).then((response) => {
  4282. if (response.data.feeDoList != 0) {
  4283. response.data.feeDoList.map((e) => {
  4284. if (e.fBillingDeadline) {
  4285. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4286. }
  4287. if (e.fBsdate) {
  4288. e.fBsdate = e.fBsdate.slice(0, 10);
  4289. }
  4290. if (e.fChargedate) {
  4291. e.fChargedate = e.fChargedate.slice(0, 10);
  4292. }
  4293. // if (e.fSrcdc) {
  4294. // if (e.fSrcdc == "D") {
  4295. // e.fSrcdc = "收";
  4296. // } else {
  4297. // e.fSrcdc = "付";
  4298. // }
  4299. // }
  4300. });
  4301. }
  4302. this.DzfeeList = response.data.feeDoList;
  4303. this.fWbuOptions = response.data.feesList;
  4304. this.queryParams = response.data.tFee;
  4305. this.fWbuOptions = response.data.feesList;
  4306. this.fMblnoOptions = response.data.corps;
  4307. this.mainTable = true;
  4308. });
  4309. } else {
  4310. this.notChange = true;
  4311. }
  4312. } else {
  4313. this.notChange = true;
  4314. this.reset();
  4315. this.pass = {
  4316. fAmtdr: "", //应收合计
  4317. fAmtcr: "", //应付合计
  4318. fMblno: "", //提单号
  4319. fName: "", //货权方
  4320. fFeesName: "", //结算单位
  4321. fCorpid: "", //结算单位ID
  4322. };
  4323. const fId = row.fId || this.ids;
  4324. getFleet(fId).then((response) => {
  4325. if (response.data.feeDoList != 0) {
  4326. response.data.feeDoList.map((e) => {
  4327. if (e.fBillingDeadline) {
  4328. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4329. }
  4330. if (e.fBsdate) {
  4331. e.fBsdate = e.fBsdate.slice(0, 10);
  4332. }
  4333. if (e.fChargedate) {
  4334. e.fChargedate = e.fChargedate.slice(0, 10);
  4335. }
  4336. // if (e.fSrcdc) {
  4337. // if (e.fSrcdc == "D") {
  4338. // e.fSrcdc = "收";
  4339. // } else {
  4340. // e.fSrcdc = "付";
  4341. // }
  4342. // }
  4343. });
  4344. }
  4345. this.DzfeeList = response.data.feeDoList;
  4346. this.fWbuOptions = response.data.feesList;
  4347. this.queryParams = response.data.tFee;
  4348. this.fWbuOptions = response.data.feesList;
  4349. this.fMblnoOptions = response.data.corps;
  4350. this.mainTable = true;
  4351. });
  4352. }
  4353. });
  4354. } else if (Cookies.get("sysType") == 3) {
  4355. getFee(row.fId).then((response) => {
  4356. this.Operator = response.data.tFee.createBy;
  4357. if (response.data.feeDoList != 0) {
  4358. response.data.feeDoList.map((e) => {
  4359. if (e.fBillingDeadline) {
  4360. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4361. }
  4362. if (e.fBsdate) {
  4363. e.fBsdate = e.fBsdate.slice(0, 10);
  4364. }
  4365. if (e.fChargedate) {
  4366. e.fChargedate = e.fChargedate.slice(0, 10);
  4367. }
  4368. });
  4369. }
  4370. this.DzfeeList = response.data.feeDoList;
  4371. this.fWbuOptions = response.data.feesList;
  4372. this.queryParams = response.data.tFee;
  4373. // this.queryParams.fSystemType = response.data.tFee.fsystemType;
  4374. // this.fWbuOptions = response.data.feesList;
  4375. this.fMblnoOptions = response.data.corps;
  4376. this.mainTable = true;
  4377. this.disappear = true;
  4378. this.title = "修改财务数据主";
  4379. if (res == 1) {
  4380. this.notChange = true;
  4381. if (this.Operator == this.Lander) {
  4382. this.disappear = false;
  4383. this.reset();
  4384. this.pass = {
  4385. fAmtdr: "", //应收合计
  4386. fAmtcr: "", //应付合计
  4387. fMblno: "", //提单号
  4388. fName: "", //货权方
  4389. fFeesName: "", //结算单位
  4390. fCorpid: "", //结算单位ID
  4391. };
  4392. const fId = row.fId || this.ids;
  4393. getFee(fId).then((response) => {
  4394. if (response.data.feeDoList != 0) {
  4395. response.data.feeDoList.map((e) => {
  4396. if (e.fBillingDeadline) {
  4397. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4398. }
  4399. if (e.fBsdate) {
  4400. e.fBsdate = e.fBsdate.slice(0, 10);
  4401. }
  4402. if (e.fChargedate) {
  4403. e.fChargedate = e.fChargedate.slice(0, 10);
  4404. }
  4405. });
  4406. }
  4407. this.DzfeeList = response.data.feeDoList;
  4408. this.fWbuOptions = response.data.feesList;
  4409. this.queryParams = response.data.tFee;
  4410. // this.queryParams.fSystemType = response.data.tFee.fsystemType;
  4411. this.fMblnoOptions = response.data.corps;
  4412. this.mainTable = true;
  4413. });
  4414. } else {
  4415. this.notChange = true;
  4416. }
  4417. } else {
  4418. this.notChange = true;
  4419. this.reset();
  4420. this.pass = {
  4421. fAmtdr: "", //应收合计
  4422. fAmtcr: "", //应付合计
  4423. fMblno: "", //提单号
  4424. fName: "", //货权方
  4425. fFeesName: "", //结算单位
  4426. fCorpid: "", //结算单位ID
  4427. };
  4428. const fId = row.fId || this.ids;
  4429. getFee(fId).then((response) => {
  4430. if (response.data.feeDoList != 0) {
  4431. response.data.feeDoList.map((e) => {
  4432. if (e.fBillingDeadline) {
  4433. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4434. }
  4435. if (e.fBsdate) {
  4436. e.fBsdate = e.fBsdate.slice(0, 10);
  4437. }
  4438. if (e.fChargedate) {
  4439. e.fChargedate = e.fChargedate.slice(0, 10);
  4440. }
  4441. });
  4442. }
  4443. this.DzfeeList = response.data.feeDoList;
  4444. this.fWbuOptions = response.data.feesList;
  4445. this.queryParams = response.data.tFee;
  4446. // this.queryParams.fSystemType = response.data.tFee.fsystemType;
  4447. // this.fWbuOptions = response.data.feesList;
  4448. this.fMblnoOptions = response.data.corps;
  4449. this.mainTable = true;
  4450. this.disappear = true;
  4451. });
  4452. }
  4453. });
  4454. }
  4455. },
  4456. /** 修改按钮操作 */
  4457. handleUpdate(row) {
  4458. this.mainTable = true;
  4459. this.notChange = false;
  4460. this.hide = false;
  4461. this.reset();
  4462. this.pass = {
  4463. fAmtdr: "", //应收合计
  4464. fAmtcr: "", //应付合计
  4465. fMblno: "", //提单号
  4466. fName: "", //货权方
  4467. fFeesName: "", //结算单位
  4468. fCorpid: "", //结算单位ID
  4469. };
  4470. const fId = row.fId || this.ids;
  4471. if (Cookies.get("sysType") == 1) {
  4472. getFee(fId).then((response) => {
  4473. this.Operator = response.data.tFee.createBy;
  4474. if (response.data.feeDoList != 0) {
  4475. response.data.feeDoList.map((e) => {
  4476. if (e.fBillingDeadline) {
  4477. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4478. }
  4479. if (e.fBsdate) {
  4480. e.fBsdate = e.fBsdate.slice(0, 10);
  4481. }
  4482. if (e.fChargedate) {
  4483. e.fChargedate = e.fChargedate.slice(0, 10);
  4484. }
  4485. // if (e.fSrcdc) {
  4486. // if (e.fSrcdc == "D") {
  4487. // e.fSrcdc = "收";
  4488. // } else {
  4489. // e.fSrcdc = "付";
  4490. // }
  4491. // }
  4492. });
  4493. }
  4494. this.DzfeeList = response.data.feeDoList;
  4495. this.fWbuOptions = response.data.feesList;
  4496. listCorps().then((response) => {
  4497. this.fMblnoOptions = response;
  4498. });
  4499. // this.fMblnoOptions = response.data.corps;
  4500. this.queryParams = response.data.tFee;
  4501. // this.queryParams.fSystemType = response.data.tFee.fsystemType;
  4502. this.mainTable = true;
  4503. this.title = "修改财务数据主";
  4504. if (this.DzfeeList) {
  4505. this.doNot = true;
  4506. } else {
  4507. this.doNot = false;
  4508. }
  4509. });
  4510. } else if (Cookies.get("sysType") == 2) {
  4511. getFleet(fId).then((response) => {
  4512. this.Operator = response.data.tFee.createBy;
  4513. if (response.data.feeDoList != 0) {
  4514. response.data.feeDoList.map((e) => {
  4515. if (e.fBillingDeadline) {
  4516. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4517. }
  4518. if (e.fBsdate) {
  4519. e.fBsdate = e.fBsdate.slice(0, 10);
  4520. }
  4521. if (e.fChargedate) {
  4522. e.fChargedate = e.fChargedate.slice(0, 10);
  4523. }
  4524. // if (e.fSrcdc) {
  4525. // if (e.fSrcdc == "D") {
  4526. // e.fSrcdc = "收";
  4527. // } else {
  4528. // e.fSrcdc = "付";
  4529. // }
  4530. // }
  4531. });
  4532. }
  4533. this.DzfeeList = response.data.feeDoList;
  4534. this.fWbuOptions = response.data.feesList;
  4535. this.queryParams = response.data.tFee;
  4536. this.fMblnoOptions = response.data.corps;
  4537. this.mainTable = true;
  4538. this.title = "修改财务数据主";
  4539. if (this.DzfeeList) {
  4540. this.doNot = true;
  4541. } else {
  4542. this.doNot = false;
  4543. }
  4544. });
  4545. } else if (Cookies.get("sysType") == 3) {
  4546. getFee(fId).then((response) => {
  4547. this.Operator = response.data.tFee.createBy;
  4548. if (response.data.feeDoList != 0) {
  4549. response.data.feeDoList.map((e) => {
  4550. if (e.fBillingDeadline) {
  4551. e.fBillingDeadline = e.fBillingDeadline.slice(0, 10);
  4552. }
  4553. if (e.fBsdate) {
  4554. e.fBsdate = e.fBsdate.slice(0, 10);
  4555. }
  4556. if (e.fChargedate) {
  4557. e.fChargedate = e.fChargedate.slice(0, 10);
  4558. }
  4559. });
  4560. }
  4561. this.DzfeeList = response.data.feeDoList;
  4562. this.fWbuOptions = response.data.feesList;
  4563. this.queryParams = response.data.tFee;
  4564. // this.queryParams.fSystemType = response.data.tFee.fsystemType;
  4565. this.fMblnoOptions = response.data.corps;
  4566. this.mainTable = true;
  4567. this.title = "修改财务数据主";
  4568. if (this.DzfeeList) {
  4569. this.doNot = true;
  4570. } else {
  4571. this.doNot = false;
  4572. }
  4573. });
  4574. }
  4575. },
  4576. /** 远程模糊查询用户 */
  4577. corpsRemoteMethod(name) {
  4578. // if (name == null || name === "") {
  4579. // return false;
  4580. // }
  4581. let queryParams = { fName: name };
  4582. listCorps(queryParams).then((response) => {
  4583. this.fMblnoOptions = response;
  4584. this.KHblnoOptions = response;
  4585. });
  4586. },
  4587. /** 提交按钮 */
  4588. submitForm(type, res) {
  4589. this.$refs["ruless"].validate((valid) => {
  4590. if (valid) {
  4591. if (!this.queryParams.fId || this.queryParams.fId == null) {
  4592. // this.queryParams.fBillstatus = "1";
  4593. let formData = new window.FormData();
  4594. formData.append("tFee", JSON.stringify(this.queryParams));
  4595. formData.append("tFeeDo", JSON.stringify(this.DzfeeList));
  4596. if (type == 1) {
  4597. updateFee(formData).then((response) => {
  4598. this.queryParams = response.data.tFee;
  4599. // this.queryParams.fSystemType = response.data.tFee.fsystemType;
  4600. this.msgSuccess("新增成功");
  4601. // this.DzfeeList = []
  4602. // this.open = false;
  4603. this.getList();
  4604. });
  4605. } else if (type == 2) {
  4606. addFleet(formData).then((response) => {
  4607. this.queryParams = response.data.tFee;
  4608. this.msgSuccess("新增成功");
  4609. // this.DzfeeList = []
  4610. // this.open = false;
  4611. this.getList();
  4612. });
  4613. } else if (type == 3 || this.typevalue == 3) {
  4614. formData.append("billsType", "KHDZ");
  4615. updateFee(formData).then((response) => {
  4616. this.queryParams = response.data.tFee;
  4617. this.msgSuccess("操作成功");
  4618. if (res === 0) {
  4619. this.mainTable = true;
  4620. } else if (res == undefined) {
  4621. this.mainTable = true;
  4622. } else {
  4623. this.mainTable = false;
  4624. }
  4625. this.getList();
  4626. });
  4627. }
  4628. } else {
  4629. this.pass.fAmtcr = 0;
  4630. this.pass.fAmtdr = 0;
  4631. for (let item in this.DzfeeList) {
  4632. this.pass.fAmtcr += Number(this.DzfeeList[item].fAmt);
  4633. this.pass.fAmtdr += Number(this.DzfeeList[item].fAmtdr);
  4634. }
  4635. this.queryParams.fAmtcr = Number(this.pass.fAmtcr).toFixed(2);
  4636. this.queryParams.fAmtdr = Number(this.pass.fAmtdr).toFixed(2);
  4637. // this.pass.fAmtcr.toFixed(2);
  4638. this.queryParams.fBillstatus = "1";
  4639. let formData = new window.FormData();
  4640. formData.append("tFee", JSON.stringify(this.queryParams));
  4641. formData.append("tFeeDo", JSON.stringify(this.DzfeeList));
  4642. if (type == 1) {
  4643. addFee(formData).then((response) => {
  4644. this.msgSuccess("修改成功");
  4645. this.getList();
  4646. });
  4647. } else if (type == 2) {
  4648. addFleet(formData).then((response) => {
  4649. this.msgSuccess("修改成功");
  4650. this.getList();
  4651. });
  4652. } else if (type == 3 || this.typevalue == 3) {
  4653. formData.append("billsType", "KHDZ");
  4654. addFee(formData).then((response) => {
  4655. this.msgSuccess("操作成功");
  4656. if (res === 0) {
  4657. this.mainTable = true;
  4658. } else if (res == undefined) {
  4659. this.mainTable = true;
  4660. } else {
  4661. this.mainTable = false;
  4662. }
  4663. this.getList();
  4664. });
  4665. }
  4666. }
  4667. }
  4668. });
  4669. },
  4670. /** 删除按钮操作 */
  4671. handleDelete(row) {
  4672. const fIds = row.fId || this.ids;
  4673. let tips = "";
  4674. if (Cookies.get("sysType") == 1) {
  4675. detailFee(fIds).then((res) => {
  4676. switch (res.msg) {
  4677. case "0": {
  4678. this.$message.error("当前数据已被其他操作员操作,请刷新页面");
  4679. break;
  4680. }
  4681. case "1": {
  4682. tips = "当前主表有数据,从表无数据,确认是否删除?";
  4683. this.delete_s(fIds, tips);
  4684. break;
  4685. }
  4686. case "2": {
  4687. tips = "当前主表有数据,从表有数据,确认是否删除?";
  4688. this.delete_s(fIds, tips);
  4689. break;
  4690. }
  4691. default: {
  4692. return this.$message.error("未知错误,无状态");
  4693. }
  4694. }
  4695. });
  4696. } else if (Cookies.get("sysType") == 2) {
  4697. detailFleet(fIds).then((res) => {
  4698. switch (res.msg) {
  4699. case "0": {
  4700. this.$message.error("当前数据已被其他操作员操作,请刷新页面");
  4701. break;
  4702. }
  4703. case "1": {
  4704. tips = "当前主表有数据,从表无数据,确认是否删除?";
  4705. this.delete_s(fIds, tips);
  4706. break;
  4707. }
  4708. case "2": {
  4709. tips = "当前主表有数据,从表有数据,确认是否删除?";
  4710. this.delete_s(fIds, tips);
  4711. break;
  4712. }
  4713. default: {
  4714. return this.$message.error("未知错误,无状态");
  4715. }
  4716. }
  4717. });
  4718. } else if (Cookies.get("sysType") == 3) {
  4719. detailFee(fIds).then((res) => {
  4720. switch (res.msg) {
  4721. case "0": {
  4722. this.$message.error("当前数据已被其他操作员操作,请刷新页面");
  4723. break;
  4724. }
  4725. case "1": {
  4726. tips = "当前主表有数据,从表无数据,确认是否删除?";
  4727. this.delete_s(fIds, tips);
  4728. break;
  4729. }
  4730. case "2": {
  4731. tips = "当前主表有数据,从表有数据,确认是否删除?";
  4732. this.delete_s(fIds, tips);
  4733. break;
  4734. }
  4735. default: {
  4736. return this.$message.error("未知错误,无状态");
  4737. }
  4738. }
  4739. });
  4740. }
  4741. },
  4742. delete_s(fIds, tips) {
  4743. this.$confirm(tips, "警告", {
  4744. confirmButtonText: "确定",
  4745. cancelButtonText: "取消",
  4746. type: "warning",
  4747. })
  4748. .then(function () {
  4749. if (Cookies.get("sysType") == 1) {
  4750. return delFee(fIds);
  4751. } else if (Cookies.get("sysType") == 2) {
  4752. return delFleet(fIds);
  4753. } else if (Cookies.get("sysType") == 3) {
  4754. return delFee(fIds);
  4755. }
  4756. })
  4757. .then(() => {
  4758. this.getList();
  4759. this.msgSuccess("删除成功");
  4760. });
  4761. },
  4762. // 远程模糊查询费用名称
  4763. fWRemoteMethod(name) {
  4764. this.fWbuOptions = [];
  4765. if (name == null || name === "") {
  4766. return false;
  4767. }
  4768. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  4769. listFees(queryParams).then((response) => {
  4770. this.fWbuOptions = response.rows;
  4771. });
  4772. },
  4773. /** 导出按钮操作 */
  4774. handleExport() {
  4775. const queryParams = this.queryParams;
  4776. this.$confirm("是否确认导出所有财务数据主数据项?", "警告", {
  4777. confirmButtonText: "确定",
  4778. cancelButtonText: "取消",
  4779. type: "warning",
  4780. })
  4781. .then(function () {
  4782. if (Cookies.get("sysType") == 2) {
  4783. return contrastExport(queryParams);
  4784. } else {
  4785. return exportFee(queryParams);
  4786. }
  4787. })
  4788. .then((response) => {
  4789. this.download(response.msg);
  4790. });
  4791. },
  4792. exportData() {
  4793. // 在这里判断筛选DzfeeList={}
  4794. const DzfeeList = this.DzfeeList;
  4795. this.$confirm("是否确认导出所有财务数据主数据项?", "警告", {
  4796. confirmButtonText: "确定",
  4797. cancelButtonText: "取消",
  4798. type: "warning",
  4799. })
  4800. .then(function () {
  4801. return;
  4802. })
  4803. .then(function () {
  4804. this.download(response.msg);
  4805. });
  4806. },
  4807. //清空一行
  4808. deleteRow(index, rows) {
  4809. this.queryParams.fAmtdr = 0;
  4810. this.queryParams.fAmtcr = 0;
  4811. rows.splice(index, 1);
  4812. for (let item in this.DzfeeList) {
  4813. this.queryParams.fAmtcr = this.DzfeeList[item].fAmt;
  4814. this.queryParams.fAmtdr = this.DzfeeList[item].fAmtdr;
  4815. }
  4816. if (this.DzfeeList == 0) {
  4817. this.doNot = false;
  4818. } else {
  4819. this.doNot = true;
  4820. }
  4821. },
  4822. },
  4823. };
  4824. </script>
  4825. <style lang="scss" scoped>
  4826. .tabSetting {
  4827. display: flex;
  4828. justify-content: flex-end;
  4829. }
  4830. .listStyle {
  4831. display: flex;
  4832. border-top: 1px solid #dcdfe6;
  4833. border-left: 1px solid #dcdfe6;
  4834. border-right: 1px solid #dcdfe6;
  4835. }
  4836. .listStyle:last-child {
  4837. border-bottom: 1px solid #dcdfe6;
  4838. }
  4839. .progress {
  4840. display: flex;
  4841. align-items: center;
  4842. padding: 2px;
  4843. background-color: rgba(0, 0, 0, 0.05);
  4844. height: 100%;
  4845. }
  4846. .avue-crud__dialog__header {
  4847. display: -webkit-box;
  4848. display: -ms-flexbox;
  4849. display: flex;
  4850. -webkit-box-align: center;
  4851. -ms-flex-align: center;
  4852. align-items: center;
  4853. -webkit-box-pack: justify;
  4854. -ms-flex-pack: justify;
  4855. justify-content: space-between;
  4856. }
  4857. .el-dialog__title {
  4858. color: rgba(0, 0, 0, 0.85);
  4859. font-weight: 500;
  4860. word-wrap: break-word;
  4861. }
  4862. .avue-crud__dialog__menu {
  4863. padding-right: 20px;
  4864. float: left;
  4865. }
  4866. .avue-crud__dialog__menu i {
  4867. color: #909399;
  4868. font-size: 15px;
  4869. }
  4870. .el-icon-full-screen {
  4871. cursor: pointer;
  4872. }
  4873. .el-icon-full-screen:before {
  4874. content: "\e719";
  4875. }
  4876. </style>
  4877. <style lang="scss">
  4878. .el-dialog__body {
  4879. padding: 0 20px 30px 20px;
  4880. }
  4881. </style>