|
@@ -1,67 +1,34 @@
|
|
|
<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>
|
|
|
+ <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>
|
|
|
|
|
@@ -82,8 +49,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- exportLoading:false,
|
|
|
- switchDialog:false,
|
|
|
+ exportLoading: false,
|
|
|
+ switchDialog: false,
|
|
|
statementData: {},
|
|
|
form: {},
|
|
|
search: {},
|
|
@@ -210,7 +177,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";
|
|
@@ -269,7 +236,7 @@ export default {
|
|
|
this.dataList.forEach(item => {
|
|
|
this.$refs.crud.toggleRowExpansion(item, false);
|
|
|
});
|
|
|
- let queryParams = Object.assign({tradeType: this.tradeType,dc: 'd',}, params);
|
|
|
+ let queryParams = this.deepClone(Object.assign({ tradeType: this.tradeType, dc: 'd' }, params, this.search));
|
|
|
if (queryParams.accDate && queryParams.accDate.length > 0) {
|
|
|
queryParams = {
|
|
|
...queryParams,
|
|
@@ -317,10 +284,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] + " " + "00:00:00"
|
|
|
+ this.statementData.accDateEnd = this.statementData.accDate[1] + " " + "23:59:59"
|
|
|
delete this.statementData.accDate
|
|
|
}
|
|
|
this.switchDialog = !this.switchDialog;
|
|
@@ -363,7 +330,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({
|
|
@@ -397,8 +364,7 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
window.open(
|
|
|
- `/api/trade-finance/receivable/export?${
|
|
|
- this.website.tokenHeader
|
|
|
+ `/api/trade-finance/receivable/export?${this.website.tokenHeader
|
|
|
}=${getToken()}&dc=d&tradeType=${this.tradeType}&corpId=${this.search.corpId}&accDateStart=${this.search.accDateStart}&accDateEnd=${this.search.accDateEnd}`
|
|
|
);
|
|
|
}).catch(() => {
|
|
@@ -416,9 +382,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%;
|
|
|
}
|