From 9b116591538e98ed38aa3a2fff3ad768e02d66cc Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Sun, 18 Feb 2024 18:09:52 +0800 Subject: [PATCH] bug --- fuintAdmin/src/views/order/order_Added.vue | 12 +- fuintAdmin/src/views/order/order_Cashier.vue | 12 +- fuintAdmin/src/views/order/order_Goods.vue | 20 +- fuintAdmin/src/views/order/order_Oil.vue | 12 +- fuintAdmin/src/views/userGrade/index.vue | 477 +++++++++++++++++- .../userManager/entity/LJUserGrade.java | 7 + .../service/LJUserGradeService.java | 6 + .../service/impl/LJUserGradeServiceImpl.java | 32 ++ .../dept/service/impl/SysDeptServiceImpl.java | 31 +- .../views/cashier/NewComponents/homeindex.vue | 12 +- .../cashier/orderComponents/order_Added.vue | 10 +- .../cashier/orderComponents/order_Cashier.vue | 6 + .../cashier/orderComponents/order_Goods.vue | 18 +- .../cashier/orderComponents/order_Oil.vue | 12 +- .../cashier/orderComponents/order_Vip.vue | 14 +- gasStation-uni/pagesMy/details/details.vue | 8 +- .../pagesRefuel/orderDetail/index.vue | 23 +- .../pagesRefuel/orderSuccess/index.vue | 23 +- 18 files changed, 658 insertions(+), 77 deletions(-) diff --git a/fuintAdmin/src/views/order/order_Added.vue b/fuintAdmin/src/views/order/order_Added.vue index c27578aed..8cc335577 100644 --- a/fuintAdmin/src/views/order/order_Added.vue +++ b/fuintAdmin/src/views/order/order_Added.vue @@ -60,11 +60,11 @@ @@ -333,6 +333,12 @@ export default { } }, created() { + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.dateRange = [start,new Date()]; this.getList() this.getPayList() }, diff --git a/fuintAdmin/src/views/order/order_Cashier.vue b/fuintAdmin/src/views/order/order_Cashier.vue index a7fdb19d6..7e1e982e2 100644 --- a/fuintAdmin/src/views/order/order_Cashier.vue +++ b/fuintAdmin/src/views/order/order_Cashier.vue @@ -21,11 +21,11 @@ @@ -355,6 +355,12 @@ import {refundApi} from "@/api/order/refund"; } }, created() { + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.dateRange = [start,new Date()]; this.getList(); this.getOrderStatistics(); this.getStaffList(); diff --git a/fuintAdmin/src/views/order/order_Goods.vue b/fuintAdmin/src/views/order/order_Goods.vue index 70ed92c2b..2d59d894a 100644 --- a/fuintAdmin/src/views/order/order_Goods.vue +++ b/fuintAdmin/src/views/order/order_Goods.vue @@ -2,7 +2,7 @@ @@ -274,6 +274,174 @@ + + +
+ 充值特权 +
+
+
+ + + + + + + + + + + + + + + + +
+ + + + + + 赠送优惠券 + 赠送兑换券 + + + + +
+ +
+
赠送卡券
新增
+
+ + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
选择兑换券
新增
+
+ + + + + + + + + + + + + + + + + + + + + +
+
+
@@ -437,6 +605,135 @@ 取 消
+ + + +
+ + 搜索 +
+ + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + 搜索 +
+ + + + + + + + + + + + + + + + + + +
+
@@ -453,11 +750,32 @@ import { import {getChainStoreConfig, updateChainStoreConfig} from "@/api/staff/user/chainstoreconfig"; import {editSysConfig, getSysConfig} from "@/api/staff/user/sysconfig"; import {ljStoreInfo, updateStoreRule} from "@/api/staff/store"; +import {listExchange, listFavorable} from "@/api/EventMarketing/activeConsumption"; export default { name: "UserGradeIndex", dicts: ['yhlx','zhzt','yhhdz'], data() { return { + tableDatas:[],//公共选择区域 + tableDatadh:[],//兑换券 + //请求优惠券列表时的参数 + youhuiquan:{ + name:'', + pageNum: 1, + pageSize: 10, + }, + //请求兑换券列表时的参数 + duihuanquan:{ + name:'', + pageNum: 1, + pageSize: 10, + total:0 + }, + ytotal:0, + dtotal:0, + dialogTableVisible:false, + dialogTableVisibledh:false,//兑换券 + tableData:[], level1:true, level2:false, // 是否开启等级功能 @@ -526,7 +844,7 @@ export default { form: { id: '', grade: "", name: '',gasoline:1,dieselOil:1,naturalGas:1,preferential:'自定义优惠', gasolineDiscount:'无优惠',dieselDiscount:'无优惠',naturalGasDiscount:'无优惠',promotionGroup:'', // catchCondition: '', userPrivilege: '', catchType: '', catchValue: '', validDay: '',discount: '', speedPoint: '', - status: 'qy' }, + status: 'qy',tableDatas:[] }, // 查询参数 queryParams: { page: 1, @@ -535,6 +853,8 @@ export default { catchType: '', status: '' }, + pdidlist:[],//判断优惠券id + pddhidlist:[],//判断兑换券id // 表单校验 rules: { grade: [ @@ -547,6 +867,9 @@ export default { growthValue: [ { required: true, message: "请填写会员升级所需成长值", trigger: "blur" }, ], + ifRechargeCoupon: [ + { required: true, message: "请选择充值时是否赠送优惠券或兑换券", trigger: "blur" }, + ], gasoline: [ { required: true, message: "请填写汽油成长值", trigger: "blur" }, ], @@ -578,6 +901,124 @@ export default { this.getISEnableLevel(); }, methods: { + // 兑换券删除 + deletedhdata(row){ + if(this.tableDatas&&this.tableDatas.length>0){ + let delIdx=-1; + for ( let item of this.tableDatas) { + delIdx++; + if (item.id===row.id){ + break + } + } + this.pddhidlist.splice(delIdx,1); + this.tableDatas.splice(delIdx,1); + + + } + }, + // 请求兑换券 + getlistExchange(){ + this.tableDatadh = [] + listExchange(this.duihuanquan).then(res=>{ + if(res.code==200){ + this.dialogTableVisibledh = true + this.tableDatadh = res.data.records + this.dtotal = res.data.total + } + }) + + }, + // 兑换券券列表选择 + Favorabledata(row){ + this.dialogTableVisibledh = false + if(this.pddhidlist.indexOf(row.id)>-1 ){ + this.$message.error("该兑换卡券已存在") + return + } + + this.pddhidlist.push(row.id) + console.log(row) + let data ={ + activeGift: 2, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物 + goodsIds: "", //商品id + goodsName:"" , //商品名称 + goodsTotal: "", //商品数量 + vouchersId:row.id, //券id + giftCardName:row.name, //赠送卡券名称 + giftCardType: row.type, //券类型 + validityZero: null, + validityOne: null, + validityTwo:null, + validity:row.validity, + giftCardDetail: row.useInstructions , //券详情 + giftCardTime: row.validity, //券有效期 + giftCardTotal: 1 //券数量 + } + + this.tableDatas.push(data) + this.$message.success("新增成功") + }, + // 优惠券列表选择 + chosedata(row){ + this.dialogTableVisible = false + if(this.pdidlist.indexOf(row.id)>-1 ){ + this.$message.error("该优惠卡券已存在") + return + } + + this.pdidlist.push(row.id) + + let data ={ + activeGift: 1, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物 + goodsIds: "", //商品id + goodsName:"" , //商品名称 + goodsTotal: "", //商品数量 + vouchersId:row.id, //券id + giftCardName:row.name, //赠送卡券名称 + giftCardType: row.type, //券类型 + timeType: row.timeType, + validityZero: row.validityZero, + validityOne: row.validityOne, + validityTwo:row.validityTwo, + giftCardDetail: "满"+ row.satisfiedAmount+"减 "+row.discountAmount+"元" , //券详情 + giftCardTime: "", //券有效期 + giftCardTotal: 1//券数量 + } + + // this.form.tableDatas.push(data) + + this.$message.success("新增成功") + + }, + // 优惠券删除 + deletedata(row){ + if(this.form.tableDatas&&this.form.tableDatas.length>0){ + let delIdx=-1; + for ( let item of this.form.tableDatas) { + delIdx++; + if (item.id===row.id){ + break + } + } + this.pdidlist.splice(delIdx,1); + this.form.tableDatas.splice(delIdx,1); + + + } + }, + // 请求优惠券 + getlistFavorable(){ + this.tableData = [] + listFavorable(this.youhuiquan).then(res=>{ + if(res.code == 200){ + this.dialogTableVisible = true + this.tableData = res.data.records + this.ytotal = res.data.total + } + + }) + }, // 是否开启等级功能 getISEnableLevel(){ getChainStoreConfig().then(response => { @@ -782,6 +1223,7 @@ export default { this.form.gasolineRule = JSON.stringify(this.gasolinePreferential) this.form.dieselRule = JSON.stringify(this.dieselPreferential) this.form.naturalGasRule = JSON.stringify(this.naturalGasPreferential) + this.form.activeGift = this.form.activeGift.toString() if (this.form.id) { updateUserGrade(this.form).then(response => { if (response.data==1) { @@ -828,6 +1270,11 @@ export default { this.gasolinePreferential = JSON.parse(this.form.gasolineRule) this.dieselPreferential = JSON.parse(this.form.dieselRule) this.naturalGasPreferential = JSON.parse(this.form.naturalGasRule) + if (response.data.activeGift){ + _this.form.activeGift = response.data.activeGift.split(",") + }else { + _this.form.activeGift = [] + } this.open = true; this.title = "编辑会员等级"; }); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/entity/LJUserGrade.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/entity/LJUserGrade.java index ce3d624b8..f54c98636 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/entity/LJUserGrade.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/entity/LJUserGrade.java @@ -84,6 +84,13 @@ public class LJUserGrade extends BaseEntity implements Serializable { @ApiModelProperty("优惠活动组") private String promotionGroup; + @ApiModelProperty("是否充值送券:0否,1是") + private String ifRechargeCoupon; + /** + * 赠送类型:1赠送优惠券,2赠送兑换券 + */ + private String activeGift; + @TableField(exist = false) private List gasolineRuleList; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserGradeService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserGradeService.java index 54779223e..e0f21ca1b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserGradeService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserGradeService.java @@ -95,6 +95,12 @@ public interface LJUserGradeService extends IService { */ public int insertUserGrade(LJUserGrade userGrade,Integer storeId); + /** + * 添加固定四个等级的会员等级信息 + * @param storeId + */ + void addUserGrade(Integer storeId,Integer chainStoreId); + List selectUserGradeByChainStoreId(Integer chainStoreId); /** diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserGradeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserGradeServiceImpl.java index 72b2f1dfc..f94f3aa86 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserGradeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserGradeServiceImpl.java @@ -204,6 +204,38 @@ public class LJUserGradeServiceImpl extends ServiceImpl selectUserGradeByChainStoreId(Integer chainStoreId) { QueryWrapper queryWrapper = new QueryWrapper(); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/impl/SysDeptServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/impl/SysDeptServiceImpl.java index b68b61c7f..6f56aa286 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/impl/SysDeptServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/impl/SysDeptServiceImpl.java @@ -260,21 +260,22 @@ public class SysDeptServiceImpl extends ServiceImpl imple // 判断当前连锁店是否存在会员等级信息 不存在则添加一个默认的等级 List ljUserGrades = userGradeService.selectUserGradeByChainStoreId(chainStoreInfo.getId()); if (ljUserGrades.size()==0){ - LJUserGrade userGrade = new LJUserGrade(); - userGrade.setStoreId(store.getId()); - userGrade.setChainStoreId(chainStoreInfo.getId()); - userGrade.setGrade(1); - userGrade.setName("普通会员"); - userGrade.setStatus("qy"); - userGrade.setGrowthValue(1); - userGrade.setPreferential("自定义优惠"); - userGrade.setGasolineDiscount("无优惠"); - userGrade.setGasolineRule("[{\"gasolineRule1\":1,\"gasolineRule2\":1,\"gasolineRule3\":1}]"); - userGrade.setDieselDiscount("无优惠"); - userGrade.setDieselRule("[{\"dieselRule1\":1,\"dieselRule2\":1,\"dieselRule3\":1}]"); - userGrade.setNaturalGasDiscount("无优惠"); - userGrade.setNaturalGasRule("[{\"naturalGas1\":1,\"naturalGas2\":1,\"naturalGas3\":1}]"); - userGradeService.insertUserGrade(userGrade,store.getId()); +// LJUserGrade userGrade = new LJUserGrade(); +// userGrade.setStoreId(store.getId()); +// userGrade.setChainStoreId(chainStoreInfo.getId()); +// userGrade.setGrade(1); +// userGrade.setName("普通会员"); +// userGrade.setStatus("qy"); +// userGrade.setGrowthValue(100); +// userGrade.setPreferential("自定义优惠"); +// userGrade.setGasolineDiscount("无优惠"); +// userGrade.setGasolineRule("[{\"gasolineRule1\":1,\"gasolineRule2\":1,\"gasolineRule3\":1}]"); +// userGrade.setDieselDiscount("无优惠"); +// userGrade.setDieselRule("[{\"dieselRule1\":1,\"dieselRule2\":1,\"dieselRule3\":1}]"); +// userGrade.setNaturalGasDiscount("无优惠"); +// userGrade.setNaturalGasRule("[{\"naturalGas1\":1,\"naturalGas2\":1,\"naturalGas3\":1}]"); +// userGradeService.insertUserGrade(userGrade,store.getId()); + userGradeService.addUserGrade(store.getId(),chainStoreInfo.getId()); } diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 1a0055788..49213a989 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -599,7 +599,7 @@ style="display: flex;margin: 13px 5px;box-sizing: border-box;flex-wrap: wrap; ">
{{ item.rechargeBalance }}
赠送{{ item.giftBalance }}
@@ -607,7 +607,7 @@
{{ item.incomeLitres }}L
售价{{ item.rechargeBalance }}
@@ -4410,7 +4410,7 @@ color: #00afff; font-size: 20px; } - .select { + .select2 { position: relative; background-color: #fff; box-shadow: 0px 2px 7px 0px rgba(85, 110, 97, 0.35); @@ -4418,7 +4418,7 @@ border: 1px solid #00aaff; } - .select:before { + .select2:before { content: ''; position: absolute; right: 0; @@ -4427,7 +4427,7 @@ border-top-color: transparent; border-left-color: transparent; } - .select:after { + .select2:after { content: ''; width: 4px; height: 6px; diff --git a/fuintCashierWeb/src/views/cashier/orderComponents/order_Added.vue b/fuintCashierWeb/src/views/cashier/orderComponents/order_Added.vue index 1fcfe0c8f..2c30e9490 100644 --- a/fuintCashierWeb/src/views/cashier/orderComponents/order_Added.vue +++ b/fuintCashierWeb/src/views/cashier/orderComponents/order_Added.vue @@ -60,10 +60,10 @@
- +
总金额
-
{{orderStatistics.theTotalAmount}}
+
{{orderStatistics.theTotalAmount || 0}}
商品总数量
-
{{orderStatistics.theTotalNumberOfUnits}}
+
{{orderStatistics.theTotalNumberOfUnits || 0}}
优惠金额
-
{{orderStatistics.discountAmount}}
+
{{orderStatistics.discountAmount || 0}}
微信
@@ -342,6 +342,12 @@ export default { } }, created() { + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.dateRange = [start,new Date()]; this.getList(); this.getOrderStatistics(); this.getStaffList(); diff --git a/fuintCashierWeb/src/views/cashier/orderComponents/order_Oil.vue b/fuintCashierWeb/src/views/cashier/orderComponents/order_Oil.vue index 636d64613..36d048cf3 100644 --- a/fuintCashierWeb/src/views/cashier/orderComponents/order_Oil.vue +++ b/fuintCashierWeb/src/views/cashier/orderComponents/order_Oil.vue @@ -71,10 +71,10 @@ --> - +