This commit is contained in:
YeMingfei666 2024-08-26 11:15:34 +08:00
commit 770c369ebd
4 changed files with 36 additions and 35 deletions

View File

@ -33,7 +33,7 @@
<el-table-column prop="showPosition" label="是否可见">
<template v-slot="scope">
<el-switch v-model="scope.row.status" :active-value="1" :inactive-value="0"
@change="showChange($event, scope.row)"></el-switch>
@change="showChange(scope.row)"></el-switch>
</template>
</el-table-column>
<el-table-column prop="" label="弹窗频率">
@ -179,13 +179,15 @@ export default {
let index = this.fileList.findIndex(ele => ele.url == file.response.data[0])
this.fileList.splice(index, 1);
},
async showChange(a, d) {
async showChange(d) {
if (!d.imgUrl) {
this.form.imgUrl = this.fileList
}
await adput({
...d,
...this.form
imgUrl:d.imgUrl,
id: d.id,
shopId: this.form.shopId,
status: d.status,
})
this.$message({
message: '成功',

View File

@ -1,11 +1,5 @@
<template>
<el-drawer
title="订单详情"
size="50%"
:visible.sync="drawer"
direction="rtl"
v-loading="loading"
>
<el-drawer title="订单详情" size="50%" :visible.sync="drawer" direction="rtl" v-loading="loading">
<div class="header">
<div class="title">收银订单</div>
<div class="table">
@ -50,20 +44,13 @@
<div>订单原价{{ detail.originAmount }}</div>
<div>优惠金额{{ detail.userCouponAmount || "-" }}</div>
<div>
实收金额<span style="color: red;"
>{{ detail.payAmount }}</span
>
实收金额<span style="color: red;">{{ detail.payAmount }}</span>
</div>
</div>
<div class="row">
<div>
退款金额{{ detail.refundAmount }}
<span
style="color: #FF9731;cursor: pointer;"
v-if="detail.isRefund"
@click="type = '3'"
>退款详情></span
>
<span style="color: #FF9731;cursor: pointer;" v-if="detail.isRefund" @click="type = '3'">退款详情></span>
</div>
<div>支付方式{{ detail.payType }}</div>
</div>
@ -88,12 +75,9 @@
<el-table-column label="商品">
<template v-slot="scope">
<div class="shop_info">
<el-image
:src="scope.row.productImg"
style="width: 40px;height: 40px;"
></el-image>
<el-image :src="scope.row.productImg" style="width: 40px;height: 40px;"></el-image>
<div class="info">
<span>{{ scope.row.productName }}</span>
<span :class="[scope.row.isVip == 1 ? 'colorStyle' : '']">{{ scope.row.productName }}</span>
<span style="color: #999;">{{
scope.row.productSkuName
}}</span>
@ -125,10 +109,7 @@
<div class="list">
<div class="list_row" v-for="val in item.detailList">
<div class="item">
<el-image
:src="val.productImg"
style="width: 50px;height: 50px;"
></el-image>
<el-image :src="val.productImg" style="width: 50px;height: 50px;"></el-image>
<span class="name">{{ val.productName }}</span>
</div>
<div class="item">
@ -358,4 +339,8 @@ export default {
}
}
}
.colorStyle {
color: #ffc315;
}
</style>

View File

@ -108,7 +108,9 @@
<el-image :src="item.productImg" class="cover" lazy></el-image>
<div class="info">
<div class="name">
{{ item.productName }}
<span :class="[item.isVip==1?'colorStyle':'']">
{{ item.productName }}
</span>
<span class="refund" v-if="item.refundNumber">(退 - {{ item.refundNumber }})</span>
</div>
<div class="sku">{{ item.productSkuName }}</div>
@ -518,4 +520,7 @@ export default {
}
}
}
.colorStyle{
color: #ffc315;
}
</style>

View File

@ -118,7 +118,7 @@
<el-dialog title="编辑" :visible.sync="dialogVisibleedit" width="30%">
<el-form ref="form" :model="userinfos" label-width="80px">
<el-form-item label="生日">
<el-date-picker v-model="userinfos.birthDay" type="date" placeholder="选择日期" value-format="yyyy-MM-dd">
<el-date-picker v-model="userinfos.birthDay" type="date" placeholder="选择日期" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="会员名称">
@ -148,11 +148,14 @@
</span>
</el-dialog>
<!-- 增减余额弹窗 -->
<el-dialog title="增减余额" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
<el-dialog title="增减余额" :visible.sync="dialogVisible" width="30%">
<el-form ref="form" :model="userinfo" label-width="80px">
<el-form-item label="用户">
{{ userinfo.nickName }}
</el-form-item>
<el-form-item label="余额">
{{ userinfo.amounts }}
</el-form-item>
<el-form-item label="增减">
<el-radio-group v-model="userinfo.operationType">
<el-radio label="in">增加</el-radio>
@ -160,7 +163,7 @@
</el-radio-group>
</el-form-item>
<el-form-item label="余额">
<el-input v-model="userinfo.amount" @input="checkIfNum"></el-input>
<el-input v-model="userinfo.amount" @input="amountNum" style="width: 200px;"></el-input>
</el-form-item>
<el-form-item label="类型">
<el-radio-group v-model="userinfo.type">
@ -227,15 +230,20 @@ export default {
},
methods: {
checkIfNum() {
this.userinfo.amount = this.userinfo.amount.toString().replace(/\D/g, '');
this.userinfos.telephone = this.userinfos.telephone.toString().replace(/\D/g, '');
},
amountNum(){
this.userinfo.amount = this.userinfo.amount.toString().replace(/[^\d|\.]/g, '')
},
handleClose() {
this.dialogVisible = false
this.userinfo = {}
},
async sumbituser() {
let res = await tbShopUseredit({
...this.userinfos,
levelConsume:'0',
levelConsume: '0',
shopId: localStorage.getItem("shopId"),
})
this.$message.success('修改成功')
@ -251,6 +259,7 @@ export default {
editPop(d) {
this.dialogVisible = true
this.userinfo.nickName = d.nickName
this.userinfo.amounts = d.amount
this.userinfo.id = d.id
},
edituser(d) {