master
lion 4 years ago
parent b2b53dda7f
commit 7b75f2e48d

@ -10,8 +10,8 @@
<el-date-picker <el-date-picker
class="vm10" class="vm10"
v-model="visitRange" v-model="visitRange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd"
type="datetimerange" type="daterange"
range-separator="至" range-separator="至"
start-placeholder="参观开始时间" start-placeholder="参观开始时间"
end-placeholder="参观结束时间"> end-placeholder="参观结束时间">
@ -19,8 +19,8 @@
<el-date-picker <el-date-picker
class="vm10" class="vm10"
v-model="orderRange" v-model="orderRange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd"
type="datetimerange" type="daterange"
range-separator="至" range-separator="至"
start-placeholder="订单开始时间" start-placeholder="订单开始时间"
end-placeholder="订单结束时间"> end-placeholder="订单结束时间">
@ -33,7 +33,8 @@
<Input class="inputwrap" v-model="searchFields.keyword" placeholder="请输入关键词" /> <Input class="inputwrap" v-model="searchFields.keyword" placeholder="请输入关键词" />
<Input class="inputwrap" v-model="searchFields.unit" placeholder="请输入单位" /> <Input class="inputwrap" v-model="searchFields.unit" placeholder="请输入单位" />
<Button type="primary" style="margin-right:10px" @click="searchload"></Button> <Button type="primary" style="margin-right:10px" @click="searchload"></Button>
<Button type="primary" @click="resetload"></Button> <Button type="primary" style="margin-right:10px" @click="resetload"></Button>
<!-- <Button type="primary" @click="exportExcel"></Button> -->
<!-- <Button type="primary" @click="searchload"></Button> --> <!-- <Button type="primary" @click="searchload"></Button> -->
</div> </div>
</slot> </slot>
@ -225,12 +226,11 @@
end_date:this.searchFields.end_date, end_date:this.searchFields.end_date,
order_start_date:this.searchFields.order_start_date, order_start_date:this.searchFields.order_start_date,
order_end_date:this.searchFields.order_end_date, order_end_date:this.searchFields.order_end_date,
// is_export:0,
type:this.searchFields.type, type:this.searchFields.type,
unit:this.searchFields.unit unit:this.searchFields.unit
}).then(res => { }).then(res => {
let _data = []; let _data = [];
console.log(res)
// let result = Object.assign(_data, res.data); // let result = Object.assign(_data, res.data);
for(var m of res.data){ for(var m of res.data){
var mod ={}; var mod ={};
@ -249,16 +249,25 @@
} }
that.tableData = _data; that.tableData = _data;
that.paginations.total = res.total that.paginations.total = res.total
this.$forceUpdate()
}).catch(error => { }).catch(error => {
}) })
}, },
searchload(){ searchload(){
this.searchFields.start_date = this.visitRange[0] if(this.visitRange){
this.searchFields.end_date = this.visitRange[1] this.searchFields.start_date = this.visitRange[0]
this.searchFields.order_start_date = this.orderRange[0] this.searchFields.end_date = this.visitRange[1]
this.searchFields.order_end_date = this.orderRange[1] }else{
this.searchFields.start_date = ""
this.searchFields.end_date = ""
}
if(this.orderRange){
this.searchFields.order_start_date = this.orderRange[0]
this.searchFields.order_end_date = this.orderRange[1]
}else{
this.searchFields.order_start_date = ""
this.searchFields.order_end_date = ""
}
this.load() this.load()
}, },
resetload(){ resetload(){
@ -276,6 +285,14 @@
this.orderRange = [] this.orderRange = []
this.load() this.load()
}, },
exportExcel(){
this.searchFields.is_export = 1
listvisitor({
is_export:this.searchFields.is_export
}).then(res => {
console.log(res)
})
},
handleCurrentChange(page) { handleCurrentChange(page) {
this.paginations.page = page; this.paginations.page = page;
this.load(); this.load();

Loading…
Cancel
Save