|
|
@ -127,6 +127,15 @@ |
|
|
|
<el-input v-model="dataForm.mobile" |
|
|
|
:placeholder="$t('user.mobile')"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="staffName" |
|
|
|
label="关联网格员"> |
|
|
|
<div> |
|
|
|
<el-input style="width: 70%" v-model="dataForm.wgyInfo.staffName" readonly |
|
|
|
placeholder="绑定网格员"></el-input> |
|
|
|
<el-button type="text" @click="relationEpmetStaffUser(dataForm.mobile)">点击绑定</el-button> |
|
|
|
<el-button type="text" @click="unbindEpmetUser()">清空</el-button> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="roleIdList" |
|
|
|
:label="$t('user.roleIdList')" |
|
|
|
class="role-list"> |
|
|
@ -188,7 +197,17 @@ export default { |
|
|
|
mobile: '', |
|
|
|
roleIdList: [], |
|
|
|
status: 1, |
|
|
|
userTagKey: '' |
|
|
|
userTagKey: '', |
|
|
|
wgyInfo: { |
|
|
|
id: '', |
|
|
|
sysUserId: '', |
|
|
|
staffId: '', |
|
|
|
staffName: '', |
|
|
|
mobile: '', |
|
|
|
agencyId: '', |
|
|
|
agencyAllName: '', |
|
|
|
customerId: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
userTagDictList: [] |
|
|
|
} |
|
|
@ -269,6 +288,39 @@ export default { |
|
|
|
}) |
|
|
|
this.getUserTagDicList() |
|
|
|
}, |
|
|
|
// 根据手机号获取产品工作人员信息 |
|
|
|
relationEpmetStaffUser (mobile) { |
|
|
|
if (mobile === '') { |
|
|
|
return this.$message.warning('请先填写手机号') |
|
|
|
} |
|
|
|
this.$http.get(`/sys/sysepmetuserrelation/getstaffuser/${mobile}`).then(({ data: res }) => { |
|
|
|
this.dataForm.wgyInfo.staffId = '888' |
|
|
|
this.dataForm.wgyInfo.staffName = '888' |
|
|
|
this.dataForm.wgyInfo.mobile = '18800112088' |
|
|
|
this.dataForm.wgyInfo.agencyId = '888' |
|
|
|
this.dataForm.wgyInfo.agencyAllName = '888' |
|
|
|
this.dataForm.wgyInfo.customerId = '888' |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.dataForm.wgyInfo = { |
|
|
|
...this.dataForm.wgyInfo, |
|
|
|
...res.data |
|
|
|
} |
|
|
|
if (res.data.staffId === '') { |
|
|
|
return this.$message.warning('未匹配到当前手机号绑定网格员') |
|
|
|
} |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
// 清空已绑定的产品工作人员信息 |
|
|
|
unbindEpmetUser () { |
|
|
|
this.dataForm.wgyInfo.staffId = '' |
|
|
|
this.dataForm.wgyInfo.staffName = '' |
|
|
|
this.dataForm.wgyInfo.mobile = '' |
|
|
|
this.dataForm.wgyInfo.agencyId = '' |
|
|
|
this.dataForm.wgyInfo.agencyAllName = '' |
|
|
|
this.dataForm.wgyInfo.customerId = '' |
|
|
|
}, |
|
|
|
// 获取部门列表 |
|
|
|
getDeptList () { |
|
|
|
return this.$http.get('/sys/dept/list').then(({ data: res }) => { |
|
|
@ -351,6 +403,10 @@ export default { |
|
|
|
if (this.dataForm.relationLeaderDeptName === '') { |
|
|
|
this.dataForm.relationLeaderDeptId = '' |
|
|
|
} |
|
|
|
// 判断当前用户手机号是否与网格员手机号匹配 |
|
|
|
if (this.dataForm.wgyInfo.mobile !== '' && this.dataForm.mobile !== this.dataForm.wgyInfo.mobile) { |
|
|
|
return this.$message.error('当前手机号与网格员信息不匹配,请重新绑定') |
|
|
|
} |
|
|
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/user', { |
|
|
|
...this.dataForm, |
|
|
|
roleIdList: [ |
|
|
|