shaogen1995 4 лет назад
Родитель
Сommit
4e52939fb8

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

@@ -134,7 +134,7 @@
         <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>征集品总账</el-breadcrumb-item>
           <el-breadcrumb-item id="mytitle">查看</el-breadcrumb-item>
         </el-breadcrumb>
       </div>
@@ -365,7 +365,7 @@
         ></el-table-column>        <el-table-column property="updateTime" label="完成时间" width="220" :resizable="false"></el-table-column>
         <el-table-column label="操作" :resizable="false">
           <template #default="{ row }">
-            <el-button type="text" @click="lookRZ(row.id)">查 看</el-button>
+            <el-button type="text" @click="lookRZ(row)">查 看</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -391,7 +391,7 @@
 </template>
 
 <script>
-import { getRecord } from '@/apis/holding3'
+import { getRecord, getRecordDetail } from '@/apis/holding3'
 import Collect0DiaEdit from './collect0_DiaEdit.vue'
 import htmlToPdf from '@/utils/htmlToPdf'
 import { getFileList } from '../../apis/holding'
@@ -451,6 +451,7 @@ export default {
       this.gridData.forEach(v => {
         if (v.moduleType === 'collectOut') v.tempType = '征集品提用'
         else if (v.moduleType === 'collectEdit') v.tempType = '征集品修改'
+        else if (v.moduleType === 'register') v.tempType = '征集品登记'
       })
     },
     // 点击操作记录
@@ -459,11 +460,47 @@ export default {
       this.dialogTableVisible = true
     },
     // 分页器方法
-    currentChange (val) {},
-    sizeChange (val) {},
+    currentChange (val) {
+      // 点击页面1 2 3
+      this.myData.pageNum = val
+      this.getlist(this.myData)
+    },
+    sizeChange (val) {
+      // 点击条数 10 20 30
+      this.myData.pageSize = val
+      this.getlist(this.myData)
+    },
     // 点击操作记录里面的查看
-    lookRZ (id) {
-      console.log(999, id)
+    async lookRZ (val) {
+      const res = await getRecordDetail(val.moduleType, val.moduleId)
+      // console.log(9999, res)
+      let temp = ''
+      let obj = {}
+      // 藏品登记
+      if (val.moduleType === 'register') {
+        temp = '/layout/holding0_result'
+        obj = res.data.data
+      }
+      // 提用
+      if (val.moduleType === 'collectOut') {
+        temp = '/layout/collect1_look'
+        obj = res.data.data.entity
+        if (obj.status === 3) obj.status = '待归还'
+        else if (obj.status === 4) obj.status = '已归还'
+        obj.type = this.CKtype(obj.type)
+      }
+
+      // 修改
+      if (val.moduleType === 'collectEdit') {
+        temp = '/layout/collect3_look'
+        obj = res.data.data.entity
+        obj.status = '已完成'
+      }
+      const { href } = this.$router.resolve({
+        path: temp,
+        query: obj
+      })
+      window.open(href, '_blank')
     },
     // 点击查看
     imgLook (url) {
@@ -501,6 +538,7 @@ export default {
   created () {
     // 获取服务器前缀地址
     this.baseURL = axios.defaults.baseURL
+
     // 获取用户角色权限标识
     let temp = localStorage.getItem('daliCK')
     temp = JSON.parse(temp)
@@ -516,6 +554,7 @@ export default {
     // 拿到路由跳转传过来的数据
     this.myObj = this.$route.query
     this.myObj.id = Number(this.myObj.id)
+    this.myData.goodsId = this.myObj.id
     this.myObj.registerId = Number(this.myObj.registerId)
     // 调用获取附件方法
     this.getFileList()
@@ -538,6 +577,10 @@ body .el-table::before {
 }
 //@import url(); 引入公共css类
 .holding3_look {
+    /deep/.el-table__body-wrapper{
+    max-height: 500px;
+    overflow-y: auto;
+  }
   .paging {
     width: 100%;
     margin-top: 20px;

+ 1 - 1
src/views/collect/collect3.vue

@@ -299,7 +299,7 @@ export default {
         this.userLogo.audit = true
         this.userLogo.del = true
       } // 超管
-      if (temp2 === 'sys_audit') this.userLogo.audit = true // 保管部主任
+      if (temp2 === 'sys_collect') this.userLogo.audit = true // 征集部主任
     }
   },
   beforeCreate () {}, // 生命周期 - 创建之前

+ 2 - 1
src/views/holding/holding3_look.vue

@@ -527,7 +527,8 @@ export default {
         temp = '/layout/holding2_look'
         obj = res.data.data.entity
         obj.type = this.CKtype(obj.type)
-        obj.status = '已完成'
+        if (obj.status === 3) obj.status = '待归还'
+        else if (obj.status === 4) obj.status = '已归还'
       }
       // 修改
       if (val.moduleType === 'ledgerEdit') {