Merge branch 'main' of http://122.51.230.86:3000/dianliang/oil-station into main
This commit is contained in:
commit
75815cf4b0
fuintAdmin/src/views
fuintAdmin_zt/src/views/financialStatement/yunyingfenxi
fuintBackend/fuint-application/src/main/java/com/fuint/business
integral/entity
marketingActivity
activePrice
cardCoupon
order/service/impl
gasStation-uni
@ -9,21 +9,21 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动时间" prop="activeTimeType">
|
<el-form-item label="活动时间" prop="activeTimeType">
|
||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<div class="icon-type" v-for="(item,index) in activityTimeTypeList" :key="index"
|
<el-radio-group v-model="ruleForm.activeTimeType">
|
||||||
:class="{ 'acvtive' : index === tindex1 }" @click="Typeindex1(index)">
|
<el-radio :label="'0'">永久有效</el-radio>
|
||||||
<img src="@/assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex1">
|
<el-radio :label="'1'">自定义</el-radio>
|
||||||
<img src="@/assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex1">
|
</el-radio-group>
|
||||||
{{ item }}
|
|
||||||
</div>
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
v-if="ruleForm.activeTimeType=='1'"
|
||||||
v-model="ruleForm.activeStartTime"
|
v-model="ruleForm.activeStartTime"
|
||||||
style="width: 160px"
|
style="width: 160px"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
placeholder="开始日期">
|
placeholder="开始日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
<span style="margin: 0 5px">至</span>
|
<span v-if="ruleForm.activeTimeType=='1'" style="margin: 0 5px">至</span>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
v-if="ruleForm.activeTimeType=='1'"
|
||||||
v-model="ruleForm.activeEndTime"
|
v-model="ruleForm.activeEndTime"
|
||||||
style="width: 160px"
|
style="width: 160px"
|
||||||
type="date"
|
type="date"
|
||||||
@ -35,23 +35,21 @@
|
|||||||
|
|
||||||
<el-form-item label="优惠类型" prop="offerType">
|
<el-form-item label="优惠类型" prop="offerType">
|
||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<div class="icon-type" v-for="(item,index) in preferentialTypeList" :key="index"
|
<el-radio-group v-model="ruleForm.offerType" @input="changeOfferType()">
|
||||||
:class="{ 'acvtive' : index === tindex2 }" @click="Typeindex2(index)">
|
<el-radio :label="'0'" >立减优惠</el-radio>
|
||||||
<img src="@/assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex2">
|
<el-radio :label="'1'" >折扣优惠</el-radio>
|
||||||
<img src="@/assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex2">
|
</el-radio-group>
|
||||||
{{ item }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<span style="color: grey;font-size: 12px">例如:立减优惠,满100立减2元;折扣优惠,满200享受95折</span>
|
<span style="color: grey;font-size: 12px">例如:立减优惠,满100立减2元;折扣优惠,满200享受95折</span>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动类型" prop="activeType">
|
<el-form-item label="活动类型" prop="activeType">
|
||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<div class="icon-type" v-for="(item,index) in activityTypeList" :key="index"
|
<el-radio-group v-model="ruleForm.activeType">
|
||||||
:class="{ 'acvtive' : index === tindex5 }" @click="Typeindex5(index)">
|
<el-radio :label="'0'">固定优惠</el-radio>
|
||||||
<img src="@/assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex5">
|
<el-radio :label="'1'" v-if="ruleForm.offerType=='0'">随机满减</el-radio>
|
||||||
<img src="@/assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex5">
|
<el-radio :label="'2'" v-if="ruleForm.offerType=='0'">每满</el-radio>
|
||||||
{{ item }}
|
</el-radio-group>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div style="color: grey;font-size: 11px">
|
<div style="color: grey;font-size: 11px">
|
||||||
固定满减:订单满足规则时,只优惠一次且金额固定。如:满100元立减5元,订单金额是210元,则优惠减5元。
|
固定满减:订单满足规则时,只优惠一次且金额固定。如:满100元立减5元,订单金额是210元,则优惠减5元。
|
||||||
@ -96,27 +94,26 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="width: 50%">
|
<div style="width: 50%">
|
||||||
<el-form-item label="适用时间段" prop="timeType">
|
<el-form-item label="适用时间段" prop="timeType">
|
||||||
<div>
|
<div style="width: 100px;margin-top: 10px">
|
||||||
<div class="icon-type" v-for="(item,index) in weekMonthTypeList" :key="index"
|
<el-radio-group v-model="ruleForm.timeType">
|
||||||
:class="{ 'acvtive' : index === tindex3 }" @click="Typeindex3(index)">
|
<div style="display: flex; width: 500px;margin-bottom: 15px;">
|
||||||
<img src="@/assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex3">
|
<el-radio :label="'1'">每周</el-radio>
|
||||||
<img src="@/assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex3">
|
<el-checkbox-group v-model="weekDay" style="margin-left: 20px" :disabled="ruleForm.timeType!='1'">
|
||||||
{{ item }}
|
|
||||||
<el-checkbox-group v-model="weekDay" v-if="item=='每周'" style="margin-left: 20px"
|
|
||||||
:disabled="tindex3!=0">
|
|
||||||
<el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox>
|
<el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<el-select v-model="monthDay" placeholder="请选择每月固定日期" multiple v-if="item=='每月'"
|
</div>
|
||||||
:disabled="tindex3!=1"
|
|
||||||
style="margin-left: 20px">
|
<el-radio :label="'2'">每月
|
||||||
|
<el-select :disabled="ruleForm.timeType!='2'" v-model="monthDay" placeholder="请选择每月固定日期" multiple style="margin-left: 20px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in 31"
|
v-for="item in 31"
|
||||||
:key="item.value"
|
:key="item+''"
|
||||||
:label="item+'日'"
|
:label="item+'日'"
|
||||||
:value="item">
|
:value="item+''">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 20px">
|
<div style="margin-top: 20px">
|
||||||
<el-form-item label="时间段" prop="timeApplyStart" label-width="65px">
|
<el-form-item label="时间段" prop="timeApplyStart" label-width="65px">
|
||||||
@ -139,13 +136,11 @@
|
|||||||
|
|
||||||
<el-form-item label="适用油品油号" prop="applyOilType">
|
<el-form-item label="适用油品油号" prop="applyOilType">
|
||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<div class="icon-type" v-for="(item,index) in oilTypeList" :key="index"
|
<el-radio-group v-model="ruleForm.applyOilType">
|
||||||
:class="{ 'acvtive' : index === tindex4 }" @click="Typeindex4(index)">
|
<el-radio :label="'0'">不限</el-radio>
|
||||||
<img src="@/assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex4">
|
<el-radio :label="'1'">自定义</el-radio>
|
||||||
<img src="@/assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex4">
|
</el-radio-group>
|
||||||
{{ item }}
|
<el-select v-if="ruleForm.applyOilType=='1'" v-model="ruleForm.applyOil" multiple clearable placeholder="请选择油品油号(多选)">
|
||||||
</div>
|
|
||||||
<el-select v-model="ruleForm.applyOil" multiple clearable placeholder="请选择油品油号(多选)">
|
|
||||||
<el-option v-for="(item,index) in oilNumberList" :key="index"
|
<el-option v-for="(item,index) in oilNumberList" :key="index"
|
||||||
:label="getOilNamess(oilNameList,item.oilName)" :value="item.oilName"></el-option>
|
:label="getOilNamess(oilNameList,item.oilName)" :value="item.oilName"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -347,13 +342,13 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
activeTimeType: 0,
|
activeTimeType: '0',
|
||||||
paymentType: [],
|
paymentType: [],
|
||||||
activeManner: [],
|
activeManner: [],
|
||||||
offerType: 0,
|
offerType: '0',
|
||||||
activeType: 0,
|
activeType: '0',
|
||||||
timeType: 0,
|
timeType: '0',
|
||||||
applyOilType: 0,
|
applyOilType: '0',
|
||||||
},
|
},
|
||||||
userGradeList: [],
|
userGradeList: [],
|
||||||
userLabelList: [],
|
userLabelList: [],
|
||||||
@ -362,21 +357,21 @@ export default {
|
|||||||
oilNumberList: [],
|
oilNumberList: [],
|
||||||
|
|
||||||
activityTimeTypeList: ["永久有效", "自定义"],
|
activityTimeTypeList: ["永久有效", "自定义"],
|
||||||
tindex1: 0,
|
tindex1: '0',
|
||||||
preferentialTypeList: ["立减优惠", "折扣优惠"],
|
preferentialTypeList: ["立减优惠", "折扣优惠"],
|
||||||
tindex2: 0,
|
tindex2: '0',
|
||||||
weekMonthTypeList: ["每周", "每月"],
|
weekMonthTypeList: ["每周", "每月"],
|
||||||
tindex3: 0,
|
tindex3: '0',
|
||||||
oilTypeList: ['不限', '自定义'],
|
oilTypeList: ['不限', '自定义'],
|
||||||
tindex4: 0,
|
tindex4: '0',
|
||||||
activityTypeList: ['固定满减', '随机满减', '每满'],
|
activityTypeList: ['固定满减', '随机满减', '每满'],
|
||||||
tindex5: 0,
|
tindex5: '0',
|
||||||
|
|
||||||
weekList: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
|
weekList: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
|
||||||
weekDay: [],
|
weekDay: [],
|
||||||
monthDay: [],
|
monthDay: [],
|
||||||
orderList: [{
|
orderList: [{
|
||||||
activeManner: 0,
|
activeManner: '0',
|
||||||
full: "",
|
full: "",
|
||||||
sub: "",
|
sub: "",
|
||||||
randomFront: "",
|
randomFront: "",
|
||||||
@ -385,7 +380,7 @@ export default {
|
|||||||
enjoyDiscount: "",
|
enjoyDiscount: "",
|
||||||
}],
|
}],
|
||||||
refuelList: [{
|
refuelList: [{
|
||||||
activeManner: 1,
|
activeManner: '0',
|
||||||
full: "",
|
full: "",
|
||||||
sub: "",
|
sub: "",
|
||||||
randomFront: "",
|
randomFront: "",
|
||||||
@ -395,6 +390,12 @@ export default {
|
|||||||
}],
|
}],
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
timeType:[
|
||||||
|
{required: true, message: '适用时间段不能为空', trigger: 'blur'},
|
||||||
|
],
|
||||||
|
activeType:[
|
||||||
|
{required: true, message: '活动类型不能为空', trigger: 'blur'},
|
||||||
|
],
|
||||||
activeName: [
|
activeName: [
|
||||||
{required: true, message: '活动名称不能为空', trigger: 'blur'},
|
{required: true, message: '活动名称不能为空', trigger: 'blur'},
|
||||||
],
|
],
|
||||||
@ -438,6 +439,10 @@ export default {
|
|||||||
this.getOilList()
|
this.getOilList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
changeOfferType(){
|
||||||
|
this.ruleForm.activeType = '0'
|
||||||
|
console.log( this.ruleForm,446)
|
||||||
|
},
|
||||||
getOilList() {
|
getOilList() {
|
||||||
getOilNameList().then(response => {
|
getOilNameList().then(response => {
|
||||||
this.oilNameList = response.data;
|
this.oilNameList = response.data;
|
||||||
@ -476,9 +481,9 @@ export default {
|
|||||||
if (res.data) {
|
if (res.data) {
|
||||||
this.ruleForm = res.data
|
this.ruleForm = res.data
|
||||||
if (res.data.timeSlots) {
|
if (res.data.timeSlots) {
|
||||||
if (res.data.timeType == 0) {
|
if (res.data.timeType == 1) {
|
||||||
this.weekDay = this.ruleForm.timeSlots.split(",")
|
this.weekDay = this.ruleForm.timeSlots.split(",")
|
||||||
} else if (res.data.timeType == 1) {
|
} else if (res.data.timeType == 2) {
|
||||||
this.monthDay = this.ruleForm.timeSlots.split(",")
|
this.monthDay = this.ruleForm.timeSlots.split(",")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -491,13 +496,13 @@ export default {
|
|||||||
if (res.data.refuelList) this.refuelList = this.ruleForm.refuelList
|
if (res.data.refuelList) this.refuelList = this.ruleForm.refuelList
|
||||||
} else {
|
} else {
|
||||||
this.ruleForm = {
|
this.ruleForm = {
|
||||||
activeTimeType: 0,
|
activeTimeType: '0',
|
||||||
paymentType: [],
|
paymentType: [],
|
||||||
activeManner: [],
|
activeManner: [],
|
||||||
offerType: 0,
|
offerType: '0',
|
||||||
activeType: 0,
|
activeType: '0',
|
||||||
timeType: 0,
|
timeType: '0',
|
||||||
applyOilType: 0,
|
applyOilType: '0',
|
||||||
}
|
}
|
||||||
this.tindex1 = 0
|
this.tindex1 = 0
|
||||||
this.tindex2 = 0
|
this.tindex2 = 0
|
||||||
@ -714,9 +719,9 @@ export default {
|
|||||||
|
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.ruleForm.timeType == 0) {
|
if (this.ruleForm.timeType == 1) {
|
||||||
this.ruleForm.timeSlots = this.weekDay.toString()
|
this.ruleForm.timeSlots = this.weekDay.toString()
|
||||||
} else if (this.ruleForm.timeType == 1) {
|
} else if (this.ruleForm.timeType == 2) {
|
||||||
this.ruleForm.timeSlots = this.monthDay.toString()
|
this.ruleForm.timeSlots = this.monthDay.toString()
|
||||||
}
|
}
|
||||||
if (this.ruleForm.levelId) this.ruleForm.levelId = this.ruleForm.levelId.toString()
|
if (this.ruleForm.levelId) this.ruleForm.levelId = this.ruleForm.levelId.toString()
|
||||||
|
@ -725,9 +725,9 @@
|
|||||||
<el-select :disabled="form2.suitTimeSlotType!='2'" v-model="monthDay" placeholder="请选择每月固定日期" multiple style="margin-left: 20px">
|
<el-select :disabled="form2.suitTimeSlotType!='2'" v-model="monthDay" placeholder="请选择每月固定日期" multiple style="margin-left: 20px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in 31"
|
v-for="item in 31"
|
||||||
:key="item.value"
|
:key="item+''"
|
||||||
:label="item+'日'"
|
:label="item+'日'"
|
||||||
:value="item">
|
:value="item+''">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
@ -763,9 +763,9 @@
|
|||||||
<el-select :disabled="form2.noUseTimeType!='2'" v-model="monthDay1" placeholder="请选择每月固定日期" multiple style="margin-left: 20px">
|
<el-select :disabled="form2.noUseTimeType!='2'" v-model="monthDay1" placeholder="请选择每月固定日期" multiple style="margin-left: 20px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in 31"
|
v-for="item in 31"
|
||||||
:key="item.value"
|
:key="item+''"
|
||||||
:label="item+'日'"
|
:label="item+'日'"
|
||||||
:value="item">
|
:value="item+''">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
|
@ -25,17 +25,17 @@
|
|||||||
<div class="heng-box" v-if="radio1 == '积分商城分析'"></div>
|
<div class="heng-box" v-if="radio1 == '积分商城分析'"></div>
|
||||||
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
|
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="nbox" :class="pointerClass" @click="updateRedio('支付方式分析')">
|
<!-- <div class="nbox" :class="pointerClass" @click="updateRedio('支付方式分析')">-->
|
||||||
<div class="fount-box" :style="{ color: radio1 === '支付方式分析' ? '#FF770F' : '#999999' }">支付方式分析</div>
|
<!-- <div class="fount-box" :style="{ color: radio1 === '支付方式分析' ? '#FF770F' : '#999999' }">支付方式分析</div>-->
|
||||||
<div class="heng-box" v-if="radio1 == '支付方式分析'"></div>
|
<!-- <div class="heng-box" v-if="radio1 == '支付方式分析'"></div>-->
|
||||||
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
|
<!-- <div class="heng-box" style="background-color: #FFFFFF" v-else></div>-->
|
||||||
|
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="nbox" :class="pointerClass" @click="updateRedio('支付通道分析')">
|
<!-- <div class="nbox" :class="pointerClass" @click="updateRedio('支付通道分析')">-->
|
||||||
<div class="fount-box" :style="{ color: radio1 === '支付通道分析' ? '#FF770F' : '#999999' }">支付通道分析</div>
|
<!-- <div class="fount-box" :style="{ color: radio1 === '支付通道分析' ? '#FF770F' : '#999999' }">支付通道分析</div>-->
|
||||||
<div class="heng-box" v-if="radio1 == '支付通道分析'"></div>
|
<!-- <div class="heng-box" v-if="radio1 == '支付通道分析'"></div>-->
|
||||||
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
|
<!-- <div class="heng-box" style="background-color: #FFFFFF" v-else></div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
@ -41,8 +41,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div class="wrap-box">
|
<div class="wrap-box">
|
||||||
<div class="k_" id="k_1">
|
<div class="k_" id="k_1">
|
||||||
<div class="size_">累计交易金额(万元)</div>
|
<div class="size_">累计交易金额(元)</div>
|
||||||
<div class="title_">{{ orderStatistics.paidInfo?(orderStatistics.paidInfo/10000).toFixed(4) : 0 }}</div>
|
<div class="title_">{{ orderStatistics.paidInfo ||0}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="k_" id="k_2">
|
<div class="k_" id="k_2">
|
||||||
<div class="size_">累计交易笔数</div>
|
<div class="size_">累计交易笔数</div>
|
||||||
@ -65,9 +65,9 @@
|
|||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||||
<el-table-column prop="storeName" label="机构名称" width="150" align="center"></el-table-column>
|
<el-table-column prop="storeName" label="机构名称" width="150" align="center"></el-table-column>
|
||||||
<el-table-column prop="paidInfo" label="累计交易金额 (万元)" width="150" align="center">
|
<el-table-column prop="paidInfo" label="累计交易金额 (元)" width="150" align="center">
|
||||||
<template>
|
<template>
|
||||||
{{this.orderStatistics.paidInfo?(this.orderStatistics.paidInfo/10000).toFixed(6) : 0 }}
|
{{this.orderStatistics.paidInfo}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="count" label="累计交易笔数" width="150" align="center"></el-table-column>
|
<el-table-column prop="count" label="累计交易笔数" width="150" align="center"></el-table-column>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- 收银台订单-->
|
<!-- 油品分析 -->
|
||||||
<template>
|
<template>
|
||||||
<div style="padding-top: 20px; padding-right: 20px; background: #f6f8f9;padding-bottom: 15px">
|
<div style="padding-top: 20px; padding-right: 20px; background: #f6f8f9;padding-bottom: 15px">
|
||||||
<div class="card-change2-1" shadow="never" >
|
<div class="card-change2-1" shadow="never" >
|
||||||
@ -43,28 +43,28 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div class="wrap-box">
|
<div class="wrap-box">
|
||||||
<div class="k_" id="k_1">
|
<div class="k_" id="k_1">
|
||||||
<div class="size_">累计交易金额(万元)</div>
|
<div class="size_">累计交易金额(元)</div>
|
||||||
<div class="title_">{{orderStatistics.amount?(orderStatistics.amount/10000).toFixed(4) : '0'}}</div>
|
<div class="title_">{{orderStatistics.amount}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="k_" id="k_2">
|
<div class="k_" id="k_2">
|
||||||
<div class="size_">累计交易升数</div>
|
<div class="size_">累计交易升数</div>
|
||||||
<div class="title_">{{orderStatistics.num || 0}}</div>
|
<div class="title_">{{orderStatistics.num || 0}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="k_" id="k_3">
|
<div class="k_" id="k_3">
|
||||||
<div class="size_">92#汽油交易金额(万元)</div>
|
<div class="size_">92#汽油交易金额(元)</div>
|
||||||
<div class="title_">{{orderStatistics.amount92?(orderStatistics.amount92/10000).toFixed(4) : '0'}}</div>
|
<div class="title_">{{orderStatistics.amount92}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="k_" id="k_4">
|
<div class="k_" id="k_4">
|
||||||
<div class="size_">95#汽油交易金额(万元)</div>
|
<div class="size_">95#汽油交易金额(元)</div>
|
||||||
<div class="title_">{{orderStatistics.amount95?(orderStatistics.amount95/10000).toFixed(4) : '0'}}</div>
|
<div class="title_">{{orderStatistics.amount95}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="k_" id="k_5">
|
<div class="k_" id="k_5">
|
||||||
<div class="size_">98#汽油交易金额(万元)</div>
|
<div class="size_">98#汽油交易金额(元)</div>
|
||||||
<div class="title_">{{orderStatistics.amount98?(orderStatistics.amount98/10000).toFixed(4) : '0'}}</div>
|
<div class="title_">{{orderStatistics.amount98}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="k_" id="k_5">
|
<div class="k_" id="k_5">
|
||||||
<div class="size_">0#柴油交易金额(万元)</div>
|
<div class="size_">0#柴油交易金额(元)</div>
|
||||||
<div class="title_">{{orderStatistics.amount0?(orderStatistics.amount0/10000).toFixed(4) : '0'}}</div>
|
<div class="title_">{{orderStatistics.amount0}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -78,40 +78,40 @@
|
|||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||||
<el-table-column align="center" prop="storeName" label="机构名称"></el-table-column>
|
<el-table-column align="center" prop="storeName" label="机构名称"></el-table-column>
|
||||||
<el-table-column align="center" prop="payAmount" label="累计交易金额(万元)"></el-table-column>
|
<el-table-column align="center" prop="payAmount" label="累计交易金额(元)"></el-table-column>
|
||||||
<el-table-column align="center" prop="sum" label="累计交易笔数"></el-table-column>
|
<el-table-column align="center" prop="sum" label="累计交易笔数"></el-table-column>
|
||||||
<el-table-column align="center" prop="oilNum" label="累计交易升数"></el-table-column>
|
<el-table-column align="center" prop="oilNum" label="累计交易升数"></el-table-column>
|
||||||
<el-table-column align="center" label="92#汽油">
|
<el-table-column align="center" label="92#汽油">
|
||||||
<el-table-column align="center" prop="amount92" label="交易金额(万元)">
|
<el-table-column align="center" prop="amount92" label="交易金额(元)">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{(scope.row.amount92/10000).toFixed(6)}}
|
{{scope.row.amount92}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="count92" label="交易笔数"></el-table-column>
|
<el-table-column align="center" prop="count92" label="交易笔数"></el-table-column>
|
||||||
<el-table-column align="center" prop="num92" label="交易升数"></el-table-column>
|
<el-table-column align="center" prop="num92" label="交易升数"></el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="95#汽油">
|
<el-table-column align="center" label="95#汽油">
|
||||||
<el-table-column align="center" prop="amount95" label="交易金额(万元)">
|
<el-table-column align="center" prop="amount95" label="交易金额(元)">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{(scope.row.amount95/10000).toFixed(6)}}
|
{{scope.row.amount95}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="count95" label="交易笔数"></el-table-column>
|
<el-table-column align="center" prop="count95" label="交易笔数"></el-table-column>
|
||||||
<el-table-column prop="num95" label="交易升数"></el-table-column>
|
<el-table-column prop="num95" label="交易升数"></el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="98#汽油">
|
<el-table-column align="center" label="98#汽油">
|
||||||
<el-table-column align="center" prop="amount98" label="交易金额(万元)">
|
<el-table-column align="center" prop="amount98" label="交易金额(元)">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{(scope.row.amount98/10000).toFixed(6)}}
|
{{scope.row.amount98}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="count98" label="交易笔数" ></el-table-column>
|
<el-table-column align="center" prop="count98" label="交易笔数" ></el-table-column>
|
||||||
<el-table-column align="center" prop="num98" label="交易升数" ></el-table-column>
|
<el-table-column align="center" prop="num98" label="交易升数" ></el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="0#柴油">
|
<el-table-column align="center" label="0#柴油">
|
||||||
<el-table-column align="center" prop="amount0" label="交易金额(万元)" >
|
<el-table-column align="center" prop="amount0" label="交易金额(元)" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{(scope.row.amount0/10000).toFixed(6)}}
|
{{scope.row.amount0}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="count0" label="交易笔数" ></el-table-column>
|
<el-table-column align="center" prop="count0" label="交易笔数" ></el-table-column>
|
||||||
@ -279,6 +279,16 @@ import {parseTime} from "@/utils/fuint";
|
|||||||
}
|
}
|
||||||
getFenXiOilOrderDataApi(this.addDateRange(this.queryParams, this.value2)).then(res=>{
|
getFenXiOilOrderDataApi(this.addDateRange(this.queryParams, this.value2)).then(res=>{
|
||||||
this.orderStatistics = res.data
|
this.orderStatistics = res.data
|
||||||
|
if (res.data == null){
|
||||||
|
this.orderStatistics = {
|
||||||
|
amount:'0',
|
||||||
|
num:'0',
|
||||||
|
amount92:'0',
|
||||||
|
amount95:'0',
|
||||||
|
amount98:'0',
|
||||||
|
amount0:'0',
|
||||||
|
}
|
||||||
|
}
|
||||||
console.log("res.data1111",res.data)
|
console.log("res.data1111",res.data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -42,20 +42,20 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div class="wrap-box">
|
<div class="wrap-box">
|
||||||
<div class="k_" id="k_1">
|
<div class="k_" id="k_1">
|
||||||
<div class="size_">累计交易金额(万元)</div>
|
<div class="size_">累计交易金额(元)</div>
|
||||||
<div class="title_">{{orderStatistics.payAmount?(orderStatistics.payAmount/10000).toFixed(4) : 0}}</div>
|
<div class="title_">{{orderStatistics.payAmount || 0}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="k_" id="k_2">
|
<div class="k_" id="k_2">
|
||||||
<div class="size_">累计交易笔数</div>
|
<div class="size_">累计交易笔数</div>
|
||||||
<div class="title_">{{orderStatistics.count/10000 || 0}}</div>
|
<div class="title_">{{orderStatistics.count || 0}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="k_" id="k_3">
|
<div class="k_" id="k_3">
|
||||||
<div class="size_">累计销售商品数量</div>
|
<div class="size_">累计销售商品数量</div>
|
||||||
<div class="title_">{{orderStatistics.goodsNum/10000 || 0}}</div>
|
<div class="title_">{{orderStatistics.goodsNum || 0}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="k_" id="k_4">
|
<div class="k_" id="k_4">
|
||||||
<div class="size_">热销品类数量</div>
|
<div class="size_">热销品类数量</div>
|
||||||
<div class="title_">{{orderStatistics.cvg/10000 || 0}}</div>
|
<div class="title_">{{orderStatistics.cvg || 0}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -66,9 +66,9 @@
|
|||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||||
<el-table-column prop="storeName" label="机构名称" width="150" align="center"></el-table-column>
|
<el-table-column prop="storeName" label="机构名称" width="150" align="center"></el-table-column>
|
||||||
<el-table-column prop="payAmounts" label="累计交易金额 (万元)" align="center">
|
<el-table-column prop="payAmounts" label="累计交易金额 (元)" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{(scope.row.payAmounts/10000).toFixed(6)}}
|
{{scope.row.payAmounts}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="counts" label="累计交易笔数" align="center"></el-table-column>
|
<el-table-column prop="counts" label="累计交易笔数" align="center"></el-table-column>
|
||||||
@ -76,9 +76,9 @@
|
|||||||
<el-table-column label="商品信息" align="center">
|
<el-table-column label="商品信息" align="center">
|
||||||
<el-table-column prop="cvgNum" label="品类数量" width="100" align="center"></el-table-column>
|
<el-table-column prop="cvgNum" label="品类数量" width="100" align="center"></el-table-column>
|
||||||
<el-table-column prop="goodsNum" label="商品数量" width="100" align="center"></el-table-column>
|
<el-table-column prop="goodsNum" label="商品数量" width="100" align="center"></el-table-column>
|
||||||
<el-table-column prop="payAmounts" label="累计交易金额 (万元)" width="150" align="center">
|
<el-table-column prop="payAmounts" label="累计交易金额 (元)" width="150" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{(scope.row.payAmounts/10000).toFixed(6)}}
|
{{scope.row.payAmounts}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@ -254,6 +254,14 @@ import {parseTime} from "@/utils/fuint";
|
|||||||
}
|
}
|
||||||
getFenXiStoreDataApi(this.addDateRange(this.queryParams, this.value2)).then(res=>{
|
getFenXiStoreDataApi(this.addDateRange(this.queryParams, this.value2)).then(res=>{
|
||||||
this.orderStatistics = res.data
|
this.orderStatistics = res.data
|
||||||
|
if (res.data == null){
|
||||||
|
this.orderStatistics = {
|
||||||
|
count:'0',
|
||||||
|
cvg:'0',
|
||||||
|
goodsNum:'0',
|
||||||
|
payAmount:'0',
|
||||||
|
}
|
||||||
|
}
|
||||||
console.log("res.data1111",res.data)
|
console.log("res.data1111",res.data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -96,6 +96,16 @@ public class IntegralSettings extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Integer chainStoreId;
|
private Integer chainStoreId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 适用规则 0-无限制 1-有限制
|
||||||
|
*/
|
||||||
|
private Integer signApplicableRules;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签到周期 0-一周 1-两周 2-一个月 只有适用规则为1时有值
|
||||||
|
*/
|
||||||
|
private Integer signCycle;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +45,10 @@ public class ActiveSubPrice extends Model<ActiveSubPrice> {
|
|||||||
/** 活动时间类型:0永久有效;1自定义 */
|
/** 活动时间类型:0永久有效;1自定义 */
|
||||||
private String activeTimeType ;
|
private String activeTimeType ;
|
||||||
/** 生效起始时间 */
|
/** 生效起始时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
|
||||||
private Date activeStartTime ;
|
private Date activeStartTime ;
|
||||||
/** 生效截止时间 */
|
/** 生效截止时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
|
||||||
private Date activeEndTime ;
|
private Date activeEndTime ;
|
||||||
/** 优惠类型(0立减优惠|1活动优惠) */
|
/** 优惠类型(0立减优惠|1活动优惠) */
|
||||||
private String offerType ;
|
private String offerType ;
|
||||||
|
@ -76,12 +76,6 @@ public class ActiveSubPriceServiceImpl extends ServiceImpl<ActiveSubPriceMapper,
|
|||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean saveActiveSubPrice(boolean isAdd, ActiveSubPriceSaveVO saveVO) {
|
public boolean saveActiveSubPrice(boolean isAdd, ActiveSubPriceSaveVO saveVO) {
|
||||||
// if (isAdd){
|
|
||||||
// ActiveSubPrice activeSubPrice = this.selectByStoreId();
|
|
||||||
// if (ObjectUtil.isNotEmpty(activeSubPrice)){
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
ActiveSubPrice activeSubPrice = new ActiveSubPrice();
|
ActiveSubPrice activeSubPrice = new ActiveSubPrice();
|
||||||
BeanUtils.copyProperties(saveVO, activeSubPrice);
|
BeanUtils.copyProperties(saveVO, activeSubPrice);
|
||||||
//插入店铺id信息
|
//插入店铺id信息
|
||||||
|
@ -21,5 +21,13 @@ public interface CardCouponMapper extends BaseMapper<CardCoupon> {
|
|||||||
IPage<CardCoupon> pageVo(Page page, @Param("cardCoupon") CardCoupon cardCoupon);
|
IPage<CardCoupon> pageVo(Page page, @Param("cardCoupon") CardCoupon cardCoupon);
|
||||||
|
|
||||||
IPage<CardCouponUniVo> selectAllByPageAndStoreId(Page page, @Param("cardCoupon")CardCoupon cardCoupon);
|
IPage<CardCouponUniVo> selectAllByPageAndStoreId(Page page, @Param("cardCoupon")CardCoupon cardCoupon);
|
||||||
|
IPage<CardCouponUniVo> selectAllByPageAndIds(Page page,@Param("ids") List<Integer> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据店铺id查询优惠券今日领取数量
|
||||||
|
* @param cardCouponUniVos
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CardCouponUniVo> selectByStoreIdCount(CardCouponUniVo cardCouponUniVos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
|
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
|
||||||
|
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo;
|
||||||
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUserVo;
|
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUserVo;
|
||||||
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO;
|
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
@ -11,6 +12,7 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户优惠卷表2024(CardCouponUser)表数据库访问层
|
* 用户优惠卷表2024(CardCouponUser)表数据库访问层
|
||||||
@ -38,5 +40,7 @@ public interface CardCouponUserMapper extends BaseMapper<CardCouponUser> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
IPage<CardCouponUserVo> queryPage(Page page,@Param("entity") CardCouponUserVo cardCouponUserVo);
|
IPage<CardCouponUserVo> queryPage(Page page,@Param("entity") CardCouponUserVo cardCouponUserVo);
|
||||||
|
|
||||||
|
List<CardCouponUniVo> selectCouponCount(@Param("storeId") Integer storeId,@Param("userId") Integer userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
resultType="com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo">
|
resultType="com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo">
|
||||||
SELECT
|
SELECT
|
||||||
cc.*,
|
cc.*,
|
||||||
mt.NAME AS typeName,
|
mt.NAME AS storeName,
|
||||||
CASE
|
CASE
|
||||||
cc.type
|
cc.type
|
||||||
WHEN 1 THEN
|
WHEN 1 THEN
|
||||||
@ -44,7 +44,7 @@
|
|||||||
'油品立减券'
|
'油品立减券'
|
||||||
WHEN 5 THEN
|
WHEN 5 THEN
|
||||||
'单品代金券'
|
'单品代金券'
|
||||||
END AS statusName
|
END AS typeName
|
||||||
FROM
|
FROM
|
||||||
card_coupon cc
|
card_coupon cc
|
||||||
LEFT JOIN mt_store mt ON mt.id = cc.store_id
|
LEFT JOIN mt_store mt ON mt.id = cc.store_id
|
||||||
@ -66,5 +66,46 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectByStoreIdCount"
|
||||||
|
resultType="com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo">
|
||||||
|
select cc.id id, count(cu.id) count
|
||||||
|
from card_coupon cc
|
||||||
|
left join card_coupon_user as cu on cc.id = cu.card_coupon_id
|
||||||
|
<where>
|
||||||
|
cc.store_id = #{storeId}
|
||||||
|
<if test="startTime!=null and startTime!=''">
|
||||||
|
and cu.create_time between #{startTime} and #{endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
group by cc.id
|
||||||
|
</select>
|
||||||
|
<select id="selectAllByPageAndIds"
|
||||||
|
resultType="com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo">
|
||||||
|
SELECT
|
||||||
|
cc.*,
|
||||||
|
mt.NAME AS storeName,
|
||||||
|
CASE
|
||||||
|
cc.type
|
||||||
|
WHEN 1 THEN
|
||||||
|
'代金券'
|
||||||
|
WHEN 2 THEN
|
||||||
|
'兑换券'
|
||||||
|
WHEN 3 THEN
|
||||||
|
'折扣券'
|
||||||
|
WHEN 4 THEN
|
||||||
|
'油品立减券'
|
||||||
|
WHEN 5 THEN
|
||||||
|
'单品代金券'
|
||||||
|
END AS typeName
|
||||||
|
FROM
|
||||||
|
card_coupon cc
|
||||||
|
LEFT JOIN mt_store mt ON mt.id = cc.store_id
|
||||||
|
<where>
|
||||||
|
cc.id in
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -29,4 +29,12 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectCouponCount" resultType="com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo">
|
||||||
|
SELECT
|
||||||
|
card_coupon_id id,
|
||||||
|
count(1) count
|
||||||
|
FROM card_coupon_user
|
||||||
|
WHERE store_id = #{storeId} AND mt_user_id = #{userId}
|
||||||
|
group by card_coupon_id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package com.fuint.business.marketingActivity.cardCoupon.service.impl;
|
package com.fuint.business.marketingActivity.cardCoupon.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -8,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon;
|
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon;
|
||||||
import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponMapper;
|
import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponMapper;
|
||||||
|
import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapper;
|
||||||
import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponService;
|
import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponService;
|
||||||
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo;
|
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo;
|
||||||
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO;
|
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO;
|
||||||
@ -20,6 +24,8 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 油站优惠卷表2024(CardCoupon)表服务实现类
|
* 油站优惠卷表2024(CardCoupon)表服务实现类
|
||||||
@ -32,6 +38,9 @@ public class CardCouponServiceImpl extends ServiceImpl<CardCouponMapper, CardCou
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MtStoreMapper mtStoreMapper;
|
private MtStoreMapper mtStoreMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CardCouponUserMapper cardCouponUserMapper;
|
||||||
@Override
|
@Override
|
||||||
public IPage<CardCoupon> pageVo(Page page, CardCoupon cardCoupon) {
|
public IPage<CardCoupon> pageVo(Page page, CardCoupon cardCoupon) {
|
||||||
return baseMapper.pageVo( page, cardCoupon);
|
return baseMapper.pageVo( page, cardCoupon);
|
||||||
@ -49,24 +58,64 @@ public class CardCouponServiceImpl extends ServiceImpl<CardCouponMapper, CardCou
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage selectAllByPageAndStoreId(Page page, CardCoupon cardCoupon) {
|
public IPage selectAllByPageAndStoreId(Page page, CardCoupon cardCoupon) {
|
||||||
|
//获取今天开始与结束时间
|
||||||
|
DateTime now = DateUtil.date();
|
||||||
|
DateTime startTime = DateUtil.beginOfDay(now);
|
||||||
|
DateTime endTime = DateUtil.endOfDay(now);
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
//首先查询该店铺所有的优惠券
|
//首先查询该店铺所有的优惠券
|
||||||
cardCoupon.setPutType("2");
|
cardCoupon.setPutType("2");
|
||||||
cardCoupon.setStatus("1");
|
cardCoupon.setStatus("1");
|
||||||
IPage<CardCouponUniVo> cardCouponUniVos = baseMapper.selectAllByPageAndStoreId(page, cardCoupon);
|
IPage<CardCouponUniVo> cardCouponUniVos = baseMapper.selectAllByPageAndStoreId(page, cardCoupon);
|
||||||
|
|
||||||
List<CardCouponUniVo> cardCouponVos = new ArrayList<>();
|
//用户拥有的优惠券以及数量
|
||||||
|
List<CardCouponUniVo> list= cardCouponUserMapper.selectCouponCount(cardCoupon.getStoreId(), nowAccountInfo.getId());
|
||||||
|
Map<Integer, Integer> map = list.stream().collect(Collectors.toMap(CardCouponUniVo::getId, CardCouponUniVo::getCount));
|
||||||
|
|
||||||
|
CardCouponUniVo cardCouponUniVo1 = new CardCouponUniVo();
|
||||||
|
cardCouponUniVo1.setStoreId(cardCoupon.getStoreId());
|
||||||
|
cardCouponUniVo1.setStartTime(startTime.toString());
|
||||||
|
cardCouponUniVo1.setEndTime(endTime.toString());
|
||||||
|
//根据店铺id查询优惠券今日领取数量
|
||||||
|
List<CardCouponUniVo> cardCouponUniVos1 = baseMapper.selectByStoreIdCount(cardCouponUniVo1);
|
||||||
|
Map<Integer, Integer> cardCouponMap = cardCouponUniVos1.stream().collect(Collectors.toMap(CardCouponUniVo::getId, CardCouponUniVo::getCount));
|
||||||
|
|
||||||
|
|
||||||
|
//存放最终可领取的优惠券id集合
|
||||||
|
List<Integer> ids = new ArrayList<>();
|
||||||
//循环店铺优惠券
|
//循环店铺优惠券
|
||||||
for (CardCouponUniVo coupon : cardCouponUniVos.getRecords()) {
|
for (CardCouponUniVo coupon : cardCouponUniVos.getRecords()) {
|
||||||
//查询该优惠券是否已到达限制数量
|
//查询该优惠券是否已到达限制数量
|
||||||
if (coupon.getTfGetNum() < coupon.getTfTotal()){
|
if ((coupon.getTfGetNum() < coupon.getTfTotal())) {
|
||||||
CardCouponUniVo cardCouponUniVo = BeanUtil.copyProperties(coupon, CardCouponUniVo.class);
|
Integer count = 0;
|
||||||
|
if (ObjectUtil.isNotEmpty(cardCouponMap.get(coupon.getId()))){
|
||||||
|
count = cardCouponMap.get(coupon.getId());
|
||||||
|
}
|
||||||
|
if (count < coupon.getDayGetLimit()) {
|
||||||
|
Integer getNumLimit = coupon.getGetNumLimit();
|
||||||
|
Integer userCount = 0;
|
||||||
|
if (ObjectUtil.isNotEmpty(map.get(coupon.getId()))){
|
||||||
|
userCount = map.get(coupon.getId());
|
||||||
|
}
|
||||||
|
if (userCount < getNumLimit) {
|
||||||
|
//查询当前用户所拥有的优惠券数量
|
||||||
|
ids.add(coupon.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
IPage<CardCouponUniVo> cardCouponUniVoIPage = new Page<>(page.getCurrent(), page.getSize());
|
||||||
|
if (CollUtil.isNotEmpty(ids)) {
|
||||||
|
cardCouponUniVoIPage = baseMapper.selectAllByPageAndIds(page, ids);
|
||||||
|
cardCouponUniVoIPage.getRecords().stream().forEach(coupon -> extracted(coupon));
|
||||||
|
}
|
||||||
|
return cardCouponUniVoIPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void extracted(CardCouponUniVo coupon) {
|
||||||
//计算领取的比例
|
//计算领取的比例
|
||||||
double scale = (coupon.getTfGetNum() * 1.0 / coupon.getTfTotal()) * 100;
|
double scale = (coupon.getTfGetNum() * 1.0 / coupon.getTfTotal()) * 100;
|
||||||
cardCouponUniVo.setScale(scale + "%");
|
coupon.setScale(scale + "%");
|
||||||
}
|
|
||||||
}
|
|
||||||
return cardCouponUniVos;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.fuint.business.marketingActivity.cardCoupon.vo;
|
package com.fuint.business.marketingActivity.cardCoupon.vo;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon;
|
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -11,4 +13,12 @@ public class CardCouponUniVo extends CardCoupon {
|
|||||||
private String scale;
|
private String scale;
|
||||||
//兑换券类型
|
//兑换券类型
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
|
||||||
|
private Integer count;
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
private String endTime;
|
||||||
}
|
}
|
||||||
|
@ -142,6 +142,14 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> selectOrderFenxiDataByZtDz(LJOrderVo order){
|
public Map<String, Object> selectOrderFenxiDataByZtDz(LJOrderVo order){
|
||||||
|
if (ObjectUtil.isEmpty(order.getDeptId())) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
order.setDeptId(nowAccountInfo.getDeptId());
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> strings = sysDeptMapper.selectChildByDeptIdR(order.getDeptId());
|
||||||
|
List<Long> longs = mtStoreMapper.queryStoresByDeptIdsR(strings);
|
||||||
|
order.setStoreIds(longs);
|
||||||
Map<String, Object> stringObjectMap = baseMapper.selectOrderFenxiDataByZtDz(order);
|
Map<String, Object> stringObjectMap = baseMapper.selectOrderFenxiDataByZtDz(order);
|
||||||
Map<String, Object> stringObjectMap2 = baseMapper.selectOrderFenxiDataByZtDz2(order);
|
Map<String, Object> stringObjectMap2 = baseMapper.selectOrderFenxiDataByZtDz2(order);
|
||||||
stringObjectMap.put("cvg",stringObjectMap2.get("cvg"));
|
stringObjectMap.put("cvg",stringObjectMap2.get("cvg"));
|
||||||
|
@ -203,6 +203,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
}
|
}
|
||||||
return oilOrderIPage;
|
return oilOrderIPage;
|
||||||
}
|
}
|
||||||
|
// 查询油品分析 列表
|
||||||
@Override
|
@Override
|
||||||
public IPage<OilOrderVo> selectOilOrderFenXiListByZtDz(Page page, OilOrderVo order) {
|
public IPage<OilOrderVo> selectOilOrderFenXiListByZtDz(Page page, OilOrderVo order) {
|
||||||
if (ObjectUtil.isEmpty(order.getDeptId())) {
|
if (ObjectUtil.isEmpty(order.getDeptId())) {
|
||||||
@ -238,9 +239,18 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
}
|
}
|
||||||
return oilOrderIPage;
|
return oilOrderIPage;
|
||||||
}
|
}
|
||||||
|
// 查询油品分析 累计
|
||||||
public Map<String,String> selectOilOrderFenXiDataByZtDz(OilOrderVo order){
|
public Map<String,String> selectOilOrderFenXiDataByZtDz(OilOrderVo order){
|
||||||
return baseMapper.selectOilOrderFenXiDataByZtDz(order);
|
if (ObjectUtil.isEmpty(order.getDeptId())) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
order.setDeptId(nowAccountInfo.getDeptId());
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> strings = sysDeptMapper.selectChildByDeptIdR(order.getDeptId());
|
||||||
|
List<Long> longs = mtStoreMapper.queryStoresByDeptIdsR(strings);
|
||||||
|
order.setStoreIds(longs);
|
||||||
|
Map<String, String> stringStringMap = baseMapper.selectOilOrderFenXiDataByZtDz(order);
|
||||||
|
return stringStringMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void export(HttpServletResponse response, OilOrder order) {
|
public void export(HttpServletResponse response, OilOrder order) {
|
||||||
|
@ -210,6 +210,13 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "会员注册"
|
"navigationBarTitleText": "会员注册"
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "prize/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的奖品"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -1003,6 +1003,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin: 15px auto;
|
margin: 15px auto;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.station-title {
|
.station-title {
|
||||||
|
243
gasStation-uni/pagesHome/prize/index.vue
Normal file
243
gasStation-uni/pagesHome/prize/index.vue
Normal file
@ -0,0 +1,243 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="container">
|
||||||
|
<view class="top_show">
|
||||||
|
<view class="wx_" v-if="show == false" @click="show =! show"></view>
|
||||||
|
<view class="x_" v-else @click="show =! show">
|
||||||
|
<u-icon name="checkbox-mark" color="#fff" size="14"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 14px;">仅查看已中奖的记录</view>
|
||||||
|
</view>
|
||||||
|
<view class="box_" v-for="(item,index) in 3" :key="index">
|
||||||
|
<view class="title_">抽奖</view>
|
||||||
|
<view class="box_bs">
|
||||||
|
<image src="../../static/logo.png" style="width: 80px; height: 80px; "></image>
|
||||||
|
<view class="r_box">
|
||||||
|
<view class="">
|
||||||
|
<view class="b_title">获得 <text style="color:#E02020 ;">抽纸</text> 1份</view>
|
||||||
|
<view style="margin: 5px 0px;">抽纸1份</view>
|
||||||
|
<view class="">2024-08-02 12:02:24</view>
|
||||||
|
</view>
|
||||||
|
<view class="anniu">待核销</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-popup :show="showl" :round="10" mode="bottom" @close="close" @open="open">
|
||||||
|
<view class="">
|
||||||
|
<view class="pop-top">
|
||||||
|
<view style="width: 20px;"></view>
|
||||||
|
<view class="">立即使用</view>
|
||||||
|
<view class=""><u-icon name="close"></u-icon></view>
|
||||||
|
</view>
|
||||||
|
<view class="popup-box">
|
||||||
|
<view class="">
|
||||||
|
<view class="">请向商家出示此码使用</view>
|
||||||
|
<view style="display: flex;align-items: center;justify-content: center; margin: 10px auto;">
|
||||||
|
<w-qrcode :options="options"></w-qrcode>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="">核销码:6688172293684182</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</u-popup>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from '../../utils/request';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
show: false,
|
||||||
|
List: [],
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalPage: '',
|
||||||
|
showl: true,
|
||||||
|
options: {
|
||||||
|
code: 'https://oilapi.youkerr.com/oily?storeId=' + uni.getStorageSync('storeId') + '&userId=' + uni
|
||||||
|
.getStorageSync('userId') + '&type=yaoqingyouli',
|
||||||
|
// code: 'https://www.tuofeng.cc/oily?storeId=' + uni.getStorageSync('storeId') + ' &userId=' + uni
|
||||||
|
// .getStorageSync('userId'), // 生成二维码的值
|
||||||
|
size: 400, // 460代表生成的二维码的宽高均为460rpx
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
//下拉刷新
|
||||||
|
this.resetting() //重置方法
|
||||||
|
this.getList() //调用请求
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
// 触底加载
|
||||||
|
if (this.pageNo >= this.totalPage) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '没有下一页数据',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.pageNo++
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//滞空方法
|
||||||
|
resetting() {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.pageSize = 10
|
||||||
|
this.totalPage = ''
|
||||||
|
this.List = []
|
||||||
|
},
|
||||||
|
// 分页——网络请求
|
||||||
|
async getList() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
|
let res = await request({
|
||||||
|
url: '网络请求',
|
||||||
|
method: 'get',
|
||||||
|
data: {
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.hideLoading(); //交互反馈
|
||||||
|
if (this.pageNo != 1) {
|
||||||
|
this.List = this.ruleList.concat(res.result.records)
|
||||||
|
} else {
|
||||||
|
this.List = res.result.records
|
||||||
|
}
|
||||||
|
this.totalPage = res.result.pages
|
||||||
|
}
|
||||||
|
},
|
||||||
|
goback() {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.content {
|
||||||
|
background: #f4f5f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #f4f5f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box_ {
|
||||||
|
width: 95%;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 15px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box_bs {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.r_box {
|
||||||
|
width: 70%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anniu {
|
||||||
|
border-radius: 13px;
|
||||||
|
border: 1px solid #FA6400;
|
||||||
|
width: 60px;
|
||||||
|
height: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #FA6400;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title_ {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333333;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top_show {
|
||||||
|
width: 100%;
|
||||||
|
background: #fff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.b_title {
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.wx_ {
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x_ {
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid #FA6400;
|
||||||
|
background: #FA6400;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-box {
|
||||||
|
background: #fff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px;
|
||||||
|
background: #ffffff;
|
||||||
|
margin: 15px auto;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pop-top {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user