Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
ztx_wx_gzt
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
9a38e7d0
authored
2026-04-27 11:57:25 +0800
by
张猛
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
开票
1 parent
11fa3904
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
46 deletions
common/api.js
config.js
myCenter/order.vue
pages/invoice/apply.vue
personal/order.vue
common/api.js
View file @
9a38e7d
...
...
@@ -1780,7 +1780,7 @@ export function cancelPay(id) {
export
const
outputInvoiceNo
=
(
data
)
=>
{
return
request
({
url
:
`/common/order/outputInvoiceNo/
${
data
.
id
}
`
,
url
:
`/common/order/outputInvoiceNo/
${
data
.
id
}
?taxno=
${
data
.
taxno
}
&phone=
${
data
.
phone
}
&name=
${
data
.
name
}
&invoiceType=
${
data
.
invoiceType
}
&amount=
${
data
.
amount
}
`
,
method
:
'post'
,
params
:
data
})
...
...
config.js
View file @
9a38e7d
// dev
// const baseUrl_api = 'http://192.168.1.125:8787'
const
baseUrl_api
=
'https://tk001.wxjylt.com/stage-api/'
const
baseUrl_api
=
'http://47.98.186.233:8787'
// const baseUrl_api = 'https://tk001.wxjylt.com/stage-api/'
const
loginImage_api
=
'https://tk001.wxjylt.com/stage-api'
const
payUrl
=
'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do'
...
...
myCenter/order.vue
View file @
9a38e7d
<
template
>
<view
class=
"order-page"
:class=
"
{ 'no-scroll': isPopupOpen }
">
<view
:class=
"
{ 'no-scroll': isPopupOpen }" class="order-page
">
<!-- 顶部标签栏 -->
<view
class=
"tab-bar"
>
<view
v-for=
"(tab, index) in tabs"
:key=
"index"
class=
"tab-item"
:class=
"
{ active: currentTab === tab.type }"
class="tab-item"
@click="switchTab(tab.type)"
>
{{
tab
.
name
}}
...
...
@@ -15,12 +15,12 @@
<!-- 订单列表 -->
<scroll-view
scroll-y
class=
"order-list-scroll"
:show-scrollbar=
"false"
:scroll-enabled=
"!isPopupOpen"
@
scrolltolower=
"loadMore"
:show-scrollbar=
"false"
class=
"order-list-scroll"
lower-threshold=
"200"
scroll-y
@
scrolltolower=
"loadMore"
>
<view
class=
"order-list"
>
<!-- 有数据才循环 -->
...
...
@@ -36,7 +36,7 @@
<view
class=
"date"
>
<!--
<image
:src=
"config.baseUrl_api + '/fs/static/calendar@2x.png'"
mode=
"widthFix"
style=
"width:30rpx;height:30rpx;"
/>
-->
<!-- -->
<text
class=
"value text-primary"
>
{{
item
.
wfCode
||
'——'
}}
</text>
<text
class=
"value text-primary"
>
{{
item
.
wfCode
||
'——'
}}
</text>
</view>
<view
class=
"status-tags"
>
<!--
<view
...
...
@@ -50,13 +50,13 @@
{{
getStatusText
(
item
.
payStatus
)
}}
</view>
-->
<view
class=
"status-tag ml-10"
: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>
...
...
@@ -68,7 +68,7 @@
<text
class=
"label"
>
订单编号:
</text>
<text
class=
"value"
>
{{
item
.
tradeNo
||
'——'
}}
</text>
</view>
<view
class=
"info-row"
v-if=
"item.orderName
"
>
<view
v-if=
"item.orderName"
class=
"info-row
"
>
<text
class=
"label"
>
缴费名称:
</text>
<text
class=
"value"
>
{{
item
.
orderName
||
''
}}
</text>
</view>
...
...
@@ -78,22 +78,22 @@
</view>
-->
<!-- 核心:前2tab仅展示缴费年限,后2tab仅展示人数合计 -->
<view
class=
"info-section flex f-j-s"
v-if=
"item.content
"
>
<view
v-if=
"item.content"
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
class=
"line"
v-if=
"currentTab === '0' || currentTab === '1'
"
></view>
<view
v-if=
"currentTab === '0' || currentTab === '1'"
class=
"line
"
></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=
"line"
v-if=
"currentTab === '2' || currentTab === '3' || currentTab === '4'
"
></view>
<view
v-if=
"currentTab === '2' || currentTab === '3' || currentTab === '4'"
class=
"line
"
></view>
<view
class=
"single-info"
>
<view
class=
"label"
>
订单状态
</view>
<view
class=
"value"
:class=
"item.effect == 1 ? 'text-success' : 'text-warning'
"
>
<view
:class=
"item.effect == 1 ? 'text-success' : 'text-warning'"
class=
"value
"
>
{{
item
.
effect
==
1
?
'已生效'
:
'未生效'
}}
</view>
</view>
...
...
@@ -115,7 +115,7 @@
<view
class=
"btn-group"
>
<!-- 已缴费:申请开票/已开票(需要审核通过才能开票) -->
<template
v-if=
"item.payStatus == 1 && item.invoiceStatus != 1&& item.auditStatus == 2"
>
<button
class=
"btn btn-view-invoice"
@
click=
"makeInvoiceFN(item)"
:disabled=
"item.invoiceStatus === 1
"
>
<button
:disabled=
"item.invoiceStatus === 1"
class=
"btn btn-view-invoice"
@
click=
"makeInvoiceFN(item)
"
>
开票
</button>
</
template
>
...
...
@@ -134,13 +134,13 @@
<!-- 空状态 -->
<view
v-else
class=
"empty"
>
<image
class=
"empty-img"
mode=
"aspectFit"
:src=
"config.baseUrl_api + '/fs/static/nodata.png'
"
></image>
<image
:src=
"config.baseUrl_api + '/fs/static/nodata.png'"
class=
"empty-img"
mode=
"aspectFit
"
></image>
<text
class=
"empty-text"
>
暂无订单记录
</text>
</view>
<!-- 加载/无更多提示 -->
<view
class=
"loading-tip"
v-if=
"loading
"
>
加载中...
</view>
<view
class=
"no-more"
v-if=
"!loading && !hasMore && list.length
"
>
没有更多了
</view>
<view
v-if=
"loading"
class=
"loading-tip
"
>
加载中...
</view>
<view
v-if=
"!loading && !hasMore && list.length"
class=
"no-more
"
>
没有更多了
</view>
</view>
</scroll-view>
...
...
@@ -157,7 +157,7 @@
<view
class=
"invoice-info-list"
>
<view
class=
"invoice-info-row"
>
<view
class=
"invoice-info-label"
>
发票类型
</view>
<view
class=
"invoice-type-badge"
:class=
"{ 'vat-type': invoiceData.invoiceType == 2 }
"
>
<view
:class=
"{ 'vat-type': invoiceData.invoiceType == 2 }"
class=
"invoice-type-badge
"
>
{{ invoiceData.invoiceType == 1 ? '普通发票' : '增值税专用发票' }}
</view>
</view>
...
...
@@ -165,7 +165,7 @@
<text
class=
"invoice-info-label"
>
发票抬头
</text>
<text
class=
"invoice-info-value"
>
{{ invoiceData.invoiceBuyerName || '—' }}
</text>
</view>
<view
class=
"invoice-info-row"
v-if=
"invoiceData.invoiceBuyerTaxno
"
>
<view
v-if=
"invoiceData.invoiceBuyerTaxno"
class=
"invoice-info-row
"
>
<text
class=
"invoice-info-label"
>
纳税人识别号
</text>
<text
class=
"invoice-info-value"
>
{{ invoiceData.invoiceBuyerTaxno }}
</text>
</view>
...
...
@@ -173,6 +173,14 @@
<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>
...
...
@@ -205,17 +213,17 @@
</template>
<
script
setup
>
import
{
ref
,
reactive
,
onMounted
,
computed
}
from
'vue'
;
import
{
import
{
ref
,
reactive
,
onMounted
,
computed
}
from
'vue'
;
import
{
onShow
,
onLoad
}
from
'@dcloudio/uni-app'
}
from
'@dcloudio/uni-app'
import
*
as
api
from
'@/common/api.js'
import
config
from
'@/config.js'
// 获取deptType值(初始值为0,在onMounted中设置实际值)
const
deptType
=
ref
(
0
);
const
goToDetail
=
(
item
)
=>
{
uni
.
navigateTo
({
url
:
`/pages/rank/applyDetail?examId=
${
item
.
sourceId
||
item
.
id
}
&type=
${
queryParams
.
type
}
`
});
uni
.
navigateTo
({
url
:
`/pages/rank/applyDetail?examId=
${
item
.
sourceId
||
item
.
id
}
&type=
${
queryParams
.
type
}
`
});
}
// 标签栏配置(根据deptType动态生成)
...
...
@@ -226,25 +234,25 @@ const tabs = computed(() => {
if
(
dt
===
6
)
{
console
.
log
(
'返回3个tab: 个人会员、单位会员、级位考试'
);
return
[
{
name
:
'个人会员'
,
type
:
'0'
},
{
name
:
'单位会员'
,
type
:
'1'
},
{
name
:
'级位考试'
,
type
:
'2'
}
{
name
:
'个人会员'
,
type
:
'0'
},
{
name
:
'单位会员'
,
type
:
'1'
},
{
name
:
'级位考试'
,
type
:
'2'
}
];
}
else
if
(
dt
===
2
)
{
console
.
log
(
'返回3个tab: 单位会员、段位考试、越段考试'
);
return
[
// { name: '单位会员', type: '1' },
{
name
:
'段位考试'
,
type
:
'3'
},
{
name
:
'越段考试'
,
type
:
'4'
}
{
name
:
'段位考试'
,
type
:
'3'
},
{
name
:
'越段考试'
,
type
:
'4'
}
];
}
else
{
console
.
log
(
'返回默认5个tab, dt值为:'
,
dt
);
return
[
{
name
:
'个人会员'
,
type
:
'0'
},
{
name
:
'单位会员'
,
type
:
'1'
},
{
name
:
'级位考试'
,
type
:
'2'
},
{
name
:
'段位考试'
,
type
:
'3'
},
{
name
:
'越段考试'
,
type
:
'4'
}
{
name
:
'个人会员'
,
type
:
'0'
},
{
name
:
'单位会员'
,
type
:
'1'
},
{
name
:
'级位考试'
,
type
:
'2'
},
{
name
:
'段位考试'
,
type
:
'3'
},
{
name
:
'越段考试'
,
type
:
'4'
}
];
}
});
...
...
@@ -287,7 +295,7 @@ onLoad((option) => {
deptType
.
value
=
Number
(
app
.
globalData
?.
deptType
||
0
);
const
firstType
=
tabs
.
value
[
0
]?.
type
??
'0'
;
currentTab
.
value
=
option
.
type
||
firstType
;
queryParams
.
type
=
option
.
type
||
firstType
;
queryParams
.
type
=
option
.
type
||
firstType
;
initData
();
});
...
...
@@ -379,7 +387,7 @@ const initData = async () => {
hasMore
.
value
=
res
.
rows
.
length
===
pageSize
.
value
;
}
catch
(
e
)
{
console
.
error
(
'订单加载异常:'
,
e
);
uni
.
showToast
({
title
:
'加载失败'
,
icon
:
'none'
});
uni
.
showToast
({
title
:
'加载失败'
,
icon
:
'none'
});
hasMore
.
value
=
false
;
}
finally
{
loading
.
value
=
false
;
...
...
@@ -399,13 +407,13 @@ const confirmDel = async () => {
if
(
!
currentOrder
.
value
)
return
;
try
{
await
api
.
deleteOrder
(
currentOrder
.
value
.
id
);
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'success'
});
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'success'
});
pageNum
.
value
=
1
;
list
.
value
=
[];
initData
();
closeDelPopup
();
}
catch
(
e
)
{
uni
.
showToast
({
title
:
'删除失败'
,
icon
:
'error'
});
uni
.
showToast
({
title
:
'删除失败'
,
icon
:
'error'
});
}
};
...
...
@@ -420,10 +428,10 @@ 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
}
`
});
await
api
.
goPay
({
id
:
item
.
id
});
uni
.
navigateTo
({
url
:
`/pages/pay/pay?orderId=
${
item
.
id
}
`
});
}
catch
(
e
)
{
uni
.
showToast
({
title
:
'发起支付失败'
,
icon
:
'none'
});
uni
.
showToast
({
title
:
'发起支付失败'
,
icon
:
'none'
});
}
};
...
...
@@ -447,7 +455,9 @@ const viewInvoice = (item) => {
invoiceType
:
item
.
invoiceType
||
1
,
invoiceBuyerName
:
item
.
invoiceTitle
||
item
.
invoiceBuyerName
||
'—'
,
invoiceBuyerTaxno
:
item
.
invoiceTaxno
||
item
.
invoiceBuyerTaxno
||
''
,
invoicePushPhone
:
item
.
invoiceEmail
||
item
.
invoicePushPhone
||
'—'
invoicePushPhone
:
item
.
invoiceEmail
||
item
.
invoicePushPhone
||
'—'
,
price
:
item
.
price
||
'-'
,
invoiceTime
:
item
.
invoiceTime
||
'—'
};
showInvoicePopup
.
value
=
true
;
isPopupOpen
.
value
=
true
;
...
...
@@ -472,13 +482,13 @@ const confirmCancel = async () => {
if
(
!
currentOrder
.
value
)
return
;
try
{
await
api
.
cancelPay
(
currentOrder
.
value
.
id
);
uni
.
showToast
({
title
:
'取消成功'
,
icon
:
'success'
});
uni
.
showToast
({
title
:
'取消成功'
,
icon
:
'success'
});
pageNum
.
value
=
1
;
list
.
value
=
[];
initData
();
closeCancelPopup
();
}
catch
(
e
)
{
uni
.
showToast
({
title
:
'取消失败'
,
icon
:
'error'
});
uni
.
showToast
({
title
:
'取消失败'
,
icon
:
'error'
});
}
};
...
...
@@ -665,11 +675,13 @@ const closeCancelPopup = () => {
justify-content
:
space-around
;
margin
:
20
rpx
0
;
}
.line
{
.line
{
width
:
1
rpx
;
height
:
90%
;
background
:
#eee
;
}
.single-info
{
padding
:
16
rpx
20
rpx
;
border-radius
:
8
rpx
;
...
...
@@ -750,10 +762,12 @@ const closeCancelPopup = () => {
background
:
transparent
;
text-align
:
center
;
margin
:
0
;
&::after
{
border
:
none
;
display
:
none
;
//
关键:隐藏伪元素
}
&
.btn-delete
{
background
:
#fff
;
color
:
#e4393c
;
...
...
@@ -879,6 +893,7 @@ const closeCancelPopup = () => {
border
:
none
;
}
}
.code-text
{
font-size
:
28
rpx
;
font-weight
:
600
;
...
...
pages/invoice/apply.vue
View file @
9a38e7d
...
...
@@ -186,6 +186,7 @@ const handleSubmit = async () => {
uni
.
navigateBack
();
},
1500
);
}
catch
(
error
)
{
console
.
log
(
error
)
submitting
.
value
=
false
;
// 错误已由 request.js 处理
}
finally
{
...
...
personal/order.vue
View file @
9a38e7d
...
...
@@ -141,6 +141,7 @@ const queryParams = reactive({
pageNum
:
1
,
pageSize
:
10
,
type
:
'0'
,
// 0表示个人会员
subType
:
'1'
,
//0道馆 1个人
// queryType: '1',
// payStatus: '',
perId
:
''
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment