ccjgmwz 3 years ago
parent
commit
84758e542f

+ 1 - 1
public/static/outWeightPrint.html

@@ -145,7 +145,7 @@
                 </tr>
                 <tr class="row">
                     <td class="col col-bgc">出库单位</td>
-                    <td class="col" colspan="2">{{tableData.compName}}</td>
+                    <td class="col" colspan="2">{{tableData.contractManagement?tableData.contractManagement.seller:tableData.compName}}</td>
                     <td class="col col-bgc">联系人</td>
                     <td class="col">{{tableData.person}}</td>
                     <td class="col col-bgc">联系电话</td>

+ 21 - 13
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -616,11 +616,7 @@
             .then((response) => {
               that.common.commonWeighingList = response.records
               that.makeData()
-            })
-            .catch((response) => {
-              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-            })
-          getweighingList({
+              getweighingList({
               compId: localStorage.getItem('ws-pf_compId'),
               currentPage: that.currentPage,
               pageSize: that.pageSize,
@@ -635,11 +631,16 @@
             .toPromise()
             .then((response) => {
               that.deptBudgetTotal = response.total
-              that.weighingList = response.records
+              // that.weighingList = response.records
             })
             .catch((response) => {
               // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
             })
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+          
         } else {
           clearInterval(that.timer)
           that.refresh = 60
@@ -662,11 +663,7 @@
                 .then((response) => {
                   that.common.commonWeighingList = response.records
                   that.makeData()
-                })
-                .catch((response) => {
-                  // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-                })
-              getweighingList({
+                  getweighingList({
                   compId: localStorage.getItem('ws-pf_compId'),
                   currentPage: that.currentPage,
                   pageSize: that.pageSize,
@@ -681,11 +678,16 @@
                 .toPromise()
                 .then((response) => {
                   that.deptBudgetTotal = response.total
-                  that.weighingList = response.records
+                  // that.weighingList = response.records
                 })
                 .catch((response) => {
                   // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
                 })
+                })
+                .catch((response) => {
+                  // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                })
+              
             }
             that.refresh--
 
@@ -901,9 +903,12 @@
         this.pListTop = []
         this.pListBottom = []
         this.carWeightInfo.carNumber = ''
-        this.weighingList = []
+        
         let that = this
         let _list = this.common.commonWeighingList
+        if(_list.length > 0 ){
+            this.weighingList = []
+        }
         for (let i = 0; i < _list.length; i++) {
           if (_list[i].paymentManagement) {
             if (
@@ -942,6 +947,7 @@
           if (this.mList.length != 0) {
             this.setCurrent(this.mList[0])
 
+          debugger
             this.weighingList = this.mList[0]
             this.carWeightInfo = {
               carNumber: this.mList[0].carNumber,
@@ -955,6 +961,7 @@
           this.carList1 = this.pListTotal
           if (this.pList.length != 0) {
             this.setCurrent(this.pList[0])
+          debugger
             this.weighingList = this.pList[0]
             this.weighingList.inOutType = this.pList[0].qualityInspectionManagement.inOutType
             this.weighingList.inOutTypeKey = this.pList[0].qualityInspectionManagement.inOutTypeKey
@@ -1208,6 +1215,7 @@
             type: this.information,
             weight: val.grossWeight,
           }
+          debugger
           this.weighingList = val
           if (val.qualityInspectionManagement) {
             this.weighingList.boxNo = val.qualityInspectionManagement.boxNo

+ 79 - 55
src/views/warehousenew/warehouseManagementList.vue

@@ -80,6 +80,7 @@
       <ws-button @click="outData(2)">打印</ws-button>
       <ws-button @click="transformation()" v-hasPermission=" `warehouseManagement.warehouse.warehouseInfo.view`">折转</ws-button>
       <ws-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.kan`" @click="handleall()">全部仓库</ws-button>
+      <ws-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.kan`" @click="handleMintor()">查看监控</ws-button>
         <el-table ref='table' show-summary :summary-method="getSummaries" class="wenzi setUp_css" :data="warehouseList" style="width: 100%; margin-top: 20px" height="calc(100% - 45px)" v-if="warehouseType == '1'">
         <el-table-column prop="warehouseName" label="仓库名">
         </el-table-column>
@@ -174,14 +175,22 @@
           <map-drag @marker="marker" ref="childMap" :isShowaddress='true' v-on:addressListen='getAddress' v-on:pickedAddress='searchAddress' :warehousePositioning="warehousePositioning"></map-drag>
         </div>
         <div v-if="!mapshow && warehouseType == '1'" class="monitor">
-            <div class="video1">
-            <img
-              src="../../../public/img/quesheng@2x.png"
-              alt=""
-              class="img1"
-            />
+          <div v-if="!monitorUrl1" class="video1">
+            <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
             <div>监控视频未连接</div>
-            </div>
+          </div>
+          <div v-else class="video1">
+            <iframe :src="monitorUrl1" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
+              mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
+          </div>
+          <div v-if="!monitorUrl2" class="video1">
+            <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
+            <div>监控视频未连接</div>
+          </div>
+          <div v-else class="video2">
+            <iframe :src="monitorUrl2" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
+              mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
+          </div>
         </div>
     </div>
     <el-dialog title="修改入库量" :visible.sync="indialog"  width="30%" :before-close="handleClose" top="35vh">
@@ -263,12 +272,15 @@
   } from 'base-core-lib'
   import Pagination from '@/components/Pagination'
   import WsUpload from '@/components/WsUpload'
+  
+  import axios from 'axios'
   export default {
     name: 'viewSpareMoney',
     components: {
       WsUpload,
       Pagination,
       mapDrag,
+      axios
     },
     watch: {
       vesselId(val) {
@@ -287,7 +299,7 @@
         dateTime:'',
         list:[],
         warehouseList:[],
-        warehouseType:"1",
+        warehouseType:'1',
         totalStorage:0,
         radio:0,
         tableHeader:[],
@@ -300,16 +312,16 @@
         lineColor:['#5878E8','#50CAD4','#FF9F24','#E87C25','#27727B','#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD', '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'],
         warehouseXiaLaCopy:[],
         warehouseAllXiaLa:[],
-        responsible:"",
-        maptitle:"库点监控",
-        btnCss1:"btn1",
-        btnCss2:"btn",
+        responsible:'',
+        maptitle:'库点监控',
+        btnCss1:'btn1',
+        btnCss2:'btn',
         mapshow:false,
         indialog:false,
-        inWarehouse:"",
+        inWarehouse:'',
         parameter:{
-          startDate:"",
-          endDate:"",
+          startDate:'',
+          endDate:'',
         },
         isShowPrintType: false, //打印
         headerText: '',
@@ -318,6 +330,8 @@
           month: dayjs().format('MM'),
         },
         warehousePositioning:{},
+        monitorUrl1:'',
+        monitorUrl2:''
       }
     },
     activated() {
@@ -371,10 +385,10 @@
           this.$message.error('请选择所要打印的仓库')
           return
         }
-         if(this.parameter.warehouseName == "全部仓库"){
-          this.parameter.warehouseName = ""
+         if(this.parameter.warehouseName == '全部仓库'){
+          this.parameter.warehouseName = ''
         }
-        this.parameter.warehouseName = this.parameter.warehouseName.replace("(临)","")
+        this.parameter.warehouseName = this.parameter.warehouseName.replace('(临)','')
         if (this.headerText == '导出记录') {
           if (this.parameter.radio == 3) {
             const {
@@ -497,11 +511,11 @@
       },
       submit(){
         if(!this.inWarehouse){
-          this.$message.error("请输入入库量")
+          this.$message.error('请输入入库量')
           return
         }
         if(Number(this.warehouseInfo.warehouseNumViewList[0].outNetWeight) > Number(this.inWarehouse)){
-           this.$message.error("入库量不可小于已出库量")
+           this.$message.error('入库量不可小于已出库量')
           return
         }
         if (String(this.inWarehouse).indexOf('.') != -1 && String(this.inWarehouse).length - (String(this.inWarehouse).indexOf('.') + 1) > 3) {
@@ -509,7 +523,7 @@
           return
         }
         if(Number(this.warehouseInfo.maxInStorage) < Number(this.inWarehouse)){
-           this.$message.error("入库量不可超过合同上限")
+           this.$message.error('入库量不可超过合同上限')
           return
         }
         let InnetWeight = {
@@ -524,7 +538,7 @@
                 message: '修改成功',
               })
               this.indialog = false,
-              this.inWarehouse = "",
+              this.inWarehouse = '',
               this.getList1()
             })
             .catch((response) => {
@@ -637,14 +651,14 @@
       mapChange(num){
         if(num == 1){
           this.mapshow = false
-          this.btnCss1 = "btn1"
-          this.btnCss2 = "btn"
-          this. maptitle = "库点监控"
+          this.btnCss1 = 'btn1'
+          this.btnCss2 = 'btn'
+          this. maptitle = '库点监控'
         }else if(num == 2){
           this.mapshow = true
-          this.btnCss1 = "btn"
-           this.btnCss2 = "btn1"
-          this. maptitle = "定位"
+          this.btnCss1 = 'btn'
+           this.btnCss2 = 'btn1'
+          this. maptitle = '定位'
         }
       },
       getAddress(data) {
@@ -659,6 +673,11 @@
         this.deptBudgetList.warehousePositioning =
           item.lnglat.lat + ',' + item.lnglat.lng
       },
+      handleMintor(){
+        this.$router.push({
+          path: 'warehouseManagementMintor'
+        })
+      },
       handleall(){
         this.$router.push({
           path: 'warehouseManagement'
@@ -669,14 +688,16 @@
         for(var tmp = 0 ; tmp < this.warehouseAllXiaLa.length; tmp++){
           if(this.warehouseAllXiaLa[tmp].warehouseName == e){
             this.warehouseType = this.warehouseAllXiaLa[tmp].warehouseType
+            this.monitorUrl1 = this.warehouseAllXiaLa[tmp].monitorUrl1
+            this.monitorUrl2 = this.warehouseAllXiaLa[tmp].monitorUrl2
             if(this.warehouseType == '2'){
-              this.maptitle = "定位"
-              this.btnCss2 ="btn1"
+              this.maptitle = '定位'
+              this.btnCss2 ='btn1'
               this.mapshow = true
             }else{
-               this.maptitle = "库点监控"
-               this.btnCss1 ="btn1"
-               this.btnCss2 ="btn"
+               this.maptitle = '库点监控'
+               this.btnCss1 ='btn1'
+               this.btnCss2 ='btn'
                this.mapshow = false
             }
             break
@@ -706,19 +727,19 @@
       var minu = now.getMinutes();//得到分钟
       var sec = now.getSeconds();//得到秒
       month = month + 1;
-      if (month < 10) month = "0" + month;
-      if (date < 10) date = "0" + date;
-      if (hour < 10) hour = "0" + hour;
-      if (minu < 10) minu = "0" + minu;
-      if (sec < 10) sec = "0" + sec;
-      var time = "";
+      if (month < 10) month = '0' + month;
+      if (date < 10) date = '0' + date;
+      if (hour < 10) hour = '0' + hour;
+      if (minu < 10) minu = '0' + minu;
+      if (sec < 10) sec = '0' + sec;
+      var time = '';
       //精确到天
       if(format==1){
-        time = year + "-" + month + "-" + date;
+        time = year + '-' + month + '-' + date;
       }
       //精确到分
       else if(format==2){
-        time = year + "-" + month + "-" + date+ " " + hour + ":" + minu + ":" + sec;
+        time = year + '-' + month + '-' + date+ ' ' + hour + ':' + minu + ':' + sec;
       }
       return time;
     },
@@ -746,12 +767,12 @@
           for(var num_item = 0 ; num_item < this.warehouseList[num].warehouseNumViewList.length ; num_item++){
             if(this.warehouseType == 2){
                if(Number(this.warehouseList[num].warehouseNumViewList[num_item].surplus) > 0){
-                this.$message.error("删除前应清空库存!")
+                this.$message.error('删除前应清空库存!')
                 return
               }
             }else if(this.warehouseType == 1){
                if(Number(this.warehouseList[num].warehouseNumViewList[num_item].storage) > 0){
-                this.$message.error("删除前应清空库存!")
+                this.$message.error('删除前应清空库存!')
                 return
                }
             }
@@ -973,6 +994,8 @@
                 this.warehouseXiaLa = response
                 this.warehouseXiaLaCopy = response
                 this.warehouseInfo.warehouseName = this.warehouseXiaLa[0].warehouseName
+                this.monitorUrl1 = this.warehouseXiaLa[0].monitorUrl1
+                this.monitorUrl2 = this.warehouseXiaLa[0].monitorUrl2
                 this.getList1()
               })
             xiala({
@@ -982,7 +1005,7 @@
               .then((response) => {
                 for(var tmp = 0 ; tmp < response.length ; tmp++){
                   if(response[tmp].warehouseType == '2'){
-                    response[tmp].warehouseName = response[tmp].warehouseName + " (临)"
+                    response[tmp].warehouseName = response[tmp].warehouseName + ' (临)'
                   }
                 }
                 this.warehouseAllXiaLa = response
@@ -1034,8 +1057,8 @@
             this.warehouseInfo.warehouseLocation = this.warehouseList[0].warehousePrivate + this.warehouseList[0].warehouseCity + this.warehouseList[0].warehouseArea
             // this.warehouseInfo.maxReserves = 0
             //经纬度
-             this.warehousePositioning.lat = this.warehouseInfo.warehousePositioning.split(",")[1]
-             this.warehousePositioning.lng = this.warehouseInfo.warehousePositioning.split(",")[0]
+             this.warehousePositioning.lat = this.warehouseInfo.warehousePositioning.split(',')[1]
+             this.warehousePositioning.lng = this.warehouseInfo.warehousePositioning.split(',')[0]
              for(let j = 0 ; j < this.warehouseXiaLa.length ; j++){
                 if(this.warehouseInfo.warehouseName == this.warehouseXiaLa[j].warehouseName){
                   this.warehouseInfo.maxReserves = this.warehouseXiaLa[j].totalStorage
@@ -1214,16 +1237,17 @@
   }
   .monitor{
     margin-top: 30px;
+    display: flex;
     .video1{
-    width: 350px;
-    height: 260px;
-    text-align: center;
-    .img1{
-        width: 350px;
-        height: 235px;
-        padding: 20px;
-      }
-  }
+      width: 440px;
+      height: 360px;
+      text-align: center;
+      .img1{
+          width: 440px;
+          height: 235px;
+          padding: 20px;
+        }
+    }
   } 
 }
 //打印弹窗

+ 22 - 6
src/views/warehousenew/warehouseManagementMintor.vue

@@ -21,14 +21,20 @@
         >
       </el-col>
     </el-row>
-    <div style="height:90vh;background: #d3dce6;">
-      <el-row :gutter="20" >
-        <div v-for="(item,index) in dataList">
+    <div >
+      <el-row :gutter="21" >
+        <div v-for="(item,index) in dataList1" :key="index">
           <el-col :span="7" v-if="item.Status =='ON'">
             <iframe :src='"https://live.eliangeyun.com/play.html?serial="+item.DeviceID+"&code="+item.ID+"&aspect=fullscreen"'  width="440" height="360" allowfullscreen ="true"
                 webkitallowfullscreen="true"
                 mozallowfullscreen="true"
                 allow="autoplay; fullscreen; microphone;"></iframe>
+            <div class="mintor-text" v-if="item.Name.indexOf('HDIPCAM') > -1  ">
+               山东诸城迈饶库
+            </div>
+            <div class="mintor-text" v-else>
+             {{item.Name}}
+            </div>
           </el-col>
         </div>
       </el-row>
@@ -47,7 +53,8 @@ export default {
   },
   data() {
     return {
-      dataList:[]
+      dataList:[],
+      dataList1:[]
     }
   },
   activated() {
@@ -63,8 +70,12 @@ export default {
       axios.get('https://live.eliangeyun.com/api/v1/device/channellist')
         .then(resp =>{
           this.dataList = resp.data.ChannelList
-          for(var i=0;i<this.dataList.length;i++){
+          for(var i=0;i<this.dataList.length - 4 ;i++){
             console.log('ssss',this.dataList[i].Status);
+            // if(this.dataList[i].Name.indexOf('HDIPCAM')>-1){
+            //   continue
+            // }
+            this.dataList1.push(this.dataList[i])
           }
 
         }).catch(err =>{
@@ -211,7 +222,7 @@ export default {
   border-color: #5878e8;
 }
 .el-col {
-  background: #f6f7fc;
+  // background: #f6f7fc;
 }
 .small-title {
   position: relative;
@@ -237,4 +248,9 @@ export default {
   margin: 0 10px;
   border-radius: 3px;
 }
+.mintor-text{
+  text-align: center;
+  font-size: 24px;
+  padding: 10px 0px 15px 0px;
+}
 </style>