This commit is contained in:
cun-nan 2024-05-27 16:56:51 +08:00
parent 8a6a373981
commit dfce05d949
18 changed files with 794 additions and 312 deletions

View File

@ -100,26 +100,26 @@
></el-statistic>
</div>
</el-col>
<el-col :span="4">
<div class="sta" v-if="!refuelMoney">
<el-statistic
group-separator=","
:precision="2"
:value="0"
title="囤油卡余额"
>
<!-- <span></span>-->
</el-statistic>
</div>
<div v-if="refuelMoney && refuelMoney.length>0" style="display: flex;align-items: center;margin-top: 25px">
<div class="size-hui">囤油卡余额</div>
<div v-for="(item,index) in refuelMoney"
:key="index" style="margin-left: 20px;text-align: center">
<div class="size-hui">{{ item.oilName ? item.type + item.oilName : item.type }}</div>
<div class="size-bole">{{ item.refuelMoney || 0.00 }}</div>
</div>
</div>
</el-col>
<!-- <el-col :span="4">-->
<!-- <div class="sta" v-if="!refuelMoney">-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :precision="2"-->
<!-- :value="0"-->
<!-- title="囤油卡余额"-->
<!-- >-->
<!-- &lt;!&ndash; <span></span>&ndash;&gt;-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- <div v-if="refuelMoney && refuelMoney.length>0" style="display: flex;align-items: center;margin-top: 25px">-->
<!-- <div class="size-hui">囤油卡余额</div>-->
<!-- <div v-for="(item,index) in refuelMoney"-->
<!-- :key="index" style="margin-left: 20px;text-align: center">-->
<!-- <div class="size-hui">{{ item.oilName ? item.type + item.oilName : item.type }}</div>-->
<!-- <div class="size-bole">{{ item.refuelMoney || 0.00 }}</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-col>-->
</el-row>
</div>
</template>
@ -158,7 +158,7 @@
<el-dialog :close-on-click-modal="false" width="60%" :title="title" :visible.sync="openRecharge" append-to-body>
<template>
<el-tabs v-model="activeRecharge" type="card" @tab-click="handleClick">
<el-tab-pane label="储值卡" name="balance">
<el-tab-pane label="电子储值卡" name="balance">
<div>
<el-row>
<el-col :span="1.5">
@ -277,7 +277,7 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="油卡" name="literCard" v-if="oilTypeList && oilTypeList.length>0">
<el-tab-pane label="电子囤油卡" name="literCard" v-if="oilTypeList && oilTypeList.length>0">
<el-row>
<el-col :span="24">
<div style="display: flex">

View File

@ -39,4 +39,8 @@ public class ReceiveParameterPos {
* 订单描述
*/
private String content;
/**
* 订单描述
*/
private Double oilCardAmount;
}

View File

@ -28,6 +28,7 @@ import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -58,6 +59,7 @@ public class FyPayServiceImpl implements FyPayService {
/**
* 条码支付
*
* @param map1
* @return
*/
@ -190,7 +192,8 @@ public class FyPayServiceImpl implements FyPayService {
oilOrder.setPayTime(date);
oilOrderService.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getActiveId(), oilOrder.getCouponId(), oilOrder.getActiveType(), oilOrder.getOrderAmount(), oilOrder.getPayAmount(), Integer.valueOf(oilOrder.getOils()));
oilOrderService.insertFavorable(oilOrder, Double.valueOf(map1.get("oilCardAmount")));
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId())) staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(),"1",orderNo);
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId()))
staffCommissionService.countStaffCommission(oilOrder.getStaffId(), oilOrder.getStoreId(), oilOrder.getOrderAmount(), oilOrder.getPayAmount(), "1", orderNo);
// 修改油罐容量
List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class);
if (jsonObjects.size() <= 1) {
@ -219,7 +222,8 @@ public class FyPayServiceImpl implements FyPayService {
if (goodsOrder.getUserId() != null) {
isMember = true;
}
if (ObjectUtil.isNotEmpty(goodsOrder.getStaffId())) staffCommissionService.countStaffCommission(goodsOrder.getStaffId(),goodsOrder.getStoreId(),goodsOrder.getAmount(),goodsOrder.getPayAmount(),"2",orderNo);
if (ObjectUtil.isNotEmpty(goodsOrder.getStaffId()))
staffCommissionService.countStaffCommission(goodsOrder.getStaffId(), goodsOrder.getStoreId(), goodsOrder.getAmount(), goodsOrder.getPayAmount(), "2", orderNo);
if (!map1.get("goodsOrder").equals("[]")) {
List<JSONObject> goods = JSONArray.parseArray(map1.get("goodsOrder"), JSONObject.class);
OrderGoods orderGoods = new OrderGoods();
@ -256,7 +260,8 @@ public class FyPayServiceImpl implements FyPayService {
}
for (OilOrder order : list) {
if (order.getOrderType().equals("主订单")) {
if (ObjectUtil.isNotEmpty(order.getStaffId()))staffCommissionService.countStaffCommission(order.getStaffId(),order.getStoreId(),order.getOrderAmount(),order.getPayAmount(),"1",orderNo);
if (ObjectUtil.isNotEmpty(order.getStaffId()))
staffCommissionService.countStaffCommission(order.getStaffId(), order.getStoreId(), order.getOrderAmount(), order.getPayAmount(), "1", orderNo);
}
// 添加多个油品订单
order.setOrderStatus("paid");
@ -338,7 +343,9 @@ public class FyPayServiceImpl implements FyPayService {
payStates = "payFail";
}
}
Double discountAmount = 0.0;
if (!ObjectUtil.isEmpty(oilOrder)) {
discountAmount = oilOrder.getDiscountAmount();
receiveParameter.setType("1");
if (oilOrder.getUserId() != null) {
receiveParameter.setUserId(oilOrder.getUserId());
@ -348,6 +355,7 @@ public class FyPayServiceImpl implements FyPayService {
oilOrderService.updateOilOrder(oilOrder);
}
if (!ObjectUtil.isEmpty(goodsOrder)) {
discountAmount = goodsOrder.getDiscount();
receiveParameter.setType("2");
if (goodsOrder.getUserId() != null) {
receiveParameter.setUserId(goodsOrder.getUserId());
@ -357,6 +365,7 @@ public class FyPayServiceImpl implements FyPayService {
goodsOrderService.updateGoodOrder(goodsOrder);
}
if (!ObjectUtil.isEmpty(cashierOrder)) {
discountAmount = cashierOrder.getOilDiscountAmount() + cashierOrder.getGoodsDiscountAmount();
receiveParameter.setType("6");
if (!ObjectUtil.isEmpty(oilOrder)) {
if (oilOrder.getUserId() != null) {
@ -410,7 +419,7 @@ public class FyPayServiceImpl implements FyPayService {
}
if (!reqMap.get("trans_stat").equals("USERPAYING")) {
this.insertAllOrderInfo(receiveParameter,payStatus);
this.insertAllOrderInfo(receiveParameter, payStatus,discountAmount);
}
if (ObjectUtil.isNotEmpty(merchantConfig)) {
@ -510,8 +519,11 @@ public class FyPayServiceImpl implements FyPayService {
String str = resMap.get("sign");
if (Utils.verifySign(resMap, str)) {
System.out.println(resMap);
OilOrder oilOrder = oilOrderService.selectOilOrderByOrderNo(receiveParameter.getOrderNo());
// 添加订单信息
this.insertAllOrderInfo(receiveParameter);
Double discountAmount = 0.0;
if (ObjectUtil.isNotEmpty(oilOrder)) discountAmount = oilOrder.getDiscountAmount();
this.insertAllOrderInfo(receiveParameter, discountAmount);
res.put("code", "success");
res.put("msg", "成功");
@ -542,7 +554,7 @@ public class FyPayServiceImpl implements FyPayService {
/**
* 添加所有订单信息
*/
private void insertAllOrderInfo(ReceiveParameter receiveParameter,String payStatus){
private void insertAllOrderInfo(ReceiveParameter receiveParameter, String payStatus,Double discountAmount) {
AllOrderInfo allOrderInfo = new AllOrderInfo();
allOrderInfo.setOrderNo(receiveParameter.getOrderNo());
allOrderInfo.setType(receiveParameter.getType());
@ -553,6 +565,7 @@ public class FyPayServiceImpl implements FyPayService {
allOrderInfo.setUserId(receiveParameter.getUserId());
allOrderInfo.setPayChannel("cashier");
allOrderInfo.setStatus(payStatus);
allOrderInfo.setDiscountAmount(discountAmount);
if (payStatus.equals("paid")) {
allOrderInfo.setPayTime(new Date());
}
@ -566,7 +579,7 @@ public class FyPayServiceImpl implements FyPayService {
/**
* 添加所有订单信息
*/
private void insertAllOrderInfo(ReceiveParameter receiveParameter){
private void insertAllOrderInfo(ReceiveParameter receiveParameter,Double discountAmount) {
AllOrderInfo allOrderInfo = new AllOrderInfo();
allOrderInfo.setOrderNo(receiveParameter.getOrderNo());
allOrderInfo.setType(receiveParameter.getType());
@ -577,6 +590,7 @@ public class FyPayServiceImpl implements FyPayService {
allOrderInfo.setPayChannel("applet");
allOrderInfo.setStatus("unpaid");
allOrderInfo.setContent(receiveParameter.getContent());
allOrderInfo.setDiscountAmount(discountAmount);
AllOrderInfo allOrderInfo1 = allOrderInfoService.selectAllOrderInfoByOrderNo(receiveParameter.getOrderNo());
if (ObjectUtil.isEmpty(allOrderInfo1)) {
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
@ -639,7 +653,7 @@ public class FyPayServiceImpl implements FyPayService {
String privateKey = merchantConfig.getPrivateKey();
Const.INS_PUBLIC_KEY = publicKey;
Const.INS_PRIVATE_KEY = privateKey;
String allAmount = String.valueOf(receiveParameterPos.getGoodsMoney()*100);
String allAmount = String.valueOf((int) (receiveParameterPos.getGoodsMoney() * 100));
Map<String, String> map = Builder.buildFuiou22();
map.put("auth_code", receiveParameterPos.getAuthCode());
map.put("mchnt_order_no", receiveParameterPos.getOrderNo());
@ -672,6 +686,8 @@ public class FyPayServiceImpl implements FyPayService {
try {
Map<String, String> orderQueryRes = queryOrderPos(receiveParameterPos, merchantConfig.getInsCd(), merchantConfig.getMchntCd());
if (!orderQueryRes.get("msg").equals("unpaid")) {
res.put("code", "success");
res.put("msg", "success");
timer.cancel();
}
} catch (Exception e) {
@ -688,7 +704,7 @@ public class FyPayServiceImpl implements FyPayService {
} catch (Exception e) {
e.printStackTrace();
}
return null;
return res;
}
@Override
@ -698,10 +714,11 @@ public class FyPayServiceImpl implements FyPayService {
try {
Map<String, String> map = Builder.buildFuiou30();
map.put("mchnt_order_no", receiveParameterPos.getOrderNo());
map.put("order_type",receiveParameterPos.getType());
map.put("order_type", receiveParameterPos.getPayType());
map.put("ins_cd", insCd);
map.put("mchnt_cd", mchntCd);
String payStatus = "unpaid";
// 请求报文
String reqBody = Message.requestMsg(map);
// 响应报文
@ -711,18 +728,81 @@ public class FyPayServiceImpl implements FyPayService {
Map<String, String> reqMap = Utils.xmlStr2Map(rspXml);
String str = reqMap.get("sign");
if (Utils.verifySign(reqMap, str)) {
OilOrder oilOrder = oilOrderService.selectOilOrderByOrderNo(receiveParameterPos.getOrderNo());
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(receiveParameterPos.getStoreId());
ReceiveParameter receiveParameter = new ReceiveParameter();
BeanUtils.copyProperties(receiveParameterPos, receiveParameter);
Double discountAmount = 0.0;
if (ObjectUtil.isNotEmpty(oilOrder)) discountAmount = oilOrder.getDiscountAmount();
this.insertAllOrderInfo(receiveParameter, receiveParameterPos.getPayType(),discountAmount);
if (reqMap.get("trans_stat").equals("SUCCESS")) {
payStatus = "paid";
if (!ObjectUtil.isEmpty(oilOrder)) {
// 油品订单
oilOrder.setOrderStatus("paid");
oilOrder.setPayTime(new Date());
oilOrderService.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getActiveId(), oilOrder.getCouponId(), oilOrder.getActiveType(), oilOrder.getOrderAmount(), oilOrder.getPayAmount(), Integer.valueOf(oilOrder.getOils()));
oilOrderService.insertFavorable(oilOrder, receiveParameterPos.getOilCardAmount());
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId()))
staffCommissionService.countStaffCommission(oilOrder.getStaffId(), oilOrder.getStoreId(), oilOrder.getOrderAmount(), oilOrder.getPayAmount(), "1", receiveParameterPos.getOrderNo());
// 修改油罐容量
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);
}
}
}
// 修改商户账号余额信息
Double amount = merchantConfig.getAmount();
merchantConfig.setAmount(amount + receiveParameterPos.getGoodsMoney());
merchantConfigService.updateMerch(merchantConfig);
resMap.put("msg", "success");
} else if (reqMap.get("trans_stat").equals("USERPAYING")) {
payStatus = "unpaid";
resMap.put("msg", "unpaid");
} else {
payStatus = "payFail";
if (!ObjectUtil.isEmpty(oilOrder)) {
oilOrder.setOrderStatus("payFail");
}
resMap.put("msg", "payFail");
}
if (!ObjectUtil.isEmpty(oilOrder)) {
receiveParameter.setType("1");
if (oilOrder.getUserId() != null) {
receiveParameter.setUserId(oilOrder.getUserId());
}
receiveParameter.setContent("油品订单");
oilOrderService.updateOilOrder(oilOrder);
}
if (ObjectUtil.isNotEmpty(merchantConfig)) {
// 添加配置记录信息
MerchantConfigRecord merchantConfigRecord = new MerchantConfigRecord();
merchantConfigRecord.setMerchantId(merchantConfig.getId());
if (payStatus.equals("paid")) {
merchantConfigRecord.setIsSuccess("yes");
} else {
merchantConfigRecord.setIsSuccess("no");
}
merchantConfigRecord.setAmount(receiveParameterPos.getGoodsMoney());
merchantConfigRecord.setType("0");
merchantConfigRecord.setStoreId(merchantConfig.getStoreId());
merchantConfigRecord.setOrderNo(receiveParameterPos.getOrderNo());
merchantConfigRecordService.insertMerchantConfigRecord(merchantConfigRecord);
}
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
return resMap;
}
@Override

View File

@ -322,4 +322,13 @@ public class OilOrderController extends BaseController {
return getSuccessResult(orderService.getInfoByEm(order));
}
/**
* pos端扫码支付
* @param oilOrderVo
* @return
*/
@PostMapping("addOrderPos")
public ResponseObject addOrderPos(@RequestBody OilOrderVo oilOrderVo) throws Exception {
return getSuccessResult(orderService.addOrderPos(oilOrderVo));
}
}

View File

@ -51,6 +51,10 @@ public class AllOrderInfo extends BaseEntity implements Serializable {
* 支付金额
*/
private Double payMoney;
/**
* 优惠金额
*/
private Double discountAmount;
/**
* 支付时间
*/

View File

@ -209,7 +209,7 @@ public interface OilOrderService extends IService<OilOrder> {
* @param oilOrderVo
* @return
*/
int addOrderPos(OilOrderVo oilOrderVo);
Map<String,String> addOrderPos(OilOrderVo oilOrderVo) throws Exception;
/**
* 添加订单信息 主扫

View File

@ -71,6 +71,7 @@ import com.fuint.common.util.StringUtils;
import com.fuint.common.util.TokenUtil;
import com.fuint.system.config.service.SysConfigService;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
@ -526,7 +527,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setPayAmount(0.0);
}
cashierOrder.setPayTime(new Date());
this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid");
this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),oilDiscount,payType,userId,"PC","6","paid");
}else {
cashierOrder.setPayAmount(oilActualPay+goodsActualPay);
}
@ -574,7 +575,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
// throw new RuntimeException("支付失败");
}
}else {
this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid");
this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),oilDiscount,payType,userId,"PC","6","paid");
}
OilOrder oilOrder2 = this.selectOilOrderByOrderNo(orderNo);
@ -916,7 +917,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setSeekZero(0.0);
cashierOrder.setPayType(map.get("payType"));
cashierOrderService.insertCashierOrder(cashierOrder);
this.insertAllOrderInfo(orderNo, storeId, oilAmount, oilAmount, map.get("payType"), userId, "PC", "1", status);
this.insertAllOrderInfo(orderNo, storeId, oilAmount, oilAmount,0.0, map.get("payType"), userId, "PC", "1", status);
if (ObjectUtil.isNotEmpty(map.get("staffId"))) staffCommissionService.countStaffCommission(Integer.valueOf(map.get("staffId")),storeId,oilAmount,oilAmount,"1",orderNo);
res.put("success","success");
}
@ -988,7 +989,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setPayType(map.get("payType"));
cashierOrderService.insertCashierOrder(cashierOrder);
this.updateGrowthValue1(oilAmount,oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo);
this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,oilAmount,map.get("payType"),userId,"PC","1","paid");
this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,oilAmount,0.0,map.get("payType"),userId,"PC","1","paid");
if (ObjectUtil.isNotEmpty(map.get("staffId"))) staffCommissionService.countStaffCommission(Integer.valueOf(map.get("staffId")),storeId,oilAmount,oilAmount,"1",orderNo);
// this.insertCardBalance(oilAmount,userId,storeId);
res.put("success","success");
@ -1006,7 +1007,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
/**
* 添加所有订单信息
*/
private void insertAllOrderInfo(String orderNo,Integer storeId,Double goodsMoney,Double payAmount,String payType,Integer userId,String payChannel,String type,String status){
private void insertAllOrderInfo(String orderNo,Integer storeId,Double goodsMoney,Double payAmount,Double discountAmount,String payType,Integer userId,String payChannel,String type,String status){
AllOrderInfo allOrderInfo = new AllOrderInfo();
allOrderInfo.setOrderNo(orderNo);
allOrderInfo.setType(type);
@ -1016,6 +1017,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
allOrderInfo.setUserId(userId);
allOrderInfo.setPayChannel(payChannel);
allOrderInfo.setStatus(status);
allOrderInfo.setDiscountAmount(discountAmount);
if (status.equals("paid")){
allOrderInfo.setPayMoney(payAmount);
allOrderInfo.setPayTime(new Date());
@ -1227,7 +1229,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
userId = userVo.getId();
if (!isUseChild.equals("yes")){
applet.put("error","不可使用子卡消费!");
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),0.0, oilOrder.getPayType(), userId,oilOrder.getPayType(),"1","payFail");
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),0.0,oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId,oilOrder.getPayType(),"1","payFail");
result = true;
}
}
@ -1238,7 +1240,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
if (balanceAmount.equals("0") && map.get("payAmount").equals("0")) {
if (Double.compare(oilCardLiters,oilOrder.getOilNum())!=0){
applet.put("error","囤油卡消费升数不对!");
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),0.0, oilOrder.getPayType(), userId,oilOrder.getPayType(),"1","payFail");
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),0.0,oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId,oilOrder.getPayType(),"1","payFail");
result = true;
}
}else {
@ -1246,7 +1248,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
Double residueAmount = useLiters * oilNumber.getOilPrice();
if ((Double.valueOf(map.get("payAmount"))+Double.valueOf(balanceAmount)-residueAmount)>=0.05){
applet.put("error","消费总金额不对!");
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),0.0, oilOrder.getPayType(), userId,oilOrder.getPayType(),"1","payFail");
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),0.0,oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId,oilOrder.getPayType(),"1","payFail");
result = true;
}
}
@ -1257,7 +1259,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
// if (Double.compare(realAmount,oilOrder.getOrderAmount())!=0){
if (-0.03>=(realAmount-oilOrder.getOrderAmount()) && (realAmount-oilOrder.getOrderAmount())>=0.03){
applet.put("error","消费总金额不对!");
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),0.0, oilOrder.getPayType(), userId,oilOrder.getPayType(),"1","payFail");
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),0.0,oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId,oilOrder.getPayType(),"1","payFail");
result = true;
}
}
@ -1316,7 +1318,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
this.updateGrowthValue(oilOrder.getOrderAmount(),payAmount,userId, Integer.valueOf(oilOrder.getOils()),oilCardAmount,oilOrder.getStoreId(),orderNo);
this.addOilTracks(oilOrder,oilOrder.getStoreId());
this.insertCardOrder(oilOrder.getUserId(),oilOrder.getStoreId(),orderNo,oilOrder.getOrderAmount(),"paid", Double.valueOf(balanceAmount),payAmount);
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),payAmount,oilOrder.getPayType(),oilOrder.getUserId(),"applet","1","paid");
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),payAmount,Double.valueOf(discountAmount),oilOrder.getPayType(),oilOrder.getUserId(),"applet","1","paid");
this.insertCardBalance(Double.valueOf(balanceAmount),userId,oilOrder.getStoreId(),orderNo);
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId())) staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getOrderAmount(),"1",orderNo);
oilOrder.setPayAmount(payAmount);
@ -1986,7 +1988,8 @@ return stringDoubleMap;
// pos端
@Override
public int addOrderPos(OilOrderVo oilOrderVo) {
public Map<String,String> addOrderPos(OilOrderVo oilOrderVo) throws Exception {
Map<String,String> res = new HashMap<>();
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
// 根据日期生成订单信息
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
@ -2001,14 +2004,67 @@ return stringDoubleMap;
oilOrderVo.setOilNum(oilNum);
oilOrderVo.setTerminal("POS");
oilOrderVo.setOrderType("主订单");
if (oilOrderVo.getPayType().equals("CASH")){
if (ObjectUtil.isNotEmpty(oilOrderVo.getPayType()) && oilOrderVo.getPayType().equals("CASH")){
oilOrderVo.setOrderStatus("paid");
oilOrderVo.setPayTime(new Date());
}else {
oilOrderVo.setOrderStatus("unpaid");
}
if (ObjectUtil.isNotEmpty(oilOrderVo.getAuthCode())) {
Double substring = Double.valueOf(oilOrderVo.getAuthCode().substring(0, 2));
if (substring >= 10 && substring <= 15) {
oilOrderVo.setPayType("WECHAT");
} else if (substring >= 25 && substring <= 30) {
oilOrderVo.setPayType("ALIPAY");
} else if (substring == 62) {
oilOrderVo.setPayType("UNIONPAY");
}
}
int row = baseMapper.insert(oilOrderVo);
return row;
ReceiveParameterPos receiveParameterPos = new ReceiveParameterPos();
receiveParameterPos.setStoreId(nowAccountInfo.getStoreId());
receiveParameterPos.setType("1");
receiveParameterPos.setOrderNo(orderNo);
receiveParameterPos.setContent("油品订单支付");
receiveParameterPos.setPayType(oilOrderVo.getPayType());
receiveParameterPos.setGoodsMoney(oilOrderVo.getPayAmount());
receiveParameterPos.setAuthCode(oilOrderVo.getAuthCode());
receiveParameterPos.setUserId(oilOrderVo.getUserId());
receiveParameterPos.setOilCardAmount(oilOrderVo.getOilCardAmount1());
if (ObjectUtil.isNotEmpty(oilOrderVo.getAuthCode()) && oilOrderVo.getPayAmount()>0){
try {
fyPayService.posPay(receiveParameterPos);
// if (stringObjectMap.get("code").equals("success")){
// row = 1;
// }else {
// row = 2;
// }
}catch (Exception e){
e.printStackTrace();
}
}else {
staffCommissionService.countStaffCommission(nowAccountInfo.getStaffId(),nowAccountInfo.getStoreId(),oilOrderVo.getOrderAmount(),oilOrderVo.getPayAmount(),"1",orderNo);
this.addOilTracks(oilOrderVo,nowAccountInfo.getStoreId());
this.updateCardAndActiveById(nowAccountInfo.getStoreId(),oilOrderVo.getUserId(),oilOrderVo.getActiveId(),oilOrderVo.getCouponId(),oilOrderVo.getActiveType(),oilOrderVo.getOrderAmount(),oilOrderVo.getPayAmount(), Integer.valueOf(oilOrderVo.getOils()));
this.insertAllOrderInfo(orderNo,nowAccountInfo.getStoreId(),oilOrderVo.getOrderAmount(),oilOrderVo.getPayAmount(),oilOrderVo.getDiscountAmount(),oilOrderVo.getPayType(),oilOrderVo.getUserId(),"POS","1","paid");
this.insertFavorable(oilOrderVo, oilOrderVo.getOilCardAmount());
if (ObjectUtil.isNotEmpty(oilOrderVo.getUserId())) integralSettingsService.refuelPoints(oilOrderVo);
//修改优惠券使用状态
if (oilOrderVo.getCouponId() != null) {
CardFavorableRecord byId = cardFavorableRecordService.getById(oilOrderVo.getCouponId());
if (!ObjectUtil.isEmpty(byId)) {
byId.setStatus("1");
cardFavorableRecordService.updateById(byId);
}
}
row = 1;
}
if (row == 1 && ObjectUtil.isNotEmpty(oilOrderVo.getUserId())){
this.updateGrowthValue(oilOrderVo.getOrderAmount(),oilOrderVo.getPayAmount(), oilOrderVo.getUserId(), Integer.valueOf(oilOrderVo.getOils()),null,nowAccountInfo.getStoreId(),orderNo);
}
res.put("orderNo",orderNo);
res.put("code", String.valueOf(row));
return res;
}
@Override

View File

@ -29,6 +29,9 @@ public class OilOrderVo extends OilOrder {
// 优惠券优惠金额
@TableField(exist = false)
private Double couponAmount;
@TableField(exist = false)
private String authCode;
@TableField(exist = false)
private Double oilCardAmount1;
}

View File

@ -123,7 +123,7 @@
and store_id = #{oilGun.storeId}
</select>
<select id="selectListByStoreId" resultType="com.fuint.business.petrolStationManagement.vo.OilGunVO">
SELECT og.*,onu.oil_name FROM oil_gun og
SELECT og.*,onu.oil_name,onu.oil_Price FROM oil_gun og
LEFT JOIN oil_number onu on og.number_id = onu.number_id
where og.status = '启用'
<if test="storeId != null">

View File

@ -102,6 +102,9 @@ public class PrinterServiceImpl implements PrinterService {
@Override
public String getToken(Integer storeId) {
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
if (ObjectUtil.isEmpty(infoByStoreId)){
return "error";
}
RequestMethod.getInstance().init(infoByStoreId.getAppKey(),infoByStoreId.getAppSecret());
try {

View File

@ -594,7 +594,7 @@
<el-dialog :close-on-click-modal="false" width="60%" title="会员充值" :visible.sync="openRecharge" append-to-body>
<template>
<el-tabs v-model="activeRecharge" type="card" @tab-click="handleClick">
<el-tab-pane label="储值卡" name="balance">
<el-tab-pane label="电子储值卡" name="balance">
<div style="font-size: 14px">
<div style="font-size: 14px;height: 50px;line-height: 50px">充值金额</div>
<div v-if="cardValueList.length>0"
@ -708,7 +708,7 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="油卡" name="literCard">
<el-tab-pane label="电子囤油卡" name="literCard">
<el-row>
<el-col :span="24">
<div style="display: flex">
@ -3377,7 +3377,7 @@
}else {
this.oilActualPay = this.oilAmount.toFixed(2)
}
console.log("不使用囤油卡",this.oilAmount, this.oilDiscount,this.couponAmount,this.fullReduction)
console.log("不使用囤油卡",this.oilAmount, this.oilDiscount,this.couponAmount,this.fullReduction,this.oilCardAmount)
},
// 使
countAmountUnBalance(){
@ -3896,7 +3896,7 @@
if (flag) amount = item.oilPrice * item.liters
oilAmount += amount
})
this.oilCardAmount = this.oilAmount - oilAmount
if (oilAmount>0) this.oilCardAmount = this.oilAmount - oilAmount
this.countAmountFull()
})
},

View File

@ -101,25 +101,25 @@
></el-statistic>
</div>
</el-col>
<el-col :span="4">
<div class="sta" v-if="!refuelMoney">
<el-statistic
group-separator=","
:precision="2"
:value="0"
title="囤油卡余额"
>
</el-statistic>
</div>
<div v-if="refuelMoney && refuelMoney.length>0" style="display: flex;align-items: center;margin-top: 25px">
<div class="size-hui">囤油卡余额</div>
<div v-for="(item,index) in refuelMoney"
:key="index" style="margin-left: 20px;text-align: center">
<div class="size-hui">{{ item.oilName ? item.type + item.oilName : item.type }}</div>
<div class="size-bole">{{ item.refuelMoney || 0.00 }}</div>
</div>
</div>
</el-col>
<!-- <el-col :span="4">-->
<!-- <div class="sta" v-if="!refuelMoney">-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :precision="2"-->
<!-- :value="0"-->
<!-- title="囤油卡余额"-->
<!-- >-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- <div v-if="refuelMoney && refuelMoney.length>0" style="display: flex;align-items: center;margin-top: 25px">-->
<!-- <div class="size-hui">囤油卡余额</div>-->
<!-- <div v-for="(item,index) in refuelMoney"-->
<!-- :key="index" style="margin-left: 20px;text-align: center">-->
<!-- <div class="size-hui">{{ item.oilName ? item.type + item.oilName : item.type }}</div>-->
<!-- <div class="size-bole">{{ item.refuelMoney || 0.00 }}</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-col>-->
</el-row>
</div>
</template>
@ -158,7 +158,7 @@
<el-dialog :close-on-click-modal="false" width="60%" :title="title" :visible.sync="openRecharge" append-to-body>
<template>
<el-tabs v-model="activeRecharge" type="card" @tab-click="handleClick">
<el-tab-pane label="储值卡" name="balance">
<el-tab-pane label="电子储值卡" name="balance">
<div>
<el-row>
<el-col :span="1.5">
@ -278,7 +278,7 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="油卡" name="literCard">
<el-tab-pane label="电子囤油卡" name="literCard">
<el-row>
<el-col :span="24">
<div style="display: flex">

View File

@ -2,6 +2,10 @@
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"

View File

@ -50,7 +50,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid": "wx7ad01a99a7247643",
"appid" : "wx64893d1680461e30",
"setting" : {
"urlCheck" : false,
"es6" : true,

View File

@ -77,6 +77,13 @@
"navigationBarTitleText": "消息列表",
"navigationStyle": "custom"
}
},
{
"path": "scanQrcode/index",
"style": {
"navigationBarTitleText": "扫码支付",
"navigationStyle": "custom"
}
}
]

View File

@ -3,15 +3,27 @@
<view class="container">
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
<view class="input-box">
<view style="margin-right: 10px;">收款金额</view>
<view style="margin-right: 10px;">收款金额</view>
<view class="">{{AmountCollected}}</view>
<!-- <input type="number" /> -->
</view>
<view class="input-box">
<view style="margin-right: 10px;">优惠后收款金额</view>
<view class="">{{paymentAmount}}</view>
<!-- <input type="number" /> -->
</view>
<view class="input-box">
<view style="margin-right: 10px;">优惠金额</view>
<view class="">{{DiscountAmount}}</view>
<!-- <input type="number" /> -->
</view>
<view class="input-box">
<view style="margin-right: 10px;">储值卡消费金额</view>
<view class="">{{balanceRedece}}</view>
<!-- <input type="number" /> -->
</view>
<!-- <view class="title_">选择油号</view>
<view class="warp-box">
@ -23,8 +35,8 @@
</view> -->
<view class="title_">选择油枪</view>
<view class="warp-box">
<view class="w-box" :class="{ 'acv' : spearIndex == index }" @click="getspearIndex(index)"
v-for="(item,index) in spearList" :key="index">
<view class="w-box" :class="{ 'acv' : spearIndex == index }" v-for="(item,index) in spearList"
:key="index" @click="getspearIndex(index,item)">
{{item.gunName}}
</view>
@ -34,7 +46,7 @@
<view class="kuang-top">
<view class="w-shi">添加备注</view>
<view style="color: #E8E8E8;"> | </view>
<view class="w-shi" @click="gosearchVip()">搜索会员</view>
<view class="w-shi" @click="gosearchVip()">{{userInfo ? userInfo.mobile : '搜索会员'}}</view>
</view>
<!-- 键盘区域 -->
<view class="num-box">
@ -46,16 +58,18 @@
</view>
<view class="Centralimg" v-if="item.type == 'img' ">
<view class="icon-box">
<image src="/static/imgs/smzf.png" v-if="item.value == 'smzf' "></image>
<image src="/static/imgs/smzf.png" v-if="item.value == 'smzf' " @click="scanQrcode">
</image>
<image src="/static/imgs/skzf.png" v-if="item.value == 'skzf' "></image>
<image src="/static/imgs/hyzf.png" v-if="item.value == 'hyzf' "></image>
<image src="/static/imgs/xjzf.png" v-if="item.value == 'xjzf' "></image>
<image src="/static/imgs/xjzf.png" v-if="item.value == 'xjzf' " @click="cashPay">
</image>
<image src="/static/imgs/scjian.png" style="height: 30px;" v-if="!item.value"></image>
</view>
<view class="icon-size" v-if="item.value == 'smzf' ">扫码支付</view>
<view class="icon-size" v-if="item.value == 'smzf' " @click="scanQrcode">扫码支付</view>
<view class="icon-size" v-if="item.value == 'skzf' ">刷卡支付</view>
<view class="icon-size" v-if="item.value == 'hyzf' ">会员支付</view>
<view class="icon-size" v-if="item.value == 'xjzf' ">现金支付</view>
<view class="icon-size" v-if="item.value == 'xjzf' " @click="cashPay">现金支付</view>
</view>
</view>
@ -75,8 +89,25 @@
export default {
data() {
return {
AmountCollected: '',
DiscountAmount: '',
userId: "",
userInfo: "",
AmountCollected: "",
paymentAmount: "",
DiscountAmount: 0,
balance: 0,
balanceRedece: 0,
// 使
isOilStorageCard: false,
authCode: "",
oilName: "",
tankId: "",
oilPrice: "",
oilGunNum: "",
oilCardAmount: 0,
levelAmount: 0,
activeAmount: 0,
//
oilOrder: {},
titles: "收款",
oilList: [
"92#", "95#", "98#"
@ -86,6 +117,8 @@
"1号枪", "2号枪", "3号枪"
],
spearIndex: 0,
orderNo:"",
preferentialData: {},
//
keyboardList: [{
value: '1',
@ -155,6 +188,13 @@
}
},
onLoad(e) {
if (e.userId) {
this.userId = e.userId
this.AmountCollected = e.AmountCollected
this.getUser();
}
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
@ -174,6 +214,189 @@
headers
},
methods: {
//
getPaymentPreferential() {
if (!this.AmountCollected || !this.userInfo) {
return;
}
this.DiscountAmount = 0;
let type = 0;
if (this.balanceRedece == 0) {
type = 2
} else {
type = 0
}
let map = {
// 0 1
type: type,
//
amount: this.AmountCollected,
//Id
oilId: this.oilName,
//id
storeId: uni.getStorageSync("storeId"),
//
mtUserLevel: this.userInfo.gradeId,
//id
userId: this.userInfo.id,
}
request({
url: "business/marketingActivity/activeExchange/getPaymentActive",
method: 'get',
params: map,
}).then((res) => {
this.preferentialData = res.data
if (res.data.memberFavorableAmount) {
this.DiscountAmount += res.data.memberFavorableAmount
this.oilOrder.levelAmount = res.data.memberFavorableAmount
}
if (res.data.cardFavorableAmount) {
this.DiscountAmount += res.data.cardFavorableAmount
}
if (res.data.activeFavorableAmount) {
this.DiscountAmount += res.data.activeFavorableAmount
this.oilOrder.activeAmount = res.data.activeFavorableAmount
}
this.countAmount()
})
},
//
getUser() {
request({
url: '/business/userManager/user/' + this.userId,
method: 'get',
}).then((res) => {
this.userInfo = res.data
this.balance = res.data.cardBalance
this.getPaymentPreferential()
})
},
//
countAmount() {
if (this.balance >= (this.AmountCollected - this.DiscountAmount - this.oilCardAmount)) {
this.balanceRedece = this.AmountCollected - this.DiscountAmount - this.oilCardAmount
this.paymentAmount = 0
} else {
this.balanceRedece = this.balance
this.paymentAmount = (this.AmountCollected - this.DiscountAmount - this.balance - this.oilCardAmount).toFixed(2)
}
},
//
scanQrcode() {
console.log(this.oilOrder);
if (!this.AmountCollected) {
uni.showToast({
title: "请先输入收款金额",
icon: "none"
})
return;
}
let _this = this
uni.scanCode({
onlyFromCamera: true,
success: (res) => {
console.log('扫描二维码成功,结果:' + JSON.stringify(res) + res.result);
_this.authCode = res.result
_this.payMent()
},
error: (res) => {
console.log('扫描二维码出现错误')
}
})
},
//
cashPay() {
this.oilOrder.payType = "CASH"
this.payMent()
},
getOilCardAmount(){
if(!this.userInfo){
return;
}
request({
url: '/business/marketingActivity/cardFuelRecord/getRecordByUserId',
method: 'get',
params:{mtUserId:this.userInfo.id}
}).then((res) => {
res.data.forEach(item => {
if (item.oilType==this.oilName){
let liters = this.AmountCollected / this.oilPrice
this.oilCardAmount = item.lockupPrice * liters
}
})
})
},
//
payMent() {
this.oilOrder.orderNo = this.orderNo
this.oilOrder.orderAmount = this.AmountCollected
this.oilOrder.payAmount = this.paymentAmount
this.oilOrder.discountAmount = this.DiscountAmount
this.oilOrder.balanceAmount = this.balanceRedece
this.oilOrder.isOilStorageCard = this.isOilStorageCard
this.oilOrder.isUseChildCard = this.isUseChildCard
this.oilOrder.activeId = this.preferentialData.activeId
this.oilOrder.cardFavorableId = this.preferentialData.cardFavorableId
this.oilOrder.recordId = this.preferentialData.recordId
this.oilOrder.type = this.preferentialData.type
this.oilOrder.balanceAmountSale = this.balanceRedece
this.oilOrder.levelAmount = this.levelAmount
this.oilOrder.activeAmount = this.activeAmount
this.oilOrder.authCode = this.authCode
this.oilOrder.oils = this.oilName
this.oilOrder.tankId = this.tankId
this.oilOrder.oilPrice = this.oilPrice
this.oilOrder.oilCardAmount1 = this.oilCardAmount
this.oilOrder.userId = this.userInfo.id
this.oilOrder.oilGunNum = this.oilGunNum
this.oilOrder.payUser = this.userInfo.mobile
request({
url: "business/oilOrder/addOrderPos",
method: 'post',
data: this.oilOrder
}).then((res) => {
this.orderNo = res.data.orderNo
if (res.data.code == 1) {
this.reset()
uni.showToast({
title: "支付成功",
icon: "success"
})
// uni.navigateTo({
// url:"/pages/index/index"
// })
} else if (res.data.code == 2) {
uni.showToast({
title: "请先配置商户号",
icon: "none"
})
} else {
uni.showToast({
title: "支付失败,请联系管理员",
icon: "none"
})
}
})
},
//
reset() {
this.userId = "";
this.userInfo = "";
this.AmountCollected = "";
this.DiscountAmount = 0;
this.balanceRedece = 0;
this.isOilStorageCard = false;
this.balanceRedece = 0;
this.authCode = "";
this.oilName = "";
this.tankId = "";
this.oilPrice = "";
this.oilCardAmount = 0;
this.paymentAmount = 0;
this.levelAmount = 0;
this.activeAmount = 0;
this.getOilGun()
},
//
getOilGun() {
request({
@ -181,23 +404,30 @@
method: 'get',
}).then((res) => {
this.spearList = res.data
if (this.spearList.length > 0) {
this.oilGunNum = this.spearList[0].id
this.oilName = this.spearList[0].oilName
this.tankId = this.spearList[0].tankId
this.oilPrice = this.spearList[0].oilPrice
}
})
},
//
gosearchVip() {
uni.navigateTo({
url: '/pagesHome/searchVip/searchVip'
url: '/pagesHome/searchVip/searchVip?AmountCollected=' + this.AmountCollected
})
},
//
KeyboardLogic(data) {
console.log(data);
// console.log(data);
if (data.type == 'num') {
this.AmountCollected = this.AmountCollected + data.value
if (!this.userInfo) this.paymentAmount = this.AmountCollected
this.getPaymentPreferential()
}
if (data.type == 'img') {
if (!data.value) {
console.log('1');
this.AmountCollected = this.AmountCollected.substring(0, this.AmountCollected.length - 1);
}
if (data.value == 'skzf') {
@ -212,8 +442,13 @@
getoilIndex(num) {
this.oilIndex = num
},
getspearIndex(num) {
getspearIndex(num, data) {
this.spearIndex = num
this.oilGunNum = data.id
this.oils = data.oilName
this.tankId = data.tankId
this.oilPrice = data.oilPrice
this.getPaymentPreferential()
},
goback() {
uni.navigateBack()

View File

@ -0,0 +1,41 @@
<template>
<view class="container">
<mumu-get-qrcode @success='qrcodeSucess' @error="qrcodeError"></mumu-get-qrcode> //
</view>
</template>
<script>
import mumuGetQrcode from '@/uni_modules/mumu-getQrcode/components/mumu-getQrcode/mumu-getQrcode.vue' //
export default {
components: {
mumuGetQrcode //
},
data() {
return {
}
},
name: 'Qrcode',
methods: {
qrcodeSucess(data) { //
console.log(data,123)
uni.showModal({
title: '成功',
content: data,
success: () => {
console.log(111)
}
})
},
qrcodeError(err) { //
uni.showModal({
title: '摄像头授权失败',
content: '摄像头授权失败,请检测当前浏览器是否有摄像头权限。',
success: () => {
console.log(222)
uni.navigateBack({}) //
}
})
}
}
};
</script>

View File

@ -5,27 +5,27 @@
<view class="top-box">
<view class="inputbox">
<u-icon name="search" size="20"></u-icon>
<input type="text" />
<input type="text" v-model="paramsQuery.mobile" />
</view>
<u-icon name="scan" color="#fff" size="38"></u-icon>
<u-icon name="search" color="#fff" size="38" @click="getList"></u-icon>
</view>
<view class="box_" v-for="(item,index) in 8" :key="index">
<view class="box_" v-for="(item,index) in list" :key="index" @click="toCollection(item.id)">
<view class="leftbox">
<view class="title_">会员信息</view>
<view class="d-s">
<view class="hui">会员名称:</view>
<view class="hei"> 胡桃</view>
<view class="hei"> {{item.name}}</view>
</view>
<view class="d-s">
<view class="hui">手机号:</view>
<view class="hei"> 153****9968</view>
<view class="hei"> {{item.mobile}}</view>
</view>
<view class="d-s">
<view class="hui">账户余额:</view>
<view class="hei"> 1854.96</view>
<view class="hei"> {{item.cardBalance}}</view>
</view>
</view>
@ -35,33 +35,49 @@
</view>
</view>
<view class="bottom-b"></view>
<view class="p-bottom" @click="govipjs()">
<!-- <view class="p-bottom" @click="govipjs()">
<view class="anniu">
会员支付
</view>
</view>
</view> -->
</view>
</template>
<script>
import request from "../../utils/request";
import headers from '../../components/header/headers.vue'
export default {
data() {
return {
titles: "会员查询",
//
list:[],
total:0,
paramsQuery:{
page:1,
pageSize:30,
},
AmountCollected:"",
}
},
onLoad(e) {
this.AmountCollected = e.AmountCollected
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
this.getList()
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
if (this.list.length < this.total) {
this.paramsQuery.page++;
this.getList()
}
// this.show = true
setTimeout(() => {
console.log("加载执行");
@ -71,6 +87,26 @@
headers
},
methods: {
toCollection(id){
uni.navigateTo({
url:"/pagesHome/Collection/Collection?userId="+id+"&AmountCollected="+this.AmountCollected
})
},
getList(){
request({
url: '/business/userManager/user/list',
method: 'get',
params: this.paramsQuery
}).then((res) => {
if (this.paramsQuery.page == 1) {
this.list = res.data.records
} else {
this.list = this.list.concat(res.data.records)
}
this.total = res.data.total
})
},
govipjs() {
uni.navigateTo({
url: '/pagesHome/PaymentResults/PaymentResults'