Kaynağa Gözat

增加藏品移库功能

shaogen1995 4 yıl önce
ebeveyn
işleme
a0f53ee895

+ 6 - 0
src/apis/holding3.js

@@ -29,3 +29,9 @@ export const getRecordDetail = (moduleType, moduleId) => {
     url: `/cms/orderLog/detailModule/${moduleType}/${moduleId}`
     url: `/cms/orderLog/detailModule/${moduleType}/${moduleId}`
   })
   })
 }
 }
+// 点击申请移库的确定
+export const applyMove = (goodsId, storageIds) => {
+  return axios({
+    url: `/cms/ledgerMove/edit/${goodsId}/${storageIds}`
+  })
+}

+ 29 - 0
src/apis/statistics2.js

@@ -0,0 +1,29 @@
+import axios from '../utils/request'
+// 列表
+export const getList = (data) => {
+  return axios({
+    method: 'post',
+    url: '/cms/ledgerMove/list',
+    data
+  })
+}
+// 点击删除
+export const delData = (id) => {
+  return axios({
+    url: `/cms/ledgerMove/remove/${id}`
+  })
+}
+// 通过id获取详情
+export const getDetailById = (id) => {
+  return axios({
+    url: `/cms/ledgerMove/detail/${id}`
+  })
+}
+// 点击审核
+export const clickAudit = (data) => {
+  return axios({
+    method: 'post',
+    url: '/cms/ledgerMove/audit',
+    data
+  })
+}

BIN
src/assets/inco/statistics2.png


BIN
src/assets/inco/statistics2ac.png


+ 2 - 1
src/components/tabLeft3.vue

@@ -25,7 +25,8 @@ export default {
     return {
     return {
       tabList: [
       tabList: [
         { name: '库房设置', id: 0 },
         { name: '库房设置', id: 0 },
-        { name: '统计报表', id: 1 }
+        { name: '统计报表', id: 1 },
+        { name: '藏品移库', id: 2 }
       ]
       ]
     }
     }
   },
   },

+ 22 - 4
src/router/index.js

@@ -262,27 +262,45 @@ const router = new VueRouter({
         {
         {
           name: 'statistics0',
           name: 'statistics0',
           path: 'statistics0',
           path: 'statistics0',
-          meta: { myInd: 3 },
+          meta: { myInd: 2 },
           component: () => import('@/views/statistics/statistics0.vue')
           component: () => import('@/views/statistics/statistics0.vue')
         },
         },
         {
         {
           name: 'statistics1',
           name: 'statistics1',
           path: 'statistics1',
           path: 'statistics1',
-          meta: { myInd: 3 },
+          meta: { myInd: 2 },
           component: () => import('@/views/statistics/statistics1.vue')
           component: () => import('@/views/statistics/statistics1.vue')
         },
         },
+        {
+          name: 'statistics2',
+          path: 'statistics2',
+          meta: { myInd: 2 },
+          component: () => import('@/views/statistics/statistics2.vue')
+        },
+        {
+          name: 'statistics2_audit',
+          path: 'statistics2_audit',
+          meta: { myInd: 2 },
+          component: () => import('@/views/statistics/statistics2_audit.vue')
+        },
+        {
+          name: 'statistics2_look',
+          path: 'statistics2_look',
+          meta: { myInd: 2 },
+          component: () => import('@/views/statistics/statistics2_look.vue')
+        },
 
 
         // 系统管理
         // 系统管理
         {
         {
           name: 'system1',
           name: 'system1',
           path: 'system1',
           path: 'system1',
-          meta: { myInd: 4 },
+          meta: { myInd: 3 },
           component: () => import('@/views/system/system1.vue')
           component: () => import('@/views/system/system1.vue')
         },
         },
         {
         {
           name: 'system2',
           name: 'system2',
           path: 'system2',
           path: 'system2',
-          meta: { myInd: 4 },
+          meta: { myInd: 3 },
           component: () => import('@/views/system/system2.vue')
           component: () => import('@/views/system/system2.vue')
         }
         }
       ]
       ]

+ 36 - 10
src/views/holding/holding3_look.vue

@@ -162,7 +162,7 @@
             v-if="userLogo"
             v-if="userLogo"
             >申请编辑</el-button
             >申请编辑</el-button
           >
           >
-          <el-button type="primary" size="small" @click="moveDialog = true" v-if="myObj.storageId"
+          <el-button type="primary" size="small" @click="applyMove" v-if="myObj.storageId"
             >申请移库</el-button
             >申请移库</el-button
           >
           >
           <el-button size="small" @click="record">操作记录</el-button>
           <el-button size="small" @click="record">操作记录</el-button>
@@ -396,8 +396,10 @@
       </div>
       </div>
     </div>
     </div>
     <!-- 点击申请移库出现的弹窗 -->
     <!-- 点击申请移库出现的弹窗 -->
-    <el-dialog title="申请移库" :visible.sync="moveDialog">
+    <el-dialog title="申请移库" :visible.sync="moveDialog" class="myMove">
       <div class="block">
       <div class="block">
+        <div>入库位置:{{rukuTxt}}</div>
+        <div>
         <span class="demonstration">移库位置:</span>
         <span class="demonstration">移库位置:</span>
         <el-cascader
         <el-cascader
           style="width:500px"
           style="width:500px"
@@ -406,6 +408,7 @@
           :options="options"
           :options="options"
           @change="handleChange"
           @change="handleChange"
         ></el-cascader>
         ></el-cascader>
+        </div>
       </div>
       </div>
       <div class="moveBtn">
       <div class="moveBtn">
           <el-button type="primary"  @click="moveOk"
           <el-button type="primary"  @click="moveOk"
@@ -475,7 +478,7 @@ import Holding3DiaEdit from './holding3_DiaEdit.vue'
 import htmlToPdf from '@/utils/htmlToPdf'
 import htmlToPdf from '@/utils/htmlToPdf'
 import { getTreeList } from '@/apis/statistics0'
 import { getTreeList } from '@/apis/statistics0'
 import { getFileList } from '@/apis/holding'
 import { getFileList } from '@/apis/holding'
-import { getRecord, getRecordDetail } from '@/apis/holding3'
+import { getRecord, getRecordDetail, applyMove } from '@/apis/holding3'
 import axios from '@/utils/request'
 import axios from '@/utils/request'
 import TabList from '@/components/tabLeft.vue'
 import TabList from '@/components/tabLeft.vue'
 export default {
 export default {
@@ -485,6 +488,7 @@ export default {
   data () {
   data () {
     // 这里存放数据
     // 这里存放数据
     return {
     return {
+      tempIds: '',
       moveValue: null,
       moveValue: null,
       moveDialog: false,
       moveDialog: false,
       // 申请移库
       // 申请移库
@@ -530,8 +534,24 @@ export default {
   // 方法集合
   // 方法集合
   methods: {
   methods: {
     // 申请移库
     // 申请移库
-    handleChange () {},
-    moveOk () {},
+    applyMove () {
+      const thsAreaCode = this.$refs.cascaderAddr.getCheckedNodes()
+      const txt = thsAreaCode[0].pathLabels.join('/')
+      this.rukuTxt = txt
+      this.moveDialog = true
+    },
+    handleChange (val) {
+      this.tempIds = val.join(',')
+    },
+    async moveOk () {
+      if (this.tempIds === '') return this.$message.warning('还未选择移库位置!')
+      const res = await applyMove(this.myObj.id, this.tempIds)
+      if (res.code === 0) {
+        this.moveDialog = false
+        this.$message.success('申请成功')
+      } else this.$message.error(res.msg)
+      // console.log(999, res)
+    },
     // 封装获取列表接口方法
     // 封装获取列表接口方法
     async getlist (data) {
     async getlist (data) {
       const res = await getRecord(data)
       const res = await getRecord(data)
@@ -682,19 +702,25 @@ export default {
 }
 }
 </script>
 </script>
 <style lang='less' scoped>
 <style lang='less' scoped>
+
 .moveBtn{
 .moveBtn{
   position: absolute;
   position: absolute;
   bottom: 20px;
   bottom: 20px;
   left: 50%;
   left: 50%;
   transform: translateX(-50%);
   transform: translateX(-50%);
 }
 }
-/deep/.el-dialog{
-  height: 400px;
+.myMove{
+  /deep/.el-dialog{
+    height: 400px;
+  }
 }
 }
 .block{
 .block{
-  display: flex;
-  justify-content: center;
-  align-items: center;
+  &>div {
+    margin: 0px 100px 0;
+    &:nth-of-type(1) {
+      margin-bottom: 15px;
+    }
+  }
 }
 }
 .paging {
 .paging {
   width: 100%;
   width: 100%;

+ 13 - 5
src/views/home/index.vue

@@ -85,6 +85,7 @@ import { LabelLayout } from 'echarts/features'
 import { CanvasRenderer } from 'echarts/renderers'
 import { CanvasRenderer } from 'echarts/renderers'
 
 
 // import { getList as collect3 } from '@/apis/collect3'
 // import { getList as collect3 } from '@/apis/collect3'
+import { getList as statistics2 } from '@/apis/statistics2'
 import { getList as getList4 } from '@/apis/holding4'
 import { getList as getList4 } from '@/apis/holding4'
 // import { getList as collect2 } from '@/apis/collect2'
 // import { getList as collect2 } from '@/apis/collect2'
 // import { getList as collect1 } from '@/apis/collect1'
 // import { getList as collect1 } from '@/apis/collect1'
@@ -104,11 +105,12 @@ export default {
       info1: [
       info1: [
         { name: '藏品登记', inoc: 'holding0', push: '/layout/holding0' },
         { name: '藏品登记', inoc: 'holding0', push: '/layout/holding0' },
         { name: '藏品总账', inoc: 'holding3', push: '/layout/holding3' },
         { name: '藏品总账', inoc: 'holding3', push: '/layout/holding3' },
-        { name: '入库管理', inoc: 'holding1', push: '/layout/holding1' },
-        { name: '出库管理', inoc: 'holding2', push: '/layout/holding2' }
+        { name: '藏品注销', inoc: 'holding5', push: '/layout/holding5' }
       ],
       ],
       info2: [
       info2: [
-        { name: '藏品注销', inoc: 'holding5', push: '/layout/holding5' }
+        { name: '入库管理', inoc: 'holding1', push: '/layout/holding1' },
+        { name: '出库管理', inoc: 'holding2', push: '/layout/holding2' },
+        { name: '藏品移库', inoc: 'statistics2', push: '/layout/statistics2' }
         // { name: '征集品总账', inoc: 'collect0', push: '/layout/collect0' },
         // { name: '征集品总账', inoc: 'collect0', push: '/layout/collect0' },
         // { name: '征集品提用', inoc: 'collect1', push: '/layout/collect1' },
         // { name: '征集品提用', inoc: 'collect1', push: '/layout/collect1' },
         // { name: '征集品注销', inoc: 'collect2', push: '/layout/collect2' }
         // { name: '征集品注销', inoc: 'collect2', push: '/layout/collect2' }
@@ -118,7 +120,8 @@ export default {
         { name: '入库管理', inoc: 0, push: '/layout/holding1' },
         { name: '入库管理', inoc: 0, push: '/layout/holding1' },
         { name: '出库管理', inoc: 0, push: '/layout/holding2' },
         { name: '出库管理', inoc: 0, push: '/layout/holding2' },
         { name: '藏品修改', inoc: 0, push: '/layout/holding4' },
         { name: '藏品修改', inoc: 0, push: '/layout/holding4' },
-        { name: '藏品注销', inoc: 0, push: '/layout/holding5' }
+        { name: '藏品注销', inoc: 0, push: '/layout/holding5' },
+        { name: '藏品移库', inoc: 0, push: '/layout/statistics2' }
         // { name: '征集品提用', inoc: 0, push: '/layout/collect1' },
         // { name: '征集品提用', inoc: 0, push: '/layout/collect1' },
         // { name: '征集品修改', inoc: 0, push: '/layout/collect3' },
         // { name: '征集品修改', inoc: 0, push: '/layout/collect3' },
         // { name: '征集品注销', inoc: 0, push: '/layout/collect2' }
         // { name: '征集品注销', inoc: 0, push: '/layout/collect2' }
@@ -211,6 +214,11 @@ export default {
     res5.data.list.forEach(v => {
     res5.data.list.forEach(v => {
       if (v.status === 1 || v.status === 0) this.dingdong[4].inoc++
       if (v.status === 1 || v.status === 0) this.dingdong[4].inoc++
     })
     })
+    // 进页面拿数据--藏品移库
+    const sta2 = await statistics2({ pageNum: 1, pageSize: 99999 })
+    sta2.data.list.forEach(v => {
+      if (v.status === 1) this.dingdong[5].inoc++
+    })
     // 进页面拿数据--征集品提用
     // 进页面拿数据--征集品提用
     // const col1 = await collect1({ pageNum: 1, pageSize: 99999 })
     // const col1 = await collect1({ pageNum: 1, pageSize: 99999 })
     // col1.data.list.forEach(v => {
     // col1.data.list.forEach(v => {
@@ -389,7 +397,7 @@ export default {
         align-items: center;
         align-items: center;
         justify-content: center;
         justify-content: center;
         flex-direction: column;
         flex-direction: column;
-        height: 95px;
+        height: 125px;
         float: left;
         float: left;
         width: 50%;
         width: 50%;
         border: 1px solid #ccc;
         border: 1px solid #ccc;

+ 2 - 1
src/views/layout/index.vue

@@ -145,7 +145,8 @@ export default {
           push: '/layout/statistics',
           push: '/layout/statistics',
           son: [
           son: [
             { name: '库房设置', id: 0 },
             { name: '库房设置', id: 0 },
-            { name: '统计报表', id: 1 }
+            { name: '统计报表', id: 1 },
+            { name: '藏品移库', id: 2 }
           ]
           ]
         },
         },
         {
         {

+ 388 - 0
src/views/statistics/statistics2.vue

@@ -0,0 +1,388 @@
+<!--  -->
+<template>
+  <div class="holding">
+    <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>
+          </ul>
+          <div class="select">
+            <span>搜索:</span>
+                <el-select v-model="myData.type" placeholder="请选择" style="width:108px">
+                  <el-option label="藏品名称" value="name"></el-option>
+                  <el-option label="登记人" value="user"></el-option>
+                </el-select>
+
+            <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>
+          </div>
+          <!--表格 -->
+          <div class="table">
+            <el-table
+              :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
+              :data="tableData"
+              border
+              style="width: 100%"
+            >
+              <el-table-column prop="name" label="藏品名称" :resizable="false">
+              </el-table-column>
+              <el-table-column prop="num" label="总登记号" width="280" :resizable="false">
+              </el-table-column>
+              <el-table-column prop="realName" label="编辑登记人" width="200" :resizable="false">
+              </el-table-column>
+              <el-table-column prop="updateTime" label="编辑日期" width="200" :resizable="false">
+              </el-table-column>
+              <el-table-column prop="status" label="状态" width="230" :resizable="false">
+              </el-table-column>
+              <el-table-column label="操作" width="295" :resizable="false">
+                <template #default='{row}'>
+                  <el-button type="text"  @click="myLook(row)" v-if="row.status!=='待审核'">查看</el-button>
+                  <el-button type="text"  @click="audit(row)" v-if="row.status==='待审核'" v-show="userLogo.audit">审核</el-button>
+                  <el-button type="text"  @click="delData(row.id,row.status)" v-if="row.status!=='已完成'" v-show="userLogo.del">删除</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, delData } from '@/apis/statistics2'
+import TabList from '@/components/tabLeft3.vue'
+export default {
+  name: 'statistics2',
+  components: { TabList },
+  data () {
+    return {
+      userLogo: {
+        audit: false, // 审核
+        del: false// 删除
+      },
+      total: 0,
+      myData: {
+        type: 'name',
+        name: '',
+        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 }
+      ],
+      type: '',
+      time: '',
+      // 表格数据
+      tableData: []
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  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 = 3
+          this.getList(this.myData)
+        } else if (index === 3) {
+          // 点击审核不通过
+          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/statistics2_look',
+        query: val
+      })
+    },
+    // 点击删除
+    async delData (id, status) {
+      this.$confirm('确定删除吗?', '提示', {
+        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: '删除成功!'
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消.'
+        })
+      })
+    },
+
+    // 点击审核
+    audit (val) {
+      this.$router.push({
+        path: '/layout/statistics2_audit',
+        query: val
+      })
+    },
+
+    // 封装获取列表方法
+    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.myState(v.status)
+        // 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]
+      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())
+      return value
+    },
+    checkTime (i) {
+      if (i < 10) {
+        i = '0' + i
+      }
+      return i
+    }
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {
+    this.getList(this.myData)
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  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
+    res.data.list.forEach(v => {
+      if (v.status === 1) num1++
+      if (v.status === 3) num2++
+      if (v.status === 2) num3++
+    })
+    this.stateArr[1].num = num1
+    this.stateArr[2].num = num2
+    this.stateArr[3].num = num3
+    // 获取用户角色权限标识
+    let temp = localStorage.getItem('daliCK')
+    temp = JSON.parse(temp)
+    if (temp) {
+      const temp2 = temp.role[0]
+      if (temp2 === 'sys_admin') {
+        this.userLogo.audit = true
+        this.userLogo.del = true
+      } // 超管
+      if (temp2 === 'sys_audit') this.userLogo.audit = true // 保管部主任
+    }
+  },
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+<style lang='less' scoped>
+.holding {
+    /deep/#mytitle>span{
+    font-weight: 800;
+  }
+
+  display: flex;
+  .right {
+    width: 100%;
+    .top {
+      padding-left: 35px;
+      display: flex;
+      align-items: center;
+      box-shadow: 1px 1px 10px 1px;
+      margin-left: 2px;
+      height: 40px;
+      background-color: #fff;
+    }
+    .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>

+ 314 - 0
src/views/statistics/statistics2_audit.vue

@@ -0,0 +1,314 @@
+<!--  -->
+<template>
+  <div class="holdingAdd">
+    <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>藏品移库</el-breadcrumb-item>
+          <el-breadcrumb-item id="mytitle">审核</el-breadcrumb-item>
+        </el-breadcrumb>
+      </div>
+      <div class="conten">
+        <div class="con_top">
+          <div><span>藏品名称:</span>{{myObj.name}}</div>
+          <div><span>总登记号:</span>{{myObj.num}}</div>
+          <div><span>登记人:</span>{{myObj.realName}}</div>
+          <div><span>登记时间:</span>{{myObj.updateTime}}</div>
+        </div>
+        <div class="con_edit">
+          <div class="title">移库记录
+            <el-button size="small" @click="look">藏品信息</el-button>
+          </div>
+          <div class="editChange">
+            <div style="width:50%">原来位置</div>
+            <div style="width:50%">移库位置</div>
+          </div>
+          <div class="father">
+          <div class="con_txt" >
+            <div style="width:50%">
+                <el-cascader
+                  disabled
+                  style="width:100%"
+                  :props="{ value: 'id', label: 'name' }"
+                  v-model="oldLocation"
+                  :options="options"
+                ></el-cascader>
+            </div>
+            <div style="width:50%">
+                <el-cascader
+                  disabled
+                  style="width:100%"
+                  :props="{ value: 'id', label: 'name' }"
+                  v-model="newLocation"
+                  :options="options"
+                ></el-cascader>
+            </div>
+          </div>
+          </div>
+        </div>
+        <div class="txt">
+          <el-form
+            :model="fromData"
+            :rules="rules"
+            ref="fromData"
+            label-width="100px"
+            class="demo-ruleForm"
+          >
+            <el-form-item label="审核结果:" prop="status">
+              <el-select v-model="fromData.status" 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="reason"
+            >
+              <el-input
+                type="textarea"
+                :rows="3"
+                v-model="fromData.reason"
+                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>
+        <!-- 点击查看显示弹窗 -->
+    <Statistics2 :dialogFormVisible.sync='isShow' :myObj='myObjLook'  ref="mylook"/>
+  </div>
+</template>
+
+<script>
+import { detailsById } from '../../apis/holding'
+import { getTreeList } from '@/apis/statistics0'
+import Statistics2 from '../holding/holding0_audit_Dia.vue'
+import { getDetailById, clickAudit } from '@/apis/statistics2'
+import TabList from '@/components/tabLeft3.vue'
+export default {
+  name: 'statistics2_audit',
+  // import引入的组件需要注入到对象中才能使用
+  components: { TabList, Statistics2 },
+  data () {
+    // 这里存放数据
+    return {
+      options: [],
+      oldLocation: '',
+      newLocation: '',
+      // 位置
+      myObjLook: {},
+      isShow: false,
+      myObj: {},
+      fromData: {
+        id: null,
+        reason: '',
+        status: 3
+      },
+      rules: {
+        reason: [
+          { required: true, message: '不能为空', trigger: 'blur' },
+          { max: 255, message: '不能超过255个字符', trigger: 'blur' }
+        ],
+        status: [
+          { required: true, message: '请选择审核结果', trigger: 'change' }
+        ]
+      }
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  // 方法集合
+  methods: {
+    // 点击查看
+    async look () {
+      const res = await detailsById(this.myObj.goodsId)
+      const obj = res.data
+      // console.log(999, obj)
+      // obj.goodsTypeName = val.goodsTypeId // 修改文物类别
+      if (typeof (obj.level) === 'number') obj.level = this.myWwjb(obj.level) // 修改文物级别
+      if (obj.textureType === 0) obj.textureType = '单一质地'
+      else if (obj.textureType === 1) obj.textureType = '复合质地'// 修改质地类型
+      if (obj.amountType === 0) obj.amountType = '单件'
+      else if (obj.amountType === 1) obj.amountType = '一套多件'// 修改数量类型
+      obj.numTypeId = this.mycategory(obj.numTypeId)// 编号类型
+      obj.goodsTypeName = this.category(obj.goodsTypeId)// 文物类别
+      obj.integrity = this.spoil(obj.integrity)// 完残程度
+      obj.repair = this.mySave(obj.repair)// 保存状态
+      this.myObjLook = obj
+      this.isShow = true
+      // console.log(999, res)
+    },
+    // 点击提交
+    async submit () {
+      try {
+        await this.$refs.fromData.validate()
+        this.$confirm('是否确认提交?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          const res = await clickAudit(this.fromData)
+          // console.log(99999999, res)
+          if (res.code === 0) {
+            this.$message.success('审核成功')
+            this.$router.push('/layout/statistics2')
+          }
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消提交'
+          })
+        })
+      } catch (error) {
+        console.log(error)
+      }
+    }
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  async created () {
+    this.myObj = this.$route.query
+    // console.log(99999, this.myObj)
+    this.fromData.id = Number(this.$route.query.id)
+    // 获取上个页面传递的数据
+    // 通过id获取详情
+    const res = await getDetailById(this.myObj.id)
+    this.oldLocation = res.data.storageId.split(',')
+    this.oldLocation = this.oldLocation.map(Number)
+    this.newLocation = res.data.updateStorageId.split(',')
+    this.newLocation = this.newLocation.map(Number)
+
+    // console.log(999, res)
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  async mounted () {
+    // 获取位置信息
+    const res1 = await getTreeList()
+    this.options = res1.data
+  },
+  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;
+    flex: 1;
+    background-color: #fff;
+    margin: 20px 20px 40px;
+    padding: 24px;
+    .con_top{
+      color: black;
+      height: 100px;
+      &>div {
+        float: left;
+        padding-left: 18px;
+        width: 50%;
+        height: 50%;
+        line-height: 50px;
+        border: 1px solid #ccc;
+        &>span {
+          font-weight: 700;
+        }
+      }
+    }
+    .con_edit{
+      color: black;
+      margin: 24px 0;
+      max-height: 460px;
+      // background-color: cadetblue;
+      .title{
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        padding:0 38px;
+        height: 50px;
+        font-weight: 700;
+        border: 1px solid #ccc;
+      }
+      .editChange{
+        font-weight: 700;
+        height: 50px;
+        display: flex;
+        &>div {
+          background-color: #fafafa;
+          padding-left: 18px;
+          border: 1px solid #ccc;
+          height: 100%;
+          line-height: 50px;
+        }
+      }
+      .father{
+        max-height: 320px;
+        overflow: auto;
+      }
+    .con_txt{
+      /deep/.el-input__inner {
+        display: flex;
+        align-items: center;
+        padding: 0;
+        background-color: transparent;
+        border: none;
+        font-size: 16px;
+        color: black;
+      }
+      /deep/.el-input__suffix-inner {
+        display: none;
+      }
+      display: flex;
+      &>div {
+        border: 1px solid #ccc;
+        padding: 15px 0;
+        padding-left: 18px;
+      }
+    }
+    }
+        .button {
+      position: absolute;
+      left: 50%;
+      bottom: 20px;
+      transform: translateX(-50%);
+      width: 240px;
+      display: flex;
+      justify-content: space-between;
+    }
+
+  }
+}
+</style>

+ 249 - 0
src/views/statistics/statistics2_look.vue

@@ -0,0 +1,249 @@
+<!--  -->
+<template>
+  <div class="holdingAdd">
+    <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>藏品移库</el-breadcrumb-item>
+          <el-breadcrumb-item id="mytitle">查看</el-breadcrumb-item>
+        </el-breadcrumb>
+      </div>
+      <div class="conten">
+        <div class="info">
+          <div class="row">
+            <div><span>藏品名称:</span>{{myObj.name}}</div>
+            <div><span>总登记号:</span>{{myObj.num}}</div>
+          </div>
+        <div class="row">
+          <div><span>登记人:</span>{{myObj.realName}}</div>
+          <div><span>登记时间:</span>{{myObj.updateTime}}</div>
+        </div>
+        <div class="row">
+          <div><span>审核结果:</span>{{myObj.status}}</div>
+        </div>
+        <div class="row">
+          <div><span>审核说明:</span>{{myObj.reason}}</div>
+        </div>
+        </div>
+        <div class="con_edit">
+          <div class="title">移库记录
+                        <el-button size="small" @click="look">藏品信息</el-button>
+          </div>
+          <div class="editChange">
+            <div style="width:50%">原来位置</div>
+            <div style="width:50%">移库位置</div>
+          </div>
+          <div class="father">
+          <div class="con_txt" >
+            <div style="width:50%">
+                <el-cascader
+                  disabled
+                  style="width:100%"
+                  :props="{ value: 'id', label: 'name' }"
+                  v-model="oldLocation"
+                  :options="options"
+                ></el-cascader>
+            </div>
+            <div style="width:50%">
+                <el-cascader
+                  disabled
+                  style="width:100%"
+                  :props="{ value: 'id', label: 'name' }"
+                  v-model="newLocation"
+                  :options="options"
+                ></el-cascader>
+            </div>
+          </div>
+          </div>
+        </div>
+        <!-- 最下面的按钮 -->
+        <div class="button">
+          <el-button @click="$router.go(-1)">返回</el-button>
+        </div>
+      </div>
+    </div>
+        <!-- 点击查看显示弹窗 -->
+    <Statistics2Look :dialogFormVisible.sync='isShow' :myObj='myObjLook'  ref="mylook"/>
+  </div>
+</template>
+
+<script>
+import { detailsById } from '../../apis/holding'
+import { getTreeList } from '@/apis/statistics0'
+import Statistics2Look from '../holding/holding0_audit_Dia.vue'
+import { getDetailById } from '@/apis/statistics2'
+import TabList from '@/components/tabLeft3.vue'
+export default {
+  name: 'statistics2Look2',
+  // import引入的组件需要注入到对象中才能使用
+  components: { TabList, Statistics2Look },
+  data () {
+    // 这里存放数据
+    return {
+      options: [],
+      oldLocation: '',
+      newLocation: '',
+      // 位置
+      fujianLook: [],
+      myObjLook: {},
+      isShow: false,
+      myObj: {}
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  // 方法集合
+  methods: {
+    async look () {
+      const res = await detailsById(this.myObj.goodsId)
+      const obj = res.data
+      // console.log(999, obj)
+      // obj.goodsTypeName = val.goodsTypeId // 修改文物类别
+      if (typeof (obj.level) === 'number') obj.level = this.myWwjb(obj.level) // 修改文物级别
+      if (obj.textureType === 0) obj.textureType = '单一质地'
+      else if (obj.textureType === 1) obj.textureType = '复合质地'// 修改质地类型
+      if (obj.amountType === 0) obj.amountType = '单件'
+      else if (obj.amountType === 1) obj.amountType = '一套多件'// 修改数量类型
+      obj.numTypeId = this.mycategory(obj.numTypeId)// 编号类型
+      obj.goodsTypeName = this.category(obj.goodsTypeId)// 文物类别
+      obj.integrity = this.spoil(obj.integrity)// 完残程度
+      obj.repair = this.mySave(obj.repair)// 保存状态
+      this.myObjLook = obj
+      this.isShow = true
+    }
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  async created () {
+    this.myObj = this.$route.query
+    // 获取上个页面传递的数据
+    const res = await getDetailById(this.myObj.id)
+    this.oldLocation = res.data.storageId.split(',')
+    this.oldLocation = this.oldLocation.map(Number)
+    this.newLocation = res.data.updateStorageId.split(',')
+    this.newLocation = this.newLocation.map(Number)
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  async mounted () {
+    // 获取位置信息
+    const res1 = await getTreeList()
+    this.options = res1.data
+  },
+  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: 24px;
+    color: black;
+    flex: 1;
+    background-color: #fff;
+    margin: 20px 20px 40px;
+    .info{
+      .row{
+        display: flex;
+        &>div{
+          flex: 1;
+          border: 1px solid #ccc;
+          padding: 15px 18px;
+          &>span {
+            font-weight: 700;
+          }
+        }
+      }
+    }
+    .con_edit{
+      color: black;
+      margin: 24px 0;
+      max-height: 460px;
+      // background-color: cadetblue;
+      .title{
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        padding:0 38px;
+        height: 50px;
+        font-weight: 700;
+        border: 1px solid #ccc;
+      }
+      .editChange{
+        font-weight: 700;
+        height: 50px;
+        display: flex;
+        &>div {
+          background-color: #fafafa;
+          padding-left: 18px;
+          border: 1px solid #ccc;
+          height: 100%;
+          line-height: 50px;
+        }
+      }
+      .father{
+        max-height: 320px;
+        overflow: auto;
+      }
+    .con_txt{
+      /deep/.el-input__inner {
+        display: flex;
+        align-items: center;
+        padding: 0;
+        background-color: transparent;
+        border: none;
+        font-size: 16px;
+        color: black;
+      }
+      /deep/.el-input__suffix-inner {
+        display: none;
+      }
+       display: flex;
+      &>div {
+        border: 1px solid #ccc;
+        padding: 8px 0;
+        padding-left: 18px;
+      }
+    }
+    }
+            .button {
+      position: absolute;
+      left: 50%;
+      bottom: 20px;
+      transform: translateX(-50%);
+      width: 240px;
+      display: flex;
+      justify-content: center;
+    }
+
+  }
+}
+</style>