Browse Source

陆运修改

caojunjie 3 years ago
parent
commit
9c13c32ae5

+ 58 - 2
src/api/landTransportation/index.js

@@ -56,14 +56,38 @@ export function removeCollection(data) {
         method: 'post'
     })
 }
-//司机查询
+//陆运台账查询
 export function driverQueryCollection(data) {
     return request({
-        url: '/api/blade-land/order-item/list',
+        url: '/api/blade-land/order/acct',
         method: 'get',
         params:data
     })
 }
+//杂费查询
+export function incidental(data) {
+    return request({
+        url: '/api/blade-land/order-fee/list-no-page',
+        method: 'get',
+        params:data
+    })
+}
+//杂费确认
+export function incidentalConfirm(data) {
+    return request({
+        url: '/api/blade-land/order-fee/confirm',
+        method: 'post',
+        params:data
+    })
+}
+//杂费取消
+export function cancelConfirm(data) {
+    return request({
+        url: '/api/blade-land/order-fee/cancel-confirm',
+        method: 'post',
+        params:data
+    })
+}
 //调度箱信息
 export function dispatchCollection(data) {
     return request({
@@ -195,6 +219,22 @@ export function saveAttached(data) {
         data:data
     })
 }
+//获取附件
+export function getFee(data) {
+    return request({
+        url: '/api/blade-land/order-fee/file-list',
+        method: 'get',
+        params:data
+    })
+}
+//保存附件
+export function saveFile(data) {
+    return request({
+        url: '/api/blade-land/order-fee/file',
+        method: 'post',
+        data:data
+    })
+}
 //保存附件
 export function getCorp() {
     return request({
@@ -242,4 +282,20 @@ export function changeVehicle(data) {
         data:data
     })
 }
+//查询车号
+export function queryVehicle(data) {
+    return request({
+        url: '/api/blade-land/order-item/plate-no',
+        method: 'get',
+        params:data
+    })
+}
+//杂费保存
+export function incidentalSubmit(data) {
+    return request({
+        url: '/api/blade-land/order-fee/save',
+        method: 'post',
+        data:data
+    })
+}
 

+ 9 - 0
src/enums/column-name.js

@@ -321,6 +321,12 @@ const columnName = [{
     code: 86.2,
     name: '调度-附件'
   }, {
+    code: 86.4,
+    name: '调度-应收费用'
+  }, {
+    code: 86.5,
+    name: '调度-应付费用'
+  }, {
     code: 87,
     name: '派车'
   }, {
@@ -330,6 +336,9 @@ const columnName = [{
     code: 88.1,
     name: '陆运台账'
   }, {
+    code: 88.2,
+    name: '陆运台账-应收'
+  }, {
     code: 89,
     name: '事务采购申请商品明细'
   }, {

+ 5 - 2
src/views/landTransportation/antiepidemic/index.vue

@@ -82,6 +82,7 @@ export default {
       dialogImageUrl:'',
       key:0,
       form: {},
+      query:{},
       orderList:[],
       action: "/api/blade-resource/oss/endpoint/put-file",
       headers: { "Blade-Auth": "Bearer " + getToken() },
@@ -290,15 +291,17 @@ export default {
       }
       delete data.arrivalTime
       delete data.createTime
+      this.query = data;
       this.onLoad(this.page, params)
       done();
     },
     //查询
-    onLoad(page, params) {
+    onLoad(page, params={}) {
       let queryParams = {
         size: page.pageSize,
         current: page.currentPage,
-        ...params
+        ...params,
+        ...Object.assign(params, this.query)
       }
       this.loading = true;
       driverQueryCollection(queryParams).then(res => {

+ 342 - 73
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -326,6 +326,131 @@
       <!--      </avue-crud>-->
       <!--    </basic-container>-->
 </span>
+    <containerTitle title="杂费明细"></containerTitle>
+    <basic-container>
+      <el-tabs v-model="activeIndex" @tab-click="handleSelect">
+        <el-tab-pane label="应收" name="1"></el-tab-pane>
+        <el-tab-pane label="应付" name="2"></el-tab-pane>
+      </el-tabs>
+      <avue-crud
+          v-if="activeIndex === '1'"
+          :data="collectionList"
+          :key="key"
+          :option="collectionOption"
+          ref="collection"
+          @resetColumn="resetColumnCollection"
+          @saveColumn="saveColumnCollection"
+          @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
+          @row-update="rowSave"
+          @row-del="makeDel">
+        <template slot-scope="{row}" slot="corpId">
+          <crop-select
+              v-if="row.$cellEdit"
+              v-model="row.corpId"
+              @getCorpData="(data)=>{getfleetId(data,row)}"
+          ></crop-select>
+          <span v-else>{{ row.corpName }}</span>
+        </template>
+        <template slot="plateNoHeader" slot-scope="{column}">
+          {{ column.label }}<span style="color:#F56C6C">*</span>
+        </template>
+        <template slot-scope="{row}" slot="feeId">
+          <breakdown-select
+              v-if="row.$cellEdit"
+              v-model="row.feeId"
+              @selectValue="(value) => selectValue(value,row)"
+              :configuration="breakConfiguration"
+          >
+          </breakdown-select>
+          <span v-else>{{ row.feeName }}</span>
+        </template>
+        <template slot-scope="{row,index}" slot="menu">
+          <el-button
+              type="text"
+              size="small"
+              :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
+              @click="rowCell(row,index)"
+          >{{ row.$cellEdit ? '保存' : '编辑' }}
+          </el-button>
+          <el-button type="text"
+                     icon="el-icon-delete"
+                     size="small"
+                     @click="$refs.collection.rowDel(row,index)"
+          >删除
+          </el-button>
+          <el-button
+              size="small"
+              type="text"
+              icon="el-icon-s-order"
+              @click="annexOpen(row, index)"
+          >附 件
+          </el-button>
+        </template>
+        <template slot="menuLeft">
+          <el-button type="primary" icon="el-icon-plus" @click="addRowCollection"
+                     size="small">录入明细
+          </el-button>
+        </template>
+      </avue-crud>
+      <avue-crud
+          v-if="activeIndex === '2'"
+          :data="paymentList"
+          :option="paymentOption"
+          ref="payment"
+          @resetColumn="resetColumnPayment"
+          @saveColumn="saveColumnPayment"
+          @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
+          @row-update="rowSave"
+          @row-del="feeDel"
+      >
+        <template slot-scope="{row}" slot="corpId">
+          <crop-select
+              v-if="row.$cellEdit"
+              v-model="row.corpId"
+              @getCorpData="(data)=>{getfleetId(data,row)}"
+          ></crop-select>
+          <span v-else>{{ row.corpName }}</span>
+        </template>
+        <template slot-scope="{row}" slot="feeId">
+          <breakdown-select
+              v-if="row.$cellEdit"
+              v-model="row.feeId"
+              @selectValue="(value) => selectValue(value,row)"
+              :configuration="breakConfiguration"
+          >
+          </breakdown-select>
+          <span v-else>{{ row.feeName }}</span>
+        </template>
+        <template slot-scope="{row,index}" slot="menu">
+          <el-button
+              type="text"
+              size="small"
+              :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
+              @click="paymentRowCell(row,index)"
+          >{{ row.$cellEdit ? '保存' : '编辑' }}
+          </el-button>
+          <el-button type="text"
+                     icon="el-icon-delete"
+                     size="small"
+                     :disabled="goodsForm.status === 1"
+                     @click="$refs.payment.rowDel(row,index)"
+          >删除
+          </el-button>
+          <el-button
+              size="small"
+              type="text"
+              icon="el-icon-s-order"
+              @click="annexOpen(row, index)"
+          >附 件
+          </el-button>
+        </template>
+        <template slot="menuLeft">
+          <el-button type="primary" icon="el-icon-plus" @click="addRowPayment"
+                     size="small">录入明细
+          </el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
     <containerTitle title="上传附件"></containerTitle>
     <c-upload
         typeUpload="CD"
@@ -381,6 +506,23 @@
           <el-button @click="dialogRecord = false" size="small">关 闭</el-button>
         </span>
     </el-dialog>
+    <el-dialog
+        title="附件"
+        :visible.sync="enclosure"
+        append-to-body
+        width="70%">
+      <c-upload
+          typeUpload="GZ"
+          :basic="true"
+          deleteUrl="/api/blade-client/common-file/remove"
+          :data="orderList"
+          :enumerationValue="76"
+      ></c-upload>
+      <span slot="footer" class="dialog-footer">
+          <el-button @click="enclosure = false" size="small">取 消</el-button>
+          <el-button type="primary" @click="saveAnnex" size="small">保 存</el-button>
+        </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -391,7 +533,13 @@ import {
   detailDelegationList,
   removeCollection,
   dispatchCollection,
-  cancelDispatchCollection, dispatchBatch, fleetDriverSave, recordingDetails, changeFleet
+  queryVehicle,
+  cancelDispatchCollection,
+  dispatchBatch,
+  fleetDriverSave,
+  recordingDetails,
+  changeFleet,
+  incidentalSubmit, saveFile, getFee
 } from "@/api/landTransportation";
 import website from "@/config/website";
 import {getDeptTree} from "@/api/system/dept";
@@ -404,22 +552,26 @@ export default {
   },
   data() {
     return {
-      formData:{},
-      formDataList:{},
-      dialogChange:false,
-      optionData:{
-        span:12,
-        menuBtn:false,
-        column:[{
+      formData: {},
+      enclosure:false,
+      formAnnex: {},
+      key:0,
+      formDataList: {},
+      orderList:[],
+      dialogChange: false,
+      optionData: {
+        span: 12,
+        menuBtn: false,
+        column: [{
           label: "车队",
           prop: "fleetId",
-        },{
+        }, {
           label: "应付陆运费",
           prop: "landAmountC",
           precision: 2,
           controls: false,
           type: 'number',
-        },{
+        }, {
           label: '应收场站费',
           width: 100,
           precision: 2,
@@ -460,32 +612,32 @@ export default {
           prop: 'feeRemarksD'
         }]
       },
-      form:{},
-      dataRecord:[],
-      dialogRecord:false,
-      optionRecord:{
-        stripe:true,
-        refreshBtn:false,
-        columnBtn:false,
-        menu:false,
-        addBtn:false,
-        align:'center',
-        column:[
+      form: {},
+      dataRecord: [],
+      dialogRecord: false,
+      optionRecord: {
+        stripe: true,
+        refreshBtn: false,
+        columnBtn: false,
+        menu: false,
+        addBtn: false,
+        align: 'center',
+        column: [
           {
-            label:'变更内容',
-            prop:'content'
+            label: '变更内容',
+            prop: 'content'
           }, {
-            label:'变更人',
-            prop:'changeUserName'
+            label: '变更人',
+            prop: 'changeUserName'
           }, {
-            label:'变更时间',
-            prop:'changeTime'
+            label: '变更时间',
+            prop: 'changeTime'
           }
         ]
       },
       option: {
-        span:12,
-        menuBtn:false,
+        span: 12,
+        menuBtn: false,
         column: [{
           label: "车队",
           prop: "fleetId",
@@ -494,7 +646,7 @@ export default {
             message: " ",
             trigger: "blur"
           }]
-        },{
+        }, {
           label: "应付陆运费",
           prop: "landAmountC",
           precision: 2,
@@ -539,7 +691,7 @@ export default {
       },
       tableData: [],
       entrustListT: [],
-      KeyBoxTwo:0,
+      KeyBoxTwo: 0,
       entrustOptionTwoTBackup: {
         selectable: (row, index) => {
           return row.status === 0
@@ -550,7 +702,7 @@ export default {
         cellBtn: false,
         refreshBtn: false,
         selection: true,
-        selectionWidth:55,
+        selectionWidth: 55,
         tip: false,
         addBtn: false,
         cancelBtn: false,
@@ -640,7 +792,7 @@ export default {
           defaultTime: ['00:00:00', '23:59:59'],
           format: "yyyy-MM-dd HH:mm:ss",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
-          index:2,
+          index: 2,
           width: 140,
         }, {
           label: '尺寸箱型',
@@ -673,7 +825,7 @@ export default {
           index: 7,
           prop: 'quantity',
           type: 'number',
-          precision:0
+          precision: 0
         }
           // , {
           //   label: '包装',
@@ -860,7 +1012,7 @@ export default {
           }
         ]
       },
-      entrustOptionTwoT:{},
+      entrustOptionTwoT: {},
       entrustList: [],
       goodsOptionForm: {
         menuBtn: false,
@@ -876,7 +1028,7 @@ export default {
             trigger: "change"
           }],
         }, {
-          label: '业务员部门',
+          label: '所属部门',
           prop: 'salesmanDept',
           type: "tree",
           filter: false,
@@ -927,25 +1079,25 @@ export default {
             trigger: "blur"
           }],
         },
-        //   {
-        //   label: '货运日期',
-        //   type: "datetime",
-        //   format: 'yyyy-MM-dd HH:mm:ss',
-        //   valueFormat: 'yyyy-MM-dd HH:mm:ss',
-        //   prop: 'arrivalTime',
-        //   rules: [{
-        //     required: true,
-        //     message: " ",
-        //     trigger: "blur"
-        //   }],
-        // },
+          //   {
+          //   label: '货运日期',
+          //   type: "datetime",
+          //   format: 'yyyy-MM-dd HH:mm:ss',
+          //   valueFormat: 'yyyy-MM-dd HH:mm:ss',
+          //   prop: 'arrivalTime',
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }],
+          // },
           {
-          label: '备注',
-          span: 24,
-          minRows: 2,
-          prop: 'remarks',
-          type: 'textarea'
-        }]
+            label: '备注',
+            span: 24,
+            minRows: 2,
+            prop: 'remarks',
+            type: 'textarea'
+          }]
       },
       goodsOptionFormTwo: {
         menuBtn: false,
@@ -1075,7 +1227,8 @@ export default {
         ]
       },
       collectionList: [],
-      collectionOption: {
+      collectionOption:{},
+      collectionOptionBackup: {
         align: 'center',
         menuAlign: 'center',
         index: true,
@@ -1132,7 +1285,7 @@ export default {
           cell: true,
           prop: 'amount'
         }, {
-          label: '税率(默认6)',
+          label: '税率',
           cell: true,
           prop: 'taxRate'
         }, {
@@ -1145,11 +1298,21 @@ export default {
             label: "dictValue",
             value: "dictKey"
           },
+        }, {
+          label: '车号',
+          cell: true,
+          prop: 'plateNo',
+          type: "select",
+          props: {
+            label: "label",
+            value: "label"
+          },
         }
         ]
       },
       paymentList: [],
-      paymentOption: {
+      paymentOption:{},
+      paymentOptionBackup:{
         align: 'center',
         menuAlign: 'center',
         index: true,
@@ -1219,6 +1382,15 @@ export default {
             label: "dictValue",
             value: "dictKey"
           },
+        }, {
+          label: '车号',
+          cell: true,
+          prop: 'plateNo',
+          type: "select",
+          props: {
+            label: "label",
+            value: "label"
+          },
         }
         ]
       }
@@ -1226,6 +1398,8 @@ export default {
   },
   async created() {
     this.entrustOptionTwoT = await this.getColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
+    this.collectionOption = await this.getColumnData(this.getColumnName(86.4), this.collectionOptionBackup);
+    this.paymentOption = await this.getColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
     this.KeyBoxTwo++
     if (this.id) {
       detailDelegationList({id: this.id, kind: '2'}).then(res => {
@@ -1251,6 +1425,16 @@ export default {
         // })
       })
     }
+    queryVehicle({orderId: this.id}).then(res => {
+      const column = this.findObject(this.collectionOption.column, "plateNo");
+      const columnTwo = this.findObject(this.paymentOption.column, "plateNo");
+      column.dicData = columnTwo.dicData = []
+      res.data.data.forEach(item => {
+        column.dicData.push({label: item})
+        columnTwo.dicData.push({label: item})
+      })
+      this.key++
+    });
     this.$refs.other.show = false
     // 非租户模式默认加载管理组数据
     if (!website.tenantMode) {
@@ -1283,16 +1467,80 @@ export default {
         this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
       }
     },
-    getCorpData(val){
+    //自定义列保存
+    async saveColumnCollection() {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(85.4), this.collectionOption);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.collection.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnCollection() {
+      this.collectionOption = this.collectionOptionBackup;
+      const inSave = await this.delColumnData(this.getColumnName(85.4), this.collectionOptionBackup);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs.collection.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列保存
+    async saveColumnPayment() {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(86.5), this.paymentOption);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.payment.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnPayment() {
+      this.paymentOption = this.paymentOptionBackup;
+      const inSave = await this.delColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs.payment.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //打开附件
+    annexOpen(row, index){
+      this.enclosure = true
+      this.formAnnex = row
+      getFee({id:row.id}).then(res=>{
+        this.orderList = res.data.data
+      })
+    },
+    //保存
+    saveAnnex(){
+      saveFile({
+        id:this.formAnnex.id,
+        fileList:this.orderList
+      }).then(res=>{
+        this.$message.success("保存成功");
+        this.annexOpen(this.formAnnex)
+      })
+    },
+    getCorpData(val) {
       this.formData.fleetName = val.cname
     },
-    confirmChange(){
+    confirmChange() {
       changeFleet({
         ...this.formData,
         id: this.formDataList.id,
-        orderId:this.goodsForm.id,
-        originalFleetName:this.formDataList.fleetName
-      }).then(res=>{
+        orderId: this.goodsForm.id,
+        originalFleetName: this.formDataList.fleetName
+      }).then(res => {
         this.$refs.saveForm.resetForm()
         this.entrustList = res.data.data
         this.dialogChange = false
@@ -1319,19 +1567,19 @@ export default {
     saveScheduling() {
       this.$refs['form'].validate((valid, done) => {
         done()
-        if (valid){
+        if (valid) {
           let data = []
           this.$confirm('是否确认调度?', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
-            this.selectionList.forEach(item=>data.push(item.id))
+            this.selectionList.forEach(item => data.push(item.id))
             dispatchBatch({
               ...this.form,
-              idList:data,
-              orderId:this.goodsForm.id
-            }).then(res=>{
+              idList: data,
+              orderId: this.goodsForm.id
+            }).then(res => {
               this.entrustList = res.data.data
               this.dialogVisible = false
             })
@@ -1341,7 +1589,7 @@ export default {
               message: '已取消'
             });
           });
-        }else {
+        } else {
           return false
         }
       })
@@ -1410,15 +1658,15 @@ export default {
       }
     },
     //变更车队
-    changeFleetT(row, index){
+    changeFleetT(row, index) {
       this.formDataList = row
       this.dialogChange = true
       this.formData = {}
     },
     //打开变更记录
-    recordsOfChanges(row, index){
+    recordsOfChanges(row, index) {
       this.dialogRecord = true
-      recordingDetails({itemId:row.id,kind:2}).then(res=>{
+      recordingDetails({itemId: row.id, kind: 2}).then(res => {
         this.dataRecord = res.data.data
       })
     },
@@ -1462,9 +1710,27 @@ export default {
       done()
     },
     rowCell(row, index) {
-      this.$refs.collection.rowCell(row, index)
+      if (row.$cellEdit) {
+        if (row.plateNo){
+          incidentalSubmit(row).then(res=>{
+            this.$refs.collection.rowCell(row, index)
+            row = res.data.data
+            this.$message.success("保存成功");
+          })
+        }else {
+          this.$message.error("请选择车号");
+        }
+      }else {
+        this.$refs.collection.rowCell(row, index)
+      }
     },
     paymentRowCell(row, index) {
+      if (row.$cellEdit) {
+        incidentalSubmit(row).then(res=>{
+          row = res.data.data
+          this.$message.success("保存成功");
+        })
+      }
       this.$refs.payment.rowCell(row, index)
     },
     //箱信息移除
@@ -1503,6 +1769,7 @@ export default {
       this.$refs.collection.rowCellAdd({
         currency: '1',
         type: '1',
+        orderId:this.id,
         $cellEdit: true
       });
     },
@@ -1511,6 +1778,7 @@ export default {
       this.$refs.payment.rowCellAdd({
         currency: '1',
         type: '2',
+        orderId:this.id,
         $cellEdit: true
       });
     },
@@ -1573,9 +1841,10 @@ export default {
   margin-bottom: 8px;
 }
 
-::v-deep .el-form-item__content{
+::v-deep .el-form-item__content {
   line-height: 32px;
 }
+
 ::v-deep .el-card__body {
   padding: 10px 15px;
   font-size: 14px;

+ 5 - 2
src/views/landTransportation/dispatchingCars/index.vue

@@ -117,6 +117,7 @@ export default {
       id: '',
       show: true,
       loading: false,
+      query:{},
       key:0,
       dataList: [],
       totalData: {},
@@ -323,7 +324,7 @@ export default {
       }
       this.$refs.crud.getTableHeight()
     },
-    onLoad(page, params) {
+    onLoad(page, params={}) {
       totalList(2).then(res => {
         this.totalData = res.data.data
       })
@@ -332,7 +333,8 @@ export default {
         current: page.currentPage,
         itemStatus: this.activeName,
         kind: '2',
-        ...params
+        ...params,
+        ...Object.assign(params, this.query)
       }
       this.loading = true;
       selectInvoiceList(queryParams).then(res => {
@@ -356,6 +358,7 @@ export default {
       }
       delete data.arrivalTime
       delete data.createTime
+      this.query = data;
       this.onLoad(this.page, data)
       done();
     },

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

@@ -181,6 +181,7 @@ export default {
       key:0,
       form: {},
       orderList:[],
+      query:{},
       dialogVisible: false,
       loading: false,
       activeName:'',
@@ -603,6 +604,7 @@ export default {
       }
       delete data.arrivalTime
       delete data.createTime
+      this.query = data;
       this.onLoad(this.page, params)
       done();
     },
@@ -612,7 +614,7 @@ export default {
       this.onLoad(this.page)
     },
     //查询
-    onLoad(page, params) {
+    onLoad(page, params={}) {
       motorcadeDriver(4).then(res=>{
         this.totalData = res.data.data
       })
@@ -620,7 +622,8 @@ export default {
         size: page.pageSize,
         current: page.currentPage,
         tag: '4',
-        ...params
+        ...params,
+        ...Object.assign(params, this.query)
       }
       this.loading = true;
       driverQueryCollection(queryParams).then(res => {

+ 5 - 2
src/views/landTransportation/motorcadeDriver/index.vue

@@ -210,6 +210,7 @@ export default {
   data() {
     return {
       key: 0,
+      query:{},
       optionData: {
         span: 12,
         menuBtn: false,
@@ -793,11 +794,12 @@ export default {
       }
       delete data.arrivalTime
       delete data.createTime
+      this.query = data;
       this.onLoad(this.page, params)
       done();
     },
     //查询
-    onLoad(page, params) {
+    onLoad(page, params={}) {
       motorcadeDriver(3).then(res => {
         this.totalData = res.data.data
       })
@@ -806,7 +808,8 @@ export default {
         current: page.currentPage,
         status: this.activeName,
         tag: '3',
-        ...params
+        ...params,
+        ...Object.assign(params, this.query)
       }
       this.loading = true;
       driverQueryCollection(queryParams).then(res => {

+ 68 - 25
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -324,11 +324,11 @@
           :option="vehicleOption">
       </avue-crud>
     </basic-container>
-    <containerTitle title="其他费用"></containerTitle>
+    <containerTitle title="杂费明细"></containerTitle>
     <basic-container>
       <el-tabs v-model="activeIndex" @tab-click="handleSelect">
         <el-tab-pane label="应收" name="1"></el-tab-pane>
-        <el-tab-pane label="应付" name="2"></el-tab-pane>
+<!--        <el-tab-pane label="应付" name="2"></el-tab-pane>-->
       </el-tabs>
       <avue-crud
           v-if="activeIndex === '1'"
@@ -344,7 +344,7 @@
           <crop-select
               v-if="row.$cellEdit"
               v-model="row.corpId"
-              :disabled="goodsForm.status === 1"
+              :disabled="goodsForm.status !== 0"
               @getCorpData="(data)=>{getfleetId(data,row)}"
           ></crop-select>
           <span v-else>{{ row.corpName }}</span>
@@ -353,7 +353,7 @@
           <breakdown-select
               v-if="row.$cellEdit"
               v-model="row.feeId"
-              :disabled="goodsForm.status === 1"
+              :disabled="goodsForm.status !== 0"
               @selectValue="(value) => selectValue(value,row)"
               :configuration="breakConfiguration"
           >
@@ -361,26 +361,36 @@
           <span v-else>{{ row.feeName }}</span>
         </template>
         <template slot-scope="{row,index}" slot="menu">
+<!--          <el-button-->
+<!--              type="text"-->
+<!--              size="small"-->
+<!--              :disabled="goodsForm.status === 1"-->
+<!--              :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
+<!--              @click="rowCell(row,index)"-->
+<!--          >{{ row.$cellEdit ? '保存' : '编辑' }}-->
+<!--          </el-button>-->
+<!--          <el-button type="text"-->
+<!--                     icon="el-icon-delete"-->
+<!--                     size="small"-->
+<!--                     :disabled="goodsForm.status === 1"-->
+<!--                     @click="$refs.collection.rowDel(row,index)"-->
+<!--          >删除-->
+<!--          </el-button>-->
           <el-button
-              type="text"
               size="small"
-              :disabled="goodsForm.status === 1"
-              :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
-              @click="rowCell(row,index)"
-          >{{ row.$cellEdit ? '保存' : '编辑' }}
-          </el-button>
-          <el-button type="text"
-                     icon="el-icon-delete"
-                     size="small"
-                     :disabled="goodsForm.status === 1"
-                     @click="$refs.collection.rowDel(row,index)"
-          >删除
+              type="text"
+              icon="el-icon-s-order"
+              @click="annexOpen(row, index)"
+          >附 件
           </el-button>
         </template>
         <template slot="menuLeft">
-          <el-button type="primary" icon="el-icon-plus" :disabled="goodsForm.status === 1" @click="addRowCollection"
-                     size="small">录入明细
-          </el-button>
+<!--          <el-button-->
+<!--              type="primary"-->
+<!--              icon="el-icon-plus"-->
+<!--              :disabled="goodsForm.status !== 0"-->
+<!--              @click="addRowCollection"-->
+<!--              size="small">录入明细</el-button>-->
         </template>
       </avue-crud>
       <avue-crud
@@ -407,7 +417,7 @@
           <breakdown-select
               v-if="row.$cellEdit"
               v-model="row.feeId"
-              :disabled="goodsForm.status === 1"
+              :disabled="goodsForm.status !== 0"
               @selectValue="(value) => selectValue(value,row)"
               :configuration="breakConfiguration"
           >
@@ -432,9 +442,12 @@
           </el-button>
         </template>
         <template slot="menuLeft">
-          <el-button type="primary" icon="el-icon-plus" :disabled="goodsForm.status === 1" @click="addRowPayment"
-                     size="small">录入明细
-          </el-button>
+          <el-button
+              type="primary"
+              icon="el-icon-plus"
+              :disabled="goodsForm.status === 1"
+              @click="addRowPayment"
+              size="small">录入明细</el-button>
         </template>
       </avue-crud>
     </basic-container>
@@ -446,6 +459,24 @@
         :disabled="goodsForm.status === 1"
         :enumerationValue="85.6"
     ></c-upload>
+
+    <el-dialog
+        title="附件"
+        :visible.sync="enclosure"
+        append-to-body
+        width="70%">
+      <c-upload
+          typeUpload="GZ"
+          :basic="true"
+          deleteUrl="/api/blade-client/common-file/remove"
+          :data="orderList"
+          disabled
+          :enumerationValue="76"
+      ></c-upload>
+      <span slot="footer" class="dialog-footer">
+          <el-button @click="enclosure = false" size="small">取 消</el-button>
+        </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -456,7 +487,7 @@ import {
   detailDelegationList,
   removeCollection,
   saveSaveList,
-  addressList, cancelSubmission, getCorp, getSalesman
+  addressList, cancelSubmission, getCorp, getSalesman, getFee
 } from "@/api/landTransportation";
 import {getDeptTree} from "@/api/system/dept";
 import website from "@/config/website";
@@ -473,6 +504,8 @@ export default {
       KeyBox: 0,
       KeyBoxTwo: 0,
       type: false,
+      enclosure: false,
+      orderList:[],
       goodsForm: {},
       modelKey: 1,
       orderFilesList: [],
@@ -898,7 +931,7 @@ export default {
             trigger: "change"
           }],
         }, {
-          label: '业务员部门',
+          label: '所属部门',
           prop: 'salesmanDept',
           type: "tree",
           filter: false,
@@ -1173,6 +1206,7 @@ export default {
         menuAlign: 'center',
         refreshBtn: false,
         index: true,
+        // menu:false,
         cancelBtn: false,
         editBtn: false,
         delBtn: false,
@@ -1204,6 +1238,7 @@ export default {
         }, {
           label: '费用名称',
           slot: true,
+          width: 160,
           prop: 'feeId'
         }, {
           label: '计价单位',
@@ -1344,6 +1379,7 @@ export default {
           this.goodsList = res.data.data.itemList
           this.vehicleList = res.data.data.orderItemList
           this.orderFilesList = res.data.data.fileList
+          this.goodsForm.status = 0
           if (res.data.data.orderFeeList.length > 0) {
             res.data.data.orderFeeList.forEach(item => {
               if (item.type == 1) {
@@ -1748,6 +1784,13 @@ export default {
         $cellEdit: true
       });
     },
+    //打开附件
+    annexOpen(row, index){
+      this.enclosure = true
+      getFee({id:row.id}).then(res=>{
+        this.orderList = res.data.data
+      })
+    },
     //付费新增
     addRowPayment() {
       this.$refs.payment.rowCellAdd({

+ 4 - 2
src/views/landTransportation/placeAnOrder/index.vue

@@ -179,6 +179,7 @@ export default {
       id: '',
       activeName: null,
       show: true,
+      query:{},
       selectionList:[],
       dataList: [],
       loading: false,
@@ -396,7 +397,7 @@ export default {
       this.activeName = tab
       this.onLoad(this.page)
     },
-    onLoad(page, params) {
+    onLoad(page, params={}) {
       totalList(1).then(res=>{
         this.totalData = res.data.data
       })
@@ -405,7 +406,7 @@ export default {
         current: page.currentPage,
         itemStatus: this.activeName,
         kind: '1',
-        ...params
+        ...Object.assign(params, this.query)
       }
       this.loading = true;
       selectInvoiceList(queryParams).then(res => {
@@ -429,6 +430,7 @@ export default {
       }
       delete data.arrivalTime
       delete data.createTime
+      this.query = data;
       this.onLoad(this.page, data)
       done();
     },

+ 368 - 357
src/views/landTransportation/reportAnalysis/index.vue

@@ -18,13 +18,15 @@
           <span>{{ row.fleetName }}</span>
         </template>
         <template slot="billNo" slot-scope="{row,index}">
-          <span class="el-button--text" style="cursor: pointer" @click.stop="celJump(row,index)">{{row.billNo}}</span>
+          <span class="el-button--text" style="cursor: pointer" @click.stop="celJump(row,index)">{{ row.billNo }}</span>
         </template>
         <template slot="corpName" slot-scope="{row,index}">
-          <span class="el-button--text" style="cursor: pointer" @click.stop="celJump(row,index)">{{row.corpName}}</span>
+          <span class="el-button--text" style="cursor: pointer"
+                @click.stop="celJump(row,index)">{{ row.corpName }}</span>
         </template>
         <template slot="orderNo" slot-scope="{row,index}">
-          <span class="el-button--text" style="cursor: pointer" @click.stop="celJump(row,index)">{{row.orderNo}}</span>
+          <span class="el-button--text" style="cursor: pointer"
+                @click.stop="celJump(row,index)">{{ row.orderNo }}</span>
         </template>
         <template slot-scope="{row}" slot="fleetIdSearch">
           <crop-select
@@ -34,63 +36,85 @@
         </template>
         <template slot-scope="{row,index}" slot="menu">
           <el-button
-              type="text"
-              size="small"
-              v-if="row.status === 2"
-              @click="rowSaveT(row,index)"
-          >{{ row.$cellEdit ? '保 存' : '修 改' }}
-          </el-button>
-          <el-button
-              size="small"
-              type="text"
-              @click="designate(row, index)"
-              v-if="row.status===2"
-          >受 理
-          </el-button>
-          <el-button
-              size="small"
-              type="text"
-              @click="cancelDesignate(row, index)"
-              v-if="row.status===3"
-          >取消受理
-          </el-button>
-          <el-button
-              size="small"
-              type="text"
-              @click="confirmCompletion(row, index)"
-              v-if="row.status === 3"
-          >确认完工
-          </el-button>
-          <el-button
               size="small"
               type="text"
-              @click="annexOpen(row, index)"
-          >附 件
+              @click="incidentalConfirm(row)"
+          >{{row.confirmStatus == 0?'杂费确认':'杂费取消'}}
           </el-button>
         </template>
         <template slot="addressDetail" slot-scope="{ row,index}">
           <el-tooltip class="item" effect="dark" placement="top">
             <div v-html="ToBreak(row.addressDetail)" slot="content"></div>
-            <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{row.addressDetail}}</div>
+            <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ row.addressDetail }}</div>
           </el-tooltip>
         </template>
       </avue-crud>
       <el-dialog
+          title="杂费明细"
+          :visible.sync="incidentalType"
+          append-to-body
+          width="80%">
+        <avue-crud
+            :data="collectionList"
+            :option="collectionOption"
+            ref="collection"
+            @resetColumn="resetColumnCollection"
+            @saveColumn="saveColumnCollection"
+            @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
+            @row-update="rowSave">
+          <template slot-scope="{row,index}" slot="menu">
+            <!--          <el-button-->
+            <!--              type="text"-->
+            <!--              size="small"-->
+            <!--              :disabled="goodsForm.status === 1"-->
+            <!--              :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
+            <!--              @click="rowCell(row,index)"-->
+            <!--          >{{ row.$cellEdit ? '保存' : '编辑' }}-->
+            <!--          </el-button>-->
+            <!--          <el-button type="text"-->
+            <!--                     icon="el-icon-delete"-->
+            <!--                     size="small"-->
+            <!--                     :disabled="goodsForm.status === 1"-->
+            <!--                     @click="$refs.collection.rowDel(row,index)"-->
+            <!--          >删除-->
+            <!--          </el-button>-->
+            <el-button
+                size="small"
+                type="text"
+                icon="el-icon-s-order"
+                @click="annexOpen(row, index)"
+            >附 件
+            </el-button>
+          </template>
+          <template slot="menuLeft">
+            <!--          <el-button-->
+            <!--              type="primary"-->
+            <!--              icon="el-icon-plus"-->
+            <!--              :disabled="goodsForm.status !== 0"-->
+            <!--              @click="addRowCollection"-->
+            <!--              size="small">录入明细</el-button>-->
+          </template>
+        </avue-crud>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="incidentalType = false" size="small">取 消</el-button>
+          <el-button type="primary" size="small" v-if="collectionList.length>0" @click="incidentalClick">{{confirmStatus == 0?'杂费确认':'杂费取消'}}</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog
           title="附件"
-          :visible.sync="dialogVisible"
+          :visible.sync="enclosure"
           append-to-body
           width="70%">
         <c-upload
             typeUpload="GZ"
             :basic="true"
+            disabled
             deleteUrl="/api/blade-client/common-file/remove"
             :data="orderList"
-            :disabled="form.status===4"
             :enumerationValue="76"
         ></c-upload>
         <span slot="footer" class="dialog-footer">
-          <el-button @click="dialogVisible = false" size="small">取 消</el-button>
-          <el-button type="primary" @click="saveAnnex" size="small" :disabled="form.status===4">保 存</el-button>
+          <el-button @click="enclosure = false" size="small">取 消</el-button>
         </span>
       </el-dialog>
     </basic-container>
@@ -103,30 +127,125 @@ import {
   acceptanceCollection,
   acceptanceDispatchCollection,
   confirmCompletion,
-  fleetList, motorcadeDriver, fleetDriverSave, getAttachment, saveAttached
+  fleetList,
+  motorcadeDriver,
+  fleetDriverSave,
+  getAttachment,
+  saveAttached,
+  incidental,
+  getFee,
+  incidentalConfirm,
+  cancelConfirm
 } from "@/api/landTransportation";
 
 export default {
   name: "index",
   data() {
     return {
-      key:0,
+      key: 0,
       form: {},
-      orderList:[],
+      enclosure:false,
+      orderList: [],
+      collectionOptionBackup: {
+        align: 'center',
+        menuAlign: 'center',
+        refreshBtn: false,
+        index: true,
+        // menu:false,
+        cancelBtn: false,
+        editBtn: false,
+        delBtn: false,
+        cellBtn: false,
+        addBtn: false,
+        addRowBtn: false,
+        showSummary: true,
+        addBtnText: '录入明细',
+        summaryText: "合计",
+        sumColumnList: [{
+          name: 'price',
+          type: 'sum',
+          decimals: 2
+        }, {
+          name: 'amount',
+          type: 'sum',
+          decimals: 2
+        }, {
+          name: 'quantity',
+          type: 'sum',
+          decimals: 0
+        }],
+        column: [{
+          label: '公司名称',
+          slot: true,
+          width: 200,
+          overHidden: true,
+          prop: 'corpName'
+        }, {
+          label: '费用名称',
+          slot: true,
+          width: 160,
+          prop: 'feeName'
+        }, {
+          label: '计价单位',
+          cell: true,
+          prop: 'unit',
+          type: "select",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          }
+        }, {
+          label: '数量',
+          cell: true,
+          prop: 'quantity'
+        }, {
+          label: '单价',
+          cell: true,
+          prop: 'price'
+        }, {
+          label: '金额',
+          cell: true,
+          prop: 'amount'
+        }, {
+          // label: '税率(默认6)',
+          label: '税率',
+          cell: true,
+          prop: 'taxRate'
+        }, {
+          label: '币别',
+          cell: true,
+          prop: 'currency',
+          type: "select",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          },
+        }, {
+          label: '车号',
+          prop: 'plateNo'
+        }
+        ]
+      },
+      collectionOption: {},
+      collectionList:[],
       dialogVisible: false,
       loading: false,
-      activeName:'',
+      incidentalType: false,
+      confirmStatus:0,
+      activeName: '',
       page: {
         pageSize: 10,
         currentPage: 1,
         total: 0,
         pageSizes: [10, 50, 100, 200, 300]
       },
-      roleName: localStorage.getItem("roleName").split(',')[0],
+      roleName: localStorage.getItem("roleName").split(','),
       goodsList: [],
-      goodsOptionCrud:{},
+      goodsOptionCrud: {},
       optionList: {
-        stripe:true,
+        stripe: true,
         index: true,
         addBtn: false,
         delBtn: false,
@@ -138,7 +257,7 @@ export default {
         searchIcon: true,
         searchIndex: 2,
         searchSpan: 8,
-        menu:false,
+        menu: true,
         searchMenuPosition: "right",
         searchMenuSpan: 6,
         align: 'center',
@@ -157,23 +276,23 @@ export default {
           }, {
             name: 'ctnQuantity',
             type: 'count'
-          },{
+          }, {
             name: 'oneFeeC',
             type: 'sum',
             decimals: 2
-          },{
+          }, {
             name: 'twoFeeC',
             type: 'sum',
             decimals: 2
-          },{
+          }, {
             name: 'threeFeeC',
             type: 'sum',
             decimals: 2
-          },{
+          }, {
             name: 'fourFeeC',
             type: 'sum',
             decimals: 2
-          },{
+          }, {
             name: 'fiveFeeC',
             type: 'sum',
             decimals: 2
@@ -203,14 +322,14 @@ export default {
             decimals: 2
           }],
         column: [{
-          label: '订单号',
-          prop: 'orderNo',
+          label: '客户名称',
+          prop: 'corpName',
           overHidden: true,
           index: 1,
           width: 140,
           search: true,
-        },{
-          label: '到厂时间',
+        }, {
+          label: '货运日期',
           prop: 'arrivalTime',
           overHidden: true,
           type: "date",
@@ -218,306 +337,122 @@ export default {
           defaultTime: ['00:00:00', '23:59:59'],
           format: "yyyy-MM-dd HH:mm:ss",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
-          index: 1,
-          width: 140,
-          search: true,
-        }, {
-          label: '客户名称',
-          prop: 'corpName',
-          overHidden: true,
           index: 2,
-          width: 140,
+          width: 150,
           search: true,
-        },{
-          label: '路线',
+        }, {
+          label: '业务员',
+          prop: 'salesmanName',
           index: 3,
+          width: 140,
+        }, {
+          label: '货运地点',
+          index: 4,
           width: 160,
           search: true,
           prop: 'addressDetail'
-        },{
-          label: '发票号',
-          prop: 'invoiceNo',
-        },{
-          label: '提单号',
-          width: 100,
-          index:4,
-          search: true,
-          overHidden: true,
-          prop: 'billNo'
-        }, {
-          label: '尺寸箱型',
-          width: 100,
-          search: true,
-          index: 5,
-          overHidden: true,
-          prop: 'ctnType',
-          type: 'select',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
-          props: {
-            label: "dictValue",
-            value: "dictValue"
-          },
-        }, {
-          label: '车队',
-          width: 200,
-          search: true,
-          index:7,
+        }
+          // ,{
+          //   label: '订单号',
+          //   prop: 'orderNo',
+          //   overHidden: true,
+          //   index: 1,
+          //   width: 140,
+          //   search: true,
+          // }
+          , {
+            label: '票据号',
+            prop: 'receiptNo',
+            overHidden: true,
+            index: 5,
+            width: 140,
+            search: true,
+          }, {
+            label: '提单号',
+            width: 100,
+            index: 6,
+            search: true,
+            overHidden: true,
+            prop: 'billNo'
+          }, {
+            label: '场站',
+            prop: 'station',
+            overHidden: true,
+            index: 7,
+            width: 140,
+            search: true,
+          }, {
+            label: '尺寸箱型',
+            width: 100,
+            search: true,
+            index: 8,
+            overHidden: true,
+            prop: 'ctnDetail'
+          }, {
+            label: '车队',
+            width: 200,
+            search: true,
+            index: 9,
+            overHidden: true,
+            prop: 'fleetId'
+          }, {
+            label: '车号',
+            width: 150,
+            prop: 'plateNo',
+            overHidden: true,
+            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'
+          }]
+      },
+      totalData: {}
+    }
+  },
+  async created() {
+    this.goodsOptionCrud = await this.getColumnData(this.getColumnName(88.1), this.optionList);
+    this.collectionOption = await this.getColumnData(this.getColumnName(88.2), this.collectionOptionBackup);
+    this.roleName.forEach(item =>{
+      console.log(item);
+      if (item == '客户'){
+        return this.goodsOptionCrud.menu = true
+      }else if (item == '平台') {
+        this.goodsOptionCrud.menu = false
+        return this.goodsOptionCrud.column.push( {
+          label: '应付运费',
           overHidden: true,
-          prop: 'fleetId'
-        }, {
-          label: '利润',
-          width: 100,
-          precision: 2,
-          cell: true,
-          index: 8,
-          controls: false,
-          type: 'number',
-          prop: 'profit'
+          index: 14,
+          prop: 'landAmountC'
         }, {
-          label: '应收陆运费',
+          label: '应付杂费',
           overHidden: true,
-          index: 9,
-          prop: 'landAmountD'
-        }, {
-          label: '其他',
-          width: 100,
-          precision: 2,
-          index: 13,
-          cell: true,
-          type: 'number',
-          controls: false,
-          prop: 'fiveFeeC'
-        }, {
-          label: '费用备注',
-          width: 245,
-          index: 14,
-          cell: true,
-          prop: 'feeRemarksC'
-        },{
-          label: '应收场站费',
-          width: 100,
-          precision: 2,
           index: 15,
-          controls: false,
-          type: 'number',
-          prop: 'oneFeeD'
+          prop: 'extraAmountC'
         }, {
-          label: '应收港杂费',
+          label: '利润',
           width: 100,
           precision: 2,
           index: 16,
-          controls: false,
-          type: 'number',
-          prop: 'twoFeeD'
-        }, {
-          label: '应收扣款',
-          width: 100,
-          precision: 2,
-          controls: false,
-          index: 17,
           type: 'number',
-          prop: 'threeFeeD'
-        }, {
-          label: '应收待时费',
-          width: 100,
-          precision: 2,
-          index: 18,
-          controls: false,
-          type: 'number',
-          prop: 'fourFeeD'
-        }, {
-          label: '应收其他',
-          width: 100,
-          precision: 2,
-          index: 19,
-          type: 'number',
-          controls: false,
-          prop: 'fiveFeeD'
-        }, {
-          label: '应收费用备注',
-          width: 245,
-          index: 20,
-          prop: 'feeRemarksD'
-        }, {
-          label: '应付陆运费',
-          overHidden: true,
-          index: 20,
-          prop: 'landAmountC'
-        }, {
-          label: '应付场站费',
-          width: 100,
-          precision: 2,
-          controls: false,
-          index: 21,
-          type: 'number',
-          prop: 'oneFeeC'
-        }, {
-          label: '应付港杂费',
-          width: 100,
-          precision: 2,
-          index: 22,
-          controls: false,
-          type: 'number',
-          prop: 'twoFeeC'
-        }, {
-          label: '应付扣款',
-          width: 100,
-          index: 23,
-          precision: 2,
-          controls: false,
-          type: 'number',
-          prop: 'threeFeeC'
-        }, {
-          label: '应付待时费',
-          width: 100,
-          precision: 2,
-          index: 24,
-          controls: false,
-          type: 'number',
-          prop: 'fourFeeC'
-        }, {
-          label: '应付其他',
-          width: 100,
-          precision: 2,
-          type: 'number',
-          index: 25,
-          controls: false,
-          prop: 'fiveFeeC'
-        }, {
-          label: '应付费用备注',
-          width: 245,
-          index: 26,
-          prop: 'feeRemarksC'
-        }, {
-          label: '车号',
-          width: 150,
-          prop: 'vehicleId',
-          overHidden: true,
-          index: 27,
-          type: 'select',
-          search: true,
-          dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
-          props: {
-            label: "plateNo",
-            value: "id"
-          }
-        }, {
-          label: '司机',
-          width: 115,
-          index: 28,
-          search: true,
-          overHidden: true,
-          prop: 'driverId',
-          type: 'select',
-          dicUrl: "/api/blade-client/land-driver/driver-list?vehicleId={{key}}",
-          props: {
-            label: "name",
-            value: "id"
-          },
-        }, {
-          label: '电话',
-          width: 160,
-          index: 29,
-          overHidden: true,
-          search: true,
-          prop: 'tel'
-        }
-
-        // ,{
-        //   label: '状态',
-        //   width: 100,
-        //   type: 'select',
-        //   index:1,
-        //   overHidden: true,
-        //   dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
-        //   props: {
-        //     label: "dictValue",
-        //     value: "dictKey"
-        //   },
-        //   dataType: "string",
-        //   prop: 'status'
-        // },{
-        //   label: '货物名称',
-        //   overHidden: true,
-        //   width: 160,
-        //   search: true,
-        //   index: 9,
-        //   prop: 'goods'
-        // }, {
-        //   label: '箱号',
-        //   cell: true,
-        //   width: 245,
-        //   index: 10,
-        //   overHidden: true,
-        //   search: true,
-        //   prop: 'ctnNo'
-        // }, {
-        //   label: '场站',
-        //   prop: 'station',
-        //   overHidden: true,
-        //   index: 11,
-        //   width: 140,
-        //   search: true,
-        // },{
-        //   label: '制单日期',
-        //   overHidden: true,
-        //   prop: 'createTime',
-        //   type: "date",
-        //   searchRange: true,
-        //   defaultTime: ['00:00:00', '23:59:59'],
-        //   format: "yyyy-MM-dd HH:mm:ss",
-        //   valueFormat: "yyyy-MM-dd HH:mm:ss",
-        //   index: 12,
-        //   width: 140,
-        //   search: true,
-        // },{
-        //   label: '船名航次',
-        //   prop: 'factory',
-        //   overHidden: true,
-        //   index: 13,
-        //   width: 140,
-        //   search: true,
-        // }, {
-        //   label: '箱量',
-        //   width: 50,
-        //   index: 15,
-        //   prop: 'ctnQuantity'
-        // }, {
-        //   label: '重量(吨)',
-        //   width: 160,
-        //   prop: 'landWeight',
-        //   controls: false,
-        //   overHidden: true,
-        //   index: 16,
-        //   precision: 2,
-        //   type: 'number'
-        // }, {
-        //   label: '委托备注',
-        //   overHidden: true,
-        //   width: 245,
-        //   index: 18,
-        //   prop: 'remarks'
-        // }, {
-        //   label: '车队备注',
-        //   overHidden: true,
-        //   width: 245,
-        //   index: 19,
-        //   prop: 'fleetRemarks'
-        // }, {
-        //   label: '司机备注',
-        //   overHidden: true,
-        //   cell: true,
-        //   width: 245,
-        //   index: 20,
-        //   prop: 'driverRemarks'
-        // }
-        ],
-      },
-      totalData:{}
-    }
-  },
-  async created() {
-    this.goodsOptionCrud = await this.getColumnData(this.getColumnName(88.1), this.optionList);
+          prop: 'profit'
+        })
+      }else {
+        return this.goodsOptionCrud.menu = false
+      }
+    })
     this.key++
     let i = 0;
     this.goodsOptionCrud.column.forEach(item => {
@@ -531,6 +466,29 @@ export default {
   },
   methods: {
     //自定义列保存
+    async saveColumnCollection() {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(88.2), this.collectionOption);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.collection.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnCollection() {
+      this.collectionOption = this.collectionOptionBackup;
+      const inSave = await this.delColumnData(this.getColumnName(88.2), this.collectionOptionBackup);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs.collection.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列保存
     async saveColumn() {
       /**
        * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
@@ -552,12 +510,40 @@ export default {
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
+      this.roleName.forEach(item =>{
+        console.log(item);
+        if (item == '客户'){
+          return this.goodsOptionCrud.menu = true
+        }else if (item == '平台') {
+          this.goodsOptionCrud.menu = false
+          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'
+          })
+        }else {
+          return this.goodsOptionCrud.menu = false
+        }
+      })
     },
     //行跳转
-    celJump(row,index){
+    celJump(row, index) {
       this.$router.push({
         path: '/landTransportation/dispatchingCars/index',
-        query: {orderId:row.orderId},
+        query: {orderId: row.orderId},
       });
     },
     // 获得高度
@@ -589,7 +575,7 @@ export default {
     },
     //查询
     onLoad(page, params) {
-      motorcadeDriver(4).then(res=>{
+      motorcadeDriver(4).then(res => {
         this.totalData = res.data.data
       })
       let queryParams = {
@@ -598,9 +584,9 @@ export default {
         tag: '0',
         ...params
       }
-      if (queryParams.arrivalTime){
-        queryParams.beginArrivalTime=params.arrivalTime[0]
-        queryParams.endArrivalTime=params.arrivalTime[1]
+      if (queryParams.arrivalTime) {
+        queryParams.beginArrivalTime = params.arrivalTime[0]
+        queryParams.endArrivalTime = params.arrivalTime[1]
         delete queryParams.arrivalTime
       }
       this.loading = true;
@@ -614,8 +600,8 @@ export default {
     },
     //箱信息保存
     rowSaveT(row, index, done, loading) {
-      if (row.$cellEdit){
-        fleetDriverSave(row).then(res=>{
+      if (row.$cellEdit) {
+        fleetDriverSave(row).then(res => {
           this.$message.success("保存成功");
         })
       }
@@ -676,23 +662,48 @@ export default {
     },
     //打开附件
     annexOpen(row, index){
-      this.dialogVisible = true
-      this.form = row
-      getAttachment({id:row.id}).then(res=>{
+      this.enclosure = true
+      this.formAnnex = row
+      getFee({id:row.id}).then(res=>{
         this.orderList = res.data.data
       })
     },
     //保存
-    saveAnnex(){
+    saveAnnex() {
       saveAttached({
-        id:this.form.id,
-        fileList:this.orderList
-      }).then(res=>{
+        id: this.form.id,
+        fileList: this.orderList
+      }).then(res => {
         this.annexOpen(this.form)
       })
     },
-    ToBreak (val) {
-      if (val)return val.replace('\n', '<br/>')
+    ToBreak(val) {
+      if (val) return val.replace('\n', '<br/>')
+    },
+    incidentalConfirm(row){
+      incidental({
+        orderId:row.orderId,
+        plateNo:row.plateNo,
+        type:'1'
+      }).then(res=>{
+        this.collectionList = res.data.data
+        this.incidentalType = true
+        this.confirmStatus = row.confirmStatus
+      })
+    },
+    incidentalClick(){
+      let id = []
+      this.collectionList.forEach(item => id.push(item.id))
+      if (this.confirmStatus == 0){
+        incidentalConfirm({ids:id.join(',')}).then(res=>{
+          this.$message.success("确认成功");
+        })
+      }else {
+        cancelConfirm({ids:id.join(',')}).then(res=>{
+          this.$message.success("取消成功");
+        })
+      }
+      this.incidentalType = false
     }
   }
 }

+ 388 - 0
src/views/landTransportation/reportAnalysis/original.json

@@ -0,0 +1,388 @@
+//original_optionList: {
+//stripe:true,
+//index: true,
+//addBtn: false,
+//delBtn: false,
+//cellBtn: false,
+//cancelBtn: false,
+//editBtn: false,
+//addRowBtn: false,
+//refreshBtn: false,
+//searchIcon: true,
+//searchIndex: 2,
+//searchSpan: 8,
+//menu:false,
+//searchMenuPosition: "right",
+//searchMenuSpan: 6,
+//align: 'center',
+//height: "auto",
+//showSummary: true,
+//summaryText: "合计",
+//sumColumnList: [
+//{
+//name: 'landWeight',
+//type: 'sum',
+//decimals: 2
+//}, {
+//name: 'landAmountC',
+//type: 'sum',
+//decimals: 2
+//}, {
+//name: 'ctnQuantity',
+//type: 'count'
+//},{
+//name: 'oneFeeC',
+//type: 'sum',
+//decimals: 2
+//},{
+//name: 'twoFeeC',
+//type: 'sum',
+//decimals: 2
+//},{
+//name: 'threeFeeC',
+//type: 'sum',
+//decimals: 2
+//},{
+//name: 'fourFeeC',
+//type: 'sum',
+//decimals: 2
+//},{
+//name: 'fiveFeeC',
+//type: 'sum',
+//decimals: 2
+//}, {
+//name: 'oneFeeD',
+//type: 'sum',
+//decimals: 2
+//}, {
+//name: 'twoFeeD',
+//type: 'sum',
+//decimals: 2
+//}, {
+//name: 'threeFeeD',
+//type: 'sum',
+//decimals: 2
+//}, {
+//name: 'fourFeeD',
+//type: 'sum',
+//decimals: 2
+//}, {
+//name: 'fiveFeeD',
+//type: 'sum',
+//decimals: 2
+//}, {
+//name: 'profit',
+//type: 'sum',
+//decimals: 2
+//}],
+//column: [{
+//label: '订单号',
+//prop: 'orderNo',
+//overHidden: true,
+//index: 1,
+//width: 140,
+//search: true,
+//},{
+//label: '到厂时间',
+//prop: 'arrivalTime',
+//overHidden: true,
+//type: "date",
+//searchRange: true,
+//defaultTime: ['00:00:00', '23:59:59'],
+//format: "yyyy-MM-dd HH:mm:ss",
+//valueFormat: "yyyy-MM-dd HH:mm:ss",
+//index: 1,
+//width: 140,
+//search: true,
+//}, {
+//label: '客户名称',
+//prop: 'corpName',
+//overHidden: true,
+//index: 2,
+//width: 140,
+//search: true,
+//},{
+//label: '路线',
+//index: 3,
+//width: 160,
+//search: true,
+//prop: 'addressDetail'
+//},{
+//label: '发票号',
+//prop: 'invoiceNo',
+//},{
+//label: '提单号',
+//width: 100,
+//index:4,
+//search: true,
+//overHidden: true,
+//prop: 'billNo'
+//}, {
+//label: '尺寸箱型',
+//width: 100,
+//search: true,
+//index: 5,
+//overHidden: true,
+//prop: 'ctnType',
+//type: 'select',
+//dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
+//props: {
+//label: "dictValue",
+//value: "dictValue"
+//},
+//}, {
+//label: '车队',
+//width: 200,
+//search: true,
+//index:7,
+//overHidden: true,
+//prop: 'fleetId'
+//}, {
+//label: '利润',
+//width: 100,
+//precision: 2,
+//cell: true,
+//index: 8,
+//controls: false,
+//type: 'number',
+//prop: 'profit'
+//}, {
+//label: '应收陆运费',
+//overHidden: true,
+//index: 9,
+//prop: 'landAmountD'
+//}, {
+//label: '其他',
+//width: 100,
+//precision: 2,
+//index: 13,
+//cell: true,
+//type: 'number',
+//controls: false,
+//prop: 'fiveFeeC'
+//}, {
+//label: '费用备注',
+//width: 245,
+//index: 14,
+//cell: true,
+//prop: 'feeRemarksC'
+//},{
+//label: '应收场站费',
+//width: 100,
+//precision: 2,
+//index: 15,
+//controls: false,
+//type: 'number',
+//prop: 'oneFeeD'
+//}, {
+//label: '应收港杂费',
+//width: 100,
+//precision: 2,
+//index: 16,
+//controls: false,
+//type: 'number',
+//prop: 'twoFeeD'
+//}, {
+//label: '应收扣款',
+//width: 100,
+//precision: 2,
+//controls: false,
+//index: 17,
+//type: 'number',
+//prop: 'threeFeeD'
+//}, {
+//label: '应收待时费',
+//width: 100,
+//precision: 2,
+//index: 18,
+//controls: false,
+//type: 'number',
+//prop: 'fourFeeD'
+//}, {
+//label: '应收其他',
+//width: 100,
+//precision: 2,
+//index: 19,
+//type: 'number',
+//controls: false,
+//prop: 'fiveFeeD'
+//}, {
+//label: '应收费用备注',
+//width: 245,
+//index: 20,
+//prop: 'feeRemarksD'
+//}, {
+//label: '应付陆运费',
+//overHidden: true,
+//index: 20,
+//prop: 'landAmountC'
+//}, {
+//label: '应付场站费',
+//width: 100,
+//precision: 2,
+//controls: false,
+//index: 21,
+//type: 'number',
+//prop: 'oneFeeC'
+//}, {
+//label: '应付港杂费',
+//width: 100,
+//precision: 2,
+//index: 22,
+//controls: false,
+//type: 'number',
+//prop: 'twoFeeC'
+//}, {
+//label: '应付扣款',
+//width: 100,
+//index: 23,
+//precision: 2,
+//controls: false,
+//type: 'number',
+//prop: 'threeFeeC'
+//}, {
+//label: '应付待时费',
+//width: 100,
+//precision: 2,
+//index: 24,
+//controls: false,
+//type: 'number',
+//prop: 'fourFeeC'
+//}, {
+//label: '应付其他',
+//width: 100,
+//precision: 2,
+//type: 'number',
+//index: 25,
+//controls: false,
+//prop: 'fiveFeeC'
+//}, {
+//label: '应付费用备注',
+//width: 245,
+//index: 26,
+//prop: 'feeRemarksC'
+//}, {
+//label: '车号',
+//width: 150,
+//prop: 'vehicleId',
+//overHidden: true,
+//index: 27,
+//type: 'select',
+//search: true,
+//dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
+//props: {
+//label: "plateNo",
+//value: "id"
+//}
+//}, {
+//label: '司机',
+//width: 115,
+//index: 28,
+//search: true,
+//overHidden: true,
+//prop: 'driverId',
+//type: 'select',
+//dicUrl: "/api/blade-client/land-driver/driver-list?vehicleId={{key}}",
+//props: {
+//label: "name",
+//value: "id"
+//},
+//}, {
+//label: '电话',
+//width: 160,
+//index: 29,
+//overHidden: true,
+//search: true,
+//prop: 'tel'
+//}
+//
+//// ,{
+////   label: '状态',
+////   width: 100,
+////   type: 'select',
+////   index:1,
+////   overHidden: true,
+////   dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
+////   props: {
+////     label: "dictValue",
+////     value: "dictKey"
+////   },
+////   dataType: "string",
+////   prop: 'status'
+//// },{
+////   label: '货物名称',
+////   overHidden: true,
+////   width: 160,
+////   search: true,
+////   index: 9,
+////   prop: 'goods'
+//// }, {
+////   label: '箱号',
+////   cell: true,
+////   width: 245,
+////   index: 10,
+////   overHidden: true,
+////   search: true,
+////   prop: 'ctnNo'
+//// }, {
+////   label: '场站',
+////   prop: 'station',
+////   overHidden: true,
+////   index: 11,
+////   width: 140,
+////   search: true,
+//// },{
+////   label: '制单日期',
+////   overHidden: true,
+////   prop: 'createTime',
+////   type: "date",
+////   searchRange: true,
+////   defaultTime: ['00:00:00', '23:59:59'],
+////   format: "yyyy-MM-dd HH:mm:ss",
+////   valueFormat: "yyyy-MM-dd HH:mm:ss",
+////   index: 12,
+////   width: 140,
+////   search: true,
+//// },{
+////   label: '船名航次',
+////   prop: 'factory',
+////   overHidden: true,
+////   index: 13,
+////   width: 140,
+////   search: true,
+//// }, {
+////   label: '箱量',
+////   width: 50,
+////   index: 15,
+////   prop: 'ctnQuantity'
+//// }, {
+////   label: '重量(吨)',
+////   width: 160,
+////   prop: 'landWeight',
+////   controls: false,
+////   overHidden: true,
+////   index: 16,
+////   precision: 2,
+////   type: 'number'
+//// }, {
+////   label: '委托备注',
+////   overHidden: true,
+////   width: 245,
+////   index: 18,
+////   prop: 'remarks'
+//// }, {
+////   label: '车队备注',
+////   overHidden: true,
+////   width: 245,
+////   index: 19,
+////   prop: 'fleetRemarks'
+//// }, {
+////   label: '司机备注',
+////   overHidden: true,
+////   cell: true,
+////   width: 245,
+////   index: 20,
+////   prop: 'driverRemarks'
+//// }
+//],
+//},

+ 3 - 3
src/views/wel/home/landTransportation/components/sales-reached.vue

@@ -87,15 +87,15 @@ export default {
       this.loading = true
       bizCount({mold:1}).then(res=>{
         this.rankingTwo('totalContainer', '集装箱总量:'+res.data.data.flow.all, res.data.data.flow.list)
-        this.rankingTwo('totalContainerTwo', '集装箱总量:'+res.data.data.dept.all, res.data.data.dept.list)
+        // this.rankingTwo('totalContainerTwo', '集装箱总量:'+res.data.data.dept.all, res.data.data.dept.list)
       })
       bizCount({mold:2}).then(res=>{
         this.rankingTwo('totalBulkCargo', '散货总量:'+res.data.data.flow.all,  res.data.data.flow.list)
-        this.rankingTwo('totalBulkCargoTwo', '散货总量:'+res.data.data.dept.all, res.data.data.dept.list)
+        // this.rankingTwo('totalBulkCargoTwo', '散货总量:'+res.data.data.dept.all, res.data.data.dept.list)
       })
       bizCount({mold:3}).then(res=>{
         this.rankingTwo('specialTotal', '特种车辆总量:'+res.data.data.flow.all,res.data.data.flow.list)
-        this.rankingTwo('specialTotalTwo', '特种车辆总量:'+res.data.data.dept.all,res.data.data.dept.list)
+        // this.rankingTwo('specialTotalTwo', '特种车辆总量:'+res.data.data.dept.all,res.data.data.dept.list)
       })
       this.loading = false
     },

+ 8 - 3
vue.config.js

@@ -1,4 +1,9 @@
 module.exports = {
+  configureWebpack: {
+    externals: {
+      'AMap': 'AMap' // 高德地图JS API
+    }
+  },
   //路径前缀
   publicPath: "/",
   lintOnSave: true,
@@ -26,12 +31,12 @@ module.exports = {
     proxy: {
       '/api': {
         //本地服务接口地址
-        // target: 'http://192.168.1.12:1080',
-        target: 'http://192.168.1.114:1080',
+        // target: 'http://192.168.3.163:1080',
+        // target: 'http://192.168.1.114:1080',
         // target: 'http://124.222.119.174:1080',
         // 打包地址.
         // target: 'http://121.37.83.47:10004',//服务器ip
-        // target: 'http://trade.tubaosoft.com:10004',//服务器域名
+        target: 'http://trade.tubaosoft.com:10004',//服务器域名
         ws: true,
         pathRewrite: {
           '^/api': '/'