Commit 727859b7 by 黑潮

update: 优化修改

parent 67e3a569
......@@ -164,3 +164,6 @@ export const exportDestoryPlanCode = config.api + PREFIX + 'export-destory-plan-
// 卡券营销--卡券销毁--下载模板
export const downloadDestroyCodeTemplate = config.api + PREFIX + 'download-destroy-code-template?requestProject=marketing';
//是否显示卡券当月有效期
export const getCardEffectiveMode = params => requests(PREFIX + '/get-card-effective-mode', params);
......@@ -9,7 +9,7 @@ import sendPreview from './partials/send-preview';
import { formatDateTimeByType, deepClone, getTimesByReq } from '@/utils/index.js';
import xxSysp_mix from '@/mixins/selector.js'; // 商品选择器方法
import { listEntepriseWeimobShop, listEntepriseWeimobCoupon } from '@/service/api/commonApi.js';
import { getCardDetail, saveUpdateCard, copyCardDetailService, getCardManualSetting, getCategoryList, getPropertyList, getLatestReptileTime, getPropertyValueList, getWeimobCouponBindCount } from '@/service/api/cardApi.js';
import { getCardDetail, saveUpdateCard, copyCardDetailService, getCardManualSetting, getCategoryList, getPropertyList, getLatestReptileTime, getPropertyValueList, getWeimobCouponBindCount, getCardEffectiveMode } from '@/service/api/cardApi.js';
import dmGoodsInput from '@/components/goods-input/index.vue';
const initForm = {
auditingStatus: '',
......@@ -133,6 +133,7 @@ export default {
};
const that = this;
return {
isEffective: false,
requestProject: 'marketing',
gicCouponType: '', // gic定义的卡券类型(0:普通卡券, 1:e待洗, 2:好办卡券, 3:微盟外部券, 4:通用外部券
creatorId: '',
......@@ -1465,10 +1466,16 @@ export default {
this.form.bannerJumpUrl = val;
this.$refs.form.validateField('bannerJumpUrl');
}
},
getCardEffectiveMode() {
getCardEffectiveMode().then((res) => {
this.isEffective = res.result;
})
}
},
mounted() {
// this.cardGetShelfs();
this.getCardEffectiveMode();
this.getCardDetail();
this.getCategoryList(); // 获取适用商品第一层数据
this.getListEntepriseWeimobShop(); // 获取微盟店铺数据
......
......@@ -255,6 +255,9 @@
</el-select>
生效,有效天数 <el-input-number controls-position="right" class="w200" @focus="form.cardEffectiveMode = 1" :disabled="isEdit || isInfo || cardValidity" v-model="form.limitDay" :precision="0" :min="1" :max="isEdit || isInfo ? 100000000 : 1200"></el-input-number>
</div>
<div v-if="isEffective" class="pt20">
<el-radio @change="changeCardEffectiveMode" v-model="form.cardEffectiveMode" :label="2" :disabled="isEdit || isInfo || cardValidity">当月</el-radio>
</div>
</el-form-item>
<!-- 当输入完整用户使用有效期后,出现卡券模板投放期限 -->
......
......@@ -11,7 +11,7 @@
<el-select class="dm-select" v-model="listParams.cardType" 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 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-input v-model="listParams.searchParam" class="w250 vertical-middle" placeholder="输入卡券名称/备注/创建人" clearable @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" />
<el-checkbox class="ml0" v-model="listParams.effectiveFlag" :true-label="1" :false-label="0" label="仅展示有效卡券" border @change="refresh" />
<el-button class="fr" type="primary" @click="addCard">新增卡券</el-button>
......
......@@ -60,6 +60,12 @@
<p v-if="item.erpDemoCode" class="ellipsis-100">
demo券号:<span>{{ item.erpDemoCode || '--' }}</span>
</p>
<p class="ellipsis-100">
创建人:<span>{{ item.creatorName || '--' }}</span>
</p>
<p class="ellipsis-100">
创建时间:<span>{{ formatDateTimeByType(item.createDate, 'yyyy-MM-dd') }}</span>
</p>
</div>
<div class="card-item_foot clearfix">
<div class="fl" v-if="item.gicCouponType != 3 && item.gicCouponType != 4">
......
......@@ -8,7 +8,11 @@
<h3 class="dm-title__label">趋势分析图</h3>
<div class="text-center fz16" v-if="$route.params.type === 'record'">{{ formatDateTimeByType(dateTime[0], 'yyyy-MM-dd') }}{{ formatDateTimeByType(dateTime[1], 'yyyy-MM-dd') }} 成功存储:{{ sumCount || 0 }} 分钟 总计消费:{{ (sumFee / 100).toFixed(2) }}</div>
<div class="text-center fz16" v-if="$route.params.type === 'video'">{{ formatDateTimeByType(dateTime[0], 'yyyy-MM-dd') }}{{ formatDateTimeByType(dateTime[1], 'yyyy-MM-dd') }} 共消耗流量{{ sumCount }}MB 累计支出{{ sumFee }}</div>
<div class="text-center fz16" v-else>{{ formatDateTimeByType(dateTime[0], 'yyyy-MM-dd') }}{{ formatDateTimeByType(dateTime[1], 'yyyy-MM-dd') }} 成功发送:{{ sumCount || 0 }} 条 总计消费:{{ (sumFee / 1000).toFixed(2) }}</div>
<div class="text-center fz16" v-else>
{{ formatDateTimeByType(dateTime[0], 'yyyy-MM-dd') }}{{ formatDateTimeByType(dateTime[1], 'yyyy-MM-dd') }} 成功发送:{{ sumCount || 0 }}
<template v-if="['sms', 'marketing'].includes($route.params.type)">,其中国内短信{{ localCount || 0 }}条,国外短信{{ sumInternational || 0 }}</template>
&nbsp;总计消费:{{ (sumFee / 1000).toFixed(2) }} 元
</div>
<div>
<div id="mountNode" ref="mountNode" v-show="list.length"></div>
<div class="chart--nodata" v-show="!list.length"></div>
......@@ -254,6 +258,8 @@ export default {
taskTypeOptions: [],
sumFee: 0,
sumCount: 0,
sumInternational: 0,
localCount: 0,
placeholder: '',
pickerOptions: {
disabledDate(val) {
......@@ -354,6 +360,8 @@ export default {
let res = await messageMarketingChart(this.listParams);
this.sumCount = res.result.sumCount;
this.sumFee = res.result.sumFee;
this.sumInternational = res.result.sumInternational;
this.localCount = this.sumCount - this.sumInternational;
let chartList = res.result.chartList || [];
let list = [];
chartList.map(v => {
......@@ -382,6 +390,8 @@ export default {
} else if (type === 'charts') {
this.sumCount = res.result.sumCount;
this.sumFee = res.result.sumFee;
this.sumInternational = res.result.sumInternational;
this.localCount = this.sumCount - this.sumInternational;
let chartList = res.result.chartList || [];
let list = [];
chartList.map(v => {
......
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