收银台

This commit is contained in:
cun-nan 2023-11-11 13:54:24 +08:00
parent 3227f9b44b
commit c9c66c61dd
23 changed files with 528 additions and 296 deletions

View File

@ -7,15 +7,16 @@ import com.fuint.api.fuyou.entity.Const;
import com.fuint.api.fuyou.entity.Message;
import com.fuint.api.fuyou.service.FyPayService;
import com.fuint.api.fuyou.util.Utils;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.entity.LJOrder;
import com.fuint.business.order.entity.OilOrder;
import com.fuint.business.order.service.CashierOrderService;
import com.fuint.business.order.service.LJOrderService;
import com.fuint.business.order.service.OilOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.*;
@Service
@ -25,6 +26,8 @@ public class FyPayServiceImpl implements FyPayService {
private LJOrderService goodsOrderService;
@Autowired
private OilOrderService oilOrderService;
@Autowired
private CashierOrderService cashierOrderService;
/**
* 条码支付
@ -112,9 +115,8 @@ public class FyPayServiceImpl implements FyPayService {
if (Utils.verifySign(reqMap, str)){
OilOrder oilOrder = oilOrderService.selectOilOrderByOrderNo(orderNo);
LJOrder goodsOrder = goodsOrderService.selectGoodsOrder(orderNo);
CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo);
Date date = new Date();
// SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd :hh:mm:ss");
// dateFormat.format(date);
if (reqMap.get("trans_stat").equals("SUCCESS")){
if (!ObjectUtil.isEmpty(oilOrder)){
oilOrder.setOrderStatus("paid");
@ -123,6 +125,9 @@ public class FyPayServiceImpl implements FyPayService {
if (!ObjectUtil.isEmpty(goodsOrder)){
goodsOrder.setStatus("paid");
}
if (!ObjectUtil.isEmpty(cashierOrder)){
cashierOrder.setStatus("paid");
}
resMap.put("msg","success");
}else if (reqMap.get("trans_stat").equals("USERPAYING")){
resMap.put("msg","unpaid");
@ -133,6 +138,9 @@ public class FyPayServiceImpl implements FyPayService {
if (!ObjectUtil.isEmpty(goodsOrder)){
goodsOrder.setStatus("payFail");
}
if (!ObjectUtil.isEmpty(cashierOrder)){
cashierOrder.setStatus("payFail");
}
}
if (!ObjectUtil.isEmpty(oilOrder)){
oilOrderService.updateOilOrder(oilOrder);
@ -140,6 +148,9 @@ public class FyPayServiceImpl implements FyPayService {
if (!ObjectUtil.isEmpty(goodsOrder)){
goodsOrderService.updateGoodOrder(goodsOrder);
}
if (!ObjectUtil.isEmpty(cashierOrder)){
cashierOrderService.updateCashierOrder(cashierOrder);
}
}
}catch (Exception e){
log.error(e.getMessage());

View File

@ -0,0 +1,39 @@
package com.fuint.business.order.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.service.CashierOrderService;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* 收银员订单信息 controller层
*/
@RestController
@RequestMapping("/business/cashierOrder")
public class CashierOrderController extends BaseController {
@Autowired
private CashierOrderService cashierOrderService;
/**
* 根据条件分页查询收银员订单信息
* @param order
* @param pageNo
* @param pageSize
* @return
*/
@GetMapping("/list")
public ResponseObject list(CashierOrder order,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
IPage<CashierOrder> list = cashierOrderService.selectCashierOrderList(page,order);
return getSuccessResult(list);
}
}

View File

@ -48,4 +48,20 @@ public class LJOrderController extends BaseController {
LJOrder ljOrder = orderService.selectGoodsOrder(orderNo);
return getSuccessResult(ljOrder);
}
/**
* 根据订单号查询订单信息
* @param map
* @return
*/
@PostMapping("/id")
public ResponseObject goodsOrderInfo(@Validated @RequestBody Map<String,String> map){
String id = map.get("id");
LJOrder ljOrder = null;
if (id != null && !id.equals("")){
Integer orderId = Integer.valueOf(id);
ljOrder = orderService.selectGoodsOrderById(orderId);
}
return getSuccessResult(ljOrder);
}
}

View File

@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@RestController
@ -57,4 +58,15 @@ public class OilOrderController extends BaseController {
OilOrder order = orderService.selectOilOrderByOrderNo(orderNo);
return getSuccessResult(order);
}
/**
* 根据订单号模糊查询订单信息
* @param map
* @return
*/
@PostMapping("/orderNos")
public ResponseObject oilOrders(@Validated @RequestBody Map<String,String> map){
String orderNo = map.get("orderNo");
List<OilOrder> list = orderService.selectOilOrder(orderNo);
return getSuccessResult(list);
}
}

View File

@ -1,43 +1,71 @@
package com.fuint.business.order.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
/**
* 收银台订单表(CashierOrder)实体类
*/
@Data
public class CashierOrder {
// 油品id
private Integer oilId;
// 商品id
private Integer goodId;
// 订单号
private String orderNo;
// 油品实付金额
private Double oilPayAmount;
// 商品实付金额
private Double goodsPayAmount;
// 油品订单金额
private Double oilOrderAmount;
// 商品订单金额
private Double goodsOrderAmount;
// 油品优惠金额
private Double oilDiscountAmount;
// 商品优惠金额
private Double goodsDiscountAmount;
// 付款用户
@TableName("cashier_order")
@ApiModel(value = "CashierOrder对象", description = "收银台订单表")
public class CashierOrder extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("自增ID")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
/**
* 员工id
*/
private Integer staffId;
/**
* 店铺id
*/
private Integer storeId;
/**
* 油品订单id
*/
private Integer oilOrderId;
/**
* 商品订单id
*/
private Integer goodsOrderId;
/**
* 付款用户
*/
private String payUser;
// 付款类型
private String payType;
// 支付时间
/**
* 订单号
*/
private String orderNo;
/**
* 订单金额
*/
private Double amount;
/**
* 实付金额
*/
private Double payAmount;
/**
* 订单状态已支付未支付支付失败
*/
private String status;
/**
* 支付时间
*/
private Date payTime;
// 油品金额
private Double orderAmount;
// 油号
private String oils;
// 油枪号
private Integer oilGunNum;
// 油品数量
private Double oilNum;
// 油品单价
private Double oilPrice;
}

View File

@ -0,0 +1,17 @@
package com.fuint.business.order.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.order.entity.CashierOrder;
import org.apache.ibatis.annotations.Param;
public interface CashierOrderMapper extends BaseMapper<CashierOrder> {
/**
* 根据条件分页查询订单信息
* @param page
* @param order
* @return
*/
public IPage<CashierOrder> selectCashierOrderList(Page page, @Param("order") CashierOrder order);
}

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.order.mapper.CashierOrderMapper">
<sql id="selectOrders">
select * from cashier_order
</sql>
<select id="selectCashierOrderList" resultType="com.fuint.business.order.entity.CashierOrder">
<include refid="selectOrders"></include>
<where>
store_id = #{order.storeId}
<if test="order.staffId != null and order.staffId != ''">
and staff_id = #{order.staffId}
</if>
<if test="order.orderNo != null and order.orderNo != ''">
and order_no like concat('%', #{order.orderNo}, '%')
</if>
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(pay_time,'%y%m%d') &gt;= date_format(#{order.params.beginTime},'%y%m%d')
</if>
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(pay_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d')
</if>
</where>
</select>
</mapper>

View File

@ -35,4 +35,5 @@
</if>
</where>
</select>
</mapper>

View File

@ -0,0 +1,40 @@
package com.fuint.business.order.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.order.entity.CashierOrder;
/**
* 收银员订单信息 业务层
*/
public interface CashierOrderService extends IService<CashierOrder> {
/**
* 根据条件分页查询订单信息
* @param page
* @param order
* @return
*/
public IPage<CashierOrder> selectCashierOrderList(Page page, CashierOrder order);
/**
* 根据订单号查询商品订单信息
* @param orderNo
* @return
*/
public CashierOrder selectCashierOrder(String orderNo);
/**
* 添加商品订单信息
* @param order
* @return
*/
public int insertCashierOrder(CashierOrder order);
/**
* 修改商品订单信息
* @param order
* @return
*/
public int updateCashierOrder(CashierOrder order);
}

View File

@ -24,6 +24,13 @@ public interface LJOrderService extends IService<LJOrder> {
*/
public LJOrder selectGoodsOrder(String orderNo);
/**
* 根据订单号查询商品订单信息
* @param id
* @return
*/
public LJOrder selectGoodsOrderById(Integer id);
/**
* 添加商品订单信息
* @param order

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.order.entity.OilOrder;
import java.util.List;
import java.util.Map;
/**
@ -26,6 +27,13 @@ public interface OilOrderService extends IService<OilOrder> {
*/
public OilOrder selectOilOrderByOrderNo(String orderNo);
/**
* 根据订单号模糊查询商品订单信息
* @param orderNo
* @return
*/
public List<OilOrder> selectOilOrder(String orderNo);
/**
* 添加油品订单信息
* @param map

View File

@ -0,0 +1,44 @@
package com.fuint.business.order.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.mapper.CashierOrderMapper;
import com.fuint.business.order.service.CashierOrderService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
@Service
public class CashierOrderServiceImpl extends ServiceImpl<CashierOrderMapper, CashierOrder> implements CashierOrderService {
@Override
public IPage<CashierOrder> selectCashierOrderList(Page page, CashierOrder order) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
order.setStoreId(storeId);
IPage<CashierOrder> cashierOrderIPage = baseMapper.selectCashierOrderList(page, order);
return cashierOrderIPage;
}
@Override
public CashierOrder selectCashierOrder(String orderNo) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("order_no",orderNo);
CashierOrder cashierOrder = baseMapper.selectOne(queryWrapper);
return cashierOrder;
}
@Override
public int insertCashierOrder(CashierOrder order) {
int row = baseMapper.insert(order);
return row;
}
@Override
public int updateCashierOrder(CashierOrder order) {
int row = baseMapper.updateById(order);
return row;
}
}

View File

@ -30,6 +30,12 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
return ljOrder;
}
@Override
public LJOrder selectGoodsOrderById(Integer id) {
LJOrder ljOrder = baseMapper.selectById(id);
return ljOrder;
}
@Override
public int insertGoodOrder(LJOrder order) {
int row = baseMapper.insert(order);

View File

@ -10,10 +10,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.api.fuyou.entity.MerchantConfig;
import com.fuint.api.fuyou.service.FyPayService;
import com.fuint.api.fuyou.service.MerchantConfigService;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.entity.LJOrder;
import com.fuint.business.order.entity.OilOrder;
import com.fuint.business.order.entity.OrderGoods;
import com.fuint.business.order.mapper.OilOrderMapper;
import com.fuint.business.order.service.CashierOrderService;
import com.fuint.business.order.service.LJOrderService;
import com.fuint.business.order.service.OilOrderService;
import com.fuint.business.order.service.OrderGoodsService;
@ -39,6 +41,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
private MerchantConfigService merchantConfigService;
@Autowired
private UserBalanceService userBalanceService;
@Autowired
private CashierOrderService cashierOrderService;
@Override
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order) {
@ -57,6 +61,14 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
return order;
}
@Override
public List<OilOrder> selectOilOrder(String orderNo) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.like("order_no",orderNo+"%");
List list = baseMapper.selectList(queryWrapper);
return list;
}
@Override
public Map<String,Object> insertOilOrder(Map<String ,String> map) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
@ -131,6 +143,19 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
String orderNo = timestamp+randomString;
// 添加收银台订单信息
CashierOrder cashierOrder = new CashierOrder();
cashierOrder.setStaffId(staffId);
cashierOrder.setStoreId(storeId);
cashierOrder.setPayUser(payUser);
cashierOrder.setAmount(oilAmount+goodsAmount);
cashierOrder.setPayAmount(oilActualPay+goodsActualPay);
cashierOrder.setStatus(payStatus);
if (payType.equals("CASH")){
cashierOrder.setPayTime(new Date());
}
cashierOrder.setOrderNo(orderNo);
OilOrder oilOrder1 = null;
LJOrder ljOrder1 = null;
// 添加油品订单信息
@ -244,10 +269,13 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
LJOrder goodsOrder1 = orderService.selectGoodsOrder(orderNo);
if (!ObjectUtil.isEmpty(oilOrder2)){
orders.put("oilOrder",oilOrder2);
cashierOrder.setOilOrderId(oilOrder2.getId());
}
if (!ObjectUtil.isEmpty(goodsOrder1)){
orders.put("goodsOrder",goodsOrder1);
cashierOrder.setGoodsOrderId(goodsOrder1.getId());
}
cashierOrderService.insertCashierOrder(cashierOrder);
return orders;
}

View File

@ -0,0 +1,25 @@
package com.fuint.business.order.vo;
import lombok.Data;
@Data
public class OilOrderVo {
// 油品id
private Integer id;
// 油品订单金额
private Double orderAmount;
// 油号
private String oils;
// 油枪
private Integer oilGunNum;
// 加油数量
private Double oilNum;
// 油品单价
private Double oilPrice;
// 员工id
private Integer staffId;
// 员工姓名
private String name;
// 员工账号
private String mobile;
}

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询油品订单列表
export function listCashierOrder(query) {
return request({
url: '/business/cashierOrder/list',
method: 'get',
params: query
})
}

View File

@ -1,6 +1,6 @@
import request from '@/utils/request'
// 查询商品列表
// 查询商品订单列表
export function listOrder(query) {
return request({
url: '/business/order/list',
@ -16,3 +16,12 @@ export function getOrderGoods(orderId) {
method: 'get',
})
}
// 根据订单id查询商品订单信息
export function getGoodsOrder(data) {
return request({
url: '/business/order/id',
method: 'post',
data: data,
})
}

View File

@ -35,3 +35,12 @@ export function goodsOrder(data) {
data: data
})
}
// 根据订单号查询油品订单信息
export function oilOrders(data) {
return request({
url: '/business/oilOrder/orderNos',
method: 'post',
data: data
})
}

View File

@ -1,61 +0,0 @@
import request from '@/utils/request'
// 查询固定等级列表
export function listCertifiedMember(query) {
return request({
url: '/business/userManager/certifiedMember/list',
method: 'get',
params: query
})
}
// 查询固定等级详细
export function getCertifiedMember(id) {
return request({
url: '/business/userManager/certifiedMember/' + id,
method: 'get'
})
}
// 根据会员id查询固定等级详细
export function getCertifiedMemberByUserId(userId) {
return request({
url: '/business/userManager/certifiedMember/userId/' + userId,
method: 'get'
})
}
// 新增固定等级
export function addCertifiedMember(data) {
return request({
url: '/business/userManager/certifiedMember',
method: 'post',
data: data
})
}
// 批量新增固定等级
export function addCertifiedMembers(data) {
return request({
url: '/business/userManager/certifiedMember/members',
method: 'post',
data: data
})
}
// 修改固定等级
export function updateCertifiedMember(data) {
return request({
url: '/business/userManager/certifiedMember',
method: 'put',
data: data
})
}
// 删除固定等级
export function delCertifiedMember(id) {
return request({
url: '/business/userManager/certifiedMember/' + id,
method: 'delete'
})
}

View File

@ -1,19 +0,0 @@
import request from '@/utils/request'
// 查询会员详细
export function getChainStoreConfig() {
return request({
url: '/business/userManager/chainStoreConfig',
method: 'get'
})
}
// 修改会员
export function updateChainStoreConfig(data) {
return request({
url: '/business/userManager/chainStoreConfig',
method: 'put',
data: data
})
}

View File

@ -1,53 +0,0 @@
import request from '@/utils/request'
// 查询固定等级列表
export function listFixingLevel(query) {
return request({
url: '/business/userManager/fixingLevel/list',
method: 'get',
params: query
})
}
// 查询固定等级详细
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

@ -1,53 +0,0 @@
import request from '@/utils/request'
// 查询会员等级列表
export function listUserGrade(query) {
return request({
url: '/business/userManager/userGrade/list',
method: 'get',
params: query
})
}
// 查询会员等级详细
export function getUserGrade(id) {
return request({
url: '/business/userManager/userGrade/' + id,
method: 'get'
})
}
// 根据会员等级名称查询会员等级信息
export function queryUserGrade(data) {
return request({
url: '/business/userManager/userGrade/getName',
method: 'post',
data: data
})
}
// 新增会员等级
export function addUserGrade(data) {
return request({
url: '/business/userManager/userGrade',
method: 'post',
data: data
})
}
// 修改会员等级
export function updateUserGrade(data) {
return request({
url: '/business/userManager/userGrade',
method: 'put',
data: data
})
}
// 删除会员等级
export function delUserGrade(id) {
return request({
url: '/business/userManager/userGrade/' + id,
method: 'delete'
})
}

View File

@ -2,18 +2,51 @@
<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>
<!-- <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" label-width="68px">
<el-form-item label="交易员工" prop="staffId">
<el-select
v-model="queryParams.staffId"
clearable
placeholder="全部"
>
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
<span style="float: left">{{ item.realName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="订单号">
<el-input v-model="queryParams.orderNo" placeholder="订单号、官方单号检索"></el-input>
</el-form-item>
<el-form-item label="交易时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
<div style="margin-left: 10px">
<el-button type="primary" icon="el-icon-search">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="box-card">
<div slot="header" class="clearfix">
@ -37,89 +70,71 @@
</div>
<div class="table-box">
<el-table
:data="tableData"
:data="orderList"
style="width: 100%">
<el-table-column type="expand">
<template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand">
<el-form-item label="名称">
<span>{{ props.row.name }}</span>
<el-form-item label="收银员">
<span>{{ props.row.staffId }}</span>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column
prop="date"
label="用户信息"
width="150">
</el-table-column>
<el-table-column label="余额">
<el-table-column
prop="name"
label="储值卡"
width="120">
prop="orderNo"
label="订单号"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="升值卡"
width="120">
</el-table-column>
</el-table-column>
<el-table-column label="会员等级">
<el-table-column
prop="province"
label="汽油"
width="120">
prop="amount"
label="订单金额">
</el-table-column>
<el-table-column
prop="city"
label="柴油"
width="120">
prop="payAmount"
label="实付金额">
</el-table-column>
<el-table-column label="订单金额组成">
<el-table-column
prop="city"
label="天然气"
width="120">
</el-table-column>
</el-table-column>
<el-table-column label="统计">
<el-table-column
prop="province"
label="加油金"
width="120">
</el-table-column>
<el-table-column
prop="city"
label="积分"
width="120">
</el-table-column>
<el-table-column
prop="city"
label="消费次数"
width="120">
</el-table-column>
</el-table-column>
<el-table-column
prop="zip"
label="实体卡号"
width="220">
</el-table-column>
<el-table-column
prop="zip"
label="状态"
width="120">
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
prop="oilOrderId"
label="油品金额">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
>更多操作</el-button>
<span>{{ getOilPrice(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column
prop="goodsOrderId"
label="商品金额">
<template slot-scope="scope">
<span>{{ getGoodsOrder(scope.row.goodsOrderId) }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column
prop="payUser"
label="付款用户">
</el-table-column>
<el-table-column
prop="status"
label="状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag>
<el-tag type="success" v-else-if="scope.row.status == 'paid'">已支付</el-tag>
<el-tag type="danger" v-else>支付失败</el-tag>
</template>
</el-table-column>
<el-table-column label="注册时间" align="center" width="160" prop="payTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.payTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button style="width: 60px" size="mini" type="success" plain round>详情</el-button>
<el-button style="width: 60px" size="mini" type="primary" plain round>补打</el-button>
<el-button style="width: 60px" size="mini" type="danger" plain round>退款</el-button>
</template>
</el-table-column>
@ -140,10 +155,29 @@
</template>
<script>
import {listCashierOrder} from "@/api/cashier/cashierorder";
import {queryStaffs} from "@/api/cashier/staff";
import {oilOrders} from "@/api/cashier/oilorder";
import {getGoodsOrder} from "@/api/cashier/goodsorder";
export default {
name: "order_Cashier",
data(){
return{
//
oilAmount:0,
//
staffList:[],
//
dateRange: [],
//
orderList:[],
//
queryParams: {
page: 1,
pageSize: 10,
},
total:0,
labelPosition: 'right',
formLabelAlign: {
name: '',
@ -199,6 +233,54 @@
zip: 200333
}]
}
},
created() {
this.getList();
this.getStaffList();
},
methods:{
getGoodsOrder(id){
let amount = 0;
getGoodsOrder({id:id}).then( response => {
console.log(response)
})
return amount;
},
//
getOilPrice(data){
},
//
getList(val){
if (val!=undefined){
this.queryParams.page = val
}
listCashierOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
this.orderList = response.data.records;
this.total = response.data.total;
})
},
//
getStaffList(){
queryStaffs().then( response => {
this.staffList = response.data;
})
},
//
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
//
resetQuery() {
this.dateRange = [];
this.queryParams = {
page: 1,
pageSize: 10,
}
// this.resetForm("queryForm");
this.handleQuery();
},
}
}
</script>
@ -262,5 +344,4 @@
width: 20%;
}
</style>