绑值修改

main
mo 1 year ago
parent fd4b527ed1
commit c601d5c7ee

@ -226,14 +226,16 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="移交人" prop="outputName"> <el-form-item label="移交人" prop="outputName">
<el-select <el-select
v-model="form.outputName" v-model="outputName"
filterable filterable
placeholder="请选择移交人" placeholder="请选择移交人"
value-key="id"
@change="handleSelectUser1"
> >
<el-option <el-option
v-for="item in userOptions" v-for="item in userOptions"
:key="item.id" :key="item.id"
:value="item.id" :value="item"
:label="item.username" :label="item.username"
> >
</el-option> </el-option>
@ -243,14 +245,16 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="签收人" prop="inputName"> <el-form-item label="签收人" prop="inputName">
<el-select <el-select
v-model="form.inputName" v-model="inputName"
filterable filterable
placeholder="请选择签收人" placeholder="请选择签收人"
value-key="id"
@change="handleSelectUser2"
> >
<el-option <el-option
v-for="item in userOptions" v-for="item in userOptions"
:key="item.id" :key="item.id"
:value="item.id" :value="item"
:label="item.username" :label="item.username"
> >
</el-option> </el-option>
@ -426,6 +430,8 @@ export default {
oldSiteArray: [], // oldSiteArray: [], //
newSiteArray: [], // newSiteArray: [], //
company: null, company: null,
outputName: null,
inputName: null,
}; };
}, },
created() { created() {
@ -462,7 +468,6 @@ export default {
}); });
}, },
handleSelectOrganization(val) { handleSelectOrganization(val) {
console.log(val);
this.form.companyId = val.id; this.form.companyId = val.id;
this.form.company = val.organizationName; this.form.company = val.organizationName;
}, },
@ -472,6 +477,14 @@ export default {
this.userOptions = response.data.list; this.userOptions = response.data.list;
}); });
}, },
handleSelectUser1(val) {
this.form.outputNameId = val.id;
this.form.outputName = val.username;
},
handleSelectUser2(val) {
this.form.inputNameId = val.id;
this.form.inputName = val.username;
},
// //
getSiteList() { getSiteList() {
getSiteTree().then((response) => { getSiteTree().then((response) => {
@ -575,6 +588,8 @@ export default {
getTurnOver(id).then((response) => { getTurnOver(id).then((response) => {
this.form = response.data; this.form = response.data;
this.company = response.data.company; this.company = response.data.company;
this.outputName = response.data.outputName;
this.inputName = response.data.inputName;
this.open = true; this.open = true;
this.title = "修改移交"; this.title = "修改移交";
}); });

Loading…
Cancel
Save