修改bug
This commit is contained in:
parent
93e3d51e5b
commit
4fa7be30bd
@ -14,9 +14,9 @@
|
|||||||
<el-select v-model="queryParams.oilType" clearable placeholder="请选择">
|
<el-select v-model="queryParams.oilType" clearable placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in oilList"
|
v-for="dict in oilList"
|
||||||
:key="dict.oilName"
|
:key="dict.id"
|
||||||
:label="dict.oilName"
|
:label="dict.oilName"
|
||||||
:value="dict.oilName">
|
:value="dict.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select v-model="queryParams.activeStatus" placeholder="请选择" style="margin:0px 20px">
|
<el-select v-model="queryParams.activeStatus" placeholder="请选择" style="margin:0px 20px">
|
||||||
@ -167,10 +167,8 @@
|
|||||||
<el-select v-model="ruleForm.oilType" placeholder="请选择" >
|
<el-select v-model="ruleForm.oilType" placeholder="请选择" >
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in oilList"
|
v-for="dict in oilList"
|
||||||
|
|
||||||
:key="dict.id.toString()"
|
:key="dict.id.toString()"
|
||||||
:label="dict.oilName"
|
:label="dict.oilName"
|
||||||
|
|
||||||
:value="dict.id.toString()">
|
:value="dict.id.toString()">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -50,6 +50,21 @@ public class CardFuelDieselController extends BaseController {
|
|||||||
return getSuccessResult(this.cardFuelDieselService.select(page, cardFuelDiesel));
|
return getSuccessResult(this.cardFuelDieselService.select(page, cardFuelDiesel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询所有数据(小程序端)
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param cardFuelDiesel
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectAllApplet")
|
||||||
|
public ResponseObject selectAllApplet(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||||
|
@Param("cardFuelDiesel") CardFuelDiesel cardFuelDiesel) {
|
||||||
|
Page page = new Page(pageNo, pageSize);
|
||||||
|
return getSuccessResult(this.cardFuelDieselService.selectAllApplet(page, cardFuelDiesel));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过主键查询单条数据
|
* 通过主键查询单条数据
|
||||||
*
|
*
|
||||||
|
@ -165,7 +165,5 @@ public class CardFuelRecordController extends BaseController {
|
|||||||
return getSuccessResult(iPageList);
|
return getSuccessResult(iPageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,5 +11,9 @@ public class CardFuelRecordDTO extends CardFuelRecord {
|
|||||||
private Double realyPayBills;
|
private Double realyPayBills;
|
||||||
//付款类型 1.微信 2.支付宝
|
//付款类型 1.微信 2.支付宝
|
||||||
private String payType;
|
private String payType;
|
||||||
|
//优惠券id
|
||||||
|
private Integer cardFavorableId;
|
||||||
|
//卡券领取记录id
|
||||||
|
private Integer cardRecordId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -24,5 +24,7 @@ public interface CardFuelDieselService extends IService<CardFuelDiesel> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
IPage select(Page page, CardFuelDiesel cardFuelDiesel);
|
IPage select(Page page, CardFuelDiesel cardFuelDiesel);
|
||||||
|
|
||||||
|
IPage selectAllApplet(Page page, CardFuelDiesel cardFuelDiesel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,5 +80,49 @@ public class CardFuelDieselServiceImpl extends ServiceImpl<CardFuelDieselMapper,
|
|||||||
}
|
}
|
||||||
return page1;
|
return page1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询所有数据(小程序端)
|
||||||
|
* @param page
|
||||||
|
* @param cardFuelDiesel
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IPage selectAllApplet(Page page, CardFuelDiesel cardFuelDiesel) {
|
||||||
|
//构建查询条件
|
||||||
|
LambdaQueryWrapper<CardFuelDiesel> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
if(ObjectUtils.isNotEmpty(cardFuelDiesel.getOilType())){
|
||||||
|
queryWrapper.eq(CardFuelDiesel::getOilType,cardFuelDiesel.getOilType());
|
||||||
|
}
|
||||||
|
queryWrapper.eq(CardFuelDiesel::getStoreId,cardFuelDiesel.getStoreId());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFuelDiesel.getActiveStatus())){
|
||||||
|
queryWrapper.eq(CardFuelDiesel::getActiveStatus,cardFuelDiesel.getActiveStatus());
|
||||||
|
}
|
||||||
|
if(ObjectUtils.isNotEmpty(cardFuelDiesel.getType())) {
|
||||||
|
queryWrapper.eq(CardFuelDiesel::getType,cardFuelDiesel.getType());
|
||||||
|
}
|
||||||
|
queryWrapper.orderByDesc(CardFuelDiesel::getCreateTime);
|
||||||
|
IPage page1 = page(page, queryWrapper);
|
||||||
|
List<CardFuelDiesel> records = page1.getRecords();
|
||||||
|
//返回囤油卡状态
|
||||||
|
for (CardFuelDiesel record : records) {
|
||||||
|
record.setOilType(oilNameService.selectOilNameById(Integer.parseInt(record.getOilType())).getOilName());
|
||||||
|
record.setStatus(record.getStatus().equals("1") ? "true" : "false");
|
||||||
|
if(ObjectUtils.isNotEmpty(record.getActiveTime()) && "1".equals(record.getActiveTime())){
|
||||||
|
record.setActivityProgress("1");
|
||||||
|
}
|
||||||
|
//活动进度状态
|
||||||
|
if (ObjectUtils.isNotEmpty(record.getStartTime()) &&
|
||||||
|
ObjectUtils.isNotEmpty(record.getEndTime()) &&
|
||||||
|
record.getActiveTime().equals("2")){
|
||||||
|
record.setActivityProgress(record.getStartTime().getTime() > new Date().getTime() ? "0" : "");
|
||||||
|
if(ObjectUtils.isEmpty(record.getActivityProgress())){
|
||||||
|
record.setActivityProgress(record.getEndTime().getTime() > new Date().getTime() ? "1" : "2");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return page1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,6 +370,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public ReturnParameter addFuleCarRecords(CardFuelRecordDTO cardFuelRecordDTO) throws Exception {
|
public ReturnParameter addFuleCarRecords(CardFuelRecordDTO cardFuelRecordDTO) throws Exception {
|
||||||
Double cardFavorableValue = 0.0;
|
Double cardFavorableValue = 0.0;
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
@ -399,7 +400,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
|||||||
//付款类型
|
//付款类型
|
||||||
cardFuleOrders.setPayType(cardFuelRecordDTO.getPayType());
|
cardFuleOrders.setPayType(cardFuelRecordDTO.getPayType());
|
||||||
//用户信息
|
//用户信息
|
||||||
cardFuleOrders.setStoreId(ljUserVo.getStoreId());
|
cardFuleOrders.setStoreId(cardFuelRecordDTO.getStoreId());
|
||||||
cardFuleOrders.setMtUserId(ljUserVo.getId());
|
cardFuleOrders.setMtUserId(ljUserVo.getId());
|
||||||
cardFuleOrders.setName(ljUserVo.getName());
|
cardFuleOrders.setName(ljUserVo.getName());
|
||||||
cardFuleOrders.setMobile(ljUserVo.getMobile());
|
cardFuleOrders.setMobile(ljUserVo.getMobile());
|
||||||
@ -426,7 +427,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
|||||||
//封装支付参数
|
//封装支付参数
|
||||||
receiveParameter.setOrderNo(orderNo);
|
receiveParameter.setOrderNo(orderNo);
|
||||||
receiveParameter.setType("5");
|
receiveParameter.setType("5");
|
||||||
receiveParameter.setStoreId(nowAccountInfo.getStoreId());
|
receiveParameter.setStoreId(cardFuelRecordDTO.getStoreId());
|
||||||
receiveParameter.setGoodsMoney(cardFuleOrders.getPayAmount());
|
receiveParameter.setGoodsMoney(cardFuleOrders.getPayAmount());
|
||||||
receiveParameter.setPayType(cardFuleOrders.getPayType());
|
receiveParameter.setPayType(cardFuleOrders.getPayType());
|
||||||
receiveParameter.setUserId(nowAccountInfo.getId());
|
receiveParameter.setUserId(nowAccountInfo.getId());
|
||||||
@ -457,7 +458,6 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
|||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
public void fuleRechargeFinallDeal(String orderNo) throws JsonProcessingException {
|
public void fuleRechargeFinallDeal(String orderNo) throws JsonProcessingException {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
|
||||||
UserBalance userBalance1 = new UserBalance();
|
UserBalance userBalance1 = new UserBalance();
|
||||||
CardFuelRecord cardFuelRecord = new CardFuelRecord();
|
CardFuelRecord cardFuelRecord = new CardFuelRecord();
|
||||||
OilBalanceChange oilBalanceChange = new OilBalanceChange();
|
OilBalanceChange oilBalanceChange = new OilBalanceChange();
|
||||||
@ -469,7 +469,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
|||||||
cardFuleOrders.setPayTime(new Date());
|
cardFuleOrders.setPayTime(new Date());
|
||||||
cardFuleOrdersService.updateById(cardFuleOrders);
|
cardFuleOrdersService.updateById(cardFuleOrders);
|
||||||
//用户余额
|
//用户余额
|
||||||
UserBalance userBalance = userBalanceService.selectUserBalance(cardFuleOrders.getMtUserId());
|
UserBalance userBalance = userBalanceService.selectUserBalanceByStorId(cardFuleOrders.getMtUserId(),cardFuleOrders.getStoreId());
|
||||||
//用户 (新用户新建 老用户叠加)
|
//用户 (新用户新建 老用户叠加)
|
||||||
if (ObjectUtils.isNotEmpty(userBalance)){
|
if (ObjectUtils.isNotEmpty(userBalance)){
|
||||||
//积分
|
//积分
|
||||||
@ -477,45 +477,61 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
|||||||
userBalance.setPoints(userBalance.getPoints() + cardFuleOrders.getPoints());
|
userBalance.setPoints(userBalance.getPoints() + cardFuleOrders.getPoints());
|
||||||
}
|
}
|
||||||
//屯油卡余油
|
//屯油卡余油
|
||||||
if (ObjectUtils.isNotEmpty(userBalance.getRefuelMoney()) && ObjectUtils.isNotEmpty(cardFuleOrders.getIncomeLitres())
|
if (ObjectUtils.isNotEmpty(cardFuleOrders.getIncomeLitres())
|
||||||
&& ObjectUtils.isNotEmpty(cardFuleOrders.getType()) && ObjectUtils.isNotEmpty(cardFuleOrders.getOilType())){
|
&& ObjectUtils.isNotEmpty(cardFuleOrders.getType()) && ObjectUtils.isNotEmpty(cardFuleOrders.getOilType())){
|
||||||
String refuelMoney = userBalance.getRefuelMoney();
|
String refuelMoney = userBalance.getRefuelMoney();
|
||||||
List<JSONObject> jsonObjectList = JSONArray.parseArray(refuelMoney, JSONObject.class);
|
if (ObjectUtils.isNotEmpty(refuelMoney)){
|
||||||
for (JSONObject jsonObject : jsonObjectList) {
|
List<JSONObject> jsonObjectList = JSONArray.parseArray(refuelMoney, JSONObject.class);
|
||||||
if (cardFuleOrders.getOilType().equals(jsonObject.getString("oilType"))){
|
ArrayList<String> oilTypeList= new ArrayList<>();
|
||||||
double refuelMoney1 = jsonObject.getDouble("refuelMoney");
|
for (JSONObject jsonObject : jsonObjectList) {
|
||||||
refuelMoney1 = (cardFuleOrders.getIncomeLitres() + refuelMoney1);
|
String oilType = jsonObject.getString("oilType");
|
||||||
jsonObject.put("refuelMoney", refuelMoney1).toString();
|
if (ObjectUtils.isNotEmpty(oilType)){
|
||||||
|
oilTypeList.add(oilType);
|
||||||
}else {
|
}
|
||||||
|
}
|
||||||
|
//如果油品类型包括所加的油品,叠加,不包括,新增
|
||||||
|
if (oilTypeList.contains(cardFuleOrders.getOilType())){
|
||||||
|
for (JSONObject jsonObject : jsonObjectList) {
|
||||||
|
if (cardFuleOrders.getOilType().equals(jsonObject.getString("oilType"))){
|
||||||
|
double incomeLitres = jsonObject.getDouble("incomeLitres");
|
||||||
|
incomeLitres = (cardFuleOrders.getIncomeLitres() + incomeLitres);
|
||||||
|
jsonObject.put("incomeLitres", incomeLitres);
|
||||||
|
String userBnlancce = jsonObjectList.toString();
|
||||||
|
userBalance.setRefuelMoney(userBnlancce);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
JSONObject jsonObject1 = new JSONObject();
|
JSONObject jsonObject1 = new JSONObject();
|
||||||
jsonObject1.put("type",cardFuleOrders.getType());
|
jsonObject1.put("type",cardFuleOrders.getType());
|
||||||
jsonObject1.put("oilType",cardFuleOrders.getOilType());
|
jsonObject1.put("oilType",cardFuleOrders.getOilType());
|
||||||
jsonObject1.put("incomeLitres",cardFuleOrders.getIncomeLitres());
|
jsonObject1.put("incomeLitres",cardFuleOrders.getIncomeLitres());
|
||||||
jsonObjectList.add(jsonObject1);
|
jsonObjectList.add(jsonObject1);
|
||||||
|
String userBnlancce = jsonObjectList.toString();
|
||||||
|
userBalance.setRefuelMoney(userBnlancce);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
ArrayList<JSONObject> jsonObjects = new ArrayList<>();
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("type",cardFuleOrders.getType());
|
||||||
|
jsonObject.put("oilType",cardFuleOrders.getOilType());
|
||||||
|
jsonObject.put("incomeLitres",cardFuleOrders.getIncomeLitres());
|
||||||
|
jsonObjects.add(jsonObject);
|
||||||
|
userBalance.setRefuelMoney(jsonObjects.toString());
|
||||||
}
|
}
|
||||||
String userBnlancce = jsonObjectList.toString();
|
|
||||||
userBalance.setRefuelMoney(userBnlancce);
|
|
||||||
}
|
|
||||||
userBalanceService.updateUserBalance(userBalance);
|
userBalanceService.updateUserBalance(userBalance);
|
||||||
}else {
|
}else {
|
||||||
userBalance1.setMtUserId(cardFuleOrders.getMtUserId());
|
userBalance1.setMtUserId(cardFuleOrders.getMtUserId());
|
||||||
userBalance1.setStoreId(cardFuleOrders.getStoreId());
|
userBalance1.setStoreId(cardFuleOrders.getStoreId());
|
||||||
userBalance1.setChainStoreId(nowAccountInfo.getChainStoreId());
|
|
||||||
//积分
|
//积分
|
||||||
if (ObjectUtils.isNotEmpty(cardFuleOrders.getPoints())){
|
if (ObjectUtils.isNotEmpty(cardFuleOrders.getPoints())){
|
||||||
userBalance1.setPoints(cardFuleOrders.getPoints());
|
userBalance1.setPoints(cardFuleOrders.getPoints());
|
||||||
}
|
}
|
||||||
//油量
|
|
||||||
/*if (ObjectUtils.isNotEmpty(userBalance.getRefuelMoney()) && ObjectUtils.isNotEmpty(cardValueOrders.getAmount())){
|
|
||||||
userBalance.setCardBalance(userBalance.getCardBalance() + cardValueOrders.getAmount());
|
|
||||||
}*/
|
|
||||||
userBalanceService.save(userBalance1);
|
userBalanceService.save(userBalance1);
|
||||||
}
|
}
|
||||||
//用户余额变化记录
|
//用户余油变化记录
|
||||||
oilBalanceChange.setUserId(cardFuleOrders.getMtUserId());
|
oilBalanceChange.setUserId(cardFuleOrders.getMtUserId());
|
||||||
oilBalanceChange.setChainStoreId(nowAccountInfo.getChainStoreId());
|
|
||||||
oilBalanceChange.setStoreId(cardFuleOrders.getStoreId());
|
oilBalanceChange.setStoreId(cardFuleOrders.getStoreId());
|
||||||
oilBalanceChange.setChangeType("1");
|
oilBalanceChange.setChangeType("1");
|
||||||
oilBalanceChange.setFromType("囤油卡充值");
|
oilBalanceChange.setFromType("囤油卡充值");
|
||||||
@ -541,7 +557,6 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
|||||||
cardFuelRecord.setPayStatus("paid");
|
cardFuelRecord.setPayStatus("paid");
|
||||||
cardFuelRecord.setStoreId(cardFuleOrders.getStoreId());
|
cardFuelRecord.setStoreId(cardFuleOrders.getStoreId());
|
||||||
cardFuelRecord.setPaymentNo(cardFuleOrders.getOrderNo());
|
cardFuelRecord.setPaymentNo(cardFuleOrders.getOrderNo());
|
||||||
cardFuelRecord.setChainStoreId(nowAccountInfo.getChainStoreId());
|
|
||||||
cardFuelRecord.setType(cardFuleOrders.getType());
|
cardFuelRecord.setType(cardFuleOrders.getType());
|
||||||
cardFuelRecord.setOilType(cardFuleOrders.getOilType());
|
cardFuelRecord.setOilType(cardFuleOrders.getOilType());
|
||||||
cardFuelRecordMapper.insert(cardFuelRecord);
|
cardFuelRecordMapper.insert(cardFuelRecord);
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
<view class="boxback" v-if="actinput == 1">
|
<view class="boxback" v-if="actinput == 1">
|
||||||
<view class="box-cz">
|
<view class="box-cz">
|
||||||
<view class="box-jg" :class="{ 'actbox' : actindex == index }" v-for="(item,index) in cardFuleList"
|
<view class="box-jg" :class="{ 'actbox' : actindex == index }" v-for="(item,index) in cardFuleList"
|
||||||
:key="index" @click="fuleindex(index,item.rechargeBalance,item.points)">
|
:key="index" @click="fuleindex(index,item.rechargeBalance,item.points,item.id)">
|
||||||
<view class="s-title" :class="{ 'actsize' : actindex == index }">油品:{{item.type}}
|
<view class="s-title" :class="{ 'actsize' : actindex == index }">油品:{{item.type}}
|
||||||
</view>
|
</view>
|
||||||
<view class="s-title" :class="{ 'actsize' : actindex == index }">油号:{{item.oilType}}
|
<view class="s-title" :class="{ 'actsize' : actindex == index }">油号:{{item.oilType}}
|
||||||
@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<view class="bottom-box">
|
<view class="bottom-box">
|
||||||
<view class="anniu" @click="addValueCarRecords()">
|
<view class="anniu" @click="addFuleCarRecords()">
|
||||||
<text>立即充值</text>
|
<text>立即充值</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="dibu" @click="goRechargeRecords()">
|
<view class="dibu" @click="goRechargeRecords()">
|
||||||
@ -154,6 +154,7 @@
|
|||||||
storeId: '',
|
storeId: '',
|
||||||
staffId: '',
|
staffId: '',
|
||||||
carValueId: '',
|
carValueId: '',
|
||||||
|
cardFuleId: '',
|
||||||
shows: false,
|
shows: false,
|
||||||
money: '',
|
money: '',
|
||||||
message: '',
|
message: '',
|
||||||
@ -194,9 +195,7 @@
|
|||||||
actinput: 0,
|
actinput: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {},
|
||||||
|
|
||||||
},
|
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.storeId = uni.getStorageSync("storeId")
|
this.storeId = uni.getStorageSync("storeId")
|
||||||
this.actinput = option.id
|
this.actinput = option.id
|
||||||
@ -209,12 +208,67 @@
|
|||||||
if (option.id == 1) {
|
if (option.id == 1) {
|
||||||
console.log("囤油");
|
console.log("囤油");
|
||||||
this.getFuelCars();
|
this.getFuelCars();
|
||||||
|
|
||||||
}
|
}
|
||||||
this.getStaffList()
|
this.getStaffList()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
//囤油卡充值
|
||||||
|
addFuleCarRecords() {
|
||||||
|
if (this.staffId == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: "员工为必填项",
|
||||||
|
icon: Error
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log("2222222222", this.carValueId)
|
||||||
|
if (this.carValueId == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: "囤油卡为必填项",
|
||||||
|
icon: Error
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
request({
|
||||||
|
url: 'business/marketingActivity/cardFuelRecord/addFuleCarRecords',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
payType: 'WECHAT',
|
||||||
|
mtStaffId: this.staffId,
|
||||||
|
id: this.carValueId,
|
||||||
|
storeId: this.storeId,
|
||||||
|
cardFavorableId: this.cardFavorableId,
|
||||||
|
cardRecordId: this.cardRecordId
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
let _this = this
|
||||||
|
console.log(res)
|
||||||
|
let payProvider = "wxpay"
|
||||||
|
_this.orderInfo = JSON.parse(res.data.reservedPayInfo);
|
||||||
|
uni.requestPayment({
|
||||||
|
// 微信支付provider: 'wxpay' 支付宝支付 'alipay'
|
||||||
|
provider: payProvider,
|
||||||
|
timeStamp: _this.orderInfo.timeStamp,
|
||||||
|
nonceStr: _this.orderInfo.nonceStr,
|
||||||
|
package: _this.orderInfo.package,
|
||||||
|
signType: 'MD5',
|
||||||
|
paySign: _this.orderInfo.paySign,
|
||||||
|
success: function(res) {
|
||||||
|
console.log('success:', res);
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pagesRefuel/orderSuccess/index'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: function(err) {}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
//储值卡充值
|
//储值卡充值
|
||||||
addValueCarRecords() {
|
addValueCarRecords() {
|
||||||
if (this.staffId == '') {
|
if (this.staffId == '') {
|
||||||
@ -321,8 +375,10 @@
|
|||||||
}
|
}
|
||||||
this.actindex = index
|
this.actindex = index
|
||||||
},
|
},
|
||||||
fuleindex(index, text, points, ) {
|
fuleindex(index, text, points, id) {
|
||||||
this.shuomingFList = []
|
this.shuomingFList = [];
|
||||||
|
this.carValueId = id;
|
||||||
|
console.log("1111111111", this.carValueId)
|
||||||
console.log(this.shuomingFList);
|
console.log(this.shuomingFList);
|
||||||
if (text) {
|
if (text) {
|
||||||
this.text = text
|
this.text = text
|
||||||
@ -368,17 +424,18 @@
|
|||||||
//囤油卡
|
//囤油卡
|
||||||
getFuelCars() {
|
getFuelCars() {
|
||||||
request({
|
request({
|
||||||
url: 'business/marketingActivity/cardFuelDiesel',
|
url: 'business/marketingActivity/cardFuelDiesel/selectAllApplet',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: {
|
data: {
|
||||||
activeStatus: '1'
|
activeStatus: '1',
|
||||||
|
storeId: this.storeId,
|
||||||
},
|
},
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.cardValueList = []
|
this.cardValueList = []
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.cardFuleList = res.data.records
|
this.cardFuleList = res.data.records
|
||||||
|
this.fuleindex(0, res.data.records[0].rechargeBalance, res.data.records[0].points, res.data
|
||||||
this.fuleindex(0, res.data.records[0].rechargeBalance, res.data.records[0].points)
|
.records[0].id)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user