Commit 8f708d19678e8bdebe9836d0f03fbf6a8f85b7cf
Merge branch 'master' of http://39.98.150.180/antissoft/lvqianmeiye_ERP
Showing
2 changed files
with
46 additions
and
2 deletions
antis-ncc-admin/src/views/lqKhxx/index.vue
| @@ -106,7 +106,8 @@ | @@ -106,7 +106,8 @@ | ||
| 106 | <div class="NCC-common-head"> | 106 | <div class="NCC-common-head"> |
| 107 | <div> | 107 | <div> |
| 108 | <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | 108 | <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> |
| 109 | - <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | 109 | + <!-- <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> --> |
| 110 | + <el-button type="text" icon="el-icon-download" :loading="exportLoading" @click="exportMemberItems()">导出</el-button> | ||
| 110 | <el-button v-has="'btn_remove'" type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | 111 | <el-button v-has="'btn_remove'" type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> |
| 111 | </div> | 112 | </div> |
| 112 | <div class="NCC-common-head-right"> | 113 | <div class="NCC-common-head-right"> |
| @@ -401,6 +402,7 @@ export default { | @@ -401,6 +402,7 @@ export default { | ||
| 401 | }, | 402 | }, |
| 402 | list: [], | 403 | list: [], |
| 403 | listLoading: true, | 404 | listLoading: true, |
| 405 | + exportLoading: false, | ||
| 404 | multipleSelection: [], total: 0, | 406 | multipleSelection: [], total: 0, |
| 405 | listQuery: { | 407 | listQuery: { |
| 406 | currentPage: 1, | 408 | currentPage: 1, |
| @@ -635,6 +637,45 @@ export default { | @@ -635,6 +637,45 @@ export default { | ||
| 635 | this.exportBoxVisible = false | 637 | this.exportBoxVisible = false |
| 636 | }) | 638 | }) |
| 637 | }, | 639 | }, |
| 640 | + // 导出会员品项 | ||
| 641 | + exportMemberItems() { | ||
| 642 | + let query = { ...this.listQuery, ...this.query } | ||
| 643 | + // 处理数组参数 | ||
| 644 | + let exportQuery = {} | ||
| 645 | + for (let key in query) { | ||
| 646 | + if (Array.isArray(query[key])) { | ||
| 647 | + exportQuery[key] = query[key].join() | ||
| 648 | + } else { | ||
| 649 | + exportQuery[key] = query[key] | ||
| 650 | + } | ||
| 651 | + } | ||
| 652 | + // 显示加载状态 | ||
| 653 | + this.exportLoading = true | ||
| 654 | + const loading = this.$loading({ | ||
| 655 | + lock: true, | ||
| 656 | + text: '正在导出数据,请稍候...', | ||
| 657 | + spinner: 'el-icon-loading', | ||
| 658 | + background: 'rgba(0, 0, 0, 0.7)' | ||
| 659 | + }) | ||
| 660 | + request({ | ||
| 661 | + url: `/api/Extend/LqKhxx/Actions/ExportOptimized`, | ||
| 662 | + method: 'GET', | ||
| 663 | + data: exportQuery | ||
| 664 | + }).then(res => { | ||
| 665 | + loading.close() | ||
| 666 | + this.exportLoading = false | ||
| 667 | + if (!res.data.url) { | ||
| 668 | + this.$message.warning('导出失败,没有可导出的数据') | ||
| 669 | + return | ||
| 670 | + } | ||
| 671 | + window.location.href = this.define.comUrl + res.data.url | ||
| 672 | + this.$message.success('导出成功') | ||
| 673 | + }).catch(err => { | ||
| 674 | + loading.close() | ||
| 675 | + this.exportLoading = false | ||
| 676 | + this.$message.error('导出失败:' + (err.msg || err.message || '未知错误')) | ||
| 677 | + }) | ||
| 678 | + }, | ||
| 638 | search() { | 679 | search() { |
| 639 | this.listQuery = { | 680 | this.listQuery = { |
| 640 | currentPage: 1, | 681 | currentPage: 1, |
绿纤html/dailyReportnew.html
| @@ -723,7 +723,7 @@ | @@ -723,7 +723,7 @@ | ||
| 723 | <thead> | 723 | <thead> |
| 724 | <tr> | 724 | <tr> |
| 725 | <th>门店</th> | 725 | <th>门店</th> |
| 726 | - <!-- <th>员工</th> --> | 726 | + <th>员工数</th> |
| 727 | <th>人头</th> | 727 | <th>人头</th> |
| 728 | <th>人次</th> | 728 | <th>人次</th> |
| 729 | <th>项目</th> | 729 | <th>项目</th> |
| @@ -1337,6 +1337,7 @@ | @@ -1337,6 +1337,7 @@ | ||
| 1337 | // <td>${store.ProjectCount || 0}</td> | 1337 | // <td>${store.ProjectCount || 0}</td> |
| 1338 | row.innerHTML = ` | 1338 | row.innerHTML = ` |
| 1339 | <td>${store.StoreName}</td> | 1339 | <td>${store.StoreName}</td> |
| 1340 | + <td>${store.EmployeeCount}</td> | ||
| 1340 | <td>${store.HeadCount || 0}</td> | 1341 | <td>${store.HeadCount || 0}</td> |
| 1341 | <td>${store.PersonCount || 0}</td> | 1342 | <td>${store.PersonCount || 0}</td> |
| 1342 | <td>${store.TotalProjectCount || 0}</td> | 1343 | <td>${store.TotalProjectCount || 0}</td> |
| @@ -1357,6 +1358,7 @@ | @@ -1357,6 +1358,7 @@ | ||
| 1357 | totalRow.className = 'total-row'; | 1358 | totalRow.className = 'total-row'; |
| 1358 | totalRow.innerHTML = ` | 1359 | totalRow.innerHTML = ` |
| 1359 | <td>总计</td> | 1360 | <td>总计</td> |
| 1361 | + <td>${totalEmployeeCount}</td> | ||
| 1360 | <td>${totalHeadCount}</td> | 1362 | <td>${totalHeadCount}</td> |
| 1361 | <td>${totalPersonCount}</td> | 1363 | <td>${totalPersonCount}</td> |
| 1362 | <td>${totalProjectCount}</td> | 1364 | <td>${totalProjectCount}</td> |
| @@ -1370,6 +1372,7 @@ | @@ -1370,6 +1372,7 @@ | ||
| 1370 | const avgDivisor = data.length || 1; | 1372 | const avgDivisor = data.length || 1; |
| 1371 | averageRow.innerHTML = ` | 1373 | averageRow.innerHTML = ` |
| 1372 | <td>平均</td> | 1374 | <td>平均</td> |
| 1375 | + <td>${Math.round(totalEmployeeCount / avgDivisor)}</td> | ||
| 1373 | <td>${Math.round(totalHeadCount / avgDivisor)}</td> | 1376 | <td>${Math.round(totalHeadCount / avgDivisor)}</td> |
| 1374 | <td>${Math.round(totalPersonCount / avgDivisor)}</td> | 1377 | <td>${Math.round(totalPersonCount / avgDivisor)}</td> |
| 1375 | <td>${Math.round(totalProjectCount / avgDivisor)}</td> | 1378 | <td>${Math.round(totalProjectCount / avgDivisor)}</td> |