|
@@ -20,8 +20,13 @@
|
|
|
</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 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="备货单号">
|
|
|
+ <a-input id="srebateReport-bizSubNo" v-model.trim="queryParam.bizSubNo" allowClear placeholder="请输入备货单号"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -30,23 +35,23 @@
|
|
|
</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 label="差价归属方">
|
|
|
+ <dealerSearchList ref="parentDealer" id="srebateReport-parentDealer" @change="parentDealerChange" placeholder="请输入差价归属方"/>
|
|
|
</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 label="差价归属类型">
|
|
|
+ <v-select code="RELATION_REBATE_PARENT_TYPE" v-model="queryParam.rebateParentType" allowClear placeholder="请选择差价归属类型"></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="类型">
|
|
|
+ <a-form-model-item label="单据类型">
|
|
|
<v-select
|
|
|
v-model="queryParam.bizType"
|
|
|
ref="bizType"
|
|
|
id="srebateReport-bizType"
|
|
|
code="REBATE_BILL_BIZ_TYPE"
|
|
|
- placeholder="请选择类型"
|
|
|
+ placeholder="请选择单据类型"
|
|
|
allowClear></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
@@ -70,7 +75,7 @@
|
|
|
<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
|
|
|
+ <!-- <a-button
|
|
|
type="primary"
|
|
|
style="margin-left: 5px"
|
|
|
@click="handleExport"
|
|
@@ -78,7 +83,7 @@
|
|
|
:loading="exportLoading"
|
|
|
v-if="$hasPermissions('M_salesReturnReportExport')"
|
|
|
class="button-warning"
|
|
|
- id="rebateDetailReport-export-btn">导出</a-button>
|
|
|
+ id="rebateDetailReport-export-btn">导出</a-button> -->
|
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
@@ -95,20 +100,20 @@
|
|
|
class="sTable fixPagination"
|
|
|
ref="table"
|
|
|
size="small"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
+ :rowKey="(record) => record.no"
|
|
|
+ rowKeyName="no"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
:pageSize="30"
|
|
|
- :style="{ height: tableHeight+110+'px' }"
|
|
|
- :scroll="{ x: 2200,y: tableHeight+10 }"
|
|
|
+ :style="{ height: tableHeight+38+'px' }"
|
|
|
+ :scroll="{ x: 2200,y: tableHeight-80 }"
|
|
|
: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-col flex="10%" >差价金额:{{ (totalData && (totalData.rebateAmount || totalData.rebateAmount==0)) ? toThousands(totalData.rebateAmount) : '--' }}</a-col>
|
|
|
</a-row>
|
|
|
</template>
|
|
|
</s-table>
|
|
@@ -142,9 +147,10 @@ export default {
|
|
|
endDate: '',
|
|
|
buyerSn: undefined, // 客户sn
|
|
|
bizNo: '', // 单号
|
|
|
+ bizSubNo: '',
|
|
|
bizType: undefined,
|
|
|
- directDealerSn: undefined, // 直接经销商SN
|
|
|
- indirectDealerSn: undefined, // 间接经销商SN
|
|
|
+ parentDealerSn: undefined,
|
|
|
+ rebateParentType: undefined,
|
|
|
productEntity: {
|
|
|
productBrandSn: undefined, // 产品品牌
|
|
|
productTypeSn1: '', // 产品一级分类
|
|
@@ -175,6 +181,9 @@ export default {
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
data.list[i].inStockQty = data.list[i].qty
|
|
|
+ // if (data.list[i].parentDealerName) {
|
|
|
+ // data.list[i].parentDealerName += '(' + data.list[i].rebateRate * 100 + '%)'
|
|
|
+ // }
|
|
|
}
|
|
|
this.disabled = false
|
|
|
}
|
|
@@ -191,25 +200,26 @@ export default {
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '60px', align: 'center' },
|
|
|
{ title: '订单号', dataIndex: 'bizNo', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '类型', dataIndex: 'rebateBill.bizTypeDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客户级别', dataIndex: 'rebateBill.buyerLevelDictValue', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客户名称', dataIndex: 'rebateBill.buyerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '直接绑定客户名称', dataIndex: 'rebateBill.directDealerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '间接绑定客户名称', dataIndex: 'rebateBill.indirectDealerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '备货单号', dataIndex: 'bizSubNo', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '客户级别', dataIndex: 'buyerLevelDictValue', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '客户名称', dataIndex: 'buyerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '差价归属方', dataIndex: 'parentDealerName', width: '130px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '百分比', dataIndex: 'rebateRate', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text * 100 + '%' : '--') } },
|
|
|
+ { title: '差价归属类型', dataIndex: 'rebateParentTypeDictValue', width: '120px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '价格级别', dataIndex: 'directLevelDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '品牌', dataIndex: 'productEntity.productBrandName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品分类', width: '160px', align: 'center', customRender: function (text, record) { return record.productEntity.productTypeName1 + (record.productEntity.productTypeName2 ? '>' : '') + (record.productEntity.productTypeName2 || '') } },
|
|
|
{ title: '产品编码', dataIndex: 'productEntity.code', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品名称', dataIndex: 'productEntity.name', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '数量', dataIndex: 'qty', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '省级价', dataIndex: 'provincePrice', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '市级价', dataIndex: 'cityPrice', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '特约价', dataIndex: 'specialPrice', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '总开单金额', dataIndex: 'totalAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '总实售金额', dataIndex: 'totalRealAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '直接差价', dataIndex: 'directRebatePrice', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '直接差价金额', dataIndex: 'directRebateAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '间接差价', dataIndex: 'indirectRebatePrice', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '间接差价金额', dataIndex: 'indirectRebateAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
|
+ { title: '数量', dataIndex: 'qty', width: '60px', align: 'center', customRender: function (text, record) { return ((text || text == 0) && _this.getNormalVal(record.rebateParentTypeDictValue) ? text : '--') } },
|
|
|
+ { title: '省级价', dataIndex: 'provincePrice', width: '80px', align: 'right', customRender: function (text, record) { return ((text || text == 0) && _this.getNormalVal(record.rebateParentTypeDictValue) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '市级价', dataIndex: 'cityPrice', width: '80px', align: 'right', customRender: function (text, record) { return ((text || text == 0) && _this.getNormalVal(record.rebateParentTypeDictValue) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '特约价', dataIndex: 'specialPrice', width: '80px', align: 'right', customRender: function (text, record) { return ((text || text == 0) && _this.getNormalVal(record.rebateParentTypeDictValue) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '总开单金额', dataIndex: 'totalAmount', width: '80px', align: 'right', customRender: function (text, record) { return ((text || text == 0) && _this.getNormalVal(record.rebateParentTypeDictValue) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '总实售金额', dataIndex: 'totalRealAmount', width: '80px', align: 'right', customRender: function (text, record) { return ((text || text == 0) && _this.getNormalVal(record.rebateParentTypeDictValue) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '总差价金额', dataIndex: 'totalRebateAmount', width: '80px', align: 'right', customRender: function (text, record) { return ((text || text == 0) && _this.getNormalVal(record.rebateParentTypeDictValue) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '差价金额', dataIndex: 'rebateAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
|
]
|
|
|
return arr
|
|
|
}
|
|
@@ -223,6 +233,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 判断差价归属类型为-- 或者 直接上级时 数量/省级价/市级价/特约价/总开单金额/总实售金额/差价 正常显示
|
|
|
+ getNormalVal (val) {
|
|
|
+ return !val || val === '直接上级'
|
|
|
+ },
|
|
|
// 合计
|
|
|
getCount (params) {
|
|
|
rebateDetailQueryCount(params).then(res => {
|
|
@@ -257,18 +271,11 @@ export default {
|
|
|
this.queryParam.buyerSn = undefined
|
|
|
}
|
|
|
},
|
|
|
- directDealerChange (val) {
|
|
|
- if (val.row) {
|
|
|
- this.queryParam.directDealerSn = val.row.dealerSn
|
|
|
- } else {
|
|
|
- this.queryParam.directDealerSn = undefined
|
|
|
- }
|
|
|
- },
|
|
|
- indirectDealerChange (val) {
|
|
|
+ parentDealerChange (val) {
|
|
|
if (val.row) {
|
|
|
- this.queryParam.indirectDealerSn = val.row.dealerSn
|
|
|
+ this.queryParam.parentDealerSn = val.row.dealerSn
|
|
|
} else {
|
|
|
- this.queryParam.indirectDealerSn = undefined
|
|
|
+ this.queryParam.parentDealerSn = undefined
|
|
|
}
|
|
|
},
|
|
|
// 重置
|
|
@@ -278,13 +285,13 @@ export default {
|
|
|
this.queryParam.beginDate = ''
|
|
|
this.queryParam.endDate = ''
|
|
|
this.queryParam.bizNo = ''
|
|
|
+ this.queryParam.bizSubNo = ''
|
|
|
this.queryParam.bizType = undefined
|
|
|
this.queryParam.buyerSn = undefined
|
|
|
- this.queryParam.indirectDealerSn = undefined
|
|
|
- this.queryParam.directDealerSn = undefined
|
|
|
+ this.queryParam.parentDealerSn = undefined
|
|
|
+ this.queryParam.rebateParentType = undefined
|
|
|
this.$refs.dealer.resetForm()
|
|
|
- this.$refs.indirectDealer.resetForm()
|
|
|
- this.$refs.directDealer.resetForm()
|
|
|
+ this.$refs.parentDealer.resetForm()
|
|
|
|
|
|
this.queryParam.productEntity.productBrandSn = undefined
|
|
|
this.queryParam.productEntity.productTypeSn1 = ''
|
|
@@ -313,9 +320,9 @@ export default {
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
const tableSearchH = this.$refs.tableSearch1.offsetHeight
|
|
|
console.log(tableSearchH)
|
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 280
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 300
|
|
|
})
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
mounted () {
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|