修改借书时自动填充用户id
This commit is contained in:
parent
175209ba0b
commit
d34ab7fedd
@ -98,7 +98,7 @@ export default {
|
||||
borrowDialogTitle: "借书",
|
||||
// 借书表单
|
||||
borrowForm: {
|
||||
userId: "",
|
||||
userId: "", // 预填充用户编号
|
||||
bookId: "",
|
||||
borrowDate: null,
|
||||
expectedReturnDate: null,
|
||||
@ -137,6 +137,10 @@ export default {
|
||||
// 如果从行点击,则预填充书籍编号
|
||||
this.borrowForm.bookId = row.bookId;
|
||||
}
|
||||
|
||||
// 自动填充当前用户的用户编号
|
||||
this.borrowForm.userId = this.$store.state.user.id || ""; // 使用用户id作为编号
|
||||
|
||||
this.borrowDialogVisible = true;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user