feat(declarationActivity): 报单赠送统计
This commit is contained in:
parent
05bd13612d
commit
824937e32e
|
@ -81,3 +81,12 @@ export function declarationActivityRecordList(params) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 报单赠送统计列表
|
||||||
|
|
||||||
|
export function declarationActivitySummaryList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/activity/manage/acDeclarationRecord//list-total',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -2110,6 +2110,12 @@ export const constantRoutes = [
|
||||||
name: 'DeclarationActivityRecordList',
|
name: 'DeclarationActivityRecordList',
|
||||||
component: () => import('@/views/marketing/declarationActivity/record'),
|
component: () => import('@/views/marketing/declarationActivity/record'),
|
||||||
meta: { title: '报单赠送记录' }
|
meta: { title: '报单赠送记录' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'declarationActivitySummary',
|
||||||
|
name: 'DeclarationActivitySummary',
|
||||||
|
component: () => import('@/views/marketing/declarationActivity/summary'),
|
||||||
|
meta: { title: '报单赠送统计' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -202,7 +202,7 @@ import topBar from '@/components/topBar'
|
||||||
import * as api from '@/api/activity.js'
|
import * as api from '@/api/activity.js'
|
||||||
import { activityStatus } from '@/api/giftGoods.js'
|
import { activityStatus } from '@/api/giftGoods.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'Bzpz',
|
name: 'DeclarationActivity',
|
||||||
components: {
|
components: {
|
||||||
topBar
|
topBar
|
||||||
},
|
},
|
||||||
|
|
|
@ -221,7 +221,7 @@ import topBar from '@/components/topBar'
|
||||||
import * as api from '@/api/activity.js'
|
import * as api from '@/api/activity.js'
|
||||||
import { activityStatus } from '@/api/giftGoods.js'
|
import { activityStatus } from '@/api/giftGoods.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'Bzpz',
|
name: 'DeclarationActivityRecord',
|
||||||
components: {
|
components: {
|
||||||
topBar
|
topBar
|
||||||
},
|
},
|
||||||
|
@ -308,17 +308,6 @@ export default {
|
||||||
this.select.startCreationTime = val ? val[0] : ''
|
this.select.startCreationTime = val ? val[0] : ''
|
||||||
this.select.endCreationTime = val ? val[1] : ''
|
this.select.endCreationTime = val ? val[1] : ''
|
||||||
},
|
},
|
||||||
// 点击修改
|
|
||||||
redirectDetail(id, index) {
|
|
||||||
this.$router.push({
|
|
||||||
path: 'updateInfo',
|
|
||||||
query: {
|
|
||||||
pkId: id,
|
|
||||||
controlType: index
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 获取列表
|
// 获取列表
|
||||||
getDataList() {
|
getDataList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|
|
@ -0,0 +1,342 @@
|
||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
<topBar
|
||||||
|
v-if="topList.length > 0"
|
||||||
|
:top-list="topList"
|
||||||
|
:moren="moren"
|
||||||
|
/>
|
||||||
|
<div class="main">
|
||||||
|
<div class="form_all">
|
||||||
|
<el-form
|
||||||
|
ref="select"
|
||||||
|
:model="select"
|
||||||
|
label-width="auto"
|
||||||
|
>
|
||||||
|
<el-row :gutter="40">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item :label="'活动名称'">
|
||||||
|
<el-input
|
||||||
|
v-model="select.actName"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item :label="'活动状态'">
|
||||||
|
<el-select
|
||||||
|
v-model="select.activityStatus"
|
||||||
|
clearable
|
||||||
|
:placeholder="'请选择'"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in actStatus"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="产品编号">
|
||||||
|
<el-input
|
||||||
|
v-model="select.productCode"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item :label="'开始日期'">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="creationTime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
type="datetimerange"
|
||||||
|
:range-separator="'至'"
|
||||||
|
:start-placeholder="'开始日期'"
|
||||||
|
:end-placeholder="'结束日期'"
|
||||||
|
@change="changeTime"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item :label="'结束日期'">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="creationTime1"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
type="datetimerange"
|
||||||
|
:range-separator="'至'"
|
||||||
|
:start-placeholder="'开始日期'"
|
||||||
|
:end-placeholder="'结束日期'"
|
||||||
|
@change="changeTime1"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="8">
|
||||||
|
<el-form-item :label="'创建日期'">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="creationTime2"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
type="datetimerange"
|
||||||
|
:range-separator="'至'"
|
||||||
|
:start-placeholder="'开始日期'"
|
||||||
|
:end-placeholder="'结束日期'"
|
||||||
|
@change="changeTime2"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="getDataList"
|
||||||
|
> {{ '搜索' }}</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
class="resetBtn"
|
||||||
|
@click="reset"
|
||||||
|
> {{ '重置' }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="main_a">
|
||||||
|
<div class="mainbtn">
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
v-hasButtons="['declarationActivitySummaryExport']"
|
||||||
|
size="small"
|
||||||
|
class="exportBtn"
|
||||||
|
@click="handleExport"
|
||||||
|
> {{ '导出' }}</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="maintable">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%;"
|
||||||
|
height="710px"
|
||||||
|
:header-cell-style="{ background: '#EEEEEE' }"
|
||||||
|
:row-class-name="tableRowClassName"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="actName"
|
||||||
|
:label="'活动名称'"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="productCode"
|
||||||
|
label="产品编号"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="productName"
|
||||||
|
label="产品名称"
|
||||||
|
min-width="300"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="specsName"
|
||||||
|
label="产品规格"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="quantity"
|
||||||
|
label="数量"
|
||||||
|
width="120"
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import topBar from '@/components/topBar'
|
||||||
|
import * as api from '@/api/activity.js'
|
||||||
|
import { activityStatus } from '@/api/giftGoods.js'
|
||||||
|
export default {
|
||||||
|
name: 'DeclarationActivitySummary',
|
||||||
|
components: {
|
||||||
|
topBar
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
isAgree(val) {
|
||||||
|
if (!val) {
|
||||||
|
return '允许'
|
||||||
|
} else {
|
||||||
|
return '禁止'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
creationTime: [],
|
||||||
|
creationTime1: [],
|
||||||
|
creationTime2: [],
|
||||||
|
select: {
|
||||||
|
productCode: '',
|
||||||
|
actName: '',
|
||||||
|
activityStatus: '',
|
||||||
|
startActStartDate: '',
|
||||||
|
endActStartDate: '',
|
||||||
|
startActEndDate: '',
|
||||||
|
endActEndDate: ''
|
||||||
|
},
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 50
|
||||||
|
},
|
||||||
|
addOrEdit: '',
|
||||||
|
total: 0,
|
||||||
|
dialogVisible: false,
|
||||||
|
tableData: [],
|
||||||
|
loading: false,
|
||||||
|
moren: 'declarationActivitySummary',
|
||||||
|
topList: [
|
||||||
|
{
|
||||||
|
name: '报单赠送统计',
|
||||||
|
path: 'declarationActivitySummary'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
form: {
|
||||||
|
name: ''
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: [{ required: true, message: '请输入规格类型', trigger: 'blur' }]
|
||||||
|
},
|
||||||
|
actStatus: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// 获取下拉
|
||||||
|
this.getData()
|
||||||
|
// 获取列表
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 重置
|
||||||
|
reset() {
|
||||||
|
this.select = {}
|
||||||
|
this.creationTime = []
|
||||||
|
this.creationTime1 = []
|
||||||
|
this.creationTime2 = []
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
getData() {
|
||||||
|
activityStatus().then((res) => {
|
||||||
|
this.actStatus = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
changeTime(val) {
|
||||||
|
this.select.startActStartDate = val ? val[0] : ''
|
||||||
|
this.select.endActStartDate = val ? val[1] : ''
|
||||||
|
},
|
||||||
|
changeTime1(val) {
|
||||||
|
this.select.startActEndDate = val ? val[0] : ''
|
||||||
|
this.select.endActEndDate = val ? val[1] : ''
|
||||||
|
},
|
||||||
|
changeTime2(val) {
|
||||||
|
this.select.startCreationTime = val ? val[0] : ''
|
||||||
|
this.select.endCreationTime = val ? val[1] : ''
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
getDataList() {
|
||||||
|
this.loading = true
|
||||||
|
api
|
||||||
|
.declarationActivitySummaryList(
|
||||||
|
Object.assign({}, this.queryParams, this.select, { actType: 31 })
|
||||||
|
)
|
||||||
|
.then((res) => {
|
||||||
|
this.tableData = res.rows
|
||||||
|
this.total = res.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then((_) => {
|
||||||
|
this.download(
|
||||||
|
'activity/manage/acDeclarationRecord/list-total-export',
|
||||||
|
Object.assign({}, { actType: 31 }, this.queryParams, this.select),
|
||||||
|
`${'报单赠送统计'}${new Date().getTime()}.xlsx`
|
||||||
|
)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableRowClassName({ row, rowIndex }) {
|
||||||
|
if (rowIndex % 2 == 1) {
|
||||||
|
return 'warning-row'
|
||||||
|
} else if (rowIndex % 2 == 0) {
|
||||||
|
return 'success-row'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
::v-deep .el-table .warning-row {
|
||||||
|
background: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-table .success-row {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
::v-deep .el-table thead {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
::v-deep .el-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.page {
|
||||||
|
padding: 20px;
|
||||||
|
background: #f9f9f9;
|
||||||
|
font-size: 14px;
|
||||||
|
.main {
|
||||||
|
// background: #ffffff;
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.main_a {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||||
|
}
|
||||||
|
.mainbtn {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.maintable {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep .el-date-editor.el-input,
|
||||||
|
.el-date-editor.el-input__inner {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.form_all {
|
||||||
|
padding: 0 20px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -80,12 +80,12 @@
|
||||||
<td style="border:0" />
|
<td style="border:0" />
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<el-select v-model="ctem.registerAuthority">
|
<el-select v-model="ctem.registerAuthority">
|
||||||
<el-option v-for="item in registerList" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
<el-option v-for="item in registerList" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<el-select v-model="ctem.specifyLevel">
|
<el-select v-model="ctem.specifyLevel">
|
||||||
<el-option v-for="item in gradeRangList" :key="item.pkId" :label="item.gradeName" :value="item.pkId"></el-option>
|
<el-option v-for="item in gradeRangList" :key="item.pkId" :label="item.gradeName" :value="item.pkId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
|
@ -297,18 +297,12 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as api from '@/api/giftGoods.js'
|
import * as api from '@/api/giftGoods.js'
|
||||||
import topBar from '@/components/topBar'
|
|
||||||
import ImageUpload from '@/components/ImageUpload'
|
|
||||||
import { isLocals } from '../../../utils/numberToCurrency'
|
import { isLocals } from '../../../utils/numberToCurrency'
|
||||||
import {
|
import {
|
||||||
getgradeRanglist,
|
getgradeRanglist,
|
||||||
getRegistration
|
getRegistration
|
||||||
} from '@/api/level'
|
} from '@/api/level'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
topBar,
|
|
||||||
ImageUpload
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
@ -345,7 +339,7 @@ export default {
|
||||||
pageData: {},
|
pageData: {},
|
||||||
queryData: [],
|
queryData: [],
|
||||||
registerList: [],
|
registerList: [],
|
||||||
gradeRangList: [],
|
gradeRangList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -414,7 +408,6 @@ export default {
|
||||||
item.acDeclarationConfigParam[this.showCndex].acDeclarationProductParamList[
|
item.acDeclarationConfigParam[this.showCndex].acDeclarationProductParamList[
|
||||||
this.showIndex
|
this.showIndex
|
||||||
].quantity = this.selectData.quantity
|
].quantity = this.selectData.quantity
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// this.dialogVisible = false
|
// this.dialogVisible = false
|
||||||
|
|
|
@ -111,7 +111,7 @@ import ImageUpload from '@/components/ImageUpload'
|
||||||
import UpdateInfo from '@/views/marketing/declarationActivity/update'
|
import UpdateInfo from '@/views/marketing/declarationActivity/update'
|
||||||
import { updateDeclarationActivityList, addDeclarationActivityList, getDeclarationActivityDetail } from '@/api/activity.js'
|
import { updateDeclarationActivityList, addDeclarationActivityList, getDeclarationActivityDetail } from '@/api/activity.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'AddDirectPushUpgrade',
|
name: 'DeclarationActivityUpdateInfo',
|
||||||
components: {
|
components: {
|
||||||
ImageUpload,
|
ImageUpload,
|
||||||
UpdateInfo,
|
UpdateInfo,
|
||||||
|
|
Loading…
Reference in New Issue