Commit 8f73c3c9 authored by lanbaoming's avatar lanbaoming

2024-04-24修改

parent f9f8ba7f
......@@ -13,8 +13,8 @@ export function getListPage(data) {
export function exportExcel(data) {
return request({
url: '/Report/CustomerAnalysis/exportExcel',
method: 'post',
data: data,
method: 'get',
params: data,
responseType: 'blob'
})
}
import request from '@/utils/request'
//lanbm 2024-03-31 add
// 创建测试
export function createTest(data) {
export function getListPage(query) {
return request({
url: '/SalesAnalysis/test/create',
method: 'post',
data: data
})
}
// 更新测试
export function updateTest(data) {
return request({
url: '/SalesAnalysis/test/update',
method: 'put',
data: data
})
}
// 删除测试
export function deleteTest(id) {
return request({
url: '/SalesAnalysis/test/delete?id=' + id,
method: 'delete'
})
}
// 获得测试
export function getTest(id) {
return request({
url: '/SalesAnalysis/test/get?id=' + id,
method: 'get'
})
}
// 获得测试分页
export function getTestPage(query) {
return request({
url: '/SalesAnalysis/test/page',
url: '/Report/SalesAnalysis/getListPage',
method: 'get',
params: query
})
}
// 导出测试 Excel
export function exportTestExcel(query) {
//销售分析数据导出 Excel
export function exportExcel(query) {
return request({
url: '/SalesAnalysis/test/export-excel',
url: '/Report/SalesAnalysis/exportExcel',
method: 'get',
params: query,
responseType: 'blob'
......
......@@ -4506,5 +4506,6 @@
"企业": "enterprise",
"身份证认证状态": "Identity card authentication status",
"角标字段": "Subscript field",
"不清楚请留空,已设勿改": "Unclear, please leave blank. It has been set to remain unchanged"
"不清楚请留空,已设勿改": "Unclear, please leave blank. It has been set to remain unchanged",
"退仓/已混箱品名":"Returned/mixed Box"
}
......@@ -291,5 +291,6 @@
"毛重(KGS)": "毛重(KGS)",
"立方数(CBM)": "立方数(CBM)",
"选取文件": "选取文件",
"查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}": "查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}"
"查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}": "查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}",
"退仓/已混箱品名":"退仓/已混箱品名"
}
......@@ -232,7 +232,7 @@ import updateError from "./updateError.vue";
import { listUser } from "@/api/system/user";
export default {
name: "boxDetail",
name: "EcwBoxQuery",
props: {
shipmentId: String,
},
......
This diff is collapsed.
......@@ -30,10 +30,12 @@
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
>搜索</el-button
<el-button type="primary" icon="el-icon-search" @click="handleQuery">
{{ $t("搜索") }}</el-button
>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">
{{ $t("重置") }}
</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
......@@ -45,7 +47,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['report:permission:create']"
>新增</el-button
>
{{ $t("新增") }}</el-button
>
</el-col>
<el-col :span="1.5">
......@@ -58,7 +61,8 @@
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['my:test:export']"
>导出</el-button
>
{{ $t("导出") }}</el-button
>
</el-col>
<right-toolbar
......@@ -124,7 +128,7 @@
/>
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="用户姓名" prop="userId">
<user-selector
manage
......@@ -150,6 +154,12 @@
:normalizer="normalizer"
/>
</el-form-item>
<el-form-item label="数据导出权" prop="exportdataq">
<el-radio-group v-model="form.exportdataq">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
......@@ -244,6 +254,7 @@ export default {
userName: undefined, //用户姓名
permissionFw: undefined, //权限范围
deptId: null, //部门
exportdataq: "0", //是否有数据导出权
};
this.resetForm("form");
},
......@@ -274,12 +285,16 @@ export default {
//vue 控件对类型很敏感,类型不对很容易出问题
this.form.userId = parseInt(response.data.userId);
if (response.data.deptId == null ||
response.data.deptId == undefined||
response.data.deptId=="") {
if (
response.data.deptId == null ||
response.data.deptId == undefined ||
response.data.deptId == ""
) {
//treeselect 若是空值,必须是null,不能赋值"",0,等。
this.form.deptId = null;
}
//vue控件的数据类型一定要和后台一致
this.form.exportdataq = response.data.exportdataq.toString();
this.open = true;
this.title = "修改测试";
});
......
......@@ -180,10 +180,12 @@
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
>查询</el-button
<el-button type="primary" icon="el-icon-search" @click="handleQuery">
{{ $t("查询") }}</el-button
>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery"
>{{ $t("重置") }}
</el-button>
<el-button
type="warning"
plain
......@@ -191,9 +193,11 @@
size="mini"
@click="handleExport"
:loading="exportLoading"
>导出</el-button
v-show="objEcwReportPermission.exportdataq == 1"
>
{{ $t("导出") }}</el-button
>
<el-button type="primary" size="mini" @click="test" v-show="true">
<el-button type="primary" size="mini" @click="test" v-show="false">
测试
</el-button>
</el-form-item>
......@@ -528,13 +532,19 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
if (this.isRightPar() == true) {
this.queryParams.pageNo = 1;
this.getList();
}
},
isRightPar() {
if (
this.queryParams.sdate == undefined ||
this.queryParams.sdate == null ||
this.queryParams.sdate == ""
) {
MessageBox("请输入开始日期。");
return;
return false;
}
if (
this.queryParams.edate == undefined ||
......@@ -542,26 +552,43 @@ export default {
this.queryParams.edate == ""
) {
MessageBox("请输入结束日期。");
return;
return false;
}
this.queryParams.pageNo = 1;
this.getList();
if (
this.queryParams.duibiYear == undefined ||
this.queryParams.duibiYear == null ||
this.queryParams.duibiYear == ""
) {
MessageBox("请输入对比年份。");
return false;
} else {
let y = parseInt(this.queryParams.duibiYear);
if (y < 2023) {
MessageBox("对比年份只能选2023年和2023年之后的年份。");
return false;
}
var date = new Date();
var year = date.getFullYear();
if (y > year) {
MessageBox("对比年份只能选当前年份之前的年份。");
return false;
}
}
return true;
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
if (this.isRightPar() == false) return;
// 执行导出
this.$modal
.confirm("是否确认导出所有测试数据项?")
.confirm("是否确认导出数据项?")
.then(() => {
this.exportLoading = true;
return exportExcel(params);
return exportExcel(this.queryParams);
})
.then((response) => {
this.$download.excel(response, "${table.classComment}.xls");
this.$download.excel(response, "客户分析报表.xls");
this.exportLoading = false;
})
.catch(() => {});
......@@ -580,7 +607,6 @@ export default {
this.deptOptions = [];
this.deptOptions.push(...this.handleTree(response.data, "id"));
});*/
},
//格式化部门的下拉框
normalizer(node) {
......
......@@ -56,9 +56,11 @@
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
>搜索</el-button
>{{$t('搜索')}}</el-button
>
<el-button icon="el-icon-refresh" @click="resetQuery">
{{$t('重置')}}</el-button
>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>
......@@ -68,8 +70,9 @@
type="primary"
icon="el-icon-search"
@click="hhandleQueryAnalysis"
>更多</el-button
>
{{ $t('更多') }}
</el-button>
</el-form-item>
</el-form>
</el-row>
......@@ -199,7 +202,6 @@ export default {
//获取权限后再初始化统计图表
this.initChart();
});
},
beforeDestroy() {
if (!this.chart) {
......@@ -283,6 +285,16 @@ export default {
if (this.queryParams.duibiYear == undefined) {
MessageBox("请输入对比年份。");
return;
} else {
let y = parseInt(this.queryParams.duibiYear);
if (y < 2023) {
MessageBox("对比年份只能选2023年和2023年之后的年份。");
}
var date = new Date();
var year = date.getFullYear();
if (y > year) {
MessageBox("对比年份只能选当前年份之前的年份。");
}
}
//查询统计结果
this.initChart();
......
......@@ -10,7 +10,7 @@
label-width="100px"
>
<el-form-item label="订单编号" prop="name">
<el-select v-model="queryParams.status" clearable style="width: 100px">
<el-select v-model="queryParams.SearchType1" clearable style="width: 100px">
<el-option
v-for="dict in SearchType"
:key="dict.value"
......@@ -20,7 +20,7 @@
</el-select>
<el-input
style="width: 200px"
v-model="queryParams.name"
v-model="queryParams.orderNo"
placeholder="请输入订单编号"
clearable
@keyup.enter.native="handleQuery"
......@@ -249,6 +249,7 @@
size="mini"
@click="handleExport"
:loading="exportLoading"
v-show="objEcwReportPermission.exportdataq == 1"
>导出</el-button
>
</el-form-item>
......@@ -256,9 +257,9 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="排名" align="center" prop="id" />
<el-table-column label="订单编号" align="center" prop="name" />
<el-table-column label="提单号" align="center" prop="empGender" />
<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
......@@ -268,23 +269,23 @@
width="180"
>
</el-table-column>
<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="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="deleted" />
<el-table-column label="目的仓" align="center" prop="dstwarehousename" />
<el-table-column label="渠道" align="center" prop="deleted" />
<el-table-column label="创建时间" align="center" prop="deleted" />
<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="deleted" />
<el-table-column label="唛头" align="center" prop="marks" />
<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="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" />
......@@ -309,8 +310,8 @@ import Treeselect from "@riophae/vue-treeselect";
//自定义目录数样式
import "@/assets/styles/vue-treeselect.css";
import { getWarehouseList } from "@/api/ecw/warehouse";
import { getReportResult, exportExcel } from "@/api/report/customerreport";
import {getCurUserPermission} from "@/api/report/EcwReportPermission";
import { getListPage, exportExcel } from "@/api/report/salesanalysis";
import { getCurUserPermission } from "@/api/report/EcwReportPermission";
export default {
name: "sales_analysis",
......@@ -346,7 +347,12 @@ export default {
pageNo: 1,
pageSize: 10,
startWarehouseId: undefined,
empGender: undefined,
transportId: undefined,//运输方式
SearchType1:undefined,//订单编号查询类型
orderNo:undefined,//订单编号
tidanNo:undefined,//提单号
marks:undefined,//唛头
isCargoControl:undefined,//是否控货
},
// 表单参数
form: {},
......@@ -359,8 +365,18 @@ export default {
},
created() {
getWarehouseList().then((res) => (this.warehouseList = res.data));
// this.getList();
this.loading = false;
//获取当前用户报表权限
getCurUserPermission().then((response) => {
//复制对象
Object.assign(this.objEcwReportPermission, response.data);
if (this.objEcwReportPermission.permissionFw == 1) {
//只能看自己的,不能选择部门和客户经理
// this.showCustomsManage = false;
// this.showDept = false;
}
this.getList();
});
},
computed: {
exportWarehouseList() {
......@@ -383,7 +399,7 @@ export default {
// 处理查询参数
let params = { ...this.queryParams };
// 执行查询
getTestPage(params).then((response) => {
getListPage(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
......@@ -420,13 +436,13 @@ export default {
params.pageSize = undefined;
// 执行导出
this.$modal
.confirm("是否确认导出所有测试数据项?")
.confirm("是否确认导出所选数据?")
.then(() => {
this.exportLoading = true;
return exportTestExcel(params);
return exportExcel(params);
})
.then((response) => {
this.$download.excel(response, "${table.classComment}.xls");
this.$download.excel(response, "销售分析数据报表.xls");
this.exportLoading = false;
})
.catch(() => {});
......
......@@ -38,7 +38,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['report:vz:create']"
>新增</el-button
>
{{ $t("新增") }}</el-button
>
</el-col>
<el-col :span="1.5">
......@@ -51,7 +52,8 @@
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['my:test:export']"
>导出</el-button
>
{{ $t("导出") }}</el-button
>
</el-col>
<right-toolbar
......@@ -82,7 +84,8 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['report:vz:update']"
>修改</el-button
>
{{ $t("修改") }}</el-button
>
<el-button
size="mini"
......@@ -90,7 +93,8 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['report:vz:delete']"
>删除</el-button
>
{{ $t("删除") }}</el-button
>
</template>
</el-table-column>
......@@ -195,7 +199,7 @@ export default {
id: undefined,
titleZh: undefined, //运输方式
fuhao: undefined, //基础单位
vz: undefined //v值
vz: undefined, //v值
};
this.resetForm("form");
},
......
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