Commit f599cfa8 by 吕明尚

会员进度日志增加

parent 66836ce7
import request from '@/utils/request'
// 查询会员进度日志列表
export function listMemberProgressLog(query) {
return request({
url: '/system/memberProgressLog/list',
method: 'get',
params: query
})
}
// 查询会员进度日志详细
export function getMemberProgressLog(id) {
return request({
url: '/system/memberProgressLog/' + id,
method: 'get'
})
}
// 新增会员进度日志
export function addMemberProgressLog(data) {
return request({
url: '/system/memberProgressLog',
method: 'post',
data: data
})
}
// 修改会员进度日志
export function updateMemberProgressLog(data) {
return request({
url: '/system/memberProgressLog',
method: 'put',
data: data
})
}
// 删除会员进度日志
export function delMemberProgressLog(id) {
return request({
url: '/system/memberProgressLog/' + id,
method: 'delete'
})
}
......@@ -113,7 +113,9 @@
<el-table-column align="center" label="配置名称" prop="name"/>
<el-table-column align="center" label="充值金额" prop="rechargeAmount"/>
<!-- <el-table-column align="center" label="充值赠送方式;1-不送,2-送金额,3-送优惠券,4-送金额及优惠券" prop="giveType"/>-->
<el-table-column align="center" label="充值赠送方式" prop="giveType"/>
<!-- <el-table-column align="center" label="充值赠送方式" prop="giveType"/>-->
<el-table-column align="center" label="积分赠送比例" prop="giveRatio"/>
<el-table-column align="center" label="充值赠送时长" prop="giveDuration"/>
<el-table-column align="center" label="充值满送金额" prop="giveAmount"/>
<!-- <el-table-column align="center" label="启用禁用:1-启用,0-禁用" prop="enable"/>-->
<el-table-column align="center" label="是否启用" prop="enable">
......@@ -168,15 +170,27 @@
<!-- 添加或修改充值配置对话框 -->
<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="name">
<el-input v-model="form.name" placeholder="请输入配置名称"/>
</el-form-item>
<!-- <el-form-item label="充值金额" prop="rechargeAmount">-->
<!-- <el-input v-model="form.rechargeAmount" placeholder="请输入充值金额"/>-->
<!-- </el-form-item>-->
<el-form-item label="充值金额" prop="rechargeAmount">
<el-input v-model="form.rechargeAmount" placeholder="请输入充值金额"/>
<el-input-number v-model="form.rechargeAmount" :max="9999" :min="0"/>
</el-form-item>
<!-- <el-form-item label="充值满送金额" prop="giveAmount">-->
<!-- <el-input v-model="form.giveAmount" placeholder="请输入充值满送金额"/>-->
<!-- </el-form-item>-->
<el-form-item label="充值满送金额" prop="giveAmount">
<el-input v-model="form.giveAmount" placeholder="请输入充值满送金额"/>
<el-input-number v-model="form.giveAmount" :max="100" :min="0"/>
</el-form-item>
<el-form-item label="充值赠送时长" prop="giveDuration">
<el-input-number v-model="form.giveDuration" :max="100" :min="0.5" :step="0.5" value="1"/>
</el-form-item>
<el-form-item label="积分赠送比例" prop="giveRatio">
<el-input-number v-model="form.giveRatio" :max="100" :min="0"/>
</el-form-item>
<!-- <el-form-item label="启用禁用:1-启用,0-禁用" prop="enable">-->
<!-- <el-input v-model="form.enable" placeholder="请输入启用禁用:1-启用,0-禁用"/>-->
......@@ -263,6 +277,8 @@ export default {
enable: null,
suitType: null,
storeIds: null,
giveRatio: null,
giveDuration: null
},
// 表单参数
form: {},
......@@ -271,22 +287,9 @@ export default {
rechargeAmount: [
{required: true, message: "充值金额不能为空", trigger: "blur"}
],
giveType: [
{
required: true,
message: "充值赠送方式;1-不送,2-送金额,3-送优惠券,4-送金额及优惠券不能为空",
trigger: "change"
}
],
enable: [
{required: true, message: "启用禁用:1-启用,0-禁用不能为空", trigger: "blur"}
],
suitType: [
{required: true, message: "充值适用类型:1-平台通用,2-单门店不能为空", trigger: "change"}
],
delFlag: [
{required: true, message: "删除标记:1-删除,0-正常不能为空", trigger: "blur"}
],
}
};
},
......@@ -380,6 +383,7 @@ export default {
const id = row.id || this.ids
getRechargeConf(id).then(response => {
this.form = response.data;
this.form.enable = parseInt(this.form.enable)
if (this.form.storeIds) {
this.form.storeIds = this.form.storeIds.split(",")
}
......@@ -391,6 +395,7 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.storeIds = this.form.storeIds && this.form.storeIds.length ? this.form.storeIds.join() : ''
if (this.form.id != null) {
updateRechargeConf(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
......@@ -398,6 +403,7 @@ export default {
this.getList();
});
} else {
this.form.suitType = 1;
addRechargeConf(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
......
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