financialSummaryMonthDetail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. <template>
  2. <div>
  3. <div v-if="showDetail">
  4. <el-page-header @back="goBack" content="师傅汇总"></el-page-header>
  5. <br /><br />
  6. <!-- 筛选条件 -->
  7. <div>
  8. <el-form ref="searchForm" :model="searchForm" label-width="130px" size="mini" label-position="left">
  9. <el-row :gutter="20">
  10. <el-col :xs="24" :sm="12" :lg="6">
  11. <el-form-item label="时间:" prop="month">
  12. <el-date-picker
  13. style="width: 100%"
  14. v-model="searchForm.month"
  15. type="month"
  16. value-format="yyyyMM"
  17. placeholder="选择月"
  18. >
  19. </el-date-picker>
  20. </el-form-item>
  21. </el-col>
  22. <el-col :xs="24" :sm="12" :lg="6">
  23. <el-form-item label="状态:" prop="status">
  24. <el-select style="width: 100%" v-model="searchForm.status" placeholder="请选择">
  25. <el-option value="1" label="未发放"></el-option>
  26. <el-option value="2" label="已发放"></el-option>
  27. <el-option value="3" label="银行处理中"></el-option>
  28. </el-select>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :xs="24" :sm="12" :lg="6">
  32. <el-form-item label="所属网点:" prop="websiteNumber">
  33. <el-input v-model="searchForm.websiteNumber" placeholder="请输入"></el-input>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :xs="24" :sm="12" :lg="6">
  37. <el-form-item label="服务人员:" prop="serviceName">
  38. <el-input v-model="searchForm.serviceName" placeholder="请输入"></el-input>
  39. </el-form-item>
  40. </el-col>
  41. <el-col :xs="24" :sm="12" :lg="6">
  42. <el-form-item label="身份证号码:" prop="idCard">
  43. <el-input v-model="searchForm.idCard" placeholder="请输入"></el-input>
  44. </el-form-item>
  45. </el-col>
  46. <el-col :xs="24" :sm="12" :lg="6">
  47. <el-form-item label="手机号:" prop="mobile">
  48. <el-input v-model="searchForm.mobile" placeholder="请输入"></el-input>
  49. </el-form-item>
  50. </el-col>
  51. <el-col :xs="24" :sm="24" :lg="12">
  52. <el-form-item label="" class="fr">
  53. <el-button size="mini" @click="emptyFn">清空</el-button>
  54. <el-button size="mini" type="primary" @click="searchFn">搜索</el-button>
  55. </el-form-item>
  56. </el-col>
  57. </el-row>
  58. </el-form>
  59. </div>
  60. <!-- 按钮 -->
  61. <div class="btn-group clearfix">
  62. <div class="fl">
  63. <el-button size="mini" type="primary" @click="calculateMonthFn">月度计算费用</el-button>
  64. <!-- <el-button size="mini" type="primary" @click="showDetailFn">查看明细(测试)</el-button> -->
  65. </div>
  66. <div class="fr">
  67. <el-button type="primary" size="mini" @click="exportFn">导出数据</el-button>
  68. <!-- <el-button type="primary" size="mini" @click="">导入数据</el-button> -->
  69. <el-upload
  70. style="display: inline-block; margin-left: 10px"
  71. class="import-btn"
  72. action=""
  73. :http-request="handleImport"
  74. :file-list="importFileList"
  75. :show-file-list="false"
  76. >
  77. <el-button type="primary" size="mini">导入</el-button>
  78. </el-upload>
  79. </div>
  80. </div>
  81. <span style="color: orange; line-height: 30px"
  82. >注:月结算费用时,先导出数据给人力资源公司计算个税、其他费用等,再导入数据,再操作月度计算费用按钮进行费用结算!</span
  83. >
  84. <!-- 列表 -->
  85. <div class="mymain-container">
  86. <div class="table">
  87. <el-table
  88. v-loading="listLoading"
  89. :data="dataList"
  90. element-loading-text="Loading"
  91. border
  92. fit
  93. highlight-current-row
  94. stripe
  95. >
  96. <el-table-column align="center" label="操作" fixed width="100">
  97. <template slot-scope="scope">
  98. <el-button type="text" @click="showDetailFn(scope.row)">查看明细</el-button>
  99. </template>
  100. </el-table-column>
  101. <el-table-column
  102. align="left"
  103. label="工资条编号"
  104. prop="salaryNo"
  105. min-width="160"
  106. show-overflow-tooltip
  107. ></el-table-column>
  108. <el-table-column
  109. align="left"
  110. label="汇总月份"
  111. prop="month"
  112. min-width="100"
  113. show-overflow-tooltip
  114. ></el-table-column>
  115. <el-table-column align="left" label="状态" prop="status" min-width="100" show-overflow-tooltip>
  116. <template slot-scope="scope">
  117. <el-tag size="mini" v-show="scope.row.status == 1" type="success">待发放</el-tag>
  118. <el-tag size="mini" v-show="scope.row.status == 2" type="danger">已发放</el-tag>
  119. <el-tag size="mini" v-show="scope.row.status == 3" type="">银行受理中</el-tag>
  120. </template>
  121. </el-table-column>
  122. <el-table-column align="left" label="所属网点" prop="belongWebsite" min-width="350" show-overflow-tooltip>
  123. <template slot-scope="scope">
  124. {{ '(' + scope.row.websitNumber + ')' + scope.row.websitName }}
  125. </template>
  126. </el-table-column>
  127. <el-table-column
  128. align="left"
  129. label="服务人员"
  130. prop="serviceName"
  131. min-width="140"
  132. show-overflow-tooltip
  133. ></el-table-column>
  134. <el-table-column
  135. align="left"
  136. label="身份证"
  137. prop="idCard"
  138. min-width="180"
  139. show-overflow-tooltip
  140. ></el-table-column>
  141. <el-table-column
  142. align="left"
  143. label="手机号"
  144. prop="mobile"
  145. min-width="160"
  146. show-overflow-tooltip
  147. ></el-table-column>
  148. <el-table-column
  149. align="right"
  150. label="维修结算费用总额"
  151. prop="repairTotalAmount"
  152. min-width="160"
  153. show-overflow-tooltip
  154. >
  155. <template slot-scope="scope">
  156. {{ scope.row.repairTotalAmount | numToFixed }}
  157. </template>
  158. </el-table-column>
  159. <el-table-column
  160. align="right"
  161. label="需扣回费用"
  162. prop="shouldReduceCost"
  163. min-width="160"
  164. show-overflow-tooltip
  165. >
  166. <template slot-scope="scope">
  167. {{ scope.row.shouldReduceCost | numToFixed }}
  168. </template>
  169. </el-table-column>
  170. <el-table-column align="right" label="增减费用" prop="incrDecrCost" min-width="160" show-overflow-tooltip>
  171. <template slot-scope="scope">
  172. {{ scope.row.incrDecrCost | numToFixed }}
  173. </template>
  174. </el-table-column>
  175. <el-table-column
  176. align="right"
  177. label="月度计税费用总额"
  178. prop="taxToatalCost"
  179. min-width="160"
  180. show-overflow-tooltip
  181. >
  182. <template slot-scope="scope">
  183. {{ scope.row.taxToatalCost | numToFixed }}
  184. </template>
  185. </el-table-column>
  186. <el-table-column align="center" label="人力资源公司填写" prop="" min-width="100" show-overflow-tooltip>
  187. <el-table-column
  188. align="right"
  189. label="工伤保险"
  190. prop="shouldEmpInsuranceCost"
  191. min-width="100"
  192. show-overflow-tooltip
  193. >
  194. <template slot-scope="scope">
  195. {{ scope.row.shouldEmpInsuranceCost | numToFixed }}
  196. </template>
  197. </el-table-column>
  198. <el-table-column
  199. align="right"
  200. label="残保金"
  201. prop="shouldResidualInsuranceCost"
  202. min-width="100"
  203. show-overflow-tooltip
  204. >
  205. <template slot-scope="scope">
  206. {{ scope.row.shouldResidualInsuranceCost | numToFixed }}
  207. </template>
  208. </el-table-column>
  209. <el-table-column align="right" label="服务费用" prop="serviceCost" min-width="100" show-overflow-tooltip>
  210. <template slot-scope="scope">
  211. {{ scope.row.serviceCost | numToFixed }}
  212. </template>
  213. </el-table-column>
  214. <el-table-column align="right" label="个税金额" prop="incomeCost" min-width="100" show-overflow-tooltip>
  215. <template slot-scope="scope">
  216. {{ scope.row.incomeCost | numToFixed }}
  217. </template>
  218. </el-table-column>
  219. </el-table-column>
  220. <el-table-column align="right" label="应发工资总额" prop="issueCost" min-width="120" show-overflow-tooltip>
  221. <template slot-scope="scope">
  222. {{ scope.row.issueCost | numToFixed }}
  223. </template>
  224. </el-table-column>
  225. <el-table-column
  226. align="right"
  227. label="日结累计已发"
  228. prop="dailySendCost"
  229. min-width="120"
  230. show-overflow-tooltip
  231. >
  232. <template slot-scope="scope">
  233. {{ scope.row.dailySendCost | numToFixed }}
  234. </template>
  235. </el-table-column>
  236. <el-table-column
  237. align="right"
  238. label="月度实发工资"
  239. prop="monthSendCost"
  240. min-width="120"
  241. show-overflow-tooltip
  242. >
  243. <template slot-scope="scope">
  244. {{ scope.row.monthSendCost | numToFixed }}
  245. </template>
  246. </el-table-column>
  247. <el-table-column align="center" label="每期扣费展示" prop="" min-width="120" show-overflow-tooltip>
  248. <el-table-column
  249. align="right"
  250. label="工伤保险已扣"
  251. prop="empInsuranceCost"
  252. min-width="120"
  253. show-overflow-tooltip
  254. >
  255. <template slot-scope="scope">
  256. {{ scope.row.empInsuranceCost | numToFixed }}
  257. </template>
  258. </el-table-column>
  259. <el-table-column
  260. align="right"
  261. label="残保金已扣"
  262. prop="residualInsuranceCost"
  263. min-width="120"
  264. show-overflow-tooltip
  265. >
  266. <template slot-scope="scope">
  267. {{ scope.row.residualInsuranceCost | numToFixed }}
  268. </template>
  269. </el-table-column>
  270. <el-table-column
  271. align="right"
  272. label="暂扣费用累计"
  273. prop="withholdTotalCost"
  274. min-width="120"
  275. show-overflow-tooltip
  276. >
  277. <template slot-scope="scope">
  278. {{ scope.row.withholdTotalCost | numToFixed }}
  279. </template>
  280. </el-table-column>
  281. </el-table-column>
  282. <el-table-column align="left" label="备注" prop="remark" min-width="200" show-overflow-tooltip>
  283. </el-table-column>
  284. </el-table>
  285. </div>
  286. <!-- 分页 -->
  287. <div class="fr">
  288. <el-pagination
  289. @size-change="handleSizeChange"
  290. @current-change="handleCurrentChange"
  291. :current-page="currentPage"
  292. :page-sizes="[10, 20, 30, 50]"
  293. :page-size="pageSize"
  294. layout="total, sizes, prev, pager, next, jumper"
  295. :total="listTotal"
  296. >
  297. </el-pagination>
  298. </div>
  299. </div>
  300. </div>
  301. <ComponentDetailList
  302. @exportDetailFn="exportDetailFn"
  303. @detailFn="detailFn"
  304. :detailList="detailList"
  305. :detailTotal="detailTotal"
  306. v-else
  307. />
  308. </div>
  309. </template>
  310. <script>
  311. import { getWorkerList, getMonthDetailList, getMonthSalaryCalculate } from '@/api/dailySettlement/financialSummaryMonth'
  312. import { handleImport, downloadFiles } from '@/utils/util'
  313. import ComponentDetailList from './componentDetailList'
  314. export default {
  315. components: {
  316. ComponentDetailList
  317. },
  318. props: {
  319. summaryNumber: {
  320. type: String,
  321. required: true
  322. },
  323. masterNumber: {
  324. type: String,
  325. required: true
  326. }
  327. },
  328. data() {
  329. return {
  330. importFileList: [],
  331. searchForm: {
  332. idCard: '',
  333. mobile: '',
  334. month: '',
  335. serviceName: '',
  336. status: '',
  337. summaryBatchNo: '',
  338. summaryCommpany: '',
  339. websiteNumber: ''
  340. },
  341. currentPage: 1, // 当前页码
  342. pageSize: 10, // 每页数量
  343. listTotal: 0, // 列表总数
  344. dataList: [], // 列表数据
  345. listLoading: false, // 列表加载loading
  346. showDetail: true,
  347. detailList: {},
  348. detailTotal: '',
  349. detailData: {}
  350. }
  351. },
  352. created() {
  353. this.getDataList()
  354. },
  355. methods: {
  356. // 更改每页数量
  357. handleSizeChange(val) {
  358. this.pageSize = val
  359. this.getDataList()
  360. },
  361. // 更改当前页
  362. handleCurrentChange(val) {
  363. this.currentPage = val
  364. this.getDataList()
  365. },
  366. //详情导出
  367. exportDetailFn(value) {
  368. let params = {
  369. ...this.detailData,
  370. ...value
  371. }
  372. downloadFiles('daily/summary/month/detail/export', params)
  373. },
  374. //清除
  375. async emptyFn() {
  376. await this.$refs.searchForm.resetFields()
  377. },
  378. //搜索
  379. searchFn() {
  380. this.getDataList()
  381. },
  382. //子传父事件
  383. async detailFn(value) {
  384. let params = {
  385. ...value,
  386. ...this.detailData
  387. }
  388. let res = await getMonthDetailList(params)
  389. this.detailList = res.data
  390. this.detailTotal = res.data.total
  391. this.showDetail = false
  392. },
  393. // 导入
  394. async handleImport(param) {
  395. const file = param.file
  396. const formData = new FormData()
  397. formData.append('file', file)
  398. let result = await handleImport('daily/summary/month/salary/import', formData)
  399. // console.log(result, 123132);
  400. this.importFileList = []
  401. if (result.code == 1) {
  402. this.$message.success('导入成功')
  403. this.getDataList()
  404. } else {
  405. this.$message.error(result.message)
  406. // this.$message.error(1231);
  407. }
  408. },
  409. //导出
  410. exportFn() {
  411. let params = {
  412. pageSize: this.pageSize,
  413. pageNo: this.currentPage,
  414. summaryBatchNo: this.masterNumber,
  415. summaryNumber: this.summaryNumber,
  416. idCard: this.searchForm.idCard,
  417. mobile: this.searchForm.mobile,
  418. month: this.searchForm.month,
  419. serviceName: this.searchForm.serviceName,
  420. status: this.searchForm.status,
  421. websiteName: this.searchForm.websiteNumber
  422. }
  423. downloadFiles('daily/summary/month/salary/export', params)
  424. },
  425. //月度计算
  426. async calculateMonthFn() {
  427. let params = {
  428. summaryMonthBatchNo: this.masterNumber,
  429. summaryNumber: this.summaryNumber
  430. }
  431. await getMonthSalaryCalculate(params)
  432. this.getDataList()
  433. this.$message.success('月度计算成功')
  434. },
  435. //获取列表数据
  436. async getDataList() {
  437. let params = {
  438. pageSize: this.pageSize,
  439. pageNo: this.currentPage,
  440. summaryBatchNo: this.masterNumber,
  441. summaryNumber: this.summaryNumber,
  442. idCard: this.searchForm.idCard,
  443. mobile: this.searchForm.mobile,
  444. serviceName: this.searchForm.serviceName,
  445. status: this.searchForm.status,
  446. websiteNumber: this.searchForm.websiteNumber,
  447. month: this.searchForm.month
  448. }
  449. let res = await getWorkerList(params)
  450. this.listTotal = res.data.total
  451. this.dataList = res.data.records
  452. },
  453. //师傅汇总详情
  454. async showDetailFn(value) {
  455. this.detailData = {
  456. serviceNumber: value.serviceNumber,
  457. summaryMonthBatchNo: value.summaryBatchNo,
  458. summaryNumber: value.summaryNumber
  459. }
  460. let params = {
  461. pageSize: 10,
  462. pageNo: 1,
  463. serviceNumber: value.serviceNumber,
  464. summaryMonthBatchNo: value.summaryBatchNo,
  465. summaryNumber: value.summaryNumber
  466. }
  467. let res = await getMonthDetailList(params)
  468. this.detailList = res.data
  469. this.detailTotal = res.data.total
  470. this.showDetail = false
  471. },
  472. //返回
  473. goBack() {
  474. this.$parent.masterDetail = false
  475. this.$emit('updateList')
  476. }
  477. }
  478. }
  479. </script>
  480. <style></style>