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