Commit 69eb17a2 by caoyanzhi

Merge branch 'feature/5月迭代' into dev

# Conflicts:
#	dist/index.html
#	dist/static/css/main.8647383613db11f0fa64928e4f95b9b4.css
#	dist/static/css/main.d1054e78f5f6634cfce44e5b39949129.css
#	dist/static/css/main.d3b11c022e1b3d855b96e47a45683ee6.css
#	dist/static/js/card.25385fe3fe078577f8c1.js
#	dist/static/js/card.984fabe7f7c87bd073c9.js
#	dist/static/js/card.b73b729374b8e683ef92.js
#	dist/static/js/ecm.4757906c69c2d153908e.js
#	dist/static/js/ecm.61e1d1a00a605488f348.js
#	dist/static/js/ecm.fea68dd739083d314b11.js
#	dist/static/js/scan.118cffd4fc4aec6165ca.js
#	dist/static/js/scan.3a7823f91887d427b9a7.js
#	dist/static/js/scan.aad75dca6883b9ed96e2.js
parents 19dfe49f d182c251
<<<<<<< HEAD
<!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></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=//at.alicdn.com/t/font_3229694_f4zx0uhc8y.css><script src=//at.alicdn.com/t/font_3229694_f4zx0uhc8y.js></script><link rel=stylesheet href=//at.alicdn.com/t/font_2996579_1d7th3zc6it.css><script src=//at.alicdn.com/t/font_2996579_1d7th3zc6it.js></script><link src=//at.alicdn.com/t/font_2859043_udehp133w1.css><script src=//at.alicdn.com/t/font_2859043_udehp133w1.js></script><link href=/marketing/static/css/main.8647383613db11f0fa64928e4f95b9b4.css rel=stylesheet></head><body><div id=app><div class=el-loading-spinner style="width: 98%;"><svg viewBox="25 25 50 50" class=circular><circle cx=50 cy=50 r=20 fill=none class=path></circle></svg></div></div><script>(function() {
=======
<!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></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=//at.alicdn.com/t/font_3229694_vfjtu9hqyrc.css><script src=//at.alicdn.com/t/font_3229694_vfjtu9hqyrc.js></script><link rel=stylesheet href=//at.alicdn.com/t/font_2996579_875h3lycepk.css><script src=//at.alicdn.com/t/font_2996579_875h3lycepk.js></script><link src=//at.alicdn.com/t/font_2859043_udehp133w1.css><script src=//at.alicdn.com/t/font_2859043_udehp133w1.js></script><link href=/marketing/static/css/main.d1054e78f5f6634cfce44e5b39949129.css rel=stylesheet></head><body><div id=app><div class=el-loading-spinner style="width: 98%;"><svg viewBox="25 25 50 50" class=circular><circle cx=50 cy=50 r=20 fill=none class=path></circle></svg></div></div><script>(function() {
>>>>>>> feature/5月迭代
var src = '/component/static/import-component.js?timestrap=' + new Date().getTime();
var host = window.location.host;
host = host.indexOf('localhost') > -1 || host.indexOf('192.168') > -1 ? 'gicdev.demogic.com' : host;
document.write('<script src="//' + host + src + '"><\/script>');
})();</script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/upload-file.1.0.10.js></script><script type=text/javascript src=/marketing/static/js/manifest.7068c99228bbb13399a6.js></script><script type=text/javascript src=/marketing/static/js/vendor.f17f3d28b64b648f6606.js></script><script type=text/javascript src=/marketing/static/js/main.4fb4d185288d8ee5abef.js></script></body></html>
\ No newline at end of file
<<<<<<< HEAD
})();</script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/upload-file.1.0.10.js></script><script type=text/javascript src=/marketing/static/js/manifest.7068c99228bbb13399a6.js></script><script type=text/javascript src=/marketing/static/js/vendor.f17f3d28b64b648f6606.js></script><script type=text/javascript src=/marketing/static/js/main.4fb4d185288d8ee5abef.js></script></body></html>
=======
})();</script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/upload-file.1.0.10.js></script><script src=//web-1251519181.file.myqcloud.com/components/steps.1.0.1.js></script><script type=text/javascript src=/marketing/static/js/manifest.a79ad3d5fe61032321de.js></script><script type=text/javascript src=/marketing/static/js/vendor.01ae7be260c6c1f9c444.js></script><script type=text/javascript src=/marketing/static/js/main.79ffc5c68fa674ba3326.js></script></body></html>
>>>>>>> feature/5月迭代
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.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(n,t,o){for(var f,d,i,u=0,s=[];u<n.length;u++)d=n[u],r[d]&&s.push(r[d][0]),r[d]=0;for(f in t)Object.prototype.hasOwnProperty.call(t,f)&&(e[f]=t[f]);for(a&&a(n,t,o);s.length;)s.shift()();if(o)for(u=0;u<o.length;u++)i=c(c.s=o[u]);return i};var n={},r={24:0};function c(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,c),r.l=!0,r.exports}c.e=function(e){var a=r[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var n=new Promise(function(n,c){a=r[e]=[n,c]});a[2]=n;var t=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,c.nc&&o.setAttribute("nonce",c.nc),o.src=c.p+"static/js/"+({0:"card",1:"game",2:"wechat",3:"ecm",4:"message",5:"ewash",6:"scan",7:"recharge",8:"activity",9:"signIn",10:"evaluation",11:"cdKey",12:"popup",13:"msg",15:"calllog"}[e]||e)+"."+{0:"25385fe3fe078577f8c1",1:"08e74c9cef1a59a62ace",2:"d8053211a1062cf0e580",3:"fea68dd739083d314b11",4:"a10c19499aac429e3e84",5:"dd66a6012402ab8d374f",6:"aad75dca6883b9ed96e2",7:"1870a11c1c7a62882285",8:"388da8ce361aad466b33",9:"fe11d8b6fea8a8e19249",10:"6750cbc0a759ff4c6458",11:"204e0fccedfb8f4e13ed",12:"9c3dc7c26768dc7d8680",13:"fcdcee9f6a8e702a7712",14:"4e93bd8180affb620102",15:"cf0b09aa556f363809e3",16:"af6668727d5f49b06d0e",17:"545fa0f7d9e15b5d8fd4",18:"cba6d1e72fada0526c41",19:"33a19eb0bb9415568c66",20:"66d6821411e0e42afe9e",21:"3b70c426e7cb5384d238"}[e]+".js";var f=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(f);var a=r[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return o.onerror=o.onload=d,t.appendChild(o),n},c.m=e,c.c=n,c.d=function(e,a,n){c.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},c.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(a,"a",a),a},c.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},c.p="/marketing/",c.oe=function(e){throw console.error(e),e}}([]);
\ 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.
......@@ -15,6 +15,16 @@ export default {
}
},
{
path: 'connect-list',
name: '卡券关联列表',
component: () => import(/* webpackChunName: "card" */ '../../views/card/card-connect-list.vue')
},
{
path: 'async-logs',
name: '卡券同步错误日志',
component: () => import(/* webpackChunkName: "card" */ '../../views/card/card-async-logs.vue')
},
{
path: 'record',
name: '卡券记录',
component: () => import(/* webpackChunkName: "card" */ '../../views/card/record.vue'),
......
......@@ -3,6 +3,21 @@ const PREFIX = 'api-marketing/';
import config from '@/config';
export const url = config.api + PREFIX;
// 卡券营销-关联卡券列表
export const getCouponList = params => requests('/api-admin/list-wm-coupon', params, false, false, 'post');
// 卡券营销-卡券同步错误日志
export const getCouponLogs = params => requests('/api-admin/list-coupon-log', params, false, false, 'post');
// // 卡券营销-卡券同步错误日志-不处理
export const delCouponLog = params => requests('/api-admin/delete-coupon-error-log', params, false, false, 'post');
// 卡券营销-卡券同步错误日志-重新推送
export const sendCouponReset = params => requests('/api-admin/send-coupon-reset', params, false, false, 'post');
// 卡券营销-卡券同步错误日志-重新核销
export const consumeCoupon = params => requests('/api-admin/consume-coupon', params, false, false, 'post');
//卡券营销--卡券库--卡券分页列表
export const cardPageList = params => requests(PREFIX + 'card-page', params);
......
<template>
<div class="dm-wrap">
<el-input type="text" placeholder="请输入卡券代码/微盟wid" prefix-icon="el-icon-search" style="width: 300px" clearable v-model.trim="search" @change="onSearch"></el-input>
<!-- <el-button style="float: right;margin-left: 10px" type="primary" @click="onMultipleReasyn">批量重新同步</el-button> -->
<el-button style="float: right;color:#2F54EB;border-color:#2F54EB" @click="onMultipleCancel">批量不处理</el-button>
<el-table :data="logs" style="margin-top: 20px" ref="multipleTable" @selection-change="onSelectChange">
<el-table-column type="selection" width="40px"></el-table-column>
<el-table-column label="同步时间">
<div slot-scope="{ row }" style="line-height: normal">
<p>{{ formatDateTimeByType(row.updateTime, 'yyyy-MM-dd-HH-mm-ss', true).y }}</p>
<p>{{ formatDateTimeByType(row.updateTime, 'yyyy-MM-dd-HH-mm-ss', true).h }}</p>
</div>
</el-table-column>
<el-table-column label="错误提示" prop="wmResponse"></el-table-column>
<el-table-column label="同步类型" prop="sendType">
<template slot-scope="{ row }">{{ row.sendType == 1 ? '推送卡券' : row.sendType == 2 ? '核销卡券' : '--' }}</template>
</el-table-column>
<el-table-column label="卡券代码" prop="couponCode"></el-table-column>
<el-table-column label="WID/会员卡号" prop="wid"></el-table-column>
<el-table-column label="操作">
<template slot-scope="{ row }">
<el-button type="text" @click="onReasyn(row)">重新同步</el-button>
<el-button type="text" @click="onCancel(row)">不处理</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination v-if="pager.total > 0" style="margin-top: 20px;text-align: right" layout="total,sizes,prev,pager,next" background :total="pager.total" :page-sizes="pager.pageSizes" :page-size="pager.pageSize" :current-page="pager.currentPage" @current-change="onCurrentChange" @size-change="onSizeChange"></el-pagination>
</div>
</template>
<script>
import { getCouponLogs, delCouponLog, sendCouponReset, consumeCoupon } from '@/service/api/cardApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
export default {
name: 'card-async-logs',
data() {
return {
logs: [],
search: '',
pager: {
total: 0,
pageSizes: [20, 40, 60, 80],
pageSize: 20,
currentPage: 1
},
multipleSelect: {
multipleType: '', // 无全选:0,选择本页:1,选择全部:2
selected: []
}
};
},
created() {
this.getLogs();
},
methods: {
formatDateTimeByType,
getLogs() {
const { currentPage, pageSize } = this.pager;
const params = {
searchStr: this.search,
pageNum: currentPage,
rowCount: pageSize
};
getCouponLogs(params).then(res => {
const { errorCode, message, result } = res || {};
if (errorCode != 0) {
this.$message.error(message);
return;
}
this.pager.total = result.totalCount;
this.logs = result.result || [];
if (this.multipleSelect.multipleType == 2) {
this.$refs.multipleTable.toggleAllSelection();
this.$nextTick(() => {
this.multipleSelect.multipleType = 2;
});
}
});
},
onSearch() {
// 查询
this.pager.currentPage = 1;
this.getLogs();
},
onCurrentChange(currentPage) {
// 改变页码
this.pager.currentPage = currentPage;
this.getLogs();
},
onSizeChange(pageSize) {
// 改变数量
this.pager.pageSize = pageSize;
this.onSearch();
},
onSelectChange(selected) {
// table全选、取消全选
const multipleType = this.multipleSelect.multipleType;
this.multipleSelect.selected = selected;
if (!(selected.length == this.logs.length && multipleType == 2)) {
this.multipleSelect.multipleType = selected.length == this.logs.length ? 1 : 0;
}
},
onCommand(type) {
// 选择本页、选择全部
const multipleType = this.multipleSelect.multipleType;
if (multipleType == 0 || multipleType == type) {
this.$refs.multipleTable.toggleAllSelection();
}
this.multipleSelect.multipleType = this.multipleSelect.multipleType == type ? 0 : type;
},
onMultipleCancel() {
// 批量不处理
const selected = this.multipleSelect.selected || [];
if (selected.length == 0) {
this.$message.error('请先选择数据');
return;
}
this.delCouponLog(selected.map(el => el.couponErLogId));
},
onCancel(logData) {
// 单条不处理
this.delCouponLog([logData.couponErLogId]);
},
delCouponLog(ids) {
// 不处理接口
delCouponLog({ couponErLogIds: ids.join(',') }).then(res => {
const { errorCode, message } = res || {};
if (errorCode != 0) {
this.$message.error(message);
return;
}
this.$message.success('已经取消处理');
this.multipleSelect.multipleType = 0;
this.getLogs();
});
},
onReasyn(logData) {
// 单条重新同步
this.reAsyn(logData);
},
reAsyn(logData) {
// 重新同步接口,分为重新推送卡券和重新核销卡券两种情况
const { pid, couponTemplateId, memberId, couponCode } = logData;
// "sendType":1, //1 为推送卡券,2 核销卡券
if (logData.sendType == 1) {
// cardTemplateStr 是 字符串数组 发送优惠券列表信息 其中的string元素为 微盟pid_cardTemplateId拼接成
// memberId 是 string 会员ID
// couponCode 否 string 非必填 ,不填时,微盟卡券自动生成券号
sendCouponReset({ memberId, couponCode, cardTemplateStr: `${pid}_${couponTemplateId}` }).then(res => callback.call(this, res));
} else if (logData.sendType == 2) {
// memberId 是 string 会员ID
// couponCode 是 string 微盟卡券券号
consumeCoupon({ memberId, couponCode }).then(res => callback.call(this, res));
}
function callback(respData) {
const { errorCode } = respData;
if (errorCode != 0) {
// 诸侯、测试说这里提示文案写死
this.$message.error('卡券重新同步失败,失败原因已更新');
return;
}
this.$message.success('重新同步成功,请稍后刷新页面查看同步结果');
this.multipleSelect.multipleType = 0;
this.getLogs();
}
}
}
};
</script>
<style lang="scss" scoped>
.dm-wrap {
/deep/ .el-table-column--selection .cell {
padding-left: 10px;
}
}
</style>
<template>
<div class="dm-wrap">
<el-date-picker v-model="search.date" type="daterange" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" clearable style="width: 256px" @change="onSearch"> </el-date-picker>
<el-input clearable type="text" style="margin-left: 10px;width: 260px" placeholder="请输入卡券名称" prefix-icon="el-icon-search" v-model.trim="search.input" @change="onSearch"></el-input>
<div class="check-active-card">
<el-checkbox v-model="search.isActive" label="仅展示有效卡券" @change="onSearch"></el-checkbox>
</div>
<el-button style="float: right;color:#2F54EB;border-color:#2F54EB" @click="$router.push('/card/async-logs')">错误日志</el-button>
<el-table :data="tableData" style="margin-top: 20px">
<el-table-column label="绑定时间" sortable>
<template slot-scope="{ row }">{{ formatDateTimeByType(row.createDate) }}</template>
</el-table-column>
<el-table-column label="卡券名称 (达摩侧) " prop="cardName"></el-table-column>
<!-- 带上微盟卡券id -->
<el-table-column label="卡券名称 (微盟侧)">
<div slot-scope="{ row }" v-if="Array.isArray(JSON.parse(row.weimobDemoCode))" style="line-height: normal">
<p>{{ JSON.parse(row.weimobDemoCode)[0].name }}</p>
<p style="font-size:12px">{{ JSON.parse(row.weimobDemoCode)[0].card }}</p>
</div>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="{ row }">
<el-button type="text" @click="toCouponDetail(row)">卡券详情</el-button>
<el-button type="text" @click="toGetList(row)">领取记录</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination v-if="pager.total > 0" style="margin-top: 20px;text-align: right" layout="total,sizes,prev,pager,next" background :total="pager.total" :page-sizes="pager.pageSizes" :page-size="pager.pageSize" :current-page="pager.currentPage" @current-change="onCurrentChange" @size-change="onSizeChange"></el-pagination>
</div>
</template>
<script>
import { getCouponList } from '@/service/api/cardApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
export default {
name: 'card-connect-list',
data() {
return {
tableData: [],
search: {
date: [],
input: '',
isActive: true
},
pager: {
total: 0,
pageSizes: [20, 40, 60, 80],
pageSize: 20,
currentPage: 1
}
};
},
created() {
this.getData();
},
methods: {
formatDateTimeByType,
getData() {
const { currentPage, pageSize } = this.pager;
const { input, date, isActive } = this.search;
const params = {
search: input,
beginTime: Array.isArray(date) ? date[0] : '',
endTime: Array.isArray(date) ? date[1] : '',
showFlag: Number(isActive), //int 仅展示有效卡券 (1: 选中, 0/null: 未选择)
currentPage,
pageSize
};
getCouponList(params).then(res => {
const { errorCode, message, result } = res || {};
if (errorCode != 0) {
this.$message.error(message);
return;
}
this.tableData = result.result || [];
this.pager.total = result.totalCount || 0;
});
},
onSearch() {
this.pager.currentPage = 1;
this.getData();
},
onCurrentChange(currentPage) {
this.pager.currentPage = currentPage;
this.getData();
},
onSizeChange(pageSize) {
this.pager.pageSize = pageSize;
this.onSearch();
},
toCouponDetail(couponData) {
this.$router.push(`/card/info/${couponData.coupCardId}`);
},
toGetList(couponData) {
this.$router.push(`/card/record/get?coupCardId=${couponData.coupCardId}`);
}
}
};
</script>
<style lang="scss" scoped>
.check-active-card {
display: inline-flex;
justify-content: center;
align-items: center;
margin-left: 10px;
width: 146px;
height: 30px;
border-radius: 2px;
border: 1px solid #dcdfe6;
&:hover {
border-color: #c0c4cc;
}
}
</style>
......@@ -19,6 +19,7 @@
<div class="game-ptyx-header pb10 clearfix">
<span class="pr10" style="line-height:32px;margin-left:10px">卡券共{{ total }}</span>
<el-button class="fr" v-if="$getButtonLimit($buttonCode.marketingAddCard)" :limit-code="$buttonCode.marketingAddCard" type="primary" @click="addCard">新增卡券</el-button>
<el-button class="fr" @click="$router.push('/card/connect-list')" style="margin-right: 20px">卡券关联列表</el-button>
</div>
<ul class="clearfix" element-loading-text="拼命加载中">
<card-item @adjust-stock="preAdjustStock" :item="v" v-for="(v, i) in tableList" :key="i" @delete-card="delData"></card-item>
......
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