Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2023-11-30 17:29:19 +08:00
commit f3461e779b
30 changed files with 929 additions and 97 deletions

View File

@ -8,7 +8,7 @@ export function ljStoreInfo() {
})
}
// 查询店铺详细
// 查询所有店铺信息
export function ljStoreList() {
return request({
url: '/business/storeInformation/store/list',
@ -16,6 +16,14 @@ export function ljStoreList() {
})
}
// 根据连锁店id查询店铺信息
export function storesList() {
return request({
url: '/business/storeInformation/store/stores',
method: 'get'
})
}
// 修改店铺信息
export function updateStore(data) {
return request({

View File

@ -311,7 +311,7 @@
placeholder="会员等级"
style="width: 300px"
>
<el-option v-for="grade in userGradeList" :key="grade.id+''" :label="grade.name" :value="grade.id+''"/>
<el-option v-for="grade in userGradeList" :key="grade.id+''" :label="grade.name" :value="grade.id"/>
</el-select>
</el-form-item>
</el-col>
@ -334,7 +334,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="会员初始积分" prop="points">
<el-input v-model="form.points" placeholder="请输入会员初始积分" maxlength="30"/>
<el-input :disabled="title == '编辑会员'" v-model="form.points" placeholder="请输入会员初始积分" maxlength="30"/>
</el-form-item>
</el-col>
</el-row>
@ -348,7 +348,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="储值通用余额" prop="cardBalance">
<el-input v-model="form.cardBalance" placeholder="请输入储值卡初始余额" maxlength="30"/>
<el-input :disabled="title == '编辑会员'" v-model="form.cardBalance" placeholder="请输入储值卡初始余额" maxlength="30"/>
</el-form-item>
</el-col>
</el-row>
@ -390,7 +390,7 @@
</el-dialog>
<!-- 批量录入会员信息-->
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openUpload" append-to-body>
<el-dialog :title="title" :visible.sync="openUpload" append-to-body>
<div style="height: 60px;line-height: 30px">
<div> 第一步: 下载示例模板,按照模板填写会员数据,手机号为必填项 </div>
<a style="margin-left: 50px;color: #00afff"
@ -454,7 +454,7 @@ import {
updateUser
} from "@/api/staff/user/user";
import {allUserGrade, listUserGrade} from "@/api/staff/user/usergrade";
import {ljStoreList} from "@/api/staff/store";
import {ljStoreList, storesList} from "@/api/staff/store";
import {getSysConfig} from "@/api/staff/user/sysconfig";
import { getToken } from "@/utils/auth";
import {paymentApi} from "@/api/payment/fypay";
@ -608,7 +608,7 @@ export default {
listUserGrade({page:1,pageSize:20}).then( response => {
this.userGradeList = response.data.records;
});
ljStoreList().then( response => {
storesList().then( response => {
this.storeList = response.data
});
},

View File

@ -25,14 +25,16 @@
<el-descriptions-item label="手机号">{{form.mobile}}
<el-tag size="mini" @click="replaceMobile">更换</el-tag>
</el-descriptions-item>
<el-descriptions-item label="会员昵称">{{form.name}}</el-descriptions-item>
<el-descriptions-item label="实体卡号">{{form.idcard}}</el-descriptions-item>
<el-descriptions-item label="绑定信息"></el-descriptions-item>
<el-descriptions-item label="会员昵称">
<span style="color: #00afff" @click="changeName">{{form.name ? form.name : "--"}}</span>
</el-descriptions-item>
<el-descriptions-item label="实体卡号">{{form.idcard ? form.idcard : "--"}}</el-descriptions-item>
<el-descriptions-item label="绑定信息">--</el-descriptions-item>
<el-descriptions-item label="会员状态">
<dict-tag :options="dict.type.zhzt" :value="form.status"/>
</el-descriptions-item>
<el-descriptions-item label="加油次数">{{form.consumeNum}}</el-descriptions-item>
<el-descriptions-item label="加油总金额">{{form.refuelMoney}}</el-descriptions-item>
<el-descriptions-item label="加油总金额">{{form.refuelMoney ? form.refuelMoney : "--"}}</el-descriptions-item>
<el-descriptions-item label="所属油站">{{ store.name }}</el-descriptions-item>
<el-descriptions-item label="注册时间">{{form.createTime}}</el-descriptions-item>
<el-descriptions-item label="关联副卡">
@ -41,7 +43,7 @@
<el-descriptions-item label="会员等级">
{{ grade.name }}
</el-descriptions-item>
<el-descriptions-item label="储值优惠"></el-descriptions-item>
<el-descriptions-item label="储值优惠">--</el-descriptions-item>
<el-descriptions-item label="每日笔数">
<span style="color: #00afff" @click="configuration">跟随全局总配置</span>
</el-descriptions-item>
@ -49,7 +51,7 @@
<span style="color: #00afff" @click="level">
<dict-tag :options="dict.type.zcrzdj" :value="form.fixingLevel"/></span>
</el-descriptions-item>
<el-descriptions-item label="备注信息">{{ form.description }}</el-descriptions-item>
<el-descriptions-item label="备注信息">{{ form.description ? form.description : "--" }}</el-descriptions-item>
</el-descriptions>
</div>
</div>
@ -65,7 +67,7 @@
<div class="sta">
<el-statistic
group-separator=","
:value="form.point"
:value="form.points"
title="累计积分"
></el-statistic>
</div>
@ -74,8 +76,8 @@
<div class="sta">
<el-statistic
group-separator=","
:value="form.refuelMoney"
title="加油金">
:value="form.growthValue"
title="成长值">
</el-statistic>
</div>
</el-col>
@ -84,7 +86,7 @@
<el-statistic
group-separator=","
:precision="2"
:value="form.balance"
:value="form.cardBalance"
title="账户余额"
></el-statistic>
</div>
@ -94,9 +96,11 @@
<el-statistic
group-separator=","
:precision="2"
:value="form.literCard"
title="升数卡余额"
></el-statistic>
:value="form.refuelMoney"
title="囤油卡余额"
>
<!-- <span></span>-->
</el-statistic>
</div>
</el-col>
</el-row>
@ -511,12 +515,14 @@
</el-tabs>
</template>
</el-dialog>
<!-- 选择员工-->
<el-dialog :close-on-click-modal="false" width="50%" height="50%" title="选择员工" :visible.sync="openStaff" append-to-body>
<select-staff @send-data="handleDataFromChild">
</select-staff>
</el-dialog>
<!-- 确认充值-->
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openConfirm" width="500px" append-to-body>
<div v-if="isPay"
@ -589,7 +595,24 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button @click="openMobile = false"> </el-button>
</div>
</el-dialog>
<!-- 更换用户昵称对话框-->
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openName" style="margin-top: 200px" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="会员昵称" prop="name" style="width: 420px">
<el-input v-model="form.name" type="textarea" placeholder="请输入会员昵称" maxlength="30" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="openName = false"> </el-button>
</div>
</el-dialog>
@ -656,7 +679,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button @click="openBindIdCard = false"> </el-button>
</div>
</el-dialog>
@ -771,7 +794,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button @click="openConfig = false"> </el-button>
</div>
</el-dialog>
@ -799,7 +822,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
<el-button @click="openLevel = false"> </el-button>
</div>
</el-dialog>
@ -873,14 +896,12 @@ export default {
realyPayBills:0,
oilTypeList: {},
isPay:true,
isPaySuccess:false,
isQuery:true,
payList:[],
//
literCard:[
@ -907,6 +928,7 @@ export default {
title:'',
//
openMobile: false,
openName: false,
openRecharge: false,
openSecondCard:false,
openBindIdCard:false,
@ -949,6 +971,7 @@ export default {
//
rules: {
mobile: [{ required: true, message: "请输入手机号", trigger: "blur" }],
name: [{ required: true, message: "请输入会员昵称,内容不可为空", trigger: "blur" }],
type: [{ required: true, message: "请选择操作类型", trigger: "blur" }],
fixingLevel: [{ required: true, message: "请选择认证信息", trigger: "blur" }],
}
@ -974,6 +997,11 @@ export default {
this.openMobile = true;
this.title = '更换手机号'
},
//
changeName(){
this.openName = true;
this.title = '会员昵称'
},
//
secondCard(){
this.openSecondCard = true;
@ -1162,7 +1190,6 @@ export default {
confirm(flag){
this.flag = flag
if (flag ===1) {
if (this.cardValueForm.paymentType == '') {
this.$message.error('请选择支付方式');
@ -1452,6 +1479,7 @@ export default {
updateUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.openMobile = false;
this.openName = false;
this.openConfig = false;
this.openLevel = false;
this.openBindIdCard = false;
@ -1468,10 +1496,6 @@ export default {
},
//
cancel() {
this.openMobile = false;
this.openConfig = false;
this.openLevel = false;
this.openBindIdCard = false;
this.openRecharge = false;
this.isPay = true;

View File

@ -0,0 +1,15 @@
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -451,6 +451,9 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
Double beforeBalance = balance.getCardBalance();
Double afterBalance = beforeBalance - amount;
balance.setCardBalance(afterBalance);
// 修改加油次数
Integer consumeNum = balance.getConsumeNum();
balance.setConsumeNum(consumeNum+1);
userBalanceService.updateUserBalance(balance);
// 添加余额记录信息
CardBalanceChange cardBalanceChange = new CardBalanceChange();

View File

@ -51,6 +51,16 @@ public class OilNumberController extends BaseController {
return getSuccessResult(list);
}
@ApiOperation("查询所有油号")
@GetMapping("getList2")
public ResponseObject selectAll2(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10000") Integer pageSize,
OilNumber oilNumber) {
Page page =new Page(pageNo,pageSize);
IPage<OilNumber> list = oilPresetPricesService.selectOilNumberList2(page,oilNumber);
return getSuccessResult(list);
}
/**
* 通过主键查询单条数据
*

View File

@ -23,6 +23,7 @@ public interface OilNumberMapper extends BaseMapper<OilNumber> {
* @return
*/
IPage<OilNumber> selectOilNumberList(Page page, @Param("oilNumber") OilNumber oilNumber);
IPage<OilNumber> selectOilNumberList2(Page page, @Param("oilNumber") OilNumber oilNumber);
/**
* 根据id查询员工信息

View File

@ -31,6 +31,19 @@
where store_id = #{oilNumber.storeId}
</select>
<select id="selectOilNumberList2" resultMap="OilNumberResult">
select
omm.number_id ,
onn.oil_type,
onn.oil_name,
omm.oil_price,
omm.gb_price
from oil_number omm
left join oil_name onn on omm.oil_name = onn.id
where omm.store_id = #{oilNumber.storeId}
</select>
<!-- select-->
<!-- number_id numberId,-->
<!-- oil_type oilType,-->

View File

@ -23,6 +23,7 @@ public interface OilNumberService extends IService<OilNumber> {
* @return
*/
public IPage<OilNumber> selectOilNumberList(Page page, @Param("oilNumber") OilNumber oilNumber);
public IPage<OilNumber> selectOilNumberList2(Page page, @Param("oilNumber") OilNumber oilNumber);
/**
* 根据id查询员工信息

View File

@ -33,6 +33,13 @@ public class OilNumberServiceImpl extends ServiceImpl<OilNumberMapper, OilNumber
return baseMapper.selectOilNumberList(page,oilNumber);
}
@Override
public IPage<OilNumber> selectOilNumberList2(Page page, OilNumber oilNumber) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
oilNumber.setStoreId(nowAccountInfo.getStoreId());
return baseMapper.selectOilNumberList2(page,oilNumber);
}
@Override
public OilNumber selectOilNumberById(int id) {
return baseMapper.selectOilNumberById(id);

View File

@ -38,6 +38,16 @@ public class LJStoreController extends BaseController {
return getSuccessResult(list);
}
/**
* 根据连锁店id查询所有门店信息
* @return
*/
@GetMapping("/stores")
public ResponseObject stores(){
List<LJStore> list = storeService.selectStoreByChainStoreId();
return getSuccessResult(list);
}
/**
* 修改门店信息
* @param store

View File

@ -41,6 +41,12 @@ public interface ILJStoreService extends IService<LJStore> {
*/
public List<LJStore> selectStoreList();
/**
* 根据连锁店id查询店铺信息
* @return
*/
public List<LJStore> selectStoreByChainStoreId();
/**
* 修改店铺信息
* @param store 店铺信息

View File

@ -1,5 +1,6 @@
package com.fuint.business.storeInformation.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.mapper.LJStoreMapper;
@ -7,6 +8,7 @@ import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.StringUtils;
import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@ -123,6 +125,17 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
return baseMapper.selectList(null);
}
@Override
public List<LJStore> selectStoreByChainStoreId() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
LJStore store = this.selectStoreByStoreId(nowAccountInfo.getStoreId());
Integer chainStoreId = store.getChainStoreId();
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("chain_store_id",chainStoreId);
List<LJStore> list = baseMapper.selectList(queryWrapper);
return list;
}
/**
* 修改店铺信息
* @param store 店铺信息

View File

@ -44,11 +44,11 @@ public interface LJUserMapper extends BaseMapper<LJUser> {
/**
* 统计信息
* @param storeId
* @param chainStoreId
* @param sumValue
* @return
*/
public Double selectSumByStore(@Param("storeId") int storeId,@Param("sumValue") String sumValue);
public Double selectSumByStore(@Param("chainStoreId") int chainStoreId,@Param("sumValue") String sumValue);
LJUserVo selectAllInfoById(@Param("userId") Integer userId);

View File

@ -2,20 +2,23 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.userManager.mapper.LJUserMapper">
<sql id="selectUser">
select mu.*,mub.card_balance,mub.points,mub.growth_value,mub.refuel_money,mub.grade_id,mub.consume_num,
mub.second_card,mub.fixing_level
from mt_user mu
left join mt_user_balance mub on mu.id = mub.mt_user_id
select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.second_card,mub.fixing_level,
mi.storeId,mi.staffId,mi.inviterId,mi.chain_store_id from mt_user mu
left join mt_user_balance mub on mu.id = mub.mt_user_id
left join mt_invitation mi on mu.id = mi.userId
</sql>
<select id="selectUserList" resultType="com.fuint.business.userManager.vo.LJUserVo">
<include refid="selectUser"></include>
<where>
<if test="user.chainStoreId != null and user.chainStoreId != ''">
and mi.chain_store_id = #{user.chainStoreId}
</if>
<if test="user.storeId != null and user.storeId != ''">
and mu.store_id = #{user.storeId}
and mi.storeId = #{user.storeId}
</if>
<if test="user.storeId == 0">
and mu.store_id = #{user.storeId}
and mi.storeId = #{user.storeId}
</if>
<if test="user.mobile != null and user.mobile != ''">
and mu.mobile like concat('%', #{user.mobile}, '%')
@ -48,7 +51,7 @@
</select>
<!-- 查询会员统计信息-->
<select id="selectSumByStore" resultType="java.lang.Double" parameterType="int">
select sum(${sumValue}) from mt_user_balance where store_id = #{storeId}
select sum(${sumValue}) from mt_user_balance where chain_store_id = #{chainStoreId}
</select>
<!-- 根据手机号查询会员信息-->
<select id="selectUserByMobile" resultType="com.fuint.business.userManager.vo.LJUserVo"

View File

@ -33,6 +33,8 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
private CertifiedMemberMapper certifiedMemberMapper;
@Autowired
private UserBalanceService balanceService;
@Autowired
private ILJStoreService storeService;
/**
* 根据条件分页查询会员信息
@ -72,8 +74,10 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
Map<String ,Object> map = new HashMap<>();
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
Double balance = baseMapper.selectSumByStore(storeId, "card_balance");
Double point = baseMapper.selectSumByStore(storeId, "points");
LJStore store = storeService.selectStoreByStoreId(storeId);
Integer chainStoreId = store.getChainStoreId();
Double balance = baseMapper.selectSumByStore(chainStoreId, "card_balance");
Double point = baseMapper.selectSumByStore(chainStoreId, "points");
// Double literCard = baseMapper.selectSumByStore(storeId, "liter_card");
// Double refuelMoney = baseMapper.selectSumByStore(storeId, "refuel_money");
@ -149,8 +153,6 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
balanceService.deleteUserBalanceByUserId(id);
}
@Autowired
private ILJStoreService storeService;
@Autowired
private MtInvitationMapper invitationMapper;
@Autowired
@ -243,6 +245,7 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
invitation.setStoreId(storeId);
invitation.setStaffId(nowAccountInfo.getStaffId());
invitation.setChainStoreId(chainStoreId);
invitation.setStatus("qy");
invitationMapper.insert(invitation);
return row;
}
@ -255,9 +258,11 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
@Override
public int updateUser(LJUserVo userVo) {
LJUser user = new LJUser();
user.setId(userVo.getId());
user.setUserNo(userVo.getUserNo());
user.setAvatar(userVo.getAvatar());
user.setName(userVo.getName());
user.setPhysicalCard(userVo.getPhysicalCard());
user.setOpenId(userVo.getOpenId());
user.setMobile(userVo.getMobile());
user.setIdcard(userVo.getIdcard());

View File

@ -43,27 +43,10 @@ public class LJUserVo extends BaseEntity {
@ExcelProperty(value = "证件号码")
private String idcard;
// 等级ID
private Integer gradeId;
// 性别 1男,0女
@ExcelProperty(value = "性别",converter = GenderConverter.class)
private Integer sex;
// 储值卡
@ExcelProperty(value = "储值卡余额")
private Double cardBalance;
// 积分
@ExcelProperty(value = "积分余额")
private Integer points;
// 成长值
private Integer growthValue;
// 油量
private String refuelMoney;
// 出生日期
private String birthday;
@ -84,6 +67,23 @@ public class LJUserVo extends BaseEntity {
// 公众号
private String official;
// 等级ID
private Integer gradeId;
// 储值卡
@ExcelProperty(value = "储值卡余额")
private Double cardBalance;
// 积分
@ExcelProperty(value = "积分余额")
private Integer points;
// 成长值
private Integer growthValue;
// 油量
private String refuelMoney;
// 加油次数
private Integer consumeNum;
@ -95,17 +95,17 @@ public class LJUserVo extends BaseEntity {
private String fixingLevel;
/**
* 店铺id
* 店铺Id
*/
private Integer storeId;
/**
* 员工id
*/
private Integer staffid;
private Integer staffId;
/**
* 邀请人id
*/
private Integer inviterid;
private Integer inviterId;
/**
* 连锁店id
*/

View File

@ -153,7 +153,7 @@
<!-- &lt;!&ndash;关联会员对话框 end&ndash;&gt;-->
<!-- &lt;!&ndash;结算对话框 start&ndash;&gt;-->
<!-- <settlementDialog :show-dialog="openSettlementDialog" :memberInfo="memberInfo" :totalPrice="cartTotalPrice" :remarks="cartRemark" :orderInfo="orderInfo" :couponList="couponList" @submit="submitSettlement" @switchMember="switchMember" @closeDialog="closeDialog"/>-->
<!-- <settlementDialog :show-dialog="openSettlementDialog" :memberInfo="memberInfo" :totalPrice="cartTotalPrice" :remarks="cartRemark" :orderInfo="orderInfo" :couponList.vue="couponList.vue" @submit="submitSettlement" @switchMember="switchMember" @closeDialog="closeDialog"/>-->
<!-- &lt;!&ndash;结算对话框 end&ndash;&gt;-->
<!-- &lt;!&ndash;扫码付款对话框 start&ndash;&gt;-->

View File

@ -3,7 +3,8 @@
"autoscan": true,
"custom": {
// uni-ui
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue",
"^w-(.*)": "@/uni_modules/wmf-code/components/w-$1/w-$1.vue"
}
},
"subPackages": [{
@ -48,6 +49,13 @@
"navigationStyle": "custom"
}
},
{
"path": "QRcode/QRcode",
"style": {
"navigationBarTitleText": "二维码",
"navigationStyle": "custom"
}
},
{
"path": "oilRecharge/oilRecharge",
"style": {
@ -69,7 +77,6 @@
"navigationStyle": "custom"
}
},
{
"path": "goodsDetails/goodsDetails",
"style": {

View File

@ -49,18 +49,18 @@
<view class="conttainer-title">今日会员价</view>
<view class="conttainer-box">
<view class="c-box-box1" @click="show = true">
<view class="">92#</view>
<view class="">{{oilInfo.oilName}}</view>
<view class="">
<u-icon name="arrow-down-fill"></u-icon>
</view>
</view>
<view class="c-box-box2">
<view class="xred">会员价</view>
<view class="dred"> <text class="xred"></text> 6.55</view>
<view class="dred"> <text class="xred"></text> {{oilInfo.oilPrice}}</view>
</view>
<view class="c-box-box3">
<view class="xblck">国际价</view>
<view class="dblck"> <text class="xblck"></text> 6.55</view>
<view class="dblck"> <text class="xblck"></text> {{oilInfo.oilPrice}}</view>
</view>
</view>
@ -105,7 +105,9 @@
<view style="height: 88px; width: 100%;"></view>
</view>
<!-- 加油站卡片结束-->
<u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="cancel"></u-picker>
<!-- <u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="cancel"></u-picker> -->
<u-picker :columns="columns" @confirm="confirm" :show="show" @cancel="show = false" keyName="label"></u-picker>
<!--外层结束 -->
<tabbar :msg="msg"></tabbar>
</view>
@ -115,16 +117,24 @@
<script>
import tabbar from "../../components/tabbar/tabbar.vue"
import config from '@/config'
import request from '../../utils/request'
export default {
data() {
return {
msg: "1",
show: false,
title: '',
oilTypeList: '',
columns: [
['#92', '#95', '#98']
],
oilInfo: {
oilName:'未添加',
oilPrice:'0',
gbPrice:'0'
},
list3: [
'http://47.95.206.185:83/topbj.png',
'http://47.95.206.185:83/centerbj.png',
@ -164,6 +174,7 @@
this.staffId = uni.getStorageSync("inviteStaffId")
}
this.isExistStoreId();
this.getOilType();
},
onShow() {
this.isExistStoreId();
@ -242,8 +253,44 @@
}
});
},
//
getOilType() {
request({
url: 'business/petrolStationManagement/oilNumber/getList2',
method: 'get',
// params:{}
}).then((res)=>{
if(res.code == 200){
this.oilTypeList = res.data.records
console.log("aaabbb",this.oilTypeList)
if (this.oilTypeList.length > 0) {
this.oilInfo.oilName = this.oilTypeList[0].oilName,
this.oilInfo.oilPrice = this.oilTypeList[0].oilPrice,
this.oilInfo.gbPrice = this.oilTypeList[0].gbPrice
}
let oilData = []
this.oilTypeList.forEach(res => {
let data = {
id:res.numberId,
label:res.oilName,
oilPrice:res.oilPrice,
gbPrice:res.gbPrice
}
oilData.push(data)
})
this.columns = [oilData]
console.log("aaa",this.columns)
}
})
},
confirm(e) {
console.log('选中的油号', e);
this.oilInfo.oilName = e.value[0].label,
this.oilInfo.oilPrice = e.value[0].oilPrice,
this.oilInfo.gbPrice = e.value[0].gbPrice
this.show = false
},
cancel() {

View File

@ -0,0 +1,261 @@
<template>
<view class="content">
<view class="container">
<view class="my-header">
<view class="my-icons" @click="goback"> <uni-icons type="left" color="#ffffff" size="16"></uni-icons>
</view>
<view class="my-text">二维码</view>
<view class="my-icons"></view>
</view>
<!-- 顶部区域 -->
<view class="cen-box">
<view class="box-top">
请出示此码给加油员
</view>
<view class="code-top">
<w-barcode :options="option"></w-barcode>
</view>
<view class="hui-size">
<text>2023 **** **** 5523</text>
<text>查看数字</text>
</view>
<view class="code-box">
<w-qrcode :options="options"></w-qrcode>
</view>
<view class="dis-size">
<u-icon name="reload" color="#2979ff" size="18"></u-icon>
<text style="margin-left: 10px;">0秒后自动刷新</text>
</view>
<view class="bottom-box" @click="bottomShow()">
<view style="display: flex;align-items: center;">
<uni-icons type="wallet-filled" color="#2979ff" size="30"></uni-icons>
<view style="margin-left: 10px;">
<view class="">自动识别</view>
<view style="font-size: 14px; color: #666666;">根据账户自动识别的付款方式</view>
</view>
</view>
<view class="">
<u-icon name="arrow-right"></u-icon>
</view>
</view>
</view>
<view class="v-bottom-box">
<u-icon name="warning-fill" size="20px"></u-icon>
<view style="width: 80%;margin-left: 10px;">付款码有效时长180秒切勿截屏使用</view>
</view>
</view>
<u-popup :show="show" :round="10" @close="close" @open="open">
<view class="box-popup">
<view class="popup-top">
<view class="title">请选择用户类型</view>
<view class="hui-size">如果付款失败尝试使用其他方式完成付款</view>
</view>
<view class="bottom-box">
<view style="display: flex;align-items: center;">
<uni-icons type="wallet-filled" color="#2979ff" size="30"></uni-icons>
<view style="margin-left: 10px;">
<view class="">自动识别</view>
<view style="font-size: 14px; color: #666666;">根据账户自动识别的付款方式</view>
</view>
</view>
<view class="">
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="bottom-box">
<view style="display: flex;align-items: center;">
<uni-icons type="wallet-filled" color="#2979ff" size="30"></uni-icons>
<view style="margin-left: 10px;">
<view class="">自动识别</view>
<view style="font-size: 14px; color: #666666;">根据账户自动识别的付款方式</view>
</view>
</view>
<view class="">
<u-icon name="arrow-right"></u-icon>
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
title: '',
show: false,
option: {
width: 670, // rpx
height: 100, // rpx
code: 'E57890543271985', //
},
options: {
code: 'https://qm.qq.com/cgi-bin/qm/qr?k=LKqML292dD2WvwQfAJXBUmvgbiB_TZWF&noverify=0', //
size: 460, // 460460rpx
},
}
},
components: {
},
methods: {
close() {
console.log('弹出层收起');
this.show = false
},
open() {
console.log('弹出层打开');
},
bottomShow() {
this.show = true
},
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
}
.container {
width: 100%;
height: 100vh;
box-sizing: border-box;
padding-top: 88px;
background-color: #1678ff;
}
.my-header {
width: 100%;
height: 88px;
background: #1678ff;
display: flex;
align-items: center;
justify-content: space-between;
color: #ffffff;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
.my-icons {
width: 20px;
}
position: fixed;
top: 0px;
}
.cen-box {
width: 95%;
background: #ffffff;
box-sizing: border-box;
padding: 15px;
border-radius: 8px;
margin: 10px auto;
}
.box-top {
width: 100%;
box-sizing: border-box;
// padding: 10px 0px;
padding-bottom: 10px;
border-bottom: 1px solid #f4f5f6;
text-align: center;
font-size: 18px;
font-weight: bold;
}
.code-box {
display: flex;
align-items: center;
justify-content: center;
}
.code-top {
margin: 10px auto;
display: flex;
align-items: center;
justify-content: center;
}
.hui-size {
font-size: 14px;
width: 100%;
text-align: center;
color: #666666;
margin-bottom: 20px;
}
.dis-size {
display: flex;
align-items: center;
justify-content: center;
color: #666666;
font-size: 14px;
margin: 20px 0px;
}
.bottom-box {
width: 100%;
border-top: 1px solid #f4f5f6;
box-sizing: border-box;
padding-top: 15px;
display: flex;
align-items: center;
justify-content: space-between;
}
.v-bottom-box {
width: 95%;
border-radius: 8px;
box-sizing: border-box;
padding: 15px 10px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #666666;
margin: 10px auto;
}
.box-popup {
width: 100%;
box-sizing: border-box;
padding: 15px;
background-color: #ffffff;
}
.popup-top {
box-sizing: border-box;
}
.title {
width: 100%;
text-align: center;
font-size: 18px;
font-weight: bold;
color: #000000;
}
.hui-size {
color: #666666;
font-size: 14px;
}
</style>

View File

@ -0,0 +1,227 @@
<template>
<view class="content">
<view class="container">
<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="ba-box">
<u-tabs :list="list1" @click="click"></u-tabs>
</view>
<view class="box-bb">
<view class="box-ll" :class="{ 'lan' : tabindex == index }" v-for="(item,index) in tapList" :key="index"
@click="gettabingex(index)">
<view class="">{{item.name}}</view>
</view>
</view>
<view class="card-box" v-for="(item,index) in 3" :key="index">
<view class="left-img">
<view class="huiz">120</view>
<view class="cbai">优惠券</view>
</view>
<view class="right-box">
<view class="title">新用户专享5折券</view>
<view class="hui-size">部分产品可用满240可用此券定期可用...</view>
<view class="dis-bt">
<view class="hui-size">有效期2023-11-30</view>
<view class="anniu">
<text>立即使用</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: '',
tabindex: 0,
tapList: [{
name: "未使用"
},
{
name: "已使用"
},
{
name: "已失效"
},
],
list1: [{
name: '全部',
}, {
name: '抵用券',
}, {
name: '折扣券'
}, {
name: '兑换券'
}, {
name: '洗车券'
}, {
name: '洗车卡'
}]
}
},
components: {
},
methods: {
click(item) {
console.log('item', item);
},
gettabingex(index) {
this.tabindex = index
},
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
}
.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;
.my-icons {
width: 20px;
}
position: fixed;
top: 0px;
}
.card-box {
width: 95%;
background: #ffffff;
border-radius: 8px;
box-sizing: border-box;
padding: 15px;
margin: 10px auto;
display: flex;
}
.right-box {
width: 80%;
}
.left-img {
width: 70px;
height: 70px;
background: url('http://47.95.206.185:83/hbao.png')center no-repeat;
background-size: 100% 100%;
margin-right: 10px;
}
.dis-bt {
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-top: 5px;
border-top: 1px solid #f4f5f6;
margin-top: 5px;
}
.hui-size {
font-size: 14px;
color: #999999;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.title {
font-size: 16px;
font-weight: bold;
color: #333333;
}
.anniu {
width: 64px;
height: 24px;
background: linear-gradient(90deg, #FC3E33 0%, #FF6B40 100%);
display: flex;
align-items: center;
justify-content: center;
border-radius: 50px;
color: #ffffff;
font-size: 12px;
}
.huiz {
font-size: 14px;
font-weight: bold;
margin: 12px 0px;
text-align: center;
color: #8F5624;
}
.cbai {
font-size: 14px;
color: #ffffff;
text-align: center;
}
.ba-box {
background: #ffffff;
}
.box-bb {
width: 100%;
display: flex;
align-items: center;
box-sizing: border-box;
background-color: #ffffff;
padding: 10px 15px;
}
.box-ll {
display: flex;
align-items: center;
justify-content: center;
border-radius: 50px;
background: #eff2f2;
color: #8d8f8f;
font-size: 12px;
padding: 4px 10px;
margin-right: 15px;
}
.lan {
background: #ecf5ff !important;
color: #8179ff;
}
</style>

View File

@ -2,27 +2,44 @@
<view class="content">
<view class="container">
<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" color="#ffffff" size="16"></uni-icons>
</view>
<view class="my-text">今日油价</view>
<view class="my-icons"></view>
</view>
<!-- 顶部区域 -->
<view class="top-box">
<view class="t-left-box">
<div>政府指导油价</div>
<view style="font-size: 18px; font-weight: bold;">11月20号</view>
<view style="font-size: 14px;">对比上次价格波动</view>
<view class="tupian"></view>
</view>
<view class="box-list">
<view class="dis-top">
<view class="gang"></view>
<view class="">#92</view>
</view>
<view class="t-right-box">
<div>最新油价山东</div>
<view class="bottom-bt">
<view style="width: 50%;">
<view class="hui-box">政府指导油价()</view>
<view class="dis-c">
<view class="dlan">7.8</view>
<view class="dis"> <u-icon name="arrow-up-fill" color="#FF5700" size="12"></u-icon>
<text style="font-size: 12px; color: #FF5700; ">30%</text>
</view>
</view>
</view>
<view style="width: 50%;">
<view class="hui-box">最新油价</view>
<view class="dis-c">
<view class="dlan" style="color: #333333;">7.8</view>
<view class="dis"> <u-icon name="arrow-down-fill" color="#1FAD40" size="12"></u-icon>
<text style="font-size: 12px; color: #1FAD40; ">30%</text>
</view>
</view>
</view>
</view>
</view>
<view class="box-centenr">
<!-- <view class="box-bor">
<view class="">92#(国VIB)</view>
<view class="gang"></view>
<view class="">7.88/</view>
</view> -->
</view>
</view>
@ -60,16 +77,17 @@
height: 100vh;
box-sizing: border-box;
padding-top: 88px;
background: linear-gradient(180deg, #2F72F7 0%, rgba(47, 114, 247, 0) 50%, rgba(47, 114, 247, 0) 100%);
}
.my-header {
width: 100%;
height: 88px;
background: #ffffff;
background: #2F72F7;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
color: #ffffff;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
@ -84,12 +102,29 @@
}
.top-box {
width: 100%;
display: flex;
align-items: center;
background-color: #ffffff;
border-bottom: 1px solid #ffffff;
width: 95%;
color: #ffffff;
height: 50px;
margin: 10px auto;
position: relative;
}
.tupian {
background: url('http://47.95.206.185:83/imgriht.png')center no-repeat;
background-size: 100% 100%;
bottom: -45px;
right: 0px;
width: 130px;
height: 105px;
position: absolute;
}
.gang {
width: 4px;
height: 16px;
background: #2F72F7;
border-radius: 2px;
margin-right: 5px;
}
.t-left-box {
@ -119,10 +154,56 @@
padding: 10px;
}
.gang {
width: 10px;
height: 20px;
background: crimson;
margin: 0px 15px;
.box-list {
width: 95%;
margin: 10px auto;
border-radius: 8px;
background: #ffffff;
box-sizing: border-box;
padding: 15px;
}
.dis-top {
display: flex;
align-items: center;
font-size: 18px;
font-weight: bold;
color: #333333;
}
.bottom-bt {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 5px auto;
}
.dis {
display: flex;
}
.dis-c {
display: flex;
align-items: center;
justify-content: center;
margin-top: 10px;
}
.hui-box {
width: 100%;
text-align: center;
font-size: 14px;
color: #707070;
}
.dlan {
color: #2F72F7;
font-weight: bold;
font-size: 25px;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB