|
|
|
@ -24,8 +24,8 @@ |
|
|
|
|
<j-select-multi-user placeholder="请选择负责人" v-model="model.enterprisesManager" @change="getMobile()"/> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mobile" label="手机号"> |
|
|
|
|
<a-input placeholder="请输入手机号" v-model="model.mobile" :dictCode="mobileVal"/> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="model.mobile" :dictCode="mobileVal"></j-dict-select-tag>--> |
|
|
|
|
<a-input placeholder="请输入手机号" v-model="model.mobile"/> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="model.mobile" :dictCode="mobileVal"></j-dict-select-tag>--> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
|
|
|
|
|
</a-form-model> |
|
|
|
@ -34,7 +34,7 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import {httpAction} from '@/api/manage' |
|
|
|
|
import {httpAction, getAction} from '@/api/manage' |
|
|
|
|
import JDictSelectTag from '@/components/dict/JDictSelectTag' |
|
|
|
|
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart' |
|
|
|
|
|
|
|
|
@ -48,7 +48,7 @@ export default { |
|
|
|
|
return { |
|
|
|
|
title: "操作", |
|
|
|
|
visible: false, |
|
|
|
|
mobileVal: "", |
|
|
|
|
// mobileVal: "", |
|
|
|
|
model: {}, |
|
|
|
|
labelCol: { |
|
|
|
|
xs: {span: 24}, |
|
|
|
@ -62,23 +62,25 @@ export default { |
|
|
|
|
confirmLoading: false, |
|
|
|
|
validatorRules: { |
|
|
|
|
departId: [ |
|
|
|
|
{required: true, message: "部门名称不能为空"}, |
|
|
|
|
{required: true, message: "部门不能为空"}, |
|
|
|
|
], |
|
|
|
|
groupName: [ |
|
|
|
|
{required: true, message: "班组名称不能为空"}, |
|
|
|
|
{required: true, message: '班组名称不能为空!'}, |
|
|
|
|
{pattern: /(^[\u4e00-\u9fa5_a-zA-Z0-9_]{1,10}$)/, message: '班组名称不能为空且长度不能超过10!'} |
|
|
|
|
], |
|
|
|
|
enterprisesManager: [ |
|
|
|
|
{required: true, message: "负责人不能为空"}, |
|
|
|
|
], |
|
|
|
|
mobile: [ |
|
|
|
|
{required: false}, |
|
|
|
|
{pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'}, |
|
|
|
|
], |
|
|
|
|
// mobile: [ |
|
|
|
|
// {required: false}, |
|
|
|
|
// {pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'}, |
|
|
|
|
// ], |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
url: { |
|
|
|
|
add: "/groupx/add", |
|
|
|
|
edit: "/groupx/edit", |
|
|
|
|
sysUserList: "/sys/user/list", |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -87,7 +89,22 @@ export default { |
|
|
|
|
methods: { |
|
|
|
|
getMobile() { |
|
|
|
|
alert(this.model.enterprisesManager); |
|
|
|
|
this.mobileVal = "sys_user,phone,username,username='" + this.model.enterprisesManager + "'"; |
|
|
|
|
// this.mobileVal = "sys_user,phone,username,username='" + this.model.enterprisesManager + "'"; |
|
|
|
|
|
|
|
|
|
let param = { |
|
|
|
|
"username": this.model.enterprisesManager, |
|
|
|
|
} |
|
|
|
|
let that = this; |
|
|
|
|
getAction(this.url.sysUserList, param).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
console.log("res:" + JSON.stringify(res.result.records[0])) |
|
|
|
|
console.log("res22222222:" + JSON.stringify(res.result.records[0].phone)); |
|
|
|
|
// this.model.mobile = res.result.records[0].phone; |
|
|
|
|
// this.model.mobile = JSON.stringify(res.result.records[0].phone) |
|
|
|
|
this.model.mobile = "15112345678"; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
add() { |
|
|
|
|
//初始化默认值 |
|
|
|
|