|
|
@@ -1,21 +1,26 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
<div class="holding">
|
|
|
- <TabList :ind='2'/>
|
|
|
+ <TabList :ind="2" />
|
|
|
<div class="right">
|
|
|
<div class="top">
|
|
|
<el-breadcrumb separator="/">
|
|
|
<el-breadcrumb-item to="">首页</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item to="">馆藏管理</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item id="mytitle">出库管理</el-breadcrumb-item>
|
|
|
-
|
|
|
</el-breadcrumb>
|
|
|
</div>
|
|
|
<div class="conten">
|
|
|
-
|
|
|
<div class="middle">
|
|
|
<ul class="title">
|
|
|
- <li :class="{active:stateInd===index}" @click="stateSelect(index)" v-for="(item,index) in stateArr" :key="index">{{item.txt}}({{item.num}})</li>
|
|
|
+ <li
|
|
|
+ :class="{ active: stateInd === index }"
|
|
|
+ @click="stateSelect(index)"
|
|
|
+ v-for="(item, index) in stateArr"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ {{ item.txt }}({{ item.num }})
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
<div class="select">
|
|
|
<span>登记人:</span>
|
|
|
@@ -33,8 +38,12 @@
|
|
|
end-placeholder="结束日期"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
- <el-button style="margin-left: 20px" @click="inquire">查询</el-button>
|
|
|
- <el-button type="primary" @click="enterBank" v-if="userLimits.edit">申请出库</el-button>
|
|
|
+ <el-button style="margin-left: 20px" @click="inquire"
|
|
|
+ >查询</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="enterBank" v-if="userLimits.edit"
|
|
|
+ >申请出库</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<!--表格 -->
|
|
|
<div class="table">
|
|
|
@@ -44,26 +53,97 @@
|
|
|
border
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
- <el-table-column prop="num" label="出库单号" width="200" :resizable="false">
|
|
|
+ <el-table-column
|
|
|
+ prop="num"
|
|
|
+ label="出库单号"
|
|
|
+ width="200"
|
|
|
+ :resizable="false"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="realName" label="登记人" width="100" :resizable="false">
|
|
|
+ <el-table-column
|
|
|
+ prop="realName"
|
|
|
+ label="登记人"
|
|
|
+ width="100"
|
|
|
+ :resizable="false"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="type" label="出库类型" width="80" :resizable="false">
|
|
|
+ <el-table-column
|
|
|
+ prop="type"
|
|
|
+ label="出库类型"
|
|
|
+ width="80"
|
|
|
+ :resizable="false"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="description" label="出库说明" :resizable="false">
|
|
|
+ <el-table-column
|
|
|
+ prop="description"
|
|
|
+ label="出库说明"
|
|
|
+ :resizable="false"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="createTime" label="登记日期" width="180" :resizable="false">
|
|
|
+ <el-table-column
|
|
|
+ prop="createTime"
|
|
|
+ label="登记日期"
|
|
|
+ width="180"
|
|
|
+ :resizable="false"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="updateTime" label="出库日期" width="180" :resizable="false">
|
|
|
+ <el-table-column
|
|
|
+ prop="updateTime"
|
|
|
+ label="出库日期"
|
|
|
+ width="180"
|
|
|
+ :resizable="false"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="status" label="状态" width="100" :resizable="false">
|
|
|
+ <el-table-column
|
|
|
+ prop="status"
|
|
|
+ label="状态"
|
|
|
+ width="100"
|
|
|
+ :resizable="false"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="140" :resizable="false">
|
|
|
- <template #default='{row}'>
|
|
|
- <el-button type="text" v-if="row.status==='待归还'||row.status==='已归还'||row.status==='审核不通过'" @click="myLook(row)">查看</el-button>
|
|
|
- <el-button type="text" v-if="row.status==='待审核'" @click="audit(row)" v-show="userLimits.audit">审核</el-button>
|
|
|
- <el-button type="text" v-if="row.status==='待办理'" @click="compile(row)" v-show="userLimits.edit">编辑</el-button>
|
|
|
- <el-button type="text" v-if="row.status==='待办理'||row.status==='待审核'||row.status==='审核不通过'" @click="delData(row.id,row.status)" v-show="userLimits.del" style="color:#C94848;">删除</el-button>
|
|
|
+ <el-table-column label="操作" width="200" :resizable="false">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="
|
|
|
+ row.status === '待归还' ||
|
|
|
+ row.status === '已归还' ||
|
|
|
+ row.status === '主任不通过'||
|
|
|
+ row.status === '已完成' ||
|
|
|
+ row.status === '馆长不通过'
|
|
|
+ "
|
|
|
+ @click="myLook(row)"
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="row.status === '主任审核中'"
|
|
|
+ @click="audit(row)"
|
|
|
+ v-show="userLimits.audit"
|
|
|
+ >主任审核</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="row.status === '馆长审核中'"
|
|
|
+ @click="audit(row)"
|
|
|
+ v-show="userLimits.auditTow"
|
|
|
+ >馆长审核</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="row.status === '待办理'"
|
|
|
+ @click="compile(row)"
|
|
|
+ v-show="userLimits.edit"
|
|
|
+ >编辑</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="row.status !== '待归还'&&row.status !== '已归还'"
|
|
|
+ @click="delData(row.id, row.status)"
|
|
|
+ v-show="userLimits.del"
|
|
|
+ style="color: #c94848"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -96,7 +176,8 @@ export default {
|
|
|
userLimits: {
|
|
|
edit: false,
|
|
|
del: false,
|
|
|
- audit: false
|
|
|
+ audit: false,
|
|
|
+ auditTow: false
|
|
|
}, // 用户权限数据
|
|
|
total: 0,
|
|
|
myData: {
|
|
|
@@ -183,11 +264,11 @@ export default {
|
|
|
this.getList(this.myData)
|
|
|
} else if (index === 3) {
|
|
|
// 点击待归还
|
|
|
- this.myData.status = 3
|
|
|
+ this.myData.status = 5
|
|
|
this.getList(this.myData)
|
|
|
} else if (index === 4) {
|
|
|
// 点击已归还
|
|
|
- this.myData.status = 4
|
|
|
+ this.myData.status = 6
|
|
|
this.getList(this.myData)
|
|
|
} else if (index === 5) {
|
|
|
// 点击审核不通过
|
|
|
@@ -213,26 +294,30 @@ export default {
|
|
|
confirmButtonText: '删除',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
- }).then(async () => {
|
|
|
- // 发请求删除
|
|
|
- await delData(id)
|
|
|
- // 发请求刷新页面
|
|
|
- this.getList(this.myData)
|
|
|
- // 更新顶部数据
|
|
|
- this.stateArr.forEach(v => {
|
|
|
- if (v.txt === status) v.num--
|
|
|
- })
|
|
|
- this.stateArr[0].num--
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '删除成功!'
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ // 发请求删除
|
|
|
+ await delData(id)
|
|
|
+ // 发请求刷新页面
|
|
|
+ this.getList(this.myData)
|
|
|
+ // 更新顶部数据
|
|
|
+ if (status === '馆长审核中' || status === '主任审核中') this.stateArr[1].num--
|
|
|
+ if (status === '待办理') this.stateArr[2].num--
|
|
|
+ if (status === '待归还') this.stateArr[3].num--
|
|
|
+ if (status === '已归还') this.stateArr[4].num--
|
|
|
+ if (status === '主任不通过' || status === '馆长不通过') this.stateArr[5].num--
|
|
|
+ this.stateArr[0].num--
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!'
|
|
|
+ })
|
|
|
})
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消.'
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消.'
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
},
|
|
|
// 点击编辑
|
|
|
compile (val) {
|
|
|
@@ -260,12 +345,14 @@ export default {
|
|
|
myStateDan (id) {
|
|
|
const list = [
|
|
|
{ id: 0, name: '待办理' },
|
|
|
- { id: 1, name: '待审核' },
|
|
|
- { id: 2, name: '审核不通过' },
|
|
|
- { id: 3, name: '待归还' },
|
|
|
- { id: 4, name: '已归还' }
|
|
|
+ { id: 1, name: '主任审核中' },
|
|
|
+ { id: 2, name: '主任不通过' },
|
|
|
+ { id: 3, name: '馆长审核中' },
|
|
|
+ { id: 4, name: '馆长不通过' },
|
|
|
+ { id: 5, name: '待归还' },
|
|
|
+ { id: 6, name: '已归还' }
|
|
|
]
|
|
|
- return list.filter(v => id === v.id)[0].name
|
|
|
+ return list.filter((v) => id === v.id)[0].name
|
|
|
},
|
|
|
// 封装获取列表方法
|
|
|
async getList (data) {
|
|
|
@@ -273,7 +360,7 @@ export default {
|
|
|
this.total = res.data.total
|
|
|
// console.log(666, res.data.list)
|
|
|
this.tableData = res.data.list
|
|
|
- this.tableData.forEach(v => {
|
|
|
+ this.tableData.forEach((v) => {
|
|
|
v.status = this.myStateDan(v.status)
|
|
|
v.type = this.CKtype(v.type)
|
|
|
// v.updateTime = v.updateTime.slice(0, 10)
|
|
|
@@ -287,15 +374,21 @@ export default {
|
|
|
date.push(this.gettime(e[i]))
|
|
|
}
|
|
|
this.myData.startTime = date[0]
|
|
|
- if (date[1]) this.myData.endTime = date[1].replace('00:00:00', '23:59:59')
|
|
|
+ if (date[1]) { this.myData.endTime = date[1].replace('00:00:00', '23:59:59') }
|
|
|
},
|
|
|
gettime (data) {
|
|
|
- const value = data.getFullYear() + '-' +
|
|
|
- this.checkTime(data.getMonth() + 1) + '-' +
|
|
|
- this.checkTime(data.getDate()) + ' ' +
|
|
|
- this.checkTime(data.getHours()) + ':' +
|
|
|
- this.checkTime(data.getMinutes()) + ':' +
|
|
|
- this.checkTime(data.getSeconds())
|
|
|
+ const value =
|
|
|
+ data.getFullYear() +
|
|
|
+ '-' +
|
|
|
+ this.checkTime(data.getMonth() + 1) +
|
|
|
+ '-' +
|
|
|
+ this.checkTime(data.getDate()) +
|
|
|
+ ' ' +
|
|
|
+ this.checkTime(data.getHours()) +
|
|
|
+ ':' +
|
|
|
+ this.checkTime(data.getMinutes()) +
|
|
|
+ ':' +
|
|
|
+ this.checkTime(data.getSeconds())
|
|
|
return value
|
|
|
},
|
|
|
checkTime (i) {
|
|
|
@@ -319,12 +412,12 @@ export default {
|
|
|
let num3 = 0
|
|
|
let num4 = 0
|
|
|
let num5 = 0
|
|
|
- res.data.list.forEach(v => {
|
|
|
- if (v.status === 1) num1++
|
|
|
+ res.data.list.forEach((v) => {
|
|
|
+ if (v.status === 1 || v.status === 3) num1++
|
|
|
if (v.status === 0) num2++
|
|
|
- if (v.status === 3) num3++
|
|
|
- if (v.status === 4) num4++
|
|
|
- if (v.status === 2) num5++
|
|
|
+ if (v.status === 5) num3++
|
|
|
+ if (v.status === 6) num4++
|
|
|
+ if (v.status === 2 || v.status === 4) num5++
|
|
|
})
|
|
|
this.stateArr[1].num = num1
|
|
|
this.stateArr[2].num = num2
|
|
|
@@ -337,6 +430,7 @@ export default {
|
|
|
this.userLimits.edit = temp2[3].children[0].authority
|
|
|
this.userLimits.del = temp2[3].children[1].authority
|
|
|
this.userLimits.audit = temp2[3].children[2].authority
|
|
|
+ this.userLimits.auditTow = temp2[3].children[3].authority
|
|
|
// console.log(999, temp2[3])
|
|
|
},
|
|
|
beforeCreate () {}, // 生命周期 - 创建之前
|
|
|
@@ -350,14 +444,14 @@ export default {
|
|
|
</script>
|
|
|
<style lang='less' scoped>
|
|
|
.holding {
|
|
|
- /deep/#mytitle>span{
|
|
|
+ /deep/#mytitle > span {
|
|
|
font-weight: 800;
|
|
|
}
|
|
|
|
|
|
display: flex;
|
|
|
.right {
|
|
|
width: 100%;
|
|
|
- .top {
|
|
|
+ .top {
|
|
|
padding-left: 18px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -369,16 +463,16 @@ export default {
|
|
|
width: 100%;
|
|
|
height: 829px;
|
|
|
.middle {
|
|
|
- .title{
|
|
|
+ .title {
|
|
|
height: 60px;
|
|
|
border-bottom: 1px solid #ccc;
|
|
|
margin: 0 25px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
color: black;
|
|
|
- .active{
|
|
|
- color: #3E5EB3;
|
|
|
- border-bottom: 2px solid #3E5EB3;
|
|
|
+ .active {
|
|
|
+ color: #3e5eb3;
|
|
|
+ border-bottom: 2px solid #3e5eb3;
|
|
|
}
|
|
|
li {
|
|
|
height: 60px;
|
|
|
@@ -405,7 +499,7 @@ export default {
|
|
|
max-width: 1710px;
|
|
|
// overflow: auto;
|
|
|
padding: 24px;
|
|
|
- /deep/.el-table__body-wrapper{
|
|
|
+ /deep/.el-table__body-wrapper {
|
|
|
max-height: 510px;
|
|
|
overflow-y: auto;
|
|
|
}
|