소스 검색

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

qukaidi 3 년 전
부모
커밋
81571ed767

+ 4 - 0
src/components/crop-select/main.vue

@@ -33,6 +33,7 @@
         filterable
         clearable
         style="width:100%"
+        @clear="clear"
         :multiple="multiple ? multiple : false"
         :collapse-tags="collapseTags ? collapseTags : false"
         @change="corpChange"
@@ -223,6 +224,9 @@ export default {
       this.$emit("getCorpList", [...this.selectionList])
       this.corpVisible = false;
     },
+    clear(){
+      this.$emit("clear");
+    },
     corpChange(row) {
       if (!this.multiple) {
         this.corpList.forEach(e => {

+ 3 - 4
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -2155,18 +2155,17 @@ export default {
     // 政策导入成功钩子
     successPolicy(res, file) {
       this.openFullScreen(true)
-
       if (res.data.message === "" && !res.data.message) {
-        this.dataPolicy = res.data.list? [...res.data.list]: [];
+        this.dataPolicy = res.data.list? res.data.list: [];
         this.policyIndex++;
       } else {
-        this.dataPolicy = res.data.list? [...res.data.list]: [];
+        this.dataPolicy = res.data.list? res.data.list: [];
         this.policyIndex++;
         this.$message({
           showClose: true,
           message:res.data.message,
           type: 'error',
-          duration:200000,
+          duration:100000,
         });
       }
     },

+ 9 - 5
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -1710,11 +1710,15 @@ export default {
     },
     //打开附件
     annexOpen(row, index) {
-      this.enclosure = true
-      this.formAnnex = row
-      getFee({id: row.id}).then(res => {
-        this.orderList = res.data.data
-      })
+      if(row.id){
+        this.enclosure = true
+        this.formAnnex = row
+        getFee({id: row.id}).then(res => {
+          this.orderList = res.data.data
+        })
+      }else {
+        this.$message.error('请保存后再上传附件');
+      }
     },
     //保存
     saveAnnex() {

+ 8 - 3
src/views/landTransportation/driver/index.vue

@@ -98,6 +98,7 @@
           <el-button
               size="small"
               type="text"
+              style="color: #ffa21e;"
               @click="designate(row, index)"
               v-if="row.status===2"
           >受 理
@@ -105,6 +106,7 @@
           <el-button
               size="small"
               type="text"
+              style="color: #ffa21e;"
               @click="cancelDesignate(row, index)"
               v-if="row.status===6"
           >取消受理
@@ -112,6 +114,7 @@
           <el-button
               size="small"
               type="text"
+              style="color: #F56C6C;"
               @click="confirmArrival(row, index)"
               v-if="row.status === 5"
           >确认到厂
@@ -119,6 +122,7 @@
           <el-button
               size="small"
               type="text"
+              style="color: #14cde1;"
               @click="confirmCompletion(row, index)"
               v-if="row.status === 3"
           >确认完工
@@ -126,6 +130,7 @@
           <el-button
               size="small"
               type="text"
+              style="color: rgba(231,90,15,0.63);"
               @click="suitcase(row, index)"
               v-if="row.status === 6"
           >提箱
@@ -385,12 +390,12 @@ export default {
           prop: 'acceptTime'
         },{
           label: '提箱时间',
-          type: "borrowTime",
+          type: "datetime",
           format: 'yyyy-MM-dd HH:mm',
           valueFormat: 'yyyy-MM-dd HH:mm:ss',
           width: 200,
           index: 13,
-          prop: 'acceptTime'
+          prop: 'borrowTime'
         },{
           label: '完工日期',
           prop: 'finishedTime',
@@ -726,7 +731,7 @@ export default {
       }else {
         this.$message({
           type: 'warning',
-          message: '请选择实际到厂时间!'
+          message: '实际到厂时间!'
         });
       }
     },

+ 89 - 1
src/views/landTransportation/motorcadeDriver/index.vue

@@ -101,6 +101,10 @@
               corpType="CD"
           ></crop-select>
         </template>
+        <template slot-scope="{row}" slot="plateNo">
+          <span class="el-button--text" style="cursor: pointer"
+                @click="openTrack(row)">{{ row.plateNo }}</span>
+        </template>
         <template slot-scope="{row,index}" slot="menu">
           <el-button
               type="text"
@@ -192,6 +196,15 @@
         </span>
       </el-dialog>
     </basic-container>
+    <el-dialog
+        title="车辆轨迹"
+        append-to-body
+        custom-class="dialog_two"
+        :visible.sync="dialogVisibleTwo"
+        lock-scroll
+        width="80%">
+      <div id="container"></div>
+    </el-dialog>
   </div>
 </template>
 
@@ -204,6 +217,7 @@ import {
   motorcadeDriver,
   fleetDriverSave, telephone, getAttachment, saveAttached, recordingDetails, changeVehicle
 } from "@/api/landTransportation";
+import {location} from "@/api/gaude";
 
 export default {
   name: "index",
@@ -211,6 +225,10 @@ export default {
     return {
       key: 0,
       query:{},
+      dialogVisibleTwo:false,
+      map: null,
+      infoWindow: null,
+      marker: null,
       formDataList:{},
       optionData: {
         span: 12,
@@ -751,6 +769,7 @@ export default {
     },5000)
   },
   beforeDestroy() {
+    this.map && this.map.destroy();
     clearInterval(this.dispatchACarTimer); //关闭
   },
   methods: {
@@ -957,12 +976,81 @@ export default {
     },
     ToBreak(val) {
       if (val)return val.replace(/\n/g, '<br/>')
-    }
+    },
+    markerClick(e) {
+      this.infoWindow.setContent(e.target.content);
+      this.infoWindow.open(this.map, e.target.getPosition());
+    },
+    openTrack(row){
+      location({itemId: row.itemId, plateNo: row.plateNo, tenantId: '234557', color: '2'}).then(res => {
+        this.dialogVisibleTwo = true
+        let this_ = this
+        setTimeout(function () {
+          this_.initMap(res.data.data, row.plateNo);
+        }, 1000)
+      })
+    },
+    initMap(data, plateNo) {
+      this.map = new AMap.Map("container", {resizeEnable: true});
+      this.infoWindow = new AMap.InfoWindow({
+        ffset: new AMap.Pixel(0, -30),
+        offset: new AMap.Pixel(0, -30)
+      });
+      let icon = new AMap.Icon({
+        size: new AMap.Size(52, 26), // 图标尺寸
+        image: 'https://trade.tubaosoft.com/file/bladex/000000/1123598821738675201/che.png',
+        imageSize: new AMap.Size(52, 26), // 根据所设置的大小拉伸或压缩图片
+      });
+      this.marker = new AMap.Marker({
+        position: data.location,
+        map: this.map,
+        icon: icon,
+        markerMeta: new AMap.Size(28, 28),
+        offset: new AMap.Pixel(-26, -15),
+        autoRotation: true,
+        angle: -15
+      });
+      this.marker.content = '<div style="width: 300px;">'
+          + '<p style="font-size: 22px;font-weight: bold;background-color: #2d8cf0;color: #fff;">' + plateNo + '</p>'
+          + '<p style="padding: 5px 0"><span style="color: #a0a0a0">最后上报时间:</span>' + new Date(Number(data.time) + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ').substr(0, 19) + '</p>'
+          + '<div style="width: 150px;float: left;">'
+          + '<p style="padding: 5px 0"><span style="color: #a0a0a0">车辆状态:</span>' + (data.speed > 0 ? '行驶中' : '停车') + '</p>'
+          + '</div>'
+          + '<div style="width: 150px;float: right;">'
+          + '<p style="padding: 5px 0"><span style="color: #a0a0a0">速度:</span>' + data.speed + 'km/h</p>'
+          + '</div>'
+          + '<p><span style="color: #a0a0a0">当前位置:</span>' + data.address + '</p>'
+          + '<p style="padding: 5px 0"><span style="color: #a0a0a0">经纬度:</span>' + data.location.join(',') + '</p>'
+          + '</div>'
+      this.infoWindow.open(this.map, this.map.getCenter());
+      this.marker.on('click', this.markerClick);
+      this.marker.emit('click', {target: this.marker});
+      this.map.setFitView();
+    },
   }
 }
 </script>
 
 <style lang="scss" scoped>
+#container {
+  height: 80vh;
+  width: 100%;
+}
+::v-deep .el-dialog {
+  margin-top: 5vh !important;
+  margin-bottom: 0 !important;
+}
+
+::v-deep .el-dialog__body {
+  padding: 0 20px 10px 20px !important;
+}
+::v-deep .amap-info-content {
+  padding: 5px 5px 5px 5px !important;
+}
+::v-deep .amap-info-close {
+  right: 10px !important;
+  top: 12px !important;
+}
 .selected{
   color: #1e9fff !important;
 }

+ 40 - 9
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -305,6 +305,7 @@
                 :corpType="'GC'"
                 :disabled="goodsForm.status !== 0"
                 v-model="scope.row.corpId"
+                @clear="clear(scope.row)"
                 @getCorpData="(row)=>{withAddress(row,scope)}"/>
           </template>
         </el-table-column>
@@ -362,6 +363,24 @@
                       placeholder="请输入内容"></el-input>
           </template>
         </el-table-column>
+        <el-table-column
+            align="center"
+            width="40">
+          <template slot-scope="scope">
+            <div v-if="scope.$index !== tableData.length-1" style="margin: -5px auto">
+              <el-tooltip class="item" effect="dark" content="向上移动" placement="right" v-if="scope.$index > 1">
+                <div class="single" style="margin-bottom: -5px">
+                  <el-button type="text" style="margin-right: -0.5rem" icon="el-icon-arrow-up" size="mini" @click="moveUp(scope.row,scope.$index)"></el-button>
+                </div>
+              </el-tooltip>
+              <el-tooltip class="item" effect="dark" content="向下移动" placement="right" v-if="scope.$index > 0 && scope.$index < tableData.length-2">
+                <div class="single" style="margin-top: -5px">
+                  <el-button type="text" style="margin-right: -0.5rem" icon="el-icon-arrow-down" size="mini" @click="moveDown(scope.row,scope.$index)"></el-button>
+                </div>
+              </el-tooltip>
+            </div>
+          </template>
+        </el-table-column>
       </el-table>
     </basic-container>
     <containerTitle title="车辆信息"></containerTitle>
@@ -566,7 +585,7 @@ export default {
   },
   data() {
     return {
-      returnButton:Boolean,
+      returnButton: Boolean,
       dialogVisible: false,
       lineArr: [],
       activeIndex: '1',
@@ -1509,10 +1528,10 @@ export default {
           //查询业务员
           this.salesmanQuery()
         })
-      } else if (this.id.slice(0, 2) === '首页'||this.id.slice(0, 2) === '台账') {
-        if (this.id.slice(0, 2) === '首页'){
+      } else if (this.id.slice(0, 2) === '首页' || this.id.slice(0, 2) === '台账') {
+        if (this.id.slice(0, 2) === '首页') {
           this.returnButton = true
-        }else {
+        } else {
           this.returnButton = false
         }
         detailDelegationList({id: this.id.slice(2, this.id.length), kind: '1'}).then(res => {
@@ -1544,7 +1563,7 @@ export default {
             this.goodsForm.status = 2
           }
         })
-      }else {
+      } else {
         detailDelegationList({id: this.id, kind: '1'}).then(res => {
           this.goodsForm = res.data.data
           this.tableData = res.data.data.orderAddressList
@@ -1583,11 +1602,11 @@ export default {
           businessType: "出口",
           shippingMode: "集装箱",
           status: 0,
-          salesman:JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id,
+          salesman: JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id,
           belongCompany: res.data.data ? res.data.data.belongCompany : '',
           bsDate: new Date((new Date).getTime() + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ').substr(0, 19)//获取当天时间并格式化
         }
-        this.salesmanQuery('',true)
+        this.salesmanQuery('', true)
       })
       this.entrustList = []
     }
@@ -1628,10 +1647,10 @@ export default {
       });
     },
     //查询业务员
-    salesmanQuery(realName,type) {
+    salesmanQuery(realName, type) {
       getSalesman({realName: realName, userExt: this.goodsForm.corpId}).then(res => {
         this.salesmanList = res.data.data
-        if (type){
+        if (type) {
           this.changeSelect(this.goodsForm.salesman)
         }
       })
@@ -1803,6 +1822,12 @@ export default {
     addAddress() {
       this.tableData.splice(this.tableData.length - 1, 0, {})
     },
+    moveUp(row,index){
+      this.tableData[index] = this.tableData.splice(index -1 ,1,row)[0]
+    },
+    moveDown(row,index){
+      this.tableData[index] = this.tableData.splice(index +1 ,1,row)[0]
+    },
     //返回主列表
     backToList(value) {
       if (value === 0) {
@@ -2095,6 +2120,9 @@ export default {
       //查询业务员
       this.salesmanQuery()
     },
+    clear(row) {
+      row.corpName = ''
+    },
     //选择地址客户带出地址
     withAddress(row, scope) {
       this.$set(this.tableData[scope.$index], 'contacts', row.attn)
@@ -2149,4 +2177,7 @@ export default {
   padding: 10px 15px;
   font-size: 14px;
 }
+.single ::v-deep .el-button--mini{
+  padding: 0 0 !important;
+}
 </style>

+ 1 - 1
src/views/landTransportation/placeAnOrder/index.vue

@@ -97,7 +97,7 @@
                 </div>
                 <div class="card-content">
                   <span class="card-content-num" :class="activeName === '4'?'selected':''">{{ totalData.four }}</span>
-                  <span class="card-content-text" :class="activeName === '4'?'selected':''">工单关闭</span>
+                  <span class="card-content-text" :class="activeName === '4'?'selected':''">关闭</span>
                 </div>
               </div>
             </div>

+ 5 - 1
src/views/wel/components/quick-launch.vue

@@ -199,7 +199,11 @@ export default {
             );
             break;
           case "smart":
-            window.open( 'http://119.3.74.195:9527/view/'+ this.largeScreenToken +'?token=' + getToken())
+            if ((localStorage.getItem("roleName").split(',')).indexOf('IDC') !== -1){
+              window.open( 'http://119.3.74.195:9527/view/'+ this.largeScreenToken +'?token=' + getToken())
+            }else {
+              this.$message.error('此帐号无权限');
+            }
             break;
         }
       } else if (this.sysType == 3) {

+ 0 - 2
src/views/wel/home/landTransportation/components/sales-trend.vue

@@ -452,8 +452,6 @@ export default {
         //   }, 100)
         // })
         location({itemId: row.itemId, plateNo: row.plateNo, tenantId: '234557', color: '2'}).then(res => {
-          console.log(res.data.data)
-          console.log(this.lineArr[this.lineArr.length - 1])
           this.dialogVisible = true
           let this_ = this
           setTimeout(function () {