Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
b8139f86d0
28
fuintAdmin/src/api/EventMarketing/activeSubPrice.js
Normal file
28
fuintAdmin/src/api/EventMarketing/activeSubPrice.js
Normal file
@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getActiveSubPrice() {
|
||||
return request({
|
||||
url: 'business/activeSubPrice/getInfo',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
export function addActiveSubPrice(data) {
|
||||
return request({
|
||||
url: 'business/activeSubPrice/add',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
export function editActiveSubPrice(data) {
|
||||
return request({
|
||||
url: 'business/activeSubPrice/update',
|
||||
method: 'put',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
export function deleteActiveSubPrice(id) {
|
||||
return request({
|
||||
url: 'business/activeSubPrice/del/'+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
64
fuintAdmin/src/api/indexBanner.js
Normal file
64
fuintAdmin/src/api/indexBanner.js
Normal file
@ -0,0 +1,64 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询首页店铺数量信息
|
||||
export function storeTotalIndex(query) {
|
||||
return request({
|
||||
url: '/backendApi/store/getStoreTotal',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询首页店铺金额信息
|
||||
export function storeAmountIndex(query) {
|
||||
return request({
|
||||
url: '/business/allOrderInfo/getAmount',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询首页店铺金额信息
|
||||
export function storeAmountIndex1(query) {
|
||||
return request({
|
||||
url: '/business/allOrderInfo/getAmount1',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询首页店铺金额信息
|
||||
export function selectStoreAmount(query) {
|
||||
return request({
|
||||
url: '/backendApi/store/selectStoreAmount',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询首页店铺金额信息
|
||||
export function getStoreAmountByTime(query) {
|
||||
return request({
|
||||
url: '/backendApi/store/getStoreAmountByTime',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询首页店铺金额信息
|
||||
export function getAccountInfo(query) {
|
||||
return request({
|
||||
url: '/system/dept/getInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function resetPwd(data) {
|
||||
return request({
|
||||
url: '/backendApi/account/resetPwd',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
@ -52,6 +52,14 @@ export function oilNumberList() {
|
||||
// data: data
|
||||
})
|
||||
}
|
||||
// 查询所有油号
|
||||
export function oilNumberList1() {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilNumber/getList2',
|
||||
method: 'get',
|
||||
// data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所有油号
|
||||
export function oilNumbers() {
|
||||
|
37
fuintAdmin/src/api/setting/hardware.js
Normal file
37
fuintAdmin/src/api/setting/hardware.js
Normal file
@ -0,0 +1,37 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function getListApi(query) {
|
||||
return request({
|
||||
url: 'hardwareStore',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
//
|
||||
export function deleteApi(ids) {
|
||||
return request({
|
||||
url: 'hardwareStore?idList=' + ids,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
//
|
||||
export function saveApi(data) {
|
||||
return request({
|
||||
url: 'hardwareStore',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存修改信息
|
||||
export function updateApi(data) {
|
||||
return request({
|
||||
url: 'hardwareStore',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -106,6 +106,12 @@ export const constantRoutes = [
|
||||
name: 'resource_oilstore',
|
||||
meta: { title: '系统首页', icon: 'dashboard', affix: true }
|
||||
},
|
||||
{
|
||||
path: '/shopowner',
|
||||
component: () => import('@/views/shopowner'),
|
||||
name: 'shopowner',
|
||||
meta: { title: '系统新首页', icon: 'dashboard', affix: true }
|
||||
},
|
||||
{
|
||||
path: '/account',
|
||||
component: Layout,
|
||||
|
@ -4,10 +4,10 @@
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="140px">
|
||||
<div style="display: flex">
|
||||
<div style="width: 50%">
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
<el-input v-model="ruleForm.name"></el-input>
|
||||
<el-form-item label="活动名称" prop="activeName">
|
||||
<el-input v-model="ruleForm.activeName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" prop="activityTimeType">
|
||||
<el-form-item label="活动时间" prop="activeTimeType">
|
||||
<div class="d-s">
|
||||
<div class="icon-type" v-for="(item,index) in activityTimeTypeList" :key="index"
|
||||
:class="{ 'acvtive' : index === tindex1 }" @click="Typeindex1(index)">
|
||||
@ -33,7 +33,7 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="优惠类型" prop="dieselUserLevel">
|
||||
<el-form-item label="优惠类型" prop="offerType">
|
||||
<div class="d-s">
|
||||
<div class="icon-type" v-for="(item,index) in preferentialTypeList" :key="index"
|
||||
:class="{ 'acvtive' : index === tindex2 }" @click="Typeindex2(index)">
|
||||
@ -44,7 +44,7 @@
|
||||
</div>
|
||||
<span style="color: grey;font-size: 12px">例如:立减优惠,满100立减2元;折扣优惠,满200享受95折</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动类型" prop="dieselUserLevel">
|
||||
<el-form-item label="活动类型" prop="activeType">
|
||||
<div class="d-s">
|
||||
<div class="icon-type" v-for="(item,index) in activityTypeList" :key="index"
|
||||
:class="{ 'acvtive' : index === tindex5 }" @click="Typeindex5(index)">
|
||||
@ -53,12 +53,18 @@
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="color: grey;font-size: 11px">固定满减:订单满足规则时,只优惠一次且金额固定。如:满100元立减5元,订单金额是210元,则优惠减5元。</div>
|
||||
<div style="color: grey;font-size: 11px">随机满减:订单满足规则时,只优惠一次且金额随机。如:满100元立减5-8元,订单金额是210元,则优惠在5-8元范围内随机生成。</div>
|
||||
<div style="color: grey;font-size: 11px">每满:订单满足规则时,按规则优患多次。如:每满100元立减5元活动,订单金额是210元,则按每满优惠减10元。</div>
|
||||
<div style="color: grey;font-size: 11px">
|
||||
固定满减:订单满足规则时,只优惠一次且金额固定。如:满100元立减5元,订单金额是210元,则优惠减5元。
|
||||
</div>
|
||||
<div style="color: grey;font-size: 11px" v-if="ruleForm.offerType==0">
|
||||
随机满减:订单满足规则时,只优惠一次且金额随机。如:满100元立减5-8元,订单金额是210元,则优惠在5-8元范围内随机生成。
|
||||
</div>
|
||||
<div style="color: grey;font-size: 11px" v-if="ruleForm.offerType==0">
|
||||
每满:订单满足规则时,按规则优患多次。如:每满100元立减5元活动,订单金额是210元,则按每满优惠减10元。
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="适用会员等级" prop="dieselUserLevel">
|
||||
<el-select v-model="ruleForm.dieselUserLevel" multiple clearable placeholder="请选择会员等级(多选)">
|
||||
<el-form-item label="适用会员等级" prop="levelId">
|
||||
<el-select v-model="ruleForm.levelId" clearable placeholder="请选择会员等级">
|
||||
<el-option
|
||||
v-for="(item,index) in userGradeList"
|
||||
:label="item.name"
|
||||
@ -66,8 +72,8 @@
|
||||
:key="index"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员标签" prop="userLabelIds">
|
||||
<el-select v-model="ruleForm.userLabelIds" multiple clearable placeholder="请选择会员标签(多选)">
|
||||
<el-form-item label="会员标签" prop="babelIds">
|
||||
<el-select v-model="ruleForm.babelIds" clearable placeholder="请选择会员标签">
|
||||
<el-option
|
||||
v-for="item in userLabelList"
|
||||
:key="item.id+''"
|
||||
@ -75,21 +81,21 @@
|
||||
:value="item.id+''"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="每人每天参与上限" prop="everyDayCeiling">
|
||||
<el-input v-model="ruleForm.everyDayCeiling"></el-input>
|
||||
<el-form-item label="每人每天参与上限" prop="dayLimitNum">
|
||||
<el-input v-model="ruleForm.dayLimitNum"></el-input>
|
||||
<span style="color: grey;font-size: 12px">每个会员每天限制参与的次数,0标识不限</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="每人每月参与上限" prop="monthlyCeiling">
|
||||
<el-input v-model="ruleForm.monthlyCeiling"></el-input>
|
||||
<el-form-item label="每人每月参与上限" prop="monthLimitNum">
|
||||
<el-input v-model="ruleForm.monthLimitNum"></el-input>
|
||||
<span style="color: grey;font-size: 12px">每个会员每月限制参与的次数,0标识不限</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="每人累计参与上限" prop="accumulateCeiling">
|
||||
<el-input v-model="ruleForm.accumulateCeiling"></el-input>
|
||||
<el-form-item label="每人累计参与上限" prop="limitNum">
|
||||
<el-input v-model="ruleForm.limitNum"></el-input>
|
||||
<span style="color: grey;font-size: 12px">每个会员累计限制参与的次数,0标识不限</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="width: 50%">
|
||||
<el-form-item label="适用时间段" prop="suitTimeSlotType">
|
||||
<el-form-item label="适用时间段" prop="timeType">
|
||||
<div>
|
||||
<div class="icon-type" v-for="(item,index) in weekMonthTypeList" :key="index"
|
||||
:class="{ 'acvtive' : index === tindex3 }" @click="Typeindex3(index)">
|
||||
@ -113,16 +119,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<el-form-item label="时间段" prop="suitTimeSlotFront">
|
||||
<el-form-item label="时间段" prop="timeApplyStart">
|
||||
<el-time-picker
|
||||
v-model="ruleForm.suitTimeSlotFront"
|
||||
v-model="ruleForm.timeApplyStart"
|
||||
format="HH:mm"
|
||||
value-format="HH:mm"
|
||||
placeholder="请选择开始时间点">
|
||||
</el-time-picker>
|
||||
至
|
||||
<el-time-picker
|
||||
v-model="ruleForm.suitTimeSlotAfter"
|
||||
v-model="ruleForm.timeApplyEnd"
|
||||
format="HH:mm"
|
||||
value-format="HH:mm"
|
||||
placeholder="请选择结束时间点">
|
||||
@ -131,7 +137,7 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="适用油品油号" prop="activityTimeType">
|
||||
<el-form-item label="适用油品油号" prop="applyOilType">
|
||||
<div class="d-s">
|
||||
<div class="icon-type" v-for="(item,index) in oilTypeList" :key="index"
|
||||
:class="{ 'acvtive' : index === tindex4 }" @click="Typeindex4(index)">
|
||||
@ -139,7 +145,7 @@
|
||||
<img src="@/assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex4">
|
||||
{{ item }}
|
||||
</div>
|
||||
<el-select v-model="ruleForm.dieselUserLevel" multiple clearable placeholder="请选择油品油号(多选)">
|
||||
<el-select v-model="ruleForm.applyOil" multiple clearable placeholder="请选择油品油号(多选)">
|
||||
<el-option v-for="(item,index) in oilNumberList" :key="index"
|
||||
:label="getOilNamess(oilNameList,item.oilName)" :value="item.oilName"></el-option>
|
||||
</el-select>
|
||||
@ -155,48 +161,165 @@
|
||||
:value="dict.value"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<!-- 活动方式需要根据不同的类型展示不同的样式,你自己写吧-->
|
||||
<el-form-item label="活动方式" prop="activeGift">
|
||||
<el-checkbox-group v-model="ruleForm.activeGift">
|
||||
<el-form-item label="活动方式" prop="activeManner">
|
||||
<el-checkbox-group v-model="ruleForm.activeManner">
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
<el-checkbox label="按订单金额" name="type"></el-checkbox>
|
||||
<el-checkbox label="0" name="type">按订单金额</el-checkbox>
|
||||
<img src="@/assets/images/tjb.png"
|
||||
style="width: 20px;height: 20px;cursor: pointer;margin-top: 7px;margin-left: 10px"
|
||||
@click="addPoints()">
|
||||
@click="addPoints(0)">
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in pointList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>订单金额满</span>
|
||||
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.consumeAmount">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<span>固定优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.givePoints">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
@click="deletePoints(index)">
|
||||
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 0">
|
||||
<div v-for="(item,index) in orderList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>订单金额满</span>
|
||||
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.full">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<span>固定优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.sub">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
@click="deletePoints(index)">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 1">
|
||||
<div v-for="(item,index) in orderList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>订单金额满</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.full">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<span>随机优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.randomFront">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<span>至</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.randomAfter">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
@click="deletePoints(index)">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 2">
|
||||
<div v-for="(item,index) in orderList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>订单金额每满</span>
|
||||
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.full">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<span>固定优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.sub">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<span>最大优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.maxPreferential">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
@click="deletePoints(index)">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="ruleForm.offerType == 1 && ruleForm.activeType == 0">
|
||||
<div v-for="(item,index) in orderList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>订单金额满</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.full">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<span>享受折扣</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.enjoyDiscount">
|
||||
<template slot="append">折</template>
|
||||
</el-input>
|
||||
<span>最大优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.maxPreferential">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
@click="deletePoints(index)">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
<el-checkbox label="按加油升数" name="type"></el-checkbox>
|
||||
<el-checkbox label="1" name="type">按加油升数</el-checkbox>
|
||||
<img src="@/assets/images/tjb.png"
|
||||
style="width: 20px;height: 20px;cursor: pointer;margin-top: 7px;margin-left: 10px"
|
||||
@click="addGrowthValues()">
|
||||
@click="addGrowthValues(1)">
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in growthValueList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>加油升数满</span>
|
||||
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.consumeAmount">
|
||||
<template slot="append">L</template>
|
||||
</el-input>
|
||||
<span>固定优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px"
|
||||
v-model="item.giveGrowthValue">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
@click="deleteGrowthValues(index)">
|
||||
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 0">
|
||||
<div v-for="(item,index) in refuelList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>加油升数满</span>
|
||||
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.full">
|
||||
<template slot="append">L</template>
|
||||
</el-input>
|
||||
<span>固定优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px"
|
||||
v-model="item.sub">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
@click="deleteGrowthValues(index)">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 1">
|
||||
<div v-for="(item,index) in refuelList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>加油升数满</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.full">
|
||||
<template slot="append">L</template>
|
||||
</el-input>
|
||||
<span>随机优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px"
|
||||
v-model="item.randomFront">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<span>至</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px"
|
||||
v-model="item.randomAfter">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
@click="deleteGrowthValues(index)">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 2">
|
||||
<div v-for="(item,index) in refuelList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>加油升数每满</span>
|
||||
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.full">
|
||||
<template slot="append">L</template>
|
||||
</el-input>
|
||||
<span>固定优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px"
|
||||
v-model="item.sub">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<span>最大优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px"
|
||||
v-model="item.maxPreferential">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
@click="deleteGrowthValues(index)">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="ruleForm.offerType == 1 && ruleForm.activeType == 0">
|
||||
<div v-for="(item,index) in refuelList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>加油升数满</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.full">
|
||||
<template slot="append">L</template>
|
||||
</el-input>
|
||||
<span>享受折扣</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px"
|
||||
v-model="item.enjoyDiscount">
|
||||
<template slot="append">折</template>
|
||||
</el-input>
|
||||
<span>最大优惠</span>
|
||||
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px"
|
||||
v-model="item.maxPreferential">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
@click="deleteGrowthValues(index)">
|
||||
</div>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
@ -215,6 +338,7 @@
|
||||
import {listUserLabel} from "@/api/staff/user/userlabel";
|
||||
import {listUserGrade} from "@/api/staff/user/usergrade";
|
||||
import {getOilNameList, oilNumberList} from "@/api/order/oilnumgun";
|
||||
import {addActiveSubPrice, editActiveSubPrice, getActiveSubPrice} from "@/api/EventMarketing/activeSubPrice";
|
||||
|
||||
export default {
|
||||
name: "LiJianMarketing",
|
||||
@ -222,13 +346,16 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
ruleForm: {
|
||||
paymentType:[],
|
||||
activeGift:[],
|
||||
activityTimeType:0,
|
||||
suitTimeSlotType:0,
|
||||
activeTimeType: 0,
|
||||
paymentType: [],
|
||||
activeManner: [],
|
||||
offerType: 0,
|
||||
activeType: 0,
|
||||
timeType: 0,
|
||||
applyOilType: 0,
|
||||
},
|
||||
userGradeList:[],
|
||||
userLabelList:[],
|
||||
userGradeList: [],
|
||||
userLabelList: [],
|
||||
oilNameList: [],
|
||||
// 油号列表
|
||||
oilNumberList: [],
|
||||
@ -239,47 +366,47 @@ export default {
|
||||
tindex2: 0,
|
||||
weekMonthTypeList: ["每周", "每月"],
|
||||
tindex3: 0,
|
||||
oilTypeList:['不限','自定义'],
|
||||
tindex4:0,
|
||||
activityTypeList:['固定满减','随机满减','每满'],
|
||||
tindex5:0,
|
||||
oilTypeList: ['不限', '自定义'],
|
||||
tindex4: 0,
|
||||
activityTypeList: ['固定满减', '随机满减', '每满'],
|
||||
tindex5: 0,
|
||||
|
||||
weekList: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
|
||||
weekDay: [],
|
||||
monthDay: [],
|
||||
pointList: [],
|
||||
growthValueList: [],
|
||||
orderList: [],
|
||||
refuelList: [],
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
activeName: [
|
||||
{required: true, message: '活动名称不能为空', trigger: 'blur'},
|
||||
],
|
||||
activityTimeType: [
|
||||
activeTimeType: [
|
||||
{required: true, message: '活动时间不能为空', trigger: 'blur'},
|
||||
],
|
||||
suitTimeSlotFront: [
|
||||
{required: true, message: '时间段不能为空', trigger: 'blur'},
|
||||
offerType: [
|
||||
{required: true, message: '优惠类型不能为空', trigger: 'blur'},
|
||||
],
|
||||
dieselUserLevel: [
|
||||
levelId: [
|
||||
{required: true, message: '适用会员等级不能为空', trigger: 'blur'},
|
||||
],
|
||||
dayLimitNum: [
|
||||
{required: true, message: '每人每天参与上限不能为空', trigger: 'blur'},
|
||||
],
|
||||
monthLimitNum: [
|
||||
{required: true, message: '每人每月参与上限不能为空', trigger: 'blur'},
|
||||
],
|
||||
limitNum: [
|
||||
{required: true, message: '每人累计参与上限不能为空', trigger: 'blur'},
|
||||
],
|
||||
applyOilType: [
|
||||
{required: true, message: '适用油品油号不能为空', trigger: 'blur'},
|
||||
],
|
||||
paymentType: [
|
||||
{required: true, message: '可使用支付方式不能为空', trigger: 'blur'},
|
||||
],
|
||||
everyDayCeiling: [
|
||||
{required: true, message: '每人每天参与上限不能为空', trigger: 'blur'},
|
||||
],
|
||||
monthlyCeiling: [
|
||||
{required: true, message: '每人每月参与上限不能为空', trigger: 'blur'},
|
||||
],
|
||||
accumulateCeiling: [
|
||||
{required: true, message: '每人累计参与上限不能为空', trigger: 'blur'},
|
||||
],
|
||||
noticeContent: [
|
||||
{required: true, message: '通知内容不能为空', trigger: 'blur'},
|
||||
],
|
||||
activityDetails: [
|
||||
{required: true, message: '活动详情不能为空', trigger: 'blur'},
|
||||
activeManner: [
|
||||
{required: true, message: '活动方式不能为空', trigger: 'blur'},
|
||||
],
|
||||
}
|
||||
}
|
||||
@ -291,8 +418,8 @@ export default {
|
||||
this.getUserLabelList()
|
||||
this.getOilList()
|
||||
},
|
||||
methods:{
|
||||
getOilList(){
|
||||
methods: {
|
||||
getOilList() {
|
||||
getOilNameList().then(response => {
|
||||
this.oilNameList = response.data;
|
||||
})
|
||||
@ -313,73 +440,148 @@ export default {
|
||||
},
|
||||
// 会员等级
|
||||
listUserGrade() {
|
||||
listUserGrade({page:1,pageSize:1000}).then(res => {
|
||||
listUserGrade({page: 1, pageSize: 1000}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.userGradeList = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
// 会员标签
|
||||
getUserLabelList(){
|
||||
listUserLabel({page:1,pageSize:10000}).then(res => {
|
||||
getUserLabelList() {
|
||||
listUserLabel({page: 1, pageSize: 10000}).then(res => {
|
||||
this.userLabelList = res.data.records
|
||||
})
|
||||
},
|
||||
getInfo(){
|
||||
|
||||
getInfo() {
|
||||
getActiveSubPrice().then(res => {
|
||||
if (res.data) {
|
||||
this.ruleForm = res.data
|
||||
if (res.data.timeSlots) {
|
||||
if (res.data.timeType == 0) {
|
||||
this.weekDay = this.ruleForm.timeSlots.split(",")
|
||||
} else if (res.data.timeType == 1) {
|
||||
this.monthDay = this.ruleForm.timeSlots.split(",")
|
||||
}
|
||||
}
|
||||
if (res.data.applyOil) this.ruleForm.applyOil = res.data.applyOil.split(",")
|
||||
if (res.data.paymentType) this.ruleForm.paymentType = res.data.paymentType.split(",")
|
||||
if (res.data.activeManner) this.ruleForm.activeManner = res.data.activeManner.split(",")
|
||||
if (res.data.orderList) this.orderList = this.ruleForm.orderList
|
||||
if (res.data.refuelList) this.refuelList = this.ruleForm.refuelList
|
||||
} else {
|
||||
this.ruleForm = {
|
||||
activeTimeType: 0,
|
||||
paymentType: [],
|
||||
activeManner: [],
|
||||
offerType: 0,
|
||||
activeType: 0,
|
||||
timeType: 0,
|
||||
applyOilType: 0,
|
||||
}
|
||||
this.tindex1 = 0
|
||||
this.tindex2 = 0
|
||||
this.tindex3 = 0
|
||||
this.tindex4 = 0
|
||||
this.tindex5 = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
addPoints() {
|
||||
addPoints(activeManner) {
|
||||
let data = {
|
||||
consumeAmount: "",
|
||||
givePoints: "",
|
||||
activeManner: activeManner,
|
||||
full: "",
|
||||
sub: "",
|
||||
randomFront: "",
|
||||
randomAfter: "",
|
||||
maxPreferential: "",
|
||||
enjoyDiscount: "",
|
||||
}
|
||||
this.pointList.push(data)
|
||||
this.orderList.push(data)
|
||||
},
|
||||
deletePoints(index) {
|
||||
this.pointList.splice(index, 1);
|
||||
this.orderList.splice(index, 1);
|
||||
},
|
||||
addGrowthValues() {
|
||||
addGrowthValues(activeManner) {
|
||||
let data = {
|
||||
consumeAmount: "",
|
||||
giveGrowthValue: "",
|
||||
activeManner: activeManner,
|
||||
full: "",
|
||||
sub: "",
|
||||
randomFront: "",
|
||||
randomAfter: "",
|
||||
maxPreferential: "",
|
||||
enjoyDiscount: "",
|
||||
}
|
||||
this.growthValueList.push(data)
|
||||
this.refuelList.push(data)
|
||||
},
|
||||
deleteGrowthValues(index) {
|
||||
this.growthValueList.splice(index, 1);
|
||||
this.refuelList.splice(index, 1);
|
||||
},
|
||||
Typeindex1(index) {
|
||||
this.tindex1 = index
|
||||
this.ruleForm.activityTimeType = index
|
||||
this.ruleForm.activeTimeType = index
|
||||
},
|
||||
Typeindex2(index) {
|
||||
this.tindex2 = index
|
||||
this.ruleForm.suitTimeSlotType = index
|
||||
this.ruleForm.offerType = index
|
||||
if (index == 0) {
|
||||
this.activityTypeList = ['固定满减', '随机满减', '每满']
|
||||
} else {
|
||||
this.activityTypeList = ['固定满减']
|
||||
}
|
||||
this.tindex5 = 0
|
||||
this.orderList = []
|
||||
this.refuelList = []
|
||||
},
|
||||
Typeindex3(index) {
|
||||
this.tindex3 = index
|
||||
this.ruleForm.suitTimeSlotType = index
|
||||
this.ruleForm.timeType = index
|
||||
this.weekDay = []
|
||||
this.monthDay = []
|
||||
},
|
||||
Typeindex4(index) {
|
||||
this.tindex4 = index
|
||||
this.ruleForm.applyOilType = index
|
||||
},
|
||||
Typeindex5(index) {
|
||||
this.tindex5 = index
|
||||
this.ruleForm.activeType = index
|
||||
},
|
||||
submitRuleForm(formName) {
|
||||
if (this.tindex1 == 1){
|
||||
if (!this.ruleForm.activeStartTime || !this.ruleForm.activeEndTime){
|
||||
if (this.tindex1 == 1) {
|
||||
if (!this.ruleForm.activeStartTime || !this.ruleForm.activeEndTime) {
|
||||
this.$message.error("请选择活动开始时间")
|
||||
return
|
||||
}
|
||||
}
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.ruleForm.timeType == 0) {
|
||||
this.ruleForm.timeSlots = this.weekDay.toString()
|
||||
} else if (this.ruleForm.timeType == 1) {
|
||||
this.ruleForm.timeSlots = this.monthDay.toString()
|
||||
}
|
||||
if (this.ruleForm.applyOil) this.ruleForm.applyOil = this.ruleForm.applyOil.toString()
|
||||
if (this.ruleForm.paymentType) this.ruleForm.paymentType = this.ruleForm.paymentType.toString()
|
||||
if (this.ruleForm.activeManner) this.ruleForm.activeManner = this.ruleForm.activeManner.toString()
|
||||
if (this.orderList) this.ruleForm.orderList = this.orderList
|
||||
if (this.refuelList) this.ruleForm.refuelList = this.refuelList
|
||||
|
||||
if (this.ruleForm.id) {
|
||||
// 修改
|
||||
// 修改
|
||||
editActiveSubPrice(this.ruleForm).then(res => {
|
||||
this.$message.success("修改成功")
|
||||
this.getInfo()
|
||||
})
|
||||
} else {
|
||||
// 添加
|
||||
// 添加
|
||||
addActiveSubPrice(this.ruleForm).then(res => {
|
||||
if (res.data) {
|
||||
this.$message.success("添加成功")
|
||||
this.getInfo()
|
||||
} else {
|
||||
this.$message.error("添加失败")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -0,0 +1,93 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询分时优惠列表 1
|
||||
export function getRequestList(query) {
|
||||
return request({
|
||||
url: '/business/activePrice/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function getID(id) {
|
||||
return request({
|
||||
url: '/business/activePrice/'+id,
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
//修改
|
||||
export function updateActivePrice(data) {
|
||||
return request({
|
||||
url: '/business/activePrice/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
|
||||
})
|
||||
}
|
||||
// 查询oil油号列表
|
||||
export function getoilList(query) {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilNumber/getOilNumber',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 新增oil油号列表
|
||||
export function postaddList(data) {
|
||||
return request({
|
||||
url: '/business/activePrice/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除分时优惠
|
||||
export function deleteList(id) {
|
||||
return request({
|
||||
url: '/business/activePrice/del/'+id,
|
||||
method: 'delete',
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询活动规则
|
||||
export function getPriceRuleList(query) {
|
||||
return request({
|
||||
url: '/business/activePriceRule/page',
|
||||
method: 'get',
|
||||
params:query
|
||||
})
|
||||
}
|
||||
|
||||
// 添加活动规则
|
||||
export function addPriceRule(data) {
|
||||
return request({
|
||||
url: '/business/activePriceRule/add',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改活动规则
|
||||
export function editPriceRule(data) {
|
||||
return request({
|
||||
url: '/business/activePriceRule/update',
|
||||
method: 'put',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除活动规则
|
||||
export function deletePriceRule(id) {
|
||||
return request({
|
||||
url: '/business/activePriceRule/del'+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id查询活动规则
|
||||
export function getPriceRule(id) {
|
||||
return request({
|
||||
url: '/business/activePriceRule/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<div class="a-container">
|
||||
<!---->
|
||||
<activeNewlyweds v-show="id == 1"></activeNewlyweds>
|
||||
<activeConsumption v-show="id == 3" ></activeConsumption>
|
||||
<invite v-show="id == 4"></invite>
|
||||
<birthday v-show="id == 5" ></birthday>
|
||||
<separate v-show="id == 9" ></separate>
|
||||
<TimeLimited v-show="id == 10"></TimeLimited>
|
||||
<liJianMarketing v-show="id == 11"></liJianMarketing>
|
||||
<userRecharge v-show="id == 6"></userRecharge>
|
||||
<userConsume v-show="id == 7"></userConsume>
|
||||
<popUp v-show="id == 8"></popUp>
|
||||
<activeNewlyweds v-if="id == 1"></activeNewlyweds>
|
||||
<activeConsumption v-if="id == 3" ></activeConsumption>
|
||||
<invite v-if="id == 4"></invite>
|
||||
<birthday v-if="id == 5" ></birthday>
|
||||
<separate v-if="id == 9" ></separate>
|
||||
<TimeLimited v-if="id == 10"></TimeLimited>
|
||||
<liJianMarketing v-if="id == 11"></liJianMarketing>
|
||||
<userRecharge v-if="id == 6"></userRecharge>
|
||||
<userConsume v-if="id == 7"></userConsume>
|
||||
<popUp v-if="id == 8"></popUp>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
推荐会员消费有礼
|
||||
<div class="cot-box">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" style="width: 70%;margin: 0 auto">
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
|
@ -1,16 +1,18 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="banner-box">
|
||||
<img src="./../assets/new/banner1.png" alt="">
|
||||
</div>
|
||||
<topindex></topindex>
|
||||
<centenrindex></centenrindex>
|
||||
<bottomindex></bottomindex>
|
||||
<bottom_z></bottom_z>
|
||||
<shopowner></shopowner>
|
||||
<!-- <div class="banner-box">-->
|
||||
<!-- <img src="./../assets/new/banner1.png" alt="">-->
|
||||
<!-- </div>-->
|
||||
<!-- <topindex></topindex>-->
|
||||
<!-- <centenrindex></centenrindex>-->
|
||||
<!-- <bottomindex></bottomindex>-->
|
||||
<!-- <bottom_z></bottom_z>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import shopowner from "./shopowner.vue"
|
||||
import { getHomeData, getStatisticData } from "@/api/home";
|
||||
import topindex from "@/views/indexcomponents/topindex.vue";
|
||||
import centenrindex from "@/views/indexcomponents/centenrindex.vue";
|
||||
@ -22,7 +24,8 @@ export default {
|
||||
centenrindex,
|
||||
topindex,
|
||||
bottomindex,
|
||||
bottom_z
|
||||
bottom_z,
|
||||
shopowner
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
825
fuintAdmin/src/views/shopowner.vue
Normal file
825
fuintAdmin/src/views/shopowner.vue
Normal file
@ -0,0 +1,825 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-carousel height="230px">
|
||||
<el-carousel-item v-for="(item,index) in bannerList" :key="index">
|
||||
<div class="bannser">
|
||||
|
||||
<!-- <img src="../../assets/images/banner.png" alt="" >-->
|
||||
<img :src="imagePath+item.productImage" alt="" >
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<div class="b-bs">
|
||||
<div class="left-box">
|
||||
<div>核心数据</div>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div class="san-box">
|
||||
<div class="r-title">{{ storeTotal.allTotal || 0 }}</div>
|
||||
<div class="r-size">总交易金额(元)</div>
|
||||
</div>
|
||||
<div class="san-box" style="background: #fc6464">
|
||||
<div class="r-title">{{ storeTotal.weekTotal || 0 }}</div>
|
||||
<div class="r-size">总交易笔数</div>
|
||||
</div>
|
||||
<div class="san-box" style="background: #fcb12c">
|
||||
<div class="r-title">{{ storeTotal.monthTotal || 0 }}</div>
|
||||
<div class="r-size">笔均单价(元/单)</div>
|
||||
</div>
|
||||
<div class="san-box" style="background: #5bc557;">
|
||||
<div class="r-title">{{ storeTotal.monthTotal || 0 }}</div>
|
||||
<div class="r-size">累计会员余额(万元)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="right-box">
|
||||
<div class="title_">
|
||||
<div>通知中心</div>
|
||||
<div style="font-size: 12px;color: #BBBBBB;display: flex;align-items: center">更多 <i class="el-icon-arrow-right"></i> </div>
|
||||
</div>
|
||||
<!-- <div class="hang_" v-for="(item,index) in 4" :key="index" >【到期提醒】百业兴智慧油站系统将于2024年07月10日到期...</div>-->
|
||||
<div class="hang_" v-for="(item,index) in noticeList" :key="index" >【{{ item.notificationType }}】{{ item.templateContent }}</div>
|
||||
<div class="hang_" v-if="this.noticeList.length==0">暂无通知</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
<div class="left-box-t">
|
||||
<div class="d-s">
|
||||
<div class="h-tt" >数据看板</div>
|
||||
<div class="q-anniu">近一周</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-date-picker
|
||||
v-model="value1"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="getStoreAmount">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div style="margin-right: 40px">
|
||||
<el-select v-model="value" clearable placeholder="请选择" @change="chooseDept()">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-s" style="margin-top: 15px">
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>活跃油站数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.storeTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>交易金额(万元)/交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.tradeAmount || 0 }}/{{ storeAmount.tradeTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>退款金额(元)/退款笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.refundAmount || 0 }}/{{ storeAmount.refundTotal || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>笔均单价(元)</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.averagePrice || 0 }}</div>
|
||||
</div>
|
||||
<div class="k-box">
|
||||
<div class="d-s" style="font-size: 12px;color: #999999;">
|
||||
<div class="sian"></div>
|
||||
<div>日均交易额(万元)/日均交易笔数</div>
|
||||
</div>
|
||||
<div class="num-size">{{ storeAmount.dayTradeAmount || 0 }}/{{ storeAmount.dayTradeTotal || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hui-hang"></div>
|
||||
<div class="d-s" >
|
||||
<div>
|
||||
<div class="h-tt" >活跃油站</div>
|
||||
<div id="ccc" style="width: 300px;height: 200px; "></div>
|
||||
</div>
|
||||
<div class="h-r-ba"></div>
|
||||
<div>
|
||||
<!-- <div class="h-tt" >活跃油站</div>-->
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
<div id="cccc" style="width: 300px;height: 200px;margin-right: 50px"></div>
|
||||
<div id="ccct" style="width: 300px;height: 200px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box-t">
|
||||
<div class="h-tt" >硬件设备</div>
|
||||
<div class="d-s" style="margin: 30px 0px" v-for="(item,index) in hardwareList" :key="index" >
|
||||
<!-- <div class="r-img">-->
|
||||
<!-- <img src="../../assets/images/pcin.png" style="width: 84px;height: 70px">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>容大(RT RONGTA)RP76II针式76mm小票打印机加油站二三联票据 RP76II/USB口</div>-->
|
||||
<div class="r-img">
|
||||
<img :src="imagePath + item.image" style="width: 84px;height: 70px">
|
||||
</div>
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b-bs">
|
||||
<div class="la-left">
|
||||
<div>数据展示</div>
|
||||
</div>
|
||||
<div class="la-right"></div>
|
||||
</div>
|
||||
<div class="bottom_">
|
||||
<div class="h-tt" style="margin-bottom: 15px" >数据统计</div>
|
||||
<div class="d-s">
|
||||
<div class="anniu-h" :class="{ 'anniu-act': index == 0 }" v-for="(item,index) in timeList" :key="index">
|
||||
{{item}}
|
||||
</div>
|
||||
<el-date-picker
|
||||
v-model="value2"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div id="ctct" style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from "echarts";
|
||||
import {selectStoreAmount, storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
|
||||
import {getListApi} from "@/api/setting/hardware";
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
import {parseTime} from "@/utils/fuint";
|
||||
import {getBannerListApi} from "@/api/sys/banner";
|
||||
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
|
||||
export default {
|
||||
|
||||
props:["accountId"],
|
||||
data(){
|
||||
return{
|
||||
form: {},
|
||||
timeList:[
|
||||
"今日",
|
||||
"近一周",
|
||||
"近一月",
|
||||
"近一年",
|
||||
],
|
||||
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
}],
|
||||
value: '',
|
||||
value1: [],
|
||||
value2: [],
|
||||
imagePath: process.env.VUE_APP_SERVER_URL,
|
||||
queryParams:{},
|
||||
// 店铺数量
|
||||
storeTotal:{},
|
||||
// 店铺金额
|
||||
storeAmount:{},
|
||||
// banner图列表
|
||||
bannerList:{},
|
||||
storeList:[],
|
||||
hardwareList:[],
|
||||
noticeList:[]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let nowDate = new Date();
|
||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||
this.getStoreTotal()
|
||||
this.selectChildByDeptIdApi()
|
||||
this.getStoreAmount()
|
||||
this.selectBannerList()
|
||||
let start = new Date();
|
||||
start.setHours(0)
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.value2 = [start,new Date()];
|
||||
this.getStoreList()
|
||||
this.getHardwareList()
|
||||
this.getNoticeList()
|
||||
},
|
||||
mounted() {
|
||||
// this.initChart()
|
||||
},
|
||||
methods:{
|
||||
getNoticeList(){
|
||||
getNotificationlogList({pageNo: 1, pageSize: 4,sentTo:this.accountId}).then(res => {
|
||||
this.noticeList = res.data.records
|
||||
})
|
||||
},
|
||||
getHardwareList(){
|
||||
getListApi({page: 1, pageSize: 3,status:'1'}).then(res=>{
|
||||
this.hardwareList = res.data.records;
|
||||
this.hardwareList.forEach(item => {
|
||||
if (item.image.includes(",")){
|
||||
item.image = item.image.split(",")[0]
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getStoreList(){
|
||||
selectStoreAmount(this.addDateRange({},this.value2)).then(res => {
|
||||
this.storeList = res.data
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
// 选择机构信息
|
||||
chooseDept(){
|
||||
this.options.forEach(item => {
|
||||
if (item.deptId == this.value){
|
||||
this.queryParams.ancestors = item.ancestors
|
||||
}
|
||||
})
|
||||
this.getStoreAmount()
|
||||
},
|
||||
selectBannerList(){
|
||||
let queryParams = {
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
system_position:"系统首页",
|
||||
bannerStatus:true
|
||||
}
|
||||
getBannerListApi(queryParams).then(res=>{
|
||||
this.bannerList = res.data.records
|
||||
})
|
||||
},
|
||||
// 查询
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
this.options = res.data
|
||||
})
|
||||
},
|
||||
getStoreTotal(){
|
||||
storeTotalIndex().then(res => {
|
||||
this.storeTotal = res.data
|
||||
})
|
||||
},
|
||||
getStoreAmount(){
|
||||
storeAmountIndex(this.addDateRange(this.queryParams,this.value1)).then(res => {
|
||||
this.storeAmount = res.data
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
countPercentage(upNum,downNum){
|
||||
let percentage = 0;
|
||||
percentage = (upNum / downNum)*100
|
||||
return percentage.toFixed(2)
|
||||
},
|
||||
initChart() {
|
||||
const chart = echarts.init(document.getElementById('ccc'))
|
||||
const chart1 = echarts.init(document.getElementById('cccc'))
|
||||
const chart2= echarts.init(document.getElementById('ccct'))
|
||||
const chart3= echarts.init(document.getElementById('ctct'))
|
||||
|
||||
let dataList = []
|
||||
let allTotal = 0
|
||||
if (this.storeAmount.oilNameList) {
|
||||
this.storeAmount.oilNameList.forEach(item => {
|
||||
allTotal += item.countNum
|
||||
})
|
||||
this.storeAmount.oilNameList.forEach(item => {
|
||||
let data = {value: 0, name: ""}
|
||||
data.value = this.countPercentage(item.countNum, allTotal);
|
||||
data.name = item.oilName + item.oilType + "占比"
|
||||
dataList.push(data)
|
||||
})
|
||||
}
|
||||
|
||||
let storeNameList = []
|
||||
let oilAmountList = []
|
||||
let noOilAmountList = []
|
||||
let rechargeBalanceList = []
|
||||
let consumeBalanceList = []
|
||||
let userBalanceList = []
|
||||
if (this.storeList.length>0) {
|
||||
this.storeList.forEach(item => {
|
||||
storeNameList.push(item.storeName)
|
||||
oilAmountList.push(item.oilAmount)
|
||||
noOilAmountList.push(item.noOilAmount)
|
||||
rechargeBalanceList.push(item.userRechargeBalance)
|
||||
consumeBalanceList.push(item.userConsumeBalance)
|
||||
userBalanceList.push(item.userBalance)
|
||||
})
|
||||
}
|
||||
|
||||
const option = {
|
||||
color: [
|
||||
'#b7f1e2',
|
||||
'#fc7150',
|
||||
'#fea500',
|
||||
'#5facfe',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
roseType: 'area',
|
||||
radius: [5, '80%'],
|
||||
// data: [
|
||||
// { value: 36, name: '#98汽油占比' },
|
||||
// { value: 42, name: '0#柴油占比' },
|
||||
// { value: 40, name: '#95汽油占比' },
|
||||
// { value: 38, name: '#92柴油占比' },
|
||||
//
|
||||
//
|
||||
// ],
|
||||
data: dataList,
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
borderRadius: 8,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option1 = {
|
||||
color: [
|
||||
'#3B6ADE',
|
||||
'#409eff',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
data: [
|
||||
// { value: 28, name: '28%' },
|
||||
// { value: 72, name: '72%' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.oilNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.noOilNum)), name: "油品交易占比" },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.noOilNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.noOilNum)), name: "非油品交易占比" },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
const option2 = {
|
||||
color: [
|
||||
'#46c2c4',
|
||||
'#6e4dd8',
|
||||
'#214790',
|
||||
'#d55f5f',
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: [50, '80%'],
|
||||
data: [
|
||||
// { value: 28, name: '会员充值占比' },
|
||||
// { value: 72, name: '积分商城交易占比' },
|
||||
// { value: 28, name: '油品交易占比' },
|
||||
// { value: 72, name: '便利店交易占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.userNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '会员充值占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.integralNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '积分商城交易占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.oilNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '油品交易占比' },
|
||||
{ value: this.countPercentage(Number(this.storeAmount.goodNum),Number(this.storeAmount.oilNum)+Number(this.storeAmount.userNum)+Number(this.storeAmount.integralNum)+Number(this.storeAmount.goodNum)), name: '便利店交易占比' },
|
||||
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const option3 = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
legend: {
|
||||
data: ['Evaporation','油品交易额','非油品交易额', '会员充值金额','会员消费金额', '会员余额']
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
// data: ['中建锦绣广场1站', '中建锦绣广场2站', '中建锦绣广场3站', '中建锦绣广场4站', '中建锦绣广场5站', '中建锦绣广场6站', '中建锦绣广场7站'],
|
||||
data: storeNameList,
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '金额(元)',
|
||||
// min: 0,
|
||||
// max: 10000,
|
||||
// interval: 2000,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
// {
|
||||
// type: 'value',
|
||||
// name: '',
|
||||
// min: 0,
|
||||
// max: 25,
|
||||
// interval: 5,
|
||||
// axisLabel: {
|
||||
// formatter: '{value} '
|
||||
// }
|
||||
// }
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '油品交易额',
|
||||
color: '#FF9655',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
barGap: '60%',
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: oilAmountList
|
||||
},
|
||||
{
|
||||
name: '非油品交易额',
|
||||
color: '#55F3FF',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: noOilAmountList
|
||||
},
|
||||
{
|
||||
name: '会员充值金额',
|
||||
color: '#0DC291',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: rechargeBalanceList
|
||||
},
|
||||
{
|
||||
name: '会员消费金额',
|
||||
color: '#409EFF',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: consumeBalanceList
|
||||
},
|
||||
{
|
||||
name: '会员余额',
|
||||
color: '#D55F5F',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
|
||||
// ]
|
||||
data: userBalanceList
|
||||
}
|
||||
],
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '3%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
}
|
||||
};
|
||||
|
||||
chart.setOption(option)
|
||||
chart1.setOption(option1)
|
||||
chart2.setOption(option2)
|
||||
chart3.setOption(option3)
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.app-container{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* height: 100vh; */
|
||||
background: #f4f5f9;
|
||||
}
|
||||
.d-s{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.bannser{
|
||||
width: 100%;
|
||||
height: 230px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
.b-bs{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.left-box{
|
||||
width: 73%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 192px;
|
||||
//display: flex;
|
||||
//align-items: center;
|
||||
//justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.left-box-t{
|
||||
width: 73%;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 380px;
|
||||
|
||||
}
|
||||
.right-box{
|
||||
width: 25%;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 192px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.right-box-t{
|
||||
width: 25%;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #FFFFFF;
|
||||
height: 380px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
overflow: auto;
|
||||
}
|
||||
.san-box{
|
||||
width: 24%;
|
||||
height: 120px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 8px;
|
||||
background: #409eff;
|
||||
margin: 15px 0px;
|
||||
margin-right: 15px;
|
||||
box-sizing: border-box;
|
||||
padding: 20px 40px;
|
||||
//display: flex;
|
||||
//align-items: center;
|
||||
//justify-content: space-between;
|
||||
}
|
||||
.r-title{
|
||||
font-weight: bold;
|
||||
font-size: 42px;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
}
|
||||
.r-size{
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
}
|
||||
.title_{
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
.hang_{
|
||||
width: 100%;
|
||||
white-space: nowrap; //不换行
|
||||
overflow: hidden; //超出部分隐藏
|
||||
text-overflow: ellipsis; //文本溢出显示省略号
|
||||
font-size: 14px;
|
||||
color: #777777;
|
||||
margin: 14px auto;
|
||||
}
|
||||
.h-tt{
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
margin-right: 40px;
|
||||
}
|
||||
.q-anniu{
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FF9655;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.k-box{
|
||||
width: 215px;
|
||||
height: 68px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e1e0e0;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.num-size{
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
color: #555555;
|
||||
}
|
||||
.sian{
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: #2BBCFF;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.hui-hang{
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
background: #F4F5F9;
|
||||
margin: 15px auto;
|
||||
}
|
||||
.h-r-ba{
|
||||
height: 170px;
|
||||
margin: 0px 50px;
|
||||
width: 5px;
|
||||
background: #f4f5f9;
|
||||
}
|
||||
.r-img{
|
||||
width: 84px;
|
||||
height: 70px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.bottom_{
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.anniu-h{
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
border: 1px solid #DDDDDD;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #777777;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.anniu-act{
|
||||
background: #FF9655 !important;
|
||||
border: 1px solid #FF9655 !important;
|
||||
color: #fff;
|
||||
}
|
||||
.la-left{
|
||||
width: 70%;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.la-right{
|
||||
height: 25%;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
@ -55,7 +55,6 @@ public class ActivePriceController extends BaseController {
|
||||
public ResponseObject selectOne(@PathVariable Integer id) {
|
||||
return getSuccessResult(activePriceService.getActPriceById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增营销活动(与更新调用同一个接口,为方便从Controller层控制后端权限分开写)
|
||||
*
|
||||
@ -101,8 +100,8 @@ public class ActivePriceController extends BaseController {
|
||||
* @author PQZ
|
||||
* @date 11:30 2024/9/2
|
||||
**/
|
||||
@DeleteMapping("del")
|
||||
public ResponseObject del(@RequestParam("id") Integer id) {
|
||||
@DeleteMapping("del/{id}")
|
||||
public ResponseObject del(@PathVariable Integer id) {
|
||||
activePriceService.removeByActId(id);
|
||||
return getSuccessResult("删除成功", null);
|
||||
}
|
||||
|
@ -97,8 +97,8 @@ public class ActivePriceRuleController extends BaseController {
|
||||
* @param id 活动规则id
|
||||
* @return com.fuint.framework.web.ResponseObject
|
||||
**/
|
||||
@DeleteMapping("del")
|
||||
public ResponseObject del(@RequestParam("id") Integer id) {
|
||||
@DeleteMapping("del/{id}")
|
||||
public ResponseObject del(@PathVariable Integer id) {
|
||||
activePriceRuleService.removeById(id);
|
||||
return getSuccessResult("删除成功", null);
|
||||
}
|
||||
|
@ -41,12 +41,13 @@ public class ActiveSubPriceController extends BaseController {
|
||||
**/
|
||||
@PostMapping("/add")
|
||||
public ResponseObject add(@RequestBody ActiveSubPriceSaveVO saveVO) {
|
||||
boolean row = false;
|
||||
try {
|
||||
activeSubPriceService.saveActiveSubPrice(true, saveVO);
|
||||
row = activeSubPriceService.saveActiveSubPrice(true, saveVO);
|
||||
} catch (BusinessCheckException businessCheckException) {
|
||||
return getFailureResult(businessCheckException.getMessage());
|
||||
}
|
||||
return getSuccessResult("保存成功", null);
|
||||
return getSuccessResult("保存成功", row);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -56,14 +57,15 @@ public class ActiveSubPriceController extends BaseController {
|
||||
* @param saveVO ActiveSubPriceSaveVO实体
|
||||
* @return com.fuint.framework.web.ResponseObject
|
||||
**/
|
||||
@PostMapping("/update")
|
||||
@PutMapping("/update")
|
||||
public ResponseObject update(@RequestBody ActiveSubPriceSaveVO saveVO) {
|
||||
boolean row = false;
|
||||
try {
|
||||
activeSubPriceService.saveActiveSubPrice(true, saveVO);
|
||||
row = activeSubPriceService.saveActiveSubPrice(false, saveVO);
|
||||
} catch (BusinessCheckException businessCheckException) {
|
||||
return getFailureResult(businessCheckException.getMessage());
|
||||
}
|
||||
return getSuccessResult("保存成功", null);
|
||||
return getSuccessResult("保存成功", row);
|
||||
}
|
||||
|
||||
|
||||
@ -80,5 +82,9 @@ public class ActiveSubPriceController extends BaseController {
|
||||
return getSuccessResult("删除成功", null);
|
||||
}
|
||||
|
||||
@GetMapping("getInfo")
|
||||
public ResponseObject getInfo() {
|
||||
return getSuccessResult(activeSubPriceService.selectByStoreId());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,10 @@ public class ActivePriceOil extends Model<ActivePriceOil> {
|
||||
private Integer activeId ;
|
||||
/** 油品油号id */
|
||||
private Integer oilId ;
|
||||
/** 油品 */
|
||||
private String oilType ;
|
||||
/** 油号 */
|
||||
private String oilName ;
|
||||
/** 是否删除:0未;1删 */
|
||||
private String type ;
|
||||
/** 挂牌价 */
|
||||
|
@ -62,6 +62,8 @@ public class ActivePriceRule extends Model<ActivePriceRule> {
|
||||
private Integer dayLimitNum ;
|
||||
/** 每人累计参与限制次数 */
|
||||
private Integer limitNum ;
|
||||
/** 状态:0未生效;1使用中;2已生效 */
|
||||
private String status ;
|
||||
/** 创建人 */
|
||||
private String createBy ;
|
||||
/** 创建时间 */
|
||||
|
@ -1,13 +1,16 @@
|
||||
package com.fuint.business.marketingActivity.activePrice.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 立减营销活动规则;
|
||||
@ -27,27 +30,33 @@ public class ActiveSubPrice extends Model<ActiveSubPrice> {
|
||||
private Integer storeId ;
|
||||
/** 活动名称 */
|
||||
private String activeName ;
|
||||
/** 适用时间类型(1-每周|2-每月|3-时间段) */
|
||||
/** 适用时间类型(0-每周|1-每月|2-时间段) */
|
||||
private String timeType ;
|
||||
/** 适用时间段(1、2、3、4..31,代表周一、周二、周三或者1号、2号、3号)数字之间英文逗号隔开 */
|
||||
private String timeSlots ;
|
||||
/** 适用开始时间 */
|
||||
@JsonFormat(pattern = "HH:mm" , timezone = "GMT+8")
|
||||
private Date timeApplyStart ;
|
||||
/** 适用结束时间 */
|
||||
@JsonFormat(pattern = "HH:mm" , timezone = "GMT+8")
|
||||
private Date timeApplyEnd ;
|
||||
/** 可使用支付方式 0:微信支付 1:支付宝 2:云闪付 3:会员卡 4:现金 5:POS刷卡 */
|
||||
/** 可使用支付方式 0:微信支付 1:支付宝 2:云闪付 3:会员卡 4:现金 5:POS刷卡 以数据字典为准 */
|
||||
private String paymentType ;
|
||||
/** 活动时间类型:0永久有效;1自定义 */
|
||||
private String activeTimeType ;
|
||||
/** 生效起始时间 */
|
||||
private Date activeStartTime ;
|
||||
/** 生效截止时间 */
|
||||
private Date activeEndTime ;
|
||||
/** 优惠类型(1立减优惠|2活动优惠) */
|
||||
/** 优惠类型(0立减优惠|1活动优惠) */
|
||||
private String offerType ;
|
||||
/** 活动类型(1固定满减|2随机满减|3每满) */
|
||||
/** 活动类型(0固定满减|1随机满减|2每满) */
|
||||
private String activeType ;
|
||||
/** 适用油品油号类型:0不限;1自定义 */
|
||||
private String applyOilType ;
|
||||
/** 适用油品油号 */
|
||||
private String applyOil ;
|
||||
/** 活动方式(1按订单金额|2按加油升数) */
|
||||
/** 活动方式(0按订单金额|1按加油升数) */
|
||||
private String activeManner ;
|
||||
/** 适用会员等级id */
|
||||
private String levelId ;
|
||||
@ -67,4 +76,11 @@ public class ActiveSubPrice extends Model<ActiveSubPrice> {
|
||||
private String updateBy ;
|
||||
/** 更新时间 */
|
||||
private Date updateTime ;
|
||||
|
||||
/**订单金额列表*/
|
||||
@TableField(exist = false)
|
||||
private List<ActiveSubPriceRule> orderList;
|
||||
/**加油升数列表*/
|
||||
@TableField(exist = false)
|
||||
private List<ActiveSubPriceRule> refuelList;
|
||||
}
|
@ -28,12 +28,20 @@ public class ActiveSubPriceRule extends Model<ActiveSubPriceRule> {
|
||||
private Integer storeId ;
|
||||
/** 价格营销活动主表id */
|
||||
private Integer activeId ;
|
||||
/** 活动方式(1按订单金额|2按加油升数) */
|
||||
/** 活动方式(0按订单金额|1按加油升数) */
|
||||
private String activeManner ;
|
||||
/** 订单金额加油升数满xx */
|
||||
/** 订单金额/加油升数 满xx元 */
|
||||
private BigDecimal full ;
|
||||
/** 订单金额加油升数满xx优惠xx */
|
||||
/** 订单金额/加油升数 固定优惠 */
|
||||
private BigDecimal sub ;
|
||||
/** 订单金额/加油升数 随机优惠 前 */
|
||||
private BigDecimal randomFront ;
|
||||
/** 订单金额/加油升数 随机优惠 后 */
|
||||
private BigDecimal randomAfter ;
|
||||
/** 订单金额/加油升数 最大优惠 */
|
||||
private BigDecimal maxPreferential ;
|
||||
/** 订单金额/加油升数 享受折扣 */
|
||||
private BigDecimal enjoyDiscount ;
|
||||
/** 创建人 */
|
||||
private String createBy ;
|
||||
/** 创建时间 */
|
||||
|
@ -9,10 +9,12 @@
|
||||
main.title AS title,
|
||||
main.create_by AS createBy,
|
||||
main.create_time AS createTime,
|
||||
COUNT( apo.id ) AS countCom
|
||||
COUNT( apo.id ) AS countCom,
|
||||
ta.real_name createName
|
||||
FROM
|
||||
active_price main
|
||||
LEFT JOIN active_price_oil apo ON main.id = apo.active_id
|
||||
LEFT JOIN t_account ta on main.create_by = ta.acct_id
|
||||
<where>
|
||||
<if test="entity.chainStorId != null and entity.chainStorId != ''">
|
||||
AND main.chain_stor_id = #{entity.chainStorId}
|
||||
@ -26,5 +28,6 @@
|
||||
</where>
|
||||
GROUP BY
|
||||
main.id
|
||||
order by main.create_time desc
|
||||
</select>
|
||||
</mapper>
|
@ -37,5 +37,13 @@ public interface ActiveSubPriceRuleService extends IService<ActiveSubPriceRule>
|
||||
* @return java.util.List<com.fuint.business.marketingActivity.activePrice.entity.ActiveSubPriceRule>
|
||||
**/
|
||||
List<ActiveSubPriceRule> listByActId(Integer actId);
|
||||
|
||||
/**
|
||||
* 根据活动id和查询活动规则
|
||||
* @param actId
|
||||
* @param activeManner
|
||||
* @return
|
||||
*/
|
||||
List<ActiveSubPriceRule> listByActSubId(Integer actId,String activeManner);
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,13 @@ public interface ActiveSubPriceService extends IService<ActiveSubPrice> {
|
||||
* @author PQZ
|
||||
* @date 17:16 2024/9/2
|
||||
**/
|
||||
void saveActiveSubPrice(boolean isAdd, ActiveSubPriceSaveVO saveVO) throws BusinessCheckException;
|
||||
boolean saveActiveSubPrice(boolean isAdd, ActiveSubPriceSaveVO saveVO) throws BusinessCheckException;
|
||||
|
||||
/**
|
||||
* 根据店铺id查询立减营销信息
|
||||
* @return
|
||||
*/
|
||||
ActiveSubPrice selectByStoreId();
|
||||
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,7 @@ public class ActivePriceOilServiceImpl extends ServiceImpl<ActivePriceOilMapper,
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
item.setChainStoreId(nowAccountInfo.getChainStoreId());
|
||||
item.setStoreId(nowAccountInfo.getStoreId());
|
||||
item.setOilId(item.getId());
|
||||
});
|
||||
saveBatch(oilList);
|
||||
}
|
||||
|
@ -88,6 +88,13 @@ public class ActivePriceServiceImpl extends ServiceImpl<ActivePriceMapper, Activ
|
||||
/*3、数据保存*/
|
||||
//保存营销活动
|
||||
saveOrUpdate(activePrice);
|
||||
|
||||
// 如果是增加的话查询活动id信息
|
||||
if (isAdd) {
|
||||
IPage<ActivePriceRespVO> activePriceRespVOIPage = this.pageActivePrice(new Page<>(), new ActivePriceReqVO());
|
||||
activePrice = activePriceRespVOIPage.getRecords().get(0);
|
||||
}
|
||||
|
||||
//保存关联油品信息
|
||||
activePriceOilService.saveOilList(activePrice.getId(), saveVO.getOilList());
|
||||
/*4、日志操作*/
|
||||
|
@ -1,12 +1,14 @@
|
||||
package com.fuint.business.marketingActivity.activePrice.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.marketingActivity.activePrice.entity.ActiveSubPriceRule;
|
||||
import com.fuint.business.marketingActivity.activePrice.mapper.ActiveSubPriceRuleMapper;
|
||||
import com.fuint.business.marketingActivity.activePrice.service.ActiveSubPriceRuleService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -44,6 +46,9 @@ public class ActiveSubPriceRuleServiceImpl extends ServiceImpl<ActiveSubPriceRul
|
||||
@Override
|
||||
public void saveActiveSubPriceRule(Integer actId,List<ActiveSubPriceRule> list) {
|
||||
removeByActId(actId);
|
||||
for (ActiveSubPriceRule activeSubPriceRule : list) {
|
||||
activeSubPriceRule.setActiveId(actId);
|
||||
}
|
||||
saveBatch(list);
|
||||
}
|
||||
|
||||
@ -61,5 +66,13 @@ public class ActiveSubPriceRuleServiceImpl extends ServiceImpl<ActiveSubPriceRul
|
||||
lambdaQueryWrapper.eq(ActiveSubPriceRule::getActiveId,actId);
|
||||
return list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ActiveSubPriceRule> listByActSubId(Integer actId, String activeManner) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("active_id" ,actId);
|
||||
queryWrapper.eq("active_manner" ,activeManner);
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
package com.fuint.business.marketingActivity.activePrice.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.marketingActivity.activePrice.entity.ActiveSubPrice;
|
||||
import com.fuint.business.marketingActivity.activePrice.entity.ActiveSubPriceRule;
|
||||
import com.fuint.business.marketingActivity.activePrice.mapper.ActiveSubPriceMapper;
|
||||
import com.fuint.business.marketingActivity.activePrice.service.ActiveSubPriceRuleService;
|
||||
import com.fuint.business.marketingActivity.activePrice.service.ActiveSubPriceService;
|
||||
@ -13,6 +16,9 @@ import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.quartz.util.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static com.fuint.common.constant.ActConstants.*;
|
||||
|
||||
/**
|
||||
@ -43,7 +49,7 @@ public class ActiveSubPriceServiceImpl extends ServiceImpl<ActiveSubPriceMapper,
|
||||
ActiveSubPrice activeSubPrice = getById(id);
|
||||
BeanUtils.copyProperties(activeSubPrice, result);
|
||||
result.setRuleList(activeSubPriceRuleService.listByActId(id));
|
||||
return null;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -55,7 +61,13 @@ public class ActiveSubPriceServiceImpl extends ServiceImpl<ActiveSubPriceMapper,
|
||||
* @date 17:16 2024/9/2
|
||||
**/
|
||||
@Override
|
||||
public void 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();
|
||||
BeanUtils.copyProperties(saveVO, activeSubPrice);
|
||||
// 插入店铺id信息
|
||||
@ -63,14 +75,43 @@ public class ActiveSubPriceServiceImpl extends ServiceImpl<ActiveSubPriceMapper,
|
||||
activeSubPrice.setChainStorId(nowAccountInfo.getChainStoreId());
|
||||
activeSubPrice.setStoreId(nowAccountInfo.getStoreId());
|
||||
//保存主表信息
|
||||
saveOrUpdate(activeSubPrice);
|
||||
boolean row = saveOrUpdate(activeSubPrice);
|
||||
activeSubPrice = this.selectByStoreId();
|
||||
//保存子表信息
|
||||
activeSubPriceRuleService.saveActiveSubPriceRule(activeSubPrice.getId(),saveVO.getRuleList());
|
||||
activeSubPriceRuleService.saveActiveSubPriceRule(activeSubPrice.getId(),saveVO.getOrderList());
|
||||
activeSubPriceRuleService.saveActiveSubPriceRule(activeSubPrice.getId(),saveVO.getRefuelList());
|
||||
//转换日志保存内容
|
||||
String content = actPriceUtil.transActLogContent(isAdd ? LOG_OPERATE_ADD : LOG_OPERATE_UPDATE,
|
||||
LOG_SYSTEM_MODULE_LJYH,
|
||||
saveVO.getActiveName());
|
||||
actPriceUtil.saveActLog(LOG_SYSTEM_NAME_SIGN, LOG_SYSTEM_MODULE_ACTIVE, content);
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActiveSubPrice selectByStoreId() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("store_id", nowAccountInfo.getStoreId());
|
||||
ActiveSubPrice activeSubPrice = null;
|
||||
List<ActiveSubPrice> list = baseMapper.selectList(queryWrapper);
|
||||
for (ActiveSubPrice subPrice : list) {
|
||||
if (ObjectUtil.isNotEmpty(subPrice.getActiveTimeType().equals("0"))){
|
||||
activeSubPrice = subPrice;
|
||||
}else {
|
||||
Date date = new Date();
|
||||
if (subPrice.getActiveStartTime().before(date) && subPrice.getActiveEndTime().after(date)){
|
||||
activeSubPrice = subPrice;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(activeSubPrice)){
|
||||
List<ActiveSubPriceRule> activeSubPriceRules = activeSubPriceRuleService.listByActSubId(activeSubPrice.getId(),"0");
|
||||
activeSubPrice.setOrderList(activeSubPriceRules);
|
||||
List<ActiveSubPriceRule> activeSubPriceRules1 = activeSubPriceRuleService.listByActSubId(activeSubPrice.getId(),"1");
|
||||
activeSubPrice.setRefuelList(activeSubPriceRules1);
|
||||
}
|
||||
return activeSubPrice;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,4 +19,8 @@ public class ActivePriceRespVO extends ActivePrice {
|
||||
private Integer countCom;
|
||||
/**价格营销活动适用油品油号*/
|
||||
private List<ActivePriceOil> oilList;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createName;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user