caojunjie 3 سال پیش
والد
کامیت
20e29704a0

+ 19 - 0
src/api/landTransportation/index.js

@@ -332,3 +332,22 @@ export function tRemove(data) {
     })
 }
 
+// /blade-land/order/file
+// /blade-land/order/file-list
+//保存附件
+export function conserveDispatch(data) {
+    return request({
+        url: '/api/blade-land/order/file',
+        method: 'post',
+        data
+    })
+}
+//查询附件
+export function checkAttachment(data) {
+    return request({
+        url: '/api/blade-land/order/file-list',
+        method: 'get',
+        params:data
+    })
+}
+

+ 7 - 6
src/components/upload/index.vue

@@ -17,8 +17,9 @@
               @click="addDetail"
               :disabled="disabled"
               v-if="display"
-          >上传{{display}}
+          >上传
           </el-button>
+          <slot name="c_button"></slot>
         </template>
         <template slot="url" slot-scope="{ row }">
           <el-input
@@ -406,16 +407,16 @@ export default {
     },
     //下载附件
     download(scope) {
-      console.log(scope.row.url);
+      console.log(scope.row.url.substring(scope.row.url.lastIndexOf(".")))
       if (scope.row.url) {
         if (
-          scope.row.fileName.substring(scope.row.fileName.lastIndexOf(".")) ===
+            scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
             ".jpg" ||
-          scope.row.fileName.substring(scope.row.fileName.lastIndexOf(".")) ===
+            scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
             ".png" ||
-          scope.row.fileName.substring(scope.row.fileName.lastIndexOf(".")) ===
+            scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
             ".JPG" ||
-          scope.row.fileName.substring(scope.row.fileName.lastIndexOf(".")) ===
+            scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
             ".PNG"
         ) {
           this.imgUrl = scope.row.url;

+ 114 - 58
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -201,19 +201,18 @@
                      :disabled="selectionList.length === 0" v-if="roleNameTwo.indexOf('总调度') === -1">批量调度
           </el-button>
         </template>
-        <template slot="plateNo" slot-scope="{row}">
-                <span class="el-button--text" style="cursor: pointer"
-                      @click="openTrack(row)">{{ row.plateNo }}</span>
-        </template>
-        <template slot-scope="{row}" slot="fleetId">
-          <crop-select
-              v-if="row.$cellEdit"
-              v-model="row.fleetId"
-              @getCorpData="(data)=>{getfleetIdT(data,row)}"
-              corpType="CD"
-          ></crop-select>
-          <span v-else>{{ row.fleetName }}</span>
+        <template slot="plateNo" slot-scope="{row}" v-if="!row.$cellEdit">
+                <span class="el-button--text" style="cursor: pointer" @click="openTrack(row)">{{ row.plateNo }}</span>
         </template>
+<!--        <template slot-scope="{row}" slot="fleetId">-->
+<!--          <crop-select-->
+<!--              v-if="row.$cellEdit"-->
+<!--              v-model="row.fleetId"-->
+<!--              @getCorpData="(data)=>{getfleetIdT(data,row)}"-->
+<!--              corpType="CD"-->
+<!--          ></crop-select>-->
+<!--          <span v-else>{{ row.fleetName }}</span>-->
+<!--        </template>-->
         <template slot-scope="{row,index}" slot="menu">
           <el-button
               type="text"
@@ -223,6 +222,13 @@
           >{{ row.$cellEdit ? '保 存' : '修 改' }}
           </el-button>
           <el-button
+              type="text"
+              size="small"
+              v-if="row.status===0"
+              @click="rowSaveThree(row,index)"
+          >{{ row.$cellEdit ? '确认调度派车' : '调度派车' }}
+          </el-button>
+          <el-button
               size="small"
               type="text"
               @click="designate(row, index)"
@@ -250,6 +256,12 @@
               v-if="row.status > 1"
           >变更记录
           </el-button>
+          <el-button
+              size="small"
+              type="text"
+              @click="annexOpen(row, index)"
+          >附 件
+          </el-button>
         </template>
       </avue-crud>
     </basic-container>
@@ -491,11 +503,20 @@
     <c-upload
         typeUpload="CD"
         :data="orderFilesList"
-        disabled
-        :display="false"
+        display
         deleteUrl="/api/blade-client/common-file/remove"
         :enumerationValue="86.2"
-    ></c-upload>
+    >
+      <template slot="c_button">
+        <el-button
+            type="primary"
+            size="small"
+            :loading="c_button"
+            @click="schedulingFileSaving"
+        >保存附件
+        </el-button>
+      </template>
+    </c-upload>
     <el-dialog
         title="批量调度"
         :visible.sync="dialogVisible"
@@ -524,6 +545,7 @@
           <crop-select
               v-model="formData.fleetId"
               corpType="CD"
+              :disabled="formData === 4"
               @getCorpData="getCorpData"
           ></crop-select>
         </template>
@@ -577,7 +599,8 @@ import {
   fleetDriverSave,
   recordingDetails,
   changeFleet,
-  incidentalSubmit, saveFile, getFee, fleetList
+  incidentalSubmit, saveFile, getFee, fleetList, conserveDispatch,
+  checkAttachment, sendACarCollection
 } from "@/api/landTransportation";
 import website from "@/config/website";
 import {getDeptTree} from "@/api/system/dept";
@@ -616,45 +639,6 @@ export default {
           precision: 2,
           controls: false,
           type: 'number',
-        }, {
-          label: '应收场站费',
-          width: 100,
-          precision: 2,
-          controls: false,
-          type: 'number',
-          prop: 'oneFeeD'
-        }, {
-          label: '应收港杂费',
-          width: 100,
-          precision: 2,
-          controls: false,
-          type: 'number',
-          prop: 'twoFeeD'
-        }, {
-          label: '应收扣款',
-          width: 100,
-          precision: 2,
-          controls: false,
-          type: 'number',
-          prop: 'threeFeeD'
-        }, {
-          label: '应收待时费',
-          width: 100,
-          precision: 2,
-          controls: false,
-          type: 'number',
-          prop: 'fourFeeD'
-        }, {
-          label: '应收其他',
-          width: 100,
-          precision: 2,
-          type: 'number',
-          controls: false,
-          prop: 'fiveFeeD'
-        }, {
-          label: '应收费用备注',
-          width: 245,
-          prop: 'feeRemarksD'
         }]
       },
       form: {},
@@ -701,6 +685,7 @@ export default {
       },
       activeIndex: '1',
       dialogVisible: false,
+      c_button: false,
       goodsForm: {},
       orderFilesList: [],
       selectionList: [],
@@ -856,12 +841,29 @@ export default {
           label: '车队',
           width: 200,
           index: 5,
-          prop: 'fleetId'
+          type: 'select',
+          cascader: ['plateNo'],
+          overHidden: true,
+          cell: true,
+          prop: 'fleetId',
+          dicUrl: "/api/blade-client/corpsdesc/list?size=1000&current=1&&corpType=CD",
+          props: {
+            label: "cname",
+            value: "id",
+            res: "data.records"
+          }
         }, {
           label: '车号',
           width: 150,
           index: 6,
-          prop: 'plateNo'
+          cell: false,
+          prop: 'plateNo',
+          type: "select",
+          dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
+          props: {
+            label: "plateNo",
+            value: "plateNo"
+          },
         }, {
           label: '司机',
           width: 115,
@@ -1600,6 +1602,18 @@ export default {
     }
   },
   methods: {
+    schedulingFileSaving(){
+      this.c_button = true
+      conserveDispatch({
+        fileList:this.orderFilesList,
+        id:this.goodsForm.id
+      }).then(res=>{
+        checkAttachment({id:this.goodsForm.id}).then(res=>{
+          this.orderFilesList = res.data.data
+          this.c_button = false
+        })
+      })
+    },
     openTrack(row){
       gaude({itemId: row.id,plateNo:row.plateNo,tenantId:'234557',color:'2'}).then(res => {
         this.lineArr = res.data.data.trackArray
@@ -1811,6 +1825,40 @@ export default {
       }
       this.$refs.crudBoxTwo.rowCell(row, index)
     },
+    //调度并且派车
+    rowSaveThree(row, index, done, loading) {
+      if (row.$cellEdit) {
+        if (!row.plateNo) {
+          return this.$message.warning('未选择车号,请选择');
+        }
+        if (!row.fleetId){
+          return this.$message.warning('请选择车队');
+        }
+        this.$confirm('是否确定调度派车', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          sendACarCollection(row).then(res => {
+            this.$message.success('操作成功');
+            this.refreshData()
+          })
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          });
+        });
+        this.$refs.crudBoxTwo.rowCell(row, index)
+      }else {
+        this.entrustOptionTwoT.column.forEach(item=>{
+          if (item.prop === 'plateNo'){
+            item.cell = true
+          }
+        })
+        this.$refs.crudBoxTwo.rowCell(row, index)
+      }
+    },
     rowSaveWell(row, index, done, loading) {
       done()
     },
@@ -1840,7 +1888,7 @@ export default {
     changeFleetT(row, index) {
       this.formDataList = row
       this.dialogChange = true
-      this.formData = {}
+      this.formData = row
     },
     //打开变更记录
     recordsOfChanges(row, index) {
@@ -1870,6 +1918,14 @@ export default {
     //箱信息选择车队
     getfleetIdT(data, row) {
       this.$set(row, 'fleetName', data.cname)
+      console.log(this.$refs.crudBoxTwo)
+      // this.$refs.crudBoxTwo.handleChange({
+      //   label: '车队',
+      //   width: 200,
+      //   index: 5,
+      //   prop: 'fleetId',
+      //   cascader: ['plateNo'],
+      // },row)
     },
     //地址新增
     addAddress() {

+ 0 - 2
src/views/landTransportation/driver/index.vue

@@ -154,7 +154,6 @@
             :basic="true"
             deleteUrl="/api/blade-client/common-file/remove"
             :data="orderList"
-            :disabled="form.status===4"
             :enumerationValue="76"
         ></c-upload>
         <span slot="footer" class="dialog-footer">
@@ -769,7 +768,6 @@ export default {
       this.dialogVisible = true
       this.form = row
       getAttachment({id:row.id}).then(res=>{
-        console.log(res)
         this.orderList = res.data.data
       })
     },

+ 39 - 6
src/views/landTransportation/motorcadeDriver/index.vue

@@ -133,7 +133,7 @@
               size="small"
               type="text"
               @click="changeFleetT(row, index)"
-              v-if="row.status===3"
+              v-if="row.status !== 0 && row.status !== 1 && row.status !== 2 && row.status !== 4"
           >变 更
           </el-button>
           <el-button
@@ -161,7 +161,6 @@
             :basic="true"
             deleteUrl="/api/blade-client/common-file/remove"
             :data="orderList"
-            :disabled="form.status >= 2"
             :enumerationValue="76"
         ></c-upload>
         <span slot="footer" class="dialog-footer">
@@ -175,7 +174,7 @@
           :visible.sync="dialogChange"
           append-to-body
           width="70%">
-        <avue-form :option="optionData" v-model="formData" ref="saveForm">
+        <avue-form :option="optionData" v-model="formData" v-if="dialogChange" ref="saveForm">
         </avue-form>
         <span slot="footer" class="dialog-footer">
         <el-button @click="dialogChange = false" size="small">关 闭</el-button>
@@ -212,6 +211,7 @@ export default {
     return {
       key: 0,
       query:{},
+      formDataList:{},
       optionData: {
         span: 12,
         menuBtn: false,
@@ -223,7 +223,7 @@ export default {
           filterable: true,
           cascader: ['driverId'],
           type: 'select',
-          dicUrl: "/api/blade-client/land-vehicle/vehicle-list",
+          dicUrl: '',
           props: {
             label: "plateNo",
             value: "plateNo"
@@ -245,12 +245,23 @@ export default {
           width: 100,
           type: 'select',
           index: 14,
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
           props: {
             label: "dictValue",
             value: "dictKey"
           },
-          dataType: "string",
+          dicData:[{
+            dictKey: "2",
+            dictValue: "未受理"
+          },{
+            dictKey: "3",
+            dictValue: "未完工"
+          },{
+            dictKey: "5",
+            dictValue: "未到厂"
+          },{
+            dictKey: "6",
+            dictValue: "已提箱"
+          }],
           prop: 'status'
         }, {
           label: "司机",
@@ -756,8 +767,30 @@ export default {
     },
     //变更信息
     changeFleetT(row, index) {
+      let data = [{
+        dictKey: "2",
+        dictValue: "未受理"
+      },{
+        dictKey: "3",
+        dictValue: "未完工"
+      },{
+        dictKey: "5",
+        dictValue: "未到厂"
+      },{
+        dictKey: "6",
+        dictValue: "已提箱"
+      }]
+      for (let item of data){
+        if (row.status == item.dictKey){
+          this.formData = {
+            status:item.dictKey,
+            $status:item.dictValue
+          }
+        }
+      }
       this.formDataList = row
       this.dialogChange = true
+      this.optionData.column[0].dicUrl = "/api/blade-client/land-vehicle/vehicle-list?fleetId="+this.formDataList.fleetId
     },
     //打开变更记录
     recordsOfChanges(row, index) {

+ 6 - 2
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -41,7 +41,11 @@
             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"
+            :disabled="
+            (this.roleName.indexOf('平台') !== -1
+            ||this.roleName.indexOf('经理') !== -1
+            ||this.roleName.indexOf('部门经理') !== -1
+            ||this.roleName.indexOf('总经理') !== -1) && !(this.roleName.indexOf('admin') !== -1)"
             :style="{marginRight: goodsForm.status == 2?'80px':'180px'}"
             @click="confirmChange"
         >变更
@@ -508,7 +512,7 @@
         typeUpload="CD"
         deleteUrl="/api/blade-client/common-file/remove"
         :data="orderFilesList"
-        :disabled="goodsForm.status === 1"
+        display
         :enumerationValue="85.6"
     ></c-upload>
 

+ 10 - 2
src/views/landTransportation/reportAnalysis/index.vue

@@ -316,6 +316,14 @@ export default {
             name: 'extraAmountC',
             type: 'sum',
             decimals: 2
+          }, {
+            name: 'landAmountD',
+            type: 'sum',
+            decimals: 2
+          }, {
+            name: 'extraAmountD',
+            type: 'sum',
+            decimals: 2
           }],
         column: [{
           label: '货运日期',
@@ -450,7 +458,7 @@ export default {
             })
       }else {
         for (let item of this.goodsOptionCrud.column){
-          if (item.prop === 'dispatchDeptName') return false
+          if (item.prop === 'dispatcherName') return false
         }
         return this.goodsOptionCrud.column.push(
             {
@@ -765,7 +773,7 @@ export default {
               })
         }else {
           for (let item of this.goodsOptionCrud.column){
-            if (item.prop === 'dispatchDeptName') return false
+            if (item.prop === 'dispatcherName') return false
           }
           return this.goodsOptionCrud.column.push(
               {