index.vue 76 KB

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