index.vue 115 KB

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