Commit 598aca72 by 吕明尚

客服增加公众号和短信的控制

parent 8a195be4
<template>
<div class="app-container">
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="68px" size="small">
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" size="small">
<el-form-item label="会员等级" prop="membershipLevel">
<el-input
v-model="queryParams.membershipLevel"
......@@ -10,23 +9,36 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="会员有效期" prop="expirationDate">
<el-date-picker v-model="queryParams.expirationDate"
clearable
placeholder="请选择会员有效期"
type="date"
value-format="yyyy-MM-dd">
</el-date-picker>
<el-form-item label="会员昵称" prop="nickName">
<el-input
v-model="queryParams.nickName"
clearable
placeholder="请输入会员昵称"
/>
</el-form-item>
<el-form-item label="会员进度" prop="membershipProgress">
<el-form-item label="会员手机号" prop="phone">
<el-input
v-model="queryParams.membershipProgress"
v-model="queryParams.phone"
clearable
placeholder="请输入会员进度"
@keyup.enter.native="handleQuery"
placeholder="请输入会员手机号"
/>
</el-form-item>
<!-- <el-form-item label="会员有效期" prop="expirationDate">-->
<!-- <el-date-picker v-model="queryParams.expirationDate"-->
<!-- clearable-->
<!-- placeholder="请选择会员有效期"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="会员进度" prop="membershipProgress">-->
<!-- <el-input-->
<!-- v-model="queryParams.membershipProgress"-->
<!-- clearable-->
<!-- placeholder="请输入会员进度"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
......@@ -87,6 +99,13 @@
<el-table-column align="center" type="selection" width="55"/>
<!-- <el-table-column align="center" label="ID" prop="id"/>-->
<!-- <el-table-column align="center" label="用户id" prop="consumerId"/>-->
<el-table-column align="center" label="会员昵称" prop="nickName"/>
<el-table-column align="center" label="会员头像" prop="avatar" width="100">
<template slot-scope="scope">
<image-preview :height="50" :src="scope.row.avatar" :width="50"/>
</template>
</el-table-column>
<el-table-column align="center" label="会员手机号" prop="phone"/>
<el-table-column align="center" label="会员等级" prop="membershipLevel"/>
<el-table-column align="center" label="等级名称" prop="memberConfigId">
<template slot-scope="scope">
......@@ -227,6 +246,8 @@ export default {
expirationDate: null,
membershipProgress: null,
isDelete: null,
nickName: null,
phone: null,
},
// 表单参数
form: {},
......
......@@ -162,9 +162,12 @@
<!-- 添加或修改会员配置对话框 -->
<el-dialog :title="title" :visible.sync="open" append-to-body width="500px">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<!-- <el-form-item label="会员等级" prop="membershipLevel">-->
<!-- <el-input v-model="form.membershipLevel" placeholder="请输入会员等级"/>-->
<!-- </el-form-item>-->
<el-form-item label="会员等级" prop="membershipLevel">
<el-input v-model="form.membershipLevel" placeholder="请输入会员等级"/>
<el-input-number v-model="form.membershipLevel" :max="100" :min="1"/>
</el-form-item>
<el-form-item label="等级名称" prop="levelName">
<el-input v-model="form.levelName" placeholder="请输入等级名称"/>
......@@ -182,11 +185,17 @@
<el-form-item label="额度要求" prop="limitRequirements">
<el-input v-model="form.limitRequirements" placeholder="请输入额度要求"/>
</el-form-item>
<el-form-item label="折扣比例" prop="discountRatio">
<el-input v-model="form.discountRatio" placeholder="请输入折扣比例"/>
<!-- <el-form-item label="折扣比例" prop="discountRatio">-->
<!-- <el-input v-model="form.discountRatio" placeholder="请输入折扣比例"/>-->
<!-- </el-form-item>-->
<el-form-item label="优惠比例" prop="discountRatio">
<el-input-number v-model="form.discountRatio" :max="100" :min="0"/>
</el-form-item>
<el-form-item label="会员有效期" prop="validityPeriod">
<el-input v-model="form.validityPeriod" placeholder="请输入会员有效期"/>
<!-- <el-form-item label="会员有效期" prop="validityPeriod">-->
<!-- <el-input v-model="form.validityPeriod" placeholder="请输入会员有效期"/>-->
<!-- </el-form-item>-->
<el-form-item label="会员有效期(年)" prop="validityPeriod">
<el-input-number v-model="form.validityPeriod" :max="100" :min="1"/>
</el-form-item>
<!-- <el-form-item label="会员进度" prop="membershipProgress">-->
<!-- <el-input v-model="form.membershipProgress" placeholder="请输入会员进度"/>-->
......@@ -254,7 +263,14 @@ export default {
// 表单参数
form: {},
// 表单校验
rules: {}
rules: {
limitRequirements: [
{required: true, message: "额度要求不能为空", trigger: "blur"}
],
discountRatio: [
{required: true, message: "优惠比例不能为空", trigger: "blur"}
],
}
};
},
created() {
......
......@@ -95,10 +95,54 @@
v-hasPermi="['system:store:remove']"
>取消分配
</el-button>
<el-button v-if="scope.row.position ==3"
v-hasPermi="['system:store:edit']"
icon="el-icon-edit"
size="mini"
type="text"
@click="handleUpdate(scope.row)"
>修改
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 添加或修改房间对话框 -->
<el-dialog :title="title" :visible.sync="open" append-to-body width="20%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="账号" prop="account">
<el-input v-model="form.account" disabled/>
</el-form-item>
<el-form-item label="用户昵称" prop="nickName">
<el-input v-model="form.nickName" disabled/>
</el-form-item>
<el-form-item label="是否接收公众号" prop="controller">
<el-radio-group v-model="form.controller">
<el-radio
v-for="dict in dict.type.store_is_use_coupon"
:key="dict.value"
:label="parseInt(dict.value)"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否接收短信" prop="gating">
<el-radio-group v-model="form.gating">
<el-radio
v-for="dict in dict.type.store_is_use_coupon"
:key="dict.value"
:label="parseInt(dict.value)"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<pagination
v-show="total>0"
:total="total"
......@@ -113,10 +157,11 @@
<script>
import {allocatedUserList, authUserCancel, authUserCancelAll} from "@/api/system/store";
import selectConsumer from "./selectConsumer";
import {query} from "@/api/system/store";
import {update} from "../../../api/system/store";
export default {
name: "CleanConsumer",
dicts: ['sys_user_sex', 'wechat_role_type'],
dicts: ['sys_user_sex', 'wechat_role_type', 'store_is_use_coupon'],
components: {selectConsumer},
data() {
return {
......@@ -130,6 +175,11 @@ export default {
showSearch: true,
// 总条数
total: 0,
title: '',
open: false,
form: {},
query: {},
rules: {},
// 用户表格数据
consumerList: [],
// 查询参数
......@@ -163,6 +213,37 @@ export default {
}
);
},
cancel() {
this.open = false;
},
handleUpdate(row) {
const storeId = this.$route.params && this.$route.params.storeId;
this.query.storeId = storeId;
this.query.consumerId = row.id;
this.query.position = 3;
query(this.query).then(response => {
this.form = response.data;
this.open = true
this.title = '修改权限'
})
},
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.$confirm('确认提交吗?').then(() => {
this.query.consumerId = this.form.id;
this.query.position = 3;
this.query.controller = this.form.controller;
this.query.gating = this.form.gating;
update(this.query).then(() => {
this.open = false;
this.getList();
this.$modal.msgSuccess("操作成功");
});
});
}
});
},
// 返回按钮
handleClose() {
const obj = {path: "/share/store"};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment