Commit e00b982a by 张权

sdsds

1 parent 581eed0c
<template> <template>
<div class="expert-container"> <div class="expert-container">
<div> <div>
<GLButton :size="size" fn="新增配置" icon="el-icon-plus" type="primary" @click="addConfig(1)">新增配置</GLButton> <div class="btn-area">
<GLButton id="clientBtn" :size="size" fn="新增配置" type="primary" @click.stop="addConfig(1)">
新增配置
<i class="el-icon-arrow-down"></i>
</GLButton>
<ul v-if="showClientType" class="client">
<li @click.stop="selectClientType(1)">升级客户</li>
<li @click.stop="selectClientType(2)">战败客户</li>
</ul>
</div>
<span class="btnTip">配置轻改专家,形成业务活码,客户通过「精品升级」订单扫码后添加该员工。</span> <span class="btnTip">配置轻改专家,形成业务活码,客户通过「精品升级」订单扫码后添加该员工。</span>
</div> </div>
<div class="expert-wrap"> <div class="expert-wrap">
<glsx-combi-form ref="expertRef" labelWidth="120px" defaultWidth="215px" :formObj="batchListSearch" :formData="expertForm"> <glsx-combi-form ref="expertRef" labelWidth="120px" defaultWidth="215px" :formObj="batchListSearch" :formData="expertForm">
<span slot="footer" class="footer-btns"> <span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询{{ isNotData }}</el-button>
<el-button :size="size" class="resetBtn" @click="handleReset">重置</el-button> <el-button :size="size" class="resetBtn" @click="handleReset">重置</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<GLTable ref="userDetailTable" :searchForm="batchListSearch" :tableParams="batchTableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn"> <GLTable ref="expertTable" :pageConf="batchPageConf" :searchForm="batchListSearch" :tableParams="batchTableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope"> <div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton fn="编辑" type="text" @click="addConfig(2)">编辑</GLButton> <GLButton fn="编辑" type="text" @click="addConfig(2)">编辑</GLButton>
<el-button type="text" @click="addConfig(3)">{{ scope.scope.status == 1 ? '禁用' : '启用' }}</el-button> <el-button type="text" @click="addConfig(3)">{{ scope.scope.status == 1 ? '禁用' : '启用' }}</el-button>
...@@ -30,13 +39,16 @@ ...@@ -30,13 +39,16 @@
<script> <script>
const imagBaseURL = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/' const imagBaseURL = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/'
import glsxCombiForm from '@/components/glsx-combi-form' import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util'
export default { export default {
name: 'expert_index', name: 'expert_index',
data() { data() {
return { return {
imagBaseURL, imagBaseURL,
size: 'small', size: 'small',
getListApi: '', getListApi: this.$apis.beforeSale.getWriteOffList,
showClientType: false,
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
batchListSearch: { batchListSearch: {
merchantName: '', merchantName: '',
name: '', name: '',
...@@ -83,26 +95,48 @@ export default { ...@@ -83,26 +95,48 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '编号', label: '编号',
prop: 'mobile' prop: 'priceSection',
formatter: cellValue => {
return cellValue.priceSection || '--'
}
}, },
{ {
label: '所属门店/部门', label: '所属门店/部门',
prop: 'merchantName', prop: 'priceSection',
formatter: cellValue => { formatter: cellValue => {
return cellValue.memberType || '--' return cellValue.priceSection || '--'
} }
}, },
{ {
label: '添加成员', label: '添加成员',
prop: 'sdadsa' prop: 'priceSection',
width: 200,
formatter: cellValue => {
return cellValue.priceSection || '-'
}
}, },
{ {
label: '客户类型', label: '客户类型',
prop: 'activeTypeDescList' prop: 'priceSection',
width: 200,
formatter: cellValue => {
return cellValue.priceSection || '-'
}
}, },
{ {
label: '欢迎语', label: '欢迎语',
prop: 'status' prop: 'priceSection',
width: 200,
formatter: cellValue => {
return cellValue.priceSection || '-'
}
},
{
label: '操作',
prop: '',
width: '100px',
fixed: 'right',
addHtml: 'table-btns'
} }
] ]
} }
...@@ -111,14 +145,88 @@ export default { ...@@ -111,14 +145,88 @@ export default {
components: { components: {
glsxCombiForm glsxCombiForm
}, },
computed: {},
mounted() {
document.getElementById('app').addEventListener('click', this.setClientType)
},
beforeDestroy() {
document.getElementById('app').removeEventListener('click', this.setClientType)
},
methods: { methods: {
setClientType() {
if (this.showClientType) this.showClientType = false
},
addConfig() { addConfig() {
this.showClientType = true
},
goDetail() {
this.$router.push({ path: '/expert/detail/5' })
},
selectClientType(type) {
this.showClientType = false
this.$router.push({ path: '/expert/detail/5' }) this.$router.push({ path: '/expert/detail/5' })
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.batchListSearch = { ...this.setParams() }
resolve()
})
},
setParams() {
const params = {}
if (Array.isArray(this.batchListSearch.activeTime) && this.batchListSearch.activeTime.length > 0) {
params.commitTimeStart = util.dateFormat(this.batchListSearch.activeTime[0]) + ' 00:00:00'
params.commitTimeEnd = util.dateFormat(this.batchListSearch.activeTime[1]) + ' 23:59:59'
}
params.searchText = ''
return params
},
handleSearch() {
this.$refs.expertTable.refreshTable()
},
handleReset(type) {
console.log(this.$refs.expertTable)
this.batchListSearch = {
searchText: '',
activeTime: []
}
if (type === 'reset') {
this.handleSearch()
}
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.btn-area {
display: inline-block;
position: relative;
.client {
background-color: #fff;
list-style: none;
position: absolute;
z-index: 1;
width: 108px;
padding: 4px 0;
box-shadow: 0px 6px 20px 0px rgba(122, 122, 122, 0.2);
border-radius: 4px;
top: calc(100% + 8px);
li {
height: 32px;
line-height: 32px;
text-align: center;
background: #ffffff;
cursor: pointer;
font-size: 14px;
font-weight: 400;
color: #666666;
&:hover {
background-color: #f4f6fc;
color: #5850ff;
}
}
}
}
.btnTip, .btnTip,
.tip { .tip {
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
......
...@@ -131,7 +131,6 @@ export default { ...@@ -131,7 +131,6 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchForm = { ...this.setParams() } this.searchForm = { ...this.setParams() }
console.log(this.searchForm, 963)
resolve() resolve()
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!