Commit 1fa3b928 by zhangmeng

push

parent fcef6617
No preview for this file type
......@@ -25,6 +25,7 @@
"viser-vue": "^2.2.5",
"vue": "^2.5.2",
"vue-axios": "^2.1.1",
"vue-photo-preview": "^1.0.9",
"vue-qr": "^1.3.8",
"vue-router": "^3.0.1",
"vue-ueditor-wrap": "^1.3.4",
......
<template>
<div id="app">
<keep-alive :include="include">
<router-view></router-view>
</keep-alive>
<lg-preview></lg-preview>
</div>
</template>
......
......@@ -153,3 +153,22 @@
margin-top:14px;
}
}
.el-table--border::after, .el-table--group::after, .el-table::before {
content: '';
position: relative;
background-color: #ebeef5;
z-index: 1;
}
.el-table__body-wrapper.is-scrolling-none~.el-table__fixed-right::before, .el-table__body-wrapper.is-scrolling-none~.el-table__fixed-right::before {
content: '';
position: relative;
left: 0;
bottom: 0;
width: 100%;
height: 1px;
background-color: #ebeef5;
z-index: 4;
}
......@@ -27,6 +27,7 @@ export default {
name: 'Preview',
computed: {
preview () {
console.log(window.LOGIC_EVENT_BUS.LOGIC_PREVIEW)
return window.LOGIC_EVENT_BUS.LOGIC_PREVIEW
}
},
......
......@@ -82,12 +82,21 @@ export default {
counterFn: function(counterTime) {
var vm = this;
var nowDate = new Date().getTime();
if (vm.pauseTime == 0) {
if (vm.pauseTime <= 0) {
var num = counterTime - nowDate; //计算时间毫秒差
} else {
vm.pauseTime = vm.pauseTime + 10;
var num = counterTime - vm.pauseTime; //计算时间毫秒差
}
// console.log(num)
if(num <= 0) {
this.stopCountFn();
this.$nextTick(_ => {
this.countString = '';
})
}
// console.log(num)
var leave1 = num % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
......@@ -115,7 +124,7 @@ export default {
vm.countVal = vm.countVal ? vm.countVal : new Date().getTime();
var timer = setInterval(function() {
vm.counterFn(vm.countVal);
}, 10);
}, 1000);
vm.globalTimer = timer;
vm.isStart = true;
}
......
......@@ -4,7 +4,7 @@
<input type="file" style="display:none;" :disabled="disabled" accept="image/gif, image/jpeg,image/png" ref="uploader" v-upload='this'>
</label>
<span class="fz12 gray" :style="tipsStyle"> {{tips}}</span>
<img v-if="model.imgUrl && showImg" v-preview="model.imgUrl" :src="model.imgUrl || ''" :width="width" :class="className" class="upload-show-img"/>
<img v-if="model.imgUrl && showImg" :src="model.imgUrl || ''" :width="width" :class="className" class="upload-show-img"/>
</div>
</template>
......
......@@ -4,7 +4,7 @@
<input type="file" style="display:none;" :disabled="disabled" accept="image/gif, image/jpeg,image/png" ref="uploader" v-upload='this'>
</label>
<span class="fz12 gray"> {{tips}}</span>
<img v-if="model.imgUrl" v-preview="model.imgUrl" :src="model.imgUrl || ''" :width="width" :class="className" class="upload-show-img"/>
<img v-if="model.imgUrl" :src="model.imgUrl || ''" :width="width" :class="className" class="upload-show-img"/>
</div>
</template>
......
......@@ -4,56 +4,39 @@ import router from './router'
import store from './store'
import {axios} from './service/api/index'
import directives from './directives'
import imgPreview from '@/components/imgPreview/'
// import componentMapping from '@/components'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import VueLazyLoad from 'vue-lazyload'
// import gicinput from '@gic-test/gic-input'
import vueGicHeader from '@gic-test/vue-gic-header'
import vueGicFooter from '@gic-test/vue-gic-footer'
import vueGicAsideMenu from '@gic-test/vue-gic-aside-menu/src/lib'
import vueGicCard from '@gic-test/vue-gic-card'
import vueGicStore from '@gic-test/vue-gic-store'
import vueGicStoreLinkage from '@gic-test/vue-gic-store-linkage/src/lib'
// import vueGicPeople from '@gic-test/vue-gic-people/src/lib';
import vueGicPeople from '@gic-test/vue-gic-people';
import vueGicConfirmPeople from '@gic-test/vue-gic-confirm-people/src/lib';
import install from 'packele'
import vueGicStoreGroup from '@gic-test/vue-gic-store-group'
import vueGicPeople from '@gic-test/vue-gic-people'
import vueGicConfirmPeople from '@gic-test/vue-gic-confirm-people/src/lib'
import install from 'packele'
Vue.use(install);
import preview from 'vue-photo-preview/src/lib/index.js'
import 'vue-photo-preview/dist/skin.css'
// import NwdLoading from '@/plugin/loading/index.js'
Vue.use(VueLazyLoad,{
error:'./assets/img/loaderror.png',
loading:'./assets/img/loading.gif'
})
Vue.config.productionTip = false
Vue.use(preview)
Vue.use(install)
Vue.use(ElementUI)
Vue.use(vueGicHeader)
Vue.use(vueGicFooter)
Vue.use(vueGicAsideMenu)
Vue.use(vueGicCard)
Vue.use(vueGicStore)
Vue.use(imgPreview)
Vue.use(vueGicStoreLinkage)
Vue.use(vueGicStoreGroup)
Vue.use(vueGicPeople)
Vue.use(vueGicConfirmPeople)
// Vue.use(gicinput)
Vue.prototype.axios = axios;
Vue.prototype.axios.withCredentials = true
Object.keys(directives).map(item => Vue.directive(item, directives[item]));
window.$bus = new Vue();
let flag = false
Vue.prototype.$tips = function ({message = '提示',type = 'success'}) {
......
......@@ -46,5 +46,13 @@ export default {
name: '投诉与建议处理',
component: problem
},
{
path: 'suggestion/info/:id',
name: '投诉与建议处理',
component: problem,
meta: {
type: 'info'
}
},
]
};
import Layout from '@/components/layout'
import Login from '@/views/login'
import page404 from '@/views/error/404'
import test from '@/test/storeInput'
......@@ -44,11 +43,6 @@ export default [
]
},
{
path: '/login',
name: 'GIC登录',
component: Login
},
{
path: '*',
name: '未知领域',
component: page404
......
import Vue from 'vue'
import axios from 'axios'
import config from '@/config'
import router from '@/router'
import { log } from '@/utils'
import qs from 'qs'
const _vm = new Vue();
// 加载最小时间
......@@ -18,6 +16,7 @@ let _apiHost = config.api
// 请求组(判断当前请求数)
let _requests = []
//创建一个请求实例
const instance = axios.create({
baseURL: _apiHost,
timeout: TIME_OUT_MAX,
......@@ -45,37 +44,42 @@ function popRequest(config) {
_requests.splice(_index, 1)
}
}
/**
* 错误的处理
* @param {*} code
* @param {string} [message='请求错误']
*/
function handlerErr(code,message = '请求错误') {
switch (code) {
case 404:
message = '404,错误请求'
break
message = '404,错误请求'
break
case 401:
_env? (router.push({ path: '/login', query: { redirect: router.currentRoute.fullPath } })) : (window.location.href = config.api+'/gic-web/#/');
message = '未授权'
break
window.location.href = config.api+'/gic-web/#/'
message = '登录失效'
break
case 403:
message = '禁止访问'
break
message = '禁止访问'
break
case 408:
message = '请求超时'
break
message = '请求超时'
break
case 500:
message = '服务器内部错误'
break
message = '服务器内部错误'
break
case 501:
message = '功能未实现'
break
message = '功能未实现'
break
case 503:
message = '服务不可用'
break
message = '服务不可用'
break
case 504:
message = '网关错误'
break;
message = '网关错误'
break
}
_vm.$tips({type:'warning',message:message});
Vue.prototype.$tips({type:'warning',message:message})
}
/**
* 请求地址,请求数据,是否静默,请求方法
*/
......@@ -98,7 +102,6 @@ const requests = (url, data = {}, isSilence = false, method = 'POST') => {
}
instance(_opts)
.then(res => {
let responseData = res.data
clearTimeout(_timer)
popRequest(_random)
if (res.data.errorCode !== 0) {
......@@ -109,16 +112,16 @@ const requests = (url, data = {}, isSilence = false, method = 'POST') => {
}
})
.catch(res => {
let _message = null
clearTimeout(_timer)
popRequest(_random)
if (res) {
handlerErr(res.response.status,'接口异常');
handlerErr(res.response.status,'接口异常')
}
reject(res)
})
})
}
export {
instance as axios,
requests
......
/*
* 判断字符长度
* @param: str
......@@ -101,4 +99,4 @@ export default {
var regTest = /^\d+(\.\d+)?$/;
return regTest.test(v);
}
}
\ No newline at end of file
}
<template>
<el-dialog title="修改库存" :visible.sync="show" width="30%" :before-close="close" append-to-body>
<div>
<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 :min="0" v-model="count" class="w200 block-center" size="small" @blur="checkCalc"></el-input-number>
<el-radio v-model="calculate" :label="false">减少</el-radio>
<div class="pt20" style="margin-left:76px;">
<el-input-number :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>
<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>
<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';
import { updateCardStock } from '@/service/api/cardApi.js'
export default {
props:{
props: {
totalCount:{
type:Number,
default:0
},
show:{
show: {
type:Boolean,
default:false
},
coupCardId:{
coupCardId: {
type:String,
default:''
},
},
data(){
return{
count:0,
calculate:true
count: 0,
calculate: true
}
},
methods:{
checkCalc(){
checkCalc() {
if (!this.calculate) {
if (this.count>this.totalCount) {
this.count = this.totalCount;
......@@ -51,31 +51,31 @@ export default {
}
}
},
close(){
this.$emit('update:show',false)
this.count = 0;
close() {
this.$emit('update:show', false)
this.count = 0
},
submit(){
submit() {
if (!this.calculate) {
if (this.count>this.totalCount) {
this.count = this.totalCount;
this.$tips({type:'warning',message:'输入数量不能大于总数'})
return;
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,
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();
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 || '调整库存出错'})
}
});
})
}
}
}
......
<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>
......@@ -17,8 +18,6 @@
</h3>
<div id="mountNode" ref="mountNode" v-show="list.length"></div>
<div class="chart--nodata" v-show="!list.length"></div>
</div>
</section>
</template>
......@@ -58,7 +57,7 @@ export default {
{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)
return (row.usageQuantity *100 / (row.getedQuantity === 0 ? 1 : row.getedQuantity)).toFixed(2)+"%"
}},
{label:'销售额',prop:'saleAmount',align:'left',width:'100'}
],
......
......@@ -13,13 +13,10 @@
<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 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>
......@@ -38,21 +35,21 @@
<script>
import renderTemp from './render.js'
import {formateDateTimeByType} from '@/utils/index.js'
import { formateDateTimeByType } from '@/utils/index.js'
export default {
props:{
item:{
type:Object,
props: {
item: {
type: Object,
default() {
return {
cardEffectiveMode:0
cardEffectiveMode: 0
}
}
},
//是否为展架里的卡券 默认为false
shelfFlag:{
type:Boolean,
default:false
shelfFlag: {
type: Boolean,
default: false
}
},
data() {
......@@ -60,10 +57,10 @@ export default {
formateDateTimeByType
}
},
components:{
'render-temp':renderTemp
components: {
'render-temp': renderTemp
},
methods:{
methods: {
/**
* @param val
* 1 投放 2 报表 3 编辑 4 删除 5 详情
......@@ -71,34 +68,33 @@ export default {
handler(val) {
switch(val) {
case 1:
this.$router.push('/card/groupsend/'+this.item.coupCardId+'/'+this.item.cardName);
this.$router.push('/card/groupsend/'+this.item.coupCardId+'/'+this.item.cardName)
break;
case 2:
this.$router.push('/card/analysis/'+this.item.coupCardId);
this.$router.push('/card/analysis/'+this.item.coupCardId)
break;
case 3:
this.$router.push('/card/edit/'+this.item.coupCardId);
this.$router.push('/card/edit/'+this.item.coupCardId)
break;
case 4:
//todo
this.$emit('delete-card',this.item.coupCardId);
this.$emit('delete-card',this.item.coupCardId)
break;
case 5:
this.$router.push('/card/info/'+this.item.coupCardId);
this.$router.push('/card/info/'+this.item.coupCardId)
break;
}
},
//编辑库存 前置
preAdjustStock() {
this.$emit('adjust-stock',this.item);
this.$emit('adjust-stock',this.item)
},
delShelf(obj) {
this.$emit('del-shelf',obj);
this.$emit('del-shelf',obj)
}
},
filters:{
filterUseCondition(val) {
var _useCondition = JSON.parse(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' ? ""
......@@ -108,7 +104,7 @@ export default {
: "适用商品(" + _useCondition.goods.ok + ");") + (typeof _useCondition.goods.no === 'undefined' ? ""
: "不适用商品(" + _useCondition.goods.no + ");")))
+ ((typeof _useCondition.only === 'undefined' || (_useCondition.only == 0)) ? ""
: "不可与其他优惠共享");
: "不可与其他优惠共享")
}
}
}
......
......@@ -59,7 +59,7 @@ export default {
this.loading = true;
try {
let res = await cardPageList(this.listParams);
this.tableList = res.result.result;
this.tableList = res.result.result || [];
this.total = res.result.totalCount;
} catch (err) {
this.$tips({type:'error',message:'加载列表失败'});
......
<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="选择">
<el-dialog title="选择订单" :visible.sync="show" width="60%" :before-close="close">
<div class="pb10">
<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>
</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';
import { listCoupcardOrder,writeOffCard } from '@/service/api/cardApi.js'
export default {
props:{
obj:{
......@@ -44,7 +42,6 @@ export default {
},
data(){
return{
throttle,
loading:false,
listParams:{
currentPage:1,
......@@ -59,7 +56,6 @@ export default {
},
watch: {
show(val) {
console.log(this.obj)
this.listParams.coupLogId = this.obj.coupLogId;
this.listParams.memberId = this.obj.memberId;
if (val) this.listCoupcardOrder();
......@@ -74,39 +70,45 @@ export default {
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;
this.loading = true
try {
let res = await listCoupcardOrder(this.listParams)
this.tableList = res.result.result || []
this.total = res.result.totalCount
} catch (err) {
this.$tips({type:'error',message:'初始化失败'})
}
this.loading = false
},
close() {
this.$emit('update:show',false)
},
chooseCard(row) {
this.selectedId = row.orderId;
this.selectedId = row.orderId
},
submit() {
if (this.selectedId) {
this.writeOffCard();
this.writeOffCard()
} else {
this.tips({type:"warning",message:"未选择订单"});
this.tips({type:"warning",message:"未选择订单"})
}
},
// 核销订单
async writeOffCard(){
// try {
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.$tips({type:"success",message:"核销成功"})
this.close()
this.selectedId = ''
}else {
this.$tips({type:"error",message:"核销失败"});
this.$tips({type:"error",message:"核销失败"})
}
// } catch (err) {
// this.$tips({type:"error",message:"核销失败"});
// }
} catch (err) {
this.$tips({type:"error",message:"核销失败"})
}
}
}
}
......
......@@ -6,60 +6,60 @@
<el-button class="fr" type="primary" @click="exportCoupcardCheckExcel">下载Excel <i class="iconfont icon-icon_yunxiazai fz14"></i></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" :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" :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-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" :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" :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'
import { coupcardCheckList ,exportCoupcardCheckExcel } from '@/service/api/cardApi.js'
import { formateDateTimeByType } from '@/utils/index.js'
export default {
name: 'card-check',
......@@ -86,45 +86,44 @@ export default {
},
methods: {
search() {
this.listParams.pageSize = 1;
this.coupcardCheckList();
this.listParams.pageSize = 1
this.coupcardCheckList()
},
handleSizeChange(val) {
this.listParams.pageSize = val;
this.coupcardCheckList();
this.listParams.pageSize = val
this.coupcardCheckList()
},
handleCurrentChange(val) {
this.listParams.currentPage = val;
this.coupcardCheckList();
this.listParams.currentPage = val
this.coupcardCheckList()
},
async coupcardCheckList() {
this.loading = true;
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');
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 = '';
this.listParams.beginTime = ''
this.listParams.endTime = ''
}
try {
let res = await coupcardCheckList(this.listParams);
this.tableList = res.result.result || [];
this.total = res.result.totalCount;
let res = await coupcardCheckList(this.listParams)
this.tableList = res.result.result || []
this.total = res.result.totalCount
} catch (err) {
this.$tips({type:'error',message:'加载列表失败'});
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');
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 = '';
this.listParams.beginTime = ''
this.listParams.endTime = ''
}
window.location = exportCoupcardCheckExcel+"?searchParam="+this.listParams.searchParam+"&beginTime="+this.listParams.beginTime+"&endTime="+this.listParams.endTime+'&requestProject=gic-web' ;
window.location = exportCoupcardCheckExcel+"?searchParam="+this.listParams.searchParam+"&beginTime="+this.listParams.beginTime+"&endTime="+this.listParams.endTime+'&requestProject=gic-web'
},
},
}
......
......@@ -41,9 +41,9 @@
</el-form>
</template>
<script>
import {checkPutonMemberIds,saveUpdatePutonCard,getCardPutonDetail} from '@/service/api/cardApi.js';
import {sceneSettingList} from '@/service/api/wechatApi.js';
import {formateDateTimeByType} from '@/utils/index.js'
import { checkPutonMemberIds, saveUpdatePutonCard, getCardPutonDetail } from '@/service/api/cardApi.js'
import { sceneSettingList } from '@/service/api/wechatApi.js'
import { formateDateTimeByType } from '@/utils/index.js'
export default {
name: 'card-group',
data () {
......@@ -101,8 +101,7 @@ export default {
},
// 子组件触发父组件事件,返回过滤条件数据
findFilter(value){
console.log(value)
this.info.memberSearchDTO = value;
this.info.memberSearchDTO = value
},
// 取消
cancelFilter(){
......@@ -130,7 +129,6 @@ export default {
},
//获取指定会员
getConfirmData(val) {
console.log(val)
this.info.openIds = val;
},
submit(formName) {
......@@ -155,11 +153,11 @@ export default {
}).then(() => {
this.sendCard();
}).catch(() => {
this.$tips({type: 'info',message: '已取消提交'});
this.$tips({type: 'info',message: '已取消提交'})
});
} else {
this.$tips({type: 'warning',message: '表单未填写完整'});
return false;
this.$tips({type: 'warning',message: '表单未填写完整'})
return false
}
});
},
......@@ -184,12 +182,12 @@ export default {
cancelBUttonText: '取消',
type: 'warning'
}).then(() => {
this.saveUpdatePutonCard();
this.saveUpdatePutonCard()
}).catch(() => {
this.$tips({type: 'info',message: '已取消提交'});
this.$tips({type: 'info',message: '已取消提交'})
});
} else {
this.$tips({type:'error',message:'操作失败'});
this.$tips({type:'error',message:'操作失败'})
}
console.log(res)
},
......
<template>
<section class="eval-charts">
<div class="dm-form__wrap">
<storeGroup></storeGroup>
<vue-gic-store-group 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">评价趋势
......@@ -73,7 +73,8 @@ export default {
{name:'门店环境评分',list:[],score:0,sum:1}],
detailShow:false,
scoredetailShow:false,
groupId:''
groupId:'',
storeGroupData:{}
}
},
created(){
......@@ -82,19 +83,12 @@ export default {
this.evaluateOverviewEchart(2);
this.evaluateOverviewEchart(3);
},
computed:{
storeObj(val){
return this.$store.state.marketing.storeObj;
}
},
watch:{
storeObj(val){
methods:{
getStoreGroup(val) {
this.evaluateOverviewEchart(1,val.storeGroupId);
this.evaluateOverviewEchart(2,val.storeGroupId);
this.evaluateOverviewEchart(3,val.storeGroupId);
}
},
methods:{
},
async evaluateOverviewEchart(type = 1,id = '') {
let res = await evaluateOverviewEchart({currentStoreGroupId:id,chartType:type});
if (type === 1) {
......@@ -346,8 +340,8 @@ export default {
length: 3 // 次刻度线的长度,可以为负值(表示反方向渲染)
}
});
chart.area().position('day*temperature').color('name',['#44cedb','#5788ff','#f95482']).shape('smooth');
chart.line().position('day*temperature').color('name',['#44cedb','#5788ff','#f95482']).size(2).shape('smooth');
chart.area().position('day*temperature').color('name',['#8543e0','#1890ff','#13c2c2']).shape('smooth');
chart.line().position('day*temperature').color('name',['#8543e0','#1890ff','#13c2c2']).size(2).shape('smooth');
chart.render();
}
}
......
<template>
<el-dialog title="趋势详情" :visible.sync="show" width="70%" :before-close="close">
<storeGroup class="pb10"></storeGroup>
<el-table tooltipEffect="light" :data="tableList" height="400" style="width: 100%" v-loading="loading" @sort-change="sortList">
<vue-gic-store-group 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>
......@@ -47,13 +47,10 @@ import {storeEvaluateDetail} from '@/service/api/evaluationApi.js'
}
}
},
storeObj(val){
this.listParams.currentStoreGroupId = val.storeGroupId;
this.storeEvaluateDetail();
}
},
data() {
return {
storeGroupData:{},
loading:false,
listParams:{
currentPage:1,
......@@ -77,6 +74,10 @@ import {storeEvaluateDetail} from '@/service/api/evaluationApi.js'
}
},
methods: {
getStoreGroup(val) {
this.listParams.currentStoreGroupId = val.storeGroupId;
this.storeEvaluateDetail();
},
close() {
this.$emit('update:show',false);
},
......
<template>
<section class="eval-newest dm-wrap">
<div class="clearfix pb22">
<storeGroup class="pr5"></storeGroup>
<vue-gic-store-group 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 v-if="$route.meta.type !== 'bad'" class="fr" type="primary" @click="exportLatestEvaluate">下载Excel <i class="iconfont icon-icon_yunxiazai fz14"></i></el-button>
</div>
<div class="filter--box">
<el-select size="small" v-if="$route.meta.type === 'bad'" class="pl10 w150" v-model="badStatus" placeholder="选择差评类型" @change="$router.push('/evaluation/bad/'+badStatus)">
<el-select size="small" v-if="$route.meta.type === 'bad'" class="vertical-middle pl10 w150" v-model="badStatus" placeholder="选择差评类型" @change="$router.push('/evaluation/bad/'+badStatus)">
<el-option v-for="item in badOptions" :key="item.msg" :label="item.msg" :value="item.msg"></el-option>
</el-select>
<el-select size="small" class="pl10 w150" v-model="listParams.visiteStatus" placeholder="选择发送状态" @change="latestEvaluationList">
<el-select size="small" class="vertical-middle pl10 w150" v-model="listParams.visiteStatus" placeholder="选择发送状态" @change="latestEvaluationList">
<el-option v-for="item in visiteStatusOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-checkbox size="small" border v-if="$route.meta.type !== 'bad'" :true-label="1" :false-label="0" v-model="listParams.isBad" @change="latestEvaluationList">不良评价</el-checkbox>
<el-checkbox size="small" border v-if="$route.meta.type !== 'bad'" :true-label="1" :false-label="0" v-model="listParams.isContent" @change="latestEvaluationList">有评语</el-checkbox>
<el-checkbox class="vertical-middle" size="small" border v-if="$route.meta.type !== 'bad'" :true-label="1" :false-label="0" v-model="listParams.isBad" @change="latestEvaluationList">不良评价</el-checkbox>
<el-checkbox class="vertical-middle" size="small" border v-if="$route.meta.type !== 'bad'" :true-label="1" :false-label="0" v-model="listParams.isContent" @change="latestEvaluationList">有评语</el-checkbox>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading" element-loading-text="拼命加载中">
<el-table-column :show-overflow-tooltip="false" width="90" align="left" prop="showStatus" fixed="left" label="服务号显示">
......@@ -26,64 +26,64 @@
</el-switch>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" width="160" align="left" prop="createTime" label="评价时间">
<el-table-column :show-overflow-tooltip="false" width="160" align="left" prop="createTime" label="评价时间">
<template slot-scope="scope">
<p class="fz13">{{formateDateTimeByType(scope.row.createTime,'yyyy-MM-dd-HH-mm')}}</p>
<p class="fz12 gray">订单号:{{scope.row.orderNumber}}</p>
<p>{{formateDateTimeByType(scope.row.createTime,'yyyy-MM-dd-HH-mm')}}</p>
<p class="fz13 gray">订单号:{{scope.row.orderNumber}}</p>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" width="140" align="left" prop="storeName" label="门店">
<el-table-column :show-overflow-tooltip="false" 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>{{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="140" header-align="left" align="left" prop="clerkId" label="导购信息">
<el-table-column :show-overflow-tooltip="false" min-width="140" header-align="left" align="left" prop="clerkId" label="导购信息">
<template slot-scope="scope">
<img class="vertical-middle" :src="scope.row.clerkImage || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p class="fz13">{{scope.row.clerkName || '--'}}</p>
<p class="fz12 gray">{{scope.row.storeName || '--'}}</p>
<p>{{scope.row.clerkName || '--'}}</p>
<p class="fz13 gray">{{scope.row.storeName || '--'}}</p>
</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 :show-overflow-tooltip="false" 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">
<img class="vertical-middle" :src="scope.row.thirdImgUrl || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p class="fz13">{{scope.row.memberName || '--'}}</p>
<p class="fz12 gray">{{scope.row.cardNum || '--'}}</p>
<p>{{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="服务/专业/门店">
<template slot-scope="scope">
{{scope.row.fwtd+'/'+scope.row.zycd+'/'+scope.row.mdhj}}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" width="100" align="center" prop="content" label="评语">
<el-table-column :show-overflow-tooltip="false" width="100" align="center" prop="content" label="评语">
<template slot-scope="scope">
<el-tooltip class="item" effect="light" v-if="scope.row.content" :content="scope.row.content" placement="top-start">
<i class="el-icon-message fz20 blue"></i>
</el-tooltip>
<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>
</el-popover>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" width="100" align="center" prop="replyStatus" label="回复">
<el-table-column :show-overflow-tooltip="false" width="100" 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-tooltip v-if="scope.row.replyStatus === 1" class="item" effect="light" :content="scope.row.replyContent" placement="top-start">
<i class="el-icon-message fz20 danger-color cursor"></i>
</el-tooltip>
<el-popover v-if="scope.row.replyStatus === 1" class="item" trigger="hover" :content="scope.row.replyContent" placement="top-start">
<i slot="reference" class="el-icon-message fz20 danger-color cursor"></i>
</el-popover>
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="140px" fixed="right">
<template slot-scope="scope" >
<span class="fz13" v-if="scope.row.isBad===0">好评</span>
......@@ -117,6 +117,7 @@ export default {
data () {
let _vm = this;
return {
storeGroupData:{},
formateDateTimeByType,
defaultAvatar:require('../../assets/img/head_default.jpg'),
loading:false,
......@@ -139,18 +140,9 @@ export default {
this.$store.commit('mutations_breadcrumb',[{name:'企业管理',path:''},{name:'服务监督',path:'/evaluation'},{name:'最新评价',path:''}])
}
},
computed:{
storeObj(val){
return this.$store.state.marketing.storeObj;
}
},
watch:{
$route(val){
this.latestEvaluationList();
},
storeObj(val){
this.listParams.currentStoreGroupId = val.storeGroupId || '';
this.latestEvaluationList();
}
},
components:{
......@@ -158,6 +150,10 @@ export default {
storeGroup
},
methods: {
getStoreGroup(val) {
this.listParams.currentStoreGroupId = val.storeGroupId || '';
this.latestEvaluationList();
},
//回复
replyData(row){
this.replyShow = true
......
......@@ -6,7 +6,7 @@
</el-form-item>
<el-form-item label="会员信息">
<img class="vertical-middle" width="60" height="60" :src="form.thirdImgUrl || defaultAvatar" alt="">
<div class="inline-block vertical-middle">
<div class="inline-block vertical-middle ml10">
<p class="line-height1">{{form.memberName || '--'}}</p>
<p class="gray fz13 ">{{form.thirdNickName || '--'}}</p>
</div>
......@@ -16,15 +16,15 @@
</el-form-item>
<el-form-item label="意见图片" v-if="form.imgs.length>0">
<div class="img-box">
<img v-for="(v,i) in form.imgs" v-preview="v.imgUrl" :key="i" :src="v.imgUrl" alt="">
<img v-for="(v,i) in form.imgs" preview="0" preview-text="" :key="i" :src="v.imgUrl" alt="" preview-title-enable="true" preview-nav-enable="true">
</div>
</el-form-item>
<el-form-item label="回复内容" prop="handleRemark">
<dm-input type="textarea" class="w400" v-model="form.handleRemark" :rows="6" placeholder="请输入回复内容" :maxlength="200"></dm-input>
<dm-input :disabled="isInfo" type="textarea" class="w400" v-model="form.handleRemark" :rows="6" placeholder="请输入回复内容" :maxlength="200"></dm-input>
</el-form-item>
</el-form>
<span class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button type="primary" @click="submit('form')">提 交</el-button>
<span class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button type="primary" v-if="!isInfo" @click="submit('form')">提 交</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</span>
</div>
......@@ -35,27 +35,28 @@ import {getSuggestionsDetail,handleSuggestions} from '@/service/api/evaluationAp
export default {
data() {
return {
loading:false,
defaultAvatar:require('../../assets/img/head_default.jpg'),
form:{
createTimeStr:'',
memberName:'',
thirdNickName:'',
imgs:[],
problemContent:'',
handleRemark:''
loading: false,
defaultAvatar: require('../../assets/img/head_default.jpg'),
form: {
createTimeStr: '',
memberName: '',
thirdNickName: '',
imgs: [],
problemContent: '',
handleRemark: ''
},
rules: {
handleRemark: [
{ required: true, message: '请输入回复内容', trigger: 'blur' },
{ max: 200, message: '字数不能大于200', trigger: 'blur' }
]
}
},
isInfo:this.$route.meta.type === 'info'
};
},
created(){
this.$store.commit('mutations_breadcrumb',[{name:'企业管理',path:''},{name:'服务监督',path:'/evaluation'},{name:'投诉与建议',path:'/suggestion'},{name:'投诉与建议处理',path:''}])
this.getSuggestionsDetail();
created() {
this.$store.commit('mutations_breadcrumb',[{name:'企业管理',path:''},{name:'服务监督',path:'/evaluation'},{name:'投诉与建议',path:'/evaluation/suggestion'},{name:'投诉与建议处理',path:''}])
this.getSuggestionsDetail()
},
computed: {
asideShow() {
......@@ -68,38 +69,37 @@ import {getSuggestionsDetail,handleSuggestions} from '@/service/api/evaluationAp
if (valid) {
handleSuggestions({problemId:this.$route.params.id,content:this.form.handleRemark}).then(res => {
if (res.errorCode === 0) {
this.$tips({type:'success',message:'回复成功'});
this.$router.go(-1);
this.$tips({type: 'success', message: '回复成功'})
this.$router.go(-1)
} else {
this.$tips({type:'error',message:res.message || '回复失败'});
this.$tips({type: 'error', message: res.message || '回复失败'})
}
})
} else {
this.$tips({type:'warning',message:'表单填写不规范'});
return false;
// this.$tips({type: 'warning', message: '表单填写不规范'})
return false
}
});
},
async getSuggestionsDetail() {
this.loading = true;
this.loading = true
try {
let res = await getSuggestionsDetail({problemId:this.$route.params.id});
let res = await getSuggestionsDetail({problemId: this.$route.params.id})
const result = res.result
this.form.createTimeStr = formateDateTimeByType(result.createTime,'yyyy-MM-dd-HH-mm-ss');
this.form.memberName = result.memberName;
this.form.thirdNickName = result.thirdNickName;
this.form.imgs = result.imgs;
this.form.problemContent = result.problemContent;
this.form.handleRemark = result.handleRemark;
this.form.thirdImgUrl = result.thirdImgUrl;
console.log(res)
this.form.createTimeStr = formateDateTimeByType(result.createTime,'yyyy-MM-dd-HH-mm-ss')
this.form.memberName = result.memberName || ''
this.form.thirdNickName = result.thirdNickName || ''
this.form.imgs = result.imgs || []
this.form.problemContent = result.problemContent || []
this.form.handleRemark = result.handleRemark || ''
this.form.thirdImgUrl = result.thirdImgUrl || ''
} catch (err) {
console.log(err)
}
this.loading = false;
this.loading = false
}
}
};
}
</script>
<style lang="scss" scoped>
......@@ -109,6 +109,9 @@ import {getSuggestionsDetail,handleSuggestions} from '@/service/api/evaluationAp
height: 80px;
width: auto;
padding: 0 10px;
&:first-child{
padding-left: 0;
}
}
}
</style>
<template>
<el-dialog title="门店评分" :visible.sync="show" width="70%" :before-close="close">
<storeGroup class="pb10"></storeGroup>
<el-table tooltipEffect="light" :data="tableList" height="400" style="width: 100%" v-loading="loading" @sort-change="sortList">
<vue-gic-store-group 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>
......@@ -56,16 +56,7 @@ import {storeScoreDetail} from '@/service/api/evaluationApi.js'
components:{
storeGroup
},
computed:{
storeObj(val){
return this.$store.state.marketing.storeObj;
}
},
watch:{
storeObj(val){
this.listParams.currentStoreGroupId = val.storeGroupId || '';
this.storeScoreDetail();
},
show(val) {
if (val) {
this.listParams.currentStoreGroupId = this.id;
......@@ -75,6 +66,7 @@ import {storeScoreDetail} from '@/service/api/evaluationApi.js'
},
data() {
return {
storeGroupData:{},
loading:false,
listParams:{
currentPage:1,
......@@ -89,6 +81,10 @@ import {storeScoreDetail} from '@/service/api/evaluationApi.js'
}
},
methods: {
getStoreGroup(val) {
this.listParams.currentStoreGroupId = val.storeGroupId || '';
this.storeScoreDetail();
},
close() {
this.$emit('update:show',false);
},
......
......@@ -29,16 +29,17 @@
</a>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="200" header-align="left" align="left" :key="Math.random()" prop="problemContent" label="内容概览">
<el-table-column :show-overflow-tooltip="false" min-width="200" header-align="left" align="left" :key="Math.random()" prop="problemContent" label="内容概览">
<template slot-scope="scope">
<i v-if="scope.row.imgs.length>0" class="el-icon-picture fz16 primary-color"/>
<span class="fz13">{{scope.row.problemContent}}</span>
<el-popover class="item" trigger="hover" width="200" v-if="scope.row.problemContent" :content="scope.row.problemContent" placement="top-start">
<span class="ellipsis" slot="reference" ><i v-if="scope.row.imgs.length>0" class="el-icon-picture fz16 primary-color"/>{{scope.row.problemContent}}</span>
</el-popover>
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="140px" fixed="right">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.status === 1" @click="$router.push('/evaluation/suggestion/'+scope.row.problemId)">立即处理</el-button>
<span type="text" v-else-if="scope.row.status === 4">已解决</span>
<el-button type="text" v-else-if="scope.row.status === 4" @click="$router.push('/evaluation/suggestion/info/'+scope.row.problemId)">已解决</el-button>
<span type="text" v-else>--</span>
</template>
</el-table-column>
......
......@@ -56,7 +56,9 @@ import {ptyxConfigDetail,ptyxConfigSave} from '@/service/api/gameApi.js';
async ptyxConfigDetail() {
this.loading = true;
let res = await ptyxConfigDetail();
this.form = res.result;
if (res.errorCode === 0 && res.result) {
this.form = res.result;
}
this.loading = false;
},
close() {
......
<template>
<div class="dm-wrap" v-loading="loading">
<el-row :gutter="20" class="sms-temp_tipsT">
<el-col :span="24" class="">
<p class="danger-color">1.长度不要超过450字(汉字,字符,数字等可见符号,都按1个字计算)。单条短信长度为70字,超过70字后,按67字/条分割成多条,以长短信的方式发送给用户,即用户收到的是一条长短信,但是按多条计费</p>
<p>2.营销类短信,请在短信内容后面增加<span class="danger-color">“回T退订”</span></p>
<p>3.短信模板内容不能含有【】符号</p>
<p>4.不能发送房产、移民、贷款、政治、色情、暴力等违法类短信</p>
<p>5.短信内容中不能输入Enter/换行,否则将导致短信分条发送</p>
</el-col>
</el-row>
<el-row :gutter="20" class="mt20">
<el-form label-width="80px" ref="form" :model="form" :rules="rules">
<el-col :span="12">
<el-form-item label="模板名称" prop="title">
<dm-input v-model="form.title" :maxlength="10"></dm-input>
</el-form-item>
<el-form-item label="短信类型" prop="type">
<el-select v-model="form.type">
<el-option v-for="(v,i) in typeOptions" :key="i" :value="v.value" :label="v.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="短信内容" prop="content" class="pb10">
<dm-input type="textarea" :rows="6" v-model="form.content" :maxlength="450"></dm-input>
</el-form-item>
<el-form-item label="申请说明" prop="remark">
<dm-input type="textarea" :rows="6" v-model="form.remark" :maxlength="120"></dm-input>
</el-form-item>
</el-col>
</el-form>
<el-col :span="12" class="sms-temp_tips clearfix">
<div>模板示列如下,其中{数字}为可插入的变量值,参照表如下:注意考虑变量值的文本长度,以免超出67字/条的文本上限。</div>
<ul class="fl">
<li>{1}={姓名}</li>
<li>{2}={姓名+先生/女士}</li>
<li>{3}={生日日期}</li>
<li>{4}={生日天数}</li>
<li>{5}={关注日期}</li>
<li>{6}={关注天数}</li>
<li>{7}={主门店品牌名称}</li>
<li>{8}={主门店名称}</li>
<li>{9}={主门店电话}</li>
<li>{10}={专属导购姓名}</li>
<li>{11}={专属导购手机号}</li>
<li>{12}={开卡日期}</li>
<li>{13}={开卡天数}</li>
<li>{14}={开卡门店名称}</li>
</ul>
<ul class="fl">
<li>{15}={会员卡号}</li>
<li>{16}={会员等级名称}</li>
<li>{17}={主门店地址}</li>
<li>{18}={会员等级剩余有效天数}</li>
<li>{19}={积分余额}</li>
<li>{20}={30天内将过期积分额度}</li>
<li>{21}={储值余额}</li>
<li>{22}={消费总额}</li>
<li>{23}={消费次数}</li>
<li>{24}={最近消费日期}</li>
<li>{25}={最近消费间隔}</li>
<li>{26}={最高单笔消费}</li>
<li>{27}={最近消费门店名称}</li>
<li>{28}={最近消费品牌名称}</li>
</ul>
</el-col>
</el-row>
<div class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button type="primary" @click="submit('form')">提 交</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
<div class="dm-wrap" v-loading="loading">
<el-row :gutter="20" class="sms-temp_tipsT">
<el-col :span="24" class="">
<p class="danger-color">1.长度不要超过450字(汉字,字符,数字等可见符号,都按1个字计算)。单条短信长度为70字,超过70字后,按67字/条分割成多条,以长短信的方式发送给用户,即用户收到的是一条长短信,但是按多条计费</p>
<p>2.营销类短信,请在短信内容后面增加<span class="danger-color">“回T退订”</span></p>
<p>3.短信模板内容不能含有【】符号</p>
<p>4.不能发送房产、移民、贷款、政治、色情、暴力等违法类短信</p>
<p>5.短信内容中不能输入Enter/换行,否则将导致短信分条发送</p>
</el-col>
</el-row>
<el-row :gutter="20" class="mt20">
<el-form label-width="80px" ref="form" :model="form" :rules="rules">
<el-col :span="12">
<el-form-item label="模板名称" prop="title">
<dm-input v-model="form.title" :maxlength="10"></dm-input>
</el-form-item>
<el-form-item label="短信类型" prop="type">
<el-select v-model="form.type">
<el-option v-for="(v,i) in typeOptions" :key="i" :value="v.value" :label="v.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="短信内容" prop="content" class="pb10">
<dm-input type="textarea" :rows="6" v-model="form.content" :maxlength="450"></dm-input>
</el-form-item>
<el-form-item label="申请说明" prop="remark">
<dm-input type="textarea" :rows="6" v-model="form.remark" :maxlength="120"></dm-input>
</el-form-item>
</el-col>
</el-form>
<el-col :span="12" class="sms-temp_tips clearfix">
<div>模板示列如下,其中{数字}为可插入的变量值,参照表如下:注意考虑变量值的文本长度,以免超出67字/条的文本上限。</div>
<ul class="fl">
<li>{1}={姓名}</li>
<li>{2}={姓名+先生/女士}</li>
<li>{3}={生日日期}</li>
<li>{4}={生日天数}</li>
<li>{5}={关注日期}</li>
<li>{6}={关注天数}</li>
<li>{7}={主门店品牌名称}</li>
<li>{8}={主门店名称}</li>
<li>{9}={主门店电话}</li>
<li>{10}={专属导购姓名}</li>
<li>{11}={专属导购手机号}</li>
<li>{12}={开卡日期}</li>
<li>{13}={开卡天数}</li>
<li>{14}={开卡门店名称}</li>
</ul>
<ul class="fl">
<li>{15}={会员卡号}</li>
<li>{16}={会员等级名称}</li>
<li>{17}={主门店地址}</li>
<li>{18}={会员等级剩余有效天数}</li>
<li>{19}={积分余额}</li>
<li>{20}={30天内将过期积分额度}</li>
<li>{21}={储值余额}</li>
<li>{22}={消费总额}</li>
<li>{23}={消费次数}</li>
<li>{24}={最近消费日期}</li>
<li>{25}={最近消费间隔}</li>
<li>{26}={最高单笔消费}</li>
<li>{27}={最近消费门店名称}</li>
<li>{28}={最近消费品牌名称}</li>
</ul>
</el-col>
</el-row>
<div class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button type="primary" @click="submit('form')">提 交</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
</div>
</template>
<script>
......@@ -127,7 +127,6 @@ export default {
} catch (err) {
this.$tips({type:'error',message:'操作失败'});
this.loading = false;
console.log(err)
}
},
async LoadTempInfo () {
......
<template>
<div>
<el-form class="dm-form__wrap" ref="form" :model="dialogData" label-width="90px">
<el-form class="dm-form__wrap" ref="form" :model="messageInfo" label-width="90px">
<h3 class="dm-title__label">基本信息</h3>
<el-row>
<el-col :span="8">
<el-form-item label="发送时间:">
<span class="primary-font-color fz13" >{{dialogData.sendTime | dateFormat}}</span>
<span class="primary-font-color fz13" >{{formateDateTimeByType(messageInfo.sendTime,'yyyy-MM-dd-HH-mm-ss')}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发送人数:">
<span class="primary-font-color fz13" >{{dialogData.sendCount}}</span>
<span class="primary-font-color fz13" >{{messageInfo.sendCount}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发送条数:">
<span class="primary-font-color fz13" >{{dialogData.sendSuccess}}</span>
<span class="primary-font-color fz13" >{{messageInfo.sendSuccess}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="模板名称:">
<span class="primary-font-color fz13" >{{dialogData.templateName}}(ID:{{dialogData.templateId}})</span>
<span class="primary-font-color fz13" >{{messageInfo.templateName}}(ID:{{messageInfo.templateId}})</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="模板类型:">
<span class="primary-font-color fz13" >{{dialogData.sendType===0?'普通短信':'营销短信'}}</span>
<span class="primary-font-color fz13" >{{messageInfo.sendType===0?'普通短信':'营销短信'}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="营销场景:">
<span class="primary-font-color fz13" >{{dialogData.sceneSettingName}}</span>
<span class="primary-font-color fz13" >{{messageInfo.sceneSettingName}}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="短信模板:">
<p class="primary-font-color fz13" style="max-width: 100%;overflow: auto;">{{dialogData.templateContent}}</p>
<p class="primary-font-color fz13" style="max-width: 100%;overflow: auto;">{{messageInfo.templateContent}}</p>
</el-form-item>
</el-col>
</el-row>
......@@ -81,36 +81,36 @@ import errorCodeDialog from './errorCode'
export default {
data() {
return {
dialogData:{},
messageList:[],
messageLoading:false,
messageHeader:[
{label:'手机号码',prop:'telephone',width:'120',align:'left'},
{label:'回执状态',prop:'sendStatus',width:'80',align:'left',formatter:function(row){
return row.sendStatus === 0 ? '成功':(row.sendStatus === 1 ? '未发送' : '失败')
}},
{label:'上报时间',prop:'backTime',width:'100', tooltip:true,align:'left',formatter:function(row){
return formateDateTimeByType(row.backTime,'yyyy-MM-dd-HH-mm-ss');
}},
{label:'发送状态',prop:'backStatus',width:'80',align:'left',formatter:function(row){
return row.backStatus === 0 ? '接收失败' : (row.backStatus?'接收成功' : '--')
}}],
listParams:{
sendStatus:'',
smsId:'',
memberName:'',
currentPage:1, //是 Number 当前页面
pageSize:20 //是 Number 每页显示条数
},
total:0,
sendStatusOptions:[{value:'',label:'所有状态'},{value:0,label:'成功'},{value:1,label:'未发送'},{value:2,label:'失败'}],
errorCodeShow:false
formateDateTimeByType,
messageInfo:{},
messageList:[],
messageLoading:false,
messageHeader:[
{label:'手机号码',prop:'telephone',width:'120',align:'left'},
{label:'回执状态',prop:'sendStatus',width:'80',align:'left',formatter:function(row){
return row.sendStatus === 0 ? '成功':(row.sendStatus === 1 ? '未发送' : '失败')
}},
{label:'上报时间',prop:'backTime',width:'100', tooltip:true,align:'left',formatter:function(row){
return formateDateTimeByType(row.backTime,'yyyy-MM-dd-HH-mm-ss');
}},
{label:'发送状态',prop:'backStatus',width:'80',align:'left',formatter:function(row){
return row.backStatus === 0 ? '接收失败' : (row.backStatus?'接收成功' : '--')
}}],
listParams:{
sendStatus:'',
smsId:this.$route.params.id,
memberName:'',
currentPage:1,
pageSize:20
},
total:0,
sendStatusOptions:[{value:'',label:'所有状态'},{value:0,label:'成功'},{value:1,label:'未发送'},{value:2,label:'失败'}],
errorCodeShow:false
};
},
created() {
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'短信营销',path:'/message'},{name:'短信群发',path:'/message/record'},{name:'短信群发详情',path:''}]);
this.LoadMessageDetail(this.$route.params.id);
this.listParams.smsId = this.$route.params.id;
this.LoadMessageDetailList();
},
computed: {
......@@ -126,7 +126,7 @@ import errorCodeDialog from './errorCode'
let params = {smsId:id}
let res = await LoadMessageDetail(params);
console.log(res)
this.dialogData = res.result || {};
this.messageInfo = res.result || {};
},
async LoadMessageDetailList() {
this.messageLoading = true;
......@@ -152,11 +152,6 @@ import errorCodeDialog from './errorCode'
window.location = downLoadUrl;
})
}
},
filters: {
dateFormat: function (value) {
return formateDateTimeByType(value,'yyyy-MM-dd-HH-mm-ss');
}
}
};
</script>
<template>
<el-dialog
title="短信错误码查询"
:visible.sync="show"
width="80%"
:before-close="close">
<el-dialog title="短信错误码查询" :visible.sync="show" width="80%" :before-close="close">
<div class="pb22">
<el-input v-model="keyWord" class="w300" placeholder="请输入错误码" clearable @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
</div>
<el-table
:data="errorCodeList"
height="400"
style="width: 100%">
<el-table-column
prop="code"
label="错误码"
width="80">
</el-table-column>
<el-table-column
prop="pass"
label="通道"
width="80">
</el-table-column>
<el-table-column
prop="reason"
min-width="200"
label="原因">
</el-table-column>
<el-table-column
prop="plan"
min-width="200"
label="解决方案">
</el-table-column>
</el-table>
<el-table :data="errorCodeList" height="400" style="width: 100%">
<el-table-column prop="code" label="错误码" width="80"></el-table-column>
<el-table-column prop="pass" label="通道" width="80"></el-table-column>
<el-table-column prop="reason" min-width="200" label="原因"></el-table-column>
<el-table-column prop="plan" min-width="200" label="解决方案"></el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="close">关 闭</el-button>
</span>
</el-dialog>
</template>
<script>
import errorCodeList from './errorCodeList.js'
export default {
name:'message-code',
props:{
show:{
type: Boolean,
......@@ -63,7 +39,6 @@ export default {
search() {
if (this.keyWord) {
this.errorCodeList = errorCodeList.filter(v => v.code.indexOf(this.keyWord)>-1);
console.log(this.errorCodeList)
} else {
this.errorCodeList = errorCodeList;
}
......
<template>
<section class="dm-wrap">
<div class="clearfix pb22">
<el-date-picker class="w250" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="LoadMessageList"></el-date-picker>
<el-select class="dm-select" v-model="listParams.sendStatus" placeholder="选择发送状态" @change="LoadMessageList">
<el-option v-for="item in sendStatusOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select class="dm-select" v-model="listParams.sceneSettingId" placeholder="选择营销场景" @change="LoadMessageList">
<el-option v-for="item in sceneSettingIdOptions" :key="item.sceneSettingId" :label="item.sceneName" :value="item.sceneSettingId"></el-option>
</el-select>
<el-input v-model="listParams.search" class="w200" placeholder="输入模板名称/ID/内容" clearable @change="LoadMessageList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="$router.push('/message/record/add')">新建群发</el-button>
</div>
<el-table tooltipEffect="light" :data="messageList" style="width: 100%" v-loading="recordLoading">
<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="状态" prop="sendStatus" fixed="right" align="left" width="140px">
<template slot-scope="scope" >
<el-tag size="small" :type="filterStatus(scope.row.sendStatus).type">{{filterStatus(scope.row.sendStatus).label}}</el-tag>
<div v-if="scope.row.sendStatus == 0">
<time-counts class="danger-color fz12" :defaultVal="scope.row.sendTime" :autoStart="true"></time-counts>
</div>
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="140px" fixed="right">
<template slot-scope="scope" >
<el-button type="text" @click="$router.push('/message/record/detail/'+scope.row.smsId)">详情</el-button>
<el-button type="text" v-if="scope.row.sendStatus == 4 || scope.row.sendStatus == 0" @click="invalidData(scope.row)">禁用</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination v-show="messageList.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>
<div class="clearfix pb22">
<el-date-picker class="w250" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="search"></el-date-picker>
<el-select class="dm-select" v-model="listParams.sendStatus" placeholder="选择发送状态" @change="search">
<el-option v-for="item in sendStatusOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select class="dm-select" v-model="listParams.sceneSettingId" placeholder="选择营销场景" @change="search">
<el-option v-for="item in sceneSettingIdOptions" :key="item.sceneSettingId" :label="item.sceneName" :value="item.sceneSettingId"></el-option>
</el-select>
<el-input v-model="listParams.search" class="w200" placeholder="输入模板名称/ID/内容" clearable @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="$router.push('/message/record/add')">新建群发</el-button>
</div>
<el-table tooltipEffect="light" :data="messageList" style="width: 100%" v-loading="recordLoading">
<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="状态" prop="sendStatus" fixed="right" align="left" width="140px">
<template slot-scope="scope" >
<el-tag size="small" :type="filterStatus(scope.row.sendStatus).type">{{filterStatus(scope.row.sendStatus).label}}</el-tag>
<div v-if="scope.row.sendStatus == 0">
<time-counts class="danger-color fz12" :defaultVal="scope.row.sendTime" :autoStart="true"></time-counts>
</div>
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="140px" fixed="right">
<template slot-scope="scope" >
<el-button type="text" @click="$router.push('/message/record/detail/'+scope.row.smsId)">详情</el-button>
<el-button type="text" v-if="scope.row.sendStatus == 4 || scope.row.sendStatus == 0" @click="invalidData(scope.row)">禁用</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination v-show="messageList.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>
......@@ -55,7 +55,6 @@ export default {
{value:5,label:'执行中',type:'success'},
{value:-1,label:'已失效',type:'danger'}],
sceneSettingIdOptions:[],
searchWord:'',
recordLoading:false,
messageList:[],
recordHeader:[
......@@ -97,6 +96,10 @@ export default {
this.sceneSettingList();
},
methods: {
search() {
this.listParams.currentPage = 1;
this.LoadMessageList();
},
handleSizeChange(val) {
this.listParams.pageSize = val;
this.LoadMessageList();
......@@ -151,9 +154,7 @@ export default {
filterStatus(val) {
let result = {label:'执行错误',type:'warning'};
this.sendStatusOptions.forEach(v => {
if (val === v.value) {
result = v
}
if (val === v.value) result = v;
})
return result;
}
......
<template>
<section class="dm-wrap">
<div class="pb10">
<el-select class="dm-select" v-model="listParams.type" placeholder="选择营销场景" @change="LoadLibList">
<el-select class="dm-select" v-model="listParams.type" placeholder="选择营销场景" @change="search">
<el-option v-for="(v,i) in libTypeOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</el-select>
<el-input v-model="listParams.content" class="w200" placeholder="输入模板名称/ID/内容" clearable @change="LoadLibList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="$router.push('/message/temp/add')">新建短信模板</el-button>
</el-select>
<el-input v-model="listParams.content" class="w200" placeholder="输入模板名称/ID/内容" clearable @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="$router.push('/message/temp/add')">新建短信模板</el-button>
</div>
<el-row :gutter="20" v-loading="loading">
<el-col :span="12" v-for="(v,i) in smsTempList" :key="i">
<div class="sms-lib-item border1">
<div class="sms-lib-item_top">模板名称:{{v.title}}(ID:{{v.templateId}}</div>
<div class="sms-lib-item_body">
<p class="danger-color" v-if="v.status === 2"><i class="el-icon-warning"></i> {{v.auditResult}}</p>
<p>{{v.content}}</p>
<el-col :span="12" v-for="(v,i) in smsTempList" :key="i">
<div class="sms-lib-item border1">
<div class="sms-lib-item_top">模板名称:{{v.title}}(ID:{{v.templateId}}</div>
<div class="sms-lib-item_body">
<p class="danger-color" v-if="v.status === 2"><i class="el-icon-warning"></i> {{v.auditResult}}</p>
<p>{{v.content}}</p>
</div>
<div class="sms-lib-item_bottom clearfix">
<div class="fl">
<span>{{v.addUserName}}</span>
<span>创建于 {{formateDateTimeByType(v.createTime,'yyyy-MM-dd-HH-mm-ss')}}</span>
</div>
<div class="sms-lib-item_bottom clearfix">
<div class="fl">
<span>{{v.addUserName}}</span>
<span>创建于 {{v.createTime | dateFormat}}</span>
</div>
<div class="fr">
<el-button type="text" v-if="v.status === 2" @click="$router.push('/message/temp/edit/'+v.smsTemplateId)">修改</el-button>
<el-button type="text" @click="delData(v)">删除</el-button>
</div>
<div class="fr">
<el-button type="text" v-if="v.status === 2" @click="$router.push('/message/temp/edit/'+v.smsTemplateId)">修改</el-button>
<el-button type="text" @click="delData(v)">删除</el-button>
</div>
<span class="sms-lib-item-tips_right danger-color-bg" v-if="v.status === 2">未通过</span>
<span class="sms-lib-item-tips_right warning-color-bg" v-if="v.status === 1">审核中</span>
<span class="sms-lib-item-tips_right success-color-bg" v-if="v.status === 0">已通过</span>
</div>
</el-col>
<span class="sms-lib-item-tips_right danger-color-bg" v-if="v.status === 2">未通过</span>
<span class="sms-lib-item-tips_right warning-color-bg" v-if="v.status === 1">审核中</span>
<span class="sms-lib-item-tips_right success-color-bg" v-if="v.status === 0">已通过</span>
</div>
</el-col>
</el-row>
<div class="text-center" v-if="smsTempList.length === 0">
<img class="block block-center pt100" width="60" height="60" src="../../assets/img/no-data_icon.png" alt="">
......@@ -42,72 +42,74 @@
import {formateDateTimeByType} from '@/utils/index.js'
import {LoadLibList,delTempService} from '@/service/api/messageApi.js';
export default {
name: 'sms-lib',
data () {
return {
loading:false,
smsTempList:[],
libTypeOptions:[{value:'',label:'全部'},{value:0,label:'普通短信模板'} ,{value:1,label:'营销短信模板'} ,{value:2,label:'验证码模板'}],
listParams:{
type:'',
content:'',
currentPage:1,
pageSize:20
},
total:0,
}
name: 'sms-lib',
data () {
return {
formateDateTimeByType,
loading:false,
smsTempList:[],
libTypeOptions:[{value:'',label:'全部'},{value:0,label:'普通短信模板'} ,{value:1,label:'营销短信模板'} ,{value:2,label:'验证码模板'}],
listParams:{
type:'',
content:'',
currentPage:1,
pageSize:20
},
total:0,
}
},
created() {
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'短信营销',path:'/message'},{name:'模板库',path:''}]);
this.LoadLibList();
},
methods: {
search() {
this.listParams.currentPage = 1;
this.LoadLibList();
},
created() {
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'短信营销',path:'/message'},{name:'模板库',path:''}]);
handleSizeChange(val) {
this.listParams.pageSize = val;
this.LoadLibList();
},
methods: {
handleSizeChange(val) {
this.listParams.pageSize = val;
this.LoadLibList();
},
handleCurrentChange(val) {
this.listParams.currentPage = val;
this.LoadLibList();
},
async LoadLibList() {
try{
this.loading = true;
let res = await LoadLibList(this.listParams);
if(res.errorCode === 0 &&res.result){
this.smsTempList = res.result.result || [];
this.total = res.result.totalCount;
} else {
this.smsTempList = [];
this.total = 0;
}
this.loading = false;
} catch (err) {
this.loading = false;
}
},
delData(row) {
this.$confirm('是否删除该短信模板?', '提示', {
confirmButtonText: '确定',
cancelBUttonText: '取消',
type: 'warning'
}).then(() => {
this.delTempService(row.templateId,row.smsTemplateId);
}).catch(() => {
this.$tips({type: 'info',message: '已取消删除'});
});
},
async delTempService(templateId,smsTemplateId){
let res = await delTempService({templateId,smsTemplateId});
this.$tips({type: 'success',message: '删除成功!'});
this.LoadLibList();
}
handleCurrentChange(val) {
this.listParams.currentPage = val;
this.LoadLibList();
},
filters: {
dateFormat: function (value) {
return formateDateTimeByType(value,'yyyy-MM-dd-HH-mm-ss');
async LoadLibList() {
this.loading = true;
try{
let res = await LoadLibList(this.listParams);
if(res.errorCode === 0 &&res.result){
this.smsTempList = res.result.result || [];
this.total = res.result.totalCount;
} else {
this.smsTempList = [];
this.total = 0;
}
this.loading = false;
} catch (err) {
this.loading = false;
}
},
delData(row) {
this.$confirm('是否删除该短信模板?', '提示', {
confirmButtonText: '确定',
cancelBUttonText: '取消',
type: 'warning'
}).then(() => {
delTempService({templateId:row.templateId,smsTemplateId:row.smsTemplateId}).then(res => {
if (res.errorCode === 0) {
this.$tips({type: 'success',message: '删除成功!'});
this.LoadLibList();
} else {
this.$tips({type: 'error',message: '删除失败!'});
}
})
}).catch(() => {
this.$tips({type: 'info',message: '已取消删除'});
});
}
}
}
</script>
<style scoped lang="scss">
......
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