dedsudiyu 1 year ago
parent
commit
6feff11f26

+ 24 - 0
src/api/chemicalInventory/index.js

@@ -1 +1,25 @@
 import request from '@/utils/request'
+
+// 化学品盘点列表
+export function hxpTakeStockList(query) {
+  return request({
+    url: '/chemical/hxpTakeStock/list',
+    method: 'get',
+    params: query
+  })
+}
+// 化学品盘点详情
+export function hxpTakeStockInfo(id) {
+  return request({
+    url: '/chemical/hxpTakeStock/'+id,
+    method: 'get',
+  })
+}
+// 化学品盘点化学品列表
+export function hxpTakeStockDetailList(query) {
+  return request({
+    url: '/chemical/hxpTakeStockDetail/list',
+    method: 'get',
+    params: query
+  })
+}

+ 4 - 4
src/components/qrCodeDialog/index.vue

@@ -22,10 +22,10 @@
     if(type == 1){
       this.$set(this,'qrCodeDialogType',true);
       this.$set(this,'qrCodeDialogData',{
-        identification:'zdznkj',          //二维码标识 用于识别是否是本系统的二维码
-        type:'chemicalsCabinet',          //二维码类型 用于区分二维码功能类型
-        parameter:id,                     //二维码参数
-        name:name,                        //二维码名称用于下载时命名
+        identification:'laboratorySecureManagePlatform',          //二维码标识 用于识别是否是本系统的二维码
+        type:'chemicalsCabinet',                                  //二维码类型 用于区分二维码功能类型
+        parameter:id,                                             //二维码参数
+        name:name,                                                //二维码名称用于下载时命名
       });
     }else{
       this.$set(this,'qrCodeDialogType',false);

+ 48 - 19
src/views/medicUniversity-3_1/chemicalManagement/chemicalInventory/index.vue

@@ -11,13 +11,13 @@
               clearable
               size="small"/>
           </el-form-item>
-          <el-form-item label="启动条件" prop="deptId">
-            <el-select v-model="queryParams.deptId" placeholder="请选择启动条件" clearable size="small">
+          <el-form-item label="学院" prop="takeDpetId">
+            <el-select v-model="queryParams.takeDpetId" placeholder="请选择学院" clearable size="small">
               <el-option
                 v-for="dict in deptOptions"
-                :key="dict.code"
-                :label="dict.name"
-                :value="dict.name"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
               ></el-option>
             </el-select>
           </el-form-item>
@@ -43,13 +43,17 @@
       <div class="content-box">
         <el-table border :data="tableData" ref="multipleTable" @sort-change="sortChange">
           <el-table-column label="序号"  width="50" align="center"  type="index"/>
-          <el-table-column label="标题" prop="courseName" show-overflow-tooltip/>
-          <el-table-column label="学院" prop="place" width="200" show-overflow-tooltip/>
-          <el-table-column label="楼栋" prop="place" width="180" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="place" width="200" show-overflow-tooltip/>
-          <el-table-column label="备注" prop="place" width="250" show-overflow-tooltip/>
-          <el-table-column label="盘点人" prop="place" width="120" show-overflow-tooltip/>
-          <el-table-column label="盘点时间" prop="inventoryTime" width="200" sortable="custom" show-overflow-tooltip/>
+          <el-table-column label="标题" prop="takeTitle" show-overflow-tooltip/>
+          <el-table-column label="学院" prop="takeDpetName" width="200" show-overflow-tooltip/>
+          <el-table-column label="楼栋" prop="takeBuildName" width="180" show-overflow-tooltip/>
+          <el-table-column label="实验室" prop="subName" width="300" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.subName}}-{{scope.row.subRoom}}
+            </template>
+          </el-table-column>
+          <!--<el-table-column label="备注" width="250" show-overflow-tooltip/>-->
+          <el-table-column label="盘点人" prop="createBy" width="120" show-overflow-tooltip/>
+          <el-table-column label="盘点时间" prop="createTimeStr" width="200" sortable="custom" show-overflow-tooltip/>
           <el-table-column label="操作" width="100">
             <template slot-scope="scope">
               <div class="table-button-box">
@@ -71,6 +75,8 @@
 </template>
 
 <script>
+  import { listDepartments } from "@/api/system/dept";
+  import { hxpTakeStockList } from '@/api/chemicalInventory/index'
   import infoPage from './infoPage.vue'
   export default {
     name: 'chemicalManagement',
@@ -85,16 +91,20 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          deptId:"",
+          takeDpetId:"",
+          orderTime:'1',
         },
         dateRange:[],
-        tableData:[{}],
+        tableData:[],
         total:0,
         infoDataProps:{},
       }
     },
     created(){},
-    mounted(){},
+    mounted(){
+      this.listDepartments();
+      this.getList();
+    },
     methods:{
       //搜索
       onSearch(){
@@ -108,18 +118,32 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          deptId:"",
+          takeDpetId:"",
+          orderTime:'1',
         });
         this.getList();
       },
       //查询列表
       getList(){
-
+        this.loading = true;
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.beginTimeStr = this.dateRange[0];
+          obj.endTimeStr = this.dateRange[1];
+        }else {
+          obj.beginTimeStr = null
+          obj.endTimeStr = null
+        }
+        hxpTakeStockList(obj).then( response => {
+          this.$set(this,'tableData',response.rows);
+          this.$set(this,'total',response.total);
+          this.loading = false;
+        });
       },
       //时间排序方法
       sortChange(val){
-        if(val.prop == 'inventoryTime'){
-          this.$set(this.queryParams,'zgTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+        if(val.prop == 'createTimeStr'){
+          this.$set(this.queryParams,'orderTime',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
           this.onSearch();
         }
       },
@@ -132,6 +156,11 @@
           this.$set(this,'infoDataProps',row);
         }
       },
+      listDepartments(){
+        listDepartments().then( response => {
+          this.$set(this,'deptOptions',response.data);
+        });
+      },
     }
   }
 </script>

+ 49 - 29
src/views/medicUniversity-3_1/chemicalManagement/chemicalInventory/infoPage.vue

@@ -8,73 +8,85 @@
       <div class="info-text-min-box">
         <div>
           <p>标题:</p>
-          <p>{{infoData.data1}}</p>
+          <p>{{infoData.takeTitle}}</p>
         </div>
         <div>
           <p>盘点人:</p>
-          <p>{{infoData.data2}}</p>
+          <p>{{infoData.createBy}}</p>
         </div>
         <div>
           <p>盘点时间:</p>
-          <p>{{infoData.data3}}</p>
+          <p>{{infoData.createTimeStr}}</p>
         </div>
       </div>
       <div class="info-text-min-box">
         <div>
           <p>所属部门:</p>
-          <p>{{infoData.data4}}</p>
+          <p>{{infoData.takeDpetName}}</p>
         </div>
         <div>
           <p>楼栋:</p>
-          <p>{{infoData.data5}}</p>
+          <p>{{infoData.takeBuildName}}</p>
         </div>
         <div>
           <p>实验室:</p>
-          <p>{{infoData.data6}}</p>
+          <p>{{infoData.subName}}</p>
         </div>
       </div>
       <div class="info-text-min-box">
         <div>
           <p>盘点类型:</p>
-          <p>{{infoData.data7==1?'按照实验室盘点':'按照化学品柜盘点'}}</p>
+          <p>{{infoData.takeType==1?'按照实验室盘点':'按照化学品柜盘点'}}</p>
         </div>
       </div>
     </div>
     <div class="table-data-list-box">
       <el-table border :data="tableData" ref="multipleTable">
         <el-table-column label="序号"  width="50" align="center"  type="index"/>
-        <el-table-column label="化学品" prop="courseName" show-overflow-tooltip/>
-        <el-table-column label="CAS号" prop="place" width="130" show-overflow-tooltip/>
-        <el-table-column label="学院" prop="place" width="200" show-overflow-tooltip>
+        <el-table-column label="化学品" prop="chemicalName" show-overflow-tooltip/>
+        <el-table-column label="CAS号" prop="casNum" width="130" show-overflow-tooltip/>
+        <el-table-column label="学院" prop="chemicalDpetName" width="200" show-overflow-tooltip>
           <template slot-scope="scope">
+            <span :class="scope.row.dpetFlag == 0?'abnormalColor':''">{{scope.row.chemicalDpetName}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="楼栋" prop="place" width="150" show-overflow-tooltip>
+        <el-table-column label="楼栋" prop="chemicalBuildName" width="150" show-overflow-tooltip>
           <template slot-scope="scope">
+            <span :class="scope.row.buildFlag == 0?'abnormalColor':''">{{scope.row.chemicalBuildName}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="实验室" prop="place" width="200" show-overflow-tooltip>
+        <el-table-column label="实验室" prop="chemicalSubName" width="200" show-overflow-tooltip>
           <template slot-scope="scope">
+            <span :class="scope.row.subFlag == 0?'abnormalColor':''">{{scope.row.chemicalSubName}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="盘点结果" prop="place" width="230" show-overflow-tooltip v-if="infoData.data7 == 1"/>
-        <el-table-column label="化学品柜" prop="place" width="140" show-overflow-tooltip v-if="infoData.data7 == 2"/>
-        <el-table-column label="盘点结果" prop="place" width="160" show-overflow-tooltip v-if="infoData.data7 == 2"/>
-        <el-table-column label="备注" prop="inventoryTime" width="120" show-overflow-tooltip/>
-        <el-table-column label="结果" prop="inventoryTime" width="80" show-overflow-tooltip>
+        <el-table-column label="盘点结果" prop="takeResult" width="230"
+                         show-overflow-tooltip v-if="infoData.takeType == 1"/>
+        <el-table-column label="化学品柜" prop="chemicalCabinetName" width="140"
+                         show-overflow-tooltip v-if="infoData.takeType == 2">
           <template slot-scope="scope">
+            <span :class="scope.row.cabinetFlag == 0?'abnormalColor':''">{{scope.row.chemicalCabinetName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="盘点结果" prop="takeResult" width="160" s
+                         how-overflow-tooltip v-if="infoData.takeType == 2"/>
+        <el-table-column label="备注" prop="remark" width="120" show-overflow-tooltip/>
+        <el-table-column label="结果" prop="chemicalType" width="80" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span :class="scope.row.chemicalType == 0?'abnormalColor':''">{{scope.row.chemicalType == 1?'正常':'异常'}}</span>
           </template>
         </el-table-column>
       </el-table>
       <pagination :page-sizes="[20, 30, 40, 50]" v-show="total>0" :total="total"
                   layout="total, prev, pager, next, sizes, jumper"
-                  :page.sync="pageNum" :limit.sync="pageSize"
+                  :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
                   @pagination="getList"/>
     </div>
   </div>
 </template>
 
 <script>
+  import { hxpTakeStockInfo,hxpTakeStockDetailList } from '@/api/chemicalInventory/index'
   export default {
     name: 'infoPage',
     props:{
@@ -82,31 +94,39 @@
     },
     data(){
       return{
-        infoData:{
-          data1:"530化学品盘点",
-          data2:"张老师",
-          data3:"2023-10-26  09:30",
-          data4:"环境与测绘学院",
-          data5:"楼栋名称",
-          data6:"大气污染实验室",
-          data7:"1",
-        },
-        tableData:[{}],
+        infoData:{},
+        tableData:[],
         total:10,
         pageNum:1,
         pageSize:20,
+        queryParams:{
+          pageNum:1,
+          pageSize:20,
+        },
       }
     },
     created(){
 
     },
     mounted(){
-
+      this.initialization();
     },
     methods:{
+      // 初始化
+      initialization(){
+        hxpTakeStockInfo(this.infoDataProps.id).then( response => {
+          this.$set(this,'infoData',response.data);
+        });
+        this.getList();
+      },
       outButton(){
         this.$parent.controlsButton(1)
       },
+      getList(){
+        hxpTakeStockDetailList({takeStockId:this.infoDataProps.id}).then( response => {
+          this.$set(this,'tableData',response.rows);
+        });
+      },
     }
   }
 </script>

+ 1 - 1
src/views/medicUniversity-3_1/chemicalManagement/chemicalLibrary/CabinetManagement/index.vue

@@ -201,7 +201,7 @@
         if(type == 1){
           this.$set(this,'qrCodeDialogType',true);
           this.$set(this,'qrCodeDialogData',{
-            identification:'zdznkj',          //二维码标识 用于识别是否是本系统的二维码
+            identification:'laboratorySecureManagePlatform',          //二维码标识 用于识别是否是本系统的二维码
             type:'chemicalsCabinet',          //二维码类型 用于区分二维码功能类型
             parameter:id,                     //二维码参数
             name:name,                        //二维码名称用于下载时命名