Commit 1ef08bfc authored by liuzeheng's avatar liuzeheng
parents 14dfe002 208bd0fe
......@@ -271,12 +271,7 @@
<el-table-column label="控货总V值" align="center" prop="khSumV" />
<el-table-column label="控货占比" align="center" prop="khSumZb" />
<el-table-column label="是否首次成交" align="center" prop="isFirst" />
<el-table-column
label="首次成交时间"
align="center"
prop="firstDate"
width="200px"
>
<el-table-column label="首次成交时间" align="center" prop="firstDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.firstDate) }}</span>
</template>
......@@ -287,7 +282,7 @@
<el-table-column label="客户角色" align="center" prop="customerrole" />
<el-table-column label="客户国家" align="center" prop="country" />
<el-table-column
label="客户创建时间"
label="客户创建时间"
align="center"
prop="createtime"
width="200px"
......@@ -504,6 +499,8 @@ export default {
let s = this.$route.query.sDate;
let e = this.$route.query.eDate;
let bd = this.$route.query.duibiYear;
//客户编号
let number = this.$route.query.number;
if (sSalesmanid != undefined && sSalesmanid != null) {
this.queryParams.salesmanid = parseInt(sSalesmanid);
}
......@@ -520,6 +517,10 @@ export default {
if (bd != undefined && bd != null) {
this.queryParams.duibiYear = bd;
}
if (number != undefined && number != null) {
this.queryParams.searchtype = "eq";
this.queryParams.name = number;
}
this.getTreeselect();
this.getList();
});
......
......@@ -151,7 +151,7 @@ export default {
},
height: {
type: String,
default: "1500px",
default: "500px",
},
autoResize: {
type: Boolean,
......@@ -179,12 +179,14 @@ export default {
duibiYear: getLastYear(), //对比年份
deptid: undefined, //部门
salesmanid: undefined, //客户经理
number: undefined, //客户编号
pageNo: 1,
pageSize: 30,
},
//报表权限信息
objEcwReportPermission: {},
DeptEx: { id: undefined, name: undefined, parentId: undefined },
resultList: [],
};
},
watch: {},
......@@ -228,9 +230,13 @@ export default {
initChart() {
var chartDom = this.$refs["mainBar"];
this.chart = echarts.init(chartDom, "macarons");
this.chart.on("click", () => {
this.chart.on("click", (params) => {
if (this.isRight() == false) return;
let p = {};
this.queryParams.salesmanid = parseInt(
this.resultList[params.dataIndex].salesmanid
);
this.queryParams.number = this.resultList[params.dataIndex].number;
Object.assign(p, this.queryParams);
this.$router.push({
path: "/report/customer_analysis",
......@@ -244,7 +250,8 @@ export default {
getReportResult(this.queryParams).then((response) => {
//全部列表数据
this.total = response.data.total;
let resultList = response.data.resultList;
this.resultList = response.data.resultList;
let resultList2 = response.data.resultList;
this.loading = false;
this.chart.setOption({
title: {
......@@ -263,10 +270,12 @@ export default {
//var s=JSON.stringify(item);
//alert(s);
//在数据中查询
let vR = resultList.filter((r) => r.name === item.name);
let sN = item.name;
var arr = sN.split("_");
let vR = resultList2.filter((r) => r.number === arr[1]);
result += "客户:" + item.name + "<br/>";
result += "客户编号:" + vR[0].number + "<br/>";
result += "客户经理部门:" + vR[0].deptname + "<br/>";
result += "客户经理" + vR[0].salesman + "<br/>";
result += "总V值:" + item.value + "<br/>";
result += "海运V值:" + vR[0].sumvolume1 + "<br/>";
result += "空运V值:" + vR[0].sumweight3 + "<br/>";
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form
:model="queryParams"
ref="queryForm"
......@@ -10,7 +9,11 @@
label-width="100px"
>
<el-form-item label="订单编号" prop="name">
<el-select v-model="queryParams.SearchType1" clearable style="width: 100px">
<el-select
v-model="queryParams.SearchType1"
clearable
style="width: 100px"
>
<el-option
v-for="dict in SearchType"
:key="dict.value"
......@@ -26,8 +29,12 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="提单号" prop="empGender">
<el-select v-model="queryParams.status" clearable style="width: 100px">
<el-form-item label="提单号" prop="tidanNo">
<el-select
v-model="queryParams.SearchType2"
clearable
style="width: 100px"
>
<el-option
v-for="dict in SearchType"
:key="dict.value"
......@@ -37,14 +44,18 @@
</el-select>
<el-input
style="width: 200px"
v-model="queryParams.empGender"
v-model="queryParams.tidanNo"
placeholder="请输入提单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="发货人编号">
<el-select v-model="queryParams.status" clearable style="width: 100px">
<el-select
v-model="queryParams.SearchType3"
clearable
style="width: 100px"
>
<el-option
v-for="dict in SearchType"
:key="dict.value"
......@@ -54,14 +65,18 @@
</el-select>
<el-input
style="width: 200px"
v-model="queryParams.name"
v-model="queryParams.fhNumber"
placeholder="请输入发货人编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="收货人编号" prop="delFlag">
<el-select v-model="queryParams.status" clearable style="width: 100px">
<el-select
v-model="queryParams.SearchType4"
clearable
style="width: 100px"
>
<el-option
v-for="dict in SearchType"
:key="dict.value"
......@@ -71,7 +86,7 @@
</el-select>
<el-input
style="width: 200px"
v-model="queryParams.delFlag"
v-model="queryParams.fhNumber"
placeholder="请输入收货人编号"
clearable
@keyup.enter.native="handleQuery"
......@@ -80,25 +95,27 @@
<el-form-item label="唛头" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请输入备注信息"
placeholder="请输入唛头"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="客户经理" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请输入备注信息"
<el-form-item label="客户经理" prop="salesmanId">
<user-selector
manage
v-model="queryParams.salesmanId"
clearable
@keyup.enter.native="handleQuery"
@change="handleQuery"
:prepend="{ id: 0, nickname: $t('未分配客户经理') }"
/>
</el-form-item>
<el-form-item label="部门" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请选择部门"
clearable
@keyup.enter.native="handleQuery"
<treeselect
v-model="queryParams.deptid"
:options="deptOptions"
:show-count="true"
:placeholder="$t('请选择部门')"
:normalizer="normalizer"
/>
</el-form-item>
......@@ -107,16 +124,11 @@
:type="DICT_TYPE.ORDER_STATUS"
v-model="queryParams.status"
@keyup.enter.native="handleQuery"
:filter="statusDictFilter"
clearable
/>
</el-form-item>
<el-form-item
:label="$t('运输方式')"
prop="transportId"
v-if="!transportId"
>
<el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model.number="queryParams.transportId"
......@@ -141,17 +153,23 @@
</el-select>
</el-form-item>
<el-form-item label="目的国" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="选择目的国"
<el-form-item label="目的国" prop="muDiGuo">
<el-select
clearable
@keyup.enter.native="handleQuery"
/>
v-model="queryParams.muDiGuo"
:placeholder="$t('请选择国家')"
>
<el-option
v-for="dict in countryList"
:key="dict.id"
:label="isChinese ? dict.nameZh : dict.nameEn"
:value="parseInt(dict.id)"
/>
</el-select>
</el-form-item>
<el-form-item label="目的城市" prop="remark">
<el-form-item label="目的城市" prop="muDiShi">
<el-input
v-model="queryParams.remark"
v-model="queryParams.muDiShi"
placeholder="选择目的城市"
clearable
@keyup.enter.native="handleQuery"
......@@ -180,61 +198,81 @@
clearable
/>
</el-form-item>
<el-form-item label="重泡类型" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请输入备注信息"
clearable
@keyup.enter.native="handleQuery"
/>
<el-select v-model="queryParams.zpType" clearable>
<el-option label="重货" value="2"></el-option>
<el-option label="泡货" value="3"></el-option>
<el-option label="普货" value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item label="付款方" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="选择付款方"
clearable
@keyup.enter.native="handleQuery"
/>
<el-select v-model="queryParams.drawee" clearable>
<el-option label="发货方" value="1"></el-option>
<el-option label="收货方" value="2"></el-option>
<el-option label="自定义" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="渠道" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="选择渠道"
clearable
@keyup.enter.native="handleQuery"
/>
<el-select v-model="queryParams.shippingChannelId" clearable>
<el-option
v-for="item in channelList"
:key="item.id"
:label="$l(item, 'name')"
:value="item.channelId"
/>
</el-select>
</el-form-item>
<el-form-item label="资源类型" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="选择资源类型"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="资源类型" prop="ResourceType">
<el-select v-model="queryParams.ResourceType" clearable>
<el-option label="开发客户" value="1"></el-option>
<el-option label="公司客户" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="业绩类型" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="选择业绩类型"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="业绩类型" prop="YeJiType">
<el-select v-model="queryParams.YeJiType" clearable>
<el-option label="新客户" value="1"></el-option>
<el-option label="老客户" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据筛选" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请输入备注信息"
<el-select v-model="queryParams.dataSearch1" clearable style="width: 150px">
<el-option label="入仓箱数" value="1"></el-option>
<el-option label="入仓体积" value="2"></el-option>
<el-option label="入仓重量" value="3"></el-option>
<el-option label="重/泡标准" value="3"></el-option>
<el-option label="提货率" value="4"></el-option>
</el-select>
<el-select v-model="queryParams.dataSearch2" clearable style="width: 150px">
<el-option label="大于等于" value="1"></el-option>
<el-option label="等于" value="2"></el-option>
<el-option label="小于等于" value="3"></el-option>
</el-select>
<el-input style="width: 100px"
v-model="queryParams.dataSearch3"
placeholder="请输入数值"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="时间筛选" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请输入备注信息"
<el-form-item label="时间筛选" prop="dateSearch">
<el-select v-model="queryParams.dateSearch1" clearable>
<el-option label="订单创建时间" value="1"></el-option>
<el-option label="业绩创建时间" value="2"></el-option>
<el-option label="首次入仓时间" value="3"></el-option>
</el-select>
<el-date-picker
v-model="queryParams.sdate1"
type="date"
value-format="yyyy-MM-dd"
clearable
@keyup.enter.native="handleQuery"
placeholder="请输入起始日期"
/>
<el-date-picker
v-model="queryParams.edate1"
type="date"
value-format="yyyy-MM-dd"
clearable
placeholder="请输截止日期"
/>
</el-form-item>
<el-form-item>
......@@ -254,44 +292,111 @@
>
</el-form-item>
</el-form>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">总箱数 总方数 总重量 总V值</div>
</el-col>
</el-row>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">新客户 总箱数 总方数 总重量 总V值</div>
</el-col>
</el-row>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">旧客户 总箱数 总方数 总重量 总V值</div>
</el-col>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="排名" align="center" prop="px" />
<el-table-column label="订单编号" align="center" prop="orderNo" />
<el-table-column label="提单号" align="center" prop="tidanNo" />
<el-table-column label="发货人编号" align="center" prop="age" />
<el-table-column label="收货人编号" align="center" prop="email" />
<el-table-column
label="客户经理"
align="center"
prop="createTime"
width="180"
>
<el-table-column label="订单编号" align="center" prop="orderNo">
<template slot-scope="scope">
<router-link
:to="{
path: '/order/detail',
query: { orderId: scope.row.orderId },
}"
class="link-type"
>
<span>{{ scope.row.orderNo }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column label="提单号" align="center" prop="tidanNo">
<template slot-scope="scope">
<router-link
:to="{
path: '/order/detail',
query: { orderId: scope.row.orderId },
}"
class="link-type"
>
<span>{{ scope.row.tidanNo }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column label="发货人编号" align="center" prop="fhNumber">
<template slot-scope="{ row }">
<el-link
type="primary"
@click.native="$router.push('/customer/query/' + row.cfCustomerId)"
>{{ row.fhNumber }}</el-link
>
</template>
</el-table-column>
<el-table-column label="收货人编号" align="center" prop="shNumber">
<template slot-scope="{ row }">
<el-link
type="primary"
@click.native="$router.push('/customer/query/' + row.shCustomerId)"
>{{ row.shNumber }}</el-link
>
</template>
</el-table-column>
<el-table-column label="客户经理" align="center" prop="salesmanidName">
</el-table-column>
<el-table-column label="订单状态" align="center" prop="statusName" />
<el-table-column label="运输方式" align="center" prop="transportIdName" />
<el-table-column label="始发仓" align="center" prop="starttitlezh" />
<el-table-column label="目的国" align="center" prop="deleted" />
<el-table-column label="目的城市" align="center" prop="deleted" />
<el-table-column
label="始发仓"
align="center"
prop="startwarehousename"
/>
<el-table-column label="目的国" align="center" prop="muDiGuo" />
<el-table-column label="目的城市" align="center" prop="muDiShi" />
<el-table-column label="目的仓" align="center" prop="dstwarehousename" />
<el-table-column label="渠道" align="center" prop="deleted" />
<el-table-column label="渠道" align="center" prop="channelidName" />
<el-table-column label="创建时间" align="center" prop="createtime" />
<el-table-column label="业绩创建时间" align="center" prop="deleted" />
<el-table-column label="资源类型" align="center" prop="deleted" />
<el-table-column label="业绩类型" align="center" prop="deleted" />
<el-table-column
label="业绩创建时间"
align="center"
prop="businesstime"
/>
<el-table-column
label="资源类型"
align="center"
prop="showResourceType"
/>
<el-table-column label="业绩类型" align="center" prop="showYeJiType" />
<el-table-column label="唛头" align="center" prop="marks" />
<el-table-column label="始发仓" align="center" prop="deleted" />
<el-table-column label="入仓箱数" align="center" prop="sumquantity" />
<el-table-column label="体积" align="center" prop="sumvolume" />
<el-table-column label="重量" align="center" prop="sumweight" />
<el-table-column label="控货" align="center" prop="iscargocontrol" />
<el-table-column label="重货/泡货" align="center" prop="deleted" />
<el-table-column label="重货/泡货标准" align="center" prop="deleted" />
<el-table-column label="付款方" align="center" prop="deleted" />
<el-table-column label="首次入仓时间" align="center" prop="deleted" />
<el-table-column label="提货率" align="center" prop="deleted" />
<el-table-column label="入仓记录" align="center" prop="deleted" />
<el-table-column label="重货/泡货" align="center" prop="ordertypeShow" />
<el-table-column label="重货/泡货标准" align="center" prop="zpUnitShow" />
<el-table-column label="付款方" align="center" prop="draweeName" />
<el-table-column label="首次入仓时间" align="center" prop="firstInTime" />
<el-table-column label="提货率" align="center" prop="showThl">
</el-table-column>
<el-table-column label="入仓记录" align="center" prop="orderId">
<template slot-scope="{ row }">
<el-link type="primary" @click.native="showWarehouseLogs(row, 1)">
入仓记录
</el-link>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
......@@ -301,24 +406,35 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<WarehouseDetail
:orderId="showWarehouseInItemId"
:type="type"
v-if="showWarehouseInItemId"
@close="showWarehouseInItemId = null"
></WarehouseDetail>
</div>
</template>
<script>
import UserSelector from "@/components/UserSelector";
import { getCountryListAll } from "@/api/ecw/country";
import Treeselect from "@riophae/vue-treeselect";
//自定义目录数样式
import "@/assets/styles/vue-treeselect.css";
import { getWarehouseList } from "@/api/ecw/warehouse";
import { getListPage, exportExcel } from "@/api/report/salesanalysis";
import { getCurUserPermission } from "@/api/report/EcwReportPermission";
import { getAllChannelList, getChannelList } from "@/api/ecw/channel";
import { listSimpleDepts } from "@/api/system/dept";
//入仓记录页面
import WarehouseDetail from "@/views/ecw/order/components/WarehouseDetail";
//2024-04-27
export default {
name: "sales_analysis",
name: "ReportSales_analysisIndex",
components: {
UserSelector,
Treeselect,
WarehouseDetail,
},
data() {
return {
......@@ -336,6 +452,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
deptOptions: undefined,
dateRangeCreateTime: [],
SearchType: [
{ value: "in", label: "包含" },
......@@ -347,14 +464,36 @@ export default {
queryParams: {
pageNo: 1,
pageSize: 10,
startWarehouseId: undefined,
transportId: undefined,//运输方式
SearchType1:undefined,//订单编号查询类型
orderNo:undefined,//订单编号
tidanNo:undefined,//提单号
marks:undefined,//唛头
isCargoControl:undefined,//是否控货
SearchType3: undefined,
fhNumber: undefined, //发货客户编号
SearchType3: undefined,
shNumber: undefined, //收货客户编号
startWarehouseId: undefined, //始发仓
muDiGuo: undefined, //目的国
muDiShi: undefined, //目的城市
dstwarehousename: undefined, //目的仓
transportId: undefined, //运输方式
SearchType1: undefined, //订单编号查询类型
orderNo: undefined, //订单编号
SearchType2: undefined, //提单号的查询类别
tidanNo: undefined, //提单号
marks: undefined, //唛头
status: undefined, //订单状态
salesmanId: undefined, //客户经理
isCargoControl: undefined, //是否控货
deptid: undefined, //部门
drawee: undefined, //付款方
zpType: undefined, //货物类型,1普货,2重货,3泡货
YeJiType: undefined, //业绩类型 新客户,老客户
dateSearch1: undefined, //时间筛选类型
sdate1: undefined, //开始时间
edate2: undefined, //结束时间
dataSearch1:undefined,//数据类型筛选
dataSearch2:undefined,//比较符号设置
dataSearch3:undefined,//数据值
},
channelList: [],
countryList: [],
// 表单参数
form: {},
// 表单校验
......@@ -362,9 +501,19 @@ export default {
warehouseList: [],
//报表权限信息
objEcwReportPermission: {},
DeptEx: { id: undefined, name: undefined, parentId: undefined },
showWarehouseInItemId: undefined,
type: 1,
};
},
created() {
//获取国家列表
getCountryListAll().then((r) => {
this.countryList = r.data;
});
getAllChannelList().then((res) => (this.channelList = res.data));
getWarehouseList().then((res) => (this.warehouseList = res.data));
this.loading = false;
//获取当前用户报表权限
......@@ -376,6 +525,7 @@ export default {
// this.showCustomsManage = false;
// this.showDept = false;
}
this.getTreeselect();
this.getList();
});
},
......@@ -418,6 +568,10 @@ export default {
};
this.resetForm("form");
},
isChinese() {
//基础函数,判断系统显示语言是中文还是英文
return this.$i18n.locale === "zh_CN";
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
......@@ -448,7 +602,66 @@ export default {
})
.catch(() => {});
},
// 显示入仓记录
showWarehouseLogs(row, type) {
debugger;
this.type = type;
this.showWarehouseInItemId = row.orderId;
},
/** 查询部门下拉树结构 + 岗位下拉 */
getTreeselect() {
if (this.objEcwReportPermission.permissionFw == 3) {
listSimpleDepts().then((response) => {
// 处理 deptOptions 参数
this.deptOptions = [];
this.deptOptions.push(...this.handleTree(response.data, "id"));
});
} else if (this.objEcwReportPermission.permissionFw == 2) {
this.DeptEx.id = this.objEcwReportPermission.deptId;
getDeptChild(this.DeptEx).then((response) => {
this.deptOptions = [];
this.deptOptions.push(...this.handleTree(response.data, "id"));
});
}
},
normalizer(node) {
//格式化部门的下拉框
return {
id: node.id,
label: node.name,
children: node.children,
};
},
},
};
</script>@/api/report/vz
</script>
<style lang="scss" scoped>
.dashboard-editor-container {
padding: 32px;
background-color: rgb(240, 242, 245);
position: relative;
.chart-wrapper {
background: #fff;
padding: 32px 32px 0;
margin-bottom: 32px;
margin-left: 32px;
}
}
@media (max-width: 1024px) {
.chart-wrapper {
padding: 8px;
}
}
/* .my-process-designer {
height: calc(100vh - 200px);
} */
.box-card {
width: 100%;
margin-bottom: 20px;
}
</style>
\ No newline at end of file
......@@ -10,38 +10,37 @@
>
<el-form-item label="选择日期" prop="testName">
<el-date-picker
v-model="dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
v-model="queryParams.sDate"
type="month"
value-format="yyyy-MM"
clearable
placeholder="请输起始月"
/>
<el-date-picker
v-model="queryParams.eDate"
type="month"
value-format="yyyy-MM"
clearable
placeholder="请输截止月"
/>
</el-form-item>
<el-form-item label="同比年份" prop="duibiYear">
<el-input
<el-date-picker
v-model="queryParams.duibiYear"
placeholder="请输入排序"
clearable
@keyup.enter.native="handleQuery"
type="year"
value-format="yyyy"
placeholder="请选择同比年份"
/>
</el-form-item>
<el-form-item label="部门" prop="deptid">
<el-select
v-model="queryParams.deptId"
style="width: 300px"
<treeselect
v-model="queryParams.deptid"
:options="deptOptions"
:show-count="true"
:placeholder="$t('请选择部门')"
clearable
>
<el-option
v-for="item in this.deptData"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
:normalizer="normalizer"
/>
</el-form-item>
<el-form-item label="客户经理" prop="salesmanid">
<user-selector
......@@ -59,51 +58,114 @@
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>
<el-form size="small" :inline="true" label-width="100px">
<el-form-item label="客业绩总览" prop="allsumvolume">
<el-input
v-model="allsumvolume"
placeholder=""
:readonly="true"
clearable
/>
</el-form-item>
<el-form-item label="海运拼柜" prop="sumvolume1">
<el-input
v-model="sumvolume1"
placeholder=""
:readonly="true"
clearable
/>
</el-form-item>
<el-form-item label="专线空运" prop="sumweight3">
<el-input
v-model="sumweight3"
placeholder=""
:readonly="true"
clearable
/>
</el-form-item>
<el-form-item label="成交客户总览" prop="sumCustomerCount">
<el-input
v-model="sumCustomerCount"
placeholder=""
:readonly="true"
clearable
/>
</el-form-item>
<el-form-item label="首次成交" prop="fisCustomerCount">
<el-input
v-model="fisCustomerCount"
placeholder=""
:readonly="true"
clearable
/>
</el-form-item>
</el-form>
<el-row :gutter="40" class="panel-group">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div
class="card-panel"
@click="
checkPermi(['member:user'])
? $router.push('/member/member-user')
: $alert($t('暂无权限'))
"
>
<div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
{{ $t("业绩总览") }}
</div>
<count-to
:start-val="0"
:end-val="100"
:duration="2600"
class="card-panel-num"
/>
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div
class="card-panel"
@click="
$router.push('/system/internalMessage/my-internal-message?status=0')
"
>
<div class="card-panel-icon-wrapper icon-message">
<svg-icon icon-class="message" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
{{ $t("海运拼柜") }}
</div>
<count-to
:start-val="0"
:end-val="200"
:duration="3000"
class="card-panel-num"
/>
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="$router.push('/task/todo')">
<div class="card-panel-icon-wrapper icon-money">
<svg-icon icon-class="date" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
{{ $t("专线空运") }}
</div>
<count-to
:start-val="0"
:end-val="500"
:duration="3200"
class="card-panel-num"
/>
</div>
</div>
</el-col>
</el-row>
<el-row :gutter="40" class="panel-group">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="$router.push('/order/mine')">
<div class="card-panel-icon-wrapper icon-shopping">
<svg-icon icon-class="shopping" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
{{ $t("成交总览") }}
</div>
<count-to
:start-val="0"
:end-val="700"
:duration="3600"
class="card-panel-num"
/>
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div
class="card-panel"
@click="$router.push('/member/member/under-review')"
>
<div class="card-panel-icon-wrapper icon-shopping">
<svg-icon icon-class="time-range" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
{{ $t("首次成交") }}
</div>
<count-to
:start-val="0"
:end-val="100"
:duration="3600"
class="card-panel-num"
/>
</div>
</div>
</el-col>
</el-row>
<div
ref="mainBar"
......@@ -113,15 +175,19 @@
</div>
</template>
<script>
<script>
import UserSelector from "@/components/UserSelector";
import Treeselect from "@riophae/vue-treeselect";
//自定义目录数样式
import "@/assets/styles/vue-treeselect.css";
import { listSimpleDepts } from "@/api/system/dept";
//报表权限接口
import {getCurUserPermission} from "@/api/report/EcwReportPermission";
import { SalesReportCount, FirstCustomerCount } from "@/api/report/salesreport";
import { getCurUserPermission } from "@/api/report/EcwReportPermission";
import {
SalesReportCount,
FirstCustomerCount,
getEChartData,
} from "@/api/report/salesreport";
import * as echarts from "echarts";
require("echarts/theme/macarons");
import resize from "../../dashboard/mixins/resize";
......@@ -129,7 +195,7 @@ import SalesPanelGroup from "../../dashboard/SalesPanelGroup";
//2024-04-27
export default {
name: "salesreport",
name: "ReportSalesreportIndex",
components: {
SalesPanelGroup,
UserSelector,
......@@ -147,7 +213,7 @@ export default {
},
height: {
type: String,
default: "350px",
default: "500px",
},
autoResize: {
type: Boolean,
......@@ -162,6 +228,8 @@ export default {
exportLoading: false,
// 显示搜索条件
showSearch: true,
showCustomsManage: true,
showDept: true,
chart: null,
allsumvolume: undefined,
sumvolume1: undefined,
......@@ -172,18 +240,41 @@ export default {
queryParams: {
salesmanid: undefined, //销售经理
deptid: undefined, //部门
sDate: undefined, //开始日期
eDate: undefined, //结束日期
duibiYear: undefined, //对比年份
},
deptOptions: [],
deptData: [],
//报表权限信息
objEcwReportPermission: {},
};
},
watch: {},
mounted() {
this.getSalesReportCount();
this.getFirstCustomerCount();
mounted() {},
created() {
//获取当前用户报表权限
getCurUserPermission().then((response) => {
this.objEcwReportPermission = response.data;
if (this.objEcwReportPermission.permissionFw == 1) {
//本人权限
this.showCustomsManage = false;
this.showDept = false;
this.queryParams.salesmanid = this.objEcwReportPermission.userId;
} else if (this.objEcwReportPermission.permissionFw == 2) {
this.showCustomsManage = true;
this.showDept = true;
this.queryParams.deptid = parseInt(this.objEcwReportPermission.deptId);
} else if (this.objEcwReportPermission.permissionFw == 3) {
//全公司权限
this.showCustomsManage = true;
this.showDept = true;
}
this.getTreeselect();
this.$nextTick(() => {
//this.getSalesReportCount();
// this.getFirstCustomerCount();
//获取权限后再初始化统计图表
this.initChart();
});
},
......@@ -224,28 +315,177 @@ export default {
this.setOptions();
},
setOptions() {
this.chart.setOption({
xAxis: {
type: "category",
data: ["Mon1", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
},
yAxis: {
type: "value",
},
series: [
{
data: [200, 230, 224, 218, 135, 147, 260],
type: "line",
this.loading = true;
getEChartData(this.queryParams).then((response) => {
this.chart.setOption({
title: {
text: "月度业绩分布",
},
],
legend: {},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
xAxis: {
type: "value",
boundaryGap: [0, 0.5],
},
yAxis: response.data.objyAxis,
series: response.data.obSseries,
});
});
},
handleQuery() {},
getList() {},
resetQuery() {},
resetQuery() {
this.queryParams = {
salesmanid: undefined, //销售经理
deptid: undefined, //部门
sDate: undefined, //开始日期
eDate: undefined, //结束日期
duibiYear: undefined, //对比年份
};
},
handleAdd() {},
handleExport() {},
/** 查询部门下拉树结构 + 岗位下拉 */
getTreeselect() {
if (this.objEcwReportPermission.permissionFw == 3) {
listSimpleDepts().then((response) => {
// 处理deptOptions 参数
this.deptOptions = [];
this.deptOptions.push(...this.handleTree(response.data, "id"));
});
} else if (this.objEcwReportPermission.permissionFw == 2) {
this.DeptEx.id = this.objEcwReportPermission.deptId;
getDeptChild(this.DeptEx).then((response) => {
// 处理deptOptions 参数
this.deptOptions = [];
this.deptOptions.push(...this.handleTree(response.data, "id"));
});
}
},
//格式化部门的下拉框
normalizer(node) {
return {
id: node.id,
label: node.name,
children: node.children,
};
},
},
};
</script>
<style lang="scss" scoped>
.panel-group {
margin-top: 18px;
.card-panel-col {
margin-bottom: 32px;
}
.card-panel {
display: flex;
justify-content: space-between;
height: 108px;
cursor: pointer;
font-size: 12px;
position: relative;
overflow: hidden;
color: #666;
background: #fff;
box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
border-color: rgba(0, 0, 0, 0.05);
&:hover {
.card-panel-icon-wrapper {
color: #fff;
}
.icon-people {
background: #40c9c6;
}
.icon-message {
background: #36a3f7;
}
.icon-money {
background: #f4516c;
}
.icon-shopping {
background: #34bfa3;
}
}
.icon-people {
color: #40c9c6;
}
.icon-message {
color: #36a3f7;
}
.icon-money {
color: #f4516c;
}
.icon-shopping {
color: #34bfa3;
}
.card-panel-icon-wrapper {
margin: 14px 0 0 14px;
padding: 16px;
transition: all 0.38s ease-out;
border-radius: 6px;
}
.card-panel-icon {
font-size: 48px;
}
.card-panel-description {
font-weight: bold;
margin: 26px;
margin-left: 0px;
.card-panel-text {
line-height: 18px;
color: rgba(0, 0, 0, 0.45);
font-size: 16px;
margin-bottom: 12px;
}
.card-panel-num {
font-size: 20px;
}
}
}
}
@media (max-width: 550px) {
.card-panel-description {
display: none;
}
.card-panel-icon-wrapper {
float: none !important;
width: 100%;
height: 100%;
margin: 0 !important;
.svg-icon {
display: block;
margin: 14px auto !important;
float: none !important;
}
}
}
</style>
\ No newline at end of file
......@@ -23,11 +23,7 @@
/>
</el-form-item>
<el-form-item v-show="false">
<Treeselect
v-model="id"
:options="listTree"
>
</Treeselect>
<Treeselect v-model="id" :options="listTree"> </Treeselect>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
......@@ -156,6 +152,7 @@ import {
} from "@/api/report/vz";
import Treeselect from "@riophae/vue-treeselect";
import "@/assets/styles/vue-treeselect.css";
import { MessageBox } from "element-ui";
//2024-04-27
export default {
......@@ -189,7 +186,15 @@ export default {
// 表单参数
form: {},
// 表单校验
rules: {},
rules: {
vz: [
{
required: true,
message: this.$t("V值不能为空"),
trigger: "blur",
},
],
},
id: 1,
listTree: [
{
......@@ -300,6 +305,7 @@ export default {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
update(this.form).then((response) => {
......
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