|
@@ -1,68 +1,35 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<basic-container class="page-crad" v-show="show">
|
|
|
- <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"
|
|
|
- @search-reset="searchReset"
|
|
|
- >
|
|
|
+ <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" @search-reset="searchReset">
|
|
|
<template slot="menuLeft">
|
|
|
- <el-button
|
|
|
- type="info"
|
|
|
- icon="el-icon-printer"
|
|
|
- size="small"
|
|
|
- :loading="exportLoading"
|
|
|
- @click.stop="statement"
|
|
|
- v-if="false"
|
|
|
- >报表打印
|
|
|
+ <el-button type="info" icon="el-icon-printer" size="small" :loading="exportLoading" @click.stop="statement"
|
|
|
+ v-if="false">报表打印
|
|
|
</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="KG"
|
|
|
- ></crop-select>
|
|
|
+ <crop-select v-model="search.corpId" corpType="KG"></crop-select>
|
|
|
</template>
|
|
|
<template slot="sizeSearch">
|
|
|
- <el-select
|
|
|
- v-model="search.size"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
+ <el-select v-model="search.size" placeholder="请选择">
|
|
|
<el-option label="是" :value="1"></el-option>
|
|
|
<el-option label="否" :value="0"></el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
<template slot="corpName" slot-scope="scope">
|
|
|
- <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpName }}</span>
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{
|
|
|
+ scope.row.corpName
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
- <report-dialog
|
|
|
- :switchDialog="switchDialog"
|
|
|
- :searchValue="statementData"
|
|
|
- :reportName="'经销商-可用库存表'"
|
|
|
- @onClose="onClose()"
|
|
|
- />
|
|
|
- <detail
|
|
|
- v-if="!show"
|
|
|
- :detail-data="detailData"
|
|
|
- :trade-type="tradeType"
|
|
|
- @goBack="goBack"
|
|
|
- ></detail>
|
|
|
+ <report-dialog :switchDialog="switchDialog" :searchValue="statementData" :reportName="'经销商-可用库存表'"
|
|
|
+ @onClose="onClose()" />
|
|
|
+ <detail v-if="!show" :detail-data="detailData" :trade-type="tradeType" @goBack="goBack"></detail>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -83,8 +50,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- exportLoading:false,
|
|
|
- switchDialog:false,
|
|
|
+ exportLoading: false,
|
|
|
+ switchDialog: false,
|
|
|
statementData: {},
|
|
|
form: {},
|
|
|
search: {},
|
|
@@ -139,9 +106,9 @@ export default {
|
|
|
label: "年月",
|
|
|
prop: "accDate",
|
|
|
search: true,
|
|
|
- type: 'date',
|
|
|
- format: "yyyy-MM-dd",
|
|
|
- valueFormat: "yyyy-MM-dd",
|
|
|
+ type: 'month',
|
|
|
+ format: "yyyy-MM",
|
|
|
+ valueFormat: "yyyy-MM",
|
|
|
unlinkPanels: true,
|
|
|
searchRange: true,
|
|
|
overHidden: true,
|
|
@@ -199,7 +166,7 @@ export default {
|
|
|
this.option.column.forEach(item => {
|
|
|
if (item.search) i++
|
|
|
})
|
|
|
- if (i % 3 !== 0){
|
|
|
+ if (i % 3 !== 0) {
|
|
|
const num = 3 - Number(i % 3)
|
|
|
this.option.searchMenuSpan = num * 8;
|
|
|
this.option.searchMenuPosition = "right";
|
|
@@ -258,12 +225,12 @@ export default {
|
|
|
this.dataList.forEach(item => {
|
|
|
this.$refs.crud.toggleRowExpansion(item, false);
|
|
|
});
|
|
|
- let queryParams = Object.assign({tradeType: this.tradeType}, params);
|
|
|
+ let queryParams = Object.assign({ tradeType: this.tradeType }, params);
|
|
|
if (queryParams.accDate && queryParams.accDate.length > 0) {
|
|
|
queryParams = {
|
|
|
...queryParams,
|
|
|
- accDateStart: queryParams.accDate[0] + ' 00:00:00',
|
|
|
- accDateEnd: queryParams.accDate[1] + ' 23:59:59',
|
|
|
+ accDateStart: queryParams.accDate[0],
|
|
|
+ accDateEnd: queryParams.accDate[1],
|
|
|
}
|
|
|
delete queryParams.accDate;
|
|
|
}
|
|
@@ -306,10 +273,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
statement() {
|
|
|
- this.statementData = {...this.search};
|
|
|
+ this.statementData = { ...this.search };
|
|
|
if (this.statementData.accDate && this.statementData.accDate.length > 0) {
|
|
|
- this.statementData.accDateStart = this.statementData.accDate[0]+ " " + "00:00:00"
|
|
|
- this.statementData.accDateEnd = this.statementData.accDate[1]+ " " + "23:59:59"
|
|
|
+ this.statementData.accDateStart = this.statementData.accDate[0]
|
|
|
+ this.statementData.accDateEnd = this.statementData.accDate[1]
|
|
|
delete this.statementData.accDate
|
|
|
}
|
|
|
this.switchDialog = !this.switchDialog;
|
|
@@ -352,7 +319,7 @@ export default {
|
|
|
this.show = false;
|
|
|
},
|
|
|
goBack() {
|
|
|
- this.detailData=this.$options.data().detailData
|
|
|
+ this.detailData = this.$options.data().detailData
|
|
|
if (JSON.stringify(this.$route.query) != "{}") {
|
|
|
this.$router.$avueRouter.closeTag();
|
|
|
this.$router.push({
|
|
@@ -370,8 +337,8 @@ export default {
|
|
|
if (this.search.accDate && this.search.accDate.length > 0) {
|
|
|
this.search = {
|
|
|
...this.search,
|
|
|
- accDateStart: this.search.accDate[0] + ' 00:00:00',
|
|
|
- accDateEnd: this.search.accDate[1] + ' 23:59:59',
|
|
|
+ accDateStart: this.search.accDate[0],
|
|
|
+ accDateEnd: this.search.accDate[1]
|
|
|
}
|
|
|
} else {
|
|
|
this.search = {
|
|
@@ -386,8 +353,7 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
window.open(
|
|
|
- `/api/trade-finance/profit/export?${
|
|
|
- this.website.tokenHeader
|
|
|
+ `/api/trade-finance/profit/export?${this.website.tokenHeader
|
|
|
}=${getToken()}&tradeType=${this.tradeType}&corpId=${this.search.corpId}&accDateStart=${this.search.accDateStart}&accDateEnd=${this.search.accDateEnd}`
|
|
|
);
|
|
|
}).catch(() => {
|
|
@@ -405,9 +371,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%;
|
|
|
}
|