业务实体选择修改

main
mo 1 year ago
parent f259a802d1
commit ac6def9459

@ -147,12 +147,13 @@
<el-select <el-select
v-model="form.company" v-model="form.company"
placeholder="请选择业务实体" placeholder="请选择业务实体"
value-key="id"
@change="handleCompanyChange" @change="handleCompanyChange"
> >
<el-option <el-option
v-for="item in organizationList" v-for="item in organizationList"
:key="item.id" :key="item.id"
:value="item.id" :value="item"
:label="item.organizationName" :label="item.organizationName"
> >
</el-option> </el-option>
@ -383,10 +384,8 @@ export default {
}, },
// //
handleCompanyChange(val) { handleCompanyChange(val) {
var data = this.organizationList.find((item) => item.id == val); this.form.companyId = val.id;
console.log(data); this.form.company = val.organizationName;
this.form.companyId = data.companyId;
this.Fileform.company = data.company;
}, },
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {

@ -149,16 +149,16 @@
> >
<el-form ref="form" :model="form" :rules="rules" label-width="90px"> <el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-form-item label="业务实体" prop="company"> <el-form-item label="业务实体" prop="company">
<!-- <el-input v-model="form.company" placeholder="请输入业务实体" /> -->
<el-select <el-select
v-model="form.company" v-model="form.company"
placeholder="请选择业务实体" placeholder="请选择业务实体"
value-key="id"
@change="handleCompanyChange" @change="handleCompanyChange"
> >
<el-option <el-option
v-for="item in organizationList" v-for="item in organizationList"
:key="item.id" :key="item.id"
:value="item.id" :value="item"
:label="item.organizationName" :label="item.organizationName"
> >
</el-option> </el-option>
@ -471,10 +471,8 @@ export default {
}, },
// //
handleCompanyChange(val) { handleCompanyChange(val) {
var data = this.organizationList.find((item) => item.id == val); this.form.companyId = val.id;
console.log(data); this.form.company = val.organizationName;
this.form.companyId = data.companyId;
this.Fileform.company = data.company;
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {

Loading…
Cancel
Save