Commit 716f2107 authored by 王礼鸿 Baimax Wang's avatar 王礼鸿 Baimax Wang

订单目标情况

parent f45962b2
......@@ -29,7 +29,14 @@ module.exports = {
assetsPublicPath: '/',
proxyTable: {
'/api': {
target: 'http://localhost:8080', // 测试
target: 'http://127.0.0.1:4523/m1/3446320-0-default', // 测试
changeOrigin: true, // 改变源(是否跨域)
pathRewrite: {
'^/api': '/'
}
},
'/m1/3446320-0-default/api': {
target: 'http://127.0.0.1:4523', // 测试
changeOrigin: true, // 改变源(是否跨域)
pathRewrite: {
'^/api': '/'
......
......@@ -10,6 +10,7 @@
"dependencies": {
"axios": "^1.4.0",
"echarts": "^5.4.3",
"element-ui": "^2.15.14",
"jquery": "^3.2.1",
"js-base64": "^3.7.5",
"js-md5": "^0.7.3",
......@@ -428,6 +429,14 @@
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
"dev": true
},
"node_modules/async-validator": {
"version": "1.8.5",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
"dependencies": {
"babel-runtime": "6.x"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
......@@ -673,6 +682,11 @@
"babel-types": "^6.24.1"
}
},
"node_modules/babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
"resolved": "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
},
"node_modules/babel-helpers": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
......@@ -1190,7 +1204,6 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
"dev": true,
"dependencies": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
......@@ -2369,7 +2382,6 @@
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
"deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
"dev": true,
"hasInstallScript": true
},
"node_modules/core-util-is": {
......@@ -2719,6 +2731,14 @@
"node": ">=0.10"
}
},
"node_modules/deepmerge": {
"version": "1.5.2",
"resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-1.5.2.tgz",
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/define-property": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
......@@ -2963,6 +2983,22 @@
"integrity": "sha512-kKiHnbrHME7z8E6AYaw0ehyxY5+hdaRmeUbjBO22LZMdqTYCO29EvF0T1cQ3pJ1RN5fyMcHl1Lmcsdt9WWJpJQ==",
"dev": true
},
"node_modules/element-ui": {
"version": "2.15.14",
"resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.14.tgz",
"integrity": "sha512-2v9fHL0ZGINotOlRIAJD5YuVB8V7WKxrE9Qy7dXhRipa035+kF7WuU/z+tEmLVPBcJ0zt8mOu1DKpWcVzBK8IA==",
"dependencies": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
"deepmerge": "^1.2.0",
"normalize-wheel": "^1.0.1",
"resize-observer-polyfill": "^1.5.0",
"throttle-debounce": "^1.0.1"
},
"peerDependencies": {
"vue": "^2.5.17"
}
},
"node_modules/elliptic": {
"version": "6.5.4",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
......@@ -5621,6 +5657,11 @@
"node": ">=4"
}
},
"node_modules/normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
},
"node_modules/nth-check": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
......@@ -7235,8 +7276,7 @@
"node_modules/regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
"dev": true
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
},
"node_modules/regenerator-transform": {
"version": "0.10.1",
......@@ -7428,6 +7468,11 @@
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
"dev": true
},
"node_modules/resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"node_modules/resolve": {
"version": "1.22.2",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",
......@@ -8279,6 +8324,14 @@
"inherits": "2"
}
},
"node_modules/throttle-debounce": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==",
"engines": {
"node": ">=4"
}
},
"node_modules/through2": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
......@@ -10293,6 +10346,14 @@
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
"dev": true
},
"async-validator": {
"version": "1.8.5",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
"requires": {
"babel-runtime": "6.x"
}
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
......@@ -10532,6 +10593,11 @@
"babel-types": "^6.24.1"
}
},
"babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
"resolved": "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
},
"babel-helpers": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
......@@ -11044,7 +11110,6 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
"dev": true,
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
......@@ -12022,8 +12087,7 @@
"core-js": {
"version": "2.6.12",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
"dev": true
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
},
"core-util-is": {
"version": "1.0.3",
......@@ -12324,6 +12388,11 @@
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
"dev": true
},
"deepmerge": {
"version": "1.5.2",
"resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-1.5.2.tgz",
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
},
"define-property": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
......@@ -12521,6 +12590,19 @@
"integrity": "sha512-kKiHnbrHME7z8E6AYaw0ehyxY5+hdaRmeUbjBO22LZMdqTYCO29EvF0T1cQ3pJ1RN5fyMcHl1Lmcsdt9WWJpJQ==",
"dev": true
},
"element-ui": {
"version": "2.15.14",
"resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.14.tgz",
"integrity": "sha512-2v9fHL0ZGINotOlRIAJD5YuVB8V7WKxrE9Qy7dXhRipa035+kF7WuU/z+tEmLVPBcJ0zt8mOu1DKpWcVzBK8IA==",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
"deepmerge": "^1.2.0",
"normalize-wheel": "^1.0.1",
"resize-observer-polyfill": "^1.5.0",
"throttle-debounce": "^1.0.1"
}
},
"elliptic": {
"version": "6.5.4",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
......@@ -14633,6 +14715,11 @@
"sort-keys": "^1.0.0"
}
},
"normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
},
"nth-check": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
......@@ -16012,8 +16099,7 @@
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
"dev": true
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
},
"regenerator-transform": {
"version": "0.10.1",
......@@ -16173,6 +16259,11 @@
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
"dev": true
},
"resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"resolve": {
"version": "1.22.2",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",
......@@ -16863,6 +16954,11 @@
"inherits": "2"
}
},
"throttle-debounce": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
},
"through2": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
......
......@@ -12,6 +12,7 @@
"dependencies": {
"axios": "^1.4.0",
"echarts": "^5.4.3",
"element-ui": "^2.15.14",
"jquery": "^3.2.1",
"js-base64": "^3.7.5",
"js-md5": "^0.7.3",
......
......@@ -103,6 +103,7 @@ export const transportTypeOrderFinishPie = (date) => fetch("/api/query/dash_boar
export const customerOrderFinishPie = (date) => fetch("/api/query/dash_board/action/get_order_finish_data_by_customer_day", {aux: {"cur_day": date}}, "POST")
export const getOrderFinishDataByCondition = (aux) => fetch("/api/query/*/action/get_order_finish_data_by_condition", {aux: aux}, "POST")
export const getOrderWeightAndProportionList = (aux) => fetch("/api/query/dash_board/action/get_order_weight_and_proportion_list", {aux: aux}, "POST")
export const getTargetOrderDataByCondition = (aux) => fetch("/m1/3446320-0-default/api/query/*/action/get_target_order_data_by_condition", {aux: aux}, "POST")
//流失客户 & 新增客户
export const getOrderLoseAddCustomer = (cur_day) => fetch('/api/query/*/action/get_order_loss_add_customer', {
......
import { getTargetOrderDataByCondition} from '../../../api/apiList';
import {calc_hb_str, calc_zb_str, conver_amont} from "../../../utils/numUtil";
import mockData from "../mockData/target-achievement.json";
export const getData = async (aux,callback) => {
let resList = new Array();
await getTargetOrderDataByCondition(aux).then(function (res) {
resList = res.data;
});
callback(resList);
return resList
}
export const getTargetOrderDataByConditionCount = async (aux,callback) => {
let resData;
await getTargetOrderDataByCondition(aux).then(function (res) {
resData = dataFormatter(res.data);
});
callback(resData);
return resData
}
function generateData(count, res) {
res.push({
title: "吨位(万吨)",
actualValue: conver_amont(count.unit_weight),
targetValue: conver_amont(count.target_unit_weight),
})
res.push({
title: "营业额(万元)",
actualValue: conver_amont(count.sell_settle_amount),
targetValue: conver_amont(count.target_sell_settle_amount),
})
res.push({
title: "净利润(万元)",
actualValue: conver_amont(count.gross_profit_amount),
targetValue: conver_amont(count.target_gross_profit_amount),
})
}
function dataFormatter(data){
let res = [];
for (let i = 0; i < data.length; i++) {
if (data[i].group_name === "总计"){
generateData(data[i], res);
break;
}
}
//mock数据,接口没好的时候用的
if (res.length === 0){
let count = mockData.count;
generateData(count, res);
}
return res;
}
{
"01":{
"day": [
{
"name": "上海事业部-汽运自运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-汽运外发",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-水运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-铁运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-小计",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "广东事业部-汽运自运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "广东事业部-汽运外发",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "广东事业部-水运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "广东事业部-铁运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "广东事业部-小计",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "河南事业部-汽运自运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "河南事业部-汽运外发",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "河南事业部-水运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "河南事业部-铁运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "河南事业部-小计",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "总计",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
}
],
"month": [
{
"name": "上海事业部-汽运自运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-汽运外发",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-水运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-铁运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-小计",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
}
],
"year": [
{
"name": "上海事业部-汽运自运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-汽运外发",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-水运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-铁运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-小计",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
}
]
},
"02":{
"day": [
{
"name": "上海事业部-汽运自运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-汽运外发",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-水运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-铁运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-小计",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "广东事业部-汽运自运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "广东事业部-汽运外发",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "广东事业部-水运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "广东事业部-铁运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "广东事业部-小计",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
}
],
"month": [
{
"name": "上海事业部-汽运自运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-汽运外发",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-水运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-铁运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-小计",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
}
],
"year": [
{
"name": "上海事业部-汽运自运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-汽运外发",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-水运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-铁运",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
},
{
"name": "上海事业部-小计",
"ac_weight": 100,
"ta_weight": 100,
"lz_weight": 100,
"ac_amount": 100,
"ta_amount": 100,
"lz_amount": 100,
"ac_profit": 100,
"ta_profit": 100,
"lz_profit": 100
}
]
},
"count":{
"sell_settle_amount": 0,
"group_name": "总计",
"gross_profit_amount": 0,
"target_gross_profit_amount": 0,
"sort_num": 1,
"target_unit_weight": 0,
"target_sell_settle_amount": 0,
"unit_weight": 0,
"key": "总计"
}
}
<template>
<div class="target-achievement">
<div class="menu">
<input type="button" :class="{'selectedBtn': currentBtn.subdivide === '01'}" value="事业部细分" @click="clickBtn('subdivide','01')">
<input type="button" :class="{'selectedBtn': currentBtn.subdivide === '02'}" value="区域细分" @click="clickBtn('subdivide','02')">
</div>
<div class="menu">
<input type="button" :class="{'selectedBtn': currentBtn.date === 'day'}" value="日统计" @click="clickBtn('date','day')">
<input type="button" :class="{'selectedBtn': currentBtn.date === 'month'}" value="月统计" @click="clickBtn('date','month')">
<input type="button" :class="{'selectedBtn': currentBtn.date === 'year'}" value="年统计" @click="clickBtn('date','year')">
</div>
<div class="list">
<el-table :data="data" height="650" style="font-size: 18px" :header-cell-style="headStyleJs" :cell-style="bodyStyleJs">
<el-table-column
prop="group_name"
label="" width="300">
</el-table-column>
<el-table-column
label="吨位(万吨)">
<el-table-column
prop="unit_weight"
:formatter="cellNumFormatter"
label="实际值">
</el-table-column>
<el-table-column
prop="target_unit_weight"
:formatter="cellNumFormatter"
label="目标值">
</el-table-column>
</el-table-column>
<el-table-column
label="营业额(万元)">
<el-table-column
prop="sell_settle_amount"
:formatter="cellNumFormatter"
label="实际值">
</el-table-column>
<el-table-column
prop="target_sell_settle_amount"
:formatter="cellNumFormatter"
label="目标值">
</el-table-column>
</el-table-column>
<el-table-column
label="净利润(万元)">
<el-table-column
prop="gross_profit_amount"
:formatter="cellNumFormatter"
label="实际值">
</el-table-column>
<el-table-column
prop="target_gross_profit_amount"
:formatter="cellNumFormatter"
label="目标值">
</el-table-column>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import mockData from "./mockData/target-achievement.json";
import {getData} from "./js/targetAchievementData";
import {conver_amont} from "../../utils/numUtil";
export default {
name:"TargetAchievement",
data() {
return {
borderLabel:[
'吨位(万吨)',
'营业额(万元)',
'营业额(万元)',
],
borderField:[
'target_unit_weight',
'target_sell_settle_amount',
],
currentBtn:{
date: this.$route.query.code ? this.$route.query.code : "day",
subdivide: "01",
},
dateTimeChoice:{
day: '昨日',
month: "上月",
year: "去年",
},
rowHeight: "50px",
data: mockData["01"][this.$route.query.code ? this.$route.query.code : "day"]
};
},
methods: {
clickBtn(type,dimension){
this.currentBtn[type] = dimension;
this.getData();
},
getData() {
getData({cur_day: this.today,time_type:this.currentBtn.date,group_type:this.currentBtn.subdivide},
(res) => {
this.data = res;
}
);
},
bodyStyleJs(param){
var {row, rowIndex,column} = param;
let style = {
height: this.rowHeight,
"text-align": "center"
};
if (row.group_name && (row.group_name.indexOf("总计") !== -1 || row.group_name.indexOf("小计") !== -1)){
style["font-weight"] = "bolder";
style["font-size"] = "x-large";
}
if (column && (column.property === "group_name" || this.borderField.includes(column.property))){
style["border-right"] = "1px solid #aaaa";
}
style["background-color"] = (rowIndex % 2 === 1)?"#0E5FFF20":"#0E5FFF30";
return style;
},
headStyleJs(param){
let style = {
"background-color": "var(--global-background-color)",
"text-align": "center",
color: "white"
};
if (!param.column.label || this.borderLabel.includes(param.column.label) || this.borderField.includes(param.column.property)){
style["border-right"] = "1px solid #aaaa";
}
return style;
},
cellNumFormatter(row, column, cellValue, index){
return conver_amont(cellValue);
}
},
mounted() {
this.getData();
},
watch:{
countDown(n,o){
if (n === 1){
this.getData();
}
},
},
props:{
countDown:{
type: Number
}
}
};
</script>
<style scoped>
.target-achievement{
width: 100%;
height: 100%;
}
.menu{
width: 100%;
height: 5%;
display: flex;
align-items: center;
padding-left: 2%;
}
.list{
height: 80%;
width: 100%;
color: white;
padding: 2rem;
}
input[type="button"]{
height: 80%;
margin: 0.5%;
border: none;
font-size: 12px;
border-radius: 25px;
font-weight: bold;
padding: 0 10px;
color: #00c8d6;
background-color: #1234a1;
}
input[type="button"]:hover{
color: #1234a1 !important;
background-color: #00c8d6 !important;
}
.selectedBtn{
color: #1234a1 !important;
background-color: #00c8d6 !important;
}
.el-table{
color: white;
background-color: rgba(0,0,0,0);
border: none;
}
.el-table::-webkit-scrollbar { width: 0 !important }
.list /deep/ td.el-table__cell {
border: none;
}
.list /deep/ th.el-table__cell {
border: none;
}
.list /deep/ .el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0;
}
/* // ----------修改elementui表格的默认样式----------- */
.list /deep/ .el-table__body-wrapper::-webkit-scrollbar {
// 整个滚动条
width: 0; // 纵向滚动条的宽度
background: rgba(213, 215, 220, 0.3);
border: none;
}
.list /deep/ .el-table__body-wrapper::-webkit-scrollbar-track {
// 滚动条轨道
border: none;
}
.list /deep/ tr:hover>td.el-table__cell{background-color:#0000}
/* // --------------------隐藏table gutter列和内容区右侧的空白 start */
.list /deep/ th.gutter {
display: none;
width: 0;
}
/*
.list /deep/ colgroup col[name="gutter"] {
display: none;
width: 0;
}
*/
.list /deep/ tr{
background-color: #0000;
}
.list /deep/ .el-table--group::after{
display: none;
}
/* // --------------------隐藏table gutter列和内容区右侧的空白 end */
.unSelectedBtn{
color: #00c8d6;
background-color: #1234a1;
}
</style>
......@@ -51,36 +51,36 @@
</display-board>
<div class="trade_middle" style="border: none;box-shadow: none;">
<div style="display: flex; justify-content: space-between; height: 50%;">
<display-board style="width: 32%;" title="每日目标情况">
<display-board style="width: 32%;" title="每日目标情况" @click.native="routerTo('/target-achievement','day')">
<div
style="width: 100%; height: 100%; float:left; padding: 2%; line-height: 33px; display: flex; align-items: center; font-size: 10px;">
<table-column style="float: left;width: 35%;" :data="mockData.mrmbqk" name="title" show-head/>
<table-column style="float: left;width: 35%;" :data="targetAchievement.day" name="title" show-head/>
<table-column
style="float: left;width: 45%;font-size: 24px;font-weight: bold;color: #5eeef4;text-align: center;"
:data="mockData.mrmbqk" name="actualValue" title="实时值" show-head/>
<table-column style="float: left;width: 20%;" :data="mockData.mrmbqk" name="currentValue" title="目标值"
:data="targetAchievement.day" name="actualValue" title="实时值" show-head/>
<table-column style="float: left;width: 20%;" :data="targetAchievement.day" name="targetValue" title="目标值"
show-head/>
</div>
</display-board>
<display-board style="width: 32%;" title="月度目标情况">
<display-board style="width: 32%;" title="月度目标情况" @click.native="routerTo('/target-achievement','month')">
<div
style="width: 100%; height: 100%; float:left; padding: 2%; line-height: 33px; display: flex; align-items: center; font-size: 10px;">
<table-column style="float: left;width: 35%;" :data="mockData.ydmbqk" name="title" show-head/>
<table-column style="float: left;width: 35%;" :data="targetAchievement.month" name="title" show-head/>
<table-column
style="float: left;width: 45%;font-size: 24px;font-weight: bold;color: #5eeef4;text-align: center;"
:data="mockData.ydmbqk" name="actualValue" title="实时值" show-head/>
<table-column style="float: left;width: 20%;" :data="mockData.ydmbqk" name="currentValue" title="目标值"
:data="targetAchievement.month" name="actualValue" title="实时值" show-head/>
<table-column style="float: left;width: 20%;" :data="targetAchievement.month" name="targetValue" title="目标值"
show-head/>
</div>
</display-board>
<display-board style="width: 32%;" title="年度目标情况">
<display-board style="width: 32%;" title="年度目标情况" @click.native="routerTo('/target-achievement','year')">
<div
style="width: 100%; height: 100%; float:left; padding: 2%; line-height: 33px; display: flex; align-items: center; font-size: 10px;">
<table-column style="float: left;width: 35%;" :data="mockData.ndmbqk" name="title" show-head/>
<table-column style="float: left;width: 35%;" :data="targetAchievement.year" name="title" show-head/>
<table-column
style="float: left;width: 45%;font-size: 24px;font-weight: bold;color: #5eeef4;text-align: center;"
:data="mockData.ndmbqk" name="actualValue" title="实时值" show-head/>
<table-column style="float: left;width: 20%;" :data="mockData.ndmbqk" name="currentValue" title="目标值"
:data="targetAchievement.year" name="actualValue" title="实时值" show-head/>
<table-column style="float: left;width: 20%;" :data="targetAchievement.year" name="targetValue" title="目标值"
show-head/>
</div>
</display-board>
......@@ -166,6 +166,7 @@ import {
import {calc_hb_str, calc_tb_str, conver_amont, conver_num_retain} from "../utils/numUtil";
import {getTransportTypeOrderFinishPie, getCustomerOrderFinishPie} from "./databoard/js/indexPieData";
import moment from 'moment'
import {getTargetOrderDataByConditionCount} from "./databoard/js/targetAchievementData";
export default {
components: {
RingPieChart,
......@@ -495,7 +496,12 @@ export default {
transportTypeOrderFinishPie: [],
customerOrderFinishPie: [],
arCompanyList: [],
charts: {}
charts: {},
targetAchievement:{
day: null,
month: null,
year: null,
}
}
},
methods: {
......@@ -572,13 +578,14 @@ export default {
});
},
refreshData() {
getTransportTypeOrderFinishPie(res => this.transportTypeOrderFinishPie = res, this.today);
getCustomerOrderFinishPie(res => this.customerOrderFinishPie = res, this.today);
this.showBusinessConditionDatas();
this.getArSummaryBar();
this.getArCompanyList();
this.getLoseAndAdd();
this.getOrderBusinessCondition();
getTransportTypeOrderFinishPie(res => this.transportTypeOrderFinishPie = res, this.today);
getCustomerOrderFinishPie(res => this.customerOrderFinishPie = res, this.today);
this.showBusinessConditionDatas();
this.getArSummaryBar();
this.getArCompanyList();
this.getLoseAndAdd();
this.getOrderBusinessCondition();
this.getTargetOrderDataByConditionCount();
},
pieDataValueFormatter(param) {
return conver_amont(param) + "万吨";
......@@ -605,6 +612,11 @@ export default {
this.yl.amount = conver_amont(data.cur_unfinish_sell_settle_amount);
this.yl.weight = conver_amont(data.cur_unfinish_unit_weight);
})
},
getTargetOrderDataByConditionCount() {
getTargetOrderDataByConditionCount({cur_day: this.today,time_type:"day",group_type:"01"},(res) => {this.targetAchievement.day = res;})
getTargetOrderDataByConditionCount({cur_day: this.today,time_type:"month",group_type:"01"},(res) => {this.targetAchievement.month = res;})
getTargetOrderDataByConditionCount({cur_day: this.today,time_type:"year",group_type:"01"},(res) => {this.targetAchievement.year = res;})
}
},
mounted() {
......
......@@ -9,9 +9,13 @@ import ArMonthlyCompanyBar from "../../databoard/components/chart/ar-monthly-com
import TurnoverDetail from "../../databoard/databoard/turnover-detail.vue";
import OrderProportion from "../../databoard/databoard/order-proportion.vue";
import LostAddCustomer from "../../databoard/databoard/lost-add-customer.vue";
import TargetAchievement from "../../databoard/databoard/target-achievement.vue";
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(Router)
Vue.use(ElementUI)
export default new Router({
routes: [
......@@ -69,6 +73,11 @@ export default new Router({
path: '/lost-add-customer',
name: 'lostAddCustomer',
component: LostAddCustomer
}
},
{
path: '/target-achievement',
name: 'TargetAchievement',
component: TargetAchievement
},
]
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment