@@ -206,11 +63,13 @@ import headSlot from '../components/headSlot.vue'
import pagination from '@crud/Pagination'
import CRUD, { presenter, header } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
+import addBorrower from './module/addBorrower.vue'
+import editBorrower from './module/editBorrower.vue'
// import crudOperation from '@crud/CRUD.operation'
import data1 from '../data1.json'
export default {
name: 'BorrowerManage',
- components: { headSlot, pagination, rrOperation },
+ components: { headSlot, pagination, rrOperation, addBorrower, editBorrower },
mixins: [presenter(), header()],
cruds() {
return CRUD({
@@ -230,23 +89,8 @@ export default {
return {
tableData: [],
selections: [],
- addFormVisible: false,
editFormVisible: false,
- deleteVisible: false,
- borrowerForm: {},
- // permission: {
- // add: ['admin', 'lend:add'],
- // edit: ['admin', 'lend:edit'],
- // del: ['admin', 'lend:del']
- // },
- rules: {
- addName: [
- { required: true, message: '请输入姓名', trigger: 'blur' }
- ],
- addTel: [
- { required: true, message: '请输入电话号码', trigger: 'blur' }
- ]
- }
+ deleteVisible: false
}
},
mounted() {
@@ -263,28 +107,16 @@ export default {
this.$refs.table.toggleRowSelection(row)
},
handleAdd() {
- this.addFormVisible = true
+ this.$refs.addBorrowerDom.addFormVisible = true
},
handleDelConfirm() {
this.deleteVisible = false
},
handelEdit() {
- this.borrowerForm = this.selections[0]
- this.editFormVisible = true
- },
- handleAddConfirm() {
- this.$refs.borrowerFormDom.validate((valid) => {
- if (valid) {
- this.$message({
- message: '新增成功!',
- type: 'success'
- })
- this.addFormVisible = false
- } else {
- this.$message.error('新增失败!')
- return false
- }
- })
+ const editBorrowerDom = this.$refs.editBorrowerDom
+ console.log(editBorrowerDom.borrowerForm)
+ editBorrowerDom.borrowerForm = JSON.parse(JSON.stringify(this.selections[0]))
+ editBorrowerDom.editFormVisible = true
}
}
}
diff --git a/src/views/archivesManage/lendManage/borrowerManage/module/addBorrower.vue b/src/views/archivesManage/lendManage/borrowerManage/module/addBorrower.vue
new file mode 100644
index 0000000..f2446a2
--- /dev/null
+++ b/src/views/archivesManage/lendManage/borrowerManage/module/addBorrower.vue
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/archivesManage/lendManage/borrowerManage/module/editBorrower.vue b/src/views/archivesManage/lendManage/borrowerManage/module/editBorrower.vue
new file mode 100644
index 0000000..d90b962
--- /dev/null
+++ b/src/views/archivesManage/lendManage/borrowerManage/module/editBorrower.vue
@@ -0,0 +1,119 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/archivesManage/lendManage/data1.json b/src/views/archivesManage/lendManage/data1.json
index c73e648..9ab367a 100644
--- a/src/views/archivesManage/lendManage/data1.json
+++ b/src/views/archivesManage/lendManage/data1.json
@@ -65,7 +65,7 @@
"borrowerIdNum":"420880190011115636",
"borrowerTel":"027-5955 7085",
"warnState":"未解除",
- "docNum":"JY202205050003",
+ "docNum":"JY202205050002",
"archiveNum":"1",
"lendHandler":"管理员"
},
diff --git a/src/views/archivesManage/lendManage/lendConfirm/index.vue b/src/views/archivesManage/lendManage/lendConfirm/index.vue
index 769d437..7b8c8d6 100644
--- a/src/views/archivesManage/lendManage/lendConfirm/index.vue
+++ b/src/views/archivesManage/lendManage/lendConfirm/index.vue
@@ -66,7 +66,7 @@ export default {
cruds() {
return CRUD({
// title: '岗位',
- // url: 'api/job',
+ // url: 'api/job',
// crudMethod: { ...crudJob },
optShow: {
add: false,
@@ -101,17 +101,9 @@ export default {
const archiveDetailDom = this.$refs.archiveDetailDom
archiveDetailDom.detailVisible = true
const arr = data1.rows.filter(item => item.docNum === row.docNum)
- archiveDetailDom.rowData = arr
- console.log(arr[0])
- // 借阅状态样式类名
- if (arr[0].lendStatus === '已借') {
- archiveDetailDom.classLend = 'have-lend'
- } else if (arr[0].lendStatus === '待借') {
- archiveDetailDom.classLend = 'no-lend'
- } else {
- archiveDetailDom.classLend = 'other-lend'
- }
- console.log(archiveDetailDom.classLend)
+ archiveDetailDom.rowData = row
+ archiveDetailDom.tableData = arr
+ console.log(arr)
},
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row)
diff --git a/src/views/archivesManage/lendManage/lendConfirm/module/archiveDetail.vue b/src/views/archivesManage/lendManage/lendConfirm/module/archiveDetail.vue
index 5b32c50..59412db 100644
--- a/src/views/archivesManage/lendManage/lendConfirm/module/archiveDetail.vue
+++ b/src/views/archivesManage/lendManage/lendConfirm/module/archiveDetail.vue
@@ -5,22 +5,22 @@
-
借阅人:{{ rowData[0].borrowerName }}
-
所属部门:{{ rowData[0].borrowerDepartment }}
-
借阅状态:{{ rowData[0].lendStatus }}
+
借阅人:{{ rowData.borrowerName }}
+
所属部门:{{ rowData.borrowerDepartment }}
+
借阅状态:待借阅
-
证件类型:{{ rowData[0].borrowerIdType }}
-
证件号码:{{ rowData[0].borrowerIdNum }}
-
电话号码:{{ rowData[0].borrowerTel }}
+
证件类型:{{ rowData.borrowerIdType }}
+
证件号码:{{ rowData.borrowerIdNum }}
+
电话号码:{{ rowData.borrowerTel }}
-
借阅目的:{{ rowData[0].borrowGoal }}
-
借阅日期:{{ rowData[0].borrowDays }}
-
操作时间:{{ rowData[0].operationTime }}
+
借阅目的:{{ rowData.borrowGoal }}
+
借阅日期:{{ rowData.borrowDays }}
+
操作时间:{{ rowData.operationTime }}
-
+
@@ -37,8 +37,8 @@ export default {
data() {
return {
detailVisible: false,
- rowData: [],
- classLend: ''
+ rowData: {},
+ tableData: []
}
}
}
diff --git a/src/views/archivesManage/lendManage/lendProcess/index.vue b/src/views/archivesManage/lendManage/lendProcess/index.vue
index a2a92da..143e4d6 100644
--- a/src/views/archivesManage/lendManage/lendProcess/index.vue
+++ b/src/views/archivesManage/lendManage/lendProcess/index.vue
@@ -7,7 +7,7 @@
diff --git a/src/views/archivesManage/lendManage/lendQuery/index.vue b/src/views/archivesManage/lendManage/lendQuery/index.vue
index c5c59bf..c61170b 100644
--- a/src/views/archivesManage/lendManage/lendQuery/index.vue
+++ b/src/views/archivesManage/lendManage/lendQuery/index.vue
@@ -46,7 +46,6 @@
height="calc(100vh - 355px)"
:data="tableData"
:cell-class-name="cell"
- @selection-change="selectionChangeHandler"
@row-click="clickRowHandler"
@row-dblclick="handleDbClick"
>
@@ -134,9 +133,6 @@ export default {
getData() {
this.tableData = data3.rows
},
- selectionChangeHandler() {
- console.log('selectionChangeHandler')
- },
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row)
},
@@ -151,15 +147,16 @@ export default {
handleDbClick(row) {
this.$refs.table.clearSelection()
const archiveDetailDom = this.$refs.archiveDetailDom
- archiveDetailDom.detailVisible = true
- const arr = data3.rows.filter(item => item.docNum === row.docNum)
- archiveDetailDom.rowData = arr
+ // const arr = data3.rows.filter(item => item.docNum === row.docNum)
+ archiveDetailDom.rowData = row
+ console.log(row)
// 借阅状态样式类名
- if (arr[0].lendStatus === '待归还') {
+ if (row.lendStatus === '待归还') {
archiveDetailDom.classLend = 'have-lend'
- } else if (arr[0].lendStatus === '逾期') {
+ } else if (row.lendStatus === '逾期') {
archiveDetailDom.classLend = 'no-lend'
}
+ archiveDetailDom.detailVisible = true
}
}
}
diff --git a/src/views/archivesManage/lendManage/returnArchives/index.vue b/src/views/archivesManage/lendManage/returnArchives/index.vue
index 093efc7..a505b95 100644
--- a/src/views/archivesManage/lendManage/returnArchives/index.vue
+++ b/src/views/archivesManage/lendManage/returnArchives/index.vue
@@ -38,7 +38,7 @@
-
+
@@ -126,16 +126,16 @@ export default {
handleDbClick(row) {
this.$refs.table.clearSelection()
const archiveDetailDom = this.$refs.archiveDetailDom
- archiveDetailDom.detailVisible = true
- const arr = data3.rows.filter(item => item.docNum === row.docNum)
- archiveDetailDom.rowData = arr
+ // const arr = data3.rows.filter(item => item.docNum === row.docNum)
+ archiveDetailDom.rowData = row
+ console.log(row)
// 借阅状态样式类名
- if (arr[0].lendStatus === '待归还') {
+ if (row.lendStatus === '待归还') {
archiveDetailDom.classLend = 'have-lend'
- } else if (arr[0].lendStatus === '逾期') {
+ } else if (row.lendStatus === '逾期') {
archiveDetailDom.classLend = 'no-lend'
}
- console.log(archiveDetailDom.classLend)
+ archiveDetailDom.detailVisible = true
},
handleReturn() {
if (this.selections.length > 0) {
diff --git a/src/views/archivesManage/lendManage/returnArchives/module/archiveDetail.vue b/src/views/archivesManage/lendManage/returnArchives/module/archiveDetail.vue
index c3833cd..ff8104a 100644
--- a/src/views/archivesManage/lendManage/returnArchives/module/archiveDetail.vue
+++ b/src/views/archivesManage/lendManage/returnArchives/module/archiveDetail.vue
@@ -5,34 +5,34 @@
-
单据号{{ rowData[0].docNum }}
+
单据号{{ rowData.docNum }}
-
借阅人:{{ rowData[0].borrowerName }}
+
借阅人:{{ rowData.borrowerName }}
-
所属部门:{{ rowData[0].borrowerDepartment }}
-
证件类型:{{ rowData[0].borrowerIdType }}
+
所属部门:{{ rowData.borrowerDepartment }}
+
证件类型:{{ rowData.borrowerIdType }}
-
证件号码:{{ rowData[0].borrowerIdNum }}
-
电话号码:{{ rowData[0].borrowerTel }}
+
证件号码:{{ rowData.borrowerIdNum }}
+
电话号码:{{ rowData.borrowerTel }}
-
借阅日期:{{ rowData[0].borrowDays }}
-
借阅目的:{{ rowData[0].borrowGoal }}
+
借阅日期:{{ rowData.borrowDays }}
+
借阅目的:{{ rowData.borrowGoal }}
-
借阅状态:{{ rowData[0].lendStatus }}
-
操作时间:{{ rowData[0].operationTime }}
+
借阅状态:{{ rowData.lendStatus }}
+
操作时间:{{ rowData.operationTime }}
-
所属门类:{{ rowData[0].categoryName }}
-
档号:{{ rowData[0].archivesID }}
+
所属门类:{{ rowData.categoryName }}
+
档号:{{ rowData.archivesID }}
-
题名:{{ rowData[0].titleName }}
+
题名:{{ rowData.titleName }}
-
盒名称:{{ rowData[0].fieldName }}
-
存放位置:{{ rowData[0].storagePath }}
+
盒名称:{{ rowData.fieldName }}
+
存放位置:{{ rowData.storagePath }}
@@ -44,7 +44,7 @@ export default {
data() {
return {
detailVisible: false,
- rowData: [],
+ rowData: {},
classLend: ''
}
}
diff --git a/src/views/archivesManage/lendManage/toLend/module/lendRecord.vue b/src/views/archivesManage/lendManage/toLend/module/lendRecord.vue
index 277d9fb..fe76084 100644
--- a/src/views/archivesManage/lendManage/toLend/module/lendRecord.vue
+++ b/src/views/archivesManage/lendManage/toLend/module/lendRecord.vue
@@ -1,6 +1,6 @@
-
+
@@ -54,7 +54,7 @@
-
+