|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <a-card size="small" :bordered="false" class="yearQueryList-wrap searchBoxNormal">
|
|
|
+ <a-card size="small" :bordered="false" class="sfdetail-wrap searchBoxNormal">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div class="table-page-search-wrapper" ref="tableSearch">
|
|
|
<a-form-model
|
|
|
- id="yearQueryList-form"
|
|
|
+ id="sfdetail-form"
|
|
|
ref="ruleForm"
|
|
|
class="form-model-con"
|
|
|
layout="inline"
|
|
@@ -12,59 +12,89 @@
|
|
|
:model="queryParam">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="查询年份" prop="queryDate">
|
|
|
- <a-select
|
|
|
- id="yearQueryList-time"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="请选择年份"
|
|
|
- :value="queryParam.queryDate"
|
|
|
- @change="changeYear"
|
|
|
- allowClear>
|
|
|
- <a-select-option v-for="item in years" :value="item" :key="item">
|
|
|
- {{ item }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
+ <a-form-model-item prop="time">
|
|
|
+ <div style="display: inline;" slot="label">
|
|
|
+ <a-popover placement="top">
|
|
|
+ <template slot="content">
|
|
|
+ <p>1、销售单(非转单)的下推时间</p>
|
|
|
+ <p>2、销售单(转单)的转单完结时间</p>
|
|
|
+ <p>3、销售退货单的客服确认时间</p>
|
|
|
+ </template>
|
|
|
+ 查询日期 <a-icon type="question-circle" />
|
|
|
+ </a-popover>
|
|
|
+ </div>
|
|
|
+ <rangeDate
|
|
|
+ ref="rangeDate"
|
|
|
+ :showTime="false"
|
|
|
+ :value="queryParam.time"
|
|
|
+ id="sfdetail-time"
|
|
|
+ @change="dateChange" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="地区">
|
|
|
- <AreaList id="yearQueryList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
|
|
|
- </a-form-model-item>
|
|
|
+ <a-form-item label="记账主体">
|
|
|
+ <a-input id="sfdetail-acount" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入记账主体"/>
|
|
|
+ </a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="区域/分区">
|
|
|
- <subarea id="yearQueryList-subarea" ref="subarea" @change="subareaChange"></subarea>
|
|
|
+ <a-form-item label="业务单号">
|
|
|
+ <a-input id="sfdetail-bizNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入业务单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="客户名称">
|
|
|
- <dealerSubareaScopeList ref="dealerSubareaScopeList" id="yearQueryList-dealerName" @change="custChange" />
|
|
|
+ <a-input id="sfdetail-custName" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入客户名称"/>
|
|
|
</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.dealerLevel"
|
|
|
ref="dealerLevel"
|
|
|
- id="yearQueryList-dealerLevel"
|
|
|
+ id="sfdetail-dealerLevel"
|
|
|
code="DEALER_LEVEL"
|
|
|
- placeholder="请选择客户级别"
|
|
|
+ placeholder="请选择业务类型"
|
|
|
+ allowClear></v-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="发货经销商">
|
|
|
+ <custList id="sfdetail-transferDealerSn" dataAuthFlag="0" placeholder="请输入发货经销商" ref="dealerTireScopeList" @change="custTireChange" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="是否轮胎省仓">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.provinceFlag"
|
|
|
+ id="sfdetail-provinceFlag"
|
|
|
+ code="Flag"
|
|
|
+ placeholder="请选择是否轮胎省仓"
|
|
|
allowClear></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="区域/分区">
|
|
|
+ <subarea id="sfdetail-subarea" ref="subarea" @change="subareaChange"></subarea>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="地区">
|
|
|
+ <AreaList id="sfdetail-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-button
|
|
|
type="primary"
|
|
|
@click="handleSearch"
|
|
|
:disabled="disabled"
|
|
|
- id="yearQueryList-refresh">查询</a-button>
|
|
|
+ id="sfdetail-refresh">查询</a-button>
|
|
|
<a-button
|
|
|
style="margin-left: 8px"
|
|
|
@click="resetSearchForm"
|
|
|
:disabled="disabled"
|
|
|
- id="yearQueryList-reset">重置</a-button>
|
|
|
+ id="sfdetail-reset">重置</a-button>
|
|
|
<a-button
|
|
|
style="margin-left: 10px"
|
|
|
type="primary"
|
|
@@ -73,7 +103,7 @@
|
|
|
:disabled="disabled"
|
|
|
:loading="exportLoading"
|
|
|
v-if="$hasPermissions('B_tireFeeExport')"
|
|
|
- id="yearQueryList-export">导出</a-button>
|
|
|
+ id="sfdetail-export">导出</a-button>
|
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
<a-icon :type="advanced ? 'up' : 'down'" />
|
|
@@ -101,17 +131,14 @@
|
|
|
<!-- 地区 -->
|
|
|
<template slot="addressInfo" slot-scope="text, record">
|
|
|
<span v-if="record.dealerEntity&&record.dealerEntity.provinceName">
|
|
|
- {{ record.dealerEntity.provinceName }}{{ '/'+record.dealerEntity.cityName }}{{ '/'+record.dealerEntity.districtName }}
|
|
|
+ {{ record.dealerEntity.provinceName }}
|
|
|
</span>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
<template slot="footer">
|
|
|
<a-row :gutter="15">
|
|
|
- <a-col :md="4" :sm="24">平台出库数量:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty: '--' }}</a-col>
|
|
|
- <a-col :md="4" :sm="24">平台返利点数:{{ (totalData && (totalData.rebatePointsSys || totalData.rebatePointsSys==0)) ? (totalData.rebatePointsSys*100).toFixed(2)+'%': '--' }}</a-col>
|
|
|
- <a-col :md="4" :sm="24">开单金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount): '--' }}</a-col>
|
|
|
- <a-col :md="4" :sm="24">平台返利金额:{{ (totalData && (totalData.rebateAmountSys || totalData.rebateAmountSys==0)) ? toThousands(totalData.rebateAmountSys): '--' }}</a-col>
|
|
|
- <a-col :md="4" :sm="24">轮胎省仓返利金额:{{ (totalData && (totalData.rebateAmountProvince || totalData.rebateAmountProvince==0)) ? toThousands(totalData.rebateAmountProvince): '--' }}</a-col>
|
|
|
+ <a-col :md="6" :sm="24">服务费金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount): '--' }}</a-col>
|
|
|
+ <a-col :md="6" :sm="24">运费补贴金额:{{ (totalData && (totalData.rebateAmountSys || totalData.rebateAmountSys==0)) ? toThousands(totalData.rebateAmountSys): '--' }}</a-col>
|
|
|
</a-row>
|
|
|
</template>
|
|
|
</s-table>
|
|
@@ -126,18 +153,21 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
import moment from 'moment'
|
|
|
+import getDate from '@/libs/getDate.js'
|
|
|
// 组件
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
+import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import subarea from '@/views/common/subarea.js'
|
|
|
import AreaList from '@/views/common/areaList.js'
|
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
+import custList from '@/views/common/custList.vue'
|
|
|
// 接口
|
|
|
import { tireFeeReportList, tireFeeReportCount, tireFeeListExport } from '@/api/reportData'
|
|
|
export default {
|
|
|
- name: 'YearQueryList',
|
|
|
+ name: 'ServiceFreightDetailList',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, reportModal },
|
|
|
+ components: { STable, VSelect, rangeDate, subarea, AreaList, dealerSubareaScopeList, custList, reportModal },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
@@ -146,12 +176,14 @@ export default {
|
|
|
tableHeight: 0, // 表格高度
|
|
|
exportLoading: false, // 导出按钮加载状态
|
|
|
showExport: false, // 导出弹窗
|
|
|
- toYears: new Date().getFullYear(), // 今年
|
|
|
// 查询条件
|
|
|
queryParam: {
|
|
|
- queryType: 'year', // 轮胎年度费用报表
|
|
|
- queryDate: moment().year(), // 选择年份
|
|
|
- dealerLevel: undefined, // 客户等级
|
|
|
+ time: [
|
|
|
+ moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
+ moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
+ ], // 日期
|
|
|
+ beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
|
customSn: undefined, // 客户sn
|
|
|
subareaArea: {
|
|
|
subareaSn: '', // 区域
|
|
@@ -166,10 +198,9 @@ export default {
|
|
|
provinceFlag: '1'// 是轮胎省仓
|
|
|
},
|
|
|
totalData: null, // 合计
|
|
|
- yearInfo: '',
|
|
|
showOutDetail: false, // 出库明细弹窗
|
|
|
rules: {
|
|
|
- 'queryDate': [{ required: true, message: '请选择查询年份', trigger: 'change' }]
|
|
|
+ 'time': [{ required: true, message: '请选择查询日期', trigger: 'change' }]
|
|
|
},
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -209,40 +240,28 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- // 获取年份数据
|
|
|
- years () {
|
|
|
- const years = []
|
|
|
- const lens = (this.toYears - 2023) + 1
|
|
|
- for (let i = 0; i < lens; i++) {
|
|
|
- years.push(this.toYears - i)
|
|
|
- }
|
|
|
- return years
|
|
|
- },
|
|
|
columns () {
|
|
|
const _this = this
|
|
|
const arr = [
|
|
|
- { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
- { title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '15%', align: 'center' },
|
|
|
- { title: '区域', dataIndex: 'subareaArea.subareaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: <a-tooltip placement='top' title='平台销售给该轮胎省仓及轮胎省仓差价绑定的加盟商的数量合计'>平台出库数量 <a-icon type="question-circle" /></a-tooltip>, dataIndex: 'outQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '开单金额', dataIndex: 'outAmount', width: '13%', align: 'right', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '轮胎省仓返利点数', dataIndex: 'rebatePointProvince', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? (text * 100).toFixed(2) + '%' : '--') } },
|
|
|
- { title: '轮胎省仓返利金额', dataIndex: 'rebateAmountProvince', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
|
+ { title: '序号', dataIndex: 'no', width: '40px', align: 'center' },
|
|
|
+ { title: '业务单号', dataIndex: 'bizNo', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '区域', dataIndex: 'subareaArea.subareaName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '省份', scopedSlots: { customRender: 'addressInfo' }, width: '100px', align: 'center' },
|
|
|
+ { title: '记账主体', dataIndex: 'bizUserName', width: '90px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '轮胎省仓', dataIndex: 'provinceFlag', width: '80px', align: 'center', customRender: function (text) { return text == '1' ? '是' : '否' } },
|
|
|
+ { title: '销售数量', dataIndex: 'dealerEntity.taskNum', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '销售金额', dataIndex: 'serviceAmountProvince', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '运费补贴', dataIndex: 'crossRegionQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '运费补贴金额', dataIndex: 'serviceAmountProvince', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '发货经销商', dataIndex: 'parentDealerName', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '业务类型', dataIndex: 'parentDealerName', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
|
]
|
|
|
return arr
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- // 选择查询年份 change
|
|
|
- changeYear (val) {
|
|
|
- if (!val) {
|
|
|
- this.queryParam.queryDate = void 0
|
|
|
- } else {
|
|
|
- this.queryParam.queryDate = val
|
|
|
- }
|
|
|
- },
|
|
|
// 查询
|
|
|
handleSearch () {
|
|
|
const _this = this
|
|
@@ -250,11 +269,25 @@ export default {
|
|
|
if (valid) {
|
|
|
_this.$refs.table.refresh(true)
|
|
|
} else {
|
|
|
- _this.$message.error('请选择查询年份')
|
|
|
+ _this.$message.error('请选择查询时间')
|
|
|
return false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 日期选择 change
|
|
|
+ dateChange (date) {
|
|
|
+ if (date[0] && date[1]) {
|
|
|
+ this.queryParam.time = date
|
|
|
+ } else {
|
|
|
+ this.queryParam.time = []
|
|
|
+ }
|
|
|
+ this.queryParam.beginDate = date[0] ? date[0].replace(/-/g, '') : ''
|
|
|
+ this.queryParam.endDate = date[1] ? date[1].replace(/-/g, '') : ''
|
|
|
+ },
|
|
|
+ // 选择发货经销商
|
|
|
+ custTireChange (val) {
|
|
|
+ this.queryParam.transferDealerSn = val.key
|
|
|
+ },
|
|
|
// 客户名称 change
|
|
|
custChange (val) {
|
|
|
this.queryParam.dealerEntity.dealerName = val.name
|
|
@@ -283,9 +316,9 @@ export default {
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
- this.queryParam.queryType = 'year'
|
|
|
- const nowYear = moment().year()
|
|
|
- this.queryParam.queryDate = nowYear
|
|
|
+ this.$refs.rangeDate.resetDate(this.queryParam.time)
|
|
|
+ this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
|
|
|
+ this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
this.queryParam.dealerEntity.provinceSn = undefined
|
|
|
this.queryParam.dealerEntity.citySn = undefined
|
|
|
this.queryParam.dealerEntity.districtSn = undefined
|
|
@@ -293,7 +326,6 @@ export default {
|
|
|
this.queryParam.customSn = undefined
|
|
|
this.queryParam.subareaArea.subareaSn = ''
|
|
|
this.queryParam.subareaArea.subareaAreaSn = ''
|
|
|
- this.queryParam.dealerLevel = undefined
|
|
|
this.$refs.subarea.clearData()
|
|
|
this.$refs.areaList.clearData()
|
|
|
if (this.advanced) {
|