bug
This commit is contained in:
parent
33575a8e95
commit
bfef076269
@ -713,11 +713,11 @@ export default {
|
||||
},
|
||||
// 提交按钮
|
||||
submitForm: function() {
|
||||
if (this.cvsGoodId.length==1){
|
||||
this.form.cvsGoodId = this.cvsGoodId[0]
|
||||
}else {
|
||||
this.form.cvsGoodId = this.cvsGoodId[1]
|
||||
}
|
||||
// if (this.cvsGoodId.length==1){
|
||||
// this.form.cvsGoodId = this.cvsGoodId[0]
|
||||
// }else {
|
||||
// this.form.cvsGoodId = this.cvsGoodId[1]
|
||||
// }
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
// if (this.form.stock==0){
|
||||
|
@ -751,6 +751,7 @@ export default {
|
||||
page: 1,
|
||||
pageSize: 1000,
|
||||
isRecovery:0,
|
||||
status:"qy"
|
||||
},
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ public interface LJGoodsService extends IService<LJGoods> {
|
||||
public IPage<LjGoodsVo> selectLJGoodsList(Page page, LJGoods goods);
|
||||
|
||||
/**
|
||||
* 查询所有商品列表信息
|
||||
* 查询所有商品上架的列表信息
|
||||
* @return
|
||||
*/
|
||||
public List<LJGoods> selectGoodsList();
|
||||
|
@ -68,6 +68,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
queryWrapper.eq("is_recovery",0);
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
queryWrapper.eq("status","qy");
|
||||
List list = baseMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
@ -212,11 +212,15 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
Double goodsActualPay = Double.valueOf(map.get("goodsActualPay"));
|
||||
// 找零金额
|
||||
Double seekZero = Double.valueOf(map.get("seekZero"));
|
||||
// 找零金额
|
||||
// 优惠券id
|
||||
Integer cardFavorableId = null;
|
||||
if (StringUtils.isNotEmpty(map.get("cardFavorableId"))){
|
||||
cardFavorableId = Integer.valueOf(map.get("cardFavorableId"));
|
||||
}
|
||||
Integer recordId = null;
|
||||
if (StringUtils.isNotEmpty(map.get("recordId"))){
|
||||
recordId = Integer.valueOf(map.get("recordId"));
|
||||
}
|
||||
// 付款用户
|
||||
String payUser = null;
|
||||
if (map.get("payUser") != null && !map.get("payUser").equals("")){
|
||||
@ -354,7 +358,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
if (payType.equals("CASH")){
|
||||
staffCommissionService.countStaffCommission(staffId,storeId,oilAmount,oilActualPay,"1",orderNo);
|
||||
}
|
||||
order.setCouponId(cardFavorableId);
|
||||
order.setCouponId(recordId);
|
||||
}else {
|
||||
order.setOrderType("子订单");
|
||||
order.setOrderAmount(amount);
|
||||
@ -1001,6 +1005,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
String cardFavorableId = map.get("cardFavorableId");
|
||||
// 活动类型
|
||||
String type = map.get("type");
|
||||
// 优惠券记录id
|
||||
String recordId = map.get("recordId");
|
||||
String balanceAmountSale = map.get("balanceAmountSale");
|
||||
String oilCardAmountSale = map.get("oilCardAmountSale");
|
||||
Integer tankId = Integer.valueOf(map.get("tankId"));
|
||||
@ -1143,8 +1149,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
if (StringUtils.isNotEmpty(activeId)){
|
||||
oilOrder.setActiveId(Integer.valueOf(activeId));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(cardFavorableId)) {
|
||||
oilOrder.setCouponId(Integer.valueOf(cardFavorableId));
|
||||
if (StringUtils.isNotEmpty(recordId)) {
|
||||
oilOrder.setCouponId(Integer.valueOf(recordId));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(type)) {
|
||||
oilOrder.setActiveType(type);
|
||||
|
@ -202,7 +202,7 @@
|
||||
</el-descriptions>
|
||||
<el-descriptions title="储值余额">
|
||||
<template slot="extra">
|
||||
<span style="color: red;margin-right: 20px">余额充值</span>
|
||||
<!-- <span style="color: red;margin-right: 20px">余额充值</span>-->
|
||||
<span style="font-weight: bold">¥{{member.cardBalance ? member.cardBalance : "--"}}</span>
|
||||
</template>
|
||||
<el-descriptions-item v-if="member.cardBalance!=0" label="账户余额">{{member.cardBalance ? member.cardBalance : "--"}}元</el-descriptions-item>
|
||||
|
@ -553,12 +553,19 @@
|
||||
<el-descriptions title="会员等级">
|
||||
<el-descriptions-item label="等级名称">{{member.gradeId ? getGradeName(gradeList,member.gradeId) : "--"}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="储值余额">
|
||||
<el-descriptions title="储值余额" :column="1">
|
||||
<template slot="extra">
|
||||
<span style="color: red;margin-right: 20px" @click="userRecharge">余额充值</span>
|
||||
<span style="font-weight: bold">¥{{member.cardBalance ? member.cardBalance : "0"}}</span>
|
||||
</template>
|
||||
<el-descriptions-item v-if="member.cardBalance!=0" label="账户余额">{{member.cardBalance ? member.cardBalance : "--"}}元</el-descriptions-item>
|
||||
<el-descriptions-item label="账户余额">{{member.cardBalance ? member.cardBalance : 0}}元</el-descriptions-item>
|
||||
<el-descriptions-item label="囤油卡余额">
|
||||
<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-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@ -826,7 +833,7 @@
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus
|
||||
@keydown.enter.native="collection"
|
||||
@keydown.enter.native="collection1"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
@ -854,7 +861,7 @@
|
||||
v-focus ref="getFocus"
|
||||
autofocus
|
||||
@input="changeSeekZero"
|
||||
@keydown.enter.native="collection"
|
||||
@keydown.enter.native="collection1"
|
||||
placeholder="请输入收款金额">
|
||||
</el-input>
|
||||
</div>
|
||||
@ -874,21 +881,21 @@
|
||||
<div v-if="isPaySuccess">
|
||||
<el-result icon="success" title="收款成功">
|
||||
<template slot="extra">
|
||||
<el-button type="primary" @click="handClose">关 闭</el-button>
|
||||
<el-button type="primary" @click="handClose1">关 闭</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</div>
|
||||
<div v-else-if="isAwait">
|
||||
<el-result icon="warning" title="支付等待超时,请前往订单列表查看是否支付成功!">
|
||||
<template slot="extra">
|
||||
<el-button type="primary" @click="handClose">关 闭</el-button>
|
||||
<el-button type="primary" @click="handClose1">关 闭</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-result icon="error" title="支付失败,请重新支付">
|
||||
<template slot="extra">
|
||||
<el-button type="primary" @click="handClose">关 闭</el-button>
|
||||
<el-button type="primary" @click="handClose1">关 闭</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</div>
|
||||
@ -917,7 +924,7 @@
|
||||
</div>
|
||||
<div class="amount">
|
||||
<span>已选油枪</span>
|
||||
<span class="amountBlue">{{ form.gunName }}</span>
|
||||
<span class="amountBlue">{{ form.gunNames }}</span>
|
||||
</div>
|
||||
<div class="amount">
|
||||
<span>油品单价</span>
|
||||
@ -991,6 +998,7 @@
|
||||
v-model="form1.unitName"
|
||||
style="width: 180%"
|
||||
:fetch-suggestions="querySearch1"
|
||||
:trigger-on-focus="false"
|
||||
placeholder="请选择挂账单位"
|
||||
@select="changeUnit">
|
||||
<template slot-scope="{ item }">
|
||||
@ -1317,6 +1325,7 @@
|
||||
// 商品订单数
|
||||
goodsTotal:0,
|
||||
cardFavorableId:"",
|
||||
recordId:"",
|
||||
// 加油金额
|
||||
rise:[
|
||||
{value:"¥100"},
|
||||
@ -1326,6 +1335,8 @@
|
||||
],
|
||||
// 会员信息
|
||||
member:{},
|
||||
// 会员等级信息
|
||||
grade:{},
|
||||
// 会员列表信息
|
||||
memberList:[],
|
||||
select1:'会员手机号',
|
||||
@ -1620,6 +1631,23 @@
|
||||
}
|
||||
this.$forceUpdate();
|
||||
},
|
||||
// 关闭支付窗口
|
||||
handClose1() {
|
||||
this.isPay = true,
|
||||
this.isPaySuccess = false,
|
||||
this.isQuery = true
|
||||
this.openConfirm = false
|
||||
this.openRecharge = false
|
||||
|
||||
// this.isPaySuccess = false;
|
||||
this.authCode = null
|
||||
this.activeRecharge = 'balance'
|
||||
this.seekZero = 0
|
||||
|
||||
this.iniz()
|
||||
this.cardFuelDieselForm = {}
|
||||
this.childComponentKey = this.childComponentKey+1
|
||||
},
|
||||
// 查询参加存油卡油品
|
||||
getCountOilType() {
|
||||
getCountOilTypeApi().then(res => {
|
||||
@ -1643,6 +1671,10 @@
|
||||
return;
|
||||
}
|
||||
|
||||
await getUserGrade(this.member.gradeId).then(res => {
|
||||
this.grade = res.data
|
||||
})
|
||||
|
||||
await this.getCardFuelDieselList()
|
||||
await this.getCardValueList()
|
||||
await this.getCountOilType()
|
||||
@ -1709,6 +1741,17 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
// 充值后更新会员信息
|
||||
getMemberAfter(){
|
||||
getUserInfoMobile({mobile:this.member.mobile}).then(res => {
|
||||
if (res.data){
|
||||
this.member = res.data
|
||||
if (res.data.refuelMoney){
|
||||
this.refuelMoney = JSON.parse(res.data.refuelMoney)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async collection1() {
|
||||
let actualPayment = 0
|
||||
let makeChange = 0
|
||||
@ -1761,6 +1804,7 @@
|
||||
// 当支付成功时
|
||||
this_.isPaySuccess = true;
|
||||
this_.isQuery = false;
|
||||
this_.getMemberAfter();
|
||||
}else if (payStatus === "payFail") {
|
||||
this_.isPaySuccess = false;
|
||||
this_.isQuery = false;
|
||||
@ -1834,6 +1878,7 @@
|
||||
if (response.data.payStatus == "paid") {
|
||||
this_.isPaySuccess = true;
|
||||
this_.isQuery = false;
|
||||
this_.getMemberAfter();
|
||||
}
|
||||
if (response.data.payStatus == "payFail") {
|
||||
this_.isPaySuccess = false;
|
||||
@ -2693,6 +2738,7 @@
|
||||
async chooseUser(data){
|
||||
this.dialogVisiblevip = false
|
||||
this.isMember = true;
|
||||
this.goodsAllAmount();
|
||||
this.map.payUser = data.mobile;
|
||||
this.map.userId = data.id;
|
||||
this.balance = this.member.cardBalance;
|
||||
@ -2711,7 +2757,7 @@
|
||||
// this.getCoupon();
|
||||
// }
|
||||
// }
|
||||
if (this.balance>0){
|
||||
if (this.balance>0 && this.oilAmount>0){
|
||||
this.checkAll4 = true
|
||||
this.countAmountFull()
|
||||
}
|
||||
@ -2720,6 +2766,18 @@
|
||||
await this.getOilCoupon()
|
||||
}
|
||||
},
|
||||
// 选择会员时商品总价的变化
|
||||
goodsAllAmount(){
|
||||
this.goodsOrder.forEach(item => {
|
||||
if (this.isMember){
|
||||
// this.goodsAmount += +(item.memberPrice*item.num).toFixed(2);
|
||||
this.goodsDiscount += +((item.retailPrice-item.memberPrice)*item.num).toFixed(2)
|
||||
}
|
||||
this.goodsAmount += +(item.retailPrice*item.num).toFixed(2);
|
||||
// }
|
||||
})
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
},
|
||||
getOilCoupon(){
|
||||
let type = 0;
|
||||
// if (this.consumeAmount==0){
|
||||
@ -2769,6 +2827,7 @@
|
||||
_this.couponDiscount.push(discount)
|
||||
if(!this.isOilStorageCard) {
|
||||
_this.cardFavorableId = res.data.cardFavorableId
|
||||
_this.recordId = res.data.recordId
|
||||
_this.couponAmount = res.data.cardFavorableAmount
|
||||
_this.checkAll5 = true
|
||||
}
|
||||
@ -3034,9 +3093,9 @@
|
||||
handleChoose(data) {
|
||||
this.isSure = false;
|
||||
this.member = data;
|
||||
// if (data.refuelMoney != null && data.refuelMoney != ""){
|
||||
// this.refuelMoney = JSON.parse(data.refuelMoney)
|
||||
// }
|
||||
if (data.refuelMoney){
|
||||
this.refuelMoney = JSON.parse(data.refuelMoney)
|
||||
}
|
||||
this.dialogVisibleMember = false;
|
||||
},
|
||||
// 清空商品订单列表
|
||||
@ -3164,6 +3223,7 @@
|
||||
this.fullReduceDiscount = [];
|
||||
this.gradeDiscount = [];
|
||||
this.couponDiscount = [];
|
||||
this.checkAll4 = false;
|
||||
|
||||
if (this.member.refuelMoney!=null){
|
||||
this.refuelMoney = JSON.parse(this.member.refuelMoney)
|
||||
@ -3347,6 +3407,9 @@
|
||||
getUserInfoMobile({mobile:this.userNo}).then( response => {
|
||||
if (response.data!=null){
|
||||
this.member = response.data
|
||||
if (response.data.refuelMoney){
|
||||
this.refuelMoney = JSON.parse(response.data.refuelMoney)
|
||||
}
|
||||
this.storeId = response.data.storeId
|
||||
this.isSure = false
|
||||
}else {
|
||||
@ -3398,6 +3461,7 @@
|
||||
if (item.id==data.id){
|
||||
this.form.id = item.id
|
||||
this.form.gunName = item.id
|
||||
this.form.gunNames = item.gunName
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -3440,6 +3504,7 @@
|
||||
this.map.couponId = this.useCouponIds
|
||||
this.map.staffId = this.staff.id
|
||||
this.map.cardFavorableId = this.cardFavorableId
|
||||
this.map.recordId = this.recordId
|
||||
|
||||
let _this = this;
|
||||
if (this.payType=="APPLET_CODE"){
|
||||
@ -3784,10 +3849,11 @@
|
||||
goods.forEach(item => {
|
||||
num += item.num
|
||||
if (_this.isMember){
|
||||
amount += +(item.memberPrice*item.num).toFixed(2);
|
||||
}else {
|
||||
amount += +(item.retailPrice*item.num).toFixed(2);
|
||||
// amount += +(item.memberPrice*item.num).toFixed(2);
|
||||
this.goodsDiscount += +((item.retailPrice-item.memberPrice)*item.num).toFixed(2)
|
||||
}
|
||||
amount += +(item.retailPrice*item.num).toFixed(2);
|
||||
// }
|
||||
})
|
||||
this.goodsTotal = num;
|
||||
this.goodsAmount = amount;
|
||||
|
@ -310,6 +310,7 @@
|
||||
isUseChildCard:this.isUseChildCard,
|
||||
activeId:this.preferentialData.activeId,
|
||||
cardFavorableId:this.preferentialData.cardFavorableId,
|
||||
recordId:this.preferentialData.recordId,
|
||||
type:this.preferentialData.type,
|
||||
balanceAmountSale:this.balanceRedece,
|
||||
oilCardAmountSale:this.oilCardRedece,
|
||||
|
Loading…
Reference in New Issue
Block a user