# Conflicts:
#	gasStation-uni/config.js
#	gasStation-uni/pages/index/index.vue
This commit is contained in:
wangh 2024-01-19 18:32:13 +08:00
commit 662f21012d
48 changed files with 845 additions and 133 deletions

View File

@ -278,6 +278,9 @@ export default {
isonline:[
{ required: true, message: '不能为空', trigger: 'change' }
],
activeDiscountChildList:[
{ required: true, message: '不能为空', trigger: 'change' }
],
}
};
},

View File

@ -281,6 +281,9 @@ export default {
isonline:[
{ required: true, message: '不能为空', trigger: 'change' }
],
activeDiscountChildList:[
{ required: true, message: '不能为空', trigger: 'change' }
],
}
};
},

View File

@ -144,8 +144,10 @@
<!-- 添加或修改优惠券对话框 -->
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="100px">
<el-form-item label="优惠券名称" prop="name">
<el-input v-model="form.name" placeholder="请输入优惠券名称" />
</el-form-item>
<el-form-item label="卡券类型" prop="type">
<el-radio-group v-model="form.type">
@ -165,15 +167,28 @@
<el-checkbox v-for="(item,index) in oillist" :label=" item.id " :key="index">{{item.oilType}}{{item.oilName}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="满足金额" prop="satisfiedAmount" v-if="form.discountType == 0">
<el-input v-model="form.satisfiedAmount" placeholder="请输入满足金额" />
</el-form-item>
<el-form-item label="优惠金额" prop="discountAmount" v-if="form.discountType == 0">
<el-input v-model="form.discountAmount" placeholder="请输入优惠金额" />
</el-form-item>
<el-form-item label="满足金额" prop="satisfiedAmount" v-if="form.discountType == 1">
<el-input v-model="form.satisfiedAmount" placeholder="请输入满足金额" />
</el-form-item>
<div class="_k">
<el-form-item label="满足金额" prop="satisfiedAmount" v-if="form.discountType == 0">
<el-input v-model="form.satisfiedAmount" placeholder="请输入满足金额" >
<template slot="append"></template>
</el-input>
</el-form-item>
</div>
<div class="_k">
<el-form-item label="优惠金额" prop="discountAmount" v-if="form.discountType == 0">
<el-input v-model="form.discountAmount" placeholder="请输入优惠金额" >
<template slot="append"></template>
</el-input>
</el-form-item>
</div>
<div class="_k">
<el-form-item label="满足金额" prop="satisfiedAmount" v-if="form.discountType == 1">
<el-input v-model="form.satisfiedAmount" placeholder="请输入满足金额" >
<template slot="append"></template>
</el-input>
</el-form-item>
</div>
<el-form-item label="优惠折扣" prop="specialDiscount" v-if="form.discountType == 1">
<el-input-number v-model="form.specialDiscount" :min="0" :max="9.9" placeholder="1 ~ 9.9"/>
</el-form-item>
@ -711,5 +726,9 @@ export default {
align-items: center;
}
._k{
box-sizing: border-box;
width: 300px;
}
</style>

View File

@ -167,9 +167,9 @@
<el-select v-model="ruleForm.oilType" placeholder="请选择" >
<el-option
v-for="dict in oilList"
:key="dict.id"
:key="dict.id.toString()"
:label="dict.oilName"
:value="dict.id">
:value="dict.id.toString()">
</el-option>
</el-select>

View File

@ -34,7 +34,8 @@ export default {
}
},
created() {
this.userId = this.pUserId;
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
},
methods:{
getList(){

View File

@ -35,7 +35,8 @@ export default {
}
},
created() {
this.userId = this.pUserId;
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
},
methods:{
getList(){

View File

@ -0,0 +1,90 @@
package com.fuint.business.marketingActivity.activeDiscountRecords.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.activeDiscountRecords.entity.ActiveDiscountRecords;
import com.fuint.business.marketingActivity.activeDiscountRecords.service.ActiveDiscountRecordsService;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
* 折扣活动记录表(ActiveDiscountRecords)表控制层
*
* @author makejava
* @since 2024-01-19 17:13:25
*/
@RestController
@RequestMapping("business/marketingActivity/activeDiscountRecords")
public class ActiveDiscountRecordsController extends BaseController {
/**
* 服务对象
*/
@Resource
private ActiveDiscountRecordsService activeDiscountRecordsService;
/**
* 分页查询所有数据
*
* @param page 分页对象
* @param activeDiscountRecords 查询实体
* @return 所有数据
*/
@GetMapping
public ResponseObject selectAll(Page<ActiveDiscountRecords> page, ActiveDiscountRecords activeDiscountRecords) {
return getSuccessResult(this.activeDiscountRecordsService.page(page, new QueryWrapper<>(activeDiscountRecords)));
}
/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping("{id}")
public ResponseObject selectOne(@PathVariable Serializable id) {
return getSuccessResult(this.activeDiscountRecordsService.getById(id));
}
/**
* 新增数据
*
* @param activeDiscountRecords 实体对象
* @return 新增结果
*/
@PostMapping
public ResponseObject insert(@RequestBody ActiveDiscountRecords activeDiscountRecords) {
return getSuccessResult(this.activeDiscountRecordsService.save(activeDiscountRecords));
}
/**
* 修改数据
*
* @param activeDiscountRecords 实体对象
* @return 修改结果
*/
@PutMapping
public ResponseObject update(@RequestBody ActiveDiscountRecords activeDiscountRecords) {
return getSuccessResult(this.activeDiscountRecordsService.updateById(activeDiscountRecords));
}
/**
* 删除数据
*
* @param idList 主键结合
* @return 删除结果
*/
@DeleteMapping
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
return getSuccessResult(this.activeDiscountRecordsService.removeByIds(idList));
}
}

View File

@ -0,0 +1,107 @@
package com.fuint.business.marketingActivity.activeDiscountRecords.entity;
import java.util.Date;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
/**
* 折扣活动记录表(ActiveDiscountRecords)表实体类
*
* @author makejava
* @since 2024-01-19 17:13:25
*/
@SuppressWarnings("serial")
public class ActiveDiscountRecords extends Model<ActiveDiscountRecords> {
//主键id
private Integer id;
//活动id
private Integer activeDiscountId;
//用户id
private Integer userId;
//店铺id
private Integer storeId;
//创建者
private String createBy;
//创建时间
private Date createTime;
//更新者
private String updateBy;
//更新时间
private Date updateTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getActiveDiscountId() {
return activeDiscountId;
}
public void setActiveDiscountId(Integer activeDiscountId) {
this.activeDiscountId = activeDiscountId;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getStoreId() {
return storeId;
}
public void setStoreId(Integer storeId) {
this.storeId = storeId;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* 获取主键值
*
* @return 主键值
*/
@Override
protected Serializable pkVal() {
return this.id;
}
}

View File

@ -0,0 +1,15 @@
package com.fuint.business.marketingActivity.activeDiscountRecords.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.marketingActivity.activeDiscountRecords.entity.ActiveDiscountRecords;
/**
* 折扣活动记录表(ActiveDiscountRecords)表数据库访问层
*
* @author makejava
* @since 2024-01-19 17:13:25
*/
public interface ActiveDiscountRecordsMapper extends BaseMapper<ActiveDiscountRecords> {
}

View File

@ -0,0 +1,15 @@
package com.fuint.business.marketingActivity.activeDiscountRecords.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.activeDiscountRecords.entity.ActiveDiscountRecords;
/**
* 折扣活动记录表(ActiveDiscountRecords)表服务接口
*
* @author makejava
* @since 2024-01-19 17:13:26
*/
public interface ActiveDiscountRecordsService extends IService<ActiveDiscountRecords> {
}

View File

@ -0,0 +1,19 @@
package com.fuint.business.marketingActivity.activeDiscountRecords.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeDiscountRecords.mapper.ActiveDiscountRecordsMapper;
import com.fuint.business.marketingActivity.activeDiscountRecords.entity.ActiveDiscountRecords;
import com.fuint.business.marketingActivity.activeDiscountRecords.service.ActiveDiscountRecordsService;
import org.springframework.stereotype.Service;
/**
* 折扣活动记录表(ActiveDiscountRecords)表服务实现类
*
* @author makejava
* @since 2024-01-19 17:13:26
*/
@Service("activeDiscountRecordsService")
public class ActiveDiscountRecordsServiceImpl extends ServiceImpl<ActiveDiscountRecordsMapper, ActiveDiscountRecords> implements ActiveDiscountRecordsService {
}

View File

@ -485,7 +485,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
}
//折扣+优惠券
for (ActiveDiscountPayVO activeDiscountPayVO : activeDiscountVOList) {
if (activeDiscountPayVO.getParticipationCondition().equals("1")){
if (!activeDiscountPayVO.getParticipationCondition().equals("1")){
for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) {
if(cardFavorableRecordVO.getExclusiveFunction().equals("2") && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){
ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO();
@ -525,7 +525,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
}
//满减+优惠券
for (ActiveDiscountPayVO activeDiscountPayVO : activeFuletVOList) {
if (activeDiscountPayVO.getParticipationCondition().equals("1")){
if (!activeDiscountPayVO.getParticipationCondition().equals("1")){
for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) {
if(cardFavorableRecordVO.getType().equals("2") && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){
ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO();
@ -637,7 +637,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
BigDecimal bigDecimal1 = BigDecimal.valueOf(oilPriceById);
String oilTypebyId = oilNameMapper.getOilTypebyId(oilId);
String gradeId = ljUserGradeMapper.selectByUserId(paymentActiveDTO.getStoreId(), userId);
String gradeId = paymentActiveDTO.getMtUserLevel().toString();
if (StringUtils.isNotEmpty(gradeId)){
LJUserGrade ljUserGrade = ljUserGradeMapper.selectAllByGradeId(gradeId);
if (ObjectUtils.isNotEmpty(ljUserGrade)){
@ -647,31 +647,26 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
}else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){
String gasolineRule = ljUserGrade.getGasolineRule();
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
for (JSONObject jsonObject : jsonObjects) {
Integer gasolineRule1 = jsonObject.getInteger("gasolineRule1");
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
BigDecimal bigDecimal = jsonObject.getBigDecimal("gasolineRule1");
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
//升数
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1,2,RoundingMode.HALF_UP);
Integer gasolineRule3 = jsonObject.getInteger("gasolineRule3");
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
BigDecimal multiply = divide.multiply(bigDecimal2);
BigDecimal gasolineRule3 = jsonObject.getBigDecimal("gasolineRule3");
BigDecimal multiply = divide.multiply(gasolineRule3);
paymentActiveVO.setMemberFavorableAmount(multiply);
}
}
}else {
String gasolineRule = ljUserGrade.getGasolineRule();
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
for (JSONObject jsonObject : jsonObjects) {
Integer gasolineRule1 = jsonObject.getInteger("gasolineRule1");
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
BigDecimal gasolineRule1 = jsonObject.getBigDecimal("gasolineRule1");
if (paymentActiveDTO.getAmount().compareTo(gasolineRule1)>=0){
//升数
Integer gasolineRule3 = jsonObject.getInteger("gasolineRule2");
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
}
}
}
}
if (oilTypebyId.equals("柴油")){
@ -680,31 +675,26 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
}else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){
String gasolineRule = ljUserGrade.getDieselRule();
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
for (JSONObject jsonObject : jsonObjects) {
Integer gasolineRule1 = jsonObject.getInteger("dieselRule1");
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
BigDecimal bigDecimal =jsonObject.getBigDecimal("dieselRule1");
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
//升数
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1,2,RoundingMode.HALF_UP);
Integer gasolineRule3 = jsonObject.getInteger("dieselRule3");
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
BigDecimal bigDecimal2 = jsonObject.getBigDecimal("dieselRule3");
BigDecimal multiply = divide.multiply(bigDecimal2);
paymentActiveVO.setMemberFavorableAmount(multiply);
}
}
}else {
String gasolineRule = ljUserGrade.getDieselRule();
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
for (JSONObject jsonObject : jsonObjects) {
Integer gasolineRule1 = jsonObject.getInteger("dieselRule1");
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
BigDecimal bigDecimal = jsonObject.getBigDecimal("dieselRule1");
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
//升数
Integer gasolineRule3 = jsonObject.getInteger("dieselRule2");
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
}
}
}
}
@ -714,35 +704,28 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
}else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){
String gasolineRule = ljUserGrade.getNaturalGasRule();
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
for (JSONObject jsonObject : jsonObjects) {
Integer gasolineRule1 = jsonObject.getInteger("naturalGas1");
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1");
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
//升数
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1,2,RoundingMode.HALF_UP);
Integer gasolineRule3 = jsonObject.getInteger("naturalGas3");
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
BigDecimal bigDecimal2 = jsonObject.getBigDecimal("naturalGas3");
BigDecimal multiply = divide.multiply(bigDecimal2);
paymentActiveVO.setMemberFavorableAmount(multiply);
}
}
}else {
String gasolineRule = ljUserGrade.getGasolineRule();
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
for (JSONObject jsonObject : jsonObjects) {
Integer gasolineRule1 = jsonObject.getInteger("naturalGas1");
BigDecimal bigDecimal = BigDecimal.valueOf(gasolineRule1);
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1");
if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){
//升数
Integer gasolineRule3 = jsonObject.getInteger("naturalGas2");
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
}
}
}
}
}
}
return paymentActiveVO;

View File

@ -0,0 +1,90 @@
package com.fuint.business.marketingActivity.activeFullminusRecords.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
import com.fuint.business.marketingActivity.activeFullminusRecords.service.ActiveFullminusRecordsService;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
* 满减活动记录表(ActiveFullminusRecords)表控制层
*
* @author makejava
* @since 2024-01-19 17:12:45
*/
@RestController
@RequestMapping("business/marketingActivity/activeFullminusRecords")
public class ActiveFullminusRecordsController extends BaseController {
/**
* 服务对象
*/
@Resource
private ActiveFullminusRecordsService activeFullminusRecordsService;
/**
* 分页查询所有数据
*
* @param page 分页对象
* @param activeFullminusRecords 查询实体
* @return 所有数据
*/
@GetMapping
public ResponseObject selectAll(Page<ActiveFullminusRecords> page, ActiveFullminusRecords activeFullminusRecords) {
return getSuccessResult(this.activeFullminusRecordsService.page(page, new QueryWrapper<>(activeFullminusRecords)));
}
/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping("{id}")
public ResponseObject selectOne(@PathVariable Serializable id) {
return getSuccessResult(this.activeFullminusRecordsService.getById(id));
}
/**
* 新增数据
*
* @param activeFullminusRecords 实体对象
* @return 新增结果
*/
@PostMapping
public ResponseObject insert(@RequestBody ActiveFullminusRecords activeFullminusRecords) {
return getSuccessResult(this.activeFullminusRecordsService.save(activeFullminusRecords));
}
/**
* 修改数据
*
* @param activeFullminusRecords 实体对象
* @return 修改结果
*/
@PutMapping
public ResponseObject update(@RequestBody ActiveFullminusRecords activeFullminusRecords) {
return getSuccessResult(this.activeFullminusRecordsService.updateById(activeFullminusRecords));
}
/**
* 删除数据
*
* @param idList 主键结合
* @return 删除结果
*/
@DeleteMapping
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
return getSuccessResult(this.activeFullminusRecordsService.removeByIds(idList));
}
}

View File

@ -0,0 +1,107 @@
package com.fuint.business.marketingActivity.activeFullminusRecords.entity;
import java.util.Date;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
/**
* 满减活动记录表(ActiveFullminusRecords)表实体类
*
* @author makejava
* @since 2024-01-19 17:12:45
*/
@SuppressWarnings("serial")
public class ActiveFullminusRecords extends Model<ActiveFullminusRecords> {
//主键id
private Integer id;
//活动id
private Integer activeFullminusId;
//用户id
private Integer userId;
//店铺id
private Integer storeId;
//创建者
private String createBy;
//创建时间
private Date createTime;
//更新者
private String updateBy;
//更新时间
private Date updateTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getActiveFullminusId() {
return activeFullminusId;
}
public void setActiveFullminusId(Integer activeFullminusId) {
this.activeFullminusId = activeFullminusId;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getStoreId() {
return storeId;
}
public void setStoreId(Integer storeId) {
this.storeId = storeId;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* 获取主键值
*
* @return 主键值
*/
@Override
protected Serializable pkVal() {
return this.id;
}
}

View File

@ -0,0 +1,15 @@
package com.fuint.business.marketingActivity.activeFullminusRecords.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
/**
* 满减活动记录表(ActiveFullminusRecords)表数据库访问层
*
* @author makejava
* @since 2024-01-19 17:12:45
*/
public interface ActiveFullminusRecordsMapper extends BaseMapper<ActiveFullminusRecords> {
}

View File

@ -0,0 +1,15 @@
package com.fuint.business.marketingActivity.activeFullminusRecords.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
/**
* 满减活动记录表(ActiveFullminusRecords)表服务接口
*
* @author makejava
* @since 2024-01-19 17:12:45
*/
public interface ActiveFullminusRecordsService extends IService<ActiveFullminusRecords> {
}

View File

@ -0,0 +1,19 @@
package com.fuint.business.marketingActivity.activeFullminusRecords.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeFullminusRecords.mapper.ActiveFullminusRecordsMapper;
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
import com.fuint.business.marketingActivity.activeFullminusRecords.service.ActiveFullminusRecordsService;
import org.springframework.stereotype.Service;
/**
* 满减活动记录表(ActiveFullminusRecords)表服务实现类
*
* @author makejava
* @since 2024-01-19 17:12:45
*/
@Service("activeFullminusRecordsService")
public class ActiveFullminusRecordsServiceImpl extends ServiceImpl<ActiveFullminusRecordsMapper, ActiveFullminusRecords> implements ActiveFullminusRecordsService {
}

View File

@ -2,6 +2,7 @@ package com.fuint.business.marketingActivity.cardFavorable.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
@ -57,7 +58,7 @@ public class CardFavorableRecordController extends BaseController {
@GetMapping("getCardFavorableList")
public ResponseObject getCardFavorableList(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("cardFuelDiesel") CardFavorableRecord cardFavorableRecord) {
@Param("cardFavorableRecord") CardFavorableRecord cardFavorableRecord) {
Page page = new Page(pageNo, pageSize);
return getSuccessResult(this.cardFavorableRecordService.getCardFavorableList(page,cardFavorableRecord));
}
@ -115,6 +116,17 @@ public class CardFavorableRecordController extends BaseController {
return getSuccessResult(this.cardFavorableRecordService.updateById(cardFavorableRecord));
}
/**
* 核销
*
* @param paymentActiveVO 实体对象
* @return 修改结果
*/
@PutMapping("updateCardAndActiveById")
public ResponseObject updateCardAndActiveById(@RequestBody PaymentActiveVO paymentActiveVO) {
return getSuccessResult(this.cardFavorableRecordService.updateCardAndActiveById(paymentActiveVO));
}
/**
* 删除数据
*

View File

@ -38,5 +38,7 @@ public interface CardFavorableRecordMapper extends BaseMapper<CardFavorableRecor
IPage<CouponVO> selectAllByCondition(@Param("page") Page page, @Param("cardFavorableDTOS") CardFavorableDTOS cardFavorableDTOS);
List<CardFavorableRecordVO> getCanUserCardFavorableList(@Param("paymentActiveDTO") PaymentActiveDTO paymentActiveDTO);
boolean updateCardAndActiveById(@Param("cardFavorableId") Integer cardFavorableId, @Param("userId") Integer userId, @Param("storeId") Integer storeId);
}

View File

@ -43,7 +43,7 @@
left join mt_store ms on ms.id = cfr.store_id
<where>
<if test="cardFavorableRecord.storeId != null">
and cfr.store_id = #{cardFavorableRecord.storeId}
and cf.store_id = #{cardFavorableRecord.storeId}
</if>
<if test="cardFavorableRecord.mtUserId != null">
and cfr.mt_user_id = #{cardFavorableRecord.mtUserId}
@ -141,5 +141,13 @@
AND cfr.end_time
AND cfr.status = 0
</select>
<update id="updateCardAndActiveById" parameterType="Integer">
update card_favorable_record
set status = 1
where card_favorable_id = #{cardFavorableId}
and mt_user_id = #{userId}
and store_id = #{storeId}
</update>
</mapper>

View File

@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.cardFavorable.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
@ -55,5 +56,12 @@ public interface CardFavorableRecordService extends IService<CardFavorableRecord
* @return
*/
boolean addCardFavorableRecord(CardFavorableRecord cardFavorableRecord);
/**
* 核销
* @param paymentActiveVO
* @return
*/
boolean updateCardAndActiveById(PaymentActiveVO paymentActiveVO);
}

View File

@ -5,6 +5,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeDiscountRecords.entity.ActiveDiscountRecords;
import com.fuint.business.marketingActivity.activeDiscountRecords.mapper.ActiveDiscountRecordsMapper;
import com.fuint.business.marketingActivity.activeDiscountRecords.service.ActiveDiscountRecordsService;
import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
import com.fuint.business.marketingActivity.activeFullminusRecords.mapper.ActiveFullminusRecordsMapper;
import com.fuint.business.marketingActivity.activeFullminusRecords.service.ActiveFullminusRecordsService;
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableRecordMapper;
@ -21,6 +28,7 @@ import com.fuint.common.util.TokenUtil;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.Serializable;
@ -45,6 +53,10 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
private CardFavorableService cardFavorableService;
@Resource
private OilNameService oilNameService;
@Resource
private ActiveFullminusRecordsService activeFullminusRecordsService;
@Resource
private ActiveDiscountRecordsService activeDiscountRecordsService;
/**
* 分页查询所有数据
* @param page
@ -54,6 +66,7 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
@Override
public IPage select(Page page, CardFavorableRecord cardFavorableRecord) {
//构建查询条件
LambdaQueryWrapper<CardFavorableRecord> queryWrapper = new LambdaQueryWrapper<>();
if (ObjectUtils.isNotEmpty(cardFavorableRecord.getMobile())){
@ -214,5 +227,38 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
}
return save(cardFavorableRecord);
}
/**
* 核销
* @param paymentActiveVO
* @return
*/
@Override
@Transactional
public boolean updateCardAndActiveById(PaymentActiveVO paymentActiveVO) {
//优惠券
boolean flag = false;
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
if (ObjectUtils.isNotEmpty(paymentActiveVO.getCardFavorableId())){
flag = cardFavorableRecordMapper.updateCardAndActiveById(paymentActiveVO.getCardFavorableId(),nowAccountInfo.getId(),nowAccountInfo.getStoreId());
}
//满减活动
if (ObjectUtils.isNotEmpty(paymentActiveVO.getActiveId()) && paymentActiveVO.getType().equals("1")){
ActiveFullminusRecords activeFullminusRecords = new ActiveFullminusRecords();
activeFullminusRecords.setActiveFullminusId(paymentActiveVO.getActiveId());
activeFullminusRecords.setUserId(nowAccountInfo.getId());
activeFullminusRecords.setStoreId(nowAccountInfo.getStoreId());
flag = activeFullminusRecordsService.save(activeFullminusRecords);
}
//折扣活动
if (ObjectUtils.isNotEmpty(paymentActiveVO.getActiveId()) && paymentActiveVO.getType().equals("2")){
ActiveDiscountRecords activeDiscountRecords = new ActiveDiscountRecords();
activeDiscountRecords.setActiveDiscountId(paymentActiveVO.getActiveId());
activeDiscountRecords.setUserId(nowAccountInfo.getId());
activeDiscountRecords.setStoreId(nowAccountInfo.getStoreId());
flag = activeDiscountRecordsService.save(activeDiscountRecords);
}
return flag;
}
}

View File

@ -362,6 +362,7 @@
FROM
active_discount ad
LEFT JOIN active_discount_child adc ON ad.id = adc.active_discount_id
left join active_discount_records adr on adr.active_discount_id = ad.id
WHERE
ad.store_id = #{storeId}
AND adc.amount <![CDATA[ <= ]]> #{amount}
@ -370,6 +371,7 @@
AND ad.STATUS = 0
AND concat(',',ad.adapt_oil,',') like concat('%',#{oilId},'%')
AND concat(',',ad.diesel_user_level,',') like concat('%',#{levelId},'%')
HAVING sum(adr.id) <![CDATA[ < ]]> limitAcount
GROUP BY ad.id
</select>
@ -385,6 +387,7 @@
FROM
active_fullminus af
LEFT JOIN active_discount_child adc ON af.id = adc.active_fullminus_id
left join active_fullminus_records afr on afr.active_fullminus_id = ad.id
WHERE
af.store_id = #{storeId}
AND adc.amount <![CDATA[ <= ]]> #{amount}
@ -393,6 +396,7 @@
AND af.STATUS = 0
AND concat(',',af.adapt_oil,',') like concat('%',#{oilId},'%')
AND concat(',',af.diesel_user_level,',') like concat('%',#{levelId},'%')
HAVING sum(afr.id) <![CDATA[ < ]]> limitAcount
GROUP BY af.id
</select>

View File

@ -218,15 +218,15 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
LJStore store = storeService.selectStoreByStoreId(userGrade.getStoreId());
List<LJUserGrade> ljUserGrades = this.selectUserGradeByChainStoreId(store.getChainStoreId());
for (LJUserGrade ljUserGrade : ljUserGrades) {
if (ljUserGrade.getGrade().equals(userGrade.getGrade()) && ljUserGrade.getId()!=userGrade.getId()){
if (ljUserGrade.getGrade().equals(userGrade.getGrade()) && !ljUserGrade.getId().equals(userGrade.getId())){
row = 2;
flag = true;
}
if (ljUserGrade.getName().equals(userGrade.getName()) && ljUserGrade.getId()!=userGrade.getId()){
if (ljUserGrade.getName().equals(userGrade.getName()) && !ljUserGrade.getId().equals(userGrade.getId())){
row = 3;
flag = true;
}
if (ljUserGrade.getGrowthValue().equals(userGrade.getGrowthValue()) && ljUserGrade.getId()!=userGrade.getId()){
if (ljUserGrade.getGrowthValue().equals(userGrade.getGrowthValue()) && !ljUserGrade.getId().equals(userGrade.getId())){
row = 4;
flag = true;
}

View File

@ -73,8 +73,7 @@ public class AlipayServiceImpl1 implements AlipayService1 {
//1. 获取验签和解密所需要的参数
Map<String, String> openapiResult = JSON.parseObject(encryptedData,
new TypeReference<Map<String, String>>() {
}, Feature.OrderedField);
new TypeReference<Map<String, String>>() {}, Feature.OrderedField);
String signType = "RSA2";
String charset = "UTF-8";
String encryptType = "AES";
@ -90,8 +89,7 @@ public class AlipayServiceImpl1 implements AlipayService1 {
// String signVeriKey = "你的小程序对应的支付宝公钥为扩展考虑建议用appId+signType做密钥存储隔离";
String signVeriKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnwDxxSNpBKL8xjtU3leNBy9mIOMYOr0WgxGbCxTMfhUPka9nr8Hbt0GN+7ylNBmxCYvW8kmge4dCOLUPqseM9+HyF9R1NrWBB3zQPVqnD0mKCYr9cEgtx6/eU7oIK1FqAl0G+jNIT3IKWMSXEX09yPKJWS6zk7+FRzOzn11vShTFjmrqWdrisJgRsQ54PHhPkQz7xFojDRqIunlpICWUVA8GwUg02hm5ZEhxpMHEWoJZ6Dj1wPH2Vh4CpIT/mjtD+SvssCpT0/XOEDPajcMRfgoV8fyyN0JNQDVZdMZgSO4aRHQqhC3X5CBXSuv40hHnwjcDjsPcbVav5BtaPp3wPQIDAQAB";
// String decryptKey = "你的小程序对应的加解密密钥为扩展考虑建议用appId+encryptType做密钥存储隔离"
String decryptKey = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCJJM2nlUCidns6anNtGUiCL+J83kNL1nrr6hNktHkrX9bhR8LiBU3qBX+MkGDY4snlbdz+anGWu8YkcMlfBlAr82AsdIS9UTHh3lgsIAZTBZHgzZrxn7vwHfHI6Kw7uGZJbZ320JEG3s0KyvGiW0eqGuWI4BW+sD7b6JoLtNfBq+yF9ObOcs76rNCWz+04BmhCH7i6d8arK8NKgEiI9EjBThGjLRDFK1ryacKpz4UVvIXgxEW5w0MTjo/Q7gp2VLpwE/4jc8QfDFwmGU75L+nhK0rr1l0wwSo7svWFAXvberzMCGyuuLomuh2ldDfERJbIjg/qU66gx0EML1tgpVtFAgMBAAECggEARTArDJuwswXBH3Rq7SRvPza3NbXQD6eR9gjuZcTiyG4ecyMH/40bhK/nbFu+cEzh/HxTnIrI6Xmr+eBoxybhNXsgDu1ttjELUF8i7oftiN7rfJVd0P58CySgQXKYybw65lqF8enA8M1gdkxyYS1Z10igelBKyBwUak9LwBIpM0wrPIFrLhoxIEJC6QJ8EDnm6lKbytvcCa2mMZmtWs8oFxNA/SLRWtdEgHk4hslQVqq4R8B/xUy9Cu4kjdnVMHG2MqFXOiTas3gyKZLGN1ACBfpxxtyw0RAfX294ChV4SIvp10s1VqBFudcQeXeV5ph0NXP1eNt/8o3HIu0vjc0jAQKBgQD5ZtOR19M5vAcxJykh5u01CPdfz2LztqdinCpkBIpFviceW/k1euQFaWbOKdYFUrPnuLgX7Ds6dhSrkoL1+1RiVKUR6AtqIMa4fZJIMJWEPNNYWl8s6u6j11Dkd0B10g5+KV/kKLSlwFuBQnDyHw1ND+WKHqj9vkkzimzfcwedBQKBgQCMxao2IKX8CNjXDuryGkmXac0wxql0nN8AFHjCQGm16GPwlp805nAwsHKfJK45ACeixnWH9Cn6sje3yOUpCw6KG4OougRkrQEkQpoPVrZuXEcZ4j4Wg64VgW9tUAVH/WOV0VDnOBpsM8mbKsLLglb1H9Bx7813IX1pmhm93a0ZQQKBgD6U48/75T/eg7t8xSCBrtIZDuHWy1C2a6gd4bE5Rm0buvsuPwmBbchB248uBktNpmEmA+PU3kPcL3GiEQSibVlDPiyRGpQl51eSAuvkbRBCpxHLk4hU507rj5vUpLMr44Ea5rn80N+qtgtoXakTy6WjsIiJCwSpA/tP5+PmHGn1AoGASY/VhZmEA3OAFMnX3pH8GOKR9kYqMST0p28LN78/Pm7lIskjAxrUT601CJK7dE/vZnE848Gk2judQC38CnmbrHH6WAZ020NI0HD5XsCabotMIGuItG01YEmWN9JUIC16h8Ss+Vbo/9gEJ1CuIHjJBikM3S1J+lIG3lNH1l7r4MECgYEA2eAV0x55cmjC6VIMk3EAVUFbJ1LY1U9irmI6B5e7k/OVcdRksJfMRJwcquYVSfAk4hDrl7x0Qy36XELGvMe/hx07HxeAOXON8gL1b3UHP1zxvXb90YLHseHn9lssABsXS6Enyv3nrzqUi/uzBvpdDE2SRVS6nUr7Yyui6Yl+UPA="
;
String decryptKey = "5k9tQMrXq1JEpVucLwvO7A==";
//如果是加密的报文则需要在密文的前后添加双引号
if (isDataEncrypted) {
signContent = "\"" + signContent + "\"";

View File

@ -119,8 +119,8 @@
</div>
</el-card>
<el-card :key="childComponentKey">
<template>
<el-card :key="childComponentKey" class="_l">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="加油订单" name="refuelOrder">
<oilOrder :key="childComponentKey" :pUserId="form.id"></oilOrder>
@ -135,7 +135,7 @@
<pointsRecord :key="childComponentKey" :pUserId="form.id"></pointsRecord>
</el-tab-pane>
<el-tab-pane label="卡券列表" name="cardList">
<couponList :key="childComponentKey" :pUserId="form.id"></couponList>
<couponList :key="childComponentKey" :pUserId="id"></couponList>
</el-tab-pane>
<el-tab-pane label="成长值记录" name="growthValue">
<growthValueRecord :key="childComponentKey" :pUserId="form.id"></growthValueRecord>
@ -144,7 +144,7 @@
<!-- <refuelMoneyRecord :pUserId="form.id"></refuelMoneyRecord> -->
<!-- </el-tab-pane> -->
</el-tabs>
</template>
</el-card>
<!-- 会员充值-->
@ -1716,7 +1716,10 @@ export default {
height: 100%;
background: #f6f8f9;
}
._l{
}
.left {
width: 20%;
display: table-cell;

View File

@ -76,9 +76,9 @@ export default {
}
},
created() {
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.userId = this.pUserId;
// this.userId = this.$route.query.id;
console.log( "111111",this.userId)
this.getList()
this.getOilName()
},
@ -86,14 +86,18 @@ export default {
getOilNames(list,oilIds){
let name = "";
let oilNames = []
let oilId = oilIds.split(",")
list.forEach(item => {
oilId.forEach(i => {
if (item.oilName == i){
oilNames.push(item.oilNames)
}
if(oilIds){
let oilId = oilIds.split(",")
list.forEach(item => {
oilId.forEach(i => {
if (item.oilName == i){
oilNames.push(item.oilNames)
}
})
})
})
}
let arr = []
for (let i = 0;i<oilNames.length;i++){
if (arr.indexOf(oilNames[i])==-1){
@ -112,13 +116,15 @@ export default {
getList(){
this.loading = true
this.queryParams.userId = this.userId
// this.queryParams.mtUserId = this.userId
getCardFavorableList(this.queryParams).then(res=>{
if (res.code == 200) {
this.list = res.data.records
this.total = res.data.total
this.loading = false
}
})
},

View File

@ -45,7 +45,7 @@ export default {
created() {
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
console.log('1212',this.userId)
this.getList()
},
methods:{

View File

@ -2,26 +2,27 @@
<view class="bar">
<view class="barbox" @click="gogogo(1)">
<view class="bar-img">
<image v-show="actindex == 1" src="../../static/imgs/homex.png" mode=""></image>
<image v-show="actindex != 1" src="../../static/imgs/home.png" mode=""></image>
<image v-if="actindex == 1" src="../../static/imgs/homex.png" mode="aspectFit"></image>
<image v-if="actindex != 1" src="../../static/imgs/home.png" mode="aspectFit"></image>
</view>
<view class="">首页</view>
</view>
<view class="barbox" @click="gogogo(2)">
<view class="centerbox">
<view class="qiu">
<image src="../../static/imgs/jy.png" mode=""></image>
<image src="../../static/imgs/jy.png" mode="aspectFit"></image>
</view>
</view>
<view class="">一键加油</view>
</view>
<view class="barbox" @click="gogogo(3)">
<view class="bar-img">
<image v-show="actindex == 3" src="../../static/imgs/myx.png" mode=""></image>
<image v-show="actindex != 3" src="../../static/imgs/my.png" mode=""></image>
<image v-if="actindex == 3" src="../../static/imgs/myx.png" mode="aspectFit"></image>
<image v-if="actindex != 3" src="../../static/imgs/my.png" mode="aspectFit"></image>
</view>
<view class="">我的</view>
</view>
</view>
</template>
@ -114,13 +115,13 @@
}
.bar-img {
width: 25px;
height: 25px;
width: 50rpx;
height: 50rpx;
margin: 0px auto;
image {
width: 100%;
height: 100%;
width: 50rpx;
height: 50rpx;
}
}
</style>
</style>

View File

@ -1,12 +1,14 @@
// 应用全局配置
module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://192.168.0.196:8081/',
// baseUrl: 'http://192.168.1.4:8080/',
baseUrl: 'http://192.168.0.178:8008/',
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
// 应用信息
@ -30,4 +32,4 @@ module.exports = {
}
]
}
}
}

View File

@ -0,0 +1,3 @@
{
"format": 2
}

View File

@ -19,12 +19,20 @@
{
"root": "pagesLogin",
"pages": [{
"path": "login/login",
"style": {
"navigationBarTitleText": "登录",
"navigationStyle": "custom"
"path": "login/login",
"style": {
"navigationBarTitleText": "登录",
"navigationStyle": "custom"
}
},
{
"path": "login/webview",
"style": {
"navigationBarTitleText": "声明",
"navigationStyle": "custom"
}
}
}]
]
},
{
"root": "pagesHome",

View File

@ -28,25 +28,25 @@
<view class="conttainer-jg">
<view class="jg-box" @click="toQRcode">
<view class="jg-img">
<image src="../../static/imgs/viprwm.png" mode=""></image>
<image src="../../static/imgs/viprwm.png" mode="aspectFit"></image>
</view>
<view class="jg-size">二维码</view>
</view>
<view class="jg-box" @click="goActivity()">
<view class="jg-img">
<image src="../../static/imgs/bzhd.png" mode=""></image>
<image src="../../static/imgs/bzhd.png" mode="aspectFit"></image>
</view>
<view class="jg-size">本站活动</view>
</view>
<view class="jg-box" @click="goCard()">
<view class="jg-img">
<image src="../../static/imgs/ykcz.png" mode=""></image>
<image src="../../static/imgs/ykcz.png" mode="aspectFit"></image>
</view>
<view class="jg-size">油卡充值</view>
</view>
<view class="jg-box" @click="goMall()">
<view class="jg-img">
<image src="../../static/imgs/jfsc.png" mode=""></image>
<image src="../../static/imgs/jfsc.png" mode="aspectFit"></image>
</view>
<view class="jg-size">积分商城</view>
</view>
@ -409,6 +409,7 @@
"lat": _this.latitude,
"storeId": storeId,
"isLogin": _this.AppToken ? "0" : "1", // 0
},
}).then((response) => {
_this.distance = (Math.ceil(response.data.distance))
@ -649,8 +650,8 @@
height: 38px;
image {
width: 100%;
height: 100%;
width: 38px;
height: 38px;
}
margin: 5px auto;

View File

@ -10,8 +10,8 @@
<view class="dis">
<view class="touxiang" @click="goSetup">
<image v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined"
:src="baseUrl + user.avatar" mode=""></image>
<image v-else src="../../static/imgs/myx.png" mode=""></image>
:src="baseUrl + user.avatar" mode="aspectFit"></image>
<image v-else src="../../static/imgs/myx.png" mode="aspectFit"></image>
</view>
<view class="">
<view class="user-tel" @click="goSetup">{{user.mobile?user.mobile:"点击登录"}}</view>
@ -50,7 +50,7 @@
<view class="my-top-box" style="margin-top: 45px;">
<view class="centenr-sx" @click="goMyOrder(0)">
<view class="centenr-img">
<image src="../../static/my/dingdan.png" mode=""></image>
<image src="../../static/my/dingdan.png" mode="aspectFit"></image>
</view>
<view class="centenr-size">
我的订单
@ -60,7 +60,7 @@
<view class="centenr-sx" @click="goMyOrder(1)">
<view class="centenr-img">
<image src="../../static/my/dsy.png" mode=""></image>
<image src="../../static/my/dsy.png" mode="aspectFit"></image>
</view>
<view class="centenr-size">
待使用
@ -69,7 +69,7 @@
<view class="centenr-sx" @click="goMyOrder(2)">
<view class="centenr-img">
<image src="../../static/my/ywc.png" mode=""></image>
<image src="../../static/my/ywc.png" mode="aspectFit"></image>
</view>
<view class="centenr-size">
已完成
@ -77,7 +77,7 @@
</view>
<view class="centenr-sx" @click="goMyOrder(3)">
<view class="centenr-img">
<image src="../../static/my/dpj.png" mode=""></image>
<image src="../../static/my/dpj.png" mode="aspectFit"></image>
</view>
<view class="centenr-size">
待评价
@ -97,7 +97,7 @@
</view>
<view class="centenr-sx" @click="goToDaby">
<view class="centenr-img">
<image src="../../static/my/jryj.png" mode=""></image>
<image src="../../static/my/jryj.png" mode="aspectFit"></image>
</view>
<view class="centenr-size">
今日油价
@ -107,7 +107,7 @@
<view class="centenr-sx" @click="goWriteoff()">
<view class="centenr-img">
<image src="../../static/my/jl.png" mode=""></image>
<image src="../../static/my/jl.png" mode="aspectFit"></image>
</view>
<view class="centenr-size">
核销记录

View File

@ -8,8 +8,8 @@
<view class="top-box">
<view class="dis" style="width: 78%;">
<view class="top-img">
<image v-if="store.logo==''||store.logo==null||store.logo==undefined" src="../../static/logo.png" mode=""></image>
<image v-else :src="baseUrl+store.logo" mode=""></image>
<image v-if="store.logo==''||store.logo==null||store.logo==undefined" src="../../static/logo.png" mode="aspectFit"></image>
<image v-else :src="baseUrl+store.logo" mode="aspectFit"></image>
</view>
<view style="width: 80%;">
<view class="top-title">{{store.name}}{{store.description ? "("+store.description+")" : ""}}
@ -121,7 +121,7 @@
return {
appltType:uni.getStorageSync("appltType"),
value: '',
liters:"",
liters:0,
show: false,
pic: 0,
hindex: 0,

View File

@ -15,7 +15,7 @@
<view class="card-cz">
<view class="card-top">
<view class="cardimg">
<image src="../../static/imgs/jyz.png" mode=""></image>
<image src="../../static/imgs/jyz.png" mode="aspectFit"></image>
</view>
<!-- <text>油站名称</text> -->
</view>
@ -48,7 +48,7 @@
<view class="card-ty">
<view class="card-top">
<view class="cardimg">
<image src="../../static/imgs/jyzb.png" mode=""></image>
<image src="../../static/imgs/jyzb.png" mode="aspectFit"></image>
</view>
<!-- <text style="color: #ffffff;">油站名称</text> -->
</view>
@ -84,7 +84,7 @@
<view class="card-lp">
<view class="card-top">
<view class="cardimg">
<image src="../../static/imgs/jyzb.png" mode=""></image>
<image src="../../static/imgs/jyzb.png" mode="aspectFit"></image>
</view>
<!-- <text style="color: #ffffff;">油站名称</text> -->
</view>

View File

@ -20,7 +20,7 @@
<view class="t-b-box">
<view class="goodsimg">
<image :src="baseUrl+form.coverImage" mode=""></image>
<image :src="baseUrl+form.coverImage" mode="aspectFit"></image>
</view>
<view class="right-r-box">
<view class="-title">{{form.giftName}}</view>

View File

@ -19,7 +19,7 @@
</view>
</view>
<view class="tp">
<image src="../../static/imgs/hby.png" mode=""></image>
<image src="../../static/imgs/hby.png" mode="aspectFit"></image>
</view>
</view>
@ -70,7 +70,7 @@
<view class="box-goods" v-for="(item,index) in integralGiftList" :key="index"
@click="godetails(item)">
<view class="goods-img">
<image :src="baseUrl+item.coverImage" mode=""></image>
<image :src="baseUrl+item.coverImage" mode="aspectFit"></image>
</view>
<view class="goods-title">
{{item.giftName}}
@ -78,7 +78,7 @@
<view class="good-red">
<view style="display: flex;align-items: center;">
<view class="bi" v-if="item.exchangeMethod != '金额'">
<image src="../../static/imgs/jb.png" mode=""></image>
<image src="../../static/imgs/jb.png" mode="aspectFit"></image>
</view>
<view style="color: #FC1708;font-weight: bold;">
<span

View File

@ -22,7 +22,7 @@
<view class="goods-box" v-for="(item,index) in orderList" :key="item.id" @click="orderDetails(item)">
<view class="goods-top">
<view class="goods-img">
<image :src="baseUrl+item.coverImage" mode=""></image>
<image :src="baseUrl+item.coverImage" mode="aspectFit"></image>
</view>
<view class="nr-tip">
<view class="title-s">{{item.giftName}}</view>

View File

@ -44,6 +44,7 @@
<!-- 底部 -->
</view>
<view class="bottom-box">
<view class="anniu" @click="addValueCarRecords()">
<text>立即充值</text>
@ -84,6 +85,8 @@
{{index+1}}.{{item || "" }}
</view>
</view>
<view class="box-gang">
<view class="">推荐员工</view>
<view class=""></view>
@ -92,6 +95,7 @@
</view>
</view>
<!-- 底部 -->
<view class="bottom-box">
<view class="anniu" @click="addFuleCarRecords()">
@ -136,7 +140,17 @@
</view>
</view>
<u-picker :show="show" :columns="columns" keyName="realName" @confirm="confirm" @cancel="cancel"></u-picker>
<!-- <u-picker :show="show" :columns="columns" keyName="realName" @confirm="confirm" @cancel="cancel"></u-picker> -->
<u-popup :show="show" :round="10" mode="bottom" @close="close" @open="open">
<view class="bottom-bb">
<view class="" v-for="(item,index) in columns" :key="index" style="margin-bottom: 10px;">
<u-button @click="confirm(item)" type="primary" :plain="true" :text="item.realName"></u-button>
</view>
<!-- <view class="" v-for="(item,index) in columns" :key="index">
{{item.realName}}
</view> -->
</view>
</u-popup>
<u-modal :show="shows" :title="message" :content='money' @confirm="confirms()"></u-modal>
</view>
</view>
@ -224,6 +238,12 @@
this.getStaffList()
},
methods: {
open() {
console.log();
},
close() {
this.show = false
},
//
addFuleCarRecords() {
if (this.staffId == '') {
@ -369,8 +389,8 @@
},
confirm(e) {
console.log(e);
this.staffId = e.value[0].id
this.yname = e.value[0].realName
this.staffId = e.id
this.yname = e.realName
this.show = false
},
cancel() {
@ -506,7 +526,8 @@
storeId: uni.getStorageSync("storeId")
}
}).then(res => {
this.columns.push(res.data.records)
this.columns = res.data.records
// this.columns.push(res.data.records)
console.log("columns", this.columns);
})
@ -696,4 +717,13 @@
width: 20%;
}
.bottom-bb {
width: 100%;
height: 200px;
box-sizing: border-box;
padding: 10px;
background: white;
overflow: scroll;
}
</style>

View File

@ -17,7 +17,7 @@
<view class="dis">
<!-- <uni-icons type="location-filled" size="20"></uni-icons> -->
<view class="boximg">
<image :src="logo?baseUrl+logo:'../../static/logo.png'" mode=""></image>
<image :src="logo?baseUrl+logo:'../../static/logo.png'" mode="aspectFit"></image>
</view>
<view class="">
<view class="">{{storeName}}</view>
@ -52,7 +52,7 @@
<view class="box-bait">
<view class="dis-box">
<view class="goodsimg">
<image :src='baseUrl+goodsInfo.coverImage' mode=""></image>
<image :src='baseUrl+goodsInfo.coverImage' mode="aspectFit"></image>
</view>
<view class="">
<view class="">{{goodsInfo.giftName}}</view>

View File

@ -0,0 +1,78 @@
<template>
<view class="">
<view class="my-header">
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">声明</view>
<view class="my-icons"></view>
</view>
<view class="">
<view class="content" v-html="text">
</view>
</view>
</view>
</template>
<script>
import {
str
} from "../../utils/privacyPolicy.js";
export default {
data() {
return {
text: ""
}
},
onShow() {
this.text = str;
},
methods: {
goback() {
uni.navigateBack()
}
}
}
</script>
<style socped lang="less">
.content {
padding: 20rpx;
}
.content {
background: #fff;
}
.container {
width: 100%;
height: 100vh;
box-sizing: border-box;
padding-top: 88px;
}
.my-header {
width: 100%;
height: 88px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
z-index: 99999;
.my-icons {
width: 20px;
}
position: fixed;
top: 0px;
}
</style>

View File

@ -20,7 +20,7 @@
<view class="left-img">
<view class="huiz" v-if="item.couponType == '优惠券'">{{item.couponAmount}}</view>
<view class="hui-icon" v-if="item.couponType != '优惠券'">
<image src="../../static/imgs/iconcar.png" mode=""></image>
<image src="../../static/imgs/iconcar.png" mode="aspectFit"></image>
</view>
<view class="cbai">{{item.couponType}}</view>
</view>

View File

@ -32,7 +32,7 @@
<u-line-progress :percentage="30" activeColor="#2F72F7"></u-line-progress>
</view>
<view class="right-img">
<image src="../../static/imgs/vipxz.png" mode=""></image>
<image src="../../static/imgs/vipxz.png" mode="aspectFit"></image>
</view>
</view>
</view>
@ -44,7 +44,7 @@
<view class="box-ba" v-for="(item,index) in oilNameList" :key="index">
<view class="min-box">
<image :src="item.imgurl" mode=""></image>
<image :src="item.imgurl" mode="aspectFit"></image>
</view>
<view class="mu_">{{item.name}}</view>
</view>

View File

@ -13,7 +13,7 @@
<view class="c-box-top">您对工作人员满意吗</view>
<view class="dis">
<view class="touxiang">
<image src="../../static/imgs/myx.png" mode=""></image>
<image src="../../static/imgs/myx.png" mode="aspectFit"></image>
</view>
<view class="">
<view class="username">username(13583017106)</view>

View File

@ -9,7 +9,7 @@
</view>
<view class="faimg">
<view class="box-img">
<image src="../../static/imgs/fmbj.png" mode=""></image>
<image src="../../static/imgs/fmbj.png" mode="aspectFit"></image>
</view>
<view class="hbbox">
<view class="h-box">
@ -45,7 +45,7 @@
<view class="t-box" v-for="(item,index) in activeRecommendRecordsList" :key="index">
<view class="diss">
<view class="touxiang">
<image src="../../static/imgs/myx.png" mode=""></image>
<image src="../../static/imgs/myx.png" mode="aspectFit"></image>
</view>
<view class="">
<view class="name-t">{{item.inviteeUserName}}</view>

View File

@ -10,8 +10,8 @@
<button class="box-hang" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<view class="">头像</view>
<view class="touxiang">
<image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined" :src="baseUrl + user.avatar" mode=""></image>
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode=""></image>
<image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined" :src="baseUrl + user.avatar" mode="aspectFit"></image>
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image>
</view>
</button>
<view class="box-hang" @click="goEdit(0)">

View File

@ -19,7 +19,7 @@
<view class="box-top">
<view class="dis">
<view class="touxiang">
<image src="../../static/imgs/bzhd.png" mode=""></image>
<image src="../../static/imgs/bzhd.png" mode="aspectFit"></image>
</view>
<view class="box-top-size">
<view class="box-title">
@ -52,7 +52,7 @@
<view class="box-bottom">
<view class="box-bottom-anniu">
<view class="bottom-icon">
<image src="../../static/icon/daohang.png" mode=""></image>
<image src="../../static/icon/daohang.png" mode="aspectFit"></image>
</view>
<view class="">到这去</view>
</view>
@ -61,7 +61,7 @@
</view>
<view class="box-bottom-anniu">
<view class="bottom-icon">
<image src="../../static/icon/jiayou.png" mode=""></image>
<image src="../../static/icon/jiayou.png" mode="aspectFit"></image>
</view>
<view class="" @click="toRefuel(item.store)">去加油</view>
</view>