10.17 16:57
This commit is contained in:
parent
5f7bfc1652
commit
86fb080188
@ -72,12 +72,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="activeStatus"
|
||||
prop="activityProgress"
|
||||
label="活动进度"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.activeStatus == 1"> <el-tag>启用</el-tag></span>
|
||||
<span v-if="scope.row.activeStatus == 2"> <el-tag type="danger">禁用</el-tag></span>
|
||||
<span v-if="scope.row.activityProgress == 0"> <el-tag>未开始</el-tag></span>
|
||||
<span v-if="scope.row.activityProgress == 1"> <el-tag>进行中</el-tag></span>
|
||||
<span v-if="scope.row.activityProgress == 2"> <el-tag type="danger">已结束</el-tag></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@ -143,8 +144,8 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
>删除</el-button>
|
||||
@click="handleDelete(scope.row)"
|
||||
>下线</el-button>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
@ -176,28 +177,28 @@
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="赠送金额" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="赠送金额" :label-width="formLabelWidth" prop="giftBalance">
|
||||
<el-input v-model="form.giftBalance" autocomplete="off">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="赠送积分" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="赠送积分" :label-width="formLabelWidth" prop="points">
|
||||
<el-input v-model="form.points" autocomplete="off">
|
||||
<template slot="append">分</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="赠送成长值" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="赠送成长值" :label-width="formLabelWidth" prop="growthValue">
|
||||
<el-input v-model="form.growthValue" autocomplete="off">
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="赠送加油金" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="赠送加油金" :label-width="formLabelWidth" prop="refuelMoney">
|
||||
<el-input v-model="form.refuelMoney" autocomplete="off">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="赠送特权" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="赠送特权" :label-width="formLabelWidth" prop="resource">
|
||||
<el-radio-group v-model="form.resource">
|
||||
<el-radio label="1">显示</el-radio>
|
||||
<el-radio label="2">隐藏</el-radio>
|
||||
@ -206,61 +207,61 @@
|
||||
<el-form-item label="参与次数" :label-width="formLabelWidth">
|
||||
<el-input-number v-model="form.participationNo" controls-position="right" :min="1" :max="10"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工提成" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="员工提成" :label-width="formLabelWidth" prop="employeeCommission">
|
||||
<el-radio-group v-model="form.employeeCommission">
|
||||
<el-radio label="1">仅会员首次充值提成</el-radio>
|
||||
<el-radio label="2">会员每次充值提成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="提成类型" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="提成类型" :label-width="formLabelWidth" prop="formLabelWidth">
|
||||
<el-radio-group v-model="form.royaltyType">
|
||||
<el-radio label="1">无</el-radio>
|
||||
<el-radio label="2">按提成金额</el-radio>
|
||||
<el-radio label="3">按充值金额*提成比例</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="提成金额" v-if="form.royaltyType == 2" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="提成金额" v-if="form.royaltyType == 2" :label-width="formLabelWidth" prop="amountCommission">
|
||||
<el-input v-model="form.amountCommission" autocomplete="off">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="提成比例" v-if="form.royaltyType == 3" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="提成比例" v-if="form.royaltyType == 3" :label-width="formLabelWidth" prop="percentageCommissions">
|
||||
<el-input v-model="form.percentageCommissions" autocomplete="off">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="活动时间" :label-width="formLabelWidth" prop="activeTime">
|
||||
<el-radio-group v-model="form.activeTime">
|
||||
<el-radio label="1">不限时间</el-radio>
|
||||
<el-radio label="2">自定义时间</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间范围" v-if="form.activeTime == 2" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="时间范围" v-if="form.activeTime == 2" :label-width="formLabelWidth" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="form.startTime"
|
||||
type="date"
|
||||
type="datetime"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
-
|
||||
<el-date-picker
|
||||
v-model="form.endTime"
|
||||
type="date"
|
||||
type="datetime"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动状态" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="活动状态" :label-width="formLabelWidth" prop="activeStatus">
|
||||
<el-radio-group v-model="form.activeStatus">
|
||||
<el-radio label="1">启用</el-radio>
|
||||
<el-radio label="2">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付储值" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="支付储值" :label-width="formLabelWidth" prop="paymentValue">
|
||||
<el-radio-group v-model="form.paymentValue">
|
||||
<el-radio label="1">启用</el-radio>
|
||||
<el-radio label="2">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" :label-width="formLabelWidth" prop="name">
|
||||
<el-form-item label="排序" :label-width="formLabelWidth" prop="sort">
|
||||
<el-input-number v-model="form.sort" controls-position="right" :min="1" :max="10"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -312,7 +313,7 @@
|
||||
</div>
|
||||
<div class="demo-drawer__footer">
|
||||
<el-button @click="cancelForm">取 消</el-button>
|
||||
<el-button type="primary" @click="saveblockabb()" >确定</el-button>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')" >确定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
@ -331,12 +332,58 @@
|
||||
isonline: '0',
|
||||
dialog: false,
|
||||
rules: {
|
||||
rechargeBalance: [
|
||||
participationNo: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
refuelMoney: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
growthValue: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
points: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
giftBalance: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
rechargeBalance: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
groupOriented: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
sort: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
employeeCommission: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
royaltyType: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
resource: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
activeTime: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
activeStatus: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
paymentValue: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
amountCommission: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
percentageCommissions: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
|
||||
},
|
||||
form: {
|
||||
sort:1,
|
||||
@ -349,6 +396,7 @@
|
||||
participationNo:0,
|
||||
employeeCommission:'1',
|
||||
royaltyType:'1',
|
||||
isonline:0,
|
||||
resource:'1',
|
||||
activeTime:'1',
|
||||
activeStatus:'1',
|
||||
@ -359,79 +407,12 @@
|
||||
tableDatas: [],
|
||||
formLabelWidth: '160px',
|
||||
timer: null,
|
||||
|
||||
options: [
|
||||
{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
}],
|
||||
options: [ ],
|
||||
total:0,
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
value: '',
|
||||
tableData: [
|
||||
{
|
||||
date: '2016-05-03',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-08',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-06',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-07',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}]
|
||||
tableData: [ ]
|
||||
|
||||
}
|
||||
},
|
||||
@ -472,6 +453,7 @@
|
||||
activeTime:'1',
|
||||
activeStatus:'1',
|
||||
paymentValue:'1',
|
||||
isonline:0
|
||||
}
|
||||
console.log('归零')
|
||||
},
|
||||
@ -493,47 +475,64 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(id){
|
||||
deleteList(id).then(res=>{
|
||||
handleDelete(data){
|
||||
|
||||
data.isonline = "1"
|
||||
|
||||
eitList(data).then(res=>{
|
||||
if (res.code == 200){
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.getlist()
|
||||
}else {
|
||||
this.$message.error('删除失败');
|
||||
this.$message.error('修改失败');
|
||||
}
|
||||
})
|
||||
// 删除 改下线
|
||||
// deleteList(id).then(res=>{
|
||||
//
|
||||
// if (res.code == 200){
|
||||
// this.$message({
|
||||
// message: '删除成功',
|
||||
// type: 'success'
|
||||
// });
|
||||
// this.getlist()
|
||||
// }else {
|
||||
// this.$message.error('删除失败');
|
||||
// }
|
||||
// })
|
||||
},
|
||||
saveblockabb(){
|
||||
if(this.form.id){
|
||||
eitList(this.form).then(res=>{
|
||||
if (res.code == 200){
|
||||
this.$message({
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.getlist()
|
||||
}else {
|
||||
this.$message.error('修改失败');
|
||||
}
|
||||
})
|
||||
}else{
|
||||
addList(this.form).then(res=>{
|
||||
if (res.code == 200){
|
||||
this.$message({
|
||||
message: '新增成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.getlist()
|
||||
}else {
|
||||
this.$message.error('新增失败');
|
||||
}
|
||||
})
|
||||
submitForm(){
|
||||
if(this.form.id){
|
||||
eitList(this.form).then(res=>{
|
||||
if (res.code == 200){
|
||||
this.$message({
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.getlist()
|
||||
}else {
|
||||
this.$message.error('修改失败');
|
||||
}
|
||||
})
|
||||
}else{
|
||||
addList(this.form).then(res=>{
|
||||
if (res.code == 200){
|
||||
this.$message({
|
||||
message: '新增成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.getlist()
|
||||
}else {
|
||||
this.$message.error('新增失败');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
this.dialog = false
|
||||
this.chongzhi()
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user