Commit 138b54d7 by 张权

Merge branch 'v2.5.0' of http://192.168.3.233:8090/saas/scrm-micro-marketing into zq_dev_v2.5.0

2 parents 85ed3f9e 01265660
......@@ -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 {
......@@ -437,6 +438,7 @@ html {
background-color: rgba(242, 242, 242, 1);
}
.message-Z-zinde,
.marketing .message-Z-zinde {
z-index: 9999 !important;
}
......@@ -548,6 +550,9 @@ html {
color: #5850ff;
font-size: 16px;
}
.marketing .text-10 {
font-size: 10px;
}
.marketing .text-14 {
font-size: 14px;
}
......
......@@ -317,6 +317,7 @@ export default {
border-radius: 4px;
height: 26px;
line-height: 26px;
margin-bottom: 10px;
}
}
.tag-panel {
......
......@@ -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'
......
......@@ -2,7 +2,6 @@
<template>
<div class="marketing p-t-20">
<div class="m-b-20">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建分类</el-button> -->
<GLButton :size="size" type="primary" fn="新建分类" class="el-icon-plus" @click="handleEdit(1)">新建分类</GLButton>
</div>
<div class="container">
......@@ -13,10 +12,7 @@
<!-- 表格区域 开始 -->
<GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> -->
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -54,6 +50,40 @@ export default {
pickerOptions: 'beforeRangePickerOptions'
}
],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit(2, row)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
listeners: {
click: this.handleDelete
}
},
{
type: 'el-button',
name: '置顶',
attrs: {
type: 'text'
},
listeners: {
click: this.handleTop
}
}
],
// 表格
getListApi: this.$apis.classifyList.getListApi,
tableParams: {
......@@ -78,7 +108,7 @@ export default {
}
},
mounted() {},
mounted() { },
methods: {
getParams() {
......
......@@ -8,14 +8,7 @@
<GLButton :size="size" type="default" class="el-icon-plus default-blue-btn color-transparent" @click="addExchangeCoupon()" fn="新建兑换券" display="disabled" 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>
<div class="flex m-b-10 w-100-percent">
<span class="table-title">优惠券列表</span>
......@@ -32,11 +25,7 @@
<span>{{ baseData.statusList.find(item => item.confId == scope.scope.status).confName }}</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLButton v-if="scope.scope.status == '1'" type="text" @click="start(scope.scope)" fn="生效" display="disabled" mode="el-button">生效</GLButton>
<el-button v-if="scope.scope.status == '2'" type="text" @click="end(scope.scope)">失效</el-button>
<GLButton v-if="scope.scope.status == '2' || scope.scope.status == '3'" type="text" @click="handleEdit(3, scope.scope)" :fn="scope.scope.discountType == 3 ? '查看代金券' : scope.scope.discountType == 7 ? '查看会员服务' : scope.scope.discountType == 2 ? '查看折扣券' : '查看兑换券'" mode="el-button">查看</GLButton>
<GLButton v-if="scope.scope.status == '1' || scope.scope.status == '3'" type="text" @click="del(scope.scope)" fn="删除" mode="el-button" display="disabled">删除</GLButton>
<GLButton type="text" @click="receiveDetail(scope.scope)" fn="领取详情" mode="el-button">领取详情</GLButton>
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -67,6 +56,77 @@ export default {
// 分享
isShareVisible: false,
shareForm: {},
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '生效',
attrs: {
type: 'text',
fn: '生效'
},
condition: row => {
return row.status == '1'
},
listeners: {
click: this.start
}
},
{
type: 'el-button',
name: '失效',
attrs: {
type: 'text'
},
condition: row => {
return row.status == '2'
},
listeners: {
click: this.end
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: row => {
return row.discountType == 3 ? '查看代金券' : row.discountType == 7 ? '查看会员服务' : row.discountType == 2 ? '查看折扣券' : '查看兑换券'
}
},
condition: row => {
return row.status == '2' || row.status == '3'
},
listeners: {
click: row => this.handleEdit(3, row)
}
},
{
type: 'GLButton',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
condition: row => {
return row.status == '1' || row.status == '3'
},
listeners: {
click: this.del
}
},
{
type: 'GLButton',
name: '领取详情',
attrs: {
type: 'text',
fn: '领取详情'
},
listeners: {
click: this.receiveDetail
}
}
],
// 表格
searchForm: {
couponName: '',
......
......@@ -132,14 +132,10 @@ export default {
type: 'el-button',
name: '作废',
attrs: {
type: 'text'
// disabled: (row, condition) => {
// return +row.userStatus != 1
// }
},
condition: row => {
return +row.userStatus == 1
// return true
type: 'text',
disabled: (row, condition) => {
return +row.userStatus != 1
}
},
listeners: {
click: this.handleCancel
......
......@@ -4,19 +4,7 @@
<el-button :size="size" type="default" class="default-blue-btn color-transparent" @click="openDialog">核销优惠券</el-button>
</div>
<div class="container">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormDataTwo">
<span v-if="!$isGroupUp" 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>
<glsx-combi-form v-if="$isGroupUp" ref="showSearch" :formObj="searchForm" :formData="searchFormDataThree">
<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>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex m-b-10 w-100-percent">
<span class="table-title"></span>
......@@ -30,6 +18,7 @@
<span v-if="$isGroupUp">{{ scope.scope.packageId ? scope.scope.packageName : scope.scope.directionalGiftId ? scope.scope.directionalGiftName : '-' }}</span>
<div v-else>
<p>{{ packageNameTxtObj[scope.scope.receiveWay] }}</p>
<p v-if="scope.scope.receiveWay == 7 && scope.scope.receiveMethod" class="txt-grey text-10">指定{{ scope.scope.receiveMethod == 1 ? '手机号' : '车架号' }}:{{ scope.scope.receiveNumber }}</p>
</div>
</template>
<span slot="orderCodeHtml" slot-scope="scope">
......@@ -40,7 +29,6 @@
<glsx-dialog title="优惠券核销(请确保用户到店后核销,避免引起不必要问题)" :hasScroll="false" width="580px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body">
<el-form :rules="rules" ref="ruleForm" :model="ruleForm" label-width="80px">
<!-- style="width: 440px" -->
<el-form-item size="small" label="核销码" prop="verficationCode" style="width: 380px">
<el-input size="small" v-model.trim="ruleForm.verficationCode" maxlength="50" placeholder="请输入核销码"></el-input>
</el-form-item>
......@@ -111,9 +99,7 @@ export default {
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'discountTypeList'
}
],
searchFormDataTwo: [
},
{
label: '核销门店',
name: 'verificationMerchantName',
......@@ -143,9 +129,7 @@ export default {
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
searchFormDataThree: [
},
{
label: '券来源',
name: 'packageId',
......@@ -210,25 +194,7 @@ export default {
label: '券来源',
prop: 'packageName',
addHtml: 'packageName',
width: 200,
formatter: cellValue => {
let txt = ''
if (this.$isGroupUp) {
txt = cellValue.packageId ? cellValue.packageName : cellValue.directionalGiftId ? cellValue.directionalGiftName : '-'
} else {
txt = {
'': '-',
1: '营销活动',
2: '营销活动',
3: '会员服务套餐',
4: '营销活动',
5: '关联商品购买',
6: '通过集团套餐赠送',
7: '通过定向礼包赠送'
}[cellValue.receiveWay]
}
return txt
}
width: 240
},
{
label: '核销日期',
......@@ -283,8 +249,8 @@ export default {
if (this.$isGroupUp) {
this.getPackageList()
}
this.showOrHideAttr('searchFormDataTwo', this.$isGroupUp ? '核销人' : '核销门店', true)
!this.$isGroupUp && this.showOrHideAttr('searchFormDataThree', '券来源', true)
this.showOrHideAttr('searchFormData', this.$isGroupUp ? '核销人' : '核销门店', true)
!this.$isGroupUp && this.showOrHideAttr('searchFormData', '券来源', true)
this.deleteAttr(this.$isGroupUp ? ['核销人'] : ['核销门店'])
},
......@@ -306,7 +272,7 @@ export default {
getPackageList() {
this.$apis.couponManage.getPackageListApi({ pageNum: 1, pageSize: 9999 }).then(res => {
this.baseData.packageList = res.list
this.getOptionsList('searchFormDataThree', true, 'packageId')
this.getOptionsList('searchFormData', true, 'packageId')
})
},
// 跳转到礼包领取详情页
......@@ -463,36 +429,4 @@ export default {
</script>
<style lang="scss" scoped>
/deep/.el-input--small .el-input__inner {
width: 215px;
}
.el-range-editor.is-active,
.el-range-editor.is-active:hover {
border-color: #5850ff;
width: 215px;
}
.el-range-editor--small.el-input__inner {
width: 215px;
}
/deep/.el-dialog__header {
padding-top: 20px;
padding-bottom: 20px;
}
/deep/ .el-dialog__body {
// border-bottom: 1px solid #e6e6e6;
// border-top: 1px solid #e6e6e6;
padding: 30px 20px;
.content-body {
.el-input--small .el-input__inner {
width: 300px;
}
}
}
/deep/ .el-dialog__footer {
// text-align: center;
padding-top: 12px;
padding-bottom: 12px;
}
</style>
......@@ -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,15 @@
<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-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 +88,6 @@ export default {
// 分享
isShareVisible: false,
shareForm: {},
// 表格
searchForm: {
createdName: '',
createDate: [],
......@@ -125,6 +125,94 @@ 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: 'el-button',
// name: '详情',
name: row => {
return '<span style="color: #999999">详情</span>'
},
attrs: {
type: 'text'
},
condition: row => {
return row.status == 0
},
listeners: {
click: this.handleDetailTips
}
},
{
type: 'GLButton',
name: '详情',
attrs: {
type: 'text',
fn: '详情'
},
condition: row => {
return row.status == 3
},
listeners: {
click: this.handleDetail
}
}
],
// 表格
tableData: [],
tableParams: {
......@@ -319,6 +407,9 @@ export default {
return false
}
},
handleDetailTips() {
this.$message.error('未到朋友圈发送时间,无法查看详情')
},
handleCancel(row) {
const time = new Date().getTime()
const sendTime = new Date(row.sendTime).getTime()
......
......@@ -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,7 @@
<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 :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>
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</span>
</GLTable>
</div>
......@@ -144,7 +129,7 @@ export default {
materialGroupName: '',
materialFormData: [
{
label: '业务类型:',
label: '业务类型',
name: 'businessType',
type: 'select',
placeholder: '全部',
......@@ -154,7 +139,7 @@ export default {
optionsName: 'businessName'
},
{
label: '素材类型:',
label: '素材类型',
name: 'materialType',
type: 'select',
placeholder: '全部',
......@@ -181,7 +166,7 @@ export default {
optionsName: 'optionLabel'
},
{
label: '状态:',
label: '状态',
name: 'status',
type: 'select',
placeholder: '全部',
......@@ -208,20 +193,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,
......
<template>
<div class="live-room marketing">
<div class="live-room container">
<div class="flex">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- <div class="flex">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row>
<el-form-item size="small" label="订单编号">
......@@ -43,27 +44,26 @@
</el-form-item>
</el-row>
</el-form>
</div>
</div> -->
<div class="choseRow m-b-10">
<div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)">
{{ item }}
</div>
</div>
<GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="orderType" slot-scope="scope">
<div slot="orderType" slot-scope="scope" style="width: 200px">
<template v-if="scope.scope.orderType == 1">
<span>{{ scope.scope.packageType == 1 ? '门店套餐' : '集团套餐' }}</span>
</template>
<template v-else>
<span>会员卡</span>
</template>
</template>
</div>
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType == 1">详情</el-button>
<el-button type="text" style="color:#eee" v-else>详情</el-button> -->
<GLButton @click="handleDetail(scope.scope)" fn="订单详情" type="text" v-if="scope.scope.orderType == 1">详情</GLButton>
<!-- <GLButton @click="handleDetail(scope.scope)" fn="订单详情" type="text" v-if="scope.scope.orderType == 1">详情</GLButton>
<GLButton style="color: #eee" fn="订单详情" type="text" v-else>详情</GLButton>
<GLButton fn="退款" v-if="scope.scope.refundFlag == 1" type="text" @click="handleRefund(scope.scope)">退款</GLButton>
<GLButton fn="退款" v-if="scope.scope.refundFlag == 1" type="text" @click="handleRefund(scope.scope)">退款</GLButton> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</span>
</GLTable>
</div>
......@@ -90,11 +90,6 @@ export default {
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
url: url,
isReload: true,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
},
size: 'small',
searchForm: {
orderStatus: '', //默认查询全部
......@@ -102,21 +97,82 @@ export default {
// daterange:''
orderType: ''
},
// 搜索
searchFormData: [
{
label: '订单编号',
name: 'orderCode',
type: 'input',
maxlength: 100
},
{
label: '名称',
name: 'packageName',
type: 'input',
maxlength: 100
},
{
label: '类型',
name: 'orderType',
type: 'select',
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
optionsName: 'orderTypeList'
},
{
label: '用户信息',
name: 'userInfo',
type: 'input',
placeholder: '请输入用户名或手机号',
maxlength: 100
},
{
label: '下单时间',
name: 'daterange',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '开通门店',
name: 'merchantName',
type: 'input',
maxlength: 100
}
],
choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 1,
searchFormTable: {},
orderTypeList: [
// 表格按钮
tableButtonList: [
{
dictValue: '',
dictLabel: '全部'
},
{
dictValue: 1,
dictLabel: '套餐'
type: 'GLButton',
name: '详情',
attrs: {
type: 'text',
fn: '订单详情',
disabled: row => {
return row.orderType != 1
}
},
listeners: {
click: this.handleDetail
}
},
{
dictValue: 2,
dictLabel: '会员卡'
type: 'GLButton',
name: '退款',
attrs: {
type: 'text',
fn: '退款'
},
condition: row => {
return row.refundFlag == 1
},
listeners: {
click: this.handleRefund
}
}
],
// 表格组件
......@@ -137,7 +193,7 @@ export default {
prop: 'orderType',
addHtml: 'orderType'
// formatter: cellValue => {
// return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName
// return this.baseData.orderTypesList.find(item => item.confId == cellValue.orderType).confName
// }
},
{
......@@ -154,18 +210,18 @@ export default {
prop: 'orderStatus',
width: '80',
formatter: cellValue => {
return this.baseDataList.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName
return this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName
}
},
{
label: '下单时间',
prop: 'createDate',
width: 160
width: 200
},
{
label: '开通门店',
prop: 'merchantName',
width: '180'
width: 220
},
{
label: '推荐人',
......@@ -178,6 +234,7 @@ export default {
{
label: '用户信息',
prop: 'accountName',
width: 220,
formatter: cellValue => {
return cellValue.accountName + ' ' + cellValue.mobile
}
......@@ -185,13 +242,23 @@ export default {
{
label: '订单号',
prop: 'orderCode',
width: 190
width: 200
}
]
},
baseDataList: {
baseData: {
orderTypesList: orderTypesList,
orderStatusList: orderStatusList
orderStatusList: orderStatusList,
orderTypeList: [
{
dictValue: 1,
dictLabel: '套餐'
},
{
dictValue: 2,
dictLabel: '会员卡'
}
],
}
}
},
......@@ -205,8 +272,36 @@ export default {
this.tableParams.tableColumns.splice(idx, 1)
}
},
mounted() { },
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
tabClick(index) {
this.currentIndex = index
switch (index) {
......@@ -241,10 +336,8 @@ export default {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.startTime = this.searchForm.daterange[0] + ' 00:00:00'
params.endTime = this.searchForm.daterange[1] + ' 23:59:59'
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
params.startTime = new Date(this.searchForm.daterange[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endTime = new Date(this.searchForm.daterange[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.daterange
return params
......@@ -311,9 +404,10 @@ export default {
handleReset() {
this.isReload = false
this.currentIndex = 1
this.searchForm = {}
this.searchForm.orderStatus = '' //默认查询全部
this.searchForm.orderType = ''
this.searchForm = {
orderStatus: '',
orderType: ''
}
// this.handleSearch()
this.$nextTick(() => {
this.isReload = true
......@@ -324,9 +418,9 @@ export default {
</script>
<style lang="scss" scoped>
/deep/.el-input--small .el-input__inner {
width: 215px;
}
// /deep/.el-input--small .el-input__inner {
// width: 215px;
// }
.el-range-editor.is-active,
.el-range-editor.is-active:hover {
border-color: #5850ff;
......
<template>
<div class="marketing">
<div class="btnWrap">
<!-- <el-button :size="size" type="primary" @click="handleCreate" icon="el-icon-plus">创建套餐</el-button> -->
<GLButton type="primary" @click="handleCreate" size="small" icon="el-icon-plus" fn="创建套餐" mode="el-button">创建套餐</GLButton>
<!-- <el-button :size="size" @click="showViewer = true">查看示例效果</el-button> -->
<el-image-viewer
v-if="showViewer"
:on-close="
<el-image-viewer v-if="showViewer" :on-close="
() => {
showViewer = false
}
"
:url-list="srcList"
style="padding:4%;"
/>
" :url-list="srcList" style="padding:4%;" />
</div>
<tip-panel class="list-panel" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<template v-if="accountLevel == 4 && merchantModel == 1">
......@@ -36,30 +30,23 @@
<span class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope">
<template v-if="!(accountLevel == 4 && activetab == 1)">
<template v-if="scope.scope.state === 0">
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<!-- <template v-if="scope.scope.state === 0">
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template>
<template v-else-if="scope.scope.state === 1">
<!-- <el-button type="text" @click="handleDownOption(scope.scope)">下架</el-button>
<el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button> -->
<GLButton type="text" @click="handleDownOption(scope.scope)" fn="下架">下架</GLButton>
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
</template>
<template v-else>
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleUpOption(scope.scope)">上架</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template>
<GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2 && accountLevel != 4" fn="置顶推荐">置顶推荐</GLButton>
<el-button type="text" v-if="scope.scope.topFlag == 1 && accountLevel != 4">已置顶推荐</el-button>
<el-button type="text" v-if="scope.scope.topFlag == 1 && accountLevel != 4">已置顶推荐</el-button> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</template>
</span>
</GLTable>
......@@ -125,6 +112,86 @@ export default {
}
],
activetab: 0,
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑套餐'
},
listeners: {
click: this.handleEdit
}
},
{
type: 'GLButton',
name: '上架',
attrs: {
type: 'text',
fn: '上架'
},
condition: row => {
return row.state != 1
},
listeners: {
click: this.handleUpOption
}
},
{
type: 'GLButton',
name: '下架',
attrs: {
type: 'text',
fn: '下架'
},
condition: row => {
return row.state == 1
},
listeners: {
click: this.handleDownOption
}
},
{
type: 'GLButton',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
condition: row => {
return row.state != 1
},
listeners: {
click: this.handleDelete
}
},
{
type: 'GLButton',
name: '置顶推荐',
attrs: {
type: 'text',
fn: '置顶推荐'
},
condition: row => {
return row.topFlag == 2 && this.accountLevel != 4
},
listeners: {
click: this.handleUpdateToTop
}
},
{
type: 'el-button',
name: '已置顶推荐',
attrs: {
type: 'text'
},
condition: row => {
return row.topFlag == 1 && this.accountLevel != 4
}
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
......@@ -146,7 +213,8 @@ export default {
},
{
label: '套餐售价/元',
prop: 'packagePrice'
prop: 'packagePrice',
width: 180
},
{
label: '说明',
......@@ -212,7 +280,7 @@ export default {
this.dynamicFile()
this.getLoginCountFun()
},
mounted() {},
mounted() { },
methods: {
dynamicFile() {
let { activetab, accountLevel } = this
......@@ -333,7 +401,7 @@ export default {
})
},
// 查看示例效果
handleLook(row) {},
handleLook(row) { },
handleDelete(row) {
this.$messageBox.confirm('是否删除该套餐?', '删除', {
confirmButtonText: '确定',
......
......@@ -5,14 +5,7 @@
<!-- <GLButton :size="size" type="primary" fn="新增新车" class="el-icon-plus" @click="handleEdit(1)">新增新车</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" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="newCarRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
......
......@@ -2,23 +2,12 @@
<template>
<div class="marketing p-t-20">
<div class="container">
<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>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.commentStatus == '0'" type="text" @click="handleRevoke(scope.scope)">发布</el-button>
<el-button v-if="scope.scope.commentStatus == '1'" type="text" @click="handleRevoke(scope.scope)">撤回</el-button>
<!-- <el-button type="text" @click="handleDetail(scope.scope)">查看</el-button> -->
<GLButton type="text" fn="评价详情" @click="handleDetail(scope.scope)">查看</GLButton>
<!-- <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -67,6 +56,32 @@ export default {
isClear: true
}
],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: row => {
return row.commentStatus == '0' ? '发布' : '撤回'
},
attrs: {
type: 'text'
},
listeners: {
click: this.handleRevoke
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '评价详情'
},
listeners: {
click: this.handleDetail
}
}
],
// 表格
getListApi: this.$apis.orderComment.getListApi,
tableParams: {
......
......@@ -2,17 +2,7 @@
<template>
<div class="marketing p-t-20 order-manage">
<div class="container">
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData4">
<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>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex">
<div class="flex-default">
......@@ -48,12 +38,7 @@
<span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div>
<div class="table-btns" 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 v-if="scope.scope.deliveryType == 1 && scope.scope.orderStatus == 21" type="text" @click="handleWriteOff(scope.scope)">订单核销</el-button>
<el-button v-if="scope.scope.deliveryType == 2 && scope.scope.orderStatus == 6" type="text" @click="handleExpressInfo(scope.scope)">输入快递信息</el-button>
<el-button v-if="scope.scope.afterSaleStatus == 1" type="text" @click="handleExamine(scope.scope)">退款审核</el-button>
<el-button v-if="scope.scope.afterSaleStatus == 4" type="text" @click="handleReceiving(scope.scope)">确认收货</el-button>
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 - 全部订单/售后订单 - end -->
......@@ -159,7 +144,7 @@ export default {
refundTotal: ''
},
// 搜索
searchFormData1: [
searchFormData: [
{
label: '订单编号',
name: 'orderCode',
......@@ -177,6 +162,7 @@ export default {
changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.orderStatuses.length
var targetVal = value[value.length - 1]
var formIdx = this.searchFormData.findIndex(item => item.label == '订单状态')
if (!isAdd) {
for (var i = 0; i < this.oldVal.orderStatuses.length; i++) {
if (!value.includes(this.oldVal.orderStatuses[i])) {
......@@ -185,12 +171,12 @@ export default {
}
}
}
!targetVal && (this.searchForm.orderStatuses = isAdd ? this.searchFormData1[1].optionList.map(item => item.confId) : [])
!targetVal && (this.searchForm.orderStatuses = isAdd ? this.searchFormData[formIdx].optionList.map(item => item.confId) : [])
if (targetVal) {
var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.orderStatuses.length < this.searchFormData1[1].optionList.length) {
if (idx != -1 && this.searchForm.orderStatuses.length < this.searchFormData[formIdx].optionList.length) {
this.searchForm.orderStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.orderStatuses.length == this.searchFormData1[1].optionList.length - 1) {
} else if (idx == -1 && this.searchForm.orderStatuses.length == this.searchFormData[formIdx].optionList.length - 1) {
this.searchForm.orderStatuses.push('')
}
}
......@@ -210,6 +196,7 @@ export default {
changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.afterSaleStatuses.length
var targetVal = value[value.length - 1]
var formIdx = this.searchFormData.findIndex(item => item.label == '售后状态')
if (!isAdd) {
for (var i = 0; i < this.oldVal.afterSaleStatuses.length; i++) {
if (!value.includes(this.oldVal.afterSaleStatuses[i])) {
......@@ -218,20 +205,18 @@ export default {
}
}
}
!targetVal && (this.searchForm.afterSaleStatuses = isAdd ? this.searchFormData1[2].optionList.map(item => item.confId) : [])
!targetVal && (this.searchForm.afterSaleStatuses = isAdd ? this.searchFormData[formIdx].optionList.map(item => item.confId) : [])
if (targetVal) {
var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.afterSaleStatuses.length < this.searchFormData1[2].optionList.length) {
if (idx != -1 && this.searchForm.afterSaleStatuses.length < this.searchFormData[formIdx].optionList.length) {
this.searchForm.afterSaleStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.afterSaleStatuses.length == this.searchFormData1[2].optionList.length - 1) {
} else if (idx == -1 && this.searchForm.afterSaleStatuses.length == this.searchFormData[formIdx].optionList.length - 1) {
this.searchForm.afterSaleStatuses.push('')
}
}
this.oldVal.afterSaleStatuses = this.$common.utils.deepClone(this.searchForm.afterSaleStatuses)
}
}
],
searchFormData2: [
},
{
label: '门店',
name: 'merchantName',
......@@ -250,9 +235,7 @@ export default {
labelWidth: 72,
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
searchFormData3: [
},
{
label: '订单类型',
name: 'orderSource',
......@@ -276,9 +259,7 @@ export default {
name: 'outTradeNo',
type: 'input',
maxlength: 50
}
],
searchFormData4: [
},
{
label: '车架号',
name: 'vin',
......@@ -380,6 +361,72 @@ export default {
],
// 确认收获
isReceivingVisible: false,
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '查看订单',
attrs: {
type: 'text',
fn: '查看订单'
},
listeners: {
click: this.handleDetail
}
},
{
type: 'el-button',
name: '订单核销',
attrs: {
type: 'text'
},
condition: row => {
return row.deliveryType == 1 && row.orderStatus == 21
},
listeners: {
click: this.handleWriteOff
}
},
{
type: 'el-button',
name: '输入快递信息',
attrs: {
type: 'text'
},
condition: row => {
return row.deliveryType == 2 && row.orderStatus == 6
},
listeners: {
click: this.handleExpressInfo
}
},
{
type: 'el-button',
name: '退款审核',
attrs: {
type: 'text'
},
condition: row => {
return row.afterSaleStatus == 1
},
listeners: {
click: this.handleExamine
}
},
{
type: 'el-button',
name: '确认收货',
attrs: {
type: 'text'
},
condition: row => {
return row.afterSaleStatus == 4
},
listeners: {
click: this.handleReceiving
}
}
],
// 表格
getListApi: this.$apis.orderManage.getListApi,
tableParams: {
......@@ -446,13 +493,13 @@ export default {
{
label: '门店信息',
prop: 'merchantName',
line: 2,
width: 180
line: 1,
width: 280
},
{
label: '订单类型',
prop: 'orderSource',
width: '80',
width: '100',
formatter: cellValue => {
return this.baseData.orderSourceList.map(item => item.confId).includes(cellValue.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == cellValue.orderSource).confName : '-'
}
......@@ -460,7 +507,7 @@ export default {
{
label: '售后状态',
prop: 'afterSaleStatus',
width: '80',
width: '100',
formatter: cellValue => {
return this.baseData.afterSaleStatusList.map(item => item.confId).includes(cellValue.afterSaleStatus + '') ? this.baseData.afterSaleStatusList.find(item => item.confId == cellValue.afterSaleStatus).confName : '-'
}
......@@ -468,7 +515,7 @@ export default {
{
label: '结算方式',
prop: 'deliveryType',
width: '80',
width: '100',
formatter: cellValue => {
return this.baseData.deliveryTypeList.map(item => item.confId).includes(cellValue.deliveryType + '') ? this.baseData.deliveryTypeList.find(item => item.confId == cellValue.deliveryType).confName : '-'
}
......@@ -494,9 +541,7 @@ export default {
mounted() {
// this.getCount()
this.getOptionsList('searchFormData1')
this.getOptionsList('searchFormData2')
this.getOptionsList('searchFormData3')
this.getOptionsList('searchFormData')
},
methods: {
......
......@@ -16,11 +16,6 @@
</el-popover>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button>
<GLButton v-if="!scope.scope.goodsStatus" type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="scope.scope.goodsStatus" type="text" fn="查看" @click="handleEdit(3, scope.scope)">查看</GLButton>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
<el-button type="text" @click="handleShare(scope.scope)">分享</el-button> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
......@@ -166,6 +161,7 @@ export default {
{
label: '商品名称',
prop: 'goodsName',
width: 220,
line: 2
},
{
......
......@@ -2,7 +2,6 @@
<template>
<div class="marketing pro-group p-t-20">
<div class="m-b-20">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建商品</el-button> -->
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div>
<div class="container">
......@@ -17,16 +16,6 @@
</el-popover>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" fn="自建编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2 && scope.scope.takeType == '1'" type="text" fn="带货编辑" @click="handleEditDh(2, scope.scope)">编辑</GLButton>
<el-button v-if="!scope.scope.goodsStatus && (scope.scope.goodsSource == 1 || (scope.scope.goodsSource == 2 && scope.scope.originGoodsStatus))" type="text" @click="handleUpOrDown(scope.scope)">上架</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2 && !scope.scope.originGoodsStatus && scope.scope.offReason" type="text" @click="handleDwonNotice(scope.scope)">下架通知</el-button>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleUpOrDown(scope.scope)">下架</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2" type="text" @click="handleTakeGood(scope.scope)">取消带货</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" @click="handleTop(scope.scope)">置顶</el-button>
<GLButton v-if="scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" fn="自建查看" @click="handleEdit(3, scope.scope)">查看</GLButton>
<GLButton v-if="scope.scope.goodsStatus && scope.scope.goodsSource == 2" type="text" fn="带货查看" @click="handleEditDh(3, scope.scope)">查看</GLButton>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleShare(scope.scope)">分享</el-button> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
......@@ -247,6 +236,7 @@ export default {
{
label: '商品名称',
prop: 'goodsName',
width: 220,
line: 2
},
{
......@@ -385,11 +375,6 @@ export default {
// groupOrStore:1-集团;2-门店
// goodsSource: 1-门店;2-带货
handleEdit(addOrEdit, row) {
// if (addOrEdit != 1 && row.goodsSource == 2) {
// this.$router.push('/productStore/editProductDh/' + addOrEdit + '/' + row.id)
// return true
// }
// addOrEdit == 1 ? this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 2) : this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 2 + '/' + row.id)
var titleObj = {
1: '新建商品',
2: '编辑商品',
......
......@@ -3,33 +3,20 @@
<div class="marketing pro-group p-t-20">
<div class="m-b-20">
<GLButton :size="size" type="primary" class="el-icon-plus" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton>
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="addActivity()">新增秒杀活动</el-button> -->
</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>
<el-button v-if="scope.scope.activityStatus == '2'" type="text" @click="end(scope.scope)">结束</el-button>
<GLButton v-if="scope.scope.activityStatus == '1'" type="text" @click="handleEdit(2, scope.scope)" fn="编辑秒杀活动" mode="el-button">编辑</GLButton>
<!-- <el-button v-if="scope.scope.activityStatus == '1'" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> -->
<GLButton v-if="scope.scope.activityStatus == '2' || scope.scope.activityStatus == '3'" type="text" @click="handleEdit(3, scope.scope)" fn="编辑秒杀活动" mode="el-button">查看</GLButton>
<!-- <el-button v-if="scope.scope.activityStatus == '2' || scope.scope.activityStatus == '3'" type="text" @click="handleEdit(3, scope.scope)">查看</el-button> -->
<el-button v-if="scope.scope.activityStatus == '3'" type="text" @click="del(scope.scope)">删除</el-button>
<el-button type="text" @click="topping(scope.scope)">置顶</el-button>
<el-button v-if="scope.scope.activityStatus == '1' || scope.scope.activityStatus == '2'" type="text" @click="handleShare(scope.scope)">分享</el-button>
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -57,7 +44,6 @@ export default {
// 分享
isShareVisible: false,
shareForm: {},
// 表格
searchForm: {
activityName: '',
activityStatus: ''
......@@ -83,6 +69,94 @@ export default {
optionsName: 'statusList'
}
],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '开始',
attrs: {
type: 'text'
},
condition: row => {
return row.activityStatus == '1'
},
listeners: {
click: this.start
}
},
{
type: 'el-button',
name: '结束',
attrs: {
type: 'text'
},
condition: row => {
return row.activityStatus == '2'
},
listeners: {
click: this.end
}
},
{
type: 'GLButton',
name: row => {
return row.activityStatus == '1' ? '编辑' : '查看'
},
attrs: {
type: 'text',
fn: '编辑秒杀活动'
},
condition: row => {
return row.activityStatus == '1' || row.activityStatus == '2' || row.activityStatus == '3'
},
listeners: {
click: row => {
var editOrDetail = {
1: 2,
2: 3,
3: 3
}[row.activityStatus]
return this.handleEdit(editOrDetail, row)
}
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
condition: row => {
return row.activityStatus == '3'
},
listeners: {
click: this.del
}
},
{
type: 'el-button',
name: '置顶',
attrs: {
type: 'text'
},
listeners: {
click: this.topping
}
},
{
type: 'el-button',
name: '分享',
attrs: {
type: 'text'
},
condition: row => {
return row.activityStatus == '1' || row.activityStatus == '2'
},
listeners: {
click: this.handleShare
}
},
],
// 表格
getListApi: this.$apis.seckillActivity.getActivityPageApi,
tableParams: {
......@@ -91,7 +165,8 @@ export default {
tableColumns: [
{
label: '活动名称',
prop: 'activityName'
prop: 'activityName',
width: 220
},
{
label: '缩略图',
......@@ -101,7 +176,7 @@ export default {
{
label: '浏览量(次)',
prop: 'viewAmount',
width: '110px'
width: 140
},
{
label: '销量',
......@@ -110,7 +185,7 @@ export default {
{
label: '秒杀价(元)',
name: 'activityPrice',
width: '110px',
width: 140,
formatter: cellValue => {
// if (cellValue.activityPrice) {
return (cellValue.activityPrice / 100).toFixed(2)
......@@ -125,7 +200,7 @@ export default {
{
label: '创建日期',
name: 'createdDate',
width: '160px',
width: 200,
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
......
......@@ -122,7 +122,8 @@ export default {
if (!this.selectItem.id) {
this.$message({
type: 'error',
message: '请选择活动'
message: '请选择活动',
customClass: 'message-Z-zinde'
})
return
}
......
......@@ -221,6 +221,14 @@ export default {
}
},
handleMaterialConfirm() {
if (!this.selectItem.id) {
this.$message({
type: 'error',
message: '请选择素材',
customClass: 'message-Z-zinde'
})
return
}
this.$emit('handleMaterialConfirm', {
objectId: this.selectItem.id,
objectType: 10,
......
......@@ -123,6 +123,14 @@ export default {
this.getModelList()
},
handleNicknameConfirm() {
if (!this.selectItem.id) {
this.$message({
type: 'error',
message: '请选择朋友圈模板',
customClass: 'message-Z-zinde'
})
return
}
// activeName 0-纯文字,1-单图+文,2-多图+文,3-视频+文,4-链接+文
var valToType = {
0: 4,
......
......@@ -82,7 +82,7 @@ export default {
{
label: '客户手机号',
prop: 'customerPhone',
width: '110px',
width: '130px',
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
......@@ -152,7 +152,7 @@ export default {
mounted() {
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.heightBox = clientHeight - 0.15 * clientHeight - 370
this.selectedCustomerList = JSON.parse(JSON.stringify(this.parentSelectedCustomerList))
},
......@@ -165,7 +165,8 @@ export default {
this.tableList = this.$refs.customerRef.data
this.recoverySelected()
//接收到的数据为空
this.$refs.customerRef.tableHeightValues = this.$refs.customerRef.data.length ? '' : '400px'
// this.$refs.customerRef.tableHeightValues = this.$refs.customerRef.data.length ? '' : '400px'
this.$refs.customerRef.tableHeightValues = '400px'
},
recoverySelected() {
......@@ -220,8 +221,11 @@ export default {
}
</script>
<style lang="scss" scoped>
<style lang="scss">
.select-cutomer {
.el-table .el-table__row td {
height: auto !important;
}
.title {
margin-bottom: 12px;
}
......
......@@ -6,22 +6,12 @@
<el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button>
</div>
<div class="container">
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="sopListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.sopStatus != 1" type="text" @click="handleJump('sopAnalysisList', scope.scope)">SOP分析</el-button>
<el-button v-if="scope.scope.sopStatus == 2" type="text" @click="handleEnd(scope.scope)">结束</el-button>
<el-button v-if="scope.scope.sopStatus != 3" type="text" @click="handleEdit('edit', scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.sopStatus == 1" type="text" @click="handleDelete(scope.scope)">删除</el-button>
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -61,6 +51,61 @@ export default {
optionsName: 'sopStatusList'
}
],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: 'SOP分析',
attrs: {
type: 'text'
},
condition: row => {
return row.sopStatus != 1
},
listeners: {
click: row => this.handleJump('sopAnalysisList', row)
}
},
{
type: 'el-button',
name: '结束',
attrs: {
type: 'text'
},
condition: row => {
return row.sopStatus == 2
},
listeners: {
click: this.handleEnd
}
},
{
type: 'el-button',
name: '编辑',
attrs: {
type: 'text'
},
condition: row => {
return row.sopStatus != 3
},
listeners: {
click: row => this.handleEdit('edit', row)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
condition: row => {
return row.sopStatus == 1
},
listeners: {
click: this.handleDelete
}
}
],
// 表格
getListApi: this.$apis.sop.getSopInfoListApi,
tableParams: {
......
......@@ -15,8 +15,6 @@
</el-popover>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button v-if="!scope.scope.taked" type="text" @click="handleSingleTakeGood(scope.scope)">带货</el-button>
<GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
......
......@@ -2,19 +2,15 @@
<template>
<div class="marketing p-t-20">
<div class="m-b-20">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建专区</el-button> -->
<GLButton :size="size" type="primary" fn="新建专区" class="el-icon-plus" @click="handleEdit(1)">新建专区</GLButton>
</div>
<div class="container">
<div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<el-button type="text" fn="删除" @click="handleDelete(scope.scope)">删除</el-button>
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -52,6 +48,30 @@ export default {
pickerOptions: 'beforeRangePickerOptions'
}
],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit(2, row)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
listeners: {
click: this.handleDelete
}
}
],
// 表格
getListApi: this.$apis.zoneList.getZoneListApi,
tableParams: {
......@@ -76,7 +96,7 @@ export default {
}
},
mounted() {},
mounted() { },
methods: {
getParams() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!