|
@@ -1,46 +1,21 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<basic-container class="page-crad">
|
|
|
- <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"
|
|
|
- @refresh-change="refreshChange"
|
|
|
- @on-load="onLoad"
|
|
|
- :table-loading="loading"
|
|
|
- @saveColumn="saveColumn"
|
|
|
- @resetColumn="resetColumn"
|
|
|
- @search-criteria-switch="searchCriteriaSwitch"
|
|
|
- >
|
|
|
+ <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"
|
|
|
+ @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
|
|
|
+ @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
|
|
|
<template slot="menuLeft">
|
|
|
- <el-button
|
|
|
- type="info"
|
|
|
- size="small"
|
|
|
- @click="outExport"
|
|
|
- icon="el-icon-download"
|
|
|
- >导出</el-button
|
|
|
- >
|
|
|
+ <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
|
|
|
</template>
|
|
|
<template slot="corpNameSearch">
|
|
|
<crop-select v-model="search.corpId" corpType="KH"></crop-select>
|
|
|
</template>
|
|
|
<template slot="storageNameSearch">
|
|
|
- <warehouse-select
|
|
|
- v-model="search.storageId"
|
|
|
- :configuration="configurationWarehouse"
|
|
|
- />
|
|
|
+ <warehouse-select v-model="search.storageId" :configuration="configurationWarehouse" />
|
|
|
</template>
|
|
|
- <template slot-scope="{ row }" slot="rankNo">
|
|
|
- <span
|
|
|
- style="color: #409EFF;cursor: pointer"
|
|
|
- @click.stop="editOpen(row)"
|
|
|
- >{{ row.rankNo }}
|
|
|
+ <template slot-scope="{ row }" slot="sysNo">
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row)">{{ row.sysNo }}
|
|
|
</span>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
@@ -50,12 +25,10 @@
|
|
|
|
|
|
<script>
|
|
|
import { getToken } from "@/util/auth";
|
|
|
-import {
|
|
|
- getList,
|
|
|
- exportExcel
|
|
|
-} from "@/api/statisticAnalysis/salesReconciliation";
|
|
|
+import { getList } from "@/api/statisticAnalysis/salesReconciliation";
|
|
|
import { micrometerFormat } from "@/util/validate";
|
|
|
import _ from "lodash";
|
|
|
+import { Row } from "element-ui";
|
|
|
export default {
|
|
|
name: "index",
|
|
|
data() {
|
|
@@ -90,7 +63,7 @@ export default {
|
|
|
column: [
|
|
|
{
|
|
|
label: "系统编号",
|
|
|
- prop: "rankNo",
|
|
|
+ prop: "sysNo",
|
|
|
search: true,
|
|
|
overHidden: true
|
|
|
},
|
|
@@ -102,7 +75,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "业务日期",
|
|
|
- prop: "businesDate",
|
|
|
+ prop: "createTime",
|
|
|
search: true,
|
|
|
type: "date",
|
|
|
format: "yyyy-MM-dd",
|
|
@@ -113,25 +86,25 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "业务员",
|
|
|
- prop: "a",
|
|
|
+ prop: "chargeMember",
|
|
|
search: true,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "收入",
|
|
|
- prop: "b",
|
|
|
+ prop: "debitAmount",
|
|
|
search: false,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "成本",
|
|
|
- prop: "c",
|
|
|
+ prop: "purchaseAmount",
|
|
|
search: false,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
label: "利润",
|
|
|
- prop: "d",
|
|
|
+ prop: "profit",
|
|
|
search: false,
|
|
|
overHidden: true
|
|
|
}
|
|
@@ -197,21 +170,14 @@ export default {
|
|
|
this.page.currentPage = 1;
|
|
|
this.page.pageSize = val;
|
|
|
},
|
|
|
- onLoad(page, params) {
|
|
|
- this.loading = true;
|
|
|
- this.dataList.forEach(item => {
|
|
|
- this.$refs.crud.toggleRowExpansion(item, false);
|
|
|
- });
|
|
|
- let queryParams = Object.assign({}, params);
|
|
|
- if (queryParams.businesDate && queryParams.businesDate.length > 0) {
|
|
|
- queryParams = {
|
|
|
- ...queryParams,
|
|
|
- orderStartDate: queryParams.businesDate[0] + " 00:00:00",
|
|
|
- orderEndDate: queryParams.businesDate[1] + " 23:59:59"
|
|
|
- };
|
|
|
- delete queryParams.businesDate;
|
|
|
+ onLoad(page, params = {}) {
|
|
|
+ let data = this.deepClone(Object.assign({}, params, this.search));
|
|
|
+ if (data.createTime) {
|
|
|
+ data.beginCreateTime = data.createTime[0]
|
|
|
+ data.endCreateTime = data.createTime[1]
|
|
|
+ delete data.createTime
|
|
|
}
|
|
|
- getList(page.currentPage, page.pageSize, queryParams)
|
|
|
+ getList(page.currentPage, page.pageSize, data)
|
|
|
.then(res => {
|
|
|
if (res.data.data.records) {
|
|
|
res.data.data.records.forEach(e => {
|
|
@@ -228,25 +194,27 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
- editOpen() {
|
|
|
+ editOpen(row) {
|
|
|
this.$router.push({
|
|
|
path: "/statisticAnalysis/salesReconciliationDetails/index",
|
|
|
+ query: {
|
|
|
+ id: row.id
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
outExport() {
|
|
|
if (!this.search.corpId) this.$set(this.search, "corpId", "");
|
|
|
- if (!this.search.storageId) this.$set(this.search, "storageId", "");
|
|
|
- if (this.search.businesDate && this.search.businesDate.length > 0) {
|
|
|
+ if (this.search.createTime && this.search.createTime.length > 0) {
|
|
|
this.search = {
|
|
|
...this.search,
|
|
|
- orderStartDate: this.search.businesDate[0] + " 00:00:00",
|
|
|
- orderEndDate: this.search.businesDate[1] + " 23:59:59"
|
|
|
+ orderStartDate: this.search.createTime[0] + " 00:00:00",
|
|
|
+ orderEndDate: this.search.createTime[1] + " 23:59:59"
|
|
|
};
|
|
|
} else {
|
|
|
this.search = {
|
|
|
...this.search,
|
|
|
- orderStartDate: "",
|
|
|
- orderEndDate: ""
|
|
|
+ beginCreateTime: "",
|
|
|
+ endCreateTime: ""
|
|
|
};
|
|
|
}
|
|
|
// return console.log(this.search)
|
|
@@ -257,12 +225,9 @@ export default {
|
|
|
})
|
|
|
.then(() => {
|
|
|
window.open(
|
|
|
- `/api/blade-purchase-sales/dealerOrder/orderItemStat/export?${
|
|
|
- this.website.tokenHeader
|
|
|
- }=${getToken()}&corpId=${this.search.corpId}&storageId=${
|
|
|
- this.search.storageId
|
|
|
- }&orderStartDate=${this.search.orderStartDate}&orderEndDate=${
|
|
|
- this.search.orderEndDate
|
|
|
+ `/api/blade-purchase-sales/exportOrder/reconciliationExport?${this.website.tokenHeader
|
|
|
+ }=${getToken()}&corpId=${this.search.corpId}&chargeMember=${this.search.chargeMember}&sysNo=${this.search.sysNo
|
|
|
+ }&beginCreateTime=${this.search.beginCreateTime}&endCreateTime =${this.search.endCreateTime
|
|
|
}`
|
|
|
);
|
|
|
})
|
|
@@ -311,9 +276,11 @@ export default {
|
|
|
.page-crad ::v-deep .basic-container__card {
|
|
|
height: 94.2vh;
|
|
|
}
|
|
|
+
|
|
|
::v-deep .el-table__expanded-cell[class*="cell"] {
|
|
|
padding: 0px;
|
|
|
}
|
|
|
+
|
|
|
.itemTable ::v-deep .el-table {
|
|
|
width: 100%;
|
|
|
}
|