This commit is contained in:
Vinjor 2024-09-26 13:45:56 +08:00
commit e71c53ef96
31 changed files with 777 additions and 156 deletions

View File

@ -124,3 +124,14 @@
.el-pagination.is-background .el-pager li:hover{ .el-pagination.is-background .el-pager li:hover{
color: #FF9655 !important;/*hover时候的文字颜色*/ color: #FF9655 !important;/*hover时候的文字颜色*/
} }
/* 修改选中状态的背景色 */
.el-radio .el-radio__input.is-checked .el-radio__inner {
background-color: #FF9655; /* 你想要的任何颜色 */
border-color: #FF9655;
}
/* 修改选中状态的文字颜色 */
.el-radio .el-radio__input.is-checked+ .el-radio__label {
color: #FF9655 !important; /* 文字颜色 */
}

View File

@ -56,7 +56,7 @@
</div> </div>
</div> </div>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<el-form-item label="时间段" prop="suitTimeSlotFront" label-width="70px" > <el-form-item label="时间段" prop="suitTimeSlot" label-width="70px" >
<el-time-picker <el-time-picker
v-model="ruleForm.suitTimeSlotFront" v-model="ruleForm.suitTimeSlotFront"
format="HH:mm" format="HH:mm"
@ -269,8 +269,9 @@ export default {
activeTimeType: [ activeTimeType: [
{required: true, message: '活动时间不能为空', trigger: 'blur'}, {required: true, message: '活动时间不能为空', trigger: 'blur'},
], ],
suitTimeSlotFront: [ //
{required: true, message: '时间段不能为空', trigger: 'blur'}, suitTimeSlot: [
{ required:true, validator: this.validateTimeRange, trigger: 'change' }
], ],
userGradeIds: [ userGradeIds: [
{required: true, message: '适用会员等级不能为空', trigger: 'blur'}, {required: true, message: '适用会员等级不能为空', trigger: 'blur'},
@ -298,6 +299,23 @@ export default {
this.listUserGrade() this.listUserGrade()
}, },
methods: { methods: {
//
validateTimeRange(rule, value, callback) {
const { suitTimeSlotFront, suitTimeSlotAfter } = this.ruleForm;
if (!suitTimeSlotFront && !suitTimeSlotAfter) {
callback(new Error('请选择开始时间和结束时间'));
} else if (!suitTimeSlotFront) {
callback(new Error('请选择开始时间'));
} else if (!suitTimeSlotAfter) {
callback(new Error('请选择结束时间'));
} else if (suitTimeSlotFront >= suitTimeSlotAfter) {
callback(new Error('结束时间必须晚于开始时间'));
} else {
callback();
}
},
Typeindex3(index) { Typeindex3(index) {
this.tindex3 = index this.tindex3 = index
this.ruleForm.suitTimeSlotType = index this.ruleForm.suitTimeSlotType = index

View File

@ -647,7 +647,7 @@
<!-- 添加或修改对话框 --> <!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open2" append-to-body width="42%"> <el-dialog :title="title" :visible.sync="open2" append-to-body width="42%">
<el-form ref="form2" :model="form2" :rules="rules" label-width="120px"> <el-form ref="form2" :model="form2" :rules="rules" label-width="120px">
<el-form-item label="会员等级" prop="gradeId"> <el-form-item label="会员等级" prop="gradeId">
<el-select v-model="form2.gradeId" placeholder="请选择会员等级" style="width: 100%"> <el-select v-model="form2.gradeId" placeholder="请选择会员等级" style="width: 100%">
@ -677,30 +677,25 @@
</el-form-item> </el-form-item>
<el-form-item label="节假日是否通用" prop="holidayIsUse"> <el-form-item label="节假日是否通用" prop="holidayIsUse">
<div class="d-s"> <el-radio-group v-model="form2.holidayIsUse">
<div class="icon-type" v-for="(item,index) in useTypeList" :key="index" <el-radio :label="'0'">可用</el-radio>
:class="{ 'acvtive' : index === tindex1 }" @click="Typeindex1(index)"> <el-radio :label="'1'">不可用</el-radio>
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex1"> </el-radio-group>
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex1">
{{ item }}
</div>
</div>
</el-form-item> </el-form-item>
<el-form-item label="适用日期" prop="suitDateType"> <el-form-item label="适用日期" prop="suitDateType">
<div class="d-s"> <div class="d-s">
<div class="icon-type" v-for="(item,index) in dateTypeList" :key="index" <el-radio-group v-model="form2.suitDateType">
:class="{ 'acvtive' : index === tindex2 }" @click="Typeindex2(index)"> <el-radio :label="'0'">永久</el-radio>
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex1"> <el-radio :label="'1'">自定义</el-radio>
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex1"> </el-radio-group>
{{ item }}
</div>
<el-date-picker <el-date-picker
v-model="form2.suitDateFront" v-model="form2.suitDateFront"
style="width: 160px" style="width: 160px;margin-left: 10px;"
type="date" type="date"
placeholder="开始日期"> placeholder="开始日期">
</el-date-picker> </el-date-picker>
<div style="margin: 0 10px;"></div>
<el-date-picker <el-date-picker
v-model="form2.suitDateAfter" v-model="form2.suitDateAfter"
style="width: 160px" style="width: 160px"
@ -709,19 +704,25 @@
</el-date-picker> </el-date-picker>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="适用时间段" prop="suitTimeSlotType">
<div> <el-form-item label="时间段设置" prop="availableOrUn">
<div class="icon-type" v-for="(item,index) in weekMonthTypeList" :key="index" <el-radio-group v-model="form2.availableOrUn">
:class="{ 'acvtive' : index === tindex3 }" @click="Typeindex3(index)"> <el-radio :label="'0'">适用时间段</el-radio>
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex3"> <el-radio :label="'1'">不可用时间段</el-radio>
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex3"> </el-radio-group>
{{ item }} </el-form-item>
<el-checkbox-group v-model="weekDay" v-if="item=='每周'" style="margin-left: 20px" :disabled="tindex3!=0"> <el-form-item v-if="form2.availableOrUn == '0'" label="适用时间段" prop="suitTimeSlotType">
<el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox> <div style="width: 100px;margin-top: 10px">
</el-checkbox-group> <el-radio-group v-model="form2.suitTimeSlotType">
<el-select v-model="monthDay" placeholder="请选择每月固定日期" multiple v-if="item=='每月'" <div style="display: flex; width: 500px;margin-bottom: 15px;">
:disabled="tindex3!=1" <el-radio :label="'1'">每周</el-radio>
style="margin-left: 20px"> <el-checkbox-group v-model="weekDay" style="margin-left: 20px" :disabled="form2.suitTimeSlotType!='1'">
<el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox>
</el-checkbox-group>
</div>
<el-radio :label="'2'">每月
<el-select :disabled="form2.suitTimeSlotType!='2'" v-model="monthDay" placeholder="请选择每月固定日期" multiple style="margin-left: 20px">
<el-option <el-option
v-for="item in 31" v-for="item in 31"
:key="item.value" :key="item.value"
@ -729,7 +730,8 @@
:value="item"> :value="item">
</el-option> </el-option>
</el-select> </el-select>
</div> </el-radio>
</el-radio-group>
</div> </div>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<el-form-item label="时间段" prop="suitTimeSlotFront" label-width="70px"> <el-form-item label="时间段" prop="suitTimeSlotFront" label-width="70px">
@ -749,28 +751,25 @@
</el-form-item> </el-form-item>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="指定不可用日期" prop="noUseTimeType"> <el-form-item v-else label="不适用时间段" prop="noUseTimeType">
<div> <div>
<div class="icon-type" v-for="(item,index) in weekMonthTypeList" :key="index" <el-radio-group v-model="form2.noUseTimeType">
:class="{ 'acvtive' : index === tindex4 }" @click="Typeindex4(index)"> <el-radio :label="'1'">每周
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex4"> <el-checkbox-group v-model="weekDay1" style="margin-left: 20px" :disabled="form2.noUseTimeType!='1'">
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex4"> <el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox>
{{ item }} </el-checkbox-group>
<el-checkbox-group v-model="weekDay1" :disabled="tindex4!=0" v-if="item=='每周'" </el-radio>
style="margin-left: 20px"> <el-radio :label="'2'">每月
<el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox> <el-select :disabled="form2.noUseTimeType!='2'" v-model="monthDay1" placeholder="请选择每月固定日期" multiple style="margin-left: 20px">
</el-checkbox-group> <el-option
<el-select v-model="monthDay1" placeholder="请选择每月固定日期" multiple v-if="item=='每月'" v-for="item in 31"
:disabled="tindex4!=1" :key="item.value"
style="margin-left: 20px"> :label="item+'日'"
<el-option :value="item">
v-for="item in 31" </el-option>
:key="item" </el-select>
:label="item+'日'" </el-radio>
:value="item+''"> </el-radio-group>
</el-option>
</el-select>
</div>
</div> </div>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<el-form-item label="时间段" prop="noUseTimeFront" label-width="70px"> <el-form-item label="时间段" prop="noUseTimeFront" label-width="70px">
@ -1107,7 +1106,9 @@ export default {
catchTypeList: [], catchTypeList: [],
// //
open: false, open: false,
form2: {}, form2: {
availableOrUn:'0'
},
open2: false, open2: false,
gradeList: [], gradeList: [],
@ -1178,6 +1179,9 @@ export default {
total2: 0, total2: 0,
// //
rules: { rules: {
availableOrUn:[
{required: true, message: "不能为空", trigger: "blur"},
],
grade: [ grade: [
{required: true, message: "升降顺序不能为空", trigger: "blur"}, {required: true, message: "升降顺序不能为空", trigger: "blur"},
{pattern: /^[0-9]{1,10}$/, message: `必须正整数`, trigger: 'blur'} {pattern: /^[0-9]{1,10}$/, message: `必须正整数`, trigger: 'blur'}
@ -1244,14 +1248,17 @@ export default {
suitTimeSlotType: [ suitTimeSlotType: [
{required: true, message: "请选择适用时间段", trigger: "blur"}, {required: true, message: "请选择适用时间段", trigger: "blur"},
], ],
noUseTimeType: [
{required: true, message: "请选择不适用时间段", trigger: "blur"},
],
suitTimeSlotFront: [ suitTimeSlotFront: [
{required: true, message: "请选择适用时间段", trigger: "blur"}, {required: true, message: "请选择适用时间段", trigger: "blur"},
], ],
noUseDate: [ noUseDate: [
{required: true, message: "请选择指定不可用日期", trigger: "blur"}, {required: true, message: "请选择不适用时间段", trigger: "blur"},
], ],
noUseTimeFront: [ noUseTimeFront: [
{required: true, message: "请选择指定不可用日期", trigger: "blur"}, {required: true, message: "请选择不适用时间段", trigger: "blur"},
], ],
} }
}; };
@ -1374,10 +1381,11 @@ export default {
handleAdd2() { handleAdd2() {
this.form2 = { this.form2 = {
usePaymentWay: [], usePaymentWay: [],
holidayIsUse: 0, holidayIsUse: '0',
suitDateType: 0, suitDateType: '0',
suitTimeSlotType: 0, suitTimeSlotType: '0',
noUseTimeType: 0, noUseTimeType: '0',
availableOrUn:'0'
} }
this.weekDay = [] this.weekDay = []
this.monthDay = [] this.monthDay = []

View File

@ -0,0 +1,41 @@
package com.fuint.business.fleet.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.fleet.service.IFleetLinesChangeService;
import com.fuint.business.fleet.vo.FleetLinesChangeVo;
import com.fuint.business.order.dto.CardBalanceChangeDto;
import com.fuint.business.order.vo.CardBalanceChangeVo;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
/**
* <p>
* 车队额度变化表 前端控制器
* </p>
*
* @author dianliang
* @since 2024-09-25
*/
@Controller
@RequestMapping("/fleet-lines-change")
public class FleetLinesChangeController extends BaseController {
@Autowired
private IFleetLinesChangeService fleetLinesChangeService;
public ResponseObject queryByPageUni(@RequestParam(value = "page",defaultValue = "1") Integer page,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("integralDetail") FleetLinesChangeVo fleetLinesChangeVo) {
Page page1 = new Page(page, pageSize);
IPage<FleetLinesChangeVo> iPageList = fleetLinesChangeService.queryByPageUni(page1, fleetLinesChangeVo);
return getSuccessResult(iPageList);
}
}

View File

@ -0,0 +1,70 @@
package com.fuint.business.fleet.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 车队额度变化表
* </p>
*
* @author dianliang
* @since 2024-09-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("fleet_lines_change")
@ApiModel(value="FleetLinesChange对象", description="车队额度变化表")
public class FleetLinesChange implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "车队id")
private Integer fleetId;
@ApiModelProperty(value = "店铺id")
private Integer storeId;
@ApiModelProperty(value = "调整类型0增加、1扣除")
private String adjustType;
@ApiModelProperty(value = "调整额度")
private BigDecimal adjustLimit;
@ApiModelProperty(value = "创建人")
private String createBy;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新人")
private String updateBy;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "剩余额度")
private BigDecimal remainingCreditLimit;
@ApiModelProperty(value = "被调整额度的用户id")
private Integer userId;
@ApiModelProperty(value = "订单id")
private Integer orderId;
}

View File

@ -0,0 +1,20 @@
package com.fuint.business.fleet.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.fleet.entity.FleetLinesChange;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.fleet.vo.FleetLinesChangeVo;
/**
* <p>
* 车队额度变化表 Mapper 接口
* </p>
*
* @author dianliang
* @since 2024-09-25
*/
public interface FleetLinesChangeMapper extends BaseMapper<FleetLinesChange> {
IPage<FleetLinesChangeVo> queryAllByLimit(Page page1, FleetLinesChangeVo fleetLinesChangeVo);
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.fleet.mapper.FleetLinesChangeMapper">
</mapper>

View File

@ -6,6 +6,8 @@ import com.fuint.business.fleet.entity.FleetInfo;
import com.fuint.business.fleet.vo.FleetInfoUniVo; import com.fuint.business.fleet.vo.FleetInfoUniVo;
import com.fuint.business.fleet.vo.FleetInfoVo; import com.fuint.business.fleet.vo.FleetInfoVo;
import java.util.List;
/** /**
* 车队信息(FleetInfo)表服务接口 * 车队信息(FleetInfo)表服务接口
* *
@ -65,7 +67,7 @@ public interface FleetInfoService {
* @param storeId * @param storeId
* @return * @return
*/ */
FleetInfoUniVo queryByStoreId(Integer storeId); List<FleetInfoUniVo> queryByStoreId(Integer storeId);
/** /**
* 新增车队信息(小程序) * 新增车队信息(小程序)

View File

@ -0,0 +1,20 @@
package com.fuint.business.fleet.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.fleet.entity.FleetLinesChange;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.fleet.vo.FleetLinesChangeVo;
/**
* <p>
* 车队额度变化表 服务类
* </p>
*
* @author dianliang
* @since 2024-09-25
*/
public interface IFleetLinesChangeService extends IService<FleetLinesChange> {
IPage<FleetLinesChangeVo> queryByPageUni(Page page1, FleetLinesChangeVo fleetLinesChangeVo);
}

View File

@ -1,6 +1,7 @@
package com.fuint.business.fleet.service.impl; package com.fuint.business.fleet.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -35,9 +36,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Random; import java.util.Random;
import java.util.stream.Collectors;
/** /**
@ -219,22 +222,29 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper,FleetInfo>
* @return * @return
*/ */
@Override @Override
public FleetInfoUniVo queryByStoreId(Integer storeId) { public List<FleetInfoUniVo> queryByStoreId(Integer storeId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
//查询当前登录人的车队信息
FleetInfo fleetInfo = baseMapper.selectOne(new LambdaQueryWrapper<FleetInfo>() List<FleetMember> fleetMembers = fleetMemberMapper.selectList(new LambdaQueryWrapper<FleetMember>()
.eq(FleetInfo::getStoreId, storeId) .eq(FleetMember::getStoreId, storeId)
.eq(FleetInfo::getUserId, nowAccountInfo.getId()) .eq(FleetMember::getUserId, nowAccountInfo.getId()));
.last("limit 1")); //获取所在车队的id集合
List<Integer> fleetIds = fleetMembers.stream().map(FleetMember::getFleetId).collect(Collectors.toList());
if (ObjectUtil.isEmpty(fleetInfo)) { if (CollUtil.isEmpty(fleetIds)) {
throw new RuntimeException("该会员未绑定车队"); throw new RuntimeException("未绑定车队");
} }
// FleetInfo fleetInfo = baseMapper.selectById(fleetMember.getFleetId()); List<FleetInfo> fleetInfos = baseMapper.selectList(new LambdaQueryWrapper<FleetInfo>()
FleetInfoUniVo fleetInfoUniVo = BeanUtil.copyProperties(fleetInfo, FleetInfoUniVo.class); .eq(FleetInfo::getStoreId, storeId)
fleetInfoUniVo.setStoreName(mtStoreMapper.selectById(storeId).getName()); .in(FleetInfo::getId, fleetIds));
return fleetInfoUniVo;
List<FleetInfoUniVo> fleetInfoUniVos = new ArrayList<>();
for (FleetInfo fleetInfo : fleetInfos) {
FleetInfoUniVo fleetInfoUniVo = BeanUtil.copyProperties(fleetInfo, FleetInfoUniVo.class);
fleetInfoUniVo.setStoreName(mtStoreMapper.selectById(storeId).getName());
fleetInfoUniVos.add(fleetInfoUniVo);
}
return fleetInfoUniVos;
} }
/** /**

View File

@ -0,0 +1,42 @@
package com.fuint.business.fleet.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.fleet.entity.FleetLinesChange;
import com.fuint.business.fleet.mapper.FleetLinesChangeMapper;
import com.fuint.business.fleet.service.IFleetLinesChangeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.fleet.vo.FleetLinesChangeVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* <p>
* 车队额度变化表 服务实现类
* </p>
*
* @author dianliang
* @since 2024-09-25
*/
@Service
public class FleetLinesChangeServiceImpl extends ServiceImpl<FleetLinesChangeMapper, FleetLinesChange> implements IFleetLinesChangeService {
@Autowired
private FleetLinesChangeMapper fleetLinesChangeMapper;
@Override
public IPage<FleetLinesChangeVo> queryByPageUni(Page page1, FleetLinesChangeVo fleetLinesChangeVo) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
fleetLinesChangeVo.setUserId(nowAccountInfo.getId());
if (ObjectUtil.isNotEmpty(fleetLinesChangeVo.getStartTime())) {
DateTime parse = DateUtil.parse(fleetLinesChangeVo.getStartTime(), "yyyy-MM");
fleetLinesChangeVo.setStartTime(DateUtil.beginOfMonth(parse).toString());
fleetLinesChangeVo.setEndTime(DateUtil.endOfMonth(parse).toString());
}
return this.baseMapper.queryAllByLimit(page1, fleetLinesChangeVo);
}
}

View File

@ -0,0 +1,23 @@
package com.fuint.business.fleet.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fuint.business.fleet.entity.FleetLinesChange;
import lombok.Data;
@Data
public class FleetLinesChangeVo extends FleetLinesChange {
/**
* 用户名称
*/
private String userName;
/**
* 操作人名称
*/
private String creatName;
@JsonIgnore
private String startTime;
@JsonIgnore
private String endTime;
}

View File

@ -128,5 +128,15 @@ public class IntegralGift extends BaseEntity {
*/ */
private Integer storeId; private Integer storeId;
/**
* 兑换说明
*/
private String exchangeInstructions;
/**
* 使用须知
*/
private String useInstructions;
} }

View File

@ -1,5 +1,6 @@
package com.fuint.business.marketingActivity.cardGift.service.impl; package com.fuint.business.marketingActivity.cardGift.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
@ -12,6 +13,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.cardGift.mapper.CardGiftMapper; import com.fuint.business.marketingActivity.cardGift.mapper.CardGiftMapper;
import com.fuint.business.marketingActivity.cardGift.entity.CardGift; import com.fuint.business.marketingActivity.cardGift.entity.CardGift;
import com.fuint.business.marketingActivity.cardGift.service.CardGiftService; import com.fuint.business.marketingActivity.cardGift.service.CardGiftService;
import com.fuint.business.marketingActivity.cardGift.vo.CardGiftVo;
import com.fuint.business.marketingActivity.cardGiftActive.entity.CardGiftActive;
import com.fuint.business.marketingActivity.cardGiftActive.mapper.CardGiftActiveMapper;
import com.fuint.business.member.entity.LJStaff; import com.fuint.business.member.entity.LJStaff;
import com.fuint.business.member.service.ILJStaffService; import com.fuint.business.member.service.ILJStaffService;
import com.fuint.business.oilDepotConfiguration.entity.OilDepotConfig; import com.fuint.business.oilDepotConfiguration.entity.OilDepotConfig;
@ -30,6 +34,7 @@ import com.fuint.common.util.TokenUtil;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -64,6 +69,8 @@ public class CardGiftServiceImpl extends ServiceImpl<CardGiftMapper, CardGift> i
private LJUserService ljUserService; private LJUserService ljUserService;
@Resource @Resource
private ILJStaffService ljStaffService; private ILJStaffService ljStaffService;
@Autowired
private CardGiftActiveMapper cardGiftActiveMapper;
/** /**
* 新增数据 * 新增数据
@ -246,7 +253,23 @@ public class CardGiftServiceImpl extends ServiceImpl<CardGiftMapper, CardGift> i
LambdaQueryWrapper<CardGift> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<CardGift> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CardGift::getUserId,userId); queryWrapper.eq(CardGift::getUserId,userId);
queryWrapper.orderByDesc(CardGift::getUpdateTime); queryWrapper.orderByDesc(CardGift::getUpdateTime);
return page(page,queryWrapper); IPage page1 = page(page, queryWrapper);
List<CardGiftVo> cardGiftVos = new ArrayList<>();
for (Object record : page1.getRecords()) {
CardGiftVo cardGiftVo = BeanUtil.copyProperties(record, CardGiftVo.class);
CardGiftActive cardGiftActive = cardGiftActiveMapper.selectOne(new LambdaQueryWrapper<CardGiftActive>()
.eq(CardGiftActive::getId, cardGiftVo.getActiveId())
.last("limit 1"));
if (ObjectUtils.isNotEmpty(cardGiftActive)) {
cardGiftVo.setActiveName(cardGiftActive.getActiveName());
}
cardGiftVos.add(cardGiftVo);
}
page1.setRecords(cardGiftVos);
//查询兑换记录的活动名称
return page1;
} }
/** /**

View File

@ -0,0 +1,9 @@
package com.fuint.business.marketingActivity.cardGift.vo;
import com.fuint.business.marketingActivity.cardGift.entity.CardGift;
import lombok.Data;
@Data
public class CardGiftVo extends CardGift {
private String activeName;
}

View File

@ -89,6 +89,7 @@ public class MtUserExpressAddressController extends BaseController {
/** /**
* 查询默认快递地址 * 查询默认快递地址
*/ */
@GetMapping("getDefault")
public ResponseObject getDefault() { public ResponseObject getDefault() {
return getSuccessResult(this.mtUserExpressAddressService.getDefault()); return getSuccessResult(this.mtUserExpressAddressService.getDefault());
} }

View File

@ -1,5 +1,6 @@
package com.fuint.business.userManager.mapper; package com.fuint.business.userManager.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.userManager.entity.MtUserExpressAddress; import com.fuint.business.userManager.entity.MtUserExpressAddress;
@ -14,7 +15,7 @@ import java.util.List;
* @author makejava * @author makejava
* @since 2023-11-09 09:31:12 * @since 2023-11-09 09:31:12
*/ */
public interface MtUserExpressAddressMapper { public interface MtUserExpressAddressMapper extends BaseMapper<MtUserExpressAddress> {
/** /**
* 通过ID查询单条数据 * 通过ID查询单条数据

View File

@ -1,8 +1,10 @@
package com.fuint.business.userManager.service.impl; package com.fuint.business.userManager.service.impl;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.userManager.entity.MtUserExpressAddress; import com.fuint.business.userManager.entity.MtUserExpressAddress;
import com.fuint.business.userManager.mapper.MtUserExpressAddressMapper; import com.fuint.business.userManager.mapper.MtUserExpressAddressMapper;
import com.fuint.business.userManager.service.MtUserExpressAddressService; import com.fuint.business.userManager.service.MtUserExpressAddressService;
@ -21,7 +23,7 @@ import java.util.List;
* @since 2023-11-09 09:31:33 * @since 2023-11-09 09:31:33
*/ */
@Service("mtUserExpressAddressService") @Service("mtUserExpressAddressService")
public class MtUserExpressAddressServiceImpl implements MtUserExpressAddressService { public class MtUserExpressAddressServiceImpl extends ServiceImpl<MtUserExpressAddressMapper,MtUserExpressAddress> implements MtUserExpressAddressService {
@Resource @Resource
private MtUserExpressAddressMapper mtUserExpressAddressMapper; private MtUserExpressAddressMapper mtUserExpressAddressMapper;
@ -101,8 +103,10 @@ public class MtUserExpressAddressServiceImpl implements MtUserExpressAddressServ
@Override @Override
public MtUserExpressAddress getDefault() { public MtUserExpressAddress getDefault() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper<>();
return null; queryWrapper.eq("user_id", nowAccountInfo.getId());
queryWrapper.eq("if_default", "1");
return baseMapper.selectOne(queryWrapper);
} }
@Override @Override

View File

@ -430,6 +430,7 @@
{{ payForm.realyPayBills }} {{ payForm.realyPayBills }}
</div> </div>
<!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> --> <!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> -->
<div v-if="payForm.paymentType !== 'CASH' "> <div v-if="payForm.paymentType !== 'CASH' ">
<div> <div>
<el-input v-model="payForm.authCode" <el-input v-model="payForm.authCode"
@ -554,7 +555,12 @@ export default {
// //
oilLiter:0, oilLiter:0,
openConfirm:false, openConfirm:false,
//
isPay:false, isPay:false,
isPaySuccess:false,
isAwait: false,
rechargeBalCard:false,
isQuery:true,
loading:false, loading:false,
// //
collectionImg: '', collectionImg: '',

View File

@ -203,6 +203,13 @@
"style": { "style": {
"navigationBarTitleText": "卡包" "navigationBarTitleText": "卡包"
}
},
{
"path": "userRegister/index",
"style": {
"navigationBarTitleText": "会员注册"
} }
} }
] ]
@ -342,8 +349,7 @@
{ {
"path": "myorder/myorder", "path": "myorder/myorder",
"style": { "style": {
"navigationBarTitleText": "我的订单", "navigationBarTitleText": "消费记录"
"navigationStyle": "custom"
} }
}, },
{ {

View File

@ -38,7 +38,7 @@
<image src="../../static/new/n7.png" mode=""></image> <image src="../../static/new/n7.png" mode=""></image>
<view class="">每日抽奖</view> <view class="">每日抽奖</view>
</view> </view>
<view class="_bgox"> <view class="_bgox" @click="goSignIn()">
<image src="../../static/new/n8.png" mode=""></image> <image src="../../static/new/n8.png" mode=""></image>
<view class="">签到有礼</view> <view class="">签到有礼</view>
</view> </view>
@ -261,6 +261,11 @@
tabbar tabbar
}, },
methods: { methods: {
goSignIn(){
uni.navigateTo({
url: '/pagesMy/signIn/index'
})
},
goInvite() { goInvite() {
uni.navigateTo({ uni.navigateTo({
url: '/pagesMy/invite/invite' url: '/pagesMy/invite/invite'

View File

@ -6,9 +6,9 @@
</view> </view>
<!-- 顶部区域 --> <!-- 顶部区域 -->
<view class="my-top"> <view class="my-top">
<view class="dis-box" v-if="userinfo"> <view class="dis-box" v-if="!user">
<view class="dis"> <view class="dis" @click="goSetup()">
<view class="touxiang" @click="goSetup"> <view class="touxiang">
<image src="@/static/icon/icon/newmy.png" mode="aspectFit" style="margin-right: 10px;"> <image src="@/static/icon/icon/newmy.png" mode="aspectFit" style="margin-right: 10px;">
</image> </image>
</view> </view>
@ -19,15 +19,16 @@
</view> </view>
</view> </view>
<view class="dis-box" v-else> <view class="dis-box" v-else>
<view class="dis"> <view class="dis" @click="goSetup()">
<view class="touxiang" @click="goSetup"> <view class="touxiang">
<image v-if="user.avatar" :src="baseUrl+user.avatar" mode="aspectFit"
<image src="@/static/icon/icon/newmy.png" mode="aspectFit" style="margin-right: 10px;"> style="margin-right: 10px;"></image>
</image> <image v-else src="@/static/icon/icon/newmy.png" mode="aspectFit"
style="margin-right: 10px;"></image>
</view> </view>
<view class=""> <view class="">
<view class="user-tel">用户昵称</view> <view class="user-tel">{{user.name}}</view>
<view class="user-name">手机号: xxxxxxxxxxxx</view> <view class="user-name">手机号: {{user.mobile}}</view>
</view> </view>
</view> </view>
<view class="" @click="goMypages(2)"> <view class="" @click="goMypages(2)">
@ -46,7 +47,7 @@
<view class="jg-box-nmb">{{countList.length || 0 }}</view> <view class="jg-box-nmb">{{countList.length || 0 }}</view>
</view> </view>
<text style="color: #999999;">|</text> <text style="color: #999999;">|</text>
<view class="jg-box" @click="toCoupons"> <view class="jg-box" @click="toCoupons()">
<view class="jg-box-title">优惠券</view> <view class="jg-box-title">优惠券</view>
<view class="jg-box-nmb">{{cardsList.length || 0 }}</view> <view class="jg-box-nmb">{{cardsList.length || 0 }}</view>
</view> </view>
@ -95,7 +96,7 @@
积分商城 积分商城
</view> </view>
</view> </view>
<view class="centenr-sx"> <view class="centenr-sx" @click="goSetup()">
<view class="centenr-img"> <view class="centenr-img">
<image src="@/static/icon/icon/newmy5.png"></image> <image src="@/static/icon/icon/newmy5.png"></image>
</view> </view>
@ -103,7 +104,7 @@
个人资料 个人资料
</view> </view>
</view> </view>
<view class="centenr-sx"> <view class="centenr-sx" @click="goInvte()">
<view class="centenr-img"> <view class="centenr-img">
<image src="@/static/icon/icon/newmy6.png"></image> <image src="@/static/icon/icon/newmy6.png"></image>
</view> </view>
@ -111,7 +112,7 @@
邀请有礼 邀请有礼
</view> </view>
</view> </view>
<view class="centenr-sx"> <view class="centenr-sx" @click="goCar()">
<view class="centenr-img"> <view class="centenr-img">
<image src="@/static/icon/icon/newmy7.png"></image> <image src="@/static/icon/icon/newmy7.png"></image>
</view> </view>
@ -127,7 +128,7 @@
成长值记录 成长值记录
</view> </view>
</view> </view>
<view class="centenr-sx"> <view class="centenr-sx" @click="goCard()">
<view class="centenr-img"> <view class="centenr-img">
<image src="@/static/icon/icon/newmy9.png"></image> <image src="@/static/icon/icon/newmy9.png"></image>
</view> </view>
@ -135,12 +136,12 @@
礼品卡 礼品卡
</view> </view>
</view> </view>
<view class="centenr-sx"> <view class="centenr-sx" @click="goFleet()">
<view class="centenr-img"> <view class="centenr-img">
<image src="@/static/icon/icon/newmy10.png"></image> <image src="@/static/icon/icon/newmy10.png"></image>
</view> </view>
<view class="centenr-size"> <view class="centenr-size">
副卡管理 车队管理
</view> </view>
</view> </view>
<view class="centenr-sx"> <view class="centenr-sx">
@ -151,7 +152,7 @@
我的奖品 我的奖品
</view> </view>
</view> </view>
<view class="centenr-sx"> <view class="centenr-sx" @click="goFeedback()">
<view class="centenr-img"> <view class="centenr-img">
<image src="@/static/icon/icon/newmy12.png"></image> <image src="@/static/icon/icon/newmy12.png"></image>
</view> </view>
@ -175,11 +176,9 @@
return { return {
query: { query: {
storeId: '', storeId: '',
chainStoreId: '', status: 0,
couponType: '', page: 1,
useStatus: 0, pageSize: 1000
pageNo: 1,
pageSize: 10
}, },
querys: { querys: {
mtUserId: '', mtUserId: '',
@ -299,7 +298,7 @@
url: 'business/userManager/user/getUser', url: 'business/userManager/user/getUser',
method: 'get', method: 'get',
}).then(res => { }).then(res => {
console.log(res, 1541); console.log(res, 302);
if (res.data) { if (res.data) {
this.user = res.data this.user = res.data
uni.setStorageSync('userId', res.data.id) uni.setStorageSync('userId', res.data.id)
@ -376,12 +375,17 @@
}, },
goCard() { goCard() {
uni.navigateTo({ uni.navigateTo({
url: '/pagesMy/CardManagement/CardManagement' url: '/pagesHome/RechargeRecords/RechargeRecords'
}) })
}, },
govip() { goCar() {
uni.navigateTo({ uni.navigateTo({
url: '/pagesMy/VIP/vip' url: '/pagesMy/licensePlate/index'
})
},
goFleet() {
uni.navigateTo({
url: '/pagesMy/fleetInfo/index'
}) })
}, },
goFeedback() { goFeedback() {
@ -399,12 +403,12 @@
params: this.query params: this.query
}).then(res => { }).then(res => {
if (res.data) { if (res.data) {
this.cardBalance = res.data.cardBalance, this.cardBalance = res.data.cardBalance
this.myPoints = res.data.points, this.myPoints = res.data.points
/* if (res.data.refuelMoney!=null && res.data.refuelMoney!=""){ /* if (res.data.refuelMoney!=null && res.data.refuelMoney!=""){
this.refuelMoney = JSON.parse(res.data.refuelMoney);
} */
this.refuelMoney = JSON.parse(res.data.refuelMoney); this.refuelMoney = JSON.parse(res.data.refuelMoney);
} */
this.refuelMoney = JSON.parse(res.data.refuelMoney);
console.log("333333333333333", this.refuelMoney); console.log("333333333333333", this.refuelMoney);
} }
}) })
@ -414,7 +418,7 @@
return; return;
} }
request({ request({
url: 'business/marketingActivity/cardFavorable/applet', url: 'cardCouponUser/queryPage',
method: 'get', method: 'get',
params: this.query params: this.query
}).then(res => { }).then(res => {

View File

@ -8,7 +8,7 @@
</view> </view>
<!-- 顶部区域 --> <!-- 顶部区域 -->
<view class="box-xianze" v-for="(item,index) in dataList" :key="index"> <view class="box-xianze" v-for="(item,index) in dataList" :key="index">
<view class=""> <view class="" @click="choose(item)">
<view style="display: flex;align-items: center;margin-bottom: 5px;"> <view style="display: flex;align-items: center;margin-bottom: 5px;">
<view class="">{{item.name || '--'}}</view> <view class="">{{item.name || '--'}}</view>
<view style="margin: 0 10px;" v-if="item.sex==0"> 先生</view> <view style="margin: 0 10px;" v-if="item.sex==0"> 先生</view>
@ -97,7 +97,6 @@
if (item.ifDefault == 1) { if (item.ifDefault == 1) {
item.checked = true item.checked = true
} }
this.$set(item, 'checked', item.checked); //
}) })
console.log(res, this.dataList, 98); console.log(res, this.dataList, 98);
this.$forceUpdate() this.$forceUpdate()

View File

@ -34,18 +34,18 @@
<view class="hui-time"> <view class="hui-time">
<view style="color: #FC1708; font-size: 14px;"> <view style="color: #FC1708; font-size: 14px;">
<span <span
v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}</span> v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}积分</span>
<span v-if="item.exchangeMethod == '积分+金额'">+</span> <span v-if="item.exchangeMethod == '积分+金额'">+</span>
<span <span
v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">{{item.exchangeAmount}}</span> v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">{{item.exchangeAmount}}</span>
<span>积分</span> <!-- <span>积分</span> -->
</view> </view>
</view> </view>
<view style="display: flex;align-items: center;justify-content: space-between;"> <view style="display: flex;align-items: center;justify-content: space-between;">
<view class="hui_"> <view class="hui_">
3.5 {{item.market || 0}}
</view> </view>
<view class="anniux"> <view class="anniux">
<text v-if="!item.remainingInventory || item.remainingInventory==0" <text v-if="!item.remainingInventory || item.remainingInventory==0"
@ -109,7 +109,7 @@
methods: { methods: {
transferIndex(index, categoryId) { transferIndex(index, categoryId) {
this.qhindex = index this.qhindex = index
if (categoryId == undefined || categoryId == null) { if (!categoryId) {
this.query.categoryId = '' this.query.categoryId = ''
} else { } else {
this.query.categoryId = categoryId this.query.categoryId = categoryId
@ -139,6 +139,9 @@
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.integralGiftList = res.data.records this.integralGiftList = res.data.records
console.log(res.data, 142);
}else{
this.integralGiftList = []
} }
}) })
}, },

View File

@ -6,18 +6,22 @@
<view class="">积分余额</view> <view class="">积分余额</view>
<view class="d-s">{{cardBalance.points || 0}}<u-icon name="arrow-right"></u-icon> </view> <view class="d-s">{{cardBalance.points || 0}}<u-icon name="arrow-right"></u-icon> </view>
</view> </view>
<view class="f-box" v-for="(item,index) in 3" :key="index" @click="goDetails()"> <view class="f-box" v-for="(item,index) in integralGiftList" :key="index" @click="goDetails(item)">
<view class="f-top">中建锦绣二期站可用</view> <view class="f-top">{{item.storeName}}可用</view>
<view class="f-bs"> <view class="f-bs">
<image src="../../static/logo.png" style="width: 60px; height: 60px; "></image> <image v-if="item.coverImage" :src="baseUrl+item.coverImage" mode="aspectFit"
style="width: 60px; height: 60px; "></image>
<image v-else src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
<view class="r-box"> <view class="r-box">
<view class=""> <view class="">
<view class="m_">虚拟</view> <view class="m_">{{item.giftName}}</view>
<view class="p_">300ml瓶装</view> <view class="p_">300ml瓶装</view>
<view class="q_">兑换券</view> <view class="q_">兑换券</view>
</view> </view>
<view class=""> <view class="">
<view class="an_">100积分</view> <view class="an_">
{{item.exchangePoints}}积分
</view>
<u-line-progress :percentage="50" :showText="false" height="6" <u-line-progress :percentage="50" :showText="false" height="6"
activeColor="#FA6400"></u-line-progress> activeColor="#FA6400"></u-line-progress>
<view class="hui_">券已领70%</view> <view class="hui_">券已领70%</view>
@ -26,15 +30,21 @@
</view> </view>
</view> </view>
</view> </view>
<u-empty v-if="integralGiftList.length == 0" style="margin: 5px auto;" mode="data"
icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import config from '@/config'
import request from '../../utils/request' import request from '../../utils/request'
export default { export default {
data() { data() {
return { return {
baseUrl: config.baseUrl,
query: { query: {
chainStoreId: '', chainStoreId: '',
couponType: '', couponType: '',
@ -43,13 +53,66 @@
pageSize: 10 pageSize: 10
}, },
cardBalance: {}, cardBalance: {},
queryParam: {
storeId: uni.getStorageSync('storeId'),
status: '启用',
categoryId: '',
giftName: '',
deliveryMethod: '',
page: 1,
pageSize: 30
},
integralGiftList: [],
total: 0
}
},
onPullDownRefresh() {
//
this.queryParam = {
storeId: uni.getStorageSync('storeId'),
status: '启用',
categoryId: '',
giftName: '',
deliveryMethod: '',
page: 1,
pageSize: 30
}
this.getIntegralGiftList()
uni.stopPullDownRefresh()
},
onReachBottom() {
//
if (this.queryParam.page >= this.total) {
uni.showToast({
title: '没有下一页数据',
icon: 'none'
})
} else {
this.queryParam.page++
this.getIntegralGiftList()
} }
}, },
onShow() { onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId'); this.query.chainStoreId = uni.getStorageSync('chainStoreId');
this.getUserBalance() this.getUserBalance()
this.getIntegralGiftList()
}, },
methods: { methods: {
//
getIntegralGiftList() {
request({
url: 'business/integral/integralGift/queryByPageByStoreId',
method: 'get',
params: this.queryParam
}).then((res) => {
if (res.code == 200) {
this.integralGiftList = res.data.records
this.total = res.data.total
console.log(res, 100);
}
})
},
// //
getUserBalance() { getUserBalance() {
request({ request({
@ -67,7 +130,7 @@
url: '/pagesMy/integral/integral' url: '/pagesMy/integral/integral'
}) })
}, },
goDetails() { goDetails(data) {
uni.navigateTo({ uni.navigateTo({
url: '/pagesHome/PointsRedemption/details' url: '/pagesHome/PointsRedemption/details'
}) })

View File

@ -12,13 +12,20 @@
</view> </view>
<view class="bai-box"> <view class="bai-box">
<view class="box-title">{{goodsInfo.giftName}}</view> <view class="box-title">{{goodsInfo.giftName}}</view>
<view class="price_num">100积分</view> <view class="price_num">
<span
v-if="goodsInfo.exchangeMethod == '积分' || goodsInfo.exchangeMethod == '积分+金额' || goodsInfo.exchangeMethod == '积分+加钱购'">{{goodsInfo.exchangePoints}}积分</span>
<span v-if="goodsInfo.exchangeMethod == '积分+金额'">+</span>
<span
v-if="goodsInfo.exchangeMethod == '金额' || goodsInfo.exchangeMethod == '积分+金额'">{{goodsInfo.exchangeAmount}}</span>
</view>
<view class="dt-box"> <view class="dt-box">
<view class="hui_"> <view class="hui_">
3.5 {{goodsInfo.market}}
</view> </view>
<view class="or_size"> <view class="or_size" v-if="goodsInfo.deliveryMethod">
门店自提 {{JSON.parse(goodsInfo.deliveryMethod)}}
</view> </view>
</view> </view>
</view> </view>
@ -64,6 +71,7 @@
} }
}) })
uni.$emit('un') uni.$emit('un')
console.log(this.goodsInfo,67);
}, },
methods: { methods: {

View File

@ -13,16 +13,16 @@
<view class="gang" v-if="qhindex == index"></view> <view class="gang" v-if="qhindex == index"></view>
</view> </view>
</scroll-view> --> </scroll-view> -->
<view class="box-bai" v-if="qhindex == 0" @click="goAddress()"> <view class="box-bai" v-if="qhindex == 0" @click="goAdd()">
<view class="dis"> <view class="dis">
<view class="boximg"> <view class="boximg">
<image src="../../static/imgs/telicon.png" <image src="../../static/imgs/telicon.png"
style="width: 30px; height: 30px;margin-right: 10px; "></image> style="width: 30px; height: 30px;margin-right: 10px; "></image>
</view> </view>
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<view class="">收货人姓名</view> <view class="">{{addrInfo.name || '--'}}</view>
<view class="hui-time"> <view class="hui-time">
13583028521 {{addrInfo.mobile || '--'}}
</view> </view>
</view> </view>
@ -132,7 +132,7 @@
allAmout: 0, allAmout: 0,
orderInfo: {}, orderInfo: {},
addrInfo: { addrInfo: {
address: '' name:''
}, },
appltType: uni.getStorageSync("appltType"), appltType: uni.getStorageSync("appltType"),
shippingType: '', shippingType: '',
@ -145,7 +145,7 @@
{ {
text: '快递配送' text: '快递配送'
} }
] ],
} }
}, },
@ -168,32 +168,31 @@
}, },
onShow() { onShow() {
uni.$on('chooseAddr', (data) => { uni.$on('chooseAddr', (data) => {
this.addrInfo = data this.addrInfo = data
}) })
uni.$emit('unChooseAddr') uni.$emit('unChooseAddr')
// //
if (!this.addrInfo.address) { if (!this.addrInfo.name ) {
this.getAddr() //
this.getAddress()
} }
console.log(this.addrInfo,181);
this.transferIndex(0) this.transferIndex(0)
// storeId // storeId
this.getInfoByStoreId() this.getInfoByStoreId()
// //
this.getUserInfoList() this.getUserInfoList()
}, },
methods: { methods: {
goAddress(){ getAddress() {
uni.navigateTo({ request({
url:'/pagesHome/Address/Address' url: "/business/userManager/mtUserExpressAddress/getDefault",
method: 'get',
}).then((res) => {
this.addrInfo = res.data
}) })
}, },
// //
@ -721,6 +720,7 @@
.hui-time { .hui-time {
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
margin-left: 10px;
} }
.dis-box { .dis-box {

View File

@ -0,0 +1,204 @@
<template>
<view class="content">
<view class="container">
<view class="card_box"
style="background: url('../../static/imgs/zc.png') no-repeat;background-size: 100% 100%;">
<view style="font-size: 16px;">会员开卡</view>
</view>
<view class="box-zhong">
<view class="box-shang">
激活立享会员特权
</view>
<view class="box-hang">
<view class="dis">必填信息</view>
</view>
<view class="box-hang">
<view class="">手机号</view>
<view>
<input v-model="value" style="text-align: right;"></input>
</view>
</view>
<view class="box-hang">
<view class="dis">选填信息</view>
</view>
<view class="box-hang">
<view class="">姓名</view>
<view>
<input v-model="value" style="text-align: right;"></input>
</view>
</view>
<view class="box-hang">
<view class="">性别</view>
<view>
<input v-model="value" style="text-align: right;"></input>
</view>
</view>
<view class="box-hang">
<view class="">生日</view>
<view>
<input v-model="value" style="text-align: right;"></input>
</view>
</view>
<view class="box-yd" @click="chooseAgree()">
<view class="acvf" v-if="isAgree == false"></view>
<view class="acv" v-else><u-icon name="checkbox-mark" color="#FF9655" size="14"></u-icon></view>
<view class="dis">
我已阅读并同意会员卡信息使用说明
</view>
</view>
<view class="but-sub">提交</view>
<view style="height: 20px;"></view>
</view>
<view class="dis" style="text-align: center;font-size: 12px;display: flex;justify-content: center;">
个人资料将由并仅限百业兴油站使用</view>
</view>
</view>
</template>
<script>
import request from '../../utils/request';
export default {
data() {
return {
title: '',
List: [],
pageNo: 1,
pageSize: 10,
totalPage: '',
value: 'xxxxxx',
isAgree: false
}
},
onLoad() {},
onPullDownRefresh() {
//
uni.stopPullDownRefresh()
},
onReachBottom() {
//
if (this.pageNo >= this.totalPage) {
} else {
this.pageNo++
}
},
components: {
},
methods: {
chooseAgree() {
this.isAgree = !this.isAgree
},
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
}
.container {
width: 100%;
height: 100vh;
box-sizing: border-box;
padding-top: 11px;
}
.card_box {
width: 94%;
height: 90px;
margin: 0 auto;
box-sizing: border-box;
padding: 10px;
color: #fff;
font-size: 14px;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.box-zhong {
width: 94%;
margin: 10px auto;
background: #fff;
}
.box-hang {
background-color: white;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 15px 15px;
border-bottom: 1px solid #f4f5f6;
}
.acvf {
border-radius: 4px;
border: 1px solid #eee;
height: 16px;
width: 16px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10px;
}
.acv {
border-radius: 4px;
border: 1px solid #FF9655;
height: 16px;
width: 16px;
color: #FF9655;
margin-right: 10px;
display: flex;
align-items: center;
justify-content: center;
}
.dis {
color: #999999;
}
.box-yd {
display: flex;
margin: 20px 0;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
}
.box-shang {
color: #333333;
font-weight: bold;
font-size: 16px;
text-align: center;
border-bottom: #EEEEEE 1px dashed;
height: 56px;
line-height: 56px;
}
.box-end {
text-align: center;
margin-top: 10px;
}
.but-sub {
width: 94%;
height: 40px;
line-height: 40px;
margin: 0 auto;
background-color: #FF9655;
color: white;
border-radius: 5px;
text-align: center;
}
</style>

View File

@ -3,7 +3,7 @@
<view class="container"> <view class="container">
<view class="my-header"> <view class="my-header">
<view class="my-icons" @click="goBack"> <uni-icons type="left" size="16"></uni-icons> </view> <view class="my-icons" @click="goBack"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">设置</view> <view class="my-text">个人资料</view>
<view class="my-icons"></view> <view class="my-icons"></view>
</view> </view>
<!-- 顶部区域 --> <!-- 顶部区域 -->
@ -13,7 +13,7 @@
<view class="touxiang"> <view class="touxiang">
<image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined" <image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined"
:src="baseUrl + user.avatar" mode="aspectFit"></image> :src="baseUrl + user.avatar" mode="aspectFit"></image>
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image> <image class="touxiang" v-else src="@/static/icon/icon/newmy.png" mode="aspectFit"></image>
</view> </view>
</button> </button>
<!-- #endif --> <!-- #endif -->
@ -23,7 +23,7 @@
<view class="touxiang"> <view class="touxiang">
<image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined" <image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined"
:src="baseUrl + user.avatar" mode="aspectFit"></image> :src="baseUrl + user.avatar" mode="aspectFit"></image>
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image> <image class="touxiang" v-else src="@/static/icon/icon/newmy.png" mode="aspectFit"></image>
</view> </view>
</button> </button>
<!-- #endif --> <!-- #endif -->
@ -37,7 +37,12 @@
</view> </view>
<view class="box-hang" @click="show1 =!show1"> <view class="box-hang" @click="show1 =!show1">
<view class="">性别</view> <view class="">性别</view>
<view class="dis"> <text>{{user.sex}}</text> <uni-icons type="right" size="16"></uni-icons> </view> <view class="dis">
<text v-if="user.sex==1"></text>
<text v-else-if="user.sex==0"></text>
<text v-else>不详</text>
<uni-icons type="right" size="16"></uni-icons>
</view>
</view> </view>
<view class="box-hang" @click="show=!show"> <view class="box-hang" @click="show=!show">
<view class="">生日</view> <view class="">生日</view>
@ -51,13 +56,13 @@
<view class="">会员号</view> <view class="">会员号</view>
<view class="dis"> <text>{{user.userNo}}</text> <uni-icons type="right" size="16"></uni-icons> </view> <view class="dis"> <text>{{user.userNo}}</text> <uni-icons type="right" size="16"></uni-icons> </view>
</view> --> </view> -->
<view class="box-hang" @click="goEdit(2)"> <!-- <view class="box-hang" @click="goEdit(2)">
<view class="">车牌号</view> <view class="">车牌号</view>
<view class="dis"> <view class="dis">
<text v-if="!user.carNo">未填写</text> <text v-if="!user.carNo">未填写</text>
<text v-else>{{user.carNo}}</text> <uni-icons type="right" size="16"></uni-icons> <text v-else>{{user.carNo}}</text> <uni-icons type="right" size="16"></uni-icons>
</view> </view>
</view> </view> -->
<!-- <view class="box-hang" @click="goEdit(3)"> <!-- <view class="box-hang" @click="goEdit(3)">
<view class="">会员支付设置</view> <view class="">会员支付设置</view>
<view class="dis"> <text>已设置</text> <uni-icons type="right" size="16"></uni-icons> </view> <view class="dis"> <text>已设置</text> <uni-icons type="right" size="16"></uni-icons> </view>

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB