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,
},
......
<template>
<el-dialog :visible.sync="dialogVisible" width="80%" :before-close="()=>{
$emit('update:dialogVisible',false)
}">
<el-dialog
:visible.sync="dialogVisible"
width="80%"
:before-close="
() => {
$emit('update:dialogVisible', false);
}
"
>
<div class="fee-application">
<h1>{{$t('费用申请')}}-{{orderDetails.orderNo}}
</h1>
<h1>{{ $t("费用申请") }}-{{ orderDetails.orderNo }}</h1>
<el-divider></el-divider>
<el-form label-width="100px" inline>
<el-form-item :label="$t('订单号')+':'"><div class="content">
{{orderDetails.orderNo}}
</div></el-form-item>
<el-form-item :label="$t('发货人')+':'"><div class="content">{{orderDetails.consignorVO ? orderDetails.consignorVO.name :''}}</div></el-form-item>
<el-form-item :label="$t('唛头')"><div class="content">{{orderDetails.marks}}</div></el-form-item>
<el-form-item> <el-button :disabled="!!processInstanceId || editMode" @click="addCost">{{$t('添加申请')}}</el-button></el-form-item>
<el-form-item :label="$t('订单号') + ':'"
><div class="content">
{{ orderDetails.orderNo }}
</div></el-form-item
>
<el-form-item :label="$t('发货人') + ':'"
><div class="content">
{{ orderDetails.consignorVO ? orderDetails.consignorVO.name : "" }}
</div></el-form-item
>
<el-form-item :label="$t('唛头')"
><div class="content">{{ orderDetails.marks }}</div></el-form-item
>
<el-form-item>
<el-button
:disabled="!!processInstanceId || editMode"
@click="addCost"
>{{ $t("添加申请") }}</el-button
></el-form-item
>
</el-form>
<el-table :data="list">
<el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column :label="$t('费用类型')">
<template v-slot:default = "scope">
<dict-selector :disabled="!scope.row.editMode && !!scope.row.status" :type="DICT_TYPE.FEE_TYPE" v-model="scope.row.feeType" />
</template>
</el-table-column>
<el-table-column :label="$t('金额')">
<template v-slot:default = 'scope'>
<el-input :disabled="!scope.row.editMode && !!scope.row.status" v-model.number="scope.row.applicationFee" ></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('货币类型')">
<template v-slot:default = 'scope'>
<el-select :disabled="!scope.row.editMode && !!scope.row.status" v-model="scope.row.applicationFeeCurrency">
<el-option v-for="item in JSON.parse(currencys)" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
</template>
</el-table-column>
<el-table-column :label="$t('付款类型')">
<template v-slot = {row}>
<dict-selector :disabled="!row.editMode && !!row.status" :type="DICT_TYPE.PAYMENT_TYPE" v-model="row.payType" />
</template>
</el-table-column>
<el-table-column :label="$t('备注')">
<template v-slot:default="scope">
<el-input :disabled="!scope.row.editMode && !!scope.row.status" v-model="scope.row.remarks" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('确认收款')">
<template v-slot:default ="scope">
<dict-tag :type="DICT_TYPE.ECW_RECEIVABLE_STATE" :value="scope.row.receiveFlag" />
</template>
</el-table-column>
<el-table-column :label="$t('申请人')">
<template v-slot:default ="scope">
{{scope.row.status === 0 ? $t('未提交'): scope.row.applicationAuthor}}
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot:default = 'scope'>
<el-tag v-if="scope.row.status !== 0 && !scope.row.editMode">{{STATUS[scope.row.status]}}</el-tag>
<!--el-button type="text" v-if="scope.row.status == 1" @click="examineFn">{{$t('审核中')}}</el-button-->
<el-button type="text" v-if="modifable(scope.$index)" @click="modify(scope.row)">{{$t('修改')}}</el-button>
<el-button type="text" v-if="scope.row.status === 0" @click="del(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column :label="$t('费用类型')">
<template v-slot:default="scope">
<dict-selector
:disabled="!scope.row.editMode && !!scope.row.status"
:type="DICT_TYPE.FEE_TYPE"
v-model="scope.row.feeType"
/>
</template>
</el-table-column>
<el-table-column :label="$t('金额')">
<template v-slot:default="scope">
<el-input
:disabled="!scope.row.editMode && !!scope.row.status"
v-model.number="scope.row.applicationFee"
></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('货币类型')">
<template v-slot:default="scope">
<el-select
:disabled="!scope.row.editMode && !!scope.row.status"
v-model="scope.row.applicationFeeCurrency"
>
<el-option
v-for="item in JSON.parse(currencys)"
:key="item.id"
:label="isChinese ? item.titleZh : item.titleEn"
:value="item.id"
/>
</el-select>
</template>
</el-table-column>
<el-table-column :label="$t('付款类型')">
<template v-slot="{ row }">
<dict-selector
:disabled="!row.editMode && !!row.status"
:type="DICT_TYPE.PAYMENT_TYPE"
v-model="row.payType"
/>
</template>
</el-table-column>
<el-table-column :label="$t('备注')">
<template v-slot:default="scope">
<el-input
:disabled="!scope.row.editMode && !!scope.row.status"
v-model="scope.row.remarks"
type="textarea"
></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('确认收款')">
<template v-slot:default="scope">
<dict-tag
:type="DICT_TYPE.ECW_RECEIVABLE_STATE"
:value="scope.row.receiveFlag"
/>
</template>
</el-table-column>
<el-table-column :label="$t('申请人')">
<template v-slot:default="scope">
{{
scope.row.status === 0
? $t("未提交")
: scope.row.applicationAuthor
}}
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot:default="scope">
<el-tag v-if="scope.row.status !== 0 && !scope.row.editMode">{{
STATUS[scope.row.status]
}}</el-tag>
<!--el-button type="text" v-if="scope.row.status == 1" @click="examineFn">{{$t('审核中')}}</el-button-->
<el-button
type="text"
v-if="modifable(scope.$index)"
@click="modify(scope.row)"
>{{ $t("修改") }}</el-button
>
<el-button
type="text"
v-if="scope.row.status === 0"
@click="del(scope.$index)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<div style="padding: 20px">
<work-flow xmlkey="free_apply" v-model="selectedUsers" />
<work-flow xmlkey="free_apply" v-model="selectedUsers" />
</div>
<div style="text-align: center;margin-top: 20px;">
<el-button type="primary" v-if="!processInstanceId" style="margin-right: 30px;" :disabled="!feeList.length && !editMode" @click="submit">{{$t('提交')}}</el-button>
<el-button type="primary" v-if="processInstanceId" style="margin-right: 30px;" @click="goProcessDetail">{{$t('审核中')}}</el-button>
<el-button type="primary" v-if="processInstanceId" style="margin-right: 30px;" @click="cancel">{{$t('取消审核')}}</el-button>
<el-button @click="$emit('update:dialogVisible',false)">{{$t('返回')}}</el-button>
<div style="text-align: center; margin-top: 20px">
<el-button
type="primary"
v-if="!processInstanceId"
style="margin-right: 30px"
:disabled="!feeList.length && !editMode"
@click="submit"
>{{ $t("提交") }}</el-button
>
<el-button
type="primary"
v-if="processInstanceId"
style="margin-right: 30px"
@click="goProcessDetail"
>{{ $t("审核中") }}</el-button
>
<el-button
type="primary"
v-if="processInstanceId"
style="margin-right: 30px"
@click="cancel"
>{{ $t("取消审核") }}</el-button
>
<el-button @click="$emit('update:dialogVisible', false)">{{
$t("返回")
}}</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
......@@ -86,178 +167,197 @@ import {
feeApplicationCancel,
getFeeApplicationApproveByOrderId,
getBatchFeeByProcessId,
qetBatchFeeByBusinessId, getBatchFeeByBusinessId
qetBatchFeeByBusinessId,
getBatchFeeByBusinessId,
} from "@/api/ecw/order";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import workFlow from "@/components/WorkFlow";
export default {
name: "feeApplication",
components: {workFlow},
props:{
orderId:[Number, String],
dialogVisible:{
type:Boolean,
default:false,
components: { workFlow },
props: {
orderId: [Number, String],
dialogVisible: {
type: Boolean,
default: false,
},
currencys:String
currencys: String,
},
data(){
data() {
return {
orderDetails:{},
orderDetails: {},
// 费用列表
list:[],
list: [],
// 审核ID,没有则表示不在审核中
processInstanceId: null,
DICT_TYPE,
getDictDatas,
STATUS:{},
selectedUsers:[]
}
STATUS: {},
selectedUsers: [],
};
},
computed:{
feeList(){
return this.list.filter(item => item.status === 0)
},
// 正在编辑的费用申请
currentItem(){
return this.list.find(item => item.editMode)
},
// 是否修改模式
editMode(){
return !!this.currentItem
},
modifable(){
return (index) => {
// 审核中不允许修改
if(this.processInstanceId) return false
// 有未提交的不允许修改
if(this.feeList.length) return false
// 有修改中的不允许修改
if(this.list.findIndex(item => item.editMode) > -1) return false
return true
}
}
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN";
},
feeList() {
return this.list.filter((item) => item.status === 0);
},
// 正在编辑的费用申请
currentItem() {
return this.list.find((item) => item.editMode);
},
// 是否修改模式
editMode() {
return !!this.currentItem;
},
modifable() {
return (index) => {
// 审核中不允许修改
if (this.processInstanceId) return false;
// 有未提交的不允许修改
if (this.feeList.length) return false;
// 有修改中的不允许修改
if (this.list.findIndex((item) => item.editMode) > -1) return false;
return true;
};
},
},
created() {
this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach( e =>{
this.STATUS[e.value] = e.label
})
this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach((e) => {
this.STATUS[e.value] = e.label;
});
getOrder(this.orderId).then(res => {
this.orderDetails = res.data
})
getOrder(this.orderId).then((res) => {
this.orderDetails = res.data;
});
// 查询历史申请
feeApplicationListByOrderId({orderId: this.orderId}).then(res => {
this.list = res.data
})
// 查询历史申请
feeApplicationListByOrderId({ orderId: this.orderId }).then((res) => {
this.list = res.data;
});
// 查询是否有审核中的费用申请
getFeeApplicationApproveByOrderId(this.orderId).then(res => {
if(res.data.formId){
this.processInstanceId = res.data.formId
getFeeApplicationApproveByOrderId(this.orderId).then((res) => {
if (res.data.formId) {
this.processInstanceId = res.data.formId;
/*getBatchFeeByBusinessId(res.data.orderApprovalId).then(res => {
this.list = res.data
})*/
}
})
});
},
methods:{
del(index){
methods: {
del(index) {
this.$confirm(this.$t("确定要删除此条费用申请么?")).then(() => {
this.list.splice(index, 1)
})
this.list.splice(index, 1);
});
},
// 修改
modify(item){
this.$set(item, 'editMode', true)
modify(item) {
this.$set(item, "editMode", true);
},
addCost(){
this.list.push({
orderId:this.orderId,
feeType:undefined,//费用申请类型
applicationFee:undefined,//金额
applicationFeeCurrency:undefined,// 费用申请货币类型
remarks:undefined,
receiveFlag:0,
applicationAuthor:undefined,
status:0,
})
addCost() {
this.list.push({
orderId: this.orderId,
feeType: undefined, //费用申请类型
applicationFee: undefined, //金额
applicationFeeCurrency: undefined, // 费用申请货币类型
remarks: undefined,
receiveFlag: 0,
applicationAuthor: undefined,
status: 0,
});
},
submit(){
// 判断费用申请是否有未填项
const errList = this.feeList.filter(item => {
return !item['feeType'] || !item['applicationFee'] || !item['applicationFeeCurrency'] || !item['payType']
})
if(errList.length){
return this.$message.error('请填写完整费用申请信息')
}
if(this.editMode){
// 要提交status=1,否则保持原状态
const data = {...this.currentItem,status:1, copyUserId:this.selectedUsers}
return applicationUpdate(data).then(r => {
this.$message.success(this.$t('修改成功'));
this.$emit('update:dialogVisible',false)
})
}
submit() {
// 判断费用申请是否有未填项
const errList = this.feeList.filter((item) => {
return (
!item["feeType"] ||
!item["applicationFee"] ||
!item["applicationFeeCurrency"] ||
!item["payType"]
);
});
if (errList.length) {
return this.$message.error("请填写完整费用申请信息");
}
if (this.editMode) {
// 要提交status=1,否则保持原状态
const data = {
...this.currentItem,
status: 1,
copyUserId: this.selectedUsers,
};
return applicationUpdate(data).then((r) => {
this.$message.success(this.$t("修改成功"));
this.$emit("update:dialogVisible", false);
});
}
feeApplicationCreateBatch( {
orderFeeApplicationCreateReqVOList: this.feeList,
copyUserId:this.selectedUsers,
orderId: this.orderId
}).then(r=>{
if(r.code === 0){
this.$emit('update:dialogVisible',false)
this.$message.success(this.$t('添加成功'));
this.selectedUsers = [];
}
})
feeApplicationCreateBatch({
orderFeeApplicationCreateReqVOList: this.feeList,
copyUserId: this.selectedUsers,
orderId: this.orderId,
}).then((r) => {
if (r.code === 0) {
this.$emit("update:dialogVisible", false);
this.$message.success(this.$t("添加成功"));
this.selectedUsers = [];
}
});
},
goProcessDetail(){
this.$emit('update:dialogVisible',false)
this.$router.push('/bpm/process-instance/detail?id=' + this.processInstanceId)
goProcessDetail() {
this.$emit("update:dialogVisible", false);
this.$router.push(
"/bpm/process-instance/detail?id=" + this.processInstanceId
);
},
cancel(){
this.$prompt(this.$t('请输入取消原因'), this.$t('提示'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
}).then(({ value }) => {
let item = this.list.find(e => e.status === 1);
feeApplicationCancel({huifu:value,bpmProcessId: this.processInstanceId}).then(r => {
this.$message({
type: 'success',
message:this.$t('取消成功')
cancel() {
this.$prompt(this.$t("请输入取消原因"), this.$t("提示"), {
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
})
.then(({ value }) => {
let item = this.list.find((e) => e.status === 1);
feeApplicationCancel({
huifu: value,
bpmProcessId: this.processInstanceId,
}).then((r) => {
this.$message({
type: "success",
message: this.$t("取消成功"),
});
this.$emit("update:dialogVisible", false);
});
this.$emit('update:dialogVisible',false)
})
}).catch(() => {
});
}
.catch(() => {});
},
},
watch:{
dialogVisible(val){
if(val){
this.getOrderList()
getOrder(this.orderId).then(r =>{
if(r.code === 0){
this.orderDetails = r.data
}
})
}
watch: {
dialogVisible(val) {
if (val) {
this.getOrderList();
getOrder(this.orderId).then((r) => {
if (r.code === 0) {
this.orderDetails = r.data;
}
});
}
},
}
}
},
};
</script>
<style scoped lang="scss">
.fee-application {
padding: 0 20px;
h1{
h1 {
font-weight: 600;
font-size: 20px;
}
.content{
.content {
width: 200px;
}
}
......
......@@ -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,45 +552,61 @@ 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(() => {});
},
/** 查询部门下拉树结构 + 岗位下拉 */
getTreeselect() {
getTreeselect() {
listSimpleDepts().then((response) => {
// 处理 deptOptions 参数
this.deptOptions = [];
this.deptOptions.push(...this.handleTree(response.data, "id"));
});
/*
getDeptChild().then((response) => {
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,11 +38,12 @@
size="mini"
@click="handleAdd"
v-hasPermi="['report:vz:create']"
>新增</el-button
>
{{ $t("新增") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
<el-button
type="warning"
plain
icon="el-icon-download"
......@@ -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>
......@@ -107,9 +111,9 @@
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="运输方式" prop="titleZh">
<el-select v-model="form.titleZh" clearable style="width: 200px">
<el-option label="海运拼柜" value="海运拼柜"></el-option>
<el-option label="专线空运" value="专线空运"></el-option>
</el-select>
<el-option label="海运拼柜" value="海运拼柜"></el-option>
<el-option label="专线空运" value="专线空运"></el-option>
</el-select>
</el-form-item>
<el-form-item label="基础单位" prop="fuhao">
<el-input v-model="form.fuhao" placeholder="基础单位" />
......@@ -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