# Conflicts:
#	pos-uni/pages/my/my.vue
This commit is contained in:
DESKTOP-369JRHT\12997 2024-05-29 15:16:16 +08:00
commit aff136295e
18 changed files with 451 additions and 103 deletions

View File

@ -140,26 +140,26 @@ public class FyPayController {
String orderLock = "orderLock_notify"+orderNo;
if (redisLock.tryLock(orderLock,5000, TimeUnit.MILLISECONDS)){
// 业务逻辑 判断订单状态
// AllOrderInfo allOrderInfo = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo);
// if (ObjectUtil.isNotEmpty(allOrderInfo)){
// allOrderInfo.setPayMoney(Double.valueOf(settleOrderAmt)/100);
// allOrderInfo.setTransactionId(transactionId);
// allOrderInfo.setStatus("paid");
// allOrderInfo.setPayTime(new Date());
// allOrderInfoService.updateAllOrderInfo(allOrderInfo);
//
// // 修改配置收款账户余额信息
// MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(allOrderInfo.getStoreId());
// Double beforeAmount = merchantConfig.getAmount();
// Double afterAmount = beforeAmount + allOrderInfo.getPayMoney();
// merchantConfig.setAmount(afterAmount);
// merchantConfigService.updateMerch(merchantConfig);
// merchantConfigRecordService.updateMerchantConfigRecordByOrderNo(orderNo,"yes");
// }
//
// updateOrderStatus(orderNo,allOrderInfo.getType());
//// 修改订单支付状态
// redisLock.unlock(orderLock);
AllOrderInfo allOrderInfo = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo);
if (ObjectUtil.isNotEmpty(allOrderInfo)){
allOrderInfo.setPayMoney(Double.valueOf(settleOrderAmt)/100);
allOrderInfo.setTransactionId(transactionId);
allOrderInfo.setStatus("paid");
allOrderInfo.setPayTime(new Date());
allOrderInfoService.updateAllOrderInfo(allOrderInfo);
// 修改配置收款账户余额信息
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(allOrderInfo.getStoreId());
Double beforeAmount = merchantConfig.getAmount();
Double afterAmount = beforeAmount + allOrderInfo.getPayMoney();
merchantConfig.setAmount(afterAmount);
merchantConfigService.updateMerch(merchantConfig);
merchantConfigRecordService.updateMerchantConfigRecordByOrderNo(orderNo,"yes");
}
updateOrderStatus(orderNo,allOrderInfo.getType());
// 修改订单支付状态
redisLock.unlock(orderLock);
}
// transaction_id 加锁
return "1";

View File

@ -50,8 +50,8 @@ public class Const {
//小程序异步通知(回调地址)
// public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
public static String notify_url = "http://k40180f897.goho.co/api/fyPay/notify";
// public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
// public static String notify_url = "http://k40180f897.goho.co/api/fyPay/notify";
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
//主扫异步通知(回调地址)
// public static String notify_url_scan = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notifyScan";

View File

@ -824,6 +824,7 @@ public class FyPayServiceImpl implements FyPayService {
map.put("random_str", "orderNo");
map.put("order_type", receiveParameterPos.getPayType());
map.put("goods_des", receiveParameterPos.getContent());
map.put("goods_detail", receiveParameterPos.getContent());
double amount = receiveParameterPos.getGoodsMoney() * 100;
map.put("order_amt", String.valueOf((int) amount));
String nowtime = DateUtil.format(new Date(), "yyyyMMddHHmmss");
@ -834,6 +835,18 @@ public class FyPayServiceImpl implements FyPayService {
Const.INS_PUBLIC_KEY = publicKey;
Const.INS_PRIVATE_KEY = privateKey;
if (ObjectUtil.isNotEmpty(merchantConfig)) {
// 添加配置记录信息
MerchantConfigRecord merchantConfigRecord = new MerchantConfigRecord();
merchantConfigRecord.setMerchantId(merchantConfig.getId());
merchantConfigRecord.setIsSuccess("no");
merchantConfigRecord.setAmount(receiveParameterPos.getGoodsMoney());
merchantConfigRecord.setType("0");
merchantConfigRecord.setStoreId(merchantConfig.getStoreId());
merchantConfigRecord.setOrderNo(receiveParameterPos.getOrderNo());
merchantConfigRecordService.insertMerchantConfigRecord(merchantConfigRecord);
}
// 请求报文
String reqBody = Message.requestMsg(map);
// 响应报文
@ -844,6 +857,13 @@ public class FyPayServiceImpl implements FyPayService {
String str = resMap.get("sign");
if (Utils.verifySign(resMap, str)) {
OilOrder oilOrder = oilOrderService.selectOilOrderByOrderNo(receiveParameterPos.getOrderNo());
ReceiveParameter receiveParameter = new ReceiveParameter();
BeanUtils.copyProperties(receiveParameterPos, receiveParameter);
// 添加订单信息
Double discountAmount = 0.0;
if (ObjectUtil.isNotEmpty(oilOrder)) discountAmount = oilOrder.getDiscountAmount();
this.insertAllOrderInfo(receiveParameter, discountAmount);
System.out.println(resMap);
}
return resMap;

View File

@ -13,6 +13,7 @@ import com.fuint.common.util.TokenUtil;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import com.fuint.system.dept.vo.SysDeptVo;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -51,6 +52,23 @@ public class AllOrderInfoController extends BaseController {
return getSuccessResult(list);
}
@GetMapping("getPageListByPosRecentThree")
public ResponseObject getPageListByPosRecentThree(AllOrderInfo allOrderInfo,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
IPage<AllOrderInfoVo> list = allOrderInfoService.getPageListByPos(page, allOrderInfo);
if (ObjectUtils.isNotEmpty(list)){
List<AllOrderInfoVo> records = list.getRecords();
if (ObjectUtils.isNotEmpty(records) && records.size()>2){
List<AllOrderInfoVo> allOrderInfoVos = records.subList(0, 3);
list.setRecords(allOrderInfoVos);
}
}
return getSuccessResult(list);
}
@GetMapping("sumPayMoney")

View File

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

View File

@ -222,5 +222,5 @@ public interface OilOrderService extends IService<OilOrder> {
* @param oilOrderVo
* @return
*/
Map<String, String> addOrderPosScan(OilOrderVo oilOrderVo) throws Exception;
Map<String, Object> addOrderPosScan(OilOrderVo oilOrderVo) throws Exception;
}

View File

@ -1727,7 +1727,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
int row = 0;
OilOrder oilOrder = this.selectOilOrderByOrderNo(orderNo);
Integer userId = oilOrder.getUserId();
LJUser user = userService.queryUserByUserId(userId);
LJUser user = null;
if (ObjectUtil.isNotEmpty(userId)) user = userService.queryUserByUserId(userId);
if (ObjectUtil.isNotEmpty(oilOrder)) {
// oilOrder.setPayAmount(oilOrder.getOrderAmount()-oilOrder.getDiscountAmount());
oilOrder.setOrderStatus(status);
@ -1781,14 +1782,16 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cardValueChildOrder.setPayTime(new Date());
cardValueChildOrderService.updateCardValueChildOrder(cardValueChildOrder);
if (ObjectUtil.isNotEmpty(user)) {
// 查询主卡信息
CardValudChildrens cardValudChildrens = cardValudChildrensService.selectCardValueChildrenByMobileAndStoreId(user.getMobile(), oilOrder.getStoreId());
userId = cardValudChildrens.getUserId();
CardValudChildrens cardValudChildrens = cardValudChildrensService.selectCardValueChildrenByMobileAndStoreId(user.getMobile(), oilOrder.getStoreId());
userId = cardValudChildrens.getUserId();
}
}
this.updateGrowthValue(oilOrder.getOrderAmount(), oilOrder.getPayAmount(), userId, Integer.valueOf(oilOrder.getOils()), null, oilOrder.getStoreId(), orderNo);
if (ObjectUtil.isNotEmpty(userId)) this.updateGrowthValue(oilOrder.getOrderAmount(), oilOrder.getPayAmount(), userId, Integer.valueOf(oilOrder.getOils()), null, oilOrder.getStoreId(), orderNo);
this.addOilTracks(oilOrder, oilOrder.getStoreId());
this.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getActiveId(), oilOrder.getCouponId(), oilOrder.getActiveType(), oilOrder.getOrderAmount(), oilOrder.getPayAmount(), Integer.valueOf(oilOrder.getOils()));
this.insertCardBalance(oilOrder.getOrderAmount() - oilOrder.getDiscountAmount() - oilOrder.getPayAmount(), userId, oilOrder.getStoreId(), orderNo);
if (ObjectUtil.isNotEmpty(userId)) this.insertCardBalance(oilOrder.getOrderAmount() - oilOrder.getDiscountAmount() - oilOrder.getPayAmount(), userId, oilOrder.getStoreId(), orderNo);
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId()))
staffCommissionService.countStaffCommission(oilOrder.getStaffId(), oilOrder.getStoreId(), oilOrder.getOrderAmount(), oilOrder.getPayAmount(), "1", orderNo);
}
@ -2385,7 +2388,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
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());
this.insertFavorable(oilOrderVo, oilOrderVo.getOilCardAmount1());
if (ObjectUtil.isNotEmpty(oilOrderVo.getUserId())) integralSettingsService.refuelPoints(oilOrderVo);
//修改优惠券使用状态
if (oilOrderVo.getCouponId() != null) {
@ -2406,8 +2409,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
}
@Override
public Map<String, String> addOrderPosScan(OilOrderVo oilOrderVo) throws Exception {
Map<String, String> res = new HashMap<>();
public Map<String, Object> addOrderPosScan(OilOrderVo oilOrderVo) throws Exception {
Map<String, Object> res = new HashMap<>();
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
// 根据日期生成订单信息
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
@ -2415,23 +2418,34 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
String randomString = UUID.randomUUID().toString().replace("-", "").substring(0, 6);
String orderNo = "2345" + timestamp + randomString;
oilOrderVo.setOrderNo(orderNo);
oilOrderVo.setStoreId(nowAccountInfo.getStoreId());
oilOrderVo.setStaffId(nowAccountInfo.getStaffId());
oilOrderVo.setTerminal("POS");
oilOrderVo.setOrderStatus("unpaid");
oilOrderVo.setOrderType("主订单");
int row = baseMapper.insert(oilOrderVo);
if (ObjectUtil.isNotEmpty(oilOrderVo.getOrderNo())){
OilOrder oilOrder = this.selectOilOrderByOrderNo(oilOrderVo.getOrderNo());
oilOrderVo.setId(oilOrder.getId());
oilOrderVo.setOrderNo(orderNo);
baseMapper.updateById(oilOrderVo);
}else {
oilOrderVo.setOrderNo(orderNo);
baseMapper.insert(oilOrderVo);
}
ReceiveParameterPos receiveParameterPos = new ReceiveParameterPos();
// receiveParameterPos.setPayType("WECHAT");
receiveParameterPos.setPayType(oilOrderVo.getPayType());
receiveParameterPos.setType("1");
receiveParameterPos.setContent("油品订单");
receiveParameterPos.setOrderNo(orderNo);
receiveParameterPos.setStoreId(oilOrderVo.getStoreId());
receiveParameterPos.setStoreId(oilOrderVo.getUserId());
receiveParameterPos.setUserId(oilOrderVo.getUserId());
receiveParameterPos.setGoodsMoney(oilOrderVo.getPayAmount());
receiveParameterPos.setOilCardAmount(oilOrderVo.getOilCardAmount1());
Map<String, String> mainScan = fyPayService.mainScan(receiveParameterPos);
return mainScan;
res.put("oilOrder",this.selectOilOrderByOrderNo(orderNo));
res.put("scanCode",mainScan);
return res;
}
}

View File

@ -1,20 +1,23 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
{
// launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version" : "0.0",
"configurations" : [
{
"app-plus" : {
"launchtype" : "local"
},
"default" : {
"launchtype" : "local"
},
"mp-weixin" : {
"launchtype" : "local"
},
"type" : "uniCloud"
},
{
"playground" : "standard",
"type" : "uni-app:app-android"
}
]
}

View File

@ -62,10 +62,10 @@
</view>
</view>
<!-- bai -->
<view class="bai-box">
<!-- <view class="bai-box">
<u-icon name="bell" color="#E61D2A" size="18"></u-icon>
<view class="hy-size">您有新的交易日报生成请点击查看</view>
</view>
</view> -->
</view>
<tabbar :msg='msg'></tabbar>
</view>
@ -117,7 +117,7 @@
},
goCode() {
uni.navigateTo({
url: '/pagesHome/PaymentCode/PaymentCode'
url: '/pagesHome/PaymentCode/SetUpCode'
})
},
gochangeShifts() {

View File

@ -17,11 +17,16 @@
</view>
</view>
<view class="jg-box">
<view class="h-box" @click="golist()">
<!-- <view class="h-box" @click="golist()">
<view class="">消息通知</view>
<u-icon name="arrow-right" size="18"></u-icon>
<<<<<<< HEAD
</view>
<view class="h-box" @click="goServiceList()">
=======
</view> -->
<view class="h-box">
<view class="">服务条款</view>
<u-icon name="arrow-right" size="18"></u-icon>
</view>

View File

@ -7,6 +7,7 @@
</view>
<view class="p-size">请将您的卡片插入POS机</view>
</view>
<!-- qq-->
</view>
</template>

View File

@ -39,7 +39,6 @@
:key="index" @click="getspearIndex(index,item)">
{{item.gunName}}
</view>
</view>
<view style="width: 100%; height: 500px; "></view>
<view class="bai-kuang">
@ -85,8 +84,8 @@
<u--textarea v-model="value1" placeholder="请输入内容"></u--textarea>
<view
style="width: 100%; display: flex;align-items: center;justify-content: space-around;margin-top: 20px; ">
<view class="anniuq">确定</view>
<view class="anniux">取消</view>
<view class="anniuq" @click="submitRemark()">确定</view>
<view class="anniux" @click="close">取消</view>
</view>
</view>
</u-popup>
@ -228,6 +227,11 @@
headers
},
methods: {
//
submitRemark(){
this.show = false
this.oilOrder.remark = this.value1
},
close() {
this.show = false
},
@ -446,9 +450,12 @@
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
if (this.userInfo){
this.oilOrder.userId = this.userInfo.id
this.oilOrder.payUser = this.userInfo.mobile
}
request({
url: "business/oilOrder/addOrderPos",
method: 'post',
@ -463,7 +470,7 @@
// })
uni.navigateTo({
url: "/pagesHome/PaymentResults/PaymentResults"
url: "/pagesHome/PaymentResults/PaymentResults?orderNo="+this.orderNo
})
} else if (res.data.code == 2) {
uni.showToast({

View File

@ -10,23 +10,23 @@
<u-icon name="scan" color="#fff" size="38"></u-icon>
</view> -->
<view class="box_">
<view class="leftbox">
<view class="leftbox" @click="goChooseUser()">
<view class="title_">会员信息</view>
<view v-if="true">
<view v-if="!isChooseUser">
请选择会员
</view>
<view v-if="false">
<view v-if="isChooseUser">
<view class="d-s">
<view class="hui">会员名称:</view>
<view class="hei"> 胡桃</view>
<view class="hei">{{userInfo.name}}</view>
</view>
<view class="d-s">
<view class="hui">手机号:</view>
<view class="hei"> 153****9968</view>
<view class="hei">{{userInfo.mobile}}</view>
</view>
<view class="d-s">
<view class="hui">账户余额:</view>
<view class="hei"> 1854.96</view>
<view class="hei">{{userInfo.cardBalance}}</view>
</view>
</view>
</view>
@ -56,7 +56,10 @@
<view class="">微信扫码支付</view>
</view>
<view class="qiu"></view>
<view class="qiu" v-if="memberId != 0" @click="getmemberId(0)"></view>
<view class="qiux" v-if="memberId == 0">
<u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view>
</view>
<view class="h-box">
<view class="h-ds">
@ -66,7 +69,10 @@
<view class="">支付宝扫码支付</view>
</view>
<view class="qiu"></view>
<view class="qiu" v-if="memberId != 1" @click="getmemberId(1)"></view>
<view class="qiux" v-if="memberId == 1">
<u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view>
</view>
<view class="h-box">
<view class="h-ds">
@ -76,7 +82,23 @@
<view class="">银联扫码支付</view>
</view>
<view class="qiu"></view>
<view class="qiu" v-if="memberId != 2" @click="getmemberId(2)"></view>
<view class="qiux" v-if="memberId == 2">
<u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view>
</view>
<view class="h-box">
<view class="h-ds">
<view class="icon-img">
<image src="../../static/imgs/xjzf.png" mode=""></image>
</view>
<view class="">现金支付</view>
</view>
<view class="qiu" v-if="memberId != 3" @click="getmemberId(3)"></view>
<view class="qiux" v-if="memberId == 3">
<u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view>
</view>
</view>
<view class="bottom-b"></view>
@ -89,6 +111,7 @@
</template>
<script>
import request from "../../utils/request";
import headers from '../../components/header/headers.vue'
export default {
@ -96,6 +119,7 @@
return {
titles: "会员充值",
listindex: 0,
memberId: 0,
numList: [
"50元",
"100元",
@ -103,8 +127,17 @@
"500元",
"1000元",
"自定义金额",
]
],
isChooseUser: false,
userId: "",
userInfo: "",
}
},
onLoad(e) {
this.userId = e.userId
if (e.userId) {
this.isChooseUser = true
this.getUser()
}
},
onShow() {
@ -125,13 +158,31 @@
headers
},
methods: {
getmemberId(num) {
this.memberId = num
console.log(this.memberId);
},
//
getUser() {
request({
url: '/business/userManager/user/' + this.userId,
method: 'get',
}).then((res) => {
this.userInfo = res.data
})
},
goChooseUser() {
uni.navigateTo({
url: "/pagesHome/searchVip/searchVip?type=1"
})
},
getindex(index) {
this.listindex = index
},
govipjs() {
uni.navigateTo({
url: '/pagesHome/PaymentResults/PaymentResults'
})
// uni.navigateTo({
// url: '/pagesHome/MemberRecharge/list'
// })
},
goback() {
uni.navigateBack()
@ -343,4 +394,16 @@
border-radius: 50%;
border: 1px solid #333333;
}
.qiux {
width: 16px;
height: 16px;
border-radius: 50%;
border: 1px solid #0864e9;
background: #0864e9;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
</style>

View File

@ -22,11 +22,16 @@
data() {
return {
titles: "刷卡支付",
orderNo:"",
qrCode:"",
}
},
onLoad() {
onLoad(e) {
this.orderNo = e.orderNo
this.qrCode = uni.getStorageSync("qrCode")
console.log(this.qrCode);
this.onReady()
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
@ -49,14 +54,14 @@
//
setAmount() {
uni.navigateTo({
url: "/pagesHome/PaymentCode/SetUpCode"
url: "/pagesHome/PaymentCode/SetUpCode?orderNo="+this.orderNo
})
},
onReady() {
// uQRCode
var qr = new UQRCode();
//
qr.data = "https://uqrcode.cn/doc";
qr.data = this.qrCode;
// canvas
qr.size = 200;
//

View File

@ -4,30 +4,73 @@
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
<view class="b-box">
<view class="">金额</view>
<view style="text-align: right;"><input type="text" placeholder="请输入金额" /></view>
<view style="text-align: right;"><input type="text" v-model="oilOrder.orderAmount" placeholder="请输入金额" /></view>
</view>
<view class="b-box">
<view class="">备注</view>
<view style="text-align: right;"><input type="text" placeholder="请输入备注" /></view>
<view style="text-align: right;"><input type="text" v-model="oilOrder.remark" placeholder="请输入备注" /></view>
</view>
<view class="title_">选择油枪</view>
<view class="warp-box">
<view class="w-box" :class="{ 'acv' : spearIndex == index }" v-for="(item,index) in spearList"
:key="index" @click="getspearIndex(index,item)">
{{item.gunName}}
</view>
</view>
<view class="title_">选择支付方式</view>
<view class="warp-box">
<view class="w-box" :class="{ 'acv' : payIndex == index }" v-for="(item,index) in payList"
v-if="item.dictValue != 'CASH' && item.dictValue != 'APPLET_CODE'"
style="width: 100px;"
:key="index" @click="getpayIndex(index,item)">
{{item.dictLabel}}
</view>
</view>
<view class="bottom-b"></view>
<view class="p-bottom" @click="addOrder()">
<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: "设置金额",
spearList: [
"1号枪", "2号枪", "3号枪"
],
spearIndex: 0,
payList:[],
payIndex:0,
oilName: "",
tankId: "",
oilPrice: "",
oilGunNum: "",
oilOrder:{},
orderNo:"",
qrCode:"",
}
},
onLoad(e) {
uni.removeStorageSync("qrCode")
this.orderNo = e.orderNo
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
this.getOilGun()
this.getPayList()
},
onPullDownRefresh() {
console.log("刷新");
@ -43,6 +86,64 @@
headers
},
methods: {
//
addOrder(){
if (this.orderNo) this.oilOrder.orderNo = this.orderNo
this.oilOrder.payAmount = this.oilOrder.orderAmount
this.oilOrder.oils = this.oilName
this.oilOrder.tankId = this.tankId
this.oilOrder.oilPrice = this.oilPrice
this.oilOrder.oilGunNum = this.oilGunNum
request({
url: 'business/oilOrder/addOrderScanPos',
method: 'post',
data:this.oilOrder
}).then((res) => {
this.orderNo = res.data.oilOrder.orderNo
this.qrCode = res.data.scanCode.qr_code
uni.setStorageSync("qrCode",this.qrCode)
uni.navigateTo({
url:"/pagesHome/PaymentCode/PaymentCode?orderNo="+this.orderNo
})
})
},
//
getOilGun() {
request({
url: 'business/petrolStationManagement/oilGun/queryOilGunList',
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
}
})
},
getspearIndex(num, data) {
this.spearIndex = num
this.oilGunNum = data.id
this.oils = data.oilName
this.tankId = data.tankId
this.oilPrice = data.oilPrice
},
//
getPayList(){
request({
url: '/system/dict/data/type/payment_type',
method: 'get',
}).then((res) => {
this.payList = res.data
this.oilOrder.payType = res.data[0].dictValue
})
},
getpayIndex(num, data) {
this.payIndex = num
this.oilOrder.payType = data.dictValue
},
goback() {
uni.navigateBack()
}
@ -84,4 +185,65 @@
box-sizing: border-box;
padding: 10px;
}
.bottom-b {
width: 100%;
height: 68px;
}
.p-bottom {
width: 100%;
height: 68px;
background: #fff;
position: fixed;
bottom: 0px;
left: 0px;
}
.anniu {
height: 40px;
background: #0864E9;
width: 80%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
border-radius: 50px;
margin: 5px auto;
}
.title_ {
font-weight: bold;
font-size: 16px;
color: black;
width: 95%;
margin: 10px auto;
}
.warp-box {
width: 95%;
margin: 10px auto;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.w-box {
width: 60px;
height: 32px;
background: #FFFFFF;
border-radius: 6px 6px 6px 6px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
font-size: 14px;
color: #333333;
margin-right: 10px;
}
.acv {
background: #E8F5FF !important;
color: #0864E9 !important;
}
</style>

View File

@ -6,21 +6,33 @@
<image src="../../static/imgs/zfcg.png" mode=""></image>
</view>
<view class="title_">支付成功</view>
<!-- <view class="top_" v-if="oilOrder.orderStatus!='paid'">
<image src="../../static/imgs/zfsb.png" mode=""></image>
</view>
<view class="title_" v-if="oilOrder.orderStatus!='paid'">支付失败</view> -->
<view class="b-bs">
<view class="h-size">应收金额</view>
<view class="red-size">200.00</view>
<view class="red-size">{{oilOrder.orderAmount}}</view>
</view>
<view class="b-bs">
<view class="h-size">优惠金额</view>
<view class="red-size">200.00</view>
<view class="red-size">{{oilOrder.discountAmount}}</view>
</view>
<view class="b-bs">
<view class="h-size">实收金额</view>
<view class="red-size">200.00</view>
<view class="red-size">{{oilOrder.payAmount}}</view>
</view>
<view class="b-bs">
<view class="h-size">储值卡消费金额</view>
<view class="red-size">{{oilOrder.balanceAmount}}</view>
</view>
<view class="b-bs">
<view class="h-size">支付方式</view>
<view class="h-size">现金支付</view>
<view class="h-size" v-if="oilOrder.payType=='ALIPAY'">支付宝支付</view>
<view class="h-size" v-if="oilOrder.payType=='WECHAT'">微信支付</view>
<view class="h-size" v-if="oilOrder.payType=='UNIONPAY'">银联二维码支付</view>
<view class="h-size" v-if="oilOrder.payType=='CASH'">现金支付</view>
<view class="h-size" v-if="oilOrder.payType=='APPLET_CODE'">小程序码支付</view>
</view>
</view>
<view class="p-bottom">
@ -32,18 +44,24 @@
</template>
<script>
import request from "../../utils/request";
import headers from '../../components/header/headers.vue'
export default {
data() {
return {
titles: "支付结果",
orderNo:"",
oilOrder:{},
}
},
onLoad(e) {
this.orderNo = e.orderNo
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
this.getOilOrder()
},
onPullDownRefresh() {
console.log("刷新");
@ -59,8 +77,20 @@
headers
},
methods: {
//
getOilOrder(){
request({
url: '/business/oilOrder/orderNo',
method: 'post',
data:{orderNo:this.orderNo}
}).then((res) => {
this.oilOrder = res.data
})
},
goback() {
uni.navigateBack()
uni.navigateTo({
url:"/pages/index/index"
})
}
}
}

View File

@ -52,17 +52,19 @@
return {
titles: "会员查询",
//
list:[],
total:0,
paramsQuery:{
page:1,
pageSize:30,
list: [],
total: 0,
paramsQuery: {
page: 1,
pageSize: 30,
},
AmountCollected:"",
AmountCollected: "",
type: "",
}
},
onLoad(e) {
this.AmountCollected = e.AmountCollected
this.type = e.type
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
@ -87,12 +89,20 @@
headers
},
methods: {
toCollection(id){
uni.navigateTo({
url:"/pagesHome/Collection/Collection?userId="+id+"&AmountCollected="+this.AmountCollected
})
toCollection(id) {
if (this.type && this.type == 1) {
uni.navigateTo({
url: "/pagesHome/MemberRecharge/MemberRecharge?userId=" + id
})
} else {
uni.navigateTo({
url: "/pagesHome/Collection/Collection?userId=" + id + "&AmountCollected=" + this
.AmountCollected
})
}
},
getList(){
getList() {
request({
url: '/business/userManager/user/list',
method: 'get',
@ -105,7 +115,7 @@
}
this.total = res.data.total
})
},
govipjs() {
uni.navigateTo({

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB