Browse Source

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

qukaidi 3 years ago
parent
commit
d2710a0539

+ 1 - 1
src/components/e-crop-jump/index.vue

@@ -12,7 +12,7 @@ export default {
   },
   methods:{
     jump(){
-      console.log(this.value)
+      console.log(this.value,this.corpType)
       if (this.corpType == 'DD'){
         this.$router.push({
           path: '/basicData/portinformation/index',

+ 31 - 1
src/router/views/index.js

@@ -1307,7 +1307,7 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/landTransportation/placeAnOrder/index')
   }]
 },
-//派车
+//调度
 {
   path: '/landTransportation/dispatchingCars/index',
   component: Layout,
@@ -1324,6 +1324,36 @@ export default [{
 },
 //派车
 {
+  path: '/landTransportation/motorcadeDriver/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/landTransportation/motorcadeDriver/index',
+    name: '派车',
+    meta: {
+      i18n: '/landTransportation/motorcadeDriver/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/landTransportation/motorcadeDriver/index')
+  }]
+},
+//跟踪
+{
+  path: '/landTransportation/driver/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/landTransportation/driver/index',
+    name: '跟踪',
+    meta: {
+      i18n: '/landTransportation/driver/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/landTransportation/driver/index')
+  }]
+},
+//散货
+{
   path: '/landTransportation/bulkCargo/index',
   component: Layout,
   hidden: true,

+ 6 - 5
src/views/basicData/portinformation/index.vue

@@ -111,11 +111,12 @@
       reportDialog
     },
     activated() {
-      this.$set(this.form, "name", this.$route.query.customerName);
-      this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
-      this.$router.push({ query: {} });
-      // console.log(this.form.name)
-      // this.$refs.crud.beforeOpen()
+      if (this.$route.query.customerName){
+        this.$set(this.form, "name", this.$route.query.customerName);
+        this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+        this.$refs.crud.rowAdd()
+        this.$router.push({ query: {} });
+      }
     },
     mounted() {
       option.height = window.innerHeight - 210 ;

+ 14 - 2
src/views/landTransportation/bulkCargo/detailPage.vue

@@ -40,6 +40,7 @@
           <el-button
               type="warning"
               size="small"
+              :loading="type"
               v-if="goodsForm.status > 0 && roleName.indexOf('admin') !== -1 || roleName.indexOf('业务员') !== -1 || roleName.indexOf('分管调度') !== -1"
               :disabled="
             !(roleName.indexOf('业务员') !== -1||roleName.indexOf('分管调度') !== -1||roleName.indexOf('经理') !== -1||roleName.indexOf('部门经理') !== -1||roleName.indexOf('总经理') !== -1) && !(roleName.indexOf('admin') !== -1)"
@@ -49,6 +50,7 @@
           <el-button
               type="warning"
               size="small"
+              :loading="type"
               v-if="goodsForm.status > 3 && ((roleName.indexOf('平台') !== -1 && roleName.indexOf('分管调度') !== -1) || roleName.indexOf('车队') !== -1 || roleName.indexOf('admin') !== -1) && goodsForm.status !== 5"
               @click="confirmChangeTwo"
           >变更车
@@ -83,6 +85,7 @@
               type="warning"
               v-if="goodsForm.status === 2 && ((roleName.indexOf('平台') !== -1 && roleName.indexOf('分管调度') !== -1)||roleName.indexOf('admin') !== -1) "
               size="small"
+              :loading="type"
               @click="cancelScheduling('2')"
           >取消调度
           </el-button>
@@ -90,6 +93,7 @@
               type="warning"
               v-if="goodsForm.status === 3 && (roleName.indexOf('车队') !== -1 || roleName.indexOf('admin') !== -1) || (roleName.indexOf('平台') !== -1 && roleName.indexOf('分管调度') !== -1)"
               size="small"
+              :loading="type"
               @click="cancelScheduling('1')"
           >取消派车
           </el-button>
@@ -97,6 +101,7 @@
               type="warning"
               v-if="goodsForm.status === 6 && (roleName.indexOf('司机') !== -1 || roleName.indexOf('admin') !== -1 || (roleName.indexOf('平台') !== -1 && roleName.indexOf('分管调度') !== -1))"
               size="small"
+              :loading="type"
               @click="cancelScheduling('3')"
           >取消受理
           </el-button>
@@ -104,10 +109,10 @@
               type="success"
               v-if="goodsForm.status === 1 && ((roleName.indexOf('客户') !== -1 && roleName.indexOf('业务员') !== -1)||roleName.indexOf('admin') !== -1 || (roleName.indexOf('平台') !== -1 && roleName.indexOf('分管调度') !== -1))"
               size="small"
+              :loading="type"
               @click="submit(false)"
           >取消提交
           </el-button>
-<!--          !(roleName.indexOf('客户') !== -1 || roleName.indexOf('平台') !== -1 || roleName.indexOf('车队') !== -1)-->
           <el-button
               type="primary"
               :disabled="goodsForm.status === 5"
@@ -2583,9 +2588,15 @@ export default {
     },
     rowCell(row, index) {
       this.$refs.collection.rowCell(row, index)
+      if (row.$cellEdit == false){
+        this.editCustomer()
+      }
     },
     paymentRowCell(row, index) {
       this.$refs.payment.rowCell(row, index)
+      if (row.$cellEdit == false){
+        this.editCustomer()
+      }
     },
     //箱信息移除
     rowDel(row, index) {
@@ -2648,6 +2659,7 @@ export default {
           this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = false
           this.findObject(this.goodsOptionFormTwo.column, "driverTel").disabled = false
           this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = false
+          this.findObject(this.goodsOptionFormTwo.column, "fleetRemarks").disabled = false
         }
       }
       // }else {
@@ -2656,7 +2668,7 @@ export default {
       // })
     },
     confirmChangeTwo(){
-      if (((this.roleName.indexOf('平台') !== -1 && this.roleName.indexOf('分管调度') !== -1)||this.roleName.indexOf('车队') !== -1) && this.goodsForm.status >3){
+      if (((this.roleName.indexOf('平台') !== -1 && this.roleName.indexOf('分管调度') !== -1)||this.roleName.indexOf('车队') !== -1)||this.roleName.indexOf('admin') !== -1 && this.goodsForm.status >3){
         this.goodsOptionFormTwo.disabled = false
         this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = true
         this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = false

+ 1 - 0
src/views/landTransportation/bulkCargo/index.vue

@@ -1124,6 +1124,7 @@ export default {
     },
     initMap(data, plateNo) {
       console.log(data, plateNo)
+      this.map = null
       this.map = new AMap.Map("container", {resizeEnable: true});
       this.infoWindow = new AMap.InfoWindow({
         ffset: new AMap.Pixel(0, -30),

+ 44 - 11
src/views/landTransportation/bulkReportAnalysis/index.vue

@@ -695,21 +695,14 @@ export default {
           width: 100,
           overHidden: true
         }, {
-          label: '利润',
-          width: 80,
-          precision: 2,
-          index: 17,
-          type: 'number',
-          prop: 'profit'
-        }, {
           label: '应收杂费明细',
           width: 100,
-          index: 17,
+          index: 18,
           prop: 'extraAmountItemD'
         }, {
           label: '应付杂费明细',
           width: 100,
-          index: 18,
+          index: 19,
           overHidden: true,
           prop: 'extraAmountItemC'
         }]
@@ -924,7 +917,47 @@ export default {
     } else {
       this.optionList = this.optionListOne
     }
+    if (this.roleName.indexOf('admin') !== -1 || this.roleName.indexOf('总调度') !== -1){
+      let type = false
+      for (let item in this.optionList.column){
+        if (this.optionList.column[item].prop == 'profit'){
+          type = true
+        }
+      }
+      if (!type){
+        this.optionList.column.push({
+          label: '利润',
+          width: 80,
+          precision: 2,
+          index: 17,
+          type: 'number',
+          prop: 'profit'
+        })
+      }
+    }else {
+      for (let item in this.optionList.column){
+        if (this.optionList.column[item].prop == 'profit'){
+          this.optionList.column.splice(item, 1);
+        }
+      }
+    }
     this.goodsOptionCrud = await this.getColumnData(this.getColumnName(88.3), this.optionList);
+    if (this.roleName.indexOf('admin') !== -1 || this.roleName.indexOf('总调度') !== -1){
+      this.goodsOptionCrud.column.push({
+        label: '利润',
+        width: 80,
+        precision: 2,
+        index: 17,
+        type: 'number',
+        prop: 'profit'
+      })
+    }else {
+      for (let item in this.goodsOptionCrud.column){
+        if (this.goodsOptionCrud.column[item].prop == 'profit'){
+          this.goodsOptionCrud.column.splice(item, 1);
+        }
+      }
+    }
     this.collectionOption = await this.getColumnData(this.getColumnName(88.2), this.collectionOptionBackup);
     getSalesman().then(res=>{
       this.findObject(this.goodsOptionCrud.column, "salesmanName").dicData = res.data.data
@@ -1018,7 +1051,7 @@ export default {
        * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
        * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
        */
-      const inSave = await this.saveColumnData(this.getColumnName(88.1), this.goodsOptionCrud);
+      const inSave = await this.saveColumnData(this.getColumnName(88.3), this.goodsOptionCrud);
       if (inSave) {
         this.$message.success("保存成功");
         //关闭窗口
@@ -1028,7 +1061,7 @@ export default {
     //自定义列重置
     async resetColumn() {
       this.goodsOptionCrud = this.optionList;
-      const inSave = await this.delColumnData(this.getColumnName(88.1), this.optionList);
+      const inSave = await this.delColumnData(this.getColumnName(88.3), this.optionList);
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;

+ 53 - 31
src/views/landTransportation/reportAnalysis/index.vue

@@ -156,7 +156,8 @@
           <el-button @click="enclosure = false" size="small">取 消</el-button>
         </span>
       </el-dialog>
-      <track-playback :dialogVisible="dialogVisibleTwo" v-loading="loadingDialog" :parkingPoint="parkingPoint" :lineArr="lineArr"
+      <track-playback :dialogVisible="dialogVisibleTwo" v-loading="loadingDialog" :parkingPoint="parkingPoint"
+                      :lineArr="lineArr"
                       ref="playback"></track-playback>
     </basic-container>
   </div>
@@ -271,7 +272,7 @@ export default {
         searchIcon: true,
         searchIndex: 2,
         searchSpan: 8,
-        menuWidth:140,
+        menuWidth: 140,
         menu: true,
         searchMenuPosition: "right",
         searchMenuSpan: 6,
@@ -424,6 +425,30 @@ export default {
     this.goodsOptionCrud = await this.getColumnData(this.getColumnName(88.1), this.optionList);
     this.collectionOption = await this.getColumnData(this.getColumnName(88.2), this.collectionOptionBackup);
     this.key++
+    if (this.roleName.indexOf('admin') !== -1 || this.roleName.indexOf('总调度') !== -1) {
+      let type = false
+      for (let item in this.goodsOptionCrud.column) {
+        if (this.goodsOptionCrud.column[item].prop == 'profit') {
+          type = true
+        }
+      }
+      if (!type) {
+        this.goodsOptionCrud.column.push({
+          label: '利润',
+          width: 80,
+          precision: 2,
+          index: 16,
+          type: 'number',
+          prop: 'profit'
+        })
+      }
+    } else {
+      for (let item in this.goodsOptionCrud.column) {
+        if (this.goodsOptionCrud.column[item].prop == 'profit') {
+          this.goodsOptionCrud.column.splice(item, 1);
+        }
+      }
+    }
     if (this.roleName.indexOf('总调度') !== -1 || this.roleName.indexOf('分管调度') !== -1 || this.roleName.indexOf('车队') !== -1) {
       this.goodsOptionCrud.menu = false;
       // this.goodsOptionCrud.column.forEach((item,index)=>{
@@ -542,13 +567,6 @@ export default {
               width: 100,
               prop: 'extraAmountC'
             }, {
-              label: '利润',
-              width: 80,
-              precision: 2,
-              index: 16,
-              type: 'number',
-              prop: 'profit'
-            }, {
               label: '应付杂费明细',
               width: 100,
               index: 18,
@@ -687,13 +705,6 @@ export default {
             width: 100,
             prop: 'extraAmountC'
           }, {
-            label: '利润',
-            width: 80,
-            precision: 2,
-            index: 16,
-            type: 'number',
-            prop: 'profit'
-          }, {
             label: '应付杂费明细',
             width: 100,
             index: 18,
@@ -770,7 +781,7 @@ export default {
             ...queryParams    //括号内是要传递给新窗口的参数
           }
         })
-        window.open(routeData.href.slice(1,routeData.href.length)+'&'+`${this.website.tokenHeader}=${getToken()}`);
+        window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
       }).catch(() => {
         this.$message({
           type: 'info',
@@ -823,6 +834,30 @@ export default {
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
+      if (this.roleName.indexOf('admin') !== -1 || this.roleName.indexOf('总调度') !== -1) {
+        let type = false
+        for (let item in this.goodsOptionCrud.column) {
+          if (this.goodsOptionCrud.column[item].prop == 'profit') {
+            type = true
+          }
+        }
+        if (!type) {
+          this.goodsOptionCrud.column.push({
+            label: '利润',
+            width: 80,
+            precision: 2,
+            index: 16,
+            type: 'number',
+            prop: 'profit'
+          })
+        }
+      } else {
+        for (let item in this.goodsOptionCrud.column) {
+          if (this.goodsOptionCrud.column[item].prop == 'profit') {
+            this.goodsOptionCrud.column.splice(item, 1);
+          }
+        }
+      }
       if (this.roleName.indexOf('总调度') !== -1 || this.roleName.indexOf('分管调度') !== -1 || this.roleName.indexOf('车队') !== -1) {
         this.goodsOptionCrud.menu = false;
         // this.goodsOptionCrud.column.forEach((item,index)=>{
@@ -941,13 +976,6 @@ export default {
                 width: 100,
                 prop: 'extraAmountC'
               }, {
-                label: '利润',
-                width: 80,
-                precision: 2,
-                index: 16,
-                type: 'number',
-                prop: 'profit'
-              }, {
                 label: '应付杂费明细',
                 width: 100,
                 index: 18,
@@ -1086,13 +1114,6 @@ export default {
               width: 100,
               prop: 'extraAmountC'
             }, {
-              label: '利润',
-              width: 80,
-              precision: 2,
-              index: 16,
-              type: 'number',
-              prop: 'profit'
-            }, {
               label: '应付杂费明细',
               width: 100,
               index: 18,
@@ -1124,6 +1145,7 @@ export default {
             })
         return this.calculateHu()
       }
+
     },
     //行跳转
     celJump(row, index) {

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

@@ -23,7 +23,7 @@
           <i class="tradingIcon icon-ship" style="color:#7db4ff"></i>
           <span>跟踪</span>
         </div>
-        <div class="content-icon" @click="track?inPage('sh'):'JZ'">
+        <div class="content-icon" @click="inPage('sh')">
           <i class="tradingIcon icon-ship" style="color:#efc860"></i>
           <span>散货</span>
         </div>

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

@@ -43,7 +43,7 @@
               <span v-if="row.status == 3" style="color: #14cde1;">未受理</span>
               <span v-if="row.status == 4" style="color: #04421fa1;">未完工</span>
               <span v-if="row.status == 5" style="color: #3C9CFF;">工单关闭</span>
-              <span v-if="row.status == 6" style="color: #F56C6C;">未到</span>
+              <span v-if="row.status == 6" style="color: #F56C6C;">未到</span>
             </template>
           </avue-crud>
           <!--集装箱-->

+ 4 - 1
src/views/workManagement/main-items/detailsPage.vue

@@ -720,12 +720,15 @@ export default {
     })
     if (this.detailData.id) {
       this.id = this.detailData.id;//字符串转数字  超长用BigInt
-
       projectDetail(this.id, "0,1,2,3,4,5").then(res => {
         this.afterEcho(res.data.data)
       })
 
     } else if (this.detailData.data) {
+      this.$set(this.formTwo, "debitAmount", 0)
+      this.$set(this.formTwo, "advanceAmount", 0)
+      this.$set(this.formTwo, "settlmentAmount", 0)
+      this.$set(this.formTwo, "balanceAmount", 0)
       getGoodsDescList().then(res => {
         this.goodsDescList = res.data.data
         let form = this.detailData.data