|
@@ -80,7 +80,8 @@ export default {
|
|
|
{ label: '手机号', prop: 'phones' },
|
|
{ label: '手机号', prop: 'phones' },
|
|
|
{ label: '注册时间', prop: 'create_at' },
|
|
{ label: '注册时间', prop: 'create_at' },
|
|
|
{ label: '禁言状态', prop: 'is_gag', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'success', '1': 'danger'} },
|
|
{ label: '禁言状态', prop: 'is_gag', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'success', '1': 'danger'} },
|
|
|
- { label: '置业经理', prop: 'is_sale', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'info', '1': 'primary'} },
|
|
|
|
|
|
|
+ { label: '销售', prop: 'is_sale', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'info', '1': 'primary'} },
|
|
|
|
|
+ { label: '渠道', prop: 'is_partner', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'info', '1': 'primary'} },
|
|
|
{ label: '备注', prop: 'tag', type: 'input', width: 100},
|
|
{ label: '备注', prop: 'tag', type: 'input', width: 100},
|
|
|
{ label: '操作', width: 260, type: 'handle2', operations:
|
|
{ label: '操作', width: 260, type: 'handle2', operations:
|
|
|
[
|
|
[
|
|
@@ -102,11 +103,23 @@ export default {
|
|
|
{ labelFor: 'is_sale', func: this.isSaleHandle,
|
|
{ labelFor: 'is_sale', func: this.isSaleHandle,
|
|
|
labelConfig: {
|
|
labelConfig: {
|
|
|
texts: {
|
|
texts: {
|
|
|
- 1: '设成用户',
|
|
|
|
|
|
|
+ 1: '销售取消',
|
|
|
2: '设成销售'
|
|
2: '设成销售'
|
|
|
},
|
|
},
|
|
|
btnTypes: {
|
|
btnTypes: {
|
|
|
- 1: 'primary',
|
|
|
|
|
|
|
+ 1: 'danger',
|
|
|
|
|
+ 2: 'info'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ { labelFor: 'is_partner', func: this.isPartnerHandle,
|
|
|
|
|
+ labelConfig: {
|
|
|
|
|
+ texts: {
|
|
|
|
|
+ 1: '渠道取消',
|
|
|
|
|
+ 2: '设成渠道'
|
|
|
|
|
+ },
|
|
|
|
|
+ btnTypes: {
|
|
|
|
|
+ 1: 'danger',
|
|
|
2: 'info'
|
|
2: 'info'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -146,9 +159,22 @@ export default {
|
|
|
this.fetchData()
|
|
this.fetchData()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ isPartnerHandle (row) {
|
|
|
|
|
+ const is_partner = Number(row.is_partner) === 1 ? 2 : 1
|
|
|
|
|
+ const msgText = Number(row.is_partner) === 1 ? '取消渠道合伙人' : '设置成渠道合伙人---'
|
|
|
|
|
+ this.$msg(`确定要${msgText}${row.nickname}吗?`, 'confirm', ()=> {
|
|
|
|
|
+ this.$api.user.admwechatuserpartner({
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ is_partner
|
|
|
|
|
+ }).then(data => {
|
|
|
|
|
+ this.$msgs(`${msgText}成功!`)
|
|
|
|
|
+ this.fetchData()
|
|
|
|
|
+ })
|
|
|
|
|
+ }, null, true)
|
|
|
|
|
+ },
|
|
|
isSaleHandle (row) {
|
|
isSaleHandle (row) {
|
|
|
const is_sale = Number(row.is_sale) === 1 ? 2 : 1
|
|
const is_sale = Number(row.is_sale) === 1 ? 2 : 1
|
|
|
- const msgText = Number(row.is_sale) === 1 ? '设置成用户' : '设置成置业经理---'
|
|
|
|
|
|
|
+ const msgText = Number(row.is_sale) === 1 ? '取消销售' : '设置成销售置业经理---'
|
|
|
this.$msg(`确定要${msgText}${row.nickname}吗?`, 'confirm', ()=> {
|
|
this.$msg(`确定要${msgText}${row.nickname}吗?`, 'confirm', ()=> {
|
|
|
this.$api.user.admwechatusersale({
|
|
this.$api.user.admwechatusersale({
|
|
|
id: row.id,
|
|
id: row.id,
|