|
|
|
|
@ -10,15 +10,13 @@
|
|
|
|
|
<el-date-picker style="margin-left:10px" v-model="dateRange" type="daterange" value-format="yyyy-MM-dd"
|
|
|
|
|
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="dateChange">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
<el-cascader ref="typeCas" style="margin-left:10px" v-model="select.product_type_list" :options="options"
|
|
|
|
|
<el-cascader ref="typeCas" style="margin-left:10px" v-model="typeCas" :options="options"
|
|
|
|
|
:props="props" collapse-tags @change="changeType" @remove-tag="removeType" clearable></el-cascader>
|
|
|
|
|
<el-button style="margin-left:10px" type="primary" @click="getTotal">查询</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class='typetitle'>
|
|
|
|
|
{{typeName}}
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="totals">
|
|
|
|
|
<p><span>下单人数:</span><span>{{list.add_total_order}}</span></p>
|
|
|
|
|
<p><span>下单人数:</span><span>{{list.add_total_members}}</span></p>
|
|
|
|
|
<p><span>下单订单数:</span><span>{{list.add_total_order}}</span></p>
|
|
|
|
|
<p><span>多板块下单人数:</span><span>{{list.total_order_more_type_person}}</span></p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@ -43,8 +41,8 @@
|
|
|
|
|
start_date: "2000-01-01",
|
|
|
|
|
end_date: "",
|
|
|
|
|
product_type_list: []
|
|
|
|
|
},
|
|
|
|
|
typeName: '所有',
|
|
|
|
|
},
|
|
|
|
|
typeCas:[],
|
|
|
|
|
dateRange: [],
|
|
|
|
|
list: {},
|
|
|
|
|
today: '',
|
|
|
|
|
@ -62,19 +60,14 @@
|
|
|
|
|
const res = await getType()
|
|
|
|
|
this.options = res
|
|
|
|
|
},
|
|
|
|
|
changeType(e) {
|
|
|
|
|
this.select.product_type_list = e
|
|
|
|
|
if (this.select.product_type_list.length < 1) {
|
|
|
|
|
this.typeName = '所有'
|
|
|
|
|
} else {
|
|
|
|
|
let obj = this.$refs['typeCas'].getCheckedNodes()
|
|
|
|
|
let names = ''
|
|
|
|
|
for (var k of obj) {
|
|
|
|
|
names += k.label + "、"
|
|
|
|
|
}
|
|
|
|
|
this.typeName = names
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
changeType(e) {
|
|
|
|
|
let _arr = this.$refs.typeCas.getCheckedNodes()
|
|
|
|
|
let _data = []
|
|
|
|
|
for(var k of _arr){
|
|
|
|
|
_data.push(k.value)
|
|
|
|
|
}
|
|
|
|
|
const result = Array.from(new Set(_data))
|
|
|
|
|
this.select.product_type_list = result
|
|
|
|
|
},
|
|
|
|
|
removeType(e) {},
|
|
|
|
|
async initTotal() {
|
|
|
|
|
@ -82,16 +75,14 @@
|
|
|
|
|
start_date: '2000-01-01',
|
|
|
|
|
end_date: this.select.end_date
|
|
|
|
|
})
|
|
|
|
|
// this.total = res.total
|
|
|
|
|
this.list = res.return_list.total
|
|
|
|
|
},
|
|
|
|
|
async getTotal() {
|
|
|
|
|
const res = await typeCount({
|
|
|
|
|
start_date: this.select.start_date,
|
|
|
|
|
end_date: this.select.end_date,
|
|
|
|
|
product_type_list: this.select.product_type_list
|
|
|
|
|
product_type_list:this.select.product_type_list
|
|
|
|
|
})
|
|
|
|
|
// this.total = res.total
|
|
|
|
|
this.list = res.return_list.total
|
|
|
|
|
},
|
|
|
|
|
dateChange(e) {
|
|
|
|
|
@ -108,8 +99,9 @@
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
let date = new Date()
|
|
|
|
|
let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
|
|
|
|
this.today = date.getFullYear() + '-' + month + '-' + date.getDate()
|
|
|
|
|
let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
|
|
|
|
let dateDay = date.getDate() + 1 < 10 ? '0' + (date.getDate()) : date.getDate()
|
|
|
|
|
this.today = date.getFullYear() + '-' + month + '-' + dateDay
|
|
|
|
|
this.select.end_date = this.today
|
|
|
|
|
this.getTypes()
|
|
|
|
|
this.initTotal()
|
|
|
|
|
|