index.vue 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="tableFilter"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="68px"
  9. >
  10. <el-form-item label="系统编号" prop="fCtrlcorpid">
  11. <el-input
  12. v-model="tableFilter.fBillno"
  13. placeholder="请输入系统编号"
  14. clearable
  15. size="small"
  16. style="width: 200px"
  17. @keyup.enter.native="handleQuery"
  18. />
  19. </el-form-item>
  20. <el-form-item label="货权方" prop="fCtrlcorpid">
  21. <el-input
  22. v-model="tableFilter.fCtrlcorpid"
  23. placeholder="请输入货权方"
  24. clearable
  25. size="small"
  26. style="width: 200px"
  27. @keyup.enter.native="handleQuery"
  28. />
  29. </el-form-item>
  30. <el-form-item label="结算单位" prop="fCorpid">
  31. <el-select
  32. v-model="tableFilter.fCorpid"
  33. filterable
  34. remote
  35. clearable
  36. size="small"
  37. style="width: 200px"
  38. @keyup.enter.native="handleQuery"
  39. :remote-method="corpsRemoteMethod"
  40. placeholder="请输入结算单位"
  41. >
  42. <el-option
  43. v-for="(dict, index) in fMblnoOptions"
  44. :key="index.fId"
  45. :label="dict.fName"
  46. :value="dict.fId"
  47. ></el-option>
  48. </el-select>
  49. </el-form-item>
  50. <el-form-item label="对账日期" prop="timeInterval">
  51. <el-date-picker
  52. type="daterange"
  53. size="small"
  54. style="width: 240px"
  55. v-model="tableFilter.timeInterval"
  56. start-placeholder="开始日期"
  57. end-placeholder="结束日期"
  58. value-format="yyyy-MM-dd"
  59. :default-time="['00:00:00', '23:59:59']"
  60. >
  61. </el-date-picker>
  62. </el-form-item>
  63. <el-form-item>
  64. <el-button
  65. type="cyan"
  66. icon="el-icon-search"
  67. size="mini"
  68. @click="handleQuery"
  69. >搜索</el-button
  70. >
  71. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  72. >重置</el-button
  73. >
  74. </el-form-item>
  75. </el-form>
  76. <el-row :gutter="10" class="mb8">
  77. <el-col :span="1.5">
  78. <el-button
  79. type="primary"
  80. icon="el-icon-plus"
  81. size="mini"
  82. @click="handleAdd"
  83. v-hasPermi="['finance:payment:add']"
  84. >新增
  85. </el-button>
  86. </el-col>
  87. <el-col :span="1.5">
  88. <el-button
  89. type="success"
  90. icon="el-icon-edit"
  91. size="mini"
  92. :disabled="single"
  93. @click="handleUpdate"
  94. v-hasPermi="['finance:payment:edit']"
  95. >修改
  96. </el-button>
  97. </el-col>
  98. <!-- <el-col :span="1.5">-->
  99. <!-- <el-button-->
  100. <!-- type="danger"-->
  101. <!-- icon="el-icon-delete"-->
  102. <!-- size="mini"-->
  103. <!-- :disabled="multiple"-->
  104. <!-- @click="handleDelete"-->
  105. <!-- v-hasPermi="['finance:charge:remove']"-->
  106. <!-- >删除-->
  107. <!-- </el-button>-->
  108. <!-- </el-col>-->
  109. <el-col :span="1.5">
  110. <el-button
  111. type="warning"
  112. icon="el-icon-download"
  113. size="mini"
  114. @click="handleExport"
  115. v-hasPermi="['finance:payment:export']"
  116. >导出
  117. </el-button>
  118. </el-col>
  119. <right-toolbar
  120. :showSearch.sync="showSearch"
  121. @queryTable="getList"
  122. ></right-toolbar>
  123. </el-row>
  124. <el-table
  125. v-loading="loading"
  126. :data="chargeList"
  127. @selection-change="handleSelectionChange"
  128. show-summary
  129. :summary-method="listTotal"
  130. >
  131. <el-table-column type="selection" width="100" align="center" />
  132. <el-table-column
  133. label="序号"
  134. type="index"
  135. width="55"
  136. align="center"
  137. fixed
  138. />
  139. <el-table-column label="制单人" align="center" prop="createBy" fixed />
  140. <el-table-column
  141. label="系统编号"
  142. :show-overflow-tooltip="true"
  143. align="center"
  144. prop="fBillno"
  145. width="120"
  146. />
  147. <el-table-column
  148. label="货权方"
  149. :show-overflow-tooltip="true"
  150. sortable
  151. align="center"
  152. prop="fCtrlcorpid"
  153. width="220"
  154. />
  155. <!-- <el-table-column label="账单日期" align="center" prop="fAccbilldate" width="180">-->
  156. <!-- <template slot-scope="scope">-->
  157. <!-- <span>{{ parseTime(scope.row.fAccbilldate, '{y}-{m}-{d}') }}</span>-->
  158. <!-- </template>-->
  159. <!-- </el-table-column>-->
  160. <!-- <el-table-column label="制单部门" align="center" prop="fId"/>-->
  161. <el-table-column
  162. label="制单日期"
  163. align="center"
  164. prop="createTime"
  165. width="120"
  166. >
  167. <template slot-scope="scope">
  168. <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
  169. </template>
  170. </el-table-column>
  171. <el-table-column
  172. label="付费日期"
  173. align="center"
  174. sortable
  175. prop="fAccbilldate"
  176. width="120"
  177. />
  178. <el-table-column
  179. label="提单号"
  180. align="center"
  181. sortable
  182. prop="tMblno"
  183. width="216"
  184. />
  185. <el-table-column
  186. label="收费方式"
  187. align="center"
  188. prop="chargingMethod"
  189. :formatter="methodTypeFormat"
  190. />
  191. <el-table-column label="发票号" align="center" prop="invoiceNo" />
  192. <el-table-column label="收款银行" align="center" prop="bank" />
  193. <el-table-column label="水单号" align="center" prop="waterBillNo" />
  194. <el-table-column
  195. label="应付合计"
  196. align="center"
  197. prop="fAmtdr"
  198. width="120"
  199. />
  200. <el-table-column
  201. label="实付合计"
  202. align="center"
  203. prop="fAmtcr"
  204. width="120"
  205. />
  206. <el-table-column label="未付金额" align="center" prop="" width="120" />
  207. <el-table-column
  208. label="备注"
  209. align="center"
  210. prop="fRemarks"
  211. width="120"
  212. />
  213. <el-table-column
  214. label="状态"
  215. align="center"
  216. prop="fBillstatus"
  217. width="120"
  218. >
  219. <template slot-scope="scope">
  220. <span v-if="scope.row.fBillstatus == '1'">保存</span>
  221. <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>
  222. <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>
  223. <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>
  224. <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>
  225. <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>
  226. </template>
  227. </el-table-column>
  228. <el-table-column
  229. label="操作"
  230. align="center"
  231. class-name="small-padding fixed-width"
  232. min-width="180"
  233. fixed="right"
  234. >
  235. <template slot-scope="scope">
  236. <el-button
  237. size="mini"
  238. type="text"
  239. icon="el-icon-view"
  240. @click="check(scope.row, 0)"
  241. v-hasPermi="['finance:payment:edit']"
  242. >查看</el-button
  243. >
  244. <el-button
  245. size="mini"
  246. type="text"
  247. icon="el-icon-view"
  248. @click="check(scope.row, 1)"
  249. v-hasPermi="['finance:payment:edit']"
  250. v-if="
  251. scope.row.fBillstatus == '提交审核' ||
  252. scope.row.fBillstatus == '审核中'
  253. "
  254. >审批进度</el-button
  255. >
  256. <el-button
  257. size="mini"
  258. type="text"
  259. icon="el-icon-edit"
  260. @click="handleUpdate(scope.row)"
  261. v-hasPermi="['finance:payment:edit']"
  262. v-if="
  263. scope.row.fBillstatus == '保存' ||
  264. scope.row.fBillstatus == '暂存' ||
  265. scope.row.fBillstatus == '审批驳回'
  266. "
  267. >修改
  268. </el-button>
  269. <el-button
  270. size="mini"
  271. type="text"
  272. icon="el-icon-delete"
  273. @click="handleDelete(scope.row)"
  274. v-hasPermi="['finance:payment:remove']"
  275. v-if="
  276. scope.row.fBillstatus == '保存' ||
  277. scope.row.fBillstatus == '暂存' ||
  278. scope.row.fBillstatus == '审批驳回'
  279. "
  280. >删除
  281. </el-button>
  282. <!-- <el-button-->
  283. <!-- size="mini"-->
  284. <!-- type="text"-->
  285. <!-- icon="el-icon-delete"-->
  286. <!-- v-if="scope.row.fBillstatus === 6"-->
  287. <!-- >查看-->
  288. <!-- </el-button>-->
  289. <!-- <el-button-->
  290. <!-- size="mini"-->
  291. <!-- type="text"-->
  292. <!-- icon="el-icon-delete"-->
  293. <!-- v-if="scope.row.fBillstatus > 3 && scope.row.fBillstatus < 6"-->
  294. <!-- >查看审批流-->
  295. <!-- </el-button>-->
  296. </template>
  297. </el-table-column>
  298. <!-- <el-table-column label="单据类型" align="center" prop="fBilltype"/>-->
  299. <!-- <el-table-column label="制单部门" align="center" prop="fDeptid"/>-->
  300. </el-table>
  301. <pagination
  302. v-show="total > 0"
  303. :total="total"
  304. :page.sync="queryParams.pageNum"
  305. :limit.sync="queryParams.pageSize"
  306. @pagination="getList"
  307. />
  308. <!-- 添加或修改财务数据主对话框 -->
  309. <el-dialog
  310. v-dialogDrag
  311. :fullscreen="dialogFull"
  312. :close-on-click-modal="false"
  313. :title="title"
  314. :show-close="Xbutton"
  315. :visible.sync="open"
  316. width="70%"
  317. append-to-body
  318. >
  319. <template slot="title">
  320. <div class="avue-crud__dialog__header">
  321. <span class="el-dialog__title">
  322. <span
  323. style="
  324. display: inline-block;
  325. width: 3px;
  326. height: 20px;
  327. margin-right: 5px;
  328. float: left;
  329. margin-top: 2px;
  330. "
  331. ></span>
  332. 添加财务数据主
  333. </span>
  334. <div class="avue-crud__dialog__menu enlarge" @click="full">
  335. <i
  336. style="
  337. cursor: pointer;
  338. display: block;
  339. width: 12px;
  340. height: 12px;
  341. border: 1px solid #909399;
  342. border-top: 3px solid #909399;
  343. margin-top: -3px;
  344. "
  345. ></i>
  346. </div>
  347. </div>
  348. </template>
  349. <el-form
  350. :model="queryParams"
  351. :rules="ruless"
  352. ref="ruless"
  353. :inline="true"
  354. v-show="showSearch"
  355. label-width="68px"
  356. >
  357. <el-form-item label="货权方" prop="fCtrlcorpid">
  358. <el-input
  359. v-model="queryParams.fCtrlcorpid"
  360. placeholder="请输入货权方"
  361. clearable
  362. size="small"
  363. :disabled="notChange"
  364. style="width: 200px"
  365. @keyup.enter.native="handleQuery"
  366. />
  367. </el-form-item>
  368. <el-form-item label="结算单位" label-width="78px" prop="fCorpid">
  369. <el-select
  370. v-model="queryParams.fCorpid"
  371. filterable
  372. remote
  373. clearable
  374. size="small"
  375. style="width: 200px"
  376. @keyup.enter.native="handleQuery"
  377. :remote-method="corpsRemoteMethod"
  378. :disabled="doNot"
  379. placeholder="请输入结算单位"
  380. >
  381. <el-option
  382. v-for="(dict, index) in fMblnoOptions"
  383. :key="index.fId"
  384. :label="dict.fName"
  385. :value="dict.fId"
  386. ></el-option>
  387. </el-select>
  388. </el-form-item>
  389. <el-form-item label="付费日期" label-width="78px" prop="fAccbilldate">
  390. <el-date-picker
  391. clearable
  392. size="small"
  393. style="width: 200px"
  394. v-model="queryParams.fAccbilldate"
  395. type="date"
  396. value-format="yyyy-MM-dd"
  397. placeholder="选择账单日期"
  398. :disabled="notChange"
  399. >
  400. </el-date-picker>
  401. </el-form-item>
  402. <el-form-item label="系统编号" prop="fBillno">
  403. <el-input
  404. v-model="queryParams.fBillno"
  405. placeholder="请输入系统编号"
  406. clearable
  407. disabled
  408. style="width: 200px"
  409. size="small"
  410. @keyup.enter.native="handleQuery"
  411. />
  412. </el-form-item>
  413. <el-form-item label="收费方式" prop="chargingMethod">
  414. <el-select
  415. v-model="queryParams.chargingMethod"
  416. placeholder="请选择收费方式"
  417. clearable
  418. style="width: 200px"
  419. :disabled="notChange"
  420. size="small"
  421. >
  422. <el-option
  423. v-for="(dict, index) in methodOptions"
  424. :key="index.dictValue"
  425. :label="dict.dictLabel"
  426. :value="dict.dictValue"
  427. ></el-option>
  428. </el-select>
  429. </el-form-item>
  430. <el-form-item label="收款银行" prop="bank">
  431. <el-input
  432. v-model="queryParams.bank"
  433. placeholder="请输入收款银行"
  434. clearable
  435. size="small"
  436. style="width: 200px"
  437. :disabled="notChange"
  438. />
  439. </el-form-item>
  440. <el-form-item label="发票号" prop="invoiceNo">
  441. <el-input
  442. v-model="queryParams.invoiceNo"
  443. placeholder="请输入发票号"
  444. clearable
  445. size="small"
  446. style="width: 200px"
  447. :disabled="notChange"
  448. />
  449. </el-form-item>
  450. <el-form-item label="水单号" prop="waterBillNo">
  451. <el-input
  452. v-model="queryParams.waterBillNo"
  453. placeholder="请输入收款银行"
  454. clearable
  455. size="small"
  456. style="width: 200px"
  457. :disabled="notChange"
  458. />
  459. </el-form-item>
  460. <el-form-item label="备注" prop="fRemarks">
  461. <el-input
  462. v-model="queryParams.fRemarks"
  463. placeholder="请输入备注"
  464. clearable
  465. size="small"
  466. style="width: 200px"
  467. :disabled="notChange"
  468. @keyup.enter.native="handleQuery"
  469. />
  470. </el-form-item>
  471. <el-form-item label="业务类型" prop="fSystemType">
  472. <el-select
  473. v-model="queryParams.fSystemType"
  474. placeholder="请选择业务类型"
  475. size="small"
  476. :disabled="notChange"
  477. style="width: 200px"
  478. >
  479. <el-option
  480. v-for="item in typeoptions"
  481. :key="item.value"
  482. :label="item.label"
  483. :value="item.value"
  484. >
  485. </el-option>
  486. </el-select>
  487. </el-form-item>
  488. </el-form>
  489. <div style="width: 100%">
  490. <el-button
  491. type="warning"
  492. size="small"
  493. @click="charGe"
  494. :disabled="notChange"
  495. v-if="queryParams.fBillstatus < '4'"
  496. >付费</el-button
  497. >
  498. <el-button
  499. type="primary"
  500. size="small"
  501. @click="confirmCharge"
  502. :disabled="notChange"
  503. v-if="queryParams.fBillstatus < '4'"
  504. >确认付费</el-button
  505. >
  506. <el-button type="warning" size="small" @click="handleExportItems"
  507. >导出</el-button
  508. >
  509. <el-button
  510. type="success"
  511. size="small"
  512. @click="revokeCharge"
  513. v-if="queryParams.fBillstatus === '6'"
  514. >撤销付费</el-button
  515. >
  516. <!-- <el-button type="info" size="small" @click="printing">打印</el-button>-->
  517. <!-- <el-button type="danger" size="small" :disabled="notChange" v-show="Lander == Operator">撤销审批</el-button>-->
  518. <el-button
  519. type="danger"
  520. size="small"
  521. :disabled="tablefilter"
  522. @click="approvalRevocation"
  523. v-show="queryParams.fBillstatus === '4'"
  524. >撤销审批</el-button
  525. >
  526. </div>
  527. <el-table
  528. v-loading="loading"
  529. :data="increase_s"
  530. @selection-change="handleSelectionChange_s"
  531. >
  532. <!-- <el-table-column type="selection" width="55" align="center"/> -->
  533. <el-table-column label="序号" type="index" align="center" />
  534. <el-table-column label="提单号" align="center" prop="fMblno" />
  535. <el-table-column label="存货单号" align="center" prop="fBscorpno" />
  536. <el-table-column label="品名" align="center" prop="fProductName" />
  537. <el-table-column label="业务日期" align="center" prop="fBsdate">
  538. <template slot-scope="scope" v-if="scope.row.fBsdate">
  539. <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>
  540. </template>
  541. </el-table-column>
  542. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  543. <el-table-column label="收/付" align="center" prop="fSrcdc">
  544. <template slot-scope="scope">
  545. <span v-if="scope.row.fSrcdc == 'D'">收</span>
  546. <span v-else-if="scope.row.fSrcdc == 'C'">付</span>
  547. </template>
  548. </el-table-column>
  549. <el-table-column label="业务类型" align="center" prop="fBilltype">
  550. <template slot-scope="scope">
  551. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  552. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  553. <span v-else>{{ scope.row.fBilltype }}</span>
  554. </template>
  555. </el-table-column>
  556. <el-table-column label="作业类型" align="center" prop="fBusinessType" />
  557. <el-table-column label="金额" align="center" prop="fAmtdr" />
  558. <el-table-column label="本次金额" align="center" prop="fAmt" />
  559. <el-table-column label="备注" align="center" prop="fRemarks" />
  560. <el-table-column
  561. label="操作"
  562. align="center"
  563. class-name="small-padding fixed-width"
  564. >
  565. <template slot-scope="scope">
  566. <el-button
  567. size="mini"
  568. type="text"
  569. icon="el-icon-delete"
  570. @click.native.prevent="deleteRow(scope.$index, increase_s)"
  571. :disabled="notChange"
  572. >删除
  573. </el-button>
  574. </template>
  575. </el-table-column>
  576. </el-table>
  577. <div slot="footer" class="dialog-footer">
  578. <add-or-update
  579. v-if="addOrUpdateVisible"
  580. ref="addOrUpdate"
  581. @refreshDataList="getDataList"
  582. ></add-or-update>
  583. <approval-comments
  584. v-if="addOrUpdateVisib"
  585. ref="ApprovalComments"
  586. @refreshDataList="returnData"
  587. ></approval-comments>
  588. <el-button v-if="approve === true" @click="immediateApproval"
  589. >审批</el-button
  590. >
  591. <el-button
  592. type="primary"
  593. v-if="queryParams.fBillstatus >= '3'"
  594. @click="addOrUpdateHandle"
  595. >查看审批流</el-button
  596. >
  597. <el-button type="primary" @click="submitForm" :disabled="notChange"
  598. >保 存</el-button
  599. >
  600. <el-button v-if="cancelButton === true" @click="cancel"
  601. >取 消</el-button
  602. >
  603. <el-button v-if="cancelButton === false" @click="homePage"
  604. >取 消</el-button
  605. >
  606. </div>
  607. <el-dialog
  608. v-dialogDrag
  609. :fullscreen="dialogFull"
  610. :close-on-click-modal="false"
  611. width="70%"
  612. :visible.sync="innerVisible"
  613. title="导入数据"
  614. append-to-body
  615. >
  616. <template slot="title">
  617. <div class="avue-crud__dialog__header">
  618. <span class="el-dialog__title">
  619. <span
  620. style="
  621. display: inline-block;
  622. width: 3px;
  623. height: 20px;
  624. margin-right: 5px;
  625. float: left;
  626. margin-top: 2px;
  627. "
  628. ></span>
  629. 导入数据
  630. </span>
  631. <div class="avue-crud__dialog__menu enlarge" @click="full">
  632. <i
  633. style="
  634. cursor: pointer;
  635. display: block;
  636. width: 12px;
  637. height: 12px;
  638. border: 1px solid #909399;
  639. border-top: 3px solid #909399;
  640. margin-top: -3px;
  641. "
  642. ></i>
  643. </div>
  644. </div>
  645. </template>
  646. <el-form
  647. ref="form"
  648. :model="queryParameter"
  649. :rules="rules"
  650. label-width="80px"
  651. style="display: flex; flex-wrap: wrap"
  652. >
  653. <el-form-item label="货权方" prop="fCtrlcorpid">
  654. <!-- <el-input v-model="queryParameter.fCorpid" placeholder="请输入货权方" style="width: 200px;"/>-->
  655. <el-select
  656. v-model="queryParams.fCorpid"
  657. filterable
  658. remote
  659. clearable
  660. size="small"
  661. style="width: 200px"
  662. @keyup.enter.native="handleQuery"
  663. :remote-method="corpsRemoteMethod"
  664. placeholder="请选择货权方"
  665. >
  666. <el-option
  667. v-for="(dict, index) in fMblnoOptions"
  668. :key="index.fId"
  669. :label="dict.fName"
  670. :value="dict.fId"
  671. ></el-option>
  672. </el-select>
  673. </el-form-item>
  674. <el-form-item label="结算单位" prop="fToCorpid">
  675. <el-select
  676. v-model="queryParameter.fToCorpid"
  677. filterable
  678. remote
  679. clearable
  680. size="small"
  681. :disabled="doNot"
  682. style="width: 200px"
  683. @keyup.enter.native="handleQuery"
  684. :remote-method="corpsRemoteMethod"
  685. placeholder="请输入结算单位"
  686. >
  687. <el-option
  688. v-for="(dict, index) in fMblnoOptions"
  689. :key="index.fId"
  690. :label="dict.fName"
  691. :value="dict.fId"
  692. ></el-option>
  693. </el-select>
  694. </el-form-item>
  695. <el-form-item label="提单号" prop="tMblno">
  696. <el-input
  697. v-model="queryParameter.fMblno"
  698. placeholder="请输入提单号"
  699. style="width: 200px"
  700. size="small"
  701. />
  702. </el-form-item>
  703. <el-form-item label="对账单号" prop="fStatementNo">
  704. <el-input
  705. v-model="queryParameter.fStatementNo"
  706. placeholder="请输入提单号"
  707. size="small"
  708. style="width: 200px"
  709. />
  710. </el-form-item>
  711. <el-form-item label="费用名称" prop="fFeeid">
  712. <template>
  713. <el-select
  714. v-model="queryParameter.fFeeid"
  715. filterable
  716. remote
  717. size="small"
  718. style="width: 200px"
  719. :remote-method="fWRemoteMethod"
  720. placeholder="费用名称"
  721. multiple
  722. >
  723. <el-option
  724. v-for="item in fWbuOptions"
  725. :key="item.fId"
  726. :label="item.fName"
  727. :value="item.fId"
  728. >
  729. </el-option>
  730. </el-select>
  731. </template>
  732. </el-form-item>
  733. <el-form-item label="仓储业务" prop="fFeeid">
  734. <el-select
  735. v-model="queryParameter.fBilltype"
  736. size="small"
  737. style="width: 200px"
  738. @change="changefBilltype"
  739. placeholder="请选择仓储业务"
  740. >
  741. <el-option label="入库" value="SJRK"></el-option>
  742. <el-option label="出库" value="SJCK"></el-option>
  743. <el-option label="货权转移" value="HQZY"></el-option>
  744. </el-select>
  745. </el-form-item>
  746. <el-form-item label="作业类型" prop="fBusinessType">
  747. <el-select
  748. v-model="queryParameter.fBusinessType"
  749. filterable
  750. remote
  751. size="small"
  752. style="width: 200px"
  753. placeholder="作业类型"
  754. multiple
  755. >
  756. <el-option
  757. v-for="dict in businessTypeOption"
  758. :key="dict.dictValue"
  759. :label="dict.dictLabel"
  760. :value="dict.dictValue"
  761. >
  762. </el-option>
  763. </el-select>
  764. </el-form-item>
  765. <el-form-item
  766. label="审核日期"
  767. prop="timeExamine"
  768. v-if="typevalue == 1"
  769. >
  770. <el-date-picker
  771. size="small"
  772. style="width: 240px"
  773. v-model="queryParameter.timeExamine"
  774. type="daterange"
  775. start-placeholder="开始日期"
  776. end-placeholder="结束日期"
  777. value-format="yyyy-MM-dd"
  778. :default-time="['00:00:00', '23:59:59']"
  779. >
  780. </el-date-picker>
  781. </el-form-item>
  782. <el-form-item
  783. label="出入库日期"
  784. label-width="85px"
  785. prop="fAccbilldate"
  786. v-if="typevalue == 1"
  787. >
  788. <el-date-picker
  789. size="small"
  790. style="width: 240px"
  791. v-model="queryParameter.timeInterval"
  792. type="daterange"
  793. start-placeholder="开始日期"
  794. end-placeholder="结束日期"
  795. value-format="yyyy-MM-dd"
  796. :default-time="['00:00:00', '23:59:59']"
  797. >
  798. </el-date-picker>
  799. </el-form-item>
  800. <el-form-item>
  801. <el-button
  802. type="cyan"
  803. icon="el-icon-search"
  804. size="mini"
  805. @click="importSearch"
  806. >搜索</el-button
  807. >
  808. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery_s"
  809. >重置</el-button
  810. >
  811. </el-form-item>
  812. </el-form>
  813. <el-table
  814. v-loading="loading"
  815. :data="chargeList_s"
  816. ref="chargeList"
  817. show-summary
  818. :summary-method="getSum"
  819. @selection-change="handleSelectionChange_s"
  820. >
  821. <el-table-column type="selection" width="55" align="center" />
  822. <el-table-column
  823. label="序号"
  824. type="index"
  825. width="55"
  826. align="center"
  827. />
  828. <el-table-column label="货权方" align="center" prop="fName" />
  829. <el-table-column label="提单号" align="center" prop="fMblno" />
  830. <el-table-column label="品名" align="center" prop="fProductName" />
  831. <el-table-column label="业务日期" align="center" prop="fBsdate" />
  832. <el-table-column label="业务类型" align="center" prop="fBilltype">
  833. <template slot-scope="scope">
  834. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  835. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  836. <span v-else>{{ scope.row.fBilltype }}</span>
  837. </template>
  838. </el-table-column>
  839. <el-table-column
  840. label="作业类型"
  841. align="center"
  842. prop="fBusinessType"
  843. />
  844. <el-table-column label="审核日期" align="center" prop="fReviewDate" />
  845. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  846. <el-table-column label="金额" align="center" prop="fAmtdr" />
  847. <el-table-column
  848. label="本次金额"
  849. align="center"
  850. prop="fAmt"
  851. width="100"
  852. >
  853. <template slot-scope="scope">
  854. <el-input
  855. v-model="scope.row.fAmt"
  856. placeholder="请输入本次金额"
  857. clearable
  858. size="small"
  859. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  860. @change="imgChangeI(scope.row)"
  861. />
  862. </template>
  863. </el-table-column>
  864. <el-table-column label="备注" align="center" prop="fRemarks">
  865. <template slot-scope="scope">
  866. <el-input
  867. v-model="scope.row.fRemarks"
  868. placeholder="请输入备注"
  869. clearable
  870. size="small"
  871. width="100"
  872. />
  873. </template>
  874. </el-table-column>
  875. </el-table>
  876. <div slot="footer" class="dialog-footer">
  877. <el-button type="primary" @click="confirmImport">确 定</el-button>
  878. <el-button @click="signOut">取 消</el-button>
  879. </div>
  880. </el-dialog>
  881. </el-dialog>
  882. <!-- 打印页面-->
  883. <el-dialog
  884. :visible.sync="printStatus"
  885. width="80%"
  886. :before-close="closePrinting"
  887. >
  888. <el-table
  889. id="print_area2"
  890. v-loading="loading"
  891. ref="table"
  892. :data="printObject"
  893. @selection-change="handleSelectionChange_s"
  894. >
  895. <!-- <el-table-column type="selection" width="55" align="center"/> -->
  896. <el-table-column label="序号" type="index" width="70" align="center" />
  897. <el-table-column
  898. label="提单号"
  899. align="center"
  900. prop="fMblno"
  901. width="120"
  902. />
  903. <el-table-column
  904. label="存货单号"
  905. align="center"
  906. prop="fBscorpno"
  907. width="120"
  908. />
  909. <el-table-column
  910. label="品名"
  911. align="center"
  912. prop="fProductName"
  913. width="120"
  914. />
  915. <el-table-column
  916. label="业务日期"
  917. align="center"
  918. prop="fBsdate"
  919. width="120"
  920. >
  921. <template slot-scope="scope" v-if="scope.row.fBsdate">
  922. <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>
  923. </template>
  924. </el-table-column>
  925. <el-table-column
  926. label="费用名称"
  927. align="center"
  928. prop="fFeeName"
  929. width="120"
  930. />
  931. <el-table-column label="收/付" align="center" prop="fSrcdc" width="120">
  932. <template slot-scope="scope">
  933. <span v-if="scope.row.fSrcdc == 'D'">收</span>
  934. <span v-else-if="scope.row.fSrcdc == 'C'">付</span>
  935. </template>
  936. </el-table-column>
  937. <el-table-column
  938. label="业务类型"
  939. align="center"
  940. prop="fBilltype"
  941. width="120"
  942. >
  943. <template slot-scope="scope">
  944. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  945. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  946. <span v-else>{{ scope.row.fBilltype }}</span>
  947. </template>
  948. </el-table-column>
  949. <el-table-column
  950. label="金额"
  951. align="center"
  952. prop="fAmtdr"
  953. width="120"
  954. />
  955. <el-table-column
  956. label="本次金额"
  957. align="center"
  958. prop="fAmt"
  959. width="120"
  960. />
  961. </el-table>
  962. <span slot="footer" class="dialog-footer">
  963. <el-button
  964. type="primary"
  965. style="margintop: 10px"
  966. @click="printSomething"
  967. >打印</el-button
  968. >
  969. <el-button @click="printStatus = false">取 消</el-button>
  970. </span>
  971. </el-dialog>
  972. </div>
  973. </template>
  974. <script>
  975. import {
  976. collectFee,
  977. collectFees,
  978. listCharge,
  979. listCharges,
  980. getCharge,
  981. getCharges,
  982. delCharge,
  983. delCharges,
  984. addCharge,
  985. addCharges,
  986. exportCharge,
  987. search,
  988. searchs,
  989. listCorps,
  990. delCharge_s,
  991. delCharge_ss,
  992. backCharge,
  993. revocation,
  994. exportWarehousebillsitems,
  995. } from "@/api/finance/payment";
  996. import { listFees } from "@/api/basicdata/fees";
  997. import print from "print-js";
  998. import AddOrUpdate from "@/views/viewApproval";
  999. import ApprovalComments from "@/views/startApproval";
  1000. import { queryUserVal } from "@/api/warehouseBusiness/agreement";
  1001. import Global from "@/layout/components/global";
  1002. import Cookies from "js-cookie";
  1003. import Vue from "vue";
  1004. Vue.directive("dialogDrag", {
  1005. bind(el, binding, vnode, oldVnode) {
  1006. const dialogHeaderEl = el.querySelector(".el-dialog__header");
  1007. const dragDom = el.querySelector(".el-dialog");
  1008. const enlarge = el.querySelector(".enlarge");
  1009. dialogHeaderEl.style.cursor = "move";
  1010. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  1011. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
  1012. if (enlarge) {
  1013. enlarge.onclick = (e) => {
  1014. dragDom.style.top = "0px";
  1015. dragDom.style.left = "0px";
  1016. };
  1017. }
  1018. dialogHeaderEl.onmousedown = (e) => {
  1019. // 鼠标按下,计算当前元素距离可视区的距离
  1020. const disX = e.clientX - dialogHeaderEl.offsetLeft;
  1021. const disY = e.clientY - dialogHeaderEl.offsetTop;
  1022. // 获取到的值带px 正则匹配替换
  1023. let styL, styT;
  1024. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  1025. if (sty.left.includes("%")) {
  1026. styL =
  1027. +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
  1028. styT =
  1029. +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
  1030. } else {
  1031. styL = +sty.left.replace(/\px/g, "");
  1032. styT = +sty.top.replace(/\px/g, "");
  1033. }
  1034. document.onmousemove = function (e) {
  1035. // 通过事件委托,计算移动的距离
  1036. const l = e.clientX - disX;
  1037. const t = e.clientY - disY;
  1038. // 移动当前元素
  1039. if (t + styT >= 0) {
  1040. dragDom.style.top = `${t + styT}px`;
  1041. }
  1042. dragDom.style.left = `${l + styL}px`;
  1043. // 将此时的位置传出去
  1044. // binding.value({x:e.pageX,y:e.pageY})
  1045. };
  1046. document.onmouseup = function (e) {
  1047. document.onmousemove = null;
  1048. document.onmouseup = null;
  1049. };
  1050. };
  1051. },
  1052. });
  1053. export default {
  1054. name: "Charge",
  1055. data() {
  1056. return {
  1057. typevalue: "",
  1058. typeoptions: [
  1059. {
  1060. value: "1",
  1061. label: "仓储",
  1062. },
  1063. {
  1064. value: "2",
  1065. label: "车队",
  1066. },
  1067. ],
  1068. //全屏放大
  1069. dialogFull: false,
  1070. //财务结算方式
  1071. methodOptions: [],
  1072. doNot: false,
  1073. Lander: "",
  1074. Operator: "",
  1075. approve: false,
  1076. addOrUpdateVisible: false,
  1077. contrastId: 230,
  1078. tablefilter: false,
  1079. hide: false,
  1080. openPrint: false,
  1081. notChange: false,
  1082. browseStatus: true,
  1083. nothing: [],
  1084. //打印表
  1085. printObject: [],
  1086. printStatus: false,
  1087. //导入状态
  1088. state_s: true,
  1089. fWbuOptions: [],
  1090. options: "",
  1091. // 遮罩层
  1092. loading: true,
  1093. //打开内部弹窗
  1094. innerVisible: false,
  1095. chargeList_s: [],
  1096. selection: "",
  1097. increase_s: [],
  1098. cancelButton: true,
  1099. // 选中数组
  1100. ids: [],
  1101. // 非单个禁用
  1102. single: true,
  1103. // 非多个禁用
  1104. multiple: true,
  1105. // 显示搜索条件
  1106. showSearch: true,
  1107. // 总条数
  1108. total: 0,
  1109. totAL: 0,
  1110. Ttime: 0,
  1111. //提单号暂存
  1112. fMblno: "",
  1113. // 财务数据主表格数据
  1114. chargeList: [],
  1115. // 弹出层标题
  1116. title: "",
  1117. // 是否显示弹出层
  1118. open: false,
  1119. businessTypeOption: [],
  1120. fMblnoOptions: "",
  1121. //导入查询参数
  1122. queryParameter: {
  1123. fCorpid: "",
  1124. fToCorpid: "",
  1125. fMblno: "",
  1126. fStatementNo: "",
  1127. fFeeid: "",
  1128. timeExamine: "",
  1129. timeInterval: "",
  1130. },
  1131. empty: [],
  1132. //导入从表传主表
  1133. pass: {
  1134. fAmtdr: 0, //应收合计
  1135. fAmtcr: 0, //应付合计
  1136. fMblno: "", //提单号
  1137. fName: "", //货权方
  1138. },
  1139. Xbutton: true,
  1140. // 查询参数
  1141. queryParams: {
  1142. fId: null,
  1143. pageNum: 1,
  1144. pageSize: 10,
  1145. fBillno: null,
  1146. fCtrlcorpid: null,
  1147. fCorpid: null,
  1148. tMblno: null,
  1149. fAmtdr: null,
  1150. fAmtcr: null,
  1151. fBilltype: null,
  1152. fBillstatus: null,
  1153. fRemarks: null,
  1154. fAccbilldate: null,
  1155. fDeptid: null,
  1156. chargingMethod: null,
  1157. invoiceNo: null,
  1158. bank: null,
  1159. waterBillNo: null,
  1160. },
  1161. addOrUpdateVisib: false,
  1162. // 主表查询参数
  1163. tableFilter: {
  1164. pageNum: 1,
  1165. pageSize: 10,
  1166. fBillno: null,
  1167. fCtrlcorpid: null,
  1168. fCorpid: null,
  1169. tMblno: null,
  1170. fAmtdr: null,
  1171. fAmtcr: null,
  1172. fBilltype: null,
  1173. fBillstatus: null,
  1174. fRemarks: null,
  1175. fAccbilldate: null,
  1176. fDeptid: null,
  1177. },
  1178. approval: [],
  1179. // 表单参数
  1180. form: {},
  1181. // 表单校验
  1182. ruless: {
  1183. fCtrlcorpid: [{ required: true, message: " ", trigger: "blur" }],
  1184. fCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1185. fAccbilldate: [{ required: true, message: " ", trigger: "blur" }],
  1186. },
  1187. // 表单校验
  1188. rules: {
  1189. fBilltype: [{ required: true, message: " ", trigger: "change" }],
  1190. fBillstatus: [{ required: true, message: " ", trigger: "blur" }],
  1191. fDeptid: [{ required: true, message: " ", trigger: "blur" }],
  1192. fToCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1193. timeExamine: [{ required: true, message: " ", trigger: "blur" }],
  1194. },
  1195. };
  1196. },
  1197. components: {
  1198. AddOrUpdate,
  1199. ApprovalComments,
  1200. },
  1201. created() {
  1202. this.typevalue = Cookies.get("sysType");
  1203. this.getList();
  1204. this.register();
  1205. this.getDicts("st_in_type").then((response) => {
  1206. this.businessTypeOption = response.data;
  1207. });
  1208. this.getDicts("data_settlement_type").then((response) => {
  1209. console.log(response);
  1210. this.methodOptions = response.data;
  1211. });
  1212. },
  1213. activated() {
  1214. this.adoPt();
  1215. },
  1216. methods: {
  1217. //导出明细
  1218. handleExportItems() {
  1219. const fIds = this.queryParams.fId;
  1220. if (fIds !== null) {
  1221. this.$confirm("是否确认导出所有计费物资明细数据?", "警告", {
  1222. confirmButtonText: "确定",
  1223. cancelButtonText: "取消",
  1224. type: "warning",
  1225. })
  1226. .then(function () {
  1227. return exportWarehousebillsitems(fIds);
  1228. })
  1229. .then((response) => {
  1230. this.download(response.msg);
  1231. });
  1232. } else {
  1233. this.$message("请先保存");
  1234. }
  1235. },
  1236. full() {
  1237. this.dialogFull = !this.dialogFull;
  1238. },
  1239. //财务主取消
  1240. signOut() {
  1241. if (this.increase_s == 0) {
  1242. this.doNot = false;
  1243. } else {
  1244. this.doNot = true;
  1245. }
  1246. this.innerVisible = false;
  1247. this.feeList = [];
  1248. },
  1249. //付费页面合计
  1250. listTotal(param) {
  1251. const { columns, data } = param;
  1252. const sums = [];
  1253. columns.forEach((column, index) => {
  1254. if (index === 0) {
  1255. sums[index] = "合计";
  1256. } else if (index === 12 || index === 13 || index === 14) {
  1257. const values = data.map((item) => Number(item[column.property]));
  1258. if (!values.every((value) => isNaN(value))) {
  1259. sums[index] = values.reduce((prev, curr) => {
  1260. const value = Number(curr);
  1261. if (!isNaN(value)) {
  1262. return prev + curr;
  1263. } else {
  1264. return prev;
  1265. }
  1266. }, 0);
  1267. }
  1268. }
  1269. });
  1270. return sums;
  1271. },
  1272. approvalRevocation() {
  1273. let data = {
  1274. id: this.queryParams.fId,
  1275. actId: this.contrastId,
  1276. billId: this.queryParams.fId,
  1277. };
  1278. revocation(data).then((data) => {
  1279. if (data.code === 200) {
  1280. this.$message.success("撤销成功");
  1281. this.open = false;
  1282. this.getList();
  1283. }
  1284. });
  1285. },
  1286. changefBilltype() {
  1287. this.businessTypeOption = [];
  1288. if (this.queryParameter.fBilltype == "SJRK") {
  1289. this.getDicts("st_in_type").then((response) => {
  1290. this.businessTypeOption = response.data;
  1291. });
  1292. } else if (this.queryParameter.fBilltype == "SJCK") {
  1293. this.getDicts("st_out_type").then((response) => {
  1294. this.businessTypeOption = response.data;
  1295. });
  1296. } else if (this.queryParameter.fBilltype == "HQZY") {
  1297. this.getDicts("st_trans_type").then((response) => {
  1298. this.businessTypeOption = response.data;
  1299. });
  1300. }
  1301. },
  1302. returnData() {
  1303. this.addOrUpdateVisib = false;
  1304. this.open = false;
  1305. this.homepaGe();
  1306. },
  1307. getDataList() {
  1308. this.addOrUpdateVisible = false;
  1309. },
  1310. homepaGe() {
  1311. let view = {
  1312. fullPath: "/finance/charge",
  1313. hash: "",
  1314. matched: Array(2),
  1315. meta: Object,
  1316. name: "Charge",
  1317. params: Object,
  1318. path: "/finance/charge",
  1319. query: Object,
  1320. title: "付费",
  1321. };
  1322. this.$router.push({ path: "/index" });
  1323. this.$store
  1324. .dispatch("tagsView/delView", view)
  1325. .then(({ visitedViews }) => {
  1326. if (this.isActive(view)) {
  1327. this.toLastView(visitedViews, view);
  1328. }
  1329. });
  1330. Global.$emit("removeCache", "closeSelectedTag", view);
  1331. },
  1332. adoPt() {
  1333. this.approval = this.$route.query.data;
  1334. if (this.approval) {
  1335. this.Xbutton = false;
  1336. this.approval = JSON.parse(this.approval);
  1337. this.hide = false;
  1338. this.tablefilter = true;
  1339. this.notChange = true;
  1340. this.approve = true;
  1341. this.cancelButton = false;
  1342. this.reset();
  1343. this.pass = {
  1344. fAmtdr: 0, //应收合计
  1345. fAmtcr: 0, //应付合计
  1346. fMblno: "", //提单号
  1347. fName: "", //货权方
  1348. fFeesName: "", //结算单位
  1349. fCorpid: "", //结算单位ID
  1350. };
  1351. if (Cookies.get("sysType") == 1) {
  1352. //大木
  1353. getCharge(this.approval.billId).then((response) => {
  1354. this.Operator = response.data.tFee.createBy;
  1355. this.increase_s = response.data.feeDoList;
  1356. this.fWbuOptions = response.data.feesList;
  1357. this.queryParams = response.data.tFee;
  1358. this.fWbuOptions = response.data.feesList;
  1359. this.fMblnoOptions = response.data.corps;
  1360. this.open = true;
  1361. this.title = "修改付费列表";
  1362. });
  1363. } else if (Cookies.get("sysType") == 2) {
  1364. //车队
  1365. getCharges(this.approval.billId).then((response) => {
  1366. this.Operator = response.data.tFee.createBy;
  1367. this.increase_s = response.data.feeDoList;
  1368. this.fWbuOptions = response.data.feesList;
  1369. this.queryParams = response.data.tFee;
  1370. this.fWbuOptions = response.data.feesList;
  1371. this.fMblnoOptions = response.data.corps;
  1372. this.open = true;
  1373. this.title = "修改付费列表";
  1374. });
  1375. }
  1376. }
  1377. },
  1378. homePage() {
  1379. this.open = false;
  1380. let view = {
  1381. fullPath: "/finance/charge",
  1382. hash: "",
  1383. matched: Array(2),
  1384. meta: Object,
  1385. name: "Charge",
  1386. params: Object,
  1387. path: "/finance/charge",
  1388. query: Object,
  1389. title: "付费",
  1390. };
  1391. this.$router.push({ path: "/index" });
  1392. this.$store
  1393. .dispatch("tagsView/delView", view)
  1394. .then(({ visitedViews }) => {
  1395. if (this.isActive(view)) {
  1396. this.toLastView(visitedViews, view);
  1397. }
  1398. });
  1399. Global.$emit("removeCache", "closeSelectedTag", view);
  1400. },
  1401. register() {
  1402. queryUserVal().then((response) => {
  1403. this.Lander = response.user.userName;
  1404. });
  1405. },
  1406. immediateApproval() {
  1407. this.addOrUpdateVisib = true;
  1408. this.$nextTick(() => {
  1409. this.$refs.ApprovalComments.init(
  1410. this.approval.billId,
  1411. this.approval.actId
  1412. );
  1413. });
  1414. },
  1415. // 查看审批流
  1416. addOrUpdateHandle() {
  1417. this.addOrUpdateVisible = true;
  1418. this.addOrUpdateVisib = false;
  1419. let id = "448";
  1420. let actId = "110";
  1421. this.$nextTick(() => {
  1422. this.$refs.addOrUpdate.init(this.queryParams.fId, this.contrastId);
  1423. });
  1424. },
  1425. // 撤销付费
  1426. revokeCharge() {
  1427. this.queryParams.fBillstatus = "1";
  1428. let formDate = new window.FormData();
  1429. formDate.append("tFee", JSON.stringify(this.queryParams));
  1430. formDate.append("tFeeDo", JSON.stringify(this.increase_s));
  1431. backCharge(formDate).then((response) => {
  1432. this.open = false;
  1433. this.msgSuccess("操作成功");
  1434. this.getList();
  1435. });
  1436. },
  1437. // 查看按钮
  1438. check(row, res) {
  1439. this.notChange = true;
  1440. if (Cookies.get("sysType") == 1) {
  1441. //大木
  1442. getCharge(row.fId).then((response) => {
  1443. this.Operator = response.data.tFee.createBy;
  1444. this.increase_s = response.data.feeDoList;
  1445. this.fWbuOptions = response.data.feesList;
  1446. this.queryParams = response.data.tFee;
  1447. this.fWbuOptions = response.data.feesList;
  1448. this.fMblnoOptions = response.data.corps;
  1449. this.open = true;
  1450. this.title = "付费列表";
  1451. this.tablefilter = true;
  1452. if (res == 1) {
  1453. this.notChange = true;
  1454. if (this.Operator == this.Lander) {
  1455. this.tablefilter = false;
  1456. this.reset();
  1457. this.pass = {
  1458. fAmtdr: 0, //应收合计
  1459. fAmtcr: 0, //应付合计
  1460. fMblno: "", //提单号
  1461. fName: "", //货权方
  1462. fFeesName: "", //结算单位
  1463. fCorpid: "", //结算单位ID
  1464. };
  1465. const fId = row.fId || this.ids;
  1466. getCharge(fId).then((response) => {
  1467. this.increase_s = response.data.feeDoList;
  1468. this.fWbuOptions = response.data.feesList;
  1469. this.queryParams = response.data.tFee;
  1470. this.fWbuOptions = response.data.feesList;
  1471. this.fMblnoOptions = response.data.corps;
  1472. this.open = true;
  1473. });
  1474. } else {
  1475. this.notChange = true;
  1476. // this.$message.error('未知异常,请联系管理员')
  1477. }
  1478. } else {
  1479. this.notChange = true;
  1480. this.reset();
  1481. this.pass = {
  1482. fAmtdr: 0, //应收合计
  1483. fAmtcr: 0, //应付合计
  1484. fMblno: "", //提单号
  1485. fName: "", //货权方
  1486. fFeesName: "", //结算单位
  1487. fCorpid: "", //结算单位ID
  1488. };
  1489. const fId = row.fId || this.ids;
  1490. getCharge(fId).then((response) => {
  1491. this.increase_s = response.data.feeDoList;
  1492. this.fWbuOptions = response.data.feesList;
  1493. this.queryParams = response.data.tFee;
  1494. this.fWbuOptions = response.data.feesList;
  1495. this.fMblnoOptions = response.data.corps;
  1496. this.open = true;
  1497. });
  1498. }
  1499. });
  1500. } else if (Cookies.get("sysType") == 2) {
  1501. //车队
  1502. getCharges(row.fId).then((response) => {
  1503. this.Operator = response.data.tFee.createBy;
  1504. this.increase_s = response.data.feeDoList;
  1505. this.fWbuOptions = response.data.feesList;
  1506. this.queryParams = response.data.tFee;
  1507. this.fWbuOptions = response.data.feesList;
  1508. this.fMblnoOptions = response.data.corps;
  1509. this.open = true;
  1510. this.title = "付费列表";
  1511. this.tablefilter = true;
  1512. if (res == 1) {
  1513. this.notChange = true;
  1514. if (this.Operator == this.Lander) {
  1515. this.tablefilter = false;
  1516. this.reset();
  1517. this.pass = {
  1518. fAmtdr: 0, //应收合计
  1519. fAmtcr: 0, //应付合计
  1520. fMblno: "", //提单号
  1521. fName: "", //货权方
  1522. fFeesName: "", //结算单位
  1523. fCorpid: "", //结算单位ID
  1524. };
  1525. const fId = row.fId || this.ids;
  1526. getCharges(fId).then((response) => {
  1527. this.increase_s = response.data.feeDoList;
  1528. this.fWbuOptions = response.data.feesList;
  1529. this.queryParams = response.data.tFee;
  1530. this.fWbuOptions = response.data.feesList;
  1531. this.fMblnoOptions = response.data.corps;
  1532. this.open = true;
  1533. });
  1534. } else {
  1535. this.notChange = true;
  1536. // this.$message.error('未知异常,请联系管理员')
  1537. }
  1538. } else {
  1539. this.notChange = true;
  1540. this.reset();
  1541. this.pass = {
  1542. fAmtdr: 0, //应收合计
  1543. fAmtcr: 0, //应付合计
  1544. fMblno: "", //提单号
  1545. fName: "", //货权方
  1546. fFeesName: "", //结算单位
  1547. fCorpid: "", //结算单位ID
  1548. };
  1549. const fId = row.fId || this.ids;
  1550. getCharges(fId).then((response) => {
  1551. this.increase_s = response.data.feeDoList;
  1552. this.fWbuOptions = response.data.feesList;
  1553. this.queryParams = response.data.tFee;
  1554. this.fWbuOptions = response.data.feesList;
  1555. this.fMblnoOptions = response.data.corps;
  1556. this.open = true;
  1557. });
  1558. }
  1559. });
  1560. }
  1561. },
  1562. //打印功能
  1563. printing() {
  1564. if (this.increase_s.length !== 0) {
  1565. this.printStatus = true;
  1566. this.printObject = this.increase_s;
  1567. } else {
  1568. this.$message.error("无数据,请检查是否有数据");
  1569. }
  1570. },
  1571. //确认打印
  1572. printSomething() {
  1573. // 此处的style即为打印时的样式
  1574. const style =
  1575. "table tr td,th { border-collapse: collapse;padding:0px;border:.5px #000 solid;text-align:center;}";
  1576. print({
  1577. printable: "print_area2",
  1578. type: "html",
  1579. header: "付费表",
  1580. style: style, // 亦可使用引入的外部css;
  1581. scanStyles: false,
  1582. });
  1583. },
  1584. //关闭打印弹窗
  1585. closePrinting() {
  1586. this.$confirm("确认关闭?")
  1587. .then((_) => {
  1588. this.printStatus = false;
  1589. })
  1590. .catch((_) => {});
  1591. },
  1592. // 确认付费
  1593. confirmCharge() {
  1594. this.$refs["ruless"].validate((valid) => {
  1595. if (valid) {
  1596. if (this.increase_s.length) {
  1597. // this.queryParams.fBillstatus = '4'
  1598. let formDate = new window.FormData();
  1599. formDate.append("tFee", JSON.stringify(this.queryParams));
  1600. formDate.append("tFeeDo", JSON.stringify(this.increase_s));
  1601. if (Cookies.get("sysType") == 1) {
  1602. collectFee(formDate).then((response) => {
  1603. this.msgSuccess("操作成功");
  1604. this.open = false;
  1605. this.getList();
  1606. });
  1607. } else {
  1608. collectFees(formDate).then((response) => {
  1609. this.msgSuccess("操作成功");
  1610. this.open = false;
  1611. this.getList();
  1612. });
  1613. }
  1614. } else {
  1615. this.$message.error("表单为空不允许操作");
  1616. }
  1617. }
  1618. });
  1619. },
  1620. charGe() {
  1621. if (!Cookies.get("sysType")) {
  1622. return this.$message("请先选择业务类型");
  1623. }
  1624. this.queryParameter = {
  1625. fToCorpid: this.queryParams.fCorpid,
  1626. };
  1627. this.chargeList_s = [];
  1628. // this.queryParameter.fToCorpid = this.queryParams.fCorpid
  1629. this.innerVisible = true;
  1630. if (this.queryParams.fCorpid) {
  1631. this.doNot = true;
  1632. }
  1633. },
  1634. getSum(param) {
  1635. const { columns, data } = param;
  1636. const sums = [];
  1637. columns.forEach((column, index) => {
  1638. sums[0] = "合计";
  1639. sums[10] = this.totAL.toFixed(2);
  1640. sums[9] = this.Ttime.toFixed(2);
  1641. });
  1642. return sums;
  1643. },
  1644. // 导入多选框
  1645. handleSelectionChange_s(selection) {
  1646. this.totAL = 0;
  1647. this.Ttime = 0;
  1648. this.selection = selection;
  1649. if (this.selection.length == 0) {
  1650. for (let item in this.chargeList_s) {
  1651. this.totAL += Number(this.chargeList_s[item].fAmt);
  1652. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  1653. }
  1654. } else {
  1655. for (let index in selection) {
  1656. this.totAL += Number(selection[index].fAmt);
  1657. this.Ttime += Number(selection[index].fAmtdr);
  1658. }
  1659. }
  1660. // this.getSummaries()
  1661. },
  1662. // 多选框选中数据
  1663. handleSelectionChange(selection) {
  1664. this.totAL = 0;
  1665. this.ids = selection.map((item) => item.fId);
  1666. this.single =
  1667. selection.length !== 1 ||
  1668. selection.map((item) => item.fBillstatus) == 4 ||
  1669. selection.map((item) => item.fBillstatus) == 6;
  1670. this.multiple = !selection.length;
  1671. },
  1672. imgChangeI(row) {
  1673. if (row.fAmt && Number(row.fAmt) > Number(row.fAmtdr)) {
  1674. this.$set(row, "fAmt", row.fAmtdr);
  1675. this.state_s = true;
  1676. }
  1677. if (this.selection.length !== 0) {
  1678. this.totAL = 0;
  1679. this.Ttime = 0;
  1680. for (let item in this.selection) {
  1681. this.totAL += Number(this.selection[item].fAmt);
  1682. this.Ttime += Number(this.selection[item].fAmtdr);
  1683. }
  1684. } else {
  1685. this.totAL = 0;
  1686. this.Ttime = 0;
  1687. for (let item in this.chargeList_s) {
  1688. this.totAL += Number(this.chargeList_s[item].fAmt);
  1689. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  1690. }
  1691. }
  1692. },
  1693. //确认导入
  1694. confirmImport() {
  1695. this.doNot = true;
  1696. this.hide = true;
  1697. for (let item in this.selection) {
  1698. this.pass.fAmtcr += Number(this.selection[item].fAmt.toFixed(2));
  1699. this.pass.fAmtdr += Number(this.selection[item].fAmtdr.toFixed(2));
  1700. }
  1701. if (this.state_s == true) {
  1702. if (this.selection.length == "0") {
  1703. this.$message.error("未选择导入行");
  1704. } else {
  1705. for (let item in this.selection) {
  1706. this.empty.push(this.selection[item].fMblno);
  1707. this.nothing.push(this.selection[item].fName);
  1708. }
  1709. //去重提单号
  1710. this.empty = new Set(this.empty);
  1711. this.empty = Array.from(this.empty);
  1712. //去重货权方
  1713. this.nothing = new Set(this.nothing);
  1714. this.nothing = Array.from(this.nothing);
  1715. if (this.empty.length <= 1) {
  1716. this.pass.fMblno = this.empty[0];
  1717. } else {
  1718. this.pass.fMblno = this.empty[0] + "...";
  1719. }
  1720. if (this.nothing.length <= 1) {
  1721. this.pass.fName = this.nothing[0];
  1722. } else {
  1723. this.pass.fName = this.nothing[0] + "...";
  1724. }
  1725. this.increase_s = this.increase_s.concat(this.selection);
  1726. this.queryParams.tMblno = this.pass.fMblno; //提单号
  1727. this.queryParams.fCtrlcorpid = this.pass.fName;
  1728. this.queryParams.fCorpid = this.queryParameter.fToCorpid;
  1729. this.queryParams.fAmtcr = this.pass.fAmtcr;
  1730. this.queryParams.fAmtdr = this.pass.fAmtdr;
  1731. this.innerVisible = false;
  1732. this.chargeList_s = [];
  1733. this.queryParameter = {
  1734. fCorpid: "",
  1735. fToCorpid: "",
  1736. fMblno: "",
  1737. fStatementNo: "",
  1738. fFeeid: "",
  1739. timeExamine: "",
  1740. timeInterval: "",
  1741. };
  1742. }
  1743. } else if (this.state_s == false) {
  1744. this.$message.error("本次金额不能大于原定金额");
  1745. }
  1746. },
  1747. /** 查询财务数据主列表 */
  1748. getList() {
  1749. this.loading = true;
  1750. this.getDicts("approval_process").then((response) => {
  1751. this.options = response.data;
  1752. });
  1753. if (Cookies.get("sysType") == 1) {
  1754. //大木
  1755. listCharge(this.tableFilter).then((response) => {
  1756. this.chargeList = response.rows;
  1757. this.total = response.total;
  1758. this.loading = false;
  1759. });
  1760. } else if (Cookies.get("sysType") == 2) {
  1761. //车队
  1762. listCharges(this.tableFilter).then((response) => {
  1763. this.chargeList = response.rows;
  1764. this.total = response.total;
  1765. this.loading = false;
  1766. });
  1767. }
  1768. },
  1769. // 取消按钮
  1770. cancel() {
  1771. this.open = false;
  1772. this.approve = false;
  1773. this.reset();
  1774. },
  1775. // 表单重置
  1776. reset() {
  1777. this.form = {
  1778. fId: null,
  1779. fBillno: null,
  1780. fCtrlcorpid: null,
  1781. fCorpid: null,
  1782. tMblno: null,
  1783. fAmtdr: null,
  1784. fAmtcr: null,
  1785. fBilltype: null,
  1786. fBillstatus: "0",
  1787. fRemarks: null,
  1788. fAccbilldate: null,
  1789. delFlag: null,
  1790. createBy: null,
  1791. fDeptid: null,
  1792. createTime: null,
  1793. updateBy: null,
  1794. updateTime: null,
  1795. };
  1796. this.resetForm("form");
  1797. },
  1798. /** 搜索按钮操作 */
  1799. handleQuery() {
  1800. this.queryParams.pageNum = 1;
  1801. this.getList();
  1802. },
  1803. /** 导入搜索 */
  1804. importSearch() {
  1805. // .join(',')
  1806. this.chargeList_s = [];
  1807. if (this.queryParameter.fStatementNo) {
  1808. this.rules = {};
  1809. if (Cookies.get("sysType") == 1) {
  1810. search(this.queryParameter).then((response) => {
  1811. this.chargeList_s = response.rows;
  1812. this.$message.success("查询成功");
  1813. for (let item in this.chargeList_s) {
  1814. this.totAL += Number(this.chargeList_s[item].fAmt);
  1815. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  1816. }
  1817. });
  1818. } else {
  1819. searchs(this.queryParameter).then((response) => {
  1820. this.chargeList_s = response.rows;
  1821. this.$message.success("查询成功");
  1822. for (let item in this.chargeList_s) {
  1823. this.totAL += Number(this.chargeList_s[item].fAmt);
  1824. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  1825. }
  1826. });
  1827. }
  1828. } else {
  1829. this.rules = {
  1830. fToCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1831. timeExamine: [{ required: true, message: " ", trigger: "blur" }],
  1832. };
  1833. if (this.rules) {
  1834. this.$refs["form"].validate((valid) => {
  1835. if (valid) {
  1836. if (Cookies.get("sysType") == 1) {
  1837. search(this.queryParameter).then((response) => {
  1838. this.chargeList_s = response.rows;
  1839. if (this.chargeList_s.length !== 0) {
  1840. this.$message.success("查询成功");
  1841. this.totAL = 0;
  1842. this.Ttime = 0;
  1843. for (let item in this.chargeList_s) {
  1844. this.totAL += Number(this.chargeList_s[item].fAmt);
  1845. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  1846. }
  1847. } else {
  1848. this.$message.error("暂无数据");
  1849. }
  1850. });
  1851. } else {
  1852. searchs(this.queryParameter).then((response) => {
  1853. this.chargeList_s = response.rows;
  1854. if (this.chargeList_s.length !== 0) {
  1855. this.$message.success("查询成功");
  1856. this.totAL = 0;
  1857. this.Ttime = 0;
  1858. for (let item in this.chargeList_s) {
  1859. this.totAL += Number(this.chargeList_s[item].fAmt);
  1860. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  1861. }
  1862. } else {
  1863. this.$message.error("暂无数据");
  1864. }
  1865. });
  1866. }
  1867. }
  1868. });
  1869. } else {
  1870. this.$message.error("操作频繁");
  1871. }
  1872. }
  1873. },
  1874. /** 远程模糊查询用户 */
  1875. corpsRemoteMethod(name) {
  1876. if (name == null || name === "") {
  1877. return false;
  1878. }
  1879. let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 1 };
  1880. listCorps(queryParams).then((response) => {
  1881. this.fMblnoOptions = response.rows;
  1882. this.KHblnoOptions = response.rows;
  1883. });
  1884. },
  1885. /** 重置按钮操作 */
  1886. resetQuery() {
  1887. this.tableFilter = {
  1888. pageNum: 1,
  1889. pageSize: 10,
  1890. timeInterval: null,
  1891. fBillno: null,
  1892. fCtrlcorpid: null,
  1893. fCorpid: null,
  1894. };
  1895. this.handleQuery();
  1896. },
  1897. //导入重置按钮
  1898. resetQuery_s() {
  1899. this.queryParameter = {
  1900. fCorpid: "",
  1901. fToCorpid: "",
  1902. fMblno: "",
  1903. fStatementNo: "",
  1904. fFeeid: "",
  1905. timeExamine: "",
  1906. timeInterval: "",
  1907. };
  1908. },
  1909. // 远程模糊查询费用名称
  1910. fWRemoteMethod(name) {
  1911. this.fWbuOptions = [];
  1912. if (name == null || name === "") {
  1913. return false;
  1914. }
  1915. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  1916. listFees(queryParams).then((response) => {
  1917. this.fWbuOptions = response.rows;
  1918. });
  1919. },
  1920. /** 新增按钮操作 */
  1921. handleAdd() {
  1922. this.notChange = false;
  1923. this.hide = true;
  1924. this.reset();
  1925. (this.pass = {
  1926. fAmtdr: 0, //应收合计
  1927. fAmtcr: 0, //应付合计
  1928. fMblno: "", //提单号
  1929. fName: "", //货权方
  1930. fFeesName: "", //结算单位
  1931. fCorpid: "", //结算单位ID
  1932. }),
  1933. // this.queryParams = []
  1934. (this.increase_s = []);
  1935. this.queryParams = {
  1936. pageNum: 1,
  1937. pageSize: 10,
  1938. fBillno: null,
  1939. fCtrlcorpid: null,
  1940. fCorpid: null,
  1941. tMblno: null,
  1942. fAmtdr: null,
  1943. fAmtcr: null,
  1944. fBilltype: null,
  1945. fBillstatus: null,
  1946. fRemarks: null,
  1947. fAccbilldate: null,
  1948. fDeptid: null,
  1949. chargingMethod: null,
  1950. invoiceNo: null,
  1951. bank: null,
  1952. waterBillNo: null,
  1953. fSystemType: Cookies.get("sysType"),
  1954. };
  1955. this.resetForm("queryParams");
  1956. this.open = true;
  1957. this.title = "添加财务数据主";
  1958. },
  1959. /** 修改按钮操作 */
  1960. handleUpdate(row) {
  1961. this.approve = false;
  1962. this.hide = false;
  1963. this.notChange = false;
  1964. this.reset();
  1965. this.pass = {
  1966. fAmtdr: 0, //应收合计
  1967. fAmtcr: 0, //应付合计
  1968. fMblno: "", //提单号
  1969. fName: "", //货权方
  1970. fFeesName: "", //结算单位
  1971. fCorpid: "", //结算单位ID
  1972. };
  1973. const fId = row.fId || this.ids;
  1974. if (Cookies.get("sysType") == 1) {
  1975. //大木
  1976. getCharge(fId).then((response) => {
  1977. this.Operator = response.data.tFee.createBy;
  1978. this.increase_s = response.data.feeDoList;
  1979. this.fWbuOptions = response.data.feesList;
  1980. this.queryParams = response.data.tFee;
  1981. this.fWbuOptions = response.data.feesList;
  1982. this.fMblnoOptions = response.data.corps;
  1983. this.open = true;
  1984. this.title = "修改付费列表";
  1985. });
  1986. } else if (Cookies.get("sysType") == 2) {
  1987. //车队
  1988. getCharges(fId).then((response) => {
  1989. this.Operator = response.data.tFee.createBy;
  1990. this.increase_s = response.data.feeDoList;
  1991. this.fWbuOptions = response.data.feesList;
  1992. this.queryParams = response.data.tFee;
  1993. this.fWbuOptions = response.data.feesList;
  1994. this.fMblnoOptions = response.data.corps;
  1995. this.open = true;
  1996. this.title = "修改付费列表";
  1997. });
  1998. }
  1999. },
  2000. /** 提交按钮 */
  2001. submitForm() {
  2002. this.$refs["ruless"].validate((valid) => {
  2003. if (valid) {
  2004. if (this.queryParams.fId == null) {
  2005. // this.chargeList.fBillstatus = '1'
  2006. this.queryParams.fBillstatus = "1";
  2007. let formData = new window.FormData();
  2008. formData.append("tFee", JSON.stringify(this.queryParams));
  2009. formData.append("tFeeDo", JSON.stringify(this.increase_s));
  2010. if (Cookies.get("sysType") == 1) {
  2011. addCharge(formData).then((response) => {
  2012. this.msgSuccess("新增成功");
  2013. // this.increase_s = []
  2014. // this.open = false
  2015. this.getList();
  2016. });
  2017. } else {
  2018. addCharges(formData).then((response) => {
  2019. this.msgSuccess("新增成功");
  2020. // this.increase_s = []
  2021. // this.open = false
  2022. this.getList();
  2023. });
  2024. }
  2025. } else {
  2026. this.pass.fAmtcr = 0;
  2027. this.pass.fAmtdr = 0;
  2028. for (let item in this.increase_s) {
  2029. this.pass.fAmtcr += Number(this.increase_s[item].fAmt);
  2030. this.pass.fAmtdr += Number(this.increase_s[item].fAmtdr);
  2031. }
  2032. this.queryParams.fAmtcr = Number(this.pass.fAmtcr.toFixed(2));
  2033. this.queryParams.fAmtdr = Number(this.pass.fAmtdr.toFixed(2));
  2034. this.pass.fAmtcr.toFixed(2);
  2035. this.queryParams.fBillstatus = "1";
  2036. let formData = new window.FormData();
  2037. formData.append("tFee", JSON.stringify(this.queryParams));
  2038. formData.append("tFeeDo", JSON.stringify(this.increase_s));
  2039. if (Cookies.get("sysType") == 1) {
  2040. addCharge(formData).then((response) => {
  2041. this.msgSuccess("修改成功");
  2042. // this.increase_s = []
  2043. // this.open = false
  2044. this.getList();
  2045. });
  2046. } else {
  2047. addCharges(formData).then((response) => {
  2048. this.msgSuccess("修改成功");
  2049. // this.increase_s = []
  2050. // this.open = false
  2051. this.getList();
  2052. });
  2053. }
  2054. }
  2055. }
  2056. });
  2057. },
  2058. /** 删除按钮操作 */
  2059. handleDelete(row) {
  2060. const fIds = row.fId || this.ids;
  2061. let tips = "";
  2062. if (Cookies.get("sysType") == 1) {
  2063. //大木
  2064. delCharge_s(fIds).then((data) => {
  2065. switch (data.msg) {
  2066. case "0": {
  2067. this.$message.error("当前数据已被其他操作员操作请刷新页面");
  2068. break;
  2069. }
  2070. case "1": {
  2071. tips = "当前主表有数据从表无数据是否删除";
  2072. this.delete_S(fIds, tips);
  2073. break;
  2074. }
  2075. case "2": {
  2076. tips = "当前主表有数据从表有数据是否删除";
  2077. this.delete_S(fIds, tips);
  2078. break;
  2079. }
  2080. default: {
  2081. return this.$message.error("未知错误,无状态");
  2082. }
  2083. }
  2084. });
  2085. } else if (Cookies.get("sysType") == 2) {
  2086. //车队
  2087. delCharge_ss(fIds).then((data) => {
  2088. switch (data.msg) {
  2089. case "0": {
  2090. this.$message.error("当前数据已被其他操作员操作请刷新页面");
  2091. break;
  2092. }
  2093. case "1": {
  2094. tips = "当前主表有数据从表无数据是否删除";
  2095. this.delete_S(fIds, tips);
  2096. break;
  2097. }
  2098. case "2": {
  2099. tips = "当前主表有数据从表有数据是否删除";
  2100. this.delete_S(fIds, tips);
  2101. break;
  2102. }
  2103. default: {
  2104. return this.$message.error("未知错误,无状态");
  2105. }
  2106. }
  2107. });
  2108. }
  2109. },
  2110. delete_S(fIds, tips) {
  2111. this.$confirm(tips, "警告", {
  2112. confirmButtonText: "确定",
  2113. cancelButtonText: "取消",
  2114. type: "warning",
  2115. })
  2116. .then(function () {
  2117. if (Cookies.get("sysType") == 1) {
  2118. return delCharge(fIds);
  2119. } else if (Cookies.get("sysType") == 2) {
  2120. return delCharges(fIds);
  2121. }
  2122. })
  2123. .then(() => {
  2124. this.getList();
  2125. this.msgSuccess("删除成功");
  2126. });
  2127. },
  2128. /** 导出按钮操作 */
  2129. handleExport() {
  2130. const queryParams = this.queryParams;
  2131. this.$confirm("是否确认导出所有财务数据主数据项?", "警告", {
  2132. confirmButtonText: "确定",
  2133. cancelButtonText: "取消",
  2134. type: "warning",
  2135. })
  2136. .then(function () {
  2137. return exportCharge(queryParams);
  2138. })
  2139. .then((response) => {
  2140. this.download(response.msg);
  2141. });
  2142. },
  2143. //清空一行
  2144. deleteRow(index, rows) {
  2145. this.queryParams.fAmtcr = 0;
  2146. this.queryParams.fAmtdr = 0;
  2147. rows.splice(index, 1);
  2148. for (let item in this.increase_s) {
  2149. this.queryParams.fAmtcr += this.increase_s[item].fAmt;
  2150. this.queryParams.fAmtdr += this.increase_s[item].fAmtdr;
  2151. }
  2152. if (this.increase_s == 0) {
  2153. this.doNot = false;
  2154. } else {
  2155. this.doNot = true;
  2156. }
  2157. },
  2158. // 财务结算方式(数据字典),对应data_settlement_type 字典翻译
  2159. methodTypeFormat(row, column) {
  2160. return this.selectDictLabel(this.methodOptions, row.chargingMethod);
  2161. },
  2162. },
  2163. };
  2164. </script>
  2165. <style lang="scss">
  2166. .avue-crud__dialog__header {
  2167. display: -webkit-box;
  2168. display: -ms-flexbox;
  2169. display: flex;
  2170. -webkit-box-align: center;
  2171. -ms-flex-align: center;
  2172. align-items: center;
  2173. -webkit-box-pack: justify;
  2174. -ms-flex-pack: justify;
  2175. justify-content: space-between;
  2176. }
  2177. .el-dialog__title {
  2178. color: rgba(0, 0, 0, 0.85);
  2179. font-weight: 500;
  2180. word-wrap: break-word;
  2181. }
  2182. .avue-crud__dialog__menu {
  2183. padding-right: 20px;
  2184. float: left;
  2185. }
  2186. .avue-crud__dialog__menu i {
  2187. color: #909399;
  2188. font-size: 15px;
  2189. }
  2190. .el-icon-full-screen {
  2191. cursor: pointer;
  2192. }
  2193. .el-icon-full-screen:before {
  2194. content: "\e719";
  2195. }
  2196. </style>