From 9d869e404f881ca5ac58ceb30c07075247c89c6f Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Sat, 2 Mar 2024 16:41:18 +0800 Subject: [PATCH] bug --- .../src/views/convenienceStore/index.vue | 118 +++++++++++++++--- .../convenienceStore/purchase/details.vue | 8 +- .../convenienceStore/returns/details.vue | 8 +- .../views/convenienceStore/saleStatistic.vue | 3 + .../views/integral/order/pointsCashier.vue | 49 ++++++-- .../src/views/integral/order/pointsMall.vue | 44 +++++-- .../views/staffCommission/staffCommission.vue | 50 ++++---- .../fuyou/service/impl/FyPayServiceImpl.java | 5 + .../service/impl/OilOrderServiceImpl.java | 63 ++++++---- .../impl/ChainStoreInfoServiceImpl.java | 4 +- .../cashier/NewComponents/HandoverDetails.vue | 42 +++++-- .../views/cashier/NewComponents/homeindex.vue | 38 ++---- gasStation-uni/pages/refuel/refuel.vue | 22 ++-- gasStation-uni/pagesLogin/login/login.vue | 32 ++--- .../pagesRefuel/orderDetail/index.vue | 13 ++ 15 files changed, 345 insertions(+), 154 deletions(-) diff --git a/fuintAdmin/src/views/convenienceStore/index.vue b/fuintAdmin/src/views/convenienceStore/index.vue index 1cf6a3f67..be90376b1 100644 --- a/fuintAdmin/src/views/convenienceStore/index.vue +++ b/fuintAdmin/src/views/convenienceStore/index.vue @@ -215,21 +215,30 @@ - - - + + + + 添加供应商 + + + + + + + + + + + + + + + @@ -264,6 +273,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -280,7 +327,7 @@ import {getAccount} from "@/api/system/account"; import {addLJGoods, createGoodsNo, queryGoodsVoList, queryLJGoods, scanCode} from "@/api/convenienceStore/ljgoods"; import pinyin from "js-pinyin"; import {getSysConfig} from "@/api/staff/user/sysconfig"; -import {addSupplier, listSuppliers} from "@/api/convenienceStore/supplier"; +import {addSupplier, listSuppliers, updateSupplier} from "@/api/convenienceStore/supplier"; export default { dicts:['zhzt','yes_or_no'], data() { @@ -290,6 +337,7 @@ export default { title: "", // 是否显示弹出层 open: false, + open2: false, openGoods: false, // 遮罩层 loading: true, @@ -340,6 +388,7 @@ export default { sort:0, buyingPrice:0,retailPrice:0,memberPrice:0 }, + form2:{}, tableData: [{ id: '', pid:'', @@ -385,13 +434,19 @@ export default { { required: true, message: "请选择是否能使用积分抵扣", trigger: "blur" }, ], supplierId: [ - { required: true, message: "请选择供应商", trigger: "blur" }, + { required: true, message: "请选择供应商", trigger: "change" }, ], status: [ { required: true, message: "请选择商品状态", trigger: "blur" }, ], }, + // 表单校验 + rules2: { + name: [ + { required: true, message: "供应商名称不能为空", trigger: "blur" }, + ], + } }; }, @@ -402,6 +457,35 @@ export default { this.getSuppilers(); }, methods: { + // 提交按钮 + submitForm2: function() { + this.$refs["form2"].validate(valid => { + if (valid) { + if (!this.form2.id) { + addSupplier(this.form2).then(response => { + if (response.data==1){ + this.$modal.msgSuccess("供应商新增成功"); + this.open2 = false; + this.getSuppilers(); + }else { + this.$modal.msgError("供应商名称已存在"); + } + }); + } + } + }); + }, + // 新增按钮操作 + handleAdd1() { + this.reset2(); + this.open2 = true; + this.title = "新增供应商"; + }, + // 表单重置 + reset2() { + this.resetForm("form2"); + this.form2= {} + }, getSuppilers(val){ listSuppliers({ifDelete:'0'}).then(response => { this.supplierList = response.data diff --git a/fuintAdmin/src/views/convenienceStore/purchase/details.vue b/fuintAdmin/src/views/convenienceStore/purchase/details.vue index 152363b97..18ebe34b6 100644 --- a/fuintAdmin/src/views/convenienceStore/purchase/details.vue +++ b/fuintAdmin/src/views/convenienceStore/purchase/details.vue @@ -419,7 +419,13 @@ export default { let unitPrice = new BigNumber( data.unitPrice); let subtotalAmount = new BigNumber(data.subtotalAmount); - data.subtotalAmount = quantityPurchased.times(unitPrice) + if (flag == 1) { + data.subtotalAmount = quantityPurchased.times(unitPrice) + } + + if (flag == 2) { + data.subtotalAmount = quantityPurchased.times(unitPrice) + } if (flag == 3) { data.unitPrice = subtotalAmount.dividedBy(quantityPurchased); diff --git a/fuintAdmin/src/views/convenienceStore/returns/details.vue b/fuintAdmin/src/views/convenienceStore/returns/details.vue index 38ddf5e01..f686a3064 100644 --- a/fuintAdmin/src/views/convenienceStore/returns/details.vue +++ b/fuintAdmin/src/views/convenienceStore/returns/details.vue @@ -412,7 +412,13 @@ export default { let returnPrice = new BigNumber( data.returnPrice); let subtotalAmount = new BigNumber(data.subtotalAmount); - data.subtotalAmount = returnQuantity.times(returnPrice) + if (flag == 1) { + data.subtotalAmount = returnQuantity.times(returnPrice) + } + + if (flag == 2) { + data.subtotalAmount = returnQuantity.times(returnPrice) + } if (flag == 3) { data.returnPrice = subtotalAmount.dividedBy(returnQuantity); diff --git a/fuintAdmin/src/views/convenienceStore/saleStatistic.vue b/fuintAdmin/src/views/convenienceStore/saleStatistic.vue index 0b62e3fca..0967aa89e 100644 --- a/fuintAdmin/src/views/convenienceStore/saleStatistic.vue +++ b/fuintAdmin/src/views/convenienceStore/saleStatistic.vue @@ -207,6 +207,7 @@ export default { methods: { // 导出信息 exportSale(){ + this.dateRange = [] if (this.beginTime && this.endTime) { this.dateRange.push(this.beginTime.toLocaleDateString()) this.dateRange.push(this.endTime.toLocaleDateString()) @@ -221,6 +222,7 @@ export default { detail(data){ this.table = true; this.queryParam.saleId = data.id; + this.dateRange = [] if (this.beginTime && this.endTime) { this.dateRange.push(this.beginTime.toLocaleDateString()) this.dateRange.push(this.endTime.toLocaleDateString()) @@ -234,6 +236,7 @@ export default { // 获取销售统计列表 getList(){ this.loading = true; + this.dateRange = [] if (this.beginTime && this.endTime) { this.dateRange.push(this.beginTime.toLocaleDateString()) this.dateRange.push(this.endTime.toLocaleDateString()) diff --git a/fuintAdmin/src/views/integral/order/pointsCashier.vue b/fuintAdmin/src/views/integral/order/pointsCashier.vue index f20a4efb3..04dd61459 100644 --- a/fuintAdmin/src/views/integral/order/pointsCashier.vue +++ b/fuintAdmin/src/views/integral/order/pointsCashier.vue @@ -28,17 +28,30 @@ /> - + + + + + + + + + + + + + + 至 + + @@ -166,6 +179,8 @@ export default { }, loading: false, dateRange: [], + beginTime:new Date(), + endTime:new Date(), defaultSort: {prop: 'createTime', order: 'descending'}, total: 0, @@ -187,6 +202,11 @@ export default { }, methods: { async getList(){ + this.dateRange = [] + if (this.beginTime && this.endTime) { + this.dateRange.push(this.beginTime.toLocaleDateString()) + this.dateRange.push(this.endTime.toLocaleDateString()) + } await getOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{ this.dataList = res.data.records this.total = res.data.total @@ -197,6 +217,11 @@ export default { this.$forceUpdate() }, getStatistics() { + this.dateRange = [] + if (this.beginTime && this.endTime) { + this.dateRange.push(this.beginTime.toLocaleDateString()) + this.dateRange.push(this.endTime.toLocaleDateString()) + } getStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{ this.statisticsForm = res.data }) @@ -218,6 +243,8 @@ export default { pageSize:10 }, this.dateRange = [] + this.beginTime = "" + this.endTime = "" this.getList() this.getStatistics(); diff --git a/fuintAdmin/src/views/integral/order/pointsMall.vue b/fuintAdmin/src/views/integral/order/pointsMall.vue index 9b15878b6..5699891fc 100644 --- a/fuintAdmin/src/views/integral/order/pointsMall.vue +++ b/fuintAdmin/src/views/integral/order/pointsMall.vue @@ -34,17 +34,30 @@ - + + + + + + + + + + + + + + 至 + + @@ -214,6 +227,8 @@ export default { openOutcome: false, // 订单详情 // 日期范围 dateRange: [], + beginTime:"", + endTime:"", defaultSort: {prop: 'createTime', order: 'descending'}, statisticsForm: { @@ -240,6 +255,11 @@ export default { }, methods: { async getList(){ + this.dateRange = [] + if (this.beginTime && this.endTime) { + this.dateRange.push(this.beginTime.toLocaleDateString()) + this.dateRange.push(this.endTime.toLocaleDateString()) + } await getOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{ this.dataList = res.data.records this.total = res.data.total @@ -282,6 +302,8 @@ export default { pageSize:10 }, this.dateRange = [] + this.beginTime = "" + this.endTime = "" this.getList() }, diff --git a/fuintAdmin/src/views/staffCommission/staffCommission.vue b/fuintAdmin/src/views/staffCommission/staffCommission.vue index 520e2d05f..1fd975612 100644 --- a/fuintAdmin/src/views/staffCommission/staffCommission.vue +++ b/fuintAdmin/src/views/staffCommission/staffCommission.vue @@ -340,31 +340,31 @@ - + + + + + + + + + + + - - - - - - - - - - - - 至 - - - + + + + + + + + + + + + + 搜索 重置 @@ -526,6 +526,7 @@ export default { methods:{ getStaffCommissionList(){ this.loading = true + this.dateRange = [] if (this.beginTime && this.endTime) { this.dateRange.push(this.beginTime.toLocaleDateString()) this.dateRange.push(this.endTime.toLocaleDateString()) @@ -618,6 +619,7 @@ export default { // 查询员工提成记录信息 getCommissionList(){ this.loading = true; + this.dateRange = [] if (this.beginTime && this.endTime) { this.dateRange.push(this.beginTime.toLocaleDateString()) this.dateRange.push(this.endTime.toLocaleDateString()) 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 4429da76e..6dabb2161 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 @@ -439,6 +439,11 @@ public class FyPayServiceImpl implements FyPayService { try { // 查询商户配置信息 MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(receiveParameter.getStoreId()); + if (ObjectUtil.isEmpty(merchantConfig)){ + res.put("code","error"); + res.put("msg","暂未配置商户信息"); + return res; + } // MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(16); // 查询用户信息 LJUserVo userVo = userService.selectUserById(receiveParameter.getUserId(), receiveParameter.getStoreId()); 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 29fd5cb50..805c37f50 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 @@ -28,6 +28,7 @@ import com.fuint.business.marketingActivity.activeFullminus.vo.ActiveFullminusVO import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService; import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO; +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange; import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord; import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelRecordMapper; import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord; @@ -335,7 +336,8 @@ public class OilOrderServiceImpl extends ServiceImpl i // 根据店铺id查询商户配置信息 MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(storeId); - if (ObjectUtil.isEmpty(merchantConfig)){ + if (ObjectUtil.isEmpty(merchantConfig) && !payType.equals("CASH") && !payType.equals("credit") && + !map.get("allAmount").equals("0")){ orders.put("error","请先配置支付通道"); return orders; } @@ -493,7 +495,7 @@ public class OilOrderServiceImpl extends ServiceImpl i cashierOrder.setAfterDiscountAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount); // 如果金额不等于0调用第三方支付接口 - if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH") || !payType.equals("credit")){ + if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH") && !payType.equals("credit")){ Integer allAmount = (int) (Double.valueOf(map.get("allAmount"))*100); // 判断是否开启支付规则 List list = merchantConfigService.selectMeChByIsOpen(storeId); @@ -1392,31 +1394,44 @@ public class OilOrderServiceImpl extends ServiceImpl i LJStore store = storeService.selectStoreByStoreId(storeId); UserBalance balance = userBalanceService.selectUserBalance(userid,store.getChainStoreId()); int growth = balance.getGrowthValue(); - if (refuelMoney==null){ +// if (refuelMoney==null){ +// String refuelMoney1 = balance.getRefuelMoney(); +// if (ObjectUtil.isNotEmpty(refuelMoney1) && ObjectUtil.isNotEmpty(refuelMoney)){ +// JSONArray objects = JSONArray.parseArray(refuelMoney); +// JSONArray objects1 = JSONArray.parseArray(refuelMoney1); +// List list = new ArrayList<>(); +// for (int i = 0;i list = new ArrayList<>(); - for (int i = 0;i + + + + + + + + + + + + v-model="beginTime" + style="width: 160px" + type="date" + placeholder="开始日期"> + + 至 + + @@ -133,6 +146,8 @@ export default { }, loading: false, dateRange: [new Date(),new Date()], + beginTime:new Date(), + endTime:new Date(), defaultSort: {prop: 'createTime', order: 'descending'}, total: 0, @@ -153,6 +168,11 @@ export default { }, methods: { getList(){ + this.dateRange = [] + if (this.beginTime && this.endTime) { + this.dateRange.push(this.beginTime.toLocaleDateString()) + this.dateRange.push(this.endTime.toLocaleDateString()) + } getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{ this.dataList = res.data.records this.total = res.data.total @@ -201,6 +221,8 @@ export default { pageSize:10 }, this.dateRange = [] + this.beginTime = "" + this.endTime = "" this.getList(); }, printLocally(data) { diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index e4fbff1b7..529fd8d6a 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -247,7 +247,7 @@ @click="refuel(item)">
{{ getName(oilNameList,getOilNames(oilNumberList,item.numberId)) }}
- +
{{item.gunName}}
@@ -2873,12 +2873,12 @@ this.oilPreferentialData = [] }, // 根据会员等级信息获取等级优惠信息 - getGrade(userId,gradeId){ + async getGrade(userId,gradeId){ this.isFixingLevel = false let _this = this; this.oilDiscount = 0; this.gradeDiscount = []; - userGradeInfo({userId:userId,gradeId:gradeId,storeId:""}).then(response => { + await userGradeInfo({userId:userId,gradeId:gradeId,storeId:""}).then(response => { let gasolineDiscount = 0; let dieselDiscount = 0; let naturalGasDiscount = 0; @@ -3086,22 +3086,12 @@ this.map.payUser = data.mobile; this.map.userId = data.id; this.balance = this.member.cardBalance; + await this.getGrade(this.member.id,this.member.gradeId) if (data.refuelMoney){ // 使用囤油卡 this.refuelMoney = JSON.parse(data.refuelMoney) await this.changeRefuelMoney(); } - // await this.getGrade(data.id,data.gradeId) - // if (!this.isFixingLevel){ - // this.preferentialData.storeId = this.storeId; - // this.preferentialData.userId = data.id; - // this.preferentialData.gradeId = data.gradeId; - // if (this.oilOrder.length>0){ - // this.preferential(); - // this.getCoupon(); - // } - // } - await this.getGrade(this.member.id,this.member.gradeId) if (this.balance>0 && this.oilAmount>0 && !this.isOilStorageCard){ this.checkAll4 = true if (this.goodsOrder.length==0){ @@ -3302,15 +3292,16 @@ this.checkAll4 = true if (this.balance!=0 && this.balance >= this.hoardAmount){ this.oilActualPay = 0 - this.consumeAmount = this.hoardAmount + this.consumeAmount = 0 }else { - this.oilActualPay = (this.hoardAmount -this.balance).toFixed(2) + this.oilActualPay = (this.hoardAmount - this.balance).toFixed(2) this.consumeAmount = this.balance } }else { this.oilActualPay = 0 this.consumeAmount = 0 } + console.log("使用囤油卡",this.hoardAmount) }, // 不使用囤油卡 countAmountFull(){ @@ -3649,13 +3640,8 @@ this.oilTotal = this.oilOrder.length; this.select = "元"; if (this.isMember){ - // this.getGrade(this.member.id,this.member.gradeId) - // this.changeRefuelMoney(); - // if (this.oilOrder.length>0){ - // this.preferential(); - // this.getCoupon(); - // } + await this.getGrade(this.member.id,this.member.gradeId) if (this.refuelMoney){ // 使用囤油卡 await this.changeRefuelMoney(); @@ -3667,7 +3653,6 @@ } this.countAmountFull() } - await this.getGrade(this.member.id,this.member.gradeId) if (!this.isFixingLevel && !this.isOilStorageCard){ await this.getOilCoupon() } @@ -3686,10 +3671,10 @@ _this.hoardAmount = 0; _this.oilAmount = 0; _this.refuelMoney1 = [] + let hoardAmount1 = 0; _this.oilOrder.forEach(item => { let conRefMon = 0; let hoardAmount = 0; - let hoardAmount1 = 0; let amount = 0; let amount1 = 0; let id = "" @@ -3714,9 +3699,10 @@ } } _this.consumeRefuelMoney += +conRefMon + console.log(hoardAmount,1254) hoardAmount1 += +hoardAmount amount1 += +amount - _this.hoardAmount = hoardAmount1 + amount1 + _this.hoardAmount = hoardAmount1 _this.oilAmount += +item.amount // _this.changeBalance(_this.hoardAmount,id) // if (_this.consumeRefuelMoney!=0){ @@ -3724,8 +3710,8 @@ // _this.checkAll3 = true; // _this.consumeAmount = 0; // } - _this.isDefaultUseCard(); }) + _this.isDefaultUseCard(); }, changeBalance(hoardAmount,id){ if (this.balance>0 && id != ""){ diff --git a/gasStation-uni/pages/refuel/refuel.vue b/gasStation-uni/pages/refuel/refuel.vue index 49bd00f00..ab98ec4cb 100644 --- a/gasStation-uni/pages/refuel/refuel.vue +++ b/gasStation-uni/pages/refuel/refuel.vue @@ -547,17 +547,17 @@ // if (!this.AppToken) { // return; // } - // await request({ - // url: 'chainStoreInfo/theJudgmentIsTheSame', - // method: 'get', - // data: { - // "chainStoreId": uni.getStorageSync("chainStoreId") - // } - // }).then(res => { - // if (!res.data) { - // uni.removeStorageSync("App-Token"); - // } - // }) + await request({ + url: 'chainStoreInfo/theJudgmentIsTheSame', + method: 'get', + data: { + "chainStoreId": uni.getStorageSync("chainStoreId") + } + }).then(res => { + if (!res.data) { + uni.removeStorageSync("App-Token"); + } + }) if (uni.getStorageSync("appltType")== "WECHAT") { // 判断当前登录的code是否相同 diff --git a/gasStation-uni/pagesLogin/login/login.vue b/gasStation-uni/pagesLogin/login/login.vue index 04aabc091..02d53b176 100644 --- a/gasStation-uni/pagesLogin/login/login.vue +++ b/gasStation-uni/pagesLogin/login/login.vue @@ -55,14 +55,14 @@ }, // 获取支付宝userid getUserLogin(e) { - // if (this.qindex == false) { - // uni.showToast({ - // icon: "none", - // title: "请阅读并勾选用户协议", - // duration: 2000 - // }) - // return; - // } + if (this.qindex == false) { + uni.showToast({ + icon: "none", + title: "请先阅读并勾选用户协议", + duration: 2000 + }) + return; + } console.log(e) let _this = this; @@ -124,14 +124,14 @@ wxlogin() {}, getPhone(e) { let that = this - // if (this.privacyPolicyChecked == false) { - // uni.showToast({ - // icon: "none", - // title: "请阅读并勾选用户协议", - // duration: 2000 - // }) - // return; - // } + if (this.privacyPolicyChecked == false) { + uni.showToast({ + icon: "none", + title: "请先阅读并勾选用户协议", + duration: 2000 + }) + return; + } console.log(e) uni.login({ provider: 'weixin', diff --git a/gasStation-uni/pagesRefuel/orderDetail/index.vue b/gasStation-uni/pagesRefuel/orderDetail/index.vue index 5545052d2..a9ec90900 100644 --- a/gasStation-uni/pagesRefuel/orderDetail/index.vue +++ b/gasStation-uni/pagesRefuel/orderDetail/index.vue @@ -345,6 +345,19 @@ // _this.goBack() return; } + if(res.data.code=="error"){ + request({ + url: "/business/allOrderInfo/orderStatus", + method: 'post', + data: {"orderNo":_this.orderNo,"status":"payFail"}, + }).then((ress)=>{}) + uni.showToast({ + title:res.data.msg, + icon:"none" + }) + // _this.goBack() + return; + } if(res.data.success == "ok"){ // _this.preferentialData.storeId = _this.oilOrder.storeId // _this.preferentialData.orderAmount = _this.oilOrder.orderAmount