index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. <template>
  2. <div class="app-container">
  3. <div v-if="!masterDetail">
  4. <div v-show="showDetailed">
  5. <el-radio-group @change="searchFn" v-model="searchForm.status" size="mini">
  6. <el-radio-button label="">全部</el-radio-button>
  7. <el-radio-button label="1">未发放</el-radio-button>
  8. <el-radio-button label="2">已发放</el-radio-button>
  9. </el-radio-group>
  10. <br /><br />
  11. <!-- 筛选条件 -->
  12. <div>
  13. <el-form ref="searchForm" :model="searchForm" label-width="100px" size="mini" label-position="left">
  14. <el-row :gutter="20">
  15. <el-col :xs="24" :sm="12" :lg="6">
  16. <el-form-item label="汇总批次号:" prop="summaryBatchNo">
  17. <el-input v-model="searchForm.summaryBatchNo" placeholder="请输入"></el-input>
  18. </el-form-item>
  19. </el-col>
  20. <el-col :xs="24" :sm="12" :lg="6">
  21. <el-form-item label="汇总时间段:" prop="summary">
  22. <el-date-picker
  23. v-model="searchForm.summary"
  24. type="daterange"
  25. range-separator="至"
  26. style="width: 100%"
  27. value-format="yyyy-MM-dd"
  28. start-placeholder="开始日期"
  29. end-placeholder="结束日期"
  30. >
  31. </el-date-picker>
  32. </el-form-item>
  33. </el-col>
  34. <el-col :xs="24" :sm="12" :lg="6">
  35. <el-form-item label="发放时间段:" prop="issue">
  36. <el-date-picker
  37. v-model="searchForm.issue"
  38. type="daterange"
  39. range-separator="至"
  40. style="width: 100%"
  41. value-format="yyyy-MM-dd"
  42. start-placeholder="开始日期"
  43. end-placeholder="结束日期"
  44. >
  45. </el-date-picker>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :xs="24" :sm="24" :lg="6">
  49. <el-form-item label="" class="fr">
  50. <el-button size="mini" @click="emptyFn">清空</el-button>
  51. <el-button size="mini" type="primary" @click="searchFn">搜索</el-button>
  52. </el-form-item>
  53. </el-col>
  54. </el-row>
  55. </el-form>
  56. </div>
  57. <!-- 按钮 -->
  58. <div class="btn-group clearfix">
  59. <div class="fl">
  60. <el-button type="primary" size="mini" @click="monthDoFn">月度汇总</el-button>
  61. <!-- <el-button type="primary" size="mini" @click="detailedFn">查看明细(测试)</el-button>
  62. <el-button type="primary" size="mini" @click="showDialog">发放(测试)</el-button> -->
  63. </div>
  64. </div>
  65. <!-- 列表 -->
  66. <div class="mymain-container">
  67. <div class="table">
  68. <el-table
  69. v-loading="listLoading"
  70. :data="dataList"
  71. element-loading-text="Loading"
  72. border
  73. fit
  74. highlight-current-row
  75. stripe
  76. >
  77. <el-table-column align="center" label="操作" fixed min-width="200">
  78. <template slot-scope="scope">
  79. <el-button type="text" @click="detailedFn(scope.row.summaryBatchNo)">查看明细</el-button>
  80. <el-button v-if="scope.row.issueStatus == 1" type="text" @click="showDialog(scope.row.summaryBatchNo)"
  81. >重新汇总</el-button
  82. >
  83. <el-button
  84. v-if="scope.row.issueStatus == 1 || scope.row.issueStatus == 4"
  85. type="text"
  86. @click="grantFn(scope.row.summaryBatchNo)"
  87. >发放</el-button
  88. >
  89. </template>
  90. </el-table-column>
  91. <el-table-column
  92. align="left"
  93. label="汇总批次号"
  94. prop="summaryBatchNo"
  95. min-width="160"
  96. show-overflow-tooltip
  97. ></el-table-column>
  98. <el-table-column
  99. align="left"
  100. label="发放月份"
  101. prop="summaryMonth"
  102. min-width="100"
  103. show-overflow-tooltip
  104. ></el-table-column>
  105. <el-table-column
  106. align="left"
  107. label="结算人数"
  108. prop="summaryPersonCount"
  109. min-width="100"
  110. show-overflow-tooltip
  111. ></el-table-column>
  112. <el-table-column
  113. align="left"
  114. label="结算工单数量(单)"
  115. prop="summaryOrderCount"
  116. min-width="140"
  117. show-overflow-tooltip
  118. ></el-table-column>
  119. <el-table-column
  120. align="right"
  121. label="结算金额(元)"
  122. prop="summaryCost"
  123. min-width="140"
  124. show-overflow-tooltip
  125. >
  126. <template slot-scope="scope">
  127. {{ scope.row.summaryCost | numToFixed }}
  128. </template>
  129. </el-table-column>
  130. <el-table-column
  131. align="right"
  132. label="发放金额(元)"
  133. prop="issueCostC"
  134. min-width="140"
  135. show-overflow-tooltip
  136. >
  137. <template slot-scope="scope">
  138. {{ scope.row.issueCostC | numToFixed }}
  139. </template>
  140. </el-table-column>
  141. <el-table-column align="left" label="发放状态" prop="issueStatus" min-width="100" show-overflow-tooltip>
  142. <template slot-scope="scope">
  143. <el-tag size="mini" v-show="scope.row.issueStatus == 1" type="">待发放 </el-tag>
  144. <el-tag size="mini" v-show="scope.row.issueStatus == 2" type="success">已发放</el-tag>
  145. <el-tag size="mini" v-show="scope.row.issueStatus == 3" type="info">银行受理中</el-tag>
  146. <el-tag size="mini" v-show="scope.row.issueStatus == 4" type="danger">失败</el-tag>
  147. </template>
  148. </el-table-column>
  149. <el-table-column
  150. align="left"
  151. label="汇总操作人"
  152. prop="summaryBy"
  153. min-width="300"
  154. show-overflow-tooltip
  155. ></el-table-column>
  156. <el-table-column
  157. align="left"
  158. label="汇总时间"
  159. prop="summaryTime"
  160. min-width="180"
  161. show-overflow-tooltip
  162. ></el-table-column>
  163. <el-table-column
  164. align="left"
  165. label="发放操作人"
  166. prop="issueBy"
  167. min-width="300"
  168. show-overflow-tooltip
  169. ></el-table-column>
  170. <el-table-column
  171. align="left"
  172. label="发放时间"
  173. prop="issueTime"
  174. min-width="180"
  175. show-overflow-tooltip
  176. ></el-table-column>
  177. </el-table>
  178. </div>
  179. <!-- 分页 -->
  180. <div class="fr">
  181. <el-pagination
  182. @size-change="handleSizeChange"
  183. @current-change="handleCurrentChange"
  184. :current-page="currentPage"
  185. :page-sizes="[10, 20, 30, 50]"
  186. :page-size="pageSize"
  187. layout="total, sizes, prev, pager, next, jumper"
  188. :total="listTotal"
  189. >
  190. </el-pagination>
  191. </div>
  192. </div>
  193. </div>
  194. <!-- 结算网点汇总列表 -->
  195. <div v-show="!showDetailed">
  196. <el-page-header @back="goBack" content="结算网点汇总"></el-page-header>
  197. <br /><br />
  198. <!-- 按钮 -->
  199. <div class="btn-group clearfix">
  200. <div class="fl">
  201. <el-button type="primary" size="mini" :disabled="selectList.length < 1" @click="networkGrant('')"
  202. >批量发放</el-button
  203. >
  204. <el-button type="primary" size="mini" @click="searchResFn">查询转账结果</el-button>
  205. <!-- <el-button type="danger" size="mini">批量驳回</el-button> -->
  206. <!-- <el-button type="primary" size="mini" @click="showDialog">发放(测试)</el-button>
  207. <el-button type="primary" size="mini" @click="masterDetailedFn">查看明细(测试)</el-button> -->
  208. </div>
  209. </div>
  210. <!-- 列表 -->
  211. <div class="mymain-container">
  212. <div class="table">
  213. <el-table
  214. @selection-change="selectionChangeFn"
  215. v-loading="listLoading"
  216. :data="websiteList"
  217. element-loading-text="Loading"
  218. border
  219. fit
  220. highlight-current-row
  221. stripe
  222. >
  223. <el-table-column align="center" type="selection" width="55" />
  224. <el-table-column align="center" label="操作" fixed min-width="200">
  225. <template slot-scope="scope">
  226. <el-button type="text" @click="masterDetailedFn(scope.row.summaryBatchNo, scope.row.summaryNumber)"
  227. >查看明细</el-button
  228. >
  229. <el-button
  230. v-if="scope.row.issueStatus == 1 || scope.row.issueStatus == 4"
  231. type="text"
  232. @click="networkGrant(scope.row.summaryNumber)"
  233. >发放</el-button
  234. >
  235. </template>
  236. </el-table-column>
  237. <el-table-column
  238. align="left"
  239. label="结算单位"
  240. prop="summaryName"
  241. min-width="280"
  242. show-overflow-tooltip
  243. ></el-table-column>
  244. <el-table-column align="left" label="状态" prop="issueStatus" min-width="100" show-overflow-tooltip>
  245. <template slot-scope="scope">
  246. <el-tag size="mini" v-show="scope.row.issueStatus == 1" type="">待发放 </el-tag>
  247. <el-tag size="mini" v-show="scope.row.issueStatus == 2" type="success">已发放</el-tag>
  248. <el-tag size="mini" v-show="scope.row.issueStatus == 3" type="info">银行受理中</el-tag>
  249. <el-tag size="mini" v-show="scope.row.issueStatus == 4" type="danger">失败</el-tag>
  250. </template>
  251. </el-table-column>
  252. <el-table-column
  253. align="left"
  254. label="汇总月份"
  255. prop="summaryMonth"
  256. min-width="100"
  257. show-overflow-tooltip
  258. ></el-table-column>
  259. <el-table-column
  260. align="left"
  261. label="结算人数"
  262. prop="summaryPersonCount"
  263. min-width="100"
  264. show-overflow-tooltip
  265. ></el-table-column>
  266. <el-table-column
  267. align="left"
  268. label="结算工单数量(单)"
  269. prop="summaryOrderCount"
  270. min-width="140"
  271. show-overflow-tooltip
  272. ></el-table-column>
  273. <el-table-column
  274. align="right"
  275. label="维修结算费用"
  276. prop="summaryCost"
  277. min-width="120"
  278. show-overflow-tooltip
  279. >
  280. <template slot-scope="scope">
  281. {{ scope.row.summaryCost | numToFixed }}
  282. </template>
  283. </el-table-column>
  284. <el-table-column
  285. align="right"
  286. label="工伤、残保费用"
  287. prop="empCost"
  288. min-width="140"
  289. show-overflow-tooltip
  290. >
  291. <template slot-scope="scope">
  292. {{ scope.row.empCost | numToFixed }}
  293. </template>
  294. </el-table-column>
  295. <el-table-column align="right" label="暂扣款" prop="withholdCost" min-width="100" show-overflow-tooltip>
  296. <template slot-scope="scope">
  297. {{ scope.row.withholdCost | numToFixed }}
  298. </template>
  299. </el-table-column>
  300. <el-table-column align="right" label="增减费用" prop="decrCost" min-width="100" show-overflow-tooltip>
  301. <template slot-scope="scope">
  302. {{ scope.row.decrCost | numToFixed }}
  303. </template>
  304. </el-table-column>
  305. <el-table-column align="right" label="需扣回费用" prop="reduceCost" min-width="100" show-overflow-tooltip>
  306. <template slot-scope="scope">
  307. {{ scope.row.reduceCost | numToFixed }}
  308. </template>
  309. </el-table-column>
  310. <el-table-column align="right" label="个税" prop="incomeCost" min-width="100" show-overflow-tooltip>
  311. <template slot-scope="scope">
  312. {{ scope.row.incomeCost | numToFixed }}
  313. </template>
  314. </el-table-column>
  315. <el-table-column align="right" label="应发" prop="issueCost" min-width="100" show-overflow-tooltip>
  316. <template slot-scope="scope">
  317. {{ scope.row.issueCost | numToFixed }}
  318. </template>
  319. </el-table-column>
  320. <el-table-column
  321. align="left"
  322. label="发放人"
  323. prop="issueBy"
  324. min-width="100"
  325. show-overflow-tooltip
  326. ></el-table-column>
  327. <el-table-column
  328. align="left"
  329. label="发放时间"
  330. prop="issueTime"
  331. min-width="180"
  332. show-overflow-tooltip
  333. ></el-table-column>
  334. </el-table>
  335. </div>
  336. </div>
  337. </div>
  338. <!-- 弹窗 -->
  339. <el-dialog
  340. title="月度汇总"
  341. :visible.sync="dialogForm"
  342. width="30%"
  343. :show-close="false"
  344. :close-on-click-modal="false"
  345. >
  346. <el-form ref="stateForm" :rules="rules" :model="stateForm" label-width="100px">
  347. <el-form-item label="发放的月份" prop="time">
  348. <el-input disabled v-model="stateForm.time" placeholder="请输入"></el-input>
  349. </el-form-item>
  350. </el-form>
  351. <div slot="footer" class="dialog-footer">
  352. <el-button @click="cancelFn">取消</el-button>
  353. <el-button type="primary" @click="confirmFn">确定</el-button>
  354. </div>
  355. </el-dialog>
  356. </div>
  357. <FinancialSummaryMonthDetail
  358. @updateList="updateList"
  359. :masterNumber="masterNumber"
  360. :summaryNumber="summaryNumber"
  361. v-if="masterDetail"
  362. />
  363. </div>
  364. </template>
  365. <script>
  366. import { getBankExcute } from '@/api/dailySettlement/financialSummaryDay'
  367. import {
  368. getList,
  369. getMonthDo,
  370. getWebsiteList,
  371. getMonthIssue,
  372. getMonthRedo
  373. } from '@/api/dailySettlement/financialSummaryMonth'
  374. import FinancialSummaryMonthDetail from '../components/financialSummaryMonthDetail'
  375. export default {
  376. components: {
  377. FinancialSummaryMonthDetail
  378. },
  379. data() {
  380. return {
  381. searchForm: {
  382. summaryBatchNo: '',
  383. summary: '',
  384. issue: '',
  385. status: ''
  386. },
  387. currentPage: 1, // 当前页码
  388. pageSize: 10, // 每页数量
  389. listTotal: 0, // 列表总数
  390. dataList: [], // 列表数据
  391. websiteList: [], // 月度汇总列表数据
  392. listLoading: false, // 列表加载loading
  393. showDetailed: true,
  394. masterDetail: false, //师傅汇总页面
  395. dialogForm: false,
  396. rules: {},
  397. stateForm: {
  398. time: ''
  399. },
  400. summaryBatchNoDetail: '',
  401. masterNumber: '',
  402. summaryNumber: '',
  403. selectList: [],
  404. batchNo: ''
  405. }
  406. },
  407. created() {
  408. this.getDataList()
  409. },
  410. methods: {
  411. //子传父更新列表
  412. updateList() {
  413. this.getWebsiteListFn()
  414. },
  415. //查询转账结果
  416. async searchResFn() {
  417. await getBankExcute()
  418. this.getWebsiteListFn()
  419. this.$message.success('查询成功')
  420. },
  421. //结算网点发放
  422. async networkGrant(value) {
  423. if (value == '') {
  424. let res = this.selectList.toString()
  425. await getMonthIssue({
  426. summaryMonthBatchNo: this.summaryBatchNoDetail,
  427. summaryNumberList: res
  428. })
  429. this.selectList = []
  430. } else {
  431. await getMonthIssue({
  432. summaryMonthBatchNo: this.summaryBatchNoDetail,
  433. summaryNumberList: value
  434. })
  435. }
  436. this.getWebsiteListFn()
  437. this.$message.success('发放成功,请稍后刷新查看结果')
  438. },
  439. //列表选择框
  440. selectionChangeFn(value) {
  441. const res = value.map(v => v.summaryNumber)
  442. this.selectList = res
  443. },
  444. //发放
  445. async grantFn(value) {
  446. let params = {
  447. summaryMonthBatchNo: value
  448. }
  449. await getMonthIssue(params)
  450. this.$message.success('发放成功,请稍后刷新查看结果')
  451. },
  452. //清除
  453. async emptyFn() {
  454. await this.$refs.searchForm.resetFields()
  455. },
  456. //搜索
  457. searchFn() {
  458. this.getDataList()
  459. },
  460. // 更改每页数量
  461. handleSizeChange(val) {
  462. this.pageSize = val
  463. this.currentPage = 1
  464. this.getDataList()
  465. },
  466. // 更改当前页
  467. handleCurrentChange(val) {
  468. this.currentPage = val
  469. this.getDataList()
  470. },
  471. //月度汇总
  472. async monthDoFn() {
  473. await getMonthDo()
  474. this.getDataList()
  475. this.$message.success('汇总成功')
  476. },
  477. //获取月度汇总列表数据
  478. async getWebsiteListFn() {
  479. let params = {
  480. summaryBatchNo: this.summaryBatchNoDetail
  481. }
  482. let res = await getWebsiteList(params)
  483. this.websiteList = res.data
  484. },
  485. //获取列表数据
  486. async getDataList() {
  487. let params = {
  488. pageSize: this.pageSize,
  489. pageNo: this.currentPage,
  490. issueEndTime: this.searchForm.issue[1],
  491. issueStartTime: this.searchForm.issue[0],
  492. summaryBatchNo: this.searchForm.summaryBatchNo,
  493. summaryEndTime: this.searchForm.summary[1],
  494. summaryStartTime: this.searchForm.summary[0],
  495. status: this.searchForm.status
  496. }
  497. let res = await getList(params)
  498. this.dataList = res.data.records
  499. this.listTotal = res.data.total
  500. },
  501. //师傅汇总明细
  502. masterDetailedFn(summaryBatchNo, summaryNumber) {
  503. this.masterNumber = summaryBatchNo
  504. this.summaryNumber = summaryNumber
  505. this.masterDetail = true
  506. },
  507. //返回
  508. goBack() {
  509. this.showDetailed = true
  510. this.getDataList()
  511. },
  512. //取消
  513. cancelFn() {
  514. this.dialogForm = false
  515. },
  516. //确定
  517. async confirmFn() {
  518. await getMonthRedo({
  519. summaryMonthBatchNo: this.batchNo
  520. })
  521. this.getDataList()
  522. this.$message.success('重新汇总成功')
  523. this.dialogForm = false
  524. },
  525. //新增
  526. showDialog(value) {
  527. this.batchNo = value
  528. let date = new Date()
  529. let month = date.getMonth() + 1
  530. let year = date.getFullYear()
  531. this.stateForm.time = year + '-' + month
  532. this.dialogForm = true
  533. },
  534. //明细页面
  535. detailedFn(summaryBatchNo) {
  536. this.summaryBatchNoDetail = summaryBatchNo
  537. this.getWebsiteListFn()
  538. this.showDetailed = false
  539. }
  540. }
  541. }
  542. </script>
  543. <style lang="scss" scoped>
  544. ::v-deep .el-dialog__body {
  545. overflow-y: auto;
  546. }
  547. </style>