Commit dd5aad3d by 黑潮

update: 卡券折扣

parent b9c59715
......@@ -180,7 +180,7 @@
</div>
<!-- 只有线下门店展示适用商品折扣 -->
<!-- 1: 大于等于 2:大于 3: 等于 4: 小于 5: 小于等于 -->
<!-- <div v-if="form.cardApplyChannel.indexOf('offlineStore') !== -1">
<div v-if="form.cardApplyChannel.indexOf('offlineStore') !== -1">
<el-checkbox v-model="discount_limit.flag" :disabled="isEdit || isInfo">适用商品折扣</el-checkbox>
<div v-if="discount_limit.flag" class="inline-block">
<el-select :disabled="isEdit || isInfo" v-model="discount_limit.type" class="w100 ml10">
......@@ -193,7 +193,7 @@
<el-input-number controls-position="right" :disabled="isEdit || isInfo" v-model="discount_limit.count" :precision="2" :min="0" :max="10" class="w150"></el-input-number>&nbsp;&nbsp;
</div>
<span class="fz12 gray ml5">* 仅支持第三方api接口核销卡券时使用</span>
</div> -->
</div>
<div class="mb10">
<!-- <el-checkbox v-model="only" :disabled="isEdit || isInfo">不与其它优惠共享</el-checkbox>
<span class="fz12 gray ml5">* 无实际业务,仅用于ERP或第三方接口回传</span> -->
......
......@@ -13,6 +13,7 @@
</el-select>
<el-input v-model="listParams.searchName" class="w200" placeholder="输入计划名称" clearable @change="search"><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="search" />
<el-date-picker v-model="dateTime" style="width:300px" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="search"></el-date-picker>
<el-button class="fr" type="primary" @click="$router.push('/ecm/add')">新建计划</el-button>
<el-tooltip class="fr" content="只记录删除计划或编辑“进行中”计划的操作日志" placement="top" open-delay="200">
<el-button style="margin-right:10px" @click="$router.push('/ecm/log')">操作日志</el-button>
......@@ -43,6 +44,14 @@
</template>
</el-table-column>
<el-table-column min-width="100" align="left" prop="creatorName" label="创建人" v-if="$store.state.marketing.openFlag"></el-table-column>
<el-table-column min-width="120" align="left" label="创建日期">
<template slot-scope="{ row }">
<p class="cell-time">
{{ formatDateTimeByType(row.createTime, 'yyyy-MM-dd-HH-mm-ss', true).y }}<br />
<span>{{ formatDateTimeByType(row.createTime, 'yyyy-MM-dd-HH-mm-ss', true).h }}</span>
</p>
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="160" fixed="right">
<template slot-scope="scope">
<template v-if="scope.row.canEdit !== false">
......@@ -82,6 +91,8 @@ export default {
name: 'ecm',
data() {
return {
dateTime: null,
formatDateTimeByType,
effectTypeOption: [
{ value: '', label: '所有时效' },
{ value: 0, label: '触点' },
......@@ -257,6 +268,13 @@ export default {
},
async loadEcmList() {
this.loading = true;
if (this.dateTime) {
this.listParams.beginTime = this.dateTime[0];
this.listParams.endTime = this.dateTime[1];
} else {
this.listParams.beginTime = '';
this.listParams.endTime = '';
}
const params = { ...this.listParams };
if (params.effectType === '') {
params.effectType = -1; // 全部时效的默认值是-1
......
......@@ -30,7 +30,7 @@
<!-- <el-select v-if="$route.params.type === 'call'" class="dm-select" v-model="taskType" placeholder="选择发送状态" @change="loadAll(true)">
<el-option v-for="item in taskTypeOptions" :key="item.taskType" :label="item.ecmName" :value="item.taskType"></el-option>
</el-select> -->
<el-input v-model="listParams.searchParam" class="w250" :placeholder="placeholder" clearable @change="loadAll(true)"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-input v-model="listParams.searchParam" :style="setInputWidth()" :placeholder="placeholder" clearable @change="loadAll(true)"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
</div>
<!-- 短信营销 -->
<el-table tooltipEffect="light" :data="tableList" style="width:100%" v-if="$route.params.type === 'marketing'">
......@@ -46,7 +46,7 @@
<el-table-column align="left" width="100" prop="countNum" label="计费条数">
<template slot-scope="scope">{{ scope.row.countNum }}</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="left" width="320" prop="storeName" label="门店">
<el-table-column :show-overflow-tooltip="true" align="left" width="320" prop="storeName" label="服务门店">
<template slot-scope="scope">
<p>{{ scope.row.storeName }}</p>
<p class="gray">{{ scope.row.storeGroupName }}</p>
......@@ -75,7 +75,7 @@
</template>
</el-table-column>
<el-table-column align="left" width="150" prop="receivePhone" label="接收号码"></el-table-column>
<el-table-column :show-overflow-tooltip="true" align="left" width="320" prop="storeName" label="门店">
<el-table-column :show-overflow-tooltip="true" align="left" width="320" prop="storeName" label="服务门店">
<template slot-scope="scope">
<p>{{ scope.row.storeName }}</p>
<p class="fz13 gray">{{ scope.row.storeGroupName }}</p>
......@@ -101,7 +101,7 @@
</template>
</el-table-column>
<el-table-column align="left" prop="receivePhone" label="接收号码"></el-table-column>
<el-table-column :show-overflow-tooltip="true" align="left" width="320" prop="storeName" label="门店">
<el-table-column :show-overflow-tooltip="true" align="left" width="320" prop="storeName" label="服务门店">
<template slot-scope="scope">
<p>{{ scope.row.storeName }}</p>
<p class="fz13 gray">{{ scope.row.storeGroupName }}</p>
......@@ -123,7 +123,7 @@
</p>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="left" min-width="320" prop="storeName" label="门店">
<el-table-column :show-overflow-tooltip="true" align="left" min-width="320" prop="storeName" label="服务门店">
<template slot-scope="scope">
<p>{{ scope.row.storeName }}</p>
<p class="fz13 gray">{{ scope.row.storeGroupName }}</p>
......@@ -168,7 +168,7 @@
</p>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="left" prop="storeName" width="350" label="门店">
<el-table-column :show-overflow-tooltip="true" align="left" prop="storeName" width="350" label="服务门店">
<template slot-scope="scope">
<p>{{ scope.row.storeName }}</p>
<p class="fz13 gray">{{ scope.row.storeGroupName }}</p>
......@@ -284,6 +284,21 @@ export default {
this.$store.commit('mutations_breadcrumb', [{ name: '企业管理', path: '' }, { name: '计费中心', path: '/recharge' }, { name: '消费详情', path: '' }]); // eslint-disable-line
},
methods: {
setInputWidth() {
let width = 250;
switch (this.$route.params.type) {
case 'marketing':
width = 400;
break;
case 'call':
case 'record':
width = 320;
break;
default:
width = 250;
}
return { width: `${width}px` };
},
handleSizeChange(val) {
this.listParams.pageSize = val;
this.loadAll();
......@@ -301,7 +316,7 @@ export default {
this.listParams.endTime = '';
}
if (this.$route.params.type === 'marketing') {
this.placeholder = '输入手机号码/模板ID/内容';
this.placeholder = '输入手机号码/模板ID/内容/触发计划名称/计划创建人';
if (!onlyList) {
this.marketingCharts();
}
......@@ -322,14 +337,14 @@ export default {
this.voiceData('list');
}
if (this.$route.params.type === 'call') {
this.placeholder = '输入手机号码';
this.placeholder = '输入手机号码/触发计划名称/计划创建人';
if (!onlyList) {
this.callData('charts');
}
this.callData('list');
}
if (this.$route.params.type === 'record') {
this.placeholder = '输入手机号码';
this.placeholder = '输入手机号码/触发计划名称/计划创建人';
if (!onlyList) {
this.recordData('charts');
}
......
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