|
@@ -51,9 +51,9 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
|
|
|
- <a-form-item label="客服">
|
|
|
+ <a-form-model-item label="客服">
|
|
|
<customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom:10px;">
|
|
@@ -124,17 +124,19 @@
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
|
+import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
+// 组件
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
|
-import customerService from '@/views/common/customerService.vue'
|
|
|
import subarea from '@/views/common/subarea.js'
|
|
|
import AreaList from '@/views/common/areaList.js'
|
|
|
import BizUser from '@/views/common/bizUser.js'
|
|
|
-import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
-import { salesBillRealReportTitle, salesBillRealAmountQueryPageList, salesBillRealReportCount } from '@/api/salesBillReport'
|
|
|
+import customerService from '@/views/common/customerService.vue'
|
|
|
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
+// 接口
|
|
|
import { actualSalesExport } from '@/api/reportData'
|
|
|
+import { salesBillRealReportTitle, salesBillRealAmountQueryPageList, salesBillRealReportCount } from '@/api/salesBillReport'
|
|
|
export default {
|
|
|
name: 'ActualSalesReportList',
|
|
|
mixins: [commonMixin],
|
|
@@ -143,44 +145,53 @@ export default {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
|
- tableHeight: 0,
|
|
|
+ tableHeight: 0, // 表格高度
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ exportLoading: false, // 导出按钮加载状态
|
|
|
showExport: false, // 导出弹窗初始值
|
|
|
- queryParam: { // 查询条件
|
|
|
+ // 查询条件
|
|
|
+ queryParam: {
|
|
|
+ // 默认下推时间
|
|
|
time: [
|
|
|
getDate.getCurrMonthDays().starttime,
|
|
|
getDate.getCurrMonthDays().endtime
|
|
|
],
|
|
|
- beginDate: getDate.getCurrMonthDays().starttime,
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
+ beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
|
subareaArea: {
|
|
|
- subareaSn: undefined,
|
|
|
- subareaAreaSn: undefined,
|
|
|
- bizUserSn: undefined
|
|
|
+ subareaSn: undefined, // 区域
|
|
|
+ subareaAreaSn: undefined, // 分区
|
|
|
+ bizUserSn: undefined// 区域负责人
|
|
|
},
|
|
|
dealer: {
|
|
|
- dealerSn: undefined,
|
|
|
- provinceSn: undefined,
|
|
|
- citySn: undefined,
|
|
|
- districtSn: undefined,
|
|
|
- dealerLevel: undefined
|
|
|
+ dealerSn: undefined, // 客户sn
|
|
|
+ provinceSn: undefined, // 省
|
|
|
+ citySn: undefined, // 市
|
|
|
+ districtSn: undefined, // 区
|
|
|
+ dealerLevel: undefined// 客户等价
|
|
|
},
|
|
|
- bizUserSn: undefined
|
|
|
+ bizUserSn: undefined// 客服
|
|
|
},
|
|
|
+ totalData: null, // 统计数据
|
|
|
+ columns: [], // 列表表头
|
|
|
+ countLabel: [], // 统计数据表头
|
|
|
+ countBrandLabel: [], // 统计数据品牌表头
|
|
|
rules: {
|
|
|
'time': [{ required: true, message: '请选择下推时间', trigger: 'change' }]
|
|
|
},
|
|
|
- disabled: false, // 查询、重置按钮是否可操作
|
|
|
- exportLoading: false,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) // 有分页
|
|
|
+ const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize })
|
|
|
+ // 获取列表数据 有分页
|
|
|
return salesBillRealAmountQueryPageList(paramsPage).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
+ // 获取统计数据
|
|
|
this.getCount(paramsPage)
|
|
|
+ // 计算列表序号
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
@@ -190,14 +201,11 @@ export default {
|
|
|
this.spinning = false
|
|
|
return data
|
|
|
})
|
|
|
- },
|
|
|
- totalData: null,
|
|
|
- columns: [],
|
|
|
- countLabel: [],
|
|
|
- countBrandLabel: []
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
+ // 展开收起
|
|
|
advanced (newValue, oldValue) {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
@@ -239,6 +247,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 查询
|
|
|
handleSearch () {
|
|
|
const _this = this
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
@@ -250,7 +259,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 创建时间 change
|
|
|
+ // 下推时间 change
|
|
|
dateChange (date) {
|
|
|
if (date[0] && date[1]) {
|
|
|
this.queryParam.time = date
|
|
@@ -260,9 +269,11 @@ export default {
|
|
|
this.queryParam.beginDate = date[0] || ''
|
|
|
this.queryParam.endDate = date[1] || ''
|
|
|
},
|
|
|
+ // 客户下拉 change
|
|
|
custChange (val) {
|
|
|
this.queryParam.dealer.dealerSn = val.key
|
|
|
},
|
|
|
+ // 所在区域 change
|
|
|
subareaChange (val) {
|
|
|
this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
|
|
|
this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
|
|
@@ -298,6 +309,7 @@ export default {
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
this.$refs.table.clearTable()
|
|
|
},
|
|
|
+ // 地区
|
|
|
areaChange (val) {
|
|
|
this.queryParam.dealer.provinceSn = val[0] ? val[0] : ''
|
|
|
this.queryParam.dealer.citySn = val[1] ? val[1] : ''
|
|
@@ -325,6 +337,7 @@ export default {
|
|
|
})
|
|
|
this.resetSearchForm()
|
|
|
},
|
|
|
+ // 计算表格高度
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
this.tableHeight = window.innerHeight - tableSearchH - 218
|