This commit is contained in:
zhaohengkun 2024-10-08 18:25:41 +08:00
commit 41b52c140a
22 changed files with 929 additions and 660 deletions

View File

@ -1,87 +1,90 @@
<template>
<div class="app-conr">
<div class="tab-box">
<div class="f-box" v-for="(item,index) in tablist" :key="index" @click="activeindex=index" :class="{ 'active' :activeindex==index}">{{item.name}}</div>
</div>
<div class="cor">
<div class="bai-box" v-if="activeindex == 0">
<div class="qizhi">
<div class="left-icon">i</div>
<div>
<div class="bigsize">每日积分签到</div>
<div class="smallsize">签到规则为连续签到如中途漏签一天将重置从第一天开始</div>
<div class="app-conr">
<div class="tab-box">
<div class="f-box" v-for="(item,index) in tablist" :key="index" @click="activeindex=index"
:class="{ 'active' :activeindex==index}">{{ item.name }}
</div>
</div>
<el-form :model="dataForm" ref="dataForm" :rules="rules" size="small" :inline="true" label-width="100px">
<el-row :gutter="24">
<el-col :span="15">
<el-form-item label="签到功能" prop="signInFunction" >
<el-radio-group v-model="dataForm.signInFunction">
<el-radio :label='0'>启用</el-radio>
<el-radio :label='1'>禁用</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="15">
<el-form-item label="适用规则" prop="" >
<el-radio-group v-model="dataForm.u">
<el-radio :label='0'>不限制</el-radio>
<el-radio :label='1'>按签到周期</el-radio>
</el-radio-group>
</el-form-item>
<el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
</el-row>
<div style="width: 100%; ">
<div class="cor">
<div class="bai-box" v-if="activeindex == 0">
<el-form-item style="width: 24%" v-for="(item,index) in dataForm.pointsObtained" :key="index" :prop="'pointsObtained' + index" :label="item.day">
<el-input v-model.number="item.integral" placeholder="">
<template slot="append">积分</template>
</el-input>
</el-form-item>
<div class="qizhi">
<div class="left-icon">i</div>
<div>
<div class="bigsize">每日积分签到</div>
<div class="smallsize">签到规则为连续签到如中途漏签一天将重置从第一天开始</div>
</div>
</div>
<el-form :model="dataForm" ref="dataForm" :rules="rules" size="small" :inline="true" label-width="100px">
<el-row :gutter="24">
<el-col :span="15">
<el-form-item label="签到功能" prop="signInFunction">
<el-radio-group v-model="dataForm.signInFunction">
<el-radio :label='0'>启用</el-radio>
<el-radio :label='1'>禁用</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="15">
<el-form-item label="适用规则" prop="">
<el-radio-group v-model="dataForm.signApplicableRules" @input="applicableRules()">
<el-radio :label='0'>不限制</el-radio>
<el-radio :label='1'>按签到周期</el-radio>
</el-radio-group>
</el-form-item>
<el-select v-model="value" placeholder="请选择" @change="cycle()">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
</el-row>
<div style="width: 100%; ">
<el-form-item style="width: 24%" v-for="(item,index) in dataForm.pointsObtained" :key="index"
:prop="'pointsObtained' + index" :label="item.day">
<el-input v-model.number="item.integral" placeholder="">
<template slot="append">积分</template>
</el-input>
</el-form-item>
</div>
<el-form-item label="签到规则" prop="signInRules">
<el-input :rows="3" style="width: 1600px;" type="textarea" v-model="dataForm.signInRules"></el-input>
</el-form-item>
</el-form>
<div style="width: 1600px; margin-top: 150px; display: flex;justify-content: center ">
<el-button type="primary" @click="submit">保存</el-button>
</div>
</div>
<el-form-item label="签到规则" prop="signInRules" >
<el-input :rows="3" style="width: 1600px;" type="textarea" v-model="dataForm.signInRules"></el-input>
<div class="bai-box" v-else>
<el-form :model="dataForm" ref="dataForm" :rules="rules" size="small" :inline="true" label-width="100px">
<el-form-item label="积分说明" prop="desc">
<el-input type="textarea" v-model="dataForm.pointsRules" style="width: 1600px"></el-input>
</el-form-item>
</el-form>
<div style="width: 1600px; margin-top: 150px; display: flex;justify-content: center ">
<el-button type="primary" @click="submit" >保存</el-button>
</el-form>
<div style="width: 1600px; margin-top: 150px; display: flex;justify-content: center ">
<el-button type="primary" @click="submit">保存</el-button>
</div>
</div>
</div>
</div>
<div class="bai-box" v-else>
<el-form :model="dataForm" ref="dataForm" :rules="rules" size="small" :inline="true" label-width="100px">
<el-form-item label="积分说明" prop="desc">
<el-input type="textarea" v-model="dataForm.pointsRules" style="width: 1600px"></el-input>
</el-form-item>
</el-form>
<div style="width: 1600px; margin-top: 150px; display: flex;justify-content: center ">
<el-button type="primary" @click="submit" >保存</el-button>
</div>
</div>
</div>
</div>
</template>
<script>
import {getSettingsApi,updateSettingsApi } from "@/api/integral/settings";
import {getSettingsApi, updateSettingsApi} from "@/api/integral/settings";
import editor from '@/components/Editor/index'
export default {
@ -91,15 +94,15 @@ export default {
data() {
var valiNumberPass = (rule, value, callback) => {//
parseFloat(value).toFixed(2)
let reg = /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g;
if (value === '') {
callback(new Error('请输入内容'));
} else if (!reg.test(value)) {
callback(new Error('请输入数字'));
} else {
callback();
}
};
let reg = /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g;
if (value === '') {
callback(new Error('请输入内容'));
} else if (!reg.test(value)) {
callback(new Error('请输入数字'));
} else {
callback();
}
};
return {
tablist: [
{
@ -114,42 +117,42 @@ export default {
activeName: 'first',
rules:{
rules: {
desc: [
{ required: true, message: '不能为空', trigger: 'blur' }
{required: true, message: '不能为空', trigger: 'blur'}
],
refuelPointsRules:[
{ required: true, message: '请选择积分规则', trigger: 'change' }
refuelPointsRules: [
{required: true, message: '请选择积分规则', trigger: 'change'}
],
refuelSceneType:[
{ required: true, message: '请选择场景类型', trigger: 'change' }
refuelSceneType: [
{required: true, message: '请选择场景类型', trigger: 'change'}
],
refuelAmountType:[
{ required: true, message: '请选择金额类型', trigger: 'change' }
refuelAmountType: [
{required: true, message: '请选择金额类型', trigger: 'change'}
],
refuelValueParticipation:[
{ required: true, message: '请选择储值参与', trigger: 'change' }
refuelValueParticipation: [
{required: true, message: '请选择储值参与', trigger: 'change'}
],
refuelSceneRules:[
{ required: true, message: '请选择场景规则', trigger: 'change' }
refuelSceneRules: [
{required: true, message: '请选择场景规则', trigger: 'change'}
],
refuelFuelAmount: [
{ required: true, validator:valiNumberPass, trigger: "blur" }
{required: true, validator: valiNumberPass, trigger: "blur"}
],
refuelPoints: [
{ required: true, message: '输入积分', trigger: "blur" },
{ type: 'number', message: '积分必须为数字值'}
{required: true, message: '输入积分', trigger: "blur"},
{type: 'number', message: '积分必须为数字值'}
],
// amount:[
// {required: true,
// validator: (rule, value, callback) => this.valiNumberPass(rule, value, callback, 'amount'),
// trigger: 'blur'
// }
// ],
// amount:[
// {required: true,
// validator: (rule, value, callback) => this.valiNumberPass(rule, value, callback, 'amount'),
// trigger: 'blur'
// }
// ],
rechargeGive:[
{ required: true, message: '输入积分', trigger: "blur" },
{ type: 'number', message: '积分必须为数字值'}
rechargeGive: [
{required: true, message: '输入积分', trigger: "blur"},
{type: 'number', message: '积分必须为数字值'}
],
// points: [
// { required: true}
@ -188,39 +191,43 @@ export default {
signInFunction: 0,
//
signInRules: '',
//
signApplicableRules: 0,
//
signInCycle: 0,
//
pointsObtained: [
{
day:'第1天获得',
integral:0,
day: '第1天获得',
integral: 0,
},
{
day:'第2天获得',
integral:0,
day: '第2天获得',
integral: 0,
},
{
day:'第3天获得',
integral:0,
day: '第3天获得',
integral: 0,
},
{
day:'第4天获得',
integral:0,
day: '第4天获得',
integral: 0,
},
{
day:'第5天获得',
integral:0,
day: '第5天获得',
integral: 0,
},
{
day:'第6天获得',
integral:0,
day: '第6天获得',
integral: 0,
},
{
day:'第7天获得',
integral:0,
day: '第7天获得',
integral: 0,
},
{
day:'超8天获得',
integral:0,
day: '超8天获得',
integral: 0,
}
],
@ -229,20 +236,14 @@ export default {
},
options: [{
value: '选项1',
label: '黄金糕'
value: 0,
label: '一周'
}, {
value: '选项2',
label: '双皮奶'
value: 1,
label: '两周'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
value: 2,
label: '一个月'
}],
value: ''
@ -254,53 +255,181 @@ export default {
},
methods: {
handleChildValue(value) {
console.log("vale",value)
console.log("vale", value)
this.dataForm.pointsRules = value
},
getData() {
let file = this.dataForm
file.pointsObtained = JSON.stringify(file.pointsObtained);
file.refuelConsumptionAmount = JSON.stringify(file.refuelConsumptionAmount);
getSettingsApi(this.dataForm).then(res=>{
this.dataForm = res.data
this.dataForm.pointsObtained = JSON.parse(this.dataForm.pointsObtained)
this.dataForm.refuelConsumptionAmount = JSON.parse(res.data.refuelConsumptionAmount)
})
},
submit() {
let file = this.dataForm
// console.log()
file.pointsObtained = JSON.stringify(file.pointsObtained);
file.refuelConsumptionAmount = JSON.stringify(file.refuelConsumptionAmount);
this.dataForm = {}
updateSettingsApi(file).then(res=>{
this.$modal.msgSuccess("添加成功");
this.dataForm = {}
res.data.pointsObtained = JSON.parse(res.data.pointsObtained)
res.data.refuelConsumptionAmount = JSON.parse(res.data.refuelConsumptionAmount)
this.dataForm = res.data
}).catch(res=>{
this.$modal.msgSuccess("添加失败");
})
// this.getData()
},
cancel() {},
handleClick(tab, event) {
console.log(tab, event);
applicableRules() {
if (this.dataForm.signApplicableRules == 0) {
this.value = '',
this.dataForm.pointsObtained = [
{
day: '每天获得',
integral: 0,
}]
} else if (this.dataForm.signApplicableRules == 1) {
this.value = 0
this.getRules(7)
}
},
valiNumberPass(rule, value, callback, fieldName) {
this.$nextTick(() => {
// value
console.log(`Validating ${fieldName}:`, value);
});
cycle() {
if (this.value == 0) {
this.getRules(7)
} else if (this.value == 1) {
this.getRules(14)
} else if (this.value == 2) {
this.getRules(30)
}
},
getRules(length){
this.dataForm.pointsObtained = []
for (let i = 0; i < length; i++) {
let obj = {
day: '第' + (i + 1) + '天获得',
integral: 0,
}
this.dataForm.pointsObtained.push(obj)
}
},
getData() {
let file = this.dataForm
file.pointsObtained = JSON.stringify(file.pointsObtained);
file.refuelConsumptionAmount = JSON.stringify(file.refuelConsumptionAmount);
console.log("第一个this.dataForm", this.dataForm)
getSettingsApi(this.dataForm).then(res => {
this.dataForm = res.data
this.dataForm.pointsObtained = JSON.parse(this.dataForm.pointsObtained)
this.dataForm.refuelConsumptionAmount = JSON.parse(res.data.refuelConsumptionAmount)
if (this.dataForm.signCycle == 3) {
this.value = ''
}else {
this.value = this.dataForm.signCycle
}
})
console.log("dataForm", this.dataForm)
},
submit() {
let file = this.dataForm
// console.log()
file.pointsObtained = JSON.stringify(file.pointsObtained);
file.refuelConsumptionAmount = JSON.stringify(file.refuelConsumptionAmount);
file.signCycle = this.value
this.dataForm = {}
if (this.value === '') {
file.signCycle = 3
}
console.log("file", file)
updateSettingsApi(file).then(res => {
this.$modal.msgSuccess("添加成功");
this.dataForm = {}
res.data.pointsObtained = JSON.parse(res.data.pointsObtained)
res.data.refuelConsumptionAmount = JSON.parse(res.data.refuelConsumptionAmount)
this.dataForm = res.data
this.dataForm.signApplicableRules = res.data.signApplicableRules
console.log("res.data", res.data)
}).catch(res => {
this.$modal.msgSuccess("添加失败");
})
// this.dataForm= {
// // ID
// id: null,
// //
// refuelPointsRules: 0,
// //
// refuelPointsFunction: 0,
// //
// refuelSceneType: 0,
// //
// refuelAmountType: 0,
// //
// refuelValueParticipation: 0,
// //
// refuelSceneRules: 0,
// //
// refuelConsumptionAmount: '',
// //
// refuelPoints: 0,
// //
// refuelFuelAmount: 0.0,
// //
// refuelFuelVolume: 0.0,
// //
// rechargeGive: 0,
// //
// inviteGive: 0,
// //
// inviteGiveRules: '',
// //
// signInFunction: 0,
// //
// signInRules: '',
// //
// signApplicableRules: 0,
// //
// signInCycle: 0,
// //
// pointsObtained: [
// {
// day: '1',
// integral: 0,
// },
// {
// day: '2',
// integral: 0,
// },
// {
// day: '3',
// integral: 0,
// },
// {
// day: '4',
// integral: 0,
// },
// {
// day: '5',
// integral: 0,
// },
// {
// day: '6',
// integral: 0,
// },
// {
// day: '7',
// integral: 0,
// },
// {
// day: '8',
// integral: 0,
// }
// ],
//
// //
// pointsRules: ''
//
// }
// this.getData()
},
cancel() {
},
handleClick(tab, event) {
console.log(tab, event);
}
}
,
valiNumberPass(rule, value, callback, fieldName)
{
this.$nextTick(() => {
// value
console.log(`Validating ${fieldName}:`, value);
});
}
,
}
@ -308,29 +437,31 @@ export default {
<style scoped lang="scss">
.app-container{
width: 100%;
height: 100%;
background: #f6f8f9;
}
.conten-bottom{
box-sizing: border-box;
padding: 20px 20px;
display: flex;
flex-wrap: wrap;
}
.cardbox{
margin-right: 20px;
margin-bottom: 20px;
box-sizing: border-box;
padding: 10px;
border-radius: 10px;
width: 23%;
height: 150px;
background-size:40% 70%;
background-color: #f9f9f9;
border: 1px solid rgb(196, 196, 196)
}
.app-container {
width: 100%;
height: 100%;
background: #f6f8f9;
}
.conten-bottom {
box-sizing: border-box;
padding: 20px 20px;
display: flex;
flex-wrap: wrap;
}
.cardbox {
margin-right: 20px;
margin-bottom: 20px;
box-sizing: border-box;
padding: 10px;
border-radius: 10px;
width: 23%;
height: 150px;
background-size: 40% 70%;
background-color: #f9f9f9;
border: 1px solid rgb(196, 196, 196)
}
.tab-box {
width: 100%;
@ -363,31 +494,35 @@ export default {
.tabder-box {
width: 85%;
}
.cor{
.cor {
box-sizing: border-box;
padding: 15px;
background: #f9f9f9;
}
.bai-box{
.bai-box {
border-radius: 10px;
background: #fff;
box-sizing: border-box;
padding: 10px;
height: 85vh;
}
.qizhi{
.qizhi {
width: 100%;
border-radius: 8px;
padding: 20px;
color: #FF9655;
font-size: 16px;
background: rgba(255,150,85,0.15);
background: rgba(255, 150, 85, 0.15);
align-items: center;
display: flex;
margin-bottom: 30px;
}
.left-icon{
.left-icon {
width: 45px;
height: 45px;
border-radius: 50%;
@ -400,7 +535,8 @@ export default {
font-weight: bold;
margin-right: 25px;
}
.bigsize{
.bigsize {
font-size: 24px;
margin-bottom: 15px;
}

View File

@ -32,7 +32,7 @@
<!--查询单个-->
<select id="queryById" resultMap="IntegralSettingsMap">
select
id, refuel_points_rules, refuel_points_function, refuel_scene_type, refuel_amount_type, refuel_value_participation, refuel_scene_rules, refuel_consumption_amount, refuel_points, refuel_fuel_amount, refuel_fuel_volume, recharge_give, invite_give, invite_give_rules, sign_in_function, sign_in_rules, points_obtained, points_rules, store_id, create_time, update_time, create_by, update_by
id, refuel_points_rules, refuel_points_function, refuel_scene_type, refuel_amount_type, refuel_value_participation, refuel_scene_rules, refuel_consumption_amount, refuel_points, refuel_fuel_amount, refuel_fuel_volume, recharge_give, invite_give, invite_give_rules, sign_in_function, sign_in_rules, points_obtained, points_rules, store_id, create_time, update_time, create_by, update_by, sign_applicable_rules, sign_cycle
from integral_settings
where id = #{id}
</select>
@ -133,7 +133,7 @@
<!--查询指定行数据-->
<select id="getSettings" resultMap="IntegralSettingsMap">
select
id, refuel_points_rules, refuel_points_function, refuel_scene_type, refuel_amount_type, refuel_value_participation, refuel_scene_rules, refuel_consumption_amount, refuel_points, refuel_fuel_amount, refuel_fuel_volume, recharge_give, invite_give, invite_give_rules, sign_in_function, sign_in_rules, points_obtained, points_rules, store_id, create_by, update_by
id, refuel_points_rules, refuel_points_function, refuel_scene_type, refuel_amount_type, refuel_value_participation, refuel_scene_rules, refuel_consumption_amount, refuel_points, refuel_fuel_amount, refuel_fuel_volume, recharge_give, invite_give, invite_give_rules, sign_in_function, sign_in_rules, points_obtained, points_rules, store_id, create_by, update_by, sign_applicable_rules, sign_cycle
from integral_settings
<where>
store_id = #{integralSettings.storeId}
@ -251,6 +251,12 @@
<if test="updateBy != null">
update_by = #{updateBy},
</if>
<if test="signApplicableRules != null">
sign_applicable_rules = #{signApplicableRules},
</if>
<if test="signCycle != null">
sign_cycle = #{signCycle},
</if>
</set>
where id = #{id}
</update>

View File

@ -354,7 +354,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
List<IntegralSettingsBo> integralSettingsList = new ArrayList<>();
if (ObjectUtil.isNotEmpty(integralSettings)) {
JSONArray jsonArray = JSONArray.parseArray(integralSettings.getPointsObtained());
if (ObjectUtil.isNotEmpty(integralSettings.getSignApplicableRules()) && integralSettings.getSignApplicableRules() == 0) {
if (integralSettings.getSignApplicableRules() == 0) {
int length = 30;
for (int i = 0; i < length; i++) {
IntegralSettingsBo integralSettings1 = new IntegralSettingsBo();
@ -366,7 +366,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
integralSettingsList.add(integralSettings1);
}
integralSettingsVo.setIntegralSettings(integralSettingsList);
}else if (ObjectUtil.isNotEmpty(integralSettings.getSignApplicableRules()) && integralSettings.getSignApplicableRules() == 1) {
}else if (integralSettings.getSignApplicableRules() == 1) {
for (int i = 0; i < jsonArray.size(); i++) {
String day = jsonArray.getJSONObject(i).get("day").toString();
Integer points = Integer.parseInt(jsonArray.getJSONObject(i).get("integral").toString());

View File

@ -85,6 +85,16 @@ public class CardValueController extends BaseController {
return getSuccessResult(this.cardValueService.cardValueList(cardValue));
}
/**
* 查询本站会员充值卡列表小程序
* @param cardValue
* @return
*/
@GetMapping("cardValueLists")
public ResponseObject cardValueLists(@Param("cardValue") CardValue cardValue) {
return getSuccessResult(this.cardValueService.cardValueList(cardValue));
}
/**
* 通过主键查询单条数据
*

View File

@ -324,4 +324,15 @@ public class AllOrderInfoController extends BaseController {
IPage<AllOrderInfoUniVo> iPageList = this.allOrderInfoService.queryByPageUni(page, allOrderInfo);
return getSuccessResult(iPageList);
}
/**
* 根据订单号查询小程序
*
* @param orderNo
* @return
*/
@GetMapping("queryByOrderNo")
public ResponseObject queryByOrderNo(String orderNo){
return getSuccessResult(allOrderInfoService.queryByOrderNo(orderNo));
}
}

View File

@ -164,4 +164,10 @@ public interface AllOrderInfoService {
// 根据订单id 查询订单 并且有且只有一个关联油品订单
AllOrderActivityVo getOneByOrderId(Integer orderId);
/**
* 根据订单号查询小程序
* @param orderNo
* @return
*/
AllOrderInfoUniVo queryByOrderNo(String orderNo);
}

View File

@ -1,9 +1,11 @@
package com.fuint.business.order.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -85,6 +87,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
@Resource
AllOrderInfoMapper allOrderInfoMapper;
@Override
public IPage<AllOrderInfoVo> getPageList(Page page, AllOrderInfo allOrderInfo) {
IPage<AllOrderInfoVo> pageList = allOrderInfoMapper.getPageList(page, allOrderInfo);
@ -1682,6 +1685,27 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
return allOrderInfoVo;
}
/**
* 根据订单号查询小程序
*
* @param orderNo
* @return
*/
@Override
public AllOrderInfoUniVo queryByOrderNo(String orderNo) {
AllOrderInfo allOrderInfo = allOrderInfoMapper.selectOne(new LambdaQueryWrapper<AllOrderInfo>()
.eq(AllOrderInfo::getOrderNo, orderNo));
if (ObjectUtil.isNotEmpty(allOrderInfo)) {
AllOrderInfoUniVo allOrderInfoUniVo = new AllOrderInfoUniVo();
BeanUtil.copyProperties(allOrderInfo, allOrderInfoUniVo);
MtStore mtStore = mtStoreMapper.selectOne(new LambdaQueryWrapper<MtStore>()
.eq(MtStore::getId, allOrderInfo.getStoreId()));
allOrderInfoUniVo.setStoreName(mtStore.getName());
return allOrderInfoUniVo;
}
return null;
}
private long dayCount(String beginTimeStr, String endTimeStr) {
// 将字符串表示的时间转换成 LocalDate 对象

View File

@ -348,12 +348,12 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
LambdaQueryWrapper<MtUserFuel> queryWrapper =new LambdaQueryWrapper<>();
queryWrapper.eq(MtUserFuel::getStoreId,storeId).eq(MtUserFuel::getMtUserId,nowAccountInfo.getId());
List<MtUserFuel> list = userFuelService.list(queryWrapper);
ljUserVo.setUserFuels(list);
//判断当前用户是否存在车队
List<FleetInfoUniVo> fleetInfoUniVos = fleetInfoService.queryByStoreId(storeId);
if (CollUtil.isNotEmpty(fleetInfoUniVos)) {
ljUserVo.setFleetInfoUniVos(fleetInfoUniVos);
}
ljUserVo.setUserFuels(list);
return ljUserVo;
}

View File

@ -1,4 +1,4 @@
<!--挂账管理1new-->
<template>
<div class="app-center">
<!-- 查询-->
@ -106,6 +106,7 @@
</div>
<div class="table-box">
<el-table
border
:data="creditUnitList"
style="width: 100%">
<el-table-column type="expand" >
@ -1659,7 +1660,7 @@ import {getLodop} from "@/api/LodopFuncs";
.top_new{
display: flex;
justify-content: space-between;
height: 64px;
background: #fff;
width: 98%;
margin: 10px auto;

View File

@ -19,14 +19,14 @@
<!-- <transition name="el-zoom-in-top">-->
<el-collapse-transition>
<div v-if="isClick">
<div class="app-left-box" @click="gocomponents(5,'/Integral')">
<div style="cursor: pointer;margin-left: 10px">积分商城</div>
</div>
<div class="app-left-box" @click="gocomponents(5,'/IntegralOrder')">
<div style="cursor: pointer;margin-left: 10px">积分订单</div>
</div>
</div>
<!-- <div v-if="isClick">-->
<!-- <div class="app-left-box" @click="gocomponents(5,'/Integral')">-->
<!-- <div style="cursor: pointer;margin-left: 10px">积分商城</div>-->
<!-- </div>-->
<!-- <div class="app-left-box" @click="gocomponents(5,'/IntegralOrder')">-->
<!-- <div style="cursor: pointer;margin-left: 10px">积分订单</div>-->
<!-- </div>-->
<!-- </div>-->
</el-collapse-transition>
</div>
<div class="app-left-box" @click="logout">
@ -93,8 +93,9 @@ export default {
{name:'会员',icon: 'el-icon-s-custom',path:'/Vip',index1:2},
{name:'核销',icon: 'el-icon-s-check',path:'/WriteOff',index1:3},
{name:'挂账管理',icon:'el-icon-s-claim',path:'/credit',index1:4},
{name:'积分',icon:'el-icon-s-data',path:'/Integral',index1:5},
{name:'积分商城',icon:'el-icon-s-data',path:'/Integral',index1:5},
{name:'交班',icon: 'el-icon-s-flag',path:'/Handover',index1:6},
],
tabarr2:[
{name:'积分',icon:'el-icon-s-data',path:'/Integral'},

View File

@ -2,398 +2,125 @@
<div class="app-container">
<div class="wit_box">
<el-button type="primary" plain round @click="subCard">子卡管理<i
class="el-icon-bank-card el-icon--right"></i></el-button>
<div class="user-box">
<div class="d-s">
<img v-if="form.avatar" :src="baseUrl+form.avatar" style="width: 40px;height: 40px;border-radius: 50%">
<img v-else src="@/assets/images/avatar.png" style="width: 40px;height: 40px">
<div style="color: #000;font-size: 18px;margin-left: 10px;cursor: pointer" @click="changeName">{{ form.name ? form.name : "--" }}</div>
<div class="sm-box">
<div class="s-size">会员手机号 {{ form.mobile }}</div>
<div class="s-size">创建时间 {{ form.createTime }}</div>
</div>
<div class="sm-box">
<div class="s-size">身份证号 {{form.idcard || 'xxxxxxxxxxx'}}</div>
<div class="s-size">生日 {{form.birthday || 'xxxxxxxxxxx'}}</div>
</div>
</div>
<!-- <el-button type="primary" plain round @click="subCard">子卡管理<i-->
<!-- class="el-icon-bank-card el-icon&#45;&#45;right"></i></el-button>-->
</div>
</div>
<el-card>
<div slot="header" style="display: flex;justify-content: space-between;padding-right: 0px">
<div>
<el-page-header @back="goBack" content="详情页面"></el-page-header>
</div>
<div>
<!-- <el-button type="primary" plain round>会员码</el-button>-->
</div>
</div>
<div>基础资料</div>
<div style="display: flex;margin-top: 20px">
<div class="left">
<div>
<img v-if="form.avatar" :src="baseUrl+form.avatar" style="width: 80px;height: 80px;border-radius: 50%">
<img v-else src="@/assets/images/avatar.png" style="width: 80px;height: 80px">
</div>
<!-- <el-button type="warning" plain round size="mini" style="margin: 10px" @click="bindIdCard">绑定实体卡</el-button><br>-->
<el-button type="primary" icon="el-icon-bank-card" round style="margin: 10px;width: 50%;height: 40px"
@click="userRecharge">会员充值
</el-button>
</div>
<div class="right">
<el-descriptions>
<el-descriptions-item label="手机号">{{ form.mobile }}
<el-tag size="mini" @click="replaceMobile">更换</el-tag>
</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 : "&#45;&#45;"}}</el-descriptions-item>-->
<!-- <el-descriptions-item label="绑定信息">&#45;&#45;</el-descriptions-item>-->
<el-descriptions-item label="会员状态">
<el-tag v-if="form.status == 'qy'">启用</el-tag>
<el-tag v-else type="danger">禁用</el-tag>
</el-descriptions-item>
<el-descriptions-item label="加油次数">{{ form.consumeNum }}</el-descriptions-item>
<el-descriptions-item label="加油总金额">{{ allAmount || 0 }}
</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="关联子卡">
<span style="color: #00afff" @click="subCard">子卡管理</span>
</el-descriptions-item>
<el-descriptions-item label="会员等级">
{{ grade ? grade.name : "--" }}
</el-descriptions-item>
<!-- <el-descriptions-item label="储值优惠">&#45;&#45;</el-descriptions-item>-->
<!-- <el-descriptions-item label="每日笔数">-->
<!-- <span style="color: #00afff" @click="configuration">跟随全局总配置</span>-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="固定等级">
<span style="color: #00afff" @click="level">
{{ form.fixingLevel ? fixingLevelinfo(fixingLevelList, form.fixingLevel) : "--" }}
<!-- <dict-tag :options="dict.type.zcrzdj" :value="form.fixingLevel"/>-->
</span>
</el-descriptions-item>
<el-descriptions-item label="备注信息">{{
form.description ? form.description : "--"
}}
</el-descriptions-item>
</el-descriptions>
</div>
</div>
</el-card>
<el-card style="margin: 20px 0">
<div>会员资产</div>
<div>
<template>
<div>
<el-row :gutter="20">
<el-col :span="4">
<div class="sta">
<el-statistic
group-separator=","
:value="form.points"
title="累计积分"
></el-statistic>
</div>
</el-col>
<el-col :span="4">
<div class="sta">
<el-statistic
group-separator=","
:value="form.growthValue"
title="成长值">
</el-statistic>
</div>
</el-col>
<el-col :span="4">
<div class="sta">
<el-statistic
group-separator=","
:precision="2"
:value="form.cardBalance"
title="账户余额"
></el-statistic>
</div>
</el-col>
<!-- <el-col :span="4">-->
<!-- <div class="sta" v-if="!refuelMoney">-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :precision="2"-->
<!-- :value="0"-->
<!-- title="囤油卡余额"-->
<!-- >-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- <div v-if="refuelMoney && refuelMoney.length>0" style="display: flex;align-items: center;margin-top: 25px">-->
<!-- <div class="size-hui">囤油卡余额</div>-->
<!-- <div v-for="(item,index) in refuelMoney"-->
<!-- :key="index" style="margin-left: 20px;text-align: center">-->
<!-- <div class="size-hui">{{ item.oilName ? item.type + item.oilName : item.type }}</div>-->
<!-- <div class="size-bole">{{ item.refuelMoney || 0.00 }}</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-col>-->
</el-row>
</div>
</template>
</div>
</el-card>
<el-card :key="childComponentKey" class="_l">
<div class="wit_boxs" :key="childComponentKey" >
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="油品订单" name="refuelOrder">
<oilOrder :key="childComponentKey" :pUserId="form.id"></oilOrder>
</el-tab-pane>
<el-tab-pane label="商品订单" name="shopOrder">
<goodsOrder :key="childComponentKey" :pUserId="form.id"></goodsOrder>
</el-tab-pane>
<el-tab-pane label="余额记录(电子储值卡/囤油卡消费、充值记录)" name="balanceRecord">
<balanceRecord :key="childComponentKey" :pUserId="form.id"></balanceRecord>
<el-tab-pane label="会员信息" name="userinfo">
<div>
<div class="d-s" style="margin-bottom: 10px">
<div class="gang"></div>
<div class="g-class">会员资产</div>
</div>
<div class="info-box" >
<div class="rsw" style="margin-left: 5px" >
<div class="s-size">会员总余额5623.65</div>
<div class="s-size">累计消费金额18626.35</div>
</div>
<div class="rsw">
<div class="s-size">累计充值本金23650.00</div>
<div class="s-size">累计赠送金额600.00</div>
</div>
<div class="rsw">
<div class="s-size">累计积分2365</div>
<div class="s-size">累计经验值230</div>
</div>
<div class="rsw">
<div class="s-size">剩余优惠券2</div>
<div class="s-size">累计已用优惠券23</div>
</div>
</div>
<div class="d-s" style="margin-bottom: 10px">
<div class="gang"></div>
<div class="g-class">基础信息</div>
</div>
<div class="info-box" >
<div class="rsw" style="margin-left: 5px" >
<div class="s-size">会员卡号xxxxxxxxxxxxxxx</div>
<div class="s-size">性别</div>
<div class="s-size">消费次数18</div>
<div class="s-size">邀请人xxx</div>
</div>
<div class="rsw">
<div class="s-size">会员等级xxxxxxxx</div>
<div class="s-size">会员状态使用中</div>
<div class="s-size">储值卡余额xxxxxxx</div>
<div class="s-size">邀请人手机号156xxxxxxxx</div>
</div>
<div class="rsw">
<div class="s-size">会员标签xxxxxxxx</div>
<div class="s-size">充值次数5</div>
<div class="s-size">囤油卡余额xxxxxx</div>
<div class="s-size">备注xxx</div>
</div>
<div class="rsw">
<div class="s-size">车牌号xxxxxxxx</div>
<div class="s-size">已兑换积分0</div>
<div class="s-size">创建时间2024-05-06 09:1</div>
</div>
</div>
<div style="width: 100%; display: flex; ">
<el-button type="primary" >会员注销</el-button>
<el-button type="primary" @click=" memberRecharge =! memberRecharge " >会员充值</el-button>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="积分记录" name="pointRecord">
<pointsRecord :key="childComponentKey" :pUserId="form.id"></pointsRecord>
</el-tab-pane>
<el-tab-pane label="卡券记录" name="cardList">
<couponList :key="childComponentKey" :pUserId="id"></couponList>
</el-tab-pane>
<el-tab-pane label="成长值记录" name="growthValue">
<growthValueRecord :key="childComponentKey" :pUserId="form.id"></growthValueRecord>
</el-tab-pane>
<!-- <el-tab-pane label="加油金记录" name="refuelMoney"> -->
<!-- <refuelMoneyRecord :pUserId="form.id"></refuelMoneyRecord> -->
<!-- </el-tab-pane> -->
<el-tab-pane label="储值卡记录" name="chuzhika">
<storedCard :key="childComponentKey" :pUserId="form.id"></storedCard>
</el-tab-pane>
<el-tab-pane label="囤油卡记录" name="tuyouka">
<oilStorageCard :key="childComponentKey" :pUserId="form.id"></oilStorageCard>
</el-tab-pane>
<el-tab-pane label="油品消费记录" name="refuelOrder">
<oilOrder :key="childComponentKey" :pUserId="form.id"></oilOrder>
</el-tab-pane>
<el-tab-pane label="商品消费记录" name="shopOrder">
<goodsOrder :key="childComponentKey" :pUserId="form.id"></goodsOrder>
</el-tab-pane>
<el-tab-pane label="优惠券" name="cardList">
<couponList :key="childComponentKey" :pUserId="id"></couponList>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
<!-- 会员充值-->
<el-dialog :close-on-click-modal="false" width="60%" :title="title" :visible.sync="openRecharge" append-to-body>
<template>
<el-tabs v-model="activeRecharge" type="card" @tab-click="handleClick">
<el-tab-pane label="电子储值卡" name="balance">
<div>
<el-row>
<el-col :span="1.5">
<div style="height: 50px;line-height: 50px">充值金额</div>
</el-col>
<el-col :span="22">
<div v-if="cardValueList.length>0"
style="display: flex;margin: 13px 5px;box-sizing: border-box;flex-wrap: wrap; ">
<div class="mon"
v-for="(item,index) in cardValueList" :key="index"
:class="activeKey === index ? 'select' : ''"
@click="rechargeCard(index)">
<div class="top1"><span class="amount1">{{ item.rechargeBalance }}</span></div>
<div>赠送<span class="amount">{{ item.giftBalance }}</span></div>
</div>
</div>
<div style="width: 30%;margin-left: 13px;margin-top: 8px;"
:class="activeKey === cardValueList.length ? 'select' : ''"
@click="rechargeCard(cardValueList.length,-1)">
<el-input placeholder="请输入充值金额"
size="medium"
v-model="cardValueForm.amount"
@input="valueAmoutChange(cardValueForm.amount)"
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
>
<template slot="prepend">自定义</template>
<template slot="append"></template>
</el-input>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex;justify-content: space-between;margin: 20px 0">
<div class="jine">
<div class="zeng">赠送金额</div>
<div>
<el-input placeholder="0.00"
v-model="cardValueForm.giftBalance"
disabled>
<template slot="append"></template>
</el-input>
<span class="bom">赠送金额 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div>
</div>
<div class="jine">
<div class="zeng">赠送积分</div>
<div>
<el-input placeholder="0"
v-model="cardValueForm.points"
disabled>
<template slot="append">积分</template>
</el-input>
<span
class="bom">赠送积分 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div>
</div>
<div class="jine">
<div class="zeng">赠成长值</div>
<div>
<el-input placeholder="0"
v-model="cardValueForm.growthValue"
disabled>
<template slot="append">成长值</template>
</el-input>
<span class="bom">赠送成长值 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div>
</div>
<div class="jine">
<div class="zeng" style="width: 30%">提成员工</div>
<div>
<el-input :readonly="true" placeholder="请选择提成员工" v-model="cardValueForm.realName">
<el-button slot="append" @click="chooseStaff">选择员工</el-button>
</el-input>
<!-- <span class="bom">仅系统储值档次支持提成员工选择自定义充值金额匹配低一档次</span>-->
</div>
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex">
<div style="width: 7%">充值备注</div>
<el-input
type="textarea"
placeholder=""
v-model="cardValueForm.remark"
maxlength="255"
show-word-limit
>
</el-input>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex;margin: 20px 0">
<div style="width: 7%">支付方式</div>
<div>
<el-radio v-for="dict in payList" v-model="cardValueForm.paymentType"
v-if="dict.dictValue!='APPLET_CODE'"
:key="dict.dictValue" :label="dict.dictValue" :value="dict.dictValue" border>
{{ dict.dictLabel }}
</el-radio>
</div>
</div>
</el-col>
</el-row>
<div style="margin: 20px 0;text-align: center">
<el-button type="primary" @click="confirm(1)">确认充值</el-button>
<el-button @click="cancel"> </el-button>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="电子囤油卡" name="literCard">
<el-row>
<el-col :span="24">
<div style="display: flex">
<div style="width: 7%;line-height: 40px">油品类型</div>
<el-radio-group v-model="tabOilType" style="margin-bottom: 30px;">
<el-radio-button v-for="(item,index) in oilTypeList" :label="item.oilType"
@click.native="tabOilTypeClick(item.oilType)">
{{ item.type }}
</el-radio-button>
</el-radio-group>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="1.5">
<div style="height: 50px;line-height: 50px;">充值金额</div>
</el-col>
<el-col :span="22">
<div style="display: flex;margin: 20px 5px;box-sizing: border-box;flex-wrap: wrap;">
<div class="mon2"
v-for="(item,index) in cardFuelDieselList" :key="index"
:class="activeKey === index ? 'select' : ''"
@click="recharge(index)">
<!-- <div class="top1"><span class="amount1">{{ item.incomeLitres }}</span>L</div>-->
<div>售价<span class="amount">{{ item.rechargeBalance }}</span></div>
<!-- <div>锁价<span class="amount">{{ item.lockupPrice }}</span>/</div>-->
<div>锁价<span class="amount">{{ item.lockPrice }}</span>/</div>
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex;margin: 20px 0">
<div class="jine">
<div class="zeng">赠送积分</div>
<div>
<el-input placeholder="0" disabled v-model="cardFuelDieselForm.points">
<template slot="append">积分</template>
</el-input>
<span
class="bom">升数卡充值不支持自定义积分,选择对应充值活动获得对应积分</span>
</div>
</div>
<div style="display:flex;margin-left: 20px">
<div style="line-height: 40px;width: 20%">提成员工</div>
<div>
<el-input :readonly="true" placeholder="请选择提成员工" v-model="cardFuelDieselForm.realName">
<el-button slot="append" @click="chooseStaff">选择员工</el-button>
</el-input>
</div>
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex">
<div style="width: 7%">充值备注</div>
<el-input
type="textarea"
placeholder=""
v-model="rechargeDesc"
maxlength="255"
show-word-limit
>
</el-input>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex;margin: 20px 0">
<div style="width: 7%">支付方式</div>
<div>
<el-radio v-for="dict in payList" v-model="cardFuelDieselForm.paymentType"
v-if="dict.dictValue!=='APPLET_CODE'"
:key="dict.dictValue" :label="dict.dictValue" :value="dict.dictValue" border>{{ dict.dictLabel }}
</el-radio>
</div>
</div>
</el-col>
</el-row>
<div style="margin: 20px 0;text-align: center">
<el-button type="primary" @click="confirm(2)">确认充值</el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-tab-pane>
<el-tab-pane label="礼品卡兑换电子电子储值卡余额" name="giftCard">
<el-form ref="form2" :model="form2" :rules="rules1" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="卡号" prop="number" style="width: 500px">
<el-input v-model="form2.number" placeholder="请输入卡号" maxlength="30" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="卡密" prop="cardPassword" style="width: 500px">
<el-input v-model="form2.cardPassword" placeholder="请输入卡密" maxlength="30" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="margin: 20px 0;text-align: center">
<el-button type="primary" @click="confirm1()">确认充值</el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-tab-pane>
</el-tabs>
</template>
<el-dialog
title="会员充值"
:visible.sync="memberRecharge"
width="910px"
center
>
<memberRecharge ref="rechargeRef"></memberRecharge>
<span slot="footer" class="dialog-footer">
<el-button @click="memberRecharge = false"> </el-button>
<el-button type="primary" @click="rechargeConfirm()">确认充值</el-button>
</span>
</el-dialog>
<!-- 选择员工-->
@ -897,12 +624,13 @@
</template>
<script>
import SelectStaff from "@/components/local/selectStaff.vue";
import balanceRecord from "@/views/details/userInfoOrder/balanceRecord.vue";
import pointsRecord from "@/views/details/userInfoOrder/pointsRecord.vue";
import oilOrder from "@/views/details/userInfoOrder/oilOrder.vue";
import storedCard from "@/views/details/userInfoOrder/storedCard.vue";
import oilStorageCard from "@/views/details/userInfoOrder/oilStorageCard.vue";
import goodsOrder from "@/views/details/userInfoOrder/goodsOrder.vue";
import couponList from "@/views/details/userInfoOrder/couponList.vue";
import growthValueRecord from "@/views/details/userInfoOrder/growthValueRecord.vue";
@ -934,9 +662,11 @@ import {getSysConfig} from "@/api/cashier/user/sysconfig";
import {giftCardExchange} from "@/api/cashier/giftCard/giftcard";
import {connectFlag, getLodop} from "@/api/LodopFuncs";
import {getReturnCode, printCardValueReport, printFuelDieselReport, sendPrintIndex} from "@/api/print";
import memberRecharge from "@/views/cashier/NewComponents/newHomeComponents/memberRecharge.vue";
export default {
components: {
memberRecharge,
SelectStaff,
oilOrder,
goodsOrder,
@ -946,6 +676,8 @@ export default {
growthValueRecord,
refuelMoneyRecord,
cardValueChild,
storedCard,
oilStorageCard
},
computed: {
item() {
@ -955,6 +687,7 @@ export default {
dicts: ['official', 'zhzt', 'zcrzdj', 'payment_type','pay_status'],
data() {
return {
memberRecharge:false,
rechargeBalCard:false,
rechargeOilCard:false,
orderList:[],
@ -1077,7 +810,7 @@ export default {
store: '',
//
grade: '',
activeName: 'refuelOrder',
activeName: 'userinfo',
subCardActive: 'subCardManage',
activeRecharge: 'balance',
tableData: [],
@ -1293,10 +1026,7 @@ export default {
await getCardValueListApi(quy).then(res => {
this.cardValueList = res.data.records;
this.cardValueList.sort((a, b) => a.rechargeBalance - b.rechargeBalance);
// console.log("this.grade.name",this.grade)
})
// console.log("this.cardValueList", this.grade)
if (this.cardValueList.length > 0) {
//
if (this.grade && this.grade.name) {
@ -1315,20 +1045,13 @@ export default {
}
this.$forceUpdate();
},
valueAmoutChange(data) {
// this.cardValueForm.amount = null
this.$set(this.cardValueForm, 'amount', data);
// console.log("data17.16", this.cardValueForm.amount)
if (!data) {
this.cardValueForm.amount = ''
} else {
this.cardValueForm.amount = data
}
this.cardValueForm.points = ''
this.cardValueForm.bidBalance = ''
this.cardValueForm.giftBalance = ''
@ -1406,19 +1129,6 @@ export default {
},
handleDataFromChild(data) {
this.openStaff = false
// this.cardFuelDieselForm= {
// mtStaffId: data.mtStaffId,
// realName: data.realName,
// staffMobile: data.staffMobile,
// },
// this.cardValueForm= {
// mtStaffId: data.mtStaffId,
// realName: data.realName,
// staffMobile: data.staffMobile,
// },
// console.log('Received data in parent:', data);
this.cardFuelDieselForm.mtStaffId = data.mtStaffId,
this.cardFuelDieselForm.realName = data.realName,
this.cardFuelDieselForm.staffMobile = data.staffMobile,
@ -2253,10 +1963,6 @@ export default {
width: 100%;
height: 100%;
background: #f6f8f9;
}
._l{
}
.left {
width: 20%;
@ -2386,5 +2092,53 @@ export default {
border-radius: 8px;
box-sizing: border-box;
padding: 10px;
margin-bottom: 5px;
}
.wit_boxs{
width: 100%;
background: #fff;
border-radius: 8px;
box-sizing: border-box;
padding: 10px;
height: 85vh;
}
.user-box{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.d-s{
display: flex;
align-items: center;
}
.sm-box{
font-size: 14px;
color: #333333;
margin-left: 80px;
}
.s-size{
margin: 12px 0px;
font-size: 14px;
color: #333333;
}
.rsw{
width: 25%;
}
.gang{
width: 2px;
height: 14px;
background: #FF9655;
}
.g-class{
font-size: 14px;
margin-left: 6px;
}
.info-box{
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
}
</style>

View File

@ -7,7 +7,7 @@
<el-radio-button label="whole">全部</el-radio-button>
</el-radio-group>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table ref="tables" border v-loading="loading" :data="list">
<el-table-column align="center" prop="storeName" label="所属油站">
<template slot-scope="scope">
<span>{{store.name}}</span>

View File

@ -1,6 +1,6 @@
<template>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table ref="tables" border v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="storeName" align="center">
<template slot-scope="scope">
<span>{{store.name}}</span>

View File

@ -1,6 +1,6 @@
<template>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table ref="tables" border v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="storeName" align="center">
<template slot-scope="scope">
<span>{{scope.row.storeName ? scope.row.storeName : storeName}}</span>

View File

@ -1,6 +1,6 @@
<template>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table ref="tables" border v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="storeName" align="center"/>
<el-table-column label="订单时间" align="center" prop="createTime"/>
<el-table-column label="交易终端" align="center" prop="payType">

View File

@ -0,0 +1,129 @@
<template>
<div>
<el-table ref="tables2" key="2" v-loading="loading" :data="fuelList">
<el-table-column align="center" label="所属油站" prop="storeName">
<template slot-scope="scope">
<span>{{store.name}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="油品类型" >
<template slot-scope="scope">
<span> {{scope.row.type?scope.row.type:' -- '}}</span>
</template>
</el-table-column>
<el-table-column label="类型" align="center">
<template slot-scope="scope">
<el-tag type="danger" v-if="scope.row.changeType === '0'">消费</el-tag>
<el-tag type="success" v-else-if="scope.row.changeType === '1' ">充值</el-tag>
<el-tag type="success" v-else>--</el-tag>
</template>
</el-table-column>
<el-table-column label="变动升数" align="center" prop="oilBalance">
<template slot-scope="scope">
<span>{{scope.row.oilBalance?scope.row.oilBalance:"--"}}</span>
</template>
</el-table-column>
<el-table-column label="变动之后升数" align="center" prop="afterOilChange">
<template slot-scope="scope">
<span>{{scope.row.afterOilChange?scope.row.afterOilChange:"--"}}</span>
</template>
</el-table-column>
<el-table-column label="订单号" align="center" prop="orderNo"/>
<el-table-column label="描述" align="center" prop="fromType"/>
<el-table-column label="变动时间" align="center" prop="createTime"/>
</el-table>
<pagination
:total="fuelTotal"
:page.sync="queryFuelParams.page"
:limit.sync="queryFuelParams.pageSize"
@pagination="getFuelList"
/>
</div>
</template>
<script>
import {getCardRecordList, getFuelRecordList} from "@/api/cashier/userInfoOrder";
import {listCardBalanceRecord, listCardOilRecord} from "@/api/cashier/balancecardrecord";
import {ljStoreInfo} from "@/api/cashier/user/store";
export default {
props:["pUserId"],
data(){
return {
tabPosition: 'giftCard',
userId:"",
loading:false,
list:[],
cardList:[],
fuelList:[],
cardTotal:0,
fuelTotal:0,
queryCardParams:{
page:1,
pageSize:10,
},
queryFuelParams:{
page:1,
pageSize:10,
},
store:{}
}
},
created() {
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getCardList()
this.getFuelList()
this.getStoreInfo()
},
methods:{
//
getStoreInfo(){
ljStoreInfo().then(res => {
this.store = res.data
})
},
changeCard(val){
console.log(val,this.tabPosition)
},
getCardList() {
this.loading = true
this.queryCardParams.userId = this.userId
getCardRecordList(this.queryCardParams).then(res=>{
if (res.code == 200) {
this.cardList = res.data.records
this.cardTotal = res.data.total
this.loading = false
}
})
},
getFuelList() {
this.loading = true
this.queryFuelParams.userId = this.userId
listCardOilRecord(this.queryFuelParams).then(res=>{
if (res.code == 200) {
this.fuelList = res.data.records
this.fuelTotal = res.data.total
this.loading = false
}
})
// getFuelRecordList(this.queryFuelParams).then(res=>{
// if (res.code == 200) {
// this.fuelList = res.data.records
// this.fuelTotal = res.data.total
// this.loading = false
// }
// })
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -1,6 +1,6 @@
<template>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table ref="tables" border v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="storeName" align="center"/>
<el-table-column label="变动时间" prop="createTime" align="center"/>
<el-table-column label="类型" align="center" prop="changeType">

View File

@ -0,0 +1,127 @@
<template>
<div>
<el-table key="1" ref="tables" v-loading="loading" :data="cardList">
<el-table-column align="center" prop="storeName" label="所属油站"/>
<!-- <el-table-column prop="date" label="变动账户"/> -->
<el-table-column align="center" prop="changeType" label="类型">
<template slot-scope="scope">
<el-tag v-if="scope.row.changeType == 0">消费</el-tag>
<el-tag type="success" v-else>充值</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="详细信息">
<el-table-column align="center" prop="balance" label="变动金额"/>
<el-table-column align="center" label="变动前余额">
<template slot-scope="scope">
<span v-if="scope.row.changeType == 0">{{ scope.row.afterTheChange?parseFloat(scope.row.afterTheChange + scope.row.balance).toFixed(2) : '/'}}</span>
<span v-else>{{ scope.row.afterTheChange?parseFloat(scope.row.afterTheChange - scope.row.balance).toFixed(2) : '/'}}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="afterTheChange" label="变动后余额">
<template slot-scope="scope">
<span>{{ scope.row.afterTheChange?scope.row.afterTheChange : '/'}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column align="center" prop="orderNo" label="订单号"/>
<el-table-column align="center" prop="fromType" label="描述"/>
<el-table-column align="center" prop="createTime" label="变动时间"/>
</el-table>
<pagination
:total="cardTotal"
:page.sync="queryCardParams.page"
:limit.sync="queryCardParams.pageSize"
@pagination="getCardList"
/>
</div>
</template>
<script>
import {getCardRecordList, getFuelRecordList} from "@/api/cashier/userInfoOrder";
import {listCardBalanceRecord, listCardOilRecord} from "@/api/cashier/balancecardrecord";
import {ljStoreInfo} from "@/api/cashier/user/store";
export default {
props:["pUserId"],
data(){
return {
tabPosition: 'giftCard',
userId:"",
loading:false,
list:[],
cardList:[],
fuelList:[],
cardTotal:0,
fuelTotal:0,
queryCardParams:{
page:1,
pageSize:10,
},
queryFuelParams:{
page:1,
pageSize:10,
},
store:{}
}
},
created() {
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getCardList()
this.getFuelList()
this.getStoreInfo()
},
methods:{
//
getStoreInfo(){
ljStoreInfo().then(res => {
this.store = res.data
})
},
changeCard(val){
console.log(val,this.tabPosition)
},
getCardList() {
this.loading = true
this.queryCardParams.userId = this.userId
getCardRecordList(this.queryCardParams).then(res=>{
if (res.code == 200) {
this.cardList = res.data.records
this.cardTotal = res.data.total
this.loading = false
}
})
},
getFuelList() {
this.loading = true
this.queryFuelParams.userId = this.userId
listCardOilRecord(this.queryFuelParams).then(res=>{
if (res.code == 200) {
this.fuelList = res.data.records
this.fuelTotal = res.data.total
this.loading = false
}
})
// getFuelRecordList(this.queryFuelParams).then(res=>{
// if (res.code == 200) {
// this.fuelList = res.data.records
// this.fuelTotal = res.data.total
// this.loading = false
// }
// })
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -58,7 +58,7 @@
<view class="">会员卡类型</view>
<view class="d-bs" style="align-items: center;border-bottom: none;"
@click="cardType = true">
<view style="font-size: 12px;">储值卡余额6532.89</view>
<view style="font-size: 12px;">储值卡余额{{user.cardBalance}}</view>
<view style="line-height: 20px;">
<u-icon name="arrow-right" size="12px"></u-icon>
</view>
@ -203,18 +203,29 @@
<view class="anniubai">充值</view>
</view>
<view class="c_bs">
<view class="">123456.98</view>
<view class="">NO.xxxxxxxxxxxxxxxxx</view>
<view class="">{{user.cardBalance}}</view>
<!-- <view class="">NO.xxxxxxxxxxxxxxxxx</view> -->
</view>
</view>
<view class="c_pox" style="background: url('../../static/imgs/tyktc.png'); ">
<view class="c_pox" style="background: url('../../static/imgs/tyktc.png'); "
v-for="(item,index) in oilCardList" :key="index">
<view class="c_bs" style="margin-bottom: 15px; ">
<view class="">囤油卡</view>
<view class="anniubai" style="color: #70D0C7;">充值</view>
</view>
<view class="c_bs">
<view class="">123456.98</view>
<view class="">NO.xxxxxxxxxxxxxxxxx</view>
<view class="">{{item.fuelAmount}}</view>
<!-- <view class="">NO.xxxxxxxxxxxxxxxxx</view> -->
</view>
</view>
<view class="c_pox">
<view class="c_bs" style="margin-bottom: 15px;" v-for="(item,index) in fleetList" :key="index">
<view class="">{{item.fleetName}}</view>
<view class="anniubai">充值</view>
</view>
<view class="c_bs">
<view class="">{{item.totalBalance || 0}}</view>
<!-- <view class="">NO.xxxxxxxxxxxxxxxxx</view> -->
</view>
</view>
</view>
@ -262,7 +273,7 @@
<view class="p_ds" style="width: 85%;">
<view class="">
<view class="">消费应支付{{oilOrder.payAmount}}</view>
<view class="sm-size">会员-储值卡余额8900.99</view>
<view class="sm-size">会员-储值卡余额{{user.cardBalance}}</view>
</view>
<view class="anxuan">
<view class="dian"></view>
@ -295,7 +306,7 @@
</view>
<view class="p_bs">
<view class="">加油金额</view>
<view class="">256.89</view>
<view class="">{{oilOrder.orderAmount}}</view>
</view>
<view class="p_x"></view>
<view class="">优惠信息</view>
@ -414,7 +425,10 @@
couponList: [],
//
ifLogin: false,
orderInfo:{},
orderInfo: {},
user: {},
oilCardList: [],
fleetList: []
}
},
components: {
@ -478,10 +492,22 @@
onShow() {
this.getStore(uni.getStorageSync("storeId"));
this.getTheJudgmentIsTheSame()
this.getOilCard()
},
methods: {
//
getOilCard() {
request({
url: "business/userManager/user/storeUserInfo/" + uni.getStorageSync("storeId"),
method: 'get',
}).then(res => {
console.log(res, 491);
this.user = res.data
this.oilCardList = res.data.userFuels
this.fleetList = res.data.fleetInfoUniVos
})
},
//
payment() {
this.ifLogin = this.AppToken ? true : false
@ -577,7 +603,8 @@
success: function(res) {
console.log('success');
uni.redirectTo({
url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this.oilOrder.orderNo,
url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this
.oilOrder.orderNo,
})
},
fail: function(err) {
@ -605,7 +632,8 @@
if (resp.resultCode == '9000') {
console.log("支付成功")
uni.redirectTo({
url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this.oilOrder.orderNo,
url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this
.oilOrder.orderNo,
})
} else {
request({
@ -727,7 +755,6 @@
method: 'post',
data: this.oilOrder,
}).then((res) => {
console.log(res,578);
this.oilOrder = res.data
})
},

View File

@ -17,11 +17,11 @@
NO.xxxxxxxxxxxxxxxxxx
</view> -->
</view>
<view class="card_1" @click="goDetails('oilCard')">
<view class="card_1" @click="goDetails('oilCard')" v-for="(item,index) in cardsList" :key="index">
<view class="top_card">
<view class="">囤油卡</view>
<view style="display: flex;" @click="goCode()">
<view style="margin-right: 5px;">汽油92# 7.28/L</view>
<view style="margin-right: 5px;">{{item.oilName}} 7.28/L</view>
<image src="../../static/new/rwm.png" style="width: 25px; height: 25px; "></image>
</view>
</view>
@ -29,7 +29,7 @@
剩余油量
</view>
<view class="card-num">
0L
{{item.fuelAmount}}L
</view>
<!-- <view class="r-box">
NO.xxxxxxxxxxxxxxxxxx
@ -99,7 +99,6 @@
},
onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
// this.getCardFuleRecords();
this.getUserBalance()
this.getFleetInfo()
},
@ -160,6 +159,8 @@
}).then(res => {
if (res.code == 200) {
this.cardBalance = res.data
console.log(res,163);
this.cardsList = res.data.userFuel
}
})
},

View File

@ -116,7 +116,7 @@
export default {
data() {
return {
type: 'oilCard',
type: 'balance',
show: false,
windex: 0,
storeId: uni.getStorageSync("storeId"),
@ -319,6 +319,7 @@
},
setIndex(index, data) {
this.windex = index
this.isEdit = true
if (this.type == 'balance') {
if (index != this.rechargeList.length) {
this.rechargeOrder.balance = data.rechargeBalance
@ -333,6 +334,7 @@
this.rechargeOrder.bidBalance = 0
this.rechargeOrder.rechargeBalance = 0
this.rechargeOrder.giftBalance = 0
this.isEdit = false
}
}
if (this.type == 'oilCard') {

View File

@ -12,26 +12,35 @@
<image src="../../static/icon/zfcg.png" style="width: 80px; height: 80px; "></image>
</view>
<view style="margin: 20px auto;font-size: 16px;color: #22AF5B;">支付成功</view>
<view class="m_num">190.00</view>
<view class="m_num">{{orderInfo.goodsMoney}}</view>
<view class="m_bs">
<view class="">门店名称</view>
<view class="">中建锦绣二期站</view>
<view class="">{{orderInfo.storeName}}</view>
</view>
<view class="x_"></view>
<view class="m_bs">
<view class="">交易类型</view>
<view class="">油品</view>
<view class="">{{orderInfo.content}}</view>
</view>
<view class="m_bs">
<view class="">支付方式</view>
<view class="">会员储值卡</view>
<view class="" v-if="orderInfo.payType=='ALIPAY'">支付宝</view>
<view class="" v-if="orderInfo.payType=='WECHAT'">微信</view>
<view class="" v-if="orderInfo.payType=='UNIONPAY'">银联二维码</view>
<view class="" v-if="orderInfo.payType=='CASH'">现金</view>
<view class="" v-if="orderInfo.payType=='APPLET_CODE'">小程序码</view>
<view class="" v-if="orderInfo.payType=='card_value'">储值卡</view>
<view class="" v-if="orderInfo.payType=='fule_card'">囤油卡</view>
<view class="" v-if="orderInfo.payType=='car_card_value'">车队卡</view>
<view class="" v-if="orderInfo.payType=='car_fule_card'">车队囤油卡</view>
<view class="" v-if="orderInfo.payType=='after_pay'">挂账</view>
</view>
<view class="m_bs">
<view class="">流水编号</view>
<view class="">xxxxxxxxxxxxxxxx</view>
<view class="">{{orderInfo.orderNo}}</view>
</view>
<view v-if="orderNo" @click="goOrderInfo" style="border: solid 1px #FA6400;margin: 20px auto;width: 70%;
<view v-if="orderInfo.type==1" @click="goOrderInfo" style="border: solid 1px #FA6400;margin: 20px auto;width: 70%;
height: 40px;line-height: 40px;color: #FA6400;">{{timestamp}}s后去评价</view>
<view v-else @click="goBack" style="border: solid 1px #FA6400;margin: 20px auto;width: 70%;
height: 40px;line-height: 40px;color: #FA6400;">{{timestamp}}s后返回首页</view>
@ -41,25 +50,50 @@
</template>
<script>
import request from '../../utils/request'
export default {
data() {
return {
timestamp: 3,
timer: {},
orderNo: "",
orderNo: "234520241008171716e578f0",
orderInfo: {},
oilOrder:{},
}
},
onLoad(e) {
if (e.orderNo) {
this.orderNo = e.orderNo
}
// this.countdown()
this.getOrder()
this.countdown()
},
methods: {
getOrder() {
request({
url: "/business/allOrderInfo/queryByOrderNo",
method: 'get',
params: {
orderNo: this.orderNo,
},
}).then((res) => {
this.orderInfo = res.data
if (res.data.type == 1){
request({
url: "business/oilOrder/oilOrderId/" + this.orderNo,
method: 'get',
}).then((res) => {
if(res.data){
this.oilOrder = res.data
}
})
}
})
},
goOrderInfo() {
clearInterval(this.timer)
uni.navigateTo({
url: '/pagesMy/details/details?orderNo=' + this.orderNo,
url: '/pagesMy/comment/comment?orderId=' + this.oilOrder.id
})
},
//
@ -70,7 +104,7 @@
_this.timestamp--;
// 0
if (_this.timestamp === 0) {
if (_this.orderNo) {
if (_this.orderInfo.type==1) {
_this.goOrderInfo()
} else {
_this.goBack()