From 15ca62967e680151e0d0eea23e3126ec48b7f260 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Tue, 23 Jan 2024 16:02:28 +0800 Subject: [PATCH 1/3] bug --- .../views/cashier/NewComponents/homeindex.vue | 66 ++++++++++++++++++- gasStation-uni/pages/index/index.vue | 11 +--- 2 files changed, 68 insertions(+), 9 deletions(-) diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 0d4372997..b0e0d5909 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -446,7 +446,7 @@ ¥{{ +oilActualPay + (+goodsActualPay) }}
- 合计金额:{{ oilAmount + goodsAmount }}元、优惠合计{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}元 + 合计金额:{{ (oilAmount + goodsAmount).toFixed(2) }}元、优惠合计{{ (oilDiscount + goodsDiscount + fullReduction + couponAmount).toFixed(2) }}元
@@ -751,6 +751,37 @@ 确 定 + +
+
订单统计
+
+
+
{{ getName(oilNameList,item.oilName) }}_{{getName1(gunList,item.gunName)}}
+
¥{{ item.amount }}
+
+
+
{{ item.name }}
+
{{ item.retailPrice }}
+
{{ item.memberPrice }}
+
+
+
合计
+
¥{{ oilAmount+(+goodsAmount) }}
+
+
+
优惠合计
+
¥{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}
+
+
+
实付款
+
¥{{ (+oilActualPay)+(+goodsActualPay) }}
+
+
+
找零
+
¥{{ seekZero }}
+
+
+
@@ -1085,6 +1116,14 @@ }, }, methods:{ + async printLocally() { + const printHTML = document.querySelector('#reportSuccess').innerHTML + // 将打印的区域赋值,进行打印 + window.document.body.innerHTML = printHTML + window.print() // 调用window打印方法 + window.location.reload() // 打印完成后重新加载页面 + + }, clear(){ this.dialogVisiblej = false this.seekZero = 0 @@ -2672,6 +2711,7 @@ _this.oilPreferentialData[i].oilPreferential.cardFavorableId = _this.cardFavorableId usePaymentActive(_this.oilPreferentialData[i].oilPreferential).then(res => {}) } + _this.printLocally() return; } } @@ -2682,6 +2722,7 @@ _this.seekZero = 0 _this.amount = 0 _this.resetting1() + _this.printLocally() return; } } @@ -2801,6 +2842,7 @@ _this.isQuery = false; _this.amount = 0 + _this.printLocally() _this.loading = false; if (response.data.oilOrderAmount>0){ for (let i =0;i<_this.oilPreferentialData.length;i++){ @@ -3276,6 +3318,14 @@ /*color: white;*/ } + .box-center{ + width: 100%; + //height: 10px; + background-color: white; + margin: 10px auto; + box-sizing: border-box; + overflow: auto; + } .center-left-bottom{ width: 100%; background-color: white; @@ -3315,6 +3365,20 @@ margin: 15px 10px ; } + .input-box{ + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + font-size: 14px; + margin: 5px 0px; + } + .box-title{ + font-size: 18px; + text-align: center; + align-items: center; + margin-top: 15px; + } .bottom-price{ font-size: 26px; font-weight: bold; diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue index 3045d2098..0059c2024 100644 --- a/gasStation-uni/pages/index/index.vue +++ b/gasStation-uni/pages/index/index.vue @@ -86,9 +86,9 @@ {{store.name}}{{store.description ? "("+store.description+")" : ""}} - + @@ -216,9 +216,6 @@ import { callWithErrorHandling } from "vue" uni.setStorageSync("inviteStaffId", staffId) this.storeId = uni.getStorageSync("storeId") this.staffId = uni.getStorageSync("inviteStaffId") - uni.showLoading({ - title: uni.getStorageSync("storeId") + "++" + uni.getStorageSync("inviteStaffId") + q - }) this.getUserAuthority(); this.getOilType(); } else { @@ -404,9 +401,7 @@ import { callWithErrorHandling } from "vue" }) } }).catch((res) => { - uni.showLoading({ - title: res + "---" + 1 - }) + }) }, // 获取当前位置 From cf631ad033230060b7d03119d5c188d57cf3038b Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Tue, 23 Jan 2024 18:14:56 +0800 Subject: [PATCH 2/3] bug --- .../src/components/map/mapComponent.vue | 2 +- fuintAdmin/src/views/staff/list.vue | 6 ++-- .../controller/AlipayController.java | 27 +++++++++++++++++ gasStation-uni/pages/index/index.vue | 4 ++- gasStation-uni/pagesLogin/login/login.vue | 7 +++-- gasStation-uni/pagesMy/comment/comment.vue | 30 ++++++++++++++----- gasStation-uni/pagesMy/details/details.vue | 6 ++-- gasStation-uni/pagesMy/myorder/myorder.vue | 13 +++++--- .../pagesRefuel/orderDetail/index.vue | 1 + 9 files changed, 76 insertions(+), 20 deletions(-) diff --git a/fuintAdmin/src/components/map/mapComponent.vue b/fuintAdmin/src/components/map/mapComponent.vue index c0b4ba933..7d491c087 100644 --- a/fuintAdmin/src/components/map/mapComponent.vue +++ b/fuintAdmin/src/components/map/mapComponent.vue @@ -91,7 +91,7 @@ export default { }).then((AMap) => { this.map = new AMap.Map("container", { viewMode: "2D", //是否为3D地图模式 - zoom: 11, //初始化地图级别 + zoom: 16, //初始化地图级别 center: [_this.form.lng, _this.form.lat], //初始化地图中心点位置 }); // console.log(this.map.center) diff --git a/fuintAdmin/src/views/staff/list.vue b/fuintAdmin/src/views/staff/list.vue index 62a88220c..821641377 100644 --- a/fuintAdmin/src/views/staff/list.vue +++ b/fuintAdmin/src/views/staff/list.vue @@ -633,7 +633,9 @@ export default { submitForm: function() { this.$refs["form"].validate(valid => { if (valid) { - this.form.auditPrem = this.form.auditPrem.toString(); + if (this.form.auditPrem){ + this.form.auditPrem = this.form.auditPrem.toString(); + } if (!this.form.id) { queryStaff({mobile:this.form.mobile}).then( response => { if(response.data!=null){ @@ -676,7 +678,7 @@ export default { this.form.refundPassword = '123456' this.open = true; this.title = "编辑员工信息"; - if (this.form.auditPrem.length > 0){ + if (this.form.auditPrem && this.form.auditPrem.length > 0){ // this.form.auditPrem = this.form.auditPrem.split(","); this.auditPrem = [] this.auditPrem = this.form.auditPrem.split(","); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java index 2654e4f2b..41ecdd6ca 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java @@ -7,7 +7,11 @@ import com.alipay.api.response.AlipaySystemOauthTokenResponse; import com.fuint.business.storeInformation.entity.LJStore; import com.fuint.business.storeInformation.service.ILJStoreService; 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.service.LJUserGradeService; import com.fuint.business.userManager.service.LJUserService; +import com.fuint.business.userManager.service.UserBalanceService; import com.fuint.business.userManager.vo.LJUserVo; import com.fuint.common.dto.AccountInfo; import com.fuint.common.util.TokenUtil; @@ -38,6 +42,10 @@ public class AlipayController extends BaseController { private LJUserService userService; @Autowired private ILJStoreService iljStoreService; + @Autowired + private UserBalanceService userBalanceService; + @Autowired + private LJUserGradeService ljUserGradeService; /** * 获取支付宝userId @@ -80,6 +88,25 @@ public class AlipayController extends BaseController { userService.addUser(ljUser); } LJUser ljUser = userService.selectUserByMobile(mobile); + // 根据userid和连锁店id查询是否存在对应的余额信息 + UserBalance userBalance = userBalanceService.selectUserBalance(ljUser.getId(), ljStore.getChainStoreId()); + if (ObjectUtil.isEmpty(userBalance)) { + // 新增余额信息 + UserBalance userBalanceAdd = new UserBalance(); + userBalanceAdd.setMtUserId(ljUser.getId()); + userBalanceAdd.setStoreId(Integer.parseInt(storeId)); + userBalanceAdd.setChainStoreId(ljStore.getChainStoreId()); + userBalanceAdd.setCardBalance(0.0); + userBalanceAdd.setPoints(0); + userBalanceAdd.setGrowthValue(0); + userBalanceAdd.setConsumeNum(0); + LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeByStoreId(Integer.parseInt(storeId)); + if (ObjectUtil.isNotEmpty(ljUserGrade) && ObjectUtil.isNotEmpty(ljUserGrade.getId())) { + userBalanceAdd.setGradeId(ljUserGrade.getId()); + } + // 新增会员余额信息 + userBalanceService.insertUserBalance(userBalanceAdd); + } String userAgent = request.getHeader("user-agent"); AccountInfo accountInfo = new AccountInfo(); diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue index 0059c2024..f056ddb7c 100644 --- a/gasStation-uni/pages/index/index.vue +++ b/gasStation-uni/pages/index/index.vue @@ -184,7 +184,8 @@ import { callWithErrorHandling } from "vue" }, onLoad(query) { if (query.storeId) { - uni.setStorageSync("y_storeId", query.storeId) + // uni.setStorageSync("y_storeId", query.storeId) + uni.setStorageSync("storeId", query.storeId) } if (query.type) { uni.setStorageSync("y_type", query.type) @@ -435,6 +436,7 @@ import { callWithErrorHandling } from "vue" uni.setStorageSync("storeId", response.data.store.id) uni.setStorageSync("chainStoreId", response.data.store .chainStoreId) + console.log(uni.getStorageSync("chainStoreId")); let welfare = response.data.store.welfare if (welfare) { if (welfare.includes(",")) { diff --git a/gasStation-uni/pagesLogin/login/login.vue b/gasStation-uni/pagesLogin/login/login.vue index 0380fcd65..5ba0aa001 100644 --- a/gasStation-uni/pagesLogin/login/login.vue +++ b/gasStation-uni/pagesLogin/login/login.vue @@ -86,13 +86,13 @@ method: 'post', data: { authCode: authCode, - storeId: 0, + storeId: uni.getStorageSync("storeId"), staffId: "", phone: "18457621459", encryptedData: encryptedData, }, }).then((resp) => { - console.log(resp) + // console.log(resp) if (resp.code == 200) { uni.setStorageSync('App-Token', resp.data.token); @@ -210,7 +210,8 @@ url: "clientApi/sign/alipayLogin/getUserid", method: 'post', data: { - storeId: uni.getStorageSync("y_storeId"), + storeId: uni.getStorageSync("storeId"), + // storeId: uni.getStorageSync("y_storeId"), type: uni.getStorageSync("y_type"), userId: uni.getStorageSync("y_userId"), }, diff --git a/gasStation-uni/pagesMy/comment/comment.vue b/gasStation-uni/pagesMy/comment/comment.vue index 2f850f8ec..98b8c9fab 100644 --- a/gasStation-uni/pagesMy/comment/comment.vue +++ b/gasStation-uni/pagesMy/comment/comment.vue @@ -13,10 +13,11 @@ 您对工作人员满意吗 - + + - username(13583017106) + {{user.name?user.name:"未填写"}}({{user.mobile}}) @@ -38,13 +39,14 @@