Commit d6704bf3 by zhangquan

发现频道修改

1 parent f22f3cb1
...@@ -206,4 +206,14 @@ const getCouponconfig = params => { ...@@ -206,4 +206,14 @@ const getCouponconfig = params => {
returnAll: true returnAll: true
}) })
} }
export default { getCouponconfig, configCoupons, getDirectionalGiftListApi, deleteChannel, updownshelvesChannel, topshelvesChannel, goodsActivity, crowdfundingActivity, bulgeActivity, getTencentcloudmedialist, addChannelTopic, getTopicDetail, getChannelTopicList, getMerchantListApi, openSubscribe, selStoreConfig, getMerchantShare, configMerchant, getconfigMerchant }
const getCarSeriesApi= params => {
params.method = 'scrm.api.carlife.common.getCarBrandList'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getCouponconfig, configCoupons, getDirectionalGiftListApi, deleteChannel, updownshelvesChannel, topshelvesChannel, goodsActivity, crowdfundingActivity, bulgeActivity, getTencentcloudmedialist, addChannelTopic, getTopicDetail, getChannelTopicList, getMerchantListApi, openSubscribe, selStoreConfig, getMerchantShare, configMerchant, getconfigMerchant, getCarSeriesApi }
...@@ -20,28 +20,35 @@ html { ...@@ -20,28 +20,35 @@ html {
.p-t-20 { .p-t-20 {
padding-top: 20px; padding-top: 20px;
} }
.container { .container {
background: #ffffff; background: #ffffff;
padding: 20px; padding: 20px;
} }
.word-hide { .word-hide {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.flex { .flex {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.mgt15 { .mgt15 {
margin-top: 15px; margin-top: 15px;
} }
.mgt16 { .mgt16 {
margin-top: 16px; margin-top: 16px;
} }
.mrt5 { .mrt5 {
margin-top: 5px; margin-top: 5px;
} }
.text-tip { .text-tip {
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
...@@ -49,18 +56,22 @@ html { ...@@ -49,18 +56,22 @@ html {
margin-left: 154px; margin-left: 154px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.text-tip-line { .text-tip-line {
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #999999; color: #999999;
} }
.img-36 { .img-36 {
width: 36px; width: 36px;
height: 36px; height: 36px;
} }
.pointer { .pointer {
cursor: pointer; cursor: pointer;
} }
.activity-box { .activity-box {
width: 248px; width: 248px;
height: auto; height: auto;
...@@ -70,6 +81,7 @@ html { ...@@ -70,6 +81,7 @@ html {
box-sizing: border-box; box-sizing: border-box;
margin-top: 10px; margin-top: 10px;
position: relative; position: relative;
.activity-box-title { .activity-box-title {
font-weight: 600; font-weight: 600;
font-size: 14px; font-size: 14px;
...@@ -77,6 +89,7 @@ html { ...@@ -77,6 +89,7 @@ html {
margin-bottom: 10px; margin-bottom: 10px;
line-height: 20px; line-height: 20px;
} }
.time { .time {
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
...@@ -84,17 +97,20 @@ html { ...@@ -84,17 +97,20 @@ html {
margin-bottom: 4px; margin-bottom: 4px;
line-height: 17px; line-height: 17px;
} }
.gift { .gift {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
width: 24px; width: 24px;
height: 24px; height: 24px;
right: 0; right: 0;
img { img {
width: 100%; width: 100%;
} }
} }
} }
.goodss-box { .goodss-box {
width: 248px !important; width: 248px !important;
padding: 16px; padding: 16px;
...@@ -105,27 +121,33 @@ html { ...@@ -105,27 +121,33 @@ html {
align-items: center; align-items: center;
margin-top: 10px; margin-top: 10px;
} }
.theme-color { .theme-color {
color: #5850ff; color: #5850ff;
} }
.flex-default { .flex-default {
display: flex; display: flex;
} }
.goods-img { .goods-img {
width: 60px; width: 60px;
height: 60px; height: 60px;
border-radius: 2px; border-radius: 2px;
margin-right: 8px; margin-right: 8px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.goods-title { .goods-title {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
line-height: 21px; line-height: 21px;
} }
.goods-price { .goods-price {
color: #999999; color: #999999;
font-size: 12px; font-size: 12px;
...@@ -133,9 +155,46 @@ html { ...@@ -133,9 +155,46 @@ html {
line-height: 17px; line-height: 17px;
margin-top: 4px; margin-top: 4px;
} }
.table-popover-img { .table-popover-img {
width: 120px; width: 120px;
} }
.mrb20{
margin-bottom :20px !important;; .mrb20 {
margin-bottom: 20px !important;
;
}
.operate-wrap {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
.table-title {
height: 32px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
line-height: 32px;
}
.operate-btn {
.export-btn {
margin-left: 8px;
}
}
}
.global-title {
height: 56px;
line-height: 56px;
border-bottom: 1px solid #e5e5e5;
padding-left: 20px;
box-sizing: border-box;
font-size: 16px;
color: #333333;
font-weight: 600;
background-color: #fff;
} }
\ No newline at end of file \ No newline at end of file
<!-- 搜索 --> <!-- 搜索 -->
<template> <template>
<div :class="['glsx-combi-form', isEdit ? 'gl-form-page' : '']"> <div :class="['glsx-combi-form', isEdit ? 'gl-form-page' : '']">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block"> <el-form :ref="formRef" :inline="isInline" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData"> <template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock }, { textBox: item.type == 'textBox' }]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name"> <el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock }, { textBox: item.type == 'textBox' }]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label"> <span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
...@@ -134,6 +134,10 @@ export default { ...@@ -134,6 +134,10 @@ export default {
} }
}, },
props: { props: {
isInline :{
type: Boolean,
default: true
},
isBlock: { isBlock: {
type: Boolean, type: Boolean,
default: false default: false
......
<template>
<div class="case-ctnr">
<div class="main-wrap">
<div class="global-title">新增案例</div>
<glsx-combi-form :isInline="false" class="glsx-combi-form" ref="baseInfoRef" labelWidth="154px" defaultWidth="432px" :formObj.sync="formObj" :formData="formData" :formRules="myRule">
<div slot="videoCoverSlot">
<glsx-preview :picOptions="posterOptions" :imageUrlArr="formObj.videoCoverArr" @change="changeChannelImg"></glsx-preview>
<div class="text-tip" style="margin: 0;">建议尺寸:272*364</div>
</div>
<div slot="selectBrandSlot">
<el-radio-group v-model="formObj.brandType">
<el-radio :label="1">全部品牌</el-radio>
<el-radio :label="2">部分品牌</el-radio>
</el-radio-group>
<div v-if="formObj.brandType == 2">
<el-button class="el-icon-plus" size="small" @click="openBrandDialog">选择品牌</el-button>
</div>
</div>
</glsx-combi-form>
</div>
<GLFooter>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button>
</GLFooter>
<GLDialog title="选择车系"
mode="mid"
:visible.sync="dialogVisible"
:before-close="handleClose"
:close-on-click-modal="false"
@onOk="handleConfirm"
@onCancel="handleClose">
<div class="car-container">
</div>
</GLDialog>
</div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'add',
components: {
glsxCombiForm
},
data() {
return {
dialogVisible: false,
formObj:{
brandType: 1,
videoCoverArr: []
},
posterOptions: {
width: '104px',
height: '138px',
key: 'posterImg',
isClose: true
},
myRule:{
title: [{ required: true, message: '请输入案例名称', trigger: 'blur' }],
channelStyle: [{ required: true, message: '请选择频道主题', trigger: 'change' }],
},
formData:[
{
label: '案例名称',
name: 'title',
type: 'input',
isDisabled: false
},
{
label: '选择视频',
name: 'title',
type: 'input',
isDisabled: false
},
{
label: '视频封面图',
name: 'videoCover',
addHtml: 'videoCoverSlot'
},
{
label: '宣传文案',
placeholder: '发现频道视频宣传语',
name: 'title',
maxlength: 100,
type: 'input',
showLimit: true,
inputType: 'textarea',
isDisabled: false
},
{
label: '适用品牌',
name: 'zone',
addHtml: 'selectBrandSlot'
}
],
}
},
methods:{
openBrandDialog(){
this.dialogVisible = !this.dialogVisible
},
changeChannelImg(val){
console.log(val)
}
}
}
</script>
<style scoped lang="scss">
.case-ctnr{
.glsx-combi-form{
padding: 20px;
background-color: #fff;
margin-bottom: 16px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="case-ctnr">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="operate-wrap">
<span class="table-title">频道管理列表</span>
<el-button class="operate-btn" type="primary" size="small" @click="handleAdd">新增案例</el-button>
</div>
<GLTable ref="channelRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :beforeSearchFn="beforeSearchFn" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="brandSlot">
<span>{{ brandList.slice(0, 3).join('、') }}</span>
<el-popover
placement="top"
width="400"
trigger="hover">
<span>
{{brandList.join('、')}}
</span>
<span class="more-brand" slot="reference">...[{{ brandList.length }}]</span>
</el-popover>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
</template>
<script>
import url from '@/assets/empty.png'
import * as dayjs from 'dayjs'
export default {
name: 'App',
data() {
return {
brandList:['丰田','本田','一汽大众','奔驰','宝马','奥迪','比亚迪'],
tableSearchForm: {
channelName: '',
createDate: []
},
buttonList: [
{
type: 'el-button',
name: '预览',
attrs: {
type: 'text',
fn: '预览'
},
listeners: {
click: row => this.updateStatus(row.scope.id, 1)
}
},
{
type: 'el-button',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.addCase(row.scope, 1)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
listeners: {
click: row => this.updateStatus(row.scope.id, 1)
}
}
],
searchForm: {},
url: url,
searchFormData: [
{
label: '案例名称',
name: 'channelName',
type: 'input'
},
{
label: '创建日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date > yesterday) {
return true
}
return false
}
}
},
{
label: '适用品牌',
name: 'channelName',
type: 'input'
},
],
getListApi: this.$apis.channel.getChannelListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '案例名称',
prop: 'channelName',
formatter: cellValue => {
return cellValue.channelName || '--'
}
},
{
label: '缩略图',
addHtml: 'imageSlot'
},
{
label: '适用品牌',
addHtml: 'brandSlot'
},
{
label: '创建日期',
prop: 'createdDate',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '更新时间',
prop: 'createdDate',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '操作人',
prop: 'channelName'
},
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
created() {},
mounted() {},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.tableSearchForm))
if (this.tableSearchForm.createDate.length) {
params.createdDateStrat = new Date(this.tableSearchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createdDateEnd = new Date(this.tableSearchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = this.getParams()
delete this.searchForm.createDate
resolve()
})
},
handleSearch() {
this.$refs.channelRef.refreshTable()
},
handleReset() {
this.tableSearchForm = {
channelName: '',
createDate: []
}
this.searchForm = {}
this.handleSearch()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.channelRef.data.length ? (this.$refs.channelRef.tableHeightValues = '') : this.$refs.channelRef.setTableHeightFun()
},
addCase(val) {
this.$router.push({
path: `/case/add?id=${val.id}&channelType=${val.channelType}&$title=频道设置`
})
},
handleAdd(){
this.$router.push({
path: `/case/add`
})
}
}
}
</script>
<style scoped lang="scss">
.case-ctnr{
background-color: #fff;
padding: 20px;
.more-brand{
color: #5850FF;
cursor: pointer;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
<el-form-item label="频道名称:" prop="channelName"> <el-form-item label="频道名称:" prop="channelName">
<el-input v-model="channelForm.channelName"></el-input> <el-input v-model="channelForm.channelName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="频道子名称:" prop="channelName">
<el-input v-model="channelForm.channelName"></el-input>
</el-form-item>
<span v-if="channelForm.channelType == 1"> <span v-if="channelForm.channelType == 1">
<el-form-item label="频道主题:" prop="channelStyle"> <el-form-item label="频道主题:" prop="channelStyle">
<el-col :span="11" class="theme"></el-col> <el-col :span="11" class="theme"></el-col>
...@@ -27,7 +30,7 @@ ...@@ -27,7 +30,7 @@
<glsx-preview :picOptions="picOptions" :imageUrlArr="channelForm.channelImgArr" @change="changeChannelImg"></glsx-preview> <glsx-preview :picOptions="picOptions" :imageUrlArr="channelForm.channelImgArr" @change="changeChannelImg"></glsx-preview>
<div class="el-form-item__error" v-if="channelImgFlag">请上传频道banner</div> <div class="el-form-item__error" v-if="channelImgFlag">请上传频道banner</div>
</el-form-item> </el-form-item>
<div class="text-tip">建议尺寸:750*750</div> <div class="text-tip">建议尺寸:750*448</div>
</el-form> </el-form>
</div> </div>
</div> </div>
...@@ -73,7 +76,7 @@ export default { ...@@ -73,7 +76,7 @@ export default {
channelOtherImgbgArr: ['membrane', 'crowd', 'activity'], channelOtherImgbgArr: ['membrane', 'crowd', 'activity'],
channelImgFlag: false, channelImgFlag: false,
picOptions: { picOptions: {
width: '104px', width: '174px',
height: '104px', height: '104px',
key: 'channelImg', key: 'channelImg',
isClose: true isClose: true
......
...@@ -74,6 +74,10 @@ export default { ...@@ -74,6 +74,10 @@ export default {
} }
}, },
{ {
label: '频道子名称',
prop: 'channelName'
},
{
label: '频道宣传语', label: '频道宣传语',
prop: 'promotion', prop: 'promotion',
width: 300, width: 300,
......
<template>
<div class="classify-ctnr">
<div class="main-wrap">
<div class="global-title">新增二级分类</div>
<glsx-combi-form :isInline="false" class="glsx-combi-form" ref="baseInfoRef" labelWidth="154px" defaultWidth="432px" :formObj.sync="formObj" :formData="formData" :formRules="myRule">
<div slot="mainClassifySlot">
座椅
</div>
<div slot="secondClassifySlot" class="classify-slot">
<div class="classify-item">
<el-input maxLength="15" v-model="configName" class="input"></el-input>
<i class="el-icon-delete del-icon"></i>
</div>
<div class="add-btn" @click="addCondition('conditionList')">
<i class="el-icon-circle-plus-outline"></i>
新增二级分类
</div>
</div>
</glsx-combi-form>
</div>
<GLFooter>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button>
</GLFooter>
</div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'add',
components: {
glsxCombiForm
},
data() {
return {
formObj:{
brandType: 1,
videoCoverArr: []
},
myRule:{
mainClassify: [{ required: true, message: '请输入一级分类', trigger: 'change' }],
secondClassify: [{ required: true, message: '请添加二级分类名称', trigger: 'change' }],
},
formData:[
{
label: '一级分类',
name: 'mainClassify',
addHtml: 'mainClassifySlot'
},
{
label: '二级分类名称',
name: 'secondClassify',
addHtml: 'secondClassifySlot'
}
],
}
},
methods:{
}
}
</script>
<style scoped lang="scss">
.classify-ctnr{
.glsx-combi-form{
padding: 20px;
background-color: #fff;
margin-bottom: 16px;
.classify-slot{
.classify-item{
.el-input{
width: 432px;
}
.del-icon{
font-size: 16px;
color: #999999;
margin-left: 8px;
vertical-align: middle;
}
}
.add-btn{
display: inline-block;
color: #5850FF;
cursor: pointer;
i{
font-size: 20px;
vertical-align: middle;
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="nav">
<div style="display: inline-block;">
<div class="nav-item" :ref="'navRef'+index" v-for="(item,index) in rowList" :key="item.id" @click="selectNav(item)" :class="{'cur-nav':curNavId==item.id}">{{ item.name }}<i class="el-icon-close del-icon" @click.stop="delNav(item)"></i></div>
</div>
<div v-if="showInput" class="input-area"><el-input maxLength="15" ref="addInput" @blur="inputBlur" v-model="configName" class="input"></el-input></div>
<div v-else class="nav-item add-icon" style="cursor: pointer;" @click="addNav"><i class="el-icon-plus border"></i></div>
<div v-if="colList && colList.length" class="nav-item pull-btn" style="cursor: pointer;">
<i class="el-icon-arrow-down border"></i>
<div class="pull-down-wrap">
<div class="pull-down-item" @click="selectNav(item, 'sort')" :class="{'cur-nav':curNavId==item.id}" v-for="item in colList" :key="item.id">{{ item.name }}<i class="el-icon-close del-icon" @click.stop="delNav(item)"></i></div>
</div>
</div>
</div>
</template>
<script>
export default{
name: 'nav',
data(){
return {
curNavId: '',
rowList: [{
id: 1,
name: '你好'
},{
id: 2,
name: '你好啥事'
},{
id: 3,
name: '你好事实上'
}]
}
},
methods:{
selectNav(item){
this.curNavId = item.id
},
delNav(item){
},
inputBlur(){
},
addNav(){
}
}
}
</script>
<style scoped lang="scss">
.nav{
.input-area{
display: inline-block;
height: 40px;
line-height: 40px;
border-radius: 4px 4px 0 0;
margin-right: 1px;
.input{
width: 245px;
/deep/ .el-input__inner{
vertical-align: baseline;
box-sizing: border-box;
border: none;
}
}
}
.nav-item{
display: inline-block;
padding: 0 20px;
height: 40px;
line-height: 40px;
background-color: #F8F8F8;
border-radius: 4px 4px 0 0;
margin-right: 1px;
color: #666666;
letter-spacing: 0;
text-align: center;
cursor: pointer;
.del-icon{
font-size: 12px;
color: #666;
margin-left: 12px;
}
}
.cur-nav{
background-color: #fff;
color: #5850FF;
font-weight: 500;
}
.add-icon, .pull-btn{
width: 50px;
box-sizing: border-box;
padding: 0;
position: relative;
.border{
border: 1px dashed #999;
color: #999;
}
}
.pull-btn{
&:hover{
.pull-down-wrap{
display: block;
}
}
.pull-down-wrap{
display: none;
position: absolute;
width: 200px;
max-height: 200px;
overflow-y: auto;
right: 0;
background-color: #fff;
z-index: 2;
box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px 0 #00000014, 0 9px 28px 8px #0000000d;
border-radius: 4px;
.pull-down-item{
height: 36px;
line-height: 36px;
font-weight: 400;
padding: 0 15px;
font-size: 14px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #666666;
background-color: #F8F8F8;
&:hover{
background-color: #f5f7fa;
}
}
.cur-nav{
background-color: #fff;
color: #5850FF;
font-weight: 500;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="classify-list-ctnr">
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
<pullDownNav></pullDownNav>
<div class="main-wrap">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="operate-wrap">
<span class="table-title">二级分类列表</span>
<el-button class="operate-btn" type="primary" size="small" @click="handleAdd">新增二级分类</el-button>
</div>
<GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :beforeSearchFn="beforeSearchFn" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="brandSlot">
<span>{{ brandList.slice(0, 3).join('、') }}</span>
<el-popover
placement="top"
width="400"
trigger="hover">
<span>
{{brandList.join('、')}}
</span>
<span class="more-brand" slot="reference">...[{{ brandList.length }}]</span>
</el-popover>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
import * as dayjs from 'dayjs'
import pullDownNav from './components/pullDownNav'
export default {
name: 'App',
components:{
pullDownNav
},
data() {
return {
brandList:['丰田','本田','一汽大众','奔驰','宝马','奥迪','比亚迪'],
buttonList: [
{
type: 'el-button',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.addClassify(row.scope, 1)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
listeners: {
click: row => this.updateStatus(row.scope.id, 1)
}
}
],
tableSearchForm: {
classifyName: '',
createDate: []
},
searchForm: {},
url: url,
searchFormData: [
{
label: '案例名称',
name: 'classifyName',
type: 'input'
},
{
label: '创建日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date > yesterday) {
return true
}
return false
}
}
}
],
getListApi: this.$apis.channel.getChannelListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '二级分类名称',
prop: 'channelName'
},
{
label: '创建日期',
prop: 'createdDate',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '更新时间',
prop: 'createdDate',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '操作人',
prop: 'channelName'
},
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
created() {},
mounted() {},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.tableSearchForm))
if (this.tableSearchForm.createDate.length) {
params.createdDateStrat = new Date(this.tableSearchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createdDateEnd = new Date(this.tableSearchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = this.getParams()
delete this.searchForm.createDate
resolve()
})
},
handleSearch() {
this.$refs.classifyRef.refreshTable()
},
handleReset() {
this.tableSearchForm = {
channelName: '',
createDate: []
}
this.searchForm = {}
this.handleSearch()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.classifyRef.data.length ? (this.$refs.classifyRef.tableHeightValues = '') : this.$refs.classifyRef.setTableHeightFun()
},
addClassify(val) {
this.$router.push({
path: `/classify/add?id=${val.id}&channelType=${val.channelType}&$title=频道设置`
})
},
handleAdd(){
this.$router.push({
path: `/case/add`
})
}
}
}
</script>
<style scoped lang="scss">
.classify-list-ctnr{
.main-wrap{
background-color: #fff;
padding: 20px;
}
.more-brand{
color: #5850FF;
cursor: pointer;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="container">
<glsx-combi-form :isInline="false" class="glsx-combi-form" ref="baseInfoRef" labelWidth="154px" defaultWidth="432px" :formObj.sync="formObj" :formData="formData" :formRules="myRule">
<div slot="selectGoodsSlot">
<el-button class="el-icon-plus" size="small" @click="openBrandDialog">选择商品</el-button>
</div>
<div slot="goodsInfoSlot" class="goods-wrap">
<glsx-combi-form :isInline="false" ref="goodsInfoRef" labelWidth="154px" defaultWidth="432px" :formObj.sync="goodsFormObj" :formData="goodsFormData" :formRules="goodsRule">
<div slot="selectGoodsSlot">
<glsx-preview :picOptions="posterOptions" :imageUrlArr="formObj.videoCoverArr" @change="changeChannelImg"></glsx-preview>
</div>
</glsx-combi-form>
</div>
<div slot="paymentSlot">
<el-radio-group v-model="formObj.brandType">
<el-radio :label="1">全款</el-radio>
<el-radio :label="2">定金+尾款</el-radio>
</el-radio-group>
<div class="money-wrap" v-if="formObj.brandType == 2">
<label class="label" for="">定金金额/元:</label>
<el-input v-model="configName"></el-input>
</div>
</div>
<div slot="saleStoreSlot">
<el-button class="el-icon-plus" size="small" @click="openBrandDialog">选择门店</el-button>
<GLTable class="selected-table" :hasPage="false" ref="selectedRef" :tableParams="selectedtableParams" :tableData="[]">
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(scope.scope)">删除</el-button>
</div>
</GLTable>
</div>
<div slot="carSeriesSlot">
<el-radio-group v-model="formObj.brandType">
<el-radio :label="1">全部</el-radio>
<el-radio :label="2">部分</el-radio>
</el-radio-group>
<div v-if="formObj.brandType == 2">
<el-select v-model="value1" multiple placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</div>
</glsx-combi-form>
<GLDialog title="选择车系"
mode="mid"
:visible.sync="dialogVisible"
:before-close="handleClose"
:close-on-click-modal="false"
@onOk="handleConfirm"
@onCancel="handleClose">
<div class="car-container">
</div>
</GLDialog>
</div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'add',
components: {
glsxCombiForm
},
data() {
return {
goodsFormObj:{
},
posterOptions: {
width: '104px',
height: '138px',
key: 'posterImg',
isClose: true
},
goodsFormData:[
{
label: '商品图',
addHtml: 'selectGoodsSlot',
isDisabled: false
},
{
label: '商品名称',
type: 'input',
isDisabled: false
},
{
label: '售价',
name: 'title',
type: 'showTxt'
},
{
label: '最低售价',
name: 'title',
type: 'showTxt'
},
],
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
dialogVisible: false,
formObj:{
brandType: 1
},
formData:[
{
label: '选择商品',
addHtml: 'selectGoodsSlot',
type: 'input',
isDisabled: false
},
{
label: '商品信息',
addHtml: 'goodsInfoSlot',
type: 'input',
isDisabled: false
},
{
label: '收款方式',
name: 'title',
addHtml: 'paymentSlot'
},
{
label: '销售门店',
name: 'saleStore',
addHtml: 'saleStoreSlot'
},
{
label: '适用车系',
name: 'carSeries',
addHtml: 'carSeriesSlot',
},
{
label: '关联商品分类',
name: 'title',
addHtml: 'selectBrandSlot'
}
],
selectedtableParams: {
listName: 'list',
tableOption: {
width: 150
},
tableColumns: [
{
label: '门店名称',
width: 120,
prop: 'brandName'
},
{
label: '门店活动价(元)',
addHtml: 'goodName'
},
{
label: '尾款金额(元)',
addHtml: 'couponCost'
}
]
}
}
},
methods:{
openBrandDialog(){
this.dialogVisible = !this.dialogVisible
}
}
}
</script>
<style scoped lang="scss">
.container{
background-color: #fff;
.goods-wrap{
padding: 20px 20px 1px;
width: 866px;
background: #F9F9F9;
border-radius: 4px;
}
.money-wrap{
.label{
width: 92px;
height: 20px;
line-height: 20px;
font-weight: 400;
font-size: 14px;
color: #333333;
text-align: right;
}
.el-input{
width: 432px;
}
}
.selected-table {
margin-top: 10px;
width: 100%;
max-width: 1100px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="nav">
<div style="display: inline-block;">
<div class="nav-item" :ref="'navRef'+index" v-for="(item,index) in rowList" :key="item.id" @click="selectNav(item)" :class="{'cur-nav':curNavId==item.id}">{{ item.name }}<i class="el-icon-close del-icon" @click.stop="delNav(item)"></i></div>
</div>
<div v-if="showInput" class="input-area"><el-input maxLength="15" ref="addInput" @blur="inputBlur" v-model="configName" class="input"></el-input></div>
<div v-else class="nav-item add-icon" style="cursor: pointer;" @click="addNav"><i class="el-icon-plus border"></i></div>
<div v-if="colList && colList.length" class="nav-item pull-btn" style="cursor: pointer;">
<i class="el-icon-arrow-down border"></i>
<div class="pull-down-wrap">
<div class="pull-down-item" @click="selectNav(item, 'sort')" :class="{'cur-nav':curNavId==item.id}" v-for="item in colList" :key="item.id">{{ item.name }}<i class="el-icon-close del-icon" @click.stop="delNav(item)"></i></div>
</div>
</div>
</div>
</template>
<script>
export default{
name: 'nav',
data(){
return {
curNavId: '',
rowList: [{
id: 1,
name: '你好'
},{
id: 2,
name: '你好啥事'
},{
id: 3,
name: '你好事实上'
}]
}
},
methods:{
selectNav(item){
this.curNavId = item.id
},
delNav(item){
},
inputBlur(){
},
addNav(){
}
}
}
</script>
<style scoped lang="scss">
.nav{
.input-area{
display: inline-block;
height: 40px;
line-height: 40px;
border-radius: 4px 4px 0 0;
margin-right: 1px;
.input{
width: 245px;
/deep/ .el-input__inner{
vertical-align: baseline;
box-sizing: border-box;
border: none;
}
}
}
.nav-item{
display: inline-block;
padding: 0 20px;
height: 40px;
line-height: 40px;
background-color: #F8F8F8;
border-radius: 4px 4px 0 0;
margin-right: 1px;
color: #666666;
letter-spacing: 0;
text-align: center;
cursor: pointer;
.del-icon{
font-size: 12px;
color: #666;
margin-left: 12px;
}
}
.cur-nav{
background-color: #fff;
color: #5850FF;
font-weight: 500;
}
.add-icon, .pull-btn{
width: 50px;
box-sizing: border-box;
padding: 0;
position: relative;
.border{
border: 1px dashed #999;
color: #999;
}
}
.pull-btn{
&:hover{
.pull-down-wrap{
display: block;
}
}
.pull-down-wrap{
display: none;
position: absolute;
width: 200px;
max-height: 200px;
overflow-y: auto;
right: 0;
background-color: #fff;
z-index: 2;
box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px 0 #00000014, 0 9px 28px 8px #0000000d;
border-radius: 4px;
.pull-down-item{
height: 36px;
line-height: 36px;
font-weight: 400;
padding: 0 15px;
font-size: 14px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #666666;
background-color: #F8F8F8;
&:hover{
background-color: #f5f7fa;
}
}
.cur-nav{
background-color: #fff;
color: #5850FF;
font-weight: 500;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="goods-list-cntr">
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
<div class="table-wrap">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="operate-wrap">
<span class="table-title">发现商品列表</span>
<el-button class="operate-btn" type="primary" size="small" @click="handleAdd">新增商品</el-button>
</div>
<GLTable ref="channelRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :beforeSearchFn="beforeSearchFn" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="imageSlot" class="table-image" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.publicityImg" />
<img class="img-36 pointer" slot="reference" :src="scope.scope.publicityImg" />
</el-popover>
</div>
<div slot="statusSlot" slot-scope="scope">
<span :class="['status', scope.scope.channelType==3 ? 'success-status': 'error-status']"></span>
<span>{{scope.scope.channelType==3 ? '上架' : '下架' }}</span>
</div>
<template slot="activityLink" slot-scope="scope">
<span class="relink">{{ scope.scope.activityName }}</span>
</template>
<template slot="moveCarCodeCount" slot-scope="scope">
<span class="moveCarCodeCount" @click="opneMoveMessage(scope.scope)">{{ scope.scope.moveCarCodeCount }}</span>
</template>
<template slot="switch" slot-scope="scope">
<el-switch v-model="scope.scope.isOpen" @change="updateState(scope.scope)"></el-switch>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
import * as dayjs from 'dayjs'
export default {
name: 'App',
data() {
return {
tableSearchForm: {
channelName: '',
createDate: []
},
tabPaneList: [{name: 'sa', label: '配置升级'}, {name: 'sa', label: '车主优选'}],
buttonList: [
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text',
fn: '查看'
},
listeners: {
click: row => this.addContent(row.scope, 1)
}
}
],
searchForm: {},
url: url,
searchFormData: [
{
label: '商品名称',
name: 'channelName',
type: 'input'
},
{
label: '创建日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date > yesterday) {
return true
}
return false
}
}
},
{
label: '商户名称',
name: 'channelName',
type: 'input'
},
{
label: '商品分类',
name: 'channelName',
type: 'select'
},
],
getListApi: this.$apis.channel.getChannelListApi,
tableParams: {
listName: 'list',
tableOption: {
width: 100
},
tableColumns: [
{
label: '商品名称',
prop: 'channelName'
},
{
label: '缩略图',
addHtml: 'imageSlot'
},
{
label: '收款方式',
formatter: cellValue => {
return cellValue.channelName || '--'
}
},
{
label: '定金(元)',
prop: 'channelName'
},
{
label: '门店活动价(元)',
prop: 'channelName'
},
{
label: '分类',
prop: 'channelName'
},
{
label: '状态',
addHtml: 'statusSlot'
},
{
label: '创建日期',
prop: 'createdDate',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '更新时间',
prop: 'createdDate',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '操作人',
prop: 'channelName'
},
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
created() {},
mounted() {},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.tableSearchForm))
if (this.tableSearchForm.createDate.length) {
params.createdDateStrat = new Date(this.tableSearchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createdDateEnd = new Date(this.tableSearchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = this.getParams()
delete this.searchForm.createDate
resolve()
})
},
handleSearch() {
this.$refs.channelRef.refreshTable()
},
handleReset() {
this.tableSearchForm = {
channelName: '',
createDate: []
}
this.searchForm = {}
this.handleSearch()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.channelRef.data.length ? (this.$refs.channelRef.tableHeightValues = '') : this.$refs.channelRef.setTableHeightFun()
},
handleAdd(val={}){
this.$router.push({
path: `/goods/add?id=${val.id}&channelType=${val.channelType}&$title=频道设置`
})
}
}
}
</script>
<style scoped lang="scss">
.goods-list-cntr{
.table-wrap{
margin-top: 16px;
padding: 20px;
background-color: #fff;
.status{
width: 6px;
height: 6px;
border-radius: 50%;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
.success-status{
background-color: #37C67F;
}
.error-status{
background-color: #999999;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -16,9 +16,18 @@ ...@@ -16,9 +16,18 @@
<el-checkbox v-for="channel in channelList" :label="channel.channelType" :key="channel.channelType">{{ channel.channelName }}</el-checkbox> <el-checkbox v-for="channel in channelList" :label="channel.channelType" :key="channel.channelType">{{ channel.channelName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div slot="carSeriesHtml">
<el-button type="default" class="el-icon-plus" v-if="!isDisabled" @click="handleCarSeriesClose">选择车系</el-button>
<div class="merchantNameLabel" v-if="editForm.merchantName">
<p>所属门店</p>
<div class="merchantName ellipsis-1">{{ editForm.merchantName }}</div>
</div>
<div class="el-form-item__error mrt5" v-if="merchantFlag">请选择门店</div>
</div>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<select-store v-if="relateStoreVisible" ref="relateStore" :dialogVisible="relateStoreVisible" :storeSelected="selectedList" :merchantInfo="editForm.merchantId" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose"></select-store> <select-store v-if="relateStoreVisible" ref="relateStore" :dialogVisible="relateStoreVisible" :storeSelected="selectedList" :merchantInfo="editForm.merchantId" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose"></select-store>
<selectCarDialog v-if="carDialogVisible" :dialogVisible="carDialogVisible"></selectCarDialog>
<GLFooter> <GLFooter>
<el-button @click="handleCancel">取消</el-button> <el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button> <el-button type="primary" @click="handleSave">确定</el-button>
...@@ -27,9 +36,11 @@ ...@@ -27,9 +36,11 @@
</template> </template>
<script> <script>
import selectStore from './components/selectStore' import selectStore from './components/selectStore'
import selectCarDialog from './components/selectCarDialog'
export default { export default {
components: { components: {
selectStore selectStore,
selectCarDialog
}, },
data() { data() {
return { return {
...@@ -52,11 +63,17 @@ export default { ...@@ -52,11 +63,17 @@ export default {
label: '频道名称', label: '频道名称',
name: 'channel', name: 'channel',
addHtml: 'channelHtml' addHtml: 'channelHtml'
} },
{
label: '主营品牌车系',
name: 'carId',
addHtml: 'carSeriesHtml'
},
], ],
selectedList: [], selectedList: [],
channelList: [], channelList: [],
relateStoreVisible: false, // 选择门店 relateStoreVisible: false, // 选择门店
carDialogVisible: false, //选择车系
editRule: { editRule: {
channelIds: [{ required: true, message: '请选择频道名称', trigger: 'change' }] channelIds: [{ required: true, message: '请选择频道名称', trigger: 'change' }]
} }
...@@ -138,6 +155,10 @@ export default { ...@@ -138,6 +155,10 @@ export default {
handleCheckedChannelChange(val) { handleCheckedChannelChange(val) {
// console.log(this.editForm.channelIds) // console.log(this.editForm.channelIds)
}, },
//选择车系
handleCarSeriesClose(){
this.carDialogVisible = !this.carDialogVisible
},
// 选择门店 // 选择门店
handleRelateStoreClose() { handleRelateStoreClose() {
this.relateStoreVisible = !this.relateStoreVisible this.relateStoreVisible = !this.relateStoreVisible
......
<template>
<GLDialog title="选择车系"
mode="mid"
:visible.sync="dialogVisible"
:before-close="handleClose"
:close-on-click-modal="false"
@onOk="handleConfirm"
@onCancel="handleClose">
<div class="car-container">
<div class="wrap">
<div class="item flex-center" v-for="item in carSeriesData" :key="item.id" @click="selectBrand(item)">
<span>{{ item.name }}</span>
<i class="el-icon-arrow-right"></i>
</div>
</div>
<div class="wrap">
<div class="item flex-center" v-for="(item, index) in sonBrandList" :key="item.id">
<el-checkbox :indeterminate="isIndeterminate(item)" v-model="item.checked" @change="selectCarSeries(index, item)">
<span class="flex-center">
{{ item.name }}
<i class="el-icon-arrow-right"></i>
</span>
</el-checkbox>
</div>
</div>
<div class="wrap">
<el-checkbox-group v-model="selectdData" @change="handleCheckedCitiesChange">
<el-checkbox class="item" v-for="item in carSeriesList" :label="item.name" :key="item.id">{{item.name}}</el-checkbox>
</el-checkbox-group>
</div>
</div>
</GLDialog>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'selectStore',
data() {
return {
carSeriesData: [],
sonBrandList: [],
curSonBrandIdx: -1,
selectdData: [],
isIndeterminate: true
}
},
computed:{
carSeriesList() {
return this.curSonBrandIdx == -1 ? [] : this.sonBrandList[this.curSonBrandIdx]?.childs?.forEach(item => item.checked = false)
}
},
props: {
dialogVisible:{
type: Boolean,
default: false
}
},
mounted() {
this.getCarSeriesData()
},
methods:{
getCarSeriesData() {
this.$apis.store.getCarSeriesApi({needCarSeries:true}).then(res => {
console.log(res)
if(res?.length){
this.carSeriesData = res
}
})
},
selectBrand(item) {
this.curSonBrandIdx = -1
this.sonBrandList = item.childs
console.log(item, this.sonBrandList)
},
selectCarSeries(idx, item){
if(this.curSonBrandIdx != idx) this.curSonBrandIdx = idx
}
}
}
</script>
<style lang="scss">
.car-container{
border: 1px solid #E8E8EA;
height: 476px;
display: flex;
.wrap{
flex: 1;
border-left: 1px solid #E8E8EA;
overflow-y: auto;
padding: 8px 0px 8px 12px;
&:first-child{
border: none;
}
.item{
height: 28px;
line-height: 28px;
font-size: 14px;
font-weight: 400;
color: #333333;
cursor: pointer;
}
.flex-center{
display: flex;
justify-content: space-between;
align-items: center;
}
.son-item{
display: inline-flex;
justify-content: space-between;
align-items: center;
width: calc(100% - 14px);
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!