|
@@ -10,12 +10,14 @@
|
|
|
<!-- 查询和其他操作 -->
|
|
|
<div class="filter-container">
|
|
|
<el-form :inline="true" size="small" v-model="listQuery1">
|
|
|
- <el-form-item label="服务月份">
|
|
|
- <el-date-picker v-model="listQuery1.month" type="month" value-format="yyyy-MM"
|
|
|
- :picker-options="{}"></el-date-picker>
|
|
|
+ <el-form-item label="服务日期">
|
|
|
+ <!-- <el-date-picker v-model="listQuery1.month" type="month" value-format="yyyy-MM"
|
|
|
+ :picker-options="{}"></el-date-picker> -->
|
|
|
+ <el-date-picker v-model="timeArray1" type="daterange" start-placeholder="服务开始日期" end-placeholder="服务结束日期"
|
|
|
+ style="width:240px" value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="城市">
|
|
|
- <el-select v-model="listQuery1.city" multiple clearable placeholder="请选择城市">
|
|
|
+ <el-select v-model="listQuery1.city" filterable multiple clearable placeholder="请选择城市">
|
|
|
<el-option v-for="(item, index) in cityList" :key="index" :label="item" :value="item"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -72,9 +74,9 @@
|
|
|
<!-- 查询和其他操作 -->
|
|
|
<div class="filter-container">
|
|
|
<el-form :inline="true" size="small" v-model="listQuery2">
|
|
|
- <el-form-item label="服务月份">
|
|
|
- <el-date-picker v-model="listQuery2.month" type="month" value-format="yyyy-MM"
|
|
|
- :picker-options="{}"></el-date-picker>
|
|
|
+ <el-form-item label="服务日期">
|
|
|
+ <el-date-picker v-model="timeArray2" type="daterange" start-placeholder="服务开始日期" end-placeholder="服务结束日期"
|
|
|
+ style="width:240px" value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="城市">
|
|
|
<el-select v-model="listQuery2.city" clearable multiple placeholder="请选择城市">
|
|
@@ -126,9 +128,9 @@
|
|
|
<el-tab-pane label="复购汇总表">
|
|
|
<div class="filter-container">
|
|
|
<el-form :inline="true" size="small" v-model="listQuery3">
|
|
|
- <el-form-item label="复购周期">
|
|
|
- <el-date-picker v-model="listQuery3.month" type="month" value-format="yyyy-MM" :picker-options="{}"></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
+ <el-form-item label="复购周期">
|
|
|
+ <el-date-picker v-model="timeArray3" type="daterange" start-placeholder="服务开始日期" end-placeholder="服务结束日期"
|
|
|
+ style="width:240px" value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker> </el-form-item>
|
|
|
<el-form-item label="城市">
|
|
|
<el-select v-model="listQuery3.city" clearable multiple placeholder="请选择城市">
|
|
|
<el-option v-for="(item, index) in cityList" :key="index" :label="item" :value="item"></el-option>
|
|
@@ -198,32 +200,35 @@ export default {
|
|
|
timeArray: '',
|
|
|
cityList: [],
|
|
|
list1: [],
|
|
|
+ timeArray1:[],
|
|
|
listQuery1: {
|
|
|
total: 0,
|
|
|
pageIndex: 1,
|
|
|
pageSize: 50,
|
|
|
rebuyStatus:'',
|
|
|
- month: moment().format("YYYY-MM"),
|
|
|
+ //month: moment().format("YYYY-MM"),
|
|
|
city: ""
|
|
|
},
|
|
|
rebuyStatus:['已复购','未复购'],
|
|
|
list2: [],
|
|
|
+ timeArray2:[],
|
|
|
listQuery2: {
|
|
|
total: 0,
|
|
|
pageIndex: 1,
|
|
|
pageSize: 50,
|
|
|
rebuyStatus:'',
|
|
|
- month: moment().format("YYYY-MM"),
|
|
|
+ //month: moment().format("YYYY-MM"),
|
|
|
city: ""
|
|
|
},
|
|
|
list3: [],
|
|
|
+ timeArray3:[],
|
|
|
listQuery3: {
|
|
|
city: "",
|
|
|
total: 0,
|
|
|
pageIndex: 1,
|
|
|
pageSize: 50,
|
|
|
type:'单次复购',
|
|
|
- month: moment().format("YYYY-MM"),
|
|
|
+ //month: moment().format("YYYY-MM"),
|
|
|
sumType:'到服务站'
|
|
|
},
|
|
|
};
|
|
@@ -239,10 +244,21 @@ export default {
|
|
|
methods: {
|
|
|
querySearch1(isExport) {
|
|
|
console.info(this.timeArray);
|
|
|
- if (this.listQuery1.month == '' || this.listQuery1.city == '') {
|
|
|
- this.$message.warning("请先选择日期或城市再进行查询");
|
|
|
+ if (this.listQuery1.city == '') {
|
|
|
+ this.$message.warning("请先选择城市再进行查询");
|
|
|
return false;
|
|
|
}
|
|
|
+ if (this.timeArray1 == null || this.timeArray1.length == 0) {
|
|
|
+ this.$message.warning("请选择服务日期");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let days = moment(this.timeArray1[1]).diff(moment(this.timeArray1[0]), "days");
|
|
|
+ if (days > 31) {
|
|
|
+ this.$message.warning("请调整服务日期范围,不能超过31天");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.listQuery1.startTime = this.timeArray1[0];
|
|
|
+ this.listQuery1.endTime = this.timeArray1[1];
|
|
|
let data = JSON.parse(JSON.stringify(this.listQuery1));
|
|
|
|
|
|
data.isExport = isExport;
|
|
@@ -268,12 +284,23 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- querySearch2(isExport) {
|
|
|
- console.info(this.timeArray);
|
|
|
- if (this.listQuery2.month == '' || this.listQuery2.city == '') {
|
|
|
- this.$message.warning("请先选择日期或城市再进行查询");
|
|
|
+ querySearch2(isExport) {
|
|
|
+ if (this.listQuery2.city == '') {
|
|
|
+ this.$message.warning("请先选择城市再进行查询");
|
|
|
return false;
|
|
|
}
|
|
|
+ if (this.timeArray2 == null || this.timeArray2.length == 0) {
|
|
|
+ this.$message.warning("请选择服务日期");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let days = moment(this.timeArray2[1]).diff(moment(this.timeArray2[0]), "days");
|
|
|
+ if (days > 31) {
|
|
|
+ this.$message.warning("请调整服务日期范围,不能超过31天");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.listQuery2.startTime = this.timeArray2[0];
|
|
|
+ this.listQuery2.endTime = this.timeArray2[1];
|
|
|
let data = JSON.parse(JSON.stringify(this.listQuery2));
|
|
|
|
|
|
data.isExport = isExport;
|