From 7eef4d98188510cdb5d119c45fc90309ebe935a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E7=BF=94=E5=AE=87-=E6=97=85=E7=AE=A1=E5=AE=B6?=
<153298343@qq.com>
Date: Thu, 30 Jun 2022 20:45:41 +0800
Subject: [PATCH] up
---
src/views/order/parkorder.vue | 86 +++--
src/views/order/visitor.vue | 575 +++++++++++++++++----------------
src/views/order/visitorder.vue | 529 ++++++++++++++++--------------
vue.config.js | 3 +-
4 files changed, 659 insertions(+), 534 deletions(-)
diff --git a/src/views/order/parkorder.vue b/src/views/order/parkorder.vue
index 4401b09..ba8821f 100644
--- a/src/views/order/parkorder.vue
+++ b/src/views/order/parkorder.vue
@@ -7,7 +7,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
@@ -22,13 +33,29 @@
-
-
- {{scope.row[column.field]}}
+
+
+
+
+ {{scope.row["visit_order"]?"参观预约":"活动预约"}}
+
+
+ {{scope.row["visit_order"].type=="1"?"团队":"个人"}}
+
+
+ {{scope.row["visit_order"].unit?scope.row["visit_order"].unit:"无"}}
+
+
+
+
+
+ {{scope.row[column.field]}}
+
@@ -64,9 +91,9 @@
大车位
-
-
- 残疾人车位
+
+
+ 残疾人车位
@@ -109,6 +136,9 @@
}, {
id: 2,
value: "大车位"
+ }, {
+ id: 3,
+ value: "残疾人车位"
}],
carType: [{
id: 1,
@@ -122,7 +152,9 @@
clientHeight: 0,
//查询条件字段
searchFields: {
- name: ""
+ keyword: "",
+ date: "",
+ type: ""
},
tableData: [],
paginations: {
@@ -147,22 +179,38 @@
field: "plate",
title: "车牌号",
type: "string",
- },
- {
- field: "type",
- title: "车位类型",
- type: "type",
+ },
+ {
+ field: "type",
+ title: "车位类型",
+ type: "type",
},
{
field: "mobile",
title: "联系方式",
type: "string",
},
+ {
+ field: "orderType",
+ title: "关联类型",
+ type: "format",
+ },
+ {
+ field: "teamType",
+ title: "类型",
+ type: "format",
+ },
+ {
+ field: "teamunit",
+ title: "团队名称",
+ type: "format",
+ },
{
field: "操作",
title: "操作",
width: 220,
type: "opt",
+ fixed: "right"
}
]
@@ -192,7 +240,8 @@
listparkorder({
page: this.paginations.page,
page_size: this.paginations.page_size,
- car_park_id: carId
+ car_park_id: carId,
+ ...this.searchFields
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
@@ -200,9 +249,6 @@
})
-
-
-
},
show(obj) {
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
diff --git a/src/views/order/visitor.vue b/src/views/order/visitor.vue
index 7a3616f..3a4eade 100644
--- a/src/views/order/visitor.vue
+++ b/src/views/order/visitor.vue
@@ -6,35 +6,29 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
@@ -44,28 +38,28 @@
+ :label="column.title" :width="column.width" :fixed="column.fixed">
-
-
-
-
- {{item.value}}
- {{item.value}}
- {{item.value}}
- {{item.value}}
-
-
-
- {{scope.row[column.field]}}
+
+
+
+
+ {{item.value}}
+ {{item.value}}
+ {{item.value}}
+ {{item.value}}
+
+
+
+ {{scope.row[column.field]}}
-
-
@@ -76,9 +70,9 @@
import LxHeader from "@/components/LxHeader/index.vue";
import {
listvisitor
- } from "../../api/order/visitorder.js";
- import {
- getToken
+ } from "../../api/order/visitorder.js";
+ import {
+ getToken
} from '@/utils/auth'
export default {
components: {
@@ -86,121 +80,147 @@
},
data() {
return {
- parameters: {
- type_list:[{
- value: '团体',
- id: "1"
- },{
- value: '个人',
- id: "2"
- }],
- status_list:[{
- value: '待参观',
- id: "1"
- }, {
- value: '已参观',
- id: "2"
- }, {
- value: '已取消',
- id: "0"
- },{
- value: '已过期',
- id: "3"
- }]
- },
- tableHeight: 0,
- clientHeight:0,
- //查询条件字段
- visitRange:['',''],
- orderRange:['',''],
- tokens:"",
- baseurl:"",
- searchFields: {
- keyword: "",
- start_date:"",
- end_date:"",
- order_start_date:"",
- order_end_date:"",
- is_export:0,
- type:"",
- unit:""
- },
- tableData: [],
- paginations: {
- page: 1,
- page_size: 15,
- total: 0
+ parameters: {
+ visittime: [{
+ value: "09:00-10:00",
+ id: "1"
+ }, {
+ value: "10:00-11:00",
+ id: "2"
+ }, {
+ value: "11:00-12:00",
+ id: "3"
+ }, {
+ value: "12:00-13:00",
+ id: "4"
+ }, {
+ value: "13:00-14:00",
+ id: "41"
+ }, {
+ value: "14:00-15:00",
+ id: "51"
+ }, {
+ value: "15:00-16:00",
+ id: "61"
+ }, {
+ value: "16:00-17:00",
+ id: "71"
+ }],
+ type_list: [{
+ value: '团体',
+ id: "1"
+ }, {
+ value: '个人',
+ id: "2"
+ }],
+ status_list: [{
+ value: '待参观',
+ id: "1"
+ }, {
+ value: '已参观',
+ id: "2"
+ }, {
+ value: '已取消',
+ id: "0"
+ }, {
+ value: '已过期',
+ id: "3"
+ }]
+ },
+ tableHeight: 0,
+ clientHeight: 0,
+ //查询条件字段
+ visitRange: ['', ''],
+ orderRange: ['', ''],
+ tokens: "",
+ baseurl: "",
+ searchFields: {
+ keyword: "",
+ start_date: "",
+ end_date: "",
+ order_start_date: "",
+ order_end_date: "",
+ is_export: 0,
+ type: "",
+ unit: "",
+ time: ""
+ },
+ tableData: [],
+ paginations: {
+ page: 1,
+ page_size: 15,
+ total: 0
},
columns: [{
field: "date",
title: "预约日期",
- type: "date",
- width:180,
- fixed:"left"
- },
- {
- field: "person",
- title: "预约人",
- type: "string",
- align:"center",
- width:120
- },
- {
- field: "personmobile",
- title: "游客电话",
- type: "string",
- align:"center",
- width:180,
- },
- {
- field: "is_disability",
- title: "是否行动不便",
- type: "string",
- align:"center",
- width:120
- },
- {
- field: "typeName",
- title: "类型",
- type: "string",
- align:"center",
- width:120
- },
- {
- field: "leader",
- title: "领队人",
- type: "string",
- align:"center",
- width:120
- },
- {
- field: "mobile",
- title: "联系电话",
- type: "string",
- align:"center",
- width:180,
- },
- {
- field: "unit",
- title: "单位",
- type: "string",
- align:"center",
- width:200,
- },
- {
- field: "created_at",
- title: "下单时间",
- type: "string",
- align:"center",
- width:180,
- },
- {
- field: "status",
- title: "订单状态",
- type: "status",
- align:"center",
- fixed:"right",
- width:120
+ type: "date",
+ width: 180,
+ fixed: "left"
+ },
+ {
+ field: "person",
+ title: "预约人",
+ type: "string",
+ align: "center",
+ width: 120
+ },
+ {
+ field: "personmobile",
+ title: "游客电话",
+ type: "string",
+ align: "center",
+ width: 180,
+ },
+ {
+ field: "is_disability",
+ title: "是否行动不便",
+ type: "string",
+ align: "center",
+ width: 120
+ },
+ {
+ field: "typeName",
+ title: "类型",
+ type: "string",
+ align: "center",
+ width: 120
+ },
+ {
+ field: "leader",
+ title: "领队人",
+ type: "string",
+ align: "center",
+ width: 120
+ },
+ {
+ field: "mobile",
+ title: "联系电话",
+ type: "string",
+ align: "center",
+ width: 180,
+ },
+ {
+ field: "unit",
+ title: "单位",
+ type: "string",
+ align: "center",
+ width: 200,
+ },
+ {
+ field: "created_at",
+ title: "下单时间",
+ type: "string",
+ align: "center",
+ width: 180,
+ },
+ {
+ field: "status",
+ title: "订单状态",
+ type: "status",
+ align: "center",
+ fixed: "right",
+ width: 120
}
]
@@ -219,123 +239,132 @@
var paginationHeight = 37; //分页的高度
var topHeight = 50; //页面 头部
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
- that.tableHeight = tableHeight;
- that.tokens = getToken()
- that.baseurl = process.env.VUE_APP_BASE_API
- console.log("aa",process.env)
+ that.tableHeight = tableHeight;
+ that.baseurl = location.host; //process.env.VUE_APP_BASE_API
+ console.log("aa", process.env)
},
- load() {
+ load(is_export) {
+ console.log(is_export)
var that = this;
- listvisitor({
- page: this.paginations.page,
- 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 = [];
- // 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
- mod.typeName = m.visit_order.type==1 ? "团体" : "个人"
- mod.unit = m.visit_order.type==1 ? m.visit_order.unit : "无"
- mod.person = m.name
- mod.personmobile = m.mobile
- mod.created_at = m.created_at
- mod.is_disability = m.is_disability == 0 ? "否" : "是"
- mod.status = m.status
- _data.push(mod)
- }
- that.tableData = _data;
- that.paginations.total = res.total
- }).catch(error => {
-
+ listvisitor({
+ page: this.paginations.page,
+ 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,
+ time: this.searchFields.time
+ }).then(res => {
+ let tokens = getToken();
+ console.log(is_export)
+ console.log(tokens)
+ console.log(that.searchFields.is_export)
+ if (is_export) {
+ var url = "/api/admin/visit/order-detail-index?token=" + tokens
+ console.log(url)
+ for (var m in that.searchFields) {
+ url += "&" + m + "=" + that.searchFields[m]
+ }
+ url = that.baseurl + url
+ console.log(url)
+ window.open("http://" + url, '_blank')
+ that.searchFields.is_export = 0
+ return;
+ }
+ let _data = [];
+ // 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
+ mod.typeName = m.visit_order.type == 1 ? "团体" : "个人"
+ mod.unit = m.visit_order.type == 1 ? m.visit_order.unit : "无"
+ mod.person = m.name
+ mod.personmobile = m.mobile
+ mod.created_at = m.created_at
+ mod.is_disability = m.is_disability == 0 ? "否" : "是"
+ mod.status = m.status
+ _data.push(mod)
+ }
+ that.tableData = _data;
+ that.paginations.total = res.total
+ }).catch(error => {
+
})
- },
- searchload(){
- 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(){
- this.searchFields = {
- keyword: "",
- start_date:"",
- end_date:"",
- order_start_date:"",
- order_end_date:"",
- // is_export:0,
- type:"",
- unit:""
- },
- this.visitRange = ['','']
- this.orderRange = ['','']
- this.load()
- },
- exportExcel(){
- this.searchFields.is_export = 1
- this.load()
-
- },
- handleCurrentChange(page) {
- this.paginations.page = page;
- this.load();
+ },
+ searchload() {
+ 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() {
+ this.searchFields = {
+ keyword: "",
+ start_date: "",
+ end_date: "",
+ order_start_date: "",
+ order_end_date: "",
+ // is_export:0,
+ type: "",
+ unit: ""
+ },
+ this.visitRange = ['', '']
+ this.orderRange = ['', '']
+ this.load()
+ },
+ exportExcel() {
+ this.searchFields.is_export = 1;
+ this.load(true);
+ },
+ handleCurrentChange(page) {
+ this.paginations.page = page;
+ this.load();
}
}
};
-
-
-
diff --git a/src/views/order/visitorder.vue b/src/views/order/visitorder.vue
index 658f86f..9b3ab91 100644
--- a/src/views/order/visitorder.vue
+++ b/src/views/order/visitorder.vue
@@ -7,7 +7,24 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -22,139 +39,139 @@
-
-
- {{scope.row['date']+" "+scope.row['time']}}
-
-
-
-
-
- {{item.value}}
- {{item.value}}
- {{item.value}}
- {{item.value}}
-
+
+
+ {{scope.row['date']+" "+scope.row['time']}}
+
+
+
+
+
+ {{item.value}}
+ {{item.value}}
+ {{item.value}}
+ {{item.value}}
+
{{scope.row[column.field]}}
-
-
-
-
-
-
-
-
- {{form.date+" "+form.time}}
-
-
-
-
- 团体
-
-
- 个人
-
-
-
-
- {{form.mobile}}
-
-
-
-
- {{form.unit}}
-
-
-
-
- {{form.leader}}
-
-
-
-
- 身份证
-
-
- 护照
-
-
-
-
- {{form.idcard}}
-
-
-
-
- {{form.total}}
-
-
-
- 详细人员资料
-
-
-
-
-
-
-
-
- {{scope.row.name}}
-
-
-
-
- {{scope.row.mobile}}
-
-
-
-
-
- 身份证
-
-
- 护照
-
-
-
-
-
- {{scope.row.idcard}}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{form.date+" "+form.time}}
+
+
+
+
+ 团体
+
+
+ 个人
+
+
+
+
+ {{form.mobile}}
+
+
+
+
+ {{form.unit}}
+
+
+
+
+ {{form.leader}}
+
+
+
+
+ 身份证
+
+
+ 护照
+
+
+
+
+ {{form.idcard}}
+
+
+
+
+ {{form.total}}
+
+
+
+ 详细人员资料
+
+
+
+
+
+
+
+
+ {{scope.row.name}}
+
+
+
+
+ {{scope.row.mobile}}
+
+
+
+
+
+ 身份证
+
+
+ 护照
+
+
+
+
+
+ {{scope.row.idcard}}
+
+
+
+
+
+
+
+
+