6a64b49d by lttnew

订单

1 parent a4d367f7
......@@ -68,11 +68,11 @@ const handleClick = (index, url) => {
bottom: 0;
left: 0;
right: 0;
height: 120rpx;
height: 130rpx;
display: flex;
justify-content: flex-start;
align-items: stretch;
padding-bottom: env(safe-area-inset-bottom);
padding-bottom: 0;
z-index: 9999;
background-color: #d9d9d9;
overflow: hidden;
......@@ -80,9 +80,10 @@ const handleClick = (index, url) => {
.dg-tab-bar-bg {
position: absolute;
top: 0rpx;
top: 0;
bottom: 0;
width: 20%;
height: calc(100% - 35rpx);
height: 130rpx;
z-index: 0;
transition: left 0.3s ease;
pointer-events: none;
......@@ -94,7 +95,7 @@ const handleClick = (index, url) => {
align-items: center;
justify-content: center;
width: 20%;
height: 100%;
height: 130rpx;
position: relative;
z-index: 1;
}
......
......@@ -9,11 +9,7 @@
<view class="appList">
<view v-for="(item,index) in list" :key="item.examId || index" class="appItem">
<view class="status" @click="goDetail(item)">
<text v-if="item.status=='0'" class="text-primary-bg">{{ item.statusStr }}</text>
<text v-if="item.status=='1'" class="text-primary-bg">{{ item.statusStr }}</text>
<text v-if="item.status=='2'" class="text-success-bg">{{ item.statusStr }}</text>
<text v-if="item.status=='3'" class="text-danger-bg">{{ item.statusStr }}</text>
<text v-if="item.status=='4'" class="text-warning-bg">{{ item.statusStr }}</text>
<text :class="getStatusClass(item.status)">{{ auditStatusTag(item.status) }}</text>
</view>
<view v-if="item.status!='0'&&item.submitTime" class="date">提交时间:{{ item.submitTime }}</view>
<view class="mt0" @click="goDetail(item)">
......@@ -38,11 +34,13 @@
<view class="pp esp">申请单位:{{ item.memberName }}</view>
<view class="pp esp">考级日期:{{ item.startTime?.substring(0, 16) }}{{ item.endTime?.substring(0, 16) }}
</view>
<view v-if="item.status=='0'||item.status=='3'||item.status=='4'||item.status=='9'" class="func">
<button v-if="item.status !== '1' && item.status !== '2' && item.status !== '3'" @click="handleDelete(item)">删除</button>
<button v-if="item.status === '0'" @click="editThis(item)">编辑</button>
<button v-if="(item.status === '0' || item.status === '9') && item.totalNum > 0 && item.pass > 0" @click="handleSubmit(item)">提交审核</button>
<view class="func">
<!-- <button :disabled="item.status=='0'" @click="goDetail(item)">查看</button> -->
<button :disabled="item.status!='0'" @click="editThis(item)">编辑</button>
<button v-if="item.status === '9'" class="btn-pay" :disabled="item.status!='0'&&item.status!='9'||item.totalNum==0||item.pass==0" @click="handlePay(item)">支付</button>
<button v-else :disabled="item.status!='0'&&item.status!='9'||item.totalNum==0||item.pass==0" @click="handleSubmit(item)">提交审核</button>
<button :disabled="item.status!= 8" @click="handleDelete(item)">删除</button>
</view>
</view>
</view>
......@@ -112,6 +110,26 @@ function getList() {
})
}
const auditStatusTag = (status) => {
const map = {
'0': '待提交',
'1': '审核中',
'2': '审核通过',
'3': '审核拒绝',
'4': '已退回',
'8': '已取消',
'9': '待支付'
}
return map[status] || ''
}
const getStatusClass = (status) => {
if (status === '2') return 'text-success-bg'
if (status === '3' || status === '8') return 'text-danger-bg'
if (status === '4' || status === '9') return 'text-warning-bg'
return 'text-primary-bg'
}
function goAdd() {
let path = `/level/addApply`
uni.navigateTo({
......@@ -184,7 +202,13 @@ function goDetail(item) {
// 去编辑
editThis(item)
}
}
function handlePay(item) {
uni.navigateTo({
url: `/level/paymentDetail?examId=${item.examId}`
})
}
</script>
......@@ -220,12 +244,31 @@ function goDetail(item) {
// border-color: #eee;
// }
}
.btn-pay {
background-color: #13B5B1;
color: #fff;
border-color: #13B5B1;
}
:deep(.func button[disabled]) {
background-color: #f5f5f5 !important;
color: #ccc !important;
border-color: #eee !important;
opacity: 0.6;
}
:deep(.func) {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
gap: 10rpx;
button {
padding: 0 20rpx;
font-size: 24rpx;
line-height: 2;
min-width: 120rpx;
}
}
.mt0 {
margin-top: 0 !important;
}
......@@ -234,4 +277,25 @@ function goDetail(item) {
width: 85%;
word-break: break-all;
}
// 状态样式
.text-primary-bg {
background: #e6f0ff;
color: #409eff;
}
.text-success-bg {
background: #e6fff7;
color: #52c41a;
}
.text-danger-bg {
background: #fff1f0;
color: #ff4d4f;
}
.text-warning-bg {
background: #fff7e6;
color: #fa8c16;
}
</style>
......
......@@ -40,129 +40,6 @@
@scrolltolower="loadMore"
>
<view class="order-list">
<!-- 有数据才循环 -->
<!-- <view v-if="list.length > 0">-->
<!-- <view-->
<!-- v-for="(item, index) in list"-->
<!-- :key="index"-->
<!-- class="order-card"-->
<!-- @click="goToDetail(item)"-->
<!-- >-->
<!-- &lt;!&ndash; 订单头部:日期 + 状态 &ndash;&gt;-->
<!-- <view class="card-header">-->
<!-- <view class="date">-->
<!-- &lt;!&ndash; <image :src="config.baseUrl_api + '/fs/static/calendar@2x.png'" mode="widthFix" style="width:30rpx;height:30rpx;"/> &ndash;&gt;-->
<!-- &lt;!&ndash; &ndash;&gt;-->
<!-- <text class="value text-primary">{{ item.wfCode || '——' }}</text>-->
<!-- </view>-->
<!-- <view class="status-tags">-->
<!-- &lt;!&ndash; <view-->
<!-- class="status-tag"-->
<!-- :class="{-->
<!-- success: item.payStatus == 1,-->
<!-- danger: item.payStatus == 2,-->
<!-- pending: item.payStatus == 0-->
<!-- }"-->
<!-- >-->
<!-- {{ getStatusText(item.payStatus) }}-->
<!-- </view> &ndash;&gt;-->
<!-- <view-->
<!-- :class="{-->
<!-- 'status-wait': item.auditStatus == 0,-->
<!-- 'status-pending': item.auditStatus == 1,-->
<!-- 'status-success': item.auditStatus == 2,-->
<!-- 'status-danger': item.auditStatus == 3-->
<!-- }"-->
<!-- class="status-tag ml-10"-->
<!-- >-->
<!-- {{ getAuditStatusText(item.auditStatus) }}-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- -->
<!-- &lt;!&ndash; 订单编号、缴费编号 &ndash;&gt;-->
<!-- <view class="info-row">-->
<!-- <text class="label">订单编号:</text>-->
<!-- <text class="value">{{ item.tradeNo || '——' }}</text>-->
<!-- </view>-->
<!-- <view v-if="item.orderName" class="info-row">-->
<!-- <text class="label">缴费名称:</text>-->
<!-- <text class="value">{{ item.orderName || '' }}</text>-->
<!-- </view>-->
<!-- &lt;!&ndash; <view class="info-row">-->
<!-- <text class="label">缴费编号:</text>-->
<!-- -->
<!-- </view> &ndash;&gt;-->
<!-- -->
<!-- &lt;!&ndash; 核心:前2tab仅展示缴费年限,后2tab仅展示人数合计 &ndash;&gt;-->
<!-- <view v-if="item.content" class="info-section flex f-j-s">-->
<!-- &lt;!&ndash; 个人/单位会员(仅缴费年限) &ndash;&gt;-->
<!-- <view v-if="currentTab === '0' || currentTab === '1'" class="single-info">-->
<!-- <view class="label">缴费年限:</view>-->
<!-- <view class="value">{{ item.content.yearCount || 0 }}</view>-->
<!-- </view>-->
<!-- &lt;!&ndash; 级位/段位考试(仅人数合计) &ndash;&gt;-->
<!-- <view v-if="currentTab === '2' || currentTab === '3' || currentTab === '4'" class="single-info">-->
<!-- <view class="label">人数合计</view>-->
<!-- <view class="value">{{ item.content.personCount || 0 }}</view>-->
<!-- </view>-->
<!-- <view class="line"></view>-->
<!-- <view class="single-info">-->
<!-- <view class="label">订单状态</view>-->
<!-- <view :class="item.effect == 1 ? 'text-success' : 'text-warning'" class="value">-->
<!-- {{ item.effect == 1 ? '已生效' : '未生效' }}-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="line"></view>-->
<!-- <view class="single-info">-->
<!-- <view class="label">缴费状态</view>-->
<!-- <view-->
<!-- :class="{-->
<!-- 'text-primary': item.payStatus == 0,-->
<!-- 'text-success': item.payStatus == 1,-->
<!-- 'text-danger': item.payStatus == 2-->
<!-- }"-->
<!-- class="value"-->
<!-- >-->
<!-- {{ item.payStatus == 0 ? '待缴费' : item.payStatus == 1 ? '缴费成功' : '订单取消' }}-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- -->
<!-- &lt;!&ndash; 费用合计 + 缴费方式 &ndash;&gt;-->
<!-- <view class="price-section">-->
<!-- <view class="price-row">-->
<!-- <text class="price-label">费用合计</text>-->
<!-- <text class="price-value">¥{{ (Number(item.price) || 0).toFixed(2) }}</text>-->
<!-- </view>-->
<!-- <view class="price-row">-->
<!-- <text class="price-label">缴费方式</text>-->
<!-- <text class="price-value">{{ item.ziZhangBu ? '对公转账' : '民生付' }}</text>-->
<!-- </view>-->
<!-- </view>-->
<!-- -->
<!-- &lt;!&ndash; 按钮组:靠右紧凑展示 &ndash;&gt;-->
<!-- <view class="btn-group">-->
<!-- &lt;!&ndash; 已缴费:申请开票/已开票(需要审核通过才能开票) &ndash;&gt;-->
<!-- <template v-if="item.payStatus == 1 && item.invoiceStatus != 1&& item.auditStatus == 2 &&item.price>0">-->
<!-- <button :disabled="item.invoiceStatus === 1" class="btn btn-view-invoice" @click="makeInvoiceFN(item)">-->
<!-- 开票-->
<!-- </button>-->
<!-- </template>-->
<!-- &lt;!&ndash; 已开票:查看发票 &ndash;&gt;-->
<!-- <template v-if="item.invoiceStatus == 1">-->
<!-- <button class="btn btn-invoice" @click.stop="viewInvoice(item)">查看发票</button>-->
<!-- </template>-->
<!-- &lt;!&ndash; 未缴费:去缴费 + 取消订单 &ndash;&gt;-->
<!-- &lt;!&ndash; <template v-if="item.payStatus == 0">-->
<!-- <button class="btn btn-cancel" @click="handleCancel(item)">取消订单</button>-->
<!-- <button class="btn btn-pay" @click="handlePay(item)">去缴费</button>-->
<!-- </template> &ndash;&gt;-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- 有数据才循环 -->
<view v-if="list.length > 0">
<view
v-for="(item, index) in list"
......
......@@ -31,10 +31,10 @@
<image class="menu-bg" :src="config.baseUrl_api + '/fs/static/img/red_bg2.png'" mode="scaleToFill"></image>
<view class="menu-item" @click="goPath('/myCenter/teamInfo')">
<view class="menu-left">
<image class="menu-icon" :src="config.baseUrl_api + '/fs/static/img/user01.png'" mode="aspectFit"></image>
<image class="menu-icon" :src="config.baseUrl_api + '/fs/static/img/user01.png'" mode="aspectFit"></image>
<text>单位信息</text>
</view>
<text class="arrow">></text>
<uni-icons type="arrowright" size="18" color="#111"></uni-icons>
</view>
<view class="menu-item" @click="goPath('/myCenter/auth')">
......@@ -42,15 +42,15 @@
<image class="menu-icon" :src="config.baseUrl_api + '/fs/static/img/user02.png'" mode="aspectFit"></image>
<text>会员认证</text>
</view>
<text class="arrow">></text>
<uni-icons type="arrowright" size="18" color="#111"></uni-icons>
</view>
<view class="menu-item" @click="goPath('/myCenter/examPointApplyList')">
<view class="menu-left">
<image class="menu-icon" :src="config.baseUrl_api + '/fs/static/img/user02.png'" mode="aspectFit"></image>
<image class="menu-icon" :src="config.baseUrl_api + '/fs/static/img/user04.png'" mode="aspectFit"></image>
<text>考点认证</text>
</view>
<text class="arrow">></text>
<uni-icons type="arrowright" size="18" color="#111"></uni-icons>
</view>
<view class="menu-item" @click="goPath('/myCenter/safe')">
......@@ -58,7 +58,7 @@
<image class="menu-icon" :src="config.baseUrl_api + '/fs/static/img/user03.png'" mode="aspectFit"></image>
<text>账号安全</text>
</view>
<text class="arrow">></text>
<uni-icons type="arrowright" size="18" color="#111"></uni-icons>
</view>
</view>
......@@ -353,13 +353,6 @@ function onTabSwitch(index, url) {
margin-right: 18rpx;
}
.arrow {
color: #111;
font-size: 42rpx;
font-weight: 400;
line-height: 1;
}
.logout-area {
position: fixed;
left: 0;
......
......@@ -67,129 +67,6 @@
@scrolltolower="loadMore"
>
<view class="order-list">
<!-- 有数据才循环 -->
<!-- <view v-if="list.length > 0">-->
<!-- <view-->
<!-- v-for="(item, index) in list"-->
<!-- :key="index"-->
<!-- class="order-card"-->
<!-- @click="goToDetail(item)"-->
<!-- >-->
<!-- &lt;!&ndash; 订单头部:日期 + 状态 &ndash;&gt;-->
<!-- <view class="card-header">-->
<!-- <view class="date">-->
<!-- &lt;!&ndash; <image :src="config.baseUrl_api + '/fs/static/calendar@2x.png'" mode="widthFix" style="width:30rpx;height:30rpx;"/> &ndash;&gt;-->
<!-- &lt;!&ndash; &ndash;&gt;-->
<!-- <text class="value text-primary">{{ item.wfCode || '——' }}</text>-->
<!-- </view>-->
<!-- <view class="status-tags">-->
<!-- &lt;!&ndash; <view-->
<!-- class="status-tag"-->
<!-- :class="{-->
<!-- success: item.payStatus == 1,-->
<!-- danger: item.payStatus == 2,-->
<!-- pending: item.payStatus == 0-->
<!-- }"-->
<!-- >-->
<!-- {{ getStatusText(item.payStatus) }}-->
<!-- </view> &ndash;&gt;-->
<!-- <view-->
<!-- :class="{-->
<!-- 'status-wait': item.auditStatus == 0,-->
<!-- 'status-pending': item.auditStatus == 1,-->
<!-- 'status-success': item.auditStatus == 2,-->
<!-- 'status-danger': item.auditStatus == 3-->
<!-- }"-->
<!-- class="status-tag ml-10"-->
<!-- >-->
<!-- {{ getAuditStatusText(item.auditStatus) }}-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- -->
<!-- &lt;!&ndash; 订单编号、缴费编号 &ndash;&gt;-->
<!-- <view class="info-row">-->
<!-- <text class="label">订单编号:</text>-->
<!-- <text class="value">{{ item.tradeNo || '——' }}</text>-->
<!-- </view>-->
<!-- <view v-if="item.orderName" class="info-row">-->
<!-- <text class="label">缴费名称:</text>-->
<!-- <text class="value">{{ item.orderName || '' }}</text>-->
<!-- </view>-->
<!-- &lt;!&ndash; <view class="info-row">-->
<!-- <text class="label">缴费编号:</text>-->
<!-- -->
<!-- </view> &ndash;&gt;-->
<!-- -->
<!-- &lt;!&ndash; 核心:前2tab仅展示缴费年限,后2tab仅展示人数合计 &ndash;&gt;-->
<!-- <view v-if="item.content" class="info-section flex f-j-s">-->
<!-- &lt;!&ndash; 个人/单位会员(仅缴费年限) &ndash;&gt;-->
<!-- <view v-if="currentTab === '0' || currentTab === '1'" class="single-info">-->
<!-- <view class="label">缴费年限:</view>-->
<!-- <view class="value">{{ item.content.yearCount || 0 }}</view>-->
<!-- </view>-->
<!-- &lt;!&ndash; 级位/段位考试(仅人数合计) &ndash;&gt;-->
<!-- <view v-if="currentTab === '2' || currentTab === '3' || currentTab === '4'" class="single-info">-->
<!-- <view class="label">人数合计</view>-->
<!-- <view class="value">{{ item.content.personCount || 0 }}</view>-->
<!-- </view>-->
<!-- <view class="line"></view>-->
<!-- <view class="single-info">-->
<!-- <view class="label">订单状态</view>-->
<!-- <view :class="item.effect == 1 ? 'text-success' : 'text-warning'" class="value">-->
<!-- {{ item.effect == 1 ? '已生效' : '未生效' }}-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="line"></view>-->
<!-- <view class="single-info">-->
<!-- <view class="label">缴费状态</view>-->
<!-- <view-->
<!-- :class="{-->
<!-- 'text-primary': item.payStatus == 0,-->
<!-- 'text-success': item.payStatus == 1,-->
<!-- 'text-danger': item.payStatus == 2-->
<!-- }"-->
<!-- class="value"-->
<!-- >-->
<!-- {{ item.payStatus == 0 ? '待缴费' : item.payStatus == 1 ? '缴费成功' : '订单取消' }}-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- -->
<!-- &lt;!&ndash; 费用合计 + 缴费方式 &ndash;&gt;-->
<!-- <view class="price-section">-->
<!-- <view class="price-row">-->
<!-- <text class="price-label">费用合计</text>-->
<!-- <text class="price-value">¥{{ (Number(item.price) || 0).toFixed(2) }}</text>-->
<!-- </view>-->
<!-- <view class="price-row">-->
<!-- <text class="price-label">缴费方式</text>-->
<!-- <text class="price-value">{{ item.ziZhangBu ? '对公转账' : '民生付' }}</text>-->
<!-- </view>-->
<!-- </view>-->
<!-- -->
<!-- &lt;!&ndash; 按钮组:靠右紧凑展示 &ndash;&gt;-->
<!-- <view class="btn-group">-->
<!-- &lt;!&ndash; 已缴费:申请开票/已开票(需要审核通过才能开票) &ndash;&gt;-->
<!-- <template v-if="item.payStatus == 1 && item.invoiceStatus != 1&& item.auditStatus == 2 &&item.price>0">-->
<!-- <button :disabled="item.invoiceStatus === 1" class="btn btn-view-invoice" @click="makeInvoiceFN(item)">-->
<!-- 开票-->
<!-- </button>-->
<!-- </template>-->
<!-- &lt;!&ndash; 已开票:查看发票 &ndash;&gt;-->
<!-- <template v-if="item.invoiceStatus == 1">-->
<!-- <button class="btn btn-invoice" @click.stop="viewInvoice(item)">查看发票</button>-->
<!-- </template>-->
<!-- &lt;!&ndash; 未缴费:去缴费 + 取消订单 &ndash;&gt;-->
<!-- &lt;!&ndash; <template v-if="item.payStatus == 0">-->
<!-- <button class="btn btn-cancel" @click="handleCancel(item)">取消订单</button>-->
<!-- <button class="btn btn-pay" @click="handlePay(item)">去缴费</button>-->
<!-- </template> &ndash;&gt;-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- 有数据才循环 -->
<view v-if="list.length > 0">
<view
v-for="(item, index) in list"
......@@ -201,8 +78,9 @@
<view class="card-header">
<view class="date">
<view class="data-header">
<text class="member-label">{{ getOrderLabel(item) }}·</text>
<text class="value ">{{ item.wfCode || '——' }} · {{ item.payType == '3' ? '对公转账' : '民生付' }}</text>
<text class="member-label">{{ getOrderLabel(item) }} ·</text>
<text class="value ml10">{{ item.wfCode || '——' }} ·</text>
<text class="pay-type ml10"> {{ item.payType == '3' ? '对公转账' : '民生付' }}</text>
</view>
<text :class="{
'status-wait': item.payStatus == 3,
......@@ -532,14 +410,18 @@ const isPersonalOrder = (item) => getRowType(item) === '0'
const isGroupOrder = (item) => getRowType(item) === '1'
const isLevelOrder = (item) => ['2', '3', '4'].includes(getRowType(item))
const isPayDisabled = (item) => {
if (isPersonalOrder(item)) return String(item?.auditStatus) !== '9'
if (isLevelOrder(item)) return String(item?.auditStatus) !== '9'
if (String(item?.payStatus) !== '0') return true
return String(item?.auditStatus) !== '0'
}
const isCancelDisabled = (item) => {
if (isPersonalOrder(item)) return String(item?.auditStatus) !== '9'
if (isLevelOrder(item)) return String(item?.auditStatus) !== '9'
if (String(item?.payStatus) !== '0') return true
return false
}
......@@ -549,6 +431,7 @@ const hasInvoice = (item) => String(item?.invoiceStatus) === '1'
const isInvoiceDisabled = (item) => {
if (hasInvoice(item)) return true
if (isPersonalOrder(item)) return String(item?.auditStatus) !== '2'
if (isLevelOrder(item)) return String(item?.payStatus) !== '1' || String(item?.auditStatus) !== '2' || Number(item?.price || 0) <= 0
return String(item?.payStatus) !== '1' || String(item?.auditStatus) !== '2' || Number(item?.price || 0) <= 0
}
......@@ -665,7 +548,7 @@ const closeDelPopup = () => {
currentOrder.value = null;
};
// 去支付:个人会员订单走 payOrder,再次支付携带 common/order 的 id;单位会员订单走 goPay。
// 去支付:个人会员订单走 payOrder,再次支付携带 common/order 的 id;单位会员订单走 goPay;级位/段位/越段考试走 paymentDetail
const handlePay = async (item) => {
if (isPayDisabled(item)) return;
const payInfoQuery = buildPayInfoQuery(item)
......@@ -685,7 +568,10 @@ const handlePay = async (item) => {
return;
}
uni.navigateTo({url: `/pages/rank/applyDetail?examId=${item.sourceId || item.id}&type=${getRowType(item)}`});
// 级位/段位/越段考试 - 跳转到支付详情页(再次支付)
uni.navigateTo({
url: `/level/paymentDetail?examId=${item.sourceId || item.id}&orderId=${item.id}`
});
};
// 申请开票
......@@ -1508,13 +1394,13 @@ const onTabSwitch = (index, url) => {
.data-header {
display: flex;
}
.member-label {
color: #c30d23;
font-size: 28rpx;
font-weight: bold;
}
.value {
color: #000;
font-size: 27rpx;
......@@ -1523,13 +1409,14 @@ const onTabSwitch = (index, url) => {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
.tradeNo {
color: #999;
font-size: 24rpx;
}
}
.pay-type {
color: #999;
font-size: 26rpx;
font-weight: normal;
}
.date-text {
color: #666;
}
......
......@@ -402,6 +402,7 @@ function checkDialogs() {
}
async function checkExamPointDialog() {
console.log('checkExamPointDialog', app.globalData.userInfo.hintFlag )
const [err, res] = await to(api.getMyRecentExam())
if (err || !res?.data) return
const status = res.data?.auditStatus
......@@ -409,6 +410,7 @@ async function checkExamPointDialog() {
app.globalData.memberInfo?.activeStatus == 1 &&
app.globalData.authenticationStatus == 2 &&
app.globalData.deptType == 6 &&
app.globalData.userInfo.hintFlag == 1 &&
app.globalData.memberInfo?.isPoints == 1) {
examPointPopup.value?.open()
}
......
......@@ -14,108 +14,63 @@
</view>
<!-- 订单列表 -->
<scroll-view
scroll-y
class="order-list-scroll"
:enhanced="true"
<scroll-view
scroll-y
class="order-list-scroll"
:enhanced="true"
:show-scrollbar="false"
:scroll-enabled="!isPopupOpen"
lower-threshold="200"
@scrolltolower="loadMore"
>
<view class="order-list">
<view v-if="list.length > 0">
<view
v-for="(item, index) in list"
:key="index"
class="order-card" @click="goToDetail(item)"
class="order-card-new"
@click="goToDetail(item)"
>
<!-- 订单头部:日期 + 审核状态 -->
<!-- 订单头部:类型 + 缴费编号 + 状态 -->
<view class="card-header">
<view class="date">
<text class="value order-no text-primary">{{ item.wfCode || '' }}</text>
<!-- <image :src="config.baseUrl_api + '/fs/static/calendar@2x.png'" v-if="item.payTime" mode="widthFix" style="width:30rpx;height:30rpx;"/>
<text class="date-text" v-if="item.payTime">{{ item.payTime }}</text> -->
</view>
<view
class="audit-status-tag"
:class="getAuditStatusClass(item.auditStatus)"
>
{{ getAuditStatusText(item.auditStatus) }}
</view>
</view>
<!-- 订单编号 -->
<view class="info-row">
<text class="label">订单编号</text>
<text class="value order-no">{{ item.tradeNo || '——' }}</text>
</view>
<view class="info-row" v-if="item.orderName">
<text class="label">缴费名称</text>
<text class="value order-no">{{ item.orderName || '——' }}</text>
</view>
<!-- 缴费编号 -->
<view class="info-row payment-code-row" v-if="item.payTime">
<text class="label">缴费时间</text>
<text class="value order-no">{{ item.payTime.slice(0,10) || '' }}</text>
<!-- <view class="payment-code" >
<text class="code-text">{{ item.payTime || '——' }}</text>
</view> -->
</view>
<view class="info-row payment-code-row" >
<text class="label">开票状态</text>
<text class="value order-no">{{ item.invoiceStatus == 1 ? '已开票' : "未开票"}}</text>
</view>
<!-- 核心信息区:缴费年限/人数 + 缴费方式 -->
<view class="info-section flex f-j-s">
<view v-if="currentTab === 0 || currentTab === 1" class="single-info">
<view class="label">缴费年限</view>
<view class="value">{{ item.content?.yearCount || 0 }}</view>
</view>
<view v-if="currentTab === 2 || currentTab === 3 || currentTab === 4" class="single-info">
<view class="label">人数合计</view>
<view class="value">{{ item.content?.personCount || 0 }}</view>
</view>
<view class="divider"></view>
<view class="single-info">
<view class="label">缴费方式</view>
<view class="value" :class="{ 'b2b-text-disabled': item.payType == '3' && item.payStatus == '2' }">
{{ item.payType == '3' ? '对公转账' : '民生付' }}
<view class="data-header">
<text class="member-label">{{ getOrderLabel(item) }} ·</text>
<text class="value ml10">{{ item.wfCode || '——' }} · </text>
<text class="pay-type"> {{ item.payType == '3' ? '对公转账' : '民生付' }}</text>
</view>
<button
v-if="item.payType == '3' && item.payStatus != '2'"
class="b2b-btn"
@click.stop="getPayWay(item)"
>
查看
</button>
</view>
<view class="divider"></view>
<view class="single-info">
<view class="label">缴费状态</view>
<view
:class="{
'text-primary': item.payStatus == 0,
'text-success': item.payStatus == 1,
'text-danger': item.payStatus == 2
<text :class="{
'status-wait': item.payStatus == 3,
'status-pending': item.payStatus == 0,
'status-success': item.payStatus == 1,
'status-danger': item.payStatus == 2
}"
class="value"
>
{{ item.payStatus == 0 ? '待缴费' : item.payStatus == 1 ? '缴费成功' : '订单取消' }}
</view>
class="status-tag">{{ getStatusText(item.payStatus) }}
</text>
</view>
</view>
<!-- 费用合计 -->
<view class="total-row">
<text class="label">费用合计</text>
<text class="amount">¥{{ (Number(item.price) || 0).toFixed(2) }}</text>
<view class="member-time">
<view class="label">
<text class="star"></text>
{{ `${filterTime(item.genTime)}${filterType(item.type)}` }}
</view>
<view class="price">
<view>{{ item.price || '0.00' }}</view>
<view v-if="item.type==0" class="person">{{ item.content?.yearCount || 0 }}</view>
<view v-if="item.type==1" class="person">{{ item.content?.yearCount || 0 }}</view>
<view v-if="item.type==2||item.type==3||item.type==4" class="person">{{ item.content?.personCount || 0 }}</view>
</view>
</view>
<!-- <view class="btn-group"><template v-if="hasInvoice(item)">
<button class="btn btn-invoice" @click.stop="viewInvoice(item)">查看发票</button>
</template>
</view> -->
</view>
</view>
<!-- 空状态 -->
<view v-else class="empty">
<image :src="config.baseUrl_api + '/fs/static/nodata.png'" class="empty-img" mode="aspectFit"></image>
<text class="empty-text">暂无订单记录</text>
</view>
......@@ -148,6 +103,46 @@
</view>
</view>
</view>
<!-- 票据信息弹窗(级位/段位/越段考试) -->
<view v-if="showInvoicePopup" class="invoice-popup-mask" @click="closeInvoicePopup">
<view class="invoice-popup-content" @click.stop>
<view class="invoice-popup-header">
<text class="invoice-popup-title">票据信息</text>
<view class="invoice-popup-close" @click="closeInvoicePopup"></view>
</view>
<view class="invoice-popup-body">
<view class="invoice-info-list">
<view class="invoice-info-row">
<view class="invoice-info-label">票据类型</view>
<view :class="{ 'vat-type': invoiceData.invoiceType == 2 }" class="invoice-type-badge">
{{ invoiceData.invoiceType == 1 ? '普通票据' : '增值税专用票据' }}
</view>
</view>
<view class="invoice-info-row">
<text class="invoice-info-label">票据抬头</text>
<text class="invoice-info-value">{{ invoiceData.invoiceBuyerName || '—' }}</text>
</view>
<view v-if="invoiceData.invoiceBuyerTaxno" class="invoice-info-row">
<text class="invoice-info-label">纳税人识别号</text>
<text class="invoice-info-value">{{ invoiceData.invoiceBuyerTaxno }}</text>
</view>
<view class="invoice-info-row">
<text class="invoice-info-label">接收邮箱</text>
<text class="invoice-info-value">{{ invoiceData.invoicePushPhone || '—' }}</text>
</view>
<view class="invoice-info-row">
<text class="invoice-info-label">申请时间</text>
<text class="invoice-info-value">{{ invoiceData.invoiceTime || '—' }}</text>
</view>
<view class="invoice-info-row">
<text class="invoice-info-label">票据金额</text>
<text class="invoice-info-value">{{ invoiceData.price || '—' }}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
......@@ -186,6 +181,8 @@ const queryParams = reactive({
const showDelPopup = ref(false);
const showCancelPopup = ref(false);
const isPopupOpen = ref(false);
const showInvoicePopup = ref(false);
const invoiceData = ref({});
// 弹窗内容
const delModalContent = ref('');
......@@ -214,6 +211,13 @@ onReachBottom(() => {
initData();
}
});
// 上拉加载更多
const loadMore = () => {
if (loading.value || !hasMore.value || isPopupOpen.value) return;
pageNum.value++;
initData();
};
const getPayWay = (item) => {
uni.redirectTo({
url: `/myCenter/transferPay?orderId=${item.id}`
......@@ -253,6 +257,74 @@ const getAuditStatusClass = (status) => {
return map[statusStr] || '';
};
const getOrderLabel = (item) => {
const map = {
0: '个人',
1: '单位',
2: '级位',
3: '段位',
4: '越段'
}
return map[item.type] || '订单'
}
const filterTime = (row) => {
if (!row) return ''
const date = new Date(row)
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${year}年${month}月${day}日`
}
const filterType = (row) => {
if (row == 0) return '个人会员缴费办理'
if (row == 1) return '单位会员缴费办理'
if (row == 2) return '级位考试办理'
if (row == 3) return '段位考试办理'
if (row == 4) return '越段考试办理'
}
const getRowType = (item) => String(item?.type ?? currentTab.value)
const isPersonalOrder = (item) => getRowType(item) === '0'
const isGroupOrder = (item) => getRowType(item) === '1'
const isLevelOrder = (item) => ['2', '3', '4'].includes(getRowType(item))
const getStatusText = (status) => {
const map = {
0: '待缴费',
1: '缴费成功',
2: '订单取消'
};
return map[status] || '';
};
const isPayDisabled = (item) => {
if (isPersonalOrder(item)) return String(item?.auditStatus) !== '9'
if (isLevelOrder(item)) return String(item?.auditStatus) !== '9'
if (String(item?.payStatus) !== '0') return true
return String(item?.auditStatus) !== '0'
}
const isCancelDisabled = (item) => {
if (isPersonalOrder(item)) return String(item?.auditStatus) !== '9'
if (isLevelOrder(item)) return String(item?.auditStatus) !== '9'
if (String(item?.payStatus) !== '0') return true
return false
}
const hasInvoice = (item) => String(item?.invoiceStatus) === '1'
const isInvoiceDisabled = (item) => {
if (hasInvoice(item)) return true
if (isPersonalOrder(item)) return String(item?.auditStatus) !== '2'
if (isLevelOrder(item)) return String(item?.payStatus) !== '1' || String(item?.auditStatus) !== '2' || Number(item?.price || 0) <= 0
return String(item?.payStatus) !== '1' || String(item?.auditStatus) !== '2' || Number(item?.price || 0) <= 0
}
// 数据请求核心方法
const initData = async () => {
loading.value = true;
......@@ -320,18 +392,64 @@ const closeDelPopup = () => {
// 去缴费
const handlePay = async (item) => {
if (item.payStatus !== 0) return;
try {
await api.goPay({ id: item.id });
uni.navigateTo({ url: `/pages/pay/pay?orderId=${item.id}` });
} catch (e) {
uni.showToast({ title: '发起支付失败', icon: 'none' });
if (isPayDisabled(item)) return;
if (isPersonalOrder(item)) {
const rangeId = item.sourceId || item.rangId || ''
uni.navigateTo({
url: `/myCenter/payOrder?orderId=${item.id}&rangeId=${rangeId}`
});
return;
}
if (isGroupOrder(item)) {
uni.navigateTo({
url: `/myCenter/goPay?orderId=${item.id}&renewYear=${item.content?.yearCount || 1}`
});
return;
}
// 级位/段位/越段考试 - 跳转到支付详情页(再次支付)
uni.navigateTo({
url: `/level/paymentDetail?examId=${item.sourceId || item.id}&orderId=${item.id}`
});
};
// 申请开票
const makeInvoiceFN = (item) => {
uni.navigateTo({ url: `/pages/invoice/apply?orderId=${item.id}amount=${item.price}` });
const ziZhangBu = item.ziZhangBu ? '&ziZhangBu=1' : '';
if (currentTab.value === 0 || currentTab.value === 1) {
uni.navigateTo({
url: `/pages/invoice/applyFeisui?orderId=${item.id}&amount=${item.price}${ziZhangBu}`
});
} else {
uni.navigateTo({
url: `/pages/invoice/apply?orderId=${item.id}&amount=${item.price}${ziZhangBu}`
});
}
};
// 查看发票
const viewInvoice = (item) => {
if (item.type === 0 || item.type === '0' || item.type === 1 || item.type === '1') {
if (item.invoiceUrl) {
const encodedUrl = encodeURIComponent(item.invoiceUrl);
uni.navigateTo({
url: `/pages/webview/webview?url=${encodedUrl}`
});
} else {
uni.showToast({ title: '暂无发票', icon: 'none' });
}
return;
}
// 级位/段位/越段考试显示发票信息弹窗
invoiceData.value = {
invoiceType: item.invoiceType || 1,
invoiceBuyerName: item.invoiceTitle || item.invoiceBuyerName || '—',
invoiceBuyerTaxno: item.invoiceTaxno || item.invoiceBuyerTaxno || '',
invoicePushPhone: item.invoiceEmail || item.invoicePushPhone || '—',
price: item.price || '-',
invoiceTime: item.invoiceTime || '—'
};
showInvoicePopup.value = true;
isPopupOpen.value = true;
};
// 取消订单
......@@ -346,7 +464,7 @@ const handleCancel = (item) => {
const confirmCancel = async () => {
if (!currentOrder.value) return;
try {
await api.cancelPay(currentOrder.value.id);
await api.cancelOrder(currentOrder.value.id);
uni.showToast({ title: '取消成功', icon: 'success' });
pageNum.value = 1;
list.value = [];
......@@ -364,6 +482,12 @@ const closeCancelPopup = () => {
currentOrder.value = null;
};
// 关闭发票弹窗
const closeInvoicePopup = () => {
showInvoicePopup.value = false;
isPopupOpen.value = false;
};
// 跳转到详情页
const goToDetail = (item) => {
const form = encodeURIComponent(JSON.stringify(item))
......@@ -386,26 +510,27 @@ const goToDetail = (item) => {
<style lang="scss" scoped>
.order-page {
background: #f5f7fa;
background: #ededf0;
min-height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;
padding-bottom: 0;
box-sizing: border-box;
&.no-scroll {
overflow: hidden;
height: 100vh;
}
}
.link {
color: #667fee;
}
// 标签栏样式
.tab-bar {
display: flex;
background: #fff;
border-bottom: 1rpx solid #eee;
flex-shrink: 0;
.tab-item {
flex: 1;
text-align: center;
......@@ -413,20 +538,20 @@ const goToDetail = (item) => {
font-size: 28rpx;
color: #666;
position: relative;
&.active {
color: #e4393c;
font-weight: 500;
color: #c30d23;
font-weight: bold;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60rpx;
width: 72rpx;
height: 4rpx;
background: linear-gradient(90deg, #FF755A, #F51722);
background: #c30d23;
border-radius: 2rpx;
}
}
......@@ -437,200 +562,35 @@ const goToDetail = (item) => {
.order-list-scroll {
flex: 1;
height: 0;
min-height: 0;
overflow: hidden;
background: #ededf0;
}
// 订单列表
.order-list {
padding: 20rpx;
.order-card {
background: #fff;
margin-bottom: 20rpx;
padding: 24rpx;
border-radius: 16rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
position: relative;
overflow: hidden;
}
}
// 卡片头部
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20rpx;
// margin-bottom: 20rpx;
// border-bottom: 1rpx solid #f0f0f0;
.date {
display: flex;
align-items: center;
// gap: 8rpx;
font-size: 28rpx;
.date-text {
color: #666;
}
}
.audit-status-tag {
font-size: 24rpx;
padding: 6rpx 18rpx;
border-radius: 22rpx;
font-weight: 500;
&.audit-success {
background: linear-gradient(135deg, #e6f7ef, #d4f5e2);
color: #1db024;
border: 1rpx solid rgba(82, 196, 26, 0.3);
}
&.audit-danger {
background: linear-gradient(135deg, #fff1f0, #ffe5e5);
color: #e8341d;
border: 1rpx solid rgba(232, 52, 29, 0.3);
}
&.audit-processing {
background: linear-gradient(135deg, #e6f3ff, #d4e9ff);
color: #1890ff;
border: 1rpx solid rgba(24, 144, 255, 0.3);
}
&.audit-pending {
background: linear-gradient(135deg, #fff7e6, #fff1cc);
color: #faad14;
border: 1rpx solid rgba(250, 173, 20, 0.3);
}
}
}
// 基础信息行
.info-row {
display: flex;
align-items: center;
margin-bottom: 16rpx;
font-size: 28rpx;
.label {
color: #666;
flex-shrink: 0;
width: 120rpx;
margin-right: 10rpx;
}
.value {
color: #333;
word-break: break-all;
&.order-no {
font-size: 26rpx;
}
}
}
// 缴费编号行
.payment-code-row {
margin-bottom: 20rpx;
}
// 缴费编号 - 醒目可点击
.payment-code {
display: inline-flex;
align-items: center;
// transition: all 0.2s ease;
&:active {
opacity: 0.8;
transform: scale(0.98);
}
.code-text {
font-size: 30rpx;
// font-weight: 600;
color: #1890ff;
// letter-spacing: 1rpx;
}
}
// 核心信息区
.info-section {
background: #f4f9fd;
display: flex;
align-items: center;
justify-content: space-around;
margin: 20rpx 0;
border-radius: 12rpx;
padding: 16rpx 0;
}
.divider {
width: 1rpx;
height: 60rpx;
background: #e5e5e5;
}
.single-info {
flex: 1;
text-align: center;
font-size: 28rpx;
.label {
color: #666;
margin-bottom: 8rpx;
}
.value {
color: #333;
font-weight: 500;
&.text-primary {
color: #597ef7;
}
&.text-success {
color: #52c41a;
}
&.text-danger {
color: #ff4d4f;
}
}
}
// 费用合计
.total-row {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 10rpx;
// border-top: 1rpx solid #f0f0f0;
font-size: 28rpx;
.label {
color: #333;
font-weight: 500;
}
.amount {
color: #e8341d;
font-weight: 700;
font-size: 36rpx;
letter-spacing: 1rpx;
}
min-height: 100%;
box-sizing: border-box;
padding: 20rpx 24rpx;
}
// 空状态
.empty {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 120rpx 0;
.empty-img {
width: 300rpx;
height: 300rpx;
}
.empty-text {
color: #666;
font-size: 28rpx;
margin-top: 20rpx;
}
}
......@@ -638,29 +598,10 @@ const goToDetail = (item) => {
.loading-tip, .no-more {
text-align: center;
padding: 20rpx 0;
color: #666;
color: #999;
font-size: 26rpx;
}
// 对公转账按钮禁用样式
.b2b-btn {
background: transparent;
border: none;
padding: 0;
font-size: 24rpx;
color: #1890ff;
line-height: 1;
margin-left: 8rpx;
&::after {
border: none;
}
}
.b2b-text-disabled {
color: #bbb;
}
// 弹窗遮罩层
.popup-mask {
position: fixed;
......@@ -718,7 +659,7 @@ const goToDetail = (item) => {
border: none;
margin: 0;
padding: 0;
&::after {
border: none;
}
......@@ -735,9 +676,273 @@ const goToDetail = (item) => {
border: none;
margin: 0;
padding: 0;
&::after {
border: none;
}
}
// 发票弹窗样式
.invoice-popup-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
}
.invoice-popup-content {
width: 600rpx;
background: #fff;
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.2);
}
.invoice-popup-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
background: linear-gradient(135deg, #AD181F 0%, #E4393C 100%);
.invoice-popup-title {
font-size: 32rpx;
font-weight: 600;
color: #fff;
}
.invoice-popup-close {
width: 44rpx;
height: 44rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: rgba(255, 255, 255, 0.8);
}
}
.invoice-popup-body {
padding: 30rpx;
}
.invoice-type-badge {
display: inline-flex;
align-items: center;
padding: 8rpx 24rpx;
background: linear-gradient(135deg, #FF755A 0%, #F51722 100%);
color: #fff;
border-radius: 30rpx;
font-size: 24rpx;
font-weight: 500;
&.vat-type {
background: linear-gradient(135deg, #6aaaf2 0%, #178cd7 100%);
}
}
.invoice-info-list {
.invoice-info-row {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 24rpx 0;
border-bottom: 1rpx dashed #eee;
&:last-child {
border-bottom: none;
}
.invoice-info-label {
font-size: 26rpx;
color: #999;
flex-shrink: 0;
}
.invoice-info-value {
font-size: 26rpx;
color: #333;
text-align: right;
word-break: break-all;
max-width: 340rpx;
}
}
}
// 新订单卡片样式 (与 daoGuanOrder 一致)
.order-card-new {
background: #fff;
margin-bottom: 22rpx;
padding: 22rpx 18rpx 18rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
border-radius: 18rpx;
display: flex;
flex-direction: column;
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 10rpx;
.date {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
gap: 8rpx;
font-size: 26rpx;
.data-header {
display: flex;
}
.member-label {
color: #c30d23;
font-size: 28rpx;
font-weight: bold;
}
.value {
color: #000;
font-size: 27rpx;
font-weight: bold;
max-width: 460rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.pay-type {
color: #999;
font-size: 26rpx;
font-weight: normal;
margin-left: 10rpx;
}
.status-tag {
font-size: 24rpx;
color: #999;
&.status-wait {
color: #597ef7;
}
&.status-pending {
color: #faad14;
}
&.status-success {
color: #52c41a;
}
&.status-danger {
color: #ff4d4f;
}
}
}
}
.member-time {
width: 100%;
display: flex;
justify-content: space-between;
padding-bottom: 4rpx;
.label {
max-width: 480rpx;
color: #555;
font-size: 26rpx;
font-weight: 700;
line-height: 1.4;
.star {
color: #777;
font-size: 26rpx;
}
}
.price {
min-width: 130rpx;
color: #333;
font-size: 26rpx;
font-weight: 500;
text-align: right;
.person {
font-size: 24rpx;
color: #999;
text-align: right;
}
}
}
}
// 按钮组
.btn-group {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 16rpx;
width: 100%;
margin-top: 16rpx;
flex-wrap: wrap;
.btn {
width: 140rpx;
height: 48rpx;
line-height: 48rpx;
padding: 0;
border-radius: 10rpx;
font-size: 24rpx;
white-space: nowrap;
font-weight: bold;
border: none;
background: transparent;
text-align: center;
margin: 0;
&::after {
border: none;
display: none;
}
&.btn-invoice {
background: #fff;
color: #c30d23;
border: 1rpx solid #c30d23;
}
&.btn-view-invoice {
color: #c30d23;
border: 1rpx solid #c30d23;
}
&.btn-cancel {
background: #fff;
color: #666;
border: 1rpx solid #ccc;
}
&.btn-pay {
color: #c30d23;
border: 1rpx solid #c30d23;
}
&.disabled,
&[disabled] {
background: #f5f5f5 !important;
color: #b8b8b8 !important;
border: 1rpx solid #e1e1e1 !important;
opacity: 1;
pointer-events: none;
}
}
}
</style>
\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!