index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  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 align="left" label="结算单位" prop="summaryName" min-width="280" show-overflow-tooltip>
  238. <template slot-scope="scope">
  239. {{ '(' + scope.row.summaryNumber + ')' + scope.row.summaryName }}
  240. </template>
  241. </el-table-column>
  242. <el-table-column align="left" label="状态" prop="issueStatus" min-width="100" show-overflow-tooltip>
  243. <template slot-scope="scope">
  244. <el-tag size="mini" v-show="scope.row.issueStatus == 1" type="">待发放 </el-tag>
  245. <el-tag size="mini" v-show="scope.row.issueStatus == 2" type="success">已发放</el-tag>
  246. <el-tag size="mini" v-show="scope.row.issueStatus == 3" type="info">银行受理中</el-tag>
  247. <el-tag size="mini" v-show="scope.row.issueStatus == 4" type="danger">失败</el-tag>
  248. </template>
  249. </el-table-column>
  250. <el-table-column
  251. align="left"
  252. label="汇总月份"
  253. prop="summaryMonth"
  254. min-width="100"
  255. show-overflow-tooltip
  256. ></el-table-column>
  257. <el-table-column
  258. align="left"
  259. label="结算人数"
  260. prop="summaryPersonCount"
  261. min-width="100"
  262. show-overflow-tooltip
  263. ></el-table-column>
  264. <el-table-column
  265. align="left"
  266. label="结算工单数量(单)"
  267. prop="summaryOrderCount"
  268. min-width="140"
  269. show-overflow-tooltip
  270. ></el-table-column>
  271. <el-table-column
  272. align="right"
  273. label="维修结算费用"
  274. prop="summaryCost"
  275. min-width="120"
  276. show-overflow-tooltip
  277. >
  278. <template slot-scope="scope">
  279. {{ scope.row.summaryCost | numToFixed }}
  280. </template>
  281. </el-table-column>
  282. <el-table-column
  283. align="right"
  284. label="工伤、残保费用"
  285. prop="empCost"
  286. min-width="140"
  287. show-overflow-tooltip
  288. >
  289. <template slot-scope="scope">
  290. {{ scope.row.empCost | numToFixed }}
  291. </template>
  292. </el-table-column>
  293. <el-table-column align="right" label="暂扣款" prop="withholdCost" min-width="100" show-overflow-tooltip>
  294. <template slot-scope="scope">
  295. {{ scope.row.withholdCost | numToFixed }}
  296. </template>
  297. </el-table-column>
  298. <el-table-column align="right" label="增减费用" prop="decrCost" min-width="100" show-overflow-tooltip>
  299. <template slot-scope="scope">
  300. {{ scope.row.decrCost | numToFixed }}
  301. </template>
  302. </el-table-column>
  303. <el-table-column align="right" label="需扣回费用" prop="reduceCost" min-width="100" show-overflow-tooltip>
  304. <template slot-scope="scope">
  305. {{ scope.row.reduceCost | numToFixed }}
  306. </template>
  307. </el-table-column>
  308. <el-table-column align="right" label="个税" prop="incomeCost" min-width="100" show-overflow-tooltip>
  309. <template slot-scope="scope">
  310. {{ scope.row.incomeCost | numToFixed }}
  311. </template>
  312. </el-table-column>
  313. <el-table-column align="right" label="应发" prop="issueCost" min-width="100" show-overflow-tooltip>
  314. <template slot-scope="scope">
  315. {{ scope.row.issueCost | numToFixed }}
  316. </template>
  317. </el-table-column>
  318. <el-table-column
  319. align="left"
  320. label="发放人"
  321. prop="issueBy"
  322. min-width="100"
  323. show-overflow-tooltip
  324. ></el-table-column>
  325. <el-table-column
  326. align="left"
  327. label="发放时间"
  328. prop="issueTime"
  329. min-width="180"
  330. show-overflow-tooltip
  331. ></el-table-column>
  332. </el-table>
  333. </div>
  334. </div>
  335. </div>
  336. <!-- 弹窗 -->
  337. <el-dialog
  338. title="月度汇总"
  339. :visible.sync="dialogForm"
  340. width="30%"
  341. :show-close="false"
  342. :close-on-click-modal="false"
  343. >
  344. <el-form ref="stateForm" :rules="rules" :model="stateForm" label-width="100px">
  345. <el-form-item label="发放的月份" prop="time">
  346. <el-input disabled v-model="stateForm.time" placeholder="请输入"></el-input>
  347. </el-form-item>
  348. </el-form>
  349. <div slot="footer" class="dialog-footer">
  350. <el-button @click="cancelFn">取消</el-button>
  351. <el-button type="primary" @click="confirmFn">确定</el-button>
  352. </div>
  353. </el-dialog>
  354. </div>
  355. <FinancialSummaryMonthDetail
  356. @updateList="updateList"
  357. :masterNumber="masterNumber"
  358. :summaryNumber="summaryNumber"
  359. v-if="masterDetail"
  360. />
  361. </div>
  362. </template>
  363. <script>
  364. import { getBankExcute } from '@/api/dailySettlement/financialSummaryDay'
  365. import {
  366. getList,
  367. getMonthDo,
  368. getWebsiteList,
  369. getMonthIssue,
  370. getMonthRedo
  371. } from '@/api/dailySettlement/financialSummaryMonth'
  372. import FinancialSummaryMonthDetail from '../components/financialSummaryMonthDetail'
  373. export default {
  374. components: {
  375. FinancialSummaryMonthDetail
  376. },
  377. data() {
  378. return {
  379. searchForm: {
  380. summaryBatchNo: '',
  381. summary: '',
  382. issue: '',
  383. status: ''
  384. },
  385. currentPage: 1, // 当前页码
  386. pageSize: 10, // 每页数量
  387. listTotal: 0, // 列表总数
  388. dataList: [], // 列表数据
  389. websiteList: [], // 月度汇总列表数据
  390. listLoading: false, // 列表加载loading
  391. showDetailed: true,
  392. masterDetail: false, //师傅汇总页面
  393. dialogForm: false,
  394. rules: {},
  395. stateForm: {
  396. time: ''
  397. },
  398. summaryBatchNoDetail: '',
  399. masterNumber: '',
  400. summaryNumber: '',
  401. selectList: [],
  402. batchNo: ''
  403. }
  404. },
  405. created() {
  406. this.getDataList()
  407. },
  408. methods: {
  409. //子传父更新列表
  410. updateList() {
  411. this.getWebsiteListFn()
  412. },
  413. //查询转账结果
  414. async searchResFn() {
  415. await getBankExcute()
  416. this.getWebsiteListFn()
  417. this.$message.success('查询成功')
  418. },
  419. //结算网点发放
  420. async networkGrant(value) {
  421. if (value == '') {
  422. let res = this.selectList.toString()
  423. await getMonthIssue({
  424. summaryMonthBatchNo: this.summaryBatchNoDetail,
  425. summaryNumberList: res
  426. })
  427. this.selectList = []
  428. } else {
  429. await getMonthIssue({
  430. summaryMonthBatchNo: this.summaryBatchNoDetail,
  431. summaryNumberList: value
  432. })
  433. }
  434. this.getWebsiteListFn()
  435. this.$message.success('发放成功,请稍后刷新查看结果')
  436. },
  437. //列表选择框
  438. selectionChangeFn(value) {
  439. const res = value.map(v => v.summaryNumber)
  440. this.selectList = res
  441. },
  442. //发放
  443. async grantFn(value) {
  444. let params = {
  445. summaryMonthBatchNo: value
  446. }
  447. await getMonthIssue(params)
  448. this.$message.success('发放成功,请稍后刷新查看结果')
  449. },
  450. //清除
  451. async emptyFn() {
  452. await this.$refs.searchForm.resetFields()
  453. },
  454. //搜索
  455. searchFn() {
  456. this.getDataList()
  457. },
  458. // 更改每页数量
  459. handleSizeChange(val) {
  460. this.pageSize = val
  461. this.currentPage = 1
  462. this.getDataList()
  463. },
  464. // 更改当前页
  465. handleCurrentChange(val) {
  466. this.currentPage = val
  467. this.getDataList()
  468. },
  469. //月度汇总
  470. async monthDoFn() {
  471. await getMonthDo()
  472. this.getDataList()
  473. this.$message.success('汇总成功')
  474. },
  475. //获取月度汇总列表数据
  476. async getWebsiteListFn() {
  477. let params = {
  478. summaryBatchNo: this.summaryBatchNoDetail
  479. }
  480. let res = await getWebsiteList(params)
  481. this.websiteList = res.data
  482. },
  483. //获取列表数据
  484. async getDataList() {
  485. let params = {
  486. pageSize: this.pageSize,
  487. pageNo: this.currentPage,
  488. issueEndTime: this.searchForm.issue[1],
  489. issueStartTime: this.searchForm.issue[0],
  490. summaryBatchNo: this.searchForm.summaryBatchNo,
  491. summaryEndTime: this.searchForm.summary[1],
  492. summaryStartTime: this.searchForm.summary[0],
  493. status: this.searchForm.status
  494. }
  495. let res = await getList(params)
  496. this.dataList = res.data.records
  497. this.listTotal = res.data.total
  498. },
  499. //师傅汇总明细
  500. masterDetailedFn(summaryBatchNo, summaryNumber) {
  501. this.masterNumber = summaryBatchNo
  502. this.summaryNumber = summaryNumber
  503. this.masterDetail = true
  504. },
  505. //返回
  506. goBack() {
  507. this.showDetailed = true
  508. this.getDataList()
  509. },
  510. //取消
  511. cancelFn() {
  512. this.dialogForm = false
  513. },
  514. //确定
  515. async confirmFn() {
  516. await getMonthRedo({
  517. summaryMonthBatchNo: this.batchNo
  518. })
  519. this.getDataList()
  520. this.$message.success('重新汇总成功')
  521. this.dialogForm = false
  522. },
  523. //新增
  524. showDialog(value) {
  525. this.batchNo = value
  526. let date = new Date()
  527. let month = date.getMonth() + 1
  528. let year = date.getFullYear()
  529. this.stateForm.time = year + '-' + month
  530. this.dialogForm = true
  531. },
  532. //明细页面
  533. detailedFn(summaryBatchNo) {
  534. this.summaryBatchNoDetail = summaryBatchNo
  535. this.getWebsiteListFn()
  536. this.showDetailed = false
  537. }
  538. }
  539. }
  540. </script>
  541. <style lang="scss" scoped>
  542. ::v-deep .el-dialog__body {
  543. overflow-y: auto;
  544. }
  545. </style>