|
|
@@ -1,7 +1,7 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
<div class="holding0_result">
|
|
|
- <TabList :ind='2'/>
|
|
|
+ <TabList :ind="2" />
|
|
|
<div class="right">
|
|
|
<div class="top">
|
|
|
<el-breadcrumb separator="/">
|
|
|
@@ -15,33 +15,36 @@
|
|
|
<div class="info">
|
|
|
<div>
|
|
|
<h4>出库编号:</h4>
|
|
|
- <span>{{myData.num}}</span>
|
|
|
+ <span>{{ myData.num }}</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
<h4>出库人员:</h4>
|
|
|
- <span>{{myData.realName}}</span>
|
|
|
+ <span>{{ myData.realName }}</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
<h4>出库类型:</h4>
|
|
|
- <span>{{myData.type}}</span>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <h4>出库说明:</h4>
|
|
|
- <span>{{myData.description}}</span>
|
|
|
+ <span>{{ myData.type }}</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
<h4>审核结果:</h4>
|
|
|
- <span>{{myData.status}}</span>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <h4>审核说明:</h4>
|
|
|
- <span>{{myData.reason}}</span>
|
|
|
+ <span>{{ myData.status }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="explain">
|
|
|
+ <p><span>出库说明:</span>{{ myData.description }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="explain">
|
|
|
+ <p><span>审核说明:</span>{{ myData.reason }}</p>
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- 表格 -->
|
|
|
<div class="table">
|
|
|
<div class="title">
|
|
|
- <h3>藏品信息<el-button @click="goodsReturn" v-if="userAlso">归 还</el-button></h3>
|
|
|
+ <h3>
|
|
|
+ 藏品信息<el-button @click="goodsReturn" v-if="userAlso"
|
|
|
+ >归 还</el-button
|
|
|
+ >
|
|
|
+ </h3>
|
|
|
</div>
|
|
|
<el-table
|
|
|
@selection-change="handleSelectionChange"
|
|
|
@@ -50,15 +53,16 @@
|
|
|
border
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
- <el-table-column
|
|
|
- type="selection"
|
|
|
- :selectable="selectable"
|
|
|
- width="55">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="缩略图" width="160">
|
|
|
- <template #default='{row}'>
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ :selectable="selectable"
|
|
|
+ width="55"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="缩略图" width="160">
|
|
|
+ <template #default="{ row }">
|
|
|
<div class="smimg">
|
|
|
- <img :src="baseURL+row.thumb" alt="" />
|
|
|
+ <img :src="baseURL + row.thumb" alt="" />
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -76,9 +80,9 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<!-- 最下面的按钮 -->
|
|
|
- <div class="button">
|
|
|
- <el-button @click="$router.go(-1)">返回</el-button>
|
|
|
- </div>
|
|
|
+ <div class="button">
|
|
|
+ <el-button @click="$router.go(-1)">返回</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -125,35 +129,40 @@ export default {
|
|
|
{ id: 1, name: '已入库' },
|
|
|
{ id: 2, name: '未归还' }
|
|
|
]
|
|
|
- return list.filter(v => id === v.id)[0].name
|
|
|
+ return list.filter((v) => id === v.id)[0].name
|
|
|
},
|
|
|
// 点击归还
|
|
|
goodsReturn () {
|
|
|
- if (this.goodsIds.length === 0) return this.$message.warning('至少选中一个!')
|
|
|
+ if (this.goodsIds.length === 0) { return this.$message.warning('至少选中一个!') }
|
|
|
this.$confirm('确定归还吗?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
- }).then(async () => {
|
|
|
- const obj = { id: Number(this.myData.id), goodsIds: this.goodsIds.join(',') }
|
|
|
- const res = await goodsReturn(obj)
|
|
|
- // console.log(99999, res)
|
|
|
- if (res.code === 0) {
|
|
|
- this.$message.success('操作成功')
|
|
|
- this.getDetailById()
|
|
|
- } else this.$message.error('错误')
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消'
|
|
|
- })
|
|
|
})
|
|
|
+ .then(async () => {
|
|
|
+ const obj = {
|
|
|
+ id: Number(this.myData.id),
|
|
|
+ goodsIds: this.goodsIds.join(',')
|
|
|
+ }
|
|
|
+ const res = await goodsReturn(obj)
|
|
|
+ // console.log(99999, res)
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.getDetailById()
|
|
|
+ } else this.$message.error('错误')
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
// 表格的多选
|
|
|
handleSelectionChange (rows) {
|
|
|
// console.log(333, rows)
|
|
|
const temp = []
|
|
|
- rows.forEach(v => {
|
|
|
+ rows.forEach((v) => {
|
|
|
temp.push(v.id)
|
|
|
})
|
|
|
const temp2 = new Set(temp)
|
|
|
@@ -168,7 +177,7 @@ export default {
|
|
|
async getDetailById () {
|
|
|
const res = await getDetailById(this.myData.id)
|
|
|
this.tableData = res.data.goods
|
|
|
- this.tableData.forEach(v => {
|
|
|
+ this.tableData.forEach((v) => {
|
|
|
v.integrity = this.spoil(v.integrity)
|
|
|
v.goodsTypeId = this.category(v.goodsTypeId)
|
|
|
v.status = this.myStatus(v.status)
|
|
|
@@ -189,7 +198,7 @@ export default {
|
|
|
temp = JSON.parse(temp)
|
|
|
if (temp) {
|
|
|
const temp2 = temp.role[0]
|
|
|
- if (temp2 === 'sys_look' || temp2 === 'sys_collect') this.userAlso = false // 其他部门人员--征集部主任
|
|
|
+ if (temp2 === 'sys_look' || temp2 === 'sys_collect') { this.userAlso = false } // 其他部门人员--征集部主任
|
|
|
}
|
|
|
},
|
|
|
beforeCreate () {}, // 生命周期 - 创建之前
|
|
|
@@ -204,8 +213,7 @@ export default {
|
|
|
<style lang='less' scoped>
|
|
|
//@import url(); 引入公共css类
|
|
|
.holding0_result {
|
|
|
-
|
|
|
- /deep/#mytitle>span{
|
|
|
+ /deep/#mytitle > span {
|
|
|
font-weight: 800;
|
|
|
}
|
|
|
|
|
|
@@ -243,10 +251,11 @@ export default {
|
|
|
width: 50%;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.explain {
|
|
|
border: 1px solid #ccc;
|
|
|
color: black;
|
|
|
- padding: 30px 150px 30px 20px;
|
|
|
+ padding: 15px;
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
span {
|
|
|
@@ -254,7 +263,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.table {
|
|
|
- max-height: 420px;
|
|
|
+ max-height: 360px;
|
|
|
overflow: auto;
|
|
|
.smimg {
|
|
|
border: 3px solid #ccc;
|
|
|
@@ -271,11 +280,11 @@ export default {
|
|
|
color: black;
|
|
|
height: 50px;
|
|
|
line-height: 50px;
|
|
|
- &>h3{
|
|
|
+ & > h3 {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
- /deep/.el-button{
|
|
|
+ /deep/.el-button {
|
|
|
height: 30px;
|
|
|
margin-right: 20px;
|
|
|
display: flex;
|