Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
40afd862da
@ -64,7 +64,7 @@ public class OilOrder extends BaseEntity implements Serializable {
|
||||
/**
|
||||
* 油枪号
|
||||
*/
|
||||
private Integer oilGunNum;
|
||||
private String oilGunNum;
|
||||
/**
|
||||
* 油品数量
|
||||
*/
|
||||
|
@ -6,6 +6,7 @@ import com.fuint.business.order.entity.HandoverRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 交班记录表(HandoverRecord)表数据库访问层
|
||||
@ -30,7 +31,7 @@ public interface HandoverRecordMapper {
|
||||
* @param page 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
IPage<HandoverRecord> queryAllByLimit(@Param("page") Page page, HandoverRecord handoverRecord);
|
||||
IPage<HandoverRecord> queryAllByLimit(@Param("page") Page page, @Param("handoverRecord") HandoverRecord handoverRecord);
|
||||
|
||||
HandoverRecord selectByTime(HandoverRecord handoverRecord);
|
||||
|
||||
@ -83,5 +84,16 @@ public interface HandoverRecordMapper {
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
// 油品交易信息
|
||||
Map<String, String> oilOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
// 会员储值交易信息
|
||||
Map<String, String> cardOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
// 油卡交易信息
|
||||
Map<String, String> fuelOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
// 普通交易
|
||||
Map<String, String> goodsOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
|
||||
List<Map<String, String>> paymentAggregation(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
|
||||
}
|
||||
|
||||
|
@ -13,53 +13,29 @@
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createBy" column="create_by" jdbcType="INTEGER"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="INTEGER"/>
|
||||
<!-- <result property="staffName" column="real_name" jdbcType="VARCHAR"/>-->
|
||||
<result property="type" column="type" jdbcType="VARCHAR"/>
|
||||
<result property="status" column="real_name" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="HandoverRecordMap">
|
||||
select
|
||||
id, staff_id, record_data, start_time, end_time, store_id, create_time, update_time, create_by, update_by
|
||||
from handover_record
|
||||
where id = #{id}
|
||||
hr.id, hr.staff_id, hr.record_data, hr.start_time, hr.end_time, hr.store_id, hr.create_time, hr.update_time, hr.create_by, hr.update_by,ms.real_name staffName,hr.type,hr.status
|
||||
from handover_record hr
|
||||
left join mt_staff ms ON hr.staff_id = ms.id
|
||||
where hr.id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="HandoverRecordMap">
|
||||
select
|
||||
id, staff_id, record_data, start_time, end_time, store_id, create_time, update_time, create_by, update_by
|
||||
from handover_record
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="staffId != null">
|
||||
and staff_id = #{staffId}
|
||||
</if>
|
||||
<if test="recordData != null and recordData != ''">
|
||||
and record_data = #{recordData}
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
and start_time = #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and end_time = #{endTime}
|
||||
</if>
|
||||
<if test="storeId != null">
|
||||
and store_id = #{storeId}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
and update_by = #{updateBy}
|
||||
</if>
|
||||
</where>
|
||||
hr.id, hr.staff_id, hr.record_data, hr.start_time, hr.end_time, hr.store_id, hr.create_time, hr.update_time, hr.create_by, hr.update_by,ms.real_name as staffName,hr.type,hr.status
|
||||
from handover_record hr
|
||||
left join mt_staff ms ON hr.staff_id = ms.id
|
||||
where
|
||||
hr.store_id = #{handoverRecord.storeId}
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectByTime" resultMap="HandoverRecordMap">
|
||||
@ -139,10 +115,11 @@ limit 1
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into handover_record(staff_id, record_data, start_time, end_time, store_id, create_time, update_time, create_by, update_by)
|
||||
values (#{staffId}, #{recordData}, #{startTime}, #{endTime}, #{storeId}, #{createTime}, #{updateTime}, #{createBy}, #{updateBy})
|
||||
insert into handover_record(staff_id, record_data, start_time, end_time, store_id, create_time, update_time, create_by, update_by,status,type)
|
||||
values (#{staffId}, #{recordData}, #{startTime}, #{createTime}, #{storeId}, #{createTime}, #{createTime}, #{createBy}, #{updateBy},#{status},{type})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
@ -211,5 +188,93 @@ limit 1
|
||||
delete from handover_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- // 油品订单(订单)-->
|
||||
<!-- // 油品订单(退款)-->
|
||||
<!-- // 油品订单(实收)-->
|
||||
<!-- // 油品优惠(实收)-->
|
||||
<!-- // 油品交易(实收)-->
|
||||
<select id="oilOrderStatistics" resultType="java.util.Map">
|
||||
select
|
||||
sum(order_amount) oilOrder,-- 油品订单
|
||||
sum(if(order_status='refund',discount_amount,0)) oilRefund, -- 退款
|
||||
sum(if(order_status='paid',pay_amount,0)) oilPaid,
|
||||
sum(if(order_status='paid',discount_amount,0)) oilDiacount
|
||||
from oil_order
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime};
|
||||
</select>
|
||||
<select id="cardOrderStatistics" resultType="java.util.Map">
|
||||
select
|
||||
sum(recharge_balance) cardOrder,
|
||||
sum(if(pay_status='refund',recharge_balance,0)) cardRefund,
|
||||
sum(if(pay_status='paid',recharge_balance,0)) cardPaid,
|
||||
sum(gift_balance) cardGiftOrder,
|
||||
sum(if(pay_status='refund',gift_balance,0)) cardGiftRefund,
|
||||
sum(if(pay_status='paid',gift_balance,0)) cardGiftPaid
|
||||
from card_value_record
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime};
|
||||
</select>
|
||||
<select id="fuelOrderStatistics" resultType="java.util.Map">
|
||||
select
|
||||
sum(recharge_balance) fuelOrder,
|
||||
sum(if(pay_status='refund',recharge_balance,0)) fuelRefund,
|
||||
sum(if(pay_status='paid',recharge_balance,0)) fuelPaid
|
||||
from card_fuel_record
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime};
|
||||
</select>
|
||||
|
||||
<select id="goodsOrderStatistics" resultType="java.util.Map">
|
||||
SELECT
|
||||
SUM(amount) AS goodsOrder ,
|
||||
SUM(IF(`status`='refund', pay_amount, 0)) AS goodsRefund,
|
||||
SUM(IF(`status`='paid', pay_amount, 0)) AS goodsPaid
|
||||
FROM mt_order
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime};
|
||||
</select>
|
||||
<select id="paymentAggregation" resultType="java.util.Map">
|
||||
SELECT
|
||||
'oil' AS flag,
|
||||
pay_type AS payType,
|
||||
SUM(IF(order_status='paid', pay_amount, 0)) AS paidAmount,
|
||||
SUM(IF(order_status='refund', pay_amount, 0)) AS refundAmount
|
||||
FROM oil_order
|
||||
GROUP BY pay_type
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'card' AS flag,
|
||||
payment_type AS payType,
|
||||
SUM(IF(pay_status='paid', recharge_balance, 0)) AS paidAmount,
|
||||
SUM(IF(pay_status='refund', recharge_balance, 0)) AS refundAmount
|
||||
FROM card_value_record
|
||||
GROUP BY payment_type
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'fuel' AS flag,
|
||||
payment_type AS payType,
|
||||
SUM(IF(pay_status='paid', recharge_balance, 0)) AS paidAmount,
|
||||
SUM(IF(pay_status='refund', recharge_balance, 0)) AS refundAmount
|
||||
FROM card_fuel_record
|
||||
GROUP BY payment_type
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'goods' AS flag,
|
||||
pay_type AS payType,
|
||||
SUM(IF(status='paid', pay_amount, 0)) AS paidAmount,
|
||||
SUM(IF(status='refund', pay_amount, 0)) AS refundAmount
|
||||
FROM mt_order
|
||||
GROUP BY pay_type;
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
|
@ -31,7 +31,7 @@ public interface HandoverRecordService {
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
IPage<HandoverRecord> queryByPage(@Param("page") Page page, HandoverRecord handoverRecord);
|
||||
IPage<HandoverRecord> queryByPage(@Param("page") Page page, @Param("handoverRecord") HandoverRecord handoverRecord);
|
||||
|
||||
HandoverRecord selectByTime();
|
||||
|
||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.HandoverRecord;
|
||||
import com.fuint.business.order.mapper.HandoverRecordMapper;
|
||||
import com.fuint.business.order.mapper.OilOrderMapper;
|
||||
import com.fuint.business.order.service.HandoverRecordService;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
import com.fuint.business.store.mapper.MtStoreMapper;
|
||||
@ -17,10 +18,13 @@ import com.fuint.common.dto.AccountInfo;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.xml.crypto.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -35,6 +39,8 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
private HandoverRecordMapper handoverRecordMapper;
|
||||
@Resource
|
||||
private MtStoreMapper mtStoreMapper;
|
||||
@Resource
|
||||
private OilOrderMapper oilOrderMapper;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
@ -55,7 +61,7 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public IPage<HandoverRecord> queryByPage(@Param("page") Page page, HandoverRecord handoverRecord) {
|
||||
public IPage<HandoverRecord> queryByPage(@Param("page") Page page,@Param("handoverRecord") HandoverRecord handoverRecord) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
handoverRecord.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.handoverRecordMapper.queryAllByLimit(page, handoverRecord);
|
||||
@ -79,6 +85,8 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
public HandoverRecord insert(HandoverRecord handoverRecord) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
handoverRecord.setStoreId(nowAccountInfo.getStoreId());
|
||||
handoverRecord.setStaffId(nowAccountInfo.getStaffId());
|
||||
|
||||
this.handoverRecordMapper.insert(handoverRecord);
|
||||
return handoverRecord;
|
||||
}
|
||||
@ -109,7 +117,7 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
@Override
|
||||
public Map<String, Map<String,String>> handover() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
MtStore mtStore = mtStoreMapper.queryStoreById(nowAccountInfo.getStoreId());
|
||||
// MtStore mtStore = mtStoreMapper.queryStoreById(nowAccountInfo.getStoreId());
|
||||
// 获取当前日期
|
||||
LocalDate today = LocalDate.now();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
@ -121,16 +129,17 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
|
||||
Map<String, Map<String,String>> handoverMap = new HashMap<>();
|
||||
|
||||
String startTime = midnight.format(formatter);
|
||||
String startTime = "2023-01-01 12:12:12";
|
||||
HandoverRecord handoverRecord = selectByTime();
|
||||
if (!ObjectUtil.isEmpty(handoverRecord) && !ObjectUtil.isEmpty(handoverRecord.getEndTime())) {
|
||||
startTime = handoverRecord.getEndTime().toString();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
startTime = sdf.format(handoverRecord.getEndTime());
|
||||
}
|
||||
|
||||
|
||||
// 填充 baseInfo
|
||||
Map<String, String> baseInfo = new HashMap<>();
|
||||
baseInfo.put("storeName", mtStore.getName());
|
||||
// baseInfo.put("storeName", mtStore.getName());
|
||||
baseInfo.put("realName", nowAccountInfo.getRealName());
|
||||
baseInfo.put("handoverType", "门店统一交班");
|
||||
baseInfo.put("startTime", startTime);
|
||||
@ -138,6 +147,11 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
handoverMap.put("baseInfo",baseInfo);
|
||||
// 获取订单汇总
|
||||
Map<String, String> orderSummaryMap = orderSummary(startTime, formattedEndTime);
|
||||
handoverMap.put("orderSummary",orderSummaryMap);
|
||||
// 支付方式汇总
|
||||
Map<String, String> paymentAggregationMap = paymentAggregation(startTime, formattedEndTime);
|
||||
handoverMap.put("paymentAggregation",paymentAggregationMap);
|
||||
|
||||
// 退款汇总
|
||||
// 实收汇总
|
||||
// 油品订单
|
||||
@ -152,23 +166,68 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
return handoverMap;
|
||||
}
|
||||
public Map<String, String> orderSummary(String startTime, String endTime) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// 油品订单(订单) 油品订单(退款) 油品订单(实收) 油品优惠(实收) 油品交易(实收)
|
||||
Map<String, String> oilOrderStatistics = handoverRecordMapper.oilOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
// 会员储值(订单) 会员储值(退款) 会员储值(实收) 储值赠送(订单) 储值赠送(退款) 储值赠送(实际)
|
||||
Map<String, String> cardOrderStatistics = handoverRecordMapper.cardOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
Map<String, String> fuelOrderStatistics = handoverRecordMapper.fuelOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
// 普通收款(订单) 普通收款(退款) 普通收款(实收)
|
||||
Map<String, String> goodsOrderStatistics = handoverRecordMapper.goodsOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
|
||||
// 油品订单(订单)
|
||||
// 油品订单(退款)
|
||||
// 油品订单(实收)
|
||||
// 油品优惠(实收)
|
||||
// 油品交易(实收)
|
||||
if(!ObjectUtil.isEmpty(cardOrderStatistics)) {
|
||||
oilOrderStatistics.putAll(cardOrderStatistics);
|
||||
}
|
||||
if(!ObjectUtil.isEmpty(fuelOrderStatistics)) {
|
||||
oilOrderStatistics.putAll(fuelOrderStatistics);
|
||||
}
|
||||
if(!ObjectUtil.isEmpty(goodsOrderStatistics)) {
|
||||
oilOrderStatistics.putAll(goodsOrderStatistics);
|
||||
}
|
||||
return oilOrderStatistics;
|
||||
}
|
||||
|
||||
public Map<String, String> paymentAggregation(String startTime, String endTime) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<Map<String, String>> paymentAggregation = handoverRecordMapper.paymentAggregation(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
// 共有四个 转为普通map
|
||||
Map<String, String> allAggreMap = new HashMap<>();
|
||||
Map<String, String> allRefundMap = new HashMap<>();
|
||||
Map<String, String> oilMap = new HashMap<>();
|
||||
Map<String, String> goodsMap = new HashMap<>();
|
||||
Map<String, String> cardMap = new HashMap<>();
|
||||
if (!ObjectUtil.isEmpty(paymentAggregation)) {
|
||||
for (Map<String, String> stringStringMap : paymentAggregation) {
|
||||
|
||||
// 计算退款汇总
|
||||
// if ( allRefundMap.containsKey("refALl"+stringStringMap.get("payType"))) {
|
||||
// allRefundMap.put("refALl"+stringStringMap.get("payType"),
|
||||
// (new BigDecimal( stringStringMap.get("refundAmount")).add(new BigDecimal(stringStringMap.get("refundAmount")))).toString());
|
||||
// }else {
|
||||
// allAggreMap.put("refALl"+stringStringMap.get("payType"), allRefundMap.get(stringStringMap.get("refundAmount")));
|
||||
// }
|
||||
|
||||
// 总汇总
|
||||
// if ( allAggreMap.containsKey("agreALL"+stringStringMap.get("payType"))) {
|
||||
// allAggreMap.put("agreALL"+stringStringMap.get("payType"),
|
||||
// (new BigDecimal( stringStringMap.get("paidAmount")).add(new BigDecimal(stringStringMap.get("paidAmount")))).toString());
|
||||
// }else {
|
||||
// allAggreMap.put("agreALL"+stringStringMap.get("payType"), allAggreMap.get(stringStringMap.get("paidAmount")));
|
||||
// }
|
||||
|
||||
|
||||
// 会员储值(订单)
|
||||
// 会员储值(退款)
|
||||
// 会员储值(实收)
|
||||
// 储值赠送(订单)
|
||||
// 储值赠送(退款)
|
||||
// 储值赠送(实际)
|
||||
// 普通收款(订单)
|
||||
// 普通收款(退款)
|
||||
// 普通收款(实收)
|
||||
if ("oil".equals(stringStringMap.get("flag"))){
|
||||
// 油品订单汇总
|
||||
|
||||
|
||||
}else if ("card".equals(stringStringMap.get("flag"))) {
|
||||
// 商品订单汇总
|
||||
}else if ("fuel".equals(stringStringMap.get("flag")) || "goods".equals(stringStringMap.get("flag")) ) {
|
||||
// 会员储值汇总
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
order.setStaffId(staffId);
|
||||
order.setTerminal(terminal);
|
||||
order.setOils((String) jsonObjects.get(i).get("oilName"));
|
||||
order.setOilGunNum(Integer.valueOf(jsonObjects.get(i).get("oilGunNum").toString()));
|
||||
order.setOilGunNum(jsonObjects.get(i).get("gunName").toString());
|
||||
order.setOilNum(oilNum);
|
||||
order.setDiscountAmount(oilDiscount);
|
||||
order.setPayUser(payUser);
|
||||
|
@ -29,11 +29,12 @@
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="OilGunMap">
|
||||
select
|
||||
og.id, og.gun_name, og.tank_id, og.status, og.store_id, og.create_time,og.update_time, og.create_by, og.update_by, ot.oil_number, ot.number_id
|
||||
og.id, og.gun_name, og.tank_id, og.status, og.store_id, og.create_time,og.update_time, og.create_by,
|
||||
og.update_by, ot.oil_number, ot.number_id, ot.tank_name
|
||||
from oil_gun og
|
||||
left join oil_tank ot on og.tank_id = ot.id
|
||||
<where>
|
||||
og.store_id = #{oilGun.storeId}
|
||||
og.store_id = #{oilGun.storeId} and og.status = '启用'
|
||||
|
||||
<if test="oilGun.numberId != null">
|
||||
and ot.number_id = #{oilGun.numberId}
|
||||
|
@ -40,7 +40,7 @@
|
||||
<!-- from oil_number-->
|
||||
<select id="selectOilNumberById" resultType="com.fuint.business.petrolStationManagement.entity.OilNumber">
|
||||
<include refid="selectOilNumber"></include>
|
||||
where number_id = #{numberId}
|
||||
where number_id = #{id}
|
||||
</select>
|
||||
<insert id="insertOilNumber">
|
||||
insert into oil_number
|
||||
|
@ -17,8 +17,7 @@ public interface MtStoreMapper extends BaseMapper<MtStore> {
|
||||
|
||||
MtStore queryStoreByName(@Param("name") String name);
|
||||
|
||||
MtStore queryStoreById(@Param("id") Integer id);
|
||||
|
||||
public MtStore queryStoreById(@Param("id") Integer id);
|
||||
|
||||
List<MtStore> findStoresByIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
|
@ -7,3 +7,19 @@ export function getHandoverApi() {
|
||||
// params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getHandoverListApi(query) {
|
||||
return request({
|
||||
url: '/business/handoverRecord/queryByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function addHandoverApi(data) {
|
||||
return request({
|
||||
url: '/business/handoverRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -1,5 +1,14 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询油枪列表信息
|
||||
export function getOilGun(data) {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilGun/queryByPage',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询油罐列表
|
||||
export function getGunApi(data) {
|
||||
return request({
|
||||
@ -8,6 +17,7 @@ export function getGunApi(data) {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增有关信息
|
||||
export function insertGunApi(data) {
|
||||
return request({
|
||||
|
10
fuintCashierWeb/src/api/cashier/oilnumber.js
Normal file
10
fuintCashierWeb/src/api/cashier/oilnumber.js
Normal file
@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 根据id查询油号油枪列表
|
||||
export function getOilNumberById(id) {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilNumber/' +id ,
|
||||
method: 'get',
|
||||
// data: data
|
||||
})
|
||||
}
|
10
fuintCashierWeb/src/api/cashier/preferential.js
Normal file
10
fuintCashierWeb/src/api/cashier/preferential.js
Normal file
@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 扫码支付接口
|
||||
export function selectPreferential(data) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/activeExchange/selectConsumptionList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
@ -56,6 +56,12 @@ export const constantRoutes = [
|
||||
name: 'Index',
|
||||
meta: { title: '系统首页', icon: 'dashboard', affix: true }
|
||||
},
|
||||
// {
|
||||
// path: 'HandoverDetails',
|
||||
// component: () => import('@/views/cashier/NewComponents/HandoverDetails'),
|
||||
// name: 'HandoverDetails',
|
||||
// meta: { title: '交班明细', icon: 'dashboard', affix: true }
|
||||
// },
|
||||
{
|
||||
path: 'cashier',
|
||||
component: () => import('@/views/cashier/index'),
|
||||
@ -107,6 +113,11 @@ export const constantRoutes = [
|
||||
name: 'details',
|
||||
component: () => import('@/views/details/index'),
|
||||
},
|
||||
{
|
||||
path: '/HandoverDetails',
|
||||
name: 'HandoverDetails',
|
||||
component: () => import('@/views/cashier/NewComponents/HandoverDetails?id=8'),
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -6,11 +6,12 @@
|
||||
<div class="box-ge">
|
||||
<div class="input-box">
|
||||
<div>油站名称:</div>
|
||||
<div>{{ handoverList.baseInfo.storeName }}</div>
|
||||
<div>{{ handoverList && handoverList.baseInfo ? handoverList.baseInfo.storeName : '未知油站' }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>收银员:</div>
|
||||
<div>{{ handoverList.baseInfo.realName }}</div>
|
||||
<!-- <div>{{ handoverList.baseInfo.realName }}</div>-->
|
||||
<div>{{ handoverList && handoverList.baseInfo ? handoverList.baseInfo.realName : '未知姓名' }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>交班方式:</div>
|
||||
@ -18,11 +19,15 @@
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>开始时间:</div>
|
||||
<div>{{ handoverList.baseInfo.startTime }}</div>
|
||||
<!-- <div>{{ handoverList.baseInfo.startTime }}</div>-->
|
||||
<div>{{ handoverList && handoverList.baseInfo ? handoverList.baseInfo.startTime : '/--/' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>结束时间:</div>
|
||||
<div>{{ handoverList.baseInfo.endTime }}</div>
|
||||
<!-- <div>{{ handoverList.baseInfo.endTime }}</div>-->
|
||||
<div>{{ handoverList && handoverList.baseInfo ? handoverList.baseInfo.endTime : '/--/' }}</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-ge">
|
||||
@ -39,66 +44,93 @@
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>油品订单(订单)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilOrder : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>油品订单(退款)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilRefund : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>油品订单(实收)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilPaid : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>油品优惠(实收)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilDiacount : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>抹零总额(实收)</div>-->
|
||||
<!-- <div>¥2164.55</div>-->
|
||||
<!-- </div>-->
|
||||
<div class="input-box">
|
||||
<div>油品交易(实收)</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
|
||||
<el-divider></el-divider>
|
||||
<!-- 六个一条线 -->
|
||||
<div class="input-box">
|
||||
<div>会员储值(订单)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardOrder : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>会员储值(退款)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardRefund : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>会员储值(实收)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardPaid : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>储值赠送(订单)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftOrder : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>储值赠送(退款)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftRefund : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>储值赠送(实际)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftPaid : '0' }}</div>
|
||||
|
||||
</div>
|
||||
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>存油储值(订单)</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelOrder : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>存油储值(退款)</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelRefund : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>存油储值(实收)</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelPaid : '0' }}</div>
|
||||
|
||||
</div>
|
||||
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>普通收款(订单)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.goodsOrder : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>普通收款(退款)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.goodsRefund : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>普通收款(实收)</div>
|
||||
<div>¥2164.55</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.goodsPaid : '0' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-ge">
|
||||
@ -315,10 +347,10 @@
|
||||
<div class="app-bottom">
|
||||
<el-card >
|
||||
<div class="bottom-xz">
|
||||
<div class="anniu">交班</div>
|
||||
<div class="anniu" @click="shift">交班</div>
|
||||
<div class="anniu-lv">云打印</div>
|
||||
<div class="anniu-lv">本地打印</div>
|
||||
<div ><el-link type="primary">交班记录</el-link></div>
|
||||
<div ><el-link type="primary" @click="recording">交班记录</el-link></div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
@ -327,13 +359,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getHandoverApi} from "@/api/cashier/handover";
|
||||
import {addHandoverApi, getHandoverApi} from "@/api/cashier/handover";
|
||||
|
||||
export default {
|
||||
name: "Handover",
|
||||
data() {
|
||||
return {
|
||||
handoverList : '',
|
||||
handoverList : {},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -345,6 +377,45 @@
|
||||
this.handoverList = res.data;
|
||||
console.log("this.handoverList",this.handoverList)
|
||||
})
|
||||
},
|
||||
|
||||
// 交班记录
|
||||
recording() {
|
||||
this.$router.push({
|
||||
path:'/HandoverDetails',
|
||||
query:{
|
||||
id:9
|
||||
}
|
||||
});
|
||||
},
|
||||
shift() {
|
||||
this.$confirm('交班并退出系统, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let recordData = this.handoverList
|
||||
let handoverRecord = {
|
||||
startTime:this.handoverList.baseInfo.endTime,
|
||||
recordData:JSON.stringify(recordData),
|
||||
type:0,
|
||||
status:0,
|
||||
}
|
||||
addHandoverApi(handoverRecord).then(res=>{
|
||||
|
||||
console.log("")
|
||||
})
|
||||
//
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: '删除成功!'
|
||||
// });
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消交班'
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,237 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card >
|
||||
<div slot="header" class="clearfix">
|
||||
<i class="el-icon-back" @click="goToAbout">返回 | </i>
|
||||
<!-- <el-link icon="el-icon-edit" :underline="false" @click="goToAbout">编辑</el-link>-->
|
||||
<span>交班详情</span>
|
||||
</div>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
||||
<el-form-item label="交班方式" prop="giftName">
|
||||
<el-select v-model="queryParams.status" style="width: 150px" placeholder="交班状态" clearable>
|
||||
<!-- <el-option label="未支付" value="0">交班</el-option>-->
|
||||
<!-- <el-option label="付款成功" value="1">未交班</el-option>-->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="交班状态">
|
||||
<el-select v-model="queryParams.type" style="width: 150px" placeholder="交班状态" clearable>
|
||||
<el-option label="未支付" value="0">交班</el-option>
|
||||
<el-option label="付款成功" value="1">未交班</el-option>
|
||||
</el-select>
|
||||
</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="-"-->
|
||||
<!-- clearable-->
|
||||
<!-- 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>
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-top: 20px" class="box-card">
|
||||
<el-table
|
||||
style="width: 1500px"
|
||||
ref="tables"
|
||||
v-loading="loading"
|
||||
:data="dataList"
|
||||
:default-sort="defaultSort">
|
||||
<el-table-column label="班次员工" align="center" prop="staffName"/>
|
||||
<el-table-column label="开始时间" align="center" prop="startTime"/>
|
||||
<el-table-column label="结束时间" align="center" prop="endTime" />
|
||||
<el-table-column label="交班状态" align="center" prop="status" width="">
|
||||
<template slot-scope="scope">
|
||||
<el-tag effect="plain" v-if="scope.row.type =='0'"> 已交班</el-tag>
|
||||
<el-tag type="success" effect="plain" v-else-if="scope.row.type =='1'">未交班</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="创建时间" align="center" prop="createTime" width=""/>-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDetail(scope.row)"
|
||||
>交班数据</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDetail(scope.row)"
|
||||
>补打交班单</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
<el-dialog title="订单详情" :visible.sync="openDetail" width="600px" append-to-body :close-on-click-modal="false">
|
||||
<!-- <detail :dataForm = "recordData"></detail>-->
|
||||
<HandoverOnly :recordData = "recordData"></HandoverOnly>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getHandoverListApi} from "@/api/cashier/handover";
|
||||
|
||||
import {getOrderApi,getStatisticsApi } from "@/api/cashier/integralOrder/order";
|
||||
import Detail from '@/views/cashier/NewComponents/integralOrder/detail'
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import HandoverOnly from "@/views/cashier/NewComponents/HandoverOnly";
|
||||
|
||||
export default {
|
||||
name: "pointsCashier",
|
||||
components: {HandoverOnly, Detail },
|
||||
|
||||
// dicts: ['zhzt'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
openDetail:false,
|
||||
dataForm:{},
|
||||
dataList:[],
|
||||
recordData:'',
|
||||
zhztList:'',
|
||||
queryParams: {
|
||||
|
||||
status: '',
|
||||
type: '',
|
||||
|
||||
page:null,
|
||||
pageSize:null
|
||||
},
|
||||
loading: false,
|
||||
dateRange: [],
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
|
||||
total: 0,
|
||||
|
||||
statisticsForm: {
|
||||
num:0,
|
||||
exchangeQuantity:0,
|
||||
integral:0,
|
||||
amount:0
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getStatistics();
|
||||
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.dataList = res.data.records
|
||||
this.total = res.data.total
|
||||
|
||||
})
|
||||
},
|
||||
getStatistics() {
|
||||
getStatisticsApi().then(res=>{
|
||||
this.statisticsForm = res.data
|
||||
})
|
||||
console.log("123123123",this.statisticsForm)
|
||||
},
|
||||
|
||||
// 获取支付方式
|
||||
getZhzt() {
|
||||
getDicts("zhzt").then(response => {
|
||||
this.zhztList = response.data;
|
||||
})
|
||||
},
|
||||
|
||||
handleUpdate(){},
|
||||
handleQuery(){
|
||||
this.getList();
|
||||
|
||||
},
|
||||
resetQuery(){
|
||||
this.queryParams = {
|
||||
giftName: '',
|
||||
status: '',
|
||||
mobile: '',
|
||||
orderNumber: '',
|
||||
page:1,
|
||||
pageSize:10
|
||||
},
|
||||
this.dateRange = []
|
||||
},
|
||||
handleDetail(data){
|
||||
this.openDetail = true
|
||||
this.recordData = data.recordData;
|
||||
// JSON.parse(this.recordData )
|
||||
console.log("data.recordData;",this.recordData)
|
||||
|
||||
},
|
||||
goToAbout() {
|
||||
this.$router.push({
|
||||
path:'/Handover',
|
||||
query:{
|
||||
id:9
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f6f8f9;
|
||||
padding-top: 0px;
|
||||
padding: 0px
|
||||
}
|
||||
.box {
|
||||
padding: 10px;
|
||||
height: 80px;
|
||||
width: 150px;
|
||||
margin-right: 0px;
|
||||
background-color: rgba(204, 204, 204, 0.3);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: left;
|
||||
text-align: left;
|
||||
}
|
||||
.box-card{
|
||||
width: 100%;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.font-chinese {
|
||||
font-size: 15px;
|
||||
font-family:Microsoft YaHei;
|
||||
font-weight: bold;
|
||||
line-height:1.5
|
||||
}
|
||||
.font-number {
|
||||
font-size: 20px;
|
||||
font-family: PingFang SC,sans-serif;
|
||||
font-weight: bold;
|
||||
line-height:1.3
|
||||
}
|
||||
.table-box{
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
533
fuintCashierWeb/src/views/cashier/NewComponents/HandoverOnly.vue
Normal file
533
fuintCashierWeb/src/views/cashier/NewComponents/HandoverOnly.vue
Normal file
@ -0,0 +1,533 @@
|
||||
<!--发票-->
|
||||
<template>
|
||||
<div class="app-center">
|
||||
<div class="box-center">
|
||||
<div class="box-title">
|
||||
交班统计
|
||||
<el-button style="float: right ;margin-left: 5px" size="mini" type="primary" plain>打印交班单</el-button>
|
||||
|
||||
</div>
|
||||
<!-- <div class="box-ge">-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>油站名称:</div>-->
|
||||
<!-- <div>{{ handoverList.baseInfo.storeName }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>收银员:</div>-->
|
||||
<!-- <div>{{ handoverList.baseInfo.realName }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>交班方式:</div>-->
|
||||
<!-- <div>门店统一交班</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>开始时间:</div>-->
|
||||
<!-- <div>{{ handoverList.baseInfo.startTime }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>结束时间:</div>-->
|
||||
<!-- <div>{{ handoverList.baseInfo.endTime }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="box-ge">-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>当前版本:</div>-->
|
||||
<!-- <div>V1.0.1</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="box-ge">-->
|
||||
<!-- <div class="boloicon">订单汇总</div>-->
|
||||
<!-- <div class="input-hui">-->
|
||||
<!-- <div>类型</div>-->
|
||||
<!-- <div>金额</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>油品订单(订单)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.oilOrder }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>油品订单(退款)</div>-->
|
||||
<!-- <div>¥-{{ handoverList.orderSummary.oilRefund }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>油品订单(实收)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.oilPaid }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>油品优惠(实收)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.oilDiacount }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!--<!– <div class="input-box">–>-->
|
||||
<!--<!– <div>抹零总额(实收)</div>–>-->
|
||||
<!--<!– <div>¥2164.55</div>–>-->
|
||||
<!--<!– </div>–>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>油品交易(实收)????</div>-->
|
||||
<!-- <div>¥2164.55</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-divider></el-divider>-->
|
||||
<!--<!– 六个一条线 –>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>会员储值(订单)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.cardOrder }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>会员储值(退款)</div>-->
|
||||
<!-- <div>¥-{{ handoverList.orderSummary.cardRefund }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>会员储值(实收)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.cardPaid }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>储值赠送(订单)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.cardGiftOrder }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>储值赠送(退款)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.cardGiftRefund }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>储值赠送(实际)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.cardGiftPaid }}</div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <el-divider></el-divider>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>存油储值(订单)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.fuelOrder }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>存油储值(退款)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.fuelRefund }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>存油储值(实收)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.fuelPaid }}</div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <el-divider></el-divider>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>普通收款(订单)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.goodsOrder }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>普通收款(退款)</div>-->
|
||||
<!-- <div>¥-{{ handoverList.orderSummary.goodsRefund }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>普通收款(实收)</div>-->
|
||||
<!-- <div>¥{{ handoverList.orderSummary.goodsPaid }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="box-ge">
|
||||
<div class="boloicon">退款汇总</div>
|
||||
<div class="input-hui">
|
||||
<div>支付方式</div>
|
||||
<div>退款金额</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-ge">
|
||||
<div class="boloicon">实收汇总</div>
|
||||
<div class="input-hui">
|
||||
<div>支付方式</div>
|
||||
<div>金额</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>现金</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>储值卡</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>加油金</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>银行转1</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-ge">
|
||||
<div class="boloicon">油品订单</div>
|
||||
<div class="input-hui">
|
||||
<div>支付方式</div>
|
||||
<div>金额</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>现金</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>储值卡</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>加油金</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>银行转1</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥2164.55</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-ge">
|
||||
<div class="boloicon">商品订单</div>
|
||||
<div class="input-hui">
|
||||
<div>支付方式</div>
|
||||
<div>金额</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥0.00</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-ge">
|
||||
<div class="boloicon">普通订单</div>
|
||||
<div class="input-hui">
|
||||
<div>支付方式</div>
|
||||
<div>金额</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥0.00</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-ge">
|
||||
<div class="boloicon">会员储值</div>
|
||||
<div class="input-hui">
|
||||
<div>支付方式</div>
|
||||
<div>金额</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>现金</div>
|
||||
<div>¥888.88</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥888.88</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-ge">
|
||||
<div class="boloicon">油号统计</div>
|
||||
<div class="input-hui-frou">
|
||||
<div>油号</div>
|
||||
<div>笔数</div>
|
||||
<div>升数</div>
|
||||
<div style="text-align: right">金额</div>
|
||||
</div>
|
||||
<div class="input-box-frou">
|
||||
<div>92#</div>
|
||||
<div>9</div>
|
||||
<div>1447.03</div>
|
||||
<div style="text-align: right">¥888.88</div>
|
||||
</div>
|
||||
<div class="input-box-frou">
|
||||
<div>92#</div>
|
||||
<div>9</div>
|
||||
<div>1447.03</div>
|
||||
<div style="text-align: right">¥888.88</div>
|
||||
</div>
|
||||
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥888.88</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-ge">
|
||||
<div class="boloicon">优惠统计</div>
|
||||
<div class="input-hui">
|
||||
<div>油品</div>
|
||||
<div>金额</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>92#</div>
|
||||
<div>¥888.88</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥888.88</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-ge">
|
||||
<div class="boloicon">油枪统计</div>
|
||||
<div class="input-hui-frou">
|
||||
<div>油号</div>
|
||||
<div>笔数</div>
|
||||
<div>升数</div>
|
||||
<div style="text-align: right">金额</div>
|
||||
</div>
|
||||
<div class="input-box-frou">
|
||||
<div>一号枪</div>
|
||||
<div>9</div>
|
||||
<div>1447.03</div>
|
||||
<div style="text-align: right">¥888.88</div>
|
||||
</div>
|
||||
<div class="input-box-frou">
|
||||
<div>二号枪</div>
|
||||
<div>9</div>
|
||||
<div>1447.03</div>
|
||||
<div style="text-align: right">¥888.88</div>
|
||||
</div>
|
||||
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥888.88</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-ge">
|
||||
<div class="boloicon">员工统计</div>
|
||||
<div class="input-hui-frou">
|
||||
<div>员工姓名</div>
|
||||
<div>笔数</div>
|
||||
|
||||
<div style="text-align: right">金额</div>
|
||||
</div>
|
||||
<div class="input-box-frou">
|
||||
<div>一号员工</div>
|
||||
<div>9</div>
|
||||
|
||||
<div style="text-align: right">¥888.88</div>
|
||||
</div>
|
||||
<div class="input-box-frou">
|
||||
<div>二号员工</div>
|
||||
<div>9</div>
|
||||
|
||||
<div style="text-align: right">¥888.88</div>
|
||||
</div>
|
||||
|
||||
<el-divider></el-divider>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥888.88</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="width: 100%; height: 100px"></div>
|
||||
<!-- <div class="app-bottom">-->
|
||||
<!-- <el-card >-->
|
||||
<!-- <div class="bottom-xz">-->
|
||||
<!-- <div class="anniu" @click="shift">交班</div>-->
|
||||
<!-- <div class="anniu-lv">云打印</div>-->
|
||||
<!-- <div class="anniu-lv">本地打印</div>-->
|
||||
<!-- <div ><el-link type="primary" @click="recording">交班记录</el-link></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addHandoverApi, getHandoverApi} from "@/api/cashier/handover";
|
||||
|
||||
export default {
|
||||
name: "HandoverOnly",
|
||||
props: {
|
||||
recordData:''
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
handoverList : {},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log("12312231",this.recordData)
|
||||
this.handoverList = this.recordData
|
||||
// this.getHandover();
|
||||
},
|
||||
methods: {
|
||||
// getHandover() {
|
||||
// getHandoverApi().then(res=>{
|
||||
// this.handoverList = res.data;
|
||||
// console.log("this.handoverList",this.handoverList)
|
||||
// })
|
||||
// },
|
||||
|
||||
// 交班记录
|
||||
recording() {
|
||||
this.$router.push({
|
||||
path:'/HandoverDetails',
|
||||
query:{
|
||||
id:9
|
||||
}
|
||||
});
|
||||
},
|
||||
shift() {
|
||||
this.$confirm('交班并退出系统, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let recordData = this.handoverList
|
||||
let handoverRecord = {
|
||||
startTime:this.handoverList.baseInfo.endTime,
|
||||
recordData:JSON.stringify(recordData),
|
||||
type:0,
|
||||
status:0,
|
||||
}
|
||||
addHandoverApi(handoverRecord).then(res=>{
|
||||
|
||||
console.log("")
|
||||
})
|
||||
//
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: '删除成功!'
|
||||
// });
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消交班'
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.app-center{
|
||||
width: 100%;
|
||||
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-center{
|
||||
width: 508px;
|
||||
height: 85vh;
|
||||
background-color: white;
|
||||
margin: 10px auto;
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #ececec ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #f7f7f7;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #f7f7f7;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.boloicon{
|
||||
font-weight: bold;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
.app-bottom{
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
height: 100px;
|
||||
width: 90%;
|
||||
}
|
||||
.bottom-xz{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.anniu{
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #00afff;
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
border-radius: 50px;
|
||||
margin: 0px 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.anniu-lv{
|
||||
background: #1ab394;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
border-radius: 50px;
|
||||
margin: 0px 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
@ -54,31 +54,162 @@
|
||||
<div class="hj-box" style="justify-content: flex-end">合计: ¥{{ oilAmount + goodsAmount }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj">
|
||||
<div>满减活动</div>
|
||||
<div>-¥{{ oilDiscount + goodsDiscount }}</div>
|
||||
<div>
|
||||
<el-popover
|
||||
placement="bottom-start"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<div>
|
||||
<el-checkbox-group v-model="checkedCities1" @change="handleCheckedCitiesChange1">
|
||||
<el-checkbox v-for="city in cities1" :label="city" :key="city">
|
||||
<div style="display: flex;justify-content: space-between;height: 40px;line-height: 40px;">
|
||||
<div style="width: 200px">{{city}}</div>
|
||||
<div style="line-height: 20px;width:150px;font-size: 12px;text-align: right">
|
||||
<div style="color: red">-¥1.56</div>
|
||||
<div style="color: grey">满100元每升优惠0.2元</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div slot="reference">
|
||||
<el-checkbox :indeterminate="isIndeterminate1"
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll1" @change="handleCheckAllChange1">
|
||||
</el-checkbox>
|
||||
满减活动
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div>-¥{{ fullReduction + goodsDiscount }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember">
|
||||
<div>充值优惠</div>
|
||||
<div>-¥0</div>
|
||||
<div>
|
||||
<el-popover
|
||||
placement="bottom-start"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<div>
|
||||
<el-checkbox-group v-model="checkedCities2" @change="handleCheckedCitiesChange2">
|
||||
<el-checkbox v-for="(item,index) in gradeDiscount" :label="item.type" :key="index">
|
||||
<div style="display: flex;justify-content: space-between;height: 40px;line-height: 40px;">
|
||||
<div style="width: 200px">{{item.type}}</div>
|
||||
<div style="line-height: 20px;width:150px;font-size: 12px;text-align: right">
|
||||
<div style="color: red">-¥{{ oilDiscount }}</div>
|
||||
<div v-if="item.type=='满减优惠'" style="color: grey">消费满{{ item.full }}元,立减{{ item.reduce }}元</div>
|
||||
<div v-else style="color: grey">消费满{{ item.full }}元,每升优惠{{ item.reduce }}元</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div slot="reference">
|
||||
<el-checkbox :indeterminate="isIndeterminate2"
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll2" @change="handleCheckAllChange2">
|
||||
</el-checkbox>
|
||||
等级优惠
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div>-¥{{ oilDiscount + goodsDiscount }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember && refuelMoney!=null">
|
||||
<div>
|
||||
囤油卡
|
||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney" :key="index">
|
||||
({{ item.type }}卡
|
||||
<span style="color: #00afff">{{ item.oilType }}</span>
|
||||
余额:{{ item.refuelMoney }}L)
|
||||
</div>
|
||||
<el-popover
|
||||
placement="bottom-start"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<div>
|
||||
<el-checkbox-group v-model="checkedCities3" @change="handleCheckedCitiesChange3">
|
||||
<el-checkbox v-for="city in cities3" :label="city" :key="city">
|
||||
<div style="display: flex;justify-content: space-between;height: 40px;line-height: 40px;">
|
||||
<div style="width: 200px">{{city}}</div>
|
||||
<div style="line-height: 20px;width:150px;font-size: 12px;text-align: right">
|
||||
<div style="color: red">-¥1.56</div>
|
||||
<div style="color: grey">满100元每升优惠0.2元</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div slot="reference">
|
||||
<el-checkbox :indeterminate="isIndeterminate3"
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll3" @change="handleCheckAllChange3">
|
||||
</el-checkbox>
|
||||
囤油卡
|
||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney" :key="index">
|
||||
({{ item.type }}卡
|
||||
<span style="color: #00afff">{{ item.oilType }}</span>
|
||||
余额:{{ item.refuelMoney }}L)
|
||||
</div>
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div>- {{ consumeRefuelMoney }}L</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember">
|
||||
<div>
|
||||
储值卡
|
||||
<span>(账户余额:{{ balance }}元)</span>
|
||||
<el-popover
|
||||
placement="bottom-start"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<div>
|
||||
<el-checkbox-group v-model="checkedCities4" @change="handleCheckedCitiesChange4">
|
||||
<el-checkbox v-for="city in cities4" :label="city" :key="city">
|
||||
<div style="display: flex;justify-content: space-between;height: 40px;line-height: 40px;">
|
||||
<div style="width: 200px">{{city}}</div>
|
||||
<div style="line-height: 20px;width:150px;font-size: 12px;text-align: right">
|
||||
<div style="color: red">-¥1.56</div>
|
||||
<div style="color: grey">满100元每升优惠0.2元</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div slot="reference">
|
||||
<el-checkbox :indeterminate="isIndeterminate4"
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll4" @change="handleCheckAllChange4">
|
||||
</el-checkbox>
|
||||
储值卡
|
||||
<span>(账户余额:{{ balance }}元)</span>
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div>-¥{{ consumeAmount }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember">
|
||||
<div>
|
||||
<el-popover
|
||||
placement="bottom-start"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<div>
|
||||
<el-checkbox-group v-model="checkedCities5" @change="handleCheckedCitiesChange5">
|
||||
<el-checkbox v-for="city in cities5" :label="city" :key="city">
|
||||
<div style="display: flex;justify-content: space-between;height: 40px;line-height: 40px;">
|
||||
<div style="width: 200px">{{city}}</div>
|
||||
<div style="line-height: 20px;width:150px;font-size: 12px;text-align: right">
|
||||
<div style="color: red">-¥1.56</div>
|
||||
<div style="color: grey">满100元每升优惠0.2元</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div slot="reference">
|
||||
<el-checkbox :indeterminate="isIndeterminate5"
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll5" @change="handleCheckAllChange5">
|
||||
</el-checkbox>
|
||||
优惠券
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div>-¥{{ couponAmount }}</div>
|
||||
</div>
|
||||
<div class="center-left-th">
|
||||
<div class="th-box">
|
||||
<div>扫码支付</div>
|
||||
@ -86,7 +217,7 @@
|
||||
</div>
|
||||
<div class="th-box">
|
||||
<div>找零</div>
|
||||
<div class="bule">0</div>
|
||||
<div class="bule">{{ seekZero }}</div>
|
||||
</div>
|
||||
<div class="th-box">
|
||||
<div @click="dialogVisible = true">加油员</div>
|
||||
@ -129,6 +260,18 @@
|
||||
<div class="center-top-data">
|
||||
<div class="center-top-of">
|
||||
<div class="wrap-wrap">
|
||||
<div class="of-box" v-for="(item,index) in gunList" :key="index"
|
||||
:style="{'background-color': colorList[index%5].color}"
|
||||
@click="refuel(item)">
|
||||
<!-- <div>{{ getName(oilNameList,item.oilName) }}</div>-->
|
||||
<div>{{ item.oilNumber }}</div>
|
||||
|
||||
<div class="of-title" >{{item.gunName}}</div>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">
|
||||
<span style="font-size: 12px">{{ item.tankName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="of-box" v-for="(item,index) in oilNumGunList" :key="index"-->
|
||||
<!-- :style="{'background-color': colorList[index%5].color}"-->
|
||||
<!-- @click="refuel(item.id)">-->
|
||||
@ -139,16 +282,6 @@
|
||||
<!-- <img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="of-box" v-for="(item,index) in oilNumGunList" :key="index"
|
||||
:style="{'background-color': colorList[index%5].color}"
|
||||
@click="refuel(item.id)">
|
||||
<div>{{ getName(oilNameList,item.oilName) }}</div>
|
||||
|
||||
<div class="of-title" >{{item.oilGunNum}}号枪</div>
|
||||
<div>
|
||||
<img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -359,18 +492,19 @@
|
||||
<div style="text-align: center;margin-bottom: 10px">
|
||||
合计金额:{{ oilAmount + goodsAmount }}元、优惠合计{{ oilDiscount + goodsDiscount }}元
|
||||
</div>
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
autofocus="autofocus"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32"><path d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z" fill="#3D3D3D" p-id="1480"></path></svg>
|
||||
</i>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="demo-image">
|
||||
<div v-if="map.payType != 'CASH'">
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
autofocus="autofocus"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32"><path d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z" fill="#3D3D3D" p-id="1480"></path></svg>
|
||||
</i>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="demo-image"></div>
|
||||
<div class="block" style="text-align: center">
|
||||
<el-image
|
||||
style="width: 200px; height: 200px"
|
||||
@ -378,6 +512,20 @@
|
||||
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
autofocus="autofocus"
|
||||
@input="changeSeekZero"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="请输入收款金额">
|
||||
</el-input>
|
||||
</div>
|
||||
<div style="text-align: right;margin: 10px 0">
|
||||
<span>应找零</span>
|
||||
<span style="color: red;font-size: 18px"> ¥{{ seekZero }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: space-around">
|
||||
<el-button @click="dialogVisiblej = false" class="but">取 消</el-button>
|
||||
@ -430,7 +578,7 @@
|
||||
<el-descriptions-item label="会员备注">{{member.remark ? member.remark : "--"}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="会员等级">
|
||||
<el-descriptions-item label="等级名称">{{member.gradeId ? member.gradeId : "--"}}</el-descriptions-item>
|
||||
<el-descriptions-item label="等级名称">{{member.gradeId ? getGradeName(gradeList,member.gradeId) : "--"}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="储值余额">
|
||||
<template slot="extra">
|
||||
@ -442,7 +590,7 @@
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisiblevip = false">取 消</el-button>
|
||||
<el-button type="primary" @click="chooseUser(member)">确 定</el-button>
|
||||
<el-button type="primary" :disabled="isSure" @click="chooseUser(member)">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
@ -458,7 +606,7 @@
|
||||
</div>
|
||||
<div class="amount">
|
||||
<span>已选油枪</span>
|
||||
<span class="amountBlue">{{ form.oilGunNum }}号枪</span>
|
||||
<span class="amountBlue">{{ form.gunName }}</span>
|
||||
</div>
|
||||
<div class="amount">
|
||||
<span>油品单价</span>
|
||||
@ -527,26 +675,58 @@
|
||||
import {getUserVoMobile, getUserVoName} from "@/api/cashier/user";
|
||||
import {queryStaffs, staffInfo} from "@/api/cashier/staff";
|
||||
import {addLJGoods, goodsOrder, oilOrder} from "@/api/cashier/oilorder";
|
||||
import {getUserGrade} from "@/api/cashier/usergrade";
|
||||
import {getGunApi} from "@/api/cashier/oilGuns";
|
||||
import {getUserGrade, listUserGrade} from "@/api/cashier/usergrade";
|
||||
import {getOilGun} from "@/api/cashier/oilGuns";
|
||||
import {listCardFavorableRecord} from "@/api/cashier/cardfavorablerecord";
|
||||
import {getOilNumberById} from "@/api/cashier/oilnumber";
|
||||
|
||||
const cityOptions = ['上海', '北京'];
|
||||
export default {
|
||||
name: "homeindex",
|
||||
data(){
|
||||
return{
|
||||
// 满减全选
|
||||
checkAll1: false,
|
||||
isIndeterminate1: true,
|
||||
checkedCities1: ['上海'],
|
||||
cities1: cityOptions,
|
||||
// 等级全选
|
||||
checkAll2: false,
|
||||
isIndeterminate2: true,
|
||||
checkedCities2: [],
|
||||
cities2: cityOptions,
|
||||
gradeDiscount: [],
|
||||
// 囤油卡全选
|
||||
checkAll3: false,
|
||||
isIndeterminate3: true,
|
||||
checkedCities3: ['上海'],
|
||||
cities3: cityOptions,
|
||||
// 储值卡全选
|
||||
checkAll4: false,
|
||||
isIndeterminate4: true,
|
||||
checkedCities4: ['上海'],
|
||||
cities4: cityOptions,
|
||||
// 优惠券全选
|
||||
checkAll5: false,
|
||||
isIndeterminate5: true,
|
||||
checkedCities5: ['上海'],
|
||||
cities5: cityOptions,
|
||||
// 优惠券列表
|
||||
couponList:[],
|
||||
// 消费升数
|
||||
consumeRefuelMoney:0,
|
||||
// 满减优惠
|
||||
fullReduction:0,
|
||||
// 囤油卡信息
|
||||
refuelMoney:null,
|
||||
// 会员消费金额(储值卡需要减少的金额)
|
||||
consumeAmount:0,
|
||||
// 账户余额
|
||||
balance:0,
|
||||
// 绑定数据
|
||||
// 绑定金额数据
|
||||
amount:0,
|
||||
// 找零金额
|
||||
seekZero:0,
|
||||
// 等待中
|
||||
loading:false,
|
||||
// 油品类型
|
||||
@ -591,7 +771,7 @@
|
||||
// 会员列表信息
|
||||
memberList:[],
|
||||
select1:'会员手机号',
|
||||
// 会员信息
|
||||
// 查询会员信息参数
|
||||
userNo:"",
|
||||
// 查询的商品信息
|
||||
goods:"",
|
||||
@ -653,7 +833,7 @@
|
||||
// 商品订单
|
||||
goodsOrder:"",
|
||||
// 支付方式
|
||||
payType:"WECHAT",
|
||||
payType:"CASH",
|
||||
// 油品订单金额
|
||||
oilAmount:0,
|
||||
// 商品订单金额
|
||||
@ -688,16 +868,29 @@
|
||||
consumeAmount:0,
|
||||
// 消费后的升数json
|
||||
refuelMoney:"",
|
||||
// 找零金额
|
||||
seekZero:0,
|
||||
},
|
||||
// 会员等级名称
|
||||
gradeName:"",
|
||||
// 会员等级列表
|
||||
gradeList:"",
|
||||
menu:1,
|
||||
index:0,
|
||||
// 是否支付
|
||||
isPay:true,
|
||||
isPaySuccess:false,
|
||||
// 订单号
|
||||
orderNo:'',
|
||||
timer: null,
|
||||
// 是否一直查询
|
||||
isQuery:true,
|
||||
// 油枪列表
|
||||
gunList:[],
|
||||
// 是否可以点会员确定按钮
|
||||
isSure:true,
|
||||
// 优惠券消费金额
|
||||
couponAmount:0,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -710,6 +903,71 @@
|
||||
this.getCouponList();
|
||||
},
|
||||
methods:{
|
||||
// 计算找零金额
|
||||
changeSeekZero(){
|
||||
this.seekZero = this.authCode - this.oilActualPay - this.goodsActualPay
|
||||
},
|
||||
// 获取会员等级id
|
||||
getGradeName(list,id){
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
if (item.id == id){
|
||||
name = item.name
|
||||
}
|
||||
})
|
||||
this.gradeName = name;
|
||||
return name;
|
||||
},
|
||||
// 选择优惠信息
|
||||
handleCheckAllChange1(val) {
|
||||
this.checkedCities1 = val ? cityOptions : [];
|
||||
this.isIndeterminate1 = false;
|
||||
},
|
||||
handleCheckedCitiesChange1(value) {
|
||||
let checkedCount = value.length;
|
||||
this.checkAll1 = checkedCount === this.cities1.length;
|
||||
this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.cities1.length;
|
||||
},
|
||||
handleCheckAllChange2(val) {
|
||||
let list = []
|
||||
this.gradeDiscount.forEach(item => {
|
||||
list.push(item.type)
|
||||
})
|
||||
this.checkedCities2 = val ? list : [];
|
||||
this.isIndeterminate2 = false;
|
||||
},
|
||||
handleCheckedCitiesChange2(value) {
|
||||
let checkedCount = value.length;
|
||||
this.checkAll2 = checkedCount === this.gradeDiscount.length;
|
||||
this.isIndeterminate2 = checkedCount > 0 && checkedCount < this.gradeDiscount.length;
|
||||
},
|
||||
handleCheckAllChange3(val) {
|
||||
this.checkedCities3 = val ? cityOptions : [];
|
||||
this.isIndeterminate3 = false;
|
||||
},
|
||||
handleCheckedCitiesChange3(value) {
|
||||
let checkedCount = value.length;
|
||||
this.checkAll3 = checkedCount === this.cities3.length;
|
||||
this.isIndeterminate3 = checkedCount > 0 && checkedCount < this.cities3.length;
|
||||
},
|
||||
handleCheckAllChange4(val) {
|
||||
this.checkedCities4 = val ? cityOptions : [];
|
||||
this.isIndeterminate4 = false;
|
||||
},
|
||||
handleCheckedCitiesChange4(value) {
|
||||
let checkedCount = value.length;
|
||||
this.checkAll4 = checkedCount === this.cities4.length;
|
||||
this.isIndeterminate4 = checkedCount > 0 && checkedCount < this.cities4.length;
|
||||
},
|
||||
handleCheckAllChange5(val) {
|
||||
this.checkedCities5 = val ? cityOptions : [];
|
||||
this.isIndeterminate5 = false;
|
||||
},
|
||||
handleCheckedCitiesChange5(value) {
|
||||
let checkedCount = value.length;
|
||||
this.checkAll5 = checkedCount === this.cities5.length;
|
||||
this.isIndeterminate5 = checkedCount > 0 && checkedCount < this.cities5.length;
|
||||
},
|
||||
// 模糊查询商品信息
|
||||
querySearch(queryString, cb) {
|
||||
let _this = this;
|
||||
@ -778,14 +1036,16 @@
|
||||
this.oilDiscount = 0;
|
||||
this.goodsDiscount = 0;
|
||||
this.userNo = "";
|
||||
this.oilActualPay = this.oilAmount - this.oilDiscount
|
||||
this.oilActualPay = this.oilAmount - this.oilDiscount - this.couponAmount
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount
|
||||
this.isSure = true;
|
||||
this.handleChange();
|
||||
},
|
||||
// 获取会员等级信息
|
||||
getGrade(id){
|
||||
let _this = this;
|
||||
this.oilDiscount = 0;
|
||||
this.gradeDiscount = [];
|
||||
getUserGrade(id).then( response => {
|
||||
let gasolineDiscount = 0;
|
||||
let dieselDiscount = 0;
|
||||
@ -796,40 +1056,58 @@
|
||||
if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
if (response.data.gasolineDiscount=="满减优惠"){
|
||||
let oilDiscount = 0;
|
||||
let discount = {type:"满减优惠",full:0,reduce:0}
|
||||
for (let i = 1; i <= gasolineRule.length; i++){
|
||||
// 将满减条件加入等级优惠列表
|
||||
discount.full = gasolineRule[i-1].gasolineRule1
|
||||
if (gasolineRule.length>1){
|
||||
if (item.amount >= gasolineRule[gasolineRule.length-1].gasolineRule1){
|
||||
oilDiscount = (item.amount/gasolineRule[gasolineRule.length-1].gasolineRule1 *
|
||||
gasolineRule[gasolineRule.length-1].gasolineRule2).toFixed(2);
|
||||
discount.reduce = gasolineRule[i-1].gasolineRule2
|
||||
break;
|
||||
}
|
||||
if (item.amount >= gasolineRule[i-1].gasolineRule1 && item.amount < gasolineRule[i].gasolineRule1){
|
||||
oilDiscount = (item.amount/gasolineRule[i-1].gasolineRule1 * gasolineRule[i-1].gasolineRule2).toFixed(2)
|
||||
discount.reduce = gasolineRule[i-1].gasolineRule2
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= gasolineRule[i-1].gasolineRule1){
|
||||
oilDiscount = (item.amount/gasolineRule[i-1].gasolineRule1 * gasolineRule[i-1].gasolineRule2).toFixed(2);
|
||||
discount.reduce = gasolineRule[i-1].gasolineRule2
|
||||
}
|
||||
}
|
||||
}
|
||||
if (discount.reduce!=0){
|
||||
_this.gradeDiscount.push(discount)
|
||||
}
|
||||
gasolineDiscount += +oilDiscount
|
||||
}else if (response.data.gasolineDiscount=="每升优惠"){
|
||||
let discount = {type:"每升优惠",full:0,reduce:0}
|
||||
let oilDiscount = 0;
|
||||
for (let i = 1; i <= gasolineRule.length; i++){
|
||||
// 将满减条件加入等级优惠列表
|
||||
discount.full = gasolineRule[i-1].gasolineRule1
|
||||
if (gasolineRule.length>1){
|
||||
if (item.amount >= gasolineRule[gasolineRule.length-1].gasolineRule1){
|
||||
oilDiscount = (item.liters * gasolineRule[gasolineRule.length-1].gasolineRule3).toFixed(2);
|
||||
discount.reduce = gasolineRule[i-1].gasolineRule3
|
||||
break;
|
||||
}
|
||||
if (item.amount >= gasolineRule[i-1].gasolineRule1 && item.amount < gasolineRule[i].gasolineRule1){
|
||||
oilDiscount = (item.liters * gasolineRule[i-1].gasolineRule3).toFixed(2)
|
||||
discount.reduce = gasolineRule[i-1].gasolineRule3
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= gasolineRule[i-1].gasolineRule1){
|
||||
oilDiscount = (item.liters * gasolineRule[i-1].gasolineRule3).toFixed(2)
|
||||
discount.reduce = gasolineRule[i-1].gasolineRule3
|
||||
}
|
||||
}
|
||||
}
|
||||
if (discount.reduce!=0){
|
||||
_this.gradeDiscount.push(discount)
|
||||
}
|
||||
gasolineDiscount += +oilDiscount
|
||||
}else {
|
||||
gasolineDiscount = 0;
|
||||
@ -841,40 +1119,60 @@
|
||||
if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
if (response.data.dieselDiscount=="满减优惠"){
|
||||
let oilDiscount = 0;
|
||||
let discount = {type:"满减优惠",full:0,reduce:0}
|
||||
for (let i = 1; i <= dieselRule.length; i++){
|
||||
// 将满减条件加入等级优惠列表
|
||||
discount.full = dieselRule[i-1].dieselRule1
|
||||
if (dieselRule.length>1){
|
||||
if (item.amount >= dieselRule[dieselRule.length-1].dieselRule1){
|
||||
oilDiscount = (item.amount/dieselRule[dieselRule.length-1].dieselRule1 *
|
||||
dieselRule[dieselRule.length-1].dieselRule2).toFixed(2);
|
||||
discount.reduce = dieselRule[i-1].dieselRule2
|
||||
break;
|
||||
}
|
||||
if (item.amount >= dieselRule[i-1].dieselRule1 && item.amount < dieselRule[i].dieselRule1){
|
||||
oilDiscount = (item.amount/dieselRule[i-1].dieselRule1 * dieselRule[i-1].dieselRule2).toFixed(2);
|
||||
discount.reduce = dieselRule[i-1].dieselRule2
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= dieselRule[i-1].dieselRule1){
|
||||
oilDiscount = (item.amount/dieselRule[i-1].dieselRule1 * dieselRule[i-1].dieselRule2).toFixed(2);
|
||||
discount.reduce = dieselRule[i-1].dieselRule2
|
||||
}
|
||||
}
|
||||
}
|
||||
if (discount.reduce!=0){
|
||||
_this.gradeDiscount.push(discount)
|
||||
_this.checkedCities2 = ['满减优惠']
|
||||
}
|
||||
dieselDiscount += +oilDiscount
|
||||
}else if (response.data.dieselDiscount=="每升优惠"){
|
||||
let oilDiscount = 0;
|
||||
let discount = {type:"每升优惠",full:0,reduce:0}
|
||||
for (let i = 1; i <= dieselRule.length; i++){
|
||||
// 将满减条件加入等级优惠列表
|
||||
discount.full = dieselRule[i-1].dieselRule1
|
||||
_this.gradeDiscount.push(discount)
|
||||
if (dieselRule.length>1){
|
||||
if (item.amount >= dieselRule[dieselRule.length-1].dieselRule1){
|
||||
oilDiscount = (item.liters * dieselRule[gasolineRule.length-1].dieselRule3).toFixed(2);
|
||||
discount.reduce = dieselRule[i-1].dieselRule3
|
||||
break;
|
||||
}
|
||||
if (item.amount >= dieselRule[i-1].dieselRule1 && item.amount < dieselRule[i].dieselRule1){
|
||||
oilDiscount = (item.liters * dieselRule[i-1].dieselRule3).toFixed(2)
|
||||
discount.reduce = dieselRule[i-1].dieselRule3
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= dieselRule[i-1].dieselRule1){
|
||||
oilDiscount = (item.liters * dieselRule[i-1].dieselRule3).toFixed(2)
|
||||
discount.reduce = dieselRule[i-1].dieselRule3
|
||||
}
|
||||
}
|
||||
}
|
||||
if (discount.reduce!=0){
|
||||
_this.gradeDiscount.push(discount)
|
||||
}
|
||||
dieselDiscount += +oilDiscount
|
||||
}else {
|
||||
dieselDiscount = 0;
|
||||
@ -886,40 +1184,58 @@
|
||||
if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
if (response.data.naturalGasDiscount=="满减优惠"){
|
||||
let oilDiscount = 0;
|
||||
let discount = {type:"满减优惠",full:0,reduce:0}
|
||||
for (let i = 1; i <= naturalGasRule.length; i++){
|
||||
// 将满减条件加入等级优惠列表
|
||||
discount.full = naturalGasRule[i-1].naturalGasRule1
|
||||
if (naturalGasRule.length>1){
|
||||
if (item.amount >= naturalGasRule[naturalGasRule.length-1].naturalGasRule1){
|
||||
oilDiscount = (item.amount/naturalGasRule[naturalGasRule.length-1].naturalGasRule1 *
|
||||
naturalGasRule[naturalGasRule.length-1].naturalGasRule2).toFixed(2);
|
||||
discount.reduce = naturalGasRule[i-1].naturalGasRule2
|
||||
break;
|
||||
}
|
||||
if (item.amount >= naturalGasRule[i-1].naturalGasRule1 && item.amount < naturalGasRule[i].naturalGasRule1){
|
||||
oilDiscount = (item.amount/naturalGasRule[i-1].naturalGasRule1 * naturalGasRule[i-1].naturalGasRule2).toFixed(2);
|
||||
discount.reduce = naturalGasRule[i-1].naturalGasRule2
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= naturalGasRule[i-1].naturalGasRule1){
|
||||
oilDiscount = (item.amount/naturalGasRule[i-1].naturalGasRule1 * naturalGasRule[i-1].naturalGasRule2).toFixed(2);
|
||||
discount.reduce = naturalGasRule[i-1].naturalGasRule2
|
||||
}
|
||||
}
|
||||
}
|
||||
if (discount.reduce!=0){
|
||||
_this.gradeDiscount.push(discount)
|
||||
}
|
||||
naturalGasDiscount += +oilDiscount
|
||||
}else if (response.data.naturalGasDiscount=="每单位优惠"){
|
||||
let oilDiscount = 0;
|
||||
let discount = {type:"每单位优惠",full:0,reduce:0}
|
||||
for (let i = 1; i <= naturalGasRule.length; i++){
|
||||
// 将满减条件加入等级优惠列表
|
||||
discount.full = naturalGasRule[i-1].naturalGasRule1
|
||||
if (naturalGasRule.length>1){
|
||||
if (item.amount >= naturalGasRule[naturalGasRule.length-1].naturalGasRule1){
|
||||
oilDiscount = (item.liters * naturalGasRule[gasolineRule.length-1].naturalGasRule3).toFixed(2)
|
||||
discount.reduce = naturalGasRule[i-1].naturalGasRule3
|
||||
break;
|
||||
}
|
||||
if (item.amount >= naturalGasRule[i-1].naturalGasRule1 && item.amount < naturalGasRule[i].naturalGasRule1){
|
||||
oilDiscount = (item.liters * naturalGasRule[i-1].naturalGasRule3).toFixed(2)
|
||||
discount.reduce = naturalGasRule[i-1].naturalGasRule3
|
||||
}
|
||||
}else {
|
||||
if (item.amount >= naturalGasRule[i-1].naturalGasRule1){
|
||||
oilDiscount = (item.liters * naturalGasRule[i-1].naturalGasRule3).toFixed(2)
|
||||
discount.reduce = naturalGasRule[i-1].naturalGasRule3
|
||||
}
|
||||
}
|
||||
}
|
||||
if (discount.reduce!=0){
|
||||
_this.gradeDiscount.push(discount)
|
||||
}
|
||||
naturalGasDiscount += +oilDiscount
|
||||
}else {
|
||||
naturalGasDiscount = 0;
|
||||
@ -927,143 +1243,15 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
// if (_this.oilType == "汽油"){
|
||||
// let gasolineRule = JSON.parse(response.data.gasolineRule);
|
||||
// if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
// _this.oilOrder.forEach(item => {
|
||||
// if (response.data.gasolineDiscount=="满减优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < gasolineRule.length; i++){
|
||||
// if (gasolineRule.length>1){
|
||||
// if (item.amount >= gasolineRule[i].gasolineRule1 && item.amount < gasolineRule[i+1].gasolineRule1){
|
||||
// oilDiscount = item.amount/gasolineRule[i].gasolineRule1 * gasolineRule[i].gasolineRule2
|
||||
// }
|
||||
// if (item.amount >= gasolineRule[gasolineRule.length-1].gasolineRule1){
|
||||
// oilDiscount = item.amount/gasolineRule[gasolineRule.length-1].gasolineRule1 * gasolineRule[gasolineRule.length-1].gasolineRule2
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= gasolineRule[i].gasolineRule1){
|
||||
// oilDiscount = item.amount/gasolineRule[i].gasolineRule1 * gasolineRule[i].gasolineRule2
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// gasolineDiscount += oilDiscount
|
||||
// }else if (response.data.gasolineDiscount=="每升优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < gasolineRule.length; i++){
|
||||
// if (gasolineRule.length>1){
|
||||
// if (item.amount >= gasolineRule[i].gasolineRule1 && item.amount < gasolineRule[i+1].gasolineRule1){
|
||||
// oilDiscount = item.liters * gasolineRule[i].gasolineRule3
|
||||
// }
|
||||
// if (item.amount >= gasolineRule[gasolineRule.length-1].gasolineRule1){
|
||||
// oilDiscount = item.liters * gasolineRule[i].gasolineRule3
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= gasolineRule[i].gasolineRule1){
|
||||
// oilDiscount = item.liters * gasolineRule[i].gasolineRule3
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// gasolineDiscount += oilDiscount
|
||||
// }else {
|
||||
// gasolineDiscount = 0;
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// if (_this.oilType == "柴油"){
|
||||
// let dieselRule = JSON.parse(response.data.dieselRule);
|
||||
// if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
// _this.oilOrder.forEach(item => {
|
||||
// if (response.data.dieselDiscount=="满减优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < dieselRule.length; i++){
|
||||
// if (dieselRule.length>1){
|
||||
// if (item.amount >= dieselRule[i].dieselRule1 && item.amount < dieselRule[i+1].dieselRule1){
|
||||
// oilDiscount = item.amount/dieselRule[i].dieselRule1 * dieselRule[i].dieselRule2
|
||||
// }
|
||||
// if (item.amount >= dieselRule[dieselRule.length-1].dieselRule1){
|
||||
// oilDiscount = item.amount/dieselRule[dieselRule.length-1].dieselRule1 * dieselRule[dieselRule.length-1].dieselRule2
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= dieselRule[i].dieselRule1){
|
||||
// oilDiscount = item.amount/dieselRule[i].dieselRule1 * dieselRule[i].dieselRule2
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// dieselDiscount += oilDiscount
|
||||
// }else if (response.data.dieselDiscount=="每升优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < dieselRule.length; i++){
|
||||
// if (dieselRule.length>1){
|
||||
// if (item.amount >= dieselRule[i].dieselRule1 && item.amount < dieselRule[i+1].dieselRule1){
|
||||
// oilDiscount = item.liters * dieselRule[i].dieselRule3
|
||||
// }
|
||||
// if (item.amount >= dieselRule[dieselRule.length-1].dieselRule1){
|
||||
// oilDiscount = item.liters * dieselRule[i].dieselRule3
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= dieselRule[i].dieselRule1){
|
||||
// oilDiscount = item.liters * dieselRule[i].dieselRule3
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// dieselDiscount += oilDiscount
|
||||
// }else {
|
||||
// dieselDiscount = 0;
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// if (_this.oilType == "天然气"){
|
||||
// let naturalGasRule = JSON.parse(response.data.naturalGasRule);
|
||||
// if (response.data.preferential == '自定义优惠' && response.data.status == 'qy'){
|
||||
// _this.oilOrder.forEach(item => {
|
||||
// if (response.data.naturalGasDiscount=="满减优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < naturalGasRule.length; i++){
|
||||
// if (naturalGasRule.length>1){
|
||||
// if (item.amount >= naturalGasRule[i].naturalGasRule1 && item.amount < naturalGasRule[i+1].naturalGasRule1){
|
||||
// oilDiscount = item.amount/naturalGasRule[i].naturalGasRule1 * naturalGasRule[i].naturalGasRule2
|
||||
// }
|
||||
// if (item.amount >= naturalGasRule[naturalGasRule.length-1].naturalGasRule1){
|
||||
// oilDiscount = item.amount/naturalGasRule[naturalGasRule.length-1].naturalGasRule1 * naturalGasRule[naturalGasRule.length-1].naturalGasRule2
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= naturalGasRule[i].naturalGasRule1){
|
||||
// oilDiscount = item.amount/naturalGasRule[i].naturalGasRule1 * naturalGasRule[i].naturalGasRule2
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// naturalGasDiscount += oilDiscount
|
||||
// }else if (response.data.naturalGasDiscount=="每单位优惠"){
|
||||
// let oilDiscount = 0;
|
||||
// for (let i = 0; i < naturalGasRule.length; i++){
|
||||
// if (naturalGasRule.length>1){
|
||||
// if (item.amount >= naturalGasRule[i].naturalGasRule1 && item.amount < naturalGasRule[i+1].naturalGasRule1){
|
||||
// oilDiscount = item.liters * naturalGasRule[i].naturalGasRule3
|
||||
// }
|
||||
// if (item.amount >= naturalGasRule[naturalGasRule.length-1].naturalGasRule1){
|
||||
// oilDiscount = item.liters * naturalGasRule[i].naturalGasRule3
|
||||
// }
|
||||
// }else {
|
||||
// if (item.amount >= naturalGasRule[i].naturalGasRule1){
|
||||
// oilDiscount = item.liters * naturalGasRule[i].naturalGasRule3
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// naturalGasDiscount += oilDiscount
|
||||
// }else {
|
||||
// naturalGasDiscount = 0;
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
let oilActualPay = _this.oilActualPay;
|
||||
_this.oilDiscount = gasolineDiscount + dieselDiscount + naturalGasDiscount
|
||||
_this.oilActualPay = oilActualPay - _this.oilDiscount;
|
||||
// 储值卡余额
|
||||
// 如果总金额为0 则表示没有使用囤油卡
|
||||
if (oilActualPay == 0){
|
||||
oilActualPay = _this.oilAmount - _this.oilDiscount;
|
||||
}
|
||||
if (_this.balance>=(_this.oilAmount - _this.oilDiscount)){
|
||||
_this.consumeAmount = _this.oilAmount - _this.oilDiscount;
|
||||
_this.oilActualPay = 0;
|
||||
@ -1083,19 +1271,27 @@
|
||||
this.getGrade(data.gradeId)
|
||||
this.changeRefuelMoney();
|
||||
this.handleChange();
|
||||
this.queryCoupon(this.couponList,data.id);
|
||||
|
||||
},
|
||||
// 调用优惠参数接口
|
||||
preferential(){
|
||||
|
||||
},
|
||||
// 查询该会员是否可使用优惠券
|
||||
queryCoupon(list,id){
|
||||
let result = false;
|
||||
list.forEach(item => {
|
||||
if (item.mtUserId==id){
|
||||
|
||||
}
|
||||
})
|
||||
// let result = false;
|
||||
// list.forEach(item => {
|
||||
// if (item.mtUserId==id){
|
||||
// let startTime = item.startTime;
|
||||
// let endTime = item.endTime;
|
||||
// let date = new Date();
|
||||
// let sysDate = `${date.getFullYear()}-${date.getMonth() - 1}-${date.getDate()}`
|
||||
// }
|
||||
// })
|
||||
},
|
||||
// 选择会员信息
|
||||
handleChoose(data){
|
||||
this.isSure = false;
|
||||
this.member = data;
|
||||
this.refuelMoney = JSON.parse(data.refuelMoney)
|
||||
this.dialogVisibleMember = false;
|
||||
@ -1166,6 +1362,8 @@
|
||||
},
|
||||
// 立即结算
|
||||
settlement(){
|
||||
this.authCode = ""
|
||||
this.seekZero = 0;
|
||||
this.isPay = true
|
||||
this.dialogVisiblej = true
|
||||
},
|
||||
@ -1199,8 +1397,8 @@
|
||||
this.form.amount = this.form.oilPrice * this.form.amount
|
||||
}
|
||||
// 获取油号信息
|
||||
let name1 = this.getName(this.oilNameList,this.form.oilName);
|
||||
this.form.oilType = name1;
|
||||
// let name1 = this.getName(this.oilNameList,this.form.oilName);
|
||||
// this.form.oilType = name1;
|
||||
this.oilOrder.push(this.form)
|
||||
|
||||
if (this.select == "元"){
|
||||
@ -1228,6 +1426,7 @@
|
||||
this.changeRefuelMoney();
|
||||
}
|
||||
},
|
||||
// 囤油卡变化后总金额的变化
|
||||
changeRefuelMoney(){
|
||||
let _this = this;
|
||||
_this.consumeRefuelMoney = 0;
|
||||
@ -1331,17 +1530,26 @@
|
||||
})
|
||||
},
|
||||
// 加油金额
|
||||
refuel(id){
|
||||
refuel(data){
|
||||
this.select = "元";
|
||||
this.amount = 0
|
||||
this.dialogVisibleamount = true;
|
||||
getOilNumGunById(id).then( response => {
|
||||
getOilNumberById(data.numberId).then( response => {
|
||||
this.form = response.data;
|
||||
this.gunList.forEach(item => {
|
||||
if (item.id==data.id){
|
||||
this.form.gunName = item.gunName
|
||||
}
|
||||
})
|
||||
})
|
||||
// getOilNumGunById(id).then( response => {
|
||||
// this.form = response.data;
|
||||
// })
|
||||
},
|
||||
// 确定收款
|
||||
collection(){
|
||||
// JSON.parse()
|
||||
this.map.seekZero = this.seekZero;
|
||||
this.map.oilAmount = this.oilAmount;
|
||||
this.map.goodsAmount = this.goodsAmount;
|
||||
this.map.oilActualPay = this.oilActualPay;
|
||||
@ -1500,8 +1708,10 @@
|
||||
this.goodsActualPay = 0;
|
||||
this.goodsDiscount = 0;
|
||||
this.consumeAmount = 0;
|
||||
this.consumeRefuelMoney = 0;
|
||||
this.oilTotal = 0;
|
||||
this.goodsTotal = 0;
|
||||
this.isMember = false;
|
||||
}
|
||||
this.isPay = true;
|
||||
this.dialogVisiblej = false
|
||||
@ -1557,11 +1767,12 @@
|
||||
}
|
||||
})
|
||||
if (tab.label == "全部"){
|
||||
oilNum = "全部"
|
||||
oilNum = ""
|
||||
}
|
||||
getOilNumGun({oilNum : oilNum}).then( response => {
|
||||
this.oilNumGunList = response.data
|
||||
})
|
||||
this.getList(oilNum)
|
||||
// getOilNumGun({oilNum : oilNum}).then( response => {
|
||||
// this.oilNumGunList = response.data
|
||||
// })
|
||||
},
|
||||
gocomponents(index){
|
||||
this.leftindex = index
|
||||
@ -1571,12 +1782,18 @@
|
||||
listCardFavorableRecord().then(response => {
|
||||
this.couponList = response.data.records
|
||||
})
|
||||
let map = {
|
||||
page:1,
|
||||
pageSize:20,
|
||||
}
|
||||
listUserGrade(map).then(response => {
|
||||
this.gradeList = response.data.records
|
||||
})
|
||||
},
|
||||
// 获取列表信息
|
||||
getList(){
|
||||
getGunApi().then(response => {
|
||||
this.gunList = response.data;
|
||||
// console.log(this.gunList)
|
||||
// 获取油枪列表信息
|
||||
getList(numberId){
|
||||
getOilGun({numberId:numberId}).then(response => {
|
||||
this.gunList = response.data.records;
|
||||
})
|
||||
},
|
||||
},
|
||||
|
@ -203,7 +203,7 @@
|
||||
<!-- <Handover v-if="leftindex == 7"></Handover>-->
|
||||
<router-view/>
|
||||
|
||||
<div style="width: 100%;padding:200px " v-if="leftindex != 0 && leftindex != 1 && leftindex != 2 && leftindex != 3 && leftindex != 4 && leftindex != 5 && leftindex != 6 && leftindex != 7">
|
||||
<div style="width: 100%;padding:200px " v-if="leftindex != 0 && leftindex != 1 && leftindex != 2 && leftindex != 3 && leftindex != 4 && leftindex != 5 && leftindex != 6 && leftindex != 7 && leftindex != 9">
|
||||
<el-empty description="暂未开发"></el-empty>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user