Merge branch 'master' of https://gitee.com/nny_1/oilSystem
# Conflicts: # fuintAdmin/.env.development # fuintAdmin_zt/.env.development
This commit is contained in:
commit
8b907e9ad0
@ -14,3 +14,4 @@ VUE_APP_PUBLIC_PATH = '/'
|
||||
VUE_APP_SERVER_URL = 'http://192.168.0.178:8008/'
|
||||
|
||||
|
||||
|
||||
|
@ -16,8 +16,6 @@ export function getoilName(query) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查询消费有礼活动列表
|
||||
export function listActiveConsumption(query) {
|
||||
return request({
|
||||
|
17
fuintAdmin/src/api/EventMarketing/yijian.js
Normal file
17
fuintAdmin/src/api/EventMarketing/yijian.js
Normal file
@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
export function issueCardFavorable(data) {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardFavorableRecord/issueCardFavorable',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
export function getCardFavorableLists(status) {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardFavorableRecord/getCardFavorableLists',
|
||||
method: 'get',
|
||||
params: status
|
||||
})
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div title="帮助文档" class="nav-icon">
|
||||
<div title="收银台" class="nav-icon">
|
||||
<!-- <svg-icon icon-class="question" @click="goto" />-->
|
||||
<i class="el-icon-s-platform" @click="goto" style="font-size: 24px"></i>
|
||||
</div>
|
||||
|
@ -41,6 +41,12 @@
|
||||
<div>推荐有礼</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrap-box" @click="gobox(6)" >
|
||||
<img src="../../../assets/images/tjyl.png" style="width: 260px;height: 260px;margin: 0 auto " >
|
||||
<div class="bottom-box">
|
||||
<div>一键发券</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -92,6 +98,9 @@ export default {
|
||||
if(id == 5){
|
||||
this.$router.push('/EventMarketing/activeRecommend/index')
|
||||
}
|
||||
if(id == 6){
|
||||
this.$router.push('/EventMarketing/yijiancoupon/index')
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
@ -106,7 +115,7 @@ export default {
|
||||
margin: 0px auto;
|
||||
}
|
||||
.wrap-box{
|
||||
width: 260px;
|
||||
width: 19%;
|
||||
text-align: center;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
@ -114,6 +123,7 @@ export default {
|
||||
box-shadow: 0px 2px 4px rgb(31 30 47 / 10%);
|
||||
margin-right: 15px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.fji{
|
||||
display: flex;
|
||||
|
15
fuintAdmin/src/views/EventMarketing/grantCoupon/index.vue
Normal file
15
fuintAdmin/src/views/EventMarketing/grantCoupon/index.vue
Normal file
@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "index"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
891
fuintAdmin/src/views/EventMarketing/yijiancoupon/index.vue
Normal file
891
fuintAdmin/src/views/EventMarketing/yijiancoupon/index.vue
Normal file
@ -0,0 +1,891 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
|
||||
<el-form-item label="券状态" prop="name">
|
||||
<el-select v-model="status" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="activeConsumptionList" :label-position="labelPosition" @selection-change="handleSelectionChange">
|
||||
|
||||
<el-table-column
|
||||
type="index"
|
||||
align="center"
|
||||
label="排序"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="会员名字" align="center" prop="name" />
|
||||
|
||||
<el-table-column label="手机号" align="center" prop="mobile" />
|
||||
|
||||
<el-table-column label="券名称" align="center" prop="cardFavorableName"/>
|
||||
<el-table-column label="券的类型" align="center" prop="discountType" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status == 0">满减券</span>
|
||||
<span v-if="scope.row.status == 1">折扣券</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status == 0"> <el-tag>未使用</el-tag> </span>
|
||||
<span v-if="scope.row.status == 1"><el-tag type="danger">已使用</el-tag> </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
<!-- 添加或修改消费有礼活动对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="45%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="110px">
|
||||
<el-form-item label="会员等级" prop="" >
|
||||
<el-select v-model="gradeIds" multiple clearable placeholder="会员等级">
|
||||
<el-option :label="item.name" :value="item.id.toString()" v-for="(item,index) in userGradeList" :key="index" > </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="不活跃用户" prop="">
|
||||
<div style="display: flex;align-items: center">
|
||||
<el-input-number v-model="days" :min="1" :max="999" label="描述文字"></el-input-number>
|
||||
<div style="margin-left: 5px">天 <span style="color: red">(查找最近N天未进行消费的用户)</span> </div>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<!-- 选择优惠券-->
|
||||
<div class="xh-box" >
|
||||
<div class="box-bt"> <div >赠送卡券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()" >新增</el-button> </div>
|
||||
<div style="margin: 10px 0px">
|
||||
<el-table
|
||||
:data="form.tableDatas"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="giftCardName"
|
||||
label="卡券名称"
|
||||
width="0">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="giftCardType"
|
||||
label="券类型"
|
||||
width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.giftCardType == 0" >油品券</span>
|
||||
<span v-if="scope.row.giftCardType == 1" >商品券</span>
|
||||
<span v-if="scope.row.giftCardType == 2" >通用券</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券详情"
|
||||
width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.giftCardDetail}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="有效期(天)"
|
||||
width="240">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.timeType == 0" > <el-input-number v-model="scope.row.validityZero" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 1" > <el-input-number v-model="scope.row.validityOne" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 2" > <el-input-number v-model="scope.row.validityTwo" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="数量"
|
||||
width="240">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="deletedata(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 选择兑换券-->
|
||||
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<!-- 最终提交-->
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="优惠券列表" :visible.sync="dialogTableVisible">
|
||||
<div style="display: flex;align-items: center; margin-bottom: 20px ">
|
||||
<el-input v-model="youhuiquan.name" placeholder="优惠券名称"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="getlistFavorable" >搜索</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="卡券名称"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券类型"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type == 0" >油品券</span>
|
||||
<span v-if="scope.row.type == 1" >商品券</span>
|
||||
<span v-if="scope.row.type == 2" >通用券</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券详情"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>满{{scope.row.satisfiedAmount}}减 {{scope.row.discountAmount}}元 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="有效期(天)"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.timeType == 0" >{{scope.row.validityZero}}天 </span>
|
||||
<span v-if="scope.row.timeType == 1" >{{scope.row.validityOne}}天 </span>
|
||||
<span v-if="scope.row.timeType == 2" >{{scope.row.validityTwo}}天 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="chosedata(scope.row)"
|
||||
>选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div><pagination
|
||||
v-show="ytotal>0"
|
||||
:total="ytotal"
|
||||
:page.sync="youhuiquan.pageNum"
|
||||
:limit.sync="youhuiquan.pageSize"
|
||||
@pagination="getlistFavorable"
|
||||
/></div>
|
||||
|
||||
</el-dialog>
|
||||
<!-- 兑换券列表-->
|
||||
<el-dialog title="兑换券列表" :visible.sync="dialogTableVisibledh">
|
||||
<div style="display: flex;align-items: center; margin-bottom: 20px ">
|
||||
<el-input v-model="duihuanquan.name" placeholder="兑换券名称"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="getlistExchange" >搜索</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="tableDatadh"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="卡券名称"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券类型"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type == 0" >油品券</span>
|
||||
<span v-if="scope.row.type == 1" >商品券</span>
|
||||
<span v-if="scope.row.type == 2" >通用券</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="使用说明"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.useInstructions}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="有效期(天)"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.validity}}天 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="Favorabledata(scope.row)"
|
||||
>选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div><pagination
|
||||
v-show="dtotal>0"
|
||||
:total="dtotal"
|
||||
:page.sync="duihuanquan.pageNum"
|
||||
:limit.sync="duihuanquan.pageSize"
|
||||
@pagination="getlistExchange"
|
||||
/></div>
|
||||
</el-dialog>
|
||||
<!-- 实物列表-->
|
||||
<el-dialog title="实物列表" :visible.sync="dialogTableVisiblesw">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-form-item label="选择商品">
|
||||
<el-select v-model="shopdata.goodsId" placeholder="请选择商品" @change="swchange">
|
||||
<el-option :label="item.name" :value="item" v-for="(item,index) in tableDatasw" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品数量" prop="nmb" >
|
||||
<el-input-number v-model="shopdata.count" controls-position="right" :min="1" :max="9999"></el-input-number>
|
||||
|
||||
</el-form-item>
|
||||
<el-button
|
||||
|
||||
type="primary"
|
||||
@click="shwdata()"
|
||||
>确定</el-button>
|
||||
|
||||
</el-form>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getoiltype,getoilName, listActiveConsumption,listExchange,listLJGoods, getActiveConsumption, delActiveConsumption, addActiveConsumption, updateActiveConsumption,listFavorable } from "@/api/EventMarketing/activeConsumption";
|
||||
import {issueCardFavorable,getCardFavorableLists} from "@/api/EventMarketing/yijian";
|
||||
import {listUserGrade} from "@/api/staff/user/usergrade";
|
||||
|
||||
export default {
|
||||
name: "ActiveConsumption",
|
||||
data() {
|
||||
return {
|
||||
options:[
|
||||
{
|
||||
value: 0,
|
||||
label: '未使用'
|
||||
}, {
|
||||
value: 1,
|
||||
label: '已使用'
|
||||
},
|
||||
],
|
||||
labelPosition:'left',
|
||||
userGradeList:[],
|
||||
pdidlist:[],//判断优惠券id
|
||||
pddhidlist:[],//判断兑换券id
|
||||
pdswidlist:[],//判断实物id
|
||||
dialogTableVisible:false,//优惠券
|
||||
dialogTableVisibledh:false,//兑换券
|
||||
dialogTableVisiblesw:false,//实物
|
||||
tableData: [],//优惠券
|
||||
tableDatadh:[],//兑换券
|
||||
tableDatasw:[],//实物
|
||||
tableDatas:[],//公共选择区域
|
||||
//请求优惠券列表时的参数
|
||||
youhuiquan:{
|
||||
name:'',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
ytotal:0,
|
||||
//请求兑换券列表时的参数
|
||||
duihuanquan:{
|
||||
name:'',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
total:0
|
||||
},
|
||||
dtotal:0,
|
||||
//请求实物列表时的参数
|
||||
shiwu:{
|
||||
isRecovery:0,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
stotal:0,
|
||||
shopdata:{
|
||||
goodsId:'',
|
||||
count:0,
|
||||
},
|
||||
oillist:['92#','95#','98#','0#','-10#','LNG','CNG','京92#','京95#','京0#',],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 消费有礼活动表格数据
|
||||
activeConsumptionList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
listFavorable:{
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
listFavorablesw:{
|
||||
isRecovery:0,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
chainStorId: null,
|
||||
storeId: null,
|
||||
name: null,
|
||||
participationConditionMoney: null,
|
||||
activeStartTime: null,
|
||||
activeEndTime: null,
|
||||
adaptOil: [],
|
||||
adaptUserType: null,
|
||||
memberType: null,
|
||||
dieselUserLevel: null,
|
||||
gasolineUserLevel: null,
|
||||
naturalUserLevel: null,
|
||||
paymentType: null,
|
||||
participationCondition: null,
|
||||
participationAcount: null,
|
||||
limitAcount: null,
|
||||
activeGift: [],
|
||||
points: null,
|
||||
status: null,
|
||||
isonline: null,
|
||||
},
|
||||
status:null,
|
||||
// 表单参数
|
||||
form: {
|
||||
|
||||
|
||||
|
||||
},
|
||||
cardFavorableIds:[],
|
||||
gradeIds:[],
|
||||
days:15,
|
||||
// 表单校验
|
||||
rules: {
|
||||
adaptOil: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
participationConditionMoney: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
activeStartTime: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
activeEndTime: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
adaptUserType: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], dieselUserLevel: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], gasolineUserLevel: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], naturalUserLevel: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], participationCondition: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], participationAcount: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], limitAcount: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], activeGift: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
isonline: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
points: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
activeConsumptionChildList: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
this.getoilName()
|
||||
this.listUserGrade()
|
||||
},
|
||||
methods: {
|
||||
indexMethod(index) {
|
||||
return index * 2;
|
||||
},
|
||||
/** 查询消费有礼活动列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
let data = {
|
||||
status:this.status
|
||||
}
|
||||
getCardFavorableLists(data).then(response => {
|
||||
this.activeConsumptionList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
console.log(response)
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
listUserGrade(){
|
||||
listUserGrade().then(res=>{
|
||||
if(res.code == 200){
|
||||
this.userGradeList = res.data.records
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 查询油类
|
||||
getoiltypeliet(){
|
||||
getoiltype().then(res=>{
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
//
|
||||
getoilName(){
|
||||
getoilName().then(res=>{
|
||||
console.log(res)
|
||||
this.oillist = res.data
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
swchange(e){
|
||||
console.log(this.shopdata)
|
||||
},
|
||||
// 请求实物
|
||||
getlistLJGoods(){
|
||||
this.tableDatasw = []
|
||||
listLJGoods(this.shiwu).then(res=>{
|
||||
if(res.code==200){
|
||||
console.log( res)
|
||||
this.dialogTableVisiblesw = true
|
||||
this.tableDatasw = res.data.records
|
||||
this.stotal = res.data.total
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
// 请求兑换券
|
||||
getlistExchange(){
|
||||
this.tableDatadh = []
|
||||
listExchange(this.duihuanquan).then(res=>{
|
||||
if(res.code==200){
|
||||
this.dialogTableVisibledh = true
|
||||
this.tableDatadh = res.data.records
|
||||
this.dtotal = res.data.total
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
// 请求优惠券
|
||||
getlistFavorable(){
|
||||
this.tableData = []
|
||||
listFavorable(this.youhuiquan).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.dialogTableVisible = true
|
||||
this.tableData = res.data.records
|
||||
this.ytotal = res.data.total
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 实物选择处理
|
||||
shwdata(){
|
||||
this.dialogTableVisiblesw = false
|
||||
if(this.pdswidlist.indexOf( this.shopdata.goodsId.id)>-1 ){
|
||||
this.$message.error("该商品已存在")
|
||||
return
|
||||
}
|
||||
this.pdswidlist.push( this.shopdata.goodsId.id,)
|
||||
let data = {
|
||||
activeGift: 4,
|
||||
goodsIds : this.shopdata.goodsId.id,
|
||||
goodsName: this.shopdata.goodsId.name,
|
||||
|
||||
goodsTotal:this.shopdata.count
|
||||
}
|
||||
this.form.shiwudata.push(data)
|
||||
|
||||
console.log( this.form.shiwudata)
|
||||
this.shopdata = []
|
||||
},
|
||||
// 兑换券券列表选择
|
||||
Favorabledata(row){
|
||||
this.dialogTableVisibledh = false
|
||||
if(this.pddhidlist.indexOf(row.id)>-1 ){
|
||||
this.$message.error("该兑换卡券已存在")
|
||||
return
|
||||
}
|
||||
|
||||
this.pddhidlist.push(row.id)
|
||||
console.log(row)
|
||||
let data ={
|
||||
activeGift: 2, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
|
||||
goodsIds: "", //商品id
|
||||
goodsName:"" , //商品名称
|
||||
goodsTotal: "", //商品数量
|
||||
vouchersId:row.id, //券id
|
||||
giftCardName:row.name, //赠送卡券名称
|
||||
giftCardType: row.type, //券类型
|
||||
validityZero: null,
|
||||
validityOne: null,
|
||||
validityTwo:null,
|
||||
validity:row.validity,
|
||||
giftCardDetail: row.useInstructions , //券详情
|
||||
giftCardTime: row.validity, //券有效期
|
||||
giftCardTotal: 1 //券数量
|
||||
}
|
||||
|
||||
this.tableDatas.push(data)
|
||||
this.$message.success("新增成功")
|
||||
},
|
||||
// 优惠券列表选择
|
||||
chosedata(row){
|
||||
this.dialogTableVisible = false
|
||||
|
||||
|
||||
if( this.cardFavorableIds.indexOf(row.id)>-1 ){
|
||||
this.$message.error("该优惠卡券已存在")
|
||||
return
|
||||
}
|
||||
console.log(this.cardFavorableIds)
|
||||
this.cardFavorableIds.push(row.id)
|
||||
let data ={
|
||||
activeGift: 1, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
|
||||
goodsIds: "", //商品id
|
||||
goodsName:"" , //商品名称
|
||||
goodsTotal: "", //商品数量
|
||||
vouchersId:row.id, //券id
|
||||
giftCardName:row.name, //赠送卡券名称
|
||||
giftCardType: row.type, //券类型
|
||||
timeType: row.timeType,
|
||||
validityZero: row.validityZero,
|
||||
validityOne: row.validityOne,
|
||||
validityTwo:row.validityTwo,
|
||||
giftCardDetail: "满"+ row.satisfiedAmount+"减 "+row.discountAmount+"元" , //券详情
|
||||
giftCardTime: "", //券有效期
|
||||
giftCardTotal: 1//券数量
|
||||
}
|
||||
|
||||
this.form.tableDatas.push(data)
|
||||
|
||||
this.$message.success("新增成功")
|
||||
|
||||
},
|
||||
// 优惠券删除
|
||||
deletedata(row){
|
||||
if(this.form.tableDatas&&this.form.tableDatas.length>0){
|
||||
let delIdx=-1;
|
||||
for ( let item of this.form.tableDatas) {
|
||||
delIdx++;
|
||||
if (item.id===row.id){
|
||||
break
|
||||
}
|
||||
}
|
||||
this.pdidlist.splice(delIdx,1);
|
||||
this.cardFavorableIds.splice(delIdx,1);
|
||||
this.form.tableDatas.splice(delIdx,1);
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 兑换券删除
|
||||
deletedhdata(row){
|
||||
if(this.tableDatas&&this.tableDatas.length>0){
|
||||
let delIdx=-1;
|
||||
for ( let item of this.tableDatas) {
|
||||
delIdx++;
|
||||
if (item.id===row.id){
|
||||
break
|
||||
}
|
||||
}
|
||||
this.pddhidlist.splice(delIdx,1);
|
||||
this.tableDatas.splice(delIdx,1);
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 实物删除
|
||||
deleteswdata(row){
|
||||
|
||||
if( this.form.shiwudata&& this.form.shiwudata.length>0){
|
||||
let delIdx=-1;
|
||||
for ( let item of this.form.shiwudata) {
|
||||
delIdx++;
|
||||
if (item.id===row.id){
|
||||
break
|
||||
}
|
||||
}
|
||||
this.pdswidlist.splice(delIdx,1);
|
||||
this.form.shiwudata.splice(delIdx,1);
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.pdswidlist = []
|
||||
this.form.shiwudata= []
|
||||
this.pddhidlist= []
|
||||
this.tableDatas= []
|
||||
this.pdidlist= []
|
||||
this.cardFavorableIds= []
|
||||
this.form.tableDatas= []
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
chainStorId: null,
|
||||
storeId: null,
|
||||
name: null,
|
||||
participationConditionMoney: null,
|
||||
activeStartTime: null,
|
||||
activeEndTime: null,
|
||||
adaptOil: [],
|
||||
adaptUserType: '0',
|
||||
memberType: null,
|
||||
dieselUserLevel: [],
|
||||
gasolineUserLevel: [],
|
||||
naturalUserLevel: [],
|
||||
paymentType: null,
|
||||
participationCondition: null,
|
||||
participationAcount: null,
|
||||
limitAcount: null,
|
||||
activeGift: [],
|
||||
points: null,
|
||||
status: 0,
|
||||
isonline: 0,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
tableDatas:[],
|
||||
shiwudata:[],
|
||||
updateTime: null,
|
||||
activeConsumptionChildList:[]
|
||||
};
|
||||
this.pdswidlist = []
|
||||
this.form.shiwudata= []
|
||||
this.pddhidlist= []
|
||||
this.tableDatas= []
|
||||
this.pdidlist= []
|
||||
this.form.tableDatas= []
|
||||
this.cardFavorableIds = []
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加一键发券";
|
||||
},
|
||||
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getActiveConsumption(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
|
||||
this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
|
||||
this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4')
|
||||
this.open = true;
|
||||
this.title = "修改一键发券";
|
||||
});
|
||||
},
|
||||
handleDeletexia(row){
|
||||
getActiveConsumption(row.id).then(response => {
|
||||
// this.form = response.data;
|
||||
let data = response.data
|
||||
data.isonline = 1
|
||||
updateActiveConsumption(data).then(response => {
|
||||
this.$modal.msgSuccess("下线成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
qiyong(row){
|
||||
if(row.isonline == 1){
|
||||
this.$message.error("下线不可进行操作")
|
||||
return
|
||||
}
|
||||
getActiveConsumption(row.id).then(response => {
|
||||
// this.form = response.data;
|
||||
let data = response.data
|
||||
data.status = 1
|
||||
updateActiveConsumption(data).then(response => {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
jinyong(row){
|
||||
if(row.isonline == 1){
|
||||
this.$message.error("下线不可进行操作")
|
||||
return
|
||||
}
|
||||
getActiveConsumption(row.id).then(response => {
|
||||
// this.form = response.data;
|
||||
let data = response.data
|
||||
data.status = 0
|
||||
updateActiveConsumption(data).then(response => {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
|
||||
this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
|
||||
console.log(this.form.activeConsumptionChildList)
|
||||
let data = {
|
||||
cardFavorableIds : this.cardFavorableIds,
|
||||
gradeIds:this.gradeIds,
|
||||
days:this.days
|
||||
|
||||
}
|
||||
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
issueCardFavorable(data).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList()
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delActiveConsumption(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('business/marketingActivity/activeConsumption/export', {
|
||||
...this.queryParams
|
||||
}, `activeConsumption_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.box-bt{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
@ -202,9 +202,9 @@
|
||||
<div>{{ scope.row.consumeNum ? scope.row.consumeNum : '0' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="注册时间" align="center" width="160" prop="createTime">
|
||||
<el-table-column label="注册时间" align="center" width="160" prop="balCreateTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
<span>{{ parseTime(scope.row.balCreateTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
|
@ -277,6 +277,14 @@
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<br/>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content">可设置当前员工是否有油品/商品入库、盘点、审核废止等权限</div>
|
||||
<span>可设置当前员工是否有...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -141,7 +141,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="角色组" prop="role">
|
||||
<el-form-item label="角色组" prop="roleId">
|
||||
<el-select v-model="form.roleId" placeholder="请选择角色" style="width: 270px">
|
||||
<el-option label="油站站长" :value="12+''" ></el-option>
|
||||
<el-option label="加油员" :value="15+''" ></el-option>
|
||||
@ -320,7 +320,7 @@
|
||||
{ required: true, message: "手机号不能为空", trigger: "blur" },
|
||||
{ min: 11, max: 20, message: '手机号长度必须11', trigger: 'blur' }
|
||||
],
|
||||
role: [
|
||||
roleId: [
|
||||
{ required: true, message: "请选择员工角色", trigger: "blur" }
|
||||
],
|
||||
isRefuel: [
|
||||
|
@ -49,8 +49,8 @@ public class Const {
|
||||
public static String NOTIFY_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbBAl3xSB7YeUnze4yYZmnTeT7OtXZr0sP10TsDVRH2SY/VEjgS9KPmHMmVeKZT3+6xKsUvulgVyie46GGtZPrnoh+glF1gzsYAXJ7dvR/R5nYO5VvfwK/ChPFTiKhbTtO4OKtchgBZuqCbsemG+gFIiVJo37dY0Kg0zISmFHdOQIDAQAB";
|
||||
|
||||
//异步通知(回调地址)
|
||||
public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
// public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
// public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
|
||||
//下单
|
||||
public static String fuiou_21_url = "https://fundwx.fuiou.com/preCreate";
|
||||
|
@ -110,6 +110,10 @@ public class LJGoods extends BaseEntity implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty("是否在回收站:0不在回收站,1在回收站")
|
||||
private String isRecovery;
|
||||
/**
|
||||
* 是否删除:0未删除,1已删除
|
||||
*/
|
||||
private String ifDelete;
|
||||
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,10 @@ public class StockStatistic extends BaseEntity implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty("成本金额")
|
||||
private Double costAmount;
|
||||
/**
|
||||
* 是否删除:0未删除,1已删除
|
||||
*/
|
||||
private String ifDelete;
|
||||
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
<select id="selectLJGoodsList" resultType="com.fuint.business.convenienceSore.entity.LJGoods">
|
||||
<include refid="selectLJGoods"></include>
|
||||
<where>
|
||||
store_id = #{goods.storeId} and is_recovery = #{goods.isRecovery}
|
||||
store_id = #{goods.storeId} and is_recovery = #{goods.isRecovery} and if_delete = '0'
|
||||
<if test="goods.cvsGoodId != null and goods.cvsGoodId != ''">
|
||||
and cvs_good_id = #{goods.cvsGoodId}
|
||||
</if>
|
||||
@ -44,7 +44,7 @@
|
||||
<update id="subtractGoodesStockByLock">
|
||||
update mt_goods set
|
||||
stock = stock - #{stock}
|
||||
where id = #{id}
|
||||
where id = #{id} and if_delete = '0'
|
||||
|
||||
</update>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
<select id="selectStockList" resultType="com.fuint.business.convenienceSore.vo.StockStatisticVo">
|
||||
<include refid="selectStock"></include>
|
||||
<where>
|
||||
st.store_id = #{stock.storeId}
|
||||
st.store_id = #{stock.storeId} and if_delete = '0'
|
||||
<if test="stock.cvsGoodId != null and stock.cvsGoodId != ''">
|
||||
and st.cvs_good_id = #{stock.cvsGoodId}
|
||||
</if>
|
||||
@ -39,14 +39,14 @@
|
||||
parameterType="java.lang.Integer">
|
||||
<include refid="selectStock"></include>
|
||||
<where>
|
||||
st.id = #{id}
|
||||
st.id = #{id} and if_delete = '0'
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectStocks" resultType="com.fuint.business.convenienceSore.vo.StockStatisticVo"
|
||||
parameterType="java.lang.Integer">
|
||||
<include refid="selectStock"></include>
|
||||
<where>
|
||||
st.store_id = #{stock.storeId}
|
||||
st.store_id = #{stock.storeId} and if_delete = '0'
|
||||
<if test="stock.cvsGoodId != null and stock.cvsGoodId != ''">
|
||||
and st.cvs_good_id = #{stock.cvsGoodId}
|
||||
</if>
|
||||
|
@ -66,6 +66,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("is_recovery",0);
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
List list = baseMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
@ -77,7 +78,10 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
*/
|
||||
@Override
|
||||
public LJGoods selectLJGoodsById(int id) {
|
||||
return baseMapper.selectById(id);
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("id",id);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -92,6 +96,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("goods_no",goodsNo);
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
LJGoods ljGoods = baseMapper.selectOne(queryWrapper);
|
||||
return ljGoods;
|
||||
}
|
||||
@ -142,8 +147,12 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
*/
|
||||
@Override
|
||||
public void deleteLJGoodsById(Integer id) {
|
||||
baseMapper.deleteById(id);
|
||||
stockService.deleteStock(id);
|
||||
LJGoods ljGoods = baseMapper.selectById(id);
|
||||
if (ObjectUtil.isNotEmpty(ljGoods)){
|
||||
ljGoods.setIfDelete("1");
|
||||
baseMapper.updateById(ljGoods);
|
||||
stockService.deleteStock(id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -153,6 +162,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
*/
|
||||
@Override
|
||||
public int insertLJGoods(LJGoods goods) {
|
||||
goods.setIfDelete("0");
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
goods.setStoreId(storeId);
|
||||
@ -165,6 +175,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
stock.setSupplierId(goods.getSupplierId());
|
||||
Double costAmount = goods.getBuyingPrice()*goods.getStock();
|
||||
stock.setCostAmount(costAmount);
|
||||
stock.setIfDelete("0");
|
||||
stockService.insertStock(stock);
|
||||
// 查询插入的库存统计信息
|
||||
StockStatistic stockStatistic = stockService.selectStockByGoodsId(goods.getId());
|
||||
@ -267,7 +278,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
RedisLock redisLock;
|
||||
/**
|
||||
* 减少商品库存
|
||||
* @param goods
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.convenienceSore.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -66,6 +67,7 @@ public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper,
|
||||
public StockStatistic selectStockByGoodsId(int goodsId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("goods_id",goodsId);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
StockStatistic stockStatistic = baseMapper.selectOne(queryWrapper);
|
||||
return stockStatistic;
|
||||
}
|
||||
@ -77,6 +79,7 @@ public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper,
|
||||
*/
|
||||
@Override
|
||||
public int insertStock(StockStatistic stock) {
|
||||
stock.setIfDelete("0");
|
||||
int row = baseMapper.insert(stock);
|
||||
return row;
|
||||
}
|
||||
@ -90,7 +93,11 @@ public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper,
|
||||
public void deleteStock(Integer goodsId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("goods_id",goodsId);
|
||||
baseMapper.delete(queryWrapper);
|
||||
StockStatistic stockStatistic = baseMapper.selectOne(queryWrapper);
|
||||
if (ObjectUtil.isNotEmpty(stockStatistic)){
|
||||
stockStatistic.setIfDelete("1");
|
||||
baseMapper.updateById(stockStatistic);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -124,14 +124,16 @@ public class CardExchangeRecordServiceImpl extends ServiceImpl<CardExchangeRecor
|
||||
@Override
|
||||
public boolean addCardExchangeRecord(CardExchangeRecord cardExchangeRecord) {
|
||||
CardExchange cardExchange = cardExchangeService.getById(cardExchangeRecord.getCardExchangeId());
|
||||
cardExchangeRecord.setExchangeName(cardExchange.getName());
|
||||
cardExchangeRecord.setGiftName(cardExchange.getGiftName());
|
||||
cardExchangeRecord.setDescription(cardExchange.getUseInstructions());
|
||||
cardExchangeRecord.setStartTime(new Date());
|
||||
LocalDate today = LocalDate.now();
|
||||
LocalDate localDate = today.plusDays(cardExchange.getValidity());
|
||||
Date from = Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
||||
cardExchangeRecord.setOutTime(from);
|
||||
if (ObjectUtils.isNotEmpty(cardExchange)){
|
||||
cardExchangeRecord.setExchangeName(cardExchange.getName());
|
||||
cardExchangeRecord.setGiftName(cardExchange.getGiftName());
|
||||
cardExchangeRecord.setDescription(cardExchange.getUseInstructions());
|
||||
cardExchangeRecord.setStartTime(new Date());
|
||||
LocalDate today = LocalDate.now();
|
||||
LocalDate localDate = today.plusDays(cardExchange.getValidity());
|
||||
Date from = Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
||||
cardExchangeRecord.setOutTime(from);
|
||||
}
|
||||
return save(cardExchangeRecord);
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@
|
||||
left join card_favorable cf ON cfr.card_favorable_id = cf.id
|
||||
left join mt_store ms on ms.id = cfr.store_id
|
||||
<where>
|
||||
cfr.exchange_from = "店铺一键送券"
|
||||
cfr.exchange_from = "店铺一键送券!"
|
||||
<if test="cardFavorableRecord.storeId != null">
|
||||
and cf.store_id = #{cardFavorableRecord.storeId}
|
||||
</if>
|
||||
|
@ -818,7 +818,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
cardBalanceChange.setStoreId(cardValueOrders.getStoreId());
|
||||
cardBalanceChange.setChainStoreId(cardValueOrders.getChainStoreId());
|
||||
cardBalanceChange.setChangeType("1");
|
||||
cardBalanceChange.setFromType("储值卡充值");
|
||||
cardBalanceChange.setFromType("储值卡充值"+cardValueOrders.getAmount()+"元!");
|
||||
cardBalanceChange.setBalance(cardValueOrders.getAmount());
|
||||
cardBalanceChange.setAfterTheChange(afterBalance);
|
||||
cardBalanceChange.setOrderNo(cardValueOrders.getOrderNo());
|
||||
|
@ -9,6 +9,7 @@ import com.fuint.business.order.entity.OilOrder;
|
||||
import com.fuint.business.order.vo.OilOrderVo;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -18,6 +19,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 油品订单信息 业务层
|
||||
*/
|
||||
@Transactional
|
||||
public interface OilOrderService extends IService<OilOrder> {
|
||||
/**
|
||||
* 根据条件分页查询油品订单信息
|
||||
|
@ -60,6 +60,7 @@ import com.fuint.system.config.service.SysConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -1057,7 +1058,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// 未使用囤油卡
|
||||
// 校验支付金额和优惠金额数据是否相同
|
||||
Double realAmount = Double.valueOf(map.get("payAmount")) + Double.valueOf(balanceAmount) + Double.valueOf(map.get("discountAmount"));
|
||||
if (Double.compare(realAmount,oilOrder.getOrderAmount())!=0){
|
||||
// if (Double.compare(realAmount,oilOrder.getOrderAmount())!=0){
|
||||
if (-0.03>=(realAmount-oilOrder.getOrderAmount()) && (realAmount-oilOrder.getOrderAmount())>=0.03){
|
||||
applet.put("error","消费总金额不对!");
|
||||
this.insertAllOrderInfo(orderNo,oilOrder.getStoreId(),oilOrder.getOrderAmount(),0.0, oilOrder.getPayType(), userId,oilOrder.getPayType(),"1","payFail");
|
||||
result = true;
|
||||
@ -1132,10 +1134,19 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// 修改订单的优惠金额和支付金额
|
||||
oilOrder.setDiscountAmount(Double.valueOf(discountAmount));
|
||||
oilOrder.setPayAmount(payAmount);
|
||||
oilOrder.setActiveId(Integer.valueOf(activeId));
|
||||
oilOrder.setCouponId(Integer.valueOf(cardFavorableId));
|
||||
oilOrder.setActiveType(type);
|
||||
if (StringUtils.isNotEmpty(activeId)){
|
||||
oilOrder.setActiveId(Integer.valueOf(activeId));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(cardFavorableId)) {
|
||||
oilOrder.setCouponId(Integer.valueOf(cardFavorableId));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(type)) {
|
||||
oilOrder.setActiveType(type);
|
||||
}
|
||||
this.updateOilOrder(oilOrder);
|
||||
if (oilOrder.getOrderStatus().equals("paid")) {
|
||||
this.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getActiveId(), oilOrder.getCouponId(), oilOrder.getActiveType(), oilOrder.getOrderAmount(), Integer.valueOf(oilOrder.getOils()));
|
||||
}
|
||||
|
||||
return applet;
|
||||
}
|
||||
@ -1194,6 +1205,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
this.updateGrowthValue(oilOrder.getOrderAmount(),oilOrder.getPayAmount(),userId, Integer.valueOf(oilOrder.getOils()),null,oilOrder.getStoreId(),orderNo);
|
||||
this.addOilTracks(oilOrder,oilOrder.getStoreId());
|
||||
this.updateCardAndActiveById(oilOrder.getStoreId(),oilOrder.getUserId(),oilOrder.getActiveId(),oilOrder.getCouponId(),oilOrder.getActiveType(),oilOrder.getOrderAmount(), Integer.valueOf(oilOrder.getOils()));
|
||||
this.insertCardBalance(oilOrder.getOrderAmount()-oilOrder.getDiscountAmount()-oilOrder.getPayAmount(),userId,oilOrder.getStoreId(),orderNo);
|
||||
staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(),oilOrder.getOilNum(),"1",orderNo);
|
||||
}
|
||||
@ -1382,17 +1394,6 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
userBalanceService.updateUserBalance(balance);
|
||||
|
||||
this.insertGrowthValueChange(userid,storeId,addGrowthVal,growthAfter,orderNo);
|
||||
|
||||
// CardBalanceChange cardBalanceChange = new CardBalanceChange();
|
||||
//// 添加余额记录信息
|
||||
// cardBalanceChange.setUserId(userid);
|
||||
// cardBalanceChange.setChangeType("0");
|
||||
// cardBalanceChange.setFromType("油品订单消费");
|
||||
// cardBalanceChange.setBalance(oilAmount - oilActualPay);
|
||||
// cardBalanceChange.setOrderNo(orderNo);
|
||||
// cardBalanceChange.setStoreId(storeId);
|
||||
//
|
||||
// cardBalanceChangeService.insertCardBalance(cardBalanceChange);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1402,15 +1403,20 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
* @param userId
|
||||
* @param storeId
|
||||
*/
|
||||
private void insertCardBalance(Double amount,Integer userId,Integer storeId,String orderNo){
|
||||
private boolean insertCardBalance(Double amount,Integer userId,Integer storeId,String orderNo){
|
||||
CardBalanceChange cardBalanceChange = new CardBalanceChange();
|
||||
// 根据用户id查询用户余额信息
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
UserBalance balance = userBalanceService.selectUserBalance(userId,store.getChainStoreId());
|
||||
boolean result = false;
|
||||
if (ObjectUtil.isNotEmpty(balance)){
|
||||
// 修改余额信息
|
||||
Double beforeBalance = balance.getCardBalance();
|
||||
Double afterBalance = beforeBalance - amount;
|
||||
if ((beforeBalance - amount)<0.0){
|
||||
result = true;
|
||||
return false;
|
||||
}
|
||||
cardBalanceChange.setAfterTheChange(afterBalance);
|
||||
balance.setCardBalance(afterBalance);
|
||||
// 修改加油次数
|
||||
@ -1428,6 +1434,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cardBalanceChange.setStoreId(storeId);
|
||||
|
||||
cardBalanceChangeService.insertCardBalance(cardBalanceChange);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void insertGrowthValueChange(Integer userId,Integer storeId,Integer growthValue,Integer growthValueAfter,String orderNo){
|
||||
|
@ -10,7 +10,7 @@
|
||||
</sql>
|
||||
<sql id="selectUserAndBalance">
|
||||
select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money,
|
||||
mub.second_card,mub.fixing_level
|
||||
mub.second_card,mub.fixing_level,mub.create_time balCreateTime
|
||||
FROM mt_user mu
|
||||
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
|
||||
</sql>
|
||||
@ -60,10 +60,10 @@
|
||||
and mub.card_balance != 0
|
||||
</if>
|
||||
<if test="user.params.beginTime != null and user.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(mu.create_time,'%y%m%d') >= date_format(#{user.params.beginTime},'%y%m%d')
|
||||
and date_format(mub.balCreateTime,'%y%m%d') >= date_format(#{user.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="user.params.endTime != null and user.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(mu.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
|
||||
and date_format(mub.balCreateTime,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY mu.id
|
||||
@ -86,7 +86,7 @@
|
||||
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
|
||||
left join oil_order oo on mu.id = oo.user_id
|
||||
<where>
|
||||
oo.create_time <= DATE_SUB(NOW(), INTERVAL #{days} DAY)
|
||||
oo.create_time <= DATE_SUB(NOW(), INTERVAL ${user.days} DAY)
|
||||
<if test="user.chainStoreId != null and user.chainStoreId != ''">
|
||||
and mub.chain_store_id = #{user.chainStoreId}
|
||||
</if>
|
||||
|
@ -2,11 +2,13 @@ package com.fuint.business.userManager.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fuint.business.userManager.util.GenderConverter;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@ -114,4 +116,9 @@ public class LJUserVo extends BaseEntity {
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
private Integer days;
|
||||
/**
|
||||
* 注册时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
private Date balCreateTime;
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.0 MiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 MiB |
@ -143,7 +143,7 @@
|
||||
储值卡
|
||||
<span>(账户余额:{{ balance }}元)</span>
|
||||
</div>
|
||||
<div>-¥{{ consumeAmount }}</div>
|
||||
<div>-¥{{ consumeAmount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember && couponDiscount.length>0">
|
||||
<div>
|
||||
@ -783,7 +783,7 @@
|
||||
</div>
|
||||
<div class="input-box" v-if="isMember">
|
||||
<div>储值卡或囤油卡付款</div>
|
||||
<div>¥{{ consumeAmount }}</div>
|
||||
<div>¥{{ consumeAmount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
@ -1134,6 +1134,15 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
dialogVisiblej(newValue) {
|
||||
if (!newValue) {
|
||||
this.handClose()
|
||||
this.resetting1()
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async printLocally() {
|
||||
//初始化打印函数
|
||||
@ -1840,7 +1849,6 @@
|
||||
|
||||
getPaymentActive(_this.paymentActive).then(res => {
|
||||
item.activeId = res.data.activeId
|
||||
item.cardFavorableId = res.data.cardFavorableId
|
||||
item.type = res.data.type
|
||||
let discount = {type:"",discount:0,oilName:item.oilName,gunName:item.gunName}
|
||||
let oilData = {oilName:item.oilName,oilPreferential: {}}
|
||||
@ -2529,6 +2537,7 @@
|
||||
this.map.refuelMoney = JSON.stringify(this.refuelMoney)
|
||||
this.map.couponId = this.useCouponIds
|
||||
this.map.staffId = this.staff.id
|
||||
this.map.cardFavorableId = this.cardFavorableId
|
||||
|
||||
let _this = this;
|
||||
if (this.payType=="APPLET_CODE"){
|
||||
@ -2541,8 +2550,8 @@
|
||||
this.loading = true;
|
||||
setTimeout(function (){
|
||||
_this.loading = false;
|
||||
_this.isPay = true;
|
||||
_this.isPaySuccess = true;
|
||||
_this.isPay = true;
|
||||
_this.printLocally()
|
||||
_this.resetting1();
|
||||
},3000)
|
||||
@ -2550,8 +2559,8 @@
|
||||
this.loading = true;
|
||||
setTimeout(function (){
|
||||
_this.loading = false;
|
||||
_this.isPay = true;
|
||||
_this.isPaySuccess = false;
|
||||
_this.isPay = true;
|
||||
_this.resetting1();
|
||||
this.$modal.msgError(resp.data.error)
|
||||
},3000)
|
||||
@ -2565,7 +2574,6 @@
|
||||
await addLJGoods(_this.map).then( response => {
|
||||
_this.orderNo = response.data.orderNo;
|
||||
if (response.data.oilOrder!=null){
|
||||
console.log(123,response.data.oilOrder)
|
||||
if (response.data.oilOrder.orderStatus == "paid"){
|
||||
_this.isPaySuccess = true;
|
||||
isPaySuccess = true
|
||||
@ -2710,7 +2718,6 @@
|
||||
cashierOrderByOrderNo({orderNo:_this.orderNo}).then( response => {
|
||||
if (response.data){
|
||||
if (response.data.status == "paid"){
|
||||
this.$modal.msgError(418)
|
||||
_this.isPay = true;
|
||||
_this.isPaySuccess = true;
|
||||
_this.isQuery = false;
|
||||
@ -2742,18 +2749,18 @@
|
||||
}
|
||||
if (response.data.status == "unpaid"){
|
||||
_this.isQuery = true;
|
||||
_this.dialogVisiblejLoading = true
|
||||
}
|
||||
}
|
||||
_this.resetting1();
|
||||
// _this.resetting1();
|
||||
})
|
||||
},500)
|
||||
},1000)
|
||||
|
||||
// 如果是为支付状态15后打开去订单页查询的接口
|
||||
if (_this.isQuery){
|
||||
setTimeout(function () {
|
||||
_this.dialogVisiblejLoading = true
|
||||
},15000)
|
||||
}
|
||||
// if (_this.isQuery){
|
||||
// setTimeout(function () {
|
||||
// },10000)
|
||||
// }
|
||||
|
||||
let timer2 = setInterval(function () {
|
||||
if (!_this.isQuery || !_this.dialogVisiblej) {
|
||||
@ -2764,7 +2771,7 @@
|
||||
clearTimeout(timer3);
|
||||
|
||||
}
|
||||
}, 500)
|
||||
}, 1000)
|
||||
|
||||
var timer3 = setTimeout(function () {
|
||||
clearInterval(timer2);
|
||||
|
@ -135,6 +135,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="会员名称"> </el-table-column>
|
||||
<el-table-column prop="bidBalance" label="储值卡面值"> </el-table-column>
|
||||
<el-table-column prop="amount" label="自定义充值金额"> </el-table-column>
|
||||
<el-table-column prop="rechargeBalance" label="储值卡实售金额"> </el-table-column>
|
||||
<el-table-column prop="giftBalance" label="储值卡赠送金额"></el-table-column>
|
||||
<el-table-column prop="paymentType" label="支付方式">
|
||||
@ -221,6 +222,36 @@
|
||||
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 支付成功后小票打印内容-->
|
||||
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
|
||||
<div class="box-title">订单统计</div>
|
||||
<div class="box-ge">
|
||||
<div class="input-box">
|
||||
<div>充值金额</div>
|
||||
<div>¥{{ oilOrder.amount ? oilOrder.amount : oilOrder.rechargeBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="oilOrder.paymentType == 'CASH'">现金</div>
|
||||
<div v-else-if="oilOrder.paymentType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="oilOrder.paymentType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="oilOrder.paymentType == 'UNIONPAY'">银联二维码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>赠送金额</div>
|
||||
<div>¥{{ oilOrder.giftBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>到账金额</div>
|
||||
<div>¥{{ oilOrder.amount ? oilOrder.giftBalance + oilOrder.amount : oilOrder.giftBalance + oilOrder.rechargeBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
<div>¥{{ oilOrder.amount ? oilOrder.amount : oilOrder.rechargeBalance }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -230,6 +261,7 @@ import {getDicts} from "@/api/dict/data";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
import {exportExcelVipApi} from "@/api/order/exportExcel";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -291,12 +323,96 @@ export default {
|
||||
|
||||
},
|
||||
|
||||
async printLocally() {
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
|
||||
},
|
||||
// 补打
|
||||
patchwork(data){
|
||||
const orderNo = data.name
|
||||
this.$modal.confirm('确定您要补打当前订单吗?当前会员[' + orderNo + '],请确保云打印机正在运行中').then(function() {
|
||||
// return delUser(row.id);
|
||||
}).then(() => {
|
||||
}).then(async () => {
|
||||
await cardValueRecordInfo(data.id).then( response => {
|
||||
this.oilOrder = response.data
|
||||
})
|
||||
this.printLocally()
|
||||
this.$modal.msgSuccess("打印指令已发送打印机,请查看打印结果");
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
@ -153,9 +153,7 @@
|
||||
shows: '',
|
||||
title: '',
|
||||
oilTypeList: '',
|
||||
columns: [
|
||||
|
||||
],
|
||||
columns: [],
|
||||
oilInfo: {
|
||||
oilName: '未添加',
|
||||
oilPrice: '0',
|
||||
@ -402,54 +400,28 @@
|
||||
})
|
||||
|
||||
|
||||
console.log("appltType", uni.getStorageSync("appltType"))
|
||||
if (uni.getStorageSync("appltType") == "WECHAT") {
|
||||
// 判断当前登录的code是否相同
|
||||
wx.login({
|
||||
success(res) {
|
||||
if (res.code) {
|
||||
//发起网络请求
|
||||
request({
|
||||
url: 'clientApi/sign/mpWxLogin2',
|
||||
method: "POST",
|
||||
data: {
|
||||
code: res.code
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('登录失败!' + res.errMsg)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else if (uni.getStorageSync("appltType") == "ALIPAY") {
|
||||
my.getAuthCode({
|
||||
scopes: 'auth_base',
|
||||
success: res => {
|
||||
const authCode = res.authCode;
|
||||
console.log(res)
|
||||
// 判断当前登录的code是否相同
|
||||
wx.login({
|
||||
success(res) {
|
||||
if (res.code) {
|
||||
//发起网络请求
|
||||
request({
|
||||
url: "clientApi/sign/alipayLogin/getUserid2",
|
||||
method: 'post',
|
||||
url: 'clientApi/sign/mpWxLogin2',
|
||||
method: "POST",
|
||||
data: {
|
||||
authCode: authCode,
|
||||
storeId: uni.getStorageSync("storeId"),
|
||||
},
|
||||
}).then((resp) => {
|
||||
code: res.code
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
console.log('my.getAuthCode 调用失败', err)
|
||||
} else {
|
||||
console.log('登录失败!' + res.errMsg)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
|
||||
@ -510,7 +482,7 @@
|
||||
|
||||
},
|
||||
}).then((response) => {
|
||||
if (response.data.store) {
|
||||
if (response.data.store){
|
||||
_this.distance = (Math.ceil(response.data.distance))
|
||||
.toFixed(1)
|
||||
_this.store = response.data.store
|
||||
@ -535,13 +507,13 @@
|
||||
}
|
||||
|
||||
_this.lon = _this.store.longitude,
|
||||
_this.lat = _this.store.latitude,
|
||||
_this.lat = _this.store.latitude,
|
||||
|
||||
_this.getIndexBanner()
|
||||
} else {
|
||||
_this.getIndexBanner()
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: "当前店铺已关闭!!!",
|
||||
icon: "none"
|
||||
title:"当前店铺已关闭!!!",
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
|
||||
@ -952,4 +924,4 @@
|
||||
color: white;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -666,7 +666,7 @@
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
height: 77%;
|
||||
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
@ -694,6 +694,7 @@
|
||||
margin-top: 5px;
|
||||
padding: 12px 0px;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.box-oil2 {
|
||||
@ -706,7 +707,7 @@
|
||||
color: #666666;
|
||||
background: white;
|
||||
margin-right: 13px;
|
||||
margin-top: 10px;
|
||||
|
||||
padding: 12px 0px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
@ -760,4 +761,4 @@
|
||||
text-align: right;
|
||||
color: #999999;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -282,79 +282,71 @@
|
||||
if (res.code === 200) {
|
||||
let _this = this
|
||||
console.log(res)
|
||||
let payProvider = "wxpay"
|
||||
_this.orderInfo = JSON.parse(res.data.reservedPayInfo);
|
||||
uni.requestPayment({
|
||||
// 微信支付provider: 'wxpay' 支付宝支付 'alipay'
|
||||
provider: payProvider,
|
||||
timeStamp: _this.orderInfo.timeStamp,
|
||||
nonceStr: _this.orderInfo.nonceStr,
|
||||
package: _this.orderInfo.package,
|
||||
signType: 'MD5',
|
||||
paySign: _this.orderInfo.paySign,
|
||||
success: function(res) {
|
||||
console.log('success:', res);
|
||||
uni.reLaunch({
|
||||
url: '/pagesRefuel/orderSuccess/index'
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
request({
|
||||
url: "/business/marketingActivity/activeExchange/cardValueOrders",
|
||||
method: 'put',
|
||||
data: {
|
||||
"orderNo": res.data.data.orderNo,
|
||||
"status": "payFail"
|
||||
},
|
||||
}).then((res) => {
|
||||
uni.showToast({
|
||||
title: "支付失败!",
|
||||
icon: "error"
|
||||
if (uni.getStorageSync("appltType") == "WECHAT") {
|
||||
let payProvider = "wxpay"
|
||||
_this.orderInfo = JSON.parse(res.data.reservedPayInfo);
|
||||
uni.requestPayment({
|
||||
// 微信支付provider: 'wxpay' 支付宝支付 'alipay'
|
||||
provider: payProvider,
|
||||
timeStamp: _this.orderInfo.timeStamp,
|
||||
nonceStr: _this.orderInfo.nonceStr,
|
||||
package: _this.orderInfo.package,
|
||||
signType: 'MD5',
|
||||
paySign: _this.orderInfo.paySign,
|
||||
success: function(res) {
|
||||
console.log('success:', res);
|
||||
uni.reLaunch({
|
||||
url: '/pagesRefuel/orderSuccess/index'
|
||||
})
|
||||
})
|
||||
console.log('fail:', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (_this.appltType == "ALIPAY") {
|
||||
my.tradePay({
|
||||
tradeNO: res.data.data.reservedTransactionId
|
||||
}, function(resp) {
|
||||
if (resp.resultCode == '9000') {
|
||||
console.log("支付成功")
|
||||
// 支付成功后调用修改使用后的优惠券情况
|
||||
/* _this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
_this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
_this.preferentialData.oilId = _this.oilOrder.oils
|
||||
_this.preferentialData.mtUserLevel = _this.user.gradeId
|
||||
request({
|
||||
url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById",
|
||||
method: 'post',
|
||||
data: _this.preferentialData,
|
||||
}).then((res)=>{
|
||||
console.log(res);
|
||||
}) */
|
||||
uni.reLaunch({
|
||||
url: '/pagesRefuel/orderSuccess/index'
|
||||
})
|
||||
} else {
|
||||
request({
|
||||
url: "/business/allOrderInfo/orderStatus",
|
||||
method: 'post',
|
||||
data: {
|
||||
"orderNo": res.data.data.orderNo,
|
||||
"status": "payFail"
|
||||
},
|
||||
}).then((res) => {
|
||||
uni.showToast({
|
||||
title: "支付失败!",
|
||||
icon: "error"
|
||||
},
|
||||
fail: function(err) {
|
||||
request({
|
||||
url: "/business/marketingActivity/activeExchange/cardValueOrders",
|
||||
method: 'put',
|
||||
data: {
|
||||
"orderNo": res.data.data.orderNo,
|
||||
"status": "payFail"
|
||||
},
|
||||
}).then((res) => {
|
||||
uni.showToast({
|
||||
title: "支付失败!",
|
||||
icon: "error"
|
||||
})
|
||||
})
|
||||
})
|
||||
console.log('支付失败,' + resp.resultCode);
|
||||
}
|
||||
});
|
||||
console.log('fail:', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (uni.getStorageSync("appltType") == "ALIPAY") {
|
||||
my.tradePay({
|
||||
tradeNO: res.data.data.reservedTransactionId
|
||||
}, function(resp) {
|
||||
if (resp.resultCode == '9000') {
|
||||
console.log("支付成功")
|
||||
uni.reLaunch({
|
||||
url: '/pagesRefuel/orderSuccess/index'
|
||||
})
|
||||
} else {
|
||||
request({
|
||||
url: "/business/allOrderInfo/orderStatus",
|
||||
method: 'post',
|
||||
data: {
|
||||
"orderNo": res.data.data.orderNo,
|
||||
"status": "payFail"
|
||||
},
|
||||
}).then((res) => {
|
||||
uni.showToast({
|
||||
title: "支付失败!",
|
||||
icon: "error"
|
||||
})
|
||||
})
|
||||
console.log('支付失败,' + resp.resultCode);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
|
@ -6,7 +6,27 @@
|
||||
<view class="my-icons"></view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="content" v-html="text">
|
||||
<view class="content">
|
||||
来个油惠小程序隐私保护指引
|
||||
本指引是来个油惠小程序开发者 "山东华夏深蓝数字科技有限公司"(以下简称“开发者”)为处理你的个人信息而制定。
|
||||
开发者处理的信息
|
||||
根据法律规定,开发者仅处理实现小程序功能所必要的信息。
|
||||
为了您能正常使用小程序,需要您进行登录,开发者将在获取你的明示同意后,收集你的手机号。
|
||||
为了获取离您最近的店铺信息,开发者将在获取你的明示同意后,收集你的位置信息。
|
||||
你的权益
|
||||
关于你的个人信息,你可以通过以下方式与开发者联系,行使查阅、复制、更正、删除等法定权利。
|
||||
若你在小程序中注册了账号,你可以通过以下方式与开发者联系,申请注销你在小程序中使用的账号。在受理你的申请后,开发者承诺在十五个工作日内完成核查和处理,并按照法律法规要求处理你的相关信息。
|
||||
电话:15288868301
|
||||
开发者对信息的存储
|
||||
开发者承诺,除法律法规另有规定外,开发者对你的信息的保存期限应当为实现处理目的所必要的最短时间。
|
||||
信息的使用规则
|
||||
开发者将会在本指引所明示的用途内使用收集的信息
|
||||
如开发者使用你的信息超出本指引目的或合理范围,开发者必须在变更使用目的或范围前,再次以电话方式告知并征得你的明示同意。
|
||||
信息对外提供
|
||||
开发者承诺,不会主动共享或转让你的信息至任何第三方,如存在确需共享或转让时,开发者应当直接征得或确认第三方征得你的单独同意。
|
||||
开发者承诺,不会对外公开披露你的信息,如必须公开披露时,开发者应当向你告知公开披露的目的、披露信息的类型及可能涉及的信息,并征得你的单独同意。
|
||||
你认为开发者未遵守上述约定,或有其他的投诉建议、或未成年人个人信息保护相关问题,可通过以下方式与开发者联系;或者向微信进行投诉。
|
||||
电话 : 15288868301
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -75,4 +95,4 @@
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -338,17 +338,15 @@
|
||||
return;
|
||||
}
|
||||
if(res.data.success == "ok"){
|
||||
_this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
_this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
_this.preferentialData.oilId = _this.oilOrder.oils
|
||||
_this.preferentialData.mtUserLevel = _this.user.gradeId
|
||||
request({
|
||||
url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById",
|
||||
method: 'post',
|
||||
data: _this.preferentialData,
|
||||
}).then((res)=>{
|
||||
console.log(res);
|
||||
})
|
||||
// _this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
// _this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
// _this.preferentialData.oilId = _this.oilOrder.oils
|
||||
// _this.preferentialData.mtUserLevel = _this.user.gradeId
|
||||
// request({
|
||||
// url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById",
|
||||
// method: 'post',
|
||||
// data: _this.preferentialData,
|
||||
// }).then((res)=>{})
|
||||
uni.reLaunch({
|
||||
url: '/pagesRefuel/orderSuccess/index'
|
||||
})
|
||||
@ -378,17 +376,17 @@
|
||||
success: function (res) {
|
||||
console.log('success');
|
||||
// 支付成功后调用修改使用后的优惠券情况
|
||||
_this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
_this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
_this.preferentialData.oilId = _this.oilOrder.oils
|
||||
_this.preferentialData.mtUserLevel = _this.user.gradeId
|
||||
request({
|
||||
url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById",
|
||||
method: 'post',
|
||||
data: _this.preferentialData,
|
||||
}).then((res)=>{
|
||||
console.log(res);
|
||||
})
|
||||
// _this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
// _this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
// _this.preferentialData.oilId = _this.oilOrder.oils
|
||||
// _this.preferentialData.mtUserLevel = _this.user.gradeId
|
||||
// request({
|
||||
// url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById",
|
||||
// method: 'post',
|
||||
// data: _this.preferentialData,
|
||||
// }).then((res)=>{
|
||||
// console.log(res);
|
||||
// })
|
||||
uni.reLaunch({
|
||||
url: '/pagesRefuel/orderSuccess/index'
|
||||
})
|
||||
@ -413,17 +411,15 @@
|
||||
if(resp.resultCode == '9000'){
|
||||
console.log("支付成功")
|
||||
// 支付成功后调用修改使用后的优惠券情况
|
||||
_this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
_this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
_this.preferentialData.oilId = _this.oilOrder.oils
|
||||
_this.preferentialData.mtUserLevel = _this.user.gradeId
|
||||
request({
|
||||
url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById",
|
||||
method: 'post',
|
||||
data: _this.preferentialData,
|
||||
}).then((res)=>{
|
||||
console.log(res);
|
||||
})
|
||||
// _this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
// _this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
// _this.preferentialData.oilId = _this.oilOrder.oils
|
||||
// _this.preferentialData.mtUserLevel = _this.user.gradeId
|
||||
// request({
|
||||
// url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById",
|
||||
// method: 'post',
|
||||
// data: _this.preferentialData,
|
||||
// }).then((res)=>{})
|
||||
uni.reLaunch({
|
||||
url: '/pagesRefuel/orderSuccess/index'
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user