This commit is contained in:
parent
179167c194
commit
9995fb0a6d
|
@ -207,6 +207,15 @@ export const asyncRoutes = [
|
|||
roles: ['order_back', 'editor']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'appointment',
|
||||
component: () => import('@/views/order/appointment'),
|
||||
name: 'appointment',
|
||||
meta: {
|
||||
title: '预约记录',
|
||||
roles: ['order_back', 'editor']
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -163,6 +163,28 @@
|
|||
placeholder="发送短时的时候会用到这个手机"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="微信">
|
||||
<el-input
|
||||
v-model="item.wechat"
|
||||
name="wechat"
|
||||
placeholder="微信号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="微信图片">
|
||||
<el-upload
|
||||
action = ""
|
||||
list-type="picture-card"
|
||||
multiple:false
|
||||
:show-file-list="false"
|
||||
:http-request="handlesAvatarSuccess"
|
||||
:on-success="
|
||||
(response, file, fileList) =>
|
||||
handleSuccess(response, file, fileList, 1)"
|
||||
>
|
||||
<img v-if="item.wechat_pic" :src="item.wechat_pic" style="width: 120px; height: 120px;margin-top: 14px;"/>
|
||||
<i slot="default" class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码">
|
||||
<el-input
|
||||
v-model="item.password"
|
||||
|
@ -333,6 +355,7 @@
|
|||
<script>
|
||||
import Pagination from "@/components/Pagination"; // Secondary package based on el-pagination
|
||||
import { getProductsList, addProducts } from "@/api/admin";
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
name: "Adminlist",
|
||||
components: { Pagination },
|
||||
|
@ -393,9 +416,47 @@ export default {
|
|||
})
|
||||
.catch((err) => {});
|
||||
},
|
||||
checkIfUrlContainsImage(url = "") {
|
||||
const imageExtensions = [
|
||||
".jpg",
|
||||
".jpeg",
|
||||
".png",
|
||||
".gif",
|
||||
".bmp",
|
||||
".svg",
|
||||
".webp",
|
||||
];
|
||||
return imageExtensions.some((extension) =>
|
||||
url.toLowerCase().endsWith(extension)
|
||||
);
|
||||
},
|
||||
handleAddRoutes() {
|
||||
this.isAddRouters = true;
|
||||
},
|
||||
async handlesAvatarSuccess(file) {
|
||||
try {
|
||||
var formdata = new FormData();
|
||||
formdata.append("file", file.file);
|
||||
|
||||
this.upLoading = true;
|
||||
const _this = this;
|
||||
const res = await this.$axios.post("/admin/upload/index", formdata, {
|
||||
headers: {
|
||||
"Content-type": "multipart/form-data",
|
||||
"X-Token": getToken(),
|
||||
},
|
||||
});
|
||||
this.item.wechat_pic = `${window.location.protocol}//${window.location.host}${res.data}`;
|
||||
file.onSuccess(res);
|
||||
} catch (error) {
|
||||
console.error('error:', error);
|
||||
}
|
||||
},
|
||||
handleSuccess(res, file, fileList) {
|
||||
console.log(res, file, fileList);
|
||||
if (!res.data) return;
|
||||
this.item.wechat_pic = `${window.location.protocol}//${window.location.host}${res.data}`;
|
||||
},
|
||||
handleAddRouters() {
|
||||
this.$refs["AddRoutersForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<div class="filter-container">
|
||||
<el-input v-model="listQuery.sn" placeholder="订单号" style="width: 300px;" class="filter-item" />
|
||||
|
||||
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getList">
|
||||
搜索
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%">
|
||||
|
||||
<el-table-column align="center" fixed width="220" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.self ==0 && scope.row.status == 0" type="primary" size="small" icon="el-icon-check" @click="onPass(scope.row)">
|
||||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="订单号" width="80" prop="orderInfo.sn" />
|
||||
<el-table-column align="center" label="出游日期" width="80" prop="travel_date" />
|
||||
<el-table-column align="center" label="出游人数" width="80" prop="num" />
|
||||
<el-table-column align="center" label="出行人名称" width="220" prop="name" />
|
||||
<el-table-column align="center" label="联系电话" prop="mobile" />
|
||||
<el-table-column align="center" label="券码图片" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.code_pic"
|
||||
:preview-src-list="[scope.row.code_pic]">
|
||||
</el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" prop="note" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import Pagination from '@/Wangeditor/Pagination'
|
||||
import Pagination from '@/components/PaginationFixed'
|
||||
|
||||
export default {
|
||||
name: 'Orderlist',
|
||||
components: { Pagination },
|
||||
filters: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: true,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
oss: {},
|
||||
item: {},
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$axios.get('/admin/orderbooks/list', { params: this.listQuery }).then(response => {
|
||||
this.list = response.data.data
|
||||
this.total = response.data.total
|
||||
this.oss = response.ext
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
onBack() {
|
||||
this.$axios.post('/admin/order/back', this.item).then(res => {
|
||||
this.dialogVisible = false
|
||||
this.item = {}
|
||||
this.getList()
|
||||
}).catch(err => {
|
||||
|
||||
})
|
||||
},
|
||||
onPass(item) {
|
||||
this.$axios.post('/admin/order/backpass', { id: item.id }).then(res => {
|
||||
this.dialogVisible = false
|
||||
this.item = {}
|
||||
this.getList()
|
||||
}).catch(err => {
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.app-container {
|
||||
position: relative;
|
||||
padding-bottom: 60px; /* 分页条的高度 */
|
||||
}
|
||||
|
||||
.filter-container,
|
||||
.el-table {
|
||||
padding-bottom: 52px; /* 分页条的高度,以避免内容重叠 */
|
||||
}
|
||||
</style>
|
|
@ -422,6 +422,7 @@ export default {
|
|||
// );
|
||||
},
|
||||
handleSuccess(res, file, fileList, index) {
|
||||
console.log(res, file, fileList);
|
||||
if (!res.data) return;
|
||||
this.anchors.trip_zip[
|
||||
index
|
||||
|
|
Loading…
Reference in New Issue