|
@@ -5,6 +5,13 @@
|
|
|
:cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
|
|
|
@refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
|
|
|
@resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" @search-reset="searchReset">
|
|
|
+ <template slot="header">
|
|
|
+ <el-table :data="commodityData" border size="small" @header-click="cellClick" style="width: 100%"
|
|
|
+ v-loading="itemloading">
|
|
|
+ <el-table-column v-for="(item, index) in commodityLabel" :key="index" :prop="item.prop" show-overflow-tooltip
|
|
|
+ :label="item.label" />
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
<template slot="menuLeft">
|
|
|
<el-button type="info" icon="el-icon-printer" size="small" :loading="exportLoading" @click.stop="statement"
|
|
|
v-if="false">报表打印
|
|
@@ -22,9 +29,12 @@
|
|
|
</template>
|
|
|
<template slot="customerName" slot-scope="scope">
|
|
|
<span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{
|
|
|
- scope.row.customerName
|
|
|
+ scope.row.customerName
|
|
|
}}</span>
|
|
|
</template>
|
|
|
+ <template slot="whetherSettlementSearch">
|
|
|
+ <el-checkbox v-model="search.whetherSettlement" :true-label="1" :false-label="0"></el-checkbox>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
<report-dialog :switchDialog="switchDialog" :searchValue="statementData" :reportName="'经销商-可用库存表'"
|
|
@@ -36,7 +46,7 @@
|
|
|
<script>
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import { getList } from "@/api/statisticAnalysis/profitLedger";
|
|
|
-import { getStatisticsList } from "@/api/tireMall/tirePartsMall/statisticAnalysis/index";
|
|
|
+import { getStatisticsList, statisticsSum } from "@/api/tireMall/tirePartsMall/statisticAnalysis/index";
|
|
|
import { micrometerFormat } from "@/util/validate";
|
|
|
import _ from "lodash";
|
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
@@ -51,11 +61,30 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ itemloading: false,
|
|
|
+ commodityLabel: [
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ label: "收入",
|
|
|
+ prop: "totalMoney",
|
|
|
+ }, {
|
|
|
+ id: 2,
|
|
|
+ label: "成本",
|
|
|
+ prop: "cost",
|
|
|
+ }, {
|
|
|
+ id: 3,
|
|
|
+ label: "利润",
|
|
|
+ prop: "profit",
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ commodityData: [], // 合计数据
|
|
|
exportLoading: false,
|
|
|
switchDialog: false,
|
|
|
statementData: {},
|
|
|
form: {},
|
|
|
- search: {},
|
|
|
+ search: {
|
|
|
+ whetherSettlement: 0,
|
|
|
+ },
|
|
|
dataList: [],
|
|
|
loading: false,
|
|
|
detailData: {},
|
|
@@ -69,8 +98,8 @@ export default {
|
|
|
defaultOption: {
|
|
|
searchShow: true,
|
|
|
align: "center",
|
|
|
- searchSpan: 8,
|
|
|
- searchMenuSpan: 8,
|
|
|
+ searchSpan: 6,
|
|
|
+ searchMenuSpan: 24,
|
|
|
border: true,
|
|
|
index: true,
|
|
|
addBtn: false,
|
|
@@ -94,7 +123,7 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
searchIcon: true,
|
|
|
- searchIndex: 2,
|
|
|
+ searchIndex: 3,
|
|
|
menu: false,
|
|
|
column: [
|
|
|
{
|
|
@@ -107,8 +136,31 @@ export default {
|
|
|
label: 'cname',
|
|
|
value: 'id'
|
|
|
},
|
|
|
- dicUrl: '/api/blade-sales-part/corpsDesc/listAll?cname={{key}}&corpType=KH&enableOrNot=0',
|
|
|
-
|
|
|
+ dicUrl: '/api/blade-sales-part/corpsDesc/listAll?cname={{key}}&corpType=KH&enableOrNot=1',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '业务员',
|
|
|
+ prop: "salerId",
|
|
|
+ search: true,
|
|
|
+ type: "select",
|
|
|
+ props: {
|
|
|
+ label: "name",
|
|
|
+ value: "id"
|
|
|
+ },
|
|
|
+ dicUrl: "/api/blade-user/client/getUserByRole",
|
|
|
+ filterable: true,
|
|
|
+ hide: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '业务员',
|
|
|
+ prop: "salerName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "结清不显示",
|
|
|
+ prop: "whetherSettlement",
|
|
|
+ search: true,
|
|
|
+ hide: true
|
|
|
},
|
|
|
{
|
|
|
label: "业务日期",
|
|
@@ -173,8 +225,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async created() {
|
|
|
+ this.option = this.defaultOption;
|
|
|
this.option = await this.getColumnData(this.getColumnName(286), this.defaultOption);
|
|
|
- // this.option = this.defaultOption;
|
|
|
this.getWorkDicts('brand').then(res => {
|
|
|
this.brandOption = res.data.data;
|
|
|
})
|
|
@@ -246,7 +298,7 @@ export default {
|
|
|
this.dataList.forEach(item => {
|
|
|
this.$refs.crud.toggleRowExpansion(item, false);
|
|
|
});
|
|
|
- let queryParams = this.deepClone(Object.assign({ type: 0}, params, this.search));
|
|
|
+ let queryParams = this.deepClone(Object.assign({ type: 0 }, params, this.search));
|
|
|
if (queryParams.accDate && queryParams.accDate.length > 0) {
|
|
|
queryParams = {
|
|
|
...queryParams,
|
|
@@ -268,6 +320,12 @@ export default {
|
|
|
}
|
|
|
this.dataList = res.data.data.records ? res.data.data.records : [];
|
|
|
this.page.total = res.data.data.total;
|
|
|
+ this.itemloading = true,
|
|
|
+ statisticsSum({ type: 0, ...queryParams }).then(res => {
|
|
|
+ this.commodityData = [res.data.data]
|
|
|
+ }).finally(() => {
|
|
|
+ this.itemloading = false;
|
|
|
+ });
|
|
|
if (this.page.total) {
|
|
|
this.option.height = window.innerHeight - 230;
|
|
|
}
|
|
@@ -336,7 +394,8 @@ export default {
|
|
|
beforeOpenPage(row, index) {
|
|
|
this.detailData = {
|
|
|
customerId: row.customerId,
|
|
|
- businesDate: row.businesDate
|
|
|
+ businesDate: row.businesDate,
|
|
|
+ salerId: row.salerId,
|
|
|
};
|
|
|
this.show = false;
|
|
|
},
|
|
@@ -377,8 +436,8 @@ export default {
|
|
|
window.open(
|
|
|
`/api/blade-sales-part/order/statistics-export?${this.website.tokenHeader
|
|
|
}=${getToken()}&type=0&businesDateList[0]=${this.search.businesDateList[0] == null || this.search.businesDateList[0] === undefined ? '' : this.search.businesDateList[0]
|
|
|
- }&businesDateList[1]=${this.search.businesDateList[1] == null || this.search.businesDateList[1] === undefined ? '' : this.search.businesDateList[1]
|
|
|
- }&customerId=${this.search.customerName == null || this.search.customerName === undefined ? '' : this.search.customerName}`
|
|
|
+ }&businesDateList[1]=${this.search.businesDateList[1] == null || this.search.businesDateList[1] === undefined ? '' : this.search.businesDateList[1]
|
|
|
+ }&customerId=${this.search.customerName == null || this.search.customerName === undefined ? '' : this.search.customerName}`
|
|
|
);
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
@@ -403,4 +462,8 @@ export default {
|
|
|
.itemTable ::v-deep .el-table {
|
|
|
width: 100%;
|
|
|
}
|
|
|
+
|
|
|
+/deep/ .el-col-md-8 {
|
|
|
+ width: 24.33333%;
|
|
|
+}
|
|
|
</style>
|