|
@@ -72,11 +72,11 @@
|
|
|
<el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
|
|
<el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
|
|
|
<el-table-column prop="orderNo" label="订单号" min-width="180"></el-table-column>
|
|
<el-table-column prop="orderNo" label="订单号" min-width="180"></el-table-column>
|
|
|
<el-table-column prop="agencyName" label="旅行社名称" min-width="180" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="agencyName" label="旅行社名称" min-width="180" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="travelStartDate" label="游玩日期" width="200">
|
|
|
|
|
|
|
+ <el-table-column prop="travelStartDate" label="游玩日期" width="160">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <div>开始日期: {{ scope.row.travelStartDate }}</div>
|
|
|
|
|
- <div>结束日期: {{ scope.row.travelEndDate }}</div>
|
|
|
|
|
- <div>共: <el-tag size="small">{{ scope.row.travelDays + 1 }}天</el-tag></div>
|
|
|
|
|
|
|
+ <div>开始日期: {{ moment(scope.row.travelStartDate).format('YYYY-MM-DD') }}</div>
|
|
|
|
|
+ <div>结束日期: {{ getEndDay(scope.row) }}</div>
|
|
|
|
|
+ <div>共: <el-tag size="small">{{ scope.row.travelDays }}天</el-tag></div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="touristCount" label="人数" width="80" align="center"></el-table-column>
|
|
<el-table-column prop="touristCount" label="人数" width="80" align="center"></el-table-column>
|
|
@@ -95,10 +95,8 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="auditStatus" label="审核状态" width="100">
|
|
<el-table-column prop="auditStatus" label="审核状态" width="100">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-tag :type="scope.row.auditStatus === 'Approved' ? 'success' :
|
|
|
|
|
- scope.row.auditStatus === 'Rejected' ? 'danger' : 'warning'">
|
|
|
|
|
- {{ scope.row.auditStatus === 'Approved' ? '已通过' :
|
|
|
|
|
- scope.row.auditStatus === 'Rejected' ? '已驳回' : '待审核' }}
|
|
|
|
|
|
|
+ <el-tag :type="getAuditStatusType(scope.row.auditStatus)">
|
|
|
|
|
+ {{ getAuditStatusText(scope.row.auditStatus) }}
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -120,14 +118,14 @@
|
|
|
<div>
|
|
<div>
|
|
|
<!-- <el-button type="primary" link size="small" @click="edit(scope.row)">编辑</el-button> -->
|
|
<!-- <el-button type="primary" link size="small" @click="edit(scope.row)">编辑</el-button> -->
|
|
|
<!-- <el-button type="success" link size="small" @click="audit(scope.row)">审核</el-button> -->
|
|
<!-- <el-button type="success" link size="small" @click="audit(scope.row)">审核</el-button> -->
|
|
|
- <el-button type="info" link size="small" @click="attachment(scope.row)">附件</el-button>
|
|
|
|
|
|
|
+ <el-button type="info" link size="small" @click="view(scope.row)">详情</el-button>
|
|
|
<el-button type="info" link size="small" @click="editSchedule(scope.row)">行程</el-button>
|
|
<el-button type="info" link size="small" @click="editSchedule(scope.row)">行程</el-button>
|
|
|
<el-button type="info" link size="small" @click="editTourists(scope.row)">游客</el-button>
|
|
<el-button type="info" link size="small" @click="editTourists(scope.row)">游客</el-button>
|
|
|
- <el-button type="info" link size="small" @click="view(scope.row)">详情</el-button>
|
|
|
|
|
|
|
+ <el-button type="info" link size="small" @click="attachment(scope.row)">附件</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
- <el-button v-if="userAccountId === 'testuser' && orderCanPay(scope.row)" type="success" link size="small"
|
|
|
|
|
- @click="payment(scope.row)">收款</el-button>
|
|
|
|
|
|
|
+ <el-button v-if="orderCanPay(scope.row)" type="success" link size="small"
|
|
|
|
|
+ @click="payment(scope.row)">付款</el-button>
|
|
|
<!-- <el-button v-if="!['Completed', 'Cancelled'].includes(scope.row.status)" type="warning" link size="small"
|
|
<!-- <el-button v-if="!['Completed', 'Cancelled'].includes(scope.row.status)" type="warning" link size="small"
|
|
|
@click="cancel(scope.row)">取消</el-button> -->
|
|
@click="cancel(scope.row)">取消</el-button> -->
|
|
|
<el-button v-if="scope.row.status === 'Submitted'" type="danger" link size="small"
|
|
<el-button v-if="scope.row.status === 'Submitted'" type="danger" link size="small"
|
|
@@ -508,14 +506,15 @@
|
|
|
</div> -->
|
|
</div> -->
|
|
|
|
|
|
|
|
<el-table :data="scheduleList" border style="width: 100%" size="small">
|
|
<el-table :data="scheduleList" border style="width: 100%" size="small">
|
|
|
- <el-table-column type="index" label="序号" width="50" align="center" />
|
|
|
|
|
|
|
+ <!-- <el-table-column type="index" label="序号" width="50" align="center" /> -->
|
|
|
<el-table-column prop="dayNumber" label="天数" width="80" align="center" />
|
|
<el-table-column prop="dayNumber" label="天数" width="80" align="center" />
|
|
|
<el-table-column prop="scheduleDate" label="日期" width="120">
|
|
<el-table-column prop="scheduleDate" label="日期" width="120">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- {{ scope.row.scheduleDate }}
|
|
|
|
|
|
|
+ {{ moment(scope.row.scheduleDate).format('YYYY-MM-DD') }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="title" label="标题" />
|
|
|
|
|
|
|
+ <el-table-column prop="title" label="标题" width="100" />
|
|
|
|
|
+ <el-table-column prop="description" label="内容" show-overflow-tooltip />
|
|
|
<!-- <el-table-column label="操作" width="120" align="center">
|
|
<!-- <el-table-column label="操作" width="120" align="center">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-button type="primary" link size="small" @click="editScheduleItem(scope.row)">编辑</el-button>
|
|
<el-button type="primary" link size="small" @click="editScheduleItem(scope.row)">编辑</el-button>
|
|
@@ -855,9 +854,9 @@
|
|
|
|
|
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
- <el-dialog :title="`收款`" v-model="paymentDialogVisible" width="500px" append-to-body @close="cancelPayment">
|
|
|
|
|
|
|
+ <el-dialog :title="`付款`" v-model="paymentDialogVisible" width="500px" append-to-body @close="cancelPayment">
|
|
|
<el-form :model="paymentForm" ref="paymentFormRef" label-width="100px">
|
|
<el-form :model="paymentForm" ref="paymentFormRef" label-width="100px">
|
|
|
- <el-form-item label="收款方式" prop="method">
|
|
|
|
|
|
|
+ <el-form-item label="付款方式" prop="method">
|
|
|
<el-radio-group v-model="paymentForm.method">
|
|
<el-radio-group v-model="paymentForm.method">
|
|
|
<el-radio-button label="Online">在线支付</el-radio-button>
|
|
<el-radio-button label="Online">在线支付</el-radio-button>
|
|
|
<!-- <el-radio-button label="Balance">余额扣款</el-radio-button>
|
|
<!-- <el-radio-button label="Balance">余额扣款</el-radio-button>
|
|
@@ -872,7 +871,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <el-form-item label="收款金额" prop="amount">
|
|
|
|
|
|
|
+ <el-form-item label="付款金额" prop="amount">
|
|
|
<el-input-number v-model.number="paymentForm.amount" disabled :min="0" :precision="2" style="width:200px" />
|
|
<el-input-number v-model.number="paymentForm.amount" disabled :min="0" :precision="2" style="width:200px" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
@@ -889,11 +888,11 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
- <el-dialog title="收款二维码" v-model="onlinePaymentDialogVisible" width="420px" append-to-body
|
|
|
|
|
|
|
+ <el-dialog title="付款二维码" v-model="onlinePaymentDialogVisible" width="420px" append-to-body
|
|
|
@close="cancelOnlinePayment">
|
|
@close="cancelOnlinePayment">
|
|
|
<div style="text-align:center; padding: 10px 0;">
|
|
<div style="text-align:center; padding: 10px 0;">
|
|
|
<div style="margin-bottom:8px; font-size:16px;">
|
|
<div style="margin-bottom:8px; font-size:16px;">
|
|
|
- 收款金额:<strong style="color:#f56c6c">¥{{ (paymentForm.amount || 0).toFixed(2) }}</strong>
|
|
|
|
|
|
|
+ 付款金额:<strong style="color:#f56c6c">¥{{ (paymentForm.amount || 0).toFixed(2) }}</strong>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div style="margin-bottom:10px; color:#666;">请使用支付客户端扫码支付</div>
|
|
<div style="margin-bottom:10px; color:#666;">请使用支付客户端扫码支付</div>
|
|
@@ -946,7 +945,14 @@ import moment from 'moment/moment';
|
|
|
import { ProductTypes, FileTypeMap } from '@/constant';
|
|
import { ProductTypes, FileTypeMap } from '@/constant';
|
|
|
import utils from '@/utils/util';
|
|
import utils from '@/utils/util';
|
|
|
import QRCode from 'qrcode';
|
|
import QRCode from 'qrcode';
|
|
|
-import { getOrderStatusText, getOrderStatusType, getPaymentStatusText, getPaymentStatusType } from '@/utils/order';
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ getOrderStatusText,
|
|
|
|
|
+ getOrderStatusType,
|
|
|
|
|
+ getPaymentStatusText,
|
|
|
|
|
+ getPaymentStatusType,
|
|
|
|
|
+ getAuditStatusText,
|
|
|
|
|
+ getAuditStatusType,
|
|
|
|
|
+} from '@/utils/order';
|
|
|
import OrderDetailDialog from './detial.vue';
|
|
import OrderDetailDialog from './detial.vue';
|
|
|
|
|
|
|
|
const QRCodeOpts = {
|
|
const QRCodeOpts = {
|
|
@@ -1151,6 +1157,11 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ moment,
|
|
|
|
|
+ getEndDay(row) {
|
|
|
|
|
+ if (!row.travelStartDate || !row.travelDays) return '-';
|
|
|
|
|
+ return moment(row.travelStartDate).add(row.travelDays - 1, 'days').format('YYYY-MM-DD');
|
|
|
|
|
+ },
|
|
|
getProductCategories() {
|
|
getProductCategories() {
|
|
|
getProductCategories({
|
|
getProductCategories({
|
|
|
keyword: "",
|
|
keyword: "",
|
|
@@ -1352,7 +1363,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
// TODO
|
|
// TODO
|
|
|
- this.$message.success('收款成功');
|
|
|
|
|
|
|
+ this.$message.success('付款成功');
|
|
|
this.paymentDialogVisible = false;
|
|
this.paymentDialogVisible = false;
|
|
|
this.getOrderList();
|
|
this.getOrderList();
|
|
|
}
|
|
}
|
|
@@ -1361,7 +1372,7 @@ export default {
|
|
|
const { orderNo, amount } = this.paymentForm;
|
|
const { orderNo, amount } = this.paymentForm;
|
|
|
const qrCodeContainer = document.getElementById('payment-qr-code');
|
|
const qrCodeContainer = document.getElementById('payment-qr-code');
|
|
|
qrCodeContainer.innerHTML = '';
|
|
qrCodeContainer.innerHTML = '';
|
|
|
- const state = { amount };
|
|
|
|
|
|
|
+ const state = { amount, orderNo };
|
|
|
const redirectUrl = encodeURIComponent(`${window.location.origin}/payment/detail/${orderNo}`); // 回调地址,获取到 code 之后重定向的 URL
|
|
const redirectUrl = encodeURIComponent(`${window.location.origin}/payment/detail/${orderNo}`); // 回调地址,获取到 code 之后重定向的 URL
|
|
|
// const res = await getAuthUrl(redirectUrl, JSON.stringify(state));
|
|
// const res = await getAuthUrl(redirectUrl, JSON.stringify(state));
|
|
|
// const authUrl = res?.data?.authUrl?.replaceAll('ljyx.', 'ljyxweb.');
|
|
// const authUrl = res?.data?.authUrl?.replaceAll('ljyx.', 'ljyxweb.');
|
|
@@ -1600,6 +1611,8 @@ export default {
|
|
|
getOrderStatusText,
|
|
getOrderStatusText,
|
|
|
getPaymentStatusType,
|
|
getPaymentStatusType,
|
|
|
getPaymentStatusText,
|
|
getPaymentStatusText,
|
|
|
|
|
+ getAuditStatusType,
|
|
|
|
|
+ getAuditStatusText,
|
|
|
orderCanPay(row) {
|
|
orderCanPay(row) {
|
|
|
return row.paymentStatus !== 'Paid';
|
|
return row.paymentStatus !== 'Paid';
|
|
|
},
|
|
},
|
|
@@ -1621,7 +1634,6 @@ export default {
|
|
|
getScheduleList(orderId) {
|
|
getScheduleList(orderId) {
|
|
|
// 调用API获取行程列表
|
|
// 调用API获取行程列表
|
|
|
getScheduleByOrderId(orderId).then(res => {
|
|
getScheduleByOrderId(orderId).then(res => {
|
|
|
- console.log(res, 'scheduleList');
|
|
|
|
|
this.scheduleList = res.data;
|
|
this.scheduleList = res.data;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|