index.vue 118 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716
  1. <template>
  2. <div class="app-container">
  3. <div v-show="mainTable == false">
  4. <el-form
  5. :model="tableFilter"
  6. ref="queryForm"
  7. :inline="true"
  8. v-show="showSearch"
  9. label-width="68px"
  10. >
  11. <el-row>
  12. <el-col :span="6">
  13. <el-form-item label="系统编号" prop="fBillno">
  14. <el-input
  15. v-model="tableFilter.fBillno"
  16. placeholder="请输入系统编号"
  17. clearable
  18. size="small"
  19. style="width: 200px"
  20. @keyup.enter.native="handleQuery"
  21. />
  22. </el-form-item>
  23. </el-col>
  24. <el-col :span="6">
  25. <el-form-item label="货权方" prop="fCtrlcorpid">
  26. <el-input
  27. v-model="tableFilter.fCtrlcorpid"
  28. placeholder="请输入货权方"
  29. clearable
  30. size="small"
  31. style="width: 200px"
  32. @keyup.enter.native="handleQuery"
  33. />
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="6">
  37. <el-form-item label="结算单位" prop="fCorpid">
  38. <el-select
  39. v-model="tableFilter.fCorpid"
  40. filterable
  41. remote
  42. clearable
  43. size="small"
  44. style="width: 200px"
  45. @keyup.enter.native="handleQuery"
  46. :remote-method="corpsRemoteMethod"
  47. placeholder="请输入结算单位"
  48. >
  49. <el-option
  50. v-for="(dict, index) in fMblnoOptions"
  51. :key="index.fId"
  52. :label="dict.fName"
  53. :value="dict.fId"
  54. ></el-option>
  55. </el-select>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :span="6">
  59. <el-form-item label="状态" prop="fBillstatus">
  60. <el-select
  61. v-model="tableFilter.fBillstatus"
  62. placeholder="请选择状态"
  63. clearable
  64. style="width: 200px"
  65. >
  66. <el-option label="保存" value="1"/>
  67. <el-option label="暂存" value="2"/>
  68. <el-option label="审批驳回" value="3"/>
  69. <el-option label="提交审核" value="4"/>
  70. <el-option label="审批中" value="5"/>
  71. <el-option label="审核完成" value="6"/>
  72. </el-select>
  73. </el-form-item>
  74. </el-col>
  75. </el-row>
  76. <el-collapse-transition>
  77. <div v-show="show">
  78. <el-row>
  79. <el-col :span="6">
  80. <el-form-item label="实付合计" prop="amount">
  81. <el-input
  82. v-model="tableFilter.firstMoney"
  83. placeholder="金额区间"
  84. style="width: 95px;margin-right: 10px"
  85. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  86. />
  87. <el-input
  88. v-model="tableFilter.lastMoney"
  89. placeholder="金额区间"
  90. @change="changeMoney"
  91. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  92. style="width: 95px"
  93. />
  94. </el-form-item>
  95. </el-col>
  96. <el-col :span="6">
  97. <el-form-item label="备注" prop="fRemarks">
  98. <el-input
  99. v-model="tableFilter.fRemarks"
  100. placeholder="请输入提单号"
  101. clearable
  102. style="width: 200px"
  103. @keyup.enter.native="handleQuery"
  104. />
  105. </el-form-item>
  106. </el-col>
  107. <el-col :span="12">
  108. <el-form-item label="申请日期" prop="timeInterval">
  109. <el-date-picker
  110. type="daterange"
  111. size="small"
  112. style="width: 240px"
  113. v-model="tableFilter.timeInterval"
  114. start-placeholder="开始日期"
  115. end-placeholder="结束日期"
  116. value-format="yyyy-MM-dd"
  117. :default-time="['00:00:00', '23:59:59']"
  118. >
  119. </el-date-picker>
  120. </el-form-item>
  121. </el-col>
  122. </el-row>
  123. </div>
  124. </el-collapse-transition>
  125. </el-form>
  126. <el-row :gutter="10" class="mb8">
  127. <el-col :span="1.5">
  128. <el-button
  129. type="primary"
  130. icon="el-icon-plus"
  131. size="mini"
  132. @click="handleAdd"
  133. v-hasPermi="['financial:outputMakeOut:add']"
  134. >新增
  135. </el-button>
  136. </el-col>
  137. <el-col :span="1.5">
  138. <el-button
  139. type="success"
  140. icon="el-icon-edit"
  141. size="mini"
  142. :disabled="single"
  143. @click="handleUpdate"
  144. v-hasPermi="['financial:outputMakeOut:add']"
  145. >修改
  146. </el-button>
  147. </el-col>
  148. <el-col :span="1.5">
  149. <el-button
  150. type="warning"
  151. icon="el-icon-download"
  152. size="mini"
  153. @click="handleExport"
  154. v-hasPermi="['finance:charge:export']"
  155. >导出
  156. </el-button>
  157. </el-col>
  158. <div class="tabSetting">
  159. <div style="margin-right: 20px">
  160. <el-button
  161. type="cyan"
  162. icon="el-icon-search"
  163. size="mini"
  164. @click="handleQuery"
  165. >搜索
  166. </el-button
  167. >
  168. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  169. >重置
  170. </el-button
  171. >
  172. <el-button
  173. v-show="show"
  174. @click="show = !show"
  175. icon="el-icon-arrow-up"
  176. size="mini"
  177. >展开
  178. </el-button
  179. >
  180. <el-button
  181. v-show="!show"
  182. @click="show = !show"
  183. icon="el-icon-arrow-down"
  184. size="mini"
  185. >展开
  186. </el-button
  187. >
  188. </div>
  189. <right-toolbar
  190. :showSearch.sync="showSearch"
  191. @queryTable="getList"
  192. ></right-toolbar>
  193. <div style="margin: 0 12px">
  194. <el-button
  195. icon="el-icon-setting"
  196. size="mini"
  197. circle
  198. @click="showSetting = !showSetting"
  199. ></el-button>
  200. </div>
  201. </div>
  202. </el-row>
  203. <el-dialog
  204. title="自定义列显示"
  205. :visible.sync="showSetting"
  206. width="700px"
  207. v-dialogDrag
  208. >
  209. <template slot="title">
  210. <div class="avue-crud__dialog__header">
  211. <span class="el-dialog__title">
  212. <span
  213. style="
  214. display: inline-block;
  215. width: 3px;
  216. height: 20px;
  217. margin-right: 5px;
  218. float: left;
  219. margin-top: 2px;
  220. "
  221. ></span>
  222. </span>
  223. </div>
  224. </template>
  225. <div>配置排序列数据(拖动调整顺序)</div>
  226. <div style="margin-left: 17px">
  227. <el-checkbox
  228. v-model="allCheck"
  229. label="全选"
  230. @change="allChecked"
  231. ></el-checkbox>
  232. </div>
  233. <div style="padding: 4px; display: flex; justify-content: center">
  234. <draggable
  235. v-model="setRowList"
  236. group="site"
  237. animation="300"
  238. @start="onStart"
  239. @end="onEnd"
  240. handle=".indraggable"
  241. >
  242. <transition-group>
  243. <div
  244. v-for="item in setRowList"
  245. :key="item.surface"
  246. class="listStyle"
  247. >
  248. <div style="width: 500px" class="indraggable">
  249. <div class="progress" :style="{ width: item.width + 'px' }">
  250. <el-checkbox
  251. :label="item.name"
  252. v-model="item.checked"
  253. :true-label="0"
  254. :false-label="1"
  255. >{{ item.name }}
  256. </el-checkbox>
  257. </div>
  258. </div>
  259. <el-input-number
  260. v-model.number="item.width"
  261. controls-position="right"
  262. :min="1"
  263. :max="500"
  264. size="mini"
  265. ></el-input-number>
  266. </div>
  267. </transition-group>
  268. </draggable>
  269. </div>
  270. <span slot="footer" class="dialog-footer">
  271. <el-button @click="showSetting = false">取 消</el-button>
  272. <el-button @click="delRow()" type="danger">重 置</el-button>
  273. <el-button type="primary" @click="save()">确 定</el-button>
  274. </span>
  275. </el-dialog>
  276. <el-table
  277. v-loading="loading"
  278. :data="chargeList"
  279. @selection-change="handleSelectionChange"
  280. show-summary
  281. :summary-method="listTotal"
  282. >
  283. <el-table-column type="selection" width="100" align="center"/>
  284. <el-table-column
  285. label="序号"
  286. type="index"
  287. width="55"
  288. align="center"
  289. fixed
  290. />
  291. <el-table-column
  292. v-for="(item, index) in getRowList"
  293. :key="index"
  294. :label="item.name"
  295. :width="item.width"
  296. :prop="item.label"
  297. align="center"
  298. :show-overflow-tooltip="true"
  299. sortable
  300. :fixed="item.fixed"
  301. />
  302. <el-table-column
  303. label="操作"
  304. align="center"
  305. class-name="small-padding fixed-width"
  306. min-width="180"
  307. fixed="right"
  308. >
  309. <template slot-scope="scope">
  310. <el-button
  311. size="mini"
  312. type="text"
  313. icon="el-icon-view"
  314. @click="check(scope.row, 0)"
  315. v-hasPermi="['finance:outputMakeOut:query']"
  316. >查看
  317. </el-button
  318. >
  319. <el-button
  320. size="mini"
  321. type="text"
  322. icon="el-icon-edit"
  323. @click="handleUpdate(scope.row)"
  324. v-hasPermi="['financial:outputMakeOut:add']"
  325. >修改
  326. </el-button>
  327. <el-button
  328. size="mini"
  329. type="text"
  330. icon="el-icon-delete"
  331. @click="handleDelete(scope.row)"
  332. v-hasPermi="['finance:outputMakeOut:remove']"
  333. >删除
  334. </el-button>
  335. </template>
  336. </el-table-column>
  337. </el-table>
  338. <pagination
  339. v-show="total > 0"
  340. :total="total"
  341. :page.sync="tableFilter.pageNum"
  342. :limit.sync="tableFilter.pageSize"
  343. @pagination="getList"
  344. />
  345. </div>
  346. <div v-if="mainTable == true">
  347. <el-form
  348. :model="queryParams"
  349. :rules="ruless"
  350. ref="ruless"
  351. :inline="true"
  352. v-show="showSearch"
  353. label-width="78px"
  354. >
  355. <el-form-item label="货权方" prop="fCtrlcorpid">
  356. <el-input
  357. v-model="queryParams.fCtrlcorpid"
  358. placeholder="请输入货权方"
  359. clearable
  360. size="small"
  361. :disabled="notChange"
  362. style="width: 200px"
  363. @keyup.enter.native="handleQuery"
  364. />
  365. </el-form-item>
  366. <el-form-item label="结算单位" prop="fCorpid">
  367. <el-select
  368. v-model="queryParams.fCorpid"
  369. filterable
  370. remote
  371. clearable
  372. size="small"
  373. style="width: 200px"
  374. @keyup.enter.native="handleQuery"
  375. :remote-method="corpsRemoteMethod"
  376. :disabled="doNot"
  377. placeholder="请输入结算单位"
  378. >
  379. <el-option
  380. v-for="(dict, index) in fMblnoOptions"
  381. :key="index.fId"
  382. :label="dict.fName"
  383. :value="dict.fId"
  384. ></el-option>
  385. </el-select>
  386. </el-form-item>
  387. <el-form-item label="申请日期" prop="fAccbilldate">
  388. <el-date-picker
  389. clearable
  390. size="small"
  391. style="width: 200px"
  392. v-model="queryParams.fAccbilldate"
  393. type="date"
  394. value-format="yyyy-MM-dd"
  395. placeholder="选择账单日期"
  396. :disabled="notChange"
  397. >
  398. </el-date-picker>
  399. </el-form-item>
  400. <el-form-item label="系统编号" prop="fBillno">
  401. <el-input
  402. v-model="queryParams.fBillno"
  403. placeholder="请输入系统编号"
  404. clearable
  405. disabled
  406. style="width: 200px"
  407. size="small"
  408. @keyup.enter.native="handleQuery"
  409. />
  410. </el-form-item>
  411. <el-form-item label="收费方式" prop="chargingMethod">
  412. <el-select
  413. v-model="queryParams.chargingMethod"
  414. placeholder="请选择收费方式"
  415. clearable
  416. :disabled="notChange"
  417. style="width: 200px"
  418. size="small"
  419. >
  420. <el-option
  421. v-for="(dict, index) in methodOptions"
  422. :key="index.dictValue"
  423. :label="dict.dictLabel"
  424. :value="dict.dictValue"
  425. ></el-option>
  426. </el-select>
  427. </el-form-item>
  428. <el-form-item label="收款银行" prop="bank">
  429. <el-input
  430. v-model="queryParams.bank"
  431. placeholder="请输入收款银行"
  432. clearable
  433. size="small"
  434. style="width: 200px"
  435. :disabled="notChange"
  436. />
  437. </el-form-item>
  438. <el-form-item label="发票号" prop="invoiceNo">
  439. <el-input
  440. v-model="queryParams.invoiceNo"
  441. placeholder="请输入发票号"
  442. clearable
  443. size="small"
  444. style="width: 200px"
  445. :disabled="notChange"
  446. />
  447. </el-form-item>
  448. <el-form-item label="水单号" prop="waterBillNo">
  449. <el-input
  450. v-model="queryParams.waterBillNo"
  451. placeholder="请输入收款银行"
  452. clearable
  453. size="small"
  454. style="width: 200px"
  455. :disabled="notChange"
  456. />
  457. </el-form-item>
  458. <el-form-item label="备注" prop="fRemarks">
  459. <el-input
  460. v-model="queryParams.fRemarks"
  461. placeholder="请输入备注"
  462. clearable
  463. size="small"
  464. style="width: 200px"
  465. :disabled="notChange"
  466. @keyup.enter.native="handleQuery"
  467. />
  468. </el-form-item>
  469. <!-- <el-form-item label="业务类型" prop="fSystemType">-->
  470. <!-- <el-select-->
  471. <!-- v-model="queryParams.fSystemType"-->
  472. <!-- placeholder="请选择业务类型"-->
  473. <!-- size="small"-->
  474. <!-- disabled-->
  475. <!-- style="width: 200px"-->
  476. <!-- >-->
  477. <!-- <el-option-->
  478. <!-- v-for="item in typeoptions"-->
  479. <!-- :key="item.value"-->
  480. <!-- :label="item.label"-->
  481. <!-- :value="item.value"-->
  482. <!-- >-->
  483. <!-- </el-option>-->
  484. <!-- </el-select>-->
  485. <!-- </el-form-item>-->
  486. </el-form>
  487. <div style="width: 100%; display: flex; justify-content: space-between">
  488. <div style="display: flex">
  489. <el-button icon="el-icon-arrow-left" type="danger" size="mini" @click="cancel"
  490. >返回列表
  491. </el-button
  492. >
  493. <el-button
  494. type="warning"
  495. size="mini"
  496. @click="charGe"
  497. :disabled="notChange"
  498. >检索
  499. </el-button
  500. >
  501. <el-button type="warning" size="mini" @click="handleExportItems"
  502. >导出
  503. </el-button
  504. >
  505. <el-button type="success" @click="submitForm(0)" size="mini" :disabled="notChange"
  506. >保 存
  507. </el-button
  508. >
  509. <el-button @click="addPage" type="primary" size="mini">新 增</el-button>
  510. </div>
  511. <div style="margin: 0 12px">
  512. <el-button
  513. icon="el-icon-setting"
  514. size="mini"
  515. circle
  516. @click="feeInfo ? showSetting2 = !showSetting2 : showSetting3 = !showSetting3"
  517. ></el-button>
  518. </div>
  519. </div>
  520. <el-dialog
  521. title="自定义列显示"
  522. :visible.sync="feeInfo ? showSetting2 : showSetting3"
  523. width="700px"
  524. v-dialogDrag
  525. :before-close="handleClose"
  526. append-to-body
  527. >
  528. <template slot="title">
  529. <div class="avue-crud__dialog__header">
  530. <span class="el-dialog__title">
  531. <span
  532. style="
  533. display: inline-block;
  534. width: 3px;
  535. height: 20px;
  536. margin-right: 5px;
  537. float: left;
  538. margin-top: 2px;
  539. "
  540. ></span>
  541. </span>
  542. </div>
  543. </template>
  544. <div>配置排序列数据(拖动调整顺序)</div>
  545. <div style="margin-left: 17px">
  546. <el-checkbox
  547. v-model="feeInfo ? allCheck2 : allCheck3"
  548. label="全选"
  549. @change="feeInfo ? allChecked2 : allChecked3"
  550. ></el-checkbox>
  551. </div>
  552. <div style="padding: 4px; display: flex; justify-content: center">
  553. <draggable
  554. v-show="feeInfo == true"
  555. v-model="setRowList2"
  556. group="site"
  557. animation="300"
  558. @start="onStart"
  559. @end="onEnd"
  560. handle=".indraggable"
  561. >
  562. <transition-group>
  563. <div
  564. v-for="item in setRowList2"
  565. :key="item.surface"
  566. class="listStyle"
  567. >
  568. <div style="width: 500px" class="indraggable">
  569. <div class="progress" :style="{ width: item.width + 'px' }">
  570. <el-checkbox
  571. :label="item.name"
  572. v-model="item.checked"
  573. :true-label="0"
  574. :false-label="1"
  575. >{{ item.name }}
  576. </el-checkbox>
  577. </div>
  578. </div>
  579. <el-input-number
  580. v-model.number="item.width"
  581. controls-position="right"
  582. :min="1"
  583. :max="500"
  584. size="mini"
  585. ></el-input-number>
  586. </div>
  587. </transition-group>
  588. </draggable>
  589. <draggable
  590. v-show="feeInfo == false"
  591. v-model="setRowList3"
  592. group="site"
  593. animation="300"
  594. @start="onStart"
  595. @end="onEnd"
  596. handle=".indraggable"
  597. >
  598. <transition-group>
  599. <div
  600. v-for="item in setRowList3"
  601. :key="item.surface"
  602. class="listStyle"
  603. >
  604. <div style="width: 500px" class="indraggable">
  605. <div class="progress" :style="{ width: item.width + 'px' }">
  606. <el-checkbox
  607. :label="item.name"
  608. v-model="item.checked"
  609. :true-label="0"
  610. :false-label="1"
  611. >{{ item.name }}
  612. </el-checkbox>
  613. </div>
  614. </div>
  615. <el-input-number
  616. v-model.number="item.width"
  617. controls-position="right"
  618. :min="1"
  619. :max="500"
  620. size="mini"
  621. ></el-input-number>
  622. </div>
  623. </transition-group>
  624. </draggable>
  625. </div>
  626. <span slot="footer" class="dialog-footer">
  627. <el-button @click="feeInfo ? showSetting2 = false : showSetting3 = false">取 消</el-button>
  628. <el-button @click="feeInfo ? delRow2() : delRow3()" type="danger">重 置</el-button>
  629. <el-button type="primary" @click="feeInfo ? save2() : save3()">确 定</el-button>
  630. </span>
  631. </el-dialog>
  632. <el-menu
  633. :default-active="activeIndex"
  634. class="el-menu-demo"
  635. mode="horizontal"
  636. @select="handleSelect"
  637. text-color="#000"
  638. active-text-color="#ffd04b"
  639. style="display: flex;float: left"
  640. >
  641. <el-menu-item index="1">费用信息</el-menu-item>
  642. <el-menu-item index="2">发票信息</el-menu-item>
  643. </el-menu>
  644. <el-button
  645. type="success"
  646. size="mini"
  647. @click="addList"
  648. :disabled="notChange"
  649. style="float: right;margin-top: 10px"
  650. v-if="feeInfo == false"
  651. >新 行
  652. </el-button>
  653. <el-table
  654. v-if="feeInfo == true"
  655. v-loading="loading"
  656. :data="increase_s"
  657. @selection-change="handleSelectionChange_s"
  658. show-summary
  659. :summary-method="listTotal"
  660. >
  661. <el-table-column type="selection" width="60" align="center"/>
  662. <el-table-column label="序号" type="index" align="center"/>
  663. <el-table-column
  664. v-for="(item, index) in getRowList2"
  665. :key="index"
  666. :label="item.name"
  667. :width="item.width"
  668. :prop="item.label"
  669. align="center"
  670. :show-overflow-tooltip="true"
  671. sortable
  672. :fixed="item.fixed"
  673. >
  674. <template slot-scope="scope">
  675. <span v-if="item.label == 'fBsdate'">{{scope.row.fBsdate ? scope.row.fBsdate.slice(0, 10) : scope.row.fReviewDate}}</span>
  676. <span v-if="item.label == 'fSrcdc' && login == 3">{{ scope.row.fSrcdc == 'D' ? '收' : '付' }}</span>
  677. <span v-else>{{ scope.row[item.label] }}</span>
  678. </template>
  679. </el-table-column>
  680. <!-- <el-table-column label="提单号" align="center" prop="fMblno" />
  681. <el-table-column label="存货单号" align="center" prop="fBscorpno" />
  682. <el-table-column label="品名" align="center" prop="fProductName" />
  683. <el-table-column label="业务日期" align="center" prop="fBsdate">
  684. <template slot-scope="scope" v-if="scope.row.fBsdate">
  685. <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>
  686. </template>
  687. </el-table-column>
  688. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  689. <el-table-column label="收/付" align="center" prop="fSrcdc">
  690. <template slot-scope="scope">
  691. <span v-if="scope.row.fSrcdc == 'D'">收</span>
  692. <span v-else-if="scope.row.fSrcdc == 'C'">付</span>
  693. </template>
  694. </el-table-column>
  695. <el-table-column label="业务类型" align="center" prop="fBilltype">
  696. <template slot-scope="scope">
  697. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  698. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  699. <span v-else>{{ scope.row.fBilltype }}</span>
  700. </template>
  701. </el-table-column>
  702. <el-table-column label="作业类型" align="center" prop="fBusinessType" />
  703. <el-table-column label="金额" align="center" prop="fAmtdr" />
  704. <el-table-column label="本次金额" align="center" prop="fAmt" />
  705. <el-table-column label="备注" align="center" prop="fRemarks" /> -->
  706. <el-table-column
  707. label="操作"
  708. align="center"
  709. class-name="small-padding fixed-width"
  710. >
  711. <template slot-scope="scope">
  712. <el-button
  713. size="mini"
  714. type="text"
  715. icon="el-icon-delete"
  716. @click.native.prevent="deleteRow(scope.$index, increase_s)"
  717. :disabled="notChange"
  718. v-if="!scope.row.updateMessage"
  719. >删除
  720. </el-button>
  721. </template>
  722. </el-table-column>
  723. </el-table>
  724. <el-table
  725. v-if="feeInfo == false"
  726. v-loading="loading"
  727. :data="invoiceList"
  728. @selection-change="handleSelectionChange_s"
  729. show-summary
  730. :summary-method="listTotal"
  731. >
  732. <el-table-column type="selection" width="55" align="center"/>
  733. <el-table-column label="序号" type="index" align="center"/>
  734. <el-table-column
  735. v-for="(item, index) in getRowList3"
  736. :key="index"
  737. :label="item.name"
  738. :width="item.width"
  739. :prop="item.label"
  740. align="center"
  741. sortable
  742. :fixed="item.fixed"
  743. >
  744. <template slot-scope="scope">
  745. <el-select
  746. :disabled="notChange"
  747. v-model="scope.row.fFeeName"
  748. @change="changeId"
  749. v-if="item.label == 'fFeeName'"
  750. >
  751. <el-option
  752. v-for="dict in fDNameOptions"
  753. :key="dict.fId"
  754. :label="dict.fName"
  755. :value="dict.fId"
  756. ></el-option>
  757. </el-select>
  758. <el-input :disabled="notChange" v-model="scope.row.fModel" v-if="item.label == 'fModel'"/>
  759. <el-select :disabled="notChange" v-model="scope.row.fSbu" v-if="item.label == 'fSbu'">
  760. <el-option
  761. v-for="dict in unitOptions"
  762. :key="dict.dictValue"
  763. :label="dict.dictLabel"
  764. :value="dict.dictValue"
  765. />
  766. </el-select>
  767. <el-input :disabled="notChange" v-model="scope.row.fNumber" @change="priceTotal"
  768. v-if="item.label == 'fNumber'"
  769. />
  770. <el-input :disabled="notChange" v-model="scope.row.fUnitprice" @change="priceTotal"
  771. v-if="item.label == 'fUnitprice'"
  772. />
  773. <el-input :disabled="notChange" v-model="scope.row.fMoney" disabled v-if="item.label == 'fMoney'"/>
  774. <el-input :disabled="notChange" v-model="scope.row.fTaxrate" @change="priceTotal"
  775. v-if="item.label == 'fTaxrate'"
  776. />
  777. <el-input v-model="scope.row.fTax" disabled v-if="item.label == 'fTax'"/>
  778. <el-input v-model="scope.row.fAmount" disabled v-if="item.label == 'fAmount'"/>
  779. <el-select :disabled="notChange" v-model="scope.row.fStatus" v-if="item.label == 'fStatus'">
  780. <el-option label="是" value="0"/>
  781. <el-option label="否" value="1"/>
  782. </el-select>
  783. <el-input :disabled="notChange" v-model="scope.row.remarks" v-if="item.label == 'remarks'"/>
  784. <el-input v-model="scope.row.createBy" disabled v-if="item.label == 'createBy'"/>
  785. <el-date-picker :disabled="notChange" v-model="scope.row.createTime" style="width:100%" type="date"
  786. placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
  787. v-if="item.label == 'createTime'"
  788. />
  789. <el-input v-model="scope.row.updateBy" disabled
  790. v-if="item.label == 'updateBy' && scope.row.fStatus == '0'"
  791. />
  792. <el-date-picker :disabled="notChange" v-model="scope.row.updateTime" style="width:100%" type="date"
  793. placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
  794. v-if="item.label == 'updateTime' && scope.row.fStatus == '0'"
  795. />
  796. </template>
  797. </el-table-column>
  798. <el-table-column
  799. label="操作"
  800. align="center"
  801. class-name="small-padding fixed-width"
  802. >
  803. <template slot-scope="scope">
  804. <el-button
  805. size="mini"
  806. type="text"
  807. :disabled="notChange"
  808. icon="el-icon-delete"
  809. @click.native.prevent="deleteRoww(scope.$index, invoiceList)"
  810. >删除
  811. </el-button>
  812. </template>
  813. </el-table-column>
  814. </el-table>
  815. <div slot="footer" class="dialog-footer">
  816. <add-or-update
  817. v-if="addOrUpdateVisible"
  818. ref="addOrUpdate"
  819. @refreshDataList="getDataList"
  820. ></add-or-update>
  821. <approval-comments
  822. v-if="addOrUpdateVisib"
  823. ref="ApprovalComments"
  824. @refreshDataList="returnData"
  825. ></approval-comments>
  826. </div>
  827. <el-dialog
  828. v-dialogDrag
  829. :fullscreen="dialogFull"
  830. :close-on-click-modal="false"
  831. width="78%"
  832. :visible.sync="innerVisible"
  833. title="导入数据"
  834. append-to-body
  835. >
  836. <template slot="title">
  837. <div class="avue-crud__dialog__header">
  838. <span class="el-dialog__title" style="font-size: 18px;font-weight: bold;color: #606266;">
  839. <span
  840. style="
  841. display: inline-block;
  842. width: 3px;
  843. height: 20px;
  844. margin-right: 5px;
  845. float: left;
  846. margin-top: 2px;
  847. "
  848. ></span>检索
  849. </span>
  850. <div class="avue-crud__dialog__menu enlarge" @click="full">
  851. <i
  852. style="
  853. cursor: pointer;
  854. display: block;
  855. width: 12px;
  856. height: 12px;
  857. border: 1px solid #909399;
  858. border-top: 3px solid #909399;
  859. margin-top: -3px;
  860. "
  861. ></i>
  862. </div>
  863. </div>
  864. </template>
  865. <el-form
  866. ref="form"
  867. :model="queryParameter"
  868. :rules="rules"
  869. label-width="80px"
  870. style="display: flex; flex-wrap: wrap"
  871. >
  872. <el-row>
  873. <el-col :span="6">
  874. <el-form-item label="货权方" prop="fCorpid">
  875. <!-- <el-input v-model="queryParameter.fCorpid" placeholder="请输入货权方" style="width: 200px;"/>-->
  876. <el-select
  877. v-model="queryParams.fCorpid"
  878. filterable
  879. remote
  880. clearable
  881. size="small"
  882. style="width: 160px"
  883. @keyup.enter.native="handleQuery"
  884. :remote-method="corpsRemoteMethod"
  885. placeholder="请选择货权方"
  886. >
  887. <el-option
  888. v-for="(dict, index) in fMblnoOptions"
  889. :key="index.fId"
  890. :label="dict.fName"
  891. :value="dict.fId"
  892. ></el-option>
  893. </el-select>
  894. </el-form-item>
  895. </el-col>
  896. <el-col :span="6">
  897. <el-form-item label="结算单位" prop="fToCorpid">
  898. <el-select
  899. v-model="queryParameter.fToCorpid"
  900. filterable
  901. remote
  902. clearable
  903. size="small"
  904. style="width: 160px"
  905. :disabled="doNot"
  906. @keyup.enter.native="handleQuery"
  907. :remote-method="corpsRemoteMethod"
  908. placeholder="请输入结算单位"
  909. >
  910. <el-option
  911. v-for="(dict, index) in fMblnoOptions"
  912. :key="index.fId"
  913. :label="dict.fName"
  914. :value="dict.fId"
  915. ></el-option>
  916. </el-select>
  917. </el-form-item>
  918. </el-col>
  919. <el-col :span="6">
  920. <el-form-item label="提单号" prop="tMblno">
  921. <el-input
  922. v-model="queryParameter.fMblno"
  923. placeholder="请输入提单号"
  924. style="width: 160px"
  925. size="small"
  926. />
  927. </el-form-item>
  928. </el-col>
  929. <el-col :span="6">
  930. <el-form-item label="对账单号" prop="fStatementNo">
  931. <el-input
  932. v-model="queryParameter.fStatementNo"
  933. placeholder="请输入提单号"
  934. size="small"
  935. @change="noNull"
  936. style="width: 160px"
  937. />
  938. </el-form-item>
  939. </el-col>
  940. </el-row>
  941. <el-row>
  942. <el-col :span="6">
  943. <el-form-item label="费用名称" prop="fFeeid">
  944. <template>
  945. <el-select
  946. v-model="queryParameter.fFeeid"
  947. filterable
  948. remote
  949. size="small"
  950. style="width: 160px"
  951. :remote-method="fWRemoteMethod"
  952. placeholder="费用名称"
  953. multiple
  954. >
  955. <el-option
  956. v-for="item in fWbuOptions"
  957. :key="item.fId"
  958. :label="item.fName"
  959. :value="item.fId"
  960. >
  961. </el-option>
  962. </el-select>
  963. </template>
  964. </el-form-item>
  965. </el-col>
  966. <el-col :span="6">
  967. <el-form-item label="仓储业务" prop="fFeeid" v-if="typevalue == 1 || typevalue == 3">
  968. <el-select
  969. v-model="queryParameter.fBilltype"
  970. size="small"
  971. style="width: 160px"
  972. @change="changefBilltype"
  973. placeholder="请选择仓储业务"
  974. >
  975. <el-option label="入库" value="SJRK"></el-option>
  976. <el-option label="出库" value="SJCK"></el-option>
  977. <el-option label="货权转移" value="HQZY"></el-option>
  978. </el-select>
  979. </el-form-item>
  980. </el-col>
  981. <el-col :span="6">
  982. <el-form-item label="作业类型" prop="fBusinessType" v-if="typevalue == 1 || typevalue == 3"
  983. >
  984. <el-select
  985. v-model="queryParameter.fBusinessType"
  986. filterable
  987. remote
  988. size="small"
  989. style="width: 160px"
  990. placeholder="作业类型"
  991. multiple
  992. >
  993. <el-option
  994. v-for="dict in businessTypeOption"
  995. :key="dict.index"
  996. :label="dict.dictLabel"
  997. :value="dict.dictValue"
  998. >
  999. </el-option>
  1000. </el-select>
  1001. </el-form-item>
  1002. </el-col>
  1003. <el-col :span="6">
  1004. <el-form-item
  1005. label="船名"
  1006. prop="fVslid"
  1007. v-if="typevalue == 1 || typevalue == 3"
  1008. >
  1009. <el-select
  1010. size="small"
  1011. style="width: 160px"
  1012. v-model="queryParameter.fVslid"
  1013. >
  1014. <el-option
  1015. v-for="item in vesselOptions"
  1016. :key="item.fId"
  1017. :label="item.fName"
  1018. :value="item.fId"
  1019. />
  1020. </el-select>
  1021. </el-form-item>
  1022. </el-col>
  1023. </el-row>
  1024. <el-row>
  1025. <el-col :span="6">
  1026. <el-form-item
  1027. label="航次"
  1028. prop="voyageName"
  1029. v-if="typevalue == 1 || typevalue == 3"
  1030. >
  1031. <el-input
  1032. size="small"
  1033. style="width: 160px"
  1034. v-model="queryParameter.voyageName"
  1035. placeholder="请输入航次"
  1036. />
  1037. </el-form-item>
  1038. </el-col>
  1039. <el-col :span="6">
  1040. <el-form-item
  1041. label="起运港"
  1042. prop="fLoadportid"
  1043. v-if="typevalue == 1 || typevalue == 3"
  1044. >
  1045. <el-select
  1046. size="small"
  1047. style="width: 160px"
  1048. v-model="queryParameter.fLoadportid"
  1049. >
  1050. <el-option
  1051. v-for="item in portOptions"
  1052. :key="item.fId"
  1053. :label="item.fName"
  1054. :value="item.fId"
  1055. />
  1056. </el-select>
  1057. </el-form-item>
  1058. </el-col>
  1059. <el-col :span="6">
  1060. <el-form-item
  1061. label="目的港"
  1062. prop="fDestportid"
  1063. v-if="typevalue == 1 || typevalue == 3"
  1064. >
  1065. <el-select
  1066. size="small"
  1067. style="width: 160px"
  1068. v-model="queryParameter.fDestportid"
  1069. >
  1070. <el-option
  1071. v-for="item in portOptions"
  1072. :key="item.fId"
  1073. :label="item.fName"
  1074. :value="item.fId"
  1075. />
  1076. </el-select>
  1077. </el-form-item>
  1078. </el-col>
  1079. <el-col :span="6" style="width: 240px"></el-col>
  1080. </el-row>
  1081. <el-row>
  1082. <el-col :span="8">
  1083. <el-form-item
  1084. label="出入库日期"
  1085. label-width="85px"
  1086. prop="fAccbilldate"
  1087. v-if="typevalue == 1 || typevalue == 3"
  1088. >
  1089. <el-date-picker
  1090. size="small"
  1091. style="width: 240px"
  1092. v-model="queryParameter.timeInterval"
  1093. type="daterange"
  1094. start-placeholder="开始日期"
  1095. end-placeholder="结束日期"
  1096. value-format="yyyy-MM-dd"
  1097. :default-time="['00:00:00', '23:59:59']"
  1098. >
  1099. </el-date-picker>
  1100. </el-form-item>
  1101. </el-col>
  1102. <el-col :span="8">
  1103. <el-form-item
  1104. label="审核日期"
  1105. prop="timeExamine"
  1106. v-if="typevalue == 1 || typevalue == 3"
  1107. >
  1108. <el-date-picker
  1109. size="small"
  1110. style="width: 240px"
  1111. v-model="queryParameter.timeExamine"
  1112. type="daterange"
  1113. start-placeholder="开始日期"
  1114. end-placeholder="结束日期"
  1115. value-format="yyyy-MM-dd"
  1116. :default-time="['00:00:00', '23:59:59']"
  1117. >
  1118. </el-date-picker>
  1119. </el-form-item>
  1120. </el-col>
  1121. <el-col :span="8">
  1122. <el-form-item style="width: 350px">
  1123. </el-form-item>
  1124. </el-col>
  1125. </el-row>
  1126. </el-form>
  1127. <div style="margin-right: 20px;float: right">
  1128. <el-button
  1129. type="cyan"
  1130. icon="el-icon-search"
  1131. size="mini"
  1132. @click="importSearch"
  1133. >搜索
  1134. </el-button
  1135. >
  1136. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery_s"
  1137. >重置
  1138. </el-button
  1139. >
  1140. <el-button
  1141. icon="el-icon-setting"
  1142. size="mini"
  1143. circle
  1144. @click="showSetting4 = !showSetting4"
  1145. ></el-button>
  1146. </div>
  1147. <el-dialog
  1148. title="自定义列显示"
  1149. :visible.sync="showSetting4"
  1150. width="700px"
  1151. v-dialogDrag
  1152. append-to-body
  1153. >
  1154. <template slot="title">
  1155. <div class="avue-crud__dialog__header">
  1156. <span class="el-dialog__title">
  1157. <span
  1158. style="
  1159. display: inline-block;
  1160. width: 3px;
  1161. height: 20px;
  1162. margin-right: 5px;
  1163. float: left;
  1164. margin-top: 2px;
  1165. "
  1166. ></span>
  1167. </span>
  1168. </div>
  1169. </template>
  1170. <div>配置排序列数据(拖动调整顺序)</div>
  1171. <div style="margin-left: 17px">
  1172. <el-checkbox
  1173. v-model="allCheck4"
  1174. label="全选"
  1175. @change="allChecked4"
  1176. ></el-checkbox>
  1177. </div>
  1178. <div style="padding: 4px; display: flex; justify-content: center">
  1179. <draggable
  1180. v-model="setRowList4"
  1181. group="site"
  1182. animation="300"
  1183. @start="onStart"
  1184. @end="onEnd"
  1185. handle=".indraggable"
  1186. >
  1187. <transition-group>
  1188. <div
  1189. v-for="item in setRowList4"
  1190. :key="item.surface"
  1191. class="listStyle"
  1192. >
  1193. <div style="width: 500px" class="indraggable">
  1194. <div class="progress" :style="{ width: item.width + 'px' }">
  1195. <el-checkbox
  1196. :label="item.name"
  1197. v-model="item.checked"
  1198. :true-label="0"
  1199. :false-label="1"
  1200. >{{ item.name }}
  1201. </el-checkbox>
  1202. </div>
  1203. </div>
  1204. <el-input-number
  1205. v-model.number="item.width"
  1206. controls-position="right"
  1207. :min="1"
  1208. :max="500"
  1209. size="mini"
  1210. ></el-input-number>
  1211. </div>
  1212. </transition-group>
  1213. </draggable>
  1214. </div>
  1215. <span slot="footer" class="dialog-footer">
  1216. <el-button @click="showSetting4 = false">取 消</el-button>
  1217. <el-button @click="delRow4" type="danger">重 置</el-button>
  1218. <el-button type="primary" @click="save4()">确 定</el-button>
  1219. </span>
  1220. </el-dialog>
  1221. <el-table
  1222. v-loading="loading"
  1223. :data="chargeList_s"
  1224. ref="chargeList"
  1225. show-summary
  1226. :summary-method="getSum"
  1227. @selection-change="handleSelectionChange_s"
  1228. >
  1229. <el-table-column type="selection" width="55" align="center"/>
  1230. <el-table-column label="序号" type="index" width="55" align="center"/>
  1231. <el-table-column
  1232. v-for="(item, index) in getRowList4"
  1233. :key="index"
  1234. :label="item.name"
  1235. :width="item.width"
  1236. :prop="item.label"
  1237. align="center"
  1238. :fixed="item.fixed"
  1239. :show-overflow-tooltip="true"
  1240. sortable
  1241. >
  1242. <template slot-scope="scope">
  1243. <span v-if="item.label == 'fName'">{{ scope.row.fName }}</span>
  1244. <span v-if="item.label == 'fMblno'">{{ scope.row.fMblno }}</span>
  1245. <span v-if="item.label == 'boatName'">{{ scope.row.boatName }}</span>
  1246. <span v-if="item.label == 'voyageName'">{{ scope.row.voyageName }}</span>
  1247. <span v-if="item.label == 'fProductName'">{{ scope.row.fProductName }}</span>
  1248. <span v-if="item.label == 'fBsdate'">{{scope.row.fBsdate ? scope.row.fBsdate.slice(0, 10) : scope.row.fReviewDate}}</span>
  1249. <span v-if="item.label == 'fBilltype'">
  1250. <template>
  1251. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  1252. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  1253. <span v-else-if="scope.row.fBilltype == 'KHDD'">凯和订单</span>
  1254. <span v-else>{{ scope.row.fBilltype }}</span>
  1255. </template>
  1256. </span>
  1257. <span v-if="item.label == 'fReviewDate'">{{ scope.row.fReviewDate }}</span>
  1258. <span v-if="item.label == 'fFeeName'">{{ scope.row.fFeeName }}</span>
  1259. <span v-if="item.label == 'fAmtdr'">{{ scope.row.fAmtdr }}</span>
  1260. <el-input
  1261. v-model="scope.row.fAmt" v-if="item.label == 'fAmt'"
  1262. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1263. @change="imgChangeI(scope.row)"
  1264. />
  1265. <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
  1266. </template>
  1267. </el-table-column>
  1268. <!-- <el-table-column label="货权方" align="center" prop="fName" width="200px" :show-overflow-tooltip="true"/>-->
  1269. <!-- <el-table-column label="提单号" align="center" prop="fMblno"/>-->
  1270. <!-- <el-table-column label="船名" align="center" prop="boatName"/>-->
  1271. <!-- <el-table-column label="航次" align="center" prop="voyageName"/>-->
  1272. <!-- <el-table-column v-if="typevalue == 1 || typevalue == 2" label="品名" align="center" prop="fProductName" />-->
  1273. <!-- <el-table-column v-if="typevalue == 1 || typevalue == 2" label="业务日期" align="center">-->
  1274. <!-- <template slot-scope="scope" v-if="scope.row.fBsdate">-->
  1275. <!-- <span>{{ scope.row.fBsdate ? scope.row.fBsdate.slice(0, 10) : scope.row.fBsdate }}</span>-->
  1276. <!-- </template>-->
  1277. <!-- </el-table-column>-->
  1278. <!-- <el-table-column v-if="typevalue == 1 || typevalue == 2" label="业务类型" align="center" prop="fBilltype">-->
  1279. <!-- <template slot-scope="scope">-->
  1280. <!-- <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>-->
  1281. <!-- <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>-->
  1282. <!-- <span v-else>{{ scope.row.fBilltype }}</span>-->
  1283. <!-- </template>-->
  1284. <!-- </el-table-column>-->
  1285. <!-- <el-table-column label="作业类型" align="center" prop="fBusinessType" v-if="typevalue == 1 || typevalue == 2"/>-->
  1286. <!-- <el-table-column label="审核日期" align="center" prop="fReviewDate" width="100px"/>-->
  1287. <!-- <el-table-column label="费用名称" align="center" prop="fFeeName" width="100px" :show-overflow-tooltip="true"/>-->
  1288. <!-- <el-table-column label="金额" align="center" prop="fAmtdr"/>-->
  1289. <!-- <el-table-column label="本次金额" align="center" prop="fAmt" width="100">-->
  1290. <!-- <template slot-scope="scope">-->
  1291. <!-- <el-input-->
  1292. <!-- v-model="scope.row.fAmt"-->
  1293. <!-- placeholder="请输入本次金额"-->
  1294. <!-- clearable-->
  1295. <!-- size="small"-->
  1296. <!-- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
  1297. <!-- @change="imgChangeI(scope.row)"-->
  1298. <!-- />-->
  1299. <!-- </template>-->
  1300. <!-- </el-table-column>-->
  1301. <!-- <el-table-column label="备注" align="center" prop="fRemarks" width="200px">-->
  1302. <!-- <template slot-scope="scope">-->
  1303. <!-- <el-input-->
  1304. <!-- v-model="scope.row.fRemarks"-->
  1305. <!-- placeholder="请输入备注"-->
  1306. <!-- clearable-->
  1307. <!-- size="small"-->
  1308. <!-- width="100"-->
  1309. <!-- />-->
  1310. <!-- </template>-->
  1311. <!-- </el-table-column>-->
  1312. </el-table>
  1313. <div slot="footer" class="dialog-footer">
  1314. <el-button type="primary" @click="confirmImport">确 定</el-button>
  1315. <el-button @click="signOut">取 消</el-button>
  1316. </div>
  1317. </el-dialog>
  1318. </div>
  1319. </div>
  1320. </template>
  1321. <script>
  1322. import {
  1323. addcheck,
  1324. getPort,
  1325. addPreservation,
  1326. listDetail,
  1327. listInvoice,
  1328. collectFee,
  1329. collectFees,
  1330. listCharge,
  1331. listCharges,
  1332. getCharge,
  1333. getCharges,
  1334. delCharge,
  1335. delCharges,
  1336. addCharge,
  1337. addCharges,
  1338. exportCharge,
  1339. search,
  1340. searchs,
  1341. listCorps,
  1342. delCharge_s,
  1343. delCharge_ss,
  1344. backCharge,
  1345. revocation,
  1346. exportWarehousebillsitems,
  1347. getcontrastList,
  1348. getVesselName,
  1349. listFees
  1350. } from '@/api/finance/applyForInvoice/salesInvoice'
  1351. import print from 'print-js'
  1352. import AddOrUpdate from '@/views/viewApproval'
  1353. import ApprovalComments from '@/views/startApproval'
  1354. import { queryUserVal } from '@/api/warehouseBusiness/agreement'
  1355. import Global from '@/layout/components/global'
  1356. import Vue from 'vue'
  1357. import Cookies from 'js-cookie'
  1358. import { addSet, select, resetModule } from '@/api/system/set'
  1359. import { MessageBox } from 'element-ui'
  1360. import draggable from 'vuedraggable'
  1361. Vue.directive('dialogDrag', {
  1362. bind(el, binding, vnode, oldVnode) {
  1363. const dialogHeaderEl = el.querySelector('.el-dialog__header')
  1364. const dragDom = el.querySelector('.el-dialog')
  1365. const enlarge = el.querySelector('.enlarge')
  1366. dialogHeaderEl.style.cursor = 'move'
  1367. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  1368. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
  1369. if (enlarge) {
  1370. enlarge.onclick = (e) => {
  1371. dragDom.style.top = '0px'
  1372. dragDom.style.left = '0px'
  1373. }
  1374. }
  1375. dialogHeaderEl.onmousedown = (e) => {
  1376. // 鼠标按下,计算当前元素距离可视区的距离
  1377. const disX = e.clientX - dialogHeaderEl.offsetLeft
  1378. const disY = e.clientY - dialogHeaderEl.offsetTop
  1379. // 获取到的值带px 正则匹配替换
  1380. let styL, styT
  1381. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  1382. if (sty.left.includes('%')) {
  1383. styL =
  1384. +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
  1385. styT =
  1386. +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
  1387. } else {
  1388. styL = +sty.left.replace(/\px/g, '')
  1389. styT = +sty.top.replace(/\px/g, '')
  1390. }
  1391. document.onmousemove = function(e) {
  1392. // 通过事件委托,计算移动的距离
  1393. const l = e.clientX - disX
  1394. const t = e.clientY - disY
  1395. // 移动当前元素
  1396. if (t + styT >= 0) {
  1397. dragDom.style.top = `${t + styT}px`
  1398. }
  1399. dragDom.style.left = `${l + styL}px`
  1400. // 将此时的位置传出去
  1401. // binding.value({x:e.pageX,y:e.pageY})
  1402. }
  1403. document.onmouseup = function(e) {
  1404. document.onmousemove = null
  1405. document.onmouseup = null
  1406. }
  1407. }
  1408. }
  1409. })
  1410. export default {
  1411. name: 'Charge',
  1412. data() {
  1413. return {
  1414. show: false,
  1415. login:Cookies.get('sysType'),
  1416. portOptions: [],
  1417. unitOptions: [],
  1418. fDNameOptions: [],
  1419. invoiceList: [],
  1420. feeInfo: true,
  1421. activeIndex: '1',
  1422. vesselOptions: [],
  1423. mainTable: false,
  1424. //全屏放大
  1425. dialogFull: false,
  1426. drag: false,
  1427. tableDate: [
  1428. {
  1429. surface: '1',
  1430. label: 'createBy',
  1431. name: '制单人',
  1432. checked: 0,
  1433. fixed: 'left',
  1434. width: 100
  1435. },
  1436. {
  1437. surface: '2',
  1438. label: 'fBillno',
  1439. name: '系统编号',
  1440. checked: 0,
  1441. fixed: 'left',
  1442. width: 100
  1443. },
  1444. {
  1445. surface: '3',
  1446. label: 'fCtrlcorpid',
  1447. name: '货权方',
  1448. checked: 0,
  1449. width: 100
  1450. },
  1451. {
  1452. surface: '4',
  1453. label: 'createTime',
  1454. name: '制单日期',
  1455. checked: 0,
  1456. width: 100
  1457. },
  1458. {
  1459. surface: '5',
  1460. label: 'fAccbilldate',
  1461. name: '申请日期',
  1462. checked: 0,
  1463. width: 100
  1464. },
  1465. {
  1466. surface: '6',
  1467. label: 'tMblno',
  1468. name: '提单号',
  1469. checked: 0,
  1470. width: 100
  1471. },
  1472. {
  1473. surface: '7',
  1474. label: 'chargingMethod',
  1475. name: '收费方式',
  1476. checked: 0,
  1477. width: 100
  1478. },
  1479. {
  1480. surface: '8',
  1481. label: 'invoiceNo',
  1482. name: '发票号',
  1483. checked: 0,
  1484. width: 100
  1485. },
  1486. {
  1487. surface: '9',
  1488. label: 'bank',
  1489. name: '收款银行',
  1490. checked: 0,
  1491. width: 100
  1492. },
  1493. {
  1494. surface: '10',
  1495. label: 'waterBillNo',
  1496. name: '水单号',
  1497. checked: 0,
  1498. width: 100
  1499. },
  1500. {
  1501. surface: '11',
  1502. label: 'fAmtdr',
  1503. name: '应收合计',
  1504. checked: 0,
  1505. width: 100
  1506. },
  1507. {
  1508. surface: '12',
  1509. label: 'fAmtcr',
  1510. name: '实收合计',
  1511. checked: 0,
  1512. width: 100
  1513. },
  1514. {
  1515. surface: '13',
  1516. label: 'fRemarks',
  1517. name: '备注',
  1518. checked: 0,
  1519. width: 100
  1520. },
  1521. {
  1522. surface: '14',
  1523. label: 'fBillstatus',
  1524. name: '状态',
  1525. checked: 0,
  1526. width: 100
  1527. }
  1528. ],
  1529. tableDate2: [
  1530. {
  1531. surface: '1',
  1532. label: 'fMblno',
  1533. name: '提单号',
  1534. checked: 0,
  1535. width: 100
  1536. },
  1537. {
  1538. surface: '2',
  1539. label: 'fBscorpno',
  1540. name: '存货单号',
  1541. checked: 0,
  1542. width: 100
  1543. },
  1544. {
  1545. surface: '3',
  1546. label: 'fProductName',
  1547. name: '品名',
  1548. checked: 0,
  1549. width: 100
  1550. },
  1551. {
  1552. surface: '4',
  1553. label: 'fBsdate',
  1554. name: '业务日期',
  1555. checked: 0,
  1556. width: 100
  1557. },
  1558. {
  1559. surface: '5',
  1560. label: 'fFeeName',
  1561. name: '费用名称',
  1562. checked: 0,
  1563. width: 100
  1564. },
  1565. {
  1566. surface: '6',
  1567. label: 'fSrcdcName',
  1568. name: '收/付',
  1569. checked: 0,
  1570. width: 100
  1571. },
  1572. {
  1573. surface: '7',
  1574. label: 'fBilltype',
  1575. name: '业务类型',
  1576. checked: 0,
  1577. width: 100
  1578. },
  1579. {
  1580. surface: '8',
  1581. label: 'fBusinessType',
  1582. name: '作业类型',
  1583. checked: 0,
  1584. width: 100
  1585. },
  1586. {
  1587. surface: '9',
  1588. label: 'fAmtdr',
  1589. name: '金额',
  1590. checked: 0,
  1591. width: 100
  1592. },
  1593. {
  1594. surface: '10',
  1595. label: 'fAmt',
  1596. name: '本次金额',
  1597. checked: 0,
  1598. width: 100
  1599. },
  1600. {
  1601. surface: '11',
  1602. label: 'fRemarks',
  1603. name: '备注',
  1604. checked: 0,
  1605. width: 100
  1606. }
  1607. ],
  1608. tableDate4: [
  1609. {
  1610. surface: '1',
  1611. label: 'fName',
  1612. name: '货权方',
  1613. checked: 0,
  1614. width: 100
  1615. },
  1616. {
  1617. surface: '2',
  1618. label: 'fMblno',
  1619. name: '提单号',
  1620. checked: 0,
  1621. width: 100
  1622. },
  1623. {
  1624. surface: '3',
  1625. label: 'boatName',
  1626. name: '船名',
  1627. checked: 0,
  1628. width: 100
  1629. },
  1630. {
  1631. surface: '4',
  1632. label: 'voyageName',
  1633. name: '航次',
  1634. checked: 0,
  1635. width: 100
  1636. },
  1637. {
  1638. surface: '5',
  1639. label: 'fProductName',
  1640. name: '品名',
  1641. checked: 0,
  1642. width: 100
  1643. },
  1644. {
  1645. surface: '6',
  1646. label: 'fBsdate',
  1647. name: '业务日期',
  1648. checked: 0,
  1649. width: 100
  1650. },
  1651. {
  1652. surface: '7',
  1653. label: 'fBilltype',
  1654. name: '业务类型',
  1655. checked: 0,
  1656. width: 100
  1657. },
  1658. {
  1659. surface: '8',
  1660. label: 'fReviewDate',
  1661. name: '审核日期',
  1662. checked: 0,
  1663. width: 100
  1664. },
  1665. {
  1666. surface: '9',
  1667. label: 'fFeeName',
  1668. name: '费用名称',
  1669. checked: 0,
  1670. width: 100
  1671. },
  1672. {
  1673. surface: '10',
  1674. label: 'fAmtdr',
  1675. name: '金额',
  1676. checked: 0,
  1677. width: 100
  1678. },
  1679. {
  1680. surface: '11',
  1681. label: 'fAmt',
  1682. name: '本次金额',
  1683. checked: 0,
  1684. width: 100
  1685. },
  1686. {
  1687. surface: '12',
  1688. label: 'fRemarks',
  1689. name: '备注',
  1690. checked: 0,
  1691. width: 100
  1692. }
  1693. ],
  1694. tableDate3: [
  1695. {
  1696. surface: '1',
  1697. label: 'fFeeName',
  1698. name: '货物或应税劳务、服务名称',
  1699. checked: 0,
  1700. width: 100
  1701. },
  1702. {
  1703. surface: '2',
  1704. label: 'fModel',
  1705. name: '规格型号',
  1706. checked: 0,
  1707. width: 100
  1708. },
  1709. {
  1710. surface: '3',
  1711. label: 'fSbu',
  1712. name: '单位',
  1713. checked: 0,
  1714. width: 100
  1715. },
  1716. {
  1717. surface: '4',
  1718. label: 'fNumber',
  1719. name: '数量',
  1720. checked: 0,
  1721. width: 100
  1722. },
  1723. {
  1724. surface: '5',
  1725. label: 'fUnitprice',
  1726. name: '单价(含税)',
  1727. checked: 0,
  1728. width: 100
  1729. },
  1730. {
  1731. surface: '6',
  1732. label: 'fMoney',
  1733. name: '金额(含税)',
  1734. checked: 0,
  1735. width: 100
  1736. },
  1737. {
  1738. surface: '7',
  1739. label: 'fTaxrate',
  1740. name: '税率(%)',
  1741. checked: 0,
  1742. width: 100
  1743. },
  1744. {
  1745. surface: '8',
  1746. label: 'fTax',
  1747. name: '税额',
  1748. checked: 0,
  1749. width: 100
  1750. },
  1751. {
  1752. surface: '9',
  1753. label: 'fAmount',
  1754. name: '合计金额(元)',
  1755. checked: 0,
  1756. width: 100
  1757. },
  1758. {
  1759. surface: '10',
  1760. label: 'fStatus',
  1761. name: '作废状态',
  1762. checked: 0,
  1763. width: 100
  1764. },
  1765. {
  1766. surface: '11',
  1767. label: 'remarks',
  1768. name: '备注',
  1769. checked: 0,
  1770. width: 100
  1771. },
  1772. {
  1773. surface: '12',
  1774. label: 'createBy',
  1775. name: '录入人',
  1776. checked: 0,
  1777. width: 100
  1778. },
  1779. {
  1780. surface: '13',
  1781. label: 'createTime',
  1782. name: '录入时间',
  1783. checked: 0,
  1784. width: 100
  1785. },
  1786. {
  1787. surface: '14',
  1788. label: 'updateBy',
  1789. name: '作废人',
  1790. checked: 0,
  1791. width: 100
  1792. },
  1793. {
  1794. surface: '15',
  1795. label: 'updateTime',
  1796. name: '作废时间',
  1797. checked: 0,
  1798. width: 100
  1799. }
  1800. ],
  1801. setRowList: [],
  1802. getRowList: [],
  1803. setRowList2: [],
  1804. getRowList2: [],
  1805. setRowList3: [],
  1806. getRowList3: [],
  1807. allCheck2: false,
  1808. showSetting2: false,
  1809. allCheck3: false,
  1810. showSetting3: false,
  1811. allCheck4: false,
  1812. showSetting4: false,
  1813. setRowList4: [],
  1814. getRowList4: [],
  1815. typevalue: '',
  1816. typeoptions: [
  1817. {
  1818. value: '1',
  1819. label: '仓储'
  1820. },
  1821. {
  1822. value: '2',
  1823. label: '车队'
  1824. },
  1825. {
  1826. value: '3',
  1827. label: '船务'
  1828. }
  1829. ],
  1830. allCheck: false,
  1831. showSetting: false,
  1832. //收费方式
  1833. methodOptions: [],
  1834. doNot: false,
  1835. Lander: '',
  1836. Operator: '',
  1837. approve: false,
  1838. addOrUpdateVisible: false,
  1839. businessTypeOption: [],
  1840. contrastId: 470,
  1841. tablefilter: false,
  1842. hide: false,
  1843. openPrint: false,
  1844. notChange: false,
  1845. browseStatus: true,
  1846. nothing: [],
  1847. //打印表
  1848. printObject: [],
  1849. printStatus: false,
  1850. //导入状态
  1851. state_s: true,
  1852. fWbuOptions: [],
  1853. options: '',
  1854. corpid: [],
  1855. // 遮罩层
  1856. loading: true,
  1857. //打开内部弹窗
  1858. innerVisible: false,
  1859. chargeList_s: [],
  1860. selection: '',
  1861. increase_s: [],
  1862. // 选中数组
  1863. ids: [],
  1864. // 非单个禁用
  1865. single: true,
  1866. // 非多个禁用
  1867. multiple: true,
  1868. // 显示搜索条件
  1869. showSearch: true,
  1870. // 总条数
  1871. total: 0,
  1872. totAL: 0,
  1873. Ttime: 0,
  1874. //提单号暂存
  1875. fMblno: '',
  1876. // 财务数据主表格数据
  1877. chargeList: [],
  1878. // 弹出层标题
  1879. title: '',
  1880. // 是否显示弹出层
  1881. open: false,
  1882. fMblnoOptions: [],
  1883. //导入查询参数
  1884. queryParameter: {
  1885. fCorpid: '',
  1886. fToCorpid: '',
  1887. fMblno: '',
  1888. fStatementNo: '',
  1889. fFeeid: '',
  1890. fBilltype: '',
  1891. fBusinessType: '',
  1892. fVslid: '',
  1893. voyageName: '',
  1894. fLoadportid: '',
  1895. fDestportid: '',
  1896. timeExamine: '',
  1897. timeInterval: '',
  1898. fSystemType: Cookies.get('sysType')
  1899. },
  1900. empty: [],
  1901. //导入从表传主表
  1902. pass: {
  1903. fAmtdr: 0, //应收合计
  1904. fAmtcr: 0, //应付合计
  1905. fMblno: '', //提单号
  1906. fName: '' //货权方
  1907. },
  1908. Xbutton: true,
  1909. // 查询参数
  1910. queryParams: {
  1911. fId: null,
  1912. pageNum: 1,
  1913. pageSize: 10,
  1914. fBillno: null,
  1915. fCtrlcorpid: null,
  1916. fCorpid: null,
  1917. tMblno: null,
  1918. fAmtdr: null,
  1919. fAmtcr: [],
  1920. fBilltype: null,
  1921. fBillstatus: null,
  1922. fRemarks: null,
  1923. fAccbilldate: null,
  1924. fDeptid: null,
  1925. chargingMethod: null,
  1926. invoiceNo: null,
  1927. bank: null,
  1928. waterBillNo: null
  1929. },
  1930. addOrUpdateVisib: false,
  1931. // 主表查询参数
  1932. tableFilter: {
  1933. pageNum: 1,
  1934. pageSize: 10,
  1935. fBillno: null,
  1936. fCtrlcorpid: null,
  1937. fCorpid: null,
  1938. fBillstatus: null,
  1939. fAmtcr: [],
  1940. fRemarks: null,
  1941. timeInterval: null
  1942. },
  1943. approval: [],
  1944. // 表单参数
  1945. form: {},
  1946. // 表单校验
  1947. ruless: {
  1948. fCtrlcorpid: [{ required: true, message: ' ', trigger: 'blur' }],
  1949. fCorpid: [{ required: true, message: ' ', trigger: 'blur' }],
  1950. fAccbilldate: [{ required: true, message: ' ', trigger: 'blur' }],
  1951. invoiceNo: [{ required: true, message: ' ', trigger: 'blur' }]
  1952. },
  1953. // 表单校验
  1954. rules: {
  1955. fBilltype: [{ required: true, message: ' ', trigger: 'change' }],
  1956. fBillstatus: [{ required: true, message: ' ', trigger: 'blur' }],
  1957. fDeptid: [{ required: true, message: ' ', trigger: 'blur' }],
  1958. fToCorpid: [{ required: true, message: ' ', trigger: 'blur' }],
  1959. timeExamine: [{ required: true, message: ' ', trigger: 'blur' }]
  1960. }
  1961. }
  1962. },
  1963. components: {
  1964. AddOrUpdate,
  1965. ApprovalComments,
  1966. draggable
  1967. },
  1968. created() {
  1969. this.setRowList = this.tableDate
  1970. this.getRowList = this.tableDate
  1971. this.setRowList2 = this.tableDate2
  1972. this.getRowList2 = this.tableDate2
  1973. this.setRowList3 = this.tableDate3
  1974. this.getRowList3 = this.tableDate3
  1975. this.setRowList4 = this.tableDate4
  1976. this.getRowList4 = this.tableDate4
  1977. this.typevalue = Cookies.get('sysType')
  1978. this.getList()
  1979. this.register()
  1980. this.getDicts('st_in_type').then((response) => {
  1981. this.businessTypeOption = response.data
  1982. })
  1983. this.getDicts('data_settlement_type').then((response) => {
  1984. this.methodOptions = response.data
  1985. })
  1986. if (Cookies.get('sysType') == 3) {
  1987. this.getDicts('data_unitfees').then((response) => {
  1988. if (response.data) {
  1989. this.unitOptions = response.data
  1990. }
  1991. })
  1992. }
  1993. this.getRow()
  1994. this.getRow2()
  1995. this.getRow3()
  1996. this.getRow4()
  1997. this.feeName()
  1998. this.portRemthod()
  1999. this.corpsRemoteMethod()
  2000. },
  2001. activated() {
  2002. if (this.$route.query.data) {
  2003. let data = JSON.parse(this.$route.query.data)
  2004. if (data.key === 1) {
  2005. this.handleAdd()
  2006. } else {
  2007. this.adoPt()
  2008. }
  2009. }
  2010. },
  2011. methods: {
  2012. //列表页金额区间搜索
  2013. changeMoney() {
  2014. if (parseInt(this.tableFilter.lastMoney) < parseInt(this.tableFilter.firstMoney)) {
  2015. this.$message.error('第二个金额不能小于第一个金额,请重新输入')
  2016. this.tableFilter.lastMoney = ''
  2017. }
  2018. },
  2019. //弹窗输入对账单号后清空对账单号,必填项重新赋值
  2020. noNull() {
  2021. if (this.queryParameter.fStatementNo == '') {
  2022. }
  2023. this.rules = {
  2024. fToCorpid: [{ required: true, message: ' ', trigger: 'blur' }],
  2025. timeExamine: [{ required: true, message: ' ', trigger: 'blur' }]
  2026. }
  2027. },
  2028. //自定义列显示
  2029. handleClose(done) {
  2030. this.showSetting2 = false
  2031. this.showSetting3 = false
  2032. },
  2033. //发票信息新行
  2034. addList() {
  2035. this.invoiceList.push({
  2036. fModel: null,
  2037. fSbu: '1',
  2038. fNumber: null,
  2039. fUnitprice: null,
  2040. fMoney: null,
  2041. fTaxrate: null,
  2042. fTax: null,
  2043. fAmount: null,
  2044. fStatus: '1',
  2045. remarks: null,
  2046. createBy: this.Lander,
  2047. createTime: null,
  2048. updateBy: this.Lander,
  2049. updateTime: null
  2050. })
  2051. },
  2052. deleteRoww(index, rows) {
  2053. rows.splice(index, 1)
  2054. },
  2055. //金额(含税)
  2056. priceTotal() {
  2057. for (let li in this.invoiceList) {
  2058. if (this.invoiceList[li].fNumber || this.invoiceList[li].fUnitprice) {
  2059. this.$set(this.invoiceList[li], 'fMoney', (this.invoiceList[li].fNumber * this.invoiceList[li].fUnitprice).toFixed(2))
  2060. }
  2061. if (this.invoiceList[li].fTaxrate && this.invoiceList[li].fNumber
  2062. || this.invoiceList[li].fTaxrate && this.invoiceList[li].fUnitprice
  2063. || this.invoiceList[li].fNumber && this.invoiceList[li].fUnitprice) {
  2064. this.$set(this.invoiceList[li], 'fTax', (this.invoiceList[li].fMoney * (this.invoiceList[li].fTaxrate / 100) / (1 + this.invoiceList[li].fTaxrate / 100)).toFixed(2))
  2065. if (this.invoiceList[li].fMoney && this.invoiceList[li].fTax) {
  2066. this.$set(this.invoiceList[li], 'fAmount', (this.invoiceList[li].fMoney - this.invoiceList[li].fTax).toFixed(2))
  2067. }
  2068. }
  2069. }
  2070. },
  2071. //获取服务费名称
  2072. feeName() {
  2073. let query = { pageNum: 1, fDc: 'D' }
  2074. listFees(query).then((response) => {
  2075. this.fDNameOptions = response.rows
  2076. })
  2077. },
  2078. changeId() {
  2079. for (let item in this.invoiceList) {
  2080. this.invoiceList[item].fFeeid = this.invoiceList[item].fFeeName
  2081. }
  2082. },
  2083. //sheet切换
  2084. handleSelect(key, keyPath) {
  2085. if (key === '1') {
  2086. this.feeInfo = true
  2087. } else {
  2088. this.feeInfo = false
  2089. }
  2090. },
  2091. portRemthod() {
  2092. getPort().then(response => {
  2093. this.portOptions = response.rows
  2094. })
  2095. },
  2096. //获取船名
  2097. vessleRemthod() {
  2098. getVesselName().then(response => {
  2099. this.vesselOptions = response.rows
  2100. })
  2101. },
  2102. //新增按钮
  2103. addPage() {
  2104. MessageBox.confirm('是否已保存?', {
  2105. confirmButtonText: '确定',
  2106. cancelButtonText: '取消',
  2107. type: 'warning'
  2108. }
  2109. ).then(() => {
  2110. this.handleAdd()
  2111. })
  2112. },
  2113. //导出明细
  2114. handleExportItems() {
  2115. const fIds = this.queryParams.fId
  2116. if (fIds !== null) {
  2117. this.$confirm('是否确认导出所有计费物资明细数据?', '警告', {
  2118. confirmButtonText: '确定',
  2119. cancelButtonText: '取消',
  2120. type: 'warning'
  2121. })
  2122. .then(function() {
  2123. return exportWarehousebillsitems(fIds)
  2124. })
  2125. .then((response) => {
  2126. this.download(response.msg)
  2127. })
  2128. } else {
  2129. this.$message('请先保存')
  2130. }
  2131. },
  2132. full() {
  2133. this.dialogFull = !this.dialogFull
  2134. },
  2135. //列设置全选
  2136. allChecked() {
  2137. if (this.allCheck == true) {
  2138. this.setRowList.map((e) => {
  2139. return (e.checked = 0)
  2140. })
  2141. } else {
  2142. this.setRowList.map((e) => {
  2143. return (e.checked = 1)
  2144. })
  2145. }
  2146. },
  2147. //查询列数据
  2148. getRow() {
  2149. let that = this
  2150. this.data = {
  2151. tableName: '1申请发票',
  2152. userId: Cookies.get('userName')
  2153. }
  2154. select(this.data).then((res) => {
  2155. if (res.data.length != 0) {
  2156. this.getRowList = res.data.filter((e) => e.checked == 0)
  2157. this.setRowList = res.data
  2158. this.setRowList = this.setRowList.reduce((res, item) => {
  2159. res.push({
  2160. surface: item.surface,
  2161. label: item.label,
  2162. name: item.name,
  2163. checked: item.checked,
  2164. width: item.width,
  2165. fixed: item.fixed
  2166. })
  2167. return res
  2168. }, [])
  2169. }
  2170. })
  2171. },
  2172. //保存列设置
  2173. save() {
  2174. this.showSetting = false
  2175. this.data = {
  2176. tableName: '1申请发票',
  2177. userId: Cookies.get('userName'),
  2178. sysTableSetList: this.setRowList
  2179. }
  2180. addSet(this.data).then((res) => {
  2181. this.getRowList = this.setRowList
  2182. })
  2183. },
  2184. //重置列表
  2185. delRow() {
  2186. this.data = {
  2187. tableName: '1申请发票',
  2188. userId: Cookies.get('userName')
  2189. }
  2190. resetModule(this.data).then(res => {
  2191. if (res.code == 200) {
  2192. this.showSetting = false
  2193. this.setRowList = this.getRowList = this.$options.data().tableDate
  2194. }
  2195. })
  2196. },
  2197. //列设置全选
  2198. allChecked2() {
  2199. if (this.allCheck2 == true) {
  2200. this.setRowList2.map((e) => {
  2201. return (e.checked = 0)
  2202. })
  2203. } else {
  2204. this.setRowList2.map((e) => {
  2205. return (e.checked = 1)
  2206. })
  2207. }
  2208. },
  2209. //查询列数据
  2210. getRow2() {
  2211. let that = this
  2212. this.data = {
  2213. tableName: '2发票列表',
  2214. userId: Cookies.get('userName')
  2215. }
  2216. select(this.data).then((res) => {
  2217. if (res.data.length != 0) {
  2218. this.getRowList2 = res.data.filter((e) => e.checked == 0)
  2219. this.setRowList2 = res.data
  2220. this.setRowList2 = this.setRowList2.reduce((res, item) => {
  2221. res.push({
  2222. surface: item.surface,
  2223. label: item.label,
  2224. name: item.name,
  2225. checked: item.checked,
  2226. width: item.width,
  2227. fixed: item.fixed
  2228. })
  2229. return res
  2230. }, [])
  2231. }
  2232. })
  2233. },
  2234. //保存列设置
  2235. save2() {
  2236. this.showSetting2 = false
  2237. this.data = {
  2238. tableName: '2发票列表',
  2239. userId: Cookies.get('userName'),
  2240. sysTableSetList: this.setRowList2
  2241. }
  2242. addSet(this.data).then((res) => {
  2243. this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0)
  2244. })
  2245. },
  2246. //重置列表
  2247. delRow2() {
  2248. this.data = {
  2249. tableName: '2发票列表',
  2250. userId: Cookies.get('userName')
  2251. }
  2252. resetModule(this.data).then((res) => {
  2253. if (res.code == 200) {
  2254. this.showSetting2 = false
  2255. this.setRowList2 = this.getRowList2 = this.$options.data().tableDate2
  2256. }
  2257. })
  2258. },
  2259. //列设置全选
  2260. allChecked3() {
  2261. if (this.allCheck3 == true) {
  2262. this.setRowList3.map((e) => {
  2263. return (e.checked = 0)
  2264. })
  2265. } else {
  2266. this.setRowList3.map((e) => {
  2267. return (e.checked = 1)
  2268. })
  2269. }
  2270. },
  2271. //查询列数据
  2272. getRow3() {
  2273. let that = this
  2274. this.data = {
  2275. tableName: '3发票信息',
  2276. userId: Cookies.get('userName')
  2277. }
  2278. select(this.data).then((res) => {
  2279. if (res.data.length != 0) {
  2280. this.getRowList3 = res.data.filter((e) => e.checked == 0)
  2281. this.setRowList3 = res.data
  2282. this.setRowList3 = this.setRowList3.reduce((res, item) => {
  2283. res.push({
  2284. surface: item.surface,
  2285. label: item.label,
  2286. name: item.name,
  2287. checked: item.checked,
  2288. width: item.width,
  2289. fixed: item.fixed
  2290. })
  2291. return res
  2292. }, [])
  2293. }
  2294. })
  2295. },
  2296. //保存列设置
  2297. save3() {
  2298. this.showSetting3 = false
  2299. this.data = {
  2300. tableName: '3发票信息',
  2301. userId: Cookies.get('userName'),
  2302. sysTableSetList: this.setRowList3
  2303. }
  2304. addSet(this.data).then((res) => {
  2305. this.getRowList3 = this.setRowList3.filter((e) => e.checked == 0)
  2306. })
  2307. },
  2308. //重置列表
  2309. delRow3() {
  2310. this.data = {
  2311. tableName: '3发票信息',
  2312. userId: Cookies.get('userName')
  2313. }
  2314. resetModule(this.data).then((res) => {
  2315. if (res.code == 200) {
  2316. this.showSetting3 = false
  2317. this.setRowList3 = this.getRowList3 = this.$options.data().tableDate3
  2318. }
  2319. })
  2320. },
  2321. //列设置全选
  2322. allChecked4() {
  2323. if (this.allCheck4 == true) {
  2324. this.setRowList4.map((e) => {
  2325. return (e.checked = 0)
  2326. })
  2327. } else {
  2328. this.setRowList4.map((e) => {
  2329. return (e.checked = 1)
  2330. })
  2331. }
  2332. },
  2333. //查询列数据
  2334. getRow4() {
  2335. let that = this
  2336. this.data = {
  2337. tableName: '弹窗申请发票',
  2338. userId: Cookies.get('userName')
  2339. }
  2340. select(this.data).then((res) => {
  2341. if (res.data.length != 0) {
  2342. this.getRowList4 = res.data.filter((e) => e.checked == 0)
  2343. this.setRowList4 = res.data
  2344. this.setRowList4 = this.setRowList4.reduce((res, item) => {
  2345. res.push({
  2346. surface: item.surface,
  2347. label: item.label,
  2348. name: item.name,
  2349. checked: item.checked,
  2350. width: item.width,
  2351. fixed: item.fixed
  2352. })
  2353. return res
  2354. }, [])
  2355. }
  2356. })
  2357. },
  2358. //保存列设置
  2359. save4() {
  2360. this.showSetting4 = false
  2361. this.data = {
  2362. tableName: '4弹窗申请发票',
  2363. userId: Cookies.get('userName'),
  2364. sysTableSetList: this.setRowList4
  2365. }
  2366. addSet(this.data).then((res) => {
  2367. this.getRowList4 = this.setRowList4.filter((e) => e.checked == 0)
  2368. })
  2369. },
  2370. //重置列表
  2371. delRow4() {
  2372. this.data = {
  2373. tableName: '4弹窗申请发票',
  2374. userId: Cookies.get('userName')
  2375. }
  2376. resetModule(this.data).then((res) => {
  2377. if (res.code == 200) {
  2378. this.showSetting4 = false
  2379. this.setRowList4 = this.getRowList4 = this.$options.data().tableDate4
  2380. }
  2381. })
  2382. },
  2383. //开始拖拽事件
  2384. onStart() {
  2385. this.drag = true
  2386. },
  2387. //拖拽结束事件
  2388. onEnd() {
  2389. this.drag = false
  2390. },
  2391. //财务主取消
  2392. signOut() {
  2393. if (this.increase_s.length == 0) {
  2394. this.doNot = false
  2395. } else {
  2396. this.doNot = true
  2397. }
  2398. this.innerVisible = false
  2399. this.feeList = []
  2400. },
  2401. //收费页面合计
  2402. listTotal(param) {
  2403. const { columns, data } = param
  2404. const sums = []
  2405. columns.forEach((column, index) => {
  2406. if (index === 0) {
  2407. sums[index] = '合计'
  2408. } else if (column.label == '应收合计' || column.label == '实收合计' ||
  2409. column.label == '金额' || column.label == '本次金额' ||
  2410. column.label == '金额(含税)' || column.label == '合计金额(元)' ||
  2411. column.label == '税额' || column.label == '数量'
  2412. ) {
  2413. const values = data.map((item) => Number(item[column.property]))
  2414. if (!values.every((value) => isNaN(value))) {
  2415. sums[index] = values.reduce((prev, curr) => {
  2416. const value = Number(curr)
  2417. if (!isNaN(value)) {
  2418. return prev + curr
  2419. } else {
  2420. return prev
  2421. }
  2422. }, 0)
  2423. }
  2424. }
  2425. })
  2426. return sums
  2427. },
  2428. getDataList() {
  2429. this.addOrUpdateVisible = false
  2430. },
  2431. changefBilltype() {
  2432. this.businessTypeOption = []
  2433. if (this.queryParameter.fBilltype == 'SJRK') {
  2434. this.getDicts('st_in_type').then((response) => {
  2435. this.businessTypeOption = response.data
  2436. })
  2437. } else if (this.queryParameter.fBilltype == 'SJCK') {
  2438. this.getDicts('st_out_type').then((response) => {
  2439. this.businessTypeOption = response.data
  2440. })
  2441. } else if (this.queryParameter.fBilltype == 'HQZY') {
  2442. this.getDicts('st_trans_type').then((response) => {
  2443. this.businessTypeOption = response.data
  2444. })
  2445. }
  2446. },
  2447. register() {
  2448. queryUserVal().then((response) => {
  2449. this.Lander = response.user.userName
  2450. })
  2451. },
  2452. // 查看按钮
  2453. check(row, res) {
  2454. this.notChange = true
  2455. this.doNot = true
  2456. if (Cookies.get('sysType') == 1) {
  2457. //大木
  2458. getCharge(row.fId).then((response) => {
  2459. this.Operator = response.data.tFee.createBy
  2460. if (response.data.feeDoList != 0) {
  2461. response.data.feeDoList.map((e) => {
  2462. if (e.fBsdate) {
  2463. e.fBsdate = e.fBsdate.slice(0, 10)
  2464. }
  2465. if (e.fSrcdc) {
  2466. if (e.fSrcdc == 'D') {
  2467. e.fSrcdc = '收'
  2468. } else {
  2469. e.fSrcdc = '付'
  2470. }
  2471. }
  2472. })
  2473. }
  2474. this.increase_s = response.data.feeDoList
  2475. this.fWbuOptions = response.data.feesList
  2476. this.queryParams = response.data.tFee
  2477. this.fWbuOptions = response.data.feesList
  2478. this.fMblnoOptions = response.data.corps
  2479. this.mainTable = true
  2480. this.title = '收费列表'
  2481. this.tablefilter = true
  2482. if (res == 1) {
  2483. this.notChange = true
  2484. if (this.Operator == this.Lander) {
  2485. this.tablefilter = false
  2486. this.reset()
  2487. this.pass = {
  2488. fAmtdr: 0, //应收合计
  2489. fAmtcr: 0, //应付合计
  2490. fMblno: '', //提单号
  2491. fName: '', //货权方
  2492. fFeesName: '', //结算单位
  2493. fCorpid: '' //结算单位ID
  2494. }
  2495. const fId = row.fId || this.ids
  2496. getCharge(fId).then((response) => {
  2497. if (response.data.feeDoList != 0) {
  2498. response.data.feeDoList.map((e) => {
  2499. if (e.fBsdate) {
  2500. e.fBsdate = e.fBsdate.slice(0, 10)
  2501. }
  2502. if (e.fSrcdc) {
  2503. if (e.fSrcdc == 'D') {
  2504. e.fSrcdc = '收'
  2505. } else {
  2506. e.fSrcdc = '付'
  2507. }
  2508. }
  2509. })
  2510. }
  2511. this.increase_s = response.data.feeDoList
  2512. this.fWbuOptions = response.data.feesList
  2513. this.queryParams = response.data.tFee
  2514. this.fWbuOptions = response.data.feesList
  2515. this.fMblnoOptions = response.data.corps
  2516. this.mainTable = true
  2517. })
  2518. } else {
  2519. this.notChange = true
  2520. // this.$message.error('未知异常,请联系管理员')
  2521. }
  2522. } else {
  2523. this.notChange = true
  2524. this.reset()
  2525. this.pass = {
  2526. fAmtdr: 0, //应收合计
  2527. fAmtcr: 0, //应付合计
  2528. fMblno: '', //提单号
  2529. fName: '', //货权方
  2530. fFeesName: '', //结算单位
  2531. fCorpid: '' //结算单位ID
  2532. }
  2533. const fId = row.fId || this.ids
  2534. getCharge(fId).then((response) => {
  2535. if (response.data.feeDoList != 0) {
  2536. response.data.feeDoList.map((e) => {
  2537. if (e.fBsdate) {
  2538. e.fBsdate = e.fBsdate.slice(0, 10)
  2539. }
  2540. if (e.fSrcdc) {
  2541. if (e.fSrcdc == 'D') {
  2542. e.fSrcdc = '收'
  2543. } else {
  2544. e.fSrcdc = '付'
  2545. }
  2546. }
  2547. })
  2548. }
  2549. this.increase_s = response.data.feeDoList
  2550. this.fWbuOptions = response.data.feesList
  2551. this.queryParams = response.data.tFee
  2552. this.fWbuOptions = response.data.feesList
  2553. this.fMblnoOptions = response.data.corps
  2554. this.mainTable = true
  2555. })
  2556. }
  2557. })
  2558. } else if (Cookies.get('sysType') == 2) {
  2559. //车队
  2560. getCharges(row.fId).then((response) => {
  2561. this.Operator = response.data.tFee.createBy
  2562. if (response.data.feeDoList != 0) {
  2563. response.data.feeDoList.map((e) => {
  2564. if (e.fBsdate) {
  2565. e.fBsdate = e.fBsdate.slice(0, 10)
  2566. }
  2567. if (e.fSrcdc) {
  2568. if (e.fSrcdc == 'D') {
  2569. e.fSrcdc = '收'
  2570. } else {
  2571. e.fSrcdc = '付'
  2572. }
  2573. }
  2574. })
  2575. }
  2576. this.increase_s = response.data.feeDoList
  2577. this.fWbuOptions = response.data.feesList
  2578. this.queryParams = response.data.tFee
  2579. this.fWbuOptions = response.data.feesList
  2580. this.fMblnoOptions = response.data.corps
  2581. this.mainTable = true
  2582. this.title = '收费列表'
  2583. this.tablefilter = true
  2584. if (res == 1) {
  2585. this.notChange = true
  2586. if (this.Operator == this.Lander) {
  2587. this.tablefilter = false
  2588. this.reset()
  2589. this.pass = {
  2590. fAmtdr: 0, //应收合计
  2591. fAmtcr: 0, //应付合计
  2592. fMblno: '', //提单号
  2593. fName: '', //货权方
  2594. fFeesName: '', //结算单位
  2595. fCorpid: '' //结算单位ID
  2596. }
  2597. const fId = row.fId || this.ids
  2598. getCharges(fId).then((response) => {
  2599. if (response.data.feeDoList != 0) {
  2600. response.data.feeDoList.map((e) => {
  2601. if (e.fBsdate) {
  2602. e.fBsdate = e.fBsdate.slice(0, 10)
  2603. }
  2604. if (e.fSrcdc) {
  2605. if (e.fSrcdc == 'D') {
  2606. e.fSrcdc = '收'
  2607. } else {
  2608. e.fSrcdc = '付'
  2609. }
  2610. }
  2611. })
  2612. }
  2613. this.increase_s = response.data.feeDoList
  2614. this.fWbuOptions = response.data.feesList
  2615. this.queryParams = response.data.tFee
  2616. this.fWbuOptions = response.data.feesList
  2617. this.fMblnoOptions = response.data.corps
  2618. this.mainTable = true
  2619. })
  2620. } else {
  2621. this.notChange = true
  2622. // this.$message.error('未知异常,请联系管理员')
  2623. }
  2624. } else {
  2625. this.notChange = true
  2626. this.reset()
  2627. this.pass = {
  2628. fAmtdr: 0, //应收合计
  2629. fAmtcr: 0, //应付合计
  2630. fMblno: '', //提单号
  2631. fName: '', //货权方
  2632. fFeesName: '', //结算单位
  2633. fCorpid: '' //结算单位ID
  2634. }
  2635. const fId = row.fId || this.ids
  2636. getCharges(fId).then((response) => {
  2637. if (response.data.feeDoList != 0) {
  2638. response.data.feeDoList.map((e) => {
  2639. if (e.fBsdate) {
  2640. e.fBsdate = e.fBsdate.slice(0, 10)
  2641. }
  2642. if (e.fSrcdc) {
  2643. if (e.fSrcdc == 'D') {
  2644. e.fSrcdc = '收'
  2645. } else {
  2646. e.fSrcdc = '付'
  2647. }
  2648. }
  2649. })
  2650. }
  2651. this.increase_s = response.data.feeDoList
  2652. this.fWbuOptions = response.data.feesList
  2653. this.queryParams = response.data.tFee
  2654. this.fWbuOptions = response.data.feesList
  2655. this.fMblnoOptions = response.data.corps
  2656. this.mainTable = true
  2657. })
  2658. }
  2659. })
  2660. } else if (Cookies.get('sysType') == 3) {
  2661. listDetail(row.fId).then((response) => {
  2662. this.Operator = response.data.tFee.createBy
  2663. if (response.data.feeDoList != 0) {
  2664. response.data.feeDoList.map((e) => {
  2665. if (e.fBsdate) {
  2666. e.fBsdate = e.fBsdate.slice(0, 10)
  2667. }
  2668. if (e.fSrcdc) {
  2669. if (e.fSrcdc == 'D') {
  2670. e.fSrcdc = '收'
  2671. } else {
  2672. e.fSrcdc = '付'
  2673. }
  2674. }
  2675. })
  2676. }
  2677. this.increase_s = response.data.feeDoList
  2678. this.fWbuOptions = response.data.feesList
  2679. this.queryParams = response.data.tFee
  2680. this.fMblnoOptions.push({
  2681. fId: this.queryParams.fCorpid,
  2682. fName: this.queryParams.fCorpidName
  2683. })
  2684. this.invoiceList = response.data.tFeeInvoiceList
  2685. this.$set(this.invoiceList, 'fSbu', parseInt(this.invoiceList.fSbu))
  2686. this.mainTable = true
  2687. this.title = '收费列表'
  2688. this.tablefilter = true
  2689. if (res == 1) {
  2690. this.notChange = true
  2691. if (this.Operator == this.Lander) {
  2692. this.tablefilter = false
  2693. this.reset()
  2694. this.pass = {
  2695. fAmtdr: 0, //应收合计
  2696. fAmtcr: 0, //应付合计
  2697. fMblno: '', //提单号
  2698. fName: '', //货权方
  2699. fFeesName: '', //结算单位
  2700. fCorpid: '' //结算单位ID
  2701. }
  2702. const fId = row.fId || this.ids
  2703. listDetail(fId).then((response) => {
  2704. if (response.data.feeDoList != 0) {
  2705. response.data.feeDoList.map((e) => {
  2706. if (e.fBsdate) {
  2707. e.fBsdate = e.fBsdate.slice(0, 10)
  2708. }
  2709. if (e.fSrcdc) {
  2710. if (e.fSrcdc == 'D') {
  2711. e.fSrcdc = '收'
  2712. } else {
  2713. e.fSrcdc = '付'
  2714. }
  2715. }
  2716. })
  2717. }
  2718. this.feeInfo = true
  2719. this.increase_s = response.data.feeDoList
  2720. this.fWbuOptions = response.data.feesList
  2721. this.queryParams = response.data.tFee
  2722. this.fMblnoOptions.push({
  2723. fId: this.queryParams.fCorpid,
  2724. fName: this.queryParams.fCorpidName
  2725. })
  2726. this.invoiceList = response.data.tFeeInvoiceList
  2727. for (let item in this.invoiceList) {
  2728. this.$set(this.invoiceList[item], 'fSbu', this.invoiceList[item].fSbu + '')
  2729. }
  2730. this.mainTable = true
  2731. })
  2732. } else {
  2733. this.notChange = true
  2734. // this.$message.error('未知异常,请联系管理员')
  2735. }
  2736. } else {
  2737. this.notChange = true
  2738. this.reset()
  2739. this.pass = {
  2740. fAmtdr: 0, //应收合计
  2741. fAmtcr: 0, //应付合计
  2742. fMblno: '', //提单号
  2743. fName: '', //货权方
  2744. fFeesName: '', //结算单位
  2745. fCorpid: '' //结算单位ID
  2746. }
  2747. const fId = row.fId || this.ids
  2748. listDetail(fId).then((response) => {
  2749. if (response.data.feeDoList != 0) {
  2750. response.data.feeDoList.map((e) => {
  2751. if (e.fBsdate) {
  2752. e.fBsdate = e.fBsdate.slice(0, 10)
  2753. }
  2754. if (e.fSrcdc) {
  2755. if (e.fSrcdc == 'D') {
  2756. e.fSrcdc = '收'
  2757. } else {
  2758. e.fSrcdc = '付'
  2759. }
  2760. }
  2761. })
  2762. }
  2763. this.feeInfo = true
  2764. this.increase_s = response.data.feeDoList
  2765. this.fWbuOptions = response.data.feesList
  2766. this.queryParams = response.data.tFee
  2767. this.fMblnoOptions.push({
  2768. fId: this.queryParams.fCorpid,
  2769. fName: this.queryParams.fCorpidName
  2770. })
  2771. this.invoiceList = response.data.tFeeInvoiceList
  2772. for (let item in this.invoiceList) {
  2773. this.$set(this.invoiceList[item], 'fSbu', this.invoiceList[item].fSbu + '')
  2774. }
  2775. this.mainTable = true
  2776. })
  2777. }
  2778. })
  2779. }
  2780. },
  2781. charGe() {
  2782. if (!Cookies.get('sysType')) {
  2783. return this.$message('请先选择业务类型')
  2784. }
  2785. this.queryParameter = {
  2786. fToCorpid: this.queryParams.fCorpid
  2787. }
  2788. this.chargeList_s = []
  2789. this.vessleRemthod()
  2790. // this.queryParameter.fToCorpid = this.queryParams.fCorpid
  2791. this.innerVisible = true
  2792. if (this.queryParams.fCorpid) {
  2793. this.doNot = true
  2794. }
  2795. },
  2796. getSum(param) {
  2797. const { columns, data } = param
  2798. const sums = []
  2799. columns.forEach((column, index) => {
  2800. if (this.selection.length == 0) {
  2801. if (index === 0) {
  2802. sums[index] = '合计'
  2803. } else if (column.label == '金额' || column.label == '本次金额') {
  2804. const values = data.map((item) => Number(item[column.property]))
  2805. if (!values.every((value) => isNaN(value))) {
  2806. sums[index] = values.reduce((prev, curr) => {
  2807. const value = Number(curr)
  2808. if (!isNaN(value)) {
  2809. return prev + curr
  2810. } else {
  2811. return prev
  2812. }
  2813. }, 0)
  2814. }
  2815. }
  2816. } else {
  2817. if (index === 0) {
  2818. sums[index] = '合计'
  2819. } else if (column.label == '金额' || column.label == '本次金额') {
  2820. const values = this.selection.map((selection) => Number(selection[column.property]))
  2821. if (!values.every((value) => isNaN(value))) {
  2822. sums[index] = values.reduce((prev, curr) => {
  2823. const value = Number(curr)
  2824. if (!isNaN(value)) {
  2825. return prev + curr
  2826. } else {
  2827. return prev
  2828. }
  2829. }, 0)
  2830. }
  2831. }
  2832. }
  2833. // sums[0] = '合计'
  2834. // sums[10] = this.totAL.toFixed(2)
  2835. // sums[9] = this.Ttime.toFixed(2)
  2836. })
  2837. return sums
  2838. },
  2839. // 导入多选框
  2840. handleSelectionChange_s(selection) {
  2841. // this.totAL = 0
  2842. // this.Ttime = 0
  2843. this.selection = selection
  2844. // if (this.selection.length == 0) {
  2845. // for (let item in this.chargeList_s) {
  2846. // this.totAL += Number(this.chargeList_s[item].fAmt)
  2847. // this.Ttime += Number(this.chargeList_s[item].fAmtdr)
  2848. // }
  2849. // } else {
  2850. // for (let index in selection) {
  2851. // this.totAL += Number(selection[index].fAmt)
  2852. // this.Ttime += Number(selection[index].fAmtdr)
  2853. // }
  2854. // }
  2855. // this.getSummaries()
  2856. },
  2857. // 多选框选中数据
  2858. handleSelectionChange(selection) {
  2859. this.totAL = 0
  2860. this.ids = selection.map((item) => item.fId)
  2861. this.single =
  2862. selection.length !== 1 ||
  2863. selection.map((item) => item.fBillstatus) == 6 ||
  2864. selection.map((item) => item.fBillstatus) == 4
  2865. this.multiple = !selection.length
  2866. },
  2867. imgChangeI(row) {
  2868. if (row.fAmt && Number(row.fAmt) > Number(row.fAmtdr)) {
  2869. this.$set(row, 'fAmt', row.fAmtdr)
  2870. this.state_s = true
  2871. }
  2872. if (this.selection.length !== 0) {
  2873. this.totAL = 0
  2874. this.Ttime = 0
  2875. for (let item in this.selection) {
  2876. this.totAL += Number(this.selection[item].fAmt)
  2877. this.Ttime += Number(this.selection[item].fAmtdr)
  2878. }
  2879. } else {
  2880. this.totAL = 0
  2881. this.Ttime = 0
  2882. for (let item in this.chargeList_s) {
  2883. this.totAL += Number(this.chargeList_s[item].fAmt)
  2884. this.Ttime += Number(this.chargeList_s[item].fAmtdr)
  2885. }
  2886. }
  2887. },
  2888. //确认导入
  2889. confirmImport() {
  2890. this.doNot = true
  2891. this.hide = true
  2892. this.pass.fAmtdr = 0
  2893. this.pass.fAmtcr = 0
  2894. for (let item in this.selection) {
  2895. this.pass.fAmtcr = Number(this.pass.fAmtcr)
  2896. this.pass.fAmtdr = Number(this.pass.fAmtdr)
  2897. this.pass.fAmtcr += Number(this.selection[item].fAmt)
  2898. this.pass.fAmtdr += Number(this.selection[item].fAmtdr)
  2899. }
  2900. // this.pass.fAmtcr.toFixed(2);
  2901. if (this.state_s == true) {
  2902. if (this.selection.length == '0') {
  2903. this.$message.error('未选择导入行')
  2904. } else {
  2905. let Num = []
  2906. for (let item in this.selection) {
  2907. this.empty.push(this.selection[item].fMblno)
  2908. this.nothing.push(this.selection[item].fName)
  2909. if (this.increase_s.length === 0) {
  2910. this.increase_s = this.increase_s.concat(this.selection)
  2911. //去重提单号
  2912. this.empty = new Set(this.empty)
  2913. this.empty = Array.from(this.empty)
  2914. //去重货权方
  2915. this.nothing = new Set(this.nothing)
  2916. this.nothing = Array.from(this.nothing)
  2917. if (this.empty.length <= 1) {
  2918. this.pass.fMblno = this.empty[0]
  2919. } else {
  2920. this.pass.fMblno = this.empty[0] + '...'
  2921. }
  2922. if (this.nothing.length <= 1) {
  2923. this.pass.fName = this.nothing[0]
  2924. } else {
  2925. this.pass.fName = this.nothing[0] + '...'
  2926. }
  2927. // this.DzfeeList = this.DzfeeList.concat(this.Fee)
  2928. this.queryParams.tMblno = this.pass.fMblno //提单号
  2929. this.queryParams.fCorpid = this.queryParameter.fToCorpid
  2930. this.queryParams.fCtrlcorpid = this.pass.fName
  2931. this.queryParams.fAmtcr = this.pass.fAmtcr
  2932. this.queryParams.fAmtdr = this.pass.fAmtdr
  2933. this.innerVisible = false
  2934. this.feeList = []
  2935. // this.feeList = this.DzfeeList
  2936. this.queryParameter = {
  2937. fCorpid: '',
  2938. fToCorpid: '',
  2939. fMblno: '',
  2940. fStatementNo: '',
  2941. fFeeid: '',
  2942. fBilltype: '',
  2943. fBusinessType: '',
  2944. fVslid: '',
  2945. fVoyid: '',
  2946. timeExamine: '',
  2947. timeInterval: '',
  2948. fSystemType: Cookies.get('sysType')
  2949. }
  2950. return
  2951. }
  2952. }
  2953. for (let li in this.increase_s) {
  2954. for (let item in this.selection) {
  2955. if (this.selection[item].fSrcid !== this.increase_s[li].fSrcid) {
  2956. this.Fee = this.increase_s.concat(this.selection)
  2957. let result = []
  2958. let obj = {}
  2959. for (let lis in this.Fee) {
  2960. if (!obj[this.Fee[lis].fSrcid]) {
  2961. result.push(this.Fee[lis])
  2962. obj[this.Fee[lis].fSrcid] = true
  2963. }
  2964. }
  2965. //去重提单号
  2966. this.empty = new Set(this.empty)
  2967. this.empty = Array.from(this.empty)
  2968. //去重货权方
  2969. this.nothing = new Set(this.nothing)
  2970. this.nothing = Array.from(this.nothing)
  2971. if (this.empty.length <= 1) {
  2972. this.pass.fMblno = this.empty[0]
  2973. } else {
  2974. this.pass.fMblno = this.empty[0] + '...'
  2975. }
  2976. if (this.nothing.length <= 1) {
  2977. this.pass.fName = this.nothing[0]
  2978. } else {
  2979. this.pass.fName = this.nothing[0] + '...'
  2980. }
  2981. // this.increase_s = this.increase_s.concat(this.selection);
  2982. this.queryParams.tMblno = this.pass.fMblno //提单号
  2983. this.queryParams.fCtrlcorpid = this.pass.fName
  2984. this.queryParams.fCorpid = this.queryParameter.fToCorpid
  2985. this.queryParams.fAmtcr = Number(this.pass.fAmtcr).toFixed(2)
  2986. this.queryParams.fAmtdr = Number(this.pass.fAmtdr).toFixed(2)
  2987. this.innerVisible = false
  2988. this.chargeList_s = []
  2989. this.queryParameter = {
  2990. fCorpid: '',
  2991. fToCorpid: this.queryParams.fCorpid,
  2992. fMblno: '',
  2993. fStatementNo: '',
  2994. fFeeid: '',
  2995. fBilltype: '',
  2996. fBusinessType: '',
  2997. fVslid: '',
  2998. fVoyid: '',
  2999. timeExamine: '',
  3000. timeInterval: '',
  3001. fSystemType: Cookies.get('sysType')
  3002. }
  3003. this.increase_s = result
  3004. } else {
  3005. let i = Number(li) + 1
  3006. Num += i + '、'
  3007. }
  3008. }
  3009. }
  3010. if (Num.length != 0) {
  3011. MessageBox.confirm('从表的第' + (Num).slice(0, Num.length - 1) + '行重复,如本次金额变更,请删除后重新选择', '提示', {
  3012. confirmButtonText: '确定',
  3013. cancelButtonText: '取消',
  3014. type: 'warning'
  3015. }
  3016. )
  3017. }
  3018. }
  3019. } else if (this.state_s == false) {
  3020. this.$message.error('本次金额不能大于原定金额')
  3021. }
  3022. },
  3023. /** 查询财务数据主列表 */
  3024. getList() {
  3025. this.loading = true
  3026. this.getDicts('approval_process').then((response) => {
  3027. this.options = response.data
  3028. })
  3029. if (Cookies.get('sysType') == 1) {
  3030. //大木
  3031. listCharge(this.tableFilter).then((response) => {
  3032. this.chargeList = response.rows
  3033. this.total = response.total
  3034. this.loading = false
  3035. })
  3036. } else if (Cookies.get('sysType') == 2) {
  3037. //车队
  3038. listCharges(this.tableFilter).then((response) => {
  3039. response.rows.map((e) => {
  3040. if (e.createTime) {
  3041. e.createTime = e.createTime.substring(0, 10)
  3042. }
  3043. })
  3044. this.chargeList = response.rows
  3045. this.total = response.total
  3046. this.loading = false
  3047. })
  3048. } else if (Cookies.get('sysType') == 3) {
  3049. if (this.tableFilter.firstMoney || this.tableFilter.lastMoney) {
  3050. if (this.tableFilter.firstMoney == '' || this.tableFilter.lastMoney == '') {
  3051. this.$message.error('实付合计为金额区间,请填写完整')
  3052. this.tableFilter.amount = []
  3053. } else if (!this.tableFilter.firstMoney || !this.tableFilter.lastMoney) {
  3054. this.$message.error('实付合计为金额区间,请填写完整')
  3055. } else {
  3056. this.tableFilter.amount[0] = this.tableFilter.firstMoney
  3057. this.tableFilter.amount[1] = this.tableFilter.lastMoney
  3058. }
  3059. } else {
  3060. this.tableFilter.amount = []
  3061. }
  3062. listInvoice(this.tableFilter).then(response => {
  3063. response.rows.map((e) => {
  3064. if (e.createTime) {
  3065. e.createTime = e.createTime.substring(0, 10)
  3066. }
  3067. })
  3068. this.chargeList = response.rows
  3069. this.total = response.total
  3070. this.loading = false
  3071. })
  3072. }
  3073. },
  3074. // 取消按钮
  3075. cancel() {
  3076. if (this.notChange == true) {
  3077. this.mainTable = false
  3078. } else {
  3079. this.$confirm('返回列表,是否保存?', '提示', {
  3080. confirmButtonText: '保存',
  3081. cancelButtonText: '取消',
  3082. type: 'warning'
  3083. })
  3084. .then(() => {
  3085. this.submitForm(Cookies.get('sysType'))
  3086. })
  3087. .catch(() => {
  3088. this.mainTable = false
  3089. this.getList()
  3090. })
  3091. }
  3092. },
  3093. // 表单重置
  3094. reset() {
  3095. this.form = {
  3096. fId: null,
  3097. fBillno: null,
  3098. fCtrlcorpid: null,
  3099. fCorpid: null,
  3100. tMblno: null,
  3101. fAmtdr: null,
  3102. fAmtcr: null,
  3103. fBilltype: null,
  3104. fBillstatus: '0',
  3105. fRemarks: null,
  3106. fAccbilldate: null,
  3107. delFlag: null,
  3108. createBy: null,
  3109. fDeptid: null,
  3110. createTime: null,
  3111. updateBy: null,
  3112. updateTime: null
  3113. }
  3114. this.resetForm('form')
  3115. },
  3116. /** 搜索按钮操作 */
  3117. handleQuery() {
  3118. this.queryParams.pageNum = 1
  3119. this.getList()
  3120. },
  3121. /** 导入搜索 */
  3122. importSearch() {
  3123. this.chargeList_s = []
  3124. if (this.queryParameter.fStatementNo) {
  3125. this.rules = {}
  3126. if (Cookies.get('sysType') == 1) {
  3127. search(this.queryParameter).then((response) => {
  3128. this.chargeList_s = response.rows
  3129. this.$message.success('查询成功')
  3130. for (let item in this.chargeList_s) {
  3131. this.totAL += Number(this.chargeList_s[item].fAmt)
  3132. this.Ttime += Number(this.chargeList_s[item].fAmtdr)
  3133. }
  3134. })
  3135. } else if (Cookies.get('sysType') == 2) {
  3136. searchs(this.queryParameter).then((response) => {
  3137. this.chargeList_s = response.rows
  3138. this.$message.success('查询成功')
  3139. for (let item in this.chargeList_s) {
  3140. this.totAL += Number(this.chargeList_s[item].fAmt)
  3141. this.Ttime += Number(this.chargeList_s[item].fAmtdr)
  3142. }
  3143. })
  3144. } else if (Cookies.get('sysType') == 3) {
  3145. this.queryParameter.fSystemType = Cookies.get('sysType')
  3146. getcontrastList(this.queryParameter).then((response) => {
  3147. this.chargeList_s = response.rows
  3148. this.$message.success('查询成功')
  3149. for (let item in this.chargeList_s) {
  3150. this.totAL += Number(this.chargeList_s[item].fAmt)
  3151. this.Ttime += Number(this.chargeList_s[item].fAmtdr)
  3152. }
  3153. })
  3154. }
  3155. } else {
  3156. if (this.rules) {
  3157. this.$refs['form'].validate((valid) => {
  3158. if (valid) {
  3159. if (Cookies.get('sysType') == 1) {
  3160. search(this.queryParameter).then((response) => {
  3161. this.chargeList_s = response.rows
  3162. if (this.chargeList_s.length !== 0) {
  3163. this.$message.success('查询成功')
  3164. this.totAL = 0
  3165. this.Ttime = 0
  3166. for (let item in this.chargeList_s) {
  3167. this.totAL += Number(this.chargeList_s[item].fAmt)
  3168. this.Ttime += Number(this.chargeList_s[item].fAmtdr)
  3169. }
  3170. } else {
  3171. this.$message.error('暂无数据')
  3172. }
  3173. })
  3174. } else if (Cookies.get('sysType') == 2) {
  3175. searchs(this.queryParameter).then((response) => {
  3176. this.chargeList_s = response.rows
  3177. if (this.chargeList_s.length !== 0) {
  3178. this.$message.success('查询成功')
  3179. this.totAL = 0
  3180. this.Ttime = 0
  3181. for (let item in this.chargeList_s) {
  3182. this.totAL += Number(this.chargeList_s[item].fAmt)
  3183. this.Ttime += Number(this.chargeList_s[item].fAmtdr)
  3184. }
  3185. } else {
  3186. this.$message.error('暂无数据')
  3187. }
  3188. })
  3189. } else if (Cookies.get('sysType') == 3) {
  3190. this.queryParameter.fSystemType = Cookies.get('sysType')
  3191. getcontrastList(this.queryParameter).then((response) => {
  3192. this.chargeList_s = response.rows
  3193. if (this.chargeList_s.length !== 0) {
  3194. this.$message.success('查询成功')
  3195. this.totAL = 0
  3196. this.Ttime = 0
  3197. for (let item in this.chargeList_s) {
  3198. this.totAL += Number(this.chargeList_s[item].fAmt)
  3199. this.Ttime += Number(this.chargeList_s[item].fAmtdr)
  3200. }
  3201. } else {
  3202. this.$message.error('暂无数据')
  3203. }
  3204. })
  3205. }
  3206. }
  3207. })
  3208. } else {
  3209. this.$message.error('操作频繁')
  3210. }
  3211. }
  3212. },
  3213. /** 远程模糊查询用户 */
  3214. corpsRemoteMethod(name) {
  3215. // if (name == null || name === '') {
  3216. // return false
  3217. // }
  3218. let queryParams = { fName: name }
  3219. listCorps(queryParams).then((response) => {
  3220. this.fMblnoOptions = response
  3221. this.KHblnoOptions = response
  3222. })
  3223. },
  3224. /** 重置按钮操作 */
  3225. resetQuery() {
  3226. this.tableFilter = {
  3227. pageNum: 1,
  3228. pageSize: 10,
  3229. fBillno: null,
  3230. fCtrlcorpid: null,
  3231. fCorpid: null,
  3232. timeInterval: null
  3233. }
  3234. this.handleQuery()
  3235. },
  3236. //导入重置按钮
  3237. resetQuery_s() {
  3238. this.queryParameter = {
  3239. fCorpid: '',
  3240. fToCorpid: '',
  3241. fMblno: '',
  3242. fStatementNo: '',
  3243. fFeeid: '',
  3244. fBilltype: '',
  3245. fBusinessType: '',
  3246. fVslid: '',
  3247. fVoyid: '',
  3248. timeExamine: '',
  3249. timeInterval: '',
  3250. fSystemType: Cookies.get('sysType')
  3251. }
  3252. },
  3253. // 远程模糊查询费用名称
  3254. fWRemoteMethod(name) {
  3255. this.fWbuOptions = []
  3256. if (name == null || name === '') {
  3257. return false
  3258. }
  3259. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  3260. listFees(queryParams).then((response) => {
  3261. this.fWbuOptions = response.rows
  3262. })
  3263. },
  3264. /** 新增按钮操作 */
  3265. handleAdd() {
  3266. this.notChange = false
  3267. this.doNot = false
  3268. this.hide = true
  3269. this.reset()
  3270. this.pass = {
  3271. fAmtdr: 0, //应收合计
  3272. fAmtcr: 0, //应付合计
  3273. fMblno: '', //提单号
  3274. fName: '', //货权方
  3275. fFeesName: '', //结算单位
  3276. fCorpid: '' //结算单位ID
  3277. },
  3278. this.increase_s = []
  3279. this.invoiceList = []
  3280. this.queryParams = {
  3281. pageNum: 1,
  3282. pageSize: 10,
  3283. fBillno: null,
  3284. fCtrlcorpid: null,
  3285. fCorpid: null,
  3286. tMblno: null,
  3287. fAmtdr: null,
  3288. fAmtcr: null,
  3289. fBilltype: null,
  3290. fBillstatus: null,
  3291. fRemarks: null,
  3292. fAccbilldate: null,
  3293. fDeptid: null,
  3294. chargingMethod: null,
  3295. invoiceNo: null,
  3296. bank: null,
  3297. waterBillNo: null,
  3298. fSystemType: Cookies.get('sysType')
  3299. }
  3300. this.feeInfo = true
  3301. this.resetForm('queryParams')
  3302. this.mainTable = true
  3303. this.title = '添加财务数据主'
  3304. },
  3305. /** 修改按钮操作 */
  3306. handleUpdate(row) {
  3307. this.approve = false
  3308. this.hide = false
  3309. this.notChange = false
  3310. this.reset()
  3311. this.pass = {
  3312. fAmtdr: 0, //应收合计
  3313. fAmtcr: 0, //应付合计
  3314. fMblno: '', //提单号
  3315. fName: '', //货权方
  3316. fFeesName: '', //结算单位
  3317. fCorpid: '' //结算单位ID
  3318. }
  3319. const fId = row.fId || this.ids
  3320. if (Cookies.get('sysType') == 1) {
  3321. //大木
  3322. getCharge(fId).then((response) => {
  3323. this.Operator = response.data.tFee.createBy
  3324. if (response.data.feeDoList != 0) {
  3325. response.data.feeDoList.map((e) => {
  3326. if (e.fBsdate) {
  3327. e.fBsdate = e.fBsdate.slice(0, 10)
  3328. }
  3329. if (e.fSrcdc) {
  3330. if (e.fSrcdc == 'D') {
  3331. e.fSrcdc = '收'
  3332. } else {
  3333. e.fSrcdc = '付'
  3334. }
  3335. }
  3336. })
  3337. }
  3338. this.increase_s = response.data.feeDoList
  3339. this.fWbuOptions = response.data.feesList
  3340. this.queryParams = response.data.tFee
  3341. this.fWbuOptions = response.data.feesList
  3342. this.fMblnoOptions = response.data.corps
  3343. this.mainTable = true
  3344. this.title = '修改收费列表'
  3345. if (this.DzfeeList) {
  3346. this.doNot = true
  3347. } else {
  3348. this.doNot = false
  3349. }
  3350. })
  3351. } else if (Cookies.get('sysType') == 2) {
  3352. //车队
  3353. getCharges(fId).then((response) => {
  3354. this.Operator = response.data.tFee.createBy
  3355. if (response.data.feeDoList != 0) {
  3356. response.data.feeDoList.map((e) => {
  3357. if (e.fBsdate) {
  3358. e.fBsdate = e.fBsdate.slice(0, 10)
  3359. }
  3360. if (e.fSrcdc) {
  3361. if (e.fSrcdc == 'D') {
  3362. e.fSrcdc = '收'
  3363. } else {
  3364. e.fSrcdc = '付'
  3365. }
  3366. }
  3367. })
  3368. }
  3369. this.increase_s = response.data.feeDoList
  3370. this.fWbuOptions = response.data.feesList
  3371. this.queryParams = response.data.tFee
  3372. this.fWbuOptions = response.data.feesList
  3373. this.fMblnoOptions = response.data.corps
  3374. this.mainTable = true
  3375. this.title = '修改收费列表'
  3376. if (this.DzfeeList) {
  3377. this.doNot = true
  3378. } else {
  3379. this.doNot = false
  3380. }
  3381. })
  3382. } else if (Cookies.get('sysType') == 3) {
  3383. listDetail(fId).then((response) => {
  3384. this.Operator = response.data.tFee.createBy
  3385. if (response.data.feeDoList != 0) {
  3386. response.data.feeDoList.map((e) => {
  3387. if (e.fBsdate) {
  3388. e.fBsdate = e.fBsdate.slice(0, 10)
  3389. }
  3390. })
  3391. }
  3392. this.feeInfo = true
  3393. this.increase_s = response.data.feeDoList
  3394. this.fWbuOptions = response.data.feesList
  3395. this.queryParams = response.data.tFee
  3396. this.invoiceList = response.data.tFeeInvoiceList
  3397. for (let item in this.invoiceList) {
  3398. this.$set(this.invoiceList[item], 'fSbu', this.invoiceList[item].fSbu + '')
  3399. }
  3400. this.fMblnoOptions.push({
  3401. fId: this.queryParams.fCorpid,
  3402. fName: this.queryParams.fCorpidName
  3403. })
  3404. this.fWbuOptions = response.data.feesList
  3405. // this.fMblnoOptions = response.data.corps;
  3406. this.mainTable = true
  3407. this.title = '修改收费列表'
  3408. if (this.increase_s) {
  3409. this.doNot = true
  3410. } else {
  3411. this.doNot = false
  3412. }
  3413. })
  3414. }
  3415. },
  3416. /** 提交按钮 */
  3417. submitForm(res) {
  3418. this.$refs['ruless'].validate((valid) => {
  3419. if (valid) {
  3420. if (!this.queryParams.fId) {
  3421. // this.chargeList.fBillstatus = '1'
  3422. // this.queryParams.fBillstatus = '1'
  3423. let formData = new window.FormData()
  3424. formData.append('tFee', JSON.stringify(this.queryParams))
  3425. formData.append('tFeeDo', JSON.stringify(this.increase_s))
  3426. if (Cookies.get('sysType') == 1) {
  3427. addCharge(formData).then((response) => {
  3428. let feeBills = response.data.tFee
  3429. this.$set(this.queryParams, 'fId', response.data.tFee.fId)
  3430. this.$set(
  3431. this.queryParams,
  3432. 'fBillno',
  3433. response.data.tFee.fBillno
  3434. )
  3435. this.msgSuccess('新增成功')
  3436. })
  3437. } else if (Cookies.get('sysType') == 2) {
  3438. addCharges(formData).then((response) => {
  3439. let feeBills = response.data.tFee
  3440. this.$set(this.queryParams, 'fId', response.data.tFee.fId)
  3441. this.$set(
  3442. this.queryParams,
  3443. 'fBillno',
  3444. response.data.tFee.fBillno
  3445. )
  3446. this.msgSuccess('新增成功')
  3447. })
  3448. } else if (Cookies.get('sysType') == 3) {
  3449. formData.append('tFeeInvoice', JSON.stringify(this.invoiceList))
  3450. formData.append('billsType', 'INV')
  3451. addPreservation(formData).then((response) => {
  3452. let feeBills = response.data.tFee
  3453. this.$set(this.queryParams, 'fId', response.data.tFee.fId)
  3454. this.$set(
  3455. this.queryParams,
  3456. 'fBillno',
  3457. response.data.tFee.fBillno
  3458. )
  3459. this.msgSuccess('新增成功')
  3460. if (res === 0) {
  3461. this.mainTable = true
  3462. } else {
  3463. this.mainTable = false
  3464. }
  3465. this.getList()
  3466. })
  3467. }
  3468. } else {
  3469. let formData = new window.FormData()
  3470. formData.append('tFee', JSON.stringify(this.queryParams))
  3471. formData.append('tFeeDo', JSON.stringify(this.increase_s))
  3472. if (Cookies.get('sysType') == 3) {
  3473. formData.append('tFeeInvoice', JSON.stringify(this.invoiceList))
  3474. formData.append('billsType', 'INV')
  3475. addPreservation(formData).then((response) => {
  3476. this.msgSuccess('修改成功')
  3477. if (res === 0) {
  3478. this.mainTable = true
  3479. } else {
  3480. this.mainTable = false
  3481. }
  3482. this.getList()
  3483. })
  3484. } else {
  3485. addCharge(formData).then((response) => {
  3486. this.msgSuccess('修改成功')
  3487. this.getList()
  3488. })
  3489. }
  3490. }
  3491. }
  3492. })
  3493. },
  3494. /** 删除按钮操作 */
  3495. handleDelete(row) {
  3496. const fIds = row.fId || this.ids
  3497. let tips = ''
  3498. if (Cookies.get('sysType') == 1) {
  3499. //大木
  3500. delCharge_s(fIds).then((data) => {
  3501. switch (data.msg) {
  3502. case '0': {
  3503. this.$message.error('当前数据已被其他操作员操作请刷新页面')
  3504. break
  3505. }
  3506. case '1': {
  3507. tips = '当前主表有数据从表无数据是否删除'
  3508. this.delete_S(fIds, tips)
  3509. break
  3510. }
  3511. case '2': {
  3512. tips = '当前主表有数据从表有数据是否删除'
  3513. this.delete_S(fIds, tips)
  3514. break
  3515. }
  3516. default: {
  3517. return this.$message.error('未知错误,无状态')
  3518. }
  3519. }
  3520. })
  3521. } else if (Cookies.get('sysType') == 2) {
  3522. // 车队;
  3523. delCharge_ss(fIds).then((data) => {
  3524. switch (data.msg) {
  3525. case '0': {
  3526. this.$message.error('当前数据已被其他操作员操作请刷新页面')
  3527. break
  3528. }
  3529. case '1': {
  3530. tips = '当前主表有数据从表无数据是否删除'
  3531. this.delete_S(fIds, tips)
  3532. break
  3533. }
  3534. case '2': {
  3535. tips = '当前主表有数据从表有数据是否删除'
  3536. this.delete_S(fIds, tips)
  3537. break
  3538. }
  3539. default: {
  3540. return this.$message.error('未知错误,无状态')
  3541. }
  3542. }
  3543. })
  3544. } else if (Cookies.get('sysType') == 3) {
  3545. delCharge_s(fIds).then((data) => {
  3546. switch (data.msg) {
  3547. case '0': {
  3548. this.$message.error('当前数据已被其他操作员操作请刷新页面')
  3549. break
  3550. }
  3551. case '1': {
  3552. tips = '当前主表有数据从表无数据是否删除'
  3553. this.delete_S(fIds, tips)
  3554. break
  3555. }
  3556. case '2': {
  3557. tips = '当前主表有数据从表有数据是否删除'
  3558. this.delete_S(fIds, tips)
  3559. break
  3560. }
  3561. case '3': {
  3562. tips = '当前数据存在已提交数据是否删除?'
  3563. this.delete_S(fIds, tips)
  3564. break
  3565. }
  3566. default: {
  3567. return this.$message.error('未知错误,无状态')
  3568. }
  3569. }
  3570. })
  3571. }
  3572. },
  3573. delete_S(fIds, tips) {
  3574. this.$confirm(tips, '警告', {
  3575. confirmButtonText: '确定',
  3576. cancelButtonText: '取消',
  3577. type: 'warning'
  3578. })
  3579. .then(function() {
  3580. if (Cookies.get('sysType') == 1) {
  3581. return delCharge(fIds)
  3582. } else if (Cookies.get('sysType') == 2) {
  3583. return delCharges(fIds)
  3584. } else if (Cookies.get('sysType') == 3) {
  3585. return delCharge(fIds)
  3586. }
  3587. })
  3588. .then(() => {
  3589. this.getList()
  3590. this.msgSuccess('删除成功')
  3591. })
  3592. },
  3593. /** 导出按钮操作 */
  3594. handleExport() {
  3595. const queryParams = this.queryParams
  3596. this.$confirm('是否确认导出所有财务数据主数据项?', '警告', {
  3597. confirmButtonText: '确定',
  3598. cancelButtonText: '取消',
  3599. type: 'warning'
  3600. })
  3601. .then(function() {
  3602. return exportCharge(queryParams)
  3603. })
  3604. .then((response) => {
  3605. this.download(response.msg)
  3606. })
  3607. },
  3608. //清空一行
  3609. deleteRow(index, rows) {
  3610. this.queryParams.fAmtcr = 0
  3611. this.queryParams.fAmtdr = 0
  3612. rows.splice(index, 1)
  3613. for (let item in this.increase_s) {
  3614. this.queryParams.fAmtcr += this.increase_s[item].fAmt
  3615. this.queryParams.fAmtdr += this.increase_s[item].fAmtdr
  3616. }
  3617. if (this.increase_s == 0) {
  3618. this.doNot = false
  3619. } else {
  3620. this.doNot = true
  3621. }
  3622. },
  3623. // 财务结算方式(数据字典),对应data_settlement_type 字典翻译
  3624. methodTypeFormat(row, column) {
  3625. return this.selectDictLabel(this.methodOptions, row.chargingMethod)
  3626. }
  3627. }
  3628. }
  3629. </script>
  3630. <style lang="scss" scoped>
  3631. .tabSetting {
  3632. display: flex;
  3633. justify-content: flex-end;
  3634. }
  3635. .listStyle {
  3636. display: flex;
  3637. border-top: 1px solid #dcdfe6;
  3638. border-left: 1px solid #dcdfe6;
  3639. border-right: 1px solid #dcdfe6;
  3640. }
  3641. .listStyle:last-child {
  3642. border-bottom: 1px solid #dcdfe6;
  3643. }
  3644. .progress {
  3645. display: flex;
  3646. align-items: center;
  3647. padding: 2px;
  3648. background-color: rgba(0, 0, 0, 0.05);
  3649. height: 100%;
  3650. }
  3651. .avue-crud__dialog__header {
  3652. display: -webkit-box;
  3653. display: -ms-flexbox;
  3654. display: flex;
  3655. -webkit-box-align: center;
  3656. -ms-flex-align: center;
  3657. align-items: center;
  3658. -webkit-box-pack: justify;
  3659. -ms-flex-pack: justify;
  3660. justify-content: space-between;
  3661. }
  3662. .el-dialog__title {
  3663. color: rgba(0, 0, 0, 0.85);
  3664. font-weight: 500;
  3665. word-wrap: break-word;
  3666. }
  3667. .avue-crud__dialog__menu {
  3668. padding-right: 20px;
  3669. float: left;
  3670. }
  3671. .avue-crud__dialog__menu i {
  3672. color: #909399;
  3673. font-size: 15px;
  3674. }
  3675. .el-icon-full-screen {
  3676. cursor: pointer;
  3677. }
  3678. .el-icon-full-screen:before {
  3679. content: "\e719";
  3680. }
  3681. </style>
  3682. <style lang="scss">
  3683. .el-dialog__body {
  3684. padding: 0 20px 30px 20px;
  3685. }
  3686. </style>