编辑时间,积分抵用,列表

This commit is contained in:
faiz 2024-12-07 18:17:04 +08:00
parent d15c719d48
commit 41b993cc9a
5 changed files with 1218 additions and 952 deletions

View File

@ -499,6 +499,10 @@ export function updatetProductLabel(id, data) {
export function updatetSeckillLabel(id, data) {
return request.post(`seckill/product/labels/${id}`, data)
}
/** 秒杀列表 -- 编辑时间 */
export function updatetSeckillUpdate(id, data) {
return request.post(`seckill/product/update/day/${id}`, data)
}
/** 预售列表 -- 编辑标签 */
export function updatetPresellLabel(id, data) {
return request.post(`store/product/presell/labels/${id}`, data)

File diff suppressed because it is too large Load Diff

View File

@ -38,7 +38,7 @@
</el-select>
</el-select>
</el-form-item>
<el-form-item label="提现方式:" prop="extract_type">
<el-form-item label="方式:" prop="extract_type">
<el-select
v-model="tableFrom.extract_type"
clearable
@ -106,7 +106,7 @@
<el-table-column prop="extract_price" label="提现金额" min-width="90" />
<el-table-column prop="tx_price" label="到账金额" min-width="90" />
<el-table-column prop="ratio_price" label="手续费" min-width="90" />
<el-table-column label="提现方式" min-width="100">
<el-table-column label="方式" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.extract_type | extractTypeFilter }}</span>
</template>
@ -250,7 +250,7 @@
</div>
</div>
<div class="list-count">
<div class="title">提现方式</div>
<div class="title">方式</div>
<div class="acea-row">
<div class="list">
<label class="name">审核状态</label

View File

@ -13,58 +13,96 @@
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="积分:" prop="integral_status">
<el-radio-group
v-model="formValidate.integral_status">
<el-radio-group v-model="formValidate.integral_status">
<el-radio :label="0" class="radio">关闭</el-radio>
<el-radio :label="1">开启</el-radio>
</el-radio-group>
<span class="label_tip">指平台积分功能的开启或关闭开启积分功能正常启用关闭积分功能不可使用且前端不展示</span>
<span class="label_tip"
>指平台积分功能的开启或关闭开启积分功能正常启用关闭积分功能不可使用且前端不展示</span
>
</el-form-item>
</el-col>
<el-col :span="24" v-if="formValidate.integral_status>0">
<el-col :span="24" v-if="formValidate.integral_status > 0">
<el-form-item label="积分赠送:" prop="integral_give_status">
<el-radio-group
v-model="formValidate.integral_give_status">
<el-radio-group v-model="formValidate.integral_give_status">
<el-radio :label="0" class="radio">关闭</el-radio>
<el-radio :label="1">开启</el-radio>
</el-radio-group>
<!-- <span class="label_tip">指平台积分功能的开启或关闭开启积分功能正常启用关闭积分功能不可使用且前端不展示</span> -->
</el-form-item>
</el-col>
<!-- <el-col v-if="formValidate.integral_status>0">
<el-col v-if="formValidate.integral_status > 0">
<el-form-item label="积分抵用金额:" prop="integral_money">
<el-input-number :min="0" v-model="formValidate.integral_money" size="small" placeholder="积分抵用金额" />
<el-input-number
:min="0"
v-model="formValidate.integral_money"
size="small"
placeholder="积分抵用金额"
/>
<span class="label_tip">指1积分抵用多少金额单位 </span>
</el-form-item>
</el-col> -->
<el-col v-if="formValidate.integral_status>0">
<el-form-item label="订单返还积分比例(%)" prop="integral_price_return_rate">
<el-input-number :min="0" v-model="formValidate.integral_price_return_rate" size="small" placeholder="订单返还积分比例(%)" />
</el-col>
<el-col v-if="formValidate.integral_status > 0">
<el-form-item
label="订单返还积分比例(%)"
prop="integral_price_return_rate"
>
<el-input-number
:min="0"
v-model="formValidate.integral_price_return_rate"
size="small"
placeholder="订单返还积分比例(%)"
/>
<span class="label_tip">订单支付价格返还比例%</span>
</el-form-item>
</el-col>
<el-col v-if="formValidate.integral_status>0">
<el-col v-if="formValidate.integral_status > 0">
<el-form-item label="积分兑现倍数:" prop="integral_money_time">
<el-input-number :min="0" v-model="formValidate.integral_money_time" size="small" placeholder="积分兑现倍数" />
<el-input-number
:min="0"
v-model="formValidate.integral_money_time"
size="small"
placeholder="积分兑现倍数"
/>
<span class="label_tip">一元兑积分数量</span>
</el-form-item>
</el-col>
<el-col v-if="formValidate.integral_status>0">
<el-col v-if="formValidate.integral_status > 0">
<el-form-item label="积分签到返还天数:" prop="integral_return_day">
<el-input-number :min="0" v-model="formValidate.integral_return_day" size="small" placeholder="积分签到返还天数" />
<el-input-number
:min="0"
v-model="formValidate.integral_return_day"
size="small"
placeholder="积分签到返还天数"
/>
<span class="label_tip">积分连续签到返还结束天数</span>
</el-form-item>
</el-col>
<el-col v-if="formValidate.integral_status>0">
<el-col v-if="formValidate.integral_status > 0">
<el-form-item label="每日签到封顶积分:" prop="integral_sign_max">
<el-input-number :min="0" v-model="formValidate.integral_sign_max" size="small" placeholder="每日签到封顶积分" />
<el-input-number
:min="0"
v-model="formValidate.integral_sign_max"
size="small"
placeholder="每日签到封顶积分"
/>
<span class="label_tip">每个用户日签到获得积分上限</span>
</el-form-item>
</el-col>
<el-col v-if="formValidate.integral_status>0">
<el-form-item label="每日签到积分递减(%)" prop="integral_sign_dec_rate">
<el-input-number :min="0" v-model="formValidate.integral_sign_dec_rate" size="small" placeholder="每日签到积分递减(%)" />
<span class="label_tip">每个用户日签到获得每单返还积分逐日递减%</span>
<el-col v-if="formValidate.integral_status > 0">
<el-form-item
label="每日签到积分递减(%)"
prop="integral_sign_dec_rate"
>
<el-input-number
:min="0"
v-model="formValidate.integral_sign_dec_rate"
size="small"
placeholder="每日签到积分递减(%)"
/>
<span class="label_tip"
>每个用户日签到获得每单返还积分逐日递减%</span
>
</el-form-item>
</el-col>
<!-- <el-col v-if="formValidate.integral_status>0">
@ -93,7 +131,7 @@
</el-col> -->
</el-row>
<!-- 积分说明-->
<el-row v-if="formValidate.integral_status>0">
<el-row v-if="formValidate.integral_status > 0">
<el-col :span="24">
<el-form-item label="积分说明:">
<vue-ueditor-wrap
@ -104,13 +142,28 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item style="margin-top:30px;">
<el-button v-if="formValidate.integral_status>0" :loading="loading" type="primary" class="submission" size="small" @click="preview">预览</el-button>
<el-button :loading="loading" type="primary" class="submission" size="small" @click="handleSubmit('formValidate')">提交</el-button>
<el-form-item style="margin-top: 30px">
<el-button
v-if="formValidate.integral_status > 0"
:loading="loading"
type="primary"
class="submission"
size="small"
@click="preview"
>预览</el-button
>
<el-button
:loading="loading"
type="primary"
class="submission"
size="small"
@click="handleSubmit('formValidate')"
>提交</el-button
>
</el-form-item>
</el-form>
</el-card>
<div class="Box" v-if="formValidate.integral_status>0">
<div class="Box" v-if="formValidate.integral_status > 0">
<el-dialog
v-if="modals"
:visible.sync="modals"
@ -131,14 +184,13 @@
</template>
<script>
import ueditorFrom from "@/components/ueditorFrom";
import VueUeditorWrap from "vue-ueditor-wrap";
import { mapState } from 'vuex'
import { mapState } from "vuex";
import { getIntegralConfig, updateIntegralConfig } from "@/api/marketing";
import { roterPre } from "@/settings";
import SettingMer from '@/libs/settingMer';
import { getToken } from '@/utils/auth'
import SettingMer from "@/libs/settingMer";
import { getToken } from "@/utils/auth";
const defaultObj = {
integral_status: 1,
@ -148,31 +200,32 @@ const defaultObj = {
integral_order_rate: 0,
integral_money: 0,
rule: "",
integral_give_status:1,
integral_price_return_rate:0,
integral_money_time:0,
integral_return_day:0,
integral_sign_max:0,
integral_sign_dec_rate:0
integral_give_status: 1,
integral_price_return_rate: 0,
integral_money_time: 0,
integral_return_day: 0,
integral_sign_max: 0,
integral_sign_dec_rate: 0,
};
export default {
name: "ProductProductAdd",
components: { ueditorFrom, VueUeditorWrap },
data() {
const url = SettingMer.https + '/upload/image/0/file?ueditor=1&token=' + getToken()
const url =
SettingMer.https + "/upload/image/0/file?ueditor=1&token=" + getToken();
return {
myConfig: {
autoHeightEnabled: false, //
initialFrameHeight: 500, //
initialFrameWidth: "100%", //
UEDITOR_HOME_URL: '/UEditor/',
'serverUrl': url,
'imageUrl': url,
'imageFieldName': 'file',
imageUrlPrefix: '',
'imageActionName': 'upfile',
'imageMaxSize': 2048000,
'imageAllowFiles': ['.png', '.jpg', '.jpeg', '.gif', '.bmp']
UEDITOR_HOME_URL: "/UEditor/",
serverUrl: url,
imageUrl: url,
imageFieldName: "file",
imageUrlPrefix: "",
imageActionName: "upfile",
imageMaxSize: 2048000,
imageAllowFiles: [".png", ".jpg", ".jpeg", ".gif", ".bmp"],
},
roterPre: roterPre,
fullscreenLoading: false,
@ -181,36 +234,45 @@ export default {
modals: false,
ruleValidate: {
integral_status: [
{ required: true, message: "请选择是否开启积分功能", trigger: "blur" }
{
required: true,
message: "请选择是否开启积分功能",
trigger: "blur",
},
],
integral_money: [
{ required: true, message: "请输入积分抵用金额", trigger: "blur" }
{ required: true, message: "请输入积分抵用金额", trigger: "blur" },
],
integral_order_rate: [
{ required: true, message: "请输入下单赠送积分比例", trigger: "blur" }
{
required: true,
message: "请输入下单赠送积分比例",
trigger: "blur",
},
],
integral_freeze: [
{ required: true, message: "请输入下单赠送积分冻结期", trigger: "blur" }
{
required: true,
message: "请输入下单赠送积分冻结期",
trigger: "blur",
},
],
integral_clear_time: [
{ required: true, message: "请输入积分清除时间", trigger: "blur" }
{ required: true, message: "请输入积分清除时间", trigger: "blur" },
],
integral_user_give: [
{ required: true, message: "请输入邀请好友赠送积分数", trigger: "blur" }
]
{
required: true,
message: "请输入邀请好友赠送积分数",
trigger: "blur",
},
],
},
};
},
computed: {
},
watch: {
},
created() {
},
computed: {},
watch: {},
created() {},
mounted() {
this.getInfo();
},
@ -219,32 +281,32 @@ export default {
getInfo() {
this.fullscreenLoading = true;
getIntegralConfig()
.then(async res => {
this.formValidate = res.data
.then(async (res) => {
this.formValidate = res.data;
this.fullscreenLoading = false;
})
.catch(res => {
.catch((res) => {
this.fullscreenLoading = false;
this.$message.error(res.message);
});
},
preview(){
preview() {
this.modals = true;
},
//
handleSubmit(name) {
this.$refs[name].validate(valid => {
this.$refs[name].validate((valid) => {
if (valid) {
this.fullscreenLoading = true;
this.loading = true;
updateIntegralConfig(this.formValidate)
.then(async res => {
.then(async (res) => {
this.fullscreenLoading = false;
this.$message.success(res.message);
this.loading = false;
})
.catch(res => {
.catch((res) => {
this.fullscreenLoading = false;
this.loading = false;
this.$message.error(res.message);
@ -258,29 +320,29 @@ export default {
this.$message.warning(error);
}
},
//
//
addCustomDialog(editorId) {
window.UE.registerUI(
"test-dialog",
function(editor, uiName) {
function (editor, uiName) {
// dialog
let dialog = new window.UE.ui.Dialog({
iframeUrl: roterPre + "/admin/widget/image?field=dialog",
editor: editor,
name: uiName,
title: "上传图片",
cssRules: "width:1200px;height:500px;padding:20px;"
cssRules: "width:1200px;height:500px;padding:20px;",
});
this.dialog = dialog;
let btn = new window.UE.ui.Button({
name: "dialog-button",
title: "上传图片",
cssRules: `background-image: url(../../../assets/images/icons.png);background-position: -726px -77px;`,
onclick: function() {
onclick: function () {
// dialog
dialog.render();
dialog.open();
}
},
});
return btn;
},
@ -288,35 +350,35 @@ export default {
);
window.UE.registerUI(
"video-dialog",
function(editor, uiName) {
function (editor, uiName) {
let dialog = new window.UE.ui.Dialog({
iframeUrl: roterPre + "/admin/widget/video?fodder=video",
editor: editor,
name: uiName,
title: "上传视频",
cssRules: "width:600px;height:420px;padding:10px 20px 20px;"
cssRules: "width:600px;height:420px;padding:10px 20px 20px;",
});
this.dialog = dialog;
let btn = new window.UE.ui.Button({
name: "video-button",
title: "上传视频",
cssRules: `background-image: url(../../../assets/images/icons.png);background-position: -320px -20px;`,
onclick: function() {
onclick: function () {
// dialog
dialog.render();
dialog.open();
}
},
});
return btn;
},
38
);
}
}
},
},
};
</script>
<style scoped lang="scss">
.label_tip{
.label_tip {
display: inline-block;
margin-left: 20px;
color: #282828;
@ -327,13 +389,14 @@ export default {
.selWidthd {
width: 300px;
}
.dialog-scustom,.addDia{
.dialog-scustom,
.addDia {
min-width: 400px;
height: 900px;
.el-dialog{
.el-dialog {
width: 400px;
}
h3{
h3 {
color: #333;
font-size: 16px;
text-align: center;
@ -341,25 +404,25 @@ export default {
margin: 0;
}
}
.agreement{
.agreement {
width: 350px;
margin: 0 auto;
box-shadow: 1px 5px 5px 2px rgba(0,0,0,.2);
box-shadow: 1px 5px 5px 2px rgba(0, 0, 0, 0.2);
padding: 26px;
border-radius: 15px;
.content{
.content {
height: 600px;
overflow-y:scroll;
overflow-y: scroll;
}
p{
p {
text-align: justify;
}
}
.agreement .content ::v-deep p{
.agreement .content ::v-deep p {
font-size: 13px;
line-height: 22px;
}
.agreement ::v-deep img{
.agreement ::v-deep img {
max-width: 100%;
}
/*css主要部分的样式*/
@ -369,7 +432,7 @@ export default {
height: 10px; /*对水平流动条有效*/
}
/*定义滚动条的轨道颜色、内阴影及圆角*/
::-webkit-scrollbar-track{
::-webkit-scrollbar-track {
/*-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);*/
background-color: transparent;
border-radius: 3px;
@ -418,5 +481,4 @@ export default {
left: 46px;
top: -4px;
}
</style>

View File

@ -325,6 +325,9 @@
@click="onEdit(scope.row.product_id)"
>编辑</el-button
>
<el-button type="text" size="small" @click="onEditDate(scope.row)"
>编辑时间</el-button
>
<el-button type="text" size="small" @click="onAuditFree(scope.row)"
>价格编辑</el-button
>
@ -692,6 +695,39 @@
>
</span>
</el-dialog>
<!--编辑时间-->
<el-dialog
v-if="dialogDate"
title="编辑时间"
:visible.sync="dialogDate"
width="470px"
:before-close="handleClose"
>
<el-form
ref="dateForm"
:model="dateForm"
size="small"
@submit.native.prevent
>
<el-form-item prop="date">
<el-date-picker
v-model="dateForm.date"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogDate = false">取消</el-button>
<el-button
type="primary"
size="small"
@click="submitDateForm('dateForm')"
>提交</el-button
>
</span>
</el-dialog>
<edit-attr ref="editAttr" />
</div>
</template>
@ -708,6 +744,7 @@ import {
seckillProductOffApi,
getProductLabelApi,
updatetSeckillLabel,
updatetSeckillUpdate,
exportSeckillApi,
} from "@/api/product";
import { seckillDetailApi } from "@/api/marketing";
@ -781,6 +818,9 @@ export default {
timeVal: [],
dialogVisible: false,
detailDialog: false,
dateForm: {
date: "",
},
checkboxGroup: [],
formValidate: {
is_hot: 0,
@ -851,6 +891,8 @@ export default {
previewKey: "",
labelList: [],
dialogLabel: false,
dialogDate: false,
seckill_active_id: "",
labelForm: {},
};
},
@ -988,6 +1030,14 @@ export default {
sys_labels: row.sys_labels,
};
},
//
onEditDate(row) {
this.dialogDate = true;
this.seckill_active_id = row.seckillActive.seckill_active_id;
this.dateForm = {
date: row.seckillActive.start_day,
};
},
submitForm(name) {
this.$refs[name].validate((valid) => {
if (valid) {
@ -1003,6 +1053,21 @@ export default {
}
});
},
submitDateForm(name) {
this.$refs[name].validate((valid) => {
if (valid) {
updatetSeckillUpdate(this.seckill_active_id, this.dateForm).then(
({ message }) => {
this.$message.success(message);
this.getList("");
this.dialogDate = false;
}
);
} else {
return;
}
});
},
//
handleSubmit(name) {
this.$refs[name].validate((valid) => {
@ -1040,8 +1105,10 @@ export default {
: (this.formValidate.is_hot = 0 && this.checkboxGroup.remove("is_hot"));
},
handleClose() {
this.$refs["dateForm"].resetFields();
this.dialogVisible = false;
this.dialogLabel = false;
this.dialogDate = false;
},
watCh(val) {
const tmp = {};