caojunjie 3 роки тому
батько
коміт
9506e66b10

+ 6 - 0
src/api/system/dept.js

@@ -78,4 +78,10 @@ export const getDeptLazyTree = (parentId) => {
     }
   })
 }
+export const topList = (parentId) => {
+  return request({
+    url: '/api/blade-system/dept/top-list',
+    method: 'get'
+  })
+}
 

+ 68 - 0
src/views/basicData/fleetInformation/configuration/mainListTwo.json

@@ -0,0 +1,68 @@
+{
+  "headerAlign": "center",
+  "lazy": true,
+  "tip": false,
+  "stripe": true,
+  "searchShow": true,
+  "searchMenuSpan": 8,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 220,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "searchSpan": 8,
+  "dialogClickModal": false,
+  "column": [
+    {
+      "label": "编码",
+      "prop": "code",
+      "search": true,
+      "index": 1,
+      "width": 120,
+      "overHidden": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入菜单名称",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "联系人",
+      "prop": "attn",
+      "search": true,
+      "index": 6,
+      "width": 130,
+      "overHidden": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入菜单名称",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "联系电话",
+      "prop": "tel",
+      "search": true,
+      "index": 7,
+      "width": 120,
+      "overHidden": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入菜单名称",
+          "trigger": "blur"
+        }
+      ]
+    }
+  ]
+}

+ 5 - 0
src/views/basicData/fleetInformation/index.vue

@@ -129,6 +129,7 @@
 <script>
 import detailPage from "./detailsPageEdit";
 import option from "./configuration/mainList.json";
+import optionTwo from "./configuration/mainListTwo.json";
 import {
   customerList,
   typeSave,
@@ -188,6 +189,7 @@ export default {
         total: 0,
         pageSizes: [10,20,30,40,50, 100, 200, 300, 400, 500]
       },
+      roleName: localStorage.getItem("roleName").split(','),
       excelBox: false,
       excelLoading: false,
       excelForm: {},
@@ -230,6 +232,9 @@ export default {
     }
   },
   created() {
+    if (this.roleName.indexOf('车队') !== -1){
+      this.option = optionTwo
+    }
     gainUser().then(res => {
       this.findObject(this.option.column, "adminProfiles").dicData =
         res.data.data;

+ 6 - 1
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -2149,7 +2149,12 @@ export default {
       } else {
         this.dataPolicy = res.data.list? [...res.data.list]: [];
         this.policyIndex++;
-        this.$message.error(res.data.message);
+        this.$message({
+          showClose: true,
+          message: res.data.message,
+          type: 'error',
+          duration:200000,
+        });
       }
     },
     uploadError(err, file, fileList) {

+ 44 - 10
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -120,11 +120,12 @@
               <el-button type="success" size="mini" circle>止</el-button>
             </span>
             <span v-else>
-              <el-button v-if="goodsForm.status === 2" type="warning" size="mini" circle>途</el-button>
-              <el-tooltip v-else class="item" effect="dark" content="删除" placement="right">
-                  <el-button type="danger" icon="el-icon-delete" size="mini" circle
-                             @click="deleteAddress(scope)"></el-button>
-              </el-tooltip>
+              <el-button type="warning" size="mini" circle>途</el-button>
+<!--              <el-button v-if="goodsForm.status === 2" type="warning" size="mini" circle>途</el-button>-->
+<!--              <el-tooltip v-else class="item" effect="dark" content="删除" placement="right">-->
+<!--                  <el-button type="danger" icon="el-icon-delete" size="mini" circle-->
+<!--                             @click="deleteAddress(scope)"></el-button>-->
+<!--              </el-tooltip>-->
             </span>
           </template>
         </el-table-column>
@@ -197,7 +198,7 @@
           @row-update="rowSaveWell">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" icon="el-icon-check" :size="size" @click="batchScheduling"
-                     :disabled="selectionList.length === 0">批量调度
+                     :disabled="selectionList.length === 0" v-if="roleNameTwo.indexOf('总调度') === -1">批量调度
           </el-button>
         </template>
         <template slot="plateNo" slot-scope="{row}">
@@ -412,7 +413,9 @@
           </el-button>
         </template>
         <template slot="menuLeft">
-          <el-button type="primary" icon="el-icon-plus" @click="addRowCollection"
+          <el-button
+              v-if="roleNameTwo.indexOf('总调度') === -1"
+              type="primary" icon="el-icon-plus" @click="addRowCollection"
                      size="small">录入明细
           </el-button>
         </template>
@@ -476,7 +479,9 @@
           </el-button>
         </template>
         <template slot="menuLeft">
-          <el-button type="primary" icon="el-icon-plus" @click="addRowPayment"
+          <el-button
+              v-if="roleNameTwo.indexOf('总调度') === -1"
+              type="primary" icon="el-icon-plus" @click="addRowPayment"
                      size="small">录入明细
           </el-button>
         </template>
@@ -700,6 +705,7 @@ export default {
       orderFilesList: [],
       selectionList: [],
       roleName: localStorage.getItem("roleName").split(',')[0],
+      roleNameTwo: localStorage.getItem("roleName").split(','),
       breakConfiguration: {
         multipleChoices: false,
         multiple: false,
@@ -1102,6 +1108,30 @@ export default {
             trigger: "blur"
           }]
         }, {
+          label: '调度公司',
+          prop: 'dispatchDept',
+          cascader: ['dispatcher'],
+          dicUrl: "/api/blade-system/dept/top-list",
+          type: "select",
+          props: {
+            label: "deptName",
+            value: "id"
+          },
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '调度员',
+          prop: 'dispatcher',
+          type: "select",
+          dicUrl: "/api/blade-user/userList?deptPid={{key}}",
+          props: {
+            label: "realName",
+            value: "id"
+          }
+        }, {
           label: '委托日期',
           prop: 'bsDate',
           type: "datetime",
@@ -1491,8 +1521,6 @@ export default {
       })
       return list
     }
-    // price
-    // quantity
     this.findObject(this.collectionOption.column, "price").change = (data) => {
       if (data.row.price && data.row.quantity) {
         data.row.amount = Number(data.row.price) * Number(data.row.quantity)
@@ -1536,6 +1564,12 @@ export default {
         // this.tableData.forEach(item => {
         //   if (item.region) item.region = item.region.split(',')
         // })
+
+        if (this.roleNameTwo.indexOf('总调度') !== -1){
+          this.entrustOptionTwoT.menu = false
+          this.collectionOption.menu = false
+          this.paymentOption.menu = false
+        }
       })
     }
     queryVehicle({orderId: this.id}).then(res => {

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

@@ -129,7 +129,7 @@ export default {
         pageSizes: [10, 50, 100, 200, 300]
       },
       option: {},
-      activeName: '1',
+      activeName: '0',
       optionList: {
         stripe: true,
         align: 'center',

+ 12 - 0
src/views/landTransportation/motorcadeDriver/index.vue

@@ -678,6 +678,18 @@ export default {
             index: 31,
             width: 140,
             search: true,
+          }, {
+            label: '调度公司',
+            prop: 'dispatchDeptName',
+            overHidden: true,
+            index: 32,
+            width: 140,
+          }, {
+            label: '调度员',
+            prop: 'dispatcherName',
+            overHidden: true,
+            index: 33,
+            width: 140,
           }
         ]
       },

+ 33 - 0
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -32,6 +32,7 @@
             type="warning"
             size="small"
             v-if="goodsForm.status > 0"
+            :disabled="this.roleName.indexOf('平台') !== -1||this.roleName.indexOf('经理') !== -1||this.roleName.indexOf('部门经理') !== -1||this.roleName.indexOf('总经理') !== -1"
             :style="{marginRight: goodsForm.status == 2?'80px':'180px'}"
             @click="confirmChange"
         >变更
@@ -575,6 +576,7 @@ export default {
         placeholder: '请点击右边按钮选择',
         dicData: []
       },
+      roleName: localStorage.getItem("roleName").split(','),
       advantageProjectData: [],
       keyContact: 0,
       vehicleOptionTwo: {
@@ -1005,6 +1007,30 @@ export default {
             trigger: "blur"
           }]
         }, {
+          label: '调度公司',
+          prop: 'dispatchDept',
+          dicUrl: "/api/blade-system/dept/top-list",
+          cascader: ['dispatcher'],
+          type: "select",
+          props: {
+            label: "deptName",
+            value: "id"
+          },
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '调度员',
+          prop: 'dispatcher',
+          type: "select",
+          dicUrl: "/api/blade-user/userList?deptPid={{key}}",
+          props: {
+            label: "realName",
+            value: "id"
+          }
+        }, {
           label: '委托日期',
           prop: 'bsDate',
           type: "datetime",
@@ -1494,6 +1520,9 @@ export default {
           // })
           //查询业务员
           this.salesmanQuery()
+          if (this.roleName.indexOf('平台') !== -1||this.roleName.indexOf('经理') !== -1||this.roleName.indexOf('部门经理') !== -1||this.roleName.indexOf('总经理') !== -1){
+            this.goodsForm.status = 2
+          }
         })
       }
     } else {
@@ -1546,6 +1575,10 @@ export default {
         const column = this.findObject(this.goodsOptionForm.column, "salesmanDept");
         column.dicData = res.data.data;
       });
+      getDeptTree(tenantId).then(res => {
+        const column = this.findObject(this.goodsOptionForm.column, "dispatchDept");
+        column.dicData = res.data.data;
+      });
     },
     //查询业务员
     salesmanQuery(realName) {

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

@@ -197,6 +197,7 @@ export default {
         align: 'center',
         stripe:true,
         index: true,
+        menu:true,
         menuWidth:80,
         addBtn: false,
         editBtn: false,
@@ -335,7 +336,8 @@ export default {
           }]
       },
       home:false,
-      entrustTimer:null
+      entrustTimer:null,
+      roleName: localStorage.getItem("roleName").split(','),
     }
   },
   activated() {
@@ -353,6 +355,10 @@ export default {
     this.option.column.forEach(item => {
       if (item.search) i++
     })
+    if (this.roleName.indexOf('经理') !== -1||this.roleName.indexOf('部门经理') !== -1||this.roleName.indexOf('总经理') !== -1){
+      this.option.menu = false
+      this.option.header = false
+    }
     if (i % 3 !== 0) {
       const num = 3 - Number(i % 3)
       this.option.searchMenuSpan = num * 8;
@@ -396,6 +402,10 @@ export default {
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        if (this.roleName.indexOf('经理') !== -1||this.roleName.indexOf('部门经理') !== -1||this.roleName.indexOf('总经理') !== -1){
+          this.option.menu = false
+          this.option.header = false
+        }
       }
     },
     // 获得高度

+ 204 - 25
src/views/landTransportation/reportAnalysis/index.vue

@@ -332,7 +332,7 @@ export default {
           width: 150,
           search: true,
         }, {
-          label: '业务员',
+          label: '分管员',
           prop: 'salesmanName',
           index: 3,
           width: 140,
@@ -384,7 +384,7 @@ export default {
             search: true,
             index: 9,
             overHidden: true,
-            prop: 'fleetId'
+            prop: 'fleetShortName'
           }, {
             label: '车号',
             width: 150,
@@ -393,25 +393,10 @@ export default {
             index: 10,
             search: true
           }, {
-            label: '应收运费',
-            overHidden: true,
-            index: 11,
-            prop: 'landAmountD'
-          }, {
-            label: '应收杂费',
-            overHidden: true,
-            index: 12,
-            prop: 'extraAmountD'
-          }, {
             label: '备注',
             overHidden: true,
             index: 13,
             prop: 'remarks'
-          }, {
-            label: '应收杂费明细',
-            width: 100,
-            index: 17,
-            prop: 'extraAmountItemD'
           }]
       },
       totalData: {}
@@ -422,7 +407,26 @@ export default {
     this.collectionOption = await this.getColumnData(this.getColumnName(88.2), this.collectionOptionBackup);
     this.roleName.forEach(item =>{
       if (item == '客户'){
-        return this.goodsOptionCrud.menu = true
+        this.goodsOptionCrud.menu = true
+        for (let item of this.goodsOptionCrud.column){
+          if (item.prop === 'landAmountD') return
+        }
+        return this.goodsOptionCrud.column.push({
+          label: '应收运费',
+          overHidden: true,
+          index: 11,
+          prop: 'landAmountD'
+        }, {
+          label: '应收杂费',
+          overHidden: true,
+          index: 12,
+          prop: 'extraAmountD'
+        }, {
+          label: '应收杂费明细',
+          width: 100,
+          index: 17,
+          prop: 'extraAmountItemD'
+        })
       }else if (item == '平台') {
         this.goodsOptionCrud.menu = false
         for (let item of this.goodsOptionCrud.column){
@@ -450,9 +454,88 @@ export default {
           width: 100,
           index: 18,
           prop: 'extraAmountItemC'
+        },{
+          label: '应收运费',
+          overHidden: true,
+          index: 11,
+          prop: 'landAmountD'
+        }, {
+          label: '应收杂费',
+          overHidden: true,
+          index: 12,
+          prop: 'extraAmountD'
+        }, {
+          label: '应收杂费明细',
+          width: 100,
+          index: 17,
+          prop: 'extraAmountItemD'
+        })
+      } else if (item == '调度'){
+        this.goodsOptionCrud.menu = false
+        for (let item of this.goodsOptionCrud.column){
+          if (item.prop === 'landAmountC') return
+        }
+        return this.goodsOptionCrud.column.push( {
+          label: '应付运费',
+          overHidden: true,
+          index: 14,
+          prop: 'landAmountC'
+        }, {
+          label: '应付杂费',
+          overHidden: true,
+          index: 15,
+          prop: 'extraAmountC'
+        }, {
+          label: '利润',
+          width: 100,
+          precision: 2,
+          index: 16,
+          type: 'number',
+          prop: 'profit'
+        }, {
+          label: '应付杂费明细',
+          width: 100,
+          index: 18,
+          prop: 'extraAmountItemC'
         })
       }else {
-        return this.goodsOptionCrud.menu = false;
+        this.goodsOptionCrud.menu = false;
+        this.goodsOptionCrud.column.forEach((item,index)=>{
+          if (item.prop === 'corpShortName'){
+            this.goodsOptionCrud.column.splice(index, 1)
+          }
+        })
+        for (let item of this.goodsOptionCrud.column){
+          if (item.prop === 'dispatchDeptName') return false
+        }
+        return this.goodsOptionCrud.column.push({
+          label: '调度公司',
+          prop: 'dispatchDeptName',
+          overHidden: true,
+          index: 1,
+          width: 140
+        }, {
+          label: '调度员',
+          prop: 'dispatcherName',
+          overHidden: true,
+          index: 1,
+          width: 140,
+        },{
+          label: '应收运费',
+          overHidden: true,
+          index: 11,
+          prop: 'landAmountD'
+        }, {
+          label: '应收杂费',
+          overHidden: true,
+          index: 12,
+          prop: 'extraAmountD'
+        }, {
+          label: '应收杂费明细',
+          width: 100,
+          index: 17,
+          prop: 'extraAmountItemD'
+        })
       }
     })
     this.key++
@@ -542,11 +625,73 @@ export default {
       }
       this.roleName.forEach(item =>{
         if (item == '客户'){
-          return this.goodsOptionCrud.menu = true
+          this.goodsOptionCrud.menu = true
+          for (let item of this.goodsOptionCrud.column){
+            if (item.prop === 'landAmountD') return
+          }
+          return this.goodsOptionCrud.column.push({
+            label: '应收运费',
+            overHidden: true,
+            index: 11,
+            prop: 'landAmountD'
+          }, {
+            label: '应收杂费',
+            overHidden: true,
+            index: 12,
+            prop: 'extraAmountD'
+          }, {
+            label: '应收杂费明细',
+            width: 100,
+            index: 17,
+            prop: 'extraAmountItemD'
+          })
         }else if (item == '平台') {
           this.goodsOptionCrud.menu = false
           for (let item of this.goodsOptionCrud.column){
-            if (item.prop === 'landAmountC') return false
+            if (item.prop === 'landAmountC') return
+          }
+          return this.goodsOptionCrud.column.push( {
+            label: '应付运费',
+            overHidden: true,
+            index: 14,
+            prop: 'landAmountC'
+          }, {
+            label: '应付杂费',
+            overHidden: true,
+            index: 15,
+            prop: 'extraAmountC'
+          }, {
+            label: '利润',
+            width: 100,
+            precision: 2,
+            index: 16,
+            type: 'number',
+            prop: 'profit'
+          }, {
+            label: '应付杂费明细',
+            width: 100,
+            index: 18,
+            prop: 'extraAmountItemC'
+          },{
+            label: '应收运费',
+            overHidden: true,
+            index: 11,
+            prop: 'landAmountD'
+          }, {
+            label: '应收杂费',
+            overHidden: true,
+            index: 12,
+            prop: 'extraAmountD'
+          }, {
+            label: '应收杂费明细',
+            width: 100,
+            index: 17,
+            prop: 'extraAmountItemD'
+          })
+        } else if (item == '调度'){
+          this.goodsOptionCrud.menu = false
+          for (let item of this.goodsOptionCrud.column){
+            if (item.prop === 'landAmountC') return
           }
           return this.goodsOptionCrud.column.push( {
             label: '应付运费',
@@ -572,7 +717,43 @@ export default {
             prop: 'extraAmountItemC'
           })
         }else {
-          return this.goodsOptionCrud.menu = false
+          this.goodsOptionCrud.menu = false;
+          this.goodsOptionCrud.column.forEach((item,index)=>{
+            if (item.prop === 'corpShortName'){
+              this.goodsOptionCrud.column.splice(index, 1)
+            }
+          })
+          for (let item of this.goodsOptionCrud.column){
+            if (item.prop === 'dispatchDeptName') return false
+          }
+          return this.goodsOptionCrud.column.push({
+            label: '调度公司',
+            prop: 'dispatchDeptName',
+            overHidden: true,
+            index: 1,
+            width: 140
+          }, {
+            label: '调度员',
+            prop: 'dispatcherName',
+            overHidden: true,
+            index: 1,
+            width: 140,
+          },{
+            label: '应收运费',
+            overHidden: true,
+            index: 11,
+            prop: 'landAmountD'
+          }, {
+            label: '应收杂费',
+            overHidden: true,
+            index: 12,
+            prop: 'extraAmountD'
+          }, {
+            label: '应收杂费明细',
+            width: 100,
+            index: 17,
+            prop: 'extraAmountItemD'
+          })
         }
       })
     },
@@ -622,15 +803,13 @@ export default {
         tag: '0',
         ...params?params:this.query
       }
-      console.log(queryParams)
       if (queryParams.arrivalTime) {
         queryParams.beginArrivalTime = queryParams.arrivalTime[0]
         queryParams.endArrivalTime = queryParams.arrivalTime[1]
         delete queryParams.arrivalTime
-      }else {
-
       }
       this.loading = true;
+      if (this.loading) this.dialogVisibleTwo = false
       standingBookCollection(queryParams).then(res => {
         this.goodsList = res.data.data.records
         this.page.total = res.data.data.total

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

@@ -7,27 +7,27 @@
         </span>
       </div>
       <div class="content">
-        <div v-if="entrust" class="content-icon" @click="inPage('wt')">
+        <div class="content-icon" @click="entrust?inPage('wt'):'JZ'">
           <i class="tradingIcon icon-purchase" style="color:#75CD28"></i>
           <span>委托</span>
         </div>
-        <div v-if="dispatch" class="content-icon" @click="inPage('dd')">
+        <div class="content-icon" @click="dispatch?inPage('dd'):'JZ'">
           <i class="tradingIcon icon-receipt" style="color:#409EFF"></i>
           <span>调度</span>
         </div>
-        <div v-if="sendACar" class="content-icon" @click="inPage('pc')">
+        <div class="content-icon" @click="sendACar?inPage('pc'):'JZ'">
           <i class="tradingIcon icon-ship" style="color:#921939"></i>
           <span>派车</span>
         </div>
-        <div v-if="track" class="content-icon" @click="inPage('gz')">
+        <div class="content-icon" @click="track?inPage('gz'):'JZ'">
           <i class="tradingIcon icon-ship" style="color:#7db4ff"></i>
           <span>跟踪</span>
         </div>
-        <div v-if="sBook" class="content-icon" @click="inPage('lytz')">
+        <div class="content-icon" @click="sBook?inPage('lytz'):'JZ'">
           <i class="tradingIcon icon-sales" style="color:#143056"></i>
           <span>台账</span>
         </div>
-        <div v-if="reminder" class="content-icon" @click="inPage('dqtx')">
+        <div class="content-icon" @click="reminder?inPage('dqtx'):'JZ'">
           <div style="width: 36px;height: 36px;background-color: #3a8ee6;border-radius: 5px;line-height: 36px;text-align: center;padding-top: 4px">
             <i class="el-icon-bell" style="color:#fff;font-size: 28px;"></i>
           </div>

+ 2 - 2
src/views/wel/home/landTransportation/landTransportation.vue

@@ -2,8 +2,8 @@
   <div class="container">
     <quick-launch class="item1" :sysType="sysType" />
 <!--    <audit-data class="item2" :sysType="sysType"/>-->
-    <sales-reached v-if="!(this.roleName.indexOf('车队') !== -1)" @handleMousedown="handleMousedown" class="item2" :sysType="sysType"/>
-    <sales-trend v-if="!(this.roleName.indexOf('车队') !== -1)" ref="trend" class="item3" :sysType="sysType"/>
+    <sales-reached @handleMousedown="handleMousedown" class="item2" :sysType="sysType"/>
+    <sales-trend ref="trend" class="item3" :sysType="sysType"/>
   </div>
 </template>