Commit 9f9d0d31 by zhangmeng

修改样式

parent c1549ca6
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.bc57828df893940cd840b6feed74c2bc.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.da716d11024428d6687c.js></script><script type=text/javascript src=/marketing/static/js/app.0667d7ea246eece8f172.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.dd01d1be57c3425aadfe2e3674f95db9.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.da716d11024428d6687c.js></script><script type=text/javascript src=/marketing/static/js/app.0a088862aaf30c2bb92b.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -154,6 +154,18 @@
}
.table-name--ellipsis{
width: 90px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
white-space: normal;
}
.left-aside-contain {
/deep/ .el-submenu__title:hover {
background-color: #020b21;
......
......@@ -82,6 +82,9 @@ a:hover {
.pl20{
padding-left: 20px!important;
}
.pr4{
padding-right: 4px!important;
}
.pr5{
padding-right: 5px!important;
}
......
......@@ -27,8 +27,8 @@
.dm-upload_right .el-upload-list {
position: absolute;
top: 0px;
right: 20px;
top: -6px;
left: 100px;
}
......
......@@ -44408,6 +44408,7 @@
top: -1px;
width: 6px;
height: 6px;
background:none;
vertical-align: middle;
border-radius: 50%;
border: 1px solid #1890FF;
......@@ -44444,7 +44445,9 @@
}
.el-popover {
cursor: pointer;
}
......@@ -11,9 +11,12 @@
</el-breadcrumb>
<h3><span>{{contentTitle}}</span></h3>
</div>
<div class="layout-content">
<router-view></router-view>
<div class="layout-content__wrap">
<div class="layout-content" :class="[{'asideShow': asideShow},{'collapseFlag':asideShow && collapseFlag}]">
<router-view></router-view>
</div>
</div>
<vue-gic-footer></vue-gic-footer>
</div>
</div>
......@@ -107,6 +110,7 @@
z-index: 9;
}
&-right{
position: relative;
flex: 1;
overflow-x:auto;
transition: width 0.5s;
......@@ -114,19 +118,20 @@
-webkit-transition: width 0.5s;
-o-transition: width 0.5s;
height: 100%;
overflow-y: auto;
// overflow-y: auto;
margin-left:0px;
min-width: 1400px;
&.asideShow{
min-width: 1200px;
margin-left: 200px;
}
&.collapseFlag{
min-width: 1336px;
margin-left: 64px;
}
}
&-title{
// position: absolute;
// width: 100%;
// top:0;
// left:0;
height:85px;
background:#fff;
// box-shadow: 0 3px 5px rgba(147,165,184,.13);
......@@ -152,8 +157,22 @@
}
}
}
&-content__wrap {
overflow-y: auto;
&::-webkit-scrollbar {
display: none;
}
}
&-content {
// margin-top: 100px;
min-height: calc(100% - 200px);
min-width: 1400px;
&.asideShow{
min-width: 1200px;
}
&.collapseFlag{
min-width: 1336px;
}
}
}
.dm-breadcrumb{
......
......@@ -14,18 +14,18 @@
</el-form-item>
<el-form-item label="语音内容" v-if="!this.voiceId">
<el-upload
class="dm-upload"
class="dm-upload_right"
:action="api+'/api-marketing/upload-marketing-audiosave'"
:on-preview="handlePreview"
:data="{requestProject:'marketing'}"
:on-remove="handleRemove"
:before-remove="beforeRemove"
enctype="multipart/form-data"
:on-success="uploadSuccess"
:auto-upload="true"
:multiple="false"
:limit="1"
:on-exceed="handleExceed"
:before-upload="beforeUpload"
:file-list="fileList"
>
<el-button size="small" type="primary">上传语音</el-button>
......@@ -122,6 +122,13 @@ import { editAudioDetailService ,uploadAudioService,saveAudioService} from "@/se
this.$tips({type:'error',message:'保存语音失败'});
}
},
beforeUpload(file) {
console.log(file)
if (file.type.indexOf('audio') < 0) {
this.$tips({type:'warning',message:'格式支持mp3、wma、wav、amr,文件大小不超过30M,语音时长不超过30分钟'})
return false;
}
},
//上传相关
handleRemove(file, fileList) {
console.log(file, fileList);
......@@ -132,10 +139,10 @@ import { editAudioDetailService ,uploadAudioService,saveAudioService} from "@/se
handleExceed(files, fileList) {
this.$message.warning(`只能上传一个文件,请先移除文件`);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${ file.name }?`);
},
uploadSuccess(response,file,fileList) {
debugger
if (response.errorCode === 0) {
this.$tips({type:'success',message:'上传成功'});
this.voiceMediaId = response.result;
......
......@@ -66,7 +66,6 @@ export default {
height: 60px;
background: #b9c7db;
text-align: center;
margin-right: 10px;
i {
line-height: 60px;
color: rgba(255, 255, 255, 0.8);
......
......@@ -264,7 +264,7 @@ export default {
&>article{
flex: 100;
border: 1px solid $border-color;
border-radius: 4px;
border-radius: 2px;
min-height:640px;
.dm-ilib-header{
display: flex;
......@@ -292,7 +292,7 @@ export default {
width: 200px;
margin-right: 10px;
border: 1px solid $border-color;
border-radius: 4px;
border-radius: 2px;
h4{
height: 50px;
line-height: 50px;
......
......@@ -4,7 +4,7 @@
<el-col :span="8">
<div class="lib-video--add">
<div @click="$router.push('/wechat/temp/video/add')" >
<i class="el-icon-plus"></i><span>视频</span>
<i class="el-icon-plus"></i><span>视频</span>
</div>
</div>
</el-col>
......@@ -12,7 +12,7 @@
</el-row>
<div class="text-center" v-if="videoList.length === 0">
<img class="block block-center pt100" width="60" height="60" src="../../../assets/img/no-data_icon.png" alt="">
<el-button class="block block-center mt10" type="text" @click="$router.push('/wechat/temp/video/add')">视频</el-button>
<el-button class="block block-center mt10" type="text" @click="$router.push('/wechat/temp/video/add')">视频</el-button>
</div>
<!-- <el-pagination v-show="videoList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination> -->
</section>
......@@ -101,7 +101,7 @@ export default {
border: 1px dashed #e4e7ed;
// width: 290px;
margin-bottom: 20px;
height: 286px;
height: 310px;
overflow: hidden;
background:#fff;
cursor: pointer;
......
......@@ -15,7 +15,7 @@ import message from './modules/message'
//卡券营销
import card from './modules/card'
//新卡券营销
import giccard from './modules/giccard'
// import giccard from './modules/giccard'
//智能营销
import ecm from './modules/ecm'
//模板消息
......@@ -35,7 +35,7 @@ export default [
redirect: '/wechat/record',
children: [
card,
giccard,
// giccard,
ecm,
game,
message,
......
......@@ -20,8 +20,8 @@
<template slot-scope="scope">
<img class="vertical-middle table__avatar" :src="scope.row.clerkImage || defaultAvatar" width="60" height="60" alt="">
<div class="inline-block vertical-middle">
<p class="fz13">{{scope.row.clerkName|| '--'}}</p>
<p class="fz12 gray">{{scope.row.storeGroupName || '--'}}</p>
<p class="table-name--ellipsis">{{scope.row.clerkName|| '--'}}</p>
<p class="fz13 gray">{{scope.row.storeGroupName || '--'}}</p>
</div>
</template>
</el-table-column>
......@@ -29,8 +29,8 @@
<template slot-scope="scope">
<img class="vertical-middle table__avatar" :src="scope.row.photeUrl || defaultAvatar" width="60" height="60" alt="">
<div class="inline-block vertical-middle">
<p class="fz13">{{scope.row.name|| '--'}}</p>
<p class="fz12 gray">{{scope.row.phoneNumber || '--'}}</p>
<p class="table-name--ellipsis">{{scope.row.name|| '--'}}</p>
<p class="fz13 gray">{{scope.row.phoneNumber || '--'}}</p>
</div>
</template>
</el-table-column>
......
......@@ -11,7 +11,7 @@
<div class="dm-form__wrap">
<h3 class="dm-title__label clearfix">
<span class="card-chart__title">卡券报表趋势分析</span>
<el-date-picker class="fr ml10 mr20" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="cardTrendEchart"></el-date-picker>
<el-date-picker class="fr ml5 mr20" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="cardTrendEchart"></el-date-picker>
<el-select class="fr w200" v-model="chartParams.kpiName" placeholder="选择状态" @change="cardTrendEchart">
<el-option v-for="(v,i) in kpiNameOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</el-select>
......
......@@ -20,8 +20,8 @@
<template slot-scope="scope">
<img class="vertical-middle table__avatar" :src="scope.row.thirdImgUrl || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p>{{scope.row.memberName || '--'}}</p>
<p class="gray">{{scope.row.cardNum || '--'}}</p>
<p class="table-name--ellipsis">{{scope.row.memberName || '--'}}</p>
<p class="fz13 gray">{{scope.row.cardNum || '--'}}</p>
</div>
</template>
</el-table-column>
......@@ -35,8 +35,8 @@
<template slot-scope="scope">
<img class="vertical-middle table__avatar" :src="scope.row.imageUrl || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p>{{scope.row.clerkName || '--'}}</p>
<p class="gray">{{scope.row.storeName || '--'}}</p>
<p class="table-name--ellipsis">{{scope.row.clerkName || '--'}}</p>
<p class="fz13 gray">{{scope.row.storeName || '--'}}</p>
</div>
</template>
</el-table-column>
......@@ -47,8 +47,8 @@
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="100" align="left" prop="errorMsg" label="错误原因"></el-table-column>
<el-table-column width="100" align="left" prop="orderRemarks" label="备注内容">
<template slot-scope="scope">
<el-popover placement="top-start" title="备注内容" width="200" trigger="hover" :content="scope.row.orderRemarks">
<template slot-scope="scope">
<el-popover placement="top-start" title="备注内容" width="200" trigger="hover" :content="scope.row.orderRemarks">
<el-button slot="reference" type="text">备注</el-button>
</el-popover>
</template>
......
......@@ -35,7 +35,7 @@
<vue-gic-confirm-people v-show="info.memberType" idType="memberId" @get-data="getConfirmData" :list="memberList"></vue-gic-confirm-people>
</div>
<div class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button v-if="!infoFlag" type="primary" @click="submit('info')">发 送</el-button>
<el-button v-if="!infoFlag" type="primary" @click="submit('info')">提 交</el-button>
<el-button @click="$router.go(-1)">返回</el-button>
</div>
</el-form>
......
......@@ -2,7 +2,7 @@
<section class="dm-wrap">
<div class="game-ptyx-header pb10 clearfix">
<span class="pr10">卡券共{{total}}</span>
<el-button-group class="vertical-middle pr7">
<el-button-group class="vertical-middle pr4">
<el-button @click="sortList('col1')">创建时间<i class="el-icon--right" :class="listParams.sortBy === 'col1'?'el-icon-caret-top':(listParams.sortBy === 'col1 desc'?'el-icon-caret-bottom':'el-icon-d-caret')"></i></el-button>
<el-button @click="sortList('col2')">领取量<i class="el-icon--right" :class="listParams.sortBy === 'col2'?'el-icon-caret-top':(listParams.sortBy === 'col2 desc'?'el-icon-caret-bottom':'el-icon-d-caret')"></i></el-button>
<el-button @click="sortList('col3')">使用量<i class="el-icon--right" :class="listParams.sortBy === 'col3'?'el-icon-caret-top':(listParams.sortBy === 'col3 desc'?'el-icon-caret-bottom':'el-icon-d-caret')"></i></el-button>
......
......@@ -146,10 +146,12 @@ export default {
margin: 10px 0;
h5{
font-size: 20px;
line-height: 28px;
}
p{
font-size: 12px;
color: #999;
line-height: 20px;
}
}
}
......
......@@ -20,7 +20,10 @@
<template slot-scope="scope">
<a :href="'/member/#/wechatmemberDetail?memberId='+scope.row.memberId" target="_blank">
<img class="vertical-middle table__avatar" :src="scope.row.thirdimgurl || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle"><p>{{scope.row.memberName}}</p><p class="gray">{{scope.row.phoneNum}}</p></div>
<div class="inline-block vertical-middle">
<p class="table-name--ellipsis">{{scope.row.memberName || '--'}}</p>
<p class="gray">{{scope.row.phoneNum || '--'}}</p>
</div>
</a>
</template>
</el-table-column>
......
......@@ -11,8 +11,8 @@
</el-table-column>
<el-table-column width="150" align="left" prop="cardName" label="卡券名称">
<template slot-scope="scope">
<p>{{scope.row.cardName}}</p>
<p class="fz12 gray">{{scope.row.subName}}</p>
<p style="line-height:22px;">{{scope.row.cardName}}</p>
<p class="fz13 gray" style="line-height:20px;">{{scope.row.subName}}</p>
</template>
</el-table-column>
<el-table-column v-for="(v,i) in recordHeader" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="i" :prop="v.prop" :label="v.label" :formatter="v.formatter"></el-table-column>
......
<template>
<section class="dm-wrap">
<div class="pb22">
<vue-gic-store-group class="w200 pr7" :model="currentData" @commit-store="storeChange"></vue-gic-store-group>
<vue-gic-store-group class="w200 pr4" :model="currentData" @commit-store="storeChange"></vue-gic-store-group>
<el-input class="w300" v-model="listParams.searchParam" clearable placeholder="输入门店名称/代码/地区名" @change="searchParam"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input></div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading" @sort-change="sortList">
<el-table-column min-width="140" align="left" prop="shelfName" label="门店名称">
......
<template>
<section class="eval-charts">
<div class="dm-form__wrap">
<vue-gic-store-group class="pr5" :model="storeGroupData" @commit-store="getStoreGroup"></vue-gic-store-group>
<vue-gic-store-group width="240" class="pr5" :model="storeGroupData" @commit-store="getStoreGroup"></vue-gic-store-group>
<span class="pl10 danger-color">*以下数据取自近180天</span></div>
<div class="dm-form__wrap">
<h3 class="dm-title__label">评价趋势
......
<template>
<el-dialog title="趋势详情" :visible.sync="show" width="70%" :before-close="close">
<vue-gic-store-group class="pb22" :model="storeGroupData" @commit-store="getStoreGroup"></vue-gic-store-group>
<vue-gic-store-group width="240" class="pb22" :model="storeGroupData" @commit-store="getStoreGroup"></vue-gic-store-group>
<el-table tooltipEffect="light" :data="tableList" height="350" style="width: 100%" v-loading="loading" @sort-change="sortList">
<el-table-column :show-overflow-tooltip="true" :min-width="140" align="left" prop="storeName" label="门店名称">
<template slot-scope="scope">
<p class="fz13">{{scope.row.storeName}}</p>
<p class="fz12 gray">{{scope.row.areaName}}</p>
<p style="line-height:22px;">{{scope.row.storeName || '--'}}</p>
<p class="fz13 gray" style="line-height:20px;">{{scope.row.areaName || '--'}}</p>
</template>
</el-table-column>
<el-table-column v-for="(v,i) in tableHeader" :sortable="v.sortable" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="i" :prop="v.prop" :label="v.label" :formatter="v.formatter"></el-table-column>
......
<template>
<section class="eval-newest dm-wrap">
<div class="clearfix pb22">
<vue-gic-store-group class="pr5" :model="storeGroupData" @commit-store="getStoreGroup"></vue-gic-store-group>
<vue-gic-store-group width="240" class="pr5" :model="storeGroupData" @commit-store="getStoreGroup"></vue-gic-store-group>
<el-date-picker v-if="$route.meta.type !== 'bad'" class="w250" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="latestEvaluationList"></el-date-picker>
<el-input v-model="listParams.searchName" class="w300" placeholder="订单号/门店名称/会员姓名/卡号" clearable @change="latestEvaluationList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button icon="iconfont icon-icon_yunxiazai fz14" v-if="$route.meta.type !== 'bad'" class="fr" type="primary" @click="exportLatestEvaluate"> 下载Excel</el-button>
......@@ -39,35 +39,37 @@
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="140" header-align="left" align="left" prop="clerkId" label="导购信息">
<el-table-column min-width="140" header-align="left" align="left" prop="clerkId" label="导购信息">
<template slot-scope="scope">
<img class="vertical-middle table__avatar" :src="scope.row.clerkImage || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p>{{scope.row.clerkName || '--'}}</p>
<p class="fz13 gray">{{scope.row.storeName || '--'}}</p>
</div>
<div class="ellipsis-100" >
<img class="vertical-middle table__avatar" :src="scope.row.clerkImage || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p class="table-name--ellipsis">{{scope.row.clerkName || '--'}}</p>
<p class="fz13 gray">{{scope.row.storeName || '--'}}</p>
</div>
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="140" header-align="left" align="left" prop="memberId" label="会员信息">
<el-table-column min-width="140" header-align="left" align="left" prop="memberId" label="会员信息">
<template slot-scope="scope">
<a :href="'/member/#/wechatmemberDetail?memberId='+scope.row.memberId" target="_blank">
<a class="ellipsis-100" :href="'/member/#/wechatmemberDetail?memberId='+scope.row.memberId" target="_blank">
<img class="vertical-middle table__avatar" :src="scope.row.thirdImgUrl || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p>{{scope.row.memberName || '--'}}</p>
<p class="table-name--ellipsis">{{scope.row.memberName || '--'}}</p>
<p class="fz13 gray">{{scope.row.cardNum || '--'}}</p>
</div>
</a>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" min-width="120" align="left" prop="fwtd" label="服务/专业/门店">
<el-table-column :show-overflow-tooltip="false" min-width="90" align="left" prop="fwtd" label="服务/专业/门店">
<template slot-scope="scope">
{{scope.row.fwtd+'/'+scope.row.zycd+'/'+scope.row.mdhj}}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" width="100" align="center" prop="content" label="评语">
<el-table-column :show-overflow-tooltip="false" width="80" align="center" prop="content" label="评语">
<template slot-scope="scope">
<el-popover class="item" trigger="hover" v-if="scope.row.content" :content="scope.row.content" placement="top-start">
<i slot="reference" class="el-icon-message fz20 blue"></i>
......@@ -75,7 +77,7 @@
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" width="100" align="center" prop="replyStatus" label="回复">
<el-table-column :show-overflow-tooltip="false" width="80" align="center" prop="replyStatus" label="回复">
<template slot-scope="scope">
<el-button v-if="scope.row.replyStatus !== 1 && scope.row.content" type="text" @click="replyData(scope.row)">立即回复</el-button>
<el-popover v-if="scope.row.replyStatus === 1" class="item" trigger="hover" :content="scope.row.replyContent" placement="top-start">
......
......@@ -6,9 +6,9 @@
</el-form-item>
<el-form-item label="会员信息">
<img class="vertical-middle table__avatar" width="60" height="60" :src="form.thirdImgUrl || defaultAvatar" alt="">
<div class="inline-block vertical-middle ml10">
<div class="inline-block vertical-middle">
<p class="line-height1">{{form.memberName || '--'}}</p>
<p class="gray fz13 ">{{form.thirdNickName || '--'}}</p>
<p class="gray fz13">{{form.thirdNickName || '--'}}</p>
</div>
</el-form-item>
<el-form-item label="反馈详情">
......
<template>
<el-dialog title="门店评分" :visible.sync="show" width="70%" :before-close="close">
<vue-gic-store-group class="pb22" :model="storeGroupData" @commit-store="getStoreGroup"></vue-gic-store-group>
<vue-gic-store-group width="240" class="pb22" :model="storeGroupData" @commit-store="getStoreGroup"></vue-gic-store-group>
<el-table tooltipEffect="light" :data="tableList" height="350" style="width: 100%" v-loading="loading" @sort-change="sortList">
<el-table-column :show-overflow-tooltip="true" :min-width="140" align="left" prop="storeName" label="门店名称">
<template slot-scope="scope">
<p v-if="scope.row.totalCount" class="success-color">{{scope.row.totalCount}}</p>
<p v-if="scope.row.totalCount" class="primary-color">{{scope.row.totalCount}}</p>
<div v-else>
<p class="fz13">{{scope.row.storeName}}</p>
<p class="fz12 gray">{{scope.row.areaName}}</p>
<p style="line-height:22px;">{{scope.row.storeName || '--'}}</p>
<p class="fz12 gray" style="line-height:20px;">{{scope.row.areaName || '--'}}</p>
</div>
</template>
</el-table-column>
<el-table-column :width="130" align="left" prop="evaluateCount" label="累计评价次数">
<template slot-scope="scope">
<p :class="{'success-color':!!scope.row.totalCount}">{{scope.row.evaluateCount}}</p>
<p :class="{'primary-color':!!scope.row.totalCount}">{{scope.row.evaluateCount}}</p>
</template>
</el-table-column>
<el-table-column :width="110" sortable="custom" align="left" prop="fwtdAvg" label="服务态度">
<template slot-scope="scope">
<p :class="{'success-color':!!scope.row.totalCount}">{{scope.row.fwtdAvg?Number(scope.row.fwtdAvg).toFixed(2):'0.00'}}</p>
<p :class="{'primary-color':!!scope.row.totalCount}">{{scope.row.fwtdAvg?Number(scope.row.fwtdAvg).toFixed(2):'0.00'}}</p>
</template>
</el-table-column>
<el-table-column :width="110" sortable="custom" align="left" prop="zycdAvg" label="专业程度">
<template slot-scope="scope">
<p :class="{'success-color':!!scope.row.totalCount}">{{scope.row.zycdAvg?Number(scope.row.zycdAvg).toFixed(2):'0.00'}}</p>
<p :class="{'primary-color':!!scope.row.totalCount}">{{scope.row.zycdAvg?Number(scope.row.zycdAvg).toFixed(2):'0.00'}}</p>
</template>
</el-table-column>
<el-table-column :width="110" sortable="custom" align="left" prop="mdhjAvg" label="门店环境">
<template slot-scope="scope">
<p :class="{'success-color':!!scope.row.totalCount}">{{scope.row.mdhjAvg?Number(scope.row.mdhjAvg).toFixed(2):'0.00'}}</p>
<p :class="{'primary-color':!!scope.row.totalCount}">{{scope.row.mdhjAvg?Number(scope.row.mdhjAvg).toFixed(2):'0.00'}}</p>
</template>
</el-table-column>
</el-table>
......
......@@ -9,13 +9,13 @@
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading" element-loading-text="拼命加载中">
<el-table-column :show-overflow-tooltip="true" width="160" align="left" :key="Math.random()" prop="createTime" label="评价时间">
<template slot-scope="scope">
<p class="fz13">{{formateDateTimeByType(scope.row.createTime,'yyyy-MM-dd-HH-mm')}}</p>
<p>{{formateDateTimeByType(scope.row.createTime,'yyyy-MM-dd-HH-mm')}}</p>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="200" align="left" :key="Math.random()" prop="storeName" label="门店">
<template slot-scope="scope">
<p class="fz13">{{scope.row.storeName}}</p>
<p class="fz12 gray">{{scope.row.areaName}}</p>
<p>{{scope.row.storeName || '--'}}</p>
<p class="fz13 gray">{{scope.row.areaName || '--'}}</p>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="200" header-align="left" align="left" :key="Math.random()" prop="memberId" label="会员信息">
......@@ -23,7 +23,7 @@
<a :href="'/member/#/wechatmemberDetail?memberId='+scope.row.memberId" target="_blank">
<img class="vertical-middle table__avatar" :src="scope.row.thirdImgUrl || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p>{{scope.row.memberName || '--'}}</p>
<p class="table-name--ellipsis">{{scope.row.memberName || '--'}}</p>
<p class="fz13 gray">{{scope.row.cardNum || '--'}}</p>
</div>
</a>
......
......@@ -17,7 +17,7 @@
<a :href="'/member/#/wechatmemberDetail?memberId='+scope.row.memberDTO.memberId" target="_blank">
<img class="vertical-middle table__avatar" :src="scope.row.memberDTO.thirdImgUrl" width="60" height="60" alt="" srcset="">
<div class="inline-block vertical-middle">
<p class="fz12">{{scope.row.memberDTO.memberName}}</p>
<p class="table-name--ellipsis">{{scope.row.memberDTO.memberName || '--'}}</p>
</div>
</a>
</div>
......
......@@ -17,7 +17,7 @@
<a :href="'/member/#/wechatmemberDetail?memberId='+scope.row.memberDTO.memberId" target="_blank">
<img class="vertical-middle table__avatar" :src="scope.row.memberDTO.thirdImgUrl" width="60" height="60" alt="" srcset="">
<div class="inline-block vertical-middle">
<p>{{scope.row.memberDTO.memberName}}</p>
<p class="table-name--ellipsis">{{scope.row.memberDTO.memberName || '--'}}</p>
</div>
</a>
</div>
......
......@@ -17,7 +17,7 @@
<a :href="'/member/#/wechatmemberDetail?memberId='+scope.row.memberId" target="_blank">
<img class="vertical-middle table__avatar" width="60" height="60" :src="scope.row.imgUrl" alt="" srcset="">
<div class="inline-block vertical-middle">
<p>{{scope.row.memberName}}</p>
<p class="table-name--ellipsis">{{scope.row.memberName || '--'}}</p>
</div>
</a>
</template>
......
......@@ -16,7 +16,7 @@
<a :href="'/member/#/wechatmemberDetail?memberId='+scope.row.memberId" target="_blank" class="sms-table_info">
<img class="vertical-middle table__avatar" :src="scope.row.memberPhotoUrl" alt="" srcset="">
<div class="inline-block vertical-middle">
<p>{{scope.row.memberName || '--'}}</p>
<p class="table-name--ellipsis">{{scope.row.memberName || '--'}}</p>
<p class="gray fz13">{{scope.row.memberNickName || '--'}}</p>
</div>
</a>
......@@ -40,7 +40,7 @@
<a :href="'/member/#/wechatmemberDetail?memberId='+scope.row.memberId" target="_blank" class="sms-table_info">
<img class="vertical-middle table__avatar" :src="scope.row.memberImage" alt="" srcset="">
<div class="inline-block vertical-middle">
<p>{{scope.row.memberName || '--'}}</p>
<p class="table-name--ellipsis">{{scope.row.memberName || '--'}}</p>
<p class="gray fz13">{{scope.row.memberNickName || '--'}}</p>
</div>
</a>
......
<template>
<el-dialog title="修改库存" :visible.sync="show" width="30%" :before-close="close" append-to-body>
<div>
<span class="mr20">库存数量</span><el-radio v-model="calculate" :label="true">增加</el-radio>
<el-radio v-model="calculate" :label="false">减少</el-radio>
<div class="pt20" style="margin-left:76px;">
<el-input-number controls-position="right" :min="0" v-model="count" class="w200 block-center" size="small" @blur="checkCalc"></el-input-number>
</div>
<div class="pt20">
<span class="fz14">剩余库存:</span>
<span>{{calculate?parseInt(totalCount)+parseInt(count):parseInt(totalCount)-parseInt(count)}}</span>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="close">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import {updateCardStock} from '@/service/api/cardApi.js';
export default {
props:{
totalCount:{
type:Number,
default:0
},
show:{
type:Boolean,
default:false
},
coupCardId:{
type:String,
default:''
},
},
data(){
return{
count:0,
calculate:true
}
},
methods:{
checkCalc(){
if (!this.calculate) {
if (this.count>this.totalCount) {
this.count = this.totalCount;
this.$tips({type:'warning',message:'输入数量不能大于总数'})
}
}
},
close(){
this.$emit('update:show',false)
this.count = 0;
},
submit(){
if (!this.calculate) {
if (this.count>this.totalCount) {
this.count = this.totalCount;
this.$tips({type:'warning',message:'输入数量不能大于总数'})
return;
}
}
let params = {
optType:this.calculate?1:2, //是 int 1: 增加; 2: 减少
addCount:this.count, //是 int 增加或者减少数量
coupCardId:this.coupCardId,
}
updateCardStock(params).then(res => {
if (res.errorCode === 0) {
this.$emit('refresh',this.calculate?(parseInt(this.totalCount)+parseInt(this.count)):(parseInt(this.totalCount)-parseInt(this.count)))
this.close();
} else {
this.tips({type:'warning',message:res.message || '调整库存出错'})
}
});
}
}
}
</script>
<template>
<section>
<div class="dm-form__wrap" v-if="$route.meta.type !== 'shelf'">
<h3 class="dm-title__label">渠道分析</h3>
<el-table tooltipEffect="light" :data="tableList" style="width:100%" v-loading="loading">
<el-table-column v-for="(v,i) in tableHeader" :key="i" :align="v.align" :width="v.width" :min-width="v.minWidth" :prop="v.prop" :label="v.label" :formatter="v.formatter"></el-table-column>
</el-table>
</div>
<div class="dm-form__wrap">
<h3 class="dm-title__label clearfix">
<span class="card-chart__title">卡券报表趋势分析</span>
<el-date-picker class="fr ml10 mr20" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="cardTrendEchart"></el-date-picker>
<el-select class="fr w200" v-model="chartParams.kpiName" placeholder="选择状态" @change="cardTrendEchart">
<el-option v-for="(v,i) in kpiNameOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</el-select>
</h3>
<div id="mountNode" ref="mountNode" v-show="list.length"></div>
<div class="chart--nodata" v-show="!list.length"></div>
</div>
</section>
</template>
<script>
import {cardChannelAnalysis,cardTrendEchart} from '@/service/api/cardApi.js'
import {formateDateTimeByType} from '@/utils/index.js';
import VeLine from 'v-charts/lib/line.common';
import G2 from '@antv/g2';
import DataSet from '@antv/data-set';
export default {
name:'card-analysis',
data() {
this.chartSettings = {
xAxisType: 'time'
}
return {
formateDateTimeByType,
dateTime:[Date.now()-30*24*60*60*1000,Date.now()],
loading:false,
tableList:[],
chartData: {
columns: [],
rows: []
},
listParams:{
type:'',
},
kpiNameOptions:[{label:'领取次数',value:'card-puton1'},{label:'使用次数',value:'card-puton2'},{label:'销售额',value:'card-puton3'}],
tableHeader:[
{label:'渠道名称',prop:'receiveName',align:'left',minWidth:'200'},
{label:'投放人次',prop:'issuingQuantity',align:'left',width:'100',formatter(row) {
return row.receiveCode === 'RECEIVE_005'?'-':row.issuingQuantity;
}},
{label:'领取率',prop:'receiveName',align:'left',width:'100',formatter(row) {
return row.receiveCode === 'RECEIVE_005'?'-': ((row.getedQuantity) *100/ (row.issuingQuantity === 0 ? 1: row.issuingQuantity)).toFixed(2)+"%"
}},
{label:'领取数量',prop:'getedQuantity',align:'left',width:'100'},
{label:'使用数量',prop:'usageQuantity',align:'left',width:'100'},
{label:'核销率',prop:'receiveName',align:'left',width:'100',formatter(row) {
return (row.usageQuantity *100 / (row.getedQuantity === 0 ? 1 : row.getedQuantity)).toFixed(2)
}},
{label:'销售额',prop:'saleAmount',align:'left',width:'100'}
],
chartParams:{
kpiName:'card-puton1',
cardId:this.$route.params.id,
beginTime:'',
endTime:'',
day:1,
},
list:[]
}
},
components: {
[VeLine.name]:VeLine,
},
created(){
if (this.$route.meta.type === 'shelf') {
this.chartParams = {
kpiName:'shelf-cards1',
shelfId:this.$route.params.id,
beginTime:'',
endTime:'',
}
this.kpiNameOptions = [{label:'领取次数',value:'shelf-cards1'},{label:'使用次数',value:'shelf-cards2'},{label:'销售额',value:'shelf-cards3'}];
this.cardTrendEchart();
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'卡券营销',path:'/card'},{name:'卡券展架',path:'/card/shelf'},{name:'卡券展架报表',path:''}])
} else {
this.chartParams = {
kpiName:'card-puton1',
cardId:this.$route.params.id,
beginTime:'',
endTime:'',
day:1,
}
this.kpiNameOptions = [{label:'领取次数',value:'card-puton1'},{label:'使用次数',value:'card-puton2'},{label:'销售额',value:'card-puton3'}],
this.cardChannelAnalysis();
this.cardTrendEchart();
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'卡券营销',path:'/card'},{name:'卡券库',path:'/card/list'},{name:'卡券报表',path:''}])
}
},
mounted() {
},
methods:{
//加载列表
async cardChannelAnalysis(){
this.loading = true;
try{
let resList = await cardChannelAnalysis({coupCardId:this.$route.params.id});
if (resList.errorCode === 0 && resList.result) {
this.tableList = resList.result;
} else {
this.tableList = [];
}
}catch(err) {
}
this.loading = false;
},
//加载图表
async cardTrendEchart(){
if (this.dateTime) {
this.chartParams.beginTime = formateDateTimeByType(this.dateTime[0],'yyyy-MM-dd');
this.chartParams.endTime = formateDateTimeByType(this.dateTime[1],'yyyy-MM-dd');
} else {
this.chartParams.beginTime = '';
this.chartParams.endTime = '';
}
try{
let res = await cardTrendEchart(this.chartParams);
if (res.errorCode === 0 && res.result) {
let result = JSON.parse(res.result);
let series = result.series;
let xAxisType = result.xaxisData;
let value = 0;
let list = [];
series.map((v,i) => {
v.data.map((w,j) => {
list.push({
day:xAxisType[j],
name:v.name,
temperature:parseInt(w.value)
})
})
})
const mountNode = this.$refs.mountNode;
const childs = Array.from(mountNode.childNodes);
childs.map(v => {
mountNode.removeChild(v)
})
this.list = list;
this.$nextTick(_ => {
this.initCharts(list);
})
}
}catch(err) {
console.log(err)
}
},
initCharts(data) {
var chart = new G2.Chart({
container: 'mountNode',
forceFit: true,
height: 400
});
chart.source(data, {
day: {
range: [0, 1]
},
});
chart.tooltip({
crosshairs: {
type: 'line'
}
});
chart.axis('temperature', {
label: {
formatter: function formatter(val) {
val = Number(val);
if(val%1 === 0) {
return val + '人次';
} else {
return '';
}
}
}
});
chart.line().position('day*temperature').color('name');
chart.point().position('day*temperature').color('name').size(4).shape('circle').style({
stroke: '#fff',
lineWidth: 1
});
chart.render();
}
}
}
</script>
<style lang="scss" scoped>
.card-chart__title{
display: inline-block;
vertical-align: middle;
padding-top: 13px;
font-weight: 700;
}
</style>
<template>
<li class="card-item inline-block" :style="'border:1px solid '+item.cardColor">
<div class="card-item_head" :style="'background:'+item.cardColor"><h4>{{item.cardName}}</h4><p>{{item.subName}}</p>
</div>
<div class="card-item_body">
<div class="card-item__count clearfix">
<div><h5>{{item.getedQuantity}}</h5><p>领取数量</p></div>
<div><h5>{{item.usageQuantity}}</h5><p>使用数量</p></div>
<div><h5>{{(item.usageQuantity * 100 / (item.getedQuantity === 0 ? 1 : item.getedQuantity)).toFixed(2)}}%</h5><p>核销率</p></div>
<div><h5>{{item.saleAmount}}</h5><p>销售额</p></div>
</div>
<div class="card-item__detail">
<p class="ellipsis-100">有效期:<span v-if="item.cardEffectiveMode !== 0">领取后第{{item.startDay+1}}-{{item.limitDay+item.startDay}}</span>
<span v-if="item.cardEffectiveMode === 0">{{formateDateTimeByType(item.beginDate,'yyyy-MM-dd')}}{{formateDateTimeByType(item.endDate,'yyyy-MM-dd')}}</span>
</p>
<p class="ellipsis-100">使用条件:
<el-popover
placement="top-start"
width="200"
trigger="hover"
:content="item.useCondition | filterUseCondition">
<span slot="reference" class="ellipsis-100">{{item.useCondition | filterUseCondition}}</span>
</el-popover>
</p>
<p class="ellipsis-100">适用门店:<span>{{item.storeMode === 0 ? "所有门店" : (item.storeMode === 1 ? "部分分组" : "部分门店")}}</span></p>
<p class="ellipsis-100">领取限制:<span>每人限制{{item.cardLimit}}</span></p>
<p class="ellipsis-100">卡券编号:<span>{{item.coupCardId}}</span></p>
</div>
<div class="card-item_foot clearfix">
<div class="fl">
<span v-if="item.auditingStatus !== -1">剩余库存:{{item.couponStock}} <a title="编辑库存" v-if="!shelfFlag && item.useCustomCode === 0" @click="preAdjustStock(item)"><i class="el-icon-edit"></i></a></span>
</div>
<render-temp v-if="!shelfFlag" :item="item" @handler="handler"></render-temp>
<a title="删除" class="fr" v-if="shelfFlag" @click="delShelf(item)"><i class="el-icon-delete"></i></a>
</div>
</div>
</li>
</template>
<script>
import renderTemp from './render.js'
import {formateDateTimeByType} from '@/utils/index.js'
export default {
props:{
item:{
type:Object,
default() {
return {
cardEffectiveMode:0
}
}
},
//是否为展架里的卡券 默认为false
shelfFlag:{
type:Boolean,
default:false
}
},
data() {
return {
formateDateTimeByType
}
},
components:{
'render-temp':renderTemp
},
methods:{
/**
* @param val
* 1 投放 2 报表 3 编辑 4 删除 5 详情
*/
handler(val) {
switch(val) {
case 1:
this.$router.push('/card/groupsend/'+this.item.coupCardId+'/'+this.item.cardName);
break;
case 2:
this.$router.push('/card/analysis/'+this.item.coupCardId);
break;
case 3:
this.$router.push('/card/edit/'+this.item.coupCardId);
break;
case 4:
//todo
this.$emit('delete-card',this.item.coupCardId);
break;
case 5:
this.$router.push('/card/info/'+this.item.coupCardId);
break;
}
},
//编辑库存 前置
preAdjustStock() {
this.$emit('adjust-stock',this.item);
},
delShelf(obj) {
this.$emit('del-shelf',obj);
}
},
filters:{
filterUseCondition(val) {
var _useCondition = JSON.parse(val);
return (typeof _useCondition.sale_limit === 'undefined' ? ""
: ((typeof _useCondition.sale_limit.fee === 'undefined' ? ""
: "最低消费满" + _useCondition.sale_limit.fee + ";") + (typeof _useCondition.sale_limit.goods === 'undefined' ? ""
: "消费指定商品" + _useCondition.sale_limit.goods + ";")))
+ (typeof _useCondition["goods"] === 'undefined' ? ""
: ((typeof _useCondition.goods.ok === 'undefined' ? ""
: "适用商品(" + _useCondition.goods.ok + ");") + (typeof _useCondition.goods.no === 'undefined' ? ""
: "不适用商品(" + _useCondition.goods.no + ");")))
+ (typeof _useCondition.only === 'undefined' ? ""
: "不可与其他优惠共享");
}
}
}
</script>
<style lang="scss" scoped>
.card-item{
width: 340px;
margin: 10px;
border:1px solid #63b359;
border-radius: 4px;
// height: 370px;
overflow-y: none;
&_head{
width: 100%;
text-align: center;
color: #fff;
background: #63b359;
h4{
font-size: 18px;
font-weight: bold;
line-height: 1.8em;
}
p{
color: #fff;
line-height: 1.8em;
font-size: 13px;
}
}
&_body{
.card-item__count{
border-bottom: 1px solid #ddd;
&>div{
width: 50%;
float: left;
text-align: center;
margin: 10px 0;
h5{
font-size: 20px;
}
p{
font-size: 12px;
color: #999;
}
}
}
.card-item__detail{
padding: 10px;
p{
line-height: 1.8em;
span{
font-size: 13px;
color: #999;
}
}
}
}
&_foot{
background: #f8f9fb;
height: 44px;
line-height: 44px;
padding: 0 10px;
/deep/ a {
color:#909399;
&:hover{
color: #1890ff
}
}
/deep/ i {
font-size: 16px;
padding-left: 2px;
cursor: pointer;
}
/deep/ .el-icon-delete {
&:hover{
color:#f56c6c;
}
}
/deep/ .fr span {
font-size: 13px;
}
}
}
</style>
<template>
<section class="dm-wrap">
<div class="game-ptyx-header pb10 clearfix">
<span class="pr10">卡券共{{total}}</span>
<el-input v-model="listParams.searchParam" class="w200" placeholder="输入名称/备注" clearable @change="cardPageList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="preAddCard">添加卡券</el-button>
</div>
<ul class="clearfix" v-loading="loading" element-loading-text="拼命加载中" >
<card-item :item="v" v-for="(v,i) in tableList" :shelfFlag="true" :key="i" @del-shelf="delShelf"></card-item>
</ul>
<div class="text-center" v-if="tableList.length === 0">
<img class="block block-center pt100" width="60" height="60" src="../../assets/img/no-data_icon.png" alt="">
<el-button class="block block-center mt10" type="text" @click="preAddCard">添加卡券</el-button>
</div>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
<shelf-add :show.sync="shelfAddShow" @refresh="cardPageList"></shelf-add>
</section>
</template>
<script>
import {cardPageList,deleteShelfCard} from '@/service/api/cardApi.js';
import cardItem from './card-item';
import shelfAdd from './shelf-add';
export default {
name: 'card-manager',
data () {
return {
listParams:{
shelfId:this.$route.params.id,
sortBy:'',
searchParam:'',
currentPage:1,
pageSize:20
},
total:0,
loading:false,
tableList:[],
shelfAddShow:false
}
},
components:{
'card-item':cardItem,
shelfAdd
},
created() {
this.cardPageList();
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'卡券营销',path:'/card'},{name:'卡券展架',path:'/card/shelf'},{name:'卡券展架管理',path:''}])
},
methods: {
handleSizeChange(val) {
this.listParams.pageSize = val;
this.cardPageList();
},
handleCurrentChange(val) {
this.listParams.currentPage = val;
this.cardPageList();
},
async cardPageList() {
this.loading = true;
try {
let res = await cardPageList(this.listParams);
this.tableList = res.result.result;
this.total = res.result.totalCount;
} catch (err) {
this.$tips({type:'error',message:'加载列表失败'});
}
this.loading = false;
},
//TODO
delShelf(obj) {
this.$confirm('是否移除该卡券?', '提示', {
confirmButtonText: '确定',
cancelBUttonText: '取消',
type: 'warning'
}).then(() => {
deleteShelfCard({shelfId:this.$route.params.id,coupCardId:obj.coupCardId}).then(res => {
if (res.errorCode === 0 ) {
this.$tips({type:'success',message:'删除成功'})
this.cardPageList();
} else {
this.$tips({type: 'error',message: '删除失败'});
}
});
}).catch(() => {
this.$tips({type: 'info',message: '已取消删除'});
});
},
preAddCard(){
this.shelfAddShow = true;
}
},
}
</script>
<template>
<el-dialog title="选择订单" :visible.sync="show" width="60%" :before-close="close">
<div class="pb10">
<!-- <el-input v-model="listParams.searchParams" class="w200" placeholder="输入门店信息/订单流水号" @change="throttle(listCoupcardOrder,3000)"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input> -->
<span class="fz12 gray pl20">*仅显示满足核销条件的订单 </span>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading" @row-click="chooseCard">
<el-table-column :show-overflow-tooltip="false" :width="60" align="left" prop="orderId" label="选择">
<template slot-scope="scope">
<div class="sms-record_left label-hidden">
<el-radio v-model="selectedId" :label="scope.row.orderId" class="pr10"></el-radio>
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" align="left" prop="storeCode" label="消费门店"></el-table-column>
<el-table-column :show-overflow-tooltip="false" align="left" prop="orderNumber" label="订单流水号"></el-table-column>
</el-table>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
<span slot="footer" class="dialog-footer">
<el-button @click="close">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import {listCoupcardOrder,writeOffCard} from '@/service/api/cardApi.js';
import {throttle} from '@/utils/index.js';
export default {
props:{
obj:{
type:Object,
default(){
return {
memberId:'',
coupCardId:''
}
}
},
show:{
type:Boolean,
default:false
}
},
data(){
return{
throttle,
loading:false,
listParams:{
currentPage:1,
pageSize:20,
coupLogId:'',
memberId:''
},
total:0,
tableList:[],
selectedId:''
}
},
watch: {
show(val) {
console.log(this.obj)
this.listParams.coupLogId = this.obj.coupLogId;
this.listParams.memberId = this.obj.memberId;
if (val) this.listCoupcardOrder();
}
},
methods:{
handleSizeChange(val) {
this.listParams.pageSize = val;
this.listCoupcardOrder();
},
handleCurrentChange(val) {
this.listParams.currentPage = val;
this.listCoupcardOrder();
},
async listCoupcardOrder() {
this.loading = true;
let res = await listCoupcardOrder(this.listParams);
this.tableList = res.result.result || [];
this.total = res.result.totalCount;
this.loading = false;
},
close() {
this.$emit('update:show',false)
},
chooseCard(row) {
this.selectedId = row.orderId;
},
submit() {
if (this.selectedId) {
this.writeOffCard();
} else {
this.tips({type:"warning",message:"未选择订单"});
}
},
async writeOffCard(){
// try {
let res = await writeOffCard({coupLogId:this.obj.coupLogId,orderId:this.selectedId,memberId:this.obj.memberId})
if (res.errorCode === 0) {
this.$tips({type:"success",message:"核销成功"});
this.close()
this.selectedId = ''
}else {
this.$tips({type:"error",message:"核销失败"});
}
// } catch (err) {
// this.$tips({type:"error",message:"核销失败"});
// }
}
}
}
</script>
<template>
<section class="dm-wrap">
<div class="pb22 clearfix">
<el-date-picker class="w250" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="coupcardCheckList"></el-date-picker>
<el-input v-model="listParams.searchParam" class="w300" placeholder="订单号/门店名称/导购姓名" clearable @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button icon="iconfont icon-icon_yunxiazai fz14" class="fr" type="primary" @click="exportCoupcardCheckExcel"> 下载Excel</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading">
<el-table-column :show-overflow-tooltip="true" width="160" align="left" prop="createTime" label="操作时间">
<template slot-scope="scope">
<p>{{formateDateTimeByType(scope.row.createTime,'yyyy-MM-dd-HH-mm')}}</p>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" width="160" align="left" prop="orderNumber" label="订单流水号">
<template slot-scope="scope">
<p class="gray">{{scope.row.orderNumber || '--'}}</p>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" width="140" header-align="left" align="left" prop="memberId" label="会员信息">
<template slot-scope="scope">
<img class="vertical-middle table__avatar" :src="scope.row.thirdImgUrl || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p>{{scope.row.memberName || '--'}}</p>
<p class="gray">{{scope.row.cardNum || '--'}}</p>
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" width="140" align="left" prop="storeName" label="门店名称">
<template slot-scope="scope">
<p >{{scope.row.storeName}}</p>
<p class="gray">{{scope.row.areaName}}</p>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" width="140" header-align="left" align="left" prop="clerkId" label="导购姓名">
<template slot-scope="scope">
<img class="vertical-middle table__avatar" :src="scope.row.imageUrl || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p>{{scope.row.clerkName || '--'}}</p>
<p class="gray">{{scope.row.storeName || '--'}}</p>
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" width="120" align="left" prop="differenceValue" label="差额">
<template slot-scope="scope">
{{scope.row.differenceValue>=0?' +':'-' + '¥'+ Math.abs(parseInt(scope.row.differenceValue)).toFixed(2)}}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="100" align="left" prop="errorMsg" label="错误原因"></el-table-column>
<el-table-column width="100" align="left" prop="orderRemarks" label="备注内容">
<template slot-scope="scope">
<el-popover placement="top-start" title="备注内容" width="200" trigger="hover" :content="scope.row.orderRemarks">
<el-button slot="reference" type="text">备注</el-button>
</el-popover>
</template>
</el-table-column>
</el-table>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
</section>
</template>
<script>
import {coupcardCheckList,exportCoupcardCheckExcel} from '@/service/api/cardApi.js';
import {formateDateTimeByType} from '@/utils/index.js'
export default {
name: 'card-check',
data () {
return {
formateDateTimeByType,
defaultAvatar:require('../../assets/img/head_default.png'),
dateTime:[Date.now()-30*24*60*60*1000,Date.now()],
listParams:{
beginTime:'',
endTime:'',
searchParam:'',
currentPage:1,
pageSize:20
},
total:0,
loading:false,
tableList:[],
}
},
created() {
this.coupcardCheckList();
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'卡券营销',path:'/card'},{name:'核销纠错',path:''}])
},
methods: {
search() {
this.listParams.pageSize = 1;
this.coupcardCheckList();
},
handleSizeChange(val) {
this.listParams.pageSize = val;
this.coupcardCheckList();
},
handleCurrentChange(val) {
this.listParams.currentPage = val;
this.coupcardCheckList();
},
async coupcardCheckList() {
this.loading = true;
if (this.dateTime) {
this.listParams.beginTime = formateDateTimeByType(this.dateTime[0],'yyyy-MM-dd');
this.listParams.endTime = formateDateTimeByType(this.dateTime[1],'yyyy-MM-dd');
} else {
this.listParams.beginTime = '';
this.listParams.endTime = '';
}
try {
let res = await coupcardCheckList(this.listParams);
this.tableList = res.result.result || [];
this.total = res.result.totalCount;
} catch (err) {
this.$tips({type:'error',message:'加载列表失败'});
}
this.loading = false;
},
exportCoupcardCheckExcel() {
if (this.dateTime) {
this.listParams.beginTime = formateDateTimeByType(this.dateTime[0],'yyyy-MM-dd');
this.listParams.endTime = formateDateTimeByType(this.dateTime[1],'yyyy-MM-dd');
} else {
this.listParams.beginTime = '';
this.listParams.endTime = '';
}
window.location = exportCoupcardCheckExcel+"?searchParam="+this.listParams.searchParam+"&beginTime="+this.listParams.beginTime+"&endTime="+this.listParams.endTime+'&requestProject=gic-web' ;
},
},
}
</script>
<template>
<div>
<router-view/>
</div>
</template>
<script>
export default {
name: "card",
created() {
window.scrollTo(0,0)
this.$store.commit('aside_handler',false);
this.$nextTick(_ => {
this.$store.commit('aside_handler',true);
})
}
};
</script>
<template>
<section class="dm-wrap">
<div class="pb22 clearfix">
<el-select class="w150" v-model="listParams.cardStatus" placeholder="选择卡券状态" @change="search">
<el-option v-for="(item,index) in cardStatusOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select class="w150" v-model="listParams.cardType" placeholder="选择卡券类型" @change="search">
<el-option v-for="(item,index) in cardTypeOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select class="w150" v-model="listParams.upperShelfStatus" placeholder="选择上架状态" @change="search">
<el-option v-for="(item,index) in upperShelfStatusOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input v-model="listParams.searchParam" class="w200 vertical-middle" placeholder="输入名称/备注" clearable @change="loadGicCardList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="$router.push('/card/add')">新增卡券</el-button>
</div>
<ul class="clearfix" v-loading="loading" element-loading-text="拼命加载中" >
<card-item @adjust-stock="preAdjustStock" :item="v" v-for="(v,i) in tableList" :key="i" @delete-card="delData"></card-item>
</ul>
<div class="text-center" v-if="tableList.length === 0">
<img class="block block-center pt100" width="60" height="60" src="../../assets/img/no-data_icon.png" alt="">
<el-button class="block block-center mt10" type="text" @click="$router.push('/card/add')">新增卡券</el-button>
</div>
<adjust-stock :show.sync="adjustStock" :totalCount="currentCard.couponStock" :coupCardId="currentCard.coupCardId" @refresh="delayRefresh"></adjust-stock>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
</section>
</template>
<script>
import {loadGicCardList,deleteCard} from '@/service/api/giccardApi.js';
import adjustStock from './adjust-Stock';
import cardItem from './card-item';
export default {
name: 'card-record',
data () {
return {
listParams:{cardType:-1,cardStatus:-1,upperShelfStatus:-1,searchParam:'',currentPage:1,pageSize:20},
cardTypeOptions:[{label:'全部',value:-1},{label:'抵金券',value:0},{label:'折扣券',value:1},{label:'兑换券',value:2}],
cardStatusOptions:[{label:'全部',value:-1},{label:'正常',value:1},{label:'过期',value:2}],
upperShelfStatusOptions:[{label:'全部',value:-1},{label:'已下架',value:0},{label:'待上架',value:1},{label:'已上架',value:2}],
total:0,
loading:false,
tableList:[],
sortFlag:false,
adjustStock:false,
currentCard:{}
}
},
components:{
'adjust-stock':adjustStock,
'card-item':cardItem
},
created() {
this.loadGicCardList();
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'卡券营销',path:'/card'},{name:'卡券库',path:''}])
},
methods: {
//编辑库存 前置
preAdjustStock(val) {
this.currentCard = val;
this.adjustStock = true;
},
//修改库存后台异步 所以这边延迟刷新列表
delayRefresh(val) {
this.currentCard.couponStock = val;
},
handleSizeChange(val) {
this.listParams.pageSize = val;
this.loadGicCardList();
},
handleCurrentChange(val) {
this.listParams.currentPage = val;
this.loadGicCardList();
},
search() {
this.listParams.currentPage = 1;
this.loadGicCardList();
},
async loadGicCardList() {
this.loading = true;
// try {
let res = await loadGicCardList(this.listParams);
this.tableList = res.result.result;
this.total = res.result.totalCount;
// } catch (err) {
this.$tips({type:'error',message:'加载列表失败'});
// }
this.loading = false;
},
delData(val) {
this.$confirm('是否删除该卡券?', '提示', {
confirmButtonText: '确定',
cancelBUttonText: '取消',
type: 'warning'
}).then(() => {
this.deleteCard(val);
}).catch(() => {
this.$tips({type: 'info',message: '已取消删除'});
});
},
async deleteCard(coupCardId){
let res = await deleteCard({coupCardId});
this.$tips({type: 'success',message: '删除成功!'});
this.loadGicCardList();
}
},
}
</script>
<template>
<section>
<draggable class="drag-list" v-model="copylist" :options="{group:'people'}" @start="drag=true" @end="getSortData">
<div class="drag-item" v-for="(v,i) in copylist" :key="i">
<div class="drag-item--preview clearfix" v-show="v.flag" @mouseover="v.maskShow = true" @mouseout="v.maskShow = false">
<div class="drag-item--editor__left fl">
<div class="drag-item--editor__opt">
<div class="drag-item--img" :style="'background-image:url('+v.imgUrl+')'"></div>
</div>
</div>
<div class="drag-item--editor__right fl pl20">
<div class="drag-item--content">
<p>{{v.text}}</p>
</div>
</div>
</div>
<div class="drag-item--editor clearfix" v-show="!v.flag">
<div class="drag-item--editor__left fl">
<div class="drag-item--editor__opt">
<el-upload-wrap :imgUrl.sync="v.copyImgUrl" :imgCode.sync="v.copyImgCode"></el-upload-wrap>
</div>
</div>
<div class="drag-item--editor__right fl pl20">
<dm-input type="textarea" :rows="10" v-model="v.copyText" :maxlength="5000"></dm-input>
</div>
<div class="text-right pt20 fr">
<el-button size="small" @click="cancel(v,i)">取消</el-button>
<el-button size="small" type="primary" @click="confirm(v)">确认</el-button>
</div>
</div>
<div class="drag-item--mask" v-show="v.maskShow" @mouseover="v.maskShow = true" @mouseout="v.maskShow = false">
<i class="el-icon-rank"></i>
<span>可拖拽排序</span>
</div>
<div class="drag-item--opt" v-show="v.flag">
<i class="el-icon-edit" @click="edit(v,i)"></i>
<i class="el-icon-delete" @click="del(v,i)"></i>
</div>
</div>
</draggable>
<div class="add--opt__icon" @click="addImgText">
<i class="el-icon-plus"></i>
<span>添加图文</span>
</div>
</section>
</template>
<script>
import draggable from 'vuedraggable'
import elUploadWrap from '@/components/upload/el-upload-wrap'
export default {
props:{
list:Array
},
components: {
draggable,
elUploadWrap
},
data() {
return {
drag:true,
copylist:[]
}
},
watch:{
list(val){
this.copylist = this.list.slice(0)
}
},
methods:{
addImgText() {
this.list.push({
flag:false,
maskShow:false,
copyImgUrl:'',
copyText:'',
copyImgCode:'',
imgUrl:'',
imgCode:'',
text:''
})
},
edit(v) {
v.flag = false;
v.copyImgCode = v.imgCode;
v.copyText = v.text;
v.copyImgUrl = v.imgUrl;
},
confirm(v) {
v.flag = true;
v.imgCode = v.copyImgCode;
v.text = v.copyText;
v.imgUrl = v.copyImgUrl;
this.$emit('update:list',this.copylist)
},
cancel(v,i) {
v.flag = true
if (!v.imgUrl && !v.text) {
this.copylist.splice(i,1)
}
this.$emit('update:list',this.copylist)
},
del(v,i) {
this.$confirm('是否删除该图文消息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.list.splice(i,1);
this.$tips({type: 'success',message: '删除成功!'});
}).catch(() => {
this.$tips({type: 'info',message: '已取消删除'});
});
},
getSortData(val) {
this.$nextTick(_ => {
console.log(this.list.map(v => v.text))
this.$emit('update:list',this.copylist)
})
this.drag = false
}
}
}
</script>
<style lang="scss" scoped>
.drag-list{
width: 908px;
}
.drag-item{
position: relative;
border-bottom: 4px solid #fff;
min-width: 1000px;
&:last-child{
border-bottom: none;
}
&--editor{
display: inline-block;
vertical-align: middle;
background: #f0f2f5;
padding: 15px;
width: 888px;
&__opt{
width: 397px;
height: 222px;
}
&__right{
width: 470px;
height: 222px;
}
}
&--preview{
display: inline-block;
vertical-align: middle;
background: #f0f2f5;
padding: 15px;
}
&--content{
width: 470px;
height: 222px;
background:#fff;
line-height: 1.5;
border-radius:4px;
p{
padding: 15px;
}
}
&--img{
width: 397px;
height: 222px;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
&--mask{
width: 878px;
height: 222px;
background:rgba(0,0,0,0.6);
position: absolute;
top: 15px;
left:15px;
cursor: move;
color: #fff;
line-height: 222px;
text-align: center;
span{
font-size: 16px;
vertical-align: middle;
}
i{
font-size: 23px;
vertical-align: middle;
}
}
&--opt{
display: inline-block;
vertical-align: middle;
padding-left: 10px;
i{
cursor: pointer;
font-size: 19px;
color:#909399;
padding:5px;
&:hover{
color: #1890ff;
}
}
.el-icon-delete{
&:hover{
color:#F56C6C;
}
}
}
}
.add--opt__icon {
width: 915px;
height: 61px;
border: 1px dashed #e1e1e1;
text-align: center;
margin:10px 0;
line-height: 61px;
color: #8c939d;
cursor: pointer;
&:hover {
border: 1px dashed #1890ff;
color: #1890ff;
}
i {
font-size: 18px;
text-align: center;
vertical-align: middle;
}
span{
vertical-align: middle;
}
}
</style>
<template>
<section>
<div class="pb22">
<el-date-picker v-model="dateTime" @change="search" class="w250" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-select class="dm-select" v-model="listParams.cardStatus" placeholder="选择卡券状态" @change="search">
<el-option v-for="(item,index) in cardStatusOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input v-model="listParams.search" class="w200" placeholder="请输入发送人名称" @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button icon="iconfont icon-icon_yunxiazai fz14" class="fr" type="primary" @click="exportReceivedRecordExcel"> 导出订单</el-button>
</div>
<el-table tooltipEffect="light" :data="recordList" style="width: 100%" v-loading="recordLoading">
<el-table-column width="135" align="left" prop="receiveTime" label="领取时间">
<template slot-scope="scope">
{{formateDateTimeByType(scope.row.receiveTime,'yyyy-MM-dd-HH-mm')}}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="140" header-align="left" align="left" :key="Math.random()" prop="clerkId" label="会员信息">
<template slot-scope="scope">
<a :href="'/member/#/wechatmemberDetail?memberId='+scope.row.memberId" target="_blank">
<img class="vertical-middle table__avatar" :src="scope.row.thirdimgurl || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle"><p>{{scope.row.memberName}}</p><p class="gray">{{scope.row.phoneNum}}</p></div>
</a>
</template>
</el-table-column>
<el-table-column width="80" align="left" prop="receiveTime" label="卡券类型">
<template slot-scope="scope">
{{scope.row.cardType===0?'抵金券':(scope.row.cardType===1?'折扣券':'兑换券')}}
</template>
</el-table-column>
<el-table-column min-width="120" align="left" prop="receiveTime" label="卡券名称">
<template slot-scope="scope">
<p class="blue" @click="$router.push('/card/info/'+scope.row.coupCardId)">{{scope.row.cardName}}</p>
</template>
</el-table-column>
<el-table-column width="115" align="left" prop="receiveTime" label="卡券代码">
<template slot-scope="scope">{{scope.row.cardCode}}</template>
</el-table-column>
<el-table-column width="80" align="left" prop="status" label="卡券状态">
<template slot-scope="scope">
{{scope.row | filterCardStatus}}
</template>
</el-table-column>
<el-table-column width="80" align="left" prop="receiveName" label="投放来源"></el-table-column>
<el-table-column width="80" align="left" prop="receiveName" label="来源明细">
<template slot-scope="scope">
{{(scope.row.receiveCode == 'RECEIVE_003' || scope.row.receiveCode == 'RECEIVE_005' || scope.row.receiveCode == 'RECEIVE_007' || scope.row.receiveCode == 'RECEIVE_004' || scope.row.receiveCode == 'RECEIVE_010')?scope.row.receiveTypeExcel:'--'}}
</template>
</el-table-column>
<el-table-column width="100" align="left" prop="receiveName" label="核销来源">
<template slot-scope="scope">
{{scope.row.status !== 4 ?'--':(scope.row.checkSource?'手动核销':'自动核销')}}
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="120px" fixed="right">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.status === 4 && Date.now() < scope.row.limitTime + 24*60*60*1000" @click="orderData(scope.row)">核销</el-button>
<el-button type="text" v-if="scope.row.status === 4 && Date.now() < scope.row.limitTime + 24*60*60*1000" @click="delData(scope.row)">销毁</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination v-show="recordList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
<card-order :show.sync="cardOrderShow" :obj="currentObj"></card-order>
</section>
</template>
<script>
import {formateDateTimeByType} from '@/utils/index.js'
import {cardRecordPage,deleteCardPuton,coupcardDestroy,exportReceivedRecordExcel} from '@/service/api/cardApi.js'
import cardOrder from './card-order'
export default {
name: 'record-get',
data () {
return {
defaultAvatar:require('../../assets/img/head_default.png'),
formateDateTimeByType,
dateTime:[Date.now()-30*24*60*60*1000,Date.now()],
cardStatusOptions:[ {value:0,label:'全部'},{value:4,label:'待核销',},{ value:5,label:'已核销'},{ value:6,label:'已过期'},{ value:7,label:'已销毁'}],
recordLoading:false,
recordList:[],
listParams:{
beginTime:'',
endTime:'',
cardStatus:'',
recordType:1,
search:'',
currentPage:1,
pageSize:20
},
total:0,
cardOrderShow:false,
currentObj:{}
}
},
components:{
'card-order':cardOrder
},
created() {
this.cardRecordPage();
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'卡券营销',path:'/card'},{name:'卡券记录',path:'/card/record'},{name:'领取记录',path:''}])
},
methods: {
search() {
this.listParams.currentPage = 1;
this.cardRecordPage();
},
handleSizeChange(val) {
this.listParams.pageSize = val;
this.cardRecordPage();
},
handleCurrentChange(val) {
this.listParams.currentPage = val;
this.cardRecordPage();
},
async cardRecordPage() {
this.recordLoading = true;
if (this.dateTime) {
this.listParams.beginTime = formateDateTimeByType(this.dateTime[0],'yyyy-MM-dd');
this.listParams.endTime = formateDateTimeByType(this.dateTime[1],'yyyy-MM-dd');
} else {
this.listParams.beginTime = '';
this.listParams.endTime = '';
}
let res = await cardRecordPage(this.listParams);
this.recordList = res.result.result;
this.total = res.result.totalCount;
this.recordLoading = false;
},
//发送记录操作: 删除
delData(row) {
this.$confirm('是否销毁该卡券,一旦销毁无法恢复?', '提示', {
confirmButtonText: '确定',
cancelBUttonText: '取消',
type: 'warning'
}).then(() => {
coupcardDestroy({coupLogId:row.coupLogId,memberId:row.memberId}).then(res => {
this.$tips({type: 'success',message: '销毁成功!'});
this.cardRecordPage();
}).catch(err => {
this.$tips({type: 'error',message: '销毁失败!'});
})
}).catch(() => {
this.$tips({type: 'info',message: '已取消销毁'});
});
},
orderData(row) {
this.cardOrderShow = true
this.currentObj = row;
},
exportReceivedRecordExcel() {
if (this.dateTime) {
this.listParams.beginTime = formateDateTimeByType(this.dateTime[0],'yyyy-MM-dd');
this.listParams.endTime = formateDateTimeByType(this.dateTime[1],'yyyy-MM-dd');
} else {
this.listParams.beginTime = '';
this.listParams.endTime = '';
}
window.location = exportReceivedRecordExcel+"?searchParam="+this.listParams.search+"&beginTime="+this.listParams.beginTime+"&endTime="+this.listParams.endTime+"&cardStatus="+this.listParams.cardStatus+'&requestProject=gic-web' ;
},
},
filters:{
filterCardStatus(row) {
let _content = '';
if(row.status == 4){
_content = (Date.now() >= row.limitTime + 24*60*60*1000)?"已过期":"待核销";
}else if(row.status == 5){
_content = "已核销" + formateDateTimeByType(row.useTime,'yyyy-MM-dd-HH-mm-ss');
}else if(row.status == 6){
_content = "已过期";
}else if(row.status == 7){
_content = "已销毁" + formateDateTimeByType(row.useTime,'yyyy-MM-dd-HH-mm-ss');
}
return _content;
}
}
}
</script>
<template>
<section>
<div class="pb22">
<el-input class="w300" v-model="listParams.search" placeholder="输入卡券名称/备注名/活动名" @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
</div>
<el-table tooltipEffect="light" :data="recordList" style="width: 100%" v-loading="loading">
<el-table-column width="160" align="left" prop="putonTime" label="投放时间">
<template slot-scope="scope">
{{formateDateTimeByType(scope.row.putonTime,'yyyy-MM-dd-HH-mm')}}
</template>
</el-table-column>
<el-table-column width="150" align="left" prop="cardName" label="卡券名称">
<template slot-scope="scope">
<p>{{scope.row.cardName}}</p>
<p class="fz12 gray">{{scope.row.subName}}</p>
</template>
</el-table-column>
<el-table-column v-for="(v,i) in recordHeader" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="i" :prop="v.prop" :label="v.label" :formatter="v.formatter"></el-table-column>
<el-table-column label="操作" align="left" width="150px" fixed="right">
<template slot-scope="scope" >
<el-button type="text" v-if="scope.row.putonStatus === 2 || scope.row.putonStatus === 3" @click="queryData(scope.row)">详情</el-button>
<el-button type="text" v-if="scope.row.putonStatus !== 2 && scope.row.putonStatus !== 3" @click="editData(scope.row)">编辑</el-button>
<el-button type="text" v-if="scope.row.putonStatus !== 2" @click="delData(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination v-show="recordList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
</section>
</template>
<script>
import {cardRecordPage,deleteCardPuton} from '@/service/api/cardApi.js';
import {formateDateTimeByType} from '@/utils/index.js'
export default {
name: 'card-record-send',
data () {
return {
formateDateTimeByType,
loading:false,
recordList:[],
recordHeader:[
{label:'活动名称',prop:'putonName',minWidth:'150', tooltip:true,align:'left'},
{label:'投放人数',prop:'issuingQuantity',width:'80',align:'left'},
{label:'领取数量',prop:'getedQuantity',width:'80',align:'left'},
{label:'领取率',prop:'getedQuantity',width:'80',align:'left', formatter(row) {
return ((row.getedQuantity) * 100/ (row.issuingQuantity === 0 ? 1 : row.issuingQuantity)).toFixed(2) + '%'
}},
{label:'使用数量',prop:'usageQuantity',width:'80',align:'left'},
{label:'核销率',prop:'usageQuantity',width:'80',align:'left', formatter(row) {
return ((row.usageQuantity) * 100/ (row.getedQuantity === 0 ? 1 : row.getedQuantity)).toFixed(2) + '%'
}},
{label:'销售额',prop:'saleAmount',width:'80',align:'left'},
{label:'状态',prop:'putonStatus',width:'80',align:'left',formatter(row) {
let status = '等待发送'
switch(row.putonStatus) {
case 1:
status = '等待发送';
break;
case 2:
status = '正在发送';
break;
case 3:
status = '已发送';
break;
case 4:
status = '无接收人';
break;
case 5:
status = '库存不足';
break;
default:
status = '投放错误';
break;
}
return status;
}},
],
listParams:{
beginTime:'',
endTime:'',
cardStatus:'',
recordType:0,
search:'',
currentPage:1,
pageSize:20
},
total:0,
}
},
created() {
this.cardRecordPage();
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'卡券营销',path:'/card'},{name:'卡券记录',path:'/card/record'},{name:'投放记录',path:''}])
},
methods: {
search() {
this.listParams.currentPage = 1;
this.cardRecordPage();
},
handleSizeChange(val) {
this.listParams.pageSize = val;
this.cardRecordPage();
},
handleCurrentChange(val) {
this.listParams.currentPage = val;
this.cardRecordPage();
},
async cardRecordPage() {
this.loading = true;
let res = await cardRecordPage(this.listParams);
console.log(res)
this.recordList = res.result.result;
this.total = res.result.totalCount;
this.loading = false;
},
//发送记录操作--查看数据
queryData(row){
this.$router.push('/card/groupinfo/'+row.putonId)
},
//发送记录操作: 删除
delData(row) {
this.$confirm('是否删除该投放记录?', '提示', {
confirmButtonText: '确定',
cancelBUttonText: '取消',
type: 'warning'
}).then(() => {
deleteCardPuton({putonId:row.putonId}).then(res => {
this.$tips({type: 'success',message: '删除成功!'});
this.cardRecordPage();
}).catch(err => {
this.$tips({type: 'error',message: '删除失败!'});
})
}).catch(() => {
this.$tips({type: 'info',message: '已取消删除'});
});
},
//发送记录操作: 编辑
editData(row) {
this.$router.push('/card/groupsend/'+row.putonId)
}
}
}
</script>
<template>
<section class="dm-wrap">
<router-view></router-view>
</section>
</template>
<script>
export default {
data () {
return {
}
},
created(){
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'卡券营销',path:'/card'},{name:'卡券记录',path:'/card/list'}])
}
}
</script>
import Vue from 'vue'
export default Vue.component('render-temp', {
props: {
item: Object
},
methods:{
handler(val) {
this.$emit('handler',val)
}
},
render(h) {
const _this = this;
const autingHtml = <span class="green">审核中</span>;
const customCodesyncHtml = <span class="danger-color">正在上传卡券Code</span>;
const autingFaildHtml = <span class="danger-color">审核失败</span>;
const autingUpdateFaildHtml = <span class="danger-color">更新失败</span>;
const statushtml = <span>
<a title="投放" onClick={_this.handler.bind(null,1)}><i class="iconfont icon-daohang-"></i></a>
<a title="报表" onClick={_this.handler.bind(null,2)}><i class="el-icon-tickets"></i></a>
<a title="编辑" onClick={_this.handler.bind(null,3)}><i class="el-icon-edit"></i></a>
<a title="删除" onClick={_this.handler.bind(null,4)}><i class="el-icon-delete"></i></a>
</span>;
const overDateHtml = <span>
<span class="danger">已过期</span>
<a title="报表" onClick={_this.handler.bind(null,2)}><i class="el-icon-tickets"></i></a>
<a title="详情" onClick={_this.handler.bind(null,5)}><i class="el-icon-document"></i></a>
<a title="删除" onClick={_this.handler.bind(null,4)}><i class="el-icon-delete"></i></a>
</span>;
const noputonStatushtml = <span>
<a title="报表" onClick={_this.handler.bind(null,2)}><i class="el-icon-tickets"></i></a>
<a title="编辑" onClick={_this.handler.bind(null,3)}><i class="el-icon-edit"></i></a>
<a title="删除" onClick={_this.handler.bind(null,4)}><i class="el-icon-delete"></i></a>
</span>;
const statusNostockhtml = <span>
<a title="报表" onClick={_this.handler.bind(null,2)}><i class="el-icon-tickets"></i></a>
<a title="编辑" onClick={_this.handler.bind(null,3)}><i class="el-icon-edit"></i></a>
<a title="删除" onClick={_this.handler.bind(null,4)}><i class="el-icon-delete"></i></a>
</span>;
const statusFaildhtml = <span>
<a title="编辑" onClick={_this.handler.bind(null,3)}><i class="el-icon-edit"></i></a>
<a title="删除" onClick={_this.handler.bind(null,4)}><i class="el-icon-delete"></i></a>
</span>;
const _html = (this.item.cardEffectiveMode == 0 && (this.item.endDate < Date.now())) ? overDateHtml : statushtml;
if (this.item.auditingStatus === 0) {
return (<div class="fr">{autingHtml}</div>)
}else if (this.item.auditingStatus === -1) {
return (<div class="fr">{autingFaildHtml}{statusFaildhtml}</div>)
}else if (this.item.auditingStatus === -2)
return (<div class="fr">{autingUpdateFaildHtml}{_html}</div>)
else if (this.item.useCustomCode == 1 && this.item.customCodeSync == 1)
return (<div class="fr">{customCodesyncHtml}</div>)
else if (this.item.stock === 0)
return (<div class="fr">{statusNostockhtml}</div>)
else if (this.item.cardLimit && this.item.cardLimit == 1)
return (<div class="fr">{_html}</div>)
else return (<div class="fr">{noputonStatushtml}</div>)
}
})
<template>
<el-dialog title="添加卡券" :visible.sync="show" width="80%" :before-close="close">
<div class="pb10">
<span class="pr10">卡券共{{total}}</span>
<el-input v-model="listParams.searchParams" class="w250" placeholder="输入门店信息/订单流水号" clearable @change="cardPageList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<span class="fz12 gray pl20">*领取限制>1的卡券不支持选择,系统已自动过滤。</span>
</div>
<el-table tooltipEffect="light" ref="multipleTable" :data="tableList" style="width: 100%;cursor:pointer;" height="400" @row-click="rowClick" v-loading="loading" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" label="选择"></el-table-column>
<el-table-column :show-overflow-tooltip="true" align="left" prop="storeCode" label="卡券名">
<template slot-scope="scope">
<p>{{scope.row.cardName}}</p>
<p class="gray fz12">{{scope.row.subName}}</p>
</template>
</el-table-column>
<el-table-column width="100" align="left" prop="couponStock" label="卡券数量"></el-table-column>
<el-table-column width="100" align="left" prop="getedQuantity" label="领取数量"></el-table-column>
<el-table-column width="100" align="left" prop="usageQuantity" label="使用数量"></el-table-column>
<el-table-column width="90" align="left" prop="col4" label="核销率">
<template slot-scope="scope">
{{(scope.row.usageQuantity * 100 / (scope.row.getedQuantity === 0 ? 1 : scope.row.getedQuantity)).toFixed(2)}}%
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" width="80px" align="left" prop="storeCode" label="适用门店">
<template slot-scope="scope">
{{scope.row.storeMode === 0 ? "所有门店" : (scope.row.storeMode === 1 ? "部分分组" : "部分门店")}}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" align="left" prop="storeCode" label="有效期">
<template slot-scope="scope">
<span v-if="scope.row.cardEffectiveMode !== 0">领取后第{{scope.row.startDay+1}}-{{scope.row.limitDay+scope.row.startDay}}</span>
<span v-if="scope.row.cardEffectiveMode === 0">{{formateDateTimeByType(scope.row.beginDate,'yyyy-MM-dd')}}{{formateDateTimeByType(scope.row.endDate,'yyyy-MM-dd')}}</span>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" align="left" prop="storeCode" label="适用条件">
<template slot-scope="scope">
{{scope.row.useCondition | filterUseCondition}}
</template>
</el-table-column>
</el-table>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
<span slot="footer" class="dialog-footer">
<span class="pr10" v-show="multipleSelection.length>0">已选择{{multipleSelection.length}}张卡券</span>
<el-button @click="close">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import {cardPageList,saveShelfCard} from '@/service/api/cardApi.js';
import {throttle} from '@/utils/index.js';
import {formateDateTimeByType} from '@/utils/index.js'
export default {
name:'shelf-add',
props:{
obj:{
type:Object,
default(){
return {
memberId:'',
coupCardId:''
}
}
},
show:{
type:Boolean,
default:false
}
},
data(){
return{
throttle,
formateDateTimeByType,
loading:false,
listParams:{
currentPage:1,
pageSize:20,
searchParam:'',
sortBy:'',
limitOne:1,
selected:1,
shelfId:this.$route.params.id
},
total:0,
tableList:[],
multipleSelection:[]
}
},
watch: {
selectedId(val) {
this.$emit('submit-order',this.selectedId);
},
show(val) {
if (val) this.cardPageList();
}
},
methods:{
rowClick(row, event, column) {
this.$refs.multipleTable.toggleRowSelection(row);
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleSizeChange(val) {
this.listParams.pageSize = val;
this.cardPageList();
},
handleCurrentChange(val) {
this.listParams.currentPage = val;
this.cardPageList();
},
async cardPageList() {
this.loading = true;
let res = await cardPageList(this.listParams);
this.tableList = res.result.result;
this.total = res.result.totalCount;
this.loading = false;
},
close() {
this.$emit('update:show',false)
},
//TODO
submit() {
if (this.multipleSelection.length===0) {
this.tips({type:"warning",message:"未选择卡券"});
} else {
saveShelfCard({shelfId:this.$route.params.id,cardIds:this.multipleSelection.map(v =>v.coupCardId)}).then(res => {
if (res.errorCode === 0) {
this.$tips({type:'success',message:'添加卡券成功'})
this.close();
this.$emit('refresh');
} else {
this.$tips({type:'error',message:'添加卡券失败'})
}
}).catch (err => {
this.$tips({type:'error',message:'添加卡券失败'})
})
}
}
},
filters:{
filterUseCondition(val) {
var _useCondition = JSON.parse(val);
return (typeof _useCondition.sale_limit === 'undefined' ? ""
: ((typeof _useCondition.sale_limit.fee === 'undefined' ? ""
: "最低消费满" + _useCondition.sale_limit.fee + ";") + (typeof _useCondition.sale_limit.goods === 'undefined' ? ""
: "消费指定商品" + _useCondition.sale_limit.goods + ";")))
+ (typeof _useCondition["goods"] === 'undefined' ? ""
: ((typeof _useCondition.goods.ok === 'undefined' ? ""
: "适用商品(" + _useCondition.goods.ok + ");") + (typeof _useCondition.goods.no === 'undefined' ? ""
: "不适用商品(" + _useCondition.goods.no + ");")))
+ (typeof _useCondition.only === 'undefined' ? ""
: "不可与其他优惠共享");
}
}
}
</script>
<template>
<section class="dm-wrap">
<div class="pb22">
<store-group class="w200 pr7" v-model="currentData" @commit-store="storeChange"></store-group>
<el-input class="w300" v-model="listParams.searchParam" clearable placeholder="输入门店名称/代码/地区名" @change="searchParam"><i slot="prefix" class="el-input__icon el-icon-searchParam"></i></el-input></div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading" @sort-change="sortList">
<el-table-column min-width="140" align="left" prop="shelfName" label="门店名称">
<template slot-scope="scope">
<p>{{scope.row.shelfName}}</p>
<p class="fz13 gray">{{scope.row.addressFullName}}</p>
</template>
</el-table-column>
<el-table-column min-width="80" align="left" prop="storeGroupFullName" label="所在分组" sortable="custom"></el-table-column>
<el-table-column width="110" align="left" prop="cardSize" label="卡券数量" sortable="custom"></el-table-column>
<el-table-column width="110" align="left" prop="getedQuantity" label="领取数量" sortable="custom"></el-table-column>
<el-table-column width="110" align="left" prop="usageQuantity" label="使用数量" sortable="custom"></el-table-column>
<el-table-column width="100" align="left" prop="col4" label="核销率" sortable="custom">
<template slot-scope="scope">
{{(scope.row.usageQuantity * 100 / (scope.row.getedQuantity === 0 ? 1 : scope.row.getedQuantity)).toFixed(2)}}%
</template>
</el-table-column>
<el-table-column width="100" align="left" prop="saleAmount" label="销售额" sortable="custom"></el-table-column>
<el-table-column label="操作" align="left" width="160px" fixed="right">
<template slot-scope="scope" >
<el-button type="text" @click="$router.push('/card/shelf/'+scope.row.shelfId)">卡券管理</el-button>
<el-button type="text" @click="$router.push('/card/shelfanalysis/'+scope.row.shelfId)">查看报表</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
</section>
</template>
<script>
import {pageCardShelfs} from '@/service/api/cardApi.js';
import storeGroup from '@/components/storeGroup/index';
export default {
name: 'card-record-send',
data () {
return {
loading:false,
tableList:[],
listParams:{
sortBy:'',
searchParam:'',
storeGroupId:'',
currentPage:1,
pageSize:20
},
total:0,
currentData:{label:'',id:''},
}
},
components:{
storeGroup
},
created() {
this.pageCardShelfs();
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'卡券营销',path:'/card'},{name:'卡券展架',path:'/card/shelf'}])
},
methods: {
//门店回调
storeChange(val) {
this.currentData = val;
if (val.id) {
this.listParams.storeGroupId = val.id;
this.pageCardShelfs();
}
},
searchParam() {
this.listParams.currentPage = 1;
this.pageCardShelfs();
},
handleSizeChange(val) {
this.listParams.pageSize = val;
this.pageCardShelfs();
},
handleCurrentChange(val) {
this.listParams.currentPage = val;
this.pageCardShelfs();
},
async pageCardShelfs() {
this.loading = true;
let res = await pageCardShelfs(this.listParams);
this.tableList = res.result.result;
this.total = res.result.totalCount;
this.loading = false;
},
//列表 排序
sortList(obj) {
this.listParams.sortBy = (obj.order === 'descending') ? (obj.prop +' desc') : obj.prop;
this.pageCardShelfs();
}
}
}
</script>
......@@ -32,12 +32,12 @@
</section>
<section class="dm-form__wrap">
<h3 class="dm-title__label">短信模板设置</h3>
<div class="border1" style="padding:15px;">
<div class="border-radius2" style="padding:15px;">
<sms-temp pbSize="pb15" :activeId.sync="info.smsTemplateId"></sms-temp>
</div>
</section>
<div class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button type="primary" @click="sendSms">发 送</el-button>
<el-button type="primary" @click="sendSms">提 交</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
</el-form>
......
......@@ -46,8 +46,8 @@
<div class="sms-table_info">
<img class="table__avatar vertical-middle" :src="scope.row.thirdImgUrl" alt="" srcset="">
<div class="inline-block vertical-middle">
<p class="fz14">{{scope.row.memberName}}</p>
<p class="fz12 gray">{{scope.row.nickname}}</p>
<p class="table-name--ellipsis">{{scope.row.memberName}}</p>
<p class="fz13 gray">{{scope.row.nickname}}</p>
</div>
</div>
</template>
......@@ -161,7 +161,8 @@ import errorCodeDialog from './errorCode'
<style lang="scss" scoped>
.message-detail__label {
/deep/ .el-col {
margin:10px 0;
margin: 0 0 16px;
line-height: 22px;
}
}
</style>
......@@ -71,9 +71,13 @@ export default {
{label:'发送人',prop:'sendName',width:'100', tooltip:true,align:'left'},
{label:'模板内容',prop:'templateContent',minWidth:'150', tooltip:false,align:'left',
formatter:function(row, column, cellValue, index){
return (<el-popover placement="top-start" width="200" trigger="hover" content={row.templateContent}>
<div class="ellipsis" slot="reference">{row.templateContent}</div>
</el-popover>)
if (row.templateContent && row.templateContent.length > 10) {
return (<el-popover placement="top-start" width="200" trigger="hover" content={row.templateContent}>
<div class="ellipsis" slot="reference">{row.templateContent}</div>
</el-popover>)
} else {
return (<span>{row.templateContent}</span>)
}
}
},
{label:'计划人数',prop:'sendCount',width:'100',align:'left'},
......
......@@ -16,7 +16,7 @@
<el-select v-if="$route.params.type ==='call'" class="dm-select" v-model="taskType" placeholder="选择发送状态" @change="loadAll(true)">
<el-option v-for="item in taskTypeOptions" :key="item.taskType" :label="item.taskType" :value="item.ecmName"></el-option>
</el-select>
<el-input v-model="listParams.searchParam" class="w250" :placeholder="placeholder" clearable @change="loadAll(true)"></el-input>
<el-input v-model="listParams.searchParam" class="w250" :placeholder="placeholder" clearable @change="loadAll(true)"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width:100%" v-loading="loading" v-if="$route.params.type ==='marketing'">
<el-table-column align="left" width="170" prop="sendTime" label="发送时间" >
......@@ -37,7 +37,14 @@
</template>
</el-table-column>
<el-table-column label="模板ID" align="left" width="100" prop="chartsDate"></el-table-column>
<el-table-column :show-overflow-tooltip="true" label="短信内容" align="left" min-width="200" prop="remark"></el-table-column>
<el-table-column label="短信内容" align="left" min-width="200" prop="remark">
<template slot-scope="scope">
<el-popover class="item" trigger="hover" width="200" v-if="scope.row.remark && scope.row.remark.length > 10" :content="scope.row.remark" placement="top-start">
<span class="ellipsis" slot="reference" >{{scope.row.remark}}</span>
</el-popover>
<span v-else>{{scope.row.remark}}</span>
</template>
</el-table-column>
</el-table>
<el-table tooltipEffect="light" :data="tableList" style="width:100%" v-loading="loading" v-if="$route.params.type ==='sms'">
<el-table-column align="left" width="170" prop="createTime" label="发送时间" >
......
......@@ -72,7 +72,7 @@
</el-table>
</section>
<div class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button type="primary" @click="submit">发 送</el-button>
<el-button type="primary" @click="submit">提 交</el-button>
<el-button @click="$router.go(-1)">返回</el-button>
</div>
</div>
......
......@@ -2,7 +2,7 @@
* @Author: zhangmeng
* @Date: 2018-08-14 15:45:36
* @Last Modified by: zhangmeng
* @Last Modified time: 2018-09-28 11:38:09
* @Last Modified time: 2018-09-28 18:48:46
*/
<template>
<section class="dm-wrap">
......@@ -85,9 +85,13 @@ export default {
} else {
temp = <span>{row.content}</span>;
}
return (<el-popover placement="top-start" width="200" trigger="hover" content={row.content}>
if (row.content && row.content.length > 10) {
return (<el-popover placement="top-start" width="200" trigger="hover" content={row.content}>
<div class="ellipsis" slot="reference">{temp}</div>
</el-popover>)
} else {
return (temp);
}
}
},
{label:'营销场景',prop:'sceneSettingName',width:'100',align:'left'},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment