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 @@ <el-form-item label="创建时间"> <el-date-picker v-model="dateRange" - style="width: 240px" + style="width: 400px" size="medium" value-format="yyyy-MM-dd" - type="daterange" - range-separator="-" + type="datetimerange" + range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" ></el-date-picker> @@ -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 @@ <el-form-item label="交易时间"> <el-date-picker v-model="dateRange" - style="width: 240px" + style="width: 400px" size="medium" value-format="yyyy-MM-dd" - type="daterange" - range-separator="-" + type="datetimerange" + range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" ></el-date-picker> @@ -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 @@ <template> <div> <el-card class="box-card"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px"> <el-form-item label="交易员工" prop="staffId"> <el-select v-model="queryParams.staffId" @@ -49,11 +49,11 @@ <el-form-item label="交易时间"> <el-date-picker v-model="dateRange" - style="width: 240px" + style="width: 400px" size="medium" value-format="yyyy-MM-dd" - type="daterange" - range-separator="-" + type="datetimerange" + range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" ></el-date-picker> @@ -75,15 +75,15 @@ </div> <div class="box"> <div class="size-hui">总金额</div> - <div class="size-bole">{{orderStatistics.theTotalAmount}}</div> + <div class="size-bole">{{orderStatistics.theTotalAmount || 0}}</div> </div> <div class="box"> <div class="size-hui">商品总数量</div> - <div class="size-bole">{{orderStatistics.theTotalNumberOfUnits}}</div> + <div class="size-bole">{{orderStatistics.theTotalNumberOfUnits || 0}}</div> </div> <div class="box"> <div class="size-hui">优惠金额</div> - <div class="size-bole">{{orderStatistics.discountAmount}}</div> + <div class="size-bole">{{orderStatistics.discountAmount || 0}}</div> </div> <div class="box"> <div class="size-hui">微信</div> @@ -287,6 +287,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/fuintAdmin/src/views/order/order_Oil.vue b/fuintAdmin/src/views/order/order_Oil.vue index cb8e4cd2e..27e5a1479 100644 --- a/fuintAdmin/src/views/order/order_Oil.vue +++ b/fuintAdmin/src/views/order/order_Oil.vue @@ -71,11 +71,11 @@ <el-form-item label="交易时间"> <el-date-picker v-model="dateRange" - style="width: 240px" + style="width: 400px" size="medium" value-format="yyyy-MM-dd" - type="daterange" - range-separator="-" + type="datetimerange" + range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" ></el-date-picker> @@ -370,6 +370,12 @@ } }, created() { + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.dateRange = [start,new Date()]; this.getStaffList(); this.getOrderStatistics(); this.getList(); diff --git a/fuintAdmin/src/views/userGrade/index.vue b/fuintAdmin/src/views/userGrade/index.vue index ddeaed0bf..9dd7960c5 100644 --- a/fuintAdmin/src/views/userGrade/index.vue +++ b/fuintAdmin/src/views/userGrade/index.vue @@ -68,15 +68,15 @@ <el-row :gutter="10" class="mb8"> <el-col :span="21"> <span style="font-size: 18px">等级规则</span> - <span style="font-size: 14px">(最多支持20个等级)</span> - </el-col> - <el-col :span="3"> - <el-button - type="primary" - icon="el-icon-plus" - @click="handleAdd" - >新增会员等级</el-button> +<!-- <span style="font-size: 14px">(最多支持20个等级)</span>--> </el-col> +<!-- <el-col :span="3">--> +<!-- <el-button--> +<!-- type="primary"--> +<!-- icon="el-icon-plus"--> +<!-- @click="handleAdd"--> +<!-- >新增会员等级</el-button>--> +<!-- </el-col>--> <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> </el-row> <el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange"> @@ -199,12 +199,12 @@ icon="el-icon-edit" @click="handleUpdate(scope.row)" >修改</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - >删除</el-button> +<!-- <el-button--> +<!-- size="mini"--> +<!-- type="text"--> +<!-- icon="el-icon-delete"--> +<!-- @click="handleDelete(scope.row)"--> +<!-- >删除</el-button>--> </template> </el-table-column> </el-table> @@ -274,6 +274,174 @@ </el-form-item> </el-col> </el-row> + <el-row> + <el-col :span="24"> + <div style="font-size: 16px"> + 充值特权 + </div> + </el-col> + </el-row> + + <el-row> + <el-col :span="24"> + <el-form-item label="是否充值送券" prop="ifRechargeCoupon"> + <el-radio-group v-model="form.ifRechargeCoupon"> + <!-- <el-radio--> + <!-- v-for="dict in dict.type.yhlx"--> + <!-- :key="dict.value"--> + <!-- :label="dict.label"--> + <!-- :value="dict.value"></el-radio>--> + <el-radio label="0" value="0">否</el-radio> + <el-radio label="1" value="1">是</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + </el-row> + <div v-if="form.ifRechargeCoupon && form.ifRechargeCoupon=='1'"> + <el-row> + <el-col :span="24"> + <el-form-item label="赠送类型" prop="activeGift" > + <el-checkbox-group v-model="form.activeGift"> + + <el-checkbox label="1" >赠送优惠券</el-checkbox> + <el-checkbox label="2" >赠送兑换券</el-checkbox> + </el-checkbox-group> + </el-form-item> + </el-col> + </el-row> + </div> + <!-- 选择优惠券--> + <div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('1')>-1 " > + <div class="box-bt"> <div >赠送卡券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()" >新增</el-button> </div> + <div style="margin: 10px 0px"> + <el-table + :data="form.tableDatas" + border + style="width: 100%"> + <el-table-column + prop="giftCardName" + label="卡券名称" + width="0"> + </el-table-column> + <el-table-column + prop="giftCardType" + label="券类型" + width="80"> + <template slot-scope="scope"> + <span v-if="scope.row.giftCardType == 0" >油品券</span> + <span v-if="scope.row.giftCardType == 1" >商品券</span> + <span v-if="scope.row.giftCardType == 2" >通用券</span> + </template> + </el-table-column> + <el-table-column + prop="date" + label="券详情" + width="80"> + <template slot-scope="scope"> + <span>{{scope.row.giftCardDetail}}</span> + </template> + </el-table-column> + <el-table-column + prop="date" + label="有效期(天)" + width="240"> + <template slot-scope="scope"> + <span v-if="scope.row.timeType == 0" > <el-input-number v-model="scope.row.validityZero" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span> + <span v-if="scope.row.timeType == 1" > <el-input-number v-model="scope.row.validityOne" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span> + <span v-if="scope.row.timeType == 2" > <el-input-number v-model="scope.row.validityTwo" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span> + </template> + </el-table-column> + <el-table-column + prop="date" + label="数量" + width="240"> + <template slot-scope="scope"> + <el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number> + </template> + </el-table-column> + + <el-table-column + prop="address" + label="操作"> + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + @click="deletedata(scope.row)" + >删除</el-button> + </template> + </el-table-column> + </el-table> + + </div> + </div> + <!-- 选择兑换券--> + <div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('2')>-1 " > + <div class="box-bt"> <div >选择兑换券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistExchange()" >新增</el-button> </div> + <div style="margin: 10px 0px"> + + <el-table + :data="tableDatas" + border + style="width: 100%"> + <el-table-column + prop="giftCardName" + label="卡券名称" + width="80"> + </el-table-column> + <el-table-column + prop="date" + label="券类型" + width="80"> + <template slot-scope="scope"> + <span v-if="scope.row.giftCardType == 0" >油品券</span> + <span v-if="scope.row.giftCardType == 1" >商品券</span> + <span v-if="scope.row.giftCardType == 2" >通用券</span> + </template> + </el-table-column> + <el-table-column + prop="date" + label="券详情" + width="80"> + <template slot-scope="scope"> + <span>{{scope.row.giftCardDetail}}</span> + </template> + </el-table-column> + <el-table-column + prop="date" + label="有效期(天)" + width="240"> + <template slot-scope="scope"> + <span > <el-input-number v-model="scope.row.giftCardTime" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span> + + </template> + </el-table-column> + <el-table-column + prop="date" + label="数量" + width="240"> + <template slot-scope="scope"> + <el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number> + </template> + </el-table-column> + <el-table-column + prop="address" + label="操作" + + > + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + @click="deletedhdata(scope.row)" + >删除</el-button> + </template> + </el-table-column> + </el-table> + + </div> + </div> + <el-row> <el-col :span="24"> <div style="font-size: 16px"> @@ -437,6 +605,135 @@ <el-button @click="cancel">取 消</el-button> </div> </el-dialog> + + + <el-dialog title="优惠券列表" :visible.sync="dialogTableVisible"> + <div style="display: flex;align-items: center; margin-bottom: 20px "> + <el-input v-model="youhuiquan.name" placeholder="优惠券名称"></el-input> + <el-button type="primary" icon="el-icon-search" @click="getlistFavorable" >搜索</el-button> + </div> + <el-table + :data="tableData" + border + style="width: 100%"> + <el-table-column + prop="name" + label="卡券名称" + width="100"> + </el-table-column> + <el-table-column + prop="date" + label="券类型" + width="100"> + <template slot-scope="scope"> + <span v-if="scope.row.type == 0" >油品券</span> + <span v-if="scope.row.type == 1" >商品券</span> + <span v-if="scope.row.type == 2" >通用券</span> + </template> + </el-table-column> + <el-table-column + prop="date" + label="券详情" + width="100"> + <template slot-scope="scope"> + <span>满{{scope.row.satisfiedAmount}}减 {{scope.row.discountAmount}}元 </span> + </template> + </el-table-column> + <el-table-column + prop="date" + label="有效期(天)" + width="180"> + <template slot-scope="scope"> + <span v-if="scope.row.timeType == 0" >{{scope.row.validityZero}}天 </span> + <span v-if="scope.row.timeType == 1" >{{scope.row.validityOne}}天 </span> + <span v-if="scope.row.timeType == 2" >{{scope.row.validityTwo}}天 </span> + </template> + </el-table-column> + + <el-table-column + prop="address" + label="操作"> + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + @click="chosedata(scope.row)" + >选择</el-button> + </template> + </el-table-column> + </el-table> + <div><pagination + v-show="ytotal>0" + :total="ytotal" + :page.sync="youhuiquan.pageNum" + :limit.sync="youhuiquan.pageSize" + @pagination="getlistFavorable" + /></div> + + </el-dialog> + <!-- 兑换券列表--> + <el-dialog title="兑换券列表" :visible.sync="dialogTableVisibledh"> + <div style="display: flex;align-items: center; margin-bottom: 20px "> + <el-input v-model="duihuanquan.name" placeholder="兑换券名称"></el-input> + <el-button type="primary" icon="el-icon-search" @click="getlistExchange" >搜索</el-button> + </div> + + <el-table + :data="tableDatadh" + border + style="width: 100%"> + <el-table-column + prop="name" + label="卡券名称" + width="100"> + </el-table-column> + <el-table-column + prop="date" + label="券类型" + width="100"> + <template slot-scope="scope"> + <span v-if="scope.row.type == 0" >油品券</span> + <span v-if="scope.row.type == 1" >商品券</span> + <span v-if="scope.row.type == 2" >通用券</span> + </template> + </el-table-column> + <el-table-column + prop="date" + label="使用说明" + width="100"> + <template slot-scope="scope"> + <span>{{scope.row.useInstructions}}</span> + </template> + </el-table-column> + <el-table-column + prop="date" + label="有效期(天)" + width="180"> + <template slot-scope="scope"> + <span >{{scope.row.validity}}天 </span> + </template> + </el-table-column> + + <el-table-column + prop="address" + label="操作"> + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + @click="Favorabledata(scope.row)" + >选择</el-button> + </template> + </el-table-column> + </el-table> + <div><pagination + v-show="dtotal>0" + :total="dtotal" + :page.sync="duihuanquan.pageNum" + :limit.sync="duihuanquan.pageSize" + @pagination="getlistExchange" + /></div> + </el-dialog> </div> </template> @@ -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<JSONObject> 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<LJUserGrade> { */ public int insertUserGrade(LJUserGrade userGrade,Integer storeId); + /** + * 添加固定四个等级的会员等级信息 + * @param storeId + */ + void addUserGrade(Integer storeId,Integer chainStoreId); + List<LJUserGrade> 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<LJUserGradeMapper, LJUse return row; } + @Override + public void addUserGrade(Integer storeId,Integer chainStoreId) { + LJUserGrade userGrade = new LJUserGrade(); + userGrade.setStoreId(storeId); + userGrade.setChainStoreId(chainStoreId); + userGrade.setGrade(1); + userGrade.setName("普通会员"); + userGrade.setGrowthValue(100); + userGrade.setStatus("qy"); + userGrade.setIfRechargeCoupon("0"); + 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}]"); + this.insertUserGrade(userGrade,storeId); + userGrade.setGrade(2); + userGrade.setName("白金会员"); + userGrade.setGrowthValue(200); + this.insertUserGrade(userGrade,storeId); + userGrade.setGrade(3); + userGrade.setName("黄金会员"); + userGrade.setGrowthValue(300); + this.insertUserGrade(userGrade,storeId); + userGrade.setGrade(4); + userGrade.setName("钻石会员"); + userGrade.setGrowthValue(400); + this.insertUserGrade(userGrade,storeId); + } + @Override public List<LJUserGrade> 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<SysDeptMapper,SysDept> imple // 判断当前连锁店是否存在会员等级信息 不存在则添加一个默认的等级 List<LJUserGrade> 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; "> <div class="mon" v-for="(item,index) in cardValueList" :key="index" - :class="activeKey === index ? 'select' : ''" + :class="activeKey === index ? 'select2' : ''" @click="rechargeCard(index)"> <div class="top1"><span class="amount1">{{ item.rechargeBalance }}</span>元</div> <div>赠送<span class="amount">{{ item.giftBalance }}</span>元</div> @@ -607,7 +607,7 @@ </div> <div style="font-size: 16px;width: 30%;margin-left: 13px;margin-top: 8px;" - :class="activeKey === cardValueList.length ? 'select' : ''" + :class="activeKey === cardValueList.length ? 'select2' : ''" @click="rechargeCard(cardValueList.length,-1)"> <el-input placeholder="请输入充值金额" size="medium" @@ -730,7 +730,7 @@ <div style="display: flex;margin: 20px 5px;box-sizing: border-box;flex-wrap: wrap;"> <div class="mon2" v-for="(item,index) in cardFuelDieselList" :key="index" - :class="activeKey === index ? 'select' : ''" + :class="activeKey === index ? 'select2' : ''" @click="recharge(index)"> <div class="top1"><span class="amount1">{{ item.incomeLitres }}</span>L</div> <div>售价<span class="amount">{{ item.rechargeBalance }}</span>元</div> @@ -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 @@ <el-form-item label="创建时间"> <el-date-picker v-model="dateRange" - style="width: 240px" + style="width: 400px" size="medium" value-format="yyyy-MM-dd" - type="daterange" + type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @@ -334,6 +334,12 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE } }, 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/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue b/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue index 24f2860c8..429e424ea 100644 --- a/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue +++ b/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue @@ -452,6 +452,12 @@ import {formatDate} from "@/utils"; } }, 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_Goods.vue b/fuintCashierWeb/src/views/cashier/orderComponents/order_Goods.vue index 4da61804a..bff444fa6 100644 --- a/fuintCashierWeb/src/views/cashier/orderComponents/order_Goods.vue +++ b/fuintCashierWeb/src/views/cashier/orderComponents/order_Goods.vue @@ -2,7 +2,7 @@ <template> <div> <el-card class="box-card"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px"> <el-form-item label="交易员工" prop="staffId"> <el-select v-model="queryParams.staffId" @@ -49,10 +49,10 @@ <el-form-item label="交易时间"> <el-date-picker v-model="dateRange" - style="width: 240px" + style="width: 400px" size="medium" value-format="yyyy-MM-dd" - type="daterange" + type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @@ -75,15 +75,15 @@ </div> <div class="box"> <div class="size-hui">总金额</div> - <div class="size-bole">{{orderStatistics.theTotalAmount}}</div> + <div class="size-bole">{{orderStatistics.theTotalAmount || 0}}</div> </div> <div class="box"> <div class="size-hui">商品总数量</div> - <div class="size-bole">{{orderStatistics.theTotalNumberOfUnits}}</div> + <div class="size-bole">{{orderStatistics.theTotalNumberOfUnits || 0}}</div> </div> <div class="box"> <div class="size-hui">优惠金额</div> - <div class="size-bole">{{orderStatistics.discountAmount}}</div> + <div class="size-bole">{{orderStatistics.discountAmount || 0}}</div> </div> <div class="box"> <div class="size-hui">微信</div> @@ -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 @@ <el-form-item label="交易时间"> <el-date-picker v-model="dateRange" - style="width: 240px" + style="width: 400px" size="medium" value-format="yyyy-MM-dd" - type="daterange" + type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @@ -166,7 +166,7 @@ <!-- </el-form>--> <!-- </template>--> <!-- </el-table-column>--> - <el-table-column type="index" width="80" align="center" label="序号"/> + <el-table-column type="index" width="50" align="center" label="序号"/> <el-table-column prop="terminal" label="终端" align="center" width="80"> <template slot-scope="props"> <span>{{ getVal(terminalList,props.row.terminal) }}</span> @@ -388,6 +388,12 @@ } }, created() { + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.dateRange = [start,new Date()]; this.getStaffList(); this.getOrderStatistics(); this.getList(); diff --git a/fuintCashierWeb/src/views/cashier/orderComponents/order_Vip.vue b/fuintCashierWeb/src/views/cashier/orderComponents/order_Vip.vue index ea6dee2cd..cd008616f 100644 --- a/fuintCashierWeb/src/views/cashier/orderComponents/order_Vip.vue +++ b/fuintCashierWeb/src/views/cashier/orderComponents/order_Vip.vue @@ -47,11 +47,11 @@ <!-- <el-form-item label="交易时间">--> <!-- <el-date-picker--> <!-- v-model="dateRange"--> -<!-- style="width: 240px"--> +<!-- style="width: 400px"--> <!-- size="medium"--> <!-- value-format="yyyy-MM-dd"--> -<!-- type="daterange"--> -<!-- range-separator="-"--> +<!-- type="datetimerange"--> +<!-- range-separator="至"--> <!-- start-placeholder="开始日期"--> <!-- end-placeholder="结束日期"--> <!-- ></el-date-picker>--> @@ -305,6 +305,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(); this.getOrderStatistics() @@ -478,7 +484,7 @@ export default { if (val!=undefined){ this.queryParams.pageNo = val } - listCardValueRecord(this.queryParams).then( response => { + listCardValueRecord(this.addDateRange(this.queryParams, this.dateRange)).then( response => { this.list = response.data.records; this.total = response.data.total; }) diff --git a/gasStation-uni/pagesMy/details/details.vue b/gasStation-uni/pagesMy/details/details.vue index 407387472..8b64a33ed 100644 --- a/gasStation-uni/pagesMy/details/details.vue +++ b/gasStation-uni/pagesMy/details/details.vue @@ -78,6 +78,12 @@ <view class="hui-size">交易时间</view> <view class="">{{oilOrder.payTime}}</view> </view> + + <view class="box-title" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark">订单评价</view> + <view class="dis-fx" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark"> + <view class="hui-size">订单评价</view> + <view class="">{{ oilOrder.remark }}</view> + </view> </view> <view class="anniu" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark==null || oilOrder.orderStatus=='paid' && oilOrder.remark==''" @click="gocomment()"> @@ -189,7 +195,7 @@ }, gocomment() { uni.navigateTo({ - url: '/pagesMy/comment/comment?orderId=' + this.orderId + url: '/pagesMy/comment/comment?orderId=' + this.oilOrder.id }) }, goback() { diff --git a/gasStation-uni/pagesRefuel/orderDetail/index.vue b/gasStation-uni/pagesRefuel/orderDetail/index.vue index 348c529a3..53795b3d9 100644 --- a/gasStation-uni/pagesRefuel/orderDetail/index.vue +++ b/gasStation-uni/pagesRefuel/orderDetail/index.vue @@ -350,8 +350,11 @@ // method: 'post', // data: _this.preferentialData, // }).then((res)=>{}) - uni.reLaunch({ - url: '/pagesRefuel/orderSuccess/index' + // uni.reLaunch({ + // url: '/pagesRefuel/orderSuccess/index' + // }) + uni.navigateTo({ + url: '/pagesRefuel/orderSuccess/index?orderNo='+_this.orderNo, }) return; } @@ -390,8 +393,12 @@ // }).then((res)=>{ // console.log(res); // }) - uni.reLaunch({ - url: '/pagesRefuel/orderSuccess/index' + // uni.reLaunch({ + // url: '/pagesRefuel/orderSuccess/index' + // }) + + uni.navigateTo({ + url: '/pagesRefuel/orderSuccess/index?orderNo='+_this.orderNo, }) }, fail: function (err) { @@ -423,8 +430,12 @@ // method: 'post', // data: _this.preferentialData, // }).then((res)=>{}) - uni.reLaunch({ - url: '/pagesRefuel/orderSuccess/index' + // uni.reLaunch({ + // url: '/pagesRefuel/orderSuccess/index' + // }) + + uni.navigateTo({ + url: '/pagesRefuel/orderSuccess/index?orderNo='+_this.orderNo, }) }else{ request({ diff --git a/gasStation-uni/pagesRefuel/orderSuccess/index.vue b/gasStation-uni/pagesRefuel/orderSuccess/index.vue index 9c8e7ab5e..d5ca92efe 100644 --- a/gasStation-uni/pagesRefuel/orderSuccess/index.vue +++ b/gasStation-uni/pagesRefuel/orderSuccess/index.vue @@ -16,7 +16,9 @@ 您已完成支付<br/> 谢谢您对来个油惠的支持! </view> - <view @click="goBack" style="border: solid 1px #30a1ff;border-radius: 50px;margin: 20px auto;width: 150px; + <view v-if="orderNo" @click="goOrderInfo" style="border: solid 1px #30a1ff;border-radius: 50px;margin: 20px auto;width: 150px; + height: 40px;line-height: 40px;color: #30a1ff;">{{timestamp}}s后去评价</view> + <view v-else @click="goBack" style="border: solid 1px #30a1ff;border-radius: 50px;margin: 20px auto;width: 150px; height: 40px;line-height: 40px;color: #30a1ff;">{{timestamp}}s后返回首页</view> </view> </view> @@ -29,12 +31,22 @@ return { timestamp:3, timer:{}, + orderNo:"", } }, - onLoad() { + onLoad(e) { + if (e.orderNo){ + this.orderNo = e.orderNo + } this.countdown() }, methods: { + goOrderInfo(){ + clearInterval(this.timer) + uni.navigateTo({ + url: '/pagesMy/details/details?orderNo=' + this.orderNo, + }) + }, // 倒计时刷新 countdown(){ let _this = this @@ -43,7 +55,12 @@ _this.timestamp--; // 如果倒计时为0,清除定时器 if(_this.timestamp === 0) { - _this.goBack() + if (_this.orderNo){ + _this.goOrderInfo() + }else{ + _this.goBack() + } + clearInterval(this.timer) _this.timestamp = 3 }