diff --git a/src/components/UserSelect/single.vue b/src/components/UserSelect/single.vue new file mode 100644 index 00000000..ea3f1781 --- /dev/null +++ b/src/components/UserSelect/single.vue @@ -0,0 +1,180 @@ + + + diff --git a/src/views/accounting/voucher/index.vue b/src/views/accounting/voucher/index.vue index 2be5793a..3da72b5d 100644 --- a/src/views/accounting/voucher/index.vue +++ b/src/views/accounting/voucher/index.vue @@ -207,60 +207,66 @@ - - - - + + + - - - - + + + - - - - - + + + @@ -477,10 +483,11 @@ import { getAttachmentPage } from "@/api/accounting/attachment"; import { getFlowPage } from "@/api/accounting/flow"; import { getInvoicesPage } from "@/api/accounting/invoices"; import { getBankSlipPage } from "@/api/accounting/bankSlip"; +import UserSelect from "@/components/UserSelect/single.vue"; export default { name: "Voucher", - components: {}, + components: { UserSelect }, data() { return { propName: { @@ -776,15 +783,6 @@ export default { this.userOptions = response.data.list; }); }, - handleSelectUser(val) { - this.form.audit = val.username; - }, - handleSelectUser1(val) { - this.form.checker = val.username; - }, - handleSelectUser2(val) { - this.form.handle = val.username; - }, /** 新增按钮操作 */ handleAdd() { this.reset(); @@ -864,6 +862,35 @@ export default { }) .catch(() => {}); }, + // 人员选择弹窗 + handleSelectUser1() { + this.$refs.UserSelect1.showFlag = true; + }, + handleSelectUser2() { + this.$refs.UserSelect2.showFlag = true; + }, + handleSelectUser3() { + this.$refs.UserSelect3.showFlag = true; + }, + // 审核人选择 + onUserSelected1(obj) { + console.log(obj); + if (obj != undefined && obj != null) { + this.form.audit = obj.username; + } + }, + // 核准人选择 + onUserSelected2(obj) { + if (obj != undefined && obj != null) { + this.form.checker = obj.username; + } + }, + // 经办人选择 + onUserSelected3(obj) { + if (obj != undefined && obj != null) { + this.form.handle = obj.username; + } + }, }, };