This commit is contained in:
wangh 2024-02-07 11:07:07 +08:00
commit ad7f7356c7
20 changed files with 226 additions and 79 deletions

View File

@ -115,12 +115,12 @@
<el-table-column align="center" label="实付订单金额组成"> <el-table-column align="center" label="实付订单金额组成">
<el-table-column prop="oilOrderAmount" align="center" label="油品实付金额" width="100"> <el-table-column prop="oilOrderAmount" align="center" label="油品实付金额" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.oilOrderAmount ? scope.row.oilOrderAmount : '0'}}</span> <span>{{scope.row.oilPayAmount ? scope.row.oilPayAmount : '0'}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="goodsOrderAmount" align="center" label="商品实付金额" width="110"> <el-table-column prop="goodsOrderAmount" align="center" label="商品实付金额" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.goodsOrderAmount ? scope.row.goodsOrderAmount : '0'}}</span> <span>{{scope.row.goodsPayAmount ? scope.row.goodsPayAmount : '0'}}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -190,9 +190,11 @@
<el-descriptions-item label="油品优惠总额">{{ cashierOrder.oilDiscountAmount }}</el-descriptions-item> <el-descriptions-item label="油品优惠总额">{{ cashierOrder.oilDiscountAmount }}</el-descriptions-item>
<el-descriptions-item label="商品优惠总额">{{ cashierOrder.goodsDiscountAmount }}</el-descriptions-item> <el-descriptions-item label="商品优惠总额">{{ cashierOrder.goodsDiscountAmount }}</el-descriptions-item>
<el-descriptions-item label="实付金额">{{ cashierOrder.payAmount }}</el-descriptions-item> <el-descriptions-item label="实付金额">{{ cashierOrder.payAmount }}</el-descriptions-item>
<el-descriptions-item label="储值卡或囤油卡消费金额"> <el-descriptions-item label="储值卡付款金额">
<span v-if="cashierOrder.oilOrderAmount - cashierOrder.oilDiscountAmount - cashierOrder.payAmount>0 && cashierOrder.status=='paid' && cashierOrder.payUser!='散客'">{{ (cashierOrder.oilOrderAmount - cashierOrder.oilDiscountAmount - cashierOrder.payAmount).toFixed(2) || 0 }}</span> <span>{{ cashierOrder.balanceAmount || 0 }}</span>
<span v-else>0</span> </el-descriptions-item>
<el-descriptions-item label="囤油卡付款升数">
<span>{{ cashierOrder.oilCardAmount || 0 }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="找零金额">{{ cashierOrder.seekZero }}</el-descriptions-item> <el-descriptions-item label="找零金额">{{ cashierOrder.seekZero }}</el-descriptions-item>
<el-descriptions-item label="付款方式"> <el-descriptions-item label="付款方式">
@ -200,6 +202,8 @@
<span v-else-if="cashierOrder.payType == 'WECHAT'">微信</span> <span v-else-if="cashierOrder.payType == 'WECHAT'">微信</span>
<span v-else-if="cashierOrder.payType == 'ALIPAY'">支付宝</span> <span v-else-if="cashierOrder.payType == 'ALIPAY'">支付宝</span>
<span v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</span> <span v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</span>
<span v-else-if="cashierOrder.payType == 'oilCard'">囤油卡</span>
<span v-else-if="cashierOrder.payType == 'balance'">储值卡</span>
<span v-else>小程序码</span> <span v-else>小程序码</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="付款状态"> <el-descriptions-item label="付款状态">

View File

@ -42,6 +42,8 @@
:label="item.dictLabel" :label="item.dictLabel"
:value="item.dictValue"> :value="item.dictValue">
</el-option> </el-option>
<el-option label="囤油卡" value="oilCard"/>
<el-option label="储值卡" value="balance"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="手机号"> <el-form-item label="手机号">
@ -188,6 +190,8 @@
<el-table-column prop="payType" label="付款方式" align="center"> <el-table-column prop="payType" label="付款方式" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{getType(payList,scope.row.payType)}}</span> <span>{{getType(payList,scope.row.payType)}}</span>
<span v-if="scope.row.payType=='oilCard'">囤油卡</span>
<span v-if="scope.row.payType=='balance'">储值卡</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderStatus" label="付款状态" align="center" width="120"> <el-table-column prop="orderStatus" label="付款状态" align="center" width="120">

View File

@ -514,7 +514,8 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
for (ActiveDiscountPayVO activeDiscountPayVO : activeDiscountVOList) { for (ActiveDiscountPayVO activeDiscountPayVO : activeDiscountVOList) {
if (!activeDiscountPayVO.getParticipationCondition().equals("1")){ if (!activeDiscountPayVO.getParticipationCondition().equals("1")){
for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) { for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) {
if(cardFavorableRecordVO.getExclusiveFunction().equals("2") && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){ if(StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && cardFavorableRecordVO.getExclusiveFunction().equals("2")
&& StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){
ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO(); ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO();
BeanUtils.copyProperties(activeDiscountPayVO,activeDiscountPayVO1); BeanUtils.copyProperties(activeDiscountPayVO,activeDiscountPayVO1);
activeDiscountPayVO1.setCouponId(cardFavorableRecordVO.getId()); activeDiscountPayVO1.setCouponId(cardFavorableRecordVO.getId());
@ -527,7 +528,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
activeDiscountPayVO1.setCardFavorableAmount(BigDecimal.valueOf(cardFavorableRecordVO.getDiscountAmount())); activeDiscountPayVO1.setCardFavorableAmount(BigDecimal.valueOf(cardFavorableRecordVO.getDiscountAmount()));
activeDiscountPayVO1.setCardFavorableInfo(cardFavorableRecordVO.getCardFavorableName()); activeDiscountPayVO1.setCardFavorableInfo(cardFavorableRecordVO.getCardFavorableName());
cardAndDisPays.add(activeDiscountPayVO1); cardAndDisPays.add(activeDiscountPayVO1);
}else if( cardFavorableRecordVO.getExclusiveFunction().equals("0")){ }else if( StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && cardFavorableRecordVO.getExclusiveFunction().equals("0")){
ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO(); ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO();
BeanUtils.copyProperties(activeDiscountPayVO,activeDiscountPayVO1); BeanUtils.copyProperties(activeDiscountPayVO,activeDiscountPayVO1);
String[] split = cardFavorableRecordVO.getOilType().split(","); String[] split = cardFavorableRecordVO.getOilType().split(",");

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.order.entity.CashierOrder; import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.service.CashierOrderService; import com.fuint.business.order.service.CashierOrderService;
import com.fuint.business.order.vo.CashierOrderVo;
import com.fuint.framework.web.BaseController; import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject; import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -70,7 +71,7 @@ public class CashierOrderController extends BaseController {
*/ */
@GetMapping("/{id}") @GetMapping("/{id}")
public ResponseObject cashierOrderInfo(@PathVariable Integer id){ public ResponseObject cashierOrderInfo(@PathVariable Integer id){
CashierOrder cashierOrder = cashierOrderService.queryCashierOrder(id); CashierOrderVo cashierOrder = cashierOrderService.queryCashierOrder(id);
return getSuccessResult(cashierOrder); return getSuccessResult(cashierOrder);
} }

View File

@ -268,12 +268,12 @@ public class OilOrderController extends BaseController {
/** /**
* 根据订单id查询油品订单信息小程序 * 根据订单id查询油品订单信息小程序
* @param id * @param orderNo
* @return * @return
*/ */
@GetMapping("oilOrderId/{id}") @GetMapping("oilOrderId/{orderNo}")
public ResponseObject getOilOrderInfo(@PathVariable Integer id){ public ResponseObject getOilOrderInfo(@PathVariable String orderNo){
return getSuccessResult(orderService.selectOilOrderDescByOrderId(id)); return getSuccessResult(orderService.selectOilOrderDescByOrderId(orderNo));
} }
/** /**

View File

@ -75,6 +75,14 @@ public class CashierOrder extends BaseEntity implements Serializable {
* 商品优惠金额 * 商品优惠金额
*/ */
private Double goodsDiscountAmount; private Double goodsDiscountAmount;
/**
* 油品实付金额
*/
private Double oilPayAmount;
/**
* 商品实付金额
*/
private Double goodsPayAmount;
/** /**
* 订单金额 * 订单金额
*/ */

View File

@ -119,10 +119,10 @@ public interface OilOrderMapper extends BaseMapper<OilOrder> {
/** /**
* 根据订单id查询订单详情信息 * 根据订单id查询订单详情信息
* @param orderId * @param orderNo
* @return * @return
*/ */
OilOrderVo selectOilOrderDescByOrderId(@Param("orderId") Integer orderId); OilOrderVo selectOilOrderDescByOrderId(@Param("orderNo") String orderNo);
OilOrderVo getInfoByTime(@Param("time") Date time,@Param("list") List<OilGun> tankIds); OilOrderVo getInfoByTime(@Param("time") Date time,@Param("list") List<OilGun> tankIds);
} }

View File

@ -534,13 +534,15 @@
</select> </select>
<select id="selectOilOrderDescByOrderId" resultType="com.fuint.business.order.vo.OilOrderVo" <select id="selectOilOrderDescByOrderId" resultType="com.fuint.business.order.vo.OilOrderVo"
parameterType="java.lang.Integer"> parameterType="java.lang.Integer">
select od.*,ona.oil_name,og.gun_name,sta.real_name,sto.name storeName,sto.description from oil_order od select od.*,ona.oil_name,og.gun_name,sta.real_name,sto.name storeName,sto.description,cfr.card_favorable_id
left join oil_name ona on od.oils = ona.id from oil_order od
left join oil_gun og on od.oil_gun_num = og.id left join oil_name ona on od.oils = ona.id
left join mt_staff sta on od.staff_id = sta.id left join oil_gun og on od.oil_gun_num = og.id
left join mt_store sto on od.store_id = sto.id left join mt_staff sta on od.staff_id = sta.id
left join mt_store sto on od.store_id = sto.id
left join card_favorable_record cfr on cfr.id = od.coupon_id
<where> <where>
od.id = #{orderId} od.order_no = #{orderNo}
</where> </where>
</select> </select>
<select id="getInfoByTime" resultType="com.fuint.business.order.vo.OilOrderVo"> <select id="getInfoByTime" resultType="com.fuint.business.order.vo.OilOrderVo">

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.order.entity.CashierOrder; import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.vo.CashierOrderVo;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -37,7 +38,7 @@ public interface CashierOrderService extends IService<CashierOrder> {
* @param id * @param id
* @return * @return
*/ */
public CashierOrder queryCashierOrder(int id); public CashierOrderVo queryCashierOrder(int id);
/** /**
* 根据订单号查询商品订单信息 * 根据订单号查询商品订单信息

View File

@ -168,10 +168,10 @@ public interface OilOrderService extends IService<OilOrder> {
/** /**
* 根据订单id查询订单详情信息 * 根据订单id查询订单详情信息
* @param orderId * @param orderNo
* @return * @return
*/ */
OilOrderVo selectOilOrderDescByOrderId(Integer orderId); OilOrderVo selectOilOrderDescByOrderId(String orderNo);
/** /**
* 小程序添加订单评论信息 * 小程序添加订单评论信息

View File

@ -67,7 +67,7 @@ public class CashierOrderServiceImpl extends ServiceImpl<CashierOrderMapper, Cas
@Override @Override
public CashierOrder queryCashierOrder(int id) { public CashierOrderVo queryCashierOrder(int id) {
CashierOrderVo cashierOrderVo = baseMapper.selectCashierOrderById(id); CashierOrderVo cashierOrderVo = baseMapper.selectCashierOrderById(id);
return cashierOrderVo; return cashierOrderVo;
} }

View File

@ -410,6 +410,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setPayUser(payUser); cashierOrder.setPayUser(payUser);
cashierOrder.setAmount(oilAmount+goodsAmount); cashierOrder.setAmount(oilAmount+goodsAmount);
cashierOrder.setStatus(payStatus); cashierOrder.setStatus(payStatus);
cashierOrder.setOilPayAmount(oilActualPay);
cashierOrder.setGoodsPayAmount(goodsActualPay);
if (payType.equals("CASH")){ if (payType.equals("CASH")){
if (StringUtils.isNotEmpty(map.get("authCode"))){ if (StringUtils.isNotEmpty(map.get("authCode"))){
cashierOrder.setPayAmount(Double.valueOf(map.get("authCode"))); cashierOrder.setPayAmount(Double.valueOf(map.get("authCode")));
@ -742,6 +744,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setStoreId(accountInfo.getStoreId()); cashierOrder.setStoreId(accountInfo.getStoreId());
cashierOrder.setPayUser(userVo1.getMobile()); cashierOrder.setPayUser(userVo1.getMobile());
cashierOrder.setAmount(oilAmount); cashierOrder.setAmount(oilAmount);
cashierOrder.setOilPayAmount(oilAmount);
cashierOrder.setPayAmount(oilAmount); cashierOrder.setPayAmount(oilAmount);
cashierOrder.setStatus(status); cashierOrder.setStatus(status);
cashierOrder.setPayTime(new Date()); cashierOrder.setPayTime(new Date());
@ -806,6 +809,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setStoreId(accountInfo.getStoreId()); cashierOrder.setStoreId(accountInfo.getStoreId());
cashierOrder.setPayUser(userVo1.getMobile()); cashierOrder.setPayUser(userVo1.getMobile());
cashierOrder.setAmount(oilAmount); cashierOrder.setAmount(oilAmount);
cashierOrder.setOilPayAmount(oilAmount);
cashierOrder.setPayAmount(oilAmount); cashierOrder.setPayAmount(oilAmount);
cashierOrder.setStatus("paid"); cashierOrder.setStatus("paid");
cashierOrder.setPayTime(new Date()); cashierOrder.setPayTime(new Date());
@ -1223,7 +1227,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
} }
row = baseMapper.updateById(oilOrder); row = baseMapper.updateById(oilOrder);
} }
return 0; return row;
} }
@Autowired @Autowired
@ -1693,8 +1697,8 @@ return stringDoubleMap;
} }
@Override @Override
public OilOrderVo selectOilOrderDescByOrderId(Integer orderId) { public OilOrderVo selectOilOrderDescByOrderId(String orderNo) {
return baseMapper.selectOilOrderDescByOrderId(orderId); return baseMapper.selectOilOrderDescByOrderId(orderNo);
} }
@Override @Override

View File

@ -13,4 +13,6 @@ public class OilOrderVo extends OilOrder {
private String oilName; private String oilName;
private String gunName; private String gunName;
private String realName; private String realName;
// 优惠券id
private Integer cardFavorableId;
} }

View File

@ -192,9 +192,9 @@ public class ClientSignController extends BaseController {
return getSuccessResult(true); return getSuccessResult(true);
} }
if ((Boolean) param.get("isRefuel") == true){ // if ((Boolean) param.get("isRefuel") == true){
return getSuccessResult(true); // return getSuccessResult(true);
} // }
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
if (ObjectUtil.isEmpty(nowAccountInfo)) return getSuccessResult(true); if (ObjectUtil.isEmpty(nowAccountInfo)) return getSuccessResult(true);

View File

@ -5,7 +5,7 @@
<div class="center-vh"> <div class="center-vh">
<div class="center-left-top"> <div class="center-left-top">
<div class="vip-bottom" v-if="isMember == false" @click="dialogVisiblevip = true"> <div class="vip-bottom" v-if="isMember == false" @click="dialogVisiblevip = true">
<div>会员登录</div> <div>会员搜索</div>
</div> </div>
<div v-else style="width: 96%;margin: 0 auto;display: flex;justify-content: space-between"> <div v-else style="width: 96%;margin: 0 auto;display: flex;justify-content: space-between">
<div <div
@ -193,6 +193,14 @@
</div> </div>
<div class="bottom-posi"> <div class="bottom-posi">
<div class="center-left-wrap"> <div class="center-left-wrap">
<div class="wrap-box" value="oilCard"
:class="{ 'wrap-box2': 'oilCard' == payType }" >
<span @click="payMethod('oilCard')">囤油卡</span>
</div>
<div class="wrap-box" value="balance"
:class="{ 'wrap-box2': 'balance' == payType }" >
<span @click="payMethod('balance')">储值卡</span>
</div>
<div class="wrap-box" v-for="item in payList" <div class="wrap-box" v-for="item in payList"
:key="item.dictValue" :key="item.dictValue"
:value="item.dictValue" :value="item.dictValue"
@ -276,6 +284,7 @@
style="width: 94%" style="width: 94%"
v-model="goods" v-model="goods"
:fetch-suggestions="querySearch" :fetch-suggestions="querySearch"
:trigger-on-focus="false"
placeholder="商品名称,商品关键词,商品条码" placeholder="商品名称,商品关键词,商品条码"
@select="changeGoods"> @select="changeGoods">
<template slot-scope="{ item }"> <template slot-scope="{ item }">
@ -294,8 +303,8 @@
<div class="data-top-title">商品</div> <div class="data-top-title">商品</div>
<div class="data-top-three"> <div class="data-top-three">
<div>库存</div> <div>库存</div>
<div v-if="isMember == false">单价</div> <div>单价</div>
<div v-else>会员价</div> <div v-if="isMember">会员价</div>
<div>数量</div> <div>数量</div>
<div>操作</div> <div>操作</div>
</div> </div>
@ -304,8 +313,8 @@
<div class="data-top-title">{{ item.name }}</div> <div class="data-top-title">{{ item.name }}</div>
<div class="data-top-three"> <div class="data-top-three">
<div>{{ item.stock }}</div> <div>{{ item.stock }}</div>
<div v-if="isMember == false">{{ item.retailPrice }}</div> <div>{{ item.retailPrice }}</div>
<div v-else>{{ item.memberPrice }}</div> <div v-if="isMember">{{ item.memberPrice }}</div>
<div> <div>
<el-input-number v-model="item.num" size="small" controls-position="right" <el-input-number v-model="item.num" size="small" controls-position="right"
@change="handleChange" :min="1" :max="10000"></el-input-number> @change="handleChange" :min="1" :max="10000"></el-input-number>
@ -931,7 +940,9 @@
<span class="amountBlue">{{ form.oilPrice }}/{{ form.unit }}</span> <span class="amountBlue">{{ form.oilPrice }}/{{ form.unit }}</span>
</div> </div>
<div > <div >
<el-input v-model="amount" v-focus @input="form.amount = amount" placeholder="请输入加油金额" <el-input v-model="form.amount" v-focus @input="inputAmount"
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" maxlength="10"
placeholder="请输入加油金额"
style="font-weight: 700;text-align: center;font-size: 20px;"> style="font-weight: 700;text-align: center;font-size: 20px;">
<el-select v-model="select" style="width: 70px" @change="changeSelect" slot="append" placeholder="请选择"> <el-select v-model="select" style="width: 70px" @change="changeSelect" slot="append" placeholder="请选择">
<el-option label="元" value="元"></el-option> <el-option label="元" value="元"></el-option>
@ -1129,9 +1140,13 @@
<div>{{ (oilDiscount + goodsDiscount + fullReduction + couponAmount).toFixed(2) }}</div> <div>{{ (oilDiscount + goodsDiscount + fullReduction + couponAmount).toFixed(2) }}</div>
</div> </div>
<div class="input-box" v-if="isMember && consumeAmount>0"> <div class="input-box" v-if="isMember && consumeAmount>0">
<div>储值卡或囤油卡付款</div> <div>储值卡付款</div>
<div>{{ consumeAmount.toFixed(2) }}</div> <div>{{ consumeAmount.toFixed(2) }}</div>
</div> </div>
<div class="input-box" v-if="isMember && consumeRefuelMoney>0">
<div>囤油卡付款</div>
<div>{{ consumeRefuelMoney.toFixed(2) }}</div>
</div>
<div class="input-box"> <div class="input-box">
<div>实付款</div> <div>实付款</div>
<div v-if="payType == 'credit'">0.00</div> <div v-if="payType == 'credit'">0.00</div>
@ -1160,7 +1175,6 @@
import {getPaymentActive, selectCoupon, selectPreferential, usePaymentActive} from "@/api/cashier/preferential"; import {getPaymentActive, selectCoupon, selectPreferential, usePaymentActive} from "@/api/cashier/preferential";
import {addHangBill} from "@/api/cashier/hangbill"; import {addHangBill} from "@/api/cashier/hangbill";
import {addCreditUnit, listCreditUnit} from "@/api/cashier/creditunit"; import {addCreditUnit, listCreditUnit} from "@/api/cashier/creditunit";
import {getSysConfig} from "@/api/staff/user/sysconfig";
import {cashierOrderByOrderNo} from "@/api/cashier/cashierorder"; import {cashierOrderByOrderNo} from "@/api/cashier/cashierorder";
import {getLodop} from "@/api/LodopFuncs"; import {getLodop} from "@/api/LodopFuncs";
import {giftCardExchange} from "@/api/cashier/giftCard/giftcard"; import {giftCardExchange} from "@/api/cashier/giftCard/giftcard";
@ -1280,7 +1294,7 @@
// //
balance:0, balance:0,
// //
amount:0, amount:"",
// //
seekZero:0, seekZero:0,
// //
@ -1346,7 +1360,7 @@
// //
goods:"", goods:"",
select:"元", select:"元",
form:{ amount : 0,exist:false }, form:{ amount : "",exist:false },
form1:{ form1:{
amount:"", amount:"",
}, },
@ -1659,6 +1673,9 @@
} }
}) })
}, },
inputAmount(){
this.$forceUpdate();
},
selectOilType(status, oilType) { selectOilType(status, oilType) {
this.tabOilType = oilType; this.tabOilType = oilType;
// console.log("453",oilType) // console.log("453",oilType)
@ -2387,18 +2404,29 @@
this.consumeRefuelMoney = 0; this.consumeRefuelMoney = 0;
// this.hoardAmount = 0; // this.hoardAmount = 0;
this.isOilStorageCard = false; this.isOilStorageCard = false;
if (this.balance>0){
this.checkAll4 = true
this.payType = "balance"
}
}else { }else {
this.isOilStorageCard = true; this.checkAll4 = false
this.payType = "oilCard"
// this.isOilStorageCard = true;
this.changeRefuelMoney() this.changeRefuelMoney()
} }
this.isDefaultUseCard(); this.isDefaultUseCard();
}, },
handleCheckAllChange4(val) { handleCheckAllChange4(val) {
if (val==false){ if (val==false){
this.payType = "WECHAT"
this.countAmountUnBalance(); this.countAmountUnBalance();
this.consumeAmount = 0; this.consumeAmount = 0;
this.isUseBalance = true; this.isUseBalance = true;
}else { }else {
this.checkAll3 = false
this.isOilStorageCard = false;
this.consumeRefuelMoney = 0;
this.payType = "balance"
this.countAmountFull(); this.countAmountFull();
this.isUseBalance = false; this.isUseBalance = false;
} }
@ -2420,6 +2448,7 @@
this.couponAmount = 0 this.couponAmount = 0
if (this.balance>0){ if (this.balance>0){
this.checkAll4 = true this.checkAll4 = true
this.payType = "balance"
} }
} }
this.countAmountFull(); this.countAmountFull();
@ -2757,17 +2786,20 @@
// this.getCoupon(); // this.getCoupon();
// } // }
// } // }
if (this.balance>0 && this.oilAmount>0){ if (this.balance>0 && this.oilAmount>0 && !this.isOilStorageCard){
this.checkAll4 = true this.checkAll4 = true
this.payType = "balance"
this.countAmountFull() this.countAmountFull()
} }
await this.getGrade(this.member.id,this.member.gradeId) await this.getGrade(this.member.id,this.member.gradeId)
if (!this.isFixingLevel){ if (!this.isFixingLevel && !this.isOilStorageCard){
await this.getOilCoupon() await this.getOilCoupon()
} }
}, },
// //
goodsAllAmount(){ goodsAllAmount(){
this.goodsDiscount = 0
this.goodsAmount = 0
this.goodsOrder.forEach(item => { this.goodsOrder.forEach(item => {
if (this.isMember){ if (this.isMember){
// this.goodsAmount += +(item.memberPrice*item.num).toFixed(2); // this.goodsAmount += +(item.memberPrice*item.num).toFixed(2);
@ -2929,6 +2961,7 @@
// //
_this.checkAll1 = false _this.checkAll1 = false
_this.checkAll4 = true; _this.checkAll4 = true;
this.payType = "balance"
_this.fullReduction = 0 _this.fullReduction = 0
_this.isUseFull = true; _this.isUseFull = true;
}else { }else {
@ -2949,6 +2982,7 @@
// 使 // 使
countOilCard(){ countOilCard(){
if (this.hoardAmount>0){ if (this.hoardAmount>0){
this.checkAll4 = true
if (this.balance!=0 && this.balance >= this.hoardAmount){ if (this.balance!=0 && this.balance >= this.hoardAmount){
this.oilActualPay = 0 this.oilActualPay = 0
this.consumeAmount = this.hoardAmount this.consumeAmount = this.hoardAmount
@ -2960,7 +2994,6 @@
this.oilActualPay = 0 this.oilActualPay = 0
this.consumeAmount = 0 this.consumeAmount = 0
} }
console.log("囤油卡",this.isOilStorageCard,this.hoardAmount,this.balance,this.oilAmount,this.oilActualPay,this.consumeAmount)
}, },
// 使 // 使
countAmountFull(){ countAmountFull(){
@ -3013,6 +3046,7 @@
isDefaultUseCard(){ isDefaultUseCard(){
if (this.isOilStorageCard){ if (this.isOilStorageCard){
this.checkAll3 = true; this.checkAll3 = true;
this.payType = "oilCard"
this.checkAll1 = false; this.checkAll1 = false;
this.fullReduction = 0; this.fullReduction = 0;
this.checkAll2 = false; this.checkAll2 = false;
@ -3241,13 +3275,14 @@
this.dialogVisibleamount = false this.dialogVisibleamount = false
this.form.oilType = this.oilNameID; this.form.oilType = this.oilNameID;
this.form.type = this.type; this.form.type = this.type;
let amount = this.form.amount || 0;
// //
if (this.select == "元"){ if (this.select == "元"){
let num = this.form.amount/(this.form.oilPrice ? this.form.oilPrice : 1) let num = amount/(this.form.oilPrice ? this.form.oilPrice : 1)
this.form.liters = (Math.ceil(num*100)/100).toFixed(2) this.form.liters = (Math.ceil(num*100)/100).toFixed(2)
}else { }else {
this.form.liters = this.form.amount this.form.liters = amount
this.form.amount = (this.form.oilPrice * this.form.amount).toFixed(2) this.form.amount = (this.form.oilPrice * amount).toFixed(2)
} }
// //
@ -3281,12 +3316,18 @@
// this.preferential(); // this.preferential();
// this.getCoupon(); // this.getCoupon();
// } // }
if (this.balance>0){
if (this.refuelMoney){
// 使
await this.changeRefuelMoney();
}
if (this.balance>0 && this.oilAmount>0 && !this.isOilStorageCard){
this.checkAll4 = true this.checkAll4 = true
this.payType = "balance"
this.countAmountFull() this.countAmountFull()
} }
await this.getGrade(this.member.id,this.member.gradeId) await this.getGrade(this.member.id,this.member.gradeId)
if (!this.isFixingLevel){ if (!this.isFixingLevel && !this.isOilStorageCard){
await this.getOilCoupon() await this.getOilCoupon()
} }
} }
@ -3310,19 +3351,21 @@
if (_this.refuelMoney){ if (_this.refuelMoney){
for (let i = 0;i < _this.refuelMoney.length;i++){ for (let i = 0;i < _this.refuelMoney.length;i++){
// //
if (_this.refuelMoney[i].oilType==item.oilType && _this.refuelMoney[i].refuelMoney>0){ if (_this.refuelMoney[i].oilType==item.oilName && _this.refuelMoney[i].refuelMoney>0){
id = item.id id = item.id
_this.isOilStorageCard = true _this.isOilStorageCard = true
if ((_this.refuelMoney[i].refuelMoney-item.liters)>=0){ if (_this.refuelMoney[i].refuelMoney >= item.liters){
conRefMon = item.liters conRefMon = item.liters
}else { }else {
conRefMon = _this.refuelMoney[i].refuelMoney conRefMon = _this.refuelMoney[i].refuelMoney
// //
hoardAmount = item.amount - (_this.refuelMoney[i].refuelMoney * item.oilPrice).toFixed(2) hoardAmount = item.amount - (_this.refuelMoney[i].refuelMoney * item.oilPrice).toFixed(2)
} }
}else {
hoardAmount = item.amount
} }
// }else {
// _this.$message.error(item.liters)
// hoardAmount = item.amount
// }
} }
} }
_this.consumeRefuelMoney += +conRefMon _this.consumeRefuelMoney += +conRefMon
@ -3370,12 +3413,11 @@
// //
changeAmount(amount){ changeAmount(amount){
if (this.select == "元"){ if (this.select == "元"){
this.amount = amount.slice(1) this.form.amount = amount.slice(1)
this.form.amount = this.amount
}else { }else {
this.amount = amount.slice(0,3) this.form.amount = amount.slice(0,3)
this.form.amount = this.amount
} }
this.$forceUpdate();
}, },
// //
getName(oilNameList,id){ getName(oilNameList,id){
@ -3486,6 +3528,7 @@
// JSON.parse() // JSON.parse()
this.map.seekZero = this.seekZero; this.map.seekZero = this.seekZero;
this.map.oilAmount = this.oilAmount; this.map.oilAmount = this.oilAmount;
this.map.payType = this.payType;
this.map.goodsAmount = this.goodsAmount; this.map.goodsAmount = this.goodsAmount;
this.map.oilActualPay = this.oilActualPay; this.map.oilActualPay = this.oilActualPay;
this.map.goodsActualPay = this.goodsActualPay; this.map.goodsActualPay = this.goodsActualPay;
@ -3846,6 +3889,7 @@
let num = 0; let num = 0;
let amount = 0; let amount = 0;
let _this = this; let _this = this;
this.goodsDiscount = 0
goods.forEach(item => { goods.forEach(item => {
num += item.num num += item.num
if (_this.isMember){ if (_this.isMember){

View File

@ -126,12 +126,12 @@
<el-table-column align="center" label="实付订单金额组成"> <el-table-column align="center" label="实付订单金额组成">
<el-table-column prop="oilOrderAmount" align="center" label="油品实付金额" width="100"> <el-table-column prop="oilOrderAmount" align="center" label="油品实付金额" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.oilOrderAmount ? scope.row.oilOrderAmount : '0'}}</span> <span>{{scope.row.oilPayAmount ? scope.row.oilPayAmount : '0'}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="goodsOrderAmount" align="center" label="商品实付金额" width="110"> <el-table-column prop="goodsOrderAmount" align="center" label="商品实付金额" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.goodsOrderAmount ? scope.row.goodsOrderAmount : '0'}}</span> <span>{{scope.row.goodsPayAmount ? scope.row.goodsPayAmount : '0'}}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -215,6 +215,8 @@
<span v-else-if="cashierOrder.payType == 'WECHAT'">微信</span> <span v-else-if="cashierOrder.payType == 'WECHAT'">微信</span>
<span v-else-if="cashierOrder.payType == 'ALIPAY'">支付宝</span> <span v-else-if="cashierOrder.payType == 'ALIPAY'">支付宝</span>
<span v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</span> <span v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</span>
<span v-else-if="cashierOrder.payType == 'oilCard'">囤油卡</span>
<span v-else-if="cashierOrder.payType == 'balance'">储值卡</span>
<span v-else>小程序码</span> <span v-else>小程序码</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="付款状态"> <el-descriptions-item label="付款状态">

View File

@ -42,6 +42,8 @@
:label="item.dictLabel" :label="item.dictLabel"
:value="item.dictValue"> :value="item.dictValue">
</el-option> </el-option>
<el-option label="囤油卡" value="oilCard"/>
<el-option label="储值卡" value="balance"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="手机号"> <el-form-item label="手机号">
@ -189,6 +191,8 @@
<el-table-column prop="payType" label="付款方式" align="center"> <el-table-column prop="payType" label="付款方式" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{getType(payList,scope.row.payType)}}</span> <span>{{getType(payList,scope.row.payType)}}</span>
<span v-if="scope.row.payType=='oilCard'">囤油卡</span>
<span v-if="scope.row.payType=='balance'">储值卡</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderStatus" label="付款状态" align="center" width="120"> <el-table-column prop="orderStatus" label="付款状态" align="center" width="120">

View File

@ -86,9 +86,9 @@
<view class="station-title" style="display: flex;justify-content: space-between;"> <view class="station-title" style="display: flex;justify-content: space-between;">
{{store.name}}{{store.description ? "("+store.description+")" : ""}} {{store.name}}{{store.description ? "("+store.description+")" : ""}}
<!-- <view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;"> <view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
<view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view> <view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view>
</view> --> </view>
</view><!--顺通石化加油站(工业南路站)--> </view><!--顺通石化加油站(工业南路站)-->
<view style="display: flex;"> <view style="display: flex;">
<view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index"> <view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index">

View File

@ -40,26 +40,43 @@
<view class="hui-size">加油金额</view> <view class="hui-size">加油金额</view>
<view class="">{{oilOrder.orderAmount}}</view> <view class="">{{oilOrder.orderAmount}}</view>
</view> </view>
<view class="dis-fx">
<view class="hui-size">加油数量</view>
<view class="">{{oilOrder.oilNum}}</view>
</view>
<view class="dis-fx"> <view class="dis-fx">
<view class="hui-size">实付金额</view> <view class="hui-size">实付金额</view>
<view class="">{{oilOrder.payAmount}}</view> <view class="">{{oilOrder.payAmount}}</view>
</view> </view>
<view class="dis-fx" v-if="oilOrder.orderStatus=='paid'"> <view class="dis-fx" v-if="oilOrder.orderStatus=='paid'">
<view class="hui-size">储值卡或囤油卡消费金额</view> <view class="hui-size">储值卡付款金额</view>
<view class="">{{(oilOrder.orderAmount - oilOrder.discountAmount - oilOrder.payAmount).toFixed(2)}}</view> <view class="">{{ oilOrder.balanceAmount }}</view>
</view> </view>
<!-- <view class="box-title">优惠信息</view> --> <view class="dis-fx" v-if="oilOrder.orderStatus=='paid'">
<view class="hui-size">囤油卡付款升数</view>
<view class="">{{ oilOrder.oilCardAmount }}</view>
</view>
<view class="box-title">优惠信息</view>
<view class="dis-fx" v-if="oilOrder.activeId && oilOrder.activeType=='1'">
<view class="hui-size">满减活动优惠</view>
<view class="">{{fullOrDiscount.deductionAmount || oilOrder.discountAmount}}</view>
</view>
<view class="dis-fx" v-if="oilOrder.activeId && oilOrder.activeType=='2'">
<view class="hui-size">折扣活动优惠</view>
<view class="">{{fullOrDiscount.deductionAmount || oilOrder.discountAmount}}</view>
</view>
<view class="dis-fx" v-if="oilOrder.cardFavorableId">
<view class="hui-size">优惠券优惠</view>
<view class="">{{cardFavorable.discountAmount || oilOrder.discountAmount}}</view>
</view>
<view class="dis-fx" v-if="oilOrder.discountAmount>0"> <view class="dis-fx" v-if="oilOrder.discountAmount>0">
<view class="hui-size">优惠金额</view> <view class="hui-size">优惠合计金额</view>
<view class="">{{oilOrder.discountAmount}}</view> <view class="">{{oilOrder.discountAmount}}</view>
</view> </view>
<view class="dis-fx">
<view class="hui-size">加油数量</view>
<view class="">{{oilOrder.oilNum}}</view>
</view>
<view class="dis-fx" v-if="oilOrder.payTime"> <view class="dis-fx" v-if="oilOrder.payTime">
<view class="hui-size">交易时间</view> <view class="hui-size">交易时间</view>
<view class="">{{oilOrder.payTime}}</view> <view class="">{{oilOrder.payTime}}</view>
</view> </view>
</view> </view>
@ -78,13 +95,17 @@
data() { data() {
return { return {
title: '', title: '',
orderId:"", orderNo:"",
oilOrder:{}, oilOrder:{},
oilPrice:"", oilPrice:"",
//
cardFavorable:{},
//
fullOrDiscount:{},
} }
}, },
onLoad(e) { onLoad(e) {
this.orderId = e.orderId this.orderNo = e.orderNo
this.getOilOrder() this.getOilOrder()
}, },
components: { components: {
@ -94,15 +115,64 @@
// //
getOilOrder() { getOilOrder() {
request({ request({
url: "business/oilOrder/oilOrderId/" + this.orderId, url: "business/oilOrder/oilOrderId/" + this.orderNo,
method: 'get', method: 'get',
}).then((res) => { }).then((res) => {
if(res.data){ if(res.data){
this.oilOrder = res.data this.oilOrder = res.data
this.getOilNumber(res.data.storeId) this.getOilNumber(res.data.storeId)
this.getCardFavorable(res.data.cardFavorableId)
if ( res.data.activeId && res.data.activeType){
if (res.data.activeType == "1"){
this.getFullFavorable(res.data.activeId)
}
if (res.data.activeType == "2"){
this.getDiscountFavorable(res.data.activeId)
}
}
} }
}) })
}, },
getCardFavorable(id){
if (id){
request({
url: "business/marketingActivity/cardFavorable/" + id,
method: 'get',
}).then((res) => {
this.cardFavorable = res.data
})
}
},
getFullFavorable(id){
request({
url: "business/marketingActivity/activeFullminus/" + id,
method: 'get',
}).then((res) => {
let list = res.data.activeDiscountChildList.sort((a,b) => a.amount - b.amount);
list.forEach(item => {
if (item.amount <= this.oilOrder.orderAmount){
this.fullOrDiscount = item
return;
}
})
})
},
getDiscountFavorable(id){
request({
url: "business/marketingActivity/activeDiscount/" + id,
method: 'get',
}).then((res) => {
let list = res.data.activeDiscountChildList.sort((a,b) => a.amount - b.amount);
list.forEach(item => {
if (item.amount <= this.oilOrder.orderAmount){
this.fullOrDiscount = item
this.fullOrDiscount.deductionAmount = this.oilOrder.orderAmount - (this.oilOrder.orderAmount*item.discount)
return;
}
})
})
},
// //
getOilNumber(storeId) { getOilNumber(storeId) {
let _this = this; let _this = this;

View File

@ -28,7 +28,7 @@
@scrolltolower="scrolltolower"> @scrolltolower="scrolltolower">
<!-- 油品订单列表 --> <!-- 油品订单列表 -->
<view class="box-order" v-for="(item,index) in list" :key="index"> <view class="box-order" v-for="(item,index) in list" :key="index">
<view class="or-box-top" @click="goOrderInfo(item.id)"> <view class="or-box-top" @click="goOrderInfo(item.orderNo)">
<view class="">{{getStoreName(storeList,item.storeId)}}</view> <view class="">{{getStoreName(storeList,item.storeId)}}</view>
<!-- <view class="chengg">{{getPayName(payList,item.orderStatus)}}</view> --> <!-- <view class="chengg">{{getPayName(payList,item.orderStatus)}}</view> -->
<view class="chengg" v-if="item.orderStatus=='paid'">已支付</view> <view class="chengg" v-if="item.orderStatus=='paid'">已支付</view>
@ -42,15 +42,15 @@
<view class="huis">订单类型</view> <view class="huis">订单类型</view>
<view class="">油品订单</view> <view class="">油品订单</view>
</view> --> </view> -->
<view class="but-box" @click="goOrderInfo(item.id)"> <view class="but-box" @click="goOrderInfo(item.orderNo)">
<view class="huis">订单金额</view> <view class="huis">订单金额</view>
<view class="">{{item.orderAmount}}</view> <view class="">{{item.orderAmount}}</view>
</view> </view>
<view class="but-box" @click="goOrderInfo(item.id)"> <view class="but-box" @click="goOrderInfo(item.orderNo)">
<view class="huis">优惠合计</view> <view class="huis">优惠合计</view>
<view class="reds">{{item.discountAmount}}</view> <view class="reds">{{item.discountAmount}}</view>
</view> </view>
<view class="but-box" @click="goOrderInfo(item.id)"> <view class="but-box" @click="goOrderInfo(item.orderNo)">
<view class="huis">订单时间</view> <view class="huis">订单时间</view>
<view class="" v-if="item.orderStatus=='paid'">{{item.payTime}}</view> <view class="" v-if="item.orderStatus=='paid'">{{item.payTime}}</view>
<view class="" v-else>{{item.createTime}}</view> <view class="" v-else>{{item.createTime}}</view>
@ -419,9 +419,9 @@
url: '/pagesRefuel/orderDetail/index?orderNo=' + orderNo, url: '/pagesRefuel/orderDetail/index?orderNo=' + orderNo,
}) })
}, },
goOrderInfo(orderId){ goOrderInfo(orderNo){
uni.navigateTo({ uni.navigateTo({
url: '/pagesMy/details/details?orderId=' + orderId, url: '/pagesMy/details/details?orderNo=' + orderNo,
}) })
}, },
goComment(orderId) { goComment(orderId) {