|
|
@ -15,7 +15,8 @@ |
|
|
|
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departId" label="部门"> |
|
|
|
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departId" label="部门"> |
|
|
|
<!-- <a-input placeholder="请输入部门编号" v-model="model.departId"/>--> |
|
|
|
<!-- <a-input placeholder="请输入部门编号" v-model="model.departId"/>--> |
|
|
|
<!-- <j-select-depart placeholder="请选择部门" v-model="model.departId"/>--> |
|
|
|
<!-- <j-select-depart placeholder="请选择部门" v-model="model.departId"/>--> |
|
|
|
<j-dict-select-tag type="list" v-model="model.departId" dictCode="sys_depart,depart_name,id,org_type='1'" |
|
|
|
<j-dict-select-tag type="list" v-model="model.departId" dictCode="sys_depart,depart_name,id,org_category='2'" |
|
|
|
|
|
|
|
@change="getEnterprisesManagerValChange()" |
|
|
|
placeholder="请选择部门"/> |
|
|
|
placeholder="请选择部门"/> |
|
|
|
|
|
|
|
|
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
@ -32,8 +33,15 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a-form-model-item :label-col="labelCol" :wrapper-col="wrapperCol" prop="enterprisesManager" label="负责人"> |
|
|
|
<a-form-model-item :label-col="labelCol" :wrapper-col="wrapperCol" prop="enterprisesManager" label="负责人"> |
|
|
|
<!-- <j-select-user-by-dep v-model="model.userId" :multi="false"></j-select-user-by-dep>--> |
|
|
|
<!-- <a-select :allowClear="true"--> |
|
|
|
<j-select-multi-user placeholder="请选择负责人" v-model="model.enterprisesManager" @change="getMobile()" :multiple="false" ></j-select-multi-user> |
|
|
|
<!-- style="width: 100%" v-model="model.enterprisesManager">--> |
|
|
|
|
|
|
|
<!-- <a-select-option v-for="record in this.model.records" :key="record.id " :disabled="model.departId==null">--> |
|
|
|
|
|
|
|
<!-- {{ record.username }}--> |
|
|
|
|
|
|
|
<!-- </a-select-option>--> |
|
|
|
|
|
|
|
<!-- </a-select>--> |
|
|
|
|
|
|
|
<j-dict-select-tag type="list" v-model="model.enterprisesManager" |
|
|
|
|
|
|
|
placeholder="请选择负责人" :dict-code="enterprisesManager" @change="getMobile()" |
|
|
|
|
|
|
|
:disabled="model.departId==null"/> |
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
|
|
|
|
|
|
|
|
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mobile" label="手机号"> |
|
|
|
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mobile" label="手机号"> |
|
|
@ -59,10 +67,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
enterprisesManager: "sys_user,username,id", |
|
|
|
title: "操作", |
|
|
|
title: "操作", |
|
|
|
visible: false, |
|
|
|
visible: false, |
|
|
|
// mobileVal: "", |
|
|
|
// mobileVal: "", |
|
|
|
model: {}, |
|
|
|
model: { |
|
|
|
|
|
|
|
// records: [], |
|
|
|
|
|
|
|
}, |
|
|
|
labelCol: { |
|
|
|
labelCol: { |
|
|
|
xs: {span: 24}, |
|
|
|
xs: {span: 24}, |
|
|
|
sm: {span: 5}, |
|
|
|
sm: {span: 5}, |
|
|
@ -105,16 +116,22 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getEnterprisesManagerValChange() { |
|
|
|
|
|
|
|
this.enterprisesManager = "sys_user,username,username,id in (select user_id from sys_user_depart where dep_id='" + this.model.departId + "')"; |
|
|
|
|
|
|
|
// this.enterprisesManager = "zy_process,process_name,id,id in(select process_id from zy_product_process where product_id='1')"; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getMobile() { |
|
|
|
getMobile() { |
|
|
|
let that = this; |
|
|
|
let that = this; |
|
|
|
// alert(userIds); |
|
|
|
|
|
|
|
let param = { |
|
|
|
let param = { |
|
|
|
"username": that.model.enterprisesManager, |
|
|
|
"username": that.model.enterprisesManager, |
|
|
|
|
|
|
|
// "departId": that.model.departId, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// alert(param.toString()); |
|
|
|
getAction(that.url.sysUserList, param).then((res) => { |
|
|
|
getAction(that.url.sysUserList, param).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
if (res.success) { |
|
|
|
|
|
|
|
// console.log("----------" + JSON.stringify(res.result.records)) |
|
|
|
let phone = JSON.stringify(res.result.records[0].phone); |
|
|
|
let phone = JSON.stringify(res.result.records[0].phone); |
|
|
|
console.log("phone:",phone) |
|
|
|
|
|
|
|
if (phone.length > 11) { |
|
|
|
if (phone.length > 11) { |
|
|
|
phone = phone.substring(1, 12); |
|
|
|
phone = phone.substring(1, 12); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -124,26 +141,6 @@ export default { |
|
|
|
this.$forceUpdate(); |
|
|
|
this.$forceUpdate(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// getMobile(userIds) { |
|
|
|
|
|
|
|
// let that = this; |
|
|
|
|
|
|
|
// // alert(userIds); |
|
|
|
|
|
|
|
// let param = { |
|
|
|
|
|
|
|
// "username": userIds, |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// getAction(this.url.sysUserList, param).then((res) => { |
|
|
|
|
|
|
|
// if (res.success) { |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// let phone = JSON.stringify(res.result.records[0].phone); |
|
|
|
|
|
|
|
// if (phone.length > 11) { |
|
|
|
|
|
|
|
// phone = phone.substring(1, 12); |
|
|
|
|
|
|
|
// }else { |
|
|
|
|
|
|
|
// phone = ""; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// that.model = Object.assign(that.model, {'mobile': phone}); |
|
|
|
|
|
|
|
// this.$forceUpdate(); |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
add() { |
|
|
|
add() { |
|
|
|
//初始化默认值 |
|
|
|
//初始化默认值 |
|
|
|