技师充值奖励配置

This commit is contained in:
曹磊 2024-08-16 18:28:10 +08:00
parent 1c5d5a02df
commit 580344b7d4
3 changed files with 442 additions and 34 deletions

View File

@ -16,15 +16,15 @@
</el-table-column>
<el-table-column fixed prop="grade" label="技师等级" align="center">
</el-table-column>
<el-table-column prop="durationOnline" label="最低在线时长(小时)">
</el-table-column>
<el-table-column prop="outstandingAchievement" label="最低业绩">
</el-table-column>
<el-table-column prop="clockRate" label="加钟率">
</el-table-column>
<el-table-column prop="depositRate" label="充值率">
</el-table-column>
<el-table-column prop="durationOnline" label="在线时长">
</el-table-column>
<el-table-column prop="integral" label="积分" width="180">
<!-- <el-table-column prop="clockRate" label="加钟率">-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="depositRate" label="充值率">-->
<!-- </el-table-column>-->
<el-table-column prop="integral" label="最低积分" width="180">
</el-table-column>
<el-table-column prop="proportionalSharing" label="分成比例">
</el-table-column>
@ -54,23 +54,24 @@
<el-input v-model="grade" controls-position="right" placeholder="请输入技师等级" type="text" style="width: 50%"/>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">最低业绩</span>
<el-input-number v-model="outstandingAchievement" controls-position="right" :precision="2" :min="0" :step="1" placeholder="请输入最低业绩"/>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">加钟率</span>
<el-input-number v-model="clockRate" controls-position="right" :precision="2" :min="0" :max="1" :step="0.1" placeholder="请输入加钟率"/>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">充值率</span>
<el-input-number v-model="depositRate" controls-position="right" :precision="2" :min="0" :max="1" :step="0.1" placeholder="请输入充值率"/>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">在线时长</span>
<span style="width: 200px; display: inline-block; text-align: right">最低在线时长(小时)</span>
<el-input-number v-model="durationOnline" controls-position="right" :precision="0" :min="0" :step="1" placeholder="请输入在线时长"/>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">积分</span>
<span style="width: 200px; display: inline-block; text-align: right">最低业绩</span>
<el-input-number v-model="outstandingAchievement" controls-position="right" :precision="2" :min="0" :step="1" placeholder="请输入最低业绩"/>
</div>
<!-- <div style="margin-bottom: 10px">-->
<!-- <span style="width: 200px; display: inline-block; text-align: right">加钟率</span>-->
<!-- <el-input-number v-model="clockRate" controls-position="right" :precision="2" :min="0" :max="1" :step="0.1" placeholder="请输入加钟率"/>-->
<!-- </div>-->
<!-- <div style="margin-bottom: 10px">-->
<!-- <span style="width: 200px; display: inline-block; text-align: right">充值率</span>-->
<!-- <el-input-number v-model="depositRate" controls-position="right" :precision="2" :min="0" :max="1" :step="0.1" placeholder="请输入充值率"/>-->
<!-- </div>-->
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">最低积分</span>
<el-input-number v-model="integral" controls-position="right" :precision="0" :min="0" :step="1" placeholder="请输入积分"/>
</div>
<div style="margin-bottom: 10px">

View File

@ -0,0 +1,340 @@
<template>
<div>
<!-- 列表 -->
<el-button style="margin:10px;" size="mini" type="primary" icon="document" @click="handleSelect">刷新
</el-button>
<el-button
style="margin-left: 10px"
size="mini"
type="primary"
icon="document"
@click="handleEdit(0)"
>新增充值奖励配置
</el-button>
<el-table v-loading="tableDataLoading" :data="tableData">
<el-table-column fixed prop="id" label="编号" align="center" width="80">
</el-table-column>
<el-table-column fixed prop="money" label="充值金额" align="center">
</el-table-column>
<el-table-column prop="rewardMoney" label="奖励金额">
</el-table-column>
<el-table-column prop="integralRate" label="享受N倍积分">
</el-table-column>
<el-table-column label="操作" prop="id" width="360" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
style="margin: 5px"
@click="handleEdit(scope.row)"
>修改
</el-button>
<el-button
size="mini"
type="primary"
style="margin: 5px"
@click="handleDelete(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 添加修改 -->
<el-dialog :title="titles" :visible.sync="dialogFormVisible" center>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">充值金额</span>
<el-input-number v-model="money" controls-position="right" :precision="0" :min="0" :step="1" placeholder="请输入充值金额"/>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">奖励金额</span>
<el-input-number v-model="rewardMoney" controls-position="right" :precision="2" :min="0" :step="1" placeholder="请输入奖励金额"/>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">享受N倍积分</span>
<el-input-number v-model="integralRate" controls-position="right" :precision="2" :min="0" :max="1" :step="0.1" placeholder="请输入享受N倍积分"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="handleSubmit()"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
apiUrl: "",
titles: "",
tableDataLoading: false,
tableData: [],
id: "",
money: "",
rewardMoney: "",
integralRate: "",
dialogFormVisible: false,
};
},
methods: {
handleSelect() {
this.tableDataLoading = true;
this.$http({
url: this.$http.adornUrl("artificer/artificerRechargeReward/findList"),
method: "get",
params: this.$http.adornParams({}),
}).then(({data}) => {
if (data.code == 0) {
this.tableData = data.data;
} else {
this.$notify({
title: "提示",
duration: 1800,
message: data.msg,
type: "warning",
});
}
this.tableDataLoading = false;
});
},
//
handleEdit(row) {
if (row != 0) {
this.titles = "修改";
this.id = row.id;
this.money = row.money;
this.rewardMoney = row.rewardMoney;
this.integralRate = row.integralRate;
} else {
this.titles = "添加";
this.id = "";
this.money = "";
this.rewardMoney = "";
this.integralRate = "";
}
this.dialogFormVisible = true;
},
//
handleSubmit() {
if (this.money == "") {
this.$notify({
title: "提示",
duration: 1800,
message: "请输入充值金额",
type: "warning",
});
return;
}
if (this.rewardMoney == "") {
this.$notify({
title: "提示",
duration: 1800,
message: "请输入奖励金额",
type: "warning",
});
return;
}
if (this.integralRate == "") {
this.$notify({
title: "提示",
duration: 1800,
message: "请输入享受N倍积分",
type: "warning",
});
return;
}
if (this.titles == "添加") {
this.apiUrl = "artificer/artificerRechargeReward/add";
} else {
this.apiUrl = "artificer/artificerRechargeReward/update";
}
let params = {
id: this.id,
money: this.money,
rewardMoney: this.rewardMoney,
integralRate: this.integralRate,
}
console.log(params);
this.$http({
url: this.$http.adornUrl(this.apiUrl),
method: "post",
params: this.$http.adornParams({
id: this.id,
money: this.money,
rewardMoney: this.rewardMoney,
integralRate: this.integralRate,
}),
}).then(({data}) => {
if (data.code == 0) {
this.dialogFormVisible = false;
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.handleSelect();
},
});
} else {
this.$message({
message: data.msg,
type: "warning",
duration: 1500,
onClose: () => {
},
});
}
});
},
handleDelete(row){
this.$confirm(`确定删除此条信息?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let id = row.id;
this.$http({
url: this.$http.adornUrl("artificer/artificerRechargeReward/delete"),
method: "post",
params: this.$http.adornParams({
id: id
}),
}).then(({data}) => {
if (data.code == 0) {
this.$message({
message: "删除成功",
type: "success",
duration: 1500,
onClose: () => {
this.handleSelect();
},
});
} else {
this.$message({
message: data.msg,
type: "warning",
duration: 1500,
onClose: () => {
},
});
}
});
}).catch(() => {});
},
},
mounted() {
this.handleSelect();
},
};
</script>
<style>
.customWidth {
width: 80% !important;
}
.el-dialog--center {
text-align: center;
margin-top: 1vh !important;
}
.el-tooltip__popper {
width: 200px;
padding: 10px;
color: #000 !important;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
background-color: #fff !important;
}
.adver_main.box a {
display: flex;
justify-content: center;
height: 150px;
line-height: 150px;
text-decoration: none;
}
.bannerManin span {
display: inline-block;
margin-left: 5px;
}
.bannerManin img {
width: 48px;
height: 48px;
border-radius: 50%;
}
.bannerbtn a {
flex: 1;
text-align: center;
color: #3e8ef7 !important;
text-decoration: none;
}
.imgs {
position: relative;
border-radius: 6px;
width: 148px;
height: 148px;
margin-right: 10px;
display: inline-block;
}
.dels {
position: absolute;
top: 0;
left: 0;
display: none;
}
.dels .el-icon-delete {
line-height: 148px;
padding-left: 58px;
font-size: 25px;
color: #fff;
}
.imgs:hover .dels {
width: 100%;
height: 100%;
background: #000;
display: block;
opacity: 0.5;
}
.bqList {
padding: 4px 14px;
margin: 4px;
border: 1px solid #efefef;
font-size: 12px;
color: #999;
border-radius: 4px;
margin-right: 15px;
}
.delss {
display: none;
position: relative;
}
.delss .el-icon-delete {
position: absolute;
top: 0;
}
.bqList:hover .delss {
display: initial;
opacity: 0.5;
}
.tj {
padding: 6px !important;
margin: 4px;
font-size: 12px;
border: 1px solid #ccc;
border-radius: 4px;
}
</style>

View File

@ -310,38 +310,48 @@
@click="xiugaiJs(artificer)">
修改</el-button>
</td>
<th>最低在线时长(小时)</th>
<td>
{{ artificer.durationOnline }}
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;"
@click="xiugaiOnline(artificer)">
修改</el-button>
</td>
<th>城市</th>
<td>{{ artificer.city }}
<el-button size="mini"
style="color: #4f9dec;background: #fff;border: none;"
@click="cityChange()">修改</el-button>
</td>
</tr>
<tr>
<th>评分</th>
<td>
{{ artificer.ordersScore }}
</td>
<th>出行方式</th>
<td>
<span v-if="artificer.tripWay == 1">公交</span>
<span v-if="artificer.tripWay == 2">出租</span>
<span v-if="artificer.tripWay == 3">免费</span>
</td>
<th>当前物料包</th>
<td class="border-rt">
<div v-for="(item, index) in materialPackageOptions" :key="index"
class="borderInner">
class="borderInner">
<div>{{ item.materialName }}</div>
<div>{{ item.residue }}</div>
</div>
</td>
</tr>
<tr>
<th class="border-bt">评分</th>
<td class="border-bt">
{{ artificer.ordersScore }}
</td>
<th class="border-bt">出行方式</th>
<td class="border-bt">
<span v-if="artificer.tripWay == 1">公交</span>
<span v-if="artificer.tripWay == 2">出租</span>
<span v-if="artificer.tripWay == 3">免费</span>
</td>
<th class="border-bt">忙时</th>
<td class="border-bt border-rt" style="min-width: 300px;">
<span>日期</span>
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="artificerDate"
align="right" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择时间" @change="mangshi(artificerDate)">
align="right" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择时间" @change="mangshi(artificerDate)">
</el-date-picker>
<div v-if="timeList.length > 0" style="margin-top: 5px;">
<el-tag v-for="(item, index) in timeList" :key="index" style="margin:3px">
@ -350,6 +360,10 @@
</div>
<el-tag type="info" style="cursor:pointer" @click="updateMs">修改</el-tag>
</td>
<th class="border-bt"></th>
<td class="border-bt"></td>
<th class="border-bt"></th>
<td class="border-bt border-rt" style="min-width: 300px;"></td>
</tr>
</tbody>
</table>
@ -2160,6 +2174,18 @@
<el-button type="primary" @click="StairNoticeToJs()"> </el-button>
</div>
</el-dialog>
<!-- 修改最低在线时长 -->
<el-dialog title="最低在线时长" :visible.sync="dialogFormVisibleOnline" center>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">最低在线时长</span>
<el-input style="width:50%;" v-model="durationOnline" type="number" :min="0" :controls="false"
placeholder="最低在线时长"></el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisibleOnline = false"> </el-button>
<el-button type="primary" @click="StairNoticeToOnline()"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -2631,6 +2657,8 @@ import { serverPaths } from '@/utils/enumData'
JsartificerId: "",
currentIntegratingDate: this.getFormatDate(),
dialogFormVisibleJs: false,
durationOnline: 0,
dialogFormVisibleOnline: false,
materialPackageOptions: [],
integratingOptions: [{
title: "时长积分",
@ -5096,6 +5124,11 @@ import { serverPaths } from '@/utils/enumData'
this.artificerId = row.artificerId;
this.dialogFormVisibleJs = true;
},
xiugaiOnline(row) {
this.durationOnline = row.durationOnline;
this.artificerId = row.artificerId;
this.dialogFormVisibleOnline = true;
},
StairNoticeToJs() {
this.$http({
url: this.$http.adornUrl("artificer/updateArtificers"),
@ -5130,6 +5163,40 @@ import { serverPaths } from '@/utils/enumData'
}
});
},
StairNoticeToOnline() {
this.$http({
url: this.$http.adornUrl("artificer/updateArtificers"),
method: "post",
// params: this.$http.adornParams({
data: this.$http.adornData({
artificerId: this.artificerId,
durationOnline: this.durationOnline,
}),
}).then(({
data
}) => {
console.log("data", data);
if (data.code == 0) {
this.$message({
message: "修改成功",
type: "success",
duration: 1500,
onClose: () => {
this.dialogFormVisibleOnline = false;
this.autonymSelect();
this.mangshiSelect(this.artificerDate);
},
});
} else {
this.$message({
message: data.msg,
type: "warning",
duration: 1500,
onClose: () => {},
});
}
});
},
//
deleteClick(row) {
let delid = row.id;