|
@@ -11,23 +11,23 @@
|
|
:rules="rules"
|
|
:rules="rules"
|
|
@keyup.enter.native="handleSearch">
|
|
@keyup.enter.native="handleSearch">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
- <a-col :md="7" :sm="24">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
<a-form-model-item label="日期" prop="time">
|
|
<a-form-model-item label="日期" prop="time">
|
|
<rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
|
|
<rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="5" :sm="24">
|
|
<a-col :md="5" :sm="24">
|
|
<a-form-model-item label="单号">
|
|
<a-form-model-item label="单号">
|
|
- <a-input id="priceDifferenceDetailList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入单号"/>
|
|
|
|
|
|
+ <a-input id="priceDifferenceDetailList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单号"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="5" :sm="24">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
<a-form-model-item label="客户名称">
|
|
<a-form-model-item label="客户名称">
|
|
<custList id="priceDifferenceDetailList-custList" ref="custList" @change="custChange"></custList>
|
|
<custList id="priceDifferenceDetailList-custList" ref="custList" @change="custChange"></custList>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="7" :sm="24">
|
|
<a-form-model-item label="客户级别">
|
|
<a-form-model-item label="客户级别">
|
|
<v-select
|
|
<v-select
|
|
v-model="queryParam.dealer.dealerLevel"
|
|
v-model="queryParam.dealer.dealerLevel"
|
|
@@ -40,12 +40,12 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="品牌分类">
|
|
<a-form-model-item label="品牌分类">
|
|
- <v-select code="BRAND_TYPE" id="priceDifferenceDetailList-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
|
|
|
|
|
|
+ <v-select code="BRAND_TYPE" id="priceDifferenceDetailList-brandType" v-model="queryParam.product.brandType" allowClear placeholder="请选择品牌分类"></v-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="产品品牌">
|
|
<a-form-model-item label="产品品牌">
|
|
- <ProductBrand id="priceDifferenceDetailList-productBrandSn" v-model="queryParam.brandSn"></ProductBrand>
|
|
|
|
|
|
+ <ProductBrand id="priceDifferenceDetailList-productBrandSn" v-model="queryParam.product.productBrandSn"></ProductBrand>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -59,14 +59,14 @@
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-model-item label="省级区域" prop="provinceSn">
|
|
|
|
- <a-select id="priceDifferenceDetailList-provinceSn" allowClear @change="getCityList" v-model="queryParam.provinceSn" placeholder="请选择省">
|
|
|
|
|
|
+ <a-form-model-item label="省级区域">
|
|
|
|
+ <a-select id="priceDifferenceDetailList-provinceSn" allowClear v-model="queryParam.dealer.provinceSn" placeholder="请选择省">
|
|
<a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
|
|
<a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-model-item label="类型">
|
|
|
|
|
|
+ <a-form-model-item label="类型" prop="bizType">
|
|
<a-select id="priceDifferenceDetailList-bizType" allowClear v-model="queryParam.bizType" placeholder="请选择类型">
|
|
<a-select id="priceDifferenceDetailList-bizType" allowClear v-model="queryParam.bizType" placeholder="请选择类型">
|
|
<a-select-option v-for="item in bizTypeList" :value="item.value" :key="item.value">{{ item.name }}</a-select-option>
|
|
<a-select-option v-for="item in bizTypeList" :value="item.value" :key="item.value">{{ item.name }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
@@ -99,24 +99,24 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
- :scroll="{ x: 2800, y: tableHeight }"
|
|
|
|
|
|
+ :scroll="{ x: 2800 }"
|
|
bordered>
|
|
bordered>
|
|
<template slot="footer">
|
|
<template slot="footer">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
- <a-col :md="4" :sm="24">
|
|
|
|
- 分公司金额:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ 分公司金额:{{ (totalData && (totalData.wholesalePrice1 || totalData.wholesalePrice1==0)) ? totalData.wholesalePrice1 : '--' }}
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="4" :sm="24">
|
|
|
|
- 加盟商金额:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ 加盟商金额:{{ (totalData && (totalData.wholesalePrice2 || totalData.wholesalePrice2==0)) ? totalData.wholesalePrice2 : '--' }}
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="4" :sm="24">
|
|
|
|
- 特约加盟店金额:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ 特约加盟店金额:{{ (totalData && (totalData.wholesalePrice3 || totalData.wholesalePrice3==0)) ? totalData.wholesalePrice3 : '--' }}
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="4" :sm="24">
|
|
|
|
- 直接差价金额:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ 直接差价金额:{{ (totalData && (totalData.directRebateAmount || totalData.directRebateAmount==0)) ? totalData.directRebateAmount : '--' }}
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="4" :sm="24">
|
|
|
|
- 间接差价金额:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ 间接差价金额:{{ (totalData && (totalData.indirectRebateAmount || totalData.indirectRebateAmount==0)) ? totalData.indirectRebateAmount : '--' }}
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</template>
|
|
</template>
|
|
@@ -148,20 +148,21 @@ export default {
|
|
],
|
|
],
|
|
beginDate: getDate.getCurrMonthDays().starttime,
|
|
beginDate: getDate.getCurrMonthDays().starttime,
|
|
endDate: getDate.getCurrMonthDays().endtime,
|
|
endDate: getDate.getCurrMonthDays().endtime,
|
|
|
|
+ bizNo: '',
|
|
dealer: {
|
|
dealer: {
|
|
|
|
+ dealerSn: undefined,
|
|
dealerLevel: undefined,
|
|
dealerLevel: undefined,
|
|
- subareaSn: undefined // 区域
|
|
|
|
|
|
+ subareaSn: undefined, // 区域
|
|
|
|
+ provinceSn: undefined
|
|
},
|
|
},
|
|
- dealerSn: undefined,
|
|
|
|
- provinceSn: undefined,
|
|
|
|
- productBrandTypeSn: undefined,
|
|
|
|
- productBrandSn: undefined, // 产品品牌
|
|
|
|
- productTypeSn1: '', // 产品一级分类
|
|
|
|
- productTypeSn2: '', // 产品二级分类
|
|
|
|
- productTypeSn3: '', // 产品三级分类
|
|
|
|
- dealerLevel: undefined,
|
|
|
|
- subareaSn: undefined,
|
|
|
|
- dealerProvinceSn: undefined
|
|
|
|
|
|
+ product: {
|
|
|
|
+ brandType: undefined,
|
|
|
|
+ productBrandSn: undefined, // 产品品牌
|
|
|
|
+ productTypeSn1: '', // 产品一级分类
|
|
|
|
+ productTypeSn2: '', // 产品二级分类
|
|
|
|
+ productTypeSn3: '' // 产品三级分类
|
|
|
|
+ },
|
|
|
|
+ bizType: undefined
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
|
|
'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
|
|
@@ -171,8 +172,8 @@ export default {
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
{ title: '区域', dataIndex: 'dealer.subareaNameSet', width: 220, align: 'center', customRender: function (text) { return (text && text.length > 0) ? text.join('/') : '--' } },
|
|
{ title: '区域', dataIndex: 'dealer.subareaNameSet', width: 220, align: 'center', customRender: function (text) { return (text && text.length > 0) ? text.join('/') : '--' } },
|
|
- { title: '订单号', dataIndex: 'allocateNo', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '日期', dataIndex: 'allocateDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '订单号', dataIndex: 'bizNo', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '日期', dataIndex: 'bizCreateDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '省份', dataIndex: 'dealer.provinceName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '省份', dataIndex: 'dealer.provinceName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '直接绑定客户名称', dataIndex: 'directDealerName', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '直接绑定客户名称', dataIndex: 'directDealerName', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '间接绑定客户名称', dataIndex: 'indirectDealerName', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '间接绑定客户名称', dataIndex: 'indirectDealerName', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
@@ -181,12 +182,12 @@ export default {
|
|
{ title: '品牌', dataIndex: 'productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '品牌', dataIndex: 'productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '二级分类', dataIndex: 'productTypeName2', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '二级分类', dataIndex: 'productTypeName2', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '分公司金额', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '加盟商金额', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '特约加盟店金额', dataIndex: 'price', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '直接差价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '间接差价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '类型', dataIndex: 'allocateTypeName', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
|
|
+ { title: '分公司金额', dataIndex: 'wholesalePrice1', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '加盟商金额', dataIndex: 'wholesalePrice2', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '特约加盟店金额', dataIndex: 'wholesalePrice3', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '直接差价', dataIndex: 'directRebateAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '间接差价', dataIndex: 'indirectRebateAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '类型', dataIndex: 'bizTypeValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
@@ -201,6 +202,9 @@ export default {
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
|
|
+ if (data.list[i].bizType) {
|
|
|
|
+ data.list[i].bizTypeValue = data.list[i].bizType == 'SALES' ? '采购差价' : data.list[i].bizType == 'SALES_RETURN' ? '退货差价' : ''
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
this.spinning = false
|
|
this.spinning = false
|
|
@@ -249,13 +253,13 @@ export default {
|
|
// })
|
|
// })
|
|
},
|
|
},
|
|
custChange (val) {
|
|
custChange (val) {
|
|
- this.queryParam.dealerSn = val.key
|
|
|
|
|
|
+ this.queryParam.dealer.dealerSn = val.key
|
|
},
|
|
},
|
|
// 产品分类 change
|
|
// 产品分类 change
|
|
changeProductType (val, opt) {
|
|
changeProductType (val, opt) {
|
|
- this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
|
|
|
|
- this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
|
- this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
|
|
|
+ this.queryParam.product.productTypeSn1 = val[0] ? val[0] : ''
|
|
|
|
+ this.queryParam.product.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
|
+ this.queryParam.product.productTypeSn3 = val[2] ? val[2] : ''
|
|
},
|
|
},
|
|
// 省/市/区
|
|
// 省/市/区
|
|
getArea (leve, sn) {
|
|
getArea (leve, sn) {
|
|
@@ -294,16 +298,24 @@ export default {
|
|
this.$refs.rangeDate.resetDate(this.queryParam.time)
|
|
this.$refs.rangeDate.resetDate(this.queryParam.time)
|
|
this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
|
|
this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
|
|
this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
- this.queryParam.buyerSn = undefined
|
|
|
|
- this.queryParam.subareaSn = undefined
|
|
|
|
- this.queryParam.productName = ''
|
|
|
|
- this.queryParam.productCode = ''
|
|
|
|
- this.queryParam.productTypeSn1 = ''
|
|
|
|
- this.queryParam.productTypeSn2 = ''
|
|
|
|
- this.queryParam.productTypeSn3 = ''
|
|
|
|
- this.queryParam.salesBillNo = ''
|
|
|
|
|
|
+ this.queryParam.bizNo = ''
|
|
|
|
+ this.queryParam.dealer.dealerSn = undefined
|
|
|
|
+ this.queryParam.dealer.dealerLevel = undefined
|
|
|
|
+ this.queryParam.dealer.subareaSn = undefined
|
|
|
|
+ this.queryParam.dealer.provinceSn = undefined
|
|
|
|
+ this.queryParam.product.brandType = ''
|
|
|
|
+ this.queryParam.product.productBrandSn = ''
|
|
|
|
+ this.queryParam.product.productTypeSn1 = ''
|
|
|
|
+ this.queryParam.product.productTypeSn2 = ''
|
|
|
|
+ this.queryParam.product.productTypeSn3 = ''
|
|
|
|
+ this.queryParam.bizType = undefined
|
|
this.productType = []
|
|
this.productType = []
|
|
- this.$refs.table.refresh(true)
|
|
|
|
|
|
+ this.totalData = null
|
|
|
|
+ if (this.advanced) {
|
|
|
|
+ this.$refs.custList.resetForm()
|
|
|
|
+ }
|
|
|
|
+ this.$refs.ruleForm.resetFields()
|
|
|
|
+ this.$refs.table.clearTable()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|