From fcb8ddb9cab99ea342b6fc99799a87ae302b5001 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Sat, 20 Jan 2024 11:48:52 +0800 Subject: [PATCH] bug --- .../impl/ActiveExchangeServiceImpl.java | 107 ++++++++++-------- .../order/controller/OilOrderController.java | 11 ++ .../business/order/mapper/OilOrderMapper.java | 1 + .../order/mapper/xml/OilOrderMapper.xml | 11 ++ .../order/service/OilOrderService.java | 3 +- .../service/impl/OilOrderServiceImpl.java | 27 +++-- .../fuint/business/order/vo/OilOrderVo.java | 3 + gasStation-uni/pages/index/index.vue | 26 ++--- gasStation-uni/pages/refuel/refuel.vue | 2 +- .../pagesRefuel/orderDetail/index.vue | 48 +++++--- 10 files changed, 153 insertions(+), 86 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java index 24e188453..39ae22316 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java @@ -49,12 +49,15 @@ import com.fuint.business.petrolStationManagement.entity.OilName; import com.fuint.business.petrolStationManagement.mapper.OilNameMapper; import com.fuint.business.petrolStationManagement.mapper.OilNumberMapper; import com.fuint.business.petrolStationManagement.service.OilNameService; +import com.fuint.business.storeInformation.entity.LJStore; import com.fuint.business.storeInformation.service.ILJStoreService; +import com.fuint.business.userManager.entity.ChainStoreConfig; import com.fuint.business.userManager.entity.LJUser; import com.fuint.business.userManager.entity.LJUserGrade; import com.fuint.business.userManager.entity.UserBalance; import com.fuint.business.userManager.mapper.LJUserGradeMapper; import com.fuint.business.userManager.mapper.LJUserMapper; +import com.fuint.business.userManager.service.ChainStoreConfigService; import com.fuint.business.userManager.service.LJUserGradeService; import com.fuint.business.userManager.service.LJUserService; import com.fuint.business.userManager.service.UserBalanceService; @@ -65,6 +68,7 @@ import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -116,6 +120,9 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { private OilNameMapper oilNameMapper; @Resource private OilNumberMapper oilNumberMapper; + @Autowired + @Lazy + private ChainStoreConfigService chainStoreConfigService; /** * 分页查询所有 * @param @@ -644,96 +651,102 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { String oilTypebyId = oilNameMapper.getOilTypebyId(oilId); String gradeId = paymentActiveDTO.getMtUserLevel().toString(); - if (StringUtils.isNotEmpty(gradeId)){ - LJUserGrade ljUserGrade = ljUserGradeMapper.selectAllByGradeId(gradeId); - if (ObjectUtils.isNotEmpty(ljUserGrade)){ - if (oilTypebyId.equals("汽油")){ - if (ljUserGrade.getGasolineDiscount().equals("无优惠")){ + if (StringUtils.isNotEmpty(gradeId)) { + LJStore store = iljStoreService.selectStoreByStoreId(storeId); + ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId()); + String isEnableLevel = chainStoreConfig.getIsEnableLevel(); + if (isEnableLevel.equals("yes")) { - }else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){ - String gasolineRule = ljUserGrade.getGasolineRule(); - List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); - JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get(); + LJUserGrade ljUserGrade = ljUserGradeMapper.selectAllByGradeId(gradeId); + if (ObjectUtils.isNotEmpty(ljUserGrade)) { + if (oilTypebyId.equals("汽油")) { + if (ljUserGrade.getGasolineDiscount().equals("无优惠")) { + + } else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) { + String gasolineRule = ljUserGrade.getGasolineRule(); + List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); + JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get(); BigDecimal bigDecimal = jsonObject.getBigDecimal("gasolineRule1"); - if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){ + if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) { //升数 - BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1,2,RoundingMode.HALF_UP); + BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP); BigDecimal gasolineRule3 = jsonObject.getBigDecimal("gasolineRule3"); BigDecimal multiply = divide.multiply(gasolineRule3); paymentActiveVO.setMemberFavorableAmount(multiply); } - }else { - String gasolineRule = ljUserGrade.getGasolineRule(); - List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); - JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get(); + } else { + String gasolineRule = ljUserGrade.getGasolineRule(); + List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); + JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get(); BigDecimal gasolineRule1 = jsonObject.getBigDecimal("gasolineRule1"); - if (paymentActiveDTO.getAmount().compareTo(gasolineRule1)>=0){ + if (paymentActiveDTO.getAmount().compareTo(gasolineRule1) >= 0) { //升数 Integer gasolineRule3 = jsonObject.getInteger("gasolineRule2"); BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3); paymentActiveVO.setMemberFavorableAmount(bigDecimal2); } + } } - } - if (oilTypebyId.equals("柴油")){ - if (ljUserGrade.getGasolineDiscount().equals("无优惠")){ + if (oilTypebyId.equals("柴油")) { + if (ljUserGrade.getGasolineDiscount().equals("无优惠")) { - }else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){ - String gasolineRule = ljUserGrade.getDieselRule(); - List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); - JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get(); - BigDecimal bigDecimal =jsonObject.getBigDecimal("dieselRule1"); - if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){ + } else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) { + String gasolineRule = ljUserGrade.getDieselRule(); + List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); + JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get(); + BigDecimal bigDecimal = jsonObject.getBigDecimal("dieselRule1"); + if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) { //升数 - BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1,2,RoundingMode.HALF_UP); + BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP); BigDecimal bigDecimal2 = jsonObject.getBigDecimal("dieselRule3"); BigDecimal multiply = divide.multiply(bigDecimal2); paymentActiveVO.setMemberFavorableAmount(multiply); } - }else { - String gasolineRule = ljUserGrade.getDieselRule(); - List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); - JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get(); + } else { + String gasolineRule = ljUserGrade.getDieselRule(); + List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); + JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get(); BigDecimal bigDecimal = jsonObject.getBigDecimal("dieselRule1"); - if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){ + if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) { //升数 Integer gasolineRule3 = jsonObject.getInteger("dieselRule2"); BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3); paymentActiveVO.setMemberFavorableAmount(bigDecimal2); } + } + } + if (oilTypebyId.equals("天然气")) { + if (ljUserGrade.getGasolineDiscount().equals("无优惠")) { - } - if (oilTypebyId.equals("天然气")){ - if (ljUserGrade.getGasolineDiscount().equals("无优惠")){ - - }else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")){ - String gasolineRule = ljUserGrade.getNaturalGasRule(); - List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); - JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get(); + } else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) { + String gasolineRule = ljUserGrade.getNaturalGasRule(); + List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); + JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get(); BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1"); - if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){ + if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) { //升数 - BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1,2,RoundingMode.HALF_UP); + BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP); BigDecimal bigDecimal2 = jsonObject.getBigDecimal("naturalGas3"); BigDecimal multiply = divide.multiply(bigDecimal2); paymentActiveVO.setMemberFavorableAmount(multiply); } - }else { - String gasolineRule = ljUserGrade.getGasolineRule(); - List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); - JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get(); + } else { + String gasolineRule = ljUserGrade.getGasolineRule(); + List jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class); + JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get(); BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1"); - if (paymentActiveDTO.getAmount().compareTo(bigDecimal)>=0){ + if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) { //升数 Integer gasolineRule3 = jsonObject.getInteger("naturalGas2"); BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3); paymentActiveVO.setMemberFavorableAmount(bigDecimal2); } + } } } } - } + } return paymentActiveVO; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java index cd5d3afd8..e3422a23b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilOrderController.java @@ -253,4 +253,15 @@ public class OilOrderController extends BaseController { public ResponseObject getAllAmount(@PathVariable Integer userId){ return getSuccessResult(orderService.sumOilOrderAmountByUserIdAndStoreId(userId)); } + + /** + * 根据订单号查询油品订单信息(小程序) + * @param map + * @return + */ + @PostMapping("oilOrderNo") + public ResponseObject getOilOrder(@RequestBody Map map){ + String orderNo = map.get("orderNo"); + return getSuccessResult(orderService.selectOilOrderDescByOrderNo(orderNo)); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/OilOrderMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/OilOrderMapper.java index 4b3e25aad..d93ac44bb 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/OilOrderMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/OilOrderMapper.java @@ -113,4 +113,5 @@ public interface OilOrderMapper extends BaseMapper { Map orderStatistics( @Param("order") OilOrder order); + OilOrderVo selectOilOrderDescByOrderNo(@Param("orderNo") String orderNo); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml index 384955de6..296721ded 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml @@ -518,4 +518,15 @@ user_id = #{userId} and store_id = #{storeId} and order_status = 'paid' + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java index 7757f7fd4..b01db7908 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/OilOrderService.java @@ -8,6 +8,7 @@ import com.fuint.business.order.entity.CashierOrder; import com.fuint.business.order.entity.OilOrder; import com.fuint.business.order.vo.OilOrderVo; import com.fuint.framework.web.ResponseObject; +import org.apache.ibatis.annotations.Param; import org.springframework.web.bind.annotation.GetMapping; import javax.servlet.http.HttpServletResponse; @@ -144,5 +145,5 @@ public interface OilOrderService extends IService { Map orderStatistics(OilOrder order); - + OilOrderVo selectOilOrderDescByOrderNo(String orderNo); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java index 7fa18cd8c..71d4fce0c 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java @@ -993,17 +993,17 @@ public class OilOrderServiceImpl extends ServiceImpl i applet = fyPayService.applet(receiveParameter); String resultMsg = (String) applet.get("resultMsg"); // 判断商户订单号是否重复 重复则重新生成订单号 - if (StringUtils.isNotEmpty(resultMsg)){ - // 根据日期生成订单信息 - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); - String timestamp = dateFormat.format(new Date()); - String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6); - String orderNo1 = "2345"+timestamp+randomString; - oilOrder.setOrderNo(orderNo1); - this.updateOilOrder(oilOrder); - receiveParameter.setOrderNo(orderNo1); - applet = fyPayService.applet(receiveParameter); - } +// if (StringUtils.isNotEmpty(resultMsg)){ +// // 根据日期生成订单信息 +// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); +// String timestamp = dateFormat.format(new Date()); +// String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6); +// String orderNo1 = "2345"+timestamp+randomString; +// oilOrder.setOrderNo(orderNo1); +// this.updateOilOrder(oilOrder); +// receiveParameter.setOrderNo(orderNo1); +// applet = fyPayService.applet(receiveParameter); +// } applet.put("orderNo",orderNo); } catch (Exception e) { e.printStackTrace(); @@ -1531,4 +1531,9 @@ return stringDoubleMap; return oilOrderMapper.orderStatistics(order); } + + @Override + public OilOrderVo selectOilOrderDescByOrderNo(String orderNo) { + return baseMapper.selectOilOrderDescByOrderNo(orderNo); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/vo/OilOrderVo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/vo/OilOrderVo.java index f2808b01b..397229713 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/vo/OilOrderVo.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/vo/OilOrderVo.java @@ -9,5 +9,8 @@ public class OilOrderVo extends OilOrder { private Double oilPrice; // private String storeName; + private String description; private String oilName; + private String gunName; + private String realName; } diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue index 10f9eb7d5..bd5a914a1 100644 --- a/gasStation-uni/pages/index/index.vue +++ b/gasStation-uni/pages/index/index.vue @@ -133,6 +133,7 @@ import tabbar from "../../components/tabbar/tabbar.vue" import config from '@/config' import request from '../../utils/request' +import { callWithErrorHandling } from "vue" export default { data() { return { @@ -326,22 +327,21 @@ getUserAuthority() { let _this = this; // this.getAddress(); - uni.getSetting({ success(res) { - console.log(res, 111) + // console.log(res, 111,"dingw") if (!res.authSetting['scope.userLocation']) { - uni.authorize({ - scope: 'scope.userLocation', - success() { - // 用户同意获取位置信息 - // _this.isExistStoreId() - _this.getAddress(uni.getStorageSync("storeId")); - }, - fail() { - // 用户拒绝 - } - }) + // uni.authorize({ + // scope: 'scope.userLocation', + // success() { + // // 用户同意获取位置信息 + // // _this.isExistStoreId() + // }, + // fail() { + // // 用户拒绝 + // } + // }) + _this.getAddress(uni.getStorageSync("storeId")); } else { // 用户同意获取位置信息 // _this.isExistStoreId() diff --git a/gasStation-uni/pages/refuel/refuel.vue b/gasStation-uni/pages/refuel/refuel.vue index bbeabde1e..9514e80c7 100644 --- a/gasStation-uni/pages/refuel/refuel.vue +++ b/gasStation-uni/pages/refuel/refuel.vue @@ -339,7 +339,7 @@ this.oilOrder.orderAmount = this.value this.oilOrder.storeId = this.storeId this.oilOrder.staffId = id - this.oilOrder.oilNum = Math.ceil((this.value/this.oilPrice)*100)/100 + this.oilOrder.oilNum = (this.value/this.oilPrice).toFixed(2) this.oilOrder.tankId = uni.getStorageSync("tankId") let _this = this; // 添加油品订单信息 diff --git a/gasStation-uni/pagesRefuel/orderDetail/index.vue b/gasStation-uni/pagesRefuel/orderDetail/index.vue index 7a0cf2a92..85ce59fcb 100644 --- a/gasStation-uni/pagesRefuel/orderDetail/index.vue +++ b/gasStation-uni/pagesRefuel/orderDetail/index.vue @@ -13,11 +13,12 @@ 油站名称 - {{store.name}}{{store.description ? "("+store.description+")" : ""}} + + {{oilOrder.storeName}}{{oilOrder.description ? "("+oilOrder.description+")" : ""}} 油号油枪 - {{oilName}}/{{oilOrder.oilGunNum}} + {{oilOrder.oilName}}/{{oilOrder.gunName}} 加油金额 @@ -33,7 +34,7 @@ 加油员工 - {{staff.realName}} + {{oilOrder.realName}} @@ -110,7 +111,7 @@ - 已为您计算出最大优惠 + 已为您计算出最大优惠 注:囤油卡不参与任何优惠活动 @@ -249,7 +250,7 @@ }, onLoad(e) { this.orderNo = e.orderNo - // this.orderNo = "234520240119103259511c58" + // this.orderNo = "23452024012011401299130f" }, onShow() { this.getOilOrder(); @@ -263,8 +264,21 @@ this.checkOilCard = val if (val){ this.chooseRefuelMoney() + this.fullRedece = 0; + this.gradeRedece = 0; + this.couponRedece = 0; + this.preferentialData = { + activeFavorableAmount: "", + activeId: "", + activeInfo: "", + cardFavorableAmount: "", + cardFavorableId: "", + cardFavorableInfo: "", + memberFavorableAmount: "", + type: "", + }; }else{ - this.payAmount = this.payAmount + (this.oilCardRedece * this.oilPrice) + this.chooseCardBalance(0) this.oilCardRedece = 0 this.getPaymentPreferential(this.user.gradeId) } @@ -431,13 +445,16 @@ }, // 查看是否有可使用的储值卡金额 chooseCardBalance(val){ + if (this.oilCardRedece==0){ + this.getPaymentPreferential(this.user.gradeId) + } console.log("balance"); if (this.user.cardBalance>0) { this.isStoreValueCard = true; if (val == 0) { // 没有使用囤油卡 - if (this.user.cardBalance >= (this.oilOrder.orderAmount - this.couponRedece)){ - this.balanceRedece = this.oilOrder.orderAmount - this.couponRedece + if (this.user.cardBalance >= this.oilOrder.orderAmount){ + this.balanceRedece = this.oilOrder.orderAmount } else { this.balanceRedece = this.user.cardBalance this.deductAmount = (this.oilOrder.orderAmount*100-this.balanceRedece*100)/100 @@ -461,6 +478,7 @@ } }else{ this.deductAmount = this.oilOrder.orderAmount + this.payAmount = this.oilOrder.orderAmount } }, // 查看是否有可使用的会员等级优惠 @@ -800,7 +818,7 @@ // 计算用户应付金额 countPayMent(){ this.payAmount = this.deductAmount; - console.log("111",this.deductAmount, this.gradeRedece, this.fullRedece, this.couponRedece); + // console.log("111",this.deductAmount, this.gradeRedece, this.fullRedece, this.couponRedece); }, // 根据店铺id查询用户信息 @@ -865,22 +883,26 @@ this.fullRedece = res.data.activeFavorableAmount } console.log(this.gradeRedece,this.couponRedece,this.fullRedece,res.data.memberFavorableAmount,"2231"); + + this.payAmount = (this.payAmount - this.fullRedece - this.couponRedece - this.gradeRedece).toFixed(2) }) }, // 获取油品订单 getOilOrder() { let _this = this; request({ - url: "business/oilOrder/orderNo", + // url: "business/oilOrder/orderNo", + url: "business/oilOrder/oilOrderNo", method: 'post', data: { orderNo: _this.orderNo }, }).then((res) => { - if(res.data!=null){ + if(res.data){ + // console.log(res); _this.oilOrder = res.data - _this.getStaffList(res.data.staffId) - _this.getStore(res.data.storeId) + // _this.getStaffList(res.data.staffId) + // _this.getStore(res.data.storeId) _this.getOilNumber(res.data.storeId) // _this.chooseCoupons() _this.getUser(res.data.userId)