|
@@ -2,7 +2,7 @@
|
|
|
<div class="content_body" v-loading="loading">
|
|
|
<Tree ref="tree"></Tree>
|
|
|
<div style="flex: 1;">
|
|
|
- <Search @search="search" ref="search1" @searchBtnChange="searchBtnChange"></Search>
|
|
|
+ <Search @search="search" ref="search1" @searchBtnChange="searchBtnChange" @reSearch="reSearch"></Search>
|
|
|
<div class="tab_body">
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
<el-tab-pane label="待归还" name="list">
|
|
@@ -70,7 +70,7 @@
|
|
|
<el-table-column fixed="right" label="操作" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="view(scope)" type="text" size="small">查看</el-button>
|
|
|
- <el-button @click="view(scope)" type="text" size="small">归还</el-button>
|
|
|
+ <el-button @click="toGiveBack(scope)" type="text" size="small">归还</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -159,7 +159,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<viewDrawer ref="viewDrawer" :dataList="dataList" :selectedIndex="selectedIndex" :detailMaxPage="detailMaxPage"
|
|
|
- @prevPage="prevPage" @nextPage="nextPage" :title="drawerTitle" />
|
|
|
+ @prevPage="prevPage" @nextPage="nextPage" :title="drawerTitle" @refresh="getData" />
|
|
|
+ <giveBack ref="giveBack" @giveBack="giveBackOk" :giveBackData="giveBackData" />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -167,9 +168,10 @@ import Search from './search.vue'
|
|
|
import Tree from '@/components/tree.vue'
|
|
|
import viewDrawer from '@/views/main/viewDrawer.vue'
|
|
|
import { getpage } from '@/api/zdzb/zdzb.js'
|
|
|
+import giveBack from '@/views/main/com/giveBack.vue'
|
|
|
|
|
|
export default {
|
|
|
- components: { Search, Tree, viewDrawer, },
|
|
|
+ components: { Search, Tree, viewDrawer, giveBack },
|
|
|
data() {
|
|
|
return {
|
|
|
activeName: 'list',
|
|
@@ -186,6 +188,7 @@ export default {
|
|
|
ssdws: [], // tree 自选 所属单位
|
|
|
tableKey: Math.random(),
|
|
|
loading: false,
|
|
|
+ giveBackData: {}
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -223,12 +226,33 @@ export default {
|
|
|
let deptList = this.ssdws.map(item => {
|
|
|
return item.id
|
|
|
})
|
|
|
+ let zbzt
|
|
|
+ if (this.activeName == 'list') {
|
|
|
+ zbzt = "01,02"
|
|
|
+ }
|
|
|
+ if (this.activeName == 'back') {
|
|
|
+ zbzt = "03,04"
|
|
|
+ }
|
|
|
getpage(this.page.pageCurrent, this.page.pageSize,
|
|
|
- { ...this.$refs.search1.searchForm, deptList: deptList }).then(res => {
|
|
|
+ { ...this.$refs.search1.searchForm, deptList: deptList, zbzt: zbzt }).then(res => {
|
|
|
this.tableList = res.data.data.records
|
|
|
this.total = res.data.data.total
|
|
|
}).finally(() => this.loading = false)
|
|
|
},
|
|
|
+ reSearch() {
|
|
|
+ this.page = {
|
|
|
+ pageSize: 10,
|
|
|
+ pageCurrent: 1,
|
|
|
+ },
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ toGiveBack(scope) {
|
|
|
+ this.giveBackData = scope.row
|
|
|
+ this.$refs.giveBack.show()
|
|
|
+ },
|
|
|
+ giveBackOk() {
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
view(scope) {
|
|
|
this.drawerTitle = '装备信息'
|
|
|
this.dataList = scope.row
|
|
@@ -256,6 +280,7 @@ export default {
|
|
|
this.getData()
|
|
|
},
|
|
|
handleClick(el) {
|
|
|
+ this.getData()
|
|
|
this.tableKey = Math.random();
|
|
|
}
|
|
|
}
|