Commit 638aedda by chenxin

fix:卡券列表 card-item增加领取记录icon。领取记录必须先选择卡券或开启全部卡券btn;增加卡券选择模糊搜索select

parent c54090a8
<!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/fonts/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet href=//web-1251519181.file.myqcloud.com/components/element.2.12.0.css><link href=/marketing/static/css/main.28ca054f4ccddd8454a48c8049fb08d4.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/components/element.2.12.0.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.35.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.10.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.2.16.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.18.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.42.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.13.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.2.10.js></script><script type=text/javascript src=/marketing/static/js/manifest.b0dc2d0d34aa2a7907fc.js></script><script type=text/javascript src=/marketing/static/js/vendor.cbb380c2053ab598e892.js></script><script type=text/javascript src=/marketing/static/js/main.1b393f0de32756d09df1.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/fonts/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet href=//web-1251519181.file.myqcloud.com/components/element.2.12.0.css><link href=/marketing/static/css/main.aaae90571945b4744da03d6313965f5b.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/components/element.2.12.0.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.35.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.10.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.2.16.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.18.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.42.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.13.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.2.10.js></script><script type=text/javascript src=/marketing/static/js/manifest.665090acaa4c3c393587.js></script><script type=text/javascript src=/marketing/static/js/vendor.cbb380c2053ab598e892.js></script><script type=text/javascript src=/marketing/static/js/main.f19c0c2cec4f374b91d7.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.
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(t,c,a){for(var i,f,u,b=0,s=[];b<t.length;b++)f=t[b],n[f]&&s.push(n[f][0]),n[f]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(r&&r(t,c,a);s.length;)s.shift()();if(a)for(b=0;b<a.length;b++)u=o(o.s=a[b]);return u};var t={},n={13:0};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.e=function(e){var r=n[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var t=new Promise(function(t,o){r=n[e]=[t,o]});r[2]=t;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:"card",1:"game",2:"wechat",3:"message",4:"ewash",5:"evaluation",6:"ecm",7:"activity",8:"recharge",9:"msg",10:"calllog"}[e]||e)+"."+{0:"41d3f7e3efa97b8b7fcb",1:"5603aa6bc3c455d7b51e",2:"f0b4c0e5c36f5ed6b7a8",3:"dbb7db1bf14e057fd6e0",4:"b9779b335b149b985836",5:"532be8ee883e509fee13",6:"393c92cf9310bf3051e4",7:"c7e6a74eba07ee933137",8:"cc0950432812606ca31b",9:"df16b0b3f7288e21ec0d",10:"4b68b26d138f9bc39980"}[e]+".js";var i=setTimeout(f,12e4);function f(){a.onerror=a.onload=null,clearTimeout(i);var r=n[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return a.onerror=a.onload=f,c.appendChild(a),t},o.m=e,o.c=t,o.d=function(e,r,t){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},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(t,a,c){for(var i,f,u,s=0,l=[];s<t.length;s++)f=t[s],n[f]&&l.push(n[f][0]),n[f]=0;for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i]);for(r&&r(t,a,c);l.length;)l.shift()();if(c)for(s=0;s<c.length;s++)u=o(o.s=c[s]);return u};var t={},n={13:0};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.e=function(e){var r=n[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var t=new Promise(function(t,o){r=n[e]=[t,o]});r[2]=t;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:"card",1:"game",2:"wechat",3:"message",4:"ewash",5:"evaluation",6:"ecm",7:"activity",8:"recharge",9:"msg",10:"calllog"}[e]||e)+"."+{0:"7bc0ebaaeedec56bce6a",1:"5603aa6bc3c455d7b51e",2:"6c0fa4ef2263f0e77174",3:"dbb7db1bf14e057fd6e0",4:"2c0a8f16e6b6f9de7e67",5:"532be8ee883e509fee13",6:"7a4f703be718838c568d",7:"c7e6a74eba07ee933137",8:"cc0950432812606ca31b",9:"df16b0b3f7288e21ec0d",10:"4b68b26d138f9bc39980"}[e]+".js";var i=setTimeout(f,12e4);function f(){c.onerror=c.onload=null,clearTimeout(i);var r=n[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return c.onerror=c.onload=f,a.appendChild(c),t},o.m=e,o.c=t,o.d=function(e,r,t){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},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
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
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.
<template>
<el-select :disabled="disabled" remote filterable clearable :remote-method="remoteMethod" @change="updateCId" size="small" :value="cId" placeholder="请输入卡券名称选择卡券">
<el-option v-for="item in tableList" :key="item.coupCardId" :label="`${item.cardName}(id: ...${item.coupCardId.slice(-5)})`" :value="item.coupCardId"></el-option>
</el-select>
</template>
<script>
import { getCardListByName_, getCardDetail } from '@/service/api/cardApi.js';
export default {
name: 'card-select-filterable',
props: {
disabled: Boolean,
cId: String
},
data() {
return {
loading: false,
cardId: '',
info: {},
tableList: [],
search: ''
};
},
watch: {
cId(val) {
if (!val) {
this.search = '';
this.tableList = [];
}
}
},
methods: {
// 获取详情
getCardDetail(coupCardId) {
this.loading = true;
getCardDetail({ coupCardId })
.then(res => {
this.loading = false;
this.cardId = coupCardId;
this.updateCId(coupCardId);
this.remoteMethod(res.result.card.cardName);
})
.catch(() => {
this.loading = false;
});
},
updateCId(val) {
this.$emit('update:cId', val);
this.$emit('cIdUpdate'); // 触发父组件更新
if (!val) {
this.remoteMethod('');
}
},
// 模糊搜索
remoteMethod(search) {
this.search = search;
// search为空就不查了 太多了
if (search) {
this.getCardList();
} else {
this.tableList = [];
}
},
getCardList() {
if (this.loading) {
return;
}
this.loading = true;
getCardListByName_({ search: this.search })
.then(res => {
this.loading = false;
this.tableList = res.result || [];
})
.catch(() => {
this.loading = false;
});
}
}
};
</script>
......@@ -21,7 +21,6 @@ let router = new Router({
router.beforeEach((to, from, next) => {
document.title = to.name;
console.log('===', to.path, from.path, store.state.marketing.isLimit);
if (to.path != '/limit' && store.state.marketing.isLimit) {
next({ path: '/limit' });
} else if (to.path == '/limit' && !store.state.marketing.isLimit) {
......
......@@ -33,6 +33,9 @@ export const cardGetShelfs = params => requests(PREFIX + 'card-get-shelfs', para
//卡券营销--卡券库--新建/编辑卡券/卡券记录-领取记录-点击卡券查看详情
export const getCardDetail = params => requests(PREFIX + 'get-card-detail', params);
//卡券营销--根据卡券名称模糊查询卡券列表
export const getCardListByName_ = params => requests(PREFIX + 'list-coupon-names', params);
//卡券营销--卡券库--保存卡券
export const saveUpdateCard = params => requests(PREFIX + 'save-update-card', params);
......
<template>
<el-dialog title="选择订单" :visible.sync="show" width="60%" :before-close="close">
<div class="pb10">
<el-input v-model="listParams.searchParam" class="w300" placeholder="请输入订单信息" @change="getTableList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<span class="fz12 gray pl20">*仅显示满足核销条件的订单 </span>
<div v-loading="loading">
<div class="pb10">
<el-input v-model="listParams.searchParam" class="w300" placeholder="请输入订单信息" @change="getTableList"><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%" @row-click="rowClick" height="500">
<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="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading" @row-click="rowClick">
<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="[20, 40, 60, 80]" :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>
......@@ -100,11 +102,13 @@ export default {
},
// 核销订单
async writeOffCard() {
console.log(this.obj);
try {
this.loading = true;
let res = await writeOffCard({ coupLogId: this.obj.coupLogId, orderId: this.selectedId, memberId: this.obj.memberId, oorderNumber: this.selectedObj.orderNumber });
this.loading = false;
if (res.errorCode === 0) {
this.$tips({ type: 'success', message: '核销成功' });
this.$emit('offSuccess');
this.close();
this.selectedId = '';
} else {
......
......@@ -89,7 +89,7 @@ export default {
methods: {
/**
* @param val
* 1 投放 2 报表 3 编辑 4 删除 5 详情
* 1 投放 2 报表 3 编辑 4 删除 5 详情 6复制 7领取记录
*/
handler(val) {
switch (val) {
......@@ -116,6 +116,9 @@ export default {
case 6:
this.$router.push('/card/copy/' + this.item.coupCardId);
break;
case 7:
this.$router.push('/card/record/get?coupCardId=' + this.item.coupCardId);
break;
}
},
//编辑库存 前置
......
......@@ -47,8 +47,17 @@ export default Vue.component('render-temp', {
''
);
const bind7 = canEdit ? (
<a style="position:relative;top:1px" title="领取记录" onClick={this.handler.bind(null, 7)}>
<i class="iconfont icon-tubiaozhizuomoban-" />
</a>
) : (
''
);
const statushtml = (
<span>
{bind7}
{bind6}
{bind1}
{bind2}
......@@ -59,6 +68,7 @@ export default Vue.component('render-temp', {
const overDateHtml = (
<span>
<span class="danger">已过期</span>
{bind7}
{bind6}
{bind2}
{bind5}
......@@ -67,6 +77,7 @@ export default Vue.component('render-temp', {
);
const noputonStatushtml = (
<span>
{bind7}
{bind6}
{bind2}
{bind3}
......@@ -76,6 +87,7 @@ export default Vue.component('render-temp', {
const statusNostockhtml = noputonStatushtml;
const statusFaildhtml = (
<span>
{bind7}
{bind6}
{bind3}
{bind4}
......
......@@ -2,8 +2,11 @@
<section class="card-record-get" v-loading="recordLoading">
<!-- 条件筛选区 -->
<div class="pb22">
<el-input v-model="listParams.search" class="w300" placeholder="请输入卡券名称/卡券代码/会员信息" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-input v-model="listParams.search" class="w160" placeholder="请输入会员信息" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-checkbox class="vertical-middle" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="refresh" />
<card-select-filter ref="cdf" :cId.sync="listParams.coupCardId" class="w200" @cIdUpdate="refresh" :disabled="listParams.allCouponFlag" />
<span class="ml5 mr5">查看全部卡券</span><el-switch v-model="listParams.allCouponFlag" @change="changeAllCouponFlag" :active-value="1" :inactive-value="0" />
<span class="gray fz12 ml5">*由于数据量较大,查询全部卡券领取记录速度较慢,请耐心等候</span>
<el-button class="fr" type="primary" icon="iconfont icon-icon_yunxiazai fz14" @click="exportReceivedRecordExcel"> 导出订单</el-button>
</div>
<div class="filter--box">
......@@ -13,7 +16,7 @@
<span class="vertical-middle">领取时间:</span><el-date-picker v-model="dateTime" :clearable="false" @change="changeTime" class="w250" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> <span class="vertical-middle">核销时间:</span><el-date-picker v-model="dateTime2" @change="refresh" class="w250" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<!-- 列表 -->
<el-table tooltipEffect="light" :data="recordList" style="width: 100%" @sort-change="sortList">
<el-table tooltipEffect="light" :data="recordList" style="width: 100%" @sort-change="sortList" empty-text="请选择单张卡券或开启全部卡券">
<el-table-column width="120" align="left" prop="receiveTime" label="领取时间" fixed="left" sortable="custom">
<template slot-scope="scope">
<p class="cell-time">
......@@ -93,12 +96,13 @@
</el-table>
<el-pagination v-show="recordList.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 -->
<card-order :show.sync="cardOrderShow" :obj="currentObj"></card-order>
<card-order :show.sync="cardOrderShow" :obj="currentObj" @offSuccess="getTableList"></card-order>
<vue-gic-export-excel :dialogVisible.sync="dialogVisible" :dataArr="recordList" :type="2" :excelUrl="excelUrl" :params="params" :projectName="projectName"></vue-gic-export-excel>
</section>
</template>
<script>
import { formatDateTimeByType } from '@/utils/index.js';
import cardSelectFilter from '@/components/card-select/filterable';
import { cardRecordPage, coupcardDestroy, exportReceivedRecordExcel, getCouponDateLimit } from '@/service/api/cardApi.js';
import cardOrder from './card-order';
import tableMethods from '@/mixins/tableMethods.js';
......@@ -108,7 +112,8 @@ export default {
name: 'record-get',
mixins: [tableMethods, filterAvater],
components: {
cardOrder
cardOrder,
cardSelectFilter
},
data() {
return {
......@@ -121,6 +126,7 @@ export default {
recordLoading: false,
recordList: [],
listParams: {
allCouponFlag: 0,
beginTime: '',
endTime: '',
cardStatus: '',
......@@ -132,7 +138,7 @@ export default {
writeOffEndTime: '',
sortBy: '',
showSelfFlag: '',
coupCardId: this.$route.query.coupCardId
coupCardId: ''
},
total: 0,
cardOrderShow: false,
......@@ -143,8 +149,14 @@ export default {
params: {} // 传递的参数
};
},
created() {
mounted() {
this.getCouponDateLimit();
if (this.$route.query.coupCardId) {
this.listParams.coupCardId = this.$route.query.coupCardId;
this.$refs.cdf.getCardDetail(this.listParams.coupCardId);
}
},
created() {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券记录', path: '' }, { name: '领取记录', path: '' }]); // eslint-disable-line
this.$store.commit(
'mutations_layoutTips',
......@@ -157,6 +169,12 @@ export default {
this.$store.commit('mutations_layoutTips', '');
},
methods: {
changeAllCouponFlag(val) {
if (val) {
this.listParams.coupCardId = '';
}
this.refresh();
},
changeTime(date) {
if (this.limit && new Date(this.dateTime[1]).getTime() - new Date(this.dateTime[0]).getTime() > 7 * 24 * 60 * 60 * 1000) {
this.$tips({ message: '领取时间段范围不能超过7天', type: 'warning' });
......@@ -224,10 +242,14 @@ export default {
this.dateTime = [Date.now() - 30 * 24 * 60 * 60 * 1000, Date.now()];
}
this.dateTimeCopy = [...this.dateTime];
this.getTableList();
// flag && this.getTableList();
},
// 领取列表
async getTableList() {
if (!this.listParams.coupCardId && !this.listParams.allCouponFlag) {
this.recordList = [];
return;
}
this.recordLoading = true;
if (this.dateTime) {
this.listParams.beginTime = formatDateTimeByType(this.dateTime[0], 'yyyy-MM-dd');
......@@ -243,7 +265,8 @@ export default {
this.listParams.writeOffBeginTime = '';
this.listParams.writeOffEndTime = '';
}
let res = await cardRecordPage(this.listParams);
const params = { ...this.listParams };
let res = await cardRecordPage(params);
this.recordList = res.result.result;
this.total = res.result.totalCount;
this.recordLoading = false;
......@@ -259,15 +282,13 @@ export default {
coupcardDestroy({ coupLogId: row.coupLogId, memberId: row.memberId })
.then(res => {
this.$tips({ type: 'success', message: '销毁成功!' });
this.cardRecordPage();
this.getTableList();
})
.catch(err => {
this.$tips({ type: 'error', message: '销毁失败!' });
});
})
.catch(() => {
this.$tips({ type: 'info', message: '已取消销毁' });
});
.catch(() => {});
},
// 核销弹窗
orderData(row) {
......
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