| | |
| | | "sockjs-client": "^1.5.1", |
| | | "stompjs": "^2.3.3", |
| | | "view-design": "^4.6.1", |
| | | "viewerjs": "^1.9.2", |
| | | "viewerjs": "^1.11.6", |
| | | "vue": "^2.6.14", |
| | | "vue-apexcharts": "^1.6.1", |
| | | "vue-clipboard2": "^0.3.1", |
| | |
| | | <!--<script src="https://cdn.jsdelivr.net/npm/vuedraggable@2.24.3/dist/vuedraggable.umd.min.js"></script>--> |
| | | <!--<script src="https://cdn.jsdelivr.net/npm/viewerjs@1.9.2/dist/viewer.min.js"></script>--> |
| | | <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/viewerjs@1.9.2/dist/viewer.min.css">--> |
| | | <script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=H1RLDFX3oib78k9N9ocaB1Ac"></script> |
| | | <script type="text/javascript" |
| | | src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=H1RLDFX3oib78k9N9ocaB1Ac"></script> |
| | | <link href="//mapopen.cdn.bcebos.com/github/BMapGLLib/DrawingManager/src/DrawingManager.min.css" rel="stylesheet"> |
| | | <script type="text/javascript" src="//mapopen.cdn.bcebos.com/github/BMapGLLib/DrawingManager/src/DrawingManager.min.js"></script> |
| | | <script type="text/javascript" |
| | | src="//mapopen.cdn.bcebos.com/github/BMapGLLib/DrawingManager/src/DrawingManager.min.js"></script> |
| | | <!----> |
| | | <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css">--> |
| | | <!--<script src="https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js"></script>--> |
| | |
| | | return getRequest(`/signCount/selectBySign?pageSize=${pageSize}&pageNum=${pageNum}&carName=${carName}&StatisticalType=${StatisticalType}`) |
| | | } |
| | | // 签收统计导出列表 |
| | | export const outExcel = (pageNum, pageSize, carName, sendDateStart, sendDateEnd) => { |
| | | return getmethod(`/signCount/outExcels?pageSize=${pageSize}&pageNum=${pageNum}&carName=${carName}&sendDateStart=${sendDateStart}&sendDateEnd=${sendDateEnd}`) |
| | | export const outExcel = (pageNum, pageSize, carName, sendDateStart, sendDateEnd,line) => { |
| | | return getmethod(`/signCount/outExcels?pageSize=${pageSize}&pageNum=${pageNum}&carName=${carName}&sendDateStart=${sendDateStart}&sendDateEnd=${sendDateEnd}&line=${line}`) |
| | | } |
| | | |
| | | export const getNewSignList = (pageNum, pageSize, carName, sendDateStart, sendDateEnd,line,sendDate,userName,batch) => { |
| | | return getRequest(`/signCount/selectBySignNew?pageSize=${pageSize}&pageNum=${pageNum}&carName=${carName}&sendDateStart=${sendDateStart}&sendDateEnd=${sendDateEnd}&line=${line}&sendDate=${sendDate}&userName=${userName}&batch=${batch}`) |
| | | } |
| | |
| | | import './assets/iconfont/iconfont.css' |
| | | import '@babel/polyfill' |
| | | |
| | | |
| | | Vue.config.productionTip = false |
| | | |
| | | Vue.use(VueLazyload, { |
| | | error: require('./assets/img-error.png'), |
| | | loading: require('./assets/loading2.gif') |
| | |
| | | store, |
| | | i18n, |
| | | render: h => h(App), |
| | | data: { |
| | | }, |
| | | data: {}, |
| | | mounted() { |
| | | // 加载主题 |
| | | this.$store.commit('setTheme', localStorage.theme); |
| | |
| | | }, |
| | | mounted() { |
| | | let token = this.getSessionStore('accessToken') |
| | | this.token = `http://111.63.178.115:9093?token=${token}`; |
| | | this.token = `https://111.63.178.115:9093?token=${token}`; |
| | | // this.token = `http://localhost:63343/dp/index.html?token=$vj$xCShfaQRUQlF8lqL1lwWi2auOrkLfkoecRuDWiJXlTnSg1mh6BODfjieo3ncsosjiocew?token1=${token}`; |
| | | //this.token = `http://127.0.0.1:8848/dp/index.html?token=${token}`; |
| | | //alert(this.toCode('管理员')) |
| | |
| | | getAllByAreaId, |
| | | delAreaMap, |
| | | } from "@/api/open"; |
| | | |
| | | export default { |
| | | name: "", |
| | | data() { |
| | |
| | | var point = new BMapGL.Point(118.187167,39.636514); |
| | | this.map.centerAndZoom(point, 12); |
| | | this.map.enableScrollWheelZoom(true); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // this.polygon = new BMapGL.Polygon([ |
| | | // new BMapGL.Point(118.127822,39.697015), |
| | | // new BMapGL.Point(118.253728,39.697459), |
| | | // new BMapGL.Point(118.256028,39.601458), |
| | | // new BMapGL.Point(118.109424,39.59612), |
| | | // new BMapGL.Point(118.100801,39.650809), |
| | | // ], { |
| | | // strokeColor: 'blue', |
| | | // strokeWeight: 2, |
| | | // strokeOpacity: 0.5 |
| | | // }); |
| | | // this.map.addOverlay(this.polygon); |
| | | }, |
| | | methods:{ |
| | | clearAll() { |
| | |
| | | delAreaMap({id:this.areaId}).then((res) => { |
| | | if(res.success){ |
| | | for(var i=0;i<obj.length;i++){ |
| | | addAreaMap({areaId:this.areaId,lng:this.getLng(obj[i].lng,obj[i].lat),lat:this.getLat(obj[i].lng,obj[i].lat)}).then((res) => { |
| | | addAreaMap({ |
| | | areaId: this.areaId, |
| | | lng: this.getLng(obj[i].lng, obj[i].lat), |
| | | lat: this.getLat(obj[i].lng, obj[i].lat) |
| | | }).then((res) => { |
| | | this.findMap(); |
| | | }); |
| | | } |
| | |
| | | strokeOpacity: 0.5 |
| | | }); |
| | | this.map.addOverlay(this.polygon); |
| | | }else{ |
| | | // this.polygon = new BMapGL.Polygon([ |
| | | // new BMapGL.Point(118.127822,39.697015), |
| | | // new BMapGL.Point(118.253728,39.697459), |
| | | // new BMapGL.Point(118.256028,39.601458), |
| | | // new BMapGL.Point(118.109424,39.59612), |
| | | // new BMapGL.Point(118.100801,39.650809), |
| | | // ], { |
| | | // strokeColor: 'blue', |
| | | // strokeWeight: 2, |
| | | // strokeOpacity: 0.5 |
| | | // }); |
| | | // this.map.addOverlay(this.polygon); |
| | | } |
| | | } |
| | | }); |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | body, html, #container {width: 100%; height: 600px; overflow: hidden; margin: 0; font-family: "微软雅黑";} |
| | | ul li {list-style: none;} |
| | | body, html, #container { |
| | | width: 100%; |
| | | height: 600px; |
| | | overflow: hidden; |
| | | margin: 0; |
| | | font-family: "微软雅黑"; |
| | | } |
| | | |
| | | ul li { |
| | | list-style: none; |
| | | } |
| | | |
| | | .drawing-panel { |
| | | z-index: 999; |
| | | position: fixed; |
| | |
| | | height: 47px; |
| | | box-shadow: 0 2px 6px 0 rgba(27, 142, 236, 0.5); |
| | | } |
| | | |
| | | .bmap-btn { |
| | | border-right: 1px solid #d2d2d2; |
| | | float: left; |
| | |
| | | background-image: url(//api.map.baidu.com/library/DrawingManager/1.4/src/bg_drawing_tool.png); |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .drawing-panel .bmap-marker { |
| | | background-position: -65px 0; |
| | | } |
| | | |
| | | .drawing-panel .bmap-polyline { |
| | | background-position: -195px 0; |
| | | } |
| | | |
| | | .drawing-panel .bmap-rectangle { |
| | | background-position: -325px 0; |
| | | } |
| | | |
| | | .drawing-panel .bmap-polygon { |
| | | background-position: -260px 0; |
| | | } |
| | | |
| | | .drawing-panel .bmap-circle { |
| | | background-position: -130px 0; |
| | | } |
| | | |
| | | /*body,*/ |
| | | /*html,*/ |
| | | /*#container {*/ |
| | |
| | | <div class="search"> |
| | | <Card> |
| | | <Row class="operation"> |
| | | <Input v-model="searchForm2.userName" suffix="ios-search" @on-change="getDataList2" placeholder="输入配送人" clearable style="width: 250px"/> |
| | | <Input v-model="searchForm2.customerName" suffix="ios-search" @on-change="getDataList2" placeholder="输入商户名称" clearable style="width: 250px;margin-left: 20px"/> |
| | | <Date-picker clearable @on-change="time1" format="yyyy-MM-dd" type="date" placement="bottom-end" placeholder="请选择配送日期" style="width: 240px;margin-left: 20px"> |
| | | <Input v-model="searchForm2.userName" suffix="ios-search" placeholder="输入配送人" |
| | | clearable style="width: 250px"/> |
| | | <Input v-model="searchForm2.customerName" suffix="ios-search" |
| | | placeholder="输入商户名称" clearable style="width: 250px;margin-left: 20px"/> |
| | | <Date-picker clearable @on-change="time1" format="yyyy-MM-dd" type="date" placement="bottom-end" |
| | | placeholder="请选择配送日期" style="width: 240px;margin-left: 20px"> |
| | | </Date-picker> |
| | | <Select v-model="searchForm2.status" style="width:200px;margin-left: 20px" clearable> |
| | | <Select v-model="searchForm2.status" style="width:200px;margin-left: 20px" clearable |
| | | placeholder="请选择配送状态"> |
| | | <Option v-for="item in cityList" :value="item.value" :key="item">{{ item.label }}</Option> |
| | | </Select> |
| | | <Button @click="init2" icon="md-refresh">查询</Button> |
| | | <Button @click="init2" icon="md-search" style="margin-left: 20px">查询</Button> |
| | | </Row> |
| | | <Table |
| | | :loading="loading" |
| | |
| | | :columns="columns" |
| | | :data="data" |
| | | ref="table" |
| | | ></Table> |
| | | > |
| | | <template #img="{ row, index }"> |
| | | <div v-for="(fit,index) in getImg(row.img)" :key="index"> |
| | | <img |
| | | :src="fit" |
| | | alt="暂无图片" |
| | | style="width: 100px;height: 100px" |
| | | @click="handleImageClick"/> |
| | | </div> |
| | | </template> |
| | | </Table> |
| | | <Row type="flex" justify="end" class="page"> |
| | | <Page |
| | | :current="searchForm.pageNumber" |
| | |
| | | import { |
| | | findPageOrderTask2, |
| | | } from "@/api/open"; |
| | | |
| | | |
| | | export default { |
| | | name: "car-manage", |
| | | data() { |
| | | return { |
| | | previewModal: false, |
| | | maxHeight: 510, |
| | | openTip: true, |
| | | openLevel: "0", |
| | |
| | | pageSize: 10, // 页面大小 |
| | | sort: "sendDate", // 默认排序字段 |
| | | order: "desc", // 默认排序方式 |
| | | customerName: '', |
| | | sendDate: '' |
| | | }, |
| | | submitLoading: false, |
| | | selectList: [], |
| | |
| | | ellipsis:true, |
| | | }, |
| | | { |
| | | title: "签收方式", |
| | | key: "status", |
| | | width: 150, |
| | | render: (h, params) => { |
| | | if (params.row.status == 1) { |
| | | return h("div", [ |
| | | h("Badge", { |
| | | props: { |
| | | status: "success", |
| | | text: "指纹", |
| | | }, |
| | | }), |
| | | ]); |
| | | title: '签收图片', |
| | | align: "center", |
| | | width: 200, |
| | | slot: "img", |
| | | // render: (h, params) => { |
| | | // |
| | | // return h('div', { |
| | | // attrs: { |
| | | // style: 'width: 100px;height: 100px;' |
| | | // } |
| | | // }, [ |
| | | // h('img', { |
| | | // attrs: { |
| | | // src: params.row.img || null, |
| | | // style: 'width: 100px;height: 100px;' |
| | | // }, |
| | | // props: { |
| | | // type: 'primary', |
| | | // size: 'large' |
| | | // } |
| | | // }) |
| | | // ]) |
| | | // } |
| | | } |
| | | }, |
| | | }, |
| | | ], |
| | | data: [], |
| | | total: 0, |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleImageClick(e) { |
| | | console.log(e.target.src); |
| | | }, |
| | | getImg(html) { |
| | | let newHtml = []; |
| | | if (html.indexOf('http') === -1) { |
| | | if (typeof html == 'string' && html.indexOf(',') !== -1) { |
| | | newHtml = html.split(',').slice(0, 2); |
| | | return newHtml; |
| | | } |
| | | newHtml.push(html); |
| | | return newHtml; |
| | | } else { |
| | | if (typeof html == 'string' && html.indexOf(',') !== -1) { |
| | | newHtml = html.split(',').slice(0, 2).map(v => '/xboot' + v.split('/xboot')[1]) |
| | | return newHtml; |
| | | } |
| | | let result = '/xboot' + html.split('/xboot')[1] |
| | | newHtml.push(result); |
| | | return newHtml; |
| | | } |
| | | }, |
| | | |
| | | init() { |
| | | this.getDataList(); |
| | | }, |
| | |
| | | }, |
| | | time1(e){ |
| | | this.searchForm.sendDate = e; |
| | | this.getDataList(); |
| | | this.searchForm2.sendDate = e; |
| | | }, |
| | | changePage(v) { |
| | | this.searchForm.pageNumber = v; |
| | | this.getDataList(); |
| | | this.searchForm2.pageNumber = v; |
| | | this.getDataList2(); |
| | | this.clearSelectAll(); |
| | | }, |
| | | changePageSize(v) { |
| | | this.searchForm.pageSize = v; |
| | | this.getDataList(); |
| | | this.searchForm2.pageSize = v; |
| | | this.getDataList2(); |
| | | }, |
| | | getDataList() { |
| | | this.loading = true; |
| | |
| | | export const childColumn = [ |
| | | { |
| | | title: "第一周", |
| | | width: 118, |
| | | width: 120, |
| | | align: "center", |
| | | key: "sendDate" |
| | | }, |
| | |
| | | text-align: center; |
| | | } |
| | | |
| | | // .Sign .ivu-table td { |
| | | // border-bottom: 0; |
| | | // } |
| | | .Sign .ivu-table td { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .isshow { |
| | | display: block; |
| | |
| | | <Card> |
| | | <Row class="operation"> |
| | | <Date-picker v-model="value" @on-change="getDataByDate" value-format="yyyy-MM-dd" type="daterange" |
| | | placement="bottom-start" placeholder="请选择日期" style="width: 240px;padding-left: 20px"> |
| | | placement="bottom-start" placeholder="请选择日期" |
| | | style="width: 240px;padding-left: 20px;margin-right: 20px"> |
| | | </Date-picker> |
| | | <Input v-model="carNo" suffix="ios-search" @on-change="getSign" placeholder="输入车牌号搜索" clearable |
| | | style="width: 250px;margin-right: 20px"/> |
| | | <Input v-model="line" suffix="ios-search" @on-change="getSign" placeholder="输入区域搜索" clearable |
| | | style="width: 250px"/> |
| | | <Button @click="exportExcel" class="init-button export-button">导出数据</Button> |
| | | <!-- <Button @click="exportAllExcel" class="init-button export-button">导出全部数据</Button> --> |
| | | <Button @click="init" icon="md-refresh" class="init-button">刷新</Button> |
| | | <Button type="dashed" @click="openTip = !openTip">{{ |
| | | openTip ? "关闭提示" : "开启提示" |
| | | }} |
| | | </Button> |
| | | <Input v-model="carNo" suffix="ios-search" @on-change="getSign" placeholder="输入车牌号搜索" clearable |
| | | style="width: 250px" /> |
| | | <Button @click="exportExcel" class="init-button export-button">导出本页数据</Button> |
| | | <!-- <Button @click="exportAllExcel" class="init-button export-button">导出全部数据</Button> --> |
| | | <div @click="switchnum = 1"> |
| | | <Button class="init-button export-button">日签收率</Button> |
| | | </div> |
| | | <div @click="switchnum = 2"> |
| | | <Button class="init-button export-button">月签收率</Button> |
| | | </div> |
| | | </Row> |
| | | <Alert show-icon v-show="openTip"> |
| | | 已选择 |
| | | <span class="select-count">{{ selectList.length }}</span> 项 |
| | | <a class="select-clear" @click="clearSelectAll">清空</a> |
| | | </Alert> |
| | | <!-- 日签收率的表 --> |
| | | <div v-show="switchnum === 1"> |
| | | <!-- 签收率的表 --> |
| | | <div> |
| | | <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" |
| | | :span-method="handleSpan" @on-sort-change="changeSort" @on-selection-change="changeSelect" height="600"></Table> |
| | | :span-method="handleSpan" @on-sort-change="changeSort" @on-selection-change="changeSelect" |
| | | height="615"></Table> |
| | | </div> |
| | | <!-- 月签收率的表 --> |
| | | <div v-show="switchnum === 2"> |
| | | <Table :loading="loading" border :columns="columnsMonth" :data="monthData" sortable="custom" |
| | | :span-method="handleSpan" @on-sort-change="changeSort" @on-selection-change="changeSelect" height="600"> |
| | | </Table> |
| | | </div> |
| | | <div v-show="switchnum === 1"> |
| | | <div> |
| | | <Row type="flex" justify="end" class="page"> |
| | | <Page :current="pageNum" :total="total" :page-size="pageSize" @on-change="changePage" |
| | | @on-page-size-change="changePageSize" :page-size-opts="[18, 36]" size="small" show-total show-elevator |
| | | show-sizer></Page> |
| | | </Row> |
| | | </div> |
| | | <div v-show="switchnum === 2"> |
| | | <Row type="flex" justify="end" class="page"> |
| | | <Page :current="pageNum" :total="totalmonth" :page-size="pageSize" @on-change="changePage" |
| | | @on-page-size-change="changePageSize" :page-size-opts="[18, 36]" size="small" show-total show-elevator |
| | | @on-page-size-change="changePageSize" :page-size-opts="[60, 120]" size="small" show-total show-elevator |
| | | show-sizer></Page> |
| | | </Row> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getAllPermissionList, |
| | | setDefaultRole, |
| | | editRolePerm, |
| | | initDepartment, |
| | | loadDepartment, |
| | | editRoleDep, |
| | | } from "@/api/index"; |
| | | import {editRoleDep, editRolePerm, getAllPermissionList, loadDepartment, setDefaultRole,} from "@/api/index"; |
| | | |
| | | import { |
| | | getAll, |
| | | addCar, |
| | | getCarList, |
| | | editCar, |
| | | deleteCar, |
| | | getEquipment, |
| | | addEquipment, |
| | | getUser, |
| | | getDriver, |
| | | deleteCar, |
| | | deleteEquipment, |
| | | getSignList, |
| | | getLicense, |
| | | getSignByMonth, |
| | | editCar, |
| | | getDriver, |
| | | getEquipment, |
| | | getNewSignList, |
| | | outExcel |
| | | } from "@/api/open"; |
| | | import util from "@/libs/util.js"; |
| | | import { childColumn, childData, childDataTwo, childColumnTwo, childColumnthree } from "./exportColumn" |
| | | import Vue from "vue" |
| | | |
| | | export default { |
| | | name: "car-manage", |
| | | data() { |
| | |
| | | searchForm: { |
| | | // 搜索框初始化对象 |
| | | pageNumber: 1, // 当前页数 |
| | | pageSize: 10, // 页面大小 |
| | | pageSize: 60, // 页面大小 |
| | | sort: "createTime", // 默认排序字段 |
| | | order: "desc", // 默认排序方式 |
| | | key: "", |
| | |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "配送员", |
| | | key: "name", |
| | | title: "区域", |
| | | key: "line", |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | // { |
| | | // title: "年月", |
| | | // key: "sendMonth", |
| | | // minWidth: 120, |
| | | // align: "center", |
| | | // }, |
| | | { |
| | | title: "01段", |
| | | // key: "oneBatch", |
| | | key: "oneBatch", |
| | | minWidth: 140, |
| | | align: "center", |
| | | children: [ |
| | | { |
| | | title: '日期', |
| | | align: 'center', |
| | | key: 'sendDate', |
| | | minWidth: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumn, |
| | | "show-header": false, |
| | | data: params.row.childone, |
| | | align: 'center', |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | { |
| | | title: '日签收率', |
| | | align: 'center', |
| | | className: 'no_border', |
| | | minWidth: 120, |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumnTwo, |
| | | data: params.row.childone, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | title: "02段", |
| | | key: "twoBatch", |
| | | minWidth: 140, |
| | | align: "center", |
| | | children: [ |
| | | { |
| | | title: '日期', |
| | | align: 'center', |
| | | key: 'model', |
| | | minWidth: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumn, |
| | | data: params.row.childtwo, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | { |
| | | title: '日签收率', |
| | | align: 'center', |
| | | key: 'model', |
| | | minWidth: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumnTwo, |
| | | data: params.row.childtwo, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | title: "03段", |
| | | key: "threeBatch", |
| | | minWidth: 140, |
| | | align: "center", |
| | | children: [ |
| | | { |
| | | title: '日期', |
| | | align: 'center', |
| | | key: 'model', |
| | | minWidth: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumn, |
| | | data: params.row.childthree, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | { |
| | | title: '日签收率', |
| | | align: 'center', |
| | | key: 'model', |
| | | minWidth: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumnTwo, |
| | | data: params.row.childthree, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | title: "04段", |
| | |
| | | minWidth: 140, |
| | | align: "center", |
| | | tooltip: true, |
| | | children: [ |
| | | { |
| | | title: '日期', |
| | | align: 'center', |
| | | key: 'model', |
| | | minWidth: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumn, |
| | | data: params.row.childfour, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | { |
| | | title: '日签收率', |
| | | align: 'center', |
| | | key: 'model', |
| | | minWidth: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumnTwo, |
| | | data: params.row.childfour, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | title: "05段", |
| | | key: "fiveBatch", |
| | | minWidth: 140, |
| | | align: "center", |
| | | children: [ |
| | | { |
| | | title: '日期', |
| | | align: 'center', |
| | | key: 'model', |
| | | minWidth: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumn, |
| | | data: params.row.childfive, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | { |
| | | title: '日签收率', |
| | | align: 'center', |
| | | key: 'model', |
| | | minWidth: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumnTwo, |
| | | data: params.row.childfive, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | ] |
| | | }, |
| | | ], |
| | | columnsMonth: [ |
| | | { |
| | | type: "selection", |
| | | width: 60, |
| | | align: "center", |
| | | }, |
| | | { |
| | | type: "index", |
| | | title: "序号", |
| | | width: 80, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "车牌号", |
| | | key: "carName", |
| | | width: 140, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "司机", |
| | | key: "userName", |
| | | width: 140, |
| | | align: "center", |
| | | }, |
| | | // { |
| | | // title: "配送员", |
| | | // key: "name", |
| | | // width: 100, |
| | | // align: "center", |
| | | // }, |
| | | // { |
| | | // title: "年月", |
| | | // key: "sendMonth", |
| | | // minWidth: 120, |
| | | // align: "center", |
| | | // }, |
| | | { |
| | | title: "01段", |
| | | width: 140, |
| | | align: "center", |
| | | children: [ |
| | | { |
| | | title: '月份', |
| | | align: 'center', |
| | | key: 'sendDate', |
| | | width: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | console.log(params.row.childone); |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumn, |
| | | "show-header": false, |
| | | data: params.row.childone, |
| | | align: 'center', |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | { |
| | | title: '月签收率', |
| | | align: 'center', |
| | | key: 'proportion', |
| | | width: 120, |
| | | className: 'no_border Sign', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumnthree, |
| | | data: params.row.childone, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | title: "02段", |
| | | key: "twoBatch", |
| | | title: "总(平均)签收率", |
| | | key: "sendMonth", |
| | | minWidth: 140, |
| | | align: "center", |
| | | children: [ |
| | | { |
| | | title: '月份', |
| | | align: 'center', |
| | | key: 'model', |
| | | width: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumn, |
| | | data: params.row.childtwo, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | { |
| | | title: '月签收率', |
| | | align: 'center', |
| | | // key: 'proportion', |
| | | width: 120, |
| | | className: 'no_border Sign', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumnthree, |
| | | data: params.row.childtwo, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | title: "03段", |
| | | key: "threeBatch", |
| | | minWidth: 140, |
| | | align: "center", |
| | | children: [ |
| | | { |
| | | title: '月份', |
| | | align: 'center', |
| | | key: 'model', |
| | | width: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumn, |
| | | data: params.row.childthree, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | { |
| | | title: '月签收率', |
| | | align: 'center', |
| | | // key: 'model', |
| | | width: 120, |
| | | className: 'no_border Sign', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumnthree, |
| | | data: params.row.childthree, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | title: "04段", |
| | | key: "fourBatch", |
| | | minWidth: 140, |
| | | align: "center", |
| | | tooltip: true, |
| | | children: [ |
| | | { |
| | | title: '月份', |
| | | align: 'center', |
| | | key: 'model', |
| | | width: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumn, |
| | | data: params.row.childfour, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | { |
| | | title: '月签收率', |
| | | align: 'center', |
| | | // key: 'model', |
| | | width: 120, |
| | | className: 'no_border Sign', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumnthree, |
| | | data: params.row.childfour, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | title: "05段", |
| | | key: "fiveBatch", |
| | | minWidth: 140, |
| | | align: "center", |
| | | children: [ |
| | | { |
| | | title: '月份', |
| | | align: 'center', |
| | | key: 'model', |
| | | width: 120, |
| | | className: 'no_border', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumn, |
| | | data: params.row.childfive, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | }, |
| | | { |
| | | title: '月签收率', |
| | | align: 'center', |
| | | // key: 'model', |
| | | width: 120, |
| | | className: 'no_border Sign', |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h("Table", { |
| | | props: { |
| | | columns: childColumnthree, |
| | | data: params.row.childfive, |
| | | "show-header": false, |
| | | }, |
| | | }), |
| | | ]) |
| | | }, |
| | | } |
| | | ] |
| | | }, |
| | | ], |
| | | columns2: [ |
| | | { |
| | |
| | | // 页码 |
| | | pageNum: 1, |
| | | // 每页条数 |
| | | pageSize: 36, |
| | | pageSize: 60, |
| | | // 车牌号 |
| | | carNo: "", |
| | | // 线路 |
| | | line: "", |
| | | // 开始日期 |
| | | beginTime: "", |
| | | // 结束日期 |
| | | endTime: "", |
| | | // 按月查询的data |
| | | monthData: [], |
| | | // monthData: [], |
| | | // 导出的数据 |
| | | exportData: "", |
| | | // 日 月签收率两张表的切换 |
| | | switchnum: 1 |
| | | dateOption: { |
| | | disabledDate(date) { |
| | | const now = new Date(); |
| | | const year = now.getFullYear(); |
| | | const month = now.getMonth(); |
| | | return date.getFullYear() !== year || date.getMonth() !== month; |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | firstDate() { |
| | | let y = new Date().getFullYear(); //获取年份 |
| | | let m = new Date().getMonth() + 1; //获取月份 |
| | | let d = '01'; |
| | | m = m < 10 ? '0' + m : m; //月份补 0 |
| | | return [y, m, d].join('-') |
| | | }, |
| | | lastDate() { |
| | | let y = new Date().getFullYear(); //获取年份 |
| | | let m = new Date().getMonth() + 1; //获取月份 |
| | | let d = new Date(y, m, 0).getDate(); //获取当月最后一日 |
| | | m = m < 10 ? '0' + m : m; //月份补 0 |
| | | d = d < 10 ? '0' + d : d; //日数补 0 |
| | | return [y, m, d].join('-') |
| | | }, |
| | | }, |
| | | created() { |
| | | this.beginTime = this.firstDate |
| | | this.endTime = this.lastDate |
| | | this.value = [this.firstDate, this.lastDate] |
| | | //请求数据 |
| | | this.getSign() |
| | | // 按月请求的数据 |
| | | this.getSignByMonthList() |
| | | }, |
| | | methods: { |
| | | getSign() { |
| | | getSignList(this.pageNum, this.pageSize, this.carNo, this.beginTime, this.endTime).then(result => { |
| | | this.loading = true; |
| | | getNewSignList(this.pageNum, this.pageSize, this.carNo, this.beginTime, this.endTime, this.line, '', '', '').then(result => { |
| | | this.loading = false; |
| | | if (result.success) { |
| | | this.data = result.result.records; |
| | | let reg = /\d/g; |
| | | this.data = result.result.records.map(v => { |
| | | return { |
| | | ...v, |
| | | sendMonth: v.sendMonth.length >= 6 ? v.sendMonth.slice(0, 5) + '%' : v.sendMonth, |
| | | proportion: v.proportion.length >= 6 ? v.proportion.slice(0, 5) + '%' : v.proportion, |
| | | line: v.line.replace(reg, '').replace('车', '') |
| | | } |
| | | }) |
| | | this.total = result.result.total; |
| | | this.data = this.merge(this.data) |
| | | // console.log(this.data); |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | getSignByMonthList() { |
| | | getSignByMonth(this.pageNum, this.pageSize, this.carNo, 3).then(result => { |
| | | this.loading = false; |
| | | if (result.success) { |
| | | this.dataMonth = result.result.records |
| | | this.totalmonth = result.result.total; |
| | | this.monthData = this.merge(this.dataMonth) |
| | | // console.log(this.monthData); |
| | | merge(data) { |
| | | return Object.values(data.reduce((acc, cur) => { |
| | | if (!acc[cur.userName]) { |
| | | acc[cur.userName] = [cur]; |
| | | } else { |
| | | acc[cur.userName].push(cur); |
| | | } |
| | | }) |
| | | }, |
| | | merge(index) { |
| | | let dataInfo = {}; |
| | | index.forEach((item, index) => { |
| | | let { userName, carName, sendMonth, name } = item; |
| | | if (!dataInfo[userName]) { |
| | | dataInfo[userName] = { |
| | | userName, |
| | | carName, |
| | | sendMonth, |
| | | name, |
| | | childone: [], |
| | | childtwo: [], |
| | | childthree: [], |
| | | childfour: [], |
| | | childfive: [] |
| | | return acc; |
| | | }, {})).map(group => { |
| | | return group.reduce((acc, cur) => { |
| | | acc.sendMonth = cur.sendMonth; |
| | | acc.carName = cur.carName; |
| | | acc.line = cur.line |
| | | if (cur.oneBatch) { |
| | | acc.oneBatch = cur.proportion; |
| | | } |
| | | if (cur.twoBatch) { |
| | | acc.twoBatch = cur.proportion; |
| | | } |
| | | if (item.batch === "01段") { |
| | | dataInfo[userName].childone.push(item); |
| | | if (cur.threeBatch) { |
| | | acc.threeBatch = cur.proportion; |
| | | } |
| | | if (item.batch === "02段") { |
| | | dataInfo[userName].childtwo.push(item); |
| | | if (cur.fourBatch) { |
| | | acc.fourBatch = cur.proportion; |
| | | } |
| | | if (item.batch === "03段") { |
| | | dataInfo[userName].childthree.push(item); |
| | | if (cur.fiveBatch) { |
| | | acc.fiveBatch = cur.proportion; |
| | | } |
| | | if (item.batch === "04段") { |
| | | dataInfo[userName].childfour.push(item); |
| | | } |
| | | if (item.batch === "05段") { |
| | | dataInfo[userName].childfive.push(item); |
| | | } |
| | | return acc; |
| | | }, {userName: group[0].userName}); |
| | | }); |
| | | let list = Object.values(dataInfo); |
| | | list.forEach(item => { |
| | | let arr = new Array(5 - item.childone.length).fill({ proportion: "" }) |
| | | let arr1 = new Array(5 - item.childtwo.length).fill({ proportion: "" }) |
| | | let arr2 = new Array(5 - item.childthree.length).fill({ proportion: "" }) |
| | | let arr3 = new Array(5 - item.childfour.length).fill({ proportion: "" }) |
| | | let arr4 = new Array(5 - item.childfive.length).fill({ proportion: "" }) |
| | | item.childone = [...item.childone, ...arr] |
| | | item.childtwo = [...item.childtwo, ...arr1] |
| | | item.childthree = [...item.childthree, ...arr2] |
| | | item.childfour = [...item.childfour, ...arr3] |
| | | item.childfive = [...item.childfive, ...arr4] |
| | | }) |
| | | return list |
| | | |
| | | }, |
| | | handleSummary({ columns, data }) { |
| | | const sums = {}; |
| | |
| | | }, |
| | | // 导出为excel |
| | | exportExcel() { |
| | | outExcel(this.pageNum, this.pageSize, this.carNo, this.beginTime, this.endTime).then((res) => { |
| | | outExcel(this.pageNum, this.pageSize, this.carNo, this.beginTime, this.endTime, this.line).then((res) => { |
| | | let blob = new Blob([res], { type: 'application/vnd.ms-excel' }); |
| | | let url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); //创建a标签 |
| | | link.href = url; |
| | | link.download = '配送信息.xlsx'; //重命名文件 |
| | | link.click(); |
| | | URL.revokeObjectURL(url); |
| | | }) |
| | | }, |
| | | exportAllExcel() { |
| | | outExcel().then(res => { |
| | | let blob = new Blob([res], { type: 'application/vnd.ms-excel' }); |
| | | let url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); //创建a标签 |
| | | link.href = url; |
| | | link.download = '全部配送信息.xlsx'; //重命名文件 |
| | | link.click(); |
| | | URL.revokeObjectURL(url); |
| | | }) |
| | |
| | | ); |
| | | }, |
| | | changePage(v) { |
| | | this.loading = true; |
| | | this.pageNum = v |
| | | this.getSign(); |
| | | this.getSignByMonthList() |
| | | this.clearSelectAll(); |
| | | }, |
| | | changePageSize(v) { |
| | | this.loading = true; |
| | | this.pageSize = v; |
| | | this.getSign(); |
| | | this.getSignByMonthList() |
| | | }, |
| | | getAllUser() { |
| | | getDriver({ type: 0 }).then((res) => { |
| | |
| | | m = m < 10 ? ('0' + m) : m |
| | | let d = date.getDate() |
| | | d = d < 10 ? ('0' + d) : d |
| | | const time = y + '-' + m + '-' + d; |
| | | return time |
| | | return y + '-' + m + '-' + d |
| | | }, |
| | | //根据选择的日期返回数据 |
| | | getDataByDate() { |
| | | this.loading = true; |
| | | if (this.value[0] != "" && this.value[1] != "") { |
| | | console.log(this.value) |
| | | this.beginTime = this.selectDate(this.value[0]); |
| | | this.endTime = this.selectDate(this.value[1]); |
| | | this.page = false; |
| | | } else { |
| | | // var date = new Date(); |
| | | // this.endTime = this.selectDate(date); |
| | | // this.value[1] = this.endTime; |
| | | // date.setDate(1); |
| | | // this.value[0] = date; |
| | | // this.beginTime = this.selectDate(date); |
| | | this.beginTime = ""; |
| | | this.endTime = "" |
| | | this.beginTime = this.firstDate; |
| | | this.endTime = this.lastDate; |
| | | this.value = [this.firstDate, this.lastDate] |
| | | } |
| | | this.getSign(); |
| | | }, |