up
This commit is contained in:
@ -47,19 +47,20 @@
|
|||||||
"echarts": "4.2.1",
|
"echarts": "4.2.1",
|
||||||
"element-ui": "2.13.2",
|
"element-ui": "2.13.2",
|
||||||
"file-saver": "2.0.1",
|
"file-saver": "2.0.1",
|
||||||
"js-beautify": "1.10.2",
|
|
||||||
"fuse.js": "3.4.4",
|
"fuse.js": "3.4.4",
|
||||||
|
"js-beautify": "1.10.2",
|
||||||
"js-cookie": "2.2.0",
|
"js-cookie": "2.2.0",
|
||||||
"jsencrypt": "3.0.0-rc.1",
|
"jsencrypt": "3.0.0-rc.1",
|
||||||
"normalize.css": "7.0.0",
|
"normalize.css": "7.0.0",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"path-to-regexp": "2.4.0",
|
"path-to-regexp": "2.4.0",
|
||||||
|
"quill": "1.3.7",
|
||||||
"screenfull": "4.2.0",
|
"screenfull": "4.2.0",
|
||||||
"sortablejs": "1.8.4",
|
"sortablejs": "1.8.4",
|
||||||
"vue": "2.6.10",
|
"vue": "2.6.10",
|
||||||
"vue-count-to": "1.0.13",
|
"vue-count-to": "1.0.13",
|
||||||
"quill": "1.3.7",
|
|
||||||
"vue-cropper": "0.4.9",
|
"vue-cropper": "0.4.9",
|
||||||
|
"vue-qr": "^2.5.0",
|
||||||
"vue-router": "3.0.2",
|
"vue-router": "3.0.2",
|
||||||
"vue-splitpane": "1.0.4",
|
"vue-splitpane": "1.0.4",
|
||||||
"vuedraggable": "2.20.0",
|
"vuedraggable": "2.20.0",
|
||||||
|
@ -1,5 +1,84 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 获取订单列表
|
||||||
|
export function orderList(data, params) {
|
||||||
|
return request({
|
||||||
|
url: '/order/list',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 获取活动领取名单列表
|
||||||
|
export function userList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/aUser/userList',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 添加活动领取名单
|
||||||
|
export function aUserCreate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/aUser/create',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 修改活动领取名单
|
||||||
|
export function aUserUpdate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/aUser/update',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 批量删除活动领取名单
|
||||||
|
export function aUserDelete(data) {
|
||||||
|
return request({
|
||||||
|
url: '/aUser/delete',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除订单
|
||||||
|
export function orderDelete(params) {
|
||||||
|
return request({
|
||||||
|
url: '/order/delete',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 获取二维码列表
|
||||||
|
export function qrList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/qr/list',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 添加二维码
|
||||||
|
export function qrCreate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/qr/create',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 修改二维码
|
||||||
|
export function qrUpdate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/qr/update',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 删除二维码
|
||||||
|
export function qrDelete(params) {
|
||||||
|
return request({
|
||||||
|
url: '/qr/delete',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 获取用户详细信息
|
// 获取用户详细信息
|
||||||
export function getList(params) {
|
export function getList(params) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/**
|
/**
|
||||||
* 通用css样式布局处理
|
* 通用css样式布局处理
|
||||||
* Copyright (c) 2019 ruoyi
|
* Copyright (c) 2019 ruoyi
|
||||||
*/
|
*/
|
||||||
@ -110,6 +110,9 @@
|
|||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
width: inherit;
|
width: inherit;
|
||||||
|
&.text-danger {
|
||||||
|
color: #ed5565;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-tree-node__content > .el-checkbox {
|
.el-tree-node__content > .el-checkbox {
|
||||||
|
@ -48,7 +48,8 @@ export default {
|
|||||||
dialogImageUrl: null,
|
dialogImageUrl: null,
|
||||||
useOss: false, //使用oss->true;使用MinIO->false
|
useOss: false, //使用oss->true;使用MinIO->false
|
||||||
ossUploadUrl: 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com',
|
ossUploadUrl: 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com',
|
||||||
minioUploadUrl: 'http://140.143.229.114:1818/minio/upload'
|
// minioUploadUrl: 'http://140.143.229.114:1818/minio/upload'
|
||||||
|
minioUploadUrl: process.env.VUE_APP_BASE_API + '/minio/upload'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -61,7 +61,7 @@ export const constantRoutes = [
|
|||||||
path: 'index',
|
path: 'index',
|
||||||
name: '首页',
|
name: '首页',
|
||||||
component: resolve => require(['@/views/index'], resolve),
|
component: resolve => require(['@/views/index'], resolve),
|
||||||
meta: { title: '首页' },
|
meta: { title: '首页', noCache: true, affix: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -77,7 +77,8 @@ export const asyncRouterMap = [
|
|||||||
path: 'index1',
|
path: 'index1',
|
||||||
component: resolve => require(['@/views/index1'], resolve),
|
component: resolve => require(['@/views/index1'], resolve),
|
||||||
name: 'index1',
|
name: 'index1',
|
||||||
meta: { title: '客户管理', noCache: true, affix: true, icon: 'user' }
|
meta: { title: '领取名单', icon: 'user' },
|
||||||
|
hidden: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -91,33 +92,42 @@ export const asyncRouterMap = [
|
|||||||
component: resolve => require(['@/views/index2'], resolve),
|
component: resolve => require(['@/views/index2'], resolve),
|
||||||
name: 'index2',
|
name: 'index2',
|
||||||
meta: {
|
meta: {
|
||||||
title: '权益商品',
|
title: '活动管理',
|
||||||
noCache: true,
|
|
||||||
affix: true,
|
|
||||||
icon: 'shopping'
|
icon: 'shopping'
|
||||||
}
|
}
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'index1',
|
||||||
|
// component: resolve => require(['@/views/index1'], resolve),
|
||||||
|
// name: 'index1',
|
||||||
|
// meta: {
|
||||||
|
// title: '领取名单'
|
||||||
|
// },
|
||||||
|
// hidden: true
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: '',
|
// path: '',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: 'index3',
|
// redirect: 'index3',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: 'index3',
|
// path: 'index3',
|
||||||
component: resolve => require(['@/views/index3'], resolve),
|
// component: resolve => require(['@/views/index3'], resolve),
|
||||||
name: 'index3',
|
// name: 'index3',
|
||||||
meta: { title: '提现订单', noCache: true, affix: true, icon: 'list' }
|
// meta: { title: '提现订单', noCache: true, affix: true, icon: 'list' }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: '/ums',
|
path: '/ums',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/ums/admin',
|
redirect: '/ums/admin',
|
||||||
name: 'ums',
|
name: 'ums',
|
||||||
meta: { title: '系统设置', noCache: true, affix: true, icon: 'system' },
|
meta: { title: '系统设置', icon: 'system' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'admin',
|
path: 'admin',
|
||||||
|
@ -4,11 +4,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<i class="el-icon-search"></i>
|
<i class="el-icon-search"></i>
|
||||||
<span>筛选搜索</span>
|
<span>筛选搜索</span>
|
||||||
<div style="float:right">
|
|
||||||
<el-button type="primary" @click="handleSearchList" size="small">
|
|
||||||
查询
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 15px">
|
<div style="margin-top: 15px">
|
||||||
<el-form
|
<el-form
|
||||||
@ -18,9 +13,25 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
@submit.native.prevent
|
@submit.native.prevent
|
||||||
>
|
>
|
||||||
|
<!-- <el-form-item label="姓名">
|
||||||
|
<el-input v-model="queryParams.name" placeholder="请输入" />
|
||||||
|
</el-form-item> -->
|
||||||
<el-form-item label="手机号">
|
<el-form-item label="手机号">
|
||||||
<el-input v-model="queryParams.phone" placeholder="请输入" />
|
<el-input v-model="queryParams.phone" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="状态">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.status"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option key="0" label="未领取" value="0" />
|
||||||
|
<el-option key="1" label="已领取" value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button type="primary" @click="handleSearchList" size="small">
|
||||||
|
查询
|
||||||
|
</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -28,57 +39,77 @@
|
|||||||
<i class="el-icon-tickets"></i>
|
<i class="el-icon-tickets"></i>
|
||||||
<span>数据列表</span>
|
<span>数据列表</span>
|
||||||
<div class="btn-add">
|
<div class="btn-add">
|
||||||
<el-button @click="handleAdd" size="small">添加顾客</el-button>
|
<el-button @click="handleAdd" size="small" type="success"
|
||||||
<el-button @click="handleImport" size="small">批量导入</el-button>
|
>手动添加</el-button
|
||||||
|
>
|
||||||
|
<el-button @click="handleDelete(false)" size="small" type="success"
|
||||||
|
>一键删除</el-button
|
||||||
|
>
|
||||||
|
<el-button @click="handleImport" size="small" type="success">
|
||||||
|
导入
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="handleExport" size="small" type="warning">
|
||||||
|
导出
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<!-- @selection-change="handleSelectionChange" -->
|
||||||
<el-table style="width: 100%" class="table-container" :data="dataList">
|
<el-table style="width: 100%" class="table-container" :data="dataList">
|
||||||
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="序号"
|
label="序号"
|
||||||
align="center"
|
align="center"
|
||||||
type="index"
|
type="index"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="姓名"
|
||||||
|
prop="name"
|
||||||
|
align="center"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="手机号"
|
label="手机号"
|
||||||
prop="phone"
|
prop="phone"
|
||||||
align="center"
|
align="center"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="返现金额"
|
label="单位"
|
||||||
align="center"
|
align="center"
|
||||||
prop="money"
|
prop="unit"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="机构"
|
label="地址"
|
||||||
align="center"
|
align="center"
|
||||||
prop="company"
|
prop="address"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="城市"
|
label="创建时间"
|
||||||
align="center"
|
align="center"
|
||||||
prop="city"
|
prop="createTime"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="领取状态" align="center" prop="status">
|
||||||
label="渠道"
|
|
||||||
align="center"
|
|
||||||
prop="channel"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="车牌号"
|
|
||||||
align="center"
|
|
||||||
prop="carNum"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="客户经理"
|
|
||||||
align="center"
|
|
||||||
prop="own"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column label="操作" align="center">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button @click="handleUpdate(scope.row)" type="text" size="small"
|
{{ scope.row.status == 0 ? '未领取' : '已领取' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="领取时间"
|
||||||
|
align="center"
|
||||||
|
prop="receiveTime"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button @click="handleUpdate(scope.row)" type="text" size="mini"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
<el-button @click="handleDelete(scope.row)" type="text" size="small"
|
<el-button
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
class="text-danger"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
@ -94,27 +125,12 @@
|
|||||||
<!-- 添加修改 -->
|
<!-- 添加修改 -->
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%">
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="姓名" prop="name">
|
||||||
|
<el-input v-model="form.name"></el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="手机号" prop="phone">
|
<el-form-item label="手机号" prop="phone">
|
||||||
<el-input v-model="form.phone" maxlength="11"></el-input>
|
<el-input v-model="form.phone" maxlength="11"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="返现金额" prop="money">
|
|
||||||
<el-input-number v-model="form.money" :min="1"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="机构">
|
|
||||||
<el-input v-model="form.company"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="城市">
|
|
||||||
<el-input v-model="form.city"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="渠道">
|
|
||||||
<el-input v-model="form.channel"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="车牌号">
|
|
||||||
<el-input v-model="form.carNum"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="客户经理">
|
|
||||||
<el-input v-model="form.own"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
@ -134,7 +150,9 @@
|
|||||||
:limit="1"
|
:limit="1"
|
||||||
accept=".xlsx, .xls"
|
accept=".xlsx, .xls"
|
||||||
:headers="upload.headers"
|
:headers="upload.headers"
|
||||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
:action="
|
||||||
|
upload.url + '?activityId=' + queryParams.activityId + '&unit=' + unit
|
||||||
|
"
|
||||||
:disabled="upload.isUploading"
|
:disabled="upload.isUploading"
|
||||||
:on-progress="handleFileUploadProgress"
|
:on-progress="handleFileUploadProgress"
|
||||||
:on-success="handleFileSuccess"
|
:on-success="handleFileSuccess"
|
||||||
@ -163,7 +181,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getList, handleUser, addUser } from '@/api/index';
|
import {
|
||||||
|
userList,
|
||||||
|
orderDelete,
|
||||||
|
aUserCreate,
|
||||||
|
aUserUpdate,
|
||||||
|
aUserDelete
|
||||||
|
} from '@/api/index';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
@ -180,12 +204,20 @@ export default {
|
|||||||
// 设置上传的请求头部
|
// 设置上传的请求头部
|
||||||
headers: { Authorization: 'Bearer ' + getToken() },
|
headers: { Authorization: 'Bearer ' + getToken() },
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
url: process.env.VUE_APP_BASE_API + '/customer/importDate'
|
url: process.env.VUE_APP_BASE_API + '/aUser/importDate'
|
||||||
},
|
},
|
||||||
|
unit: '',
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
phone: ''
|
activityId: null
|
||||||
|
},
|
||||||
|
queryPost: {
|
||||||
|
name: '',
|
||||||
|
phone: '',
|
||||||
|
unit: ''
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
@ -193,54 +225,58 @@ export default {
|
|||||||
title: '',
|
title: '',
|
||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
|
name: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||||
phone: [{ required: true, message: '请输入', trigger: 'blur' }],
|
phone: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||||
money: [{ required: true, message: '请输入', trigger: 'blur' }]
|
unit: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||||
|
address: [{ required: true, message: '请输入', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
importTemplate() {
|
importTemplate() {
|
||||||
window.location.href =
|
window.location.href =
|
||||||
'http://140.143.229.114:9000/pic/20210729/1420581901814599680.xlsx';
|
'http://192.168.0.125:9000/pic/20210901/1432982759525191680.xlsx';
|
||||||
},
|
},
|
||||||
handleSearchList() {
|
handleSearchList() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
getDataList() {
|
getDataList() {
|
||||||
getList(this.queryParams).then(({ data }) => {
|
userList(this.queryParams).then(({ data }) => {
|
||||||
this.dataList = data.list;
|
this.dataList = data.list;
|
||||||
this.total = data.total;
|
this.total = data.total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 添加
|
// 添加
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.form = {};
|
this.form = {
|
||||||
|
activityId: this.queryParams.activityId, // 活动id
|
||||||
|
unit: this.unit // 单位
|
||||||
|
};
|
||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.title = '添加顾客';
|
this.title = '添加名单';
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.form = {};
|
|
||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
row.status = 0;
|
|
||||||
this.form = Object.assign({}, row);
|
this.form = Object.assign({}, row);
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.title = '修改顾客';
|
this.title = '修改名单';
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['form'].validate(valid => {
|
this.$refs['form'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.title == '修改顾客') {
|
if (this.title == '修改名单') {
|
||||||
handleUser(this.form).then(response => {
|
aUserUpdate(this.form).then(response => {
|
||||||
this.msgSuccess('修改成功');
|
this.msgSuccess('修改成功');
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addUser(this.form).then(response => {
|
aUserCreate(this.form).then(response => {
|
||||||
|
console.log(response);
|
||||||
this.msgSuccess('新增成功');
|
this.msgSuccess('新增成功');
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
@ -249,9 +285,22 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 导出
|
||||||
|
handleExport() {
|
||||||
|
this.$confirm('是否确认导出所有定时任务数据项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
window.location.href =
|
||||||
|
process.env.VUE_APP_BASE_API +
|
||||||
|
'/aUser/export?activityId=' +
|
||||||
|
this.queryParams.activityId;
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 导入按钮操作 */
|
/** 导入按钮操作 */
|
||||||
handleImport() {
|
handleImport() {
|
||||||
this.upload.title = '导入顾客';
|
this.upload.title = '导入名单';
|
||||||
this.upload.open = true;
|
this.upload.open = true;
|
||||||
},
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
@ -274,22 +323,46 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm('确认删除该数据?', '提示', {
|
if (!row && !this.total) return this.msgInfo('暂无数据');
|
||||||
|
const val = row ? `删除 '${row.name}' 这条` : '清空所有';
|
||||||
|
this.$confirm(`确认${val}数据?`, '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(() => {
|
||||||
row.status = -1;
|
const query = !row.id
|
||||||
return handleUser(row);
|
? { id: this.queryParams.activityId }
|
||||||
|
: { ids: [row.id] };
|
||||||
|
return aUserDelete(query);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
this.msgSuccess('删除成功');
|
this.msgSuccess('删除成功');
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
// const { id } = this.$route.query;
|
||||||
|
// if (!id) {
|
||||||
|
// this.msgError('无ID');
|
||||||
|
// this.$router.go(-1);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
const { row } = this.$route.query;
|
||||||
|
const query = JSON.parse(row);
|
||||||
|
if (!query || !query.id) {
|
||||||
|
this.msgError('无ID');
|
||||||
|
this.$router.go(-1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log(query);
|
||||||
|
this.unit = query.unit;
|
||||||
|
this.queryParams.activityId = query.id;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<!-- :logoSrc="imageUrl" -->
|
||||||
|
<!-- <vue-qr text="https://www.baidu.com/" :size="200"></vue-qr> -->
|
||||||
<el-card class="operate-container" shadow="never" style="margin-top:0">
|
<el-card class="operate-container" shadow="never" style="margin-top:0">
|
||||||
<i class="el-icon-tickets"></i>
|
<i class="el-icon-tickets"></i>
|
||||||
<span>数据列表</span>
|
<span>数据列表</span>
|
||||||
<el-button class="btn-add" @click="handleAdd" size="small"
|
<el-button class="btn-add" @click="handleAdd" size="small" type="success"
|
||||||
>添加商品</el-button
|
>添加活动</el-button
|
||||||
>
|
>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-table style="width: 100%" class="table-container" :data="dataList">
|
<el-table style="width: 100%" class="table-container" :data="dataList">
|
||||||
@ -14,23 +16,64 @@
|
|||||||
type="index"
|
type="index"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="商品名称"
|
label="活动名称"
|
||||||
align="center"
|
align="center"
|
||||||
prop="name"
|
prop="name"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
<el-table-column label="活动二维码" align="center" prop="pic">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<vue-qr :text="path + '?id=' + scope.row.id" :size="140"></vue-qr>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品图片" align="center" prop="pic">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.pic"
|
||||||
|
fit="cover"
|
||||||
|
></el-image>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="对应积分"
|
label="单位"
|
||||||
align="center"
|
align="center"
|
||||||
prop="integral"
|
prop="unit"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="详情"
|
||||||
|
align="center"
|
||||||
|
prop="note"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<!-- <template slot-scope="scope">
|
||||||
|
<div v-html="scope.row.note"></div>
|
||||||
|
</template> -->
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
align="center"
|
||||||
|
prop="createTime"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="截止时间"
|
||||||
|
align="center"
|
||||||
|
prop="lastTime"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button @click="handleUpdate(scope.row)" type="text" size="small"
|
<el-button @click="handlePage(scope.row)" type="text" size="small">
|
||||||
>编辑</el-button
|
领取名单
|
||||||
>
|
</el-button>
|
||||||
<el-button @click="handleDelete(scope.row)" type="text" size="small"
|
<el-button @click="handleUpdate(scope.row)" type="text" size="small">
|
||||||
>删除</el-button
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleDelete(scope.row.id)"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
>
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -42,32 +85,34 @@
|
|||||||
@pagination="getDataList"
|
@pagination="getDataList"
|
||||||
/>
|
/>
|
||||||
<!-- 添加修改 -->
|
<!-- 添加修改 -->
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%">
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="50%">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="商品名称" prop="name">
|
<el-form-item label="活动名称" prop="name">
|
||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="对应积分" prop="integral">
|
<el-form-item label="单位" prop="unit">
|
||||||
<el-input-number
|
<el-input v-model="form.unit"></el-input>
|
||||||
v-model="form.integral"
|
|
||||||
:min="1"
|
|
||||||
:step="100"
|
|
||||||
step-strictly
|
|
||||||
></el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图片" prop="pic">
|
<el-form-item label="截止时间" prop="lastTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.lastTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd hh:mm:ss"
|
||||||
|
placeholder="选择截止时间"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品详情" prop="note">
|
||||||
|
<div id="text">
|
||||||
|
<editor v-model="form.note" :min-height="192" />
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品图片" prop="pic">
|
||||||
<multi-upload
|
<multi-upload
|
||||||
v-model="selectProductPics"
|
v-model="selectProductPics"
|
||||||
:maxCount="1"
|
:maxCount="1"
|
||||||
></multi-upload>
|
></multi-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="详细信息" prop="note">
|
|
||||||
<el-input
|
|
||||||
type="textarea"
|
|
||||||
:autosize="{ minRows: 2, maxRows: 10 }"
|
|
||||||
v-model="form.note"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
@ -77,19 +122,34 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getList2, handleProduct, addProduct } from '@/api/index';
|
import {
|
||||||
|
qrList,
|
||||||
|
qrCreate,
|
||||||
|
qrUpdate,
|
||||||
|
qrDelete,
|
||||||
|
handleProduct,
|
||||||
|
addProduct
|
||||||
|
} from '@/api/index';
|
||||||
import MultiUpload from '@/components/Upload/multiUpload';
|
import MultiUpload from '@/components/Upload/multiUpload';
|
||||||
|
import VueQr from 'vue-qr';
|
||||||
|
import Editor from '@/components/Editor';
|
||||||
export default {
|
export default {
|
||||||
name: 'Index2',
|
name: 'Index2',
|
||||||
components: {
|
components: {
|
||||||
MultiUpload
|
MultiUpload,
|
||||||
|
VueQr,
|
||||||
|
Editor
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
imageUrl: require('@/assets/logo/logo.png'), //icon路径
|
||||||
|
path:
|
||||||
|
process.env.NODE_ENV === 'development'
|
||||||
|
? 'http://192.168.0.125:1777'
|
||||||
|
: process.env.VUE_APP_BASE_API,
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
phone: ''
|
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
@ -98,9 +158,16 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, message: '请输入', trigger: 'blur' }],
|
name: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||||
integral: [{ required: true, message: '请输入', trigger: 'blur' }],
|
unit: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||||
pic: [{ required: true, message: '请上传', trigger: 'blur' }],
|
pic: [{ required: true, message: '请上传', trigger: 'blur' }],
|
||||||
note: [{ required: true, message: '请输入', trigger: 'blur' }]
|
note: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||||
|
lastTime: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择日期',
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -155,14 +222,14 @@ export default {
|
|||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
getDataList() {
|
getDataList() {
|
||||||
getList2(this.queryParams).then(({ data }) => {
|
qrList(this.queryParams).then(({ data }) => {
|
||||||
this.dataList = data.list;
|
this.dataList = data.list;
|
||||||
this.total = data.total;
|
this.total = data.total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 添加
|
// 添加
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.form = { integral: 100 };
|
this.form = {};
|
||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.title = '添加商品';
|
this.title = '添加商品';
|
||||||
@ -171,23 +238,22 @@ export default {
|
|||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.form = {};
|
this.form = {};
|
||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
row.status = 0;
|
|
||||||
this.form = Object.assign({}, row);
|
this.form = Object.assign({}, row);
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.title = '修改商品';
|
this.title = '修改活动';
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['form'].validate(valid => {
|
this.$refs['form'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.title == '修改商品') {
|
if (this.title == '修改活动') {
|
||||||
handleProduct(this.form).then(response => {
|
qrUpdate(this.form).then(response => {
|
||||||
this.msgSuccess('修改成功');
|
this.msgSuccess('修改成功');
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addProduct(this.form).then(response => {
|
qrCreate(this.form).then(response => {
|
||||||
this.msgSuccess('新增成功');
|
this.msgSuccess('新增成功');
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
@ -197,19 +263,22 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 跳转页面
|
// 跳转页面
|
||||||
handlePage(id) {
|
handlePage(row) {
|
||||||
this.$router.push({ path: '/front/addUnscramble', query: { id } });
|
this.$router.push({
|
||||||
|
path: '/index1',
|
||||||
|
query: { row: JSON.stringify(row) }
|
||||||
|
});
|
||||||
|
// this.$router.push({ path: '/index1', query: { id: row.id } });
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(id) {
|
||||||
this.$confirm('确认删除该数据?', '提示', {
|
this.$confirm('确认删除该数据?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function() {
|
||||||
row.status = -1;
|
return qrDelete({ id });
|
||||||
return handleProduct(row);
|
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
@ -219,6 +288,14 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
|
console.log(this.path);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
#text {
|
||||||
|
/deep/.ql-toolbar .ql-formats .ql-image {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -93,21 +93,21 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleSelectMenu(scope.$index, scope.row)"
|
@click="handleSelectMenu(scope.$index, scope.row)"
|
||||||
:disabled="
|
>分配菜单
|
||||||
|
<!-- :disabled="
|
||||||
scope.row.id === '1385165161056309248' ||
|
scope.row.id === '1385165161056309248' ||
|
||||||
scope.row.id === '1418108522993946624'
|
scope.row.id === '1418108522993946624'
|
||||||
"
|
" -->
|
||||||
>分配菜单
|
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleSelectResource(scope.$index, scope.row)"
|
@click="handleSelectResource(scope.$index, scope.row)"
|
||||||
:disabled="
|
>分配资源
|
||||||
|
<!-- :disabled="
|
||||||
scope.row.id === '1385165161056309248' ||
|
scope.row.id === '1385165161056309248' ||
|
||||||
scope.row.id === '1418108522993946624'
|
scope.row.id === '1418108522993946624'
|
||||||
"
|
" -->
|
||||||
>分配资源
|
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
@ -34,7 +34,7 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://192.168.0.125:1818`,
|
target: `http://192.168.0.125:1777`,
|
||||||
// target: `http://140.143.229.114:1818`,
|
// target: `http://140.143.229.114:1818`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
|
Reference in New Issue
Block a user