index.vue 67 KB

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