Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-system-vue
This commit is contained in:
commit
ff3c246049
@ -1,53 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建会员等级
|
||||
export function createLevel(data) {
|
||||
return request({
|
||||
url: '/member/level/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新会员等级
|
||||
export function updateLevel(data) {
|
||||
return request({
|
||||
url: '/member/level/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除会员等级
|
||||
export function deleteLevel(id) {
|
||||
return request({
|
||||
url: '/member/level/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得会员等级
|
||||
export function getLevel(id) {
|
||||
return request({
|
||||
url: '/member/level/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得会员等级分页
|
||||
export function getLevelPage(params) {
|
||||
return request({
|
||||
url: '/member/level/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 导出会员等级 Excel
|
||||
export function exportLevelExcel(params) {
|
||||
return request({
|
||||
url: '/member/level/export-excel',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建会员等级
|
||||
export function createLevel(data) {
|
||||
return request({
|
||||
url: '/member/level/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新会员等级
|
||||
export function updateLevel(data) {
|
||||
return request({
|
||||
url: '/member/level/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除会员等级
|
||||
export function deleteLevel(id) {
|
||||
return request({
|
||||
url: '/member/level/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得会员等级
|
||||
export function getLevel(id) {
|
||||
return request({
|
||||
url: '/member/level/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得会员等级分页
|
||||
export function getLevelPage(params) {
|
||||
return request({
|
||||
url: '/member/level/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 导出会员等级 Excel
|
||||
export function exportLevelExcel(params) {
|
||||
return request({
|
||||
url: '/member/level/export-excel',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
// 查询所有会员
|
||||
export function getLevelAll(params) {
|
||||
return request({
|
||||
url: '/member/level/all',
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
@ -69,6 +69,16 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="2">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选择会员" prop="memberLevelId">
|
||||
<el-select v-model="formData.memberLevelId" placeholder="请选择会员">
|
||||
<el-option v-for="(item,index) in levelList" :key="item.id"
|
||||
:label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="联系地址" prop="address">
|
||||
@ -144,6 +154,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getLevelAll} from '@/api/member/level';
|
||||
import * as CustomerMainApi from '@/api/base/customer';
|
||||
import { getServicePackageList } from "@/api/system/servicePackage";
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
@ -158,8 +169,28 @@ export default {
|
||||
Editor,
|
||||
FileUpload
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
//初始化会员下拉
|
||||
getLevelAll().then(
|
||||
res => {
|
||||
if (res.code==0)
|
||||
{
|
||||
this.levelList = res.data
|
||||
}
|
||||
else {
|
||||
this.$modal.msgError(res.msg)
|
||||
}
|
||||
|
||||
}
|
||||
)
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//会员下拉
|
||||
levelList:[],
|
||||
// 弹出层标题
|
||||
dialogTitle: "",
|
||||
// 是否显示弹出层
|
||||
@ -176,6 +207,7 @@ export default {
|
||||
serviceList: [],
|
||||
// 表单参数
|
||||
formData: {
|
||||
memberLevelId: undefined,
|
||||
id: undefined,
|
||||
userId: undefined,
|
||||
typeCode: '01',
|
||||
@ -219,6 +251,9 @@ export default {
|
||||
inviterType: [
|
||||
{ required: true, message: '请选择注册方式', trigger: 'change' },
|
||||
],
|
||||
memberLevelId:[
|
||||
{ required: true, message: '请选择会员', trigger: 'change' },
|
||||
],
|
||||
},
|
||||
// 性别数据字典
|
||||
sexDictDatas: getDictDatas(DICT_TYPE.DICT_SYS_USER_SEX),
|
||||
|
@ -40,6 +40,8 @@
|
||||
<dict-tag :type="DICT_TYPE.DICT_SYS_USER_SEX" :value="scope.row.sex" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80" label="会员等级" align="center" prop="levelName">
|
||||
</el-table-column>
|
||||
<el-table-column width="110" label="联系方式" align="center" prop="phoneNumber"/>
|
||||
<el-table-column width="100" label="生日" align="center" prop="birthday">
|
||||
<template v-slot="scope">
|
||||
|
@ -77,6 +77,17 @@
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否重复参与" prop="isParticipate">
|
||||
<el-switch
|
||||
v-model="formData.isParticipate"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
active-value="1"
|
||||
inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
@ -120,6 +131,7 @@ export default {
|
||||
isRechRule: '0',
|
||||
isPack:'0',
|
||||
isCoupon:'0',
|
||||
isParticipate:'0'
|
||||
},
|
||||
// 表单校验
|
||||
formRules: {},
|
||||
|
Loading…
Reference in New Issue
Block a user