Commit 99df302b by chenxin

Merge branch 'dev'

# Conflicts:
#	dist/index.html
#	dist/static/js/card.19e1231283fde567c8f5.js
#	dist/static/js/card.64b3ba7c880f8a486e64.js
#	dist/static/js/card.ef4bcb8e08dd64dad6ed.js
#	dist/static/js/manifest.e74b3ceeb26c8f9d6f9d.js
#	index.html
parents a9289ce8 fb55c08c
<!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/main.db6bd96939c2b580e050c8d6eb194619.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.30.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.31.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.91.js></script><script type=text/javascript src=/marketing/static/js/manifest.e74b3ceeb26c8f9d6f9d.js></script><script type=text/javascript src=/marketing/static/js/vendor.210a1a642e9c8aa3ce9e.js></script><script type=text/javascript src=/marketing/static/js/main.3ad190b85abd2e5d02a9.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 rel=stylesheet href=https://unpkg.com/element-ui/lib/theme-chalk/index.css><link href=/marketing/static/css/main.e0efb0a24611bebc656e52c534bf2b3e.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=https://unpkg.com/element-ui/lib/index.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.31.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.09.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.31.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.91.js></script><script type=text/javascript src=/marketing/static/js/manifest.919e44fb9a8406318e9f.js></script><script type=text/javascript src=/marketing/static/js/vendor.4cb744d5df3ad4bdbad7.js></script><script type=text/javascript src=/marketing/static/js/main.1b7654f81fa16fe07d43.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.
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.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,c,a){for(var i,u,f,d=0,s=[];d<n.length;d++)u=n[d],t[u]&&s.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(r&&r(n,c,a);s.length;)s.shift()();if(a)for(d=0;d<a.length;d++)f=o(o.s=a[d]);return f};var n={},t={12:0};function o(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,o){r=t[e]=[n,o]});r[2]=n;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+({0:"game",1:"card",2:"wechat",3:"ewash",4:"evaluation",5:"message",6:"ecm",7:"recharge",8:"msg",9:"calllog"}[e]||e)+"."+{0:"939ef154a34f1a744ce0",1:"facf5553d7ce1180d9ac",2:"f6b389dec9254beb0d27",3:"f08730b1cf116a4d8984",4:"a639d4b91d56334ec9ea",5:"8b5a84b02f4c6a9c3090",6:"31d8299ebecd59279d15",7:"6235075e2c47716c5050",8:"5d9bccc98221e443f872",9:"101d05cb830d169de2d6"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),n},o.m=e,o.c=n,o.d=function(e,r,n){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="/marketing/",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,a,c){for(var f,i,u,d=0,s=[];d<n.length;d++)i=n[d],t[i]&&s.push(t[i][0]),t[i]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(r&&r(n,a,c);s.length;)s.shift()();if(c)for(d=0;d<c.length;d++)u=o(o.s=c[d]);return u};var n={},t={11:0};function o(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,o){r=t[e]=[n,o]});r[2]=n;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+({0:"game",1:"card",2:"wechat",3:"evaluation",4:"message",5:"ecm",6:"recharge",7:"msg",8:"calllog"}[e]||e)+"."+{0:"939ef154a34f1a744ce0",1:"64b3ba7c880f8a486e64",2:"0dc1d23575b8326f2f45",3:"050296879188ef53023e",4:"9a09a2ca69a10dd4b1cb",5:"733ca22ff5da5d948852",6:"3a1253a9f8300faf72c0",7:"f7da77cd12f974cc2d9a",8:"5eed9786deb616aedcf4"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,a.appendChild(c),n},o.m=e,o.c=n,o.d=function(e,r,n){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="/marketing/",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
webpackJsonp([7],{"+66z":function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},"1oyr":function(e,t){e.exports=function(e){return function(){return e}}},"3T7U":function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},"5Zxu":function(e,t,n){var i=n("sBat");e.exports=function(e){var t=i(e),n=t%1;return t==t?n?t-n:t:0}},"6MiT":function(e,t,n){var i=n("aCM0"),r=n("UnEC"),s="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||r(e)&&i(e)==s}},"7UU1":function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},Biqn:function(e,t,n){var i=n("fKPv");e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}},BpiJ:function(e,t){},GXH0:function(e,t,n){
webpackJsonp([8],{"+66z":function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},"1oyr":function(e,t){e.exports=function(e){return function(){return e}}},"3T7U":function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},"5Zxu":function(e,t,n){var i=n("sBat");e.exports=function(e){var t=i(e),n=t%1;return t==t?n?t-n:t:0}},"6MiT":function(e,t,n){var i=n("aCM0"),r=n("UnEC"),s="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||r(e)&&i(e)==s}},"7UU1":function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},Biqn:function(e,t,n){var i=n("fKPv");e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}},BpiJ:function(e,t){},GXH0:function(e,t,n){
/*!
* vue-treeselect v0.0.36 | (c) 2017-2018 Riophae Lee
* Released under the MIT License.
......
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.
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-08-06 20:53:24
* @LastEditTime: 2019-08-09 09:53:32
* @LastEditors: Please set LastEditors
-->
<!DOCTYPE html>
<html>
<head>
......@@ -14,8 +7,19 @@
<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 rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- element 皮肤 -->
<!-- <link rel="stylesheet" type="text/css" href="http://web-1251519181.file.myqcloud.com/lib/elementUI/theme.1.0.1/index.css"> -->
<!-- GrowingIO Analytics code version 2.1 -->
<!-- Copyright 2015-2018 GrowingIO, Inc. More info available at http://www.growingio.com -->
<!-- <script type='text/javascript'>
!function(e,t,n,g,i){e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},n=t.createElement("script"),tag=t.getElementsByTagName("script")[0],n.async=1,n.src=('https:'==document.location.protocol?'https://':'http://')+g,tag.parentNode.insertBefore(n,tag)}(window,document,"script","assets.giocdn.com/2.1/gio.js","gio");
gio('init','8be12240a3749eab', {});
//custom page code begin here
//custom page code end here
gio('send');
</script> -->
<!-- End GrowingIO Analytics code version: 2.1 -->
</head>
<body>
<div id="app"></div>
......@@ -24,18 +28,19 @@
<script src="//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js"></script>
<script src="//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js"></script>
<script src="//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js"></script>
<script src="//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<!-- <script src="//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js"></script> -->
<!-- 组件引用cdn -->
<script src="//web-1251519181.file.myqcloud.com/components/header.2.0.30.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/header.2.0.31.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/card.2.0.02.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/store.2.0.01.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/store-card.2.0.04.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/store-card.2.0.09.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/people.2.0.31.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.12.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/input.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/selector.1.1.91.js"></script>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -45,7 +45,6 @@ a:hover {
position: relative;
margin: 0 auto;
}
.pt5{
padding-top: 5px!important;
}
......@@ -70,6 +69,9 @@ a:hover {
.pb20{
padding-bottom: 20px!important;
}
.pb40{
padding-bottom: 40px!important;
}
.pb22{
padding-bottom: 22px!important;
}
......@@ -163,6 +165,9 @@ a:hover {
.mb20{
margin-bottom: 20px!important;
}
.mb40{
margin-bottom: 40px!important;
}
.width20{
width: 20%!important;
}
......
......@@ -120,7 +120,8 @@ export default {
refreshRoute() {
var that = this;
//获取项目名 pathname (路由的hash)
that.routePathName = window.location.hash.split('/')[1];
// that.routePathName = window.location.hash.split('/')[1];
that.routePathName = window.location.pathname.split('/')[2];
if (that.routePathName.indexOf('?') != -1) {
that.routePathName = that.routePathName.split('?')[0];
}
......@@ -201,6 +202,9 @@ export default {
var that = this;
// console.log("新数据:",newData,oldData)
that.repProjectName = newData || 'gic-web';
},
$route(val) {
console.log(val);
}
},
......@@ -216,7 +220,7 @@ export default {
that.asideHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 64 + 'px';
//获取项目名 pathname (路由的hash)
that.pathName = window.location.hash.split('/')[1];
that.pathName = window.location.pathname.split('/')[2];
if (that.pathName.indexOf('?') != -1) {
that.pathName = that.pathName.split('?')[0];
}
......
......@@ -6,7 +6,7 @@
<div class="layout-right" :class="[{ asideShow: asideShow }, { collapseFlag: asideShow && collapseFlag }]">
<div class="layout-title">
<el-breadcrumb class="dm-breadcrumb" separator="/">
<el-breadcrumb-item :to="{ path: '' }"><a href="/report/#/memberSummary">首页</a></el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '' }"><a href="/report/memberSummary">首页</a></el-breadcrumb-item>
<el-breadcrumb-item :class="{ 'no-link': !v.path }" v-for="(v, i) in breadcrumb" :key="i" :to="{ path: v.path }">{{ v.name }}</el-breadcrumb-item>
</el-breadcrumb>
<h3>
......
......@@ -253,6 +253,7 @@ export default {
}
let configScript = document.createElement('script');
configScript.type = 'text/javascript';
console.log(this.mixedConfig.UEDITOR_HOME_URL + 'ueditor.config.js');
configScript.src = this.mixedConfig.UEDITOR_HOME_URL + 'ueditor.config.js';
document.getElementsByTagName('head')[0].appendChild(configScript);
configScript.onload = function() {
......
//卡券营销
// import card from '../../views/card';
// import cardList from '../../views/card/list';
// import cardRecord from '../../views/card/record';
// import cardRecordSend from '../../views/card/record-send';
// import cardRecordSendInfo from '../../views/card/record-send-info';
// import cardRecordGet from '../../views/card/record-get';
// import cardRecordCache from '../../views/card/record-cache';
// import cardGroupSend from '../../views/card/group-send';
// import cardAnalysis from '../../views/card/analysis';
// import cardForm from '../../views/card/form.vue';
// import cardShelf from '../../views/card/shelf';
// import cardManager from '../../views/card/manager';
// import cardCheck from '../../views/card/check';
export default {
path: 'card',
name: '卡券营销',
......
//智能营销
// import ecm from '../../views/ecm';
// import ecmList from '../../views/ecm/list';
// import ecmForm from '../../views/ecm/form.vue';
// import batchList from '../../views/ecm/batch-list';
// import currentList from '../../views/ecm/current-list';
export default {
path: 'ecm',
name: '智能营销管理',
......@@ -38,7 +32,7 @@ export default {
}
},
{
path: 'batchlist/:id/:name',
path: 'batchlist/:id',
name: '批次记录',
component: () => import(/* webpackChunkName: "ecm" */ '../../views/ecm/batch-list.vue'),
meta: {
......@@ -46,7 +40,7 @@ export default {
}
},
{
path: 'currentlist/:id/:name',
path: 'currentlist/:id',
name: '实时发送记录',
component: () => import(/* webpackChunkName: "ecm" */ '../../views/ecm/current-list.vue'),
meta: {
......
export default {
path: 'ewash',
name: 'e袋洗',
component: () => import(/* webpackChunkName: "ewash" */ '../../views/ewash/index.vue'),
meta: {},
redirect: 'ewash/list',
children: [
{
path: 'list',
name: 'e袋洗服务',
component: () => import(/* webpackChunkName: "ewash" */ '../../views/ewash/list.vue'),
meta: {}
},
{
path: 'add',
name: '新增卡券',
component: () => import(/* webpackChunkName: "ewash" */ '../../views/ewash/form.vue'),
meta: {
type: 'add',
path: '/ewash/list'
}
},
{
path: 'edit/:id',
name: '编辑卡券',
component: () => import(/* webpackChunkName: "ewash" */ '../../views/ewash/form.vue'),
meta: {
type: 'edit',
path: '/ewash/list'
}
},
{
path: 'analysis/:id',
name: 'e袋洗卡券报表',
component: () => import(/* webpackChunkName: "ewash" */ '../../views/ewash/analysis.vue'),
meta: {
path: '/ewash/list'
}
},
{
path: 'statements',
name: 'e袋洗账单',
component: () => import(/* webpackChunkName: "ewash" */ '../../views/ewash/statements.vue'),
meta: {
path: '/ewash/list'
}
},
{
path: 'statements/detail/:id',
name: 'e袋洗账单详情',
component: () => import(/* webpackChunkName: "ewash" */ '../../views/ewash/statements-detail.vue'),
meta: {
path: '/ewash/list'
}
}
]
};
......@@ -24,6 +24,8 @@ import calllog from './modules/calllog';
import evaluation from './modules/evaluation';
//计费中心
import recharge from './modules/recharge';
//e袋洗
import ewash from './modules/ewash';
export default [
{
......@@ -31,7 +33,7 @@ export default [
name: 'layout',
component: Layout,
redirect: '/wechat/record',
children: [card, ecm, game, message, wechat, msg, calllog, recharge, evaluation]
children: [card, ecm, game, message, wechat, msg, calllog, recharge, evaluation, ewash]
},
{
path: '/401',
......
......@@ -4,7 +4,7 @@ import config from '@/config';
export const url = config.api + PREFIX;
//卡券营销--卡券库--卡券分页列表
export const cardPageList = params => requests(PREFIX + 'card-page', params);
export const cardPageList = params => requests(PREFIX + 'card-page', params, false, false, 'POST', false);
//卡券营销--卡券库--卡券分页列表
export const updateCardStock = params => requests(PREFIX + 'update-card-stock', params);
......
import { requests } from './index';
const PREFIX = 'api-marketing/';
import config from '@/config';
export const url = config.api + PREFIX;
// 卡券 - e袋洗 -- 列表/新增/删除 复用card的,些许参数不一样
// 对账列表
export const edxOrderList = params => requests(PREFIX + 'edx-order-list', params);
// 获取子账户可选列表
export const openEdxStoreSearch = params => requests(PREFIX + 'open-edx-store-search', params);
// 保存子账户
export const openEdxStore = params => requests(PREFIX + 'open-edx-store', params);
// 订单详情
export const edxOrderDetail = params => requests(PREFIX + 'edx-order-detail', params);
// e袋洗 商品使用类目
export const getEdxCategory = params => requests(PREFIX + 'edx-category', params);
// 导出卡券
export const exportEdxOrderCsv = config.api + PREFIX + 'edx-order-csv';
......@@ -3,7 +3,8 @@ import { log } from '@/utils';
import qs from 'qs';
import axios from 'axios';
// eslint-disable-next-line
const router = new VueRouter();
// const router = new VueRouter();
import router from '../../router/index';
// 加载最小时间
const MINI_TIME = 300;
......@@ -47,7 +48,7 @@ function popRequest(config) {
* @param {*} code
* @param {string} [message='请求错误']
*/
function handlerErr(code, message = '请求错误') {
function handlerErr(code, message = '请求错误', alertError = true) {
switch (code) {
case 404:
message = '404,错误请求';
......@@ -55,7 +56,7 @@ function handlerErr(code, message = '请求错误') {
break;
case 401:
if (!_isDev) {
window.location.href = config.api + '/gic-web/#/';
window.location.href = config.api + 'gic-web/';
}
message = '登录失效';
break;
......@@ -80,14 +81,16 @@ function handlerErr(code, message = '请求错误') {
message = '网关错误';
break;
}
// eslint-disable-next-line
Vue.prototype.$tips({ type: 'warning', message: message });
if (alertError) {
// eslint-disable-next-line
Vue.prototype.$tips({ type: 'warning', message: message });
}
}
/**
* 请求地址,请求数据,是否静默,请求方法
*/
const requests = (url, data = {}, contentTypeIsJSON = false, isSilence = false, method = 'POST') => {
const requests = (url, data = {}, contentTypeIsJSON = false, isSilence = false, method = 'POST', alertError = true) => {
let _opts = { method, url };
const _query = {};
let _timer = null;
......@@ -117,7 +120,7 @@ const requests = (url, data = {}, contentTypeIsJSON = false, isSilence = false,
popRequest(_random);
if (res.data.errorCode !== 0) {
reject(res);
handlerErr(res.data.errorCode, res.data.message);
handlerErr(res.data.errorCode, res.data.message, alertError);
} else {
resolve(res.data);
}
......@@ -126,7 +129,7 @@ const requests = (url, data = {}, contentTypeIsJSON = false, isSilence = false,
clearTimeout(_timer);
popRequest(_random);
if (res) {
handlerErr(res.response.status, '接口异常');
handlerErr(res.response.status, '接口异常', alertError);
}
reject(res);
});
......
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-08-06 20:53:23
* @LastEditTime: 2019-08-21 09:27:41
* @LastEditors: Please set LastEditors
-->
<template>
<div>
<el-form class="dm-wrap" :model="form" ref="form" :rules="rules" label-width="120px">
......
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-06-04 11:42:09
* @LastEditTime: 2019-08-20 10:15:52
* @LastEditors: Please set LastEditors
-->
<template>
<el-form :model="form" ref="form" :rules="rules" label-width="100px" v-loading="loading">
<div class="dm-form__wrap">
......@@ -237,7 +230,6 @@ export default {
},
isEditTemplate() {
//是否可以编辑 1.新增 2.编辑,选择时间发送,发送时间大于当前时间
console.log(111);
return this.isAdd || (this.isEdit && this.form.putOnType === 1 && this.form.putOnTime > Date.now());
}
},
......@@ -311,6 +303,12 @@ export default {
} else if (this.form.memberType === 1) {
this.memberList = res.result.memberList;
} else if (this.form.memberType === 2) {
const memberTagGroupIds = res.result.tagGroupList.map(v => {
return v.memberTagGroupId;
});
if (memberTagGroupIds) {
this.form.memberGroupIds = memberTagGroupIds.join(); // 赋值会员分组id
}
this.defaltSelected = res.result.tagGroupList || [];
}
......@@ -505,6 +503,8 @@ export default {
memberIds: this.form.openIds,
cardId: this.form.cardId
};
// console.log(this.form.memberGroupIds);
let res = await checkPutonMemberIds(params);
if (res.errorCode === 0) {
let sumPerson = res.result.totalSendCount;
......
......@@ -13,6 +13,7 @@
<el-option v-for="(item, index) in cardTypeOptions" :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="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="$router.push('/ewash/add')">新增洗衣券</el-button>
<el-button class="fr" type="primary" @click="$router.push('/card/add')">新增卡券</el-button>
</div>
<ul class="clearfix" v-loading="loading" element-loading-text="拼命加载中">
......
......@@ -42,7 +42,10 @@
</el-table-column>
<el-table-column width="120" align="left" prop="receiveTime" label="卡券类型">
<template slot-scope="scope">
{{ scope.row.cardType === 0 ? '抵金券' : scope.row.cardType === 1 ? '折扣券' : '兑换券' }}
<template v-if="scope.row.gicCouponType === 1">
e袋洗
</template>
<template v-else>{{ scope.row.cardType === 0 ? '抵金券' : scope.row.cardType === 1 ? '折扣券' : '兑换券' }}</template>
</template>
</el-table-column>
<el-table-column min-width="100" align="left" prop="receiveTime" label="卡券名称">
......@@ -71,7 +74,8 @@
</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>
<!-- 卡券类型为 e袋洗 时 列表操作按钮 无手动核销按钮 -->
<el-button type="text" v-if="scope.row.status === 4 && Date.now() < scope.row.limitTime + 24 * 60 * 60 * 1000 && scope.row.gicCouponType !== 1" @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>
......
......@@ -101,7 +101,7 @@ export default {
},
created() {
this.ecmBatchSendInfos();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '智能营销', path: '/ecm' }, { name: this.$route.params.name + ' - 批次记录', path: '' }]);
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '智能营销', path: '/ecm' }, { name: this.$route.query.name + ' - 批次记录', path: '' }]);
this.$store.commit(
'mutations_layoutTips',
`<div class="layout--tips">
......@@ -149,7 +149,7 @@ export default {
toDialog(row) {
this.dialogShow = true;
this.dialogId = row.ecmPlanQuartzLogId;
this.dialogEcmPlanName = this.$route.params.name;
this.dialogEcmPlanName = this.$route.query.name;
this.dialogExecTime = formatDateTimeByType(row.execTime, 'yyyy-MM-dd-HH-mm-ss');
console.log(this.dialogId);
}
......
......@@ -143,7 +143,7 @@ export default {
},
created() {
this.ecmCurrentSendInfos();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '智能营销', path: '/ecm' }, { name: this.$route.params.name + ' - 实时发送记录', path: '' }]);
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '智能营销', path: '/ecm' }, { name: this.$route.query.name + ' - 实时发送记录', path: '' }]);
this.$store.commit('mutations_layoutTips', `<div class="layout--tips"><i class="el-icon-info"></i>历史数据限制:2018年11月15日之前的历史营销计划,没有详细数据</div>`);
setTimeout(_ => {
this.$store.commit('mutations_layoutTips', '');
......@@ -220,7 +220,7 @@ export default {
memberInfo: this.listParams.memberInfo,
success: this.listParams.success,
ecmPlanId: this.listParams.ecmPlanId,
ecmPlanName: this.$route.params.name,
ecmPlanName: this.$route.query.name,
beginTime: this.listParams.beginTime,
endTime: this.listParams.endTime,
ecmMarketingTypeRelationIds: this.listParams.ecmMarketingTypeRelationIds,
......
......@@ -175,7 +175,7 @@
<div class="mb20" v-if="form.memberType === 0">
<vue-gic-people :projectName="projectName" :isAdd="isAdd" :triggerReset="true" :useId="useId" :hasSearchData="hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" @findFilter="findFilter" @getBackData="getBackData" @editHide="editHide" @editShow="editShow" @hideBtn="hideBtn" />
<div class="gic-people--button" v-show="toggleTag">
<el-button size="small" type="primary" @click="getData">确 定</el-button>
<el-button size="small" :disabled="isEdit" type="primary" @click="getData">确 定</el-button>
<el-button size="small" @click="cancelFilter">取 消</el-button>
</div>
</div>
......
......@@ -139,7 +139,7 @@ export default {
},
// 记录
toRecord(row) {
this.$router.push(`/ecm/${row.effectType ? 'batchlist' : 'currentlist'}/${row.ecmPlanId}/${row.ecmPlanName}`);
this.$router.push({ path: `/ecm/${row.effectType ? 'batchlist' : 'currentlist'}/${row.ecmPlanId}`, query: { name: row.ecmPlanName } });
},
// 删除
async delData(row) {
......
<template>
<section>
<!-- 渠道分析 -->
<div class="dm-form__wrap" v-if="$route.meta.type !== 'shelf'">
<h3 class="dm-title__label">
<span class="card-chart__title">渠道分析</span>
<el-date-picker class="fr ml5 mr20" v-model="dateTime2" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="cardChannelAnalysis"></el-date-picker>
</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 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>
</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 { formatDateTimeByType } from '@/utils/index.js';
import VeLine from 'v-charts/lib/line.common';
import G2 from '@antv/g2';
export default {
name: 'card-analysis',
data() {
this.chartSettings = {
xAxisType: 'time'
};
return {
formatDateTimeByType,
dateTime: [Date.now() - 30 * 24 * 60 * 60 * 1000, Date.now()],
dateTime2: [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: '' }, { 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: 'e袋洗服务', path: '' }, { name: '卡券报表', path: '' }]);
}
},
methods: {
//加载列表
async cardChannelAnalysis() {
let params = {
coupCardId: this.$route.params.id,
beginTime: '',
endTime: ''
};
if (this.dateTime2) {
params.beginTime = formatDateTimeByType(this.dateTime2[0], 'yyyy-MM-dd');
params.endTime = formatDateTimeByType(this.dateTime2[1], 'yyyy-MM-dd');
} else {
params.beginTime = '';
params.endTime = '';
}
this.loading = true;
try {
let resList = await cardChannelAnalysis(params);
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 = formatDateTimeByType(this.dateTime[0], 'yyyy-MM-dd');
this.chartParams.endTime = formatDateTimeByType(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 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>
<div>
<router-view />
</div>
</template>
<script>
export default {
name: 'ewash',
created() {
this.$store.commit('aside_handler', false);
this.$nextTick(_ => {
this.$store.commit('aside_handler', true);
});
}
};
</script>
<template>
<section class="dm-wrap">
<div class="game-ptyx-header pb10 clearfix">
<span class="pr10">卡券共{{ total }}</span>
<el-button-group class="vertical-middle pr4">
<el-button :disabled="!ewashDisable" @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 :disabled="!ewashDisable" @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 :disabled="!ewashDisable" @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>
<el-button :disabled="!ewashDisable" @click="sortList('col4')">核销率<i class="el-icon--right" :class="listParams.sortBy === 'col4' ? 'el-icon-caret-top' : listParams.sortBy === 'col4 desc' ? 'el-icon-caret-bottom' : 'el-icon-d-caret'"></i></el-button>
<el-button :disabled="!ewashDisable" @click="sortList('col5')">核销额<i class="el-icon--right" :class="listParams.sortBy === 'col5' ? 'el-icon-caret-top' : listParams.sortBy === 'col5 desc' ? 'el-icon-caret-bottom' : 'el-icon-d-caret'"></i></el-button>
</el-button-group>
<el-select :disabled="!ewashDisable" class="dm-select" v-model="listParams.giftCouponDiscountType" placeholder="选择卡券类型" @change="refresh">
<el-option v-for="(item, index) in cardTypeOptions" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input :disabled="!ewashDisable" v-model="listParams.searchParam" class="w200 vertical-middle" placeholder="输入卡券名称/备注" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<div class="fr">
<el-button type="primary" @click="$router.push('/ewash/statements')" :disabled="!ewashDisable">查看账单</el-button>
<el-button type="primary" @click="handleDialogShow" :disabled="!ewashDisable">创建子账户</el-button>
<el-button type="primary" @click="$router.push('/ewash/add')" :disabled="!ewashDisable">新增卡券</el-button>
</div>
</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 pb20" :disabled="!ewashDisable" type="text" @click="$router.push('/ewash/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="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
<!-- 创建子账户dialog -->
<store-child ref="storeChild" :dialogVisible.sync="dialogVisible" />
<!-- 为创建e袋洗服务 -->
<el-dialog title="提示" :visible="ewashTipDialog" width="400px">
<div class="text-center pb20">
<i class="el-icon-error red fz40 mb20 pb10"></i>
<div class="fz16">请联系客服进行开通使用!</div>
</div>
<div class="text-center pb10 mt20">
<el-button @click="ewashTipDialog = false">确 定</el-button>
</div>
</el-dialog>
</section>
</template>
<script>
import { cardPageList, deleteCard } from '@/service/api/cardApi.js';
import adjustStock from '@/views/card/partials/adjust-Stock';
import cardItem from './partials/card-item';
import tableMethods from '@/mixins/tableMethods.js';
import storeChild from './partials/store-child';
export default {
name: 'card-list',
mixins: [tableMethods],
data() {
return {
listParams: {
shelfId: '',
sortBy: '',
searchParam: '',
currentPage: 1,
pageSize: 20,
cardType: '',
gicCouponType: 1,
giftCouponDiscountType: ''
},
total: 0,
loading: false,
tableList: [],
cardTypeOptions: [{ value: '', label: '全部卡券类型' }, { value: 1, label: '抵金券' }, { value: 2, label: '免单券' }],
sortFlag: false,
adjustStock: false,
currentCard: {},
dialogVisible: false,
ewashTipDialog: false,
ewashDisable: false // e袋洗服务能否使用
};
},
components: {
'adjust-stock': adjustStock,
'card-item': cardItem,
storeChild
},
created() {
window.scrollTo(0, 0);
this.getTableList();
this.$store.commit('mutations_breadcrumb', [{ name: 'e袋洗服务', path: '' }, { name: '服务列表', path: '' }]);
},
methods: {
// 创建子账户dialog
handleDialogShow() {
this.dialogVisible = true;
this.$refs.storeChild.reload();
},
//编辑库存 前置
preAdjustStock(val) {
this.currentCard = val;
this.adjustStock = true;
},
//修改库存后台异步 所以这边延迟刷新列表
delayRefresh(val) {
this.currentCard.couponStock = val;
},
sortList(val) {
this.sortFlag = !this.sortFlag;
this.listParams.sortBy = this.sortFlag ? val + ' desc' : val;
this.refresh();
},
async getTableList() {
this.loading = true;
try {
let res = await cardPageList(this.listParams);
this.tableList = res.result.result;
this.total = res.result.totalCount;
this.ewashDisable = true;
} catch (err) {
if (err.data && err.data.errorCode === 170049) {
// 未开通e袋洗服务
this.ewashTipDialog = true;
this.ewashDisable = false;
}
// 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) {
await deleteCard({ coupCardId });
this.$tips({ type: 'success', message: '删除成功!' });
if (this.tableList.length === 1 && this.listParams.currentPage !== 1) {
this.listParams.currentPage--;
}
this.getTableList();
}
}
};
</script>
<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">{{ formatDateTimeByType(item.beginDate, 'yyyy-MM-dd') }}{{ formatDateTimeByType(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>
<p v-if="item.erpDemoCode" class="ellipsis-100">
demo券号:<span>{{ item.erpDemoCode || '--' }}</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 './status-render.js';
import { formatDateTimeByType } from '@/utils/index.js';
export default {
props: {
item: {
type: Object,
default() {
return {
cardEffectiveMode: 0
};
}
},
//是否为展架里的卡券 默认为false
shelfFlag: {
type: Boolean,
default: false
}
},
data() {
return {
formatDateTimeByType
};
},
components: {
'render-temp': renderTemp
},
methods: {
/**
* @param val
* 1 投放 2 报表 3 编辑 4 删除 5 详情
*/
handler(val) {
switch (val) {
case 2:
this.$router.push('/ewash/analysis/' + this.item.coupCardId);
break;
case 3:
this.$router.push('/ewash/edit/' + this.item.coupCardId);
break;
case 4:
this.$emit('delete-card', 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 ? '最低消费满' + _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' || _useCondition.only == 0 ? '' : '不可与其他优惠共享');
}
}
};
</script>
<style lang="scss" scoped>
.card-item {
width: 340px;
margin: 10px;
border: 1px solid #63b359;
border-radius: 4px;
overflow-y: none;
vertical-align: middle;
min-height: 376px;
&_head {
width: 100%;
text-align: center;
color: #fff;
background: #63b359;
padding: 10px 0;
h4 {
font-size: 16px;
font-weight: 500;
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;
line-height: 28px;
}
p {
font-size: 12px;
color: #999;
line-height: 20px;
}
}
}
.card-item__detail {
padding: 10px;
height: 150px;
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>
<div class="ewash-good">
<el-cascader-panel class="cascader" v-model="value" :options="options" :props="props" @change="handleChange"></el-cascader-panel>
</div>
</template>
<script>
import { getEdxCategory } from '@/service/api/ewashApi.js';
export default {
data() {
return {
value: '',
options: [],
props: {
multiple: true
}
};
},
methods: {
handleGetEdxCategory() {
getEdxCategory().then(res => {
// console.log(res);
this.options = res.result.map(v => {
return {
label: v.category_name,
value: v.category_id,
children:
v.clothes.map(y => {
return {
label: y.clothes_name,
value: y.clothes_id,
category_id: v.category_id // 保存category_id
};
}) || []
};
});
});
},
/* 父组件调用 */
getCategory() {
let clothes = [];
this.options.map(v => {
clothes = clothes.concat(v.children);
});
const clothesIds = this.value.map(v => {
return v[1];
});
return clothes
.filter(v => {
return clothesIds.includes(v.value);
})
.map(v => {
return {
id: v.value,
name: v.label
// category_id: v.category_id
};
});
}
},
mounted() {
this.handleGetEdxCategory();
}
};
</script>
<style lang="scss" scoped>
.ewash-good {
/deep/ {
.el-cascader-menu {
width: 50%;
}
.cascader {
width: 100%;
margin: 0 auto;
}
.el-cascader-menu__wrap {
margin: 0 auto !important;
}
.el-scrollbar__wrap {
overflow: auto;
}
.el-scrollbar__bar {
opacity: 0;
}
.el-cascader-menu {
height: 500px;
}
}
}
</style>
import Vue from 'vue';
export default Vue.component('render-temp', {
props: {
item: Object
},
methods: {
handler(val) {
this.$emit('handler', val);
}
},
render(h) {
// const bind1 = (
// <a title="投放" onClick={this.handler.bind(null, 1)}>
// <i class="iconfont icon-daohang-" />
// </a>
// );
const bind2 = (
<a title="报表" onClick={this.handler.bind(null, 2)}>
<i class="el-icon-tickets" />
</a>
);
const bind3 = (
<a title="编辑" onClick={this.handler.bind(null, 3)}>
<i class="el-icon-edit" />
</a>
);
const bind4 = (
<a title="删除" onClick={this.handler.bind(null, 4)}>
<i class="el-icon-delete" />
</a>
);
// const bind5 = (
// <a title="详情" onClick={this.handler.bind(null, 5)}>
// <i class="el-icon-document" />
// </a>
// );
// const bind6 = (
// <a title="复制" onClick={this.handler.bind(null, 6)}>
// <i class="iconfont icon-wxcard-copy" />
// </a>
// );
const statushtml = (
<span>
{/* {bind6} */}
{/* {bind1} */}
{bind2}
{bind3}
{bind4}
</span>
);
const overDateHtml = (
<span>
<span class="danger">已过期</span>
{/* {bind6} */}
{bind2}
{/* {bind5} */}
{bind4}
</span>
);
const noputonStatushtml = (
<span>
{/* {bind6} */}
{bind2}
{bind3}
{bind4}
</span>
);
const statusNostockhtml = noputonStatushtml;
const statusFaildhtml = (
<span>
{/* {bind6} */}
{bind3}
{bind4}
</span>
);
const _html = this.item.cardEffectiveMode == 0 && this.item.endDate < Date.now() ? overDateHtml : statushtml;
let failMsg = '';
if (this.item.autingFaildMsg) {
failMsg = ':' + this.item.autingFaildMsg;
if (this.item.autingFaildMsg.length > 8) {
failMsg = (
<el-popover placement="top-start" title="" width="200" trigger="hover" content={this.item.autingFaildMsg}>
<span class="danger-color" slot="reference">
{this.item.autingFaildMsg.substring(0, 8) + '...'}
</span>
</el-popover>
);
}
}
if (this.item.cardEffectiveMode == 0 && this.item.endDate < Date.now()) {
return <div class="fr">{overDateHtml}</div>;
}
if (this.item.auditingStatus === 0) {
return (
<div class="fr">
<span class="green">审核中</span>
</div>
);
} else if (this.item.auditingStatus === -1) {
return (
<div class="fr">
<span class="danger-color">
审核失败{failMsg}
{statusFaildhtml}
</span>
</div>
);
} else if (this.item.auditingStatus === -2) {
return (
<div class="fr">
<span class="danger-color">
更新失败{failMsg}
{_html}
</span>
</div>
);
} else if (this.item.useCustomCode == 1 && this.item.customCodeSync == 1) {
return (
<div class="fr">
<span class="danger-color">正在上传卡券Code</span>
</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="创建子账户" width="600px" :visible.sync="dialogVisible" @closed="close">
<p class="mb20 red">注:创建企业e卡结算账户,以支持e袋洗活动的进行,备选门店屏蔽已创建关联的门店。</p>
<div class="el-transfer" v-loading="loading" style="width:500px;margin:0 auto;">
<!-- 左侧 -->
<div class="el-transfer-panel">
<div class="el-transfer-panel__header">
<label class="el-checkbox">
门店列表
<span class="fr mr10">{{ leftSelect.length }}/{{ leftTotal }}</span>
</label>
</div>
<div class="search">
<el-input type="text" v-model="listParams.searchParam" clearable placeholder="请输入门店名称" @change="search" />
</div>
<div class="el-transfer-panel__body">
<!-- v-infinite-scroll="leftScrollLoad" :infinite-scroll-disabled="!shouldLeftLoad" -->
<div class="el-transfer-panel__list" style="overflow:auto">
<!-- eslint-disable -->
<el-checkbox-group v-model="leftSelect">
<el-checkbox
class="el-transfer-panel__item"
v-for="item in leftList.filter( v => { return !v.select; })"
:label="item.key"
:key="item"
>
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
<p class="text-center" v-if="shouldLeftLoad">
<el-button class="gray" type="text" @click="leftScrollLoad">{{ leftLoading ? '加载中...' : '加载更多' }}</el-button>
</p>
<p class="text-center" v-else><el-button class="fz12" type="text" disabled>无更多数据</el-button></p>
<!-- eslint-disable -->
</div>
</div>
</div>
<!-- 中间按钮区域 -->
<div class="center-button">
<el-button class="mb10" type="primary" size="mini" icon="el-icon-arrow-right" :disabled="!leftSelect.length" @click="saveToRight">转入</el-button>
<br />
<el-button icon="el-icon-close" size="mini" :disabled="!rightSelect.length" @click="deleteRightItems(false)">移除</el-button>
</div>
<!-- 右侧 -->
<div class="el-transfer-panel">
<div class="el-transfer-panel__header">
<label class="el-checkbox">
已选({{ rightList.length }}个门店)
<span class="fr mr10">{{ rightSelect.length }}/{{ rightList.length }}</span>
</label>
</div>
<div class="search">
<el-input type="text" v-model="rightFilter" clearable placeholder="请输入门店名称" />
</div>
<div class="el-transfer-panel__body">
<div class="el-transfer-panel__list">
<el-checkbox-group v-model="rightSelect">
<el-checkbox class="el-transfer-panel__item" v-for="item in rightList.filter(v => { return v.name.indexOf(rightFilter) !== -1})" :label="item.key" :key="item.key">{{ item.name }}</el-checkbox>
</el-checkbox-group>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="handleSave()">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import { openEdxStoreSearch, openEdxStore } from '@/service/api/ewashApi';
const pageSize = 20; // 分页数
export default {
name: 'ewash-store-child',
props: ['dialogVisible'],
data() {
return {
loading: false,
leftLoading: false, // 左侧列表加载
shouldLeftLoad: true, // 左侧是否可以滚动触发加载
leftList: [],
leftTotal: 0,
leftSelect: [],
rightList: [],
rightSelect: [],
listParams: {
pageSize,
currentPage: 1,
searchParam: ''
},
rightFilter: '' // 右侧过滤数据
};
},
methods: {
// 移至右侧
saveToRight() {
// 右侧push左侧数据
this.rightList = this.rightList.concat(
this.leftList.filter(v => {
return this.leftSelect.includes(v.key);
})
);
// 左侧只保留未被选择的
const rightIds = this.rightList.map(v => {
return v.key;
}); // 右侧选中的ids
this.leftList = this.leftList.map(v => {
v.select = rightIds.includes(v.key);
return v;
});
// 重置左侧已选
this.leftSelect = [];
},
// 移除右侧
deleteRightItems() {
// 移除右侧
this.rightList = this.rightList.filter(v => {
return !this.rightSelect.includes(v.key);
});
// 左侧数据去除disable
this.leftList = this.leftList.map(v => {
// 被选择且右侧选中移除
if (v.select && this.rightSelect.includes(v.key)) {
v.select = false;
}
return v;
});
// 清除右侧数据
this.rightSelect = [];
},
// 获取左侧列表数据
getLeftList() {
if (this.leftLoading) {
return;
}
this.leftLoading = true;
openEdxStoreSearch(this.listParams).then(res => {
this.leftLoading = false;
if (res.result.result && res.result.result.length < pageSize) {
this.shouldLeftLoad = false; // 不可以加载更多
}
const _leftList =
res.result.result.map(v => {
return {
key: v.storeId,
name: v.storeName,
select: false
};
}) || [];
this.leftList = this.leftList.concat(_leftList);
this.leftTotal = res.result.totalCount;
});
},
// 滚动加载触发
leftScrollLoad() {
if (this.leftLoading) {
return;
}
this.listParams.currentPage += 1;
this.getLeftList();
},
// 查询
search() {
this.listParams.currentPage = 1;
this.leftSelect = [];
this.leftList = [];
this.getLeftList();
},
close() {
this.$emit('update:dialogVisible', false);
// 重置数据
this.shouldLeftLoad = true;
this.leftList = [];
this.rightList = [];
this.leftSelect = [];
this.rightSelect = [];
this.listParams.currentPage = 1;
this.listParams.searchParam = '';
},
// 保存子账户
handleSave() {
const storeIds = this.rightList
.map(v => {
return v.key;
})
.join();
if (storeIds === '') {
this.$tips({ message: '请选择门店', type: 'error' });
return;
}
this.loading = true;
openEdxStore({ storeIds })
.then(res => {
this.loading = false;
console.log(res);
this.$tips({ message: res.message || '保存成功' });
this.close();
})
.catch(() => {
this.loading = false;
});
},
/** 父组件调用 **/
/** 左侧列表重置 加载 **/
reload() {
this.shouldLeftLoad = true;
this.leftList = [];
this.rightList = [];
this.leftSelect = [];
this.rightSelect = [];
this.listParams.currentPage = 1;
this.listParams.searchParam = '';
this.getLeftList();
}
}
};
</script>
<style lang="scss" scoped>
.search {
margin: 8px 10px;
}
.center-button {
display: inline-block;
margin: 0 3px 0 5px;
}
</style>
<template>
<section class="dm-wrap">
<div class="clearfix pb22">
<el-input v-model="listParams.orderNumber" class="w250" placeholder="请输入业务单号进行搜索" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-date-picker class="w300" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="refresh"></el-date-picker>
<el-button class="fr" type="primary" @click="exportExcel">导出明细</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading">
<el-table-column v-for="(v, i) in tableHeader" :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" :fixed="v.fixed">
<template slot-scope="scope">
<span v-if="v.formatter" v-html="v.formatter(scope.row)"></span>
<span v-else>{{ scope.row[v.prop] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="100px" fixed="right">
<template slot-scope="scope">
<el-button type="text" @click="$router.push('/ewash/statements/detail/' + scope.row.orderId)">查看详情</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="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
<vue-gic-export-excel :dialogVisible.sync="dialogVisible" :dataArr="tableList" :type="2" :excelUrl="excelUrl" :params="params" :projectName="projectName"></vue-gic-export-excel>
</section>
</template>
<script>
import { edxOrderList, exportEdxOrderCsv } from '@/service/api/ewashApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import tableMethods from '@/mixins/tableMethods.js';
export default {
name: 'ewash-statements',
mixins: [tableMethods],
data() {
return {
dialogVisible: false,
excelUrl: '',
params: {},
tableList: [],
tableHeader: [
{ label: '业务单号', prop: 'orderNumber', minWidth: '140', tooltip: true, align: 'left' },
{ label: 'e袋洗单号', prop: 'edaixiOrderNumber', minWidth: '140', tooltip: true, align: 'left' },
{ label: '卡券类型', prop: 'couponTypeName', minWidth: '120', align: 'left' },
{ label: '卡券名称', prop: 'couponName', minWidth: '120', align: 'left' },
{ label: '卡券核销码', prop: 'couponNo', minWidth: '140', tooltip: true, align: 'left' },
{
label: 'E卡扣款时间',
prop: 'edaixiPayTime',
minWidth: '100',
align: 'left',
sortable: 'custom',
formatter: function(row) {
return `<p class="cell-time">
${formatDateTimeByType(row.edaixiPayTime, 'yyyy-MM-dd-HH-mm-ss', true).y}<br />
<span>${formatDateTimeByType(row.edaixiPayTime, 'yyyy-MM-dd-HH-mm-ss', true).h}</span>
</p>`;
}
},
{
label: 'e袋洗扣款',
prop: 'edaixiPayAmount',
minWidth: '100',
tooltip: false,
align: 'left',
formatter: row => {
const value = row.edaixiPayAmount;
if (!value) return '0.00';
if (isNaN(value)) return value;
return value.toFixed(2);
}
}
],
listParams: {
orderNumber: '',
startTime: '',
endTime: '',
currentPage: 1,
pageSize: 20
},
dateTime: [Date.now() - 30 * 24 * 60 * 60 * 1000, Date.now()],
total: 0
};
},
mounted() {
this.getTableList();
},
created() {
this.$store.commit('mutations_breadcrumb', [{ name: 'e袋洗服务', path: '' }, { name: '服务列表', path: '/ewash/list' }, { name: 'e袋洗账单', path: '' }]);
},
methods: {
formatDateTimeByType,
exportExcel() {
this.dialogVisible = true;
this.excelUrl = exportEdxOrderCsv;
this.params = {
orderNumber: this.listParams.orderNumber,
startTime: this.listParams.startTime,
endTime: this.listParams.endTime,
requestProject: 'marketing'
};
},
// 获取列表
async getTableList() {
try {
this.loading = true;
if (this.dateTime) {
this.listParams.startTime = formatDateTimeByType(this.dateTime[0], 'yyyy-MM-dd');
this.listParams.endTime = formatDateTimeByType(this.dateTime[1], 'yyyy-MM-dd');
} else {
this.listParams.startTime = this.listParams.endTime = '';
}
let res = await edxOrderList(this.listParams);
if (res.errorCode === 0 && res.result) {
this.tableList = res.result.result || [];
this.total = res.result.totalCount;
} else {
this.tableList = [];
this.total = 0;
}
this.loading = false;
} catch (err) {
this.loading = false;
}
}
}
};
</script>
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