|
|
|
|
@ -34,7 +34,7 @@
|
|
|
|
|
<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="resetload">重置</Button>
|
|
|
|
|
<!-- <Button type="primary" @click="exportExcel">导出</Button> -->
|
|
|
|
|
<Button type="primary" @click="exportExcel">导出</Button>
|
|
|
|
|
<!-- <Button type="primary" @click="searchload">查询</Button> -->
|
|
|
|
|
</div>
|
|
|
|
|
</slot>
|
|
|
|
|
@ -76,7 +76,10 @@
|
|
|
|
|
import LxHeader from "@/components/LxHeader/index.vue";
|
|
|
|
|
import {
|
|
|
|
|
listvisitor
|
|
|
|
|
} from "../../api/order/visitorder.js";
|
|
|
|
|
} from "../../api/order/visitorder.js";
|
|
|
|
|
import {
|
|
|
|
|
getToken
|
|
|
|
|
} from '@/utils/auth'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
LxHeader
|
|
|
|
|
@ -108,15 +111,17 @@
|
|
|
|
|
tableHeight: 0,
|
|
|
|
|
clientHeight:0,
|
|
|
|
|
//查询条件字段
|
|
|
|
|
visitRange:[],
|
|
|
|
|
orderRange:[],
|
|
|
|
|
visitRange:['',''],
|
|
|
|
|
orderRange:['',''],
|
|
|
|
|
tokens:"",
|
|
|
|
|
baseurl:"",
|
|
|
|
|
searchFields: {
|
|
|
|
|
keyword: "",
|
|
|
|
|
start_date:"",
|
|
|
|
|
end_date:"",
|
|
|
|
|
order_start_date:"",
|
|
|
|
|
order_end_date:"",
|
|
|
|
|
// is_export:0,
|
|
|
|
|
is_export:0,
|
|
|
|
|
type:"",
|
|
|
|
|
unit:""
|
|
|
|
|
},
|
|
|
|
|
@ -214,7 +219,10 @@
|
|
|
|
|
var paginationHeight = 37; //分页的高度
|
|
|
|
|
var topHeight = 50; //页面 头部
|
|
|
|
|
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
|
|
|
|
that.tableHeight = tableHeight;
|
|
|
|
|
that.tableHeight = tableHeight;
|
|
|
|
|
that.tokens = getToken()
|
|
|
|
|
that.baseurl = process.env.VUE_APP_BASE_API
|
|
|
|
|
console.log("aa",process.env)
|
|
|
|
|
},
|
|
|
|
|
load() {
|
|
|
|
|
var that = this;
|
|
|
|
|
@ -223,18 +231,28 @@
|
|
|
|
|
page_size: this.paginations.page_size,
|
|
|
|
|
keyword:this.searchFields.keyword,
|
|
|
|
|
start_date:this.searchFields.start_date,
|
|
|
|
|
is_export:this.searchFields.is_export,
|
|
|
|
|
end_date:this.searchFields.end_date,
|
|
|
|
|
order_start_date:this.searchFields.order_start_date,
|
|
|
|
|
order_end_date:this.searchFields.order_end_date,
|
|
|
|
|
type:this.searchFields.type,
|
|
|
|
|
unit:this.searchFields.unit
|
|
|
|
|
}).then(res => {
|
|
|
|
|
if(that.searchFields.is_export==1){
|
|
|
|
|
var url = "api/admin/visit/order-detail-index?token="+that.tokens
|
|
|
|
|
for(var m in that.searchFields){
|
|
|
|
|
url +="&"+m+"="+that.searchFields[m]
|
|
|
|
|
}
|
|
|
|
|
url = that.baseurl + url
|
|
|
|
|
console.log(url)
|
|
|
|
|
window.open(url, '_blank')
|
|
|
|
|
that.searchFields.is_export=0
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let _data = [];
|
|
|
|
|
console.log(res)
|
|
|
|
|
// let result = Object.assign(_data, res.data);
|
|
|
|
|
for(var m of res.data){
|
|
|
|
|
var mod ={};
|
|
|
|
|
|
|
|
|
|
mod.date = m.visit_order.date +" "+ m.visit_order.time
|
|
|
|
|
mod.leader = m.visit_order.type==1 ? m.visit_order.leader : m.name
|
|
|
|
|
mod.mobile = m.visit_order.mobile
|
|
|
|
|
@ -281,17 +299,14 @@
|
|
|
|
|
type:"",
|
|
|
|
|
unit:""
|
|
|
|
|
},
|
|
|
|
|
this.visitRange = []
|
|
|
|
|
this.orderRange = []
|
|
|
|
|
this.visitRange = ['','']
|
|
|
|
|
this.orderRange = ['','']
|
|
|
|
|
this.load()
|
|
|
|
|
},
|
|
|
|
|
exportExcel(){
|
|
|
|
|
this.searchFields.is_export = 1
|
|
|
|
|
listvisitor({
|
|
|
|
|
is_export:this.searchFields.is_export
|
|
|
|
|
}).then(res => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
})
|
|
|
|
|
this.load()
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
handleCurrentChange(page) {
|
|
|
|
|
this.paginations.page = page;
|
|
|
|
|
|