diff --git a/src/views/order/visitor.vue b/src/views/order/visitor.vue index 6624f53..84228b1 100644 --- a/src/views/order/visitor.vue +++ b/src/views/order/visitor.vue @@ -10,8 +10,8 @@ @@ -19,8 +19,8 @@ @@ -33,7 +33,8 @@ - + + @@ -225,12 +226,11 @@ end_date:this.searchFields.end_date, order_start_date:this.searchFields.order_start_date, order_end_date:this.searchFields.order_end_date, - // is_export:0, type:this.searchFields.type, unit:this.searchFields.unit - }).then(res => { let _data = []; + console.log(res) // let result = Object.assign(_data, res.data); for(var m of res.data){ var mod ={}; @@ -249,16 +249,25 @@ } that.tableData = _data; that.paginations.total = res.total - this.$forceUpdate() }).catch(error => { }) }, searchload(){ - this.searchFields.start_date = this.visitRange[0] - this.searchFields.end_date = this.visitRange[1] - this.searchFields.order_start_date = this.orderRange[0] - this.searchFields.order_end_date = this.orderRange[1] + if(this.visitRange){ + this.searchFields.start_date = this.visitRange[0] + this.searchFields.end_date = this.visitRange[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() }, resetload(){ @@ -276,6 +285,14 @@ this.orderRange = [] this.load() }, + exportExcel(){ + this.searchFields.is_export = 1 + listvisitor({ + is_export:this.searchFields.is_export + }).then(res => { + console.log(res) + }) + }, handleCurrentChange(page) { this.paginations.page = page; this.load();