index.vue 75 KB

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