no message

This commit is contained in:
wangh 2024-01-25 10:24:55 +08:00
parent 661fb65605
commit a09d3208af
11 changed files with 135 additions and 75 deletions

View File

@ -384,7 +384,10 @@
</div>
<!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> -->
<div>
<el-input v-model="authCode" @keydown.enter.native="collection"
<el-input v-model="authCode"
v-focus ref="getFocus"
autofocus="autofocus"
@keydown.enter.native="collection"
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
<i
slot="suffix">
@ -978,6 +981,19 @@ export default {
this.selectOilType(this.oilTypeList[0].oilType);
}
},
directives: {
// v-focus
focus: {
//
inserted: function (el) {
//
el.querySelector('input').focus()
// this.$nextTick( () =>{
// this.$refs.getFocus.focus()
// })
},
},
},
created() {
this.id = this.$route.query.id;
this.getUserInfo();

View File

@ -130,7 +130,7 @@
@click="patchwork(scope.row)"
type="primary" plain round>补打</el-button>
<el-button style="width: 60px" size="mini"
v-if = "scope.row.status !== 'refund'"
v-if = "scope.row.status === 'paid'"
@click="handleRefund(scope.row.id)"
type="danger" plain round>退款</el-button>
</template>
@ -230,6 +230,8 @@
</el-dialog>
<!-- 订单退款-->
<el-dialog
:close-on-click-modal="false"
title="订单退款"
width="25%"
:visible.sync="dialogRefund">
@ -247,7 +249,7 @@
</el-radio-group>
</div>
<div>
<el-input placeholder="请输入退款原因" v-model="refundRemark" show-password></el-input>
<el-input placeholder="请输入退款原因" v-model="refundRemark" ></el-input>
<br/>
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回优惠券储值卡等原路退回处理</span>
</div>
@ -394,6 +396,9 @@ import {refundApi} from "@/api/order/refund";
type: "canRefund"
}
refundApi(map).then(res=>{
// if() {
//
// }
this.$message({
type: 'info',
message: '退款成功'

View File

@ -158,7 +158,7 @@
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button style="width: 60px" size="mini"
v-if = "scope.row.status !== 'refund'"
v-if = "scope.row.status === 'paid'"
@click="handleRefund(scope.row.id)"
type="danger" plain round>退款</el-button>
</template>
@ -180,6 +180,8 @@
<!-- 订单退款-->
<el-dialog
:close-on-click-modal="false"
title="订单退款"
width="25%"
:visible.sync="dialogRefund">
@ -197,7 +199,7 @@
</el-radio-group>
</div>
<div>
<el-input placeholder="请输入退款原因" v-model="refundRemark" show-password></el-input>
<el-input placeholder="请输入退款原因" v-model="refundRemark" ></el-input>
<br/>
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回优惠券储值卡等原路退回处理</span>
</div>

View File

@ -208,7 +208,7 @@
type="primary" plain round>补打</el-button>
<el-button style="width: 60px" size="mini"
@click="handleRefund(scope.row.id)"
v-if = "scope.row.status !== 'refund'"
v-if = "scope.row.status === 'paid'"
type="danger" plain round>退款</el-button>
</template>
</el-table-column>
@ -229,6 +229,7 @@
<!-- 订单退款-->
<el-dialog
:close-on-click-modal="false"
title="订单退款"
width="25%"
:visible.sync="dialogRefund">
@ -246,7 +247,7 @@
</el-radio-group>
</div>
<div>
<el-input placeholder="请输入退款原因" v-model="refundRemark" show-password></el-input>
<el-input placeholder="请输入退款原因" v-model="refundRemark" ></el-input>
<br/>
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回优惠券储值卡等原路退回处理</span>
</div>

View File

@ -74,12 +74,13 @@ export function resetUserPwd(userId, password) {
password
}
return request({
url: '/system/user/resetPwd',
method: 'put',
url: '/backendApi/account/resetPwd',
method: 'post',
data: data
})
}
// url: '/system/user/resetPwd',
//
// 用户状态修改
export function changeUserStatus(userId, status) {
const data = {

View File

@ -782,53 +782,12 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
save(mtUser);
// 新增余额信息
if (ObjectUtil.isNotEmpty(storeId) && storeId !="") {
LJStore store = iljStoreService.selectStoreByStoreId(Integer.parseInt(storeId));
// 根据userid和连锁店id查询是否存在对应的余额信息
UserBalance userBalance = userBalanceService.selectUserBalance(mtUser.getId(), store.getChainStoreId());
if (ObjectUtil.isEmpty(userBalance)) {
// 新增余额信息
UserBalance userBalanceAdd = new UserBalance();
userBalanceAdd.setMtUserId(mtUser.getId());
userBalanceAdd.setStoreId(Integer.parseInt(storeId));
userBalanceAdd.setChainStoreId(store.getChainStoreId());
userBalanceAdd.setCardBalance(0.0);
userBalanceAdd.setPoints(0);
userBalanceAdd.setGrowthValue(0);
userBalanceAdd.setConsumeNum(0);
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeByStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(ljUserGrade) && ObjectUtil.isNotEmpty(ljUserGrade.getId())) {
userBalanceAdd.setGradeId(ljUserGrade.getId());
}
// 新增会员余额信息
userBalanceService.insertUserBalance(userBalanceAdd);
}
// 查询关联表里面是否有信息 注册邀请
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), mtUser.getId());
if (ObjectUtil.isEmpty(mtInvitation1)) {
MtInvitation mtInvitation = new MtInvitation();
mtInvitation.setUserId(mtUser.getId());
mtInvitation.setStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(staffId) && staffId !="") {
mtInvitation.setStaffId(Integer.parseInt(staffId));
}
if (ObjectUtil.isNotEmpty(inviterId) && inviterId !="") {
mtInvitation.setInviterId(Integer.parseInt(inviterId));
}
if (!ObjectUtil.isEmpty(store)){
mtInvitation.setChainStoreId(store.getChainStoreId());
}
mtInvitationMapper.insert(mtInvitation);
}
createVaseInfo(mtUser, storeId, staffId, inviterId);
}
return mtUser;
}else {
@ -840,23 +799,16 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
mtUserMobile.setOpenId(openId);
updateById(mtUserMobile);
// 新增余额信息
if (ObjectUtil.isNotEmpty(storeId) && storeId !="") {
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), mtUserMobile.getId());
if (ObjectUtil.isEmpty(mtInvitation1)) {
MtInvitation mtInvitation = new MtInvitation();
mtInvitation.setUserId(mtUserMobile.getId());
mtInvitation.setStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(staffId) && staffId !="") {
mtInvitation.setStaffId(Integer.parseInt(staffId));
}
if (ObjectUtil.isNotEmpty(inviterId) && inviterId !="") {
mtInvitation.setInviterId(Integer.parseInt(inviterId));
}
mtInvitationMapper.insert(mtInvitation);
}
createVaseInfo(mtUserMobile,storeId,staffId,inviterId);
}
}
return mtUserMobile;
} else {
@ -977,6 +929,53 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
}
/**
* 创建用户的基础信息
*/
private void createVaseInfo (MtUser mtUser, String storeId,String staffId, String inviterId) {
LJStore store = iljStoreService.selectStoreByStoreId(Integer.parseInt(storeId));
// 根据userid和连锁店id查询是否存在对应的余额信息
UserBalance userBalance = userBalanceService.selectUserBalance(mtUser.getId(), store.getChainStoreId());
if (ObjectUtil.isEmpty(userBalance)) {
// 新增余额信息
UserBalance userBalanceAdd = new UserBalance();
userBalanceAdd.setMtUserId(mtUser.getId());
userBalanceAdd.setStoreId(Integer.parseInt(storeId));
userBalanceAdd.setChainStoreId(store.getChainStoreId());
userBalanceAdd.setCardBalance(0.0);
userBalanceAdd.setPoints(0);
userBalanceAdd.setGrowthValue(0);
userBalanceAdd.setConsumeNum(0);
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeByStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(ljUserGrade) && ObjectUtil.isNotEmpty(ljUserGrade.getId())) {
userBalanceAdd.setGradeId(ljUserGrade.getId());
}
// 新增会员余额信息
userBalanceService.insertUserBalance(userBalanceAdd);
}
// 查询关联表里面是否有信息 注册邀请
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), mtUser.getId());
if (ObjectUtil.isEmpty(mtInvitation1)) {
MtInvitation mtInvitation = new MtInvitation();
mtInvitation.setUserId(mtUser.getId());
mtInvitation.setStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(staffId) && staffId !="") {
mtInvitation.setStaffId(Integer.parseInt(staffId));
}
if (ObjectUtil.isNotEmpty(inviterId) && inviterId !="") {
mtInvitation.setInviterId(Integer.parseInt(inviterId));
}
if (!ObjectUtil.isEmpty(store)){
mtInvitation.setChainStoreId(store.getChainStoreId());
}
mtInvitationMapper.insert(mtInvitation);
}
}
//生成用户编号
private String editUserNo() {

View File

@ -339,6 +339,7 @@
<div>
<el-input v-model="authCode"
v-focus ref="getFocus"
autofocus="autofocus"
@keydown.enter.native="collection"
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
@ -475,6 +476,19 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
this.getStaffList();
this.getStaff();
},
directives: {
// v-focus
focus: {
//
inserted: function (el) {
//
el.querySelector('input').focus()
// this.$nextTick( () =>{
// this.$refs.getFocus.focus()
// })
},
},
},
methods:{
//
async getGift() {

View File

@ -130,7 +130,7 @@
@click="patchwork(scope.row)"
type="primary" plain round>补打</el-button>
<el-button style="width: 60px" size="mini"
v-if = "scope.row.status !== 'refund'"
v-if = "scope.row.status === 'paid'"
@click="handleRefund(scope.row.id)"
type="danger" plain round>退款</el-button>
</template>
@ -230,6 +230,7 @@
</el-dialog>
<!-- 订单退款-->
<el-dialog
:close-on-click-modal="false"
title="订单退款"
width="25%"
:visible.sync="dialogRefund">
@ -247,7 +248,7 @@
</el-radio-group>
</div>
<div>
<el-input placeholder="请输入退款原因" v-model="refundRemark" show-password></el-input>
<el-input placeholder="请输入退款原因" v-model="refundRemark"></el-input>
<br/>
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回优惠券储值卡等原路退回处理</span>
</div>

View File

@ -158,7 +158,7 @@
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button style="width: 60px" size="mini"
v-if = "scope.row.status !== 'refund'"
v-if = "scope.row.status === 'paid'"
@click="handleRefund(scope.row.id)"
type="danger" plain round>退款</el-button>
</template>
@ -180,6 +180,8 @@
<!-- 订单退款-->
<el-dialog
:close-on-click-modal="false"
title="订单退款"
width="25%"
:visible.sync="dialogRefund">
@ -197,7 +199,7 @@
</el-radio-group>
</div>
<div>
<el-input placeholder="请输入退款原因" v-model="refundRemark" show-password></el-input>
<el-input placeholder="请输入退款原因" v-model="refundRemark"></el-input>
<br/>
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回优惠券储值卡等原路退回处理</span>
</div>

View File

@ -208,7 +208,7 @@
type="primary" plain round>补打</el-button>
<el-button style="width: 60px" size="mini"
@click="handleRefund(scope.row.id)"
v-if = "scope.row.status !== 'refund'"
v-if = "scope.row.status === 'paid'"
type="danger" plain round>退款</el-button>
</template>
</el-table-column>
@ -229,6 +229,8 @@
<!-- 订单退款-->
<el-dialog
:close-on-click-modal="false"
title="订单退款"
width="25%"
:visible.sync="dialogRefund">
@ -246,7 +248,7 @@
</el-radio-group>
</div>
<div>
<el-input placeholder="请输入退款原因" v-model="refundRemark" show-password></el-input>
<el-input placeholder="请输入退款原因" v-model="refundRemark"></el-input>
<br/>
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回优惠券储值卡等原路退回处理</span>
</div>

View File

@ -386,7 +386,11 @@
</div>
<!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> -->
<div>
<el-input v-model="authCode" @keydown.enter.native="collection"
<el-input v-model="authCode"
v-focus ref="getFocus"
autofocus
@keydown.enter.native="collection"
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
<i
slot="suffix">
@ -970,6 +974,19 @@ export default {
}
}
},
directives: {
// v-focus
focus: {
//
inserted: function (el) {
//
el.querySelector('input').focus()
// this.$nextTick( () =>{
// this.$refs.getFocus.focus()
// })
},
},
},
mounted() {
if (this.oilTypeList.length > 0) {
this.selectOilType(this.oilTypeList[0].oilType);