|
@@ -1,114 +1,119 @@
|
|
|
<template>
|
|
|
- <a-spin :spinning="spinning" tip="Loading...">
|
|
|
- <!-- 搜索条件 -->
|
|
|
- <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
- <a-form-model
|
|
|
- id="rebateDetailReport-form"
|
|
|
- ref="ruleForm"
|
|
|
- class="form-model-con"
|
|
|
- layout="inline"
|
|
|
- :model="queryParam"
|
|
|
- :rules="rules"
|
|
|
- :labelCol="labelCol"
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
- @keyup.enter.native="handleSearch" >
|
|
|
- <a-row :gutter="15">
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="日期" prop="time">
|
|
|
- <rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="单号">
|
|
|
- <a-input id="srebateReport-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单号"/>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="客户名称">
|
|
|
- <dealerSearchList ref="dealer" id="srebateReport-buyerName" @change="dealerChange" />
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="直接绑定客户名称">
|
|
|
- <dealerSearchList ref="directDealer" id="srebateReport-buyerName" @change="directDealerChange" />
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="间接绑定客户名称">
|
|
|
- <dealerSearchList ref="indirectDealer" id="srebateReport-buyerName" @change="indirectDealerChange" />
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="类型">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.bizType"
|
|
|
- ref="bizType"
|
|
|
- id="srebateReport-bizType"
|
|
|
- code="REBATE_BILL_BIZ_TYPE"
|
|
|
- placeholder="请选择类型"
|
|
|
- allowClear></v-select>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <template v-if="advanced">
|
|
|
+ <div>
|
|
|
+ <a-card size="small" :bordered="false" class="searchBottomSpace">
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
+ <a-form-model
|
|
|
+ id="rebateDetailReport-form"
|
|
|
+ ref="ruleForm"
|
|
|
+ class="form-model-con"
|
|
|
+ layout="inline"
|
|
|
+ :model="queryParam"
|
|
|
+ :rules="rules"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ @keyup.enter.native="handleSearch" >
|
|
|
+ <a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品品牌">
|
|
|
- <ProductBrand id="rebateDetailReport-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
|
|
|
- </a-form-item>
|
|
|
+ <a-form-model-item label="日期" prop="time">
|
|
|
+ <rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="单号">
|
|
|
+ <a-input id="srebateReport-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单号"/>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="产品分类">
|
|
|
- <ProductType id="rebateDetailReport-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="queryParam.productType"></ProductType>
|
|
|
+ <a-form-model-item label="客户名称">
|
|
|
+ <dealerSearchList ref="dealer" id="srebateReport-buyerName" @change="dealerChange" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="产品编码">
|
|
|
- <a-input id="rebateDetailReport-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
|
|
|
+ <a-form-model-item label="直接绑定客户名称">
|
|
|
+ <dealerSearchList ref="directDealer" id="srebateReport-buyerName" @change="directDealerChange" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="间接绑定客户名称">
|
|
|
+ <dealerSearchList ref="indirectDealer" id="srebateReport-buyerName" @change="indirectDealerChange" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="类型">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.bizType"
|
|
|
+ ref="bizType"
|
|
|
+ id="srebateReport-bizType"
|
|
|
+ code="REBATE_BILL_BIZ_TYPE"
|
|
|
+ placeholder="请选择类型"
|
|
|
+ allowClear></v-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <template v-if="advanced">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="产品品牌">
|
|
|
+ <ProductBrand id="rebateDetailReport-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="产品分类">
|
|
|
+ <ProductType id="rebateDetailReport-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="queryParam.productType"></ProductType>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="产品编码">
|
|
|
+ <a-input id="rebateDetailReport-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ </template>
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
+ <a-button type="primary" @click="handleSearch" :disabled="disabled" id="rebateDetailReport-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="rebateDetailReport-reset">重置</a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ style="margin-left: 5px"
|
|
|
+ @click="handleExport"
|
|
|
+ :disabled="disabled"
|
|
|
+ :loading="exportLoading"
|
|
|
+ v-if="$hasPermissions('M_salesReturnReportExport')"
|
|
|
+ class="button-warning"
|
|
|
+ id="rebateDetailReport-export-btn">导出</a-button>
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
+ </a>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form-model>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ <a-card size="small" :bordered="false">
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable fixPagination"
|
|
|
+ ref="table"
|
|
|
+ size="small"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :style="{ height: tableHeight+84.5+'px' }"
|
|
|
+ :scroll="{ x: 2200,y: tableHeight-20 }"
|
|
|
+ :defaultLoadData="false"
|
|
|
+ bordered>
|
|
|
+ <template slot="footer">
|
|
|
+ <a-row type="flex" justify="end" :gutter="10">
|
|
|
+ <a-col flex="10%" >总开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
|
|
|
+ <a-col flex="10%" >总实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
|
|
|
+ <a-col flex="10%" >直接差价金额:{{ (totalData && (totalData.directRebateAmount || totalData.directRebateAmount==0)) ? toThousands(totalData.directRebateAmount) : '--' }}</a-col>
|
|
|
+ <a-col flex="10%" >间接差价金额:{{ (totalData && (totalData.indirectRebateAmount || totalData.indirectRebateAmount==0)) ? toThousands(totalData.indirectRebateAmount) : '--' }}</a-col>
|
|
|
+ </a-row>
|
|
|
</template>
|
|
|
- <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
- <a-button type="primary" @click="handleSearch" :disabled="disabled" id="rebateDetailReport-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="rebateDetailReport-reset">重置</a-button>
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- style="margin-left: 5px"
|
|
|
- @click="handleExport"
|
|
|
- :disabled="disabled"
|
|
|
- :loading="exportLoading"
|
|
|
- v-if="$hasPermissions('M_salesReturnReportExport')"
|
|
|
- class="button-warning"
|
|
|
- id="rebateDetailReport-export-btn">导出</a-button>
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
- {{ advanced ? '收起' : '展开' }}
|
|
|
- <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
- </a>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form-model>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable fixPagination"
|
|
|
- ref="table"
|
|
|
- :style="{ height: tableHeight+114.5+'px' }"
|
|
|
- size="small"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :scroll="{ y: tableHeight, x: 2200}"
|
|
|
- :defaultLoadData="false"
|
|
|
- bordered>·
|
|
|
- <template slot="footer">
|
|
|
- <a-row type="flex" justify="end" :gutter="10">
|
|
|
- <a-col flex="10%" >总开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
|
|
|
- <a-col flex="10%" >总实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount) : '--' }}</a-col>
|
|
|
- <a-col flex="10%" >直接差价金额:{{ (totalData && (totalData.directRebateAmount || totalData.directRebateAmount==0)) ? toThousands(totalData.directRebateAmount) : '--' }}</a-col>
|
|
|
- <a-col flex="10%" >间接差价金额:{{ (totalData && (totalData.indirectRebateAmount || totalData.indirectRebateAmount==0)) ? toThousands(totalData.indirectRebateAmount) : '--' }}</a-col>
|
|
|
- </a-row>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
- </a-spin>
|
|
|
+ </s-table>
|
|
|
+ </a-spin>
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -206,6 +211,17 @@ export default {
|
|
|
return arr
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ advanced (newValue, oldValue) {
|
|
|
+ const _this = this
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
+ _this.setTableH()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
+ this.setTableH()
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 合计
|
|
|
getCount (params) {
|
|
@@ -282,26 +298,6 @@ export default {
|
|
|
this.totalData = null
|
|
|
this.$refs.table.clearTable()
|
|
|
},
|
|
|
- // 导出
|
|
|
- handleExport () {
|
|
|
- const _this = this
|
|
|
- this.$refs.ruleForm.validate(valid => {
|
|
|
- if (valid) {
|
|
|
- const params = _this.queryParam
|
|
|
- params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
|
|
|
- _this.exportLoading = true
|
|
|
- _this.spinning = true
|
|
|
- reportSalesReturnDetailExport(params).then(res => {
|
|
|
- downloadExcel(res, '销售退货明细报表')
|
|
|
- _this.exportLoading = false
|
|
|
- _this.spinning = false
|
|
|
- })
|
|
|
- } else {
|
|
|
- console.log('error submit!!')
|
|
|
- return false
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 产品分类 change
|
|
|
changeProductType (val, opt) {
|
|
|
this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
|
|
@@ -311,11 +307,15 @@ export default {
|
|
|
pageInit () {
|
|
|
this.disabled = false
|
|
|
this.spinning = false
|
|
|
- this.setTableH()
|
|
|
+ this.setTableStartH()
|
|
|
},
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 380
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 265
|
|
|
+ },
|
|
|
+ setTableStartH () {
|
|
|
+ const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 360
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|