|
@@ -14,7 +14,7 @@
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="退货日期" prop="time">
|
|
|
- <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
|
|
|
+ <rangeDate id="salesReturnReportList-time" ref="rangeDate" :value="queryParam.time" @change="dateChange" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -41,7 +41,7 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="区域负责人">
|
|
|
- <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
|
|
|
+ <BizUser id="salesReturnReportList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -51,7 +51,7 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
|
|
|
<a-form-item label="客服">
|
|
|
- <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
|
|
|
+ <customerService id="salesReturnDetailList-customerName" ref="customerName" v-model="queryParam.bizUserSn"></customerService>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
@@ -122,6 +122,8 @@
|
|
|
<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'
|
|
@@ -130,7 +132,7 @@ import subarea from '@/views/common/subarea.js'
|
|
|
import AreaList from '@/views/common/areaList.js'
|
|
|
import BizUser from '@/views/common/bizUser.js'
|
|
|
import customerService from '@/views/common/customerService'
|
|
|
-import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
+// 接口
|
|
|
import { salesReportReturnRebateTitle, salesReportReturnRebateList, salesReportReturnRebateCount, salesReturnExport } from '@/api/reportData'
|
|
|
|
|
|
export default {
|
|
@@ -141,46 +143,48 @@ export default {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
|
- tableHeight: 0,
|
|
|
- showExport: false,
|
|
|
- queryParam: { // 查询条件
|
|
|
+ tableHeight: 0, // 表格高度
|
|
|
+ showExport: false, // 导出弹窗
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ exportLoading: false, // 导出按钮加载状态loading
|
|
|
+ // 查询条件
|
|
|
+ queryParam: {
|
|
|
+ // 退货日期 默认值
|
|
|
time: [
|
|
|
getDate.getCurrMonthDays().starttime,
|
|
|
getDate.getCurrMonthDays().endtime
|
|
|
],
|
|
|
- beginDate: getDate.getCurrMonthDays().starttime,
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
- dealerSn: undefined,
|
|
|
- provinceSn: undefined,
|
|
|
- citySn: undefined,
|
|
|
- districtSn: undefined,
|
|
|
+ beginDate: getDate.getCurrMonthDays().starttime, // 开始日期
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime, // 结束日期
|
|
|
+ dealerSn: undefined, // 客户名称
|
|
|
+ provinceSn: undefined, // 省编码
|
|
|
+ citySn: undefined, // 市编码
|
|
|
+ districtSn: undefined, // 区编码
|
|
|
subareaArea: {
|
|
|
- subareaSn: undefined,
|
|
|
- subareaAreaSn: undefined,
|
|
|
- bizUserSn: undefined
|
|
|
+ subareaSn: undefined, // 区域
|
|
|
+ subareaAreaSn: undefined, // 分区
|
|
|
+ bizUserSn: undefined// 区域负责人
|
|
|
},
|
|
|
- dealerLevel: undefined,
|
|
|
- bizUserSn: undefined
|
|
|
+ dealerLevel: undefined, // 客户级别
|
|
|
+ bizUserSn: undefined// 客服
|
|
|
},
|
|
|
rules: {
|
|
|
'time': [{ required: true, message: '请选择退货日期', trigger: 'change' }]
|
|
|
},
|
|
|
- disabled: false, // 查询、重置按钮是否可操作
|
|
|
- exportLoading: false, // 导出loading
|
|
|
- addrProvinceList: [], // 省下拉
|
|
|
- addrCityList: [], // 市下拉
|
|
|
- addrDistrictList: [], // 区下拉
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- const params = Object.assign(parameter, this.queryParam) // 无分页
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
delete params.time
|
|
|
+ // 获取列表数据 有分页
|
|
|
return salesReportReturnRebateList(params).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
+ // 统计
|
|
|
this.getCount(params)
|
|
|
+ // 计算列表序号
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
@@ -191,14 +195,14 @@ export default {
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
|
- productType: [],
|
|
|
- totalData: null,
|
|
|
- columns: [],
|
|
|
- countLabel: [],
|
|
|
- countBrandLabel: []
|
|
|
+ totalData: null, // 统计数据
|
|
|
+ columns: [], // 列
|
|
|
+ countLabel: [], // 统计分类数据
|
|
|
+ countBrandLabel: []// 统计品牌数据
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
+ // 展开关闭
|
|
|
advanced (newValue, oldValue) {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
@@ -240,6 +244,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 查询
|
|
|
handleSearch () {
|
|
|
const _this = this
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
@@ -251,7 +256,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 创建时间 change
|
|
|
+ // 退货日期 change
|
|
|
dateChange (date) {
|
|
|
if (date[0] && date[1]) {
|
|
|
this.queryParam.time = date
|
|
@@ -261,9 +266,11 @@ export default {
|
|
|
this.queryParam.beginDate = date[0]
|
|
|
this.queryParam.endDate = date[1]
|
|
|
},
|
|
|
+ // 客户名称 change
|
|
|
custChange (val) {
|
|
|
this.queryParam.dealerSn = val.key
|
|
|
},
|
|
|
+ // 所在区域 change
|
|
|
subareaChange (val) {
|
|
|
this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
|
|
|
this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
|
|
@@ -295,6 +302,7 @@ export default {
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
this.$refs.table.clearTable()
|
|
|
},
|
|
|
+ // 地区 change
|
|
|
areaChange (val) {
|
|
|
this.queryParam.provinceSn = val[0] ? val[0] : ''
|
|
|
this.queryParam.citySn = val[1] ? val[1] : ''
|
|
@@ -322,6 +330,7 @@ export default {
|
|
|
})
|
|
|
this.resetSearchForm()
|
|
|
},
|
|
|
+ // 计算表格高度
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
this.tableHeight = window.innerHeight - tableSearchH - 215
|