Qukatie 11 kuukautta sitten
vanhempi
commit
6ca10bf3a6

+ 1 - 1
src/api/lock/lock.js

@@ -20,7 +20,7 @@ export function onLock(data) {
 export function unLock(data) {
   return request({
     url: '/api/blade-client/lock/unLock',
-    method: 'delete',
+    method: 'get',
     params: data
   })
 }

+ 1 - 1
src/api/lock/lockF.js

@@ -20,7 +20,7 @@ export function onLock(data) {
 export function unLock(data) {
   return request({
     url: '/api/blade-los/losLock/unLock',
-    method: 'delete',
+    method: 'get',
     params: data
   })
 }

+ 29 - 0
src/api/tirePartsMall/salesManagement/customAnalysis.js

@@ -0,0 +1,29 @@
+import request from '@/router/axios';
+//查询列表
+export const getList = (current, size, params) => {
+    return request({
+        url: '/api/blade-sales-part/statistics/corpBuySingularDetail',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size
+        }
+    })
+}
+//合计
+export const corpBuySingularSum = (params) => {
+    return request({
+        url: '/api/blade-sales-part/statistics/corpBuySingularSum',
+        method: 'get',
+        params: params
+    })
+}
+//合计
+export const corpBuySingularStatistics = (params) => {
+    return request({
+        url: '/api/blade-sales-part/statistics/corpBuySingularStatistics',
+        method: 'get',
+        params: params
+    })
+}

+ 8 - 1
src/components/dicSelect/main.vue

@@ -236,7 +236,12 @@ export default {
             type: Boolean,
             default: false
         },
-
+        mockData: {
+            type: Array,
+            default: function () {
+                return [];
+            }
+        }
     },
     model: {
         prop: "value",
@@ -245,6 +250,8 @@ export default {
     created() {
         if (this.activateCreated) {
             this.getDicData()
+        } else {
+            this.options = this.mockData
         }
     },
     methods: {

+ 37 - 35
src/components/trackPlayback.vue

@@ -1,14 +1,15 @@
 <template>
-  <el-dialog
-      title="车辆轨迹"
-      append-to-body
-      custom-class="dialog_two"
-      :visible.sync="dialogVisible"
-      lock-scroll
-      :before-close="handleClose"
-      width="80%">
-    <div id="container" v-if="dialogVisible"></div>
-    <div class="input-card" style="right: 10.3%;bottom: 10.3%" v-if="this.lineArr.length>0">
+  <el-dialog title="车辆轨迹" append-to-body custom-class="dialog_two" :visible.sync="dialogVisible" lock-scroll
+    :before-close="handleClose" width="40%">
+    <div v-if="dialogVisible">
+      <el-timeline :reverse="reverse">
+        <el-timeline-item v-for="(item, index) in parkingPoint" :key="index" :timestamp="item.time"  :color="item.color">
+          {{ item.address }}
+        </el-timeline-item>
+      </el-timeline>
+    </div>
+    <!-- <div id="container" v-if="dialogVisible"></div> -->
+    <!-- <div class="input-card" style="right: 10.3%;bottom: 10.3%" v-if="this.lineArr.length>0">
       <h4>轨迹回放控制</h4>
       <div class="input-item">
         <input type="button" class="btn" value="开始动画" id="start" @click="startAnimation()"/>
@@ -18,7 +19,7 @@
         <input type="button" class="btn" value="继续动画" id="resume" @click="resumeAnimation()"/>
         <input type="button" class="btn" value="停止动画" id="stop" @click="stopAnimation()"/>
       </div>
-    </div>
+    </div> -->
     <div class="input-card" style="right: 10.3%;bottom: 10.3%" v-else>
       <span style="color: red">暂无该车辆轨迹信息</span>
     </div>
@@ -35,19 +36,20 @@ export default {
     parkingPoint: {
       type: Boolean
     },
-    lineArr:Object,
+    lineArr: Object,
   },
-  data(){
-    return{
+  data() {
+    return {
       map: null,
       marker: null,
-      infoWindow: null
+      infoWindow: null,
+      reverse: true,
     }
   },
   beforeDestroy() {
     this.map && this.map.destroy();
   },
-  methods:{
+  methods: {
     handleClose(done) {
       this.dialogVisible = false
       this.$emit('closeDialog')
@@ -55,7 +57,7 @@ export default {
     initMap() {
       this.map = new AMap.Map("container", {
         resizeEnable: true,
-        center: this.lineArr.length >0 ?this.lineArr[this.lineArr.length - 1]:[120.382891,36.066460],
+        center: this.lineArr.length > 0 ? this.lineArr[this.lineArr.length - 1] : [120.382891, 36.066460],
         zoom: 17
       });
       let icon = new AMap.Icon({
@@ -81,7 +83,7 @@ export default {
         strokeWeight: 6 //线宽
         // strokeStyle: "solid"  //线样式
       });
-      if (this.parkingPoint.length>0){
+      if (this.parkingPoint.length > 0) {
         this.infoWindow = new AMap.InfoWindow({
           offset: new AMap.Pixel(0, -30)
         });
@@ -90,19 +92,19 @@ export default {
             position: this.parkingPoint[i].location,
             map: this.map
           });
-          let fun = this.fun(this.parkingPoint[i].bte, this.parkingPoint[i].ete)==='获取失败'?'':this.fun(this.parkingPoint[i].bte, this.parkingPoint[i].ete)
+          let fun = this.fun(this.parkingPoint[i].bte, this.parkingPoint[i].ete) === '获取失败' ? '' : this.fun(this.parkingPoint[i].bte, this.parkingPoint[i].ete)
           this.marker.content = '<div style="width: 300px;">'
-              + '<p style="font-size: 22px;font-weight: bold;background-color: #2d8cf0;color: #fff;">' + fun + '</p>'
-              + '<p style="padding: 5px 0"><span style="color: #a0a0a0">停车时间:</span>' + (new Date(Number(this.parkingPoint[i].bte) + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ').substr(0, 19)).slice(5,19)+'至'+ (new Date(Number(this.parkingPoint[i].ete) + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ').substr(0, 19)).slice(5,19)+ '</p>'
-              + '<p><span style="color: #a0a0a0">当前位置:</span>' +this.parkingPoint[i].address + '</p>'
-              + '</div>'
+            + '<p style="font-size: 22px;font-weight: bold;background-color: #2d8cf0;color: #fff;">' + fun + '</p>'
+            + '<p style="padding: 5px 0"><span style="color: #a0a0a0">停车时间:</span>' + (new Date(Number(this.parkingPoint[i].bte) + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ').substr(0, 19)).slice(5, 19) + '至' + (new Date(Number(this.parkingPoint[i].ete) + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ').substr(0, 19)).slice(5, 19) + '</p>'
+            + '<p><span style="color: #a0a0a0">当前位置:</span>' + this.parkingPoint[i].address + '</p>'
+            + '</div>'
           this.marker.on('click', this.markerClick);
-          this.marker.emit('click', {target: this.marker});
+          this.marker.emit('click', { target: this.marker });
         }
       }
       this.marker = new AMap.Marker({
         map: this.map,
-        position: this.lineArr.length >0 ?this.lineArr[this.lineArr.length - 1]:[120.382891,36.066460],
+        position: this.lineArr.length > 0 ? this.lineArr[this.lineArr.length - 1] : [120.382891, 36.066460],
         // icon: "https://webapi.amap.com/images/car.png",
         icon: icon,
         markerMeta: new AMap.Size(28, 28),
@@ -112,16 +114,16 @@ export default {
       });
       this.map.setFitView();
     },
-    fun(startTime,endTime) {
+    fun(startTime, endTime) {
       let usedTime = endTime - startTime; // 相差的毫秒数
       let days = Math.floor(usedTime / (24 * 3600 * 1000)); // 计算出天数
       let leavel = usedTime % (24 * 3600 * 1000); // 计算天数后剩余的时间
       let hours = Math.floor(leavel / (3600 * 1000)); // 计算剩余的小时数
       let leavel2 = leavel % (3600 * 1000); // 计算剩余小时后剩余的毫秒数
       let minutes = Math.floor(leavel2 / (60 * 1000)); // 计算剩余的分钟数
-      if (startTime && endTime){
-        return  days + '天' + hours + '时' + minutes + '分'
-      }else {
+      if (startTime && endTime) {
+        return days + '天' + hours + '时' + minutes + '分'
+      } else {
         return '获取失败'
       }
     },
@@ -183,11 +185,10 @@ export default {
   }
 }
 
-.content {
-}
+.content {}
 
 ::v-deep .el-dialog {
-  margin-top: 5vh !important;
+  margin-top: 10vh !important;
   margin-bottom: 0 !important;
 }
 
@@ -195,11 +196,12 @@ export default {
   padding: 0 20px 10px 20px !important;
 }
 
-::v-deep .amap-info-close{
-  right: 10px!important;
+::v-deep .amap-info-close {
+  right: 10px !important;
   top: 12px !important;
 }
-::v-deep .amap-info-content{
+
+::v-deep .amap-info-content {
   padding: 5px 5px 5px 5px !important;
 }
 </style>

+ 29 - 5
src/components/tradeAgency/businessReports.vue

@@ -2,17 +2,19 @@
   <div>
     <el-dialog append-to-body title="预览报表" class="el-dialogDeep" :visible.sync="previewDialog" width="60%"
       :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
-      <avue-crud :option="selecList.length || type ? option : optionPrinting" :table-loading="loading" :data="data"
+      <avue-crud :option="selecList.length || type ? optionBack : optionPrinting" :table-loading="loading" :data="data"
         :page.sync="page" :permission="permissionList" v-model="form" ref="crud" id="out-table"
-        :header-cell-class-name="headerClassName" :search.sync="query"
-        @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 397)"
-        @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 397)" @search-change="searchChange"
+        :header-cell-class-name="headerClassName" :search.sync="query"  @search-change="searchChange"
         @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
         @size-change="sizeChange" @refresh-change="refreshChange">
         <template slot-scope="scope" slot="menu">
           <el-link type="primary" :disabled="scope.row.status == 1"
             @click="reportsGetReportDatafun(scope.row.url, scope.row)">预览报表</el-link>
         </template>
+        <template slot="curCode" slot-scope="{ row }">
+          <dic-select v-model="row.curCode" placeholder="币别" key="id" keyValue="key" label="code" :mockData="curCodeList"
+            :filterable="true" :activateCreated="false"></dic-select>
+        </template>
       </avue-crud>
     </el-dialog>
     <reportContainer ref="reportContainer"></reportContainer>
@@ -28,8 +30,10 @@ import { billsDetail } from '@/api/iosBasicData/bills'
 import { bbusinesstypeList } from "@/api/iosBasicData/bbusinesstype";
 import reportContainer from "@/views/iosBasicData/report-container/report-container.vue"
 import { getFeeCenterCorpIds } from "@/api/iosBasicData/feecenter";
+import dicSelect from "@/components/dicSelect/main";
 export default {
   components: {
+    dicSelect,
     reportContainer
   },
   props: {
@@ -68,6 +72,20 @@ export default {
   },
   data() {
     return {
+      curCodeList: [
+        {
+          key: null,
+          code: '全部'
+        },
+        {
+          key: 'CNY',
+          code: 'CNY'
+        },
+        {
+          key: 'USD',
+          code: 'USD'
+        }
+      ],
       userList: [],
       previewDialog: false,
       isPrintTheBoxNumber: false,
@@ -100,8 +118,14 @@ export default {
         delBtn: false,
         editBtn: false,
         menuWidth: '100',
+        header:false,
         // menu:false,
         column: [
+        // {
+        //     label: "币别",
+        //     prop: "curCode",
+        //     overHidden: true,
+        //   },
           {
             label: "客户名称",
             prop: "cnName",
@@ -185,7 +209,7 @@ export default {
     };
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(397), this.optionBack);
+    // this.option = await this.getColumnData(this.getColumnName(397), this.optionBack);
     getUserApprovalList().then(res => {
       this.findObject(this.option.column, "authorizedUsersId").dicData = res.data.data
     })

+ 45 - 13
src/components/tradeAgency/businessReportsJK.vue

@@ -2,17 +2,19 @@
   <div>
     <el-dialog class="dialogClass" append-to-body title="预览报表" :visible.sync="previewDialog" width="60%"
       :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
-      <avue-crud :option="selecList.length ? option : optionPrinting" :table-loading="loading" :data="data"
+      <avue-crud :option="selecList.length||type==1 ? optionBack : optionPrinting" :table-loading="loading" :data="data"
         :page.sync="page" :permission="permissionList" v-model="form" ref="crud" id="out-table"
-        :header-cell-class-name="headerClassName" :search.sync="query"
-        @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 397)"
-        @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 397)" @search-change="searchChange"
+        :header-cell-class-name="headerClassName" :search.sync="query" @search-change="searchChange"
         @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
         @size-change="sizeChange" @refresh-change="refreshChange">
         <template slot-scope="scope" slot="menu">
           <el-link type="primary" :disabled="scope.row.status == 1"
             @click="reportsGetReportDatafun(scope.row.url, scope.row)">预览报表</el-link>
         </template>
+        <template slot="curCode" slot-scope="{ row }">
+          <dic-select v-model="row.curCode" placeholder="币别" key="id" keyValue="key" label="code" :mockData="curCodeList"
+            :filterable="true" :activateCreated="false"></dic-select>
+        </template>
       </avue-crud>
     </el-dialog>
     <reportContainer ref="reportContainer"></reportContainer>
@@ -27,8 +29,10 @@ import { billsDetail } from '@/api/iosBasicData/bills'
 import { bbusinesstypeList } from "@/api/iosBasicData/bbusinesstype";
 import reportContainer from "@/views/iosBasicData/report-container/report-container.vue"
 import { getFeeCenterCorpIds } from "@/api/iosBasicData/feecenter";
+import dicSelect from "@/components/dicSelect/main";
 export default {
   components: {
+    dicSelect,
     reportContainer
   },
   props: {
@@ -58,10 +62,28 @@ export default {
     itemIds: {
       type: String,
       default: null
-    }
+    },
+    type: {
+      type: Number,
+      default: 0
+    },
   },
   data() {
     return {
+      curCodeList: [
+        {
+          key: null,
+          code: '全部'
+        },
+        {
+          key: 'CNY',
+          code: 'CNY'
+        },
+        {
+          key: 'USD',
+          code: 'USD'
+        }
+      ],
       userList: [],
       previewDialog: false,
       isPrintTheBoxNumber: false,
@@ -80,7 +102,6 @@ export default {
       optionPrinting: {
         stripe: true,
         height: 400,
-        calcHeight: 30,
         tip: false,
         searchShow: true,
         searchMenuSpan: 6,
@@ -94,9 +115,17 @@ export default {
         delBtn: false,
         editBtn: false,
         menuWidth: '100',
+        searchBtn: false,
+        emptyBtn: false,
+        header: false,
         // menu:false,
         column: [
           {
+            label: "币别",
+            prop: "curCode",
+            overHidden: true,
+          },
+          {
             label: "客户名称",
             prop: "cnName",
             overHidden: true,
@@ -177,7 +206,6 @@ export default {
     };
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(397), this.optionBack);
     getUserApprovalList().then(res => {
       this.findObject(this.option.column, "authorizedUsersId").dicData = res.data.data
     })
@@ -515,7 +543,7 @@ export default {
       const res = await reportsGetReportData({
         billId: this.id,
         reportCode: this.form.code,
-        groupCode: this.form.groupCode,
+        groupCode: this.groupCode,
         type: this.businessValue
       })
       // 获取的数据赋值
@@ -560,11 +588,11 @@ export default {
     // 打印报表获取数据
     reportsGetReportDatafun(url, row) {
       let obj = {}
-      if (this.selecList.length) {
+      if (this.selecList.length||this.type==1) {
         obj = {
           billId: this.id,
           reportCode: row.classifyCode,
-          groupCode: row.groupCode,
+          groupCode: this.groupCode,
           itemIds: this.itemIds,
           type: this.businessValue
         }
@@ -574,12 +602,13 @@ export default {
           reportCode: this.classifyCode,
           groupCode: this.groupCode,
           type: this.businessValue,
-          corpIds: row.id
+          corpIds: row.id,
+          curCode: row.curCode,
         }
       }
 
       reportsGetReportData(obj).then(res => {
-        if (this.selecList.length) {
+        if (this.selecList.length||this.type==1) {
           this.handleReportPreview(url, res.data.data.data)
         } else {
           this.handleReportPreview(this.url, res.data.data.data)
@@ -945,7 +974,7 @@ export default {
       params.businessType = this.businessValue
       params.classifyCode = this.classifyCode
       params.groupCode = this.groupCode
-      if (this.selecList.length) {
+      if (this.selecList.length||this.type==1) {
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           const data = res.data.data;
           this.page.total = data.total;
@@ -960,6 +989,9 @@ export default {
           dc: this.groupCode == '应收' ? 'D' : 'C',
           type: 'HYJK',
         }).then(res => {
+          res.data.data.forEach(e => {
+            e.curCode = null
+          })
           this.data = res.data.data;
           getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
             this.url = res.data.data.records.length ? res.data.data.records[0].url : null;

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

@@ -1855,6 +1855,10 @@ const columnName = [{
     code: 407,
     name: '贸易代理-融资总账'
   },
+  {
+    code: 408,
+    name: '贸易代理-统计分析(L)-客户分析'
+  },
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

+ 14 - 0
src/router/views/index.js

@@ -3725,4 +3725,18 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/financingManagement/balanceRecharge/index')
   }]
 },
+{
+  path: '/tirePartsMall/statisticAnalysis/customAnalysis/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/tirePartsMall/statisticAnalysis/customAnalysis/index',
+    name: '客户分析',
+    meta: {
+      i18n: '/tirePartsMall/statisticAnalysis/customAnalysis/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/statisticAnalysis/customAnalysis/index')
+  }]
+},
 ]

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

@@ -176,7 +176,7 @@ import {
 } from "@/api/landTransportation";
 import {getToken} from "@/util/auth";
 import {gaude} from "@/api/gaude";
-
+import { dateFormat } from "@/util/date";
 export default {
   name: "index",
   watch: {
@@ -848,12 +848,18 @@ export default {
     openTrack(row) {
       gaude({itemId: row.id, plateNo: row.plateNo, tenantId: '234557', color: '2'}).then(res => {
         this.lineArr = res.data.data.trackArray
+        res.data.data.parkArray.forEach((e,index)=>{
+          if((res.data.data.parkArray.length-1)==index){
+            e.color='rgb(255, 162, 30)'
+          }
+          e.time=dateFormat(new Date(e.ete*1),'yyyy-MM-dd hh:mm:ss')
+        })
         this.parkingPoint = res.data.data.parkArray
         this.dialogVisibleTwo = true
         this.loadingDialog = true
         let this_ = this
         setTimeout(function () {
-          this_.$refs.playback.initMap();
+          // this_.$refs.playback.initMap();
           this_.loadingDialog = false
         }, 1500)
       })

+ 637 - 0
src/views/tirePartsMall/statisticAnalysis/customAnalysis/index.vue

@@ -0,0 +1,637 @@
+<template>
+    <basic-container>
+        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+            <el-tab-pane label="明细" name="first">
+                <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :search.sync="query"
+                    v-model="form" ref="crud" id="out-table" :header-cell-class-name="headerClassName" @row-del="rowDel"
+                    @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+                    @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
+                    @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 408)"
+                    @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 408)" @on-load="onLoad"
+                    @search-criteria-switch="searchCriteriaSwitch">
+                    <template slot="menuLeft">
+                        <el-button type="success" size="small" plain @click="outExport">导出</el-button>
+                    </template>
+                    <template slot="header">
+                        <avue-crud :data="commodityData" :table-loading="itemLoading" :option="itemOption"></avue-crud>
+                    </template>
+                    <template slot="corpCnName" slot-scope="{row}">
+                        <span
+                            style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
+                            @click.stop="rowCell(row)">
+                            {{ row.corpCnName }}
+                        </span>
+                    </template>
+                </avue-crud>
+            </el-tab-pane>
+            <el-tab-pane label="图表" name="second">
+                <div v-loading="loading" ref="echartsContainer" style="width: 90vw; height: 56vh;margin-top: 10px;"></div>
+            </el-tab-pane>
+        </el-tabs>
+    </basic-container>
+</template>
+  
+<script>
+import { getList, corpBuySingularSum, corpBuySingularStatistics } from "@/api/tirePartsMall/salesManagement/customAnalysis";
+import { getToken } from "@/util/auth";
+import * as echarts from 'echarts';
+export default {
+    data() {
+        return {
+            activeName: 'first',
+            form: {},
+            search: {
+                chart: 1,
+                type: 1,
+            },
+            query: {
+                chart: 1,
+                type: 1,
+            },
+            loading: false,
+            itemLoading: false,
+            page: {
+                pageSize: 20,
+                currentPage: 1,
+                total: 0
+            },
+            selectionList: [],
+            option: {},
+            optionBack: {
+                height: 'auto',
+                calcHeight: 30,
+                searchShow: true,
+                searchMenuSpan: 6,
+                border: true,
+                index: true,
+                addBtn: false,
+                menu: false,
+                searchIcon: true,
+                searchIndex: 3,
+                column: [
+                    {
+                        label: "客户名",
+                        prop: "corpName",
+                        type: 'select',
+                        search: true,
+                        filterable: true,
+                        remote: true,
+                        overHidden: true,
+                        props: {
+                            label: 'cname',
+                            value: 'cname'
+                        },
+                        dicUrl: '/api/blade-sales-part/corpsDesc/listAll?cname={{key}}&corpType=KH&enableOrNot=1',
+                    },
+                    {
+                        label: "单量",
+                        prop: "num",
+                        overHidden: true,
+                    },
+                    {
+                        label: "条数",
+                        prop: "number",
+                        overHidden: true,
+                    },
+                    {
+                        label: "最后一次购买日期",
+                        prop: "date",
+                        overHidden: true,
+                    },
+                    {
+                        label: "业务日期",
+                        prop: "date",
+                        search: true,
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                        searchProp: "dateList",
+                        type: "date",
+                        unlinkPanels: true,
+                        searchRange: true,
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
+                        searchDefaultTime: ["00:00:00", "23:59:59"],
+                    },
+                    {
+                        label: "仓库",
+                        prop: "storageName",
+                        overHidden: true,
+                    },
+                    {
+                        label: '业务员',
+                        prop: "salerName",
+                        search: true,
+                        type: "select",
+                        props: {
+                            label: "name",
+                            value: "name"
+                        },
+                        dicUrl: "/api/blade-user/salerList",
+                        filterable: true,
+                    },
+                    {
+                        label: "购买途径",
+                        prop: "businessSource",
+                        overHidden: true,
+                    }
+                ]
+            },
+            data: [],
+            commodityData: [],
+            itemOption: {
+                border: true,
+                align: 'center',
+                header: false,
+                menu: false,
+                height: '90',
+                column: [
+                    {
+                        label: "单量",
+                        prop: "num",
+                        overHidden: true,
+                    },
+                    {
+                        label: "条数",
+                        prop: "number",
+                        overHidden: true,
+                    }
+                ]
+            },
+            chartOption: {
+                height: '130px',
+                calcHeight: 30,
+                searchShow: true,
+                searchMenuSpan: 12,
+                border: true,
+                addBtn: false,
+                menu: false,
+                header: false,
+                searchLabelWidth: "80",
+                align: 'center',
+                column: [
+                    {
+                        label: "业务来源",
+                        prop: "srcType",
+                        search: true,
+                        type: 'select',
+                        filterable: true,
+                        dicUrl: '/api/blade-system/dict-biz/dictionary?code=src_type_los',
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                        disabled: true,
+                        props: {
+                            label: "dictValue",
+                            value: "dictKey"
+                        },
+                    },
+                    {
+                        label: "委托人",
+                        prop: "corpCnName",
+                        type: 'select',
+                        search: true,
+                        filterable: true,
+                        hide: true,
+                        showColumn: false,
+                        remote: true,
+                        dicUrl: "/api/blade-los/bcorps/listByType?cnName={{key}}",
+                        props: {
+                            label: 'cnName',
+                            value: 'cnName',
+                            res: 'data.records'
+                        },
+                        width: '100',
+                        overHidden: true,
+                    },
+                    {
+                        label: "业务员",
+                        prop: "srcCnName",
+                        search: true,
+                        width: '100',
+                        overHidden: true,
+                        filterable: true,
+                        hide: true,
+                        showColumn: false,
+                        remote: true,
+                        type: "select",
+                        dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+                        props: {
+                            label: "account",
+                            value: "account",
+                            res: 'data.records'
+                        }
+                    },
+                    {
+                        label: "场站",
+                        prop: "cyCnName",
+                        search: true,
+                        width: '100',
+                        overHidden: true,
+                        filterable: true,
+                        hide: true,
+                        showColumn: false,
+                        remote: true,
+                        type: "select",
+                        dicUrl: "/api/blade-los/bcorps/listByType?status=0&current=1&size=10&corpTypeName=场站&cnName={{key}}",
+                        props: {
+                            label: "cnName",
+                            value: "cnName",
+                            res: 'data.records'
+                        }
+                    },
+                    {
+                        label: "船公司",
+                        prop: "carrierCnName",
+                        search: true,
+                        width: '100',
+                        overHidden: true,
+                        filterable: true,
+                        hide: true,
+                        showColumn: false,
+                        remote: true,
+                        type: "select",
+                        dicUrl: "/api/blade-los/bcorps/listByType?status=0&corpTypeName=船公司&current=1&size=10&cnName={{key}}",
+                        props: {
+                            label: "cnName",
+                            value: "cnName",
+                            res: 'data.records'
+                        }
+                    },
+                    {
+                        label: "开船日期",
+                        prop: "date",
+                        search: true,
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                        searchProp: "dateList",
+                        type: "date",
+                        unlinkPanels: true,
+                        searchRange: true,
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
+                        searchDefaultTime: ["00:00:00", "23:59:59"],
+                    },
+                    {
+                        label: "航线",
+                        prop: "lineCnName",
+                        search: true,
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                        filterable: true,
+                        remote: true,
+                        type: "select",
+                        dicUrl: "api/blade-los/blines/list?status=0&current=1&size=10&cnName={{key}}",
+                        props: {
+                            label: "cnName",
+                            value: "cnName",
+                            res: 'data.records'
+                        }
+                    },
+                    {
+                        label: "业务类型",
+                        prop: "businessType",
+                        search: true,
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                        filterable: true,
+                        type: 'select',
+                        dicUrl: '/api/blade-system/dict-biz/dictionary?code=decisionAnalysis_business_type',
+                        props: {
+                            label: "dictValue",
+                            value: "dictKey"
+                        },
+                    },
+                    {
+                        label: "选择图表",
+                        prop: "chart",
+                        search: true,
+                        hide: true,
+                        showColumn: false,
+                    },
+                    {
+                        label: "类型",
+                        prop: "type",
+                        search: true,
+                        hide: true,
+                        showColumn: false,
+                    }],
+            },
+            chartDic: [{
+                label: '箱量图',
+                value: 1
+            }, {
+                label: '利润图',
+                value: 2
+            }, {
+                label: '利润率图',
+                value: 3
+            }],
+            typeDic: [{
+                label: '船公司',
+                value: 1
+            }, {
+                label: '客户',
+                value: 2
+            }, {
+                label: '业务员',
+                value: 3
+            }],
+            chartList: [],
+            chartData: []
+        };
+    },
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(408), this.optionBack)
+        this.loading = true
+
+    },
+    methods: {
+        getChartData() {
+            this.loading = true
+            corpBuySingularStatistics(this.search).then(res => {
+                this.getChart(res.data.data)
+            }).finally(() => {
+                this.loading = false;
+            })
+        },
+        rowCell(row) {
+            if (row.businessType == 'SE') {
+                if (this.$store.getters.seaFEStatus) {
+                    this.$alert("海运出口页面已存在,请关闭海运出口再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: `/iosBasicData/SeafreightExportF/bills/index`,
+                        query: {
+                            id: row.id
+                        }
+                    })
+                }
+            }
+            if (row.businessType == 'ASE') {
+                if (this.$store.getters.SFEStatus) {
+                    this.$alert("SEAMEND页面已存在,请关闭SEAMEND再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: `/iosBasicData/seamends/index`,
+                        query: {
+                            id: row.id
+                        }
+                    })
+                }
+            }
+            if (row.businessType == 'SI') {
+                if (this.$store.getters.OceanFIStatus) {
+                    this.$alert("海运进口页面已存在,请关闭海运进口再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: `/iosBasicData/OceanFreightImport/bills/index`,
+                        query: {
+                            id: row.id
+                        }
+                    })
+                }
+            }
+            if (row.businessType == 'ASI') {
+                if (this.$store.getters.OFIStatus) {
+                    this.$alert("SIAMEND页面已存在,请关闭SIAMEND再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: `/iosBasicData/siamends/index`,
+                        query: {
+                            id: row.id
+                        }
+                    })
+                }
+            }
+        },
+        handleClick() {
+            if (this.activeName == 'first') {
+                this.query = this.search
+                this.onLoad(this.page, this.query)
+            } else {
+                this.getChartData()
+            }
+        },
+        searchReset() {
+            this.query = {
+                chart: 1,
+                type: 1,
+            };
+            this.onLoad(this.page);
+        },
+        searchCriteriaSwitch(type) {
+            if (type) {
+                this.option.height = this.option.height - 73;
+            } else {
+                this.option.height = this.option.height + 73;
+            }
+            this.$refs.crud.getTableHeight();
+        },
+        // 搜索点击回调
+        searchChange(params, done) {
+            this.page.currentPage = 1;
+            if (params.dateList) {
+                params = {
+                    ...params,
+                    dateStart: params.dateList[0],
+                    dateEnd: params.dateList[1],
+                }
+            }
+            this.query = params
+            this.onLoad(this.page, params);
+            done();
+        },
+        selectionChange(list) {
+            this.selectionList = list;
+        },
+        currentChange(currentPage) {
+            this.page.currentPage = currentPage;
+        },
+        sizeChange(pageSize) {
+            this.page.pageSize = pageSize;
+        },
+        refreshChange() {
+            this.onLoad(this.page, this.query);
+        },
+        onLoad(page, params = {}) {
+            this.loading = true;
+            if (params.dateList) {
+                params = {
+                    ...params,
+                    dateStart: params.dateList[0],
+                    dateEnd: params.dateList[1],
+                }
+            }
+            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+                this.page.total = res.data.data.total;
+                this.data = res.data.data.records
+                this.getStatisticsSum(Object.assign(params, this.query))
+                this.$nextTick(() => {
+                    this.$refs.crud.refreshTable()
+                    this.$refs.crud.dicInit()
+                })
+            }).finally(() => {
+                this.loading = false;
+            })
+        },
+        getStatisticsSum(params) {
+            this.itemLoading = true
+            corpBuySingularSum(params).then(res => {
+                this.commodityData = [res.data.data]
+            }).finally(() => {
+                this.itemLoading = false;
+            })
+        },
+        outExport() {
+            const routeData = this.$router.resolve({
+                path: '/api/blade-sales-part/statistics/corpBuySingularExport',//跳转目标窗口的地址
+                query: {
+                    'Blade-Auth': getToken(),
+                    ...this.query
+                }
+            })
+            window.open(routeData.href.slice(1, routeData.href.length));
+        },
+        getChart(chartData) {
+            let texts = ''
+            let typeName = ''
+            let seriesData = []
+            let myChart = echarts.init(this.$refs.echartsContainer);
+            // 指定图表的配置项和数据
+            let option = {
+                tooltip: {
+                    trigger: 'axis',
+                    axisPointer: {
+                        type: 'cross',
+                        crossStyle: {
+                            color: '#999'
+                        }
+                    }
+                },
+                toolbox: { },
+                legend: {
+                    data: ['客户数量']
+                },
+                xAxis: [
+                    {
+                        type: 'category',
+                        data: chartData.frequency,
+                        axisPointer: {
+                            type: 'shadow'
+                        }
+                    }
+                ],
+                yAxis: [
+                    {
+                        type: 'value',
+                        name: '客户数量',
+                        min: 0,
+                        interval: 50,
+                        axisLabel: {
+                            formatter: '{value} 人'
+                        }
+                    }
+                ],
+                series: [
+                    {
+                        name: '客户数量',
+                        type: 'bar',
+                        tooltip: {
+                            valueFormatter: function (value) {
+                                return value + ' 人';
+                            }
+                        },
+                        data: chartData.number
+                    },
+                ]
+            };
+            myChart.setOption(option);
+        },
+        chartChange() {
+            this.getChart(this.chartData)
+        },
+        //自定义列保存
+        async saveColumnTwo(ref, option, optionBack, code) {
+            /**
+             * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+             * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+             * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+             */
+            const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+            if (inSave) {
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs[ref].$refs.dialogColumn.columnBox = false;
+            }
+        },
+        //自定义列重置
+        async resetColumnTwo(ref, option, optionBack, code) {
+            this[option] = this[optionBack];
+            const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+            if (inSave) {
+                this.$message.success("重置成功");
+                this.$refs[ref].$refs.dialogColumn.columnBox = false;
+            }
+        },
+
+        // 更改表格颜色
+        headerClassName(tab) {
+            //颜色间隔
+            let back = ""
+            if (tab.columnIndex >= 0 && tab.column.level === 1) {
+                if (tab.columnIndex % 2 === 0) {
+                    back = "back-one"
+                } else if (tab.columnIndex % 2 === 1) {
+                    back = "back-two"
+                }
+            }
+            return back;
+        },
+    }
+};
+</script>
+  
+<style scoped>
+::v-deep#out-table .back-one {
+    background: #ecf5ff !important;
+    text-align: center;
+}
+
+::v-deep#out-table .back-two {
+    background: #ecf5ff !important;
+    text-align: center;
+}
+
+::v-deep .el-col-md-8 {
+    width: 24.33333%;
+}
+
+::v-deep.el-form-item {
+    margin-bottom: 0;
+}
+</style>
+  

+ 1 - 1
src/views/tradeAgency/oceanFreightImport/detailsPage.vue

@@ -339,7 +339,7 @@
             <c-upload :data="form.filesList" :enumerationValue="76" deleteUrl="/blade-purchase-sales/orderfiles/update"
                 display :disabled="editDisabled"></c-upload>
         </div>
-        <business-reports :id="form.id" ref="print" businessValue="HYJK" classifyCode="业务"></business-reports>
+        <business-reports :id="form.id" ref="print" businessValue="HYJK" classifyCode="业务" groupCode="销售报告" :type="1"></business-reports>
         <!--审核弹窗-->
         <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
             :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>