From c1bb1af124b00355880e506fc783f9482c57bb38 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Fri, 26 Jan 2024 13:33:09 +0800 Subject: [PATCH] bug --- .../src/components/map/mapComponent.vue | 1 + fuintAdmin/src/views/member/userInfo.vue | 77 +++++++++++++----- .../views/member/userInfoOrder/oilOrder.vue | 11 +-- .../views/staffCommission/staffCommission.vue | 8 +- .../fuyou/service/impl/FyPayServiceImpl.java | 6 ++ .../impl/StaffCommissionServiceImpl.java | 23 +++++- .../service/impl/LJStaffServiceImpl.java | 4 +- .../order/mapper/xml/OilOrderMapper.xml | 2 +- .../service/impl/OilOrderServiceImpl.java | 10 ++- .../views/cashier/NewComponents/homeindex.vue | 50 ++++++++++-- .../cashier/orderComponents/order_Goods.vue | 21 +---- .../cashier/orderComponents/order_Unpaid.vue | 6 +- fuintCashierWeb/src/views/details/index.vue | 80 +++++++++++++------ .../views/details/userInfoOrder/oilOrder.vue | 11 +-- .../pagesRefuel/orderDetail/index.vue | 2 +- 15 files changed, 218 insertions(+), 94 deletions(-) diff --git a/fuintAdmin/src/components/map/mapComponent.vue b/fuintAdmin/src/components/map/mapComponent.vue index 7d491c087..5051b43c4 100644 --- a/fuintAdmin/src/components/map/mapComponent.vue +++ b/fuintAdmin/src/components/map/mapComponent.vue @@ -139,6 +139,7 @@ export default { this.geoCoder.getAddress(lnglat, (status, result) => { if (status === "complete" && result.regeocode) { this.form.address = result.regeocode.formattedAddress; + this.pasVal() } }); }, diff --git a/fuintAdmin/src/views/member/userInfo.vue b/fuintAdmin/src/views/member/userInfo.vue index 0929ccef9..22df8d425 100644 --- a/fuintAdmin/src/views/member/userInfo.vue +++ b/fuintAdmin/src/views/member/userInfo.vue @@ -383,29 +383,46 @@ --> -
- - - - - - - +
+
+ + + + + + + +
+
+
+ +
+
-
-
- +
+
+ + +
+
+ 应找零 + ¥{{ seekZero }}
@@ -876,6 +893,7 @@ export default { childComponentKey:1, authCode: '', // 支付码 + seekZero:0, timer: null, @@ -1005,6 +1023,10 @@ export default { this.getAllAmount() }, methods: { + // 计算找零金额 + changeSeekZero(){ + this.seekZero = (this.authCode - this.cardValueForm.amount).toFixed(2) + }, handleQuery(){ this.subCardList.page = 1; this.getOrderList() @@ -1459,6 +1481,17 @@ export default { // 最终支付 async collection() { + if (this.cardValueForm.paymentType=="CASH"){ + if (this.authCode diff --git a/fuintAdmin/src/views/staffCommission/staffCommission.vue b/fuintAdmin/src/views/staffCommission/staffCommission.vue index 5f55bfe1a..efc1ff946 100644 --- a/fuintAdmin/src/views/staffCommission/staffCommission.vue +++ b/fuintAdmin/src/views/staffCommission/staffCommission.vue @@ -123,10 +123,10 @@ @sort-change="handleSortChange"> - - + + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java index 1af02e4da..242e6641b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java @@ -89,6 +89,10 @@ public class FyPayServiceImpl implements FyPayService { Map resMap = Utils.xmlStr2Map(rspXml); String str = resMap.get("sign"); + String resultCode = resMap.get("result_code"); + if (!resultCode.equals("000000")){ + throw new RuntimeException(resMap.get("result_msg")); + } if (Utils.verifySign(resMap, str)){ ThreadUtil.execAsync(() -> { Timer timer = new Timer(); @@ -108,6 +112,8 @@ public class FyPayServiceImpl implements FyPayService { }, 0, 500); Thread.currentThread().interrupt(); }); + }else { + throw new Exception("验签失败,请联系管理员!"); } return resMap; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/commission/service/impl/StaffCommissionServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/commission/service/impl/StaffCommissionServiceImpl.java index b3708bb4e..e7a79a6ae 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/commission/service/impl/StaffCommissionServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/commission/service/impl/StaffCommissionServiceImpl.java @@ -12,9 +12,11 @@ import com.fuint.business.commission.service.CommissionRecordService; import com.fuint.business.commission.service.StaffCommissionService; import com.fuint.business.commission.vo.StaffCommissionVo; import com.fuint.business.member.entity.LJStaff; +import com.fuint.business.member.service.ILJDutyService; import com.fuint.business.member.service.ILJStaffService; import com.fuint.common.dto.AccountInfo; import com.fuint.common.util.TokenUtil; +import com.fuint.system.role.entity.TDuty; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -22,22 +24,35 @@ import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * 员工提成方案信息 业务层 */ @Service public class StaffCommissionServiceImpl extends ServiceImpl implements StaffCommissionService { + @Autowired + private ILJDutyService dutyService; + @Override public IPage selectCommissionList(Page page, StaffCommission commission) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); Integer storeId = nowAccountInfo.getStoreId(); commission.setStoreId(storeId); IPage staffCommissionIPage = baseMapper.selectCommissionList(page, commission); + for (StaffCommissionVo record : staffCommissionIPage.getRecords()) { + List tDuties = dutyService.selectDutyList(); + String[] staffRoleGroup = record.getStaffRoleGroup().split(","); + String str = ""; + for (String staffRole : staffRoleGroup) { + for (TDuty tDuty : tDuties) { + if (staffRole.equals(tDuty.getDutyId().toString())){ + str += tDuty.getDutyName()+","; + } + } + } + record.setDutyName(str); + } return staffCommissionIPage; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java index 2e3698fa5..361019030 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java @@ -211,7 +211,9 @@ public class LJStaffServiceImpl extends ServiceImpl impl if (StringUtils.isNotEmpty(staff.getPassword())){ TAccount tAccount = accountService.selectAccountByStaffId(staff.getId()); tAccount.setPassword(staff.getPassword()); - tAccount.setAccountName(staff.getMobile()); + if (tAccount.getAccountName().matches("\\d+")){ + tAccount.setAccountName(staff.getMobile()); + } accountService.entryptPassword(tAccount); try { accountService.editAccount(tAccount,null); 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 c9eed705b..6534dd6ad 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 @@ -25,7 +25,7 @@ and pay_type = #{order.payType} - and order_status != #{order.orderStatus} + and order_status = #{order.orderStatus} and order_no like concat('%', #{order.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 170df4406..74641b869 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 @@ -383,7 +383,11 @@ public class OilOrderServiceImpl extends ServiceImpl i cashierOrder.setAmount(oilAmount+goodsAmount); cashierOrder.setStatus(payStatus); if (payType.equals("CASH")){ - cashierOrder.setPayAmount(Double.valueOf(map.get("authCode"))); + if (StringUtils.isNotEmpty(map.get("authCode"))){ + cashierOrder.setPayAmount(Double.valueOf(map.get("authCode"))); + }else { + cashierOrder.setPayAmount(0.0); + } cashierOrder.setPayTime(new Date()); this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid"); }else { @@ -428,6 +432,7 @@ public class OilOrderServiceImpl extends ServiceImpl i fyPayService.pay(map1); } catch (Exception e){ e.printStackTrace(); +// throw new RuntimeException("支付失败"); } } @@ -435,6 +440,9 @@ public class OilOrderServiceImpl extends ServiceImpl i LJOrder goodsOrder1 = orderService.selectGoodsOrder(orderNo); if (!ObjectUtil.isEmpty(oilOrder2)){ orders.put("oilOrder",oilOrder2); + if (oilOrder2.getOrderStatus().equals("paid")){ + cashierOrder.setPayTime(new Date()); + } cashierOrder.setOilOrderId(oilOrder2.getId()); } if (!ObjectUtil.isEmpty(goodsOrder1)){ diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 1983666c2..15960daa4 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -179,7 +179,7 @@
扫码支付
-
{{ +oilActualPay + (+goodsActualPay) }}
+
{{ ((+oilActualPay) + (+goodsActualPay)).toFixed(2) }}
找零
@@ -207,7 +207,7 @@
-
¥{{ +oilActualPay + (+goodsActualPay) }}
+
¥{{ ((+oilActualPay) + (+goodsActualPay)).toFixed(2) }}
优惠合计:{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}元/{{consumeRefuelMoney}}L
立即结算 @@ -452,7 +452,7 @@
@@ -765,6 +765,14 @@
{{ item.retailPrice }}
{{ item.memberPrice }}
+
+
支付方式
+
现金
+
微信
+
支付宝
+
银联二维码
+
小程序码
+
合计
¥{{ oilAmount+(+goodsAmount) }}
@@ -773,6 +781,10 @@
优惠合计
¥{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}
+
+
储值卡或囤油卡付款
+
¥{{ oilAmount+(+goodsAmount) - (oilDiscount + goodsDiscount + fullReduction + couponAmount) }}
+
实付款
¥{{ (+oilActualPay)+(+goodsActualPay) }}
@@ -809,6 +821,8 @@ name: "homeindex", data(){ return{ + gunIndex:[], + autofocus:false, baseUrl:process.env.VUE_APP_BASE_API, // 满减全选 checkAll1: false, @@ -1198,6 +1212,7 @@ }, clear(){ + this.autofocus = false this.dialogVisiblej = false this.seekZero = 0 }, @@ -1786,6 +1801,7 @@ // } if (this.balance>0){ this.checkAll4 = true + this.countAmountFull() } await this.getGrade(this.member.id,this.member.gradeId) if (!this.isFixingLevel){ @@ -1794,6 +1810,7 @@ }, getOilCoupon(){ let type = 0; + // if (this.consumeAmount==0){ if (this.consumeAmount==0){ type = 1; }else { @@ -2197,6 +2214,7 @@ }, // 立即结算 settlement(){ + this.autofocus = true if (this.payType=="APPLET_CODE") { if (this.goodsOrder.length > 0) { this.$modal.msgError("非油商品不可使用小程序码支付") @@ -2284,6 +2302,7 @@ // } if (this.balance>0){ this.checkAll4 = true + this.countAmountFull() } await this.getGrade(this.member.id,this.member.gradeId) if (!this.isFixingLevel){ @@ -2429,6 +2448,7 @@ }, // 加油金额 refuel(data){ + // this.gunIndex.push(data.id) this.select = "元"; this.rise = [ {value:"¥100"}, @@ -2464,7 +2484,11 @@ // 确定收款 async collection(){ if (this.payType=="CASH"){ - if (this.authCode==undefined || this.authCode=="" || this.seekZero<0){ + if (this.authCode<((+this.oilActualPay) + (+this.goodsActualPay)) || this.seekZero<0){ + this.$modal.msgError("请输入正确的金额"); + return; + } + if (!this.authCode && ((+this.oilActualPay) + (+this.goodsActualPay))>0){ this.$modal.msgError("请输入正确的金额"); return; } @@ -2533,6 +2557,7 @@ isPaySuccess = true _this.isPay = true; _this.seekZero = 0 + _this.loading = false; _this.amount = 0 for (let i =0;i<_this.oilPreferentialData.length;i++){ _this.oilPreferentialData[i].oilPreferential.storeId = response.data.oilOrder.storeId @@ -2552,6 +2577,7 @@ _this.isPay = true; _this.seekZero = 0 _this.amount = 0 + _this.loading = false; _this.printLocally() _this.resetting1() return; @@ -2560,6 +2586,7 @@ if (response.data.error==1){ this.$modal.msgError("商品库存不足,请重新选择商品") this.loading = false; + this.autofocus = false this.dialogVisiblej = false; return; } @@ -2733,6 +2760,7 @@ }, 1000); }, handClose(){ + this.loading = false this.dialogVisiblejLoading = false // this.resetting1() this.authCode = ""; @@ -2781,6 +2809,7 @@ this.isPaySuccess = false; this.isPay = false; + this.autofocus = false this.dialogVisiblej = false }, // 支付方式 @@ -3024,6 +3053,17 @@ padding: 10px; color: #3e4f60; } + .of-box2{ + width: 31%; + margin-right: 10px; + margin-bottom: 10px; + border-radius: 8px; + box-sizing: border-box; + background-color: #2773fc; + height: 110px; + padding: 10px; + color: #3e4f60; + } .of-title{ font-weight: bold; font-size: 22px; diff --git a/fuintCashierWeb/src/views/cashier/orderComponents/order_Goods.vue b/fuintCashierWeb/src/views/cashier/orderComponents/order_Goods.vue index 5ad96ac43..ee64a7484 100644 --- a/fuintCashierWeb/src/views/cashier/orderComponents/order_Goods.vue +++ b/fuintCashierWeb/src/views/cashier/orderComponents/order_Goods.vue @@ -244,7 +244,7 @@ export default { // 日期范围 dateRange: [], // 遮罩层 - loading: true, + loading: false, loadingRes: true, // 标题 title: "", @@ -428,27 +428,12 @@ export default { if (val!=undefined){ this.queryParams.page = val } - this.loading = true; + this.loadingRes = true; listOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => { this.list = response.data.records; this.total = response.data.total; - this.loading = false; + this.loadingRes = false; }) - // const app = this; - // app.loading = true; - // app.queryParams.storeIds = app.storeIds ? app.storeIds.join(",") : ''; - // getOrderList(app.queryParams).then( response => { - // this.list = response.data.paginationResponse.content; - // this.total = response.data.paginationResponse.totalElements; - // this.typeList = response.data.typeList; - // this.statusList = response.data.statusList; - // this.payStatusList = response.data.payStatusList; - // this.orderModeList = response.data.orderModeList; - // this.payTypeList = response.data.payTypeList; - // this.storeList = response.data.storeList; - // this.loading = false; - // } - // ); }, // 搜索按钮操作 handleQuery() { diff --git a/fuintCashierWeb/src/views/cashier/orderComponents/order_Unpaid.vue b/fuintCashierWeb/src/views/cashier/orderComponents/order_Unpaid.vue index c3d86fd0d..4635e9f22 100644 --- a/fuintCashierWeb/src/views/cashier/orderComponents/order_Unpaid.vue +++ b/fuintCashierWeb/src/views/cashier/orderComponents/order_Unpaid.vue @@ -173,7 +173,7 @@ @@ -216,14 +216,14 @@ import {exportExcelOilOrderApi} from "@/api/order/exportExcel"; export default { - name: "order_Cashier", + name: "order_Unpaid", data(){ return{ // 查询参数 queryParams: { page: 1, pageSize: 10, - orderStatus:"paid", + orderStatus:"unpaid", }, // 总条数 total:0, diff --git a/fuintCashierWeb/src/views/details/index.vue b/fuintCashierWeb/src/views/details/index.vue index 79cdf8256..0f6abe257 100644 --- a/fuintCashierWeb/src/views/details/index.vue +++ b/fuintCashierWeb/src/views/details/index.vue @@ -385,32 +385,50 @@ -->
-
- +
+ - - - - - - -
-
-
- + placeholder="扫描或输入付款码、支持微信、支付宝、云闪付"> + + + + + + +
+
+
+ +
+
+
+ + +
+
+ 应找零 + ¥{{ seekZero }} +
+
+
取消收款 @@ -873,6 +891,7 @@ export default { childComponentKey:1, authCode: '', // 支付码 + seekZero:0, timer: null, @@ -1003,6 +1022,10 @@ export default { this.getAllAmount() }, methods: { + // 计算找零金额 + changeSeekZero(){ + this.seekZero = (this.authCode - this.cardValueForm.amount).toFixed(2) + }, getName(list,type){ let name = "" list.forEach(item => { @@ -1466,7 +1489,16 @@ export default { }, async collection() { - + if (this.cardValueForm.paymentType=="CASH"){ + if (this.authCode diff --git a/gasStation-uni/pagesRefuel/orderDetail/index.vue b/gasStation-uni/pagesRefuel/orderDetail/index.vue index f1637486d..80c2c0c70 100644 --- a/gasStation-uni/pagesRefuel/orderDetail/index.vue +++ b/gasStation-uni/pagesRefuel/orderDetail/index.vue @@ -485,7 +485,7 @@ this.isStoreValueCard = true; if (val == 0) { // 没有使用囤油卡 - if (this.user.cardBalance >= (this.oilOrder.orderAmount - this.fullRedece - this.couponRedece - this.gradeRedece).toFixed(2)){ + if (this.user.cardBalance >= (this.oilOrder.orderAmount - this.fullRedece - this.couponRedece - this.gradeRedece)){ this.balanceRedece = (this.oilOrder.orderAmount - this.fullRedece - this.couponRedece - this.gradeRedece).toFixed(2) } else { this.balanceRedece = this.user.cardBalance