|
|
@@ -3,17 +3,17 @@
|
|
|
|
|
|
<!-- 查询和其他操作 -->
|
|
|
<div class="filter-container">
|
|
|
- <el-select v-model="listQuery.companyType" clearable placeholder="请选择公司主体" style="top: -4px;width: 200px;">
|
|
|
- <el-option :key="item.type" v-for="item in companyTypeList" :label="item.name" :value="item.type">
|
|
|
+ <el-select v-model="listQuery.companyId" clearable placeholder="请选择公司主体" style="top: -4px;width: 200px;">
|
|
|
+ <el-option :key="item.companyId" v-for="item in companyTypeList" :label="item.companyName" :value="item.companyId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <el-select v-model="listQuery.depType" clearable placeholder="请选择部门" style="top: -4px;width: 200px;">
|
|
|
- <el-option :key="item.type" v-for="item in depTypeList" :label="item.name" :value="item.type">
|
|
|
+ <el-select v-model="listQuery.deptId" clearable placeholder="请选择部门" style="top: -4px;width: 200px;">
|
|
|
+ <el-option :key="item.type" v-for="item in depTypeList" :label="item.deptName" :value="item.deptId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<el-input clearable class="filter-item" style="width: 200px;" placeholder="请输入员工姓名"
|
|
|
- v-model="listQuery.name"></el-input>
|
|
|
- <el-date-picker class="filter-item" v-model="listQuery.time" type="datetime" placeholder="选择生成时间">
|
|
|
+ v-model="listQuery.userName"></el-input>
|
|
|
+ <el-date-picker class="filter-item" value-format="yyyy-MM-dd" v-model="listQuery.createTime" type="date" placeholder="选择生成时间">
|
|
|
</el-date-picker>
|
|
|
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
|
|
|
<el-button class="filter-item" type="primary" :loading="downloadLoading" v-waves icon="el-icon-download" @click="handleDownload">导出</el-button>
|
|
|
@@ -26,17 +26,17 @@
|
|
|
<el-table-column type="index" label="序号" header-align="center" align="center">
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column align="center" min-width="100px" label="员工姓名" prop="name">
|
|
|
+ <el-table-column align="center" min-width="80px" label="员工姓名" prop="userName">
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column align="center" min-width="200px" label="公司主体" prop="companyName">
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column align="center" min-width="80px" label="部门" prop="depName">
|
|
|
+ <el-table-column align="center" min-width="200px" label="部门" prop="deptName">
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" min-width="80px" label="积分" prop="integral">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="操作" width="240px" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column align="center" label="操作" min-width="100px" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="primary" size="small" @click="handleView(scope.row, false)">查看</el-button>
|
|
|
</template>
|
|
|
@@ -58,11 +58,9 @@
|
|
|
<el-option :key="item.type" v-for="item in allTypeList" :label="item.name" :value="item.type">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <el-date-picker class="filter-item" v-model="itemListQuery.time" type="datetime" placeholder="选择生成时间">
|
|
|
- </el-date-picker>
|
|
|
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search"
|
|
|
@click="itemHandleFilter">查找</el-button>
|
|
|
- <el-button class="filter-item" type="primary" v-waves icon="el-icon-download">导出</el-button>
|
|
|
+ <el-button class="filter-item" type="primary" v-waves icon="el-icon-download" @click="handleItemDownload">导出</el-button>
|
|
|
|
|
|
</div>
|
|
|
<!-- 查询结果 -->
|
|
|
@@ -70,18 +68,13 @@
|
|
|
highlight-current-row>
|
|
|
<el-table-column type="index" label="序号" header-align="center" align="center">
|
|
|
</el-table-column>
|
|
|
-
|
|
|
- <el-table-column align="center" min-width="100px" label="员工姓名" prop="name">
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column align="center" min-width="200px" label="积分类型" prop="integralCategory">
|
|
|
+ <el-table-column align="center" min-width="100px" label="积分类型" prop="integralTypeName">
|
|
|
</el-table-column>
|
|
|
-
|
|
|
- <el-table-column align="center" min-width="80px" label="积分名称" prop="integralName">
|
|
|
+ <el-table-column align="center" min-width="200px" label="积分说明" prop="comment">
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" min-width="80px" label="积分" prop="integral">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" min-width="80px" label="生成时间" prop="time">
|
|
|
+ <el-table-column align="center" min-width="80px" label="生成时间" prop="createTime">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
@@ -126,102 +119,19 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
companyTypeList: [
|
|
|
- {
|
|
|
- type: 'highTechnology',
|
|
|
- name: '高科技'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'fastExtinction',
|
|
|
- name: '快销'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'manufacturingIndustry',
|
|
|
- name: '制造业'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'all',
|
|
|
- name: '全部'
|
|
|
- },
|
|
|
+
|
|
|
],
|
|
|
depTypeList: [
|
|
|
- {
|
|
|
- type: 1,
|
|
|
- name: '启用'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 0,
|
|
|
- name: '禁用'
|
|
|
- },
|
|
|
+
|
|
|
],
|
|
|
allTypeList: [
|
|
|
- {
|
|
|
- type: 'highTechnology',
|
|
|
- name: '高科技'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'fastExtinction',
|
|
|
- name: '快销'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'manufacturingIndustry',
|
|
|
- name: '制造业'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'all',
|
|
|
- name: '全部'
|
|
|
- },
|
|
|
+
|
|
|
],
|
|
|
list: [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- name: '类型1',
|
|
|
- companyName: '名称1',
|
|
|
- depName: '代码1',
|
|
|
- integral: '100',
|
|
|
- flag: 1
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- name: '类型2',
|
|
|
- companyName: '名称2',
|
|
|
- depName: '代码2',
|
|
|
- integral: '200',
|
|
|
- flag: 0
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- name: '类型3',
|
|
|
- companyName: '名称3',
|
|
|
- depName: '代码3',
|
|
|
- integral: '300',
|
|
|
- flag: 1
|
|
|
- },
|
|
|
+
|
|
|
],
|
|
|
itemList: [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- name: '类型1',
|
|
|
- integralCategory: '名称1',
|
|
|
- integralName: '代码1',
|
|
|
- integral: '100',
|
|
|
- time: '2023-4-3'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- name: '类型1',
|
|
|
- integralCategory: '名称1',
|
|
|
- integralName: '代码1',
|
|
|
- integral: '100',
|
|
|
- time: '2023-4-3'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- name: '类型1',
|
|
|
- integralCategory: '名称1',
|
|
|
- integralName: '代码1',
|
|
|
- integral: '100',
|
|
|
- time: '2023-4-3'
|
|
|
- },
|
|
|
+
|
|
|
],
|
|
|
total: 0,
|
|
|
itemTotal: 0,
|
|
|
@@ -230,35 +140,31 @@ export default {
|
|
|
listQuery: {
|
|
|
page: 1,
|
|
|
limit: 10,
|
|
|
- companyType: '',
|
|
|
- depType: '',
|
|
|
- name: '',
|
|
|
- time: '',
|
|
|
+ companyId: '',
|
|
|
+ deptId: '',
|
|
|
+ userName: '',
|
|
|
+ createTime: '',
|
|
|
},
|
|
|
itemListQuery: {
|
|
|
page: 1,
|
|
|
limit: 10,
|
|
|
- id: '',
|
|
|
+ userId: '',
|
|
|
type: '',
|
|
|
- time: '',
|
|
|
},
|
|
|
dialogFormVisible: false,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- // this.getCompanyTypeList();
|
|
|
- // this.getDepTypeList();
|
|
|
- // this.getList();
|
|
|
+ this.getCompanyTypeList();
|
|
|
+ this.getDepTypeList();
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
handleDownload() {
|
|
|
- this.downloadLoading = true
|
|
|
- import('@/vendor/Export2Excel').then(excel => {
|
|
|
- const tHeader = ['员工姓名', '公司主体', '部门', '积分', ]
|
|
|
- const filterVal = ['name','companyName', 'depName', 'integral']
|
|
|
- excel.export_json_to_excel2(tHeader, this.list, filterVal, '积分列表')
|
|
|
- this.downloadLoading = false
|
|
|
- })
|
|
|
+ window.location.href = process.env.BASE_API + '/mall-integral/export/user/page?companyId=' + this.listQuery.companyId + '&deptId=' + this.listQuery.deptId + '&userName=' + this.listQuery.userName + '&createTime=' + this.listQuery.createTime;
|
|
|
+ },
|
|
|
+ handleItemDownload() {
|
|
|
+ window.location.href = process.env.BASE_API + '/mall-integral/export/user/log?userId=' + this.itemListQuery.userId + '&type=' + this.itemListQuery.type;
|
|
|
},
|
|
|
getCompanyTypeList() {
|
|
|
companyTypeList().then(response => {
|
|
|
@@ -325,9 +231,9 @@ export default {
|
|
|
},
|
|
|
|
|
|
handleView(row) {
|
|
|
- this.itemListQuery.id = row.id;
|
|
|
- // getPointRulesType()
|
|
|
- // this.getItemList()
|
|
|
+ this.itemListQuery.userId = row.loginId;
|
|
|
+ this.getPointRulesType()
|
|
|
+ this.getItemList()
|
|
|
this.dialogFormVisible = true
|
|
|
},
|
|
|
}
|