|
@@ -1,27 +1,13 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
- <el-form-item label="油站名称" prop="stationId" >
|
|
|
|
- <el-select
|
|
|
|
- v-model="queryParams.stationId"
|
|
|
|
- placeholder="请选择油站"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in stationOptions"
|
|
|
|
- :key="item.stationId"
|
|
|
|
- :label="item.stationName"
|
|
|
|
- :value="item.stationId"
|
|
|
|
- ></el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <el-form-item prop="carNumber">开班时间:{{opo.classStartDate}} 班结人:{{opo.classStructureMan}}
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
<el-button icon="el-icon-plus" size="mini" @click="handleAdd">添加班结</el-button>
|
|
<el-button icon="el-icon-plus" size="mini" @click="handleAdd">添加班结</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
+
|
|
<!--按员工汇总-->
|
|
<!--按员工汇总-->
|
|
<span style="color:#ff9955;font-size:25px;" >|</span><span style="font-size:25px;">按员工汇总</span>
|
|
<span style="color:#ff9955;font-size:25px;" >|</span><span style="font-size:25px;">按员工汇总</span>
|
|
<el-table v-loading="loading" show-summary :data="structureList" :summary-method="getTotal">
|
|
<el-table v-loading="loading" show-summary :data="structureList" :summary-method="getTotal">
|
|
@@ -40,6 +26,21 @@
|
|
<el-table-column label="销额" align="center" prop="amt" />
|
|
<el-table-column label="销额" align="center" prop="amt" />
|
|
<el-table-column label="销售笔数" align="center" prop="orderNo" />
|
|
<el-table-column label="销售笔数" align="center" prop="orderNo" />
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+<!--按员工/支付方式汇总: -->
|
|
|
|
+ <span style="color:#ff9955;font-size:25px;padding-top: 15px;" >|</span><span style="font-size:25px;">按员工/支付方式汇总</span>
|
|
|
|
+ <el-table v-loading="loading" :data="structureList3" show-summary :summary-method="getTotal3" >
|
|
|
|
+ <el-table-column label="员工姓名" align="center" prop="oilPersonnel" />
|
|
|
|
+ <el-table-column label="负责枪号" align="center" prop="oilGun" />
|
|
|
|
+ <el-table-column label="微信笔数" align="center" prop="wxNum" />
|
|
|
|
+ <el-table-column label="支付宝笔数" align="center" prop="zfbNum" />
|
|
|
|
+ <el-table-column label="现金笔数" align="center" prop="xjNum" />
|
|
|
|
+ <el-table-column label="优惠" align="center" prop="discountAmt" />
|
|
|
|
+ <el-table-column label="优惠卷" align="center" prop="discountCouponAmt" />
|
|
|
|
+ <el-table-column label="微信金额" align="center" prop="wxAmt" />
|
|
|
|
+ <el-table-column label="支付宝金额" align="center" prop="zfbAmt" />
|
|
|
|
+ <el-table-column label="现金金额" align="center" prop="xjAmt" />
|
|
|
|
+ <el-table-column label="会员卡支付" align="center" prop="memberAmt"/>
|
|
|
|
+ </el-table>
|
|
<!-- 添加或修改班结管理对话框 -->
|
|
<!-- 添加或修改班结管理对话框 -->
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
<span>请确认没有车主使用系统支付</span>
|
|
<span>请确认没有车主使用系统支付</span>
|
|
@@ -52,7 +53,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { stationinfo,listStructure,listPersonnelStructure,listOilStructure, getStructure, delStructure, addStructure, updateStructure, exportStructure } from "@/api/station/structure";
|
|
|
|
|
|
+import { listPersonnelPayStructure,listClass,stationinfo,listStructure,listPersonnelStructure,listOilStructure, getStructure, delStructure, addStructure, updateStructure, exportStructure } from "@/api/station/structure";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "Structure",
|
|
name: "Structure",
|
|
@@ -67,6 +68,7 @@ export default {
|
|
// 班结管理表格数据
|
|
// 班结管理表格数据
|
|
structureList: [],
|
|
structureList: [],
|
|
structureList1: [],
|
|
structureList1: [],
|
|
|
|
+ structureList3: [],
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
title: "",
|
|
title: "",
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
@@ -91,6 +93,10 @@ export default {
|
|
classStructureMan: null
|
|
classStructureMan: null
|
|
},
|
|
},
|
|
stationOptions:[],
|
|
stationOptions:[],
|
|
|
|
+ opo:{
|
|
|
|
+ classStructureMan:null,
|
|
|
|
+ classStartDate:null
|
|
|
|
+ },
|
|
// 表单参数
|
|
// 表单参数
|
|
form: {},
|
|
form: {},
|
|
// 表单校验
|
|
// 表单校验
|
|
@@ -99,12 +105,15 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getList();
|
|
|
|
- this.getList2();
|
|
|
|
- stationinfo().then(response => {
|
|
|
|
- this.stationOptions = response.rows;
|
|
|
|
- this.loading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ this.loading = false;
|
|
|
|
+ let classesNo =this.$route.query.classesNo;
|
|
|
|
+ console.log("classesNo",this.$route.query);
|
|
|
|
+ if(classesNo!=null){
|
|
|
|
+ this.queryParams.classStructureNo =this.$route.query.classesNo;
|
|
|
|
+ this.queryParams.stationId=this.$route.query.stationId;
|
|
|
|
+ this.getClassInfo();
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
/** 查询班结管理列表 */
|
|
/** 查询班结管理列表 */
|
|
@@ -122,6 +131,13 @@ export default {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ getList3() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ listPersonnelPayStructure(this.queryParams).then(response => {
|
|
|
|
+ this.structureList3 = response.rows;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
getTotal(param) {
|
|
getTotal(param) {
|
|
const { columns, data } = param;
|
|
const { columns, data } = param;
|
|
const sums = [];
|
|
const sums = [];
|
|
@@ -212,6 +228,111 @@ export default {
|
|
});
|
|
});
|
|
return sums;
|
|
return sums;
|
|
},
|
|
},
|
|
|
|
+ getTotal3(param) {
|
|
|
|
+ const { columns, data } = param;
|
|
|
|
+ const sums = [];
|
|
|
|
+ columns.forEach((column, index) => {
|
|
|
|
+ if (index === 0) {
|
|
|
|
+ sums[index] = '合计';
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ const values = data.map(item => Number(item[column.property]));
|
|
|
|
+ if (column.property === 'wxNum') {
|
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
|
+ const value = Number(curr);
|
|
|
|
+ if (!isNaN(value)) {
|
|
|
|
+ return prev + curr;
|
|
|
|
+ } else {
|
|
|
|
+ return prev;
|
|
|
|
+ }
|
|
|
|
+ }, 0);
|
|
|
|
+ sums[index]=sums[index].toFixed(0);
|
|
|
|
+ }else if(column.property === 'zfbNum'){
|
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
|
+ const value = Number(curr);
|
|
|
|
+ if (!isNaN(value)) {
|
|
|
|
+ return prev + curr;
|
|
|
|
+ } else {
|
|
|
|
+ return prev;
|
|
|
|
+ }
|
|
|
|
+ }, 0);
|
|
|
|
+ sums[index]=sums[index].toFixed(0);
|
|
|
|
+ }else if(column.property === 'xjNum'){
|
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
|
+ const value = Number(curr);
|
|
|
|
+ if (!isNaN(value)) {
|
|
|
|
+ return prev + curr;
|
|
|
|
+ } else {
|
|
|
|
+ return prev;
|
|
|
|
+ }
|
|
|
|
+ }, 0);
|
|
|
|
+ sums[index]=sums[index].toFixed(0);
|
|
|
|
+ }else if(column.property === 'discountAmt'){
|
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
|
+ const value = Number(curr);
|
|
|
|
+ if (!isNaN(value)) {
|
|
|
|
+ return prev + curr;
|
|
|
|
+ } else {
|
|
|
|
+ return prev;
|
|
|
|
+ }
|
|
|
|
+ }, 0);
|
|
|
|
+ sums[index]=sums[index].toFixed(2);
|
|
|
|
+ }else if(column.property === 'discountCouponAmt'){
|
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
|
+ const value = Number(curr);
|
|
|
|
+ if (!isNaN(value)) {
|
|
|
|
+ return prev + curr;
|
|
|
|
+ } else {
|
|
|
|
+ return prev;
|
|
|
|
+ }
|
|
|
|
+ }, 0);
|
|
|
|
+ sums[index]=sums[index].toFixed(2);
|
|
|
|
+ } else if(column.property === 'wxAmt'){
|
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
|
+ const value = Number(curr);
|
|
|
|
+ if (!isNaN(value)) {
|
|
|
|
+ return prev + curr;
|
|
|
|
+ } else {
|
|
|
|
+ return prev;
|
|
|
|
+ }
|
|
|
|
+ }, 0);
|
|
|
|
+ sums[index]=sums[index].toFixed(2);
|
|
|
|
+ } else if(column.property === 'zfbAmt'){
|
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
|
+ const value = Number(curr);
|
|
|
|
+ if (!isNaN(value)) {
|
|
|
|
+ return prev + curr;
|
|
|
|
+ } else {
|
|
|
|
+ return prev;
|
|
|
|
+ }
|
|
|
|
+ }, 0);
|
|
|
|
+ sums[index]=sums[index].toFixed(2);
|
|
|
|
+ } else if(column.property === 'xjAmt'){
|
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
|
+ const value = Number(curr);
|
|
|
|
+ if (!isNaN(value)) {
|
|
|
|
+ return prev + curr;
|
|
|
|
+ } else {
|
|
|
|
+ return prev;
|
|
|
|
+ }
|
|
|
|
+ }, 0);
|
|
|
|
+ sums[index]=sums[index].toFixed(2);
|
|
|
|
+ } else if(column.property === 'memberAmt'){
|
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
|
+ const value = Number(curr);
|
|
|
|
+ if (!isNaN(value)) {
|
|
|
|
+ return prev + curr;
|
|
|
|
+ } else {
|
|
|
|
+ return prev;
|
|
|
|
+ }
|
|
|
|
+ }, 0);
|
|
|
|
+ sums[index]=sums[index].toFixed(2);
|
|
|
|
+ } else {
|
|
|
|
+ sums[index] = '';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return sums;
|
|
|
|
+ },
|
|
// 取消按钮
|
|
// 取消按钮
|
|
cancel() {
|
|
cancel() {
|
|
this.open = false;
|
|
this.open = false;
|
|
@@ -238,16 +359,6 @@ export default {
|
|
};
|
|
};
|
|
this.resetForm("form");
|
|
this.resetForm("form");
|
|
},
|
|
},
|
|
- /** 搜索按钮操作 */
|
|
|
|
- handleQuery() {
|
|
|
|
- this.getList();
|
|
|
|
- this.getList2();
|
|
|
|
- },
|
|
|
|
- /** 重置按钮操作 */
|
|
|
|
- resetQuery() {
|
|
|
|
- this.resetForm("queryForm");
|
|
|
|
- this.handleQuery();
|
|
|
|
- },
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
handleAdd() {
|
|
@@ -255,6 +366,17 @@ export default {
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "添加班结管理";
|
|
this.title = "添加班结管理";
|
|
},
|
|
},
|
|
|
|
+ getClassInfo(){
|
|
|
|
+ this.queryParams.classStructureMan=this.$store.state.user.name;
|
|
|
|
+ listClass(this.queryParams).then(response => {
|
|
|
|
+ this.opo = response.data;
|
|
|
|
+ this.queryParams.classStructureNo=response.data.classStructureNo;
|
|
|
|
+ this.queryParams.stationId=response.data.stationId;
|
|
|
|
+ this.getList();
|
|
|
|
+ this.getList2();
|
|
|
|
+ this.getList3();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
submitForm() {
|
|
//获取当前登录人信息
|
|
//获取当前登录人信息
|
|
@@ -265,10 +387,11 @@ export default {
|
|
addStructure(this.form).then(response => {
|
|
addStructure(this.form).then(response => {
|
|
this.msgSuccess("新增成功");
|
|
this.msgSuccess("新增成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
- this.getList();
|
|
|
|
|
|
+ this.getClassInfo();
|
|
|
|
+
|
|
|
|
+
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|