bug
This commit is contained in:
parent
7c512e33aa
commit
654d912ef1
@ -126,6 +126,16 @@ public class LJUserController extends BaseController {
|
||||
return getSuccessResult(map1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据storeId查询会员信息
|
||||
* @param storeId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/storeUserInfo/{storeId}")
|
||||
public ResponseObject userVoInfo1(@PathVariable Integer storeId){
|
||||
return getSuccessResult(userService.queryUserByStoreIdAndUserId(storeId));
|
||||
}
|
||||
|
||||
@GetMapping("/getByUniApp")
|
||||
public ResponseObject getByUniApp(Integer chainStoreId){
|
||||
LJUserVo user = userService.getByUniApp(chainStoreId);
|
||||
|
@ -60,6 +60,13 @@ public interface LJUserService extends IService<LJUser> {
|
||||
*/
|
||||
public Map<String,Object> queryUserByStoreId(Integer storeId,Integer mobile);
|
||||
|
||||
/**
|
||||
* 根据storeId获取连锁店id 根据连锁店id查询用户信息
|
||||
* @param storeId
|
||||
* @return
|
||||
*/
|
||||
public LJUserVo queryUserByStoreIdAndUserId(Integer storeId);
|
||||
|
||||
/**
|
||||
* 根据手机号和连锁店id查询会员信息
|
||||
* @param mobile
|
||||
|
@ -151,6 +151,13 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LJUserVo queryUserByStoreIdAndUserId(Integer storeId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
return baseMapper.queryUserByChainStoreId(nowAccountInfo.getId(),store.getChainStoreId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public LJUserVo selectUserByMobileAndChantStoreId(String mobile) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
|
@ -572,7 +572,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>
|
||||
@ -2062,7 +2062,7 @@
|
||||
if (this.isMember){
|
||||
if (this.balance >= (this.oilAmount - this.oilDiscount - this.fullReduction)){
|
||||
this.oilActualPay = 0
|
||||
this.consumeAmount = this.oilAmount - this.oilDiscount - this.fullReduction
|
||||
this.consumeAmount = (this.oilAmount*100 - this.oilDiscount*100 - this.fullReduction*100)/100
|
||||
}else {
|
||||
this.oilActualPay = (this.oilAmount -this.balance - this.oilDiscount - this.fullReduction).toFixed(2)
|
||||
this.consumeAmount = this.balance
|
||||
@ -2241,6 +2241,7 @@
|
||||
// 删除商品列表信息
|
||||
delGoods(index){
|
||||
this.goodsOrder.splice(index,1)
|
||||
this.handleChange()
|
||||
},
|
||||
// 添加商品列表信息
|
||||
changeGoods(val){
|
||||
@ -2250,11 +2251,6 @@
|
||||
if (this.goodsOrder.length > 0) {
|
||||
let amount = 0;
|
||||
for (let i = 0; i < goods.length; i++) {
|
||||
if (_this.isMember) {
|
||||
amount += +(goods[i].memberPrice * goods[i].num).toFixed(2)
|
||||
} else {
|
||||
amount += +(goods[i].retailPrice * goods[i].num).toFixed(2)
|
||||
}
|
||||
if (goods[i].id == val.id) {
|
||||
if (val.stock<goods[i].num + 1){
|
||||
this.$modal.msgError("商品库存不足,请重新选择商品")
|
||||
@ -2267,6 +2263,11 @@
|
||||
} else {
|
||||
result = true;
|
||||
}
|
||||
if (_this.isMember) {
|
||||
amount += +(goods[i].memberPrice * goods[i].num).toFixed(2)
|
||||
} else {
|
||||
amount += +(goods[i].retailPrice * goods[i].num).toFixed(2)
|
||||
}
|
||||
}
|
||||
this.goodsAmount = amount;
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
@ -2287,16 +2288,33 @@
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
this.goodsOrder.push(val);
|
||||
this.goodsTotal += 1;
|
||||
}else {
|
||||
console.log(222)
|
||||
if (val.stock==0){
|
||||
this.$modal.msgError("商品库存不足,请重新选择商品")
|
||||
return;
|
||||
}
|
||||
if (_this.isMember) {
|
||||
this.goodsAmount += +val.memberPrice * val.num
|
||||
} else {
|
||||
this.goodsAmount += +val.retailPrice * val.num
|
||||
}
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
}
|
||||
this.goods = ""
|
||||
|
||||
},
|
||||
// 立即结算
|
||||
settlement(){
|
||||
if (this.payType=="APPLET_CODE") {
|
||||
if (this.goodsOrder.length > 0) {
|
||||
this.$modal.msgError("非油商品不可使用小程序码支付")
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.authCode = ""
|
||||
this.seekZero = 0;
|
||||
this.isPay = false
|
||||
console.log(this.isPay)
|
||||
this.dialogVisiblej = true
|
||||
this.getStaff()
|
||||
},
|
||||
@ -2568,6 +2586,10 @@
|
||||
|
||||
let _this = this;
|
||||
if (this.payType=="APPLET_CODE"){
|
||||
if (this.goodsOrder.length>0){
|
||||
this.$modal.msgError("非油商品不可使用小程序码支付")
|
||||
return;
|
||||
}
|
||||
scanAppletQrCode(_this.map).then( resp => {
|
||||
if (resp.data.success=='success'){
|
||||
this.loading = true;
|
||||
@ -2585,8 +2607,8 @@
|
||||
}
|
||||
|
||||
addLJGoods(_this.map).then( response => {
|
||||
_this.orderNo = response.data.orderNo;
|
||||
if (response.data.oilOrder!=null){
|
||||
_this.orderNo = response.data.oilOrder.orderNo;
|
||||
if (response.data.oilOrder.orderStatus == "paid"){
|
||||
_this.isPaySuccess = true;
|
||||
_this.seekZero = 0
|
||||
@ -2709,23 +2731,6 @@
|
||||
_this.timer = setInterval(function (){
|
||||
// "234520231228115544f073f4"
|
||||
cashierOrderByOrderNo({orderNo:_this.orderNo}).then( response => {
|
||||
if (response.data!=null){
|
||||
if (response.data.orderStatus == "unpaid"){
|
||||
_this.isQuery = true;
|
||||
}
|
||||
if (response.data.orderStatus == "paid"){
|
||||
_this.isPaySuccess = true;
|
||||
_this.isQuery = false;
|
||||
_this.amount = 0
|
||||
}
|
||||
if (response.data.orderStatus == "payFail"){
|
||||
_this.isPaySuccess = false;
|
||||
_this.isQuery = false;
|
||||
}
|
||||
}
|
||||
_this.resetting1();
|
||||
})
|
||||
goodsOrder({orderNo:_this.orderNo}).then( response => {
|
||||
if (response.data!=null){
|
||||
if (response.data.status == "unpaid"){
|
||||
_this.isQuery = true;
|
||||
|
Loading…
Reference in New Issue
Block a user