bug
This commit is contained in:
parent
973e7648d4
commit
c71ddb7e82
@ -13,6 +13,7 @@ import com.fuint.api.fuyou.util.Utils;
|
||||
import com.fuint.business.commission.service.StaffCommissionService;
|
||||
import com.fuint.business.integral.entity.IntegralOrders;
|
||||
import com.fuint.business.integral.service.IntegralOrdersService;
|
||||
import com.fuint.business.integral.service.IntegralSettingsService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord;
|
||||
@ -51,6 +52,8 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
private StaffCommissionService staffCommissionService;
|
||||
@Autowired
|
||||
private MerchantConfigRecordService merchantConfigRecordService;
|
||||
@Resource
|
||||
private IntegralSettingsService integralSettingsService;
|
||||
|
||||
/**
|
||||
* 条码支付
|
||||
@ -194,14 +197,16 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
oilOrder.setTankId(tankId);
|
||||
oilOrderService.addOilTracks(oilOrder, oilOrder.getStoreId());
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder);
|
||||
// 修改优惠券使用状态
|
||||
if (oilOrder.getCouponId()!=null){
|
||||
CardFavorableRecord byId = cardFavorableRecordService.getById(oilOrder.getCouponId());
|
||||
if (!ObjectUtil.isEmpty(byId)){
|
||||
byId.setStatus("1");
|
||||
cardFavorableRecordService.updateById(byId);
|
||||
}
|
||||
}
|
||||
// if (oilOrder.getCouponId()!=null){
|
||||
// CardFavorableRecord byId = cardFavorableRecordService.getById(oilOrder.getCouponId());
|
||||
// if (!ObjectUtil.isEmpty(byId)){
|
||||
// byId.setStatus("1");
|
||||
// cardFavorableRecordService.updateById(byId);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(goodsOrder)){
|
||||
// 商品订单
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.integral.entity.IntegralGift;
|
||||
import com.fuint.business.integral.entity.IntegralSettings;
|
||||
import com.fuint.business.order.entity.OilOrder;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
@ -69,4 +70,9 @@ public interface IntegralSettingsService {
|
||||
|
||||
IntegralSettings signInFunction(IntegralSettings integralSettings);
|
||||
|
||||
/**
|
||||
* 加油赠送积分
|
||||
* @param order
|
||||
*/
|
||||
void refuelPoints(OilOrder order);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import com.fuint.business.integral.mapper.IntegralDetailMapper;
|
||||
import com.fuint.business.integral.mapper.IntegralSettingsMapper;
|
||||
import com.fuint.business.integral.service.IntegralDetailService;
|
||||
import com.fuint.business.integral.service.IntegralSettingsService;
|
||||
import com.fuint.business.order.entity.OilOrder;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilNumber;
|
||||
import com.fuint.business.petrolStationManagement.mapper.OilNumberMapper;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
@ -107,6 +108,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
|
||||
refuelConsumptionAmountMap.put("oilName", oilNumber.getOilName() + oilNumber.getOilType());
|
||||
refuelConsumptionAmountMap.put("amount", 0);
|
||||
refuelConsumptionAmountMap.put("integral", 0);
|
||||
refuelConsumptionAmountMap.put("oilNameId", oilNumber.getId());
|
||||
refuelConsumptionAmountList.add(refuelConsumptionAmountMap);
|
||||
}
|
||||
String refuelConsumptionAmount = JSON.toJSONString(refuelConsumptionAmountList);
|
||||
@ -299,6 +301,69 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refuelPoints(OilOrder order) {
|
||||
IntegralSettings integralSettings = integralSettingsMapper.getByStoreId(order.getStoreId());
|
||||
if (ObjectUtil.isNotEmpty(integralSettings) && integralSettings.getRefuelPointsRules()==0
|
||||
&& integralSettings.getRefuelPointsFunction() ==0){
|
||||
if (integralSettings.getRefuelSceneType()==0){
|
||||
// 按金额
|
||||
if (integralSettings.getRefuelAmountType()==0){
|
||||
// 按订单金额
|
||||
countPoints(integralSettings,order.getOils(),order.getOrderAmount(),order.getUserId());
|
||||
}else {
|
||||
// 按实付金额
|
||||
if (integralSettings.getRefuelValueParticipation()==0){
|
||||
// 储值金额不参与
|
||||
countPoints(integralSettings,order.getOils(),order.getPayAmount(),order.getUserId());
|
||||
}else {
|
||||
// 储值金额参与
|
||||
countPoints(integralSettings,order.getOils(),order.getPayAmount()+order.getBalanceAmount(),order.getUserId());
|
||||
}
|
||||
}
|
||||
}else if (integralSettings.getRefuelSceneType()==1){
|
||||
// 按实付金额
|
||||
countPoints(integralSettings,order.getOils(),order.getPayAmount()+order.getBalanceAmount(),order.getUserId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算赠送积分
|
||||
* @param integralSettings
|
||||
* @param oilId 油品id
|
||||
* @param amount 消费金额
|
||||
* @param userId 用户id
|
||||
*/
|
||||
private void countPoints(IntegralSettings integralSettings,String oilId,Double amount,Integer userId){
|
||||
LJStore store = iljStoreService.selectStoreByStoreId(integralSettings.getStoreId());
|
||||
UserBalance balance = userBalanceService.selectUserBalance(userId, store.getChainStoreId());
|
||||
if (ObjectUtil.isNotEmpty(balance)) {
|
||||
if (integralSettings.getRefuelSceneRules()==0) {
|
||||
// 通用规则
|
||||
if (integralSettings.getRefuelFuelAmount() <= amount) {
|
||||
Integer points = balance.getPoints();
|
||||
balance.setPoints(points+integralSettings.getRefuelPoints());
|
||||
}
|
||||
} else {
|
||||
// 油品区分
|
||||
JSONArray jsonArray = JSONArray.parseArray(integralSettings.getRefuelConsumptionAmount());
|
||||
for (int i = 0;i<jsonArray.size();i++){
|
||||
Double amount1 = Double.valueOf(jsonArray.getJSONObject(i).get("amount").toString());
|
||||
Integer integral = Integer.valueOf(jsonArray.getJSONObject(i).get("integral").toString());
|
||||
String oilNameId = jsonArray.getJSONObject(i).get("oilNameId").toString();
|
||||
if (oilNameId.equals(oilId)){
|
||||
if (amount1<=amount){
|
||||
Integer points = balance.getPoints();
|
||||
balance.setPoints(points+integral);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
userBalanceService.updateUserBalance(balance);
|
||||
}
|
||||
}
|
||||
|
||||
private void extracted(LJUserVo ljUserVos, JSONArray jsonArray, int dayInt) {
|
||||
IntegralDetail integralDetail = new IntegralDetail();
|
||||
integralDetail.setStoreId(ljUserVos.getStoreId());
|
||||
|
@ -178,8 +178,8 @@ public class QrCodeUtils {
|
||||
*/
|
||||
private BufferedImage createQrCode(InputStream logoStream, String url, int width, int height) throws IOException {
|
||||
QrConfig config = new QrConfig(width, height);
|
||||
Image image = ImageIO.read(logoStream);
|
||||
config.setImg(image);
|
||||
// Image image = ImageIO.read(logoStream);
|
||||
// config.setImg(image);
|
||||
config.setMargin(1);
|
||||
config.setErrorCorrection(ErrorCorrectionLevel.H);
|
||||
return QrCodeUtil.generate(url, config);
|
||||
|
@ -87,6 +87,10 @@ public class CashierOrder extends BaseEntity implements Serializable {
|
||||
* 订单金额
|
||||
*/
|
||||
private Double amount;
|
||||
/**
|
||||
* 优惠后应付金额
|
||||
*/
|
||||
private Double afterDiscountAmount;
|
||||
/**
|
||||
* 实付金额
|
||||
*/
|
||||
|
@ -72,12 +72,13 @@
|
||||
<if test="order.orderStatus != null and order.orderStatus != ''">
|
||||
and order_status = #{order.orderStatus}
|
||||
</if>
|
||||
<if test="order.remark != null and order.remark != ''">
|
||||
and order_status = 'paid' and remark is null or remark = '' and order_status = 'paid'
|
||||
</if>
|
||||
<if test="order.payType != null and order.payType != ''">
|
||||
and pay_type = #{order.payType}
|
||||
</if>
|
||||
<if test="order.remark != null and order.remark != ''">
|
||||
and order_status = 'paid' and remark is null and store_id = #{order.storeId}
|
||||
or remark = '' and order_status = 'paid' and store_id = #{order.storeId}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</where>
|
||||
</select>
|
||||
|
@ -18,6 +18,7 @@ import com.fuint.business.convenienceSore.entity.LJGoods;
|
||||
import com.fuint.business.convenienceSore.entity.SaleDetail;
|
||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.convenienceSore.service.SaleDetailService;
|
||||
import com.fuint.business.integral.service.IntegralSettingsService;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountService;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO;
|
||||
@ -114,6 +115,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
private ActiveFullminusService activeFullminusService;
|
||||
@Resource
|
||||
private ActiveDiscountService activeDiscountService;
|
||||
@Resource
|
||||
private IntegralSettingsService integralSettingsService;
|
||||
|
||||
@Override
|
||||
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order) {
|
||||
@ -487,6 +490,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setOilDiscountAmount(oilDiscount);
|
||||
cashierOrder.setTerminal(terminal);
|
||||
cashierOrder.setPayType(payType);
|
||||
cashierOrder.setAfterDiscountAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount);
|
||||
|
||||
// 如果金额不等于0调用第三方支付接口
|
||||
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH")){
|
||||
@ -521,7 +525,6 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// throw new RuntimeException("支付失败");
|
||||
}
|
||||
}else {
|
||||
cashierOrder.setPayAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount);
|
||||
this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid");
|
||||
}
|
||||
|
||||
@ -531,6 +534,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
orders.put("oilOrder",oilOrder2);
|
||||
if (oilOrder2.getOrderStatus().equals("paid")){
|
||||
cashierOrder.setPayTime(new Date());
|
||||
if (ObjectUtil.isNotEmpty(oilOrder2.getUserId())) integralSettingsService.refuelPoints(oilOrder2);
|
||||
}
|
||||
cashierOrder.setOilOrderId(oilOrder2.getId());
|
||||
}
|
||||
@ -1221,6 +1225,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
this.updateOilOrder(oilOrder);
|
||||
if (oilOrder.getOrderStatus().equals("paid")) {
|
||||
if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder);
|
||||
this.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getActiveId(), oilOrder.getCouponId(), oilOrder.getActiveType(), oilOrder.getOrderAmount(), Integer.valueOf(oilOrder.getOils()));
|
||||
}
|
||||
|
||||
@ -1268,6 +1273,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// oilOrder.setPayAmount(oilOrder.getOrderAmount()-oilOrder.getDiscountAmount());
|
||||
oilOrder.setOrderStatus(status);
|
||||
if (status.equals("paid")){
|
||||
if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder);
|
||||
oilOrder.setPayTime(new Date());
|
||||
CardValueChildOrder cardValueChildOrder = cardValueChildOrderService.selectCardValueChildOrderByOrderNo(orderNo);
|
||||
if (ObjectUtil.isNotEmpty(cardValueChildOrder)){
|
||||
|
@ -120,17 +120,17 @@
|
||||
</div>
|
||||
<div>-¥{{ oilDiscount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember && refuelMoney1.length>0">
|
||||
<div class="center-left-hj" v-show="isMember && refuelMoney.length>0">
|
||||
<div>
|
||||
<el-checkbox
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll3" @change="handleCheckAllChange3">
|
||||
</el-checkbox><!--:indeterminate="isIndeterminate3"-->
|
||||
囤油卡
|
||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney1" :key="index">
|
||||
<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)
|
||||
余额:{{ item.refuelMoney ? item.refuelMoney : 0.00 }}L)
|
||||
</div>
|
||||
</div>
|
||||
<div>- {{ consumeRefuelMoney.toFixed(2) }}L</div>
|
||||
@ -573,7 +573,7 @@
|
||||
<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;
|
||||
余额:{{ item.refuelMoney ? item.refuelMoney : 0.00 }}L;
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
@ -918,11 +918,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 加油枪加油金额-->
|
||||
<el-dialog
|
||||
title="加油金额"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisibleamount"
|
||||
width="30%">
|
||||
<el-dialog title="加油金额" :close-on-click-modal="false" :visible.sync="dialogVisibleamount" width="30%">
|
||||
<div class="amount">
|
||||
<span>已选油品</span>
|
||||
<span class="amountBlue">{{ getName(oilNameList,form.oilName) }}</span>
|
||||
@ -1427,7 +1423,7 @@
|
||||
{value:"¥300"},
|
||||
],
|
||||
// 会员信息
|
||||
member:{},
|
||||
member:{id:""},
|
||||
// 会员等级信息
|
||||
grade:{},
|
||||
// 会员列表信息
|
||||
@ -1631,7 +1627,7 @@
|
||||
this.getStaff();
|
||||
this.getList();
|
||||
this.getCouponList();
|
||||
this.getUnitList();
|
||||
// this.getUnitList();
|
||||
},
|
||||
directives: {
|
||||
// 注册一个局部的自定义指令 v-focus
|
||||
@ -1673,7 +1669,6 @@
|
||||
// realName: data.realName,
|
||||
// staffMobile: data.staffMobile,
|
||||
// },
|
||||
// console.log('Received data in parent:', data);
|
||||
|
||||
this.cardFuelDieselForm.mtStaffId = data.mtStaffId
|
||||
this.cardFuelDieselForm.realName = data.realName
|
||||
@ -1706,9 +1701,7 @@
|
||||
await getCardValueListApi(quy).then(res => {
|
||||
this.cardValueList = res.data.records;
|
||||
this.cardValueList.sort((a, b) => a.rechargeBalance - b.rechargeBalance);
|
||||
// console.log("this.grade.name",this.grade)
|
||||
})
|
||||
// console.log("this.cardValueList", this.grade)
|
||||
|
||||
if (this.cardValueList.length > 0) {
|
||||
// 过滤
|
||||
@ -1761,7 +1754,6 @@
|
||||
},
|
||||
selectOilType(status, oilType) {
|
||||
this.tabOilType = oilType;
|
||||
// console.log("453",oilType)
|
||||
this.tabOilTypeClick(oilType);
|
||||
},
|
||||
// 会员充值
|
||||
@ -1788,7 +1780,6 @@
|
||||
// this.cardValueForm.amount = null
|
||||
this.$set(this.cardValueForm, 'amount', data);
|
||||
|
||||
// console.log("data17.16", this.cardValueForm.amount)
|
||||
if (!data) {
|
||||
this.cardValueForm.amount = ''
|
||||
|
||||
@ -1936,7 +1927,6 @@
|
||||
this_.isPay = false;
|
||||
this_.isPaySuccess = false;
|
||||
this_.isAwait = true;
|
||||
console.log("t3")
|
||||
}, 15000)
|
||||
|
||||
} else if (this.flag === 2) {
|
||||
@ -1955,7 +1945,6 @@
|
||||
actualPayment = this.authCode
|
||||
makeChange = this.seekZero
|
||||
}
|
||||
// console.log("cardFuelDieselForm",this.cardFuelDieselForm)
|
||||
this.cardFuelDieselForm.mtUserId = userForm.id
|
||||
this.cardFuelDieselForm.name = userForm.name
|
||||
this.cardFuelDieselForm.mobile = userForm.mobile
|
||||
@ -1963,7 +1952,6 @@
|
||||
this.cardFuelDieselForm.actualPayment = actualPayment
|
||||
this.cardFuelDieselForm.makeChange = makeChange
|
||||
|
||||
// console.log("this.cardFuelDieselForm",this.cardFuelDieselForm)
|
||||
|
||||
|
||||
let id;
|
||||
@ -2027,7 +2015,6 @@
|
||||
},
|
||||
// 选择余额充值金额
|
||||
rechargeCard(index, item) {
|
||||
// console.log("index", index)
|
||||
// this.cardValueForm.amount = null,
|
||||
this.cardValueForm.rechargeType = 0
|
||||
|
||||
@ -2061,7 +2048,6 @@
|
||||
this.cardValueForm.percentageCommissions = file.percentageCommissions
|
||||
this.cardValueForm.amountCommission = file.amountCommission
|
||||
|
||||
// console.log("file.royaltyType ", file.royaltyType )
|
||||
|
||||
// 计算员工提成金额
|
||||
if (file.royaltyType === "3") {
|
||||
@ -2077,7 +2063,6 @@
|
||||
},
|
||||
// 根据油品过滤查询存油卡
|
||||
async tabOilTypeClick(data) {
|
||||
// console.log("aaaaaaaaaaaaaa",data)
|
||||
await this.getCardFuelDieselList()
|
||||
|
||||
this.cardFuelDieselList = this.sourceCardFuelDieselList.filter(item => {
|
||||
@ -2145,7 +2130,6 @@
|
||||
let file = {}
|
||||
// 拿到金额
|
||||
file = this.cardFuelDieselList[index]
|
||||
// console.log("file",file)
|
||||
this.cardFuelDieselForm.points = file.points
|
||||
this.cardFuelDieselForm.rechargeBalance = file.rechargeBalance
|
||||
this.cardFuelDieselForm.oilType = file.oilType
|
||||
@ -2276,7 +2260,6 @@
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
}catch (e){
|
||||
@ -2290,7 +2273,6 @@
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
console.log(LODOP)
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
@ -2370,7 +2352,6 @@
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
|
||||
@ -2542,6 +2523,7 @@
|
||||
this.dialogVisibleCredit = false;
|
||||
this.printLocally()
|
||||
this.form1.unitName = ""
|
||||
this.payType = "WECHAT"
|
||||
this.resetMember();
|
||||
this.resetting();
|
||||
this.empty();
|
||||
@ -2559,11 +2541,12 @@
|
||||
this.form1.residueCreditLimit = val.residueCreditLimit
|
||||
return val.id
|
||||
},
|
||||
querySearch1(queryString, cb) {
|
||||
async querySearch1(queryString, cb) {
|
||||
await this.getUnitList();
|
||||
let _this = this;
|
||||
let obj = {};
|
||||
let results = _this.unitList
|
||||
if (queryString != "" && queryString!=undefined){
|
||||
if (queryString){
|
||||
results = [];
|
||||
_this.unitList.forEach(item => {
|
||||
if (item.unitName.includes(queryString)){
|
||||
@ -2702,6 +2685,8 @@
|
||||
if (this.goodsOrder.length==0) {
|
||||
this.payType = "balance"
|
||||
}
|
||||
}else {
|
||||
this.payType = "WECHAT"
|
||||
}
|
||||
}else {
|
||||
this.checkAll4 = false
|
||||
@ -3348,7 +3333,9 @@
|
||||
isDefaultUseCard(){
|
||||
if (this.isOilStorageCard){
|
||||
this.checkAll3 = true;
|
||||
this.payType = "oilCard"
|
||||
if (this.goodsOrder.length==0){
|
||||
this.payType = "oilCard"
|
||||
}
|
||||
this.checkAll1 = false;
|
||||
this.fullReduction = 0;
|
||||
this.checkAll2 = false;
|
||||
@ -3443,6 +3430,7 @@
|
||||
this.goodsAmount = 0;
|
||||
this.goodsActualPay = 0;
|
||||
this.goodsDiscount = 0;
|
||||
|
||||
},
|
||||
// 获取当前账户信息
|
||||
getStaff(){
|
||||
@ -3468,7 +3456,7 @@
|
||||
let result = true;
|
||||
let goods = this.goodsOrder;
|
||||
let _this = this;
|
||||
this.goodsDiscount = 0
|
||||
// this.goodsDiscount = 0
|
||||
if (this.goodsOrder.length > 0) {
|
||||
let amount = 0;
|
||||
for (let i = 0; i < goods.length; i++) {
|
||||
@ -3479,6 +3467,8 @@
|
||||
break;
|
||||
}
|
||||
goods[i].num = goods[i].num + 1;
|
||||
goods[i].retailPrice = val.retailPrice;
|
||||
goods[i].memberPrice = val.memberPrice;
|
||||
val.num = goods[i].num + 1;
|
||||
this.goodsTotal += 1;
|
||||
if (_this.isMember) {
|
||||
@ -3489,7 +3479,6 @@
|
||||
break;
|
||||
} else {
|
||||
result = true;
|
||||
console.log(265)
|
||||
}
|
||||
}
|
||||
// this.goodsAmount = amount;
|
||||
@ -3506,7 +3495,6 @@
|
||||
if (_this.isMember) {
|
||||
this.goodsDiscount += (val.retailPrice - val.memberPrice)
|
||||
}
|
||||
console.log(this.goodsAmount,847)
|
||||
this.goodsAmount += +val.retailPrice
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
this.goodsOrder.push(val);
|
||||
@ -3666,15 +3654,19 @@
|
||||
_this.oilActualPay = 0;
|
||||
_this.hoardAmount = 0;
|
||||
_this.oilAmount = 0;
|
||||
_this.refuelMoney1 = []
|
||||
_this.oilOrder.forEach(item => {
|
||||
let conRefMon = 0;
|
||||
let hoardAmount = 0;
|
||||
let hoardAmount1 = 0;
|
||||
let amount = 0;
|
||||
let amount1 = 0;
|
||||
let id = ""
|
||||
if (_this.refuelMoney){
|
||||
for (let i = 0;i < _this.refuelMoney.length;i++){
|
||||
// 囤油卡升数变化
|
||||
if (_this.refuelMoney[i].oilType==item.oilName && _this.refuelMoney[i].refuelMoney>0){
|
||||
this.refuelMoney1.push(item)
|
||||
_this.refuelMoney1.push(item)
|
||||
id = item.id
|
||||
_this.isOilStorageCard = true
|
||||
if (_this.refuelMoney[i].refuelMoney >= item.liters){
|
||||
@ -3685,10 +3677,15 @@
|
||||
hoardAmount = item.amount - (_this.refuelMoney[i].refuelMoney * item.oilPrice).toFixed(2)
|
||||
}
|
||||
}
|
||||
if (_this.refuelMoney[i].oilType!=item.oilName){
|
||||
amount = item.amount
|
||||
}
|
||||
}
|
||||
}
|
||||
_this.consumeRefuelMoney += +conRefMon
|
||||
_this.hoardAmount += +hoardAmount
|
||||
hoardAmount1 += +hoardAmount
|
||||
amount1 += +amount
|
||||
_this.hoardAmount = hoardAmount1 + amount1
|
||||
_this.oilAmount += +item.amount
|
||||
// _this.changeBalance(_this.hoardAmount,id)
|
||||
// if (_this.consumeRefuelMoney!=0){
|
||||
@ -3810,6 +3807,7 @@
|
||||
this.oilOrder.forEach(item => {
|
||||
if (item.id==data.id){
|
||||
this.amount = item.amount
|
||||
this.form = item
|
||||
result = true
|
||||
this.isExistOilOrder = true;
|
||||
}
|
||||
@ -4020,7 +4018,7 @@
|
||||
if (i.oilType==item.oilType){
|
||||
if ((i.refuelMoney-item.liters)>=0){
|
||||
let refuelMoney = i.refuelMoney;
|
||||
i.refuelMoney = refuelMoney-item.liters
|
||||
i.refuelMoney = (refuelMoney-item.liters).toFixed(2)
|
||||
}else {
|
||||
i.refuelMoney = 0
|
||||
}
|
||||
@ -4176,6 +4174,7 @@
|
||||
this.$message.error("商品不可使用囤油卡付款")
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.refuelMoney1.length>0){
|
||||
this.checkAll3 = true
|
||||
this.handleCheckAllChange3(true)
|
||||
@ -4206,6 +4205,12 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (payType == 'APPLET_CODE'){
|
||||
if (this.goodsOrder.length>0){
|
||||
this.$message.error("商品不可使用储值卡付款")
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.typeIdex = payType
|
||||
this.map.payType = payType;
|
||||
this.payType = payType;
|
||||
|
@ -121,6 +121,7 @@
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="orderNo" align="center" label="订单号" width="220"> </el-table-column>
|
||||
<el-table-column prop="amount" align="center" label="订单金额"> </el-table-column>
|
||||
<el-table-column prop="afterDiscountAmount" align="center" label="优惠后应付金额"> </el-table-column>
|
||||
<el-table-column prop="payAmount" align="center" label="实付金额"> </el-table-column>
|
||||
<el-table-column prop="seekZero" align="center" label="找零金额"> </el-table-column>
|
||||
<el-table-column align="center" label="订单金额组成">
|
||||
|
@ -11,42 +11,44 @@
|
||||
:dots-styles="dotsStyles" field="content">
|
||||
<swiper class="swiper-box" @change="change" :current="swiperDotIndex">
|
||||
<swiper-item v-for="(item, index) in userGradeList" :key="index">
|
||||
<view class="top-box">
|
||||
<view>
|
||||
<view class="top-box">
|
||||
|
||||
<view class="b-top">
|
||||
<view style="width: 70%;">
|
||||
<view class="title-size">
|
||||
{{item.name}}
|
||||
<span v-if="member.gradeId==item.id">(当前等级)</span>
|
||||
<view class="b-top">
|
||||
<view style="width: 70%;">
|
||||
<view class="title-size">
|
||||
{{item.name}}
|
||||
<span v-if="member.gradeId==item.id">(当前等级)</span>
|
||||
</view>
|
||||
<view class="min-size" style="margin-bottom: 20px;">升级会员享更多特权</view>
|
||||
<!-- <view class="min-size" style="margin-bottom: 10px;" v-if="userBalance.gradeId == item.id && index < (userGradeList.length-1)">
|
||||
在获得{{item.growthValue - userBalance.growthValue}}可升级至{{userGradeList[index+1].name}}
|
||||
</view>
|
||||
<view class="min-size" style="margin-bottom: 10px;" v-else-if="userBalance.gradeId == item.id && index == (userGradeList.length-1)">
|
||||
已达到最高等级
|
||||
</view> -->
|
||||
<view class="min-size" style="margin-bottom: 10px;" >
|
||||
达到当前等级所需成长值为{{item.growthValue}}
|
||||
</view>
|
||||
<u-line-progress :percentage="percentage" activeColor="#2F72F7"></u-line-progress>
|
||||
</view>
|
||||
<view class="min-size" style="margin-bottom: 20px;">升级会员享更多特权</view>
|
||||
<!-- <view class="min-size" style="margin-bottom: 10px;" v-if="userBalance.gradeId == item.id && index < (userGradeList.length-1)">
|
||||
在获得{{item.growthValue - userBalance.growthValue}}可升级至{{userGradeList[index+1].name}}
|
||||
<view class="right-img">
|
||||
<image src="../../static/imgs/vipxz.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="min-size" style="margin-bottom: 10px;" v-else-if="userBalance.gradeId == item.id && index == (userGradeList.length-1)">
|
||||
已达到最高等级
|
||||
</view> -->
|
||||
<view class="min-size" style="margin-bottom: 10px;" >
|
||||
达到当前等级所需成长值为{{item.growthValue}}
|
||||
</view>
|
||||
<u-line-progress :percentage="percentage" activeColor="#2F72F7"></u-line-progress>
|
||||
</view>
|
||||
<view class="right-img">
|
||||
<image src="../../static/imgs/vipxz.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- qy -->
|
||||
<view class="c-box">
|
||||
<!-- <view class="title-bai">会员权益</view> -->
|
||||
<view class="wrap-box">
|
||||
<!-- qy -->
|
||||
<view class="c-box">
|
||||
<!-- <view class="title-bai">会员权益</view> -->
|
||||
<view class="wrap-box">
|
||||
|
||||
|
||||
<view class="box-ba" v-for="(item,index) in oilNameList" :key="index">
|
||||
<view class="min-box">
|
||||
<image :src="item.imgurl" mode="aspectFit"></image>
|
||||
<view class="box-ba" v-for="(item,index) in oilNameList" :key="index">
|
||||
<view class="min-box">
|
||||
<image :src="item.imgurl" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="mu_">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="mu_">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -316,7 +318,7 @@
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
height: 500px;
|
||||
height: 50vh;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
Loading…
Reference in New Issue
Block a user