|
@@ -4,16 +4,17 @@
|
|
<avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
|
|
<avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
|
|
:cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
|
|
:cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
|
|
@refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
|
|
@refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
|
|
- @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
|
|
|
|
|
|
+ @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" @search-reset="handleReset">
|
|
<template slot="menuLeft">
|
|
<template slot="menuLeft">
|
|
<el-button type="info" size="small" @click="outExport">导出</el-button>
|
|
<el-button type="info" size="small" @click="outExport">导出</el-button>
|
|
|
|
+ <el-button type="info" size="small" @click="switchDialog = !switchDialog">报表打印</el-button>
|
|
</template>
|
|
</template>
|
|
<template slot="corpNameSearch">
|
|
<template slot="corpNameSearch">
|
|
<crop-select v-model="search.corpName" corpType="KH" :zhKey="true"></crop-select>
|
|
<crop-select v-model="search.corpName" corpType="KH" :zhKey="true"></crop-select>
|
|
</template>
|
|
</template>
|
|
<template slot="careteTimeSearch">
|
|
<template slot="careteTimeSearch">
|
|
<el-date-picker v-model="search.careteTime" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
|
|
<el-date-picker v-model="search.careteTime" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
|
|
- format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']">
|
|
|
|
|
|
+ format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']" :clearable="false">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</template>
|
|
</template>
|
|
<template slot="brandSearch">
|
|
<template slot="brandSearch">
|
|
@@ -33,6 +34,15 @@
|
|
</template>
|
|
</template>
|
|
</avue-crud>
|
|
</avue-crud>
|
|
</basic-container>
|
|
</basic-container>
|
|
|
|
+ <report-dialog
|
|
|
|
+ :switchDialog="switchDialog"
|
|
|
|
+ reportName="销售利润"
|
|
|
|
+ :beginCreateTime="search.careteTime[0]"
|
|
|
|
+ :endCreateTime="search.careteTime[1]"
|
|
|
|
+ :salesName="search.salesName"
|
|
|
|
+ :corpName="search.corpName"
|
|
|
|
+ @onClose="onClose()"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -41,14 +51,22 @@ import { getToken } from "@/util/auth";
|
|
import { getList } from "@/api/statisticAnalysis/salesProfitN"
|
|
import { getList } from "@/api/statisticAnalysis/salesProfitN"
|
|
import _ from "lodash";
|
|
import _ from "lodash";
|
|
import iconList from "@/config/iconList";
|
|
import iconList from "@/config/iconList";
|
|
|
|
+import reportDialog from "@/components/report-dialog/main";
|
|
|
|
+import {defaultDate} from "@/util/date";
|
|
export default {
|
|
export default {
|
|
name: "index",
|
|
name: "index",
|
|
|
|
+ components:{
|
|
|
|
+ reportDialog
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
form: {},
|
|
form: {},
|
|
- search: {},
|
|
|
|
|
|
+ search: {
|
|
|
|
+ careteTime:[defaultDate(4)[0] + ' 00:00:00',defaultDate(4)[1] + ' 23:59:59']
|
|
|
|
+ },
|
|
dataList: [],
|
|
dataList: [],
|
|
loading: false,
|
|
loading: false,
|
|
|
|
+ switchDialog: false,
|
|
detailData: {},
|
|
detailData: {},
|
|
page: {
|
|
page: {
|
|
pageSize: 20,
|
|
pageSize: 20,
|
|
@@ -106,6 +124,10 @@ export default {
|
|
type: "sum",
|
|
type: "sum",
|
|
decimals: 2
|
|
decimals: 2
|
|
},{
|
|
},{
|
|
|
|
+ name: "specialOfferQuantity",
|
|
|
|
+ type: "sum",
|
|
|
|
+ decimals: 2
|
|
|
|
+ },{
|
|
name: "thisUsedProfit",
|
|
name: "thisUsedProfit",
|
|
type: "sum",
|
|
type: "sum",
|
|
decimals: 2
|
|
decimals: 2
|
|
@@ -246,6 +268,9 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ onClose(val){
|
|
|
|
+ this.switchDialog = val;
|
|
|
|
+ },
|
|
//查看跳转页面
|
|
//查看跳转页面
|
|
beforeOpenPage(row, index) {
|
|
beforeOpenPage(row, index) {
|
|
this.$router.$avueRouter.closeTag("/businessManagement/salesOrder/index");
|
|
this.$router.$avueRouter.closeTag("/businessManagement/salesOrder/index");
|
|
@@ -265,6 +290,12 @@ export default {
|
|
}
|
|
}
|
|
this.$refs.crud.getTableHeight();
|
|
this.$refs.crud.getTableHeight();
|
|
},
|
|
},
|
|
|
|
+ handleReset(item){
|
|
|
|
+ this.search = {
|
|
|
|
+ ...item,
|
|
|
|
+ careteTime:[defaultDate(4)[0] + ' 00:00:00',defaultDate(4)[1] + ' 23:59:59']
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//点击搜索按钮触发
|
|
//点击搜索按钮触发
|
|
searchChange(params, done) {
|
|
searchChange(params, done) {
|
|
this.page.currentPage = 1;
|
|
this.page.currentPage = 1;
|