|
|
@ -166,9 +166,9 @@ import TreeSelect from '@/components/TreeSelect' |
|
|
|
// crud交由presenter持有 |
|
|
|
const defaultCrud = presenter(CRUD({ |
|
|
|
title: '领用、借用管理', |
|
|
|
url: '/move', |
|
|
|
url: '/move/list', |
|
|
|
orderBy: ['id desc'], |
|
|
|
crudMethod: { ...InstrumentMove } |
|
|
|
crudMethod: { ...InstrumentMove }, |
|
|
|
})) |
|
|
|
|
|
|
|
// 设置初始form |
|
|
@ -180,7 +180,8 @@ const defaultForm = form({ |
|
|
|
applyDate: '', |
|
|
|
currentUserId: '', |
|
|
|
currentDepartmentId: null, |
|
|
|
remark: '' |
|
|
|
remark: '', |
|
|
|
instrumentId: null |
|
|
|
}) |
|
|
|
|
|
|
|
// 自定义模板内容 |
|
|
@ -210,21 +211,21 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
dialogVisible: false, |
|
|
|
userList: this.$store.getters.allUserList, |
|
|
|
userList: this.$store.getters.allUser, |
|
|
|
treeSelectProps: { |
|
|
|
children: 'children', |
|
|
|
label: 'departmentName', |
|
|
|
label: 'name', |
|
|
|
value: 'id' |
|
|
|
}, |
|
|
|
colConfigs: [ |
|
|
|
{ prop: 'currentUserId', label: '当前使用人', align: 'center', formatter: this.formatter.formatterNickName }, |
|
|
|
{ prop: 'currentUserId', label: '当前使用人', align: 'center', formatter: this.formatter.getChineseName }, |
|
|
|
{ |
|
|
|
prop: 'currentDepartmentId', |
|
|
|
label: '当前使用科室', |
|
|
|
align: 'center', |
|
|
|
formatter: this.formatter.formatterDepartmentName |
|
|
|
}, |
|
|
|
{ prop: 'applicantId', label: '申请人', align: 'center', formatter: this.formatter.formatterNickName }, |
|
|
|
{ prop: 'applicantId', label: '申请人', align: 'center', formatter: this.formatter.getChineseName }, |
|
|
|
{ |
|
|
|
prop: 'applyDepartmentId', |
|
|
|
label: '申请科室', |
|
|
@ -272,12 +273,13 @@ export default { |
|
|
|
methods: { |
|
|
|
// 刷新前做的操作 |
|
|
|
[CRUD.HOOK.beforeRefresh](crud) { |
|
|
|
crud.query.instrumentId = this.instrumentId |
|
|
|
crud.query.id = this.instrumentId |
|
|
|
}, |
|
|
|
// 新增前做的操作 |
|
|
|
[CRUD.HOOK.beforeToAdd](crud, form) { |
|
|
|
this.applyDepartmentId = 0 |
|
|
|
this.currentDepartmentId = 0 |
|
|
|
form.id = this.instrumentId |
|
|
|
form.instrumentId = this.instrumentId |
|
|
|
}, |
|
|
|
// 编辑框打开后做的操作 |
|
|
|