Commit d526af81 authored by lanbaoming's avatar lanbaoming

2024-04-29 测试问题修复

parent af9f3485
......@@ -151,7 +151,7 @@ export default {
},
height: {
type: String,
default: "1500px",
default: "500px",
},
autoResize: {
type: Boolean,
......@@ -185,6 +185,7 @@ export default {
//报表权限信息
objEcwReportPermission: {},
DeptEx: { id: undefined, name: undefined, parentId: undefined },
resultList: [],
};
},
watch: {},
......@@ -228,9 +229,12 @@ 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
);
Object.assign(p, this.queryParams);
this.$router.push({
path: "/report/customer_analysis",
......@@ -244,7 +248,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 +268,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.name === 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/>";
......
......@@ -10,7 +10,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"
......@@ -27,7 +31,11 @@
/>
</el-form-item>
<el-form-item label="提单号" prop="empGender">
<el-select v-model="queryParams.status" clearable style="width: 100px">
<el-select
v-model="queryParams.SearchType2"
clearable
style="width: 100px"
>
<el-option
v-for="dict in SearchType"
:key="dict.value"
......@@ -37,7 +45,7 @@
</el-select>
<el-input
style="width: 200px"
v-model="queryParams.empGender"
v-model="queryParams.tidanNo"
placeholder="请输入提单号"
clearable
@keyup.enter.native="handleQuery"
......@@ -80,25 +88,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="请输入备注信息"
<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 +117,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"
......@@ -142,12 +147,18 @@
</el-form-item>
<el-form-item label="目的国" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="选择目的国"
<el-select
clearable
@keyup.enter.native="handleQuery"
/>
v-model="queryParams.country"
: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-input
......@@ -190,20 +201,21 @@
/>
</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
......@@ -254,41 +266,98 @@
>
</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="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="cfNumber">
<template slot-scope="{ row }">
<el-link
type="primary"
@click.native="$router.push('/customer/query/' + row.cfCustomerId)"
>{{ row.cfNumber }}</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="createTime"
prop="salesmanidName"
width="180"
>
</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="ordertypeShow" />
<el-table-column label="重货/泡货标准" align="center" prop="zpUnitShow" />
<el-table-column label="付款方" align="center" prop="draweeName" />
<el-table-column label="首次入仓时间" align="center" prop="deleted" />
<el-table-column label="提货率" align="center" prop="deleted" />
<el-table-column label="入仓记录" align="center" prop="deleted" />
......@@ -306,16 +375,19 @@
<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";
//2024-04-27
export default {
name: "sales_analysis",
name: "ReportSales_analysisIndex",
components: {
UserSelector,
Treeselect,
......@@ -336,6 +408,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
deptOptions: undefined,
dateRangeCreateTime: [],
SearchType: [
{ value: "in", label: "包含" },
......@@ -348,13 +421,19 @@ export default {
pageNo: 1,
pageSize: 10,
startWarehouseId: undefined,
transportId: undefined,//运输方式
SearchType1:undefined,//订单编号查询类型
orderNo:undefined,//订单编号
tidanNo:undefined,//提单号
marks:undefined,//唛头
isCargoControl:undefined,//是否控货
transportId: undefined, //运输方式
SearchType1: undefined, //订单编号查询类型
orderNo: undefined, //订单编号
SearchType2: undefined, //提单号的查询类别
tidanNo: undefined, //提单号
marks: undefined, //唛头
salesmanid: undefined, //客户经理
isCargoControl: undefined, //是否控货
deptid: undefined, //部门
drawee: undefined, //付款方
},
channelList: [],
countryList: [],
// 表单参数
form: {},
// 表单校验
......@@ -362,9 +441,17 @@ export default {
warehouseList: [],
//报表权限信息
objEcwReportPermission: {},
DeptEx: { id: undefined, name: undefined, parentId: undefined },
};
},
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 +463,7 @@ export default {
// this.showCustomsManage = false;
// this.showDept = false;
}
this.getTreeselect();
this.getList();
});
},
......@@ -418,6 +506,10 @@ export default {
};
this.resetForm("form");
},
isChinese() {
//基础函数,判断系统显示语言是中文还是英文
return this.$i18n.locale === "zh_CN";
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
......@@ -448,7 +540,60 @@ export default {
})
.catch(() => {});
},
/** 查询部门下拉树结构 + 岗位下拉 */
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
......@@ -129,7 +129,7 @@ import SalesPanelGroup from "../../dashboard/SalesPanelGroup";
//2024-04-27
export default {
name: "salesreport",
name: "ReportSalesreportIndex",
components: {
SalesPanelGroup,
UserSelector,
......
......@@ -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