Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2024-01-13 15:46:36 +08:00
commit 4a5dcf2c61
23 changed files with 2045 additions and 800 deletions

View File

@ -1170,6 +1170,7 @@ export default {
this.cardValueForm.royaltyType = change.royaltyType
this.cardValueForm.percentageCommissions = change.percentageCommissions
this.cardValueForm.amountCommission = change.amountCommission
this.cardValueForm.cardValueId = change.id
// this.cardValueForm.rechargeBalance
//
@ -1384,13 +1385,14 @@ export default {
let file = {}
//
file = this.cardValueList[index]
console.log("file",file)
this.realyPayBills = file.rechargeBalance
this.cardValueForm.rechargeBalance = file.rechargeBalance
this.cardValueForm.bidBalance = file.bidBalance
this.cardValueForm.points = file.points
this.cardValueForm.giftBalance = file.giftBalance
this.cardValueForm.growthValue = file.growthValue
this.cardValueForm.cardValueId = file.id
this.cardValueForm.amount = null
this.cardValueForm.royaltyType = file.royaltyType
@ -1427,7 +1429,6 @@ export default {
this.cardFuelDieselForm.incomeLitres = file.incomeLitres
this.cardFuelDieselForm.lockupPrice = file.lockupPrice
this.cardFuelDieselForm.cardFuelId = file.id
// this.realyPayBills = file.rechargeBalance
},

View File

@ -216,6 +216,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
integralOrders.setOrderNumber(orderNo);
integralOrders.setStatus(status);
integralOrders.setOrderType("1"); // 设置交易类型
integralOrders.setChainStoreId(nowAccountInfo.getChainStoreId()); // 设置交易类型
}
@ -324,7 +325,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
Boolean isLock = redisLock.tryLock(lockKey, 5000, TimeUnit.MILLISECONDS);
if (isLock && "paid".equals(listByOrderNo.get(0).getStatus()) && "0".equals(listByOrderNo.get(0).getProcessingStatus()) ) {
// 查询用户信息
LJUserVo ljUserVos = ljUserMapper.selectAllInfoById2(listByOrderNo.get(0).getUserId(), nowAccountInfo.getChainStoreId());
LJUserVo ljUserVos = ljUserMapper.selectAllInfoById2(listByOrderNo.get(0).getUserId(), listByOrderNo.get(0).getChainStoreId());
// 查询用户信息
BigDecimal totalPoints = new BigDecimal(0);
@ -356,7 +357,6 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
cardExchangeRecordService.addCardExchangeRecord(cardExchangeRecord);
}else if (integralGift.getGiftType().equals("优惠券")) {
// 优惠卷处理
integralGift.getCouponId();
CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
cardFavorableRecord.setCardFavorableId(integralGift.getCouponId());
cardFavorableRecord.setStoreId(integralOrders.getStoreId());
@ -489,6 +489,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
integralOrders.setUserId(nowAccountInfo.getId());
integralOrders.setOrderStatus("待处理");
integralOrders.setOrderType("0");
integralOrders.setChainStoreId(integralOrdersList.getChainStoreId());
}
integralOrdersDao.insertBatch(integralOrdersList.getIntegralOrdersList());

View File

@ -28,8 +28,10 @@ import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableR
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild;
import com.fuint.business.marketingActivity.cardValue.mapper.CardValueChildMapper;
import com.fuint.business.marketingActivity.cardValue.mapper.CardValueRecordMapper;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
import com.fuint.business.marketingActivity.cardValue.service.CardValueChildService;
import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService;
import com.fuint.business.marketingActivity.cardValue.service.CardValueService;
import com.fuint.business.marketingActivity.cardValue.vo.CardValueVO;
@ -407,7 +409,11 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
@Autowired
private RedisLock redisLock;
@Resource
CardValueChildService cardValueChildService;
@Resource
CardValueChildMapper cardValueChildMapper;
/**
* 查询支付状态 修改相关关联表
@ -470,7 +476,52 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
CommissionRecord commissionRecord = employeeCommissions(cardValueRecord);
commissionRecordService.insert2(commissionRecord);
}
//员工信息
LJStaff ljStaff = mtStaffService.selectStaffById(cardValueRecord.getMtStaffId());
// 处理赠送兑换券或者其他
LambdaQueryWrapper<CardValueChild> lambdaQueryWrapper = new LambdaQueryWrapper<CardValueChild>();
lambdaQueryWrapper.eq(CardValueChild::getCardValueId,cardValueRecord.getCardValueId());
List<CardValueChild> cardValueChildren = cardValueChildMapper.selectList(lambdaQueryWrapper);
for (CardValueChild cardValueChild : cardValueChildren) {
try{
if ("1".equals(cardValueChild.getActiveGift())){
//优惠券
CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
cardFavorableRecord.setCardFavorableId(cardValueChild.getVouchersId());
cardFavorableRecord.setStoreId(cardValueRecord.getStoreId());
cardFavorableRecord.setMtUserId(cardValueRecord.getMtUserId());
cardFavorableRecord.setName(ljUserVos.getName());
cardFavorableRecord.setMobile(ljUserVos.getMobile());
cardFavorableRecord.setStatus("0");
cardFavorableRecord.setExchangeFrom("储值卡赠送");
cardFavorableRecordService.addCardFavorableRecord(cardFavorableRecord);
}else if("2".equals(cardValueChild.getActiveGift())) {
//兑换券
CardExchangeRecord cardExchangeRecord = new CardExchangeRecord();
cardExchangeRecord.setCardExchangeId(cardValueChild.getVouchersId());
cardExchangeRecord.setStoreId(cardValueRecord.getStoreId());
cardExchangeRecord.setMtUserId(cardValueRecord.getMtUserId());
cardExchangeRecord.setName(ljUserVos.getName());
cardExchangeRecord.setMobile(ljUserVos.getMobile());
cardExchangeRecord.setPhoto(ljUserVos.getAvatar());
if (ObjectUtil.isNotEmpty(ljStaff)) {
cardExchangeRecord.setMtStaffId(ljStaff.getId());
cardExchangeRecord.setRealName(ljStaff.getRealName());
cardExchangeRecord.setStaffMobile(ljStaff.getMobile());
}
cardExchangeRecord.setStatus("0");
cardExchangeRecord.setExchangeFrom("储值卡赠送");
cardExchangeRecordService.addCardExchangeRecord(cardExchangeRecord);
}
}catch (Exception e) {
e.printStackTrace();
continue;
}
}
// 修改订单的处理状态 (避免二次执行)
CardValueRecord updateCardValueRecord = new CardValueRecord();
updateCardValueRecord.setId(id);

View File

@ -23,10 +23,10 @@ public interface LJUserMapper extends BaseMapper<LJUser> {
/**
* 根据店铺id查询所有会员信息
* @param storeId
* @param chainStoreId
* @return
*/
public List<LJUserVo> queryUserList(@Param("storeId") int storeId);
public List<LJUserVo> queryUserList(@Param("chainStoreId") int chainStoreId);
/**
* 根据手机号和连锁店id查询会员信息

View File

@ -156,9 +156,9 @@
</where>
</select>
<select id="queryUserList" resultType="com.fuint.business.userManager.vo.LJUserVo" parameterType="int">
<include refid="selectUser"></include>
<include refid="selectUserAndBalance"></include>
<where>
mi.storeId = #{storeId}
mub.chain_store_id = #{chainStoreId}
</where>
</select>
<select id="userNum" resultType="java.lang.Integer">

View File

@ -82,8 +82,8 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
@Override
public List<LJUserVo> selectUsersList() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
List<LJUserVo> list = baseMapper.queryUserList(storeId);
LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId());
List<LJUserVo> list = baseMapper.queryUserList(store.getChainStoreId());
return list;
}

View File

@ -77,3 +77,11 @@ export function oilOrderList(data) {
data: data
})
}
// 根据订单号模糊查询油品订单信息
export function getOilOrderAllAmount(id) {
return request({
url: '/business/oilOrder/getAllAmount/'+id,
method: 'get',
})
}

View File

@ -0,0 +1,45 @@
import request from '@/utils/request'
// 查询子卡信息列表
export function listCardValueChild(id) {
return request({
url: 'cardValudChildrens/listPC/'+id,
method: 'get',
})
}
// 根据id查询子卡信息
export function cardValueChildInfo(id) {
return request({
url: 'cardValudChildrens/'+id,
method: 'get',
})
}
// 添加子卡信息
export function addCardValueChild(data) {
return request({
url: 'cardValudChildrens',
method: 'post',
data: data,
})
}
// 修改子卡信息
export function editCardValueChild(data) {
return request({
url: 'cardValudChildrens/edit',
method: 'put',
data: data,
})
}
// 查询子卡订单信息
export function listCardValueChildOrder(query) {
return request({
url: 'business/order/cardValueChildOrder/list',
method: 'get',
params:query,
})
}

View File

@ -0,0 +1,61 @@
import request from '@/utils/request'
// 查询固定等级列表
export function listFixingLevel(query) {
return request({
url: '/business/userManager/fixingLevel/list',
method: 'get',
params: query
})
}
// 根据id查询所有固定等级信息
export function allFixingLevel() {
return request({
url: '/business/userManager/fixingLevel/allFixingLevel',
method: 'get',
})
}
// 查询固定等级详细
export function getFixingLevel(id) {
return request({
url: '/business/userManager/fixingLevel/' + id,
method: 'get'
})
}
// 根据固定等级名称查询固定等级信息
export function queryFixingLevel(data) {
return request({
url: '/business/userManager/fixingLevel/getName',
method: 'post',
data: data
})
}
// 新增固定等级
export function addFixingLevel(data) {
return request({
url: '/business/userManager/fixingLevel',
method: 'post',
data: data
})
}
// 修改固定等级
export function updateFixingLevel(data) {
return request({
url: '/business/userManager/fixingLevel',
method: 'put',
data: data
})
}
// 删除固定等级
export function delFixingLevel(id) {
return request({
url: '/business/userManager/fixingLevel/' + id,
method: 'delete'
})
}

View File

@ -70,9 +70,9 @@ export function delUser(id) {
}
//下载示例文件
export function exportUsers() {
export function queryUsers() {
return request({
url: '/excel/export',
url: '/business/userManager/user/userList',
method: 'get'
})
}

View File

@ -0,0 +1,57 @@
import request from '@/utils/request'
// 加油订单
export function getOilOrderList(query) {
return request({
url: 'business/oilOrder/userOrders2',
method: 'get',
params: query
})
}
// 商品订单
export function getMtOrderList(query) {
return request({
url: 'business/order/getMtOrderList',
method: 'get',
params: query
})
}
// 余额记录
export function getCardRecordList(query) {
return request({
url: '/business/CardBalanceChange/getCardRecordList',
method: 'get',
params: query
})
}
// 屯油卡
export function getFuelRecordList(query) {
return request({
url: 'business/marketingActivity/cardFuelChange/getFuelRecordList',
method: 'get',
params: query
})
}
// 积分记录
export function getIntegralDetailList(query) {
return request({
url: 'business/integral/integralDetail/queryByPageUni2',
method: 'get',
params: query
})
}
// 卡券列表
export function getCardFavorableList(query) {
return request({
url: 'business/marketingActivity/cardFavorableRecord/getCardFavorableList',
method: 'get',
params: query
})
}
// 成长值记录

View File

@ -60,3 +60,10 @@ export function delUserGrade(id) {
method: 'delete'
})
}
// 查询会员等级详细
export function getUserGradeInfo(id) {
return request({
url: '/business/userManager/userGrade/userGradeInfo/' + id,
method: 'get'
})
}

View File

@ -146,7 +146,7 @@
<template slot-scope="props">
<el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">
<el-form-item label="用户信息">
<span>{{ props.row.userId ? queryUser(props.row.userId):"--" }}</span>
<span>{{ props.row.userId ? queryUser(userList,props.row.userId):"--" }}</span>
</el-form-item>
<el-form-item label="收银员">
<span>{{ queryStaf(staffList,props.row.staffId) }}</span>
@ -262,7 +262,7 @@
import {getDicts} from "@/api/dict/data";
import {getOilNameList, getOilNumGun } from "@/api/cashier/oilnumgun";
import {listOilOrder, oilOrderInfo, orderStatisticsApi} from "@/api/cashier/oilorder";
import {getUser} from "@/api/cashier/user/user";
import {getUser, queryUsers} from "@/api/cashier/user/user";
import {oilNumberList, oilNumbers} from "@/api/cashier/oilnumber";
import {getOilGuns, getOilNumberGun} from "@/api/cashier/oilGuns";
@ -270,6 +270,8 @@
name: "order_Cashier",
data(){
return{
//
userName:"",
oilOrder:{},
// 退
password:"",
@ -298,6 +300,8 @@
total:0,
//
oilGunList:[],
//
userList:[],
orderStatistics: {
numberOfOilPens:'0',
@ -317,12 +321,17 @@
this.getList();
this.getPayType();
this.getOilGunList();
this.getUserList();
},
methods:{
getUserList(){
queryUsers().then(res => {
this.userList = res.data
})
},
//
getOilGunList(){
getOilNumberGun().then(res => {
console.log(res)
res.data.forEach(item => {
if (item.oilGunList.length>0){
item.oilGunList.forEach(i => {
@ -380,14 +389,13 @@
return name;
},
// id
async queryUser(id){
let result = "";
if (id!=null && id!=""){
let data = await getUser(id);
result = data.data.name + "|" + data.data.mobile
}
console.log(result)
return result.toString();
queryUser(list,id){
list.forEach(item => {
if (item.id == id){
this.userName = item.name + "|" + item.mobile
}
})
return this.userName;
},
getVal(list,val){
let name = "";

View File

@ -1,24 +1,12 @@
<template>
<div>
<el-card class="box-card">
<!-- <div style="display: flex;">-->
<!-- <div class="top-app-sou">-->
<!-- <el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">-->
<!-- <el-form-item label="名称">-->
<!-- <el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </div>-->
<!-- <div style="margin-left: 10px">-->
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
<!-- </div>-->
<!-- </div>-->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="来源油站" prop="storeIds">
<el-select v-model="storeIds" filterable clearable placeholder="来源油站" style="width: 100%;">
<el-option v-for="item in storeList" :key="item.id+''" :label="item.name" :value="item.id+''"/>
</el-select>
</el-form-item>
<!-- <el-form-item label="来源油站" prop="storeIds">-->
<!-- <el-select v-model="storeIds" filterable clearable placeholder="来源油站" style="width: 100%;">-->
<!-- <el-option v-for="item in storeList" :key="item.id+''" :label="item.name" :value="item.id+''"/>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="会员号" prop="userNo">
<el-input
v-model="queryParams.userNo"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,146 @@
<template>
<div>
<el-radio-group v-model="tabPosition" size="mini" style="margin-bottom: 30px;">
<el-radio-button label="giftCard">储值卡记录</el-radio-button>
<el-radio-button label="literCard">升数卡记录</el-radio-button>
</el-radio-group>
<div v-if="tabPosition=='giftCard'">
<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>{{ 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>
<div v-else>
<el-table ref="tables2" key="2" v-loading="loading" :data="fuelList">
<el-table-column align="center" label="所属油站" prop="storeName"/>
<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 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="balance">
<template slot-scope="scope">
<span>{{scope.row.balance?scope.row.balance:"--"}}</span>
</template>
</el-table-column>
<el-table-column label="变动之后升数" align="center" prop="balance">
<template slot-scope="scope">
<span>{{scope.row.afterTheChange?scope.row.afterTheChange:"--"}}</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>
</div>
</template>
<script>
import {getCardRecordList, getFuelRecordList} from "@/api/cashier/userInfoOrder";
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,
}
}
},
created() {
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getCardList()
this.getFuelList()
},
methods:{
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
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

@ -0,0 +1,300 @@
<template>
<div>
<el-tabs v-model="subCardActive" @tab-click="handleClick">
<el-tab-pane label="子卡管理" name="subCardManage">
<div style="display: flex;justify-content: space-between;margin: 10px 0">
<div style="font-size: 16px">会员信息{{form.mobile}}</div>
<el-button type="primary" :disabled="cardValueChildList.length>=2" @click="handleAdd1">新增子卡</el-button>
</div>
<div>
<el-table ref="tables" v-loading="loading" :data="cardValueChildList">
<el-table-column label="子卡ID" prop="id" align="center" width="60"/>
<el-table-column label="子卡手机号" prop="cardChildPhones" align="center"/>
<el-table-column label="创建时间" align="center" width="160" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed='right'>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate1(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleOrder(scope.row)"
>交易记录</el-button>
</template>
</el-table-column>
</el-table>
<!-- <pagination-->
<!-- :total="total"-->
<!-- :page.sync="queryParams.page"-->
<!-- :limit.sync="queryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
</div>
<el-alert
title="关于子卡"
type="info"
style="margin-top: 20px"
:closable="false"
description="子卡为会员子母卡功能,子卡共享母卡的储值额度及信息,子卡为实体会员卡信息,消费需在小程序中才可进行使用">
</el-alert>
</el-tab-pane>
<el-tab-pane label="子卡消费记录" name="consumption">
<div style="display: flex;justify-content: space-between;margin: 10px 0">
<div style="font-size: 16px">
<el-form :model="subCardList" ref="queryForm" size="small" :inline="true" label-width="85px">
<el-form-item label="子卡手机号" prop="cardChildPhones">
<el-input
v-model="subCardList.cardChildPhones"
placeholder="请输入子卡手机号"
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="支付状态" prop="status">
<el-select
v-model="subCardList.status"
placeholder="全部"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.pay_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
</el-form-item>
</el-form>
</div>
</div>
<div>
<el-table ref="tables" v-loading="loading" :data="orderList">
<el-table-column type="expand">
<template slot-scope="props">
<el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">
<el-form-item label="备注信息">
<span>{{ props.row.remark }}</span>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column label="ID" prop="id" align="center" width="60"/>
<el-table-column label="子卡手机号" prop="cardChildPhones" align="center" />
<el-table-column label="订单号" prop="orderNo" align="center" />
<el-table-column label="订单金额" prop="amount" align="center" />
<el-table-column label="消费金额" prop="payAmount" align="center" />
<el-table-column label="支付状态" prop="status" align="center" >
<template slot-scope="scope">
<dict-tag :options="dict.type.pay_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="支付时间" prop="payTime" align="center" >
<template slot-scope="scope">
<span>{{ scope.row.payTime ? parseTime(scope.row.payTime) :"--" }}</span>
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="subCardList.page"
:limit.sync="subCardList.pageSize"
@pagination="getOrderList"
/>
</div>
<el-alert
title="关于子卡"
type="info"
style="margin-top: 20px"
:closable="false"
description="当前会员的所有子卡消费记录信息,可根据对应子卡卡号进行检索查询">
</el-alert>
</el-tab-pane>
</el-tabs>
<el-dialog :title="title" :visible.sync="openSubCard1" width="30%">
<el-form ref="form1" :model="form1" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="主卡信息" prop="userId" style="width: 420px">
<el-select
v-model="form1.userId"
placeholder="全部"
clearable
disabled
style="width: 100%"
>
<el-option
:label="form.mobile"
:value="form.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="子卡手机号" prop="cardChildPhones" style="width: 420px">
<el-input
v-model.number="form1.cardChildPhones"
placeholder="请输入子卡手机号"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="openSubCard1 = false"> </el-button>
<el-button type="primary" @click="submitSubCard"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {getUser} from "@/api/cashier/user/user";
import {
addCardValueChild,
cardValueChildInfo, editCardValueChild,
listCardValueChild,
listCardValueChildOrder
} from "@/api/cashier/user/cardvaluechild";
export default {
props:["pUserId"],
dicts:['pay_status'],
data(){
return{
subCardActive:'subCardManage',
form:{},
form1:{
userId:this.pUserId
},
loading:false,
total:0,
queryParams:{
page:1,
pageSize:10,
},
cardValueChildList:[],
userId:"",
subCardList: {
page:1,
pageSize:10,
cardChildPhones:'',
status:''
},
orderList:[],
title:"",
openSubCard1:false,
rules:{
userId:[{ required: true, message: '请选择主卡信息', trigger: 'change' }],
cardChildPhones:[{required: true, message: "请输入子卡手机号", trigger: "blur"}],
}
}
},
created() {
this.userId = this.$route.query.id;
this.getUser()
this.getCardList()
this.getOrderList()
},
methods:{
//
getUser(){
getUser(this.userId).then(response => {
this.form = response.data
})
},
//
getCardList(){
listCardValueChild(this.userId).then(res => {
this.cardValueChildList = res.data
})
},
//
getOrderList(){
listCardValueChildOrder(this.subCardList).then(res => {
this.orderList = res.data.records
this.total = res.data.total
})
},
handleAdd1(){
// this.title = ""
// this.openSubCard1 = true
this.$emit("handleAdd")
},
handleUpdate1(data){
// cardValueChildInfo(data.id).then(res => {
// this.form1 = res.data
// this.title = ""
// this.openSubCard1 = true
// })
this.$emit("handleUpdate")
},
//
submitSubCard(){
this.$refs["form1"].validate(valid => {
if (valid) {
if (this.form1.id) {
editCardValueChild(this.form1).then(res => {
if (res.data==1){
this.$modal.msgSuccess("修改成功!")
this.openSubCard1 = false
this.getCardList()
}else {
this.$modal.msgError("手机号已存在,请重新添加")
}
})
}else {
addCardValueChild(this.form1).then(res => {
if (res.data.success=="添加成功!"){
this.$modal.msgSuccess("添加成功!")
this.openSubCard1 = false
this.getCardList()
}else {
this.$modal.msgError(res.data.error)
}
})
}
}
})
},
handleOrder(data){
this.subCardList.cardChildPhones = data.cardChildPhones
this.subCardActive = "consumption"
this.subCardList.page = 1;
this.getOrderList()
},
handleQuery(){
this.subCardList.page = 1;
this.getOrderList()
},
handleClick(tab, event) {
// console.log(tab, event);
// this.refStaff()
// this.realyPayBills = 0
},
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,112 @@
<template>
<div>
<el-radio-group v-model="cardList" size="mini" style="margin-bottom: 30px;" @change="changeStatus()">
<el-radio-button label="notUse">未使用</el-radio-button>
<el-radio-button label="used">已使用</el-radio-button>
<el-radio-button label="expired">已过期</el-radio-button>
<el-radio-button label="whole">全部</el-radio-button>
</el-radio-group>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column align="center" prop="storeName" label="所属油站"/>
<el-table-column align="center" prop="cardFavorableName" label="优惠券名称"/>
<el-table-column align="center" prop="type" label="卡券类型">
<template slot-scope="scope">
<el-tag v-if="scope.row.type == 0">油品券</el-tag>
<el-tag v-if="scope.row.type == 1" type="success">商品券</el-tag>
<el-tag v-if="scope.row.type == 2" type="warning">通用券</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="fullDeduction" label="满减金额"/>
<el-table-column align="center" prop="discountAmount" label="券面额"/>
<el-table-column align="center" prop="oilType" label="适用油品"/>
<el-table-column align="center" prop="status" label="状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.status == 0">未使用</el-tag>
<el-tag v-if="scope.row.status == 1" type="success">已使用</el-tag>
<el-tag v-if="scope.row.status == 2" type="warning">已过期</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="卡券可用规则">
<el-table-column align="center" prop="name" label="有效期">
<template slot-scope="scope">
{{ scope.row.startTime }}{{ scope.row.endTime }}
</template>
</el-table-column>
<el-table-column align="center" prop="availablePeriod" label="周期与时段"/>
</el-table-column>
<el-table-column align="center" prop="createTime" label="领取时间"/>
<el-table-column align="center" prop="exchangeFrom" label="描述"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</div>
</template>
<script>
import { getCardFavorableList } from "@/api/cashier/userInfoOrder";
export default {
props:["pUserId"],
data(){
return {
cardList:'notUse',
userId:"",
loading:false,
list:[],
total:0,
queryParams:{
status: 0,
page:1,
pageSize:10,
}
}
},
created() {
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getList()
},
methods:{
getList(){
this.loading = true
this.queryParams.userId = this.userId
getCardFavorableList(this.queryParams).then(res=>{
if (res.code == 200) {
this.list = res.data.records
this.total = res.data.total
this.loading = false
}
})
},
changeStatus() {
console.log("12312312312312312",this.cardList)
if (this.cardList == 'notUse') {
this.queryParams.status = 0
} else if (this.cardList == 'used') {
this.queryParams.status = 1
} else if (this.cardList == 'expired') {
this.queryParams.status = 2
} else {
this.queryParams.status = ''
}
this.getList()
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,73 @@
<template>
<div>
<el-table ref="tables" 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="amount"/>
<el-table-column label="商品数量" align="center" prop="goodsNum" />
<!-- <el-table-column label="储值卡" align="center" prop="mobile"/> -->
<el-table-column label="实付金额" align="center" prop="payAmount"/>
<el-table-column label="付款类型" align="center" prop="payType">
<template slot-scope="scope">
<span v-if="scope.row.payType == 'CASH'">现金支付</span>
<span v-else-if="scope.row.payType == 'WECHAT'">微信支付</span>
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝支付</span>
<span v-else>{{ scope.row.payType }}</span>
</template>
</el-table-column>
<el-table-column label="订单号" align="center" prop="orderNo"/>
<!-- <el-table-column label="订单类型" align="center" prop="point"/> -->
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getMtOrderList } from "@/api/cashier/userInfoOrder.js";
export default {
props:["pUserId"],
data(){
return {
userId:"",
loading:false,
list:[],
total:0,
queryParams:{
page:1,
pageSize:10,
}
}
},
created() {
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getList()
},
methods:{
getList(){
this.loading = true
this.queryParams.userId = this.userId
getMtOrderList(this.queryParams).then(res=>{
if (res.code == 200) {
this.list = res.data.records
this.total = res.data.total
this.loading = false
}
})
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,49 @@
<template>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="变动时间" align="center"/>
<el-table-column label="类型" align="center" prop="userNo"/>
<el-table-column label="变动成长值" align="center" prop="name" />
<el-table-column label="描述" align="center" prop="name" />
<el-table-column label="类型" align="center" prop="balance"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
export default {
props:["pUserId"],
data(){
return {
userId:"",
loading:false,
list:[],
total:0,
queryParams:{
page:1,
pageSize:10,
}
}
},
created() {
this.userId = this.pUserId;
},
methods:{
getList(){
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,85 @@
<template>
<div>
<el-table ref="tables" 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">
<template slot-scope="scope">
<span v-if="scope.row.terminal == 'applet'">小程序</span>
<span v-else>{{ scope.row.terminal }}</span>
</template>
</el-table-column>
<el-table-column label="油品/油枪" align="center" prop="name" >
<template slot-scope="scope">
{{ scope.row.oilGunNum }}/{{ scope.row.oilName }}
</template>
</el-table-column>
<el-table-column label="订单金额" align="center" prop="orderAmount"/>
<el-table-column label="优惠金额" align="center" prop="discountAmount"/>
<el-table-column label="实付金额" align="center" prop="payAmount"/>
<el-table-column label="付款类型" align="center" prop="payType">
<template slot-scope="scope">
<span v-if="scope.row.payType == 'CASH'">现金支付</span>
<span v-else-if="scope.row.payType == 'WECHAT'">微信支付</span>
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝支付</span>
<span v-else>{{ scope.row.payType }}</span>
</template>
</el-table-column>
<el-table-column label="订单号" align="center" prop="orderNo" width="220px"/>
<el-table-column label="订单类型" align="center" prop="orderType"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getOilOrderList } from "@/api/cashier/userInfoOrder.js";
export default {
props:["pUserId"],
data(){
return {
userId:"",
loading:false,
list:[],
total:0,
queryParams:{
page:1,
pageSize:10,
}
}
},
created() {
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getList()
},
methods:{
getList(){
this.loading = true
this.queryParams.userId = this.userId
getOilOrderList(this.queryParams).then(res=>{
if (res.code == 200) {
this.list = res.data.records
this.total = res.data.total
this.loading = false
}
})
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,69 @@
<template>
<div>
<el-table ref="tables" 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">
<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 label="变动积分" align="center" prop="pointsChange" />
<el-table-column label="变动后积分" align="center" prop="currentPoints" />
<el-table-column label="描述" align="center" prop="changeReason"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getIntegralDetailList } from "@/api/cashier/userInfoOrder.js";
export default {
props:["pUserId"],
data(){
return {
userId:"",
loading:false,
list:[],
total:0,
queryParams:{
page:1,
pageSize:10,
}
}
},
created() {
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getList()
},
methods:{
getList(){
this.loading = true
this.queryParams.userId = this.userId
getIntegralDetailList(this.queryParams).then(res=>{
if (res.code == 200) {
this.list = res.data.records
this.total = res.data.total
this.loading = false
}
})
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,50 @@
<template>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="变动时间" align="center"/>
<el-table-column label="类型" align="center" prop="userNo"/>
<el-table-column label="变动数据" align="center" prop="name" />
<el-table-column label="记录单号" align="center" prop="name" />
<el-table-column label="变动描述" align="center" prop="balance"/>
<el-table-column label="场景来源" align="center" prop="balance"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
export default {
props:["pUserId"],
data(){
return {
userId:"",
loading:false,
list:[],
total:0,
queryParams:{
page:1,
pageSize:10,
}
}
},
created() {
this.userId = this.pUserId;
},
methods:{
getList(){
}
}
}
</script>
<style lang="scss" scoped>
</style>