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
cfd67a49
authored
2026-05-28 11:31:48 +0800
by
lttnew
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
道馆
1 parent
fa6b8d25
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
30 deletions
myCenter/order.vue
pages/index/daoGuanOrder.vue
pages/invoice/apply.vue
pages/invoice/applyFeisui.vue
myCenter/order.vue
View file @
cfd67a4
...
...
@@ -497,7 +497,7 @@ const handleReIssue = async (item) => {
if
(
isReIssueDisabled
(
item
))
return
openConfirmPopup
({
order
:
item
,
content
:
'开票后30天内仅可
重开一次,是否确认重新开票
?原发票将作废且无法恢复。'
,
content
:
'开票后30天内仅可
换开一次,是否确认换开
?原发票将作废且无法恢复。'
,
action
:
confirmReIssue
}
)
}
...
...
pages/index/daoGuanOrder.vue
View file @
cfd67a4
...
...
@@ -110,18 +110,18 @@
<
/view
>
<
view
class
=
"btn-group"
>
<
template
v
-
if
=
"isZtxRole"
>
<
button
:
class
=
"
{
disabled
:
isRefundDisabled
(
item
)
}
" :disabled="
isRefundDisable
d
(
item
)
" class="
btn
btn
-
danger
" @click.stop="
handleRefund
(
item
)
">退款</button>
<
button
v
-
if
=
"canShowRefun
d(item)"
class
=
"btn btn-danger"
@
click
.
stop
=
"handleRefund(item)"
>
退款
<
/button
>
<
/template
>
<
template
v
-
else
>
<button
:class="
{
disabled
:
isPayDisabled
(
item
)
}
" :disabled="
isPayDisabled
(
item
)
" class="
btn
btn
-
pay
" @click.stop="
handlePay
(
item
)
">去支付</button>
<button v-if="
canShowCancel
(
item
)
"
:class="
{
disabled
:
isCancelDisabled
(
item
)
}
" :disabled="
isCancelDisabled
(
item
)
"
class="
btn
btn
-
cancel
" @click.stop="
handleCancel
(
item
)
">取消订单</button>
<
button
v
-
if
=
"canShowPay
(item)"
class
=
"btn btn-pay"
@
click
.
stop
=
"handlePay(item)"
>
去支付
<
/button
>
<
button
v
-
if
=
"canShowCancel(item)"
class
=
"btn btn-cancel"
@
click
.
stop
=
"handleCancel(item)"
>
取消订单
<
/button
>
<
template
v
-
if
=
"canShowInvoiceApply(item)"
>
<button
:class="
{
disabled
:
isInvoiceDisabled
(
item
)
}
" :disabled="
isInvoiceDisabled
(
item
)
"
class="
btn
btn
-
view
-
invoice
" @click.stop="
makeInvoiceFN
(
item
)
">申请开票</button>
<
button
class
=
"btn btn-view-invoice"
@
click
.
stop
=
"makeInvoiceFN(item)"
>
申请开票
<
/button
>
<
/template
>
<
template
v
-
if
=
"hasInvoice(item)"
>
<
button
class
=
"btn btn-invoice"
@
click
.
stop
=
"viewInvoice(item)"
>
查看发票
<
/button
>
<
/template
>
<button v-if="
canShowReIssue
(
item
)
"
:class="
{
disabled
:
isReIssueDisabled
(
item
)
}
" :disabled="
isReIssueDisabled
(
item
)
" class="
btn
btn
-
danger
" @click.stop="
handleReIssue
(
item
)
">重新开票
</button>
<
button
v
-
if
=
"canShowReIssue(item)"
class
=
"btn btn-danger"
@
click
.
stop
=
"handleReIssue(item)"
>
换开
<
/button
>
<
/template
>
<
/view
>
<
/view
>
...
...
@@ -377,12 +377,13 @@ const isLevelOrder = (item) => ['2', '3', '4'].includes(getRowType(item))
const
canShowCancel
=
(
item
)
=>
{
if
(
isPersonalOrder
(
item
))
{
return
String
(
item
?.
auditStatus
)
===
'9'
||
String
(
item
?.
payStatus
)
!==
'0'
return
!
isCancelDisabled
(
item
)
}
if
(
isGroupOrder
(
item
))
return
String
(
item
?.
auditStatus
)
===
'0'
return
String
(
item
?.
auditStatus
)
===
'9'
return
!
isCancelDisabled
(
item
)
}
const
canShowPay
=
(
item
)
=>
!
isPayDisabled
(
item
)
const
isPayDisabled
=
(
item
)
=>
{
if
(
isPersonalOrder
(
item
)
||
isLevelOrder
(
item
))
{
return
String
(
item
?.
auditStatus
)
!==
'9'
||
String
(
item
?.
payStatus
)
!==
'0'
...
...
@@ -401,7 +402,7 @@ const isCancelDisabled = (item) => {
const
hasInvoice
=
(
item
)
=>
String
(
item
?.
invoiceStatus
)
===
'1'
const
canShowInvoiceApply
=
(
item
)
=>
!
hasInvoice
(
item
)
const
canShowInvoiceApply
=
(
item
)
=>
!
isInvoiceDisabled
(
item
)
const
isInvoiceDisabled
=
(
item
)
=>
{
if
(
hasInvoice
(
item
))
return
true
...
...
@@ -409,22 +410,24 @@ const isInvoiceDisabled = (item) => {
return
String
(
item
?.
payStatus
)
!==
'1'
||
String
(
item
?.
auditStatus
)
!==
'2'
||
Number
(
item
?.
price
||
0
)
<=
0
}
const
isWithin
Calendar
Month
=
(
dateValue
)
=>
{
const
isWithin
One
Month
=
(
dateValue
)
=>
{
if
(
!
dateValue
)
return
false
const
date
=
dayjs
(
dateValue
)
if
(
!
date
.
isValid
())
return
false
return
date
.
isSame
(
dayjs
(),
'month'
)
const
diffDays
=
dayjs
().
diff
(
date
,
'day'
)
return
diffDays
>=
0
&&
diffDays
<=
30
}
const
canShowReIssue
=
(
item
)
=>
{
if
(
isZtxRole
.
value
)
return
false
if
(
isGroupOrder
(
item
))
return
String
(
item
?.
auditStatus
)
!==
'0'
return
String
(
item
?.
auditStatus
)
!==
'9'
if
(
String
(
item
?.
payType
)
===
'3'
)
return
false
if
(
isGroupOrder
(
item
))
return
String
(
item
?.
auditStatus
)
!==
'0'
&&
!
isReIssueDisabled
(
item
)
return
String
(
item
?.
auditStatus
)
!==
'9'
&&
!
isReIssueDisabled
(
item
)
}
const
isReIssueDisabled
=
(
item
)
=>
{
return
String
(
item
?.
invoiceStatus
)
!==
'1'
||
!
isWithin
Calendar
Month
(
item
?.
invoiceTime
)
||
!
isWithin
One
Month
(
item
?.
invoiceTime
)
||
String
(
item
?.
payStatus
)
===
'4'
||
String
(
item
?.
redFlag
)
===
'1'
||
String
(
item
?.
payType
)
===
'3'
...
...
@@ -432,6 +435,8 @@ const isReIssueDisabled = (item) => {
const
isRefundDisabled
=
(
item
)
=>
String
(
item
?.
payStatus
)
!==
'1'
||
String
(
item
?.
invoiceStatus
)
===
'1'
const
canShowRefund
=
(
item
)
=>
!
isRefundDisabled
(
item
)
const
encodeQueryValue
=
(
value
)
=>
encodeURIComponent
(
value
||
''
)
const
getPayName
=
(
item
)
=>
{
...
...
@@ -597,15 +602,22 @@ const makeInvoiceFN = (item) => {
needRefresh
.
value
=
true
;
// 根据tab类型决定跳转页面:个人/单位会员开非税票,级位/段位/越段考试开增值税票
let
url
=
''
;
const
ziZhangBu
=
item
.
ziZhangBu
?
'&ziZhangBu=1'
:
''
;
const
isB2B
=
String
(
item
.
payType
)
===
'3'
const
ziZhangBu
=
isB2B
?
'&ziZhangBu=1'
:
''
;
const
payTypeQuery
=
`&payType=${encodeURIComponent(item.payType || '')
}
`
const
isPersonalSelfPay
=
!
isB2B
&&
isPersonalOrder
(
item
)
&&
String
(
item
.
subType
)
===
'1'
const
rawInvoiceTitle
=
item
.
orderName
||
item
.
content
?.
orderName
||
item
.
memberName
||
''
const
personalInvoiceQuery
=
isPersonalSelfPay
?
`&personalInvoice=1&invoiceTitle=${encodeURIComponent(String(rawInvoiceTitle).split('-')[0] || '')
}
`
:
''
if
(
currentTab
.
value
===
'0'
||
currentTab
.
value
===
'1'
)
{
// 个人/单位会员 - 非税开票
//
如果是對公转账(ziZhangBu有值),只能开企业发票
//
对公转账只能开企业发票;个人自行缴纳会员费只能开个人票。
url
=
`/pages/invoice/applyFeisui?orderId=${item.id
}
&amount=${item.price
}
${
ziZhangBu
}
`
;
url
=
`/pages/invoice/applyFeisui?orderId=${item.id
}
&amount=${item.price
}
${
payTypeQuery
}
${ziZhangBu
}
${personalInvoiceQuery
}
`
;
}
else
{
// 级位/段位/越段考试 - 增值税开票
url
=
`/pages/invoice/apply?orderId=${item.id
}
&amount=${item.price
}
${ziZhangBu
}
`
;
url
=
`/pages/invoice/apply?orderId=${item.id
}
&amount=${item.price
}
${
payTypeQuery
}
${
ziZhangBu
}
`
;
}
uni
.
navigateTo
({
url
}
);
}
;
...
...
@@ -614,7 +626,7 @@ const handleReIssue = async (item) => {
if
(
isReIssueDisabled
(
item
))
return
openConfirmPopup
({
order
:
item
,
content
:
'开票后
30天内仅可重开一次,是否确认重新开票
?原发票将作废且无法恢复。'
,
content
:
'开票后
1个月内仅可换开一次,是否确认换开
?原发票将作废且无法恢复。'
,
action
:
confirmReIssue
}
)
}
...
...
@@ -630,7 +642,7 @@ const confirmReIssue = async (item) => {
makeInvoiceFN
({
...
item
,
invoiceStatus
:
'0'
}
)
}
catch
(
e
)
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'
重新开票
失败'
,
icon
:
'none'
}
)
uni
.
showToast
({
title
:
'
换开
失败'
,
icon
:
'none'
}
)
}
}
...
...
pages/invoice/apply.vue
View file @
cfd67a4
...
...
@@ -77,7 +77,7 @@
<input
v-model=
"form.name"
class=
"input"
:disabled=
"!showPersonalType && form.
invoiceT
ype === '1'"
:disabled=
"!showPersonalType && form.
t
ype === '1'"
:placeholder=
"form.type === '1' ? '请输入公司全称' : '请输入发票抬头'"
/>
<text
class=
"hint"
>
请确保发票抬头与公司营业执照或个人身份证上的名称一致。
</text>
...
...
@@ -89,7 +89,7 @@
<input
v-model=
"form.taxno"
class=
"input"
:disabled=
"!showPersonalType && form.
invoiceT
ype === '1'"
:disabled=
"!showPersonalType && form.
t
ype === '1'"
maxlength=
"20"
placeholder=
"请输入纳税人识别号"
/>
...
...
@@ -177,8 +177,10 @@ onLoad((options) => {
form
.
amount
=
options
.
amount
;
}
// 个人订单只开普票,隐藏个人/非企业选项
if
(
options
.
ziZhangBu
==
'1'
)
{
const
isB2B
=
options
.
payType
?
options
.
payType
==
'3'
:
options
.
ziZhangBu
==
'1'
// 对公转账只能开企业发票,单位信息自动读取且不可修改。
if
(
isB2B
)
{
showPersonalType
.
value
=
false
form
.
type
=
'1'
form
.
invoiceType
=
'1'
...
...
@@ -187,7 +189,7 @@ console.log(333,options)
// 自动填充发票抬头和纳税人识别号
const
memberInfo
=
app
.
globalData
.
memberInfo
if
(
memberInfo
&&
options
.
ziZhangBu
==
'1'
)
{
if
(
memberInfo
&&
isB2B
)
{
form
.
name
=
memberInfo
.
companyName
||
''
form
.
taxno
=
memberInfo
.
creditCode
||
''
}
...
...
@@ -560,4 +562,4 @@ function closeSuccessModal() {
.success-btn
::after
{
border
:
none
;
}
</
style
>
\ No newline at end of file
</
style
>
...
...
pages/invoice/applyFeisui.vue
View file @
cfd67a4
...
...
@@ -134,14 +134,16 @@ onLoad((options) => {
}
// 如果是对公转账(ziZhangBu有值),默认只能开企业发票,隐藏个人选项
if
(
options
.
ziZhangBu
==
'1'
)
{
const
isB2B
=
options
.
payType
?
options
.
payType
==
'3'
:
options
.
ziZhangBu
==
'1'
// 对公转账默认只能开企业发票,隐藏个人选项。
if
(
isB2B
)
{
form
.
type
=
'0'
showIndividualType
.
value
=
false
}
else
{
showIndividualType
.
value
=
true
}
if
(
memberInfo
&&
options
.
ziZhangBu
==
'1'
)
{
if
(
memberInfo
&&
isB2B
)
{
form
.
name
=
memberInfo
.
companyName
||
''
form
.
taxno
=
memberInfo
.
creditCode
||
''
}
...
...
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