Compare commits
1 Commits
prod-25-07
...
prod-24-11
Author | SHA1 | Date | |
---|---|---|---|
e6a8d33b5e |
1
.gitignore
vendored
@ -22,4 +22,3 @@ pnpm-debug.log*
|
|||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
/yarn.lock
|
|
||||||
|
12164
package-lock.json
generated
@ -9,14 +9,10 @@
|
|||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vant/area-data": "^2.0.0",
|
|
||||||
"amfe-flexible": "^2.2.1",
|
"amfe-flexible": "^2.2.1",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.8.3",
|
||||||
"dayjs": "^1.8.14",
|
|
||||||
"decimal.js": "^10.4.3",
|
|
||||||
"echarts": "^5.2.2",
|
"echarts": "^5.2.2",
|
||||||
"element-ui": "^2.15.9",
|
|
||||||
"less": "^4.1.3",
|
"less": "^4.1.3",
|
||||||
"less-loader": "^11.1.3",
|
"less-loader": "^11.1.3",
|
||||||
"qs": "^6.11.2",
|
"qs": "^6.11.2",
|
||||||
@ -25,7 +21,9 @@
|
|||||||
"vant": "^2.13.2",
|
"vant": "^2.13.2",
|
||||||
"vue": "^2.6.14",
|
"vue": "^2.6.14",
|
||||||
"vue-router": "^3.0.7",
|
"vue-router": "^3.0.7",
|
||||||
"vuex": "^3.6.2"
|
"vuex": "^3.6.2",
|
||||||
|
"element-ui": "^2.15.9",
|
||||||
|
"dayjs": "^1.8.14"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.12.16",
|
"@babel/core": "^7.12.16",
|
||||||
|
@ -26,17 +26,16 @@
|
|||||||
<van-number-keyboard safe-area-inset-bottom />
|
<van-number-keyboard safe-area-inset-bottom />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window._AMapSecurityConfig = {
|
window._AMapSecurityConfig = {
|
||||||
// serviceHost: 'https://api.sinoassist.com/_AMapService',
|
serviceHost: 'https://api.sinoassist.com/_AMapService',
|
||||||
securityJsCode:'91ab1ebc492d5479a68b11527bd73dc9',
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="https://webapi.amap.com/maps?v=2.0&key=2560bbf04daef66c810c5e6a97e8c508&plugin=AMap.AutoComplete,AMap.PlaceSearch,AMap.Geolocation,AMap.Geocoder,AMap.Marker,AMap.Driving"></script>
|
<script src="https://webapi.amap.com/maps?v=1.4.15&key=2560bbf04daef66c810c5e6a97e8c508&plugin=AMap.Polyline"></script>
|
||||||
<!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>-->
|
<!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>-->
|
||||||
<script>
|
<script>
|
||||||
// VConsole 默认会挂载到 `window.VConsole` 上
|
// VConsole 默认会挂载到 `window.VConsole` 上
|
||||||
// let vConsole = new window.VConsole();
|
// let vConsole = new window.VConsole();
|
||||||
(function (doc, win) {
|
(function (doc, win) {
|
||||||
// console.log("==window.location.pathname===",window.location.pathname)
|
console.log("==window.location.pathname===",window.location.pathname)
|
||||||
let docEl = doc.documentElement
|
let docEl = doc.documentElement
|
||||||
let resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
|
let resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
|
||||||
recalc = function () {
|
recalc = function () {
|
||||||
|
@ -1,78 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>免责声明</title>
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: Arial, sans-serif;
|
|
||||||
line-height: 1.6;
|
|
||||||
/*margin: 20px;*/
|
|
||||||
padding: 0;
|
|
||||||
/*background-color: #f9f9f9;*/
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
text-align: center;
|
|
||||||
/*font-size: 24px;*/
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
h4 {
|
|
||||||
/*font-size: 20px;*/
|
|
||||||
margin-top: 30px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
color: #555;
|
|
||||||
}
|
|
||||||
p {
|
|
||||||
margin: 10px 0;
|
|
||||||
text-indent: 2em;
|
|
||||||
}
|
|
||||||
ul {
|
|
||||||
margin: 10px 0;
|
|
||||||
padding-left: 40px;
|
|
||||||
}
|
|
||||||
li {
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
font-size: 14px;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="container">
|
|
||||||
<h3>声明</h3>
|
|
||||||
<p>本平台为二手拖车买卖双方提供免费信息发布服务。在您使用本平台之前,请仔细阅读并理解本免责声明。一旦使用本平台,即视为您已阅读、理解并同意接受本免责声明的所有条款。</p>
|
|
||||||
|
|
||||||
<h4>一、平台性质</h4>
|
|
||||||
<p>1. 本平台仅为信息发布平台,不参与任何二手拖车交易环节,包括但不限于交易洽谈、合同签订、款项支付、车辆交付等,实际交易价格由买卖双方自行协商确定。</p>
|
|
||||||
<p>2. 本平台不对发布信息的真实性、准确性、完整性、合法性进行任何形式的担保或保证,用户应自行判断信息的真实性并承担由此产生的风险。</p>
|
|
||||||
|
|
||||||
<h4>二、用户责任</h4>
|
|
||||||
<p>1. 用户应保证发布的信息真实、准确、完整、合法,并对其发布的信息承担全部责任。</p>
|
|
||||||
<p>2. 用户不得发布任何虚假、违法、侵权、违反公序良俗的信息,包括但不限于:</p>
|
|
||||||
<ul>
|
|
||||||
<li>虚假车源信息</li>
|
|
||||||
<li>事故车、水泡车、火烧车等存在重大安全隐患的车辆信息</li>
|
|
||||||
<li>盗抢车辆信息</li>
|
|
||||||
<li>侵犯他人知识产权或其他合法权益的信息</li>
|
|
||||||
<li>含有淫秽、色情、赌博、暴力、恐怖等内容的信息</li>
|
|
||||||
<li>其他违反法律法规或平台规则的信息</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h4>三、免责条款</h4>
|
|
||||||
<p>1. 因用户发布的信息引起的任何纠纷或损失,本平台不承担任何责任。</p>
|
|
||||||
<p>2. 因不可抗力、计算机病毒、黑客攻击、系统不稳定、用户所在位置、用户关机以及其他任何网络、技术、通信线路等原因造成的服务中断或不能满足用户要求的风险,本平台不承担任何责任。</p>
|
|
||||||
<p>3. 本平台不对用户之间的交易行为承担任何责任,用户应自行承担交易风险。</p>
|
|
||||||
|
|
||||||
<h4>四、其他</h4>
|
|
||||||
<p>1. 本平台有权根据法律法规的变化或平台运营的需要,随时修改本免责声明,并在平台上公布,修改后的内容自公布之日起生效。</p>
|
|
||||||
<p>2. 本免责声明的解释权归中道救援股份有限公司所有。</p>
|
|
||||||
|
|
||||||
<p>请您在使用本平台前务必仔细阅读并理解本免责声明。</p>
|
|
||||||
<p>如果您对本免责声明有任何疑问,请联系我们。</p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -27,14 +27,6 @@ export function getDriverStatisticsKpi(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function querySupplierDriverStatisticsScore(data){
|
|
||||||
return request({
|
|
||||||
url: '/supplier/supplierKPI/querySupplierDriverStatisticsScore',
|
|
||||||
method:'POST',
|
|
||||||
// contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 各种详情数据
|
// 各种详情数据
|
||||||
export function getKpiDetailsData(data){
|
export function getKpiDetailsData(data){
|
||||||
return request({
|
return request({
|
||||||
@ -44,24 +36,6 @@ export function getKpiDetailsData(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取近12个月的服务商数据
|
|
||||||
export function getRecentSupplierKpi(data){
|
|
||||||
return request({
|
|
||||||
url: '/supplier/supplierKPI/queryRecentSupplierStatisticsKpi',
|
|
||||||
method:'POST',
|
|
||||||
// contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 司机分数详情
|
|
||||||
export function driverScoreDetail(data){
|
|
||||||
return request({
|
|
||||||
url: '/supplier/supplierKPI/querySupplierDriverStatisticsScore',
|
|
||||||
method:'POST',
|
|
||||||
// contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 关键词搜索服务商名称
|
// 关键词搜索服务商名称
|
||||||
export function getSupplierId(key) {
|
export function getSupplierId(key) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -308,12 +308,3 @@ export function ocrHandler(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
///agg-api/tencent-ocr/unifiedOCRWithCompress
|
|
||||||
export function unifiedOCRWithCompress(data){
|
|
||||||
return request({
|
|
||||||
url:'/agg-api/tencent-ocr/unifiedOCRWithCompress',
|
|
||||||
method:'POST',
|
|
||||||
contentType:'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
@ -95,60 +95,3 @@ export function batteryDetailList (data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询未读告知函
|
|
||||||
export function selectUnReadNotifyBySupplier() {
|
|
||||||
return request({
|
|
||||||
url: '/supplierManage/correction/notify/selectUnReadNotifyBySupplier',
|
|
||||||
method:'POST',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 阅读告知函
|
|
||||||
export function correctionHandle(data) {
|
|
||||||
return request({
|
|
||||||
url: '/supplierManage/correction/record/correctionHandle',
|
|
||||||
method:'POST',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 获取报警列表
|
|
||||||
export function getAlarmList(data) {
|
|
||||||
return request({
|
|
||||||
url: '/supplierAppV2/dispatchApp/alarm/alarmList',
|
|
||||||
method:'POST',
|
|
||||||
contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取报警数目
|
|
||||||
export function getAlarmCount(data) {
|
|
||||||
return request({
|
|
||||||
url: '/supplierAppV2/dispatchApp/alarm/alarmCount',
|
|
||||||
method:'POST',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取报警详情
|
|
||||||
export function getAlarmByCode(data) {
|
|
||||||
return request({
|
|
||||||
url: '/supplierAppV2/dispatchApp/alarm/getAlarmByCode',
|
|
||||||
method:'POST',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 处理报警
|
|
||||||
export function dealWithAlarm(data) {
|
|
||||||
return request({
|
|
||||||
url: '/supplierAppV2/dispatchApp/alarm/handAlarm',
|
|
||||||
method:'POST',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
import request from '@/utils/http'
|
|
||||||
// 根据订单 获取报备类型
|
|
||||||
export function getReportListByOrder(key){
|
|
||||||
return request({
|
|
||||||
url: '/order/baseDriverReportConfigs/getByOrderId',
|
|
||||||
method:'GET',
|
|
||||||
params: key
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 添加报备
|
|
||||||
export function newOrderReporting(data){
|
|
||||||
return request({
|
|
||||||
url: '/supplierAppV2/dispatchApp/order/newOrderReporting',
|
|
||||||
method:'POST',
|
|
||||||
contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取报备列表
|
|
||||||
export function reportHistory(data){
|
|
||||||
return request({
|
|
||||||
url: '/supplierAppV2/dispatchApp/order/reportHistory',
|
|
||||||
method:'POST',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取订单信息
|
|
||||||
export function getOrderInfo(data){
|
|
||||||
return request({
|
|
||||||
url: '/supplierAppV2/dispatchApp/order/reportOrderDetail',
|
|
||||||
method:'POST',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,96 +0,0 @@
|
|||||||
import request from '@/utils/http'
|
|
||||||
// 车源/求购列表
|
|
||||||
export function appPageList(data){
|
|
||||||
return request({
|
|
||||||
url: '/toc-user/car-app/appPageList',
|
|
||||||
method:'POST',
|
|
||||||
contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 我的发布列表
|
|
||||||
export function minePublishPageList(data){
|
|
||||||
return request({
|
|
||||||
url: '/toc-user/car-app/minePublishPageList',
|
|
||||||
method:'POST',
|
|
||||||
contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 审核不通过数量
|
|
||||||
export function auditFailCount (data){
|
|
||||||
return request({
|
|
||||||
url: '/toc-user/car-app/auditFailCount ',
|
|
||||||
method:'POST',
|
|
||||||
// contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 信息详情查询
|
|
||||||
export function carInfoDetail(data){
|
|
||||||
return request({
|
|
||||||
url: '/toc-user/car-app/carInfoDetail',
|
|
||||||
method:'POST',
|
|
||||||
contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 发布编辑信息
|
|
||||||
export function publishCarInfo(data){
|
|
||||||
return request({
|
|
||||||
url: '/toc-user/car-app/publishCarInfo',
|
|
||||||
method:'POST',
|
|
||||||
contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 用户信息反馈
|
|
||||||
export function userFeedback(data){
|
|
||||||
return request({
|
|
||||||
url: '/toc-user/car-app/userFeedback',
|
|
||||||
method:'POST',
|
|
||||||
contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//二手拖车信息擦亮
|
|
||||||
export function usedCarPolish(data){
|
|
||||||
return request({
|
|
||||||
url: `/toc-user/car-app/usedCarPolish/${data}`,
|
|
||||||
method:'POST',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//二手拖车信息下架
|
|
||||||
export function usedCarRemove(data){
|
|
||||||
return request({
|
|
||||||
url: '/toc-user/car-app/usedCarRemove',
|
|
||||||
method:'POST',
|
|
||||||
contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//二手拖车信息重新上架
|
|
||||||
export function usedCarReShelf(data){
|
|
||||||
return request({
|
|
||||||
url: `/toc-user/car-app/usedCarReShelf/${data}`,
|
|
||||||
method:'POST',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//审批信息
|
|
||||||
export function auditCarInfo(data){
|
|
||||||
return request({
|
|
||||||
url: '/toc-user/car-admin/auditCarInfo',
|
|
||||||
method:'POST',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 保存信息记录
|
|
||||||
export function saveRecord(data){
|
|
||||||
return request({
|
|
||||||
url: '/toc-user/car-record/saveRecord',
|
|
||||||
method:'POST',
|
|
||||||
contentType: 'application/json',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
Before Width: | Height: | Size: 785 B |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 770 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 589 B |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 1022 B |
Before Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 290 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 375 B |
Before Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 933 B |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 579 B |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 199 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 822 B |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 812 B |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 6.2 KiB |
@ -3,8 +3,6 @@ import VueRouter from "vue-router";
|
|||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
import kpiRouter from './kpi-router'
|
import kpiRouter from './kpi-router'
|
||||||
import invoiceRouter from "@/router/invoice-router";
|
import invoiceRouter from "@/router/invoice-router";
|
||||||
import secondHandRouter from "@/router/second-hand-router";
|
|
||||||
import reportRouter from "@/router/report-router"
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
@ -187,14 +185,6 @@ const routes = [
|
|||||||
title:'文档资料'
|
title:'文档资料'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/notificationList',
|
|
||||||
name: 'notificationList',
|
|
||||||
component:()=>import('@/views/index/notificationList'),
|
|
||||||
meta: {
|
|
||||||
title:'告知函'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/caseList',
|
path: '/caseList',
|
||||||
name: 'caseList',
|
name: 'caseList',
|
||||||
@ -251,22 +241,6 @@ const routes = [
|
|||||||
title:'车辆维保'
|
title:'车辆维保'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/vehicleAlarmList',
|
|
||||||
name: 'vehicleAlarmList',
|
|
||||||
component:()=>import('@/views/vehicle-maintenance/vehicle-alarm-list.vue'),
|
|
||||||
meta: {
|
|
||||||
title:'车辆报警'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/vehicleAlarmDetail',
|
|
||||||
name: 'vehicleAlarmDetail',
|
|
||||||
component:()=>import('@/views/vehicle-maintenance/vehicle-alarm-detail.vue'),
|
|
||||||
meta: {
|
|
||||||
title:'报警详情'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/maintenanceApplication',
|
path: '/maintenanceApplication',
|
||||||
name: 'maintenanceApplication',
|
name: 'maintenanceApplication',
|
||||||
@ -293,8 +267,6 @@ const routes = [
|
|||||||
},
|
},
|
||||||
...kpiRouter,
|
...kpiRouter,
|
||||||
...invoiceRouter,
|
...invoiceRouter,
|
||||||
...secondHandRouter,
|
|
||||||
...reportRouter
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = new VueRouter({
|
const router = new VueRouter({
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
const reportRouter = [
|
|
||||||
{
|
|
||||||
path: '/reportIndex',
|
|
||||||
name: 'reportIndex',
|
|
||||||
component: () => import('@/views/report/reportIndex'),
|
|
||||||
meta:{
|
|
||||||
title: '道路救援',
|
|
||||||
cache: true,
|
|
||||||
modalState: false,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/addressMap',
|
|
||||||
name: 'addressMap',
|
|
||||||
component: () => import('@/views/report/addressMap'),
|
|
||||||
meta:{
|
|
||||||
title: '道路救援',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]
|
|
||||||
export default reportRouter
|
|
@ -1,59 +0,0 @@
|
|||||||
const secondHandCar = [
|
|
||||||
{
|
|
||||||
path: '/indexList',
|
|
||||||
name: 'indexList',
|
|
||||||
component: () => import('@/views/secondHandCar/indexList.vue'),
|
|
||||||
meta:{
|
|
||||||
title: '首页列表',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/carSource',
|
|
||||||
name: 'carSource',
|
|
||||||
component: () => import('@/views/secondHandCar/carSource.vue'),
|
|
||||||
meta:{
|
|
||||||
title: '车源发布',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/wantBuy',
|
|
||||||
name: 'wantBuy',
|
|
||||||
component: () => import('@/views/secondHandCar/wantBuy.vue'),
|
|
||||||
meta:{
|
|
||||||
title: '求购发布',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/forSale',
|
|
||||||
name: 'forSale',
|
|
||||||
component: () => import('@/views/secondHandCar/forSale.vue'),
|
|
||||||
meta:{
|
|
||||||
title: '查看车源',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/wantBuySale',
|
|
||||||
name: 'wantBuySale',
|
|
||||||
component: () => import('@/views/secondHandCar/wantBuySale.vue'),
|
|
||||||
meta:{
|
|
||||||
title: '查看求购',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/mineRelease',
|
|
||||||
name: 'mineRelease',
|
|
||||||
component: () => import('@/views/secondHandCar/mineRelease.vue'),
|
|
||||||
meta:{
|
|
||||||
title: '我的发布',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/privacyComponent',
|
|
||||||
name: 'privacyComponent',
|
|
||||||
component: () => import('@/views/secondHandCar/privacy.vue'),
|
|
||||||
meta:{
|
|
||||||
title: '免责声明',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]
|
|
||||||
export default secondHandCar
|
|
@ -45,6 +45,7 @@ select{
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
//@include fontWeightSize(400,14px);
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import qs from 'qs'
|
import qs from 'qs'
|
||||||
import { Toast } from 'vant'
|
import { Toast } from 'vant'
|
||||||
|
// console.log('process.env.VUE_APP_BASE_API', process.env.VUE_APP_BASE_API)
|
||||||
|
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: process.env.VUE_APP_BASE_API,
|
baseURL: process.env.VUE_APP_BASE_API,
|
||||||
@ -11,31 +12,34 @@ const service = axios.create({
|
|||||||
})
|
})
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
let token = urlParams.get('token') ;
|
let token = urlParams.get('token') ;
|
||||||
if( token ) {
|
|
||||||
localStorage.setItem('token', token);
|
localStorage.setItem('token', token);
|
||||||
} else {
|
|
||||||
localStorage.setItem('token', '');
|
|
||||||
}
|
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
let reqUrl=config.url
|
// let reqUrl=config.url
|
||||||
|
// console.log("reqUrl",reqUrl)
|
||||||
config.data = config.contentType ? config.data : qs.stringify(config.data)
|
config.data = config.contentType ? config.data : qs.stringify(config.data)
|
||||||
if (config.testFlag) {
|
if (config.testFlag) {
|
||||||
config.data = qs.stringify(config.data, {arrayFormat: 'indices', allowDots: true})
|
config.data = qs.stringify(config.data, {arrayFormat: 'indices', allowDots: true})
|
||||||
}
|
}
|
||||||
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
|
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
|
||||||
let token = localStorage.getItem('token');
|
let token = localStorage.getItem('token');
|
||||||
// let token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBTkNIQU5HIiwidXNlcklkIjo0NTY3MSwibmFtZSI6IuWuieeVhSIsInVzZXJOYW1lIjoiQU5DSEFORyIsInN1cHBsaWVySWQiOjExMjgsImlzWmQiOjAsImV4cCI6MTc1NTQyMjUyNX0.xzDZhaANJFnbeViIHJA0SEtOyTv7Ja3rKmXqRKRuFkc'
|
// let token='4099761587129c46b03c9316c9e866c9'
|
||||||
// let token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJTSEhQWEIiLCJ1c2VySWQiOjU0NzI2LCJuYW1lIjoiI-a1i-ivleWwj-eZveeZvSIsInVzZXJOYW1lIjoiU0hIUFhCIiwic3VwcGxpZXJJZCI6MTAwMDE2NSwiZXhwIjoxNzQ0NTEwNzkwfQ.JPk0OA7slYJN3FIi_uhW4Y0CiWRvl6R1dK8MRTbyhD8'
|
// let token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MTI0NTQ5NTMsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiJDLeS4iua1t-a1i-ivleacjeWKoeWVhiIsInN1cHBsaWVySWQiOjMzMDQxLCJzdXBwbGllclR5cGUiOjIsInVzZXJuYW1lIjoic29uZyIsInVzZXJUeXBlIjoicmVzY3VlQXBwIiwiZGV2aWNlSWQiOiIyMmI0OWNhMjBmOWI4MzMwZDk4NzIxNzNmMzllYTY4YmMiLCJhdXRob3JpdGllcyI6W119LCJzY29wZSI6WyJhbGwiXSwiaXNzIjoiaHR0cHM6Ly9zaW5vYXNzaXN0LmNvbSIsImV4cCI6MTcxMjU0MTM1MywiaWF0IjoxNzEyNDU0OTUzfQ.sPU9_OD_TOWcTwqmlawEGyo4mCPrEaRYw2R02gnvYJw'
|
||||||
if(!(reqUrl=='/supplier/supplierTraining/trainingTask' || reqUrl=='/supplier/supplierTraining/normalList' || reqUrl=='/supplier/supplierTraining/trainingList')){
|
|
||||||
if(token) {
|
|
||||||
config.headers['Authorization'] = `${token}`;
|
|
||||||
config.headers['token'] = `${token}`;
|
config.headers['token'] = `${token}`;
|
||||||
}
|
config.headers['Authorization'] = `${token}`;
|
||||||
}
|
/*if (reqUrl.includes("/driverApp")) {
|
||||||
|
// console.log("司机app")
|
||||||
|
config.headers['token'] = `${token}`;
|
||||||
|
} else if(reqUrl.includes("/supplierApp") || reqUrl.includes("/supplierKPI") || reqUrl.includes('/supplier/select') || reqUrl.includes('/order') || reqUrl.includes('/order/taskInvoiceBatch') || reqUrl.includes('/supplier') ){
|
||||||
|
// console.log("调度app,服务商kpi")
|
||||||
|
config.headers['Authorization'] = `${token}`;
|
||||||
|
}else{
|
||||||
|
config.headers['token'] = `${token}`;
|
||||||
|
}*/
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
console.log(error)
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -43,17 +47,27 @@ service.interceptors.request.use(
|
|||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
response => {
|
response => {
|
||||||
const res = response.data
|
const res = response.data
|
||||||
|
// return res //请求响应数据
|
||||||
|
// if(res.code === 401){
|
||||||
|
// Toast('token不合法或过期')
|
||||||
|
// }else if(){
|
||||||
|
//
|
||||||
|
// }
|
||||||
if ( res.code === 401 || res.code === 400 || res.code == 500) {
|
if ( res.code === 401 || res.code === 400 || res.code == 500) {
|
||||||
Toast(res.msg || 'Error')
|
Toast(res.msg || 'Error')
|
||||||
return Promise.reject(res.msg)
|
return Promise.reject(res.msg)
|
||||||
} else {
|
} else {
|
||||||
return res
|
return res
|
||||||
|
// if( res.code === 200 ) {
|
||||||
|
// return res.data
|
||||||
|
// } else {
|
||||||
|
// return res.data
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
if(error.message != 'Network Error'){
|
console.log('err' + error)
|
||||||
Toast(error.message)
|
Toast(error.message)
|
||||||
}
|
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -36,7 +36,6 @@ export function getAddress(mapContext, lnglat) {
|
|||||||
} else {
|
} else {
|
||||||
console.log(result)
|
console.log(result)
|
||||||
alert(JSON.stringify(result))
|
alert(JSON.stringify(result))
|
||||||
reject(result)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -45,7 +44,7 @@ export function getAddress(mapContext, lnglat) {
|
|||||||
|
|
||||||
// 输入提示
|
// 输入提示
|
||||||
export function searchFun(mapContext, cityCode, keyword) {
|
export function searchFun(mapContext, cityCode, keyword) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve, reject) => {
|
||||||
mapContext.plugin('AMap.AutoComplete', function(){
|
mapContext.plugin('AMap.AutoComplete', function(){
|
||||||
var autoOptions = {
|
var autoOptions = {
|
||||||
city: cityCode || '全国',
|
city: cityCode || '全国',
|
||||||
@ -58,7 +57,7 @@ export function searchFun(mapContext, cityCode, keyword) {
|
|||||||
if(result.info == 'OK') {
|
if(result.info == 'OK') {
|
||||||
resolve(result.tips)
|
resolve(result.tips)
|
||||||
} else {
|
} else {
|
||||||
resolve([])
|
reject(result)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -91,7 +90,6 @@ export function getRoad( mapContext, startLng, startLat, endLng, endLat ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
function drawRoute(route, map) {
|
function drawRoute(route, map) {
|
||||||
let path = parseRouteToPath(route)
|
let path = parseRouteToPath(route)
|
||||||
|
|
||||||
@ -108,4 +106,3 @@ function drawRoute(route, map) {
|
|||||||
|
|
||||||
map.add(routeLine);
|
map.add(routeLine);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
|
|
||||||
export const myMixins = {
|
export const myMixins = {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
touchStart: [],
|
||||||
|
touchEnd: [],
|
||||||
|
slideShow: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -70,38 +72,12 @@ export const myMixins = {
|
|||||||
methods();
|
methods();
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
console.log("shengxiaoxi")
|
||||||
that.noClick = true;
|
that.noClick = true;
|
||||||
}, 3000)
|
}, 3000)
|
||||||
} else {
|
} else {
|
||||||
// 这里是重复点击的判断
|
// 这里是重复点击的判断
|
||||||
}
|
}
|
||||||
},
|
|
||||||
formatNumber(num) {
|
|
||||||
if (num < 10000) {
|
|
||||||
// 小于 5 位数,显示为 0.x 万
|
|
||||||
return `${(num / 10000).toFixed(1)}`;
|
|
||||||
} else {
|
|
||||||
// 大于或等于 5 位数,显示为 x 万,四舍五入到小数点后一位
|
|
||||||
return `${Math.round(num / 1000) / 10}`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isWebFunc(){
|
|
||||||
let res=false
|
|
||||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
||||||
if (!isMobile) {// 是移动端不变
|
|
||||||
res=true
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
},
|
|
||||||
closeParentDialog() {
|
|
||||||
if (window.parent) {
|
|
||||||
const hasListener = window.parent.dispatchEvent(new Event('checkCloseDialog'));
|
|
||||||
if (hasListener) {
|
|
||||||
window.parent.postMessage('closeDialog', '*');
|
|
||||||
} else {
|
|
||||||
window.history.back();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,6 @@ export default {
|
|||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
this.driverId = urlParams.get('driverId');
|
this.driverId = urlParams.get('driverId');
|
||||||
this.time=timeFormat(Date.now())
|
this.time=timeFormat(Date.now())
|
||||||
this.keyword=urlParams.get('keyWord') || ''
|
|
||||||
this.getTrainingList();
|
this.getTrainingList();
|
||||||
document.addEventListener('visibilitychange', async ( ) => {
|
document.addEventListener('visibilitychange', async ( ) => {
|
||||||
let state = document.visibilityState
|
let state = document.visibilityState
|
||||||
|
@ -103,9 +103,6 @@ export default {
|
|||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
this.supplierId = urlParams.get('supplierId');
|
this.supplierId = urlParams.get('supplierId');
|
||||||
this.driverId = urlParams.get('driverId');
|
this.driverId = urlParams.get('driverId');
|
||||||
if(this.driverId){
|
|
||||||
this.keyword=urlParams.get('keyWord') || ''
|
|
||||||
}
|
|
||||||
this.getNormalList()
|
this.getNormalList()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
@ -86,7 +86,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Decimal } from 'decimal.js';
|
|
||||||
import {myMixins} from "@/utils/myMixins"
|
import {myMixins} from "@/utils/myMixins"
|
||||||
import {notifyInvoiceList} from "@/api/mine"
|
import {notifyInvoiceList} from "@/api/mine"
|
||||||
export default {
|
export default {
|
||||||
@ -111,23 +110,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
/* totalCount () {
|
totalCount () {
|
||||||
let total = 0;
|
let total = 0;
|
||||||
this.checkList.map(item => {
|
this.checkList.map(item => {
|
||||||
total += item.invoiceMoney
|
total += item.invoiceMoney
|
||||||
})
|
})
|
||||||
return total
|
return total
|
||||||
},*/
|
|
||||||
totalCount() {
|
|
||||||
// 使用 Decimal 来计算总金额
|
|
||||||
let total = new Decimal(0);
|
|
||||||
|
|
||||||
this.checkList.forEach(item => {
|
|
||||||
total = total.plus(new Decimal(item.invoiceMoney));
|
|
||||||
});
|
|
||||||
|
|
||||||
// 返回总金额,保留两位小数
|
|
||||||
return total.toNumber()
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -175,8 +163,8 @@ export default {
|
|||||||
},
|
},
|
||||||
getMonth(item) {
|
getMonth(item) {
|
||||||
let str = '';
|
let str = '';
|
||||||
let startTime = new Date(item.createTime);
|
let startTime = new Date(item.createTime.replace(/-/g, '/'));
|
||||||
let endTime = new Date(item.overTime);
|
let endTime = new Date(item.overTime.replace(/-/g, '/'));
|
||||||
str = startTime.getFullYear() + '年' + (startTime.getMonth() + 1 ) + '月 - ' + endTime.getFullYear() + '年' + (endTime.getMonth() + 1) + '月'
|
str = startTime.getFullYear() + '年' + (startTime.getMonth() + 1 ) + '月 - ' + endTime.getFullYear() + '年' + (endTime.getMonth() + 1) + '月'
|
||||||
return str
|
return str
|
||||||
},
|
},
|
||||||
|
@ -1,161 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div class="dialog-wrapper">
|
|
||||||
<div class="title">
|
|
||||||
{{ '告知函('+(currentIndex + 1)+'/'+ list.length+')' }}
|
|
||||||
</div>
|
|
||||||
<h3 class="top">{{currentItem?.title?currentItem?.title:(currentItem?.type==1 ? '质量不合格整改' : '质量不合格调整告知')}}</h3>
|
|
||||||
<div class="center">
|
|
||||||
<div v-html="formattedContent(currentItem)"></div>
|
|
||||||
</div>
|
|
||||||
<div class="end">
|
|
||||||
<div>中道汽车救援股份有限公司</div>
|
|
||||||
<div>区域管理部</div>
|
|
||||||
<div>{{formatDate(currentItem)}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="iptWrap">
|
|
||||||
<div class="tip">请仔细阅读告知函内容,并在下方输入"我已阅读”以表明您已充分理解函件中的各项信息。</div>
|
|
||||||
<el-input style="width: 50%" v-model.trim="content" placeholder="请输入我已阅读"></el-input>
|
|
||||||
</div>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button type="info" size="small" v-if="num > 0">还需阅读{{num}}秒</el-button>
|
|
||||||
<el-button type="primary" size="small" v-if="num==0" @click="confirmHandle(currentItem)">确认</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {myMixins} from "@/utils/myMixins"
|
|
||||||
import {selectUnReadNotifyBySupplier, correctionHandle} from "@/api/order"
|
|
||||||
export default {
|
|
||||||
name: "notificationList",
|
|
||||||
mixins: [myMixins],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
list: [],
|
|
||||||
currentIndex: 0,
|
|
||||||
num:10,
|
|
||||||
timer: null,
|
|
||||||
content: '',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
currentItem() {
|
|
||||||
return this.list[this.currentIndex];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
currentIndex() {
|
|
||||||
this.content = '';
|
|
||||||
this.num = 10;
|
|
||||||
this.startCountdown();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
async mounted() {
|
|
||||||
await this.getLetterList();
|
|
||||||
this.timer && clearInterval(this.timer)
|
|
||||||
this.startCountdown();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async confirmHandle(item){
|
|
||||||
if (this.content === '我已阅读') {
|
|
||||||
console.log('item', item)
|
|
||||||
let res = await correctionHandle({
|
|
||||||
handleType:4,
|
|
||||||
operationType:'modify',
|
|
||||||
recordId:item.recordId,
|
|
||||||
planId:item.planId,
|
|
||||||
notifyId:item.id,
|
|
||||||
});
|
|
||||||
console.log('阅读res', res)
|
|
||||||
// 确认成功后处理下一个告知函
|
|
||||||
this.currentIndex++;
|
|
||||||
if (this.currentIndex < this.list.length) {
|
|
||||||
this.content = '';
|
|
||||||
this.num = 10;
|
|
||||||
this.startCountdown();
|
|
||||||
} else {
|
|
||||||
this.closeHandle();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$message.error('请输入"我已阅读"以确认');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async getLetterList(){
|
|
||||||
let res = await selectUnReadNotifyBySupplier();
|
|
||||||
let result = res?.data || []
|
|
||||||
if(result && result.length>0){
|
|
||||||
this.list = result
|
|
||||||
}
|
|
||||||
},
|
|
||||||
formatDate(val){
|
|
||||||
/** 日期格式化
|
|
||||||
* */
|
|
||||||
if(!val?.updateTime){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const date = new Date(val.updateTime);
|
|
||||||
const year = date.getFullYear();
|
|
||||||
const month = date.getMonth() + 1; // 月份从 0 开始,需要加 1
|
|
||||||
const day = date.getDate();
|
|
||||||
const formattedDate = `${year}年${month}月${day}日`;
|
|
||||||
return formattedDate
|
|
||||||
},
|
|
||||||
formattedContent(val) {
|
|
||||||
/** 转换文本,能被 v-html 识别
|
|
||||||
* */
|
|
||||||
return val?.content?.replace(/\r\n/g, '<br>').replace(/\n/g, '<br>');
|
|
||||||
},
|
|
||||||
startCountdown() {
|
|
||||||
this.stopCountdown()
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (this.num > 0) {
|
|
||||||
this.num--;
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
},
|
|
||||||
closeHandle() {
|
|
||||||
this.stopCountdown();
|
|
||||||
// 调用 app 的方法
|
|
||||||
this.goBack();
|
|
||||||
},
|
|
||||||
stopCountdown() {
|
|
||||||
if (this.timer) {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.timer = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.dialog-wrapper {
|
|
||||||
padding: 10px 20px;
|
|
||||||
}
|
|
||||||
.title {
|
|
||||||
|
|
||||||
}
|
|
||||||
.top {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.center {
|
|
||||||
margin: 20px 0;
|
|
||||||
line-height: 24px;
|
|
||||||
.hight{
|
|
||||||
color: #0B99E4;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.end{
|
|
||||||
text-align: right;
|
|
||||||
line-height: 24px;
|
|
||||||
}
|
|
||||||
.tip{
|
|
||||||
margin-top: 40px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.dialog-footer {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -6,15 +6,15 @@
|
|||||||
<div class="metersWrap">
|
<div class="metersWrap">
|
||||||
<div class="item" v-show="supplierSettlementType != 1">
|
<div class="item" v-show="supplierSettlementType != 1">
|
||||||
<div class="leftKiloMeters">AB段公里数</div>
|
<div class="leftKiloMeters">AB段公里数</div>
|
||||||
<div class="rightInput"><input type="number" :disabled="!taskCostShow" v-model="form.reportMileageAb"/>公里</div>
|
<div class="rightInput"><input type="number" v-model="form.reportMileageAb"/>公里</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" v-show="supplierSettlementType == 1 || supplierSettlementType == 2 || supplierSettlementType == 3 || supplierSettlementType == 4">
|
<div class="item" v-show="supplierSettlementType == 1 || supplierSettlementType == 2 || supplierSettlementType == 3 || supplierSettlementType == 4">
|
||||||
<div class="leftKiloMeters">BC段公里数</div>
|
<div class="leftKiloMeters">BC段公里数</div>
|
||||||
<div class="rightInput"><input type="number" :disabled="!taskCostShow" v-model="form.reportMileageBc"/>公里</div>
|
<div class="rightInput"><input type="number" v-model="form.reportMileageBc"/>公里</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" v-show=" supplierSettlementType == 3 || supplierSettlementType == 4">
|
<div class="item" v-show=" supplierSettlementType == 3 || supplierSettlementType == 4">
|
||||||
<div class="leftKiloMeters">CA段公里数</div>
|
<div class="leftKiloMeters">CA段公里数</div>
|
||||||
<div class="rightInput"><input type="number" :disabled="!taskCostShow" v-model="form.reportMileageCa"/>公里</div>
|
<div class="rightInput"><input type="number" v-model="form.reportMileageCa"/>公里</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -24,15 +24,15 @@
|
|||||||
<div class="metersWrap">
|
<div class="metersWrap">
|
||||||
<div class="item" v-show="supplierSettlementType != 1">
|
<div class="item" v-show="supplierSettlementType != 1">
|
||||||
<div class="leftKiloMeters">AB段路桥费</div>
|
<div class="leftKiloMeters">AB段路桥费</div>
|
||||||
<div class="rightInput"><input type="number" :disabled="!taskCostShow" v-model="form.bridgeAmountAb"/>元</div>
|
<div class="rightInput"><input type="number" v-model="form.bridgeAmountAb"/>元</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" v-show="supplierSettlementType == 1 || supplierSettlementType == 2 || supplierSettlementType == 3 || supplierSettlementType == 4">
|
<div class="item" v-show="supplierSettlementType == 1 || supplierSettlementType == 2 || supplierSettlementType == 3 || supplierSettlementType == 4">
|
||||||
<div class="leftKiloMeters">BC段路桥费</div>
|
<div class="leftKiloMeters">BC段路桥费</div>
|
||||||
<div class="rightInput"><input type="number" :disabled="!taskCostShow" v-model="form.bridgeAmountBc"/>元</div>
|
<div class="rightInput"><input type="number" v-model="form.bridgeAmountBc"/>元</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" v-show=" supplierSettlementType == 3 || supplierSettlementType == 4">
|
<div class="item" v-show=" supplierSettlementType == 3 || supplierSettlementType == 4">
|
||||||
<div class="leftKiloMeters">CA段路桥费</div>
|
<div class="leftKiloMeters">CA段路桥费</div>
|
||||||
<div class="rightInput"><input type="number" :disabled="!taskCostShow" v-model="form.bridgeAmountCa"/>元</div>
|
<div class="rightInput"><input type="number" v-model="form.bridgeAmountCa"/>元</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div >
|
</div >
|
||||||
@ -42,23 +42,23 @@
|
|||||||
<div class="metersWrap">
|
<div class="metersWrap">
|
||||||
<div class="item" >
|
<div class="item" >
|
||||||
<div class="leftKiloMeters">小轮个数</div>
|
<div class="leftKiloMeters">小轮个数</div>
|
||||||
<div class="rightInput"><input type="number" :disabled="!taskCostShow" v-model="form.tyreNumber" @input="handleInput"/>个</div>
|
<div class="rightInput"><input type="number" v-model="form.tyreNumber" @input="handleInput"/>个</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="leftKiloMeters">等候费</div>
|
<div class="leftKiloMeters">等候费</div>
|
||||||
<div class="rightInput"><input type="number" :disabled="!taskCostShow" v-model="form.waitAmount"/>元</div>
|
<div class="rightInput"><input type="number" v-model="form.waitAmount"/>元</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" >
|
<div class="item" >
|
||||||
<div class="leftKiloMeters">困境费</div>
|
<div class="leftKiloMeters">困境费</div>
|
||||||
<div class="rightInput"><input type="number" :disabled="!taskCostShow" v-model="form.dilemmaFee"/>元</div>
|
<div class="rightInput"><input type="number" v-model="form.dilemmaFee"/>元</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item blueColor" >
|
<div class="item blueColor" >
|
||||||
<div class="leftKiloMeters">收取客户金额</div>
|
<div class="leftKiloMeters">收取客户金额</div>
|
||||||
<div class="rightInput blueColor"><input class="blueColor" type="number" :disabled="!taskCostShow" v-model="form.customerAmount"/>元</div>
|
<div class="rightInput blueColor"><input class="blueColor" type="number" v-model="form.customerAmount"/>元</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn" v-if="taskCostShow || finishLt7">
|
<div class="btn">
|
||||||
<button @click="submit">提交</button>
|
<button @click="submit">提交</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -86,9 +86,7 @@ export default {
|
|||||||
waitAmount:'',
|
waitAmount:'',
|
||||||
dilemmaFee:'',
|
dilemmaFee:'',
|
||||||
customerAmount:'',
|
customerAmount:'',
|
||||||
taskFlowId:'',
|
taskFlowId:''
|
||||||
auditStatus:'',
|
|
||||||
finishTime:'',
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -99,14 +97,6 @@ export default {
|
|||||||
this.orderCode = urlParams.get('orderCode')
|
this.orderCode = urlParams.get('orderCode')
|
||||||
await this.getDetail()
|
await this.getDetail()
|
||||||
},
|
},
|
||||||
computed:{
|
|
||||||
taskCostShow() {
|
|
||||||
return this.form.auditStatus?.code && !([3, 4, 6].includes(this.form.auditStatus.code))
|
|
||||||
},
|
|
||||||
finishLt7(){
|
|
||||||
return !this.form.finishTime || (this.form.finishTime && new Date().getTime() - new Date(this.form.finishTime).getTime() <= 7 * 24 * 60 * 60 * 1000)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods:{
|
methods:{
|
||||||
handleInput(event) {
|
handleInput(event) {
|
||||||
const newValue = parseInt(event.target.value, 10);
|
const newValue = parseInt(event.target.value, 10);
|
||||||
@ -128,6 +118,7 @@ export default {
|
|||||||
})
|
})
|
||||||
leftCopy(this.form,{...res.data});
|
leftCopy(this.form,{...res.data});
|
||||||
this.supplierSettlementType= res.data.supplierSettlementType?.code
|
this.supplierSettlementType= res.data.supplierSettlementType?.code
|
||||||
|
// this.form.taskFlowId =1
|
||||||
},
|
},
|
||||||
async updatSettlement(){
|
async updatSettlement(){
|
||||||
let result =await updateOrderSettlement({
|
let result =await updateOrderSettlement({
|
||||||
|
@ -73,7 +73,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Decimal } from 'decimal.js';
|
|
||||||
import { Dialog } from "vant";
|
import { Dialog } from "vant";
|
||||||
import { myMixins } from "@/utils/myMixins"
|
import { myMixins } from "@/utils/myMixins"
|
||||||
import { uploadInvoice, getBillingInfo, deleteInvoice, createBatch } from "@/api/mine"
|
import { uploadInvoice, getBillingInfo, deleteInvoice, createBatch } from "@/api/mine"
|
||||||
@ -121,7 +120,7 @@
|
|||||||
invoiceTotal () {
|
invoiceTotal () {
|
||||||
let total = 0;
|
let total = 0;
|
||||||
this.list?.map(item => {
|
this.list?.map(item => {
|
||||||
total = new Decimal(total).plus(new Decimal(item.invoiceMoney)).toNumber()
|
total += item.invoiceMoney
|
||||||
})
|
})
|
||||||
return total
|
return total
|
||||||
}
|
}
|
||||||
@ -279,15 +278,6 @@
|
|||||||
if(ocrName != billName && diffNumber > 2 && !res.data.ocrInvoiceRes.data.sellerName.startsWith("国家税务总局")){
|
if(ocrName != billName && diffNumber > 2 && !res.data.ocrInvoiceRes.data.sellerName.startsWith("国家税务总局")){
|
||||||
errorStr = errorStr + "上传发票抬头与服务商配置不一致,设置抬头为:" + (this.billInfo.unitName || '未设置') + ",识别抬头为:" + res.data.ocrInvoiceRes.data.sellerName + ";如发票确认无误,请联系结算部:021-53682525";
|
errorStr = errorStr + "上传发票抬头与服务商配置不一致,设置抬头为:" + (this.billInfo.unitName || '未设置') + ",识别抬头为:" + res.data.ocrInvoiceRes.data.sellerName + ";如发票确认无误,请联系结算部:021-53682525";
|
||||||
}
|
}
|
||||||
let conList = res.data.ocrInvoiceRes.data.invoiceDetails.filter(a => a.itemName.includes("*"))
|
|
||||||
if(!res.data.ocrInvoiceRes.data.sellerName.startsWith("国家税务总局") &&
|
|
||||||
conList.every(a => {
|
|
||||||
let items = a.itemName.split("*")
|
|
||||||
return (!items[1].includes("现代服务") && !items[1].includes("运输服务")) || (!items[2].includes("拖车") && !items[2].includes("救援") && !items[2].includes("施救") && !items[2].includes("清障") && !items[2].includes("道路救援"))
|
|
||||||
})
|
|
||||||
){
|
|
||||||
errorStr = errorStr + "分类必须包含:现代服务/运输服务,服务名称必须包含:拖车/救援/施救/清障/道路救援 ;例如《*现代服务*拖车费》";
|
|
||||||
}
|
|
||||||
|
|
||||||
if( !flag ) {
|
if( !flag ) {
|
||||||
Dialog.alert({
|
Dialog.alert({
|
||||||
|
@ -40,20 +40,6 @@
|
|||||||
accept="image "
|
accept="image "
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="itemContent">
|
|
||||||
<div class="titleType">
|
|
||||||
<img class="startImg" src="@/assets/start.png" />
|
|
||||||
<span>行驶证车辆照片页</span>
|
|
||||||
</div>
|
|
||||||
<van-uploader
|
|
||||||
v-model="vehicleLicenseCarPhotoList"
|
|
||||||
:after-read="vehicleLicenseCarHandler"
|
|
||||||
:max-size="5 * 1024 * 1024"
|
|
||||||
max-count="1"
|
|
||||||
:preview-size="54"
|
|
||||||
accept="image "
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="itemContent">
|
<div class="itemContent">
|
||||||
<div class="titleType">
|
<div class="titleType">
|
||||||
<img class="startImg" src="@/assets/start.png" />
|
<img class="startImg" src="@/assets/start.png" />
|
||||||
@ -74,64 +60,9 @@
|
|||||||
<img class="startImg" src="@/assets/start.png" />
|
<img class="startImg" src="@/assets/start.png" />
|
||||||
<span>车辆类型</span>
|
<span>车辆类型</span>
|
||||||
</div>
|
</div>
|
||||||
<!--
|
<select id="mySelect" class="mySelect" v-model="selectedOption">
|
||||||
<select
|
<option v-for="(item,index) in typeList" :key="index" :value="index">{{item}}</option>
|
||||||
id="mySelect"
|
|
||||||
class="mySelect"
|
|
||||||
v-model="selectedOption"
|
|
||||||
multiple
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
v-for="item in typeList"
|
|
||||||
:key="item"
|
|
||||||
:value="item"
|
|
||||||
:disabled="isOptionDisabled(item)"
|
|
||||||
>
|
|
||||||
{{ item }}
|
|
||||||
</option>
|
|
||||||
</select>
|
</select>
|
||||||
-->
|
|
||||||
<el-select
|
|
||||||
multiple
|
|
||||||
:multiple-limit="isMultiple ? 2 : 1"
|
|
||||||
v-model="selectedOption"
|
|
||||||
value-key="name"
|
|
||||||
class="elSelect"
|
|
||||||
collapse-tags="collapse-tags"
|
|
||||||
placeholder="请选择" style="width: 55%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in vehicleTypes"
|
|
||||||
:key="item.name"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.value"
|
|
||||||
:disabled="!item.disabled ? false : true"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="itemContent">
|
|
||||||
<div class="titleType">
|
|
||||||
<span>牌照</span>
|
|
||||||
</div>
|
|
||||||
<el-select
|
|
||||||
v-model="vehicleLicense"
|
|
||||||
disabled
|
|
||||||
value-key="name"
|
|
||||||
class="elSelect"
|
|
||||||
collapse-tags="collapse-tags"
|
|
||||||
placeholder="请选择" style="width: 55%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in vehicleLicenseOptions"
|
|
||||||
:key="item.name"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="lineBot"></div>
|
<div class="lineBot"></div>
|
||||||
<div class="itemContent">
|
<div class="itemContent">
|
||||||
@ -207,133 +138,35 @@ export default {
|
|||||||
checked: true,
|
checked: true,
|
||||||
carNum:"",//车牌号
|
carNum:"",//车牌号
|
||||||
typeList:[],//车辆类型列表
|
typeList:[],//车辆类型列表
|
||||||
selectedOption:[],//车辆类型
|
selectedOption:'1',//车辆类型
|
||||||
id:'',//车辆Id
|
id:'',//车辆Id
|
||||||
serviceIds:[],//车辆服务种类,
|
serviceIds:[],//车辆服务种类,
|
||||||
supplierServiceList:[],
|
supplierServiceList:[],
|
||||||
oldSupplierServiceList:[],
|
|
||||||
show:false,
|
show:false,
|
||||||
imageUrl: require('@/assets/arr_right.png'),
|
imageUrl: require('@/assets/arr_right.png'),
|
||||||
vehicleLicenseFrontList: [],
|
vehicleLicenseFrontList: [],
|
||||||
vehicleLicenseBackList: [],
|
vehicleLicenseBackList: [],
|
||||||
vehicleLicenseCarPhotoList: [],
|
|
||||||
vehicleFrontPhotoList: [],
|
vehicleFrontPhotoList: [],
|
||||||
vehicleLicenseFront: '', // 行驶证首页
|
vehicleLicenseFront: '', // 行驶证首页
|
||||||
vehicleLicenseBack: '', // 行驶证副页
|
vehicleLicenseBack: '', // 行驶证副页
|
||||||
vehicleLicenseCarPhoto: '', // 行驶证车辆照片
|
|
||||||
vehicleFrontPhoto: '', // 车头照
|
vehicleFrontPhoto: '', // 车头照
|
||||||
vehicleLicenseInfo: {},
|
vehicleLicenseInfo: {},
|
||||||
vehicleLicenseBackOcrFlag: false, // 行驶证副页 修改时默认不需要 ocr识别
|
vehicleLicenseBackOcrFlag: false, // 行驶证副页 修改时默认不需要 ocr识别
|
||||||
isMultiple: false, // 是否支持多选
|
|
||||||
vehicleLicense:'',//牌照
|
|
||||||
vehicleFrontLicensePlate:'',//车头照车牌号码
|
|
||||||
vehicleTypes:[{
|
|
||||||
name: '小修车',
|
|
||||||
value: 1
|
|
||||||
},{
|
|
||||||
name: '一般平板车',
|
|
||||||
value: 2
|
|
||||||
},{
|
|
||||||
name: '落地平板车',
|
|
||||||
value: 3
|
|
||||||
},{
|
|
||||||
name: '地库车',
|
|
||||||
value: 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name:'牵引车',
|
|
||||||
value: 5 },
|
|
||||||
{
|
|
||||||
name:'大力神',
|
|
||||||
value:6},
|
|
||||||
{
|
|
||||||
name:'充电车',
|
|
||||||
value: 7 },
|
|
||||||
{
|
|
||||||
name:'吊车',
|
|
||||||
value: 8 },
|
|
||||||
{
|
|
||||||
name:'公车',
|
|
||||||
value: 9 },
|
|
||||||
{
|
|
||||||
name:'箱式拖车',
|
|
||||||
value: 10 },
|
|
||||||
|
|
||||||
],
|
|
||||||
vehicleLicenseOptions: [{
|
|
||||||
name: '蓝牌',
|
|
||||||
value: 1
|
|
||||||
}, {
|
|
||||||
name: '黄牌',
|
|
||||||
value: 2
|
|
||||||
}, {
|
|
||||||
name: '新能源',
|
|
||||||
value: 3
|
|
||||||
}, {
|
|
||||||
name: '临牌',
|
|
||||||
value: 4
|
|
||||||
}, {
|
|
||||||
name: '其他',
|
|
||||||
value: 5
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
|
||||||
selectedOption(newVal){
|
|
||||||
if(newVal == 4){
|
|
||||||
this.isMultiple = true
|
|
||||||
this.vehicleTypes[2].disabled=true
|
|
||||||
this.vehicleTypes[5].disabled=true
|
|
||||||
this.vehicleTypes[6].disabled=true
|
|
||||||
this.vehicleTypes[7].disabled=true
|
|
||||||
this.vehicleTypes[8].disabled=true
|
|
||||||
this.vehicleTypes[9].disabled=true
|
|
||||||
}else{
|
|
||||||
this.isMultiple = false
|
|
||||||
this.vehicleTypes[2].disabled=false
|
|
||||||
this.vehicleTypes[5].disabled=false
|
|
||||||
this.vehicleTypes[6].disabled=false
|
|
||||||
this.vehicleTypes[7].disabled=false
|
|
||||||
this.vehicleTypes[8].disabled=false
|
|
||||||
this.vehicleTypes[9].disabled=false
|
|
||||||
}
|
|
||||||
if (newVal == 1 || newVal == 7){
|
|
||||||
let arr = []
|
|
||||||
this.supplierServiceList.forEach((item)=>{
|
|
||||||
if(!(item.name == '拖车服务' || item.name == '大型车救援')){
|
|
||||||
arr.push(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.supplierServiceList = arr
|
|
||||||
}else{
|
|
||||||
this.supplierServiceList = this.oldSupplierServiceList
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.id=this.$route.params?.id
|
this.id=this.$route.params?.id
|
||||||
await this.getSupplierServiceTree();
|
const selectElement = document.getElementById('mySelect');
|
||||||
|
selectElement.addEventListener('change', function() {
|
||||||
|
this.selectedOption=selectElement.value;
|
||||||
|
});
|
||||||
await this.getTypeList();
|
await this.getTypeList();
|
||||||
if( this.id){
|
if( this.id){
|
||||||
await this.vehicleInfo()
|
await this.vehicleInfo()
|
||||||
}
|
}
|
||||||
|
await this.getSupplierServiceTree();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
getVehicleLicense(color) {
|
|
||||||
if( color == '蓝' ) {
|
|
||||||
this.vehicleLicense = 1
|
|
||||||
} else if(color == '黄') {
|
|
||||||
this.vehicleLicense = 2
|
|
||||||
} else if(color == '临牌') {
|
|
||||||
this.vehicleLicense = 4
|
|
||||||
} else if(color.includes('绿')) {
|
|
||||||
this.vehicleLicense = 3
|
|
||||||
} else {
|
|
||||||
this.vehicleLicense = 5
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async vehicleLicenseFrontHandler(file) { // 上传 行驶证首页
|
async vehicleLicenseFrontHandler(file) { // 上传 行驶证首页
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file" , file.file);
|
formData.append("file" , file.file);
|
||||||
@ -349,27 +182,11 @@ export default {
|
|||||||
this.vehicleLicenseBack = res.data;
|
this.vehicleLicenseBack = res.data;
|
||||||
await this.vehicleBackOcrHandler();
|
await this.vehicleBackOcrHandler();
|
||||||
},
|
},
|
||||||
async vehicleLicenseCarHandler(file) { // 上传 行驶证车辆照片
|
|
||||||
const formData = new FormData();
|
|
||||||
formData.append("file" , file.file);
|
|
||||||
let res = await uploadImage(formData);
|
|
||||||
this.vehicleLicenseCarPhoto = res.data;
|
|
||||||
},
|
|
||||||
async vehicleFrontPhotoHandler(file) { // 上传 车头照
|
async vehicleFrontPhotoHandler(file) { // 上传 车头照
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file" , file.file);
|
formData.append("file" , file.file);
|
||||||
let res = await uploadImage(formData);
|
let res = await uploadImage(formData);
|
||||||
this.vehicleFrontPhoto = res.data;
|
this.vehicleFrontPhoto = res.data;
|
||||||
await this.ocrCarFrontHandler()
|
|
||||||
},
|
|
||||||
async ocrCarFrontHandler() { // 车辆正面 orc 识别
|
|
||||||
let res = await ocrHandler({
|
|
||||||
ocrType: 10,
|
|
||||||
imageUrl: this.vehicleFrontPhoto,
|
|
||||||
cardSide: 'FRONT'
|
|
||||||
});
|
|
||||||
this.vehicleFrontLicensePlate=res.data?.number
|
|
||||||
this.getVehicleLicense(res.data.color)
|
|
||||||
},
|
},
|
||||||
async vehicleOcrHandler() { // 行驶证首页 ocr 识别
|
async vehicleOcrHandler() { // 行驶证首页 ocr 识别
|
||||||
this.vehicleLicenseInfo.licensePlateNumber = '';
|
this.vehicleLicenseInfo.licensePlateNumber = '';
|
||||||
@ -448,53 +265,31 @@ export default {
|
|||||||
},
|
},
|
||||||
async getTypeList() {
|
async getTypeList() {
|
||||||
let result=await vehicleTypeList();
|
let result=await vehicleTypeList();
|
||||||
this.typeList=[]
|
|
||||||
if(result.code === 200){
|
if(result.code === 200){
|
||||||
for (const key in result.data){
|
this.typeList=result.data
|
||||||
// console.log("keys",result.data[key])
|
|
||||||
this.typeList.push({name:result.data[key],disabled:false,value:(key+1)})
|
|
||||||
// this.typeList.push(result.data[key])
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getSupplierServiceTree(){
|
async getSupplierServiceTree(){
|
||||||
let res = await supplierServiceTree();
|
let res = await supplierServiceTree();
|
||||||
this.supplierServiceList=res.data
|
this.supplierServiceList=res.data
|
||||||
this.oldSupplierServiceList=this.supplierServiceList
|
|
||||||
},
|
},
|
||||||
async vehicleInfo(){
|
async vehicleInfo(){
|
||||||
let res= await getInfoById({
|
let res= await getInfoById({
|
||||||
vehicleId:this.id
|
vehicleId:this.id
|
||||||
})
|
})
|
||||||
let result=res.data;
|
let result=res.data;
|
||||||
console.log("result",result)
|
|
||||||
this.id=result.vehicleId
|
this.id=result.vehicleId
|
||||||
this.carNum=result.plateNumber
|
this.carNum=result.plateNumber
|
||||||
this.isJoin=result.hasPolymerization.code
|
this.isJoin=result.hasPolymerization.code
|
||||||
this.selectedOption=result.vehicleType?.split(',').map((item)=>{
|
this.selectedOption=result.vehicleType;
|
||||||
return Number(item);
|
|
||||||
});
|
|
||||||
this.serviceIds=result.serviceIds
|
this.serviceIds=result.serviceIds
|
||||||
this.vehicleLicenseFront = result.vehicleLicenseFront;
|
this.vehicleLicenseFront = result.vehicleLicenseFront;
|
||||||
this.vehicleLicenseBack = result.vehicleLicenseBack;
|
this.vehicleLicenseBack = result.vehicleLicenseBack;
|
||||||
this.vehicleFrontPhoto = result.vehicleFrontPhoto;
|
this.vehicleFrontPhoto = result.vehicleFrontPhoto;
|
||||||
this.vehicleLicenseInfo = result.vehicleLicenseInfo;
|
this.vehicleLicenseInfo = result.vehicleLicenseInfo;
|
||||||
this.vehicleLicenseCarPhoto = result.vehicleLicenseCarPhoto;
|
|
||||||
this.vehicleLicense = result.vehicleLicense;
|
|
||||||
this.vehicleFrontLicensePlate = result.vehicleFrontLicensePlate;
|
|
||||||
if( this.vehicleLicenseFront ) {
|
|
||||||
this.vehicleLicenseFrontList = [{ url : this.vehicleLicenseFront }];
|
this.vehicleLicenseFrontList = [{ url : this.vehicleLicenseFront }];
|
||||||
}
|
|
||||||
if(this.vehicleLicenseBack) {
|
|
||||||
this.vehicleLicenseBackList = [{ url : this.vehicleLicenseBack }];
|
this.vehicleLicenseBackList = [{ url : this.vehicleLicenseBack }];
|
||||||
}
|
|
||||||
if(this.vehicleFrontPhoto) {
|
|
||||||
this.vehicleFrontPhotoList = [{ url : this.vehicleFrontPhoto }];
|
this.vehicleFrontPhotoList = [{ url : this.vehicleFrontPhoto }];
|
||||||
}
|
|
||||||
if(this.vehicleLicenseCarPhoto) {
|
|
||||||
this.vehicleLicenseCarPhotoList = [{ url : this.vehicleLicenseCarPhoto }];
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
isChange(e){
|
isChange(e){
|
||||||
this.isJoin=e
|
this.isJoin=e
|
||||||
@ -508,11 +303,7 @@ export default {
|
|||||||
this.$toast('行驶证副页照片不能为空')
|
this.$toast('行驶证副页照片不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if( !this.vehicleLicenseCarPhoto ) {
|
if( !this.vehicleLicenseBack ) {
|
||||||
this.$toast('行驶证车辆照片页不能为空')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if( !this.vehicleFrontPhoto ) {
|
|
||||||
this.$toast('车头照片不能为空')
|
this.$toast('车头照片不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -524,27 +315,16 @@ export default {
|
|||||||
this.$toast('行驶证副页识别失败')
|
this.$toast('行驶证副页识别失败')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(!(this.selectedOption.length > 0)){
|
|
||||||
this.$toast('车辆类型不能为空')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if(this.selectedOption?.length==1 && this.selectedOption.includes(1)){//选择小修车时需清除原本的拖车服务类型
|
|
||||||
let data=this.oldSupplierServiceList.filter(item => item.name ==='拖车服务')
|
|
||||||
this.serviceIds = this.serviceIds.filter(item => !data[0].children.some(obj => obj.id === item));
|
|
||||||
}
|
|
||||||
await saveVehicle({
|
await saveVehicle({
|
||||||
vehicleId:this.id ? this.id : '',
|
vehicleId:this.id ? this.id : '',
|
||||||
plateNumber:this.carNum ? this.carNum :'',
|
plateNumber:this.carNum ? this.carNum :'',
|
||||||
vehicleType:this.selectedOption?.length>0 ? this.selectedOption.join(',') : '',
|
vehicleType:this.selectedOption ? this.selectedOption : '',
|
||||||
hasPolymerization:this.isJoin,
|
hasPolymerization:this.isJoin,
|
||||||
serviceIds:this.serviceIds ? this.serviceIds : [],
|
serviceIds:this.serviceIds ? this.serviceIds : [],
|
||||||
vehicleLicenseFront: this.vehicleLicenseFront,
|
vehicleLicenseFront: this.vehicleLicenseFront,
|
||||||
vehicleLicenseBack: this.vehicleLicenseBack,
|
vehicleLicenseBack: this.vehicleLicenseBack,
|
||||||
vehicleFrontPhoto: this.vehicleFrontPhoto,
|
vehicleFrontPhoto: this.vehicleFrontPhoto,
|
||||||
vehicleLicenseInfo: this.vehicleLicenseInfo,
|
vehicleLicenseInfo: this.vehicleLicenseInfo,
|
||||||
vehicleLicenseCarPhoto: this.vehicleLicenseCarPhoto,
|
|
||||||
vehicleLicense: this.vehicleLicense,
|
|
||||||
vehicleFrontLicensePlate:this.vehicleFrontLicensePlate,
|
|
||||||
})
|
})
|
||||||
if(this.id){
|
if(this.id){
|
||||||
this.$toast('修改成功')
|
this.$toast('修改成功')
|
||||||
@ -663,8 +443,4 @@ export default {
|
|||||||
margin: 40px 0 30px 8px;
|
margin: 40px 0 30px 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.elSelect ::v-deep .el-input__inner{
|
|
||||||
border: none !important;
|
|
||||||
text-align: right !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -13,19 +13,6 @@
|
|||||||
<template slot-scope="scope">{{scope.row[item.prop]}} </template>
|
<template slot-scope="scope">{{scope.row[item.prop]}} </template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="active===4">
|
|
||||||
<el-table-column v-for="(column,index) in filteredLabelList" :key="column.prop" :prop="column.prop" :label="column.label"
|
|
||||||
:fixed="index===0" align="center" min-width="100"
|
|
||||||
:width="(isMobile && (column.label=='案件编号' || column.label=='服务内容')) ? 70 : 'auto'">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span v-if="column.label === '师傅姓名'">
|
|
||||||
{{ scope.row[column.prop] }}
|
|
||||||
<span style=" color: #FFBA00;" v-if="scope.row.starRank"><i class="el-icon-star-on star"></i>{{scope.row.starRank}}</span>
|
|
||||||
</span>
|
|
||||||
<span v-else>{{ scope.row[column.prop] }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-table-column v-for="column in labelList" :key="column.prop" :prop="column.prop" :label="column.label"
|
<el-table-column v-for="column in labelList" :key="column.prop" :prop="column.prop" :label="column.label"
|
||||||
align="center" min-width="100" :width="(isMobile && (column.label=='案件编号' || column.label=='服务内容')) ? 70 : 'auto'">
|
align="center" min-width="100" :width="(isMobile && (column.label=='案件编号' || column.label=='服务内容')) ? 70 : 'auto'">
|
||||||
@ -44,14 +31,6 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
filteredLabelList() {
|
|
||||||
if(this.active!==4){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return this.labelList.filter(column => column.label !== '星级评分');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
setTableCellStyle({ row, column,columnIndex }) {
|
setTableCellStyle({ row, column,columnIndex }) {
|
||||||
// 月总表格被转置,原始方法失效,重新定义对比
|
// 月总表格被转置,原始方法失效,重新定义对比
|
||||||
|
@ -2,21 +2,14 @@
|
|||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div v-if="isMobile" class="headWrap">
|
<div v-if="isMobile" class="headWrap">
|
||||||
<div class="title">KPI.数据看板</div>
|
<div class="title">KPI.数据看板</div>
|
||||||
<div class="titleName">{{ current }}-{{supplierName}}</div>
|
<div class="titleName">{{ current }}月-{{supplierName}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="webHeadWrap" :style="'justify-content:'+(isZd==1 ? 'space-between':'center')">
|
<div v-else class="webHeadWrap" :style="'justify-content:'+(isZd==1 ? 'space-between':'center')">
|
||||||
<div class="empty" v-if="isZd==1"></div>
|
<div class="empty" v-if="isZd==1"></div>
|
||||||
<div class="title">KPI.数据看板<span v-if="isZd==1">--中道救援</span><span v-if="isZd!=1">--{{ current }}</span></div>
|
<div class="title">KPI.数据看板<span v-if="isZd==1">--中道救援</span><span v-if="isZd!=1">--{{ current }}月</span></div>
|
||||||
<!-- 只有中道账号才显示搜索框 -->
|
<!-- 只有中道账号才显示搜索框 -->
|
||||||
<div class="searchWrap" v-if="isZd==1">
|
<div class="searchWrap" v-if="isZd==1">
|
||||||
<el-date-picker
|
<span class="month">{{ current }}月</span>
|
||||||
v-model="current"
|
|
||||||
type="month"
|
|
||||||
:clearable="false"
|
|
||||||
class="month custom-date-picker"
|
|
||||||
@change="monthChangeHandle"
|
|
||||||
placeholder="选择月">
|
|
||||||
</el-date-picker>
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="supplierId"
|
v-model="supplierId"
|
||||||
filterable
|
filterable
|
||||||
@ -25,7 +18,7 @@
|
|||||||
clearable
|
clearable
|
||||||
placeholder="请输入后选择"
|
placeholder="请输入后选择"
|
||||||
:remote-method="remoteMethod"
|
:remote-method="remoteMethod"
|
||||||
@change="selectSupplierNameHandle"
|
@change="selectSupplierNameHanldle"
|
||||||
:loading="selectLoading">
|
:loading="selectLoading">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in selectOption"
|
v-for="item in selectOption"
|
||||||
@ -34,20 +27,20 @@
|
|||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<!-- <i class="el-icon-search" @click="searchHandle"></i>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<van-tabs v-model="active" sticky @click="tabClickHandle">
|
<van-tabs v-model="active" sticky @click="onClick">
|
||||||
<van-tab v-for="(item,index) in tabArr" :key="index" :title="item.name"></van-tab>
|
<van-tab v-for="(item,index) in tabArr" :key="index" :title="item.name"></van-tab>
|
||||||
<div v-if="isMobile && !([0,1,2,3].includes(active))" class="tipArrow left">{{ leftArr }}</div>
|
<div v-if="isMobile && !([0,1,2,3].includes(active))" class="tipArrow left">{{ leftArr }}</div>
|
||||||
<div v-if="isMobile && !([9,10].includes(active))" class="tipArrow right">>>></div>
|
<div v-if="isMobile && !([8,9].includes(active))" class="tipArrow right">>>></div>
|
||||||
</van-tabs>
|
</van-tabs>
|
||||||
<div v-loading="loadingData" :class="{'contentWrap':true,'webcontentWrap':!isMobile}" v-if="active===0">
|
<div v-loading="loadingData" :class="{'contentWrap':true,'webcontentWrap':!isMobile}" v-if="active===0">
|
||||||
<div :class="{'reciceOrder':true,'webCom':!isMobile}">
|
<div :class="{'reciceOrder':true,'webCom':!isMobile}">
|
||||||
<div :class="{'title':true,'webTitle':!isMobile}">接单指标</div>
|
<div :class="{'title':true,'webTitle':!isMobile}">接单指标</div>
|
||||||
<div class="reciceOrderIWrap">
|
<div class="reciceOrderIWrap">
|
||||||
<div class="left common">
|
<div class="left common">
|
||||||
<!-- indexData && -->
|
<div class="num">{{ indexData && indexData.receiveOrderCount }}</div>
|
||||||
<div class="num">{{ formatCurrency(indexData?.receiveOrderCount) }}</div>
|
|
||||||
<div class="itemTitle">承接案件量</div>
|
<div class="itemTitle">承接案件量</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="center common" @click="clickJumpHandle(5)">
|
<div class="center common" @click="clickJumpHandle(5)">
|
||||||
@ -104,15 +97,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div :class="{'reciceOrder':true,'webCom':!isMobile,'store':isMobile}">
|
<div :class="{'reciceOrder':true,'webCom':!isMobile,'store':isMobile}">
|
||||||
<div class="scoreTitle">
|
<div class="scoreTitle">
|
||||||
<div>
|
<span class="title">综合打分</span>
|
||||||
<span class="title" style="margin-right: 15px">综合打分</span>
|
|
||||||
<el-button v-if="!isMobile && isBtn && supplierId" size="mini" type="primary" @click="applicateHandle">信息变更申请</el-button>
|
|
||||||
</div>
|
|
||||||
<i class="el-icon-question" @click.prevent="showScoreChart = !showScoreChart"></i>
|
<i class="el-icon-question" @click.prevent="showScoreChart = !showScoreChart"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="storeWrap" v-if="indexData">
|
<div class="storeWrap" v-if="indexData">
|
||||||
<circle-char v-show="showScoreChart" ref="Doughnut7" :data="indexData && indexData.score" :bg-color="'#00D273'" :is-store="true"></circle-char>
|
<circle-char v-if="showScoreChart" ref="Doughnut7" :data="indexData && indexData.score" :bg-color="'#00D273'" :is-store="true"></circle-char>
|
||||||
<div v-show="!showScoreChart" class="detailScore">
|
<div v-else class="detailScore">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div>
|
<div>
|
||||||
<span class="defen">接单得分:</span>
|
<span class="defen">接单得分:</span>
|
||||||
@ -121,7 +111,7 @@
|
|||||||
<span class="defen">接单时效得分:</span>
|
<span class="defen">接单时效得分:</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="defen">接单时效得分:</span>
|
<span class="defen">到达时效得分:</span>
|
||||||
</div>
|
</div>
|
||||||
<div><span class="defen">聚合成功率得分:</span>
|
<div><span class="defen">聚合成功率得分:</span>
|
||||||
</div>
|
</div>
|
||||||
@ -145,13 +135,13 @@
|
|||||||
<div> <span>{{ indexData.polymerizationSuccessScore }}</span></div>
|
<div> <span>{{ indexData.polymerizationSuccessScore }}</span></div>
|
||||||
<div> <span>{{ indexData.appUseScore }}</span></div>
|
<div> <span>{{ indexData.appUseScore }}</span></div>
|
||||||
<div> <span>{{ indexData.urgeScore }}</span></div>
|
<div> <span>{{ indexData.urgeScore }}</span></div>
|
||||||
<div><span>{{ indexData.urgeScore }}</span></div>
|
<div><span>{{ indexData.complainScore }}</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="{'allDataChartWrap':true,'webComAllData':!isMobile,'store':isMobile}">
|
<div>
|
||||||
<div class="allDataChart" id="allDataChart" ></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isMobile" style="padding: 20px"></div>
|
<div v-if="isMobile" style="padding: 20px"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -202,8 +192,8 @@
|
|||||||
<noFit-table v-else :active='active' :is-mobile='isMobile' :table-data="detailList" :label-list="labelList"></noFit-table>
|
<noFit-table v-else :active='active' :is-mobile='isMobile' :table-data="detailList" :label-list="labelList"></noFit-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-loading="loadingData" class="contentWrap monthTotal" v-if="[2,4,5].includes(active)">
|
<div v-loading="loadingData" class="contentWrap monthTotal" v-if="[2,3,4].includes(active)">
|
||||||
<div class="searchDriverName" v-if="[5,4].includes(active)">
|
<div class="searchDriverName" v-if="[3,4].includes(active)">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="driverName"
|
v-model="driverName"
|
||||||
filterable
|
filterable
|
||||||
@ -225,12 +215,12 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div :class="{'tabWrap':true,'webTabWrap':!isMobile,'mobileTab':isMobile}">
|
<div :class="{'tabWrap':true,'webTabWrap':!isMobile,'mobileTab':isMobile}">
|
||||||
<div v-for="(item,index) in (active===4 ? driverList : list)" :class="activeIndex===index ? 'active' : ''"
|
<div v-for="(item,index) in (active===3 ? driverList : list)" :class="activeIndex===index ? 'active' : ''"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="changeTab(index)">{{ item.name }}
|
@click="changeTab(index)">{{ item.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="{'comTab':active !== 4,'comTabActive3':active === 4}">
|
<div :class="{'comTab':true}">
|
||||||
<noFit-table :active='active' :is-mobile='isMobile' :table-data="detailList" :label-list="labelList"></noFit-table>
|
<noFit-table :active='active' :is-mobile='isMobile' :table-data="detailList" :label-list="labelList"></noFit-table>
|
||||||
</div>
|
</div>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@ -245,13 +235,22 @@
|
|||||||
:total="total">
|
:total="total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<div v-loading="loadingData" class="contentWrap monthTotal" v-if="[3,6,7,8,9,10].includes(active)">
|
<div v-loading="loadingData" class="contentWrap monthTotal" v-if="[5,6,7,8,9].includes(active)">
|
||||||
<div :class="{'comTab':true,'detailTable':isMobile}">
|
<div :class="{'comTab':true,'detailTable':isMobile}">
|
||||||
<noFit-table :active='active' :is-mobile='isMobile' :table-data="detailList" :label-list="labelList"
|
<noFit-table :active='active' :is-mobile='isMobile' :table-data="detailList" :label-list="labelList"
|
||||||
></noFit-table>
|
></noFit-table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <el-pagination
|
||||||
|
small
|
||||||
|
:current-page.sync="pageNum"
|
||||||
|
:page-size.sync="pageSize"
|
||||||
|
@current-change="getKpiData"
|
||||||
|
@size-change="getKpiData"
|
||||||
|
layout="prev, pager, next"
|
||||||
|
:total="total">
|
||||||
|
</el-pagination>-->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-if="active !== 10"
|
v-if="active !== 9"
|
||||||
small
|
small
|
||||||
:page-sizes="[20, 50, 100]"
|
:page-sizes="[20, 50, 100]"
|
||||||
:current-page.sync="pageNum"
|
:current-page.sync="pageNum"
|
||||||
@ -272,9 +271,9 @@ import {
|
|||||||
getKpiDetailsData,
|
getKpiDetailsData,
|
||||||
getStatisticsKpiByMonth,
|
getStatisticsKpiByMonth,
|
||||||
getStatisticsKpi,
|
getStatisticsKpi,
|
||||||
|
getDriverStatisticsKpi,
|
||||||
getSupplierId,
|
getSupplierId,
|
||||||
getDriverName,getDriverStatisticsKpi,
|
getDriverName
|
||||||
getRecentSupplierKpi, querySupplierDriverStatisticsScore
|
|
||||||
} from "@/api/kpi.js"
|
} from "@/api/kpi.js"
|
||||||
import {myMixins} from "@/utils/myMixins"
|
import {myMixins} from "@/utils/myMixins"
|
||||||
import CircleChar from "@/views/kpi/components/circleChar.vue";
|
import CircleChar from "@/views/kpi/components/circleChar.vue";
|
||||||
@ -289,13 +288,12 @@ export default {
|
|||||||
return {
|
return {
|
||||||
active:0,
|
active:0,
|
||||||
activeIndex: 0,
|
activeIndex: 0,
|
||||||
//
|
|
||||||
tabArr: [
|
tabArr: [
|
||||||
{name: '总览'}, {name: '月/总'}, {name: '日/总'},{name: '师傅满意度'},{name: '月/师傅'}, {name: '日/师傅'}, {name: '拒单明细'},
|
{name: '总览'}, {name: '月/总'}, {name: '日/总'}, {name: '月/师傅'}, {name: '日/师傅'}, {name: '拒单明细'},
|
||||||
{name: '超时明细'}, {name: '投诉明细'}, {name: '不使用APP案件明细'}, {name: '车辆在线情况'}
|
{name: '超时明细'}, {name: '投诉明细'}, {name: '不使用APP案件明细'}, {name: '车辆在线情况'}
|
||||||
],
|
],
|
||||||
list: [{name: '接单指标'}, {name: '客户评价'}, {name: 'APP使用'}, {name: ' 时效 '}],
|
list: [{name: '接单指标'}, {name: '客户评价'}, {name: 'APP使用'}, {name: ' 时效 '}],
|
||||||
driverList: [{name: '得分总览'},{name: '接单情况'}, {name: '服务评价'}, {name: 'APP使用情况'}, {name: '时效 '}],
|
driverList: [{name: '接单情况'}, {name: '服务评价'}, {name: 'APP使用情况'}, {name: '时效 '}],
|
||||||
startMonthTime: '',
|
startMonthTime: '',
|
||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
@ -315,8 +313,7 @@ export default {
|
|||||||
xAxisArr: [],
|
xAxisArr: [],
|
||||||
isMobile: false,
|
isMobile: false,
|
||||||
isZd: '',
|
isZd: '',
|
||||||
current:'',
|
current: dayjs(new Date()).format('M'),
|
||||||
// current: dayjs(new Date()).format('M'),
|
|
||||||
supplierName:'',
|
supplierName:'',
|
||||||
value: '1',
|
value: '1',
|
||||||
options: [
|
options: [
|
||||||
@ -335,65 +332,28 @@ export default {
|
|||||||
driverselectLoading: false,
|
driverselectLoading: false,
|
||||||
driverselectOption: [],
|
driverselectOption: [],
|
||||||
leftArr:'<<<',
|
leftArr:'<<<',
|
||||||
showScoreChart:true,
|
showScoreChart:true
|
||||||
continueMonthKpi:[],
|
|
||||||
isBtn:false,//是否有信息变更申请按钮权限
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async mounted() {
|
||||||
|
await this.checkMobile();
|
||||||
|
await this.initDate();
|
||||||
|
await this.getData();
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.checkMobile();
|
this.checkMobile();
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
this.isZd = urlParams?.get('isZd') || ''
|
this.isZd = urlParams?.get('isZd') || ''
|
||||||
this.supplierId = urlParams?.get('supplierId') || ''
|
/* if(!this.isMobile && this.isZd && this.isZd==1){
|
||||||
this.isBtn= Number(urlParams?.get('isBtn'))
|
this.supplierId='1127'
|
||||||
|
}*/
|
||||||
},
|
},
|
||||||
async mounted() {
|
async activated() {
|
||||||
await this.checkMobile();
|
|
||||||
await this.initDate();
|
|
||||||
await this.selectSupplierNameHandle();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
applicateHandle() {
|
async selectSupplierNameHanldle(){
|
||||||
if (window.parent) {
|
|
||||||
const hasListener = window.parent.dispatchEvent(new Event('checkCloseDialog'));
|
|
||||||
if (hasListener) {
|
|
||||||
const data = {
|
|
||||||
action: 'closeDialog',
|
|
||||||
message: this.supplierId,
|
|
||||||
// 其他需要传递的参数
|
|
||||||
};
|
|
||||||
window.parent.postMessage(data, '*');
|
|
||||||
// window.parent.postMessage('closeDialog', '*');
|
|
||||||
} else {
|
|
||||||
window.history.back();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
monthChangeHandle(value){
|
|
||||||
if (value) {
|
|
||||||
const year = value.getFullYear();
|
|
||||||
const month = value.getMonth() + 1; // 月份从 0 开始,需要加 1
|
|
||||||
const yearAndMonth = year + '-' + (month > 9 ? month : '0' + month);
|
|
||||||
this.current = dayjs(new Date(yearAndMonth)).format('YYYY-MM')
|
|
||||||
this.startTime = `${year}-${this.padZero(month)}-01 00:00:00`;
|
|
||||||
const lastDay = new Date(year, month, 0).getDate(); // 获取该月的最后一天
|
|
||||||
this.endTime = `${year}-${this.padZero(month)}-${this.padZero(lastDay)} 23:59:59`;
|
|
||||||
this.startMonthTime=this.getStartTimeFromEndTime(this.endTime)
|
|
||||||
console.log(" this.startMonthTime", this.startMonthTime)
|
|
||||||
this.selectSupplierNameHandle();
|
|
||||||
if(this.active===1){
|
|
||||||
this.tabClickHandle()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
padZero(num) {
|
|
||||||
return num < 10 ? `0${num}` : num;
|
|
||||||
},
|
|
||||||
async selectSupplierNameHandle(){
|
|
||||||
await this.getData()
|
await this.getData()
|
||||||
if(this.active !== 0){
|
setTimeout(()=>{
|
||||||
return
|
|
||||||
}
|
|
||||||
this.$refs.Doughnut1.initCircle()
|
this.$refs.Doughnut1.initCircle()
|
||||||
this.$refs.Doughnut2.initCircle()
|
this.$refs.Doughnut2.initCircle()
|
||||||
this.$refs.Doughnut3.initCircle()
|
this.$refs.Doughnut3.initCircle()
|
||||||
@ -401,6 +361,7 @@ export default {
|
|||||||
this.$refs.Doughnut5.initCircle()
|
this.$refs.Doughnut5.initCircle()
|
||||||
this.$refs.Doughnut6.initCircle()
|
this.$refs.Doughnut6.initCircle()
|
||||||
this.$refs.Doughnut7.initCircle()
|
this.$refs.Doughnut7.initCircle()
|
||||||
|
},1500)
|
||||||
},
|
},
|
||||||
async remoteMethod(query) {
|
async remoteMethod(query) {
|
||||||
if (query !== '') {
|
if (query !== '') {
|
||||||
@ -433,6 +394,9 @@ export default {
|
|||||||
this.driverselectOption = [];
|
this.driverselectOption = [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async searchHandle() {//web端服务商搜索操作
|
||||||
|
console.log("搜索按钮")
|
||||||
|
},
|
||||||
async changeHandle() {
|
async changeHandle() {
|
||||||
this.v1=[]
|
this.v1=[]
|
||||||
this.v2=[]
|
this.v2=[]
|
||||||
@ -458,48 +422,30 @@ export default {
|
|||||||
this.xAxisArr = []
|
this.xAxisArr = []
|
||||||
this.etlDetailList=[]
|
this.etlDetailList=[]
|
||||||
this.etlLabelList=[]
|
this.etlLabelList=[]
|
||||||
this.continueMonthKpi=[]
|
|
||||||
await this.getKpiData()
|
await this.getKpiData()
|
||||||
this.loadingData = false
|
this.loadingData = false
|
||||||
} finally {
|
} finally {
|
||||||
this.loadingData = false
|
this.loadingData = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 格式化承接案件量数据
|
|
||||||
formatCurrency(value) {
|
|
||||||
if (!value) return '';
|
|
||||||
let num = parseInt(value);
|
|
||||||
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
||||||
},
|
|
||||||
formatCurrency1(value) {
|
|
||||||
if (!value) return ''; // 如果值为空,返回空字符串
|
|
||||||
// 如果值已经包含逗号,直接返回原值
|
|
||||||
if (value.toString().includes(',')) {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
// 否则,添加千分号
|
|
||||||
let num = parseInt(value);
|
|
||||||
if (isNaN(num)) return ''; // 如果转换失败,返回空字符串
|
|
||||||
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
||||||
},
|
|
||||||
async clickJumpHandle(type) {
|
async clickJumpHandle(type) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.active = type;
|
this.active = type;
|
||||||
await this.tabClickHandle();
|
await this.onClick();
|
||||||
},
|
},
|
||||||
tabClickHandle() {
|
onClick() {
|
||||||
this.activeIndex = 0;
|
this.activeIndex = 0;
|
||||||
this.detailList = [];
|
this.detailList = [];
|
||||||
this.labelList = [];
|
this.labelList = [];
|
||||||
this.driverName=''
|
this.driverName=''
|
||||||
this.selectSupplierNameHandle();
|
this.getData();
|
||||||
if (this.active === 1) {
|
if (this.active === 1) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.drawLine()
|
this.drawLine()
|
||||||
if (!this.isMobile && this.activeIndex === 3) {
|
if (!this.isMobile && this.activeIndex === 3) {
|
||||||
this.drawLine1()
|
this.drawLine1()
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 500)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
drawLine() { // 基于准备好的dom,初始化echarts实例
|
drawLine() { // 基于准备好的dom,初始化echarts实例
|
||||||
@ -509,16 +455,13 @@ export default {
|
|||||||
let series1 = [{
|
let series1 = [{
|
||||||
name: '派遣案件量',
|
name: '派遣案件量',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: this.v1?.map(item => Number(item?.toString()?.replace(/,/g, ''))),
|
data: this.v1,
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
smooth: true,
|
smooth: true,
|
||||||
barWidth: this.isMobile ? 35 : 60,
|
barWidth: this.isMobile ? 35 : 60,
|
||||||
label: {
|
label: {
|
||||||
show: true, // 显示标签
|
show: true, // 显示标签
|
||||||
position: 'top', // 标签位置在柱形顶部
|
position: 'top', // 标签位置在柱形顶部
|
||||||
formatter: (params) => {
|
|
||||||
return params.value.toLocaleString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -902,123 +845,49 @@ export default {
|
|||||||
};
|
};
|
||||||
option && myChart.setOption(option, true);
|
option && myChart.setOption(option, true);
|
||||||
},
|
},
|
||||||
async allDataChart(){
|
|
||||||
let res = await getRecentSupplierKpi({
|
|
||||||
startTime: this.startTime,
|
|
||||||
endTime: this.endTime,
|
|
||||||
statisticsType: 1,
|
|
||||||
supplierId: this.supplierId,
|
|
||||||
driverId: this.driverId,
|
|
||||||
driverName:this.driverName,
|
|
||||||
});
|
|
||||||
this.continueMonthKpi=res.data;
|
|
||||||
// 初始化 v1 ,v2数组,长度为 12,初始值为 0
|
|
||||||
let v1 = new Array(12).fill(0);
|
|
||||||
let v2 = new Array(12).fill(0);
|
|
||||||
if( this.continueMonthKpi.length>0){
|
|
||||||
this.continueMonthKpi.forEach(item=>{
|
|
||||||
let month = parseInt(item.statisticsDate?.split('-')[1], 10) - 1; // 获取月份,并转换为数组索引
|
|
||||||
v1[month] = item.dispatchOrderCount;
|
|
||||||
v2[month] = item.orderScore;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
let myChart = echarts.init(document.getElementById('allDataChart'))
|
|
||||||
let option = {
|
|
||||||
grid: {
|
|
||||||
top: '15%',
|
|
||||||
bottom: '12%',
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: {
|
|
||||||
type: 'cross',
|
|
||||||
crossStyle: {
|
|
||||||
color: '#999'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
legend: { },
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: 'category',
|
|
||||||
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
|
||||||
axisPointer: {
|
|
||||||
type: 'shadow'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
axisLabel: {
|
|
||||||
formatter: '{value}',
|
|
||||||
rotate: 45,
|
|
||||||
margin: 2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
axisLabel: {
|
|
||||||
formatter: '{value}',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: '案件量',
|
|
||||||
type: 'bar',
|
|
||||||
yAxisIndex: 0,
|
|
||||||
data:v1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '总分',
|
|
||||||
type: 'line',
|
|
||||||
yAxisIndex: 1,
|
|
||||||
data: v2
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
option && myChart.setOption(option, true);
|
|
||||||
},
|
|
||||||
// 通用函数,用于处理百分比数据
|
|
||||||
processPercentage(value) {
|
|
||||||
value *= 100;
|
|
||||||
if (value % 1 !== 0) {
|
|
||||||
value = value.toFixed(2);
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
},
|
|
||||||
async getKpiData() {
|
async getKpiData() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (this.active === 0) {
|
if (this.active === 0) {
|
||||||
await this.allDataChart()
|
|
||||||
let res = await getStatisticsKpiByMonth({
|
let res = await getStatisticsKpiByMonth({
|
||||||
startTime: this.startTime,
|
startTime: this.startTime,
|
||||||
endTime: this.endTime,
|
endTime: this.endTime,
|
||||||
statisticsType: 1,
|
statisticsType: 1,
|
||||||
supplierId: this.supplierId,
|
supplierId: this.supplierId,
|
||||||
});
|
});
|
||||||
if(!res.data){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.indexData = res.data;
|
this.indexData = res.data;
|
||||||
this.supplierName=res.data?.supplierName
|
this.supplierName=res.data?.supplierName
|
||||||
// 需要处理的属性名数组
|
this.indexData.refuseOrderRate=this.indexData.refuseOrderRate*100
|
||||||
const propertiesToProcess = [
|
if (this.indexData.refuseOrderRate % 1 !== 0) {
|
||||||
'refuseOrderRate',
|
this.indexData.refuseOrderRate = this.indexData.refuseOrderRate.toFixed(2);
|
||||||
'timeoutOrderRate',
|
|
||||||
'complainOrderRate',
|
|
||||||
'customerSatisfaction',
|
|
||||||
'threeMinutesContactRate',
|
|
||||||
'urgeRate',
|
|
||||||
'appRate',
|
|
||||||
'polymerizationSuccessRate'
|
|
||||||
];
|
|
||||||
for (let key in this.indexData){
|
|
||||||
if (propertiesToProcess.includes(key)) {
|
|
||||||
this.indexData[key] = this.processPercentage(this.indexData[key]);
|
|
||||||
}
|
}
|
||||||
|
this.indexData.timeoutOrderRate=this.indexData.timeoutOrderRate*100
|
||||||
|
if (this.indexData.timeoutOrderRate % 1 !== 0) {
|
||||||
|
this.indexData.timeoutOrderRate = this.indexData.timeoutOrderRate.toFixed(2);
|
||||||
|
}
|
||||||
|
this.indexData.complainOrderRate=this.indexData.complainOrderRate*100
|
||||||
|
if (this.indexData.complainOrderRate % 1 !== 0) {
|
||||||
|
this.indexData.complainOrderRate = this.indexData.complainOrderRate.toFixed(2);
|
||||||
|
}
|
||||||
|
this.indexData.customerSatisfaction=this.indexData.customerSatisfaction*100
|
||||||
|
if (this.indexData.customerSatisfaction % 1 !== 0) {
|
||||||
|
this.indexData.customerSatisfaction = this.indexData.customerSatisfaction.toFixed(2);
|
||||||
|
}
|
||||||
|
this.indexData.threeMinutesContactRate=this.indexData.threeMinutesContactRate*100
|
||||||
|
if (this.indexData.threeMinutesContactRate % 1 !== 0) {
|
||||||
|
this.indexData.threeMinutesContactRate = this.indexData.threeMinutesContactRate.toFixed(2);
|
||||||
|
}
|
||||||
|
this.indexData.urgeRate=this.indexData.urgeRate*100
|
||||||
|
if (this.indexData.urgeRate % 1 !== 0) {
|
||||||
|
this.indexData.urgeRate = this.indexData.urgeRate.toFixed(2);
|
||||||
|
}
|
||||||
|
this.indexData.appRate=this.indexData.appRate*100
|
||||||
|
if (this.indexData.appRate % 1 !== 0) {
|
||||||
|
this.indexData.appRate = this.indexData.appRate.toFixed(2);
|
||||||
|
}
|
||||||
|
this.indexData.polymerizationSuccessRate=this.indexData.polymerizationSuccessRate*100
|
||||||
|
if (this.indexData.polymerizationSuccessRate % 1 !== 0) {
|
||||||
|
this.indexData.polymerizationSuccessRate = this.indexData.polymerizationSuccessRate.toFixed(2);
|
||||||
}
|
}
|
||||||
} else if ([1, 2].includes(this.active)) {
|
} else if ([1, 2].includes(this.active)) {
|
||||||
let res = await getStatisticsKpi({
|
let res = await getStatisticsKpi({
|
||||||
@ -1047,57 +916,32 @@ export default {
|
|||||||
item.minorFortyMinutesArrivalRate=this.formatPercentage(item.minorFortyMinutesArrivalRate) ;
|
item.minorFortyMinutesArrivalRate=this.formatPercentage(item.minorFortyMinutesArrivalRate) ;
|
||||||
let formatVal = dayjs(item.statisticsDate).format('DD');
|
let formatVal = dayjs(item.statisticsDate).format('DD');
|
||||||
let formatVal1 = dayjs(item.statisticsDate).format('M');
|
let formatVal1 = dayjs(item.statisticsDate).format('M');
|
||||||
// console.log("formatVal1",formatVal1)
|
return {...item, date: formatVal, month: (formatVal1 == this.current) ? '本月' : (formatVal1 + '月')};
|
||||||
// return {...item, date: formatVal, month: (formatVal1 == this.current) ? '本月' : (formatVal1 + '月')};
|
|
||||||
return {...item, date: formatVal, month: formatVal1 + '月'};
|
|
||||||
});
|
});
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.detailList?.map(item => {
|
this.detailList?.map(item => {
|
||||||
this.xAxisArr.push(item.month)
|
this.xAxisArr.push(item.month)
|
||||||
this.xAxisArr = [...new Set(this.xAxisArr)]; // 去重
|
|
||||||
})
|
})
|
||||||
console.log(" this.xAxisArr", this.xAxisArr)
|
this.xAxisArr[this.xAxisArr.length - 1] = '本月'
|
||||||
// this.xAxisArr[this.xAxisArr.length - 1] = '本月'
|
|
||||||
await this.twoTabHanldeData()
|
await this.twoTabHanldeData()
|
||||||
}else if (this.active === 3) {
|
} else if ([3, 4].includes(this.active)) {
|
||||||
let res = await querySupplierDriverStatisticsScore({
|
|
||||||
startTime: this.startTime ,
|
|
||||||
endTime: this.endTime,
|
|
||||||
statisticsType: 1,
|
|
||||||
supplierId: this.supplierId,
|
|
||||||
driverId: this.driverId,
|
|
||||||
driverName:this.driverName,
|
|
||||||
pageNum: this.pageNum,
|
|
||||||
pageSize: this.pageSize
|
|
||||||
})
|
|
||||||
this.total = res.total
|
|
||||||
this.detailList = res.data?.map(item => {
|
|
||||||
let formatVal = dayjs(item.statisticsDate).format('DD');
|
|
||||||
return {...item, date: formatVal};
|
|
||||||
});
|
|
||||||
this.labelList = [
|
|
||||||
{label: '师傅姓名', prop: 'driverName'},
|
|
||||||
{label: '案件总量', prop: 'orderCount'},
|
|
||||||
{label: '满意度得分 ', prop: 'driverSatisfaction'},
|
|
||||||
]
|
|
||||||
this.loading = false;
|
|
||||||
}
|
|
||||||
else if ([4,5].includes(this.active)) {
|
|
||||||
let res = await getDriverStatisticsKpi({
|
let res = await getDriverStatisticsKpi({
|
||||||
startTime: this.startTime ,
|
startTime: this.startTime ,
|
||||||
endTime: this.endTime,
|
endTime: this.endTime,
|
||||||
statisticsType:this.active === 4 ? 1 : 2,
|
statisticsType: this.active === 3 ? 1 : 2,
|
||||||
supplierId: this.supplierId,
|
supplierId: this.supplierId,
|
||||||
driverId: this.driverId,
|
driverId: this.driverId,
|
||||||
driverName:this.driverName,
|
driverName:this.driverName,
|
||||||
pageNum: this.pageNum,
|
pageNum: this.pageNum,
|
||||||
pageSize: this.pageSize
|
pageSize: this.pageSize
|
||||||
})
|
})
|
||||||
|
// this.detailList = res.data
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
this.detailList = res.data?.map(item => {
|
this.detailList = res.data?.map(item => {
|
||||||
item.refuseOrderRate=this.formatPercentage(item.refuseOrderRate) ;
|
item.refuseOrderRate=this.formatPercentage(item.refuseOrderRate) ;
|
||||||
item.timeoutOrderRate=this.formatPercentage(item.timeoutOrderRate) ;
|
item.timeoutOrderRate=this.formatPercentage(item.timeoutOrderRate) ;
|
||||||
item.cancelRate=this.formatPercentage(item.cancelRate) ;
|
item.cancelRate=this.formatPercentage(item.cancelRate) ;
|
||||||
|
// item.urgeRate=this.formatPercentage(item.urgeRate) ;
|
||||||
item.complainOrderRate=this.formatPercentage(item.complainOrderRate) ;
|
item.complainOrderRate=this.formatPercentage(item.complainOrderRate) ;
|
||||||
item.customerEvaluateRate=this.formatPercentage(item.customerEvaluateRate) ;
|
item.customerEvaluateRate=this.formatPercentage(item.customerEvaluateRate) ;
|
||||||
item.appRate=this.formatPercentage(item.appRate) ;
|
item.appRate=this.formatPercentage(item.appRate) ;
|
||||||
@ -1113,13 +957,12 @@ export default {
|
|||||||
return {...item, date: formatVal};
|
return {...item, date: formatVal};
|
||||||
});
|
});
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if(this.active===5 && !this.driverName){
|
if(this.active===4 && !this.driverName){
|
||||||
this.detailList=[]
|
this.detailList=[]
|
||||||
this.total=0
|
this.total=0
|
||||||
}
|
}
|
||||||
await this.twoTabHanldeData();
|
await this.twoTabHanldeData();
|
||||||
}
|
} else if ([5, 6, 7, 8, 9].includes(this.active)) {
|
||||||
else if ([ 6, 7, 8,9,10].includes(this.active)) {
|
|
||||||
this.detailList = []
|
this.detailList = []
|
||||||
this.labelList = []
|
this.labelList = []
|
||||||
let result = await getKpiDetailsData({
|
let result = await getKpiDetailsData({
|
||||||
@ -1136,7 +979,7 @@ export default {
|
|||||||
return {...item, date: formatVal};
|
return {...item, date: formatVal};
|
||||||
});
|
});
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (this.active === 6) {//拒单明细
|
if (this.active === 5) {//拒单明细
|
||||||
this.labelList = [
|
this.labelList = [
|
||||||
{label: '案件编号', prop: 'orderCode'},
|
{label: '案件编号', prop: 'orderCode'},
|
||||||
{label: '服务内容', prop: 'serviceName'},
|
{label: '服务内容', prop: 'serviceName'},
|
||||||
@ -1147,7 +990,7 @@ export default {
|
|||||||
{label: '中道派单时间', prop: 'dispatchTime'},
|
{label: '中道派单时间', prop: 'dispatchTime'},
|
||||||
{label: '拒绝原因', prop: 'reason'},
|
{label: '拒绝原因', prop: 'reason'},
|
||||||
]
|
]
|
||||||
} else if (this.active === 7) {//超时明细
|
} else if (this.active === 6) {//超时明细
|
||||||
this.labelList = [
|
this.labelList = [
|
||||||
{label: '案件编号', prop: 'orderCode'},
|
{label: '案件编号', prop: 'orderCode'},
|
||||||
{label: '服务内容', prop: 'serviceName'},
|
{label: '服务内容', prop: 'serviceName'},
|
||||||
@ -1157,7 +1000,7 @@ export default {
|
|||||||
{label: '上游接单来源', prop: 'workSource'},
|
{label: '上游接单来源', prop: 'workSource'},
|
||||||
{label: '中道派单时间', prop: 'dispatchTime'},
|
{label: '中道派单时间', prop: 'dispatchTime'},
|
||||||
]
|
]
|
||||||
} else if (this.active === 8) {//投诉明细
|
} else if (this.active === 7) {//投诉明细
|
||||||
this.labelList = [
|
this.labelList = [
|
||||||
{label: '案件编号', prop: 'orderCode'},
|
{label: '案件编号', prop: 'orderCode'},
|
||||||
{label: '服务内容', prop: 'serviceName'},
|
{label: '服务内容', prop: 'serviceName'},
|
||||||
@ -1166,7 +1009,8 @@ export default {
|
|||||||
{label: '投诉时间', prop: 'complainCreateTime'},
|
{label: '投诉时间', prop: 'complainCreateTime'},
|
||||||
{label: '投诉类型', prop: 'complainTypeString'},
|
{label: '投诉类型', prop: 'complainTypeString'},
|
||||||
]
|
]
|
||||||
} else if (this.active === 9) {//不使用App案件明细
|
} else if (this.active === 8) {//不使用App案件明细
|
||||||
|
// console.log("不使用App案件明细")
|
||||||
this.labelList = [
|
this.labelList = [
|
||||||
{label: '案件编号', prop: 'orderCode'},
|
{label: '案件编号', prop: 'orderCode'},
|
||||||
{label: '服务内容', prop: 'serviceName'},
|
{label: '服务内容', prop: 'serviceName'},
|
||||||
@ -1174,7 +1018,7 @@ export default {
|
|||||||
{label: '工单创建时间', prop: 'orderCreateTime'},
|
{label: '工单创建时间', prop: 'orderCreateTime'},
|
||||||
{label: '事发地', prop: 'vehiclePointAddress'},
|
{label: '事发地', prop: 'vehiclePointAddress'},
|
||||||
]
|
]
|
||||||
} else if (this.active === 10) {//车辆在线情况
|
} else if (this.active === 9) {//车辆在线情况
|
||||||
this.labelList = [
|
this.labelList = [
|
||||||
{label: '日期', prop: 'date'},
|
{label: '日期', prop: 'date'},
|
||||||
{label: '0点在线车辆数量', prop: 'zeroClockVehicleCount'},
|
{label: '0点在线车辆数量', prop: 'zeroClockVehicleCount'},
|
||||||
@ -1183,6 +1027,7 @@ export default {
|
|||||||
{label: '16点在线车辆数量', prop: 'sixteenClockVehicleCount'},
|
{label: '16点在线车辆数量', prop: 'sixteenClockVehicleCount'},
|
||||||
{label: '20点在线车辆数量', prop: 'twentyClockVehicleCount'},
|
{label: '20点在线车辆数量', prop: 'twentyClockVehicleCount'},
|
||||||
{label: '22点在线车辆数量', prop: 'twentyTwoClockVehicleCount'},
|
{label: '22点在线车辆数量', prop: 'twentyTwoClockVehicleCount'},
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1198,23 +1043,16 @@ export default {
|
|||||||
return result.toFixed(2) + '%';
|
return result.toFixed(2) + '%';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
checkMobile() {
|
||||||
|
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
||||||
|
this.isMobile = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
|
||||||
|
},
|
||||||
// 初始化获取当月日期
|
// 初始化获取当月日期
|
||||||
initDate() {
|
initDate() {
|
||||||
let year=''
|
|
||||||
let month=''
|
|
||||||
if( this.current ) {
|
|
||||||
year = new Date(this.current).getFullYear();
|
|
||||||
month = new Date(this.current).getMonth() + 1;
|
|
||||||
} else {
|
|
||||||
year = new Date().getFullYear();
|
|
||||||
month = new Date().getMonth() + 1;
|
|
||||||
}
|
|
||||||
let yearAndMonth = year + '-' + (month > 9 ? month : '0' + month);
|
|
||||||
this.current = dayjs(new Date(yearAndMonth)).format('YYYY-MM')
|
|
||||||
this.startTime = dayjs(new Date()).format('YYYY-MM') + '-01 00:00:00'
|
this.startTime = dayjs(new Date()).format('YYYY-MM') + '-01 00:00:00'
|
||||||
this.endTime = dayjs(new Date()).format('YYYY-MM') + '-' + this.getDayLen()+' 23:59:59'
|
this.endTime = dayjs(new Date()).format('YYYY-MM') + '-' + this.getDayLen()+' 23:59:59'
|
||||||
this.startMonthTime=this.getStartTimeFromEndTime(this.endTime)
|
this.startMonthTime=this.getStartTimeFromEndTime(this.endTime)
|
||||||
console.log(" this.startMonthTime", this.startMonthTime,this.startTime)
|
console.log(this.startTime,this.endTime,this.startMonthTime)
|
||||||
},
|
},
|
||||||
// 获取当月天数
|
// 获取当月天数
|
||||||
getDayLen() {
|
getDayLen() {
|
||||||
@ -1275,12 +1113,6 @@ export default {
|
|||||||
{ 'month': '拒单量' },{ 'month': '拒单率(%)' },{ 'month': '超时接单量' },{ 'month': '超时率(%)' },{ 'month': '客户取消率(%)' }]
|
{ 'month': '拒单量' },{ 'month': '拒单率(%)' },{ 'month': '超时接单量' },{ 'month': '超时率(%)' },{ 'month': '客户取消率(%)' }]
|
||||||
let props = 'prop' //自定义字段名称
|
let props = 'prop' //自定义字段名称
|
||||||
this.detailList?.map((item,index) => {
|
this.detailList?.map((item,index) => {
|
||||||
|
|
||||||
item.dispatchOrderCount=this.formatCurrency1( item.dispatchOrderCount);
|
|
||||||
item.receiveOrderCount=this.formatCurrency1( item.receiveOrderCount);
|
|
||||||
item.finishOrderCount=this.formatCurrency1( item.finishOrderCount);
|
|
||||||
item.refuseOrderCount=this.formatCurrency1( item.refuseOrderCount);
|
|
||||||
item.timeoutOrderCount=this.formatCurrency1( item.timeoutOrderCount);
|
|
||||||
this.v1.push(item.dispatchOrderCount)
|
this.v1.push(item.dispatchOrderCount)
|
||||||
this.v2.push(item.refuseOrderRate.replace('%', ''))
|
this.v2.push(item.refuseOrderRate.replace('%', ''))
|
||||||
this.v3.push(item.timeoutOrderRate.replace('%', ''))
|
this.v3.push(item.timeoutOrderRate.replace('%', ''))
|
||||||
@ -1368,11 +1200,13 @@ export default {
|
|||||||
this.v2.push(item.threeMinutesReceivingRate.replace('%', ''))
|
this.v2.push(item.threeMinutesReceivingRate.replace('%', ''))
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
console.log(" this.detailList师傅接单时效", this.detailList)
|
||||||
this.detailList?.map(item => {
|
this.detailList?.map(item => {
|
||||||
this.v1.push(item.arriving)
|
this.v1.push(item.arriving)
|
||||||
this.v2.push(item.polymerizationSuccessArriving)
|
this.v2.push(item.polymerizationSuccessArriving)
|
||||||
this.v3.push(item.fortyMinutesArrivalRate.replace('%', ''))
|
this.v3.push(item.fortyMinutesArrivalRate.replace('%', ''))
|
||||||
})
|
})
|
||||||
|
console.log("this.v1",this.v1,this.v2,this.v3)
|
||||||
}
|
}
|
||||||
this.detailList?.map((item,index) => {
|
this.detailList?.map((item,index) => {
|
||||||
const columnObj = {}
|
const columnObj = {}
|
||||||
@ -1458,40 +1292,8 @@ export default {
|
|||||||
{label: '聚合成功到达时效(分)', prop: 'polymerizationSuccessArriving'},
|
{label: '聚合成功到达时效(分)', prop: 'polymerizationSuccessArriving'},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
} else if (this.active === 3) {
|
||||||
/* else if(this.active === 3){
|
|
||||||
|
|
||||||
} */
|
|
||||||
else if (this.active === 4) {
|
|
||||||
if (this.activeIndex === 0) {
|
if (this.activeIndex === 0) {
|
||||||
this.labelList = [
|
|
||||||
{label: '师傅姓名', prop: 'driverName'},
|
|
||||||
{label: '总分', prop: 'score'},
|
|
||||||
{label: '案件总量', prop: 'orderCount'},
|
|
||||||
{label: '累计得分', prop: 'cumulativeScore'},
|
|
||||||
{label: '两分钟内接单得分', prop: 'twoMinutesAcceptScore'},
|
|
||||||
{label: '1分钟内联系客户得分', prop: 'oneMinutesContactCustomerScore'},
|
|
||||||
{label: '联系成功得分', prop: 'contactSuccessScore'},
|
|
||||||
{label: '准时到达B点得分', prop: 'arriveBScore'},
|
|
||||||
{label: '准时到达C点得分', prop: 'arriveCScore'},
|
|
||||||
{label: '服务成功得分', prop: 'serviceSuccessScore'},
|
|
||||||
{label: '必传照片上传得分', prop: 'uploadPhotoScore'},
|
|
||||||
{label: '审核一次通过得分', prop: 'auditScore'},
|
|
||||||
{label: '平安案件无评价扣分', prop: 'pinganNoCommentDeduct'},
|
|
||||||
{label: '案件差评扣分', prop: 'orderNegativeDeduct'},
|
|
||||||
{label: '催促扣分', prop: 'urgeDeduct'},
|
|
||||||
{label: '有责车损扣分', prop: 'responsibleDeduct'},
|
|
||||||
{label: '有责投诉(非态度类)扣分', prop: 'complaintNoAttitudeDeduct'},
|
|
||||||
{label: '有责投诉(态度类)扣分', prop: 'complaintAttitudeDeduct'},
|
|
||||||
{label: '拒单扣分', prop: 'rejectDeduct'},
|
|
||||||
{label: '超时扣分', prop: 'timeoutDeduct'},
|
|
||||||
{label: '聚合成功得分', prop: 'polymerizationSuccessScore'},
|
|
||||||
{label: '聚合失败扣分', prop: 'polymerizationFailDeduct'},
|
|
||||||
{label: '每月培训得分', prop: 'trainingScore'},
|
|
||||||
{label: '新手入列得分', prop: 'listedScore'},
|
|
||||||
{label: '星级评分', prop: 'starRank'},
|
|
||||||
]
|
|
||||||
}if (this.activeIndex === 1) {
|
|
||||||
this.labelList = [
|
this.labelList = [
|
||||||
{label: '师傅姓名', prop: 'driverName'},
|
{label: '师傅姓名', prop: 'driverName'},
|
||||||
{label: '承接案件量', prop: 'receiveOrderCount'},
|
{label: '承接案件量', prop: 'receiveOrderCount'},
|
||||||
@ -1500,7 +1302,7 @@ export default {
|
|||||||
{label: '超时接单量', prop: 'timeoutOrderCount'},
|
{label: '超时接单量', prop: 'timeoutOrderCount'},
|
||||||
{label: '超时率(%)', prop: 'timeoutOrderRate'},
|
{label: '超时率(%)', prop: 'timeoutOrderRate'},
|
||||||
]
|
]
|
||||||
} else if (this.activeIndex === 2) {
|
} else if (this.activeIndex === 1) {
|
||||||
this.labelList = [
|
this.labelList = [
|
||||||
{label: '师傅姓名', prop: 'driverName'},
|
{label: '师傅姓名', prop: 'driverName'},
|
||||||
{label: '承接案件量', prop: 'receiveOrderCount'},
|
{label: '承接案件量', prop: 'receiveOrderCount'},
|
||||||
@ -1510,7 +1312,7 @@ export default {
|
|||||||
{label: '客户评价率(%)', prop: 'customerEvaluateRate'},
|
{label: '客户评价率(%)', prop: 'customerEvaluateRate'},
|
||||||
{label: '催促率(%)', prop: 'urgeRate'},
|
{label: '催促率(%)', prop: 'urgeRate'},
|
||||||
]
|
]
|
||||||
} else if (this.activeIndex === 3) {
|
} else if (this.activeIndex === 2) {
|
||||||
this.labelList = [
|
this.labelList = [
|
||||||
{label: '师傅姓名', prop: 'driverName'},
|
{label: '师傅姓名', prop: 'driverName'},
|
||||||
{label: '承接案件量', prop: 'receiveOrderCount'},
|
{label: '承接案件量', prop: 'receiveOrderCount'},
|
||||||
@ -1522,7 +1324,7 @@ export default {
|
|||||||
{label: '总聚合成功率(%)', prop: 'polymerizationSuccessRate'},
|
{label: '总聚合成功率(%)', prop: 'polymerizationSuccessRate'},
|
||||||
{label: '日均在线时长(h)', prop: 'onlineDuration'},
|
{label: '日均在线时长(h)', prop: 'onlineDuration'},
|
||||||
]
|
]
|
||||||
} else if (this.activeIndex === 4) {
|
} else if (this.activeIndex === 3) {
|
||||||
this.labelList = [
|
this.labelList = [
|
||||||
{label: '师傅姓名', prop: 'driverName'},
|
{label: '师傅姓名', prop: 'driverName'},
|
||||||
{label: '接单时效(分)', prop: 'receiving'},
|
{label: '接单时效(分)', prop: 'receiving'},
|
||||||
@ -1532,7 +1334,7 @@ export default {
|
|||||||
{label: '聚合成功到达时效(分)', prop: 'polymerizationSuccessArriving'},
|
{label: '聚合成功到达时效(分)', prop: 'polymerizationSuccessArriving'},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} else if (this.active === 5) {
|
} else if (this.active === 4) {
|
||||||
if (this.activeIndex === 0) {//接单指标
|
if (this.activeIndex === 0) {//接单指标
|
||||||
this.labelList = [
|
this.labelList = [
|
||||||
{label: '日', prop: 'date'},
|
{label: '日', prop: 'date'},
|
||||||
@ -1581,21 +1383,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
checkMobile() {
|
|
||||||
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
||||||
this.isMobile = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
|
|
||||||
},
|
|
||||||
setType(type) {
|
setType(type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 6:
|
case 5:
|
||||||
return 1;
|
return 1;
|
||||||
case 7:
|
case 6:
|
||||||
return 2;
|
return 2;
|
||||||
case 8:
|
case 7:
|
||||||
return 3;
|
return 3;
|
||||||
case 9:
|
case 8:
|
||||||
return 4;
|
return 4;
|
||||||
case 10:
|
case 9:
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1662,6 +1460,19 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
.month {
|
||||||
|
display: inline-block;
|
||||||
|
width: 45px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 20px 0px 0px 20px;
|
||||||
|
border: 1px solid #4C81F5;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
.el-icon-search {
|
.el-icon-search {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: #4C81F5;
|
color: #4C81F5;
|
||||||
@ -1743,6 +1554,12 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content:center;
|
justify-content:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .defen{
|
||||||
|
display: inline-block;
|
||||||
|
//width: 92px;
|
||||||
|
//text-align: right;
|
||||||
|
}*/
|
||||||
.left{
|
.left{
|
||||||
text-align: right;
|
text-align: right;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
@ -1795,24 +1612,7 @@ export default {
|
|||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.allDataChartWrap{
|
|
||||||
/* width: 375px;
|
|
||||||
height: 220px;*/
|
|
||||||
@include whBg(375px, 200px, #FFFFFF);
|
|
||||||
|
|
||||||
}
|
|
||||||
.allDataChart{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.webComAllData{
|
|
||||||
width: 420px;
|
|
||||||
height: 200px;
|
|
||||||
/*width: 375px;
|
|
||||||
height: 146px;*/
|
|
||||||
float: left;
|
|
||||||
margin: 10px;
|
|
||||||
}
|
|
||||||
.webCom {
|
.webCom {
|
||||||
@include whBg(420px, 200px, #FFFFFF);
|
@include whBg(420px, 200px, #FFFFFF);
|
||||||
float: left;
|
float: left;
|
||||||
@ -1927,6 +1727,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 95%;
|
height: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-table {
|
::v-deep .el-table {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
@ -1934,11 +1735,7 @@ export default {
|
|||||||
::v-deep .el-table--scrollable-x .el-table__body-wrapper {
|
::v-deep .el-table--scrollable-x .el-table__body-wrapper {
|
||||||
height: 95% !important;
|
height: 95% !important;
|
||||||
}
|
}
|
||||||
.comTabActive3 ::v-deep .el-table--scrollable-x .el-table__body-wrapper{
|
|
||||||
width: 100%;
|
|
||||||
//height: 90%;
|
|
||||||
//height: 84% !important;
|
|
||||||
}
|
|
||||||
.chartWrapWeb, .webTab {
|
.chartWrapWeb, .webTab {
|
||||||
height: calc(100% - 200px);
|
height: calc(100% - 200px);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -2006,47 +1803,4 @@ export default {
|
|||||||
::v-deep .el-switch__label * {
|
::v-deep .el-switch__label * {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
/* 自定义样式 */
|
|
||||||
.custom-date-picker ::v-deep .el-input__prefix{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.month {
|
|
||||||
display: inline-block;
|
|
||||||
width: 75px;
|
|
||||||
//height: 30px;
|
|
||||||
//line-height: 30px;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 20px 0px 0px 20px;
|
|
||||||
//border-radius: 0px 20px 20px 0px;
|
|
||||||
//border: 1px solid #4C81F5;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #FFFFFF;
|
|
||||||
::v-deep .el-input--suffix .el-input__inner{
|
|
||||||
|
|
||||||
}
|
|
||||||
::v-deep .el-input__inner{
|
|
||||||
padding-left: 0 !important;
|
|
||||||
padding-right: 0 !important;
|
|
||||||
border-radius: 20px 0px 0px 20px !important;
|
|
||||||
text-align: center !important;
|
|
||||||
font-size: 14px !important;
|
|
||||||
color: #FFFFFF !important;
|
|
||||||
border: 1px solid #4C81F5 !important;
|
|
||||||
background-color: transparent !important;
|
|
||||||
}
|
|
||||||
/* 自定义清除按钮样式 */
|
|
||||||
.custom-date-picker ::v-deep .el-input__suffix {
|
|
||||||
right: 0 !important;
|
|
||||||
padding-right: 10px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-date-picker ::v-deep .el-input__suffix-inner {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-date-picker ::v-deep .el-input__icon {
|
|
||||||
line-height: 1 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,213 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="address_wrap">
|
|
||||||
<div class="map_wrap" id="mapId">
|
|
||||||
</div>
|
|
||||||
<div class="button_wrap">
|
|
||||||
<div class="cancel_btn" @click="cancelHandler">取消</div>
|
|
||||||
<div class="confirm_btn" @click="successHandler">完成</div>
|
|
||||||
</div>
|
|
||||||
<div class="search_wrap">
|
|
||||||
<div class="section">
|
|
||||||
<input type="text" v-model="keyword" @change="searchHandler" placeholder="请输入地址" />
|
|
||||||
</div>
|
|
||||||
<div class="server_list" v-if="keyword">
|
|
||||||
<div class="text_box" v-for="(item, index) in addressList" :key="index" @click="chooseHandler(item, index)" :class="{'active': index == activeIndex}">
|
|
||||||
<div class="address_name">{{ item.name }}</div>
|
|
||||||
<div class="address_detail">{{ ( item.district || '' ) + ( item.address || '' ) }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { searchFun, getLocal, getAddress } from '@/utils/map'
|
|
||||||
export default {
|
|
||||||
name: "addressMap",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
keyword: '',
|
|
||||||
addressList: [],
|
|
||||||
activeIndex: '',
|
|
||||||
map: '',
|
|
||||||
marker: null,
|
|
||||||
cityCode: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
keyword() {
|
|
||||||
this.searchHandler()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mounted() {
|
|
||||||
sessionStorage.setItem('reportAddress', '')
|
|
||||||
await this.initMap()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async initMap() { // 初始化地图
|
|
||||||
this.map = new AMap.Map('mapId', {
|
|
||||||
viewMode: '2D', // 默认使用 2D 模式
|
|
||||||
zoom:11, //初始化地图层级
|
|
||||||
})
|
|
||||||
let res = await getLocal(this.map);
|
|
||||||
let lnglat = new AMap.LngLat(res?.lng, res?.lat);
|
|
||||||
let location = await getAddress(this.map, lnglat)
|
|
||||||
this.cityCode = location?.regeocode.addressComponent.adcode
|
|
||||||
//location?.regeocode?.addressComponent?.city || location?.regeocode?.addressComponent?.province
|
|
||||||
console.log('location', location);
|
|
||||||
},
|
|
||||||
async searchHandler() {
|
|
||||||
this.activeIndex = null
|
|
||||||
if( this.keyword ) {
|
|
||||||
this.addressList = await searchFun(this.map, this.cityCode, this.keyword,)
|
|
||||||
this.addressList = this.addressList.filter(item => !!item.location)
|
|
||||||
} else {
|
|
||||||
this.addressList = []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
chooseHandler(item, index) {
|
|
||||||
this.activeIndex = index;
|
|
||||||
this.addMarker()
|
|
||||||
},
|
|
||||||
addMarker() {
|
|
||||||
if( this.marker ) {
|
|
||||||
this.map.remove(this.marker)
|
|
||||||
}
|
|
||||||
let content = '<div class="dest-position"></div>';
|
|
||||||
let activeObj = this.addressList[this.activeIndex];
|
|
||||||
this.marker = new AMap.Marker({
|
|
||||||
position: new AMap.LngLat( activeObj.location.lng, activeObj.location.lat ),
|
|
||||||
content: content,
|
|
||||||
offset: new AMap.Pixel(-13, -30)
|
|
||||||
});
|
|
||||||
this.map.add(this.marker)
|
|
||||||
this.map.setCenter([activeObj.location.lng, activeObj.location.lat])
|
|
||||||
},
|
|
||||||
successHandler() {
|
|
||||||
if( this.activeIndex == null ) {
|
|
||||||
this.$toast('请选择具体地址')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
let activeObj = this.addressList[this.activeIndex];
|
|
||||||
let _tempObj = {
|
|
||||||
startPoiAddress: activeObj?.district + activeObj?.address + activeObj?.name,
|
|
||||||
startLat: activeObj?.location?.lat,
|
|
||||||
startLng: activeObj?.location?.lng,
|
|
||||||
adCode: activeObj?.adcode,
|
|
||||||
}
|
|
||||||
sessionStorage.setItem('reportAddress', JSON.stringify(_tempObj))
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$router.go(-1)
|
|
||||||
}, 1)
|
|
||||||
},
|
|
||||||
// 取消 返回上一页
|
|
||||||
cancelHandler() {
|
|
||||||
this.$router.go(-1)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.dest-position {
|
|
||||||
width: 30px;
|
|
||||||
height: 36px;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
background-image: url("~@/assets/report/destMarker.png");
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.address_wrap {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.map_wrap {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 60%;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
.button_wrap {
|
|
||||||
width: 100%;
|
|
||||||
padding: 5px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
zoom: 1;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
.cancel_btn {
|
|
||||||
width: 50px;
|
|
||||||
height: 27px;
|
|
||||||
background: #F37877;
|
|
||||||
font-size: 12px;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 27px;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 3px;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.confirm_btn {
|
|
||||||
width: 50px;
|
|
||||||
height: 27px;
|
|
||||||
background: rgba(5,193,98,1);
|
|
||||||
font-size: 12px;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 27px;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 3px;
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.search_wrap {
|
|
||||||
background-color: #fff;
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
height: 60%;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
overflow: auto;
|
|
||||||
.section {
|
|
||||||
height: 35px;
|
|
||||||
width: 100%;
|
|
||||||
background-color: #fff;
|
|
||||||
position: fixed;
|
|
||||||
top: 40%;
|
|
||||||
padding-top: 10px;
|
|
||||||
input {
|
|
||||||
width: 90%;
|
|
||||||
margin: 0 auto;
|
|
||||||
display: block;
|
|
||||||
border: none;
|
|
||||||
height: 30px;
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 0 10px;
|
|
||||||
background: #e2e0e0;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.server_list {
|
|
||||||
overflow-y: auto;
|
|
||||||
padding-top: 30px;
|
|
||||||
.text_box {
|
|
||||||
margin: 10px 25px;
|
|
||||||
padding-top: 10px;
|
|
||||||
.address_name {
|
|
||||||
font-size: 14px !important;
|
|
||||||
color: rgba(0,0,0,0.8);
|
|
||||||
}
|
|
||||||
.address_detail {
|
|
||||||
margin-top: 3px;
|
|
||||||
color: #c3c3c3 !important;
|
|
||||||
font-size: 12px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.active {
|
|
||||||
.address_name {
|
|
||||||
color: green !important;
|
|
||||||
}
|
|
||||||
.address_detail {
|
|
||||||
color: green !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|