index.vue 144 KB

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