Forráskód Böngészése

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhangyuewww 2 éve
szülő
commit
a051d667f8

+ 38 - 38
src/components/mapdrag/indexMap.vue

@@ -158,11 +158,11 @@
         var that = this
         this.makeJsonData()
         AMapLoader.load({
-          "key": "211dd6f989e719022aaf47ddb0659c47", // 申请好的Web端开发者Key,首次调用 load 时必填
-          "version": "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
-          "plugins": ['plugin=AMap.Scale', 'AMap.ToolBar','AMap.AutoComplete', 'AMap.PlaceSearch', 'AMap.Geocoder', 'AMap.DistrictSearch','AMap.Geolocation', 'Geolocation'],
-          "Loca": { // 是否加载 Loca, 缺省不加载
-            "version": '2.0.0' // Loca 版本,缺省 1.3.2
+          'key': '211dd6f989e719022aaf47ddb0659c47', // 申请好的Web端开发者Key,首次调用 load 时必填
+          'version': '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
+          'plugins': ['plugin=AMap.Scale', 'AMap.ToolBar','AMap.AutoComplete', 'AMap.PlaceSearch', 'AMap.Geocoder', 'AMap.DistrictSearch','AMap.Geolocation', 'Geolocation'],
+          'Loca': { // 是否加载 Loca, 缺省不加载
+            'version': '2.0.0' // Loca 版本,缺省 1.3.2
           },
         }).then((AMap) => {
           this.loadmap()
@@ -192,26 +192,26 @@
           _coordinates1.push(Number(_position1[1]))
           _coordinates1.push(Number(_position1[0]))
           let _obj1 = {
-            "type": "Feature",
-            "properties": {
-              "type": i,
+            'type': 'Feature',
+            'properties': {
+              'type': i,
             },
-            "geometry": {
-              "type": "Point",
-              "coordinates": _coordinates1
+            'geometry': {
+              'type': 'Point',
+              'coordinates': _coordinates1
             }
           }
           let _position11 = _data.startPlace ? _data.startPlace.split(',') : []
           _coordinates11.push(Number(_position11[1]))
           _coordinates11.push(Number(_position11[0]))
           let _obj11 = {
-            "type": "Feature",
-            "properties": {
-              "type": i,
+            'type': 'Feature',
+            'properties': {
+              'type': i,
             },
-            "geometry": {
-              "type": "Point",
-              "coordinates": _coordinates11
+            'geometry': {
+              'type': 'Point',
+              'coordinates': _coordinates11
             }
           }
 
@@ -235,31 +235,31 @@
           _marker.name = _data.name
           this.markerList.push(_marker)
           let _obj2 = {
-            "type": "Feature",
-            "properties": {
+            'type': 'Feature',
+            'properties': {
 
             },
-            "geometry": {
-              "type": "LineString",
-              "coordinates": _coordinates2
+            'geometry': {
+              'type': 'LineString',
+              'coordinates': _coordinates2
             }
           }
           _features2.push(_obj2)
         }
         this.mapPointData = {
-          "type": "FeatureCollection",
-          "features": _features1
+          'type': 'FeatureCollection',
+          'features': _features1
         }
         this.mapLineData = {
-          "type": "FeatureCollection",
-          "features": _features2
+          'type': 'FeatureCollection',
+          'features': _features2
         }
-        console.log("this.mapPointData", this.mapPointData)
-        console.log("this.mapPointData", this.mapLineData)
+        console.log('this.mapPointData', this.mapPointData)
+        console.log('this.mapPointData', this.mapLineData)
 
       },
       loadmap(val) {
-        var map = new AMap.Map('mapContainer', {
+          let map = new AMap.Map('mapContainer', {
           zoom: 4.89,
           showLabel: true,
           viewMode: '3D',
@@ -270,13 +270,13 @@
           showIndoorMap: false,
         });
 
-        var loca = new Loca.Container({
+        let loca = new Loca.Container({
           map,
         });
         for (let i = 0; i < this.markerList.length; i++) {
           // 构造点标记
           if (this.markerList[i].iconSrc[0] && this.markerList[i].iconSrc[1]) {
-            var marker = new AMap.Marker({
+            let marker = new AMap.Marker({
               position: this.markerList[i].iconSrc,
               anchor: 'bottom-center',
               icon: new AMap.Icon({
@@ -288,7 +288,7 @@
             map.add(marker);
             marker.setLabel({
               offset: new AMap.Pixel(0, 0), //设置文本标注偏移量
-              content: "<div class = 'maker-item'>" + this.markerList[i].name + "</div>", //设置文本标注内容
+              content: '<div class = \'maker-item\'>' + this.markerList[i].name + '</div>', //设置文本标注内容
               direction: 'right' //设置文本标注方位
 
             });
@@ -301,8 +301,8 @@
         this.timer = setInterval(function() {
           _markerDom[_index].style.opacity = 1
           _markerDom[_index].style.transition = '2s'
-          var elseLi = _markerDom;
-          for (var i = 0; i < elseLi.length; i++) {
+          let elseLi = _markerDom;
+          for (let i = 0; i < elseLi.length; i++) {
             if (elseLi[i] !== _markerDom[_index]) { //判断是否是ele节点,是否与触发事件的节点相同
               elseLi[i].style.opacity = 0
               _markerDom[_index].style.transition = '2s'
@@ -314,7 +314,7 @@
 
 
         // 呼吸点
-        var scatter = new Loca.ScatterLayer({
+        let scatter = new Loca.ScatterLayer({
           loca,
           zIndex: 10,
           opacity: 0.6,
@@ -322,7 +322,7 @@
           zooms: [2, 22],
         });
 
-        var pointGeo = new Loca.GeoJSONSource({
+        let pointGeo = new Loca.GeoJSONSource({
           // url: 'https://a.amap.com/Loca/static/loca-v2/demos/mock_data/pulselink-china-city-point.json',
           data: this.mapPointData
         });
@@ -338,7 +338,7 @@
         loca.add(scatter);
 
         // 弧线
-        var pulseLink = new Loca.PulseLinkLayer({
+        let pulseLink = new Loca.PulseLinkLayer({
           // loca,
           zIndex: 10,
           opacity: 1,
@@ -347,7 +347,7 @@
           depth: true,
         });
 
-        var geo = new Loca.GeoJSONSource({
+        let geo = new Loca.GeoJSONSource({
           // url: 'https://a.amap.com/Loca/static/loca-v2/demos/mock_data/data-line-out.json',
           data: this.mapLineData
         });

+ 25 - 9
src/utils/util.js

@@ -199,25 +199,41 @@ export const fullscreenEnable = () => {
  * 浏览器全屏
  */
 export const reqFullScreen = () => {
-  if (document.documentElement.requestFullScreen) {
-    document.documentElement.requestFullScreen();
-  } else if (document.documentElement.webkitRequestFullScreen) {
-    document.documentElement.webkitRequestFullScreen();
-  } else if (document.documentElement.mozRequestFullScreen) {
-    document.documentElement.mozRequestFullScreen();
+  let _documentDom = document.getElementById('contentView')
+  if (_documentDom.requestFullScreen) {
+    _documentDom.requestFullScreen();
+  } else if (_documentDom.webkitRequestFullScreen) {
+    _documentDom.webkitRequestFullScreen();
+  } else if (_documentDom.mozRequestFullScreen) {
+    _documentDom.mozRequestFullScreen();
   }
+  // if (document.documentElement.requestFullScreen) {
+  //   document.documentElement.requestFullScreen();
+  // } else if (document.documentElement.webkitRequestFullScreen) {
+  //   document.documentElement.webkitRequestFullScreen();
+  // } else if (document.documentElement.mozRequestFullScreen) {
+  //   document.documentElement.mozRequestFullScreen();
+  // }
 };
 /**
  * 浏览器退出全屏
  */
 export const exitFullScreen = () => {
-  if (document.documentElement.requestFullScreen) {
+  let _documentDom = document.getElementById('contentView')
+    if (_documentDom.requestFullScreen) {
     document.exitFullScreen();
-  } else if (document.documentElement.webkitRequestFullScreen) {
+  } else if (_documentDom.webkitRequestFullScreen) {
     document.webkitCancelFullScreen();
-  } else if (document.documentElement.mozRequestFullScreen) {
+  } else if (_documentDom.mozRequestFullScreen) {
     document.mozCancelFullScreen();
   }
+  // if (document.documentElement.requestFullScreen) {
+  //   document.exitFullScreen();
+  // } else if (document.documentElement.webkitRequestFullScreen) {
+  //   document.webkitCancelFullScreen();
+  // } else if (document.documentElement.mozRequestFullScreen) {
+  //   document.mozCancelFullScreen();
+  // }
 };
 /**
  * 递归寻找子类的父类

+ 35 - 7
src/views/home/index.vue

@@ -1,6 +1,6 @@
 <!-- 首页模块 首页面 -->
 <template>
-  <div class="home">
+  <div class="home" id='contentView'>
     <div class="body-middle" :class="{ 'body-middle-height': blockList[0].flag }">
       <div class="body-middle-left">
         <!-- 任务、消息、提醒、超期 -->
@@ -75,7 +75,7 @@
             </el-row>
             <el-row>
               <h3 class="content2-map">库点流向分布</h3>
-              <div class="center-map">
+              <div class="center-map" style="border: 2px solid #6a5f5f">
                 <map-drag :listData=' mapInfo'></map-drag>
               </div>
             </el-row>
@@ -237,7 +237,7 @@
         nowTime: null, //存放时分秒变量
         timer: '', //定义一个定时器的变量
         currentTime: new Date(), // 获取当前时间
-        timer: '',
+        timer1: '',
         dialogVisible: false,
         showEchart: false,
         phone: '', // 正式租户电话号码
@@ -360,6 +360,7 @@
       // this.checkUserInfoDialog()
       // {
       this.timer = setInterval(this.getTime, 1000);
+      this.timer1 = setInterval(this.flushData, 120000);
       // }
     },
     beforeDestroy() {
@@ -367,6 +368,10 @@
       if (this.timer) {
         clearInterval(this.timer); // 在Vue实例销毁前,清除定时器
       }
+      clearInterval(this.timer1);
+      if (this.timer1) {
+        clearInterval(this.timer1); // 在Vue实例销毁前,清除定时器
+      }
     },
     async mounted() {
       var staffId = JSON.parse(localStorage.getItem('winseaview-userInfo')).content.staffId
@@ -406,6 +411,7 @@
       // this.getNewList()
       gChartsData({
         compId: localStorage.getItem('ws-pf_compId'),
+        loadingstatus: 1,
         seachMoth: '2022'
       }).toPromise().then(res => {
         console.log('··············', res)
@@ -453,6 +459,27 @@
     },
     methods: {
       ...mapActions('user', ['toSetShow', 'changeVesslBank']),
+      flushData(){
+         gChartsData({
+          compId: localStorage.getItem('ws-pf_compId'),
+          loadingstatus: 1,
+          seachMoth: '2022'
+        }).toPromise().then(res => {
+          console.log('··············', res)
+          // this.chartsData = res
+          this.carCount1 = res[6].biViewInfoList[0].count
+          this.carCount2 = res[6].biViewInfoList[1].count
+          this.carCount3 = res[6].biViewInfoList[2].count
+          // this.physicalInventory = Number(res[7].biViewInfoList[0].count).toFixed(2)
+          // this.procurementPending= Number(res[7].biViewInfoList[1].count).toFixed(2)
+          // this.salesPending =  Number(res[7].biViewInfoList[2].count).toFixed(2)
+          // this.position = Number(Number(this.physicalInventory)+Number(this.procurementPending) - Number(this.salesPending)).toFixed(2)
+          // this.totalReserves = res[8].biViewInfoList
+          // this.mapInfo = res[9]
+          // console.log(res)
+          // this.initCharts()
+        })
+      },
       getChartsData() {
         noticeNumber().toPromise().then(res => {
           const {
@@ -554,7 +581,7 @@
       },
       initCharts() {
         let app = this;
-        var roseCharts = document.getElementsByClassName('roseChart');
+        let roseCharts = document.getElementsByClassName('roseChart');
         for (let i = 0; i < roseCharts.length; i++) {
           let myChart = app.$echarts.init(roseCharts[i]);
           let color = []
@@ -586,7 +613,7 @@
               color = ['#247ef4', '#3a3b40'];
               // 圆环图各环节的名称和值(系列中各数据项的名称和值)
               data = [{
-                name: '已开票1',
+                name: '已开票',
                 value: Number((this.chartsData[i].biViewInfoList[0].count)/10000).toFixed(2),
                 type: '采购合同'
               }, {
@@ -751,7 +778,8 @@
         let _y = []
         for (let i = 0; i < this.totalReserves.length; i++) {
           _x.push(this.totalReserves[i].name)
-          _y.push(this.totalReserves[i].count)
+          var a = Number(this.totalReserves[i].count).toFixed(2)
+          _y.push(a)
         }
 
         // 柱状图
@@ -1952,7 +1980,7 @@
   }
 
   .home {
-    background: rgb(27, 28, 30);
+    background: #2a2a2a;
     padding-bottom: 20px
   }
 

+ 5 - 7
src/views/taskManagement/inOutWarehouseTaskEdit.vue

@@ -81,10 +81,9 @@
             <div>  {{dataList.contractNo}}</div>
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货源" class="huom">
+          <!-- <el-form-item label="货源" class="huom">
             {{goods}}
-            <!-- </el-select> -->
-          </el-form-item>
+          </el-form-item> -->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
             {{dataList.weight}}
@@ -195,10 +194,9 @@
             {{dataList.goodsName}}
             <!-- </el-select> -->
           </el-form-item>
-          <el-form-item v-else label="货源" class="huom">
+          <!-- <el-form-item v-else label="货源" class="huom">
             {{goods}}
-            <!-- </el-select> -->
-          </el-form-item>
+          </el-form-item> -->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
             {{dataList1.weight}}
@@ -302,7 +300,7 @@
             <!-- </el-select> -->
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货源" class="huom">
+          <!-- <el-form-item label="货源" class="huom"> -->
             {{goods}}
             <!-- </el-select> -->
           </el-form-item>

+ 23 - 16
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -67,14 +67,21 @@
 						</el-input>
 					</el-form-item>
 					<!-- 货名 -->
-					<el-form-item label="货源" class="huom">
+					<el-form-item v-if="dataList.taskTypeKey != 3" label="货名" class="huom">
+						<el-select disabled v-model="dataList.goodsName" placeholder="货名" class="huom" @change="selectgoodsName"
+						filterable clearable>
+						<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+							:value="item.constValue"></el-option>
+						</el-select>
+					</el-form-item>
+					<!-- <el-form-item label="货源" class="huom">
 						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
 						<el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
-					</el-form-item>
+					</el-form-item> -->
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
-						<el-input disabled @input="weightchange1" v-model="dataList.weight" placeholder="请输入重量(吨)"
+						<el-input  @input="weightchange1" v-model="dataList.weight" placeholder="请输入重量(吨)"
 							maxlength="120" size="small" class="huom" />
 					</el-form-item>
 					<!-- 品级 -->
@@ -181,14 +188,14 @@
 							:value="item.constValue"></el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item v-else label="货源" class="huom">
+					<!-- <el-form-item v-else label="货源" class="huom">
 						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
 						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
-					</el-form-item>
+					</el-form-item> -->
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
-						<el-input disabled @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
+						<el-input  @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
 							maxlength="120" size="small" class="huom" />
 					</el-form-item>
 					<!-- 品级 -->
@@ -287,14 +294,14 @@
 						</el-select>
 					</el-form-item>
 					<!-- 货名 -->
-					<el-form-item label="货源" class="huom">
+					<!-- <el-form-item label="货源" class="huom">
 						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
 						 <el-button class="bg-bottom" v-if='dataList.taskTypeKey!=4' type="primary" size="small" @click="supplygoods()">选择货源</el-button>
-					</el-form-item>
+					</el-form-item> -->
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
-						<el-input disabled v-model="dataList.weight" placeholder="请输入重量(吨)"
+						<el-input  v-model="dataList.weight" placeholder="请输入重量(吨)"
 							maxlength="120" size="small" class="huom" />
 					</el-form-item>
 					<!-- 品级 -->
@@ -1498,13 +1505,13 @@
 						data[i].sourceId=data[i].id
 					}
 				}else{
-					if(this.dataList.taskTypeKey == 1||this.dataList.taskTypeKey == 3||this.dataList.taskTypeKey == 4||this.dataList1.taskTypeKey == 2&&this.dataList1.inOutType){
-						this.$message({
-							message: '请选择货源!',
-							type: 'warning'
-						})
-						return
-					}
+					// if(this.dataList.taskTypeKey == 1||this.dataList.taskTypeKey == 3||this.dataList.taskTypeKey == 4||this.dataList1.taskTypeKey == 2&&this.dataList1.inOutType){
+					// 	this.$message({
+					// 		message: '请选择货源!',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
 					
 				}
 				var supplygoods=data

+ 6 - 6
src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue

@@ -96,11 +96,11 @@
                 :value="item.constValue"></el-option>
             </el-select>
           </el-form-item> -->
-          <el-form-item label="货源" class="huom">
+          <!-- <el-form-item label="货源" class="huom">
             <el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
             <el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">查看货源</el-button>
-          </el-form-item>
+          </el-form-item> -->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)">
             <el-input disabled v-model="dataList.weight" placeholder="请输入重量(吨)" maxlength="120" size="small"
@@ -226,11 +226,11 @@
 							:value="item.constValue"></el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item v-else label="货源" class="huom">
+					<!-- <el-form-item v-else label="货源" class="huom">
 						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
 						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">查看货源</el-button>
-					</el-form-item>
+					</el-form-item> -->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)">
             <el-input @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)" maxlength="120"
@@ -347,11 +347,11 @@
           </el-form-item>
           <!-- 货名 -->
 
-          <el-form-item label="货源" class="huom">
+          <!-- <el-form-item label="货源" class="huom">
             <el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
              <el-button class="bg-bottom" v-if='dataList.taskTypeKey!=4' type="primary" size="small" @click="supplygoods()">查看货源</el-button>
-          </el-form-item>
+          </el-form-item> -->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)">
             <el-input disabled v-model="dataList.weight" placeholder="请输入重量(吨)" maxlength="120" size="small"

+ 9 - 12
src/views/taskManagement/tranManagementWarehouseInOutTaskEdit.vue

@@ -163,19 +163,18 @@
             />
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货源" class="huom">
+          <!-- <el-form-item label="货源" class="huom">
             <el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
             <el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
-          </el-form-item>
+          </el-form-item> -->
           <!--重量(吨)-->
           <el-form-item
             label="重量(吨)"
             span="1"
-            style="margin-left: 350px; margin-top: -40px"
+            style="margin-left: 650px; margin-top: -40px"
           >
             <el-input
-            disabled
               v-model="dataList.weight"
               placeholder="请输入重量(吨)"
               maxlength="120"
@@ -413,19 +412,18 @@
 							:value="item.constValue"></el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item v-else label="货源" class="huom">
+					<!-- <el-form-item v-else label="货源" class="huom">
 						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
 						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
-					</el-form-item>
+					</el-form-item> -->
           <!--重量(吨)-->
           <el-form-item
             label="重量(吨)"
             span="1"
-            style="margin-left: 350px; margin-top: -40px"
+            style="margin-left: 650px; margin-top: -40px"
           >
             <el-input
-              disabled
               @input="weightchange"
               v-model="dataList1.weight"
               placeholder="请输入重量(吨)"
@@ -635,19 +633,18 @@
             />
           </el-form-item>
           <!-- 货名 -->
-          <el-form-item label="货源" class="huom">
+          <!-- <el-form-item label="货源" class="huom">
             <el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
             <el-button class="bg-bottom" v-if='dataList.taskTypeKey!=4' type="primary" size="small" @click="supplygoods()">选择货源</el-button>
-          </el-form-item>
+          </el-form-item> -->
           <!--重量(吨)-->
           <el-form-item
             label="重量(吨)"
             span="1"
-            style="margin-left: 350px; margin-top: -40px"
+            style="margin-left: 650px; margin-top: -40px"
           >
             <el-input
-              disabled
               v-model="dataList.weight"
               placeholder="请输入重量(吨)"
               maxlength="120"