Commit fe748388 by 前端

Merge branch 'kuangyq_dev_v2.3.0' into 'v2.3.0'

Kuangyq dev v2.3.0

See merge request !56
2 parents c2194394 48ef90eb
...@@ -8,9 +8,18 @@ ...@@ -8,9 +8,18 @@
*/ */
import { http_config, http } from '@/main' import { http_config, http } from '@/main'
const getMerchantTree = params => { const getMerchantTree = params => {
params.method = 'entmicro.api.common.findMerchantTreeByMerchantNo.list' params.method = 'merchants.api.open.findSubMerchantbySupMerchantNo'
return http_config({ return http({
url: '/rop-scrm-entmicro/router', url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
const findMerchantTreeList = params => {
params.method = 'merchants.api.open.findSubordinateListByPage'
return http({
url: '/rop-merchants/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
...@@ -68,5 +77,6 @@ export default { ...@@ -68,5 +77,6 @@ export default {
findDepartmentList, findDepartmentList,
toGL, toGL,
merchantInfo, merchantInfo,
brandList brandList,
findMerchantTreeList
} }
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
return { return {
loading: false, loading: false,
visible: false, visible: false,
dialogTitle: '选择商户账户', dialogTitle: '选择企业微信',
listHeight: 220, listHeight: 220,
departmentList: [], departmentList: [],
parentMerchantList: [], parentMerchantList: [],
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
}, },
submit() { submit() {
console.log(this.checkObj) console.log(this.checkObj)
if (!this.checkObj) { if (!this.checkObj.first) {
this.$message({ this.$message({
message: '请选择门店', message: '请选择门店',
type: 'warning' type: 'warning'
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
<span class="el-breadcrumb__inner" style="cursor: context-menu">{{ $globalState.session.merchantName }}</span> <span class="el-breadcrumb__inner" style="cursor: context-menu">{{ $globalState.session.merchantName }}</span>
<i class="el-breadcrumb__separator el-icon-arrow-right"></i> <i class="el-breadcrumb__separator el-icon-arrow-right"></i>
</span> </span>
<span class="el-breadcrumb__item" v-for="item in selectLevel" :key="item.departmentId" @click="backLevel(item)"> <span class="el-breadcrumb__item" v-for="item in selectLevel" :key="item.merchantId" @click="backLevel(item)">
<span class="el-breadcrumb__inner">{{ item.departmentName }}</span> <span class="el-breadcrumb__inner">{{ item.merchantName }}</span>
<i class="el-breadcrumb__separator el-icon-arrow-right"></i> <i class="el-breadcrumb__separator el-icon-arrow-right"></i>
</span> </span>
<span class="el-breadcrumb__item last-level" v-if="lastLevel"> <span class="el-breadcrumb__item last-level" v-if="lastLevel">
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
<div> <div>
<div class="tree-list" :style="{ height: listHeight + 'px' }"> <div class="tree-list" :style="{ height: listHeight + 'px' }">
<el-radio-group v-model="checkObj.first" @change="selectChange"> <el-radio-group v-model="checkObj.first" @change="selectChange">
<div class="tree-item" v-for="item in departmentList" :key="item.departmentId" @click.self="toNext(item, $event)"> <div class="tree-item" v-for="item in merchantList" :key="item.merchantId" @click.self="toNext(item, $event)">
<el-radio :label="item" :disabled="!item.relevanceMerchant">{{ item.departmentName }}</el-radio> <el-radio :label="item" :disabled="item.childrenNms">{{ item.merchantName }}</el-radio>
<i v-show="item.childrenNum" class="el-icon-arrow-right"></i> <i v-show="item.childrenNms" class="el-icon-arrow-right"></i>
</div> </div>
</el-radio-group> </el-radio-group>
</div> </div>
...@@ -50,9 +50,7 @@ export default { ...@@ -50,9 +50,7 @@ export default {
visible: false, visible: false,
dialogTitle: '选择商户账户', dialogTitle: '选择商户账户',
listHeight: 220, listHeight: 220,
departmentList: [], merchantList: [],
parentMerchantList: [],
subSubMerchantList: [],
checkObj: { checkObj: {
first: '' first: ''
}, },
...@@ -68,20 +66,22 @@ export default { ...@@ -68,20 +66,22 @@ export default {
} }
}, },
mounted() { mounted() {
this.getDepartmentList() // this.getMerchantList()
this.merchantList = this.parentMerchantList
}, },
methods: { methods: {
// 获取门店数据 // 获取商户账户数据
getDepartmentList(depth, id) { getMerchantList(id) {
var params = {} var params = {}
depth ? (params.depth = depth) : (params.depth = 0) // depth ? (params.depth = depth) : (params.depth = 0)
if (id) { id ? (params.merchantId = id) : (params.merchantId = this.$globalState.session.merchantId),
params.departmentId = id // if (id) {
} // params.merchantId = id
this.$apis.baseInfo.getDepartment(params).then(res => { // }
this.$apis.baseInfo.getMerchantTree(params).then(res => {
console.log(res) console.log(res)
this.departmentList = res this.merchantList = res
console.log(this.departmentList) // console.log(this.merchantList)
}) })
}, },
handleClose() { handleClose() {
...@@ -89,33 +89,33 @@ export default { ...@@ -89,33 +89,33 @@ export default {
}, },
submit() { submit() {
console.log(this.checkObj) console.log(this.checkObj)
if (!this.checkObj) { if (!this.checkObj.first) {
this.$message({ this.$message({
message: '请选择门店', message: '请选择商户账户',
type: 'warning' type: 'warning'
}) })
return return
} }
this.$emit('select', this.checkObj) this.$emit('selectMerchant', this.checkObj)
this.visible = false this.visible = false
}, },
// 选中时触发 // 选中时触发
selectChange(val) { selectChange(val) {
console.log(val) console.log(val)
this.$set(this.selectLevel, val.depth - 1, val) this.$set(this.selectLevel, val.merchantAccountLevel - 2, val)
console.log(this.selectLevel)
// this.lastLevel = false // this.lastLevel = false
val.childrenNum ? (this.lastLevel = true) : (this.lastLevel = false) val.childrenNms ? (this.lastLevel = true) : (this.lastLevel = false)
// this.lastLevel = val.hasChildren // this.lastLevel = val.hasChildren
}, },
// 跳转下一级,需判断是否有下一级 // 跳转下一级,需判断是否有下一级
toNext(item, event) { toNext(item, event) {
console.log(item, this.checkObj, event) console.log(item)
console.log(item.departmentId) if (item.childrenNms) {
if (item.childrenNum) {
this.checkObj.first = '' this.checkObj.first = ''
this.lastLevel = true this.lastLevel = true
this.getDepartmentList(item.depth, item.id) this.getMerchantList(item.merchantNo)
this.selectLevel[item.depth - 1] = item this.selectLevel[item.merchantAccountLevel - 2] = item
console.log(this.selectLevel) console.log(this.selectLevel)
} }
}, },
...@@ -123,10 +123,15 @@ export default { ...@@ -123,10 +123,15 @@ export default {
backLevel(item) { backLevel(item) {
console.log(item) console.log(item)
this.checkObj.first = '' this.checkObj.first = ''
item.childrenNum ? (this.lastLevel = true) : (this.lastLevel = false) item.childrenNms ? (this.lastLevel = true) : (this.lastLevel = false)
this.selectLevel = this.selectLevel.slice(0, item.merchantAccountLevel - 2)
console.log(this.selectLevel) console.log(this.selectLevel)
this.selectLevel = this.selectLevel.slice(0, item.depth - 1) if (this.selectLevel.length) {
this.getDepartmentList(item.depth - 1) let merchantID = this.selectLevel[item.merchantAccountLevel - 3].merchantNo
this.getMerchantList(merchantID)
return
}
this.getMerchantList()
console.log(this.selectLevel) console.log(this.selectLevel)
} }
} }
......
...@@ -8,11 +8,24 @@ ...@@ -8,11 +8,24 @@
<template> <template>
<div> <div>
<el-popover :popper-class="'search-popper'" placement="bottom-start" width="280" trigger="manual" @blur="handleBlur" v-model="visible"> <el-popover :popper-class="'search-popper'" placement="bottom-start" width="280" trigger="manual" v-model="visible">
<ul class="el-scrollbar__view el-cascader__suggestion-list" v-infinite-scroll="load" style="overflow: auto"> <ul v-if="name == 'merchant'" class="el-scrollbar__view el-cascader__suggestion-list" v-infinite-scroll="load" style="overflow: auto">
<!-- <li class="el-cascader__suggestion-item" :class="isCheck ? 'is-checked' : ''">dafsd</li> --> <!-- <li class="el-cascader__suggestion-item" :class="isCheck ? 'is-checked' : ''">dafsd</li> -->
<template v-if="searchList.length"> <template v-if="searchList.length">
<li class="el-cascader__suggestion-item" :class="item.departmentName == searchKey.departmentName" v-for="item in searchList" :key="item.id" @click.self="selectItem(item)"> <li class="el-cascader__suggestion-item" :class="item.departmentName == searchKey.departmentName" v-for="item in searchList" :key="item.id" @click="selectMerchantItem(item)">
<!-- <el-radio :label="item">{{ item.departmentName }}</el-radio> -->
<div>{{ item.merchantName }}</div>
<div class="parent-merchant">{{ item.merchantLegalPerson }}</div>
</li>
</template>
<template v-else>
<li>无数据</li>
</template>
</ul>
<ul v-else class="el-scrollbar__view el-cascader__suggestion-list" v-infinite-scroll="load" style="overflow: auto">
<!-- <li class="el-cascader__suggestion-item" :class="isCheck ? 'is-checked' : ''">dafsd</li> -->
<template v-if="searchList.length">
<li class="el-cascader__suggestion-item" :class="item.departmentName == searchKey.departmentName" v-for="item in searchList" :key="item.id" @click="selectItem(item)">
<!-- <el-radio :label="item">{{ item.departmentName }}</el-radio> --> <!-- <el-radio :label="item">{{ item.departmentName }}</el-radio> -->
<div>{{ item.departmentName }}</div> <div>{{ item.departmentName }}</div>
<div class="parent-merchant">{{ item.entmicroParentName }}</div> <div class="parent-merchant">{{ item.entmicroParentName }}</div>
...@@ -22,26 +35,35 @@ ...@@ -22,26 +35,35 @@
<li>无数据</li> <li>无数据</li>
</template> </template>
</ul> </ul>
<el-input slot="reference" debounce style="width: 320px" v-model="searchKey.departmentName" :size="size" @input="handleInput" @focus="handleFocus" placeholder="请输入内容"> <el-input slot="reference" debounce style="width: 320px" v-model="searchKey.departmentName" :size="size" @input="handleInput" @focus="name === 'merchant' ? getMerchantSearchList() : getSearchList()" @blur="handleBlur" :placeholder="type">
<!-- <i slot="suffix" class="el-input__icon el-icon-arrow-down" :class="isOpen ? 'is-focus' : ''"></i> --> <!-- <i slot="suffix" class="el-input__icon el-icon-arrow-down" :class="isOpen ? 'is-focus' : ''"></i> -->
<template slot="append"> <template slot="append">
<div class="input_append" @click.stop="arrowClick"> <div class="input_append" @click.stop="arrowClick()">
<img src="@/assets/add_merchant.png" alt="" /> <img src="@/assets/add_merchant.png" alt="" />
</div> </div>
</template> </template>
</el-input> </el-input>
</el-popover> </el-popover>
<DepartmentTree ref="departmentTree" @select="select"></DepartmentTree> <DepartmentTree ref="departmentTree" @select="select"></DepartmentTree>
<MerchantTree ref="merchantTree" @selectMerchant="selectMerchant"></MerchantTree>
</div> </div>
</template> </template>
<script> <script>
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import DepartmentTree from './departmentTree.vue' import DepartmentTree from './departmentTree.vue'
import MerchantTree from './merchantTree.vue'
export default { export default {
name: 'SearchSelect', name: 'SearchSelect',
components: { components: {
DepartmentTree DepartmentTree,
MerchantTree
},
props: {
name: {
type: String,
default: ''
}
}, },
data() { data() {
return { return {
...@@ -50,7 +72,7 @@ export default { ...@@ -50,7 +72,7 @@ export default {
id: '', id: '',
departmentName: '' departmentName: ''
}, // 绑定input的值 }, // 绑定input的值
isOpen: false, // isOpen: false,
visible: false, visible: false,
isCheck: false, isCheck: false,
departmentList: [], // 接口返回数据 departmentList: [], // 接口返回数据
...@@ -72,24 +94,35 @@ export default { ...@@ -72,24 +94,35 @@ export default {
this.isOpen = true this.isOpen = true
this.visible = false this.visible = false
if (this.isOpen) { if (this.isOpen) {
if (this.name === 'merchant') {
this.$refs.merchantTree.visible = true
this.$refs.merchantTree.getMerchantList()
return
}
this.$refs.departmentTree.visible = true this.$refs.departmentTree.visible = true
this.$refs.departmentTree.getDepartmentList() this.$refs.departmentTree.getDepartmentList()
} }
}, },
// 获取搜索框输入值
handleInput: utils.debounce(function(val) { handleInput: utils.debounce(function(val) {
console.log(val) console.log(val)
this.searchValue = val this.searchValue = val
this.pageParams.pageNum = 1 this.pageParams.pageNum = 1
// 判断是商户账户调用还是企业微信调用
console.log(this.name)
if (this.name === 'merchant') {
this.getMerchantSearchList(val)
return
}
this.getSearchList(val) this.getSearchList(val)
}, 300), }, 300),
// 根据输入内容搜索企微门店数据 // 根据输入内容搜索企微门店数据
getSearchList(val) { getSearchList(val) {
this.loading = true console.log(this.searchKey)
console.log(this.searchValue)
var params = JSON.parse(JSON.stringify(this.pageParams)) var params = JSON.parse(JSON.stringify(this.pageParams))
params.departmentName = val val ? (params.departmentName = val) : (params.departmentName = this.searchKey.departmentName)
console.log(params) console.log(params)
if (params.departmentName) { // if (params.departmentName) {
this.$apis.baseInfo.findDepartmentList(params).then(res => { this.$apis.baseInfo.findDepartmentList(params).then(res => {
console.log(res) console.log(res)
if (res.data.length) { if (res.data.length) {
...@@ -100,15 +133,50 @@ export default { ...@@ -100,15 +133,50 @@ export default {
this.searchList = this.searchList.concat(res.data) this.searchList = this.searchList.concat(res.data)
} }
} }
this.pageParams.pageNum++ // this.pageParams.pageNum++
console.log(this.searchList) console.log(this.searchList)
}) })
this.loading = false // } else {
// this.searchList = []
// }
this.visible = true
},
// 根据输入内容搜索商户账户数据
getMerchantSearchList(val) {
console.log(this.searchKey)
var params = JSON.parse(JSON.stringify(this.pageParams))
val ? (params.merchantName = val) : (params.merchantName = this.searchKey.departmentName)
params.merchantId = this.$globalState.session.merchantId
console.log(params)
// if (params.merchantName) {
this.$apis.baseInfo.findMerchantTreeList(params).then(res => {
console.log(res)
if (res.data.length) {
this.count = res.count
if (res.pageNum == 1) {
this.searchList = res.data
} else { } else {
this.searchList = [] this.searchList = this.searchList.concat(res.data)
} }
}
// this.pageParams.pageNum++
console.log(this.searchList)
})
// } else {
// this.searchList = []
// }
this.visible = true this.visible = true
}, },
// 下拉选择商户账户
selectMerchantItem(val) {
console.log(val)
this.searchKey.id = val.merchantNo
this.searchKey.departmentName = val.merchantName
// this.searchList = [val]
this.visible = false
this.$emit('getCurMerchantData', val)
},
// 下拉选择门店
selectItem(val) { selectItem(val) {
console.log(val) console.log(val)
this.searchKey = val this.searchKey = val
...@@ -116,6 +184,7 @@ export default { ...@@ -116,6 +184,7 @@ export default {
this.visible = false this.visible = false
this.$emit('getCurDepartment', val) this.$emit('getCurDepartment', val)
}, },
// 选择企微门店
select(val) { select(val) {
console.log(val) console.log(val)
// this.searchKey = { // this.searchKey = {
...@@ -126,18 +195,37 @@ export default { ...@@ -126,18 +195,37 @@ export default {
this.searchKey.departmentName = val.first.departmentName this.searchKey.departmentName = val.first.departmentName
this.$emit('getCurDepartment', val.first) this.$emit('getCurDepartment', val.first)
}, },
// 选择商户账户
selectMerchant(val) {
console.log(val)
this.searchKey.id = val.first.merchantId + ''
this.searchKey.departmentName = val.first.merchantName
this.$emit('getCurMerchant', val.first)
},
// 输入框失去焦点调用
handleBlur() { handleBlur() {
console.log(11111)
// this.searchKey.departmentName = ''
this.visible = false this.visible = false
// this.searchKey = {} // this.searchKey = {}
this.searchList = [] // this.searchList = []
},
handleFocus() {
this.getSearchList(this.searchKey.departmentName)
if (this.searchList.length) this.visible = true
}, },
// handleFocus() {
// console.log(this.name)
// if (this.name === 'merchant') {
// this.getMerchantSearchList()
// return
// }
// this.getSearchList(this.searchKey.departmentName)
// },
load() { load() {
// this.searchList.push(`Aaaaa${this.count++}`) // this.searchList.push(`Aaaaa${this.count++}`)
this.pageParams.pageNum++
if (this.searchList.length < this.count) { if (this.searchList.length < this.count) {
if (this.name === 'merchant') {
this.getMerchantSearchList()
return
}
this.getSearchList(this.searchValue) this.getSearchList(this.searchValue)
} }
} }
...@@ -198,5 +286,6 @@ export default { ...@@ -198,5 +286,6 @@ export default {
<style> <style>
.search-popper { .search-popper {
padding: 0 !important; padding: 0 !important;
height: 220px;
} }
</style> </style>
...@@ -14,13 +14,14 @@ ...@@ -14,13 +14,14 @@
</div> </div>
<div class="select_wrapper"> <div class="select_wrapper">
<div class="label">商户账户</div> <div class="label">商户账户</div>
<el-cascader ref="cascaderRef1" placeholder="请选择商户/门店" @change="getCurMerchant" :show-all-levels="false" v-model="shopName" :props="mypropParam1" :options="shopList" size="small" style="width: 320px" separator=" " filterable> <SearchSelect @getCurMerchant="getCurMerchant" @getCurMerchantData="getCurMerchantData" :name="componentsName"></SearchSelect>
<!-- <el-cascader ref="cascaderRef1" placeholder="请选择商户/门店" @change="getCurMerchant" :show-all-levels="false" v-model="shopName" :props="mypropParam1" :options="shopList" size="small" style="width: 320px" separator=" " filterable>
<template slot-scope="{ data }"> <template slot-scope="{ data }">
<el-tooltip popper-class="myToolTipClass" style="border: none" :disabled="data.label.length > 12 ? false : true" class="item" effect="light" :content="data.label" placement="top-end"> <el-tooltip popper-class="myToolTipClass" style="border: none" :disabled="data.label.length > 12 ? false : true" class="item" effect="light" :content="data.label" placement="top-end">
<div class="limitText" style="width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis">{{ data.label }}</div> <div class="limitText" style="width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis">{{ data.label }}</div>
</el-tooltip> </el-tooltip>
</template> </template>
</el-cascader> </el-cascader> -->
</div> </div>
</div> </div>
<div class="icon_wrap"> <div class="icon_wrap">
...@@ -35,7 +36,7 @@ ...@@ -35,7 +36,7 @@
</div> </div>
<div class="select_wrapper"> <div class="select_wrapper">
<div class="label">企业微信</div> <div class="label">企业微信</div>
<SearchSelect @getCurDepartment="getCurDepartment"></SearchSelect> <SearchSelect @getCurDepartment="getCurDepartment" :name="componentsName1"></SearchSelect>
<!-- <el-cascader ref="cascaderRef" @change="getCurDepartment" placeholder="请选择企微门店" :show-all-levels="false" v-model="selectedDepartment" :props="mypropsParam" :options="departmentList" size="small" style="width: 320px" separator=" " filterable> <!-- <el-cascader ref="cascaderRef" @change="getCurDepartment" placeholder="请选择企微门店" :show-all-levels="false" v-model="selectedDepartment" :props="mypropsParam" :options="departmentList" size="small" style="width: 320px" separator=" " filterable>
<template slot-scope="{ data }"> <template slot-scope="{ data }">
<el-tooltip popper-class="myToolTipClass" style="border: none" :disabled="data.departmentName.length > 12 ? false : true" class="item" effect="light" :content="data.departmentName" placement="top-end"> <el-tooltip popper-class="myToolTipClass" style="border: none" :disabled="data.departmentName.length > 12 ? false : true" class="item" effect="light" :content="data.departmentName" placement="top-end">
...@@ -119,6 +120,8 @@ export default { ...@@ -119,6 +120,8 @@ export default {
}, },
data() { data() {
return { return {
componentsName: 'merchant',
componentsName1: 'department',
departmentList: [], departmentList: [],
shopList: [], shopList: [],
qwShop: '', qwShop: '',
...@@ -166,20 +169,33 @@ export default { ...@@ -166,20 +169,33 @@ export default {
}, },
// 获取当前选择的商户 // 获取当前选择的商户
getCurMerchant(val) { getCurMerchant(val) {
let id = val[val.length - 1] console.log(val, '---')
let labels = this.$refs.cascaderRef1.getCheckedNodes()[0].pathLabels this.curTempMerchant = {
let curLabel = labels[labels.length - 1] merchantId: val.merchantId,
merchantName: val.merchantName
}
// let id = val[val.length - 1]
// let labels = this.$refs.cascaderRef1.getCheckedNodes()[0].pathLabels
// let curLabel = labels[labels.length - 1]
// this.curTempMerchant = {
// merchantId: id,
// merchantName: curLabel
// }
// this.$refs.cascaderRef1.dropDownVisible = false
},
getCurMerchantData(val) {
console.log(val, '---')
this.curTempMerchant = { this.curTempMerchant = {
merchantId: id, merchantId: val.id,
merchantName: curLabel merchantName: val.merchantName
} }
this.$refs.cascaderRef1.dropDownVisible = false console.log(this.curTempMerchant)
}, },
// 获取当前选择的部门 // 获取当前选择的部门
getCurDepartment(val) { getCurDepartment(val) {
console.log(val, '---') console.log(val, '---')
this.tempDepart = { this.tempDepart = {
departmentId: val.departmentId, departmentId: val.id,
departmentName: val.departmentName departmentName: val.departmentName
} }
// let ids = val[val.length - 1] // let ids = val[val.length - 1]
...@@ -203,6 +219,7 @@ export default { ...@@ -203,6 +219,7 @@ export default {
}, },
// 关联当前选择的 // 关联当前选择的
handlerGL() { handlerGL() {
console.log(this.curTempMerchant)
if (!this.curTempMerchant) { if (!this.curTempMerchant) {
this.$message({ this.$message({
message: '请选择门店/商户', message: '请选择门店/商户',
...@@ -285,7 +302,7 @@ export default { ...@@ -285,7 +302,7 @@ export default {
}) })
let all = [...arrpara1, ...arrpara2, ...arrpara3] let all = [...arrpara1, ...arrpara2, ...arrpara3]
let para = Object.assign({}, ...all) let para = Object.assign({}, ...all)
console.log(para)
this.$confirm(' 请确认是否关联当前信息?', '提示', { this.$confirm(' 请确认是否关联当前信息?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -322,12 +339,7 @@ export default { ...@@ -322,12 +339,7 @@ export default {
message: '删除成功!' message: '删除成功!'
}) })
}) })
.catch(() => { .catch(() => {})
// this.$message({
// type: 'info',
// message: '已取消删除'
// })
})
}, },
// 递归:处理层级数组 // 递归:处理层级数组
traverse(type, arr, string1, string2, arr1 = []) { traverse(type, arr, string1, string2, arr1 = []) {
...@@ -348,8 +360,8 @@ export default { ...@@ -348,8 +360,8 @@ export default {
}, },
created() { created() {
this.getDepartmentList() // this.getDepartmentList()
this.getMerchantList() // this.getMerchantList()
} }
} }
</script> </script>
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
<div class="table-btn"> <div class="table-btn">
<!-- <el-button @click="handleExport" :size="size" type="primary" plain mode="el-button">导出</el-button> --> <!-- <el-button @click="handleExport" :size="size" type="primary" plain mode="el-button">导出</el-button> -->
<GLButton @click="handleExport" fn="导出" :size="size" type="primary" plain mode="el-button">导出</GLButton> <GLButton @click="handleExport" fn="导出" :size="size" type="primary" plain mode="el-button">导出</GLButton>
<el-button v-if="$globalState.session.accountLevel == 4 || $globalState.session.isMerchantStaffAdmin" :size="size" plain @click="batch(1)">批量分配角色</el-button> <el-button v-if="($globalState.session.userType == 1 && $globalState.session.accountLevel == 4) || ($globalState.session.userType == 2 && $globalState.session.isMerchantStaffAdmin)" :size="size" plain @click="batch(1)">批量分配角色</el-button>
<el-button v-if="$globalState.session.accountLevel == 4 || $globalState.session.isMerchantStaffAdmin" :size="size" plain @click="batch(2)">批量启用</el-button> <el-button v-if="($globalState.session.userType == 1 && $globalState.session.accountLevel == 4) || ($globalState.session.userType == 2 && $globalState.session.isMerchantStaffAdmin)" :size="size" plain @click="batch(2)">批量启用</el-button>
</div> </div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="$globalState.session.accountLevel == 4 || $globalState.session.isMerchantStaffAdmin ? tableParams1 : tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @paginationlisteners="paginationlisteners"> <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="($globalState.session.userType == 1 && $globalState.session.accountLevel == 4) || ($globalState.session.userType == 2 && $globalState.session.isMerchantStaffAdmin) ? tableParams1 : tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="optionBtns" slot-scope="scope"> <div slot="optionBtns" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope.scope"></GLTableButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope.scope"></GLTableButton>
<!-- <el-button type="text" @click="handleDetail(scope.scope)">查看</el-button> <!-- <el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
...@@ -536,7 +536,7 @@ export default { ...@@ -536,7 +536,7 @@ export default {
return this.$message.error('您未选中需要批量操作的员工。') return this.$message.error('您未选中需要批量操作的员工。')
} }
if (name == '角色') { if (name == '角色') {
const hasRole = selectArr.some(item => item.statusName == '启用') const hasRole = selectArr.some(item => item.roleName)
if (hasRole) { if (hasRole) {
this.$confirm(`您选中的员工中包含已设置 “角色” 账号。请去除选中已设置 “角色” 员工账号。`, '', { this.$confirm(`您选中的员工中包含已设置 “角色” 账号。请去除选中已设置 “角色” 员工账号。`, '', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -616,10 +616,6 @@ export default { ...@@ -616,10 +616,6 @@ export default {
this.roleVisible = false this.roleVisible = false
this.roleForm = {} this.roleForm = {}
this.$refs.roleForm.resetFields() this.$refs.roleForm.resetFields()
},
// 表格分页穿透事件
paginationlisteners(val) {
console.log(val)
} }
} }
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="header-text">跟进专员列表</div> <div class="header-text">跟进专员列表</div>
<div class="table-btn"> <div class="table-btn">
<GLButton fn="新增" size="small" type="primary" plain @click="openDrawer">跟进专员</GLButton> <GLButton fn="新增" size="small" type="primary" plain @click="openDrawer">跟进专员</GLButton>
<el-button size="small" type="primary" plain @click="openDrawer">跟进专员</el-button> <!-- <el-button size="small" type="primary" plain @click="openDrawer">跟进专员</el-button> -->
</div> </div>
</div> </div>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch"> <GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!