业务实体选择

main
mo 1 year ago
parent 326f0ef826
commit 9846455edb

@ -242,7 +242,20 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="业务实体" prop="company"> <el-form-item label="业务实体" prop="company">
<el-input v-model="form.company" placeholder="请输入业务实体" /> <el-select
v-model="form.company"
placeholder="请选择业务实体"
value-key="id"
@change="handleCompanyChange"
>
<el-option
v-for="item in organizationList"
:key="item.id"
:value="item"
:label="item.organizationName"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -272,6 +285,7 @@ import {
exportOtherExcel, exportOtherExcel,
} from "@/api/accounting/other"; } from "@/api/accounting/other";
import { getAccessToken, getTenantId } from "@/utils/auth"; import { getAccessToken, getTenantId } from "@/utils/auth";
import { getOrganizationPage } from "@/api/setting/organization";
// import {DICT_TYPE, getDictDatas} from "@/utils/dict"; // import {DICT_TYPE, getDictDatas} from "@/utils/dict";
export default { export default {
name: "Other", name: "Other",
@ -329,10 +343,12 @@ export default {
Authorization: "Bearer " + getAccessToken(), Authorization: "Bearer " + getAccessToken(),
"tenant-id": getTenantId(), "tenant-id": getTenantId(),
}, // }, //
organizationList: [],
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getOrganizationList();
}, },
methods: { methods: {
/** /**
@ -355,6 +371,12 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
//
getOrganizationList() {
getOrganizationPage().then((response) => {
this.organizationList = response.data.list;
});
},
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
@ -401,6 +423,11 @@ export default {
console.log(res); console.log(res);
this.form.fileUrl = res.data.url; this.form.fileUrl = res.data.url;
}, },
//
handleCompanyChange(val) {
this.form.companyId = val.id;
this.form.company = val.organizationName;
},
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();

Loading…
Cancel
Save