zhongtianhaoyuan 3 年之前
父節點
當前提交
d7b5c50f8d
共有 1 個文件被更改,包括 3 次插入34 次删除
  1. 3 34
      src/views/warehousenew/warehouseManagementList.vue

+ 3 - 34
src/views/warehousenew/warehouseManagementList.vue

@@ -69,7 +69,7 @@
       <ws-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.edit` " @click="handleEdit()">编辑</ws-button>
       <ws-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.delete`" @click="handleDelete()">删除</ws-button>
       <ws-button  v-hasPermission=" `warehouseManagement.warehouse.warehouseInfo.view`" @click="record()">记录</ws-button>
-      <ws-button  v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.view`" @click="loss()">盘库</ws-button>
+      <ws-button   v-if="warehouseType == '1'" v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.view`" @click="loss()">盘库</ws-button>
       <ws-button  v-if="warehouseInfo.clearStatusFlag == 1 && warehouseType == '2'" @click="clearance()">清库</ws-button>
       <ws-button  v-if="warehouseInfo.clearStatusFlag == 3 && warehouseType == '2'" disabled> 已清库</ws-button>
       <!-- createType 1手动创建 2 自动创建 -->
@@ -169,7 +169,7 @@
           <div :class="btnCss1" @click="mapChange(1)" v-if="warehouseType == '1'">监控</div>
           <div :class="btnCss2" @click="mapChange(2)">定位</div>
         </div>
-        <div class="map-item" v-if="mapshow">
+        <div class="map-item" v-if="mapshow && warehousePositioning.lat && warehousePositioning.lng">
           <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">
@@ -403,9 +403,7 @@
               type: 'xls',
             })
           }
-
         } else if (this.headerText == '打印记录') {
-          // console.log(this.parameter.startDate)
           addselectinfoList({
               compId: localStorage.getItem('ws-pf_compId'),
               startDate: this.parameter.startDate,
@@ -433,7 +431,6 @@
                       for (let i = 0; i < response1.length; i++) {
                         increment = Number(increment)
                         if (increment > 0) {
-
                           let index = Math.abs(Math.round(Math.random() * response1.length - 1))
                           let pro = response1[index] //取出假数据并设定值
                           pro.netWeight = Number((Math.random() * (70 - 10 + 1) + 10).toFixed(2))
@@ -475,7 +472,6 @@
                       _canshu = this.parameter.radio + '&warehouseName=' + this.parameter.warehouseName +
                         '&startDate=' + this.parameter.startDate + '&endDate=' + this.parameter.startDate
                       window.open('../../../../../static/warehousePrint.html?type=' + _canshu)
-
                     })
                 } else { //没有增量比例的直接打印
                   sessionStorage.setItem('inOutWarehouse_Print', JSON.stringify(response.records))
@@ -524,7 +520,6 @@
               this.getList1()
             })
             .catch((response) => {
-              // console.log(3333)
               // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
             })
       },
@@ -563,7 +558,6 @@
               color: '#fff'
             }
           },
-
           //  ------  X轴 ------
           xAxis: {
             axisLabel: { // 坐标轴标签
@@ -574,7 +568,6 @@
               color: '#D9DDE7', // 默认取轴线的颜色
               interval: 0,
             },
-
             splitArea: { // 网格区域
               show: false // 是否显示,默认为false
             },
@@ -602,7 +595,6 @@
             }
           },
           //  -------   内容数据 -------
-            
           series: [{
             name: '储量', // 序列名称
             type: 'bar', // 类型
@@ -613,7 +605,6 @@
             //   rotate: 0,  // 旋转角度
             //   color: '#eee'
             // },
-
             itemStyle: { // 图形的形状
               // color: lineColor[index++]
               // barBorderRadius: [18, 18, 0 ,0]
@@ -649,7 +640,6 @@
         }
       },
       getAddress(data) {
-        console.log("getAddress", data)
          this.deptBudgetList.warehousePrivate =data[0]
          this.deptBudgetList.warehouseCity =data[1]
         this.deptBudgetList.warehouseArea =data[2]
@@ -762,7 +752,6 @@
               this.getList1()
             })
             .catch((response) => {
-              // console.log(3333)
               // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
             })
         })
@@ -799,7 +788,6 @@
       },
        //清仓
       clearance() {
-        // console.log(row.outNumber)
         if (this.warehouseInfo.outNumber > 0) {
           this.$confirm(`你还有未完善的出库记录,请完善提交后再进行操作`, {
               cancelButtonText: '关闭',
@@ -838,7 +826,6 @@
       //任务
       handlTask() {
         var arr = []
-        // console.log(this.list)
         for (let i = 0; i < this.list.length; i++) {
           arr.push(this.list[i].warehouseName)
         }
@@ -925,7 +912,6 @@
           .then((response) => {
             var obj={'类型':'库内储量'},obj1={'类型':'移库在途'},obj2={'类型':'采购在途'},obj3={'类型':'销售在途'},obj4={'类型':'合计'},obj5={'类型':'货值'}
             var arr=response.map(item => {
-              console.log(item)
               obj[item.goodsName]=item.stockNum
               obj1[item.goodsName]=item.moveNum
               obj2[item.goodsName]=item.purchaseNum
@@ -934,7 +920,6 @@
             });
             arr.unshift('类型')
             for (const i in obj) {
-              console.log(i)
               if(i!='类型'){
                 var num=obj[i]+obj1[i]+obj2[i]+obj3[i]
                 obj4[i]=num.toFixed(3)
@@ -946,7 +931,6 @@
             this.tableData.push(obj3)
             this.tableData.push(obj4)
             this.tableHeader=arr
-            console.log(obj4)
           })
         this.dateTime=this.getCurrentDate(1)
       
@@ -988,7 +972,6 @@
           .then((response) => {
 
             this.list = response
-            // console.log(response)
           })
       },
       getList1(){
@@ -999,11 +982,9 @@
           })
           .toPromise()
           .then((response) => {
-            // if(this.warehouseType == '2'){  
               for (let q = 0; q < response.warehouseViewList.length; q++) {
               if (response.warehouseViewList[q].warehouseNumViewList.length > 0) {
                 for(let i = 0; i < response.warehouseViewList[q].warehouseNumViewList.length ; i++){
-                   // console.log(response[i].warehouseNumViewList[q])
                   if (response.warehouseViewList[q].warehouseNumViewList[i].inNetWeight) {
                     response.warehouseViewList[q].warehouseNumViewList[i].inNetWeight = Number(response.warehouseViewList[q].warehouseNumViewList[i].inNetWeight).toFixed(3)
                   }
@@ -1021,13 +1002,12 @@
                 }  
               }
             }
-            
             if(this.warehouseType == '1'){
               this.totalReserves = response.warehouseNumViewList
             }else{
               this.totalReserves = response.warehouseViewList[0].warehouseNumViewList
             }
-             this.initCharts()
+            this.initCharts()
             this.warehouseList = response.warehouseViewList
             this.warehouseInfo = this.warehouseList[0]
             this.warehouseInfo.warehouseLocation = this.warehouseList[0].warehousePrivate + this.warehouseList[0].warehouseCity + this.warehouseList[0].warehouseArea
@@ -1035,17 +1015,6 @@
             //经纬度
              this.warehousePositioning.lat = this.warehouseInfo.warehousePositioning.split(",")[1]
              this.warehousePositioning.lng = this.warehouseInfo.warehousePositioning.split(",")[0]
-            //   if(this.warehouseType == '2'){
-            //   this.maptitle = "定位"
-            //   this.btnCss2 ="btn1"
-            //   this.mapshow = true
-            //   this.mapChange(2)
-            //   }else{
-            //   this.maptitle = "库点监控"
-            //   this.btnCss1 ="btn1"
-            //   this.btnCss2 ="btn"
-            //   this.mapshow = false
-            // }
              for(let j = 0 ; j < this.warehouseXiaLa.length ; j++){
                 if(this.warehouseInfo.warehouseName == this.warehouseXiaLa[j].warehouseName){
                 for(let count = 0 ;count < this.warehouseXiaLa[j].goodsNameInfos.length ; count++){