Commit a096409e by chenwq

ui改版

1 parent 1d53f409
......@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-components": "^1.4.2",
"glsx-components": "^1.4.3",
"lodash": "^4.17.21",
"node-sass": "^4.0.0",
"vue": "^2.6.10",
......
......@@ -190,6 +190,7 @@ html {
.marketing .el-table .cell {
line-height: 16px;
padding: 0 16px !important;
}
.marketing .table-btns .el-button {
......
......@@ -8,9 +8,9 @@
import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable, GLFooter, GLCombiForm, GLTableButton } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import ElementUI from 'element-ui'
import '@/assets/css/public.scss'
import render from './render'
// import 'glsx-components/src/theme/theme.scss'
......
......@@ -26,12 +26,12 @@
</span>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<span v-if="scope.scope.status == -1 || scope.scope.status == 2" style="color: #EB4E4E;">创建失败</span>
<!-- <span v-if="scope.scope.status == -1 || scope.scope.status == 2" style="color: #EB4E4E;">创建失败</span>
<span v-else>
<el-button type="text" :disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1) || new Date(scope.scope.sendTime) > new Date()" @click="btnClick('remind', 1, scope.scope)">提醒发送</el-button>
<GLButton type="text" fn="客户群发详情" @click="btnClick('detail', 1, scope.scope)">详情</GLButton>
<!-- <el-button type="text" @click="btnClick('detail', 1, scope.scope)">详情</el-button> -->
</span>
</span> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -58,12 +58,12 @@
</span>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<span v-if="scope.scope.status == -1" style="color: #EB4E4E;">创建失败</span>
<!-- <span v-if="scope.scope.status == -1" style="color: #EB4E4E;">创建失败</span>
<span v-else>
<el-button type="text" :disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1)" @click="btnClick('remind', 2, scope.scope)">提醒发送</el-button>
<GLButton type="text" fn="客户群群发详情" @click="btnClick('detail', 2, scope.scope)">详情</GLButton>
<!-- <el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button> -->
</span>
</span> -->
<GLTableButton :buttonList="groupTableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -84,6 +84,54 @@ export default {
return {
ATT_TYPE,
activeIndex: 1,
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: row => {
return '<span style="color: #EB4E4E; cursor: auto;">创建失败</span>'
},
condition: row => {
return row.status == -1 || row.status == 2
},
attrs: {
type: 'text'
},
listeners: {
click: row => { }
}
},
{
type: 'el-button',
name: '提醒发送',
attrs: {
type: 'text',
disabled: row => {
return row.unsendUserNum == 0 || (row.unsendUserNum != 0 && row.isRemind == 1) || new Date(row.sendTime) > new Date()
}
},
condition: row => {
return ![-1, 2].includes(row.status)
},
listeners: {
click: row => this.btnClick('remind', 1, row)
}
},
{
type: 'GLButton',
name: '详情',
attrs: {
type: 'text',
fn: '客户群发详情'
},
condition: row => {
return ![-1, 2].includes(row.status)
},
listeners: {
click: row => this.btnClick('detail', 1, row)
}
}
],
gueastTableParams: {
listName: 'data',
tableOption: false,
......@@ -146,6 +194,54 @@ export default {
}
]
},
// 表格按钮
groupTableButtonList: [
{
type: 'el-button',
name: row => {
return '<span style="color: #EB4E4E; cursor: auto;">创建失败</span>'
},
condition: row => {
return row.status == -1
},
attrs: {
type: 'text'
},
listeners: {
click: row => { }
}
},
{
type: 'el-button',
name: '提醒发送',
attrs: {
type: 'text',
disabled: row => {
return row.unsendUserNum == 0 || (row.unsendUserNum != 0 && row.isRemind == 1)
}
},
condition: row => {
return row.status != -1
},
listeners: {
click: row => this.btnClick('remind', 2, row)
}
},
{
type: 'GLButton',
name: '详情',
attrs: {
type: 'text',
fn: '客户群群发详情'
},
condition: row => {
return row.status != -1
},
listeners: {
click: row => this.btnClick('detail', 2, row)
}
}
],
gueastPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
customerList: this.$apis.customerTransform.customerList,
customerGroupList: this.$apis.customerTransform.customerGroupList,
......@@ -217,7 +313,7 @@ export default {
})
},
mounted() {
this.wxTips()
// this.wxTips()
},
beforeDestroy() {
this.$message.closeAll()
......
......@@ -2,19 +2,19 @@
<template>
<div class="marketing pro-group p-t-20">
<div class="m-b-20 friend-title">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建商品</el-button> -->
<GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton>
<span>管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
</div>
<div class="container">
<div>
<!-- <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
</div>
</div> -->
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable v-loading="loading" ref="proGroupRef" @refreshTable="handleSearch" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
......@@ -40,14 +40,18 @@
<span v-if="scope.scope.sendType == 1">立即发送</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" disabled v-if="scope.scope.status == 2 || scope.scope.status == 1">创建中</el-button>
<!-- <el-popover placement="top" width="230" trigger="click" content="未到朋友圈发送时间,无法查看详情">
<el-button slot="reference" type="text" style="color: #999999">详情</el-button>
</el-popover> -->
<!-- <el-button type="text" disabled v-if="scope.scope.status == 2 || scope.scope.status == 1">创建中</el-button>
<el-button type="text" disabled v-if="scope.scope.status == -1">创建失败</el-button>
<el-button type="text" disabled v-if="scope.scope.status == 4">取消发送</el-button>
<el-button type="text" v-if="scope.scope.sendType == 2 && getTimeStatus(scope.scope.sendTime) && scope.scope.status != 4" @click="handleCancel(scope.scope)">取消发送</el-button>
<el-popover v-if="scope.scope.status == 0" placement="top" width="230" trigger="click" content="未到朋友圈发送时间,无法查看详情">
<el-button slot="reference" type="text" style="color: #999999">详情</el-button>
</el-popover>
<GLButton type="text" fn="详情" v-if="scope.scope.status == 3" @click="handleDetail(scope.scope)">详情</GLButton>
<GLButton type="text" fn="详情" v-if="scope.scope.status == 3" @click="handleDetail(scope.scope)">详情</GLButton> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -87,7 +91,6 @@ export default {
// 分享
isShareVisible: false,
shareForm: {},
// 表格
searchForm: {
createdName: '',
createDate: [],
......@@ -125,6 +128,93 @@ export default {
optionsName: 'modeStatusList'
}
],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '创建中',
attrs: {
type: 'text',
disabled: true
},
condition: row => {
return row.status == 2 || row.status == 1
},
listeners: {
click: () => { }
}
},
{
type: 'el-button',
name: '创建失败',
attrs: {
type: 'text',
disabled: true
},
condition: row => {
return row.status == -1
},
listeners: {
click: () => { }
}
},
{
type: 'el-button',
name: '取消发送',
attrs: {
type: 'text',
disabled: true
},
condition: row => {
return row.status == 4
},
listeners: {
click: () => { }
}
},
{
type: 'el-button',
name: '取消发送',
attrs: {
type: 'text'
},
condition: row => {
return row.sendType == 2 && this.getTimeStatus(row.sendTime) && row.status != 4
},
listeners: {
click: this.handleCancel
}
},
{
type: '',
name: row => {
return '<el-popover placement="top" width="230" trigger="click" content="未到朋友圈发送时间,无法查看详情"><el-button slot="reference" type="text" style="color: #999999">详情</el-button></el-popover>'
},
attrs: {
type: 'text'
},
// condition: row => {
// return row.status == 0
// },
listeners: {
click: () => { }
}
},
{
type: 'GLButton',
name: '详情',
attrs: {
type: 'text',
fn: '详情'
},
condition: row => {
return row.status == 3
},
listeners: {
click: this.handleDetail
}
}
],
// 表格
tableData: [],
tableParams: {
......
......@@ -13,14 +13,15 @@
</span>
<div class="container">
<div class="search-form">
<glsx-combi-form ref="materialFormRef1" :isEdit="isEdit" :formObj="searchForm" :formData="materialFormData" :inline="true">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="materialFormData" @handleOk="getListApi" @handleRest="handleReset"></GLCombiForm>
<!-- <glsx-combi-form ref="materialFormRef1" :isEdit="isEdit" :formObj="searchForm" :formData="materialFormData" :inline="true">
<span slot="footer" slot-scope="scope">
<span class="select-pro">
<el-button type="primary" :size="size" @click="getListApi">查询</el-button>
<el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
</span>
</span>
</glsx-combi-form>
</glsx-combi-form> -->
</div>
<div class="tabelList">
<el-row :style="{ height: boxHeight }">
......@@ -72,23 +73,20 @@
<span v-if="scope.scope.materialType == 3">图文</span>
</div>
<span slot="auth-button" slot-scope="scope">
<!-- <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> -->
<GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton>
<!-- <el-button type="text" @click="addMaterial(2, scope.scope)">编辑</el-button> -->
<!-- <GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton>
<GLButton :size="size" type="text" fn="编辑" @click="addMaterial(2, scope.scope)">编辑</GLButton>
<el-popover placement="right" trigger="click">
<ul>
<li>
<!-- <el-button :size="size" type="text" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</el-button> -->
<GLButton :size="size" type="text" fn="禁用" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</GLButton>
</li>
<li>
<!-- <el-button :size="size" type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton :size="size" type="text" fn="删除营销素材" @click="handleDelete(scope.scope)">删除</GLButton>
</li>
</ul>
<el-button type="text" slot="reference" class="btn-more">更多</el-button>
</el-popover>
</el-popover> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</span>
</GLTable>
</div>
......@@ -144,7 +142,7 @@ export default {
materialGroupName: '',
materialFormData: [
{
label: '业务类型:',
label: '业务类型',
name: 'businessType',
type: 'select',
placeholder: '全部',
......@@ -154,7 +152,7 @@ export default {
optionsName: 'businessName'
},
{
label: '素材类型:',
label: '素材类型',
name: 'materialType',
type: 'select',
placeholder: '全部',
......@@ -181,7 +179,7 @@ export default {
optionsName: 'optionLabel'
},
{
label: '状态:',
label: '状态',
name: 'status',
type: 'select',
placeholder: '全部',
......@@ -208,20 +206,61 @@ export default {
optionsName: 'optionLabel'
},
{
label: '素材名称:',
label: '素材名称',
name: 'materialName',
type: 'input',
placeholder: '请输入素材名称'
}
],
// materialFormData2: [
// {
// label: '素材名称:',
// name: 'materialName',
// type: 'input',
// placeholder: '请输入素材名称'
// }
// ],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '详情',
attrs: {
type: 'text',
fn: '详情'
},
listeners: {
click: this.handleDetail
}
},
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.addMaterial(2, row)
}
},
{
type: 'GLButton',
name: row => {
return row.status == 0 ? '禁用' : '启用'
},
attrs: {
type: 'text',
fn: '禁用'
},
listeners: {
click: this.handleForbid
}
},
{
type: 'GLButton',
name: '删除',
attrs: {
type: 'text',
fn: '删除营销素材'
},
listeners: {
click: this.handleDelete
}
}
],
tableParams: {
listName: 'data',
tableOption: true,
......
......@@ -166,6 +166,7 @@ export default {
{
label: '商品名称',
prop: 'goodsName',
width: 220,
line: 2
},
{
......
......@@ -247,6 +247,7 @@ export default {
{
label: '商品名称',
prop: 'goodsName',
width: 220,
line: 2
},
{
......
......@@ -5,20 +5,15 @@
<GLButton :size="size" type="primary" class="el-icon-plus" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton>
</div>
<div class="container">
<!-- <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
</div> -->
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="activityImg" slot-scope="scope">
<img class="img-60" :src="scope.scope.activityImg" />
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.activityImg" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.activityImg" />
</el-popover>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button v-if="scope.scope.activityStatus == '1'" type="text" @click="start(scope.scope)">开始</el-button>
......@@ -177,7 +172,8 @@ export default {
tableColumns: [
{
label: '活动名称',
prop: 'activityName'
prop: 'activityName',
width: 220
},
{
label: '缩略图',
......@@ -187,7 +183,7 @@ export default {
{
label: '浏览量(次)',
prop: 'viewAmount',
width: '110px'
width: 140
},
{
label: '销量',
......@@ -196,7 +192,7 @@ export default {
{
label: '秒杀价(元)',
name: 'activityPrice',
width: '110px',
width: 140,
formatter: cellValue => {
// if (cellValue.activityPrice) {
return (cellValue.activityPrice / 100).toFixed(2)
......@@ -211,7 +207,7 @@ export default {
{
label: '创建日期',
name: 'createdDate',
width: '160px',
width: 200,
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!