浏览代码

初步完成征集品提用

shaogen1995 4 年之前
父节点
当前提交
d6ebffeb83

+ 60 - 0
src/apis/collect1.js

@@ -0,0 +1,60 @@
+import axios from '../utils/request'
+// 第一层获取列表
+export const getList = (data) => {
+  return axios({
+    method: 'post',
+    url: '/cms/collectIn/list',
+    data
+  })
+}
+// 点击申请出库
+export const enterBank = () => {
+  return axios({
+    method: 'post',
+    url: '/cms/collectIn/add'
+  })
+}
+// 第二层获取藏品列表
+export const getListTow = (data) => {
+  return axios({
+    method: 'post',
+    url: '/cms/collectIn/goodsList',
+    data
+  })
+}
+// 从第一层提交
+export const holding1submit = (data) => {
+  return axios({
+    method: 'post',
+    url: '/cms/collectIn/edit',
+    data
+  })
+}
+// 通过第一层的id获取详情
+export const getDetailById = (id) => {
+  return axios({
+    url: `/cms/collectIn/detail/${id}`
+  })
+}
+// 第一层点击删除
+export const delData = (id) => {
+  return axios({
+    url: `/cms/collectIn/remove/${id}`
+  })
+}
+// 从holding1_audit点击审核
+export const holding1Audit = (data) => {
+  return axios({
+    method: 'post',
+    url: '/cms/collectIn/audit',
+    data
+  })
+}
+// holding2_look点击归还
+export const goodsReturn = (data) => {
+  return axios({
+    method: 'post',
+    url: '/cms/storageOut/goodsReturn',
+    data
+  })
+}

+ 20 - 1
src/router/index.js

@@ -178,7 +178,26 @@ const router = new VueRouter({
           path: 'collect1',
           meta: { myInd: 2 },
           component: () => import('@/views/collect/collect1.vue')
-        }, {
+        },
+        {
+          name: 'collect1_add',
+          path: 'collect1_add',
+          meta: { myInd: 2 },
+          component: () => import('@/views/collect/collect1_add.vue')
+        },
+        {
+          name: 'collect1_audit',
+          path: 'collect1_audit',
+          meta: { myInd: 2 },
+          component: () => import('@/views/collect/collect1_audit.vue')
+        },
+        {
+          name: 'collect1_look',
+          path: 'collect1_look',
+          meta: { myInd: 2 },
+          component: () => import('@/views/collect/collect1_look.vue')
+        },
+        {
           name: 'collect2',
           path: 'collect2',
           meta: { myInd: 2 },

+ 5 - 5
src/views/collect/collect0.vue

@@ -183,9 +183,9 @@ export default {
       this.tableData.forEach(v => {
         if (v.textureType === 0) v.textureType = '单一质地'
         else v.textureType = '复合质地'
-        if (v.status === 0) v.status = '待入库'
-        else if (v.status === 1) v.status = '已入库'
-        else v.status = '已出库'
+        if (v.status === 0) v.status = '保管中'
+        else if (v.status === 1) v.status = '已提用'
+        else v.status = '已注销'
         v.numTypeId = this.mycategory(v.numTypeId)
         v.integrity = this.spoil(v.integrity)
         v.repair = this.mySave(v.repair)
@@ -289,8 +289,8 @@ export default {
             // width: 80px;
             // height: 60px;
             img {
-              margin: 5px 0 0 5px;
-              width: 50px;
+              // margin: 5px 0 0 5px;
+              width: 100%;
               // height: 50px;
             }
           }

+ 4 - 7
src/views/collect/collect0_look.vue

@@ -18,9 +18,9 @@
         <div class="conten_right">
           <div class="title">
             <h3>{{ myObj.name }}</h3>
-            <div v-if="myObj.status==='已入库'">已入库</div>
-            <div v-else-if="myObj.status==='待入库'" style="background-color: #ccc;">待入库</div>
-            <div v-else style="background-color: #85ce61;">已出库</div>
+            <div v-if="myObj.status==='保管中'">保管中</div>
+            <div v-else-if="myObj.status==='已提用'" style="background-color: #ccc;">已提用</div>
+            <div v-else style="background-color: #85ce61;">已注销</div>
           </div>
           <div class="info">
             <div class="row">
@@ -60,9 +60,6 @@
               <div><span>保存状态:</span>{{ myObj.repair }}</div>
               <div><span>入藏时间范围:</span>{{ myObj.checkInScope }}</div>
             </div>
-            <div class="row">
-              <div><span>藏品位置:</span>{{myObj.outPath}}</div>
-            </div>
           </div>
         </div>
         <div class="conten_bot">
@@ -293,7 +290,7 @@ body .el-table::before {
             text-align: center;
     height: 40px;
     img {
-      width: 40px;
+      // width: 40px;
       height: 40px;
     }
   }

+ 338 - 18
src/views/collect/collect1.vue

@@ -1,6 +1,6 @@
 <!--  -->
 <template>
-  <div class="collect1">
+  <div class="holding">
     <TabList :ind='1'/>
     <div class="right">
       <div class="top">
@@ -8,37 +8,310 @@
           <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>
+      <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>
+          </ul>
+          <div class="select">
+            <span>登记人:</span>
+            <el-input
+              v-model="myData.searchKey"
+              placeholder="请输入"
+              style="width: 217px"
+            ></el-input>
+            <span>日期范围:</span>
+            <el-date-picker
+              v-model="time"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            >
+            </el-date-picker>
+            <el-button style="margin-left: 20px" @click="inquire">查询</el-button>
+            <el-button type="primary" @click="enterBank">申请提用</el-button>
+          </div>
+          <!--表格 -->
+          <div class="table">
+            <el-table
+              :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
+              :data="tableData"
+              border
+              style="width: 100%"
+            >
+              <el-table-column prop="num" label="提用单号" >
+              </el-table-column>
+              <el-table-column prop="realName" label="登记人" width="200">
+              </el-table-column>
+              <el-table-column prop="type" label="提用类型" width="200">
+              </el-table-column>
+              <el-table-column prop="createTime" label="登记日期" width="280">
+              </el-table-column>
+              <el-table-column prop="updateTime" label="提用日期" width="280">
+              </el-table-column>
+              <el-table-column prop="status" label="状态" width="200">
+              </el-table-column>
+              <el-table-column label="操作" width="200">
+                <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)">审核</el-button>
+                  <el-button type="text" v-if="row.status==='待办理'" @click="compile(row)">编辑</el-button>
+                  <el-button type="text" v-if="row.status==='待办理'||row.status==='待审核'||row.status==='审核不通过'" @click="delData(row.id)">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+          <!-- 分页器 -->
+          <div class="paging">
+            <el-pagination
+              @current-change="currentChange"
+              @size-change="sizeChange"
+              background
+              layout="prev, pager, next,sizes,jumper"
+              :total="total"
+            >
+            </el-pagination>
+          </div>
+        </div>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
+import { getList, enterBank, delData } from '@/apis/collect1'
 import TabList from '@/components/tabLeft2.vue'
 export default {
   name: 'collect1',
-  // import引入的组件需要注入到对象中才能使用
   components: { TabList },
   data () {
-    // 这里存放数据
     return {
-
+      total: 0,
+      myData: {
+        endTime: '', // 结束时间
+        pageNum: 1, // 起始页码,默认1为第一页
+        pageSize: 10, // 每页数量
+        searchKey: '', // 搜索条件
+        startTime: '', // 开始时间
+        status: null // 状态,不传返回全部,0:草稿中, 1:待审核, 2:审核不通过, 3:审核通过,
+      },
+      // 选择状态的变量
+      stateInd: 0,
+      stateArr: [
+        { txt: '全部', num: 0 },
+        { txt: '待审核', num: 0 },
+        { txt: '待办理', num: 0 },
+        { txt: '已完成', num: 0 },
+        { txt: '审核不通过', num: 0 }
+      ],
+      type: '',
+      time: '',
+      // 表格数据
+      tableData: []
     }
   },
   // 监听属性 类似于data概念
   computed: {},
   // 监控data中的数据变化
-  watch: {},
+  watch: {
+    // 处理时间
+    time (val) {
+      this.handleSelect(val)
+    }
+  },
   // 方法集合
   methods: {
-
+    // 点击查询
+    inquire () {
+      this.myData.pageNum = 1
+      this.getList(this.myData)
+    },
+    // 分页器
+    currentChange (val) {
+      // console.log('当前页改变了', val)
+      // this.myData.sourceId = null
+      // this.myData.searchKey = ''
+      // this.time = []
+      // this.myData.endTime = ''
+      // this.myData.startTime = ''
+      this.myData.pageNum = val
+      this.getList(this.myData)
+      this.$nextTick(() => {
+        // 所有dom加载完毕之后---要执行的代码
+        setTimeout(() => {
+          if (this.tableData.length === 0) {
+            this.myData.pageNum = 1
+            this.getList(this.myData)
+          }
+        }, 100)
+      })
+    },
+    sizeChange (val) {
+      // this.myData.sourceId = null
+      // this.myData.searchKey = ''
+      // this.time = []
+      // this.myData.endTime = ''
+      // this.myData.startTime = ''
+      // console.log('条数改变了', val)
+      this.myData.pageSize = val
+      this.getList(this.myData)
+    },
+    // 点击上面的状态切换
+    stateSelect (index) {
+      if (index !== this.stateInd) {
+        this.myData.pageNum = 1
+        // 点击待审核
+        if (index === 1) {
+          this.myData.status = 1
+          this.getList(this.myData)
+        } else if (index === 2) {
+          // 点击待办理
+          this.myData.status = 0
+          this.getList(this.myData)
+        } else if (index === 3) {
+          // 点击已完成
+          this.myData.status = 3
+          this.getList(this.myData)
+        } else if (index === 4) {
+          // 点击审核不通过
+          this.myData.status = 2
+          this.getList(this.myData)
+        } else if (index === 0) {
+          // 点击全部
+          this.myData.status = ''
+          this.getList(this.myData)
+        }
+      }
+      this.stateInd = index
+    }, // 点击查看
+    myLook (val) {
+      this.$router.push({
+        path: '/layout/collect1_look',
+        query: val
+      })
+    },
+    // 点击删除
+    async delData (id) {
+      this.$confirm('确定删除吗?', '提示', {
+        confirmButtonText: '删除',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        // 发请求删除
+        await delData(id)
+        // 发请求刷新页面
+        this.getList(this.myData)
+        this.$message({
+          type: 'success',
+          message: '删除成功!'
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消.'
+        })
+      })
+    },
+    // 点击编辑
+    compile (val) {
+      this.$router.push({
+        path: '/layout/collect1_add',
+        query: val
+      })
+    },
+    // 点击审核
+    audit (val) {
+      this.$router.push({
+        path: '/layout/collect1_audit',
+        query: val
+      })
+    },
+    // 点击申请入库
+    async enterBank () {
+      const res = await enterBank()
+      this.$router.push({
+        path: '/layout/collect1_add',
+        query: res.data
+      })
+    },
+    // 状态的数据处理
+    myStateDan (id) {
+      const list = [
+        { id: 0, name: '待办理' },
+        { id: 1, name: '待审核' },
+        { id: 2, name: '审核不通过' },
+        { id: 3, name: '待归还' },
+        { id: 4, name: '已归还' }
+      ]
+      return list.filter(v => id === v.id)[0].name
+    },
+    // 封装获取列表方法
+    async getList (data) {
+      const res = await getList(data)
+      this.total = res.data.total
+      // console.log(666, res.data.list)
+      this.tableData = res.data.list
+      this.tableData.forEach(v => {
+        v.status = this.myStateDan(v.status)
+        if (v.type) v.type = this.CKtype(v.type)
+        // v.updateTime = v.updateTime.slice(0, 10)
+        // v.createTime = v.createTime.slice(0, 10)
+      })
+    },
+    // 时间处理----------------
+    handleSelect (e) {
+      const date = []
+      for (const i in e) {
+        date.push(this.gettime(e[i]))
+      }
+      this.myData.startTime = date[0]
+      this.myData.endTime = date[1]
+    },
+    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())
+      return value
+    },
+    checkTime (i) {
+      if (i < 10) {
+        i = '0' + i
+      }
+      return i
+    }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {},
+  created () {
+    this.getList(this.myData)
+  },
   // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {},
+  async mounted () {
+    // 进页面拿到所有数据
+    const res = await getList({ ...this.myData, pageSize: 99999 })
+    this.stateArr[0].num = res.data.list.length
+    let num1 = 0
+    let num2 = 0
+    let num3 = 0
+    let num4 = 0
+    res.data.list.forEach(v => {
+      if (v.status === 1) num1++
+      if (v.status === 0) num2++
+      if (v.status === 3) num3++
+      if (v.status === 2) num4++
+    })
+    this.stateArr[1].num = num1
+    this.stateArr[2].num = num2
+    this.stateArr[3].num = num3
+    this.stateArr[4].num = num4
+  },
   beforeCreate () {}, // 生命周期 - 创建之前
   beforeMount () {}, // 生命周期 - 挂载之前
   beforeUpdate () {}, // 生命周期 - 更新之前
@@ -49,16 +322,14 @@ export default {
 }
 </script>
 <style lang='less' scoped>
-//@import url(); 引入公共css类
-.collect1 {
+.holding {
     /deep/#mytitle>span{
     font-weight: 800;
   }
+
   display: flex;
   .right {
     width: 100%;
-    display: flex;
-    flex-direction: column;
     .top {
       padding-left: 35px;
       display: flex;
@@ -68,11 +339,60 @@ export default {
       height: 40px;
       background-color: #fff;
     }
-  }
-  .conten {
-    flex: 1;
-    background-color: #fff;
-    margin: 20px 20px 40px;
+    .conten {
+      padding: 20px 20px 40px;
+      width: 100%;
+      height: 829px;
+      .middle {
+        .title{
+          height: 60px;
+          border-bottom: 1px solid #ccc;
+          margin: 0 25px;
+          display: flex;
+          align-items: center;
+          color: black;
+          .active{
+            color: #409eff;
+            border-bottom: 2px solid #409eff;
+          }
+          li {
+            height: 60px;
+            line-height: 60px;
+            padding: 0 15px;
+            text-align: center;
+            margin-left: 40px;
+            cursor: pointer;
+          }
+        }
+        position: relative;
+        width: 100%;
+        height: 100%;
+        background-color: #fff;
+        .select {
+          color: black;
+          padding: 30px 0 0 0;
+          & > span {
+            margin-left: 30px;
+          }
+        }
+        .table {
+          max-height: 580px;
+          max-width: 1710px;
+          // overflow: auto;
+          padding: 24px;
+          /deep/.el-table__body-wrapper{
+            max-height: 510px;
+            overflow-y: auto;
+          }
+        }
+        .paging {
+          position: absolute;
+          bottom: 15px;
+          left: 50%;
+          transform: translateX(-50%);
+        }
+      }
+    }
   }
 }
 </style>

+ 219 - 0
src/views/collect/collect1_Dialog.vue

@@ -0,0 +1,219 @@
+<template>
+  <el-dialog title="添加藏品" :visible="dialogFormVisible" @close="cancel()">
+    <div class="query">
+      <span>藏品名称:</span>
+      <el-input
+        v-model="myData.searchKey"
+        placeholder="请输入"
+        style="width: 280px; margin-right: 40px"
+      ></el-input>
+      <el-button @click="search">查 询</el-button>
+    </div>
+    <!-- 表格 -->
+    <el-table
+      ref="multipleTable"
+      @selection-change="handleSelectionChange"
+      :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
+      :data="tableData"
+      border
+      style="width: 100%"
+    >
+      <el-table-column type="selection" width="55"> </el-table-column>
+      <el-table-column label="缩略图" width="140">
+        <template #default="{ row }">
+          <div class="smimg">
+            <img :src="baseURL + row.thumb" alt="" />
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="registerNum" label="总登记号" width="180">
+      </el-table-column>
+      <el-table-column prop="name" label="藏品名称"> </el-table-column>
+      <el-table-column prop="goodsTypeName" label="类别" width="180">
+      </el-table-column>
+    </el-table>
+    <!-- 分页器 -->
+    <div class="paging" v-if="0">
+      <el-pagination
+        :current-page='myData.pageNum'
+        @current-change="currentChange"
+        @size-change="sizeChange"
+        background
+        layout="prev, pager, next,sizes,jumper"
+        :total="total"
+      >
+      </el-pagination>
+    </div>
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="btnOK">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import axios from '@/utils/request'
+import { getListTow } from '@/apis/collect1.js'
+export default {
+  name: 'collect1_Dialog',
+  components: {},
+  props: {
+    dialogFormVisible: {
+      type: Boolean,
+      default: false
+    },
+    myTemp: {
+      type: Array,
+      default: function () {
+        return []
+      }
+    }
+  },
+  data () {
+    return {
+      goodsIds: '',
+      // 表格数据的筛选
+      myData: {
+        pageNum: 1,
+        pageSize: 99999,
+        searchKey: ''
+      },
+      // 分页器总数
+      total: 0,
+      // 服务器前缀地址
+      baseURL: '',
+      // 表格数据
+      tableData: [],
+      // 传递给父元素的表格数据
+      fatabList: [],
+      tableObj: {}
+
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  // 方法集合
+  methods: {
+    // 分页器页码改变
+    currentChange (val) {
+      this.myData.pageNum = val
+      this.getListTow(this.myData)
+      this.$nextTick(() => {
+        // 所有dom加载完毕之后---要执行的代码
+        setTimeout(() => {
+          if (this.tableData.length === 0) {
+            this.myData.pageNum = 1
+            this.getListTow(this.myData)
+          }
+        }, 100)
+      })
+    },
+    // 每一页显示条数改变
+    sizeChange (val) {
+      // console.log(val)
+      // this.myData.pageSize = val
+      this.getListTow(this.myData)
+    },
+    // 点击查询
+    search () {
+      this.myData.pageNum = 1
+      this.getListTow(this.myData)
+    },
+    // 表格的多选
+    handleSelectionChange (rows) {
+      // console.log(this.myData.pageNum)
+      const temp = []
+      this.tableObj[this.myData.pageNum] = rows
+      // console.log(666, this.tableObj)
+      for (const k in this.tableObj) {
+        this.tableObj[k].forEach(v => {
+          temp.push(v)
+        })
+      }
+      this.fatabList = temp
+    },
+    // 点击确定
+    btnOK () {
+      // 把选中的数据传给父组件
+
+      this.$emit('getSonList', this.fatabList)
+
+      this.cancel()
+    },
+    // 点击取消
+    cancel () {
+      this.$emit('update:dialogFormVisible', false)
+      this.myData.searchKey = ''
+      this.myData.pageNum = 1
+    },
+    // 获取藏品列表---让父组件调用
+    async getListTow (data) {
+      const res = await getListTow(data)
+      this.tableData = res.data.list
+      // 表格的默认选中
+      this.myTemp.forEach(v => {
+        this.tableData.forEach((i, ind) => {
+          // eslint-disable-next-line
+          if (v.id == i.id) {
+            this.$nextTick(() => {
+              this.$refs.multipleTable.toggleRowSelection(this.tableData[ind], true)
+            })
+          }
+        })
+      })
+      // 表格的默认选中
+      // this.myTemp.forEach(v => {
+      //   console.log(666, v)
+      // })
+
+      this.total = res.data.total
+    }
+  },
+  created () {
+    // 获取服务器前缀地址
+    this.baseURL = axios.defaults.baseURL
+  },
+  mounted () {
+  },
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+<style lang='less' scoped>
+.paging {
+  position: absolute;
+  bottom: 20px;
+  left: 50%;
+  transform: translateX(-50%);
+}
+.query {
+  height: 85px;
+  align-items: center;
+  display: flex;
+}
+/deep/.el-dialog__body {
+  padding: 0px 20px 20px;
+  overflow: auto;
+  max-height: 556px;
+}
+.row {
+  display: flex;
+  /deep/& > div {
+    flex: 1;
+  }
+}
+.smimg {
+  height: 60px;
+  img {
+    width: 100%;
+    height: 100%;
+    border: 3px solid #ccc;
+  }
+}
+</style>

+ 397 - 0
src/views/collect/collect1_add.vue

@@ -0,0 +1,397 @@
+<!--  -->
+<template>
+  <div class="holdingAdd">
+    <TabList :ind='1'/>
+    <div class="right">
+      <div class="top">
+        <el-breadcrumb separator="/">
+          <!-- <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item> -->
+          <el-breadcrumb-item to="">首页</el-breadcrumb-item>
+          <el-breadcrumb-item to="">征集品管理</el-breadcrumb-item>
+          <el-breadcrumb-item>征集品提用</el-breadcrumb-item>
+          <el-breadcrumb-item id="mytitle">{{mydata.description?'编辑':'新增'}}</el-breadcrumb-item>
+        </el-breadcrumb>
+      </div>
+      <div class="conten">
+        <el-form
+          :model="fromData"
+          :rules="rules"
+          ref="fromData"
+          label-width="140px"
+          class="demo-ruleForm"
+        >
+          <div class="one_row">
+            <el-form-item label="提用编号:" prop="number" style="width: 45%">
+              <el-input v-model="fromData.number" disabled></el-input>
+            </el-form-item>
+            <el-form-item label="登记人员:" prop="people" style="width: 45%">
+              <el-input v-model="fromData.people" disabled></el-input>
+            </el-form-item>
+          </div>
+       <div class="one_row">
+            <el-form-item label="提用类型:"  style="width: 45%">
+              <el-select
+                v-model="fromData.source"
+                placeholder="请选择"
+                style="width: 100%"
+              >
+                <el-option label="展览" value="exhibition"></el-option>
+                <el-option label="研究" value="study"></el-option>
+                <el-option label="修复" value="repair"></el-option>
+                <el-option label="复制" value="copy"></el-option>
+                <el-option label="文创" value="cultural"></el-option>
+                <el-option label="其他" value="other"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="提用说明:" prop='textarea'  style="width: 45%">
+              <el-input v-model="fromData.textarea"></el-input>
+            </el-form-item>
+          </div>
+        </el-form>
+        <!-- 藏品信息 -->
+        <div class="info">
+          <div class="title">
+            <h3>藏品信息</h3>
+            <div class="btn">
+              <el-button size="small" @click="addObject">添 加</el-button>
+              <el-button size="small" @click="deleteS">删 除</el-button>
+            </div>
+          </div>
+          <!--表格 -->
+          <div class="table">
+            <el-table
+              @selection-change="handleSelectionChange"
+              :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
+              :data="tableData"
+              border
+              style="width: 100%"
+            >
+              <el-table-column type="selection" width="40"> </el-table-column>
+              <el-table-column label="缩略图" width="146">
+                <template #default='{row}'>
+                  <div class="smimg">
+                    <img :src="baseURL+row.thumb" alt="" />
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="registerNum" label="总登记号" width="235">
+              </el-table-column>
+              <el-table-column prop="name" label="藏品名称">
+              </el-table-column>
+              <el-table-column prop="goodsTypeId" label="类别" width="180">
+              </el-table-column>
+              <el-table-column prop="integrity" label="完残程度" width="130">
+              </el-table-column>
+              <el-table-column prop="age" label="藏品年代" width="130">
+              </el-table-column>
+              <el-table-column label="提用位置" width="230">
+                <template #default='scopt'>
+                  <el-input  v-model="tableData[scopt.$index].outPath" placeholder="请输入位置"></el-input>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
+        <!-- 最下面的2个按钮 -->
+        <div class="bot_btn">
+          <el-button type="primary" @click="submit">提 交</el-button>
+          <el-button @click="goBack">返 回</el-button>
+        </div>
+      </div>
+    </div>
+    <!-- 点击添加出现弹窗 -->
+    <Collect1Dialog :dialogFormVisible.sync="isShow" ref="myDialog" @getSonList='getSonList' :myTemp='myTemp'/>
+  </div>
+</template>
+
+<script>
+import { holding1submit, getDetailById } from '@/apis/collect1'
+import axios from '@/utils/request'
+import TabList from '@/components/tabLeft2.vue'
+import Collect1Dialog from './collect1_Dialog.vue'
+export default {
+  name: 'collect1_add',
+  components: {
+    Collect1Dialog,
+    TabList
+  },
+  data () {
+    return {
+      // 手动输入的每个藏品位置
+      // location: [],
+      locations: {},
+      // 传递给弹窗的表格数据,用来筛选
+      myTemp: [],
+      // 处理从子组件拿到的数据的id集合数组
+      goodsIds: [],
+      // 服务器前缀地址
+      baseURL: '',
+      mydata: {},
+      // 控制弹出层显示隐藏
+      isShow: false,
+      // 表单数据
+      fromData: {
+        number: '',
+        people: '',
+        textarea: '',
+        source: 'exhibition'
+      },
+      // 表单验证
+      rules: {
+        number: [{ required: true, message: '不能为空', trigger: 'blur' }],
+        people: [{ required: true, message: '不能为空', trigger: 'blur' }],
+        textarea: [{ required: true, message: '不能为空', trigger: 'blur' }]
+      },
+      // 表格数据
+      tableData: [],
+      // 表格选中后的暂存数据
+      delArr: []
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {
+    isShow (val) {
+      // if (!val) {
+      //   console.log(77777)
+      //   this.getSonList()
+      // }
+    }
+  },
+  // 方法集合
+  methods: {
+    // 从子组件哪里拿到选中的数据
+    getSonList (data) {
+      // console.log(9999999, data)
+
+      // data.forEach(v => {
+      //   v.integrity = this.spoil(v.integrity)
+      //   v.goodsTypeId = this.category(v.goodsTypeId)
+      // })
+      const temp = []
+      data.forEach(v => {
+        temp.push(v.id)
+      })
+      const temp2 = new Set(temp)
+      this.goodsIds = [...temp2]
+      // console.log(999, this.goodsIds)
+      this.tableData = data
+      this.tableData.forEach(v => {
+        v.integrity = this.spoil(v.integrity)
+        v.goodsTypeId = this.category(v.goodsTypeId)
+        // 位置信息数组
+        if (!v.outPath) v.outPath = ''
+      })
+    },
+    // 多层选择器的事件
+    handleChange (value) {
+      console.log(value)
+    },
+    // 表格的多选
+    handleSelectionChange (val) {
+      this.delArr = val
+    },
+    // 点击删除
+    deleteS () {
+      if (this.delArr.length === 0) return this.$message.warning('至少选中一条!')
+      this.$confirm('确定删除吗?', '提示', {
+        confirmButtonText: '删除',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        const temp = this.goodsIds
+        this.delArr.forEach((v) => {
+          // 删除数据,刷新页面
+          this.tableData.forEach((item, index) => {
+            // eslint-disable-next-line
+            if (v.id == item.id) this.tableData.splice(index, 1)
+          })
+          // 改变发请求id
+          temp.forEach((item, index) => {
+            // eslint-disable-next-line
+            if (v.id == item) temp.splice(index, 1)
+          })
+        })
+        this.goodsIds = temp
+        // console.log(99999, this.goodsIds)
+        this.$message({
+          type: 'success',
+          message: '删除成功!'
+        })
+        // 更新藏品位置信息
+        this.locations = {}
+        this.tableData.forEach((v, i) => {
+          // this.location = this.location.splice(i, 1)
+          this.locations[v.id] = this.tableData[i].outPath
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消.'
+        })
+      })
+    },
+    // 点击添加
+    addObject () {
+      // 把当前表格的数据传递过去,防止重复选择
+      this.myTemp = this.tableData
+      // 调用子组件方法
+      this.$refs.myDialog.getListTow({ pageNum: 1, pageSize: 99999 })
+      this.isShow = true
+    },
+    // 点击返回
+    goBack () {
+      // 手动整理所有输入的出库位置信息
+      this.tableData.forEach((v, i) => {
+        this.locations[v.id] = this.tableData[i].outPath
+      })
+      const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: null, type: this.fromData.source, location: this.locations }
+      this.$confirm('您需要保存这条数据吗?', '提示', {
+        confirmButtonText: '保存',
+        cancelButtonText: '放弃',
+        type: 'warning'
+      }).then(async () => {
+        if (this.fromData.textarea.trim() === '') return this.$message.warning('提用说明不能为空')
+        // 发请求
+        await holding1submit(obj)
+        this.$router.push('/layout/collect1')
+        this.$message({
+          type: 'success',
+          message: '保存成功!'
+        })
+      }).catch(() => {
+        this.$router.push('/layout/collect1')
+        this.$message({
+          type: 'info',
+          message: '放弃保存.'
+        })
+      })
+    },
+    // 点击提交
+    async submit () {
+      if (this.fromData.textarea.trim() === '') return this.$message.warning('提用说明不能为空')
+      // 手动整理所有输入的出库位置信息
+      this.tableData.forEach((v, i) => {
+        this.locations[v.id] = this.tableData[i].outPath
+      })
+      const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: 1, type: this.fromData.source, location: this.locations }
+      // console.log(999, obj)
+      await holding1submit(obj)
+      this.$message.success('提交成功')
+      this.$router.push('/layout/collect1')
+    }
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {
+    // 获取服务器前缀地址
+    this.baseURL = axios.defaults.baseURL
+    // 从第一层拿到传过来的数据
+    this.mydata = this.$route.query
+    this.mydata.id = Number(this.mydata.id)
+    this.fromData.people = this.mydata.realName
+    this.fromData.number = this.mydata.num
+    this.fromData.textarea = this.mydata.description
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  async mounted () {
+    // 如果是编辑
+    if (this.mydata.goodsIds) {
+      // 通过id获取列表详情
+      const res = await getDetailById(this.mydata.id)
+      this.tableData = res.data.goods
+      this.tableData.forEach(v => {
+        v.integrity = this.spoil(v.integrity)
+        v.goodsTypeId = this.category(v.goodsTypeId)
+        // 回显出库位置
+        // this.location.push(v.outPath)
+      })
+
+      this.goodsIds = this.mydata.goodsIds.split(',')
+    }
+  },
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+<style lang='less' scoped>
+//@import url(); 引入公共css类
+.holdingAdd {
+  /deep/#mytitle > span {
+    font-weight: 800;
+  }
+  display: flex;
+  .right {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    .top {
+      padding-left: 35px;
+      display: flex;
+      align-items: center;
+      box-shadow: 1px 1px 10px 1px;
+      margin-left: 2px;
+      height: 40px;
+      background-color: #fff;
+    }
+  }
+  .conten {
+    position: relative;
+    padding: 40px 0 0 20px;
+    flex: 1;
+    background-color: #fff;
+    margin: 20px 20px 40px;
+    .one_row {
+      display: flex;
+      justify-content: start;
+    }
+    .tow_row {
+      display: flex;
+      justify-content: start;
+    }
+    .info {
+      // max-height: 390px;
+      // overflow: auto;
+      width: 86%;
+      border: 1px solid #ccc;
+      margin-left: 70px;
+      .title {
+        color: black;
+        display: flex;
+        justify-content: space-between;
+        height: 52px;
+        align-items: center;
+        padding: 0 30px;
+      }
+      .table {
+        /deep/.el-table__body-wrapper{
+          max-height: 360px;
+          overflow-y: auto;
+        }
+        .smimg {
+          border: 3px solid #ccc;
+          height: 78px;
+          img {
+            width: 100%;
+            height: 100%;
+          }
+        }
+      }
+    }
+    .bot_btn {
+      display: flex;
+      justify-content: space-between;
+      position: absolute;
+      bottom: 20px;
+      left: 50%;
+      transform: translateX(-50%);
+      width: 230px;
+    }
+  }
+}
+</style>

+ 253 - 0
src/views/collect/collect1_audit.vue

@@ -0,0 +1,253 @@
+<!--  -->
+<template>
+  <div class="holding2_audit">
+    <TabList :ind='1'/>
+    <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>征集品提用</el-breadcrumb-item>
+          <el-breadcrumb-item id="mytitle">审核</el-breadcrumb-item>
+        </el-breadcrumb>
+      </div>
+      <div class="conten">
+        <div class="info">
+          <div>
+            <h4>提用编号:</h4>
+            <span>{{myData.num}}</span>
+          </div>
+          <div>
+            <h4>登记人员:</h4>
+            <span>{{myData.realName}}</span>
+          </div>
+          <div>
+            <h4>提用类型:</h4>
+            <span>{{myData.type}}</span>
+          </div>
+          <div>
+            <h4>提用说明:</h4>
+            <span>{{myData.description}}</span>
+          </div>
+        </div>
+        <!-- 表格 -->
+        <div class="table">
+          <div class="title">
+            <h3>藏品信息</h3>
+          </div>
+          <el-table
+            :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
+            :data="tableData"
+            border
+            style="width: 100%"
+          >
+            <el-table-column label="缩略图" width="160">
+              <template #default='{row}'>
+                <div class="smimg">
+                  <img :src="baseURL+row.thumb" alt="" />
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="registerNum" label="总登记号" width="235">
+            </el-table-column>
+            <el-table-column prop="name" label="藏品名称"> </el-table-column>
+            <el-table-column prop="goodsTypeId" label="类别" width="180">
+            </el-table-column>
+            <el-table-column prop="integrity" label="完残程度" width="180">
+            </el-table-column>
+            <el-table-column prop="storageId" label="提用位置" width="300">
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="txt">
+          <el-form
+            :model="fromData"
+            :rules="rules"
+            ref="fromData"
+            label-width="100px"
+            class="demo-ruleForm"
+          >
+            <el-form-item label="审核结果:" prop="result">
+              <el-select v-model="fromData.result" placeholder="请选择">
+                <el-option label="通过" :value="3"></el-option>
+                <el-option label="不通过" :value="2"></el-option>
+              </el-select>
+            </el-form-item>
+
+            <el-form-item
+              label="审核说明:"
+              prop="textarea"
+            >
+              <el-input
+                type="textarea"
+                :rows="3"
+                v-model="fromData.textarea"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-form>
+        </div>
+        <!-- 最下面的按钮 -->
+        <div class="button">
+          <el-button type="primary" @click="submit">提交</el-button>
+          <el-button @click="$router.go(-1)">返回</el-button>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getDetailById, holding1Audit } from '@/apis/collect1'
+import axios from '@/utils/request'
+import TabList from '@/components/tabLeft2.vue'
+export default {
+  name: 'collect1_audit',
+  // import引入的组件需要注入到对象中才能使用
+  components: { TabList },
+  data () {
+    // 这里存放数据
+    return {
+      // 服务器前缀地址
+      baseURL: '',
+      myData: {},
+      fromData: {
+        textarea: '',
+        result: 3
+      },
+      rules: {
+        textarea: [
+          { required: true, message: '不能为空', trigger: 'blur' },
+          { max: 255, message: '不能超过255个字符', trigger: 'blur' }
+        ],
+        result: [
+          { required: true, message: '请选择活动区域', trigger: 'change' }
+        ]
+      },
+      auditResult: '',
+      // 表格数据
+      tableData: []
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  // 方法集合
+  methods: {
+    // 点击提交
+    async submit () {
+      try {
+        await this.$refs.fromData.validate()
+        const obj = { id: this.myData.id, reason: this.fromData.textarea, status: this.fromData.result }
+        const res = await holding1Audit(obj)
+        if (res.code === 0) {
+          this.$message.success('审核成功')
+          this.$router.push('/layout/collect1')
+        } else this.$message.warning(res.msg)
+      } catch (error) {
+        console.log(error)
+      }
+    }
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  async created () {
+    // 获取服务器前缀地址
+    this.baseURL = axios.defaults.baseURL
+    // 拿到路由传递过来的参数
+    this.myData = this.$route.query
+    // 通过id获取列表详情
+    const res = await getDetailById(this.myData.id)
+    this.tableData = res.data.goods
+    this.tableData.forEach(v => {
+      v.integrity = this.spoil(v.integrity)
+      v.goodsTypeId = this.category(v.goodsTypeId)
+    })
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {},
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+<style lang='less' scoped>
+//@import url(); 引入公共css类
+.holding2_audit {
+  /deep/#mytitle > span {
+    font-weight: 800;
+  }
+
+  display: flex;
+  .right {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    .top {
+      padding-left: 35px;
+      display: flex;
+      align-items: center;
+      box-shadow: 1px 1px 10px 1px;
+      margin-left: 2px;
+      height: 40px;
+      background-color: #fff;
+    }
+  }
+  .conten {
+    position: relative;
+    flex: 1;
+    background-color: #fff;
+    margin: 20px 20px 40px;
+    padding: 35px;
+    .info {
+      display: flex;
+      flex-wrap: wrap;
+      & > div {
+        padding-left: 20px;
+        color: black;
+        height: 50px;
+        display: flex;
+        align-items: center;
+        border: 1px solid #ccc;
+        width: 50%;
+      }
+    }
+    .table {
+      max-height: 288px;
+      overflow: auto;
+      .smimg {
+        border: 3px solid #ccc;
+        height: 68px;
+        img {
+          width: 100%;
+          height: 100%;
+        }
+      }
+      margin-top: 38px;
+      border: 1px solid #ccc;
+      .title {
+        padding-left: 30px;
+        color: black;
+        height: 50px;
+        line-height: 50px;
+      }
+    }
+    .txt {
+      margin-top: 38px;
+    }
+    .button {
+      position: absolute;
+      left: 50%;
+      bottom: 20px;
+      transform: translateX(-50%);
+      width: 240px;
+      display: flex;
+      justify-content: space-between;
+    }
+  }
+}
+</style>

+ 290 - 0
src/views/collect/collect1_look.vue

@@ -0,0 +1,290 @@
+<!--  -->
+<template>
+  <div class="holding0_result">
+    <TabList :ind='1'/>
+    <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>出库管理</el-breadcrumb-item>
+          <el-breadcrumb-item id="mytitle">查看</el-breadcrumb-item>
+        </el-breadcrumb>
+      </div>
+      <div class="conten">
+        <div class="info">
+          <div>
+            <h4>出库编号:</h4>
+            <span>{{myData.num}}</span>
+          </div>
+          <div>
+            <h4>出库人员:</h4>
+            <span>{{myData.realName}}</span>
+          </div>
+          <div>
+            <h4>出库类型:</h4>
+            <span>{{myData.type}}</span>
+          </div>
+          <div>
+            <h4>出库说明:</h4>
+            <span>{{myData.description}}</span>
+          </div>
+          <div>
+            <h4>审核结果:</h4>
+            <span>{{myData.status}}</span>
+          </div>
+          <div>
+            <h4>审核说明:</h4>
+            <span>{{myData.reason}}</span>
+          </div>
+        </div>
+        <!-- 表格 -->
+        <div class="table">
+          <div class="title">
+            <h3>藏品信息<el-button @click="goodsReturn">归 还</el-button></h3>
+          </div>
+          <el-table
+            @selection-change="handleSelectionChange"
+            :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
+            :data="tableData"
+            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}'>
+                <div class="smimg">
+                  <img :src="baseURL+row.thumb" alt="" />
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="registerNum" label="总登记号" width="235">
+            </el-table-column>
+            <el-table-column prop="name" label="藏品名称"> </el-table-column>
+            <el-table-column prop="goodsTypeId" label="类别" width="180">
+            </el-table-column>
+            <el-table-column prop="integrity" label="完残程度" width="180">
+            </el-table-column>
+            <el-table-column prop="status" label="状态" width="180">
+            </el-table-column>
+            <el-table-column prop="storageId" label="出库位置" width="300">
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- 最下面的按钮 -->
+          <div class="button">
+              <el-button @click="$router.go(-1)">返回</el-button>
+          </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getDetailById, goodsReturn } from '@/apis/collect1'
+import axios from '@/utils/request'
+import TabList from '@/components/tabLeft2.vue'
+export default {
+  name: 'collect1_look',
+  components: { TabList },
+  data () {
+    // 这里存放数据
+    return {
+      myData: {},
+      // 服务器初始地址前缀
+      baseURL: '',
+      // 小商品id集合数组
+      goodsIds: [],
+      // 点击查看显示弹窗
+      isShow: false,
+      fromData: {
+        textarea: ''
+      },
+      rules: {
+        textarea: [{ max: 255, message: '不能超过255个字符', trigger: 'blur' }]
+      },
+      auditResult: '',
+      // 表格数据
+      tableData: []
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  // 方法集合
+  methods: {
+    myStatus (id) {
+      const list = [
+        { id: 0, name: '已归还' },
+        { id: 1, name: '已入库' },
+        { id: 2, name: '未归还' }
+      ]
+      return list.filter(v => id === v.id)[0].name
+    },
+    // 点击归还
+    goodsReturn () {
+      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: '已取消'
+        })
+      })
+    },
+    // 表格的多选
+    handleSelectionChange (rows) {
+      // console.log(333, rows)
+      const temp = []
+      rows.forEach(v => {
+        temp.push(v.id)
+      })
+      const temp2 = new Set(temp)
+      this.goodsIds = [...temp2]
+    },
+    selectable (row, index) {
+      // console.log(row.status)
+      if (row.status === '已归还') return false
+      else return true
+    },
+    // 封装通过ID获取详情方法
+    async getDetailById () {
+      const res = await getDetailById(this.myData.id)
+      this.tableData = res.data.goods
+      this.tableData.forEach(v => {
+        v.integrity = this.spoil(v.integrity)
+        v.goodsTypeId = this.category(v.goodsTypeId)
+        v.status = this.myStatus(v.status)
+      })
+    }
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {},
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {
+    // 获取服务器前缀地址
+    this.baseURL = axios.defaults.baseURL
+    // 从第一层拿到传过来的数据
+    this.myData = this.$route.query
+    this.getDetailById()
+  },
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+<style lang='less' scoped>
+//@import url(); 引入公共css类
+.holding0_result {
+
+    /deep/#mytitle>span{
+    font-weight: 800;
+  }
+
+  display: flex;
+  .right {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    .top {
+      padding-left: 35px;
+      display: flex;
+      align-items: center;
+      box-shadow: 1px 1px 10px 1px;
+      margin-left: 2px;
+      height: 40px;
+      background-color: #fff;
+    }
+  }
+  .conten {
+    position: relative;
+    flex: 1;
+    background-color: #fff;
+    margin: 20px 20px 40px;
+    padding: 35px;
+    .info {
+      display: flex;
+      flex-wrap: wrap;
+      & > div {
+        padding-left: 20px;
+        color: black;
+        height: 42px;
+        display: flex;
+        align-items: center;
+        border: 1px solid #ccc;
+        width: 50%;
+      }
+    }
+    .explain {
+      border: 1px solid #ccc;
+      color: black;
+      padding: 30px 150px 30px 20px;
+      display: flex;
+      flex-wrap: wrap;
+      span {
+        font-weight: 700;
+      }
+    }
+    .table {
+      max-height: 420px;
+      overflow: auto;
+      .smimg {
+        border: 3px solid #ccc;
+        height: 70px;
+        img {
+          width: 100%;
+          height: 100%;
+        }
+      }
+      margin-top: 28px;
+      border: 1px solid #ccc;
+      .title {
+        padding-left: 30px;
+        color: black;
+        height: 50px;
+        line-height: 50px;
+        &>h3{
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          /deep/.el-button{
+            height: 30px;
+            margin-right: 20px;
+            display: flex;
+            align-items: center;
+          }
+        }
+      }
+    }
+    .button {
+      position: absolute;
+      left: 50%;
+      bottom: 20px;
+      transform: translateX(-50%);
+      width: 240px;
+      display: flex;
+      justify-content: center;
+    }
+  }
+}
+</style>

+ 2 - 0
src/views/holding/holding0_add.vue

@@ -166,6 +166,7 @@ export default {
   methods: {
     // 点击返回
     goBack (id) {
+      if (this.fromData.unit.trim() === '') return this.$message.warning('单位或个人不能为空')
       this.$confirm('您需要保存这条数据吗?', '提示', {
         confirmButtonText: '保存',
         cancelButtonText: '放弃',
@@ -189,6 +190,7 @@ export default {
     },
     // 点击提交
     async submit (id) {
+      if (this.fromData.unit.trim() === '') return this.$message.warning('单位或个人不能为空')
       this.fromData.status = 1
       const res = await addSubmit({ ...this.fromData, id: this.mydata.id })
       if (res.code === 0) {

+ 4 - 1
src/views/holding/holding0_audit.vue

@@ -165,7 +165,8 @@ export default {
     },
     // 点击提交
     async submit () {
-      const res = await auditH0Tow({ id: this.myData.id, status: this.myresult, reason: this.fromData.textarea, isStorages: this.mySrt })
+      const obj = { id: this.myData.id, status: this.myresult, reason: this.fromData.textarea, isStorages: this.mySrt }
+      const res = await auditH0Tow(obj)
       if (res.code === 0) {
         this.$message.success('提交成功')
         this.$router.push('/layout/holding0')
@@ -190,6 +191,8 @@ export default {
         v.numTypeId = this.mycategory(v.numTypeId)
         v.repair = this.mySave(v.repair)
         this.switch1.push(false)
+        // 首先把所有的入库变成0(不入库状态)
+        this.mySrt[v.id] = 0
       })
     },
     skip (index) {