|
@@ -12,8 +12,8 @@
|
|
|
:model="queryParam">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="查询季度" prop="time">
|
|
|
- <quarterDate ref="quarterDate" id="quarterQueryList-time" :value="queryParam.time" @change="dateChange" />
|
|
|
+ <a-form-model-item label="查询季度" prop="queryDate">
|
|
|
+ <quarterDate ref="quarterDate" id="quarterQueryList-time" :value="timeInfo" @change="dateChange" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -101,7 +101,7 @@
|
|
|
<a-col :md="4" :sm="24"><a-tooltip placement="top" title="开单金额合计*1.5%">广宣品费用 <a-icon type="question-circle" /></a-tooltip>:{{ (totalData && (totalData.posterAmount || totalData.posterAmount==0)) ? toThousands(totalData.posterAmount): '--' }}</a-col>
|
|
|
</a-row>
|
|
|
</template>
|
|
|
- </s-table>s
|
|
|
+ </s-table>
|
|
|
</a-spin>
|
|
|
</a-card>
|
|
|
<!-- 导出提示框 -->
|
|
@@ -134,9 +134,9 @@ export default {
|
|
|
tableHeight: 0, // 表格高度
|
|
|
exportLoading: false, // 导出按钮加载状态
|
|
|
showExport: false, // 导出弹窗
|
|
|
+ timeInfo: [], // 日期
|
|
|
// 查询条件
|
|
|
queryParam: {
|
|
|
- time: [], // 日期
|
|
|
queryType: 'quarter', // 轮胎季度费用报表
|
|
|
queryDate: undefined, // 选择年份+季度
|
|
|
dealerLevel: undefined, // 客户级别
|
|
@@ -155,15 +155,13 @@ export default {
|
|
|
},
|
|
|
totalData: null, // 合计
|
|
|
rules: {
|
|
|
- 'time': [{ required: true, message: '请选择查询季度', trigger: 'change' }]
|
|
|
+ 'queryDate': [{ required: true, message: '请选择查询季度', trigger: 'change' }]
|
|
|
},
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- const oldParams = Object.assign(parameter, this.queryParam)
|
|
|
- const params = JSON.parse(JSON.stringify(oldParams))
|
|
|
- delete params.time
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
// 获取列表数据 有分页
|
|
|
return tireFeeReportList(params).then(res => {
|
|
|
let data
|
|
@@ -219,16 +217,12 @@ export default {
|
|
|
const lastQuarter = moment().subtract(1, 'month').quarter()
|
|
|
// 获取今年年份
|
|
|
const thisYear = moment().year()
|
|
|
- this.queryParam.time = [thisYear, lastQuarter]
|
|
|
- if (this.queryParam.time.length > 0) {
|
|
|
- this.queryParam.queryDate = thisYear + '0' + lastQuarter
|
|
|
- }
|
|
|
+ this.timeInfo = [thisYear, lastQuarter]
|
|
|
+ this.queryParam.queryDate = thisYear + '0' + lastQuarter
|
|
|
},
|
|
|
// 查询
|
|
|
handleSearch () {
|
|
|
const _this = this
|
|
|
- console.log('1111111111111111:', _this.queryParam)
|
|
|
- console.log('2222222222222222:', _this.queryParam.queryDate)
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
_this.$refs.table.refresh(true)
|
|
@@ -261,11 +255,11 @@ export default {
|
|
|
},
|
|
|
// 日期选择 change
|
|
|
dateChange (date, valStr) {
|
|
|
- this.queryParam.time = date[0] && date[1] ? date : []
|
|
|
+ this.timeInfo = date[0] && date[1] ? date : []
|
|
|
if (date && date.length > 0) {
|
|
|
this.queryParam.queryDate = date[0] + '0' + date[1]
|
|
|
} else {
|
|
|
- this.queryParam.queryDate = ''
|
|
|
+ this.queryParam.queryDate = undefined
|
|
|
}
|
|
|
},
|
|
|
// 区域分区 change
|
|
@@ -275,8 +269,8 @@ export default {
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
- // this.$refs.quarterDate.resetDate()
|
|
|
this.queryParam.queryType = 'quarter'
|
|
|
+ this.queryParam.queryDate = undefined
|
|
|
this.queryParam.dealerEntity.provinceSn = undefined
|
|
|
this.queryParam.dealerEntity.citySn = undefined
|
|
|
this.queryParam.dealerEntity.districtSn = undefined
|
|
@@ -290,13 +284,11 @@ export default {
|
|
|
if (this.advanced) {
|
|
|
this.$refs.dealerSubareaScopeList.resetForm()
|
|
|
}
|
|
|
- this.getQuarterVal()
|
|
|
- console.log('1111111111111111:', this.queryParam.time)
|
|
|
- console.log('2222222222222222:', this.queryParam.queryDate)
|
|
|
this.totalData = null
|
|
|
this.$refs.areaList.clearData()
|
|
|
this.$refs.table.clearTable()
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
+ this.getQuarterVal()
|
|
|
},
|
|
|
// 导出 必填判断
|
|
|
handleExport () {
|
|
@@ -313,12 +305,10 @@ export default {
|
|
|
// 导出
|
|
|
exportList () {
|
|
|
const _this = this
|
|
|
- const params = JSON.parse(JSON.stringify(_this.queryParam))
|
|
|
_this.exportLoading = true
|
|
|
_this.spinning = true
|
|
|
_this.showExport = true
|
|
|
- delete params.time
|
|
|
- hdExportExcel(tireFeeListExport, params, '轮胎季度费用报表', function () {
|
|
|
+ hdExportExcel(tireFeeListExport, _this.queryParam, '轮胎季度费用报表', function () {
|
|
|
_this.exportLoading = false
|
|
|
_this.spinning = false
|
|
|
})
|