index.vue 103 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245
  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="70%"
  765. :visible.sync="innerVisible"
  766. title="导入数据"
  767. append-to-body
  768. >
  769. <el-form
  770. ref="form"
  771. :model="queryParameter"
  772. :rules="rules"
  773. label-width="80px"
  774. style="display: flex; flex-wrap: wrap"
  775. >
  776. <el-row>
  777. <el-col :span="6">
  778. <el-form-item label="货权方" prop="fCtrlcorpid">
  779. <!-- <el-input v-model="queryParameter.fCorpid" placeholder="请输入货权方" style="width: 200px;"/>-->
  780. <el-select
  781. v-model="queryParams.fCorpid"
  782. filterable
  783. remote
  784. clearable
  785. size="small"
  786. style="width: 160px"
  787. @keyup.enter.native="handleQuery"
  788. :remote-method="corpsRemoteMethod"
  789. placeholder="请选择货权方"
  790. >
  791. <el-option
  792. v-for="(dict, index) in fMblnoOptions"
  793. :key="index.fId"
  794. :label="dict.fName"
  795. :value="dict.fId"
  796. ></el-option>
  797. </el-select>
  798. </el-form-item>
  799. </el-col>
  800. <el-col :span="6">
  801. <el-form-item label="结算单位" prop="fToCorpid">
  802. <el-select
  803. v-model="queryParameter.fToCorpid"
  804. filterable
  805. remote
  806. clearable
  807. size="small"
  808. style="width: 160px"
  809. :disabled="doNot"
  810. @keyup.enter.native="handleQuery"
  811. :remote-method="corpsRemoteMethod"
  812. placeholder="请输入结算单位"
  813. >
  814. <el-option
  815. v-for="(dict, index) in fMblnoOptions"
  816. :key="index.fId"
  817. :label="dict.fName"
  818. :value="dict.fId"
  819. ></el-option>
  820. </el-select>
  821. </el-form-item>
  822. </el-col>
  823. <el-col :span="6">
  824. <el-form-item label="提单号" prop="tMblno">
  825. <el-input
  826. v-model="queryParameter.fMblno"
  827. placeholder="请输入提单号"
  828. style="width: 160px"
  829. size="small"
  830. />
  831. </el-form-item>
  832. </el-col>
  833. <el-col :span="6">
  834. <el-form-item label="对账单号" prop="fStatementNo">
  835. <el-input
  836. v-model="queryParameter.fStatementNo"
  837. placeholder="请输入提单号"
  838. size="small"
  839. style="width: 160px"
  840. />
  841. </el-form-item>
  842. </el-col>
  843. </el-row>
  844. <el-row>
  845. <el-col :span="6">
  846. <el-form-item label="费用名称" prop="fFeeid">
  847. <template>
  848. <el-select
  849. v-model="queryParameter.fFeeid"
  850. filterable
  851. remote
  852. size="small"
  853. style="width: 160px"
  854. :remote-method="fWRemoteMethod"
  855. placeholder="费用名称"
  856. multiple
  857. >
  858. <el-option
  859. v-for="item in fWbuOptions"
  860. :key="item.fId"
  861. :label="item.fName"
  862. :value="item.fId"
  863. >
  864. </el-option>
  865. </el-select>
  866. </template>
  867. </el-form-item>
  868. </el-col>
  869. <el-col :span="6">
  870. <el-form-item label="仓储业务" prop="fFeeid" v-if="typevalue == 1 || typevalue == 3">
  871. <el-select
  872. v-model="queryParameter.fBilltype"
  873. size="small"
  874. style="width: 160px"
  875. @change="changefBilltype"
  876. placeholder="请选择仓储业务"
  877. >
  878. <el-option label="入库" value="SJRK"></el-option>
  879. <el-option label="出库" value="SJCK"></el-option>
  880. <el-option label="货权转移" value="HQZY"></el-option>
  881. </el-select>
  882. </el-form-item>
  883. </el-col>
  884. <el-col :span="6">
  885. <el-form-item
  886. label="作业类型"
  887. prop="fBusinessType"
  888. v-if="typevalue == 1 || typevalue == 3"
  889. >
  890. <el-select
  891. v-model="queryParameter.fBusinessType"
  892. filterable
  893. remote
  894. size="small"
  895. style="width: 160px"
  896. placeholder="作业类型"
  897. multiple
  898. >
  899. <el-option
  900. v-for="dict in businessTypeOption"
  901. :key="dict.dictValue"
  902. :label="dict.dictLabel"
  903. :value="dict.dictValue"
  904. >
  905. </el-option>
  906. </el-select>
  907. </el-form-item>
  908. </el-col>
  909. <el-col :span="6" style="width: 240px"></el-col>
  910. </el-row>
  911. <el-row>
  912. <el-col :span="8">
  913. <el-form-item
  914. label="审核日期"
  915. prop="timeExamine"
  916. v-if="typevalue == 1 || typevalue == 3"
  917. >
  918. <el-date-picker
  919. size="small"
  920. style="width: 240px"
  921. v-model="queryParameter.timeExamine"
  922. type="daterange"
  923. start-placeholder="开始日期"
  924. end-placeholder="结束日期"
  925. value-format="yyyy-MM-dd"
  926. :default-time="['00:00:00', '23:59:59']"
  927. >
  928. </el-date-picker>
  929. </el-form-item>
  930. </el-col>
  931. <el-col :span="8">
  932. <el-form-item
  933. label="出入库日期"
  934. label-width="85px"
  935. prop="fAccbilldate"
  936. v-if="typevalue == 1 || typevalue == 3"
  937. >
  938. <el-date-picker
  939. size="small"
  940. style="width: 240px"
  941. v-model="queryParameter.timeInterval"
  942. type="daterange"
  943. start-placeholder="开始日期"
  944. end-placeholder="结束日期"
  945. value-format="yyyy-MM-dd"
  946. :default-time="['00:00:00', '23:59:59']"
  947. >
  948. </el-date-picker>
  949. </el-form-item>
  950. </el-col>
  951. <el-col :span="8" style="width: 320px">
  952. <el-form-item>
  953. <el-button
  954. type="cyan"
  955. icon="el-icon-search"
  956. size="mini"
  957. @click="importSearch"
  958. >搜索</el-button
  959. >
  960. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery_s"
  961. >重置</el-button
  962. >
  963. </el-form-item>
  964. </el-col>
  965. </el-row>
  966. </el-form>
  967. <el-table
  968. v-loading="loading"
  969. :data="chargeList_s"
  970. ref="chargeList"
  971. show-summary
  972. :summary-method="getSum"
  973. @selection-change="handleSelectionChange_s"
  974. >
  975. <el-table-column type="selection" width="55" align="center" />
  976. <el-table-column
  977. label="序号"
  978. type="index"
  979. width="55"
  980. align="center"
  981. />
  982. <el-table-column label="货权方" align="center" prop="fName" width="200px" show-overflow-tooltip/>
  983. <el-table-column label="提单号" align="center" prop="fMblno" />
  984. <el-table-column v-if="typevalue == 1 || typevalue == 2" label="品名" align="center" prop="fProductName" />
  985. <el-table-column v-if="typevalue == 1 || typevalue == 2" label="业务日期" align="center">
  986. <template slot-scope="scope" v-if="scope.row.fBsdate">
  987. <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>
  988. </template>
  989. </el-table-column>
  990. <el-table-column label="业务类型" align="center" prop="fBilltype">
  991. <template slot-scope="scope">
  992. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  993. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  994. <span v-else>{{ scope.row.fBilltype }}</span>
  995. </template>
  996. </el-table-column>
  997. <el-table-column
  998. label="作业类型"
  999. align="center"
  1000. prop="fBusinessType"
  1001. />
  1002. <el-table-column label="审核日期" align="center" prop="fReviewDate" width="100px"/>
  1003. <el-table-column label="费用名称" align="center" prop="fFeeName" width="100px" show-overflow-tooltip/>
  1004. <el-table-column label="金额" align="center" prop="fAmtdr" />
  1005. <el-table-column
  1006. label="本次金额"
  1007. align="center"
  1008. prop="fAmt"
  1009. width="100"
  1010. >
  1011. <template slot-scope="scope">
  1012. <el-input
  1013. v-model="scope.row.fAmt"
  1014. placeholder="请输入本次金额"
  1015. clearable
  1016. size="small"
  1017. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1018. @change="imgChangeI(scope.row)"
  1019. />
  1020. </template>
  1021. </el-table-column>
  1022. <el-table-column label="备注" align="center" prop="fRemarks">
  1023. <template slot-scope="scope">
  1024. <el-input
  1025. v-model="scope.row.fRemarks"
  1026. placeholder="请输入备注"
  1027. clearable
  1028. size="small"
  1029. width="100"
  1030. />
  1031. </template>
  1032. </el-table-column>
  1033. </el-table>
  1034. <div slot="footer" class="dialog-footer">
  1035. <el-button type="primary" @click="confirmImport">确 定</el-button>
  1036. <el-button @click="signOut">取 消</el-button>
  1037. </div>
  1038. </el-dialog>
  1039. </div>
  1040. <!-- 打印页面-->
  1041. <!-- <el-dialog-->
  1042. <!-- :visible.sync="printStatus"-->
  1043. <!-- width="80%"-->
  1044. <!-- :before-close="closePrinting"-->
  1045. <!-- >-->
  1046. <!-- <el-table-->
  1047. <!-- id="print_area2"-->
  1048. <!-- v-loading="loading"-->
  1049. <!-- ref="table"-->
  1050. <!-- :data="printObject"-->
  1051. <!-- @selection-change="handleSelectionChange_s"-->
  1052. <!-- >-->
  1053. <!-- &lt;!&ndash; <el-table-column type="selection" width="55" align="center"/> &ndash;&gt;-->
  1054. <!-- <el-table-column label="序号" type="index" width="70" align="center" />-->
  1055. <!-- <el-table-column-->
  1056. <!-- label="提单号"-->
  1057. <!-- align="center"-->
  1058. <!-- prop="fMblno"-->
  1059. <!-- width="120"-->
  1060. <!-- />-->
  1061. <!-- <el-table-column-->
  1062. <!-- label="存货单号"-->
  1063. <!-- align="center"-->
  1064. <!-- prop="fBscorpno"-->
  1065. <!-- width="120"-->
  1066. <!-- />-->
  1067. <!-- <el-table-column-->
  1068. <!-- label="品名"-->
  1069. <!-- align="center"-->
  1070. <!-- prop="fProductName"-->
  1071. <!-- width="120"-->
  1072. <!-- />-->
  1073. <!-- <el-table-column-->
  1074. <!-- label="业务日期"-->
  1075. <!-- align="center"-->
  1076. <!-- prop="fBsdate"-->
  1077. <!-- width="120"-->
  1078. <!-- >-->
  1079. <!-- <template slot-scope="scope" v-if="scope.row.fBsdate">-->
  1080. <!-- <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>-->
  1081. <!-- </template>-->
  1082. <!-- </el-table-column>-->
  1083. <!-- <el-table-column-->
  1084. <!-- label="费用名称"-->
  1085. <!-- align="center"-->
  1086. <!-- prop="fFeeName"-->
  1087. <!-- width="120"-->
  1088. <!-- />-->
  1089. <!-- <el-table-column label="收/付" align="center" prop="fSrcdc" width="120">-->
  1090. <!-- <template slot-scope="scope">-->
  1091. <!-- <span v-if="scope.row.fSrcdc == 'D'">收</span>-->
  1092. <!-- <span v-else-if="scope.row.fSrcdc == 'C'">付</span>-->
  1093. <!-- </template>-->
  1094. <!-- </el-table-column>-->
  1095. <!-- <el-table-column-->
  1096. <!-- label="业务类型"-->
  1097. <!-- align="center"-->
  1098. <!-- prop="fBilltype"-->
  1099. <!-- width="120"-->
  1100. <!-- >-->
  1101. <!-- <template slot-scope="scope">-->
  1102. <!-- <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>-->
  1103. <!-- <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>-->
  1104. <!-- <span v-else>{{ scope.row.fBilltype }}</span>-->
  1105. <!-- </template>-->
  1106. <!-- </el-table-column>-->
  1107. <!-- <el-table-column label="作业类型" align="center" prop="fBusinessType" />-->
  1108. <!-- <el-table-column-->
  1109. <!-- label="金额"-->
  1110. <!-- align="center"-->
  1111. <!-- prop="fAmtdr"-->
  1112. <!-- width="120"-->
  1113. <!-- />-->
  1114. <!-- <el-table-column-->
  1115. <!-- label="本次金额"-->
  1116. <!-- align="center"-->
  1117. <!-- prop="fAmt"-->
  1118. <!-- width="120"-->
  1119. <!-- />-->
  1120. <!-- </el-table>-->
  1121. <!-- <span slot="footer" class="dialog-footer">-->
  1122. <!-- <el-button-->
  1123. <!-- type="primary"-->
  1124. <!-- style="margintop: 10px"-->
  1125. <!-- @click="printSomething"-->
  1126. <!-- >打印</el-button-->
  1127. <!-- >-->
  1128. <!-- <el-button @click="printStatus = false">取 消</el-button>-->
  1129. <!-- </span>-->
  1130. <!-- </el-dialog>-->
  1131. </div>
  1132. </template>
  1133. <script>
  1134. import {
  1135. collectFee,
  1136. collectFees,
  1137. listCharge,
  1138. listCharges,
  1139. getCharge,
  1140. getCharges,
  1141. delCharge,
  1142. delCharges,
  1143. addCharge,
  1144. addCharges,
  1145. exportCharge,
  1146. search,
  1147. searchs,
  1148. listCorps,
  1149. delCharge_s,
  1150. delCharge_ss,
  1151. backCharge,
  1152. revocation,
  1153. exportWarehousebillsitems,
  1154. } from "@/api/finance/charge";
  1155. import { listFees } from "@/api/basicdata/fees";
  1156. import print from "print-js";
  1157. import AddOrUpdate from "@/views/viewApproval";
  1158. import ApprovalComments from "@/views/startApproval";
  1159. import { queryUserVal } from "@/api/warehouseBusiness/agreement";
  1160. import Global from "@/layout/components/global";
  1161. import Vue from "vue";
  1162. import Cookies from "js-cookie";
  1163. import draggable from "vuedraggable";
  1164. import { addSet, select,resetModule } from "@/api/system/set";
  1165. import { MessageBox } from 'element-ui'
  1166. Vue.directive("dialogDrag", {
  1167. bind(el, binding, vnode, oldVnode) {
  1168. const dialogHeaderEl = el.querySelector(".el-dialog__header");
  1169. const dragDom = el.querySelector(".el-dialog");
  1170. const enlarge = el.querySelector(".enlarge");
  1171. dialogHeaderEl.style.cursor = "move";
  1172. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  1173. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
  1174. if (enlarge) {
  1175. enlarge.onclick = (e) => {
  1176. dragDom.style.top = "0px";
  1177. dragDom.style.left = "0px";
  1178. };
  1179. }
  1180. dialogHeaderEl.onmousedown = (e) => {
  1181. // 鼠标按下,计算当前元素距离可视区的距离
  1182. const disX = e.clientX - dialogHeaderEl.offsetLeft;
  1183. const disY = e.clientY - dialogHeaderEl.offsetTop;
  1184. // 获取到的值带px 正则匹配替换
  1185. let styL, styT;
  1186. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  1187. if (sty.left.includes("%")) {
  1188. styL =
  1189. +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
  1190. styT =
  1191. +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
  1192. } else {
  1193. styL = +sty.left.replace(/\px/g, "");
  1194. styT = +sty.top.replace(/\px/g, "");
  1195. }
  1196. document.onmousemove = function (e) {
  1197. // 通过事件委托,计算移动的距离
  1198. const l = e.clientX - disX;
  1199. const t = e.clientY - disY;
  1200. // 移动当前元素
  1201. if (t + styT >= 0) {
  1202. dragDom.style.top = `${t + styT}px`;
  1203. }
  1204. dragDom.style.left = `${l + styL}px`;
  1205. // 将此时的位置传出去
  1206. // binding.value({x:e.pageX,y:e.pageY})
  1207. };
  1208. document.onmouseup = function (e) {
  1209. document.onmousemove = null;
  1210. document.onmouseup = null;
  1211. };
  1212. };
  1213. },
  1214. });
  1215. export default {
  1216. name: "Charge",
  1217. data() {
  1218. return {
  1219. show:false,
  1220. mainTable:false,
  1221. //全屏放大
  1222. dialogFull: false,
  1223. drag: false,
  1224. tableDate: [
  1225. {
  1226. surface: "1",
  1227. label: "createBy",
  1228. name: "制单人",
  1229. checked: 0,
  1230. fixed: "left",
  1231. width: 100,
  1232. },
  1233. {
  1234. surface: "2",
  1235. label: "fBillno",
  1236. name: "系统编号",
  1237. checked: 0,
  1238. fixed: "left",
  1239. width: 100,
  1240. },
  1241. {
  1242. surface: "3",
  1243. label: "fCtrlcorpid",
  1244. name: "货权方",
  1245. checked: 0,
  1246. width: 100,
  1247. },
  1248. {
  1249. surface: "4",
  1250. label: "createTime",
  1251. name: "制单日期",
  1252. checked: 0,
  1253. width: 100,
  1254. },
  1255. {
  1256. surface: "5",
  1257. label: "fAccbilldate",
  1258. name: "收费日期",
  1259. checked: 0,
  1260. width: 100,
  1261. },
  1262. {
  1263. surface: "6",
  1264. label: "tMblno",
  1265. name: "提单号",
  1266. checked: 0,
  1267. width: 100,
  1268. },
  1269. {
  1270. surface: "7",
  1271. label: "chargingMethod",
  1272. name: "收费方式",
  1273. checked: 0,
  1274. width: 100,
  1275. },
  1276. {
  1277. surface: "8",
  1278. label: "invoiceNo",
  1279. name: "发票号",
  1280. checked: 0,
  1281. width: 100,
  1282. },
  1283. {
  1284. surface: "9",
  1285. label: "bank",
  1286. name: "收款银行",
  1287. checked: 0,
  1288. width: 100,
  1289. },
  1290. {
  1291. surface: "10",
  1292. label: "waterBillNo",
  1293. name: "水单号",
  1294. checked: 0,
  1295. width: 100,
  1296. },
  1297. {
  1298. surface: "11",
  1299. label: "fAmtdr",
  1300. name: "应收合计",
  1301. checked: 0,
  1302. width: 100,
  1303. },
  1304. {
  1305. surface: "12",
  1306. label: "fAmtcr",
  1307. name: "实收合计",
  1308. checked: 0,
  1309. width: 100,
  1310. },
  1311. {
  1312. surface: "13",
  1313. label: "fRemarks",
  1314. name: "备注",
  1315. checked: 0,
  1316. width: 100,
  1317. },
  1318. {
  1319. surface: "14",
  1320. label: "fBillstatus",
  1321. name: "状态",
  1322. checked: 0,
  1323. width: 100,
  1324. },
  1325. ],
  1326. tableDate2: [
  1327. {
  1328. surface: "1",
  1329. label: "fMblno",
  1330. name: "提单号",
  1331. checked: 0,
  1332. width: 100,
  1333. },
  1334. {
  1335. surface: "2",
  1336. label: "fBscorpno",
  1337. name: "存货单号",
  1338. checked: 0,
  1339. width: 100,
  1340. },
  1341. {
  1342. surface: "3",
  1343. label: "fProductName",
  1344. name: "品名",
  1345. checked: 0,
  1346. width: 100,
  1347. },
  1348. {
  1349. surface: "4",
  1350. label: "fBsdate",
  1351. name: "业务日期",
  1352. checked: 0,
  1353. width: 100,
  1354. },
  1355. {
  1356. surface: "5",
  1357. label: "fFeeName",
  1358. name: "费用名称",
  1359. checked: 0,
  1360. width: 100,
  1361. },
  1362. {
  1363. surface: "6",
  1364. label: "fSrcdc",
  1365. name: "收/付",
  1366. checked: 0,
  1367. width: 100,
  1368. },
  1369. {
  1370. surface: "7",
  1371. label: "fBilltype",
  1372. name: "业务类型",
  1373. checked: 0,
  1374. width: 100,
  1375. },
  1376. {
  1377. surface: "8",
  1378. label: "fBusinessType",
  1379. name: "作业类型",
  1380. checked: 0,
  1381. width: 100,
  1382. },
  1383. {
  1384. surface: "9",
  1385. label: "fAmtdr",
  1386. name: "金额",
  1387. checked: 0,
  1388. width: 100,
  1389. },
  1390. {
  1391. surface: "10",
  1392. label: "fAmt",
  1393. name: "本次金额",
  1394. checked: 0,
  1395. width: 100,
  1396. },
  1397. {
  1398. surface: "11",
  1399. label: "fRemarks",
  1400. name: "备注",
  1401. checked: 0,
  1402. width: 100,
  1403. },
  1404. ],
  1405. setRowList: [],
  1406. getRowList: [],
  1407. setRowList2: [],
  1408. getRowList2: [],
  1409. allCheck2: false,
  1410. showSetting2: false,
  1411. typevalue: "",
  1412. typeoptions: [
  1413. {
  1414. value: "1",
  1415. label: "仓储",
  1416. },
  1417. {
  1418. value: "2",
  1419. label: "车队",
  1420. },
  1421. {
  1422. value: "3",
  1423. label: "船务",
  1424. }
  1425. ],
  1426. allCheck: false,
  1427. showSetting: false,
  1428. //收费方式
  1429. methodOptions: [],
  1430. doNot: false,
  1431. Lander: "",
  1432. Operator: "",
  1433. approve: false,
  1434. addOrUpdateVisible: false,
  1435. businessTypeOption: [],
  1436. contrastId: 220,
  1437. tablefilter: false,
  1438. hide: false,
  1439. openPrint: false,
  1440. notChange: false,
  1441. browseStatus: true,
  1442. nothing: [],
  1443. //打印表
  1444. printObject: [],
  1445. printStatus: false,
  1446. //导入状态
  1447. state_s: true,
  1448. fWbuOptions: [],
  1449. options: "",
  1450. // 遮罩层
  1451. loading: true,
  1452. //打开内部弹窗
  1453. innerVisible: false,
  1454. chargeList_s: [],
  1455. selection: "",
  1456. increase_s: [],
  1457. cancelButton: true,
  1458. // 选中数组
  1459. ids: [],
  1460. // 非单个禁用
  1461. single: true,
  1462. // 非多个禁用
  1463. multiple: true,
  1464. // 显示搜索条件
  1465. showSearch: true,
  1466. // 总条数
  1467. total: 0,
  1468. totAL: 0,
  1469. Ttime: 0,
  1470. //提单号暂存
  1471. fMblno: "",
  1472. // 财务数据主表格数据
  1473. chargeList: [],
  1474. // 弹出层标题
  1475. title: "",
  1476. // 是否显示弹出层
  1477. open: false,
  1478. fMblnoOptions: "",
  1479. //导入查询参数
  1480. queryParameter: {
  1481. fCorpid: "",
  1482. fToCorpid: "",
  1483. fMblno: "",
  1484. fStatementNo: "",
  1485. fFeeid: "",
  1486. timeExamine: "",
  1487. timeInterval: "",
  1488. fBilltype: "",
  1489. fBusinessType: "",
  1490. },
  1491. empty: [],
  1492. //导入从表传主表
  1493. pass: {
  1494. fAmtdr: 0, //应收合计
  1495. fAmtcr: 0, //应付合计
  1496. fMblno: "", //提单号
  1497. fName: "", //货权方
  1498. },
  1499. Xbutton: true,
  1500. // 查询参数
  1501. queryParams: {
  1502. fId: null,
  1503. pageNum: 1,
  1504. pageSize: 10,
  1505. fBillno: null,
  1506. fCtrlcorpid: null,
  1507. fCorpid: null,
  1508. tMblno: null,
  1509. fAmtdr: null,
  1510. fAmtcr: null,
  1511. fBilltype: null,
  1512. fBillstatus: null,
  1513. fRemarks: null,
  1514. fAccbilldate: null,
  1515. fDeptid: null,
  1516. chargingMethod: null,
  1517. invoiceNo: null,
  1518. bank: null,
  1519. waterBillNo: null,
  1520. },
  1521. addOrUpdateVisib: false,
  1522. // 主表查询参数
  1523. tableFilter: {
  1524. pageNum: 1,
  1525. pageSize: 10,
  1526. fBillno: null,
  1527. fCtrlcorpid: null,
  1528. fCorpid: null,
  1529. tMblno: null,
  1530. fAmtdr: null,
  1531. fAmtcr: null,
  1532. fBilltype: null,
  1533. fBillstatus: null,
  1534. fRemarks: null,
  1535. fAccbilldate: null,
  1536. fDeptid: null,
  1537. },
  1538. approval: [],
  1539. // 表单参数
  1540. form: {},
  1541. // 表单校验
  1542. ruless: {
  1543. fCtrlcorpid: [{ required: true, message: " ", trigger: "blur" }],
  1544. fCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1545. fAccbilldate: [{ required: true, message: " ", trigger: "blur" }],
  1546. },
  1547. // 表单校验
  1548. rules: {
  1549. fBilltype: [{ required: true, message: " ", trigger: "change" }],
  1550. fBillstatus: [{ required: true, message: " ", trigger: "blur" }],
  1551. fDeptid: [{ required: true, message: " ", trigger: "blur" }],
  1552. fToCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1553. timeExamine: [{ required: true, message: " ", trigger: "blur" }],
  1554. },
  1555. };
  1556. },
  1557. components: {
  1558. AddOrUpdate,
  1559. ApprovalComments,
  1560. draggable
  1561. },
  1562. created() {
  1563. this.setRowList = this.tableDate;
  1564. this.getRowList = this.tableDate;
  1565. this.setRowList2 = this.tableDate2;
  1566. this.getRowList2 = this.tableDate2;
  1567. this.typevalue = Cookies.get("sysType");
  1568. this.getList();
  1569. this.register();
  1570. this.getDicts("st_in_type").then((response) => {
  1571. this.businessTypeOption = response.data;
  1572. });
  1573. this.getDicts("data_settlement_type").then((response) => {
  1574. this.methodOptions = response.data;
  1575. });
  1576. this.getRow();
  1577. this.getRow2();
  1578. },
  1579. activated() {
  1580. console.log(this.$route.query.data)
  1581. if(this.$route.query.data){
  1582. let data = JSON.parse(this.$route.query.data)
  1583. if(data.key === 1){
  1584. this.handleAdd()
  1585. }else{
  1586. this.adoPt();
  1587. }
  1588. }
  1589. },
  1590. methods: {
  1591. sumTable(param){
  1592. const { columns, data } = param;
  1593. const sums = [];
  1594. columns.forEach((column, index) => {
  1595. if (index === 0) {
  1596. sums[index] = '总价';
  1597. return;
  1598. }
  1599. const values = data.map(item => Number(item[column.property]));
  1600. if (!values.every(value => isNaN(value))) {
  1601. sums[index] = values.reduce((prev, curr) => {
  1602. const value = Number(curr);
  1603. if (!isNaN(value)) {
  1604. return prev + curr;
  1605. } else {
  1606. return prev;
  1607. }
  1608. }, 0);
  1609. sums[index] += ' 元';
  1610. } else {
  1611. sums[index] = 'N/A';
  1612. }
  1613. });
  1614. return sums;
  1615. },
  1616. addPage(){
  1617. MessageBox.confirm("是否已保存?",{
  1618. confirmButtonText: '确定',
  1619. cancelButtonText: '取消',
  1620. type: 'warning'
  1621. }
  1622. ).then(()=> {
  1623. this.handleAdd()
  1624. })
  1625. },
  1626. //导出明细
  1627. handleExportItems() {
  1628. const fIds = this.queryParams.fId;
  1629. if (fIds !== null) {
  1630. this.$confirm("是否确认导出所有计费物资明细数据?", "警告", {
  1631. confirmButtonText: "确定",
  1632. cancelButtonText: "取消",
  1633. type: "warning",
  1634. })
  1635. .then(function () {
  1636. return exportWarehousebillsitems(fIds);
  1637. })
  1638. .then((response) => {
  1639. this.download(response.msg);
  1640. });
  1641. } else {
  1642. this.$message("请先保存");
  1643. }
  1644. },
  1645. full() {
  1646. this.dialogFull = !this.dialogFull;
  1647. },
  1648. //列设置全选
  1649. allChecked() {
  1650. if (this.allCheck == true) {
  1651. this.setRowList.map((e) => {
  1652. return (e.checked = 0);
  1653. });
  1654. } else {
  1655. this.setRowList.map((e) => {
  1656. return (e.checked = 1);
  1657. });
  1658. }
  1659. },
  1660. //查询列数据
  1661. getRow() {
  1662. let that = this;
  1663. this.data = {
  1664. tableName: "-收费",
  1665. userId: Cookies.get("userName"),
  1666. };
  1667. select(this.data).then((res) => {
  1668. if (res.data.length != 0) {
  1669. this.getRowList = res.data.filter((e) => e.checked == 0);
  1670. this.setRowList = res.data;
  1671. this.setRowList = this.setRowList.reduce((res, item) => {
  1672. res.push({
  1673. surface: item.surface,
  1674. label: item.label,
  1675. name: item.name,
  1676. checked: item.checked,
  1677. width: item.width,
  1678. fixed: item.fixed,
  1679. });
  1680. return res;
  1681. }, []);
  1682. }
  1683. });
  1684. },
  1685. //保存列设置
  1686. save() {
  1687. this.showSetting = false;
  1688. this.data = {
  1689. tableName: "-收费",
  1690. userId: Cookies.get("userName"),
  1691. sysTableSetList: this.setRowList,
  1692. };
  1693. addSet(this.data).then((res) => {
  1694. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1695. });
  1696. },
  1697. //重置列表
  1698. delRow() {
  1699. this.data = {
  1700. tableName: "-收费",
  1701. userId: Cookies.get("userName"),
  1702. };
  1703. resetModule(this.data).then((res) => {
  1704. if (res.code == 200) {
  1705. this.showSetting = false;
  1706. this.setRowList = this.getRowList = this.$options.data().tableDate
  1707. }
  1708. });
  1709. },
  1710. //列设置全选
  1711. allChecked2() {
  1712. if (this.allCheck2 == true) {
  1713. this.setRowList2.map((e) => {
  1714. return (e.checked = 0);
  1715. });
  1716. } else {
  1717. this.setRowList2.map((e) => {
  1718. return (e.checked = 1);
  1719. });
  1720. }
  1721. },
  1722. //查询列数据
  1723. getRow2() {
  1724. let that = this;
  1725. this.data = {
  1726. tableName: "收费明细",
  1727. userId: Cookies.get("userName"),
  1728. };
  1729. select(this.data).then((res) => {
  1730. if (res.data.length != 0) {
  1731. this.getRowList2 = res.data.filter((e) => e.checked == 0);
  1732. this.setRowList2 = res.data;
  1733. this.setRowList2 = this.setRowList2.reduce((res, item) => {
  1734. res.push({
  1735. surface: item.surface,
  1736. label: item.label,
  1737. name: item.name,
  1738. checked: item.checked,
  1739. width: item.width,
  1740. fixed: item.fixed,
  1741. });
  1742. return res;
  1743. }, []);
  1744. }
  1745. });
  1746. },
  1747. //保存列设置
  1748. save2() {
  1749. this.showSetting2 = false;
  1750. this.data = {
  1751. tableName: "收费明细",
  1752. userId: Cookies.get("userName"),
  1753. sysTableSetList: this.setRowList2,
  1754. };
  1755. addSet(this.data).then((res) => {
  1756. this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0);
  1757. });
  1758. },
  1759. //重置列表
  1760. delRow2() {
  1761. this.data = {
  1762. tableName: "收费明细",
  1763. userId: Cookies.get("userName"),
  1764. };
  1765. resetModule(this.data).then((res) => {
  1766. if (res.code == 200) {
  1767. this.showSetting2 = false;
  1768. this.setRowList2 = this.getRowList2 = this.$options.data().tableDate2
  1769. }
  1770. });
  1771. },
  1772. //开始拖拽事件
  1773. onStart() {
  1774. this.drag = true;
  1775. },
  1776. //拖拽结束事件
  1777. onEnd() {
  1778. this.drag = false;
  1779. },
  1780. //财务主取消
  1781. signOut() {
  1782. if (this.increase_s.length == 0) {
  1783. this.doNot = false;
  1784. } else {
  1785. this.doNot = true;
  1786. }
  1787. this.innerVisible = false;
  1788. this.feeList = [];
  1789. },
  1790. //收费页面合计
  1791. listTotal(param) {
  1792. const { columns, data } = param;
  1793. const sums = [];
  1794. columns.forEach((column, index) => {
  1795. if (index === 0) {
  1796. sums[index] = "合计";
  1797. } else if (column.label == '应收合计' || column.label == '实收合计' || column.label == '金额' || column.label == '本次金额') {
  1798. const values = data.map((item) => Number(item[column.property]));
  1799. if (!values.every((value) => isNaN(value))) {
  1800. sums[index] = values.reduce((prev, curr) => {
  1801. const value = Number(curr);
  1802. if (!isNaN(value)) {
  1803. return prev + curr;
  1804. } else {
  1805. return prev;
  1806. }
  1807. }, 0);
  1808. }
  1809. }
  1810. });
  1811. return sums;
  1812. },
  1813. approvalRevocation() {
  1814. if(Cookies.get("sysType") == 3){
  1815. let data = {
  1816. id: this.queryParams.fId,
  1817. actId: 440,
  1818. billId: this.queryParams.fId,
  1819. };
  1820. revocation(data).then((data) => {
  1821. if (data.code === 200) {
  1822. this.$message.success("撤销成功");
  1823. this.mainTable = false
  1824. this.open = false;
  1825. this.getList();
  1826. }
  1827. });
  1828. }else{
  1829. let data = {
  1830. id: this.queryParams.fId,
  1831. actId: this.contrastId,
  1832. billId: this.queryParams.fId,
  1833. };
  1834. revocation(data).then((data) => {
  1835. if (data.code === 200) {
  1836. this.$message.success("撤销成功");
  1837. this.open = false;
  1838. this.getList();
  1839. }
  1840. });
  1841. }
  1842. },
  1843. returnData() {
  1844. this.addOrUpdateVisib = false;
  1845. this.open = false;
  1846. this.homepaGe();
  1847. },
  1848. getDataList() {
  1849. this.addOrUpdateVisible = false;
  1850. },
  1851. changefBilltype() {
  1852. this.businessTypeOption = [];
  1853. if (this.queryParameter.fBilltype == "SJRK") {
  1854. this.getDicts("st_in_type").then((response) => {
  1855. this.businessTypeOption = response.data;
  1856. });
  1857. } else if (this.queryParameter.fBilltype == "SJCK") {
  1858. this.getDicts("st_out_type").then((response) => {
  1859. this.businessTypeOption = response.data;
  1860. });
  1861. } else if (this.queryParameter.fBilltype == "HQZY") {
  1862. this.getDicts("st_trans_type").then((response) => {
  1863. this.businessTypeOption = response.data;
  1864. });
  1865. }
  1866. },
  1867. homepaGe() {
  1868. let view = {
  1869. fullPath: "/finance/charge",
  1870. hash: "",
  1871. matched: Array(2),
  1872. meta: Object,
  1873. name: "Charge",
  1874. params: Object,
  1875. path: "/finance/charge",
  1876. query: Object,
  1877. title: "收费",
  1878. };
  1879. this.$router.push({ path: "/index" });
  1880. this.$store
  1881. .dispatch("tagsView/delView", view)
  1882. .then(({ visitedViews }) => {
  1883. if (this.isActive(view)) {
  1884. this.toLastView(visitedViews, view);
  1885. }
  1886. });
  1887. Global.$emit("removeCache", "closeSelectedTag", view);
  1888. },
  1889. adoPt() {
  1890. this.approval = this.$route.query.data;
  1891. console.log(this.approval)
  1892. if (this.approval) {
  1893. this.doNot = true
  1894. this.Xbutton = false;
  1895. this.approval = JSON.parse(this.approval);
  1896. this.hide = false;
  1897. this.tablefilter = true;
  1898. this.notChange = true;
  1899. this.approve = true;
  1900. this.cancelButton = false;
  1901. this.reset();
  1902. this.pass = {
  1903. fAmtdr: 0, //应收合计
  1904. fAmtcr: 0, //应付合计
  1905. fMblno: "", //提单号
  1906. fName: "", //货权方
  1907. fFeesName: "", //结算单位
  1908. fCorpid: "", //结算单位ID
  1909. };
  1910. getCharge(this.approval.billId).then((response) => {
  1911. this.Operator = response.data.tFee.createBy;
  1912. if (response.data.feeDoList != 0) {
  1913. response.data.feeDoList.map((e) => {
  1914. if (e.fBsdate) {
  1915. e.fBsdate = e.fBsdate.slice(0, 10);
  1916. }
  1917. if (e.fSrcdc) {
  1918. if (e.fSrcdc == "D") {
  1919. e.fSrcdc = "收";
  1920. } else {
  1921. e.fSrcdc = "付";
  1922. }
  1923. }
  1924. });
  1925. }
  1926. this.increase_s = response.data.feeDoList;
  1927. this.fWbuOptions = response.data.feesList;
  1928. this.queryParams = response.data.tFee;
  1929. this.fWbuOptions = response.data.feesList;
  1930. this.fMblnoOptions = response.data.corps;
  1931. this.mainTable = true
  1932. this.title = "修改收费列表";
  1933. });
  1934. }
  1935. },
  1936. homePage() {
  1937. this.open = false;
  1938. let view = {
  1939. fullPath: "/finance/charge",
  1940. hash: "",
  1941. matched: Array(2),
  1942. meta: Object,
  1943. name: "Charge",
  1944. params: Object,
  1945. path: "/finance/charge",
  1946. query: Object,
  1947. title: "收费",
  1948. };
  1949. this.$router.push({ path: "/index" });
  1950. this.$store
  1951. .dispatch("tagsView/delView", view)
  1952. .then(({ visitedViews }) => {
  1953. if (this.isActive(view)) {
  1954. this.toLastView(visitedViews, view);
  1955. }
  1956. });
  1957. Global.$emit("removeCache", "closeSelectedTag", view);
  1958. },
  1959. register() {
  1960. queryUserVal().then((response) => {
  1961. this.Lander = response.user.userName;
  1962. });
  1963. },
  1964. immediateApproval() {
  1965. this.addOrUpdateVisib = true;
  1966. this.$nextTick(() => {
  1967. if(Cookies.get("sysType") == 3){
  1968. this.$refs.ApprovalComments.init(
  1969. this.approval.billId,
  1970. 440
  1971. );
  1972. }else{
  1973. this.$refs.ApprovalComments.init(
  1974. this.approval.billId,
  1975. this.approval.actId
  1976. );
  1977. }
  1978. });
  1979. },
  1980. // 查看审批流
  1981. addOrUpdateHandle() {
  1982. this.addOrUpdateVisible = true;
  1983. this.addOrUpdateVisib = false;
  1984. let id = "448";
  1985. let actId = "110";
  1986. this.$nextTick(() => {
  1987. if(Cookies.get("sysType") == 3){
  1988. console.log("111")
  1989. this.$refs.addOrUpdate.init(this.queryParams.fId, 440);
  1990. }else{
  1991. this.$refs.addOrUpdate.init(this.queryParams.fId, 220);
  1992. }
  1993. });
  1994. },
  1995. // 撤销收费
  1996. revokeCharge() {
  1997. this.queryParams.fBillstatus = "1";
  1998. let formDate = new window.FormData();
  1999. formDate.append("tFee", JSON.stringify(this.queryParams));
  2000. formDate.append("tFeeDo", JSON.stringify(this.increase_s));
  2001. backCharge(formDate).then((response) => {
  2002. this.open = false;
  2003. this.mainTable = false
  2004. this.msgSuccess("操作成功");
  2005. this.getList();
  2006. });
  2007. },
  2008. // 查看按钮
  2009. check(row, res) {
  2010. this.notChange = true;
  2011. this.doNot = true
  2012. if (Cookies.get("sysType") == 1) {
  2013. //大木
  2014. getCharge(row.fId).then((response) => {
  2015. this.Operator = response.data.tFee.createBy;
  2016. if (response.data.feeDoList != 0) {
  2017. response.data.feeDoList.map((e) => {
  2018. if (e.fBsdate) {
  2019. e.fBsdate = e.fBsdate.slice(0, 10);
  2020. }
  2021. if (e.fSrcdc) {
  2022. if (e.fSrcdc == "D") {
  2023. e.fSrcdc = "收";
  2024. } else {
  2025. e.fSrcdc = "付";
  2026. }
  2027. }
  2028. });
  2029. }
  2030. this.increase_s = response.data.feeDoList;
  2031. this.fWbuOptions = response.data.feesList;
  2032. this.queryParams = response.data.tFee;
  2033. this.fWbuOptions = response.data.feesList;
  2034. this.fMblnoOptions = response.data.corps;
  2035. this.mainTable = true
  2036. this.title = "收费列表";
  2037. this.tablefilter = true;
  2038. if (res == 1) {
  2039. this.notChange = true;
  2040. if (this.Operator == this.Lander) {
  2041. this.tablefilter = false;
  2042. this.reset();
  2043. this.pass = {
  2044. fAmtdr: 0, //应收合计
  2045. fAmtcr: 0, //应付合计
  2046. fMblno: "", //提单号
  2047. fName: "", //货权方
  2048. fFeesName: "", //结算单位
  2049. fCorpid: "", //结算单位ID
  2050. };
  2051. const fId = row.fId || this.ids;
  2052. getCharge(fId).then((response) => {
  2053. if (response.data.feeDoList != 0) {
  2054. response.data.feeDoList.map((e) => {
  2055. if (e.fBsdate) {
  2056. e.fBsdate = e.fBsdate.slice(0, 10);
  2057. }
  2058. if (e.fSrcdc) {
  2059. if (e.fSrcdc == "D") {
  2060. e.fSrcdc = "收";
  2061. } else {
  2062. e.fSrcdc = "付";
  2063. }
  2064. }
  2065. });
  2066. }
  2067. this.increase_s = response.data.feeDoList;
  2068. this.fWbuOptions = response.data.feesList;
  2069. this.queryParams = response.data.tFee;
  2070. this.fWbuOptions = response.data.feesList;
  2071. this.fMblnoOptions = response.data.corps;
  2072. this.mainTable = true
  2073. });
  2074. } else {
  2075. this.notChange = true;
  2076. // this.$message.error('未知异常,请联系管理员')
  2077. }
  2078. } else {
  2079. this.notChange = true;
  2080. this.reset();
  2081. this.pass = {
  2082. fAmtdr: 0, //应收合计
  2083. fAmtcr: 0, //应付合计
  2084. fMblno: "", //提单号
  2085. fName: "", //货权方
  2086. fFeesName: "", //结算单位
  2087. fCorpid: "", //结算单位ID
  2088. };
  2089. const fId = row.fId || this.ids;
  2090. getCharge(fId).then((response) => {
  2091. if (response.data.feeDoList != 0) {
  2092. response.data.feeDoList.map((e) => {
  2093. if (e.fBsdate) {
  2094. e.fBsdate = e.fBsdate.slice(0, 10);
  2095. }
  2096. if (e.fSrcdc) {
  2097. if (e.fSrcdc == "D") {
  2098. e.fSrcdc = "收";
  2099. } else {
  2100. e.fSrcdc = "付";
  2101. }
  2102. }
  2103. });
  2104. }
  2105. this.increase_s = response.data.feeDoList;
  2106. this.fWbuOptions = response.data.feesList;
  2107. this.queryParams = response.data.tFee;
  2108. this.fWbuOptions = response.data.feesList;
  2109. this.fMblnoOptions = response.data.corps;
  2110. this.mainTable = true
  2111. });
  2112. }
  2113. });
  2114. } else if (Cookies.get("sysType") == 2) {
  2115. //车队
  2116. getCharges(row.fId).then((response) => {
  2117. this.Operator = response.data.tFee.createBy;
  2118. if (response.data.feeDoList != 0) {
  2119. response.data.feeDoList.map((e) => {
  2120. if (e.fBsdate) {
  2121. e.fBsdate = e.fBsdate.slice(0, 10);
  2122. }
  2123. if (e.fSrcdc) {
  2124. if (e.fSrcdc == "D") {
  2125. e.fSrcdc = "收";
  2126. } else {
  2127. e.fSrcdc = "付";
  2128. }
  2129. }
  2130. });
  2131. }
  2132. this.increase_s = response.data.feeDoList;
  2133. this.fWbuOptions = response.data.feesList;
  2134. this.queryParams = response.data.tFee;
  2135. this.fWbuOptions = response.data.feesList;
  2136. this.fMblnoOptions = response.data.corps;
  2137. this.mainTable = true
  2138. this.title = "收费列表";
  2139. this.tablefilter = true;
  2140. if (res == 1) {
  2141. this.notChange = true;
  2142. if (this.Operator == this.Lander) {
  2143. this.tablefilter = false;
  2144. this.reset();
  2145. this.pass = {
  2146. fAmtdr: 0, //应收合计
  2147. fAmtcr: 0, //应付合计
  2148. fMblno: "", //提单号
  2149. fName: "", //货权方
  2150. fFeesName: "", //结算单位
  2151. fCorpid: "", //结算单位ID
  2152. };
  2153. const fId = row.fId || this.ids;
  2154. getCharges(fId).then((response) => {
  2155. if (response.data.feeDoList != 0) {
  2156. response.data.feeDoList.map((e) => {
  2157. if (e.fBsdate) {
  2158. e.fBsdate = e.fBsdate.slice(0, 10);
  2159. }
  2160. if (e.fSrcdc) {
  2161. if (e.fSrcdc == "D") {
  2162. e.fSrcdc = "收";
  2163. } else {
  2164. e.fSrcdc = "付";
  2165. }
  2166. }
  2167. });
  2168. }
  2169. this.increase_s = response.data.feeDoList;
  2170. this.fWbuOptions = response.data.feesList;
  2171. this.queryParams = response.data.tFee;
  2172. this.fWbuOptions = response.data.feesList;
  2173. this.fMblnoOptions = response.data.corps;
  2174. this.mainTable = true
  2175. });
  2176. } else {
  2177. this.notChange = true;
  2178. // this.$message.error('未知异常,请联系管理员')
  2179. }
  2180. } else {
  2181. this.notChange = true;
  2182. this.reset();
  2183. this.pass = {
  2184. fAmtdr: 0, //应收合计
  2185. fAmtcr: 0, //应付合计
  2186. fMblno: "", //提单号
  2187. fName: "", //货权方
  2188. fFeesName: "", //结算单位
  2189. fCorpid: "", //结算单位ID
  2190. };
  2191. const fId = row.fId || this.ids;
  2192. getCharges(fId).then((response) => {
  2193. if (response.data.feeDoList != 0) {
  2194. response.data.feeDoList.map((e) => {
  2195. if (e.fBsdate) {
  2196. e.fBsdate = e.fBsdate.slice(0, 10);
  2197. }
  2198. if (e.fSrcdc) {
  2199. if (e.fSrcdc == "D") {
  2200. e.fSrcdc = "收";
  2201. } else {
  2202. e.fSrcdc = "付";
  2203. }
  2204. }
  2205. });
  2206. }
  2207. this.increase_s = response.data.feeDoList;
  2208. this.fWbuOptions = response.data.feesList;
  2209. this.queryParams = response.data.tFee;
  2210. this.fWbuOptions = response.data.feesList;
  2211. this.fMblnoOptions = response.data.corps;
  2212. this.mainTable = true
  2213. });
  2214. }
  2215. });
  2216. }else if(Cookies.get("sysType") == 3){
  2217. getCharge(row.fId).then((response) => {
  2218. this.Operator = response.data.tFee.createBy;
  2219. if (response.data.feeDoList != 0) {
  2220. response.data.feeDoList.map((e) => {
  2221. if (e.fBsdate) {
  2222. e.fBsdate = e.fBsdate.slice(0, 10);
  2223. }
  2224. if (e.fSrcdc) {
  2225. if (e.fSrcdc == "D") {
  2226. e.fSrcdc = "收";
  2227. } else {
  2228. e.fSrcdc = "付";
  2229. }
  2230. }
  2231. });
  2232. }
  2233. this.increase_s = response.data.feeDoList;
  2234. this.fWbuOptions = response.data.feesList;
  2235. this.queryParams = response.data.tFee;
  2236. this.fWbuOptions = response.data.feesList;
  2237. this.fMblnoOptions = response.data.corps;
  2238. this.mainTable = true
  2239. this.title = "收费列表";
  2240. this.tablefilter = true;
  2241. if (res == 1) {
  2242. console.log(this.Operator)
  2243. console.log(this.Lander)
  2244. this.notChange = true;
  2245. if (this.Operator == this.Lander) {
  2246. this.tablefilter = false;
  2247. this.reset();
  2248. this.pass = {
  2249. fAmtdr: 0, //应收合计
  2250. fAmtcr: 0, //应付合计
  2251. fMblno: "", //提单号
  2252. fName: "", //货权方
  2253. fFeesName: "", //结算单位
  2254. fCorpid: "", //结算单位ID
  2255. };
  2256. const fId = row.fId || this.ids;
  2257. getCharge(fId).then((response) => {
  2258. if (response.data.feeDoList != 0) {
  2259. response.data.feeDoList.map((e) => {
  2260. if (e.fBsdate) {
  2261. e.fBsdate = e.fBsdate.slice(0, 10);
  2262. }
  2263. if (e.fSrcdc) {
  2264. if (e.fSrcdc == "D") {
  2265. e.fSrcdc = "收";
  2266. } else {
  2267. e.fSrcdc = "付";
  2268. }
  2269. }
  2270. });
  2271. }
  2272. this.increase_s = response.data.feeDoList;
  2273. this.fWbuOptions = response.data.feesList;
  2274. this.queryParams = response.data.tFee;
  2275. this.fWbuOptions = response.data.feesList;
  2276. this.fMblnoOptions = response.data.corps;
  2277. this.mainTable = true
  2278. this.title = "收费列表";
  2279. });
  2280. } else {
  2281. this.notChange = true;
  2282. // this.$message.error('未知异常,请联系管理员')
  2283. }
  2284. } else {
  2285. this.notChange = true;
  2286. this.reset();
  2287. this.pass = {
  2288. fAmtdr: 0, //应收合计
  2289. fAmtcr: 0, //应付合计
  2290. fMblno: "", //提单号
  2291. fName: "", //货权方
  2292. fFeesName: "", //结算单位
  2293. fCorpid: "", //结算单位ID
  2294. };
  2295. const fId = row.fId || this.ids;
  2296. getCharge(fId).then((response) => {
  2297. if (response.data.feeDoList != 0) {
  2298. response.data.feeDoList.map((e) => {
  2299. if (e.fBsdate) {
  2300. e.fBsdate = e.fBsdate.slice(0, 10);
  2301. }
  2302. if (e.fSrcdc) {
  2303. if (e.fSrcdc == "D") {
  2304. e.fSrcdc = "收";
  2305. } else {
  2306. e.fSrcdc = "付";
  2307. }
  2308. }
  2309. });
  2310. }
  2311. this.increase_s = response.data.feeDoList;
  2312. this.fWbuOptions = response.data.feesList;
  2313. this.queryParams = response.data.tFee;
  2314. this.fWbuOptions = response.data.feesList;
  2315. this.fMblnoOptions = response.data.corps;
  2316. this.mainTable = true
  2317. this.title = "收费列表";
  2318. this.tablefilter = true;
  2319. });
  2320. }
  2321. });
  2322. }
  2323. },
  2324. //打印功能
  2325. printing() {
  2326. if (this.increase_s.length !== 0) {
  2327. this.printStatus = true;
  2328. this.printObject = this.increase_s;
  2329. } else {
  2330. this.$message.error("无数据,请检查是否有数据");
  2331. }
  2332. },
  2333. //确认打印
  2334. printSomething() {
  2335. // 此处的style即为打印时的样式
  2336. const style =
  2337. "table tr td,th { border-collapse: collapse;padding:0px;border:.5px #000 solid;text-align:center;}";
  2338. print({
  2339. printable: "print_area2",
  2340. type: "html",
  2341. header: "收费表",
  2342. style: style, // 亦可使用引入的外部css;
  2343. scanStyles: false,
  2344. });
  2345. },
  2346. //关闭打印弹窗
  2347. closePrinting() {
  2348. this.$confirm("确认关闭?")
  2349. .then((_) => {
  2350. this.printStatus = false;
  2351. })
  2352. .catch((_) => {});
  2353. },
  2354. // 确认收费
  2355. confirmCharge() {
  2356. this.$refs["ruless"].validate((valid) => {
  2357. if (valid) {
  2358. if (this.increase_s.length) {
  2359. // this.queryParams.fBillstatus = '4'
  2360. let formDate = new window.FormData();
  2361. formDate.append("tFee", JSON.stringify(this.queryParams));
  2362. formDate.append("tFeeDo", JSON.stringify(this.increase_s));
  2363. if (Cookies.get("sysType") == 1) {
  2364. collectFee(formDate).then((response) => {
  2365. this.open = false;
  2366. this.msgSuccess("操作成功");
  2367. this.getList();
  2368. });
  2369. } else if(Cookies.get("sysType") == 2){
  2370. collectFees(formDate).then((response) => {
  2371. this.open = false;
  2372. this.msgSuccess("操作成功");
  2373. this.getList();
  2374. });
  2375. }else if(Cookies.get("sysType") == 3){
  2376. formDate.append('billsType','KHSF')
  2377. collectFee(formDate).then((response) => {
  2378. this.open = false;
  2379. this.msgSuccess("操作成功");
  2380. this.getList();
  2381. this.notChange = true;
  2382. this.doNot = true
  2383. this.queryParams.fBillstatus = '4'
  2384. if (this.Operator == this.Lander) {
  2385. this.tablefilter = false;
  2386. }
  2387. });
  2388. }
  2389. } else {
  2390. this.$message.error("表单为空不允许操作");
  2391. }
  2392. }
  2393. });
  2394. },
  2395. charGe() {
  2396. if (!Cookies.get("sysType")) {
  2397. return this.$message("请先选择业务类型");
  2398. }
  2399. this.queryParameter.fToCorpid = this.queryParams.fCorpid
  2400. this.chargeList_s = [];
  2401. // this.queryParameter.fToCorpid = this.queryParams.fCorpid
  2402. this.innerVisible = true;
  2403. if (this.queryParams.fCorpid) {
  2404. this.doNot = true;
  2405. }
  2406. },
  2407. getSum(param) {
  2408. const { columns, data } = param;
  2409. const sums = [];
  2410. columns.forEach((column, index) => {
  2411. sums[0] = "合计";
  2412. sums[10] = this.totAL.toFixed(2);
  2413. sums[9] = this.Ttime.toFixed(2);
  2414. });
  2415. return sums;
  2416. },
  2417. // 导入多选框
  2418. handleSelectionChange_s(selection) {
  2419. this.totAL = 0;
  2420. this.Ttime = 0;
  2421. this.selection = selection;
  2422. if (this.selection.length == 0) {
  2423. for (let item in this.chargeList_s) {
  2424. this.totAL += Number(this.chargeList_s[item].fAmt);
  2425. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  2426. }
  2427. } else {
  2428. for (let index in selection) {
  2429. this.totAL += Number(selection[index].fAmt);
  2430. this.Ttime += Number(selection[index].fAmtdr);
  2431. }
  2432. }
  2433. // this.getSummaries()
  2434. },
  2435. // 多选框选中数据
  2436. handleSelectionChange(selection) {
  2437. this.totAL = 0;
  2438. this.ids = selection.map((item) => item.fId);
  2439. this.single =
  2440. selection.length !== 1 ||
  2441. selection.map((item) => item.fBillstatus) == 6 ||
  2442. selection.map((item) => item.fBillstatus) == 4;
  2443. this.multiple = !selection.length;
  2444. },
  2445. imgChangeI(row) {
  2446. if (row.fAmt && Number(row.fAmt) > Number(row.fAmtdr)) {
  2447. this.$set(row, "fAmt", row.fAmtdr);
  2448. this.state_s = true;
  2449. }
  2450. if (this.selection.length !== 0) {
  2451. this.totAL = 0;
  2452. this.Ttime = 0;
  2453. for (let item in this.selection) {
  2454. this.totAL += Number(this.selection[item].fAmt);
  2455. this.Ttime += Number(this.selection[item].fAmtdr);
  2456. }
  2457. } else {
  2458. this.totAL = 0;
  2459. this.Ttime = 0;
  2460. for (let item in this.chargeList_s) {
  2461. this.totAL += Number(this.chargeList_s[item].fAmt);
  2462. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  2463. }
  2464. }
  2465. },
  2466. //确认导入
  2467. confirmImport() {
  2468. this.hide = true;
  2469. this.pass.fAmtdr = 0;
  2470. this.pass.fAmtcr = 0;
  2471. for (let item in this.selection) {
  2472. this.pass.fAmtcr = Number(this.pass.fAmtcr);
  2473. this.pass.fAmtdr = Number(this.pass.fAmtdr);
  2474. this.pass.fAmtcr += Number(this.selection[item].fAmt);
  2475. this.pass.fAmtdr += Number(this.selection[item].fAmtdr);
  2476. }
  2477. // this.pass.fAmtcr.toFixed(2);
  2478. if (this.state_s == true) {
  2479. if (this.selection.length == "0") {
  2480. this.$message.error("未选择导入行");
  2481. } else {
  2482. let Num = []
  2483. for (let item in this.selection) {
  2484. this.empty.push(this.selection[item].fMblno);
  2485. this.nothing.push(this.selection[item].fName);
  2486. if (this.increase_s.length === 0) {
  2487. this.increase_s = this.increase_s.concat(this.selection);
  2488. //去重提单号
  2489. this.empty = new Set(this.empty);
  2490. this.empty = Array.from(this.empty);
  2491. //去重货权方
  2492. this.nothing = new Set(this.nothing);
  2493. this.nothing = Array.from(this.nothing);
  2494. if (this.empty.length <= 1) {
  2495. this.pass.fMblno = this.empty[0];
  2496. } else {
  2497. this.pass.fMblno = this.empty[0] + "...";
  2498. }
  2499. if (this.nothing.length <= 1) {
  2500. this.pass.fName = this.nothing[0];
  2501. } else {
  2502. this.pass.fName = this.nothing[0] + "...";
  2503. }
  2504. // this.increase_s = this.increase_s.concat(this.selection);
  2505. this.queryParams.tMblno = this.pass.fMblno; //提单号
  2506. this.queryParams.fCtrlcorpid = this.pass.fName;
  2507. this.queryParams.fCorpid = this.queryParameter.fToCorpid;
  2508. this.queryParams.fAmtcr = this.pass.fAmtcr
  2509. this.queryParams.fAmtdr = this.pass.fAmtdr
  2510. this.innerVisible = false;
  2511. this.chargeList_s = [];
  2512. this.queryParameter = {
  2513. fCorpid: "",
  2514. fToCorpid: this.queryParams.fCorpid,
  2515. fMblno: "",
  2516. fStatementNo: "",
  2517. fFeeid: "",
  2518. timeExamine: "",
  2519. timeInterval: "",
  2520. fSystemType: Cookies.get("sysType")
  2521. };
  2522. return
  2523. }else {
  2524. for (let li in this.increase_s) {
  2525. if (this.selection[item].fSrcid !== this.increase_s[li].fSrcid) {
  2526. this.Fee = this.increase_s.concat(this.selection);
  2527. console.log(this.Fee);
  2528. let result = [];
  2529. let obj = {};
  2530. for (let lis in this.Fee) {
  2531. if (!obj[this.Fee[lis].fSrcid]) {
  2532. result.push(this.Fee[lis]);
  2533. obj[this.Fee[lis].fSrcid] = true;
  2534. }
  2535. }
  2536. //去重提单号
  2537. this.empty = new Set(this.empty);
  2538. this.empty = Array.from(this.empty);
  2539. //去重货权方
  2540. this.nothing = new Set(this.nothing);
  2541. this.nothing = Array.from(this.nothing);
  2542. if (this.empty.length <= 1) {
  2543. this.pass.fMblno = this.empty[0];
  2544. } else {
  2545. this.pass.fMblno = this.empty[0] + "...";
  2546. }
  2547. if (this.nothing.length <= 1) {
  2548. this.pass.fName = this.nothing[0];
  2549. } else {
  2550. this.pass.fName = this.nothing[0] + "...";
  2551. }
  2552. // this.increase_s = this.increase_s.concat(this.selection);
  2553. this.queryParams.tMblno = this.pass.fMblno; //提单号
  2554. this.queryParams.fCtrlcorpid = this.pass.fName;
  2555. this.queryParams.fCorpid = this.queryParameter.fToCorpid;
  2556. this.queryParams.fAmtcr = Number(this.pass.fAmtcr).toFixed(2);
  2557. this.queryParams.fAmtdr = Number(this.pass.fAmtdr).toFixed(2);
  2558. this.innerVisible = false;
  2559. this.chargeList_s = [];
  2560. this.queryParameter = {
  2561. fCorpid: "",
  2562. fToCorpid: this.queryParams.fCorpid,
  2563. fMblno: "",
  2564. fStatementNo: "",
  2565. fFeeid: "",
  2566. fBilltype: "",
  2567. fBusinessType: "",
  2568. fVslid: "",
  2569. fVoyid: "",
  2570. timeExamine: "",
  2571. timeInterval: "",
  2572. fSystemType: Cookies.get("sysType")
  2573. };
  2574. this.increase_s = result;
  2575. } else {
  2576. let i = Number(item) + 1;
  2577. Num += i + '、'
  2578. }
  2579. }
  2580. }
  2581. }
  2582. MessageBox.confirm("选中的第" + (Num).slice(0,Num.length-1) + "行重复,请重新选择",{
  2583. confirmButtonText: '确定',
  2584. cancelButtonText: '取消',
  2585. type: 'warning'
  2586. }
  2587. )
  2588. }
  2589. } else if (this.state_s == false) {
  2590. this.$message.error("本次金额不能大于原定金额");
  2591. }
  2592. },
  2593. /** 查询财务数据主列表 */
  2594. getList() {
  2595. this.loading = true;
  2596. this.getDicts("approval_process").then((response) => {
  2597. this.options = response.data;
  2598. });
  2599. if (Cookies.get("sysType") == 1) {
  2600. //大木
  2601. listCharge(this.tableFilter).then((response) => {
  2602. console.log(response);
  2603. this.chargeList = response.rows;
  2604. this.total = response.total;
  2605. this.loading = false;
  2606. });
  2607. } else if (Cookies.get("sysType") == 2) {
  2608. //车队
  2609. listCharges(this.tableFilter).then((response) => {
  2610. console.log(response);
  2611. response.rows.map((e) => {
  2612. if (e.createTime) {
  2613. e.createTime = e.createTime.substring(0, 10);
  2614. }
  2615. });
  2616. this.chargeList = response.rows;
  2617. this.total = response.total;
  2618. this.loading = false;
  2619. });
  2620. }else if(Cookies.get("sysType") == 3){
  2621. this.tableFilter.fBilltype = 'KHSF'
  2622. listCharge(this.tableFilter).then((response) => {
  2623. this.chargeList = response.rows;
  2624. this.total = response.total;
  2625. this.loading = false;
  2626. });
  2627. }
  2628. },
  2629. // 取消按钮
  2630. cancel() {
  2631. if(this.notChange == true){
  2632. this.mainTable = false
  2633. }else{
  2634. MessageBox.confirm("是否已保存?",{
  2635. confirmButtonText: '确定',
  2636. cancelButtonText: '取消',
  2637. type: 'warning'
  2638. }
  2639. ).then(() => {
  2640. this.mainTable = false
  2641. this.approve = false;
  2642. this.getList();
  2643. this.reset();
  2644. })
  2645. }
  2646. },
  2647. // 表单重置
  2648. reset() {
  2649. this.form = {
  2650. fId: null,
  2651. fBillno: null,
  2652. fCtrlcorpid: null,
  2653. fCorpid: null,
  2654. tMblno: null,
  2655. fAmtdr: null,
  2656. fAmtcr: null,
  2657. fBilltype: null,
  2658. fBillstatus: "0",
  2659. fRemarks: null,
  2660. fAccbilldate: null,
  2661. delFlag: null,
  2662. createBy: null,
  2663. fDeptid: null,
  2664. createTime: null,
  2665. updateBy: null,
  2666. updateTime: null,
  2667. };
  2668. this.resetForm("form");
  2669. },
  2670. /** 搜索按钮操作 */
  2671. handleQuery() {
  2672. this.queryParams.pageNum = 1;
  2673. this.getList();
  2674. },
  2675. /** 导入搜索 */
  2676. importSearch() {
  2677. this.chargeList_s = [];
  2678. if (this.queryParameter.fStatementNo) {
  2679. this.rules = {};
  2680. if (Cookies.get("sysType") == 1) {
  2681. search(this.queryParameter).then((response) => {
  2682. this.chargeList_s = response.rows;
  2683. this.$message.success("查询成功");
  2684. for (let item in this.chargeList_s) {
  2685. this.totAL += Number(this.chargeList_s[item].fAmt);
  2686. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  2687. }
  2688. });
  2689. } else if(Cookies.get("sysType") == 2){
  2690. searchs(this.queryParameter).then((response) => {
  2691. this.chargeList_s = response.rows;
  2692. this.$message.success("查询成功");
  2693. for (let item in this.chargeList_s) {
  2694. this.totAL += Number(this.chargeList_s[item].fAmt);
  2695. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  2696. }
  2697. });
  2698. }else if(Cookies.get("sysType") == 3){
  2699. this.queryParameter.fSystemType = this.queryParams.fSystemType
  2700. search(this.queryParameter).then((response) => {
  2701. this.chargeList_s = response.rows;
  2702. this.$message.success("查询成功");
  2703. for (let item in this.chargeList_s) {
  2704. this.totAL += Number(this.chargeList_s[item].fAmt);
  2705. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  2706. }
  2707. });
  2708. }
  2709. } else {
  2710. this.rules = {
  2711. fToCorpid: [{ required: true, message: " ", trigger: "blur" }],
  2712. timeExamine: [{ required: true, message: " ", trigger: "blur" }],
  2713. };
  2714. if (this.rules) {
  2715. this.$refs["form"].validate((valid) => {
  2716. if (valid) {
  2717. if (Cookies.get("sysType") == 1) {
  2718. search(this.queryParameter).then((response) => {
  2719. this.chargeList_s = response.rows;
  2720. if (this.chargeList_s.length !== 0) {
  2721. this.$message.success("查询成功");
  2722. this.totAL = 0;
  2723. this.Ttime = 0;
  2724. for (let item in this.chargeList_s) {
  2725. this.totAL += Number(this.chargeList_s[item].fAmt);
  2726. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  2727. }
  2728. } else {
  2729. this.$message.error("暂无数据");
  2730. }
  2731. });
  2732. } else if(Cookies.get("sysType") == 2){
  2733. searchs(this.queryParameter).then((response) => {
  2734. this.chargeList_s = response.rows;
  2735. if (this.chargeList_s.length !== 0) {
  2736. this.$message.success("查询成功");
  2737. this.totAL = 0;
  2738. this.Ttime = 0;
  2739. for (let item in this.chargeList_s) {
  2740. this.totAL += Number(this.chargeList_s[item].fAmt);
  2741. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  2742. }
  2743. } else {
  2744. this.$message.error("暂无数据");
  2745. }
  2746. });
  2747. }else if(Cookies.get("sysType") == 3){
  2748. console.log("1111")
  2749. this.queryParameter.fSystemType = this.queryParams.fSystemType
  2750. console.log(this.queryParameter)
  2751. search(this.queryParameter).then((response) => {
  2752. this.chargeList_s = response.rows;
  2753. if (this.chargeList_s.length !== 0) {
  2754. this.$message.success("查询成功");
  2755. this.totAL = 0;
  2756. this.Ttime = 0;
  2757. for (let item in this.chargeList_s) {
  2758. this.totAL += Number(this.chargeList_s[item].fAmt);
  2759. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  2760. }
  2761. } else {
  2762. this.$message.error("暂无数据");
  2763. }
  2764. });
  2765. }
  2766. }
  2767. });
  2768. } else {
  2769. this.$message.error("操作频繁");
  2770. }
  2771. }
  2772. },
  2773. /** 远程模糊查询用户 */
  2774. corpsRemoteMethod(name) {
  2775. if (name == null || name === "") {
  2776. return false;
  2777. }
  2778. let queryParams = { fName: name };
  2779. listCorps(queryParams).then((response) => {
  2780. this.fMblnoOptions = response;
  2781. this.KHblnoOptions = response;
  2782. });
  2783. },
  2784. /** 重置按钮操作 */
  2785. resetQuery() {
  2786. this.tableFilter = {
  2787. pageNum: 1,
  2788. pageSize: 10,
  2789. fBillno: null,
  2790. fCtrlcorpid: null,
  2791. fCorpid: null,
  2792. timeInterval: null,
  2793. };
  2794. this.handleQuery();
  2795. },
  2796. //导入重置按钮
  2797. resetQuery_s() {
  2798. this.queryParameter = {
  2799. fCorpid: "",
  2800. fToCorpid: "",
  2801. fMblno: "",
  2802. fStatementNo: "",
  2803. fFeeid: "",
  2804. timeExamine: "",
  2805. timeInterval: "",
  2806. };
  2807. },
  2808. // 远程模糊查询费用名称
  2809. fWRemoteMethod(name) {
  2810. this.fWbuOptions = [];
  2811. if (name == null || name === "") {
  2812. return false;
  2813. }
  2814. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2815. listFees(queryParams).then((response) => {
  2816. this.fWbuOptions = response.rows;
  2817. });
  2818. },
  2819. /** 新增按钮操作 */
  2820. handleAdd() {
  2821. this.notChange = false;
  2822. this.doNot = false
  2823. this.hide = true;
  2824. this.reset();
  2825. this.pass = {
  2826. fAmtdr: 0, //应收合计
  2827. fAmtcr: 0, //应付合计
  2828. fMblno: "", //提单号
  2829. fName: "", //货权方
  2830. fFeesName: "", //结算单位
  2831. fCorpid: "", //结算单位ID
  2832. },
  2833. // this.queryParams = []
  2834. this.increase_s = [];
  2835. this.queryParams = {
  2836. pageNum: 1,
  2837. pageSize: 10,
  2838. fBillno: null,
  2839. fCtrlcorpid: null,
  2840. fCorpid: null,
  2841. tMblno: null,
  2842. fAmtdr: null,
  2843. fAmtcr: null,
  2844. fBilltype: null,
  2845. fBillstatus: null,
  2846. fRemarks: null,
  2847. fAccbilldate: null,
  2848. fDeptid: null,
  2849. chargingMethod: null,
  2850. invoiceNo: null,
  2851. bank: null,
  2852. waterBillNo: null,
  2853. fSystemType: Cookies.get("sysType"),
  2854. };
  2855. this.resetForm("queryParams");
  2856. this.mainTable = true;
  2857. this.title = "添加财务数据主";
  2858. },
  2859. /** 修改按钮操作 */
  2860. handleUpdate(row) {
  2861. this.approve = false;
  2862. this.hide = false;
  2863. this.notChange = false;
  2864. this.reset();
  2865. this.pass = {
  2866. fAmtdr: 0, //应收合计
  2867. fAmtcr: 0, //应付合计
  2868. fMblno: "", //提单号
  2869. fName: "", //货权方
  2870. fFeesName: "", //结算单位
  2871. fCorpid: "", //结算单位ID
  2872. };
  2873. const fId = row.fId || this.ids;
  2874. if (Cookies.get("sysType") == 1) {
  2875. //大木
  2876. getCharge(fId).then((response) => {
  2877. this.Operator = response.data.tFee.createBy;
  2878. if (response.data.feeDoList != 0) {
  2879. response.data.feeDoList.map((e) => {
  2880. if (e.fBsdate) {
  2881. e.fBsdate = e.fBsdate.slice(0, 10);
  2882. }
  2883. if (e.fSrcdc) {
  2884. if (e.fSrcdc == "D") {
  2885. e.fSrcdc = "收";
  2886. } else {
  2887. e.fSrcdc = "付";
  2888. }
  2889. }
  2890. });
  2891. }
  2892. this.increase_s = response.data.feeDoList;
  2893. this.fWbuOptions = response.data.feesList;
  2894. this.queryParams = response.data.tFee;
  2895. this.fWbuOptions = response.data.feesList;
  2896. this.fMblnoOptions = response.data.corps;
  2897. this.mainTable = true
  2898. this.title = "修改收费列表";
  2899. if (this.increase_s.length != 0) {
  2900. this.doNot = true;
  2901. } else {
  2902. this.doNot = false;
  2903. }
  2904. });
  2905. } else if (Cookies.get("sysType") == 2) {
  2906. //车队
  2907. getCharges(fId).then((response) => {
  2908. this.Operator = response.data.tFee.createBy;
  2909. if (response.data.feeDoList != 0) {
  2910. response.data.feeDoList.map((e) => {
  2911. if (e.fBsdate) {
  2912. e.fBsdate = e.fBsdate.slice(0, 10);
  2913. }
  2914. if (e.fSrcdc) {
  2915. if (e.fSrcdc == "D") {
  2916. e.fSrcdc = "收";
  2917. } else {
  2918. e.fSrcdc = "付";
  2919. }
  2920. }
  2921. });
  2922. }
  2923. this.increase_s = response.data.feeDoList;
  2924. this.fWbuOptions = response.data.feesList;
  2925. this.queryParams = response.data.tFee;
  2926. this.fWbuOptions = response.data.feesList;
  2927. this.fMblnoOptions = response.data.corps;
  2928. this.mainTable = true
  2929. this.title = "修改收费列表";
  2930. if (this.increase_s.length != 0) {
  2931. this.doNot = true;
  2932. } else {
  2933. this.doNot = false;
  2934. }
  2935. });
  2936. }else if(Cookies.get("sysType") == 3){
  2937. getCharge(fId).then((response) => {
  2938. this.Operator = response.data.tFee.createBy;
  2939. if (response.data.feeDoList != 0) {
  2940. response.data.feeDoList.map((e) => {
  2941. if (e.fBsdate) {
  2942. e.fBsdate = e.fBsdate.slice(0, 10);
  2943. }
  2944. if (e.fSrcdc) {
  2945. if (e.fSrcdc == "D") {
  2946. e.fSrcdc = "收";
  2947. } else {
  2948. e.fSrcdc = "付";
  2949. }
  2950. }
  2951. });
  2952. }
  2953. this.increase_s = response.data.feeDoList;
  2954. this.fWbuOptions = response.data.feesList;
  2955. this.queryParams = response.data.tFee;
  2956. this.fWbuOptions = response.data.feesList;
  2957. this.fMblnoOptions = response.data.corps;
  2958. this.mainTable = true
  2959. console.log("111")
  2960. this.title = "修改收费列表";
  2961. if (this.increase_s.length != 0) {
  2962. this.doNot = true;
  2963. } else {
  2964. this.doNot = false;
  2965. }
  2966. });
  2967. }
  2968. },
  2969. /** 提交按钮 */
  2970. submitForm() {
  2971. this.$refs["ruless"].validate((valid) => {
  2972. if (valid) {
  2973. if (!this.queryParams.fId) {
  2974. // this.chargeList.fBillstatus = '1'
  2975. this.queryParams.fBillstatus = "1";
  2976. let formData = new window.FormData();
  2977. formData.append("tFee", JSON.stringify(this.queryParams));
  2978. formData.append("tFeeDo", JSON.stringify(this.increase_s));
  2979. if (Cookies.get("sysType") == 1) {
  2980. addCharge(formData).then((response) => {
  2981. let feeBills = response.data.tFee;
  2982. this.$set(this.queryParams, "fId", response.data.tFee.fId);
  2983. this.$set(
  2984. this.queryParams,
  2985. "fBillno",
  2986. response.data.tFee.fBillno
  2987. );
  2988. this.msgSuccess("新增成功");
  2989. });
  2990. } else if(Cookies.get("sysType") == 2){
  2991. addCharges(formData).then((response) => {
  2992. let feeBills = response.data.tFee;
  2993. this.$set(this.queryParams, "fId", response.data.tFee.fId);
  2994. this.$set(
  2995. this.queryParams,
  2996. "fBillno",
  2997. response.data.tFee.fBillno
  2998. );
  2999. this.msgSuccess("新增成功");
  3000. });
  3001. }else if(Cookies.get("sysType") == 3){
  3002. formData.append("billsType", 'KHSF');
  3003. addCharge(formData).then((response) => {
  3004. let feeBills = response.data.tFee;
  3005. this.$set(this.queryParams, "fId", response.data.tFee.fId);
  3006. this.$set(
  3007. this.queryParams,
  3008. "fBillno",
  3009. response.data.tFee.fBillno
  3010. );
  3011. this.msgSuccess("新增成功");
  3012. });
  3013. }
  3014. } else if(Cookies.get("sysType") == 1 || Cookies.get("sysType") == 2){
  3015. this.queryParams.fBillstatus = "1";
  3016. let formData = new window.FormData();
  3017. formData.append("tFee", JSON.stringify(this.queryParams));
  3018. formData.append("tFeeDo", JSON.stringify(this.increase_s));
  3019. addCharge(formData).then((response) => {
  3020. this.msgSuccess("修改成功");
  3021. this.getList();
  3022. });
  3023. }else if(Cookies.get("sysType") == 3){
  3024. this.queryParams.fBillstatus = "1";
  3025. let formData = new window.FormData();
  3026. formData.append("tFee", JSON.stringify(this.queryParams));
  3027. formData.append("tFeeDo", JSON.stringify(this.increase_s));
  3028. formData.append("billsType", 'KHSF');
  3029. addCharge(formData).then((response) => {
  3030. this.msgSuccess("修改成功");
  3031. this.getList();
  3032. });
  3033. }
  3034. }
  3035. });
  3036. },
  3037. /** 删除按钮操作 */
  3038. handleDelete(row) {
  3039. const fIds = row.fId || this.ids;
  3040. let tips = "";
  3041. if (Cookies.get("sysType") == 1) {
  3042. //大木
  3043. delCharge_s(fIds).then((data) => {
  3044. switch (data.msg) {
  3045. case "0": {
  3046. this.$message.error("当前数据已被其他操作员操作请刷新页面");
  3047. break;
  3048. }
  3049. case "1": {
  3050. tips = "当前主表有数据从表无数据是否删除";
  3051. this.delete_S(fIds, tips);
  3052. break;
  3053. }
  3054. case "2": {
  3055. tips = "当前主表有数据从表有数据是否删除";
  3056. this.delete_S(fIds, tips);
  3057. break;
  3058. }
  3059. default: {
  3060. return this.$message.error("未知错误,无状态");
  3061. }
  3062. }
  3063. });
  3064. } else if (Cookies.get("sysType") == 2) {
  3065. // 车队;
  3066. delCharge_ss(fIds).then((data) => {
  3067. switch (data.msg) {
  3068. case "0": {
  3069. this.$message.error("当前数据已被其他操作员操作请刷新页面");
  3070. break;
  3071. }
  3072. case "1": {
  3073. tips = "当前主表有数据从表无数据是否删除";
  3074. this.delete_S(fIds, tips);
  3075. break;
  3076. }
  3077. case "2": {
  3078. tips = "当前主表有数据从表有数据是否删除";
  3079. this.delete_S(fIds, tips);
  3080. break;
  3081. }
  3082. default: {
  3083. return this.$message.error("未知错误,无状态");
  3084. }
  3085. }
  3086. });
  3087. }else if(Cookies.get("sysType") == 3){
  3088. delCharge_s(fIds).then((data) => {
  3089. switch (data.msg) {
  3090. case "0": {
  3091. this.$message.error("当前数据已被其他操作员操作请刷新页面");
  3092. break;
  3093. }
  3094. case "1": {
  3095. tips = "当前主表有数据从表无数据是否删除";
  3096. this.delete_S(fIds, tips);
  3097. break;
  3098. }
  3099. case "2": {
  3100. tips = "当前主表有数据从表有数据是否删除";
  3101. this.delete_S(fIds, tips);
  3102. break;
  3103. }
  3104. default: {
  3105. return this.$message.error("未知错误,无状态");
  3106. }
  3107. }
  3108. });
  3109. }
  3110. },
  3111. delete_S(fIds, tips) {
  3112. this.$confirm(tips, "警告", {
  3113. confirmButtonText: "确定",
  3114. cancelButtonText: "取消",
  3115. type: "warning",
  3116. })
  3117. .then(function () {
  3118. if (Cookies.get("sysType") == 1) {
  3119. return delCharge(fIds);
  3120. } else if (Cookies.get("sysType") == 2) {
  3121. return delCharges(fIds);
  3122. }else if(Cookies.get("sysType") == 3){
  3123. return delCharge(fIds);
  3124. }
  3125. })
  3126. .then(() => {
  3127. this.getList();
  3128. this.msgSuccess("删除成功");
  3129. });
  3130. },
  3131. /** 导出按钮操作 */
  3132. handleExport() {
  3133. const queryParams = this.queryParams;
  3134. this.$confirm("是否确认导出所有财务数据主数据项?", "警告", {
  3135. confirmButtonText: "确定",
  3136. cancelButtonText: "取消",
  3137. type: "warning",
  3138. })
  3139. .then(function () {
  3140. return exportCharge(queryParams);
  3141. })
  3142. .then((response) => {
  3143. this.download(response.msg);
  3144. });
  3145. },
  3146. //清空一行
  3147. deleteRow(index, rows) {
  3148. this.queryParams.fAmtcr = 0;
  3149. this.queryParams.fAmtdr = 0;
  3150. rows.splice(index, 1);
  3151. for (let item in this.increase_s) {
  3152. this.queryParams.fAmtcr += this.increase_s[item].fAmt;
  3153. this.queryParams.fAmtdr += this.increase_s[item].fAmtdr;
  3154. }
  3155. if (this.increase_s.length == 0) {
  3156. console.log("111");
  3157. this.doNot = false;
  3158. } else {
  3159. this.doNot = true;
  3160. }
  3161. },
  3162. // 财务结算方式(数据字典),对应data_settlement_type 字典翻译
  3163. methodTypeFormat(row, column) {
  3164. return this.selectDictLabel(this.methodOptions, row.chargingMethod);
  3165. },
  3166. },
  3167. };
  3168. </script>
  3169. <style lang="scss" scoped>
  3170. .tabSetting {
  3171. display: flex;
  3172. justify-content: flex-end;
  3173. }
  3174. .listStyle {
  3175. display: flex;
  3176. border-top: 1px solid #dcdfe6;
  3177. border-left: 1px solid #dcdfe6;
  3178. border-right: 1px solid #dcdfe6;
  3179. }
  3180. .listStyle:last-child {
  3181. border-bottom: 1px solid #dcdfe6;
  3182. }
  3183. .progress {
  3184. display: flex;
  3185. align-items: center;
  3186. padding: 2px;
  3187. background-color: rgba(0, 0, 0, 0.05);
  3188. height: 100%;
  3189. }
  3190. .avue-crud__dialog__header {
  3191. display: -webkit-box;
  3192. display: -ms-flexbox;
  3193. display: flex;
  3194. -webkit-box-align: center;
  3195. -ms-flex-align: center;
  3196. align-items: center;
  3197. -webkit-box-pack: justify;
  3198. -ms-flex-pack: justify;
  3199. justify-content: space-between;
  3200. }
  3201. .el-dialog__title {
  3202. color: rgba(0, 0, 0, 0.85);
  3203. font-weight: 500;
  3204. word-wrap: break-word;
  3205. }
  3206. .avue-crud__dialog__menu {
  3207. padding-right: 20px;
  3208. float: left;
  3209. }
  3210. .avue-crud__dialog__menu i {
  3211. color: #909399;
  3212. font-size: 15px;
  3213. }
  3214. .el-icon-full-screen {
  3215. cursor: pointer;
  3216. }
  3217. .el-icon-full-screen:before {
  3218. content: "\e719";
  3219. }
  3220. </style>