|
|
@ -21,37 +21,20 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div style="height: 504px; max-height: 504px; overflow: auto"> |
|
|
|
<div style="height: 504px; max-height: 504px; overflow: auto"> |
|
|
|
<el-tree |
|
|
|
<el-tree :data="orgList" default-expand-all ref="orgTree" node-key="id" highlight-current |
|
|
|
:data="orgList" |
|
|
|
:expand-on-click-node="false" @node-click="handleNodeClick" |
|
|
|
default-expand-all |
|
|
|
:props="{ children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf' }"> |
|
|
|
ref="orgTree" |
|
|
|
|
|
|
|
node-key="id" |
|
|
|
|
|
|
|
highlight-current |
|
|
|
|
|
|
|
:expand-on-click-node="false" |
|
|
|
|
|
|
|
@node-click="handleNodeClick" |
|
|
|
|
|
|
|
:props="{children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf'}" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
|
<span class="org-name">{{ node.label }}</span> |
|
|
|
<span class="org-name">{{ node.label }}</span> |
|
|
|
<span> |
|
|
|
<span> |
|
|
|
<!-- isTeam 0: 分类,1: 团队 --> |
|
|
|
<!-- isTeam 0: 分类,1: 团队 --> |
|
|
|
<el-button |
|
|
|
<el-button v-auth="'/parner:账号管理:添加分类'" v-if="!data.isTeam" type="text" |
|
|
|
v-auth="'/parner:账号管理:添加分类'" |
|
|
|
icon="el-icon-circle-plus-outline" @click="() => addOrg(node, data)"> |
|
|
|
v-if="!data.isTeam" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
icon="el-icon-circle-plus-outline" |
|
|
|
|
|
|
|
@click="() => addOrg(node, data)"> |
|
|
|
|
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
<el-button v-auth="'/parner:账号管理:编辑分类'" type="text" icon="el-icon-edit-outline" |
|
|
|
v-auth="'/parner:账号管理:编辑分类'" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
icon="el-icon-edit-outline" |
|
|
|
|
|
|
|
@click="() => editOrg(node, data)"> |
|
|
|
@click="() => editOrg(node, data)"> |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
<el-button v-auth="'/parner:账号管理:删除分类'" type="text" icon="el-icon-delete" |
|
|
|
v-auth="'/parner:账号管理:删除分类'" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
|
|
|
@click="() => delOrg(node, data)"> |
|
|
|
@click="() => delOrg(node, data)"> |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
@ -60,27 +43,16 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog |
|
|
|
<el-dialog :title="typeForm.id ? '编辑' : '新增' + '分类'" :visible.sync="orgVisible" :close-on-click-modal="false" |
|
|
|
:title="typeForm.id ? '编辑' : '新增' + '分类'" |
|
|
|
width="50%" @close="closeType"> |
|
|
|
:visible.sync="orgVisible" |
|
|
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
|
|
width="50%" |
|
|
|
|
|
|
|
@close="closeType" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-form v-if="orgVisible" ref="typeForm" :model="typeForm" :rules="orgRules" label-width="100px"> |
|
|
|
<el-form v-if="orgVisible" ref="typeForm" :model="typeForm" :rules="orgRules" label-width="100px"> |
|
|
|
<el-form-item label="分类名称" prop="partnerClassificationName"> |
|
|
|
<el-form-item label="分类名称" prop="partnerClassificationName"> |
|
|
|
<el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input> |
|
|
|
<el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="上级部门"> |
|
|
|
<el-form-item label="上级部门"> |
|
|
|
<span v-if="typeForm.parentName">{{ typeForm.parentName }}</span> |
|
|
|
<span v-if="typeForm.parentName">{{ typeForm.parentName }}</span> |
|
|
|
<el-cascader |
|
|
|
<el-cascader v-else :options="orgListDia" v-model="cascaderValue" :props="cascaderProps" clearable |
|
|
|
v-else |
|
|
|
style="width: 100%"> |
|
|
|
:options="orgListDia" |
|
|
|
|
|
|
|
v-model="cascaderValue" |
|
|
|
|
|
|
|
:props="cascaderProps" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
</el-cascader> |
|
|
|
</el-cascader> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
@ -96,7 +68,8 @@ |
|
|
|
<div class="tool"> |
|
|
|
<div class="tool"> |
|
|
|
<ul class="filter"> |
|
|
|
<ul class="filter"> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord" clearable></el-input> |
|
|
|
<el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord" |
|
|
|
|
|
|
|
clearable></el-input> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
<div> |
|
|
|
<div> |
|
|
@ -104,22 +77,25 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> |
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange" row-key="id"> |
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> |
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> |
|
|
|
<el-table-column prop="userName" label="姓名" align="center" min-width="100"></el-table-column> |
|
|
|
<el-table-column prop="userName" label="姓名" align="center" min-width="100"></el-table-column> |
|
|
|
<el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column> |
|
|
|
<el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column> |
|
|
|
<el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column> |
|
|
|
<el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column> |
|
|
|
<el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column> |
|
|
|
<el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column> |
|
|
|
<el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="120" show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="120" |
|
|
|
|
|
|
|
show-overflow-tooltip></el-table-column> |
|
|
|
<template v-if="!type"> |
|
|
|
<template v-if="!type"> |
|
|
|
<el-table-column prop="provinceName" label="省份" align="center" min-width="80"></el-table-column> |
|
|
|
<el-table-column prop="provinceName" label="省份" align="center" min-width="80"></el-table-column> |
|
|
|
<el-table-column prop="cityName" label="城市" align="center" min-width="80"></el-table-column> |
|
|
|
<el-table-column prop="cityName" label="城市" align="center" min-width="80"></el-table-column> |
|
|
|
<el-table-column prop="roleName" label="授权角色" align="center" min-width="120" show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="roleName" label="授权角色" align="center" min-width="120" |
|
|
|
|
|
|
|
show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="phone" label="费率" align="center" min-width="120"> |
|
|
|
<el-table-column prop="phone" label="费率" align="center" min-width="120"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<p v-if="scope.row.annualTeamFee">团队年费{{ scope.row.annualTeamFee}}w</p> |
|
|
|
<p v-if="scope.row.annualTeamFee">团队年费{{ scope.row.annualTeamFee }}w</p> |
|
|
|
<p v-if="scope.row.annualMarketingFee">市场服务年费{{ scope.row.annualMarketingFee}}%</p> |
|
|
|
<p v-if="scope.row.annualMarketingFee">市场服务年费{{ scope.row.annualMarketingFee }}%</p> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -130,16 +106,20 @@ |
|
|
|
<el-button v-if="!type" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button> |
|
|
|
<el-button v-if="!type" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button> |
|
|
|
<el-button type="text" v-auth="'/parner:账号管理:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button> |
|
|
|
<el-button type="text" v-auth="'/parner:账号管理:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button> |
|
|
|
<el-button v-if="type" type="text" v-auth="'/parner:账号管理:删除合伙人'" @click="del(scope.row)">删除</el-button> |
|
|
|
<el-button v-if="type" type="text" v-auth="'/parner:账号管理:删除合伙人'" @click="del(scope.row)">删除</el-button> |
|
|
|
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'" @click="transfer(scope.row)">转让超管</el-button> |
|
|
|
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'" |
|
|
|
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'" @click="remove(scope.row)">移除</el-button> |
|
|
|
@click="transfer(scope.row)">转让超管</el-button> |
|
|
|
|
|
|
|
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'" |
|
|
|
|
|
|
|
@click="remove(scope.row)">移除</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
<div class="pagination"> |
|
|
|
<div class="pagination"> |
|
|
|
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> |
|
|
|
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" |
|
|
|
|
|
|
|
:total="total"></el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="添加城市合伙人" :visible.sync="parnerVisible" width="580px" custom-class="add-dia" :close-on-click-modal="false" @close="closeAdd"> |
|
|
|
<el-dialog title="添加城市合伙人" :visible.sync="parnerVisible" width="580px" custom-class="add-dia" |
|
|
|
|
|
|
|
:close-on-click-modal="false" @close="closeAdd"> |
|
|
|
<p class="tips">链接/二维码失效时间:{{ expireTime }}</p> |
|
|
|
<p class="tips">链接/二维码失效时间:{{ expireTime }}</p> |
|
|
|
<p class="title">城市合伙人 <em>邀请链接</em></p> |
|
|
|
<p class="title">城市合伙人 <em>邀请链接</em></p> |
|
|
|
<p class="des">加盟商、合作伙伴可以通过这个链接加入 <em>城市合伙人计划</em></p> |
|
|
|
<p class="des">加盟商、合作伙伴可以通过这个链接加入 <em>城市合伙人计划</em></p> |
|
|
@ -152,21 +132,24 @@ |
|
|
|
<img width="250" :src="qrcode" alt=""> |
|
|
|
<img width="250" :src="qrcode" alt=""> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="转让管理员" :visible.sync="transferVisible" width="350px" custom-class="transfer-dia" :close-on-click-modal="false"> |
|
|
|
<el-dialog title="转让管理员" :visible.sync="transferVisible" width="350px" custom-class="transfer-dia" |
|
|
|
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
<div style="text-align: center"> |
|
|
|
<div style="text-align: center"> |
|
|
|
<el-button type="primary" @click="showChoose">转给团队成员</el-button> |
|
|
|
<el-button type="primary" @click="showChoose">转给团队成员</el-button> |
|
|
|
<el-button @click="add(1)">邀请外部人员</el-button> |
|
|
|
<el-button @click="add(1)">邀请外部人员</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="请选择要转让的团队成员" :visible.sync="chooseVisible" width="300px" custom-class="choose-dia" :close-on-click-modal="false"> |
|
|
|
<el-dialog title="请选择要转让的团队成员" :visible.sync="chooseVisible" width="300px" custom-class="choose-dia" |
|
|
|
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
<ul class="member-list"> |
|
|
|
<ul class="member-list"> |
|
|
|
<li v-for="(item, i) in members" :key="i"> |
|
|
|
<li v-for="(item, i) in members" :key="i"> |
|
|
|
<div class="info"> |
|
|
|
<div class="info"> |
|
|
|
<img src="@/assets/img/avatar.png" alt=""> |
|
|
|
<img src="@/assets/img/avatar.png" alt=""> |
|
|
|
<span class="name">{{ item.userName }}</span> |
|
|
|
<span class="name">{{ item.userName }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-radio v-model="choosePartnerId" :label="item.partnerId" :disabled="curRow.accountId === item.accountId"></el-radio> |
|
|
|
<el-radio v-model="choosePartnerId" :label="item.partnerId" |
|
|
|
|
|
|
|
:disabled="curRow.accountId === item.accountId"></el-radio> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
@ -184,22 +167,22 @@ |
|
|
|
<el-select class="w-100" v-model="form.roleList" multiple> |
|
|
|
<el-select class="w-100" v-model="form.roleList" multiple> |
|
|
|
<template v-for="item in roleList"> |
|
|
|
<template v-for="item in roleList"> |
|
|
|
<!-- 不显示超管 --> |
|
|
|
<!-- 不显示超管 --> |
|
|
|
<el-option |
|
|
|
<el-option :key="item.id" :label="item.roleName" :value="item.id"> |
|
|
|
:key="item.id" |
|
|
|
|
|
|
|
:label="item.roleName" |
|
|
|
|
|
|
|
:value="item.id"> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
</el-option> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="provinceId" label="省份"> |
|
|
|
<el-form-item prop="provinceId" label="省份"> |
|
|
|
<el-select style="width: 100%" v-model="form.provinceId" placeholder="请选择省份" @change="getCity"> |
|
|
|
<el-select style="width: 100%" v-model="form.provinceId" placeholder="请选择省份" @change="getCity"> |
|
|
|
<el-option v-for="(item,index) in provinces" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> |
|
|
|
<el-option v-for="(item, index) in provinces" :key="index" :label="item.provinceName" |
|
|
|
|
|
|
|
:value="item.provinceId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="cityId" label="城市"> |
|
|
|
<el-form-item prop="cityId" label="城市"> |
|
|
|
<el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市" :disabled="form.provinceId ? false : true"> |
|
|
|
<el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市" |
|
|
|
<el-option v-for="(item,index) in cities" :key="index" :label="item.cityName" :value="item.cityId"></el-option> |
|
|
|
:disabled="form.provinceId ? false : true"> |
|
|
|
|
|
|
|
<el-option v-for="(item, index) in cities" :key="index" :label="item.cityName" |
|
|
|
|
|
|
|
:value="item.cityId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
@ -220,7 +203,7 @@ import clipboard from '@/libs/clipboard' |
|
|
|
import axios from 'axios' |
|
|
|
import axios from 'axios' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { OrgTree }, |
|
|
|
components: { OrgTree }, |
|
|
|
data() { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
accountId: this.$store.state.accountId, |
|
|
|
accountId: this.$store.state.accountId, |
|
|
|
userName: this.$store.state.userName, |
|
|
|
userName: this.$store.state.userName, |
|
|
@ -299,19 +282,19 @@ export default { |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
keyWord: function(val) { |
|
|
|
keyWord: function (val) { |
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
this.searchTimer = setTimeout(this.initData, 500); |
|
|
|
this.searchTimer = setTimeout(this.initData, 500); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted () { |
|
|
|
this.getOrg() |
|
|
|
this.getOrg() |
|
|
|
this.getProvince() |
|
|
|
this.getProvince() |
|
|
|
this.getRole() |
|
|
|
this.getRole() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 获取组织 |
|
|
|
// 获取组织 |
|
|
|
async getOrg() { |
|
|
|
async getOrg () { |
|
|
|
const res = await this.$post(this.api.listParner) |
|
|
|
const res = await this.$post(this.api.listParner) |
|
|
|
const list = res.treeList |
|
|
|
const list = res.treeList |
|
|
|
// 没有子级,删除children属性 |
|
|
|
// 没有子级,删除children属性 |
|
|
@ -338,13 +321,13 @@ export default { |
|
|
|
this.getList() |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 类型回调 |
|
|
|
// 类型回调 |
|
|
|
typeChange() { |
|
|
|
typeChange () { |
|
|
|
this.$refs.orgTree.setCurrentKey(null) |
|
|
|
this.$refs.orgTree.setCurrentKey(null) |
|
|
|
this.curTeamId = '' |
|
|
|
this.curTeamId = '' |
|
|
|
this.initData() |
|
|
|
this.initData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 添加部门 |
|
|
|
// 添加部门 |
|
|
|
addOrg(node, data) { |
|
|
|
addOrg (node, data) { |
|
|
|
const list = JSON.parse(JSON.stringify(this.orgList)) |
|
|
|
const list = JSON.parse(JSON.stringify(this.orgList)) |
|
|
|
this.handleOrg(list) |
|
|
|
this.handleOrg(list) |
|
|
|
this.orgListDia = list |
|
|
|
this.orgListDia = list |
|
|
@ -359,7 +342,7 @@ export default { |
|
|
|
this.orgVisible = true |
|
|
|
this.orgVisible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 编辑部门 |
|
|
|
// 编辑部门 |
|
|
|
editOrg(node, data) { |
|
|
|
editOrg (node, data) { |
|
|
|
const list = JSON.parse(JSON.stringify(this.orgList)) |
|
|
|
const list = JSON.parse(JSON.stringify(this.orgList)) |
|
|
|
this.handleOrg(list) |
|
|
|
this.handleOrg(list) |
|
|
|
this.orgListDia = list |
|
|
|
this.orgListDia = list |
|
|
@ -374,14 +357,14 @@ export default { |
|
|
|
this.cascaderValue = ids |
|
|
|
this.cascaderValue = ids |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 关闭分类弹框 |
|
|
|
// 关闭分类弹框 |
|
|
|
closeType() { |
|
|
|
closeType () { |
|
|
|
this.typeForm = { |
|
|
|
this.typeForm = { |
|
|
|
id: '', |
|
|
|
id: '', |
|
|
|
partnerClassificationName: '' |
|
|
|
partnerClassificationName: '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 处理更换部门的禁选 |
|
|
|
// 处理更换部门的禁选 |
|
|
|
handleOrg(list) { |
|
|
|
handleOrg (list) { |
|
|
|
for (const i in list) { |
|
|
|
for (const i in list) { |
|
|
|
const e = list[i] |
|
|
|
const e = list[i] |
|
|
|
// 如果是团队,则禁选 |
|
|
|
// 如果是团队,则禁选 |
|
|
@ -393,18 +376,18 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 删除部门 |
|
|
|
// 删除部门 |
|
|
|
delOrg(node, data) { |
|
|
|
delOrg (node, data) { |
|
|
|
this.$confirm(data.isTeam ? '确定删除该城市合伙人?删除后,该团队同步解散,且不可恢复!' : '确定要删除吗?', "提示", { |
|
|
|
this.$confirm(data.isTeam ? '确定删除该城市合伙人?删除后,该团队同步解散,且不可恢复!' : '确定要删除吗?', "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
this.$post(`${this.api.deleteParner}?id=${data.id}`).then(res => { |
|
|
|
this.$post(`${this.api.deleteParner}?id=${data.id}`).then(res => { |
|
|
|
util.successMsg("删除成功") |
|
|
|
util.successMsg("删除成功") |
|
|
|
this.getOrg() |
|
|
|
this.getOrg() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 提交组织架构新增/编辑 |
|
|
|
// 提交组织架构新增/编辑 |
|
|
|
orgSubmit() { |
|
|
|
orgSubmit () { |
|
|
|
this.$refs.typeForm.validate((valid) => { |
|
|
|
this.$refs.typeForm.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
const form = this.typeForm |
|
|
|
const form = this.typeForm |
|
|
@ -419,20 +402,20 @@ export default { |
|
|
|
this.$post(this.api.saveParner, form).then(res => { |
|
|
|
this.$post(this.api.saveParner, form).then(res => { |
|
|
|
util.successMsg("新增成功!") |
|
|
|
util.successMsg("新增成功!") |
|
|
|
this.closeOrg() |
|
|
|
this.closeOrg() |
|
|
|
}).catch(err => {}) |
|
|
|
}).catch(err => { }) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 编辑 |
|
|
|
// 编辑 |
|
|
|
this.$post(this.api.updateParner, form).then(res => { |
|
|
|
this.$post(this.api.updateParner, form).then(res => { |
|
|
|
util.successMsg("编辑成功!") |
|
|
|
util.successMsg("编辑成功!") |
|
|
|
this.setKey = form.id |
|
|
|
this.setKey = form.id |
|
|
|
this.closeOrg() |
|
|
|
this.closeOrg() |
|
|
|
}).catch(err => {}) |
|
|
|
}).catch(err => { }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获得点击层级里的第一个城市合伙人id |
|
|
|
// 获得点击层级里的第一个城市合伙人id |
|
|
|
getTeamId(list) { |
|
|
|
getTeamId (list) { |
|
|
|
for (const i in list) { |
|
|
|
for (const i in list) { |
|
|
|
const e = list[i] |
|
|
|
const e = list[i] |
|
|
|
if (e.isTeam && !this.curTeamId) { |
|
|
|
if (e.isTeam && !this.curTeamId) { |
|
|
@ -444,7 +427,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 点击树节点查询列表数据 |
|
|
|
// 点击树节点查询列表数据 |
|
|
|
handleNodeClick(data) { |
|
|
|
handleNodeClick (data) { |
|
|
|
this.type = '' |
|
|
|
this.type = '' |
|
|
|
this.curTeamId = '' |
|
|
|
this.curTeamId = '' |
|
|
|
if (data.isTeam) { |
|
|
|
if (data.isTeam) { |
|
|
@ -457,18 +440,18 @@ export default { |
|
|
|
this.$refs.table.clearSelection() |
|
|
|
this.$refs.table.clearSelection() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 关闭组织新增编辑弹框 |
|
|
|
// 关闭组织新增编辑弹框 |
|
|
|
closeOrg() { |
|
|
|
closeOrg () { |
|
|
|
this.orgVisible = false |
|
|
|
this.orgVisible = false |
|
|
|
this.cascaderValue = [] |
|
|
|
this.cascaderValue = [] |
|
|
|
this.getOrg() |
|
|
|
this.getOrg() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 查询全部 |
|
|
|
// 查询全部 |
|
|
|
getAll() { |
|
|
|
getAll () { |
|
|
|
this.curTeamId = '' |
|
|
|
this.curTeamId = '' |
|
|
|
this.getList() |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 员工列表 |
|
|
|
// 员工列表 |
|
|
|
getList() { |
|
|
|
getList () { |
|
|
|
this.$post(this.api[this.type ? 'partnerAccountMergeList' : 'partnerAccountList'], { |
|
|
|
this.$post(this.api[this.type ? 'partnerAccountMergeList' : 'partnerAccountList'], { |
|
|
|
type: this.type || 1, |
|
|
|
type: this.type || 1, |
|
|
|
partnerClassificationId: this.curTeamId, |
|
|
|
partnerClassificationId: this.curTeamId, |
|
|
@ -483,49 +466,49 @@ export default { |
|
|
|
console.log("🚀 ~ file: staff.vue:479 ~ getList ~ this.listData:", this.listData) |
|
|
|
console.log("🚀 ~ file: staff.vue:479 ~ getList ~ this.listData:", this.listData) |
|
|
|
|
|
|
|
|
|
|
|
this.total = pageList.total |
|
|
|
this.total = pageList.total |
|
|
|
}).catch(err => {}) |
|
|
|
}).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 切换页码 |
|
|
|
// 切换页码 |
|
|
|
currentChange(val) { |
|
|
|
currentChange (val) { |
|
|
|
this.page = val |
|
|
|
this.page = val |
|
|
|
this.getList() |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleSelectionChange(val) { // 多选 |
|
|
|
handleSelectionChange (val) { // 多选 |
|
|
|
this.multipleSelection = val |
|
|
|
this.multipleSelection = val |
|
|
|
}, |
|
|
|
}, |
|
|
|
initData() { |
|
|
|
initData () { |
|
|
|
this.$refs.table.clearSelection() |
|
|
|
this.$refs.table.clearSelection() |
|
|
|
this.page = 1 |
|
|
|
this.page = 1 |
|
|
|
this.getList() |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取省份 |
|
|
|
// 获取省份 |
|
|
|
getProvince(){ |
|
|
|
getProvince () { |
|
|
|
this.$get(this.api.queryProvince).then(res => { |
|
|
|
this.$get(this.api.queryProvince).then(res => { |
|
|
|
this.provinces = res.list |
|
|
|
this.provinces = res.list |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取城市 |
|
|
|
// 获取城市 |
|
|
|
getCity(val){ |
|
|
|
getCity (val) { |
|
|
|
this.$get(this.api.queryCity,{ |
|
|
|
this.$get(this.api.queryCity, { |
|
|
|
provinceId: this.form.provinceId |
|
|
|
provinceId: this.form.provinceId |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
this.cities = res.list |
|
|
|
this.cities = res.list |
|
|
|
if (val) this.form.cityId = '' |
|
|
|
if (val) this.form.cityId = '' |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 删除 |
|
|
|
// 删除 |
|
|
|
del(row) { |
|
|
|
del (row) { |
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
this.$post(`${this.api.delPartnerAccount}?accountId=${row.accountId}`).then(res => { |
|
|
|
this.$post(`${this.api.delPartnerAccount}?accountId=${row.accountId}`).then(res => { |
|
|
|
util.successMsg("删除成功") |
|
|
|
util.successMsg("删除成功") |
|
|
|
this.getList() |
|
|
|
this.getList() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 移除 |
|
|
|
// 移除 |
|
|
|
remove(row) { |
|
|
|
remove (row) { |
|
|
|
this.$confirm("确定要移除吗?", "提示", { |
|
|
|
this.$confirm("确定要移除吗?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
@ -535,22 +518,22 @@ export default { |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
util.successMsg("移除成功") |
|
|
|
util.successMsg("移除成功") |
|
|
|
this.getList() |
|
|
|
this.getList() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 转让超管 |
|
|
|
// 转让超管 |
|
|
|
transfer(row) { |
|
|
|
transfer (row) { |
|
|
|
this.curRow = row |
|
|
|
this.curRow = row |
|
|
|
this.transferVisible = true |
|
|
|
this.transferVisible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
getRole() { |
|
|
|
getRole () { |
|
|
|
// platformId 合伙人为4,具体看setting.js;port: pc端为0、小程序端为1 |
|
|
|
// platformId 合伙人为4,具体看setting.js;port: pc端为0、小程序端为1 |
|
|
|
this.$get(`${this.api.roleList}?page=1&size=10000&platformId=4&port=1&name=`).then(res => { |
|
|
|
this.$get(`${this.api.roleList}?page=1&size=10000&platformId=4&port=1&name=`).then(res => { |
|
|
|
this.roleList = res.rolePage.records; |
|
|
|
this.roleList = res.rolePage.records; |
|
|
|
}).catch(res => {}); |
|
|
|
}).catch(res => { }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 编辑 |
|
|
|
// 编辑 |
|
|
|
edit(row) { |
|
|
|
edit (row) { |
|
|
|
if (!row.provinceId) row.provinceId = '' |
|
|
|
if (!row.provinceId) row.provinceId = '' |
|
|
|
if (!row.cityId) row.cityId = '' |
|
|
|
if (!row.cityId) row.cityId = '' |
|
|
|
row.roleList = row.roleId.split(',').map(e => +e) |
|
|
|
row.roleList = row.roleId.split(',').map(e => +e) |
|
|
@ -559,7 +542,7 @@ export default { |
|
|
|
row.cityId && this.getCity() |
|
|
|
row.cityId && this.getCity() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 编辑提交 |
|
|
|
// 编辑提交 |
|
|
|
submitEdit() { |
|
|
|
submitEdit () { |
|
|
|
this.$refs.form.validate((valid) => { |
|
|
|
this.$refs.form.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
if (this.submiting) return false |
|
|
|
if (this.submiting) return false |
|
|
@ -582,16 +565,16 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 重置密码 |
|
|
|
// 重置密码 |
|
|
|
resetPassword(row) { |
|
|
|
resetPassword (row) { |
|
|
|
const newPwd = Setting.initialPassword |
|
|
|
const newPwd = Setting.initialPassword |
|
|
|
this.$confirm(`重置后的密码为:${newPwd},确定重置?`, "提示", { type: "warning" }).then(() => { |
|
|
|
this.$confirm(`重置后的密码为:${newPwd},确定重置?`, "提示", { type: "warning" }).then(() => { |
|
|
|
this.$get(`${this.api.resetPwd}?userId=${row.userId}&newPwd=${newPwd}`).then(res => { |
|
|
|
this.$get(`${this.api.resetPwd}?userId=${row.userId}&newPwd=${newPwd}`).then(res => { |
|
|
|
util.successMsg("重置成功") |
|
|
|
util.successMsg("重置成功") |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 显示选择成员 |
|
|
|
// 显示选择成员 |
|
|
|
showChoose() { |
|
|
|
showChoose () { |
|
|
|
this.chooseVisible = true |
|
|
|
this.chooseVisible = true |
|
|
|
this.$post(this.api.partnerAccountList, { |
|
|
|
this.$post(this.api.partnerAccountList, { |
|
|
|
type: 1, |
|
|
|
type: 1, |
|
|
@ -601,10 +584,10 @@ export default { |
|
|
|
pageSize: 10000 |
|
|
|
pageSize: 10000 |
|
|
|
}).then(({ pageList }) => { |
|
|
|
}).then(({ pageList }) => { |
|
|
|
this.members = pageList.records |
|
|
|
this.members = pageList.records |
|
|
|
}).catch(err => {}) |
|
|
|
}).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 选择成员提交 |
|
|
|
// 选择成员提交 |
|
|
|
chooseSubmit() { |
|
|
|
chooseSubmit () { |
|
|
|
const { curRow } = this |
|
|
|
const { curRow } = this |
|
|
|
const id = this.choosePartnerId |
|
|
|
const id = this.choosePartnerId |
|
|
|
const member = this.members.find(e => e.partnerId === id) // 获取选择的成员 |
|
|
|
const member = this.members.find(e => e.partnerId === id) // 获取选择的成员 |
|
|
@ -619,13 +602,13 @@ export default { |
|
|
|
this.chooseVisible = false |
|
|
|
this.chooseVisible = false |
|
|
|
this.transferVisible = false |
|
|
|
this.transferVisible = false |
|
|
|
this.getOrg() |
|
|
|
this.getOrg() |
|
|
|
}).catch(err => {}) |
|
|
|
}).catch(err => { }) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
util.warningMsg('请选择成员!') |
|
|
|
util.warningMsg('请选择成员!') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 添加 |
|
|
|
// 添加 |
|
|
|
add(transfer) { |
|
|
|
add (transfer) { |
|
|
|
// 非转让超管,不能在团队下加团队 |
|
|
|
// 非转让超管,不能在团队下加团队 |
|
|
|
if (!transfer) { |
|
|
|
if (!transfer) { |
|
|
|
const curNode = this.$refs.orgTree.getCurrentNode() |
|
|
|
const curNode = this.$refs.orgTree.getCurrentNode() |
|
|
@ -647,14 +630,14 @@ export default { |
|
|
|
responseType: 'blob' |
|
|
|
responseType: 'blob' |
|
|
|
}).then(({ data }) => { |
|
|
|
}).then(({ data }) => { |
|
|
|
this.qrcode = window.URL.createObjectURL(data) |
|
|
|
this.qrcode = window.URL.createObjectURL(data) |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
closeAdd() { |
|
|
|
closeAdd () { |
|
|
|
this.initData() |
|
|
|
this.initData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 复制链接 |
|
|
|
// 复制链接 |
|
|
|
copy(e) { |
|
|
|
copy (e) { |
|
|
|
clipboard(this.link, e, '链接已复制!') |
|
|
|
clipboard(this.link, e, '链接已复制!') |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -665,47 +648,58 @@ export default { |
|
|
|
.m-b-20 { |
|
|
|
.m-b-20 { |
|
|
|
margin-bottom: 20px; |
|
|
|
margin-bottom: 20px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.org-name { |
|
|
|
.org-name { |
|
|
|
margin-right: 20px; |
|
|
|
margin-right: 20px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.w-100 { |
|
|
|
.w-100 { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.wrap { |
|
|
|
.wrap { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
padding: 0 24px; |
|
|
|
padding: 0 24px; |
|
|
|
|
|
|
|
|
|
|
|
.side { |
|
|
|
.side { |
|
|
|
width: 300px; |
|
|
|
width: 300px; |
|
|
|
padding: 24px 10px 24px 0; |
|
|
|
padding: 24px 10px 24px 0; |
|
|
|
margin-right: 24px; |
|
|
|
margin-right: 24px; |
|
|
|
border-right: 1px solid rgba(0, 0, 0, 0.06); |
|
|
|
border-right: 1px solid rgba(0, 0, 0, 0.06); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.right { |
|
|
|
.right { |
|
|
|
width: calc(100% - 324px); |
|
|
|
width: calc(100% - 324px); |
|
|
|
padding: 24px 0; |
|
|
|
padding: 24px 0; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.add-dia { |
|
|
|
.add-dia { |
|
|
|
.tips { |
|
|
|
.tips { |
|
|
|
font-size: 12px; |
|
|
|
font-size: 12px; |
|
|
|
color: #f00; |
|
|
|
color: #f00; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.title { |
|
|
|
.title { |
|
|
|
margin: 10px 0; |
|
|
|
margin: 10px 0; |
|
|
|
font-size: 14px; |
|
|
|
font-size: 14px; |
|
|
|
|
|
|
|
|
|
|
|
em { |
|
|
|
em { |
|
|
|
font-style: normal; |
|
|
|
font-style: normal; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.des { |
|
|
|
.des { |
|
|
|
font-size: 13px; |
|
|
|
font-size: 13px; |
|
|
|
color: #7a7a7a; |
|
|
|
color: #7a7a7a; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.link-wrap { |
|
|
|
.link-wrap { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
margin: 10px 0 20px; |
|
|
|
margin: 10px 0 20px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.link { |
|
|
|
.link { |
|
|
|
padding: 10px; |
|
|
|
padding: 10px; |
|
|
|
margin-right: 15px; |
|
|
|
margin-right: 15px; |
|
|
@ -713,6 +707,7 @@ export default { |
|
|
|
border-radius: 4px; |
|
|
|
border-radius: 4px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/.choose-dia { |
|
|
|
/deep/.choose-dia { |
|
|
|
.member-list { |
|
|
|
.member-list { |
|
|
|
li { |
|
|
|
li { |
|
|
@ -721,17 +716,21 @@ export default { |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
margin-bottom: 10px; |
|
|
|
margin-bottom: 10px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info { |
|
|
|
.info { |
|
|
|
display: inline-flex; |
|
|
|
display: inline-flex; |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
img { |
|
|
|
img { |
|
|
|
width: 40px; |
|
|
|
width: 40px; |
|
|
|
height: 40px; |
|
|
|
height: 40px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.name { |
|
|
|
.name { |
|
|
|
margin-left: 10px; |
|
|
|
margin-left: 10px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.el-radio__label { |
|
|
|
.el-radio__label { |
|
|
|
display: none; |
|
|
|
display: none; |
|
|
|
} |
|
|
|
} |
|
|
|