Procházet zdrojové kódy

Merge branch 'master' of http://192.168.1.43:3000/v3/v3-lab-web

dedsudiyu před 1 rokem
rodič
revize
39454495f5

+ 16 - 0
src/api/chemicalManage/index.js

@@ -555,6 +555,22 @@ export function chemicalStockStockDetails(query) {
     params: query
   })
 }
+//库存统计-汇总统计-列表
+export function chemicalStockStockCollectList(data) {
+  return request({
+    url: '/chemical/stock/stockCollectList',
+    method: 'post',
+    data: data
+  })
+}
+//库存统计-汇总统计-详情列表
+export function chemicalStockStockCollectDetailsList(data) {
+  return request({
+    url: '/chemical/stock/stockCollectDetailsList',
+    method: 'post',
+    data: data
+  })
+}
 
 
 

+ 97 - 50
src/views/chemicalManage/inventoryManagement/inventoryStatistics/collectList.vue

@@ -15,8 +15,10 @@
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="请选择学院" style="width: 160px">
+          <el-form-item label="" prop="deptId">
+            <el-select v-model="queryParams.deptId"
+                       placeholder="请选择学院"
+                       style="width: 140px">
               <el-option
                 v-for="item in deptOptions"
                 :key="item.deptId"
@@ -25,39 +27,41 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData3">
+          <el-form-item label="" prop="floorId">
             <el-cascader
-              style="width: 180px"
+              style="width: 120px"
               placeholder="请选择楼栋楼层"
-              :props="{value: 'id', label: 'name',children:'buildFloorVoList'}"
-              v-model="queryParams.queryParamsData3"
+              :props="{value: 'id', label: 'name',children:'buildFloorVoList',checkStrictly: true}"
+              v-model="queryParams.buildIdAndfloorId"
               :options="buildFloorOptions">
             </el-cascader>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData4">
-            <el-select v-model="queryParams.queryParamsData4" placeholder="请选择级别" style="width: 140px">
+          <el-form-item label="" prop="chemicalLevel">
+            <el-select v-model="queryParams.chemicalLevel"
+                       placeholder="请选择级别" style="width: 140px">
               <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                v-for="item in levelOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData5">
-            <el-select v-model="queryParams.queryParamsData5" placeholder="请选择类别" style="width: 140px">
+          <el-form-item label="" prop="chemicalCategory">
+            <el-select v-model="queryParams.chemicalCategory"
+                       placeholder="请选择类别" style="width: 140px">
               <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                v-for="item in categoryOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData1">
+          <el-form-item label="" prop="searchValue">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.searchValue"
               placeholder="化学品名/CAS/编码/实验室/房间号/姓名/联系方式"
               style="width: 340px"
             />
@@ -73,17 +77,29 @@
         <el-table class="table-box" v-loading="loading" border :data="dataList"
                   @selection-change="handleSelectionChange" :row-key="getRowKeys">
           <el-table-column type="selection" width="50" align="center" fixed :reserve-selection="true"/>
-          <el-table-column label="名称" prop="name" width="200" fixed="" show-overflow-tooltip/>
-          <el-table-column label="CAS" prop="content" width="150" show-overflow-tooltip/>
-          <el-table-column label="类别" prop="content" width="150" show-overflow-tooltip/>
-          <el-table-column label="级别" prop="content" width="120" show-overflow-tooltip/>
-          <el-table-column label="学院" prop="content" width="120" show-overflow-tooltip/>
-          <el-table-column label="楼栋楼层" prop="content" width="150" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="content" width="250" show-overflow-tooltip/>
-          <el-table-column label="实验室负责人" prop="content" width="170" show-overflow-tooltip/>
-          <el-table-column label="安全员" prop="content" width="170" show-overflow-tooltip/>
-          <el-table-column label="库存量" prop="content" width="130" show-overflow-tooltip/>
-          <el-table-column label="数量" prop="content" width="100" show-overflow-tooltip/>
+          <el-table-column label="名称" prop="chemicalName" width="200" fixed="" show-overflow-tooltip/>
+          <el-table-column label="CAS" prop="casNum" width="150" show-overflow-tooltip/>
+          <el-table-column label="类别" prop="chemicalCategoryName" width="150" show-overflow-tooltip/>
+          <el-table-column label="级别" prop="chemicalLevelName" width="120" show-overflow-tooltip/>
+          <el-table-column label="学院" prop="deptName" width="120" show-overflow-tooltip/>
+          <el-table-column label="楼栋楼层" prop="content" width="150" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.buildName}}-{{scope.row.floorName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="实验室" prop="content" width="230" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}}({{scope.row.subRoom}})</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="实验室负责人" prop="adminUser" width="170" show-overflow-tooltip/>
+          <el-table-column label="安全员" prop="safeUser" width="170" show-overflow-tooltip/>
+          <el-table-column label="库存量" prop="content" width="120" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.surplus}}{{scope.row.specUnit}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="数量" prop="chemicalNumber" width="100" show-overflow-tooltip/>
           <el-table-column label="操作" width="150" show-overflow-tooltip v-if="tableButtonType">
             <template slot-scope="scope">
               <div class="table-button-box">
@@ -114,14 +130,12 @@
     <list-page :propsData="propsData" v-if="pageType === 2"></list-page>
   </div>
 </template>
-<script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
-  //import addPage from "./addPage.vue";
+<script>;
   import listPage from "./listPage.vue"
   import exportComponent from "@/components/exportComponent/exportComponent.vue";
   import { getDeptDropList,systemBuildingGetTreeList,} from "@/api/commonality/permission";
+  import { getDicts } from '@/api/commonality/noPermission'
+  import { chemicalStockStockCollectList } from '@/api/chemicalManage'
   export default {
     name: 'collectList',
     components: {
@@ -139,9 +153,17 @@
         },
         tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面状态
-        pageType:2,
+        pageType:1,
         //页面遮罩
         loading:false,
+        //类别
+        categoryOptions:[],
+        //级别
+        levelOptions:[
+          {label:'请选择级别',value:''},
+          {label:'管控',value:'1'},
+          {label:'非管控',value:'2'},
+        ],
         //学院
         deptOptions:[],
         //楼栋楼层
@@ -152,8 +174,13 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          deptId :null,
+          floorId :null,
+          buildId :null,
+          chemicalLevel :null,
+          chemicalCategory :null,
+          searchValue :null,
+          buildIdAndfloorId :[],
         },
         //列表数据
         dataList:[{},{},{},{},],
@@ -172,6 +199,7 @@
     },
     mounted () {
       this.getDeptDropList();
+      this.getDicts();
       this.systemBuildingGetTreeList();
       this.getList();
     },
@@ -179,8 +207,22 @@
       titleClick(){
         this.$parent.titleTypeButton(1);
       },
+      //获取化学品类别
+      getDicts(){
+        getDicts('chemicals_category').then(response => {
+          this.$set(this,'categoryOptions',response.data);
+        });
+      },
       //查询按钮
       handleQuery(){
+        if (this.queryParams.buildIdAndfloorId[0]){
+          if (this.queryParams.buildIdAndfloorId.length ==1){
+            this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
+          }else if (this.queryParams.buildIdAndfloorId.length ==2){
+            this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
+            this.$set(this.queryParams,'floorId',this.queryParams.buildIdAndfloorId[1]);
+          }
+        }
         this.$set(this.queryParams,'page',1);
         this.getList();
       },
@@ -190,28 +232,33 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          deptId :null,
+          floorId :null,
+          buildId :null,
+          chemicalLevel :null,
+          chemicalCategory :null,
+          useStatus :null,
+          searchValue :null,
+          buildIdAndfloorId :[],
         });
         this.getList();
       },
       //获取数据列表
       getList(){
-        // this.$set(this,'loading',true);
-        // getListFunction(this.queryParams).then(response => {
-        //   this.$set(this,'loading',false);
-        //   this.$set(this,'dataList',response.data.records);
-        //   this.$set(this,'total',response.data.total);
-        // });
+        this.$set(this,'loading',true);
+        chemicalStockStockCollectList(this.queryParams).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
       },
       //操作按钮
       tableButton(type,row){
         if(type == 2){
           //详情
-          let obj = JSON.parse(JSON.stringify(row))
-          this.$set(this,'propsData',obj);
+          this.$set(this,'propsData',row);
           this.$set(this,'pageType',2);
-        }else if(type == 1){
+        }else if(type == 'out'){
           //返回并刷新
           this.$set(this,'pageType',1);
           this.$set(this,'propsData',{});

+ 0 - 2
src/views/chemicalManage/inventoryManagement/inventoryStatistics/infoPage.vue

@@ -99,8 +99,6 @@ export default {
   },
   mounted(){
 
-    console.log(111111)
-    console.log(this.newData)
   },
   methods:{
     // 返回按钮

+ 103 - 62
src/views/chemicalManage/inventoryManagement/inventoryStatistics/listPage.vue

@@ -3,28 +3,34 @@
   <div class="page-container inventoryStatistics-listPage">
     <div class="inventoryStatistics-listPage-min" v-if="pageType == 1">
       <div class="page-top-title-box">
-        <p class="page-top-title-name-p">{{newData.name}} 丨 {{newData.address}}</p>
-        <p class="page-top-title-num-p">总数:{{newData.maxNum}}</p>
-        <p class="page-top-title-num-p">总量:{{newData.maxNum}}ml</p>
+        <p class="page-top-title-name-p">{{newData. chemicalName}} 丨 {{newData.buildName}}-{{newData.floorName}}-{{newData.subName}}({{newData.subRoom}})</p>
+        <p class="page-top-title-num-p">总数:{{newData.chemicalNumber}}</p>
+        <p class="page-top-title-num-p">总量:{{newData.surplus}}{{newData.specUnit}}</p>
         <p class="page-top-title-out-p" @click="backPage">返回</p>
       </div>
       <div class="content-box">
         <div class="page-form-title-box">
           <el-form :model="queryParams" class="form-box" ref="queryForm"
                    :inline="true" style="width:100%;">
-            <el-form-item label="" prop="queryParamsData3">
-              <el-select v-model="queryParams.queryParamsData2"
-                         placeholder="请选择化学品柜" style="width: 180px">
+            <el-form-item label="" prop="queryParamsData5">
+              <el-select
+                style="width:145px;"
+                @change="selectChange"
+                v-model="queryParams.cabinetId"
+                filterable
+                remote
+                placeholder="请搜索化学品柜"
+                :remote-method="searchSelectList">
                 <el-option
-                  v-for="item in categoryOptions"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                />
+                  v-for="item in searchOptions"
+                  :key="item.cabinetId"
+                  :label="item.cabinetName"
+                  :value="item.cabinetId">
+                </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="queryParamsData2">
-              <el-select v-model="queryParams.queryParamsData2"
+            <el-form-item label="" prop="useStatus">
+              <el-select v-model="queryParams.useStatus"
                          placeholder="请选择状态" style="width: 140px">
                 <el-option
                   v-for="item in statusOptions"
@@ -47,10 +53,10 @@
                 end-placeholder="过期结束时间"
               ></el-date-picker>
             </el-form-item>
-            <el-form-item label="" prop="queryParamsData1">
+            <el-form-item label="" prop="searchValue">
               <el-input
                 maxLength="30"
-                v-model="queryParams.queryParamsData1"
+                v-model="queryParams.searchValue"
                 placeholder="化学品名/CAS/编码/归属人/课题组"
                 clearable
                 style="width: 300px"
@@ -62,14 +68,26 @@
         </div>
         <p class="num-min-box"></p>
         <div class="page-content-box">
-          <el-table class="table-box" border :data="dataList">
-            <el-table-column label="编号" prop="name" show-overflow-tooltip/>
-            <el-table-column label="规格" prop="content" width="150" show-overflow-tooltip/>
-            <el-table-column label="储存位置" prop="content" width="300" show-overflow-tooltip/>
-            <el-table-column label="归属人" prop="content" width="150" show-overflow-tooltip/>
-            <el-table-column label="库存余量" prop="content" width="150" show-overflow-tooltip/>
-            <el-table-column label="过期时间" prop="content" width="240" show-overflow-tooltip/>
-            <el-table-column label="状态" prop="content" width="150" show-overflow-tooltip/>
+          <el-table  class="table-box" border :data="dataList">
+            <el-table-column label="编号" prop="tagCode" show-overflow-tooltip/>
+            <el-table-column label="规格" prop="specNum" width="130" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.specNum}}{{scope.row.specUnit}}/{{scope.row.packUnit}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="储存位置" prop="position" width="300" show-overflow-tooltip/>
+            <el-table-column label="归属人" prop="belongName" width="150" show-overflow-tooltip/>
+            <el-table-column label="库存余量" prop="specNum" width="130" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.surplus}}{{scope.row.specUnit}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="过期时间" align="left" prop="expireTime">
+              <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.expireTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="状态" prop="statusStr" width="150" show-overflow-tooltip/>
             <el-table-column label="操作" width="150" show-overflow-tooltip>
               <template slot-scope="scope">
                 <div class="table-button-box">
@@ -93,15 +111,17 @@
         </div>
       </div>
     </div>
-    <infoPage v-if="pageType == 2" :propsData="propsData"></infoPage>
+    <infoPage v-if="pageType == 2" :propsData="propsData2"></infoPage>
   </div>
 </template>
 
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
   import infoPage from "./infoPage.vue"
+  import {
+    chemicalCabinetSelect,
+    chemicalStockStockCollectDetailsList,
+    chemicalStockStockDetails
+  } from '@/api/chemicalManage'
   export default {
     name: 'listPage',
     components: {
@@ -114,7 +134,13 @@
       return{
         pageType:1,
         //状态
-        statusOptions:[],
+        statusOptions:[
+          {label:'请选择状态',value:''},
+          {label:'未使用',value:'-1'},
+          {label:'使用中',value:'1'},
+          {label:'超时未归还',value:'2'},
+        ],
+        propsData2:{},
         //类别
         categoryOptions:[],
         //级别
@@ -124,30 +150,16 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
-          queryParamsData3 :null,
+          cabinetId:'',
+          useStatus:'',
+          startTime:'',
+          endTime:'',
+          searchValue:"",
         },
+        //搜索化学品柜
+        searchOptions:[],
         //列表数据
-        dataList:[
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-          {name:"1"},
-        ],
+        dataList:[ ],
         //数据数量
         total:10,
         tableCheck:'1',
@@ -159,29 +171,51 @@
       }
     },
     created(){
-
+      this.newData=this.propsData
+      this.queryParams.stockId=this.propsData.id
     },
     mounted(){
-
+      this.getList()
     },
     methods:{
+      //化学品柜选中
+      selectChange(data){
+
+      },
+      //搜索化学品柜
+      searchSelectList(query) {
+        if (query !== '' && query.length>1) {
+          this.loading = true;
+          let obj = {
+            userName : query,
+            userType: 2,
+            pageSize: -1,
+          };
+          chemicalCabinetSelect({searchValue:query}).then(response => {
+            this.searchOptions = response.data;
+            this.loading = false;
+          });
+        } else {
+          this.searchOptions = [];
+        }
+      },
       //操作按钮
       tableButton(type,row){
         if(type == 2){
           //详情
-          let obj = JSON.parse(JSON.stringify(row))
-          this.$set(this,'propsData',obj);
-          this.$set(this,'pageType',2);
-        }else if(type == 1){
+          chemicalStockStockDetails({id:row.id}).then(response => {
+            this.$set(this,'propsData2',response.data);
+            this.$set(this,'pageType',2);
+          });
+        }else if(type == 'out'){
           //返回并刷新
           this.$set(this,'pageType',1);
-          this.$set(this,'propsData',{});
           this.getList();
         }
       },
       // 返回按钮
       backPage(){
-        this.$parent.tableButton(1);
+        this.$parent.tableButton('out');
       },
       //查询按钮
       handleQuery(){
@@ -194,9 +228,11 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
-          queryParamsData3 :null,
+          cabinetId:'',
+          useStatus:'',
+          startTime:'',
+          endTime:'',
+          searchValue:"",
         });
         this.getList();
       },
@@ -209,7 +245,7 @@
           obj.startTime = "";
           obj.endTime = "";
         }
-        getListFunction(obj).then(response => {
+        chemicalStockStockCollectDetailsList(obj).then(response => {
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
         });
@@ -232,6 +268,11 @@
     display: flex;
     flex-direction: column;
     overflow: hidden;
+    .inventoryStatistics-listPage-min{
+      flex:1;
+      display: flex;
+      flex-direction: column;
+    }
     .page-top-title-num-p{
       line-height:40px;
       margin-right:40px;

+ 4 - 1
src/views/chemicalManage/inventoryManagement/savePending/addPage.vue

@@ -94,7 +94,7 @@
           </div>
           <div class="num-max-big-box">
             <p>非管控本次申购量</p>
-            <p>液体:{{newData.applyLiquidControl}}{{newData.liquidUnit}}</p>
+            <p>液体:{{newData.applyLiquidNoControl}}{{newData.liquidUnit}}</p>
             <p>固体:{{newData.applySolidNoControl}}{{newData.solidUnit}}</p>
           </div>
           <p v-if="!newData.waitId" class="add-item-button page-submit-common-style-button" @click="addButton">+ 添加化学品</p>
@@ -500,6 +500,9 @@
               this.$set(this.newData,'topicGroupName','');
               this.$set(this.newData,'topicUserName','');
               this.$set(this.newData,'topicUserPhone','');
+              this.$set(this.newData,'topicGroup',false);
+            }else{
+              this.$set(this.newData,'topicGroup',true);
             }
             for (let i=0;i<self.newData.hxpStockWaitModelList.length;i++){
               if (!self.newData.hxpStockWaitModelList[i].normsNum || !self.newData.hxpStockWaitModelList[i].normsUnit || !self.newData.hxpStockWaitModelList[i].applyUnit || !self.newData.hxpStockWaitModelList[i].applyNum){

+ 1 - 1
src/views/chemicalManage/inventoryManagement/takeRecord/index.vue

@@ -48,7 +48,7 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData5">
+          <el-form-item label="" prop="cabinetId">
             <el-select
               style="width:145px;"
               @change="selectChange"

+ 1 - 1
src/views/chemicalManage/purchaseManage/purchaseRegister/addPage.vue

@@ -109,7 +109,7 @@
           </div>
           <div class="num-max-big-box">
             <p>非管控本次申购量</p>
-            <p>液体:{{newData.applyLiquidControl}}{{newData.liquidUnit}}</p>
+            <p>液体:{{newData.applyLiquidNoControl}}{{newData.liquidUnit}}</p>
             <p>固体:{{newData.applySolidNoControl}}{{newData.solidUnit}}</p>
           </div>
           <p class="add-item-button page-submit-common-style-button" @click="addButton">+ 添加化学品</p>