添加新功能

This commit is contained in:
yangjun 2024-08-08 21:26:45 +08:00
parent 8da31d6c7c
commit a97c029911
3 changed files with 98 additions and 10 deletions

View File

@ -300,6 +300,25 @@
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="dskg"
label="是否开启打赏"
fixed="right"
width="80"
>
<template slot-scope="scope">
<el-switch
v-model="scope.row.dskg"
@change="changeDskg(scope.row.dskg, scope.row.artificerId)"
:active-value="openValue"
:disabled="!isAuth('locality:update')"
:inactive-value="closeValue"
active-color="#13ce66"
inactive-color="#ff4949"
>
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" prop="id" width="250" fixed="right"> <el-table-column label="操作" prop="id" width="250" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -4151,6 +4170,38 @@ export default {
} }
}); });
}, },
//
changeDskg(val, artificerId) {
this.$http({
url: this.$http.adornUrl("artificer/updateArtificers"),
method: "post",
// params: this.$http.adornParams({
data: this.$http.adornData({
artificerId: artificerId,
dskg: val,
}),
}).then(({ data }) => {
if (data.code == 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.InformationSelect();
},
});
} else {
this.$message({
message: data.msg,
type: "warning",
duration: 1500,
onClose: () => {
this.InformationSelect();
},
});
}
});
},
// //
xiugai(row) { xiugai(row) {
this.titleBl = "抽成比例"; this.titleBl = "抽成比例";

View File

@ -13,6 +13,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="money" label="到账金额"> <el-table-column prop="money" label="到账金额">
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间">
</el-table-column>
<el-table-column label="操作" width="180"> <el-table-column label="操作" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" :disabled="!isAuth('vipPrivilege:update')" <el-button size="mini" type="primary" :disabled="!isAuth('vipPrivilege:update')"
@ -39,9 +41,18 @@
<span style="width: 200px;display: inline-block;text-align: right;">到账金额</span> <span style="width: 200px;display: inline-block;text-align: right;">到账金额</span>
<el-input style="width:50%;" v-model="money" placeholder="请输入到账金额"></el-input> <el-input style="width:50%;" v-model="money" placeholder="请输入到账金额"></el-input>
</div> </div>
<div style="margin-bottom: 10px;" v-if="yhjday">
<span style="width: 200px;display: inline-block;text-align: right;">赠送多少天</span>
<el-input style="width:50%;" v-model="dayNum" placeholder="请输入赠送多少天"></el-input>
</div>
<div style="margin-bottom: 10px;" v-if="yhjday">
<span style="width: 200px;display: inline-block;text-align: right;">每天赠送盛安豆</span>
<el-input style="width:50%;" v-model="dayMoney" placeholder="请输入每天赠送盛安豆"></el-input>
</div>
<el-button type="primary" plain class="button-new-tag" size="small" @click="couponIdBtn()">选择优惠券</el-button> <el-button type="primary" plain class="button-new-tag" size="small" @click="couponIdBtn()">选择优惠券</el-button>
<el-button type="primary" plain class="button-new-tag" size="small" @click="handleDay()">赠送盛安豆</el-button>
<el-table v-loading="tableDataLoading" :data="yhjTableData"> <el-table v-loading="tableDataLoading" :data="yhjTableData" v-if="!yhjday">
<el-table-column fixed prop="couponId" label="编号" width="50"> <el-table-column fixed prop="couponId" label="编号" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="couponName" label="优惠卷名称"> <el-table-column prop="couponName" label="优惠卷名称">
@ -114,8 +125,11 @@
couponName: '', couponName: '',
sort: '', sort: '',
payClassifyId: '', payClassifyId: '',
dayNum:'',
dayMoney:'',
title: '添加', title: '添加',
dialogFormVisible4: false, dialogFormVisible4: false,
yhjday:false,
} }
}, },
methods: { methods: {
@ -165,6 +179,12 @@
this.page = 1 this.page = 1
this.dataSelect() this.dataSelect()
}, },
handleDay(){
this.dayNum = ''
this.dayMoney = ''
this.yhjday = true;
this.yhjTableData = [];
},
addNotice() { addNotice() {
this.money = '' this.money = ''
this.memberId = '' this.memberId = ''
@ -172,6 +192,9 @@
this.couponId = '' this.couponId = ''
this.sort = '' this.sort = ''
this.couponName = '' this.couponName = ''
this.dayNum = ''
this.dayMoney = ''
this.yhjday = false;
this.yhjTableData = []; this.yhjTableData = [];
this.title = '添加' this.title = '添加'
this.dialogFormVisible = true this.dialogFormVisible = true
@ -244,6 +267,8 @@
'couponId': this.couponId, 'couponId': this.couponId,
'payClassifyId': this.payClassifyId, 'payClassifyId': this.payClassifyId,
'detailList':this.yhjTableData, 'detailList':this.yhjTableData,
'dayNum':this.dayNum,
'dayMoney':this.dayMoney,
}) })
}).then(({ }).then(({
data data
@ -302,6 +327,15 @@
this.price = rows.price this.price = rows.price
this.title = '修改' this.title = '修改'
this.dayMoney = rows.dayMoney
this.dayNum = rows.dayNum
if(this.dayNum){
this.yhjday = true;
}else{
this.yhjday = false;
}
}, },
// //
deletes(row) { deletes(row) {
@ -355,6 +389,9 @@
}, },
// //
couponIdBtn() { couponIdBtn() {
this.dayNum = ''
this.dayMoney = ''
this.yhjday = false;
this.dataSelectY() this.dataSelectY()
this.dialogFormVisible4 = true this.dialogFormVisible4 = true
}, },

View File

@ -3685,15 +3685,15 @@ export default {
}); });
return; return;
} }
if (this.addNum === "") { // if (this.addNum === "") {
this.$notify({ // this.$notify({
title: "提示", // title: "",
duration: 1800, // duration: 1800,
message: "请输入加钟次数", // message: "",
type: "warning", // type: "warning",
}); // });
return; // return;
} // }
if (this.massageTypeStatus === "") { if (this.massageTypeStatus === "") {
this.$notify({ this.$notify({