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
a3ab5d87
authored
2026-05-20 18:14:22 +0800
by
lttnew
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
去支付
1 parent
10c86415
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
44 deletions
common/api.js
config.js
myCenter/payOrder.vue
pages/index/daoGuanOrder.vue
personalVip/payment.vue
common/api.js
View file @
a3ab5d8
...
...
@@ -1702,14 +1702,16 @@ export function goPay(params) {
// 再次支付
export
function
payForOrder
(
params
)
{
let
url
=
`/common/order/payForOrder/
${
params
.
id
}
`
const
queryParams
=
[]
if
(
params
.
id
)
queryParams
.
push
(
`id=
${
params
.
id
}
`
)
if
(
params
.
payType
)
queryParams
.
push
(
`payType=
${
params
.
payType
}
`
)
if
(
queryParams
.
length
>
0
)
{
url
+=
'?'
+
queryParams
.
join
(
'&'
)
}
export
function
payForOrder
(
params
)
{
let
url
=
`/common/order/payForOrder/
${
params
.
id
}
`
const
queryParams
=
[]
if
(
params
.
id
)
queryParams
.
push
(
`id=
${
encodeURIComponent
(
params
.
id
)}
`
)
if
(
params
.
payType
)
queryParams
.
push
(
`payType=
${
encodeURIComponent
(
params
.
payType
)}
`
)
if
(
params
.
contactPerson
)
queryParams
.
push
(
`contactPerson=
${
encodeURIComponent
(
params
.
contactPerson
)}
`
)
if
(
params
.
contactTel
)
queryParams
.
push
(
`contactTel=
${
encodeURIComponent
(
params
.
contactTel
)}
`
)
if
(
queryParams
.
length
>
0
)
{
url
+=
'?'
+
queryParams
.
join
(
'&'
)
}
return
request
({
url
,
method
:
'post'
,
...
...
config.js
View file @
a3ab5d8
// dev
const
baseUrl_api
=
'http://192.168.1.
134
:8787'
const
baseUrl_api
=
'http://192.168.1.
222
:8787'
// 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'
...
...
myCenter/payOrder.vue
View file @
a3ab5d8
This diff is collapsed.
Click to expand it.
pages/index/daoGuanOrder.vue
View file @
a3ab5d8
...
...
@@ -17,7 +17,7 @@
v-model=
"queryParams.wfCode"
:input-border=
"false"
class=
"search-input"
placeholder=
"输入
订单编号/名称/单位/日期
"
placeholder=
"输入
缴费编号查询
"
placeholderStyle=
"font-size:28rpx;color:#999"
prefixIcon=
"search"
@
blur=
"handelSearch"
...
...
@@ -229,31 +229,15 @@
</view>
</view>
</view>
<!-- 缴费方式 -->
<!-- <view class="pay-way-row">
<text class="pay-way-label">缴费方式:</text>
<text class="pay-way-value">{{ item.payType == '3' ? '对公转账' : '民生付' }}</text>
</view> -->
<!-- 按钮组:靠右展示 -->
<view
class=
"btn-group"
>
<!-- 已缴费:申请开票/已开票(需要审核通过才能开票) -->
<
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
.
stop=
"makeInvoiceFN(item)"
>
申请开票
</button>
</
template
>
<!-- 已申请票据:查看票据 -->
<
template
v-if=
"item.invoiceStatus == 1"
>
<button
class=
"btn btn-invoice"
@
click
.
stop=
"viewInvoice(item)"
>
查看票据
</button>
<button
:class=
"{ disabled: isPayDisabled(item) }"
:disabled=
"isPayDisabled(item)"
class=
"btn btn-pay"
@
click
.
stop=
"handlePay(item)"
>
支付
</button>
<button
:class=
"{ disabled: isCancelDisabled(item) }"
:disabled=
"isCancelDisabled(item)"
class=
"btn btn-cancel"
@
click
.
stop=
"handleCancel(item)"
>
取消订单
</button>
<
template
v-if=
"!hasInvoice(item)"
>
<button
:class=
"
{ disabled: isInvoiceDisabled(item) }" :disabled="isInvoiceDisabled(item)" class="btn btn-view-invoice" @click.stop="makeInvoiceFN(item)">申请开票
</button>
</
template
>
<!-- 未缴费:去缴费 + 取消订单 -->
<
template
v-if=
"item.payStatus == 0"
>
<!-- 支付按钮:仅 auditStatus==='0' && payStatus==='0' 时可点 -->
<button
:disabled=
"!(item.auditStatus == '0' && item.payStatus == 0)"
class=
"btn btn-pay"
@
click
.
stop=
"handlePay(item)"
>
去支付
</button>
<button
:disabled=
"item.payStatus != 0"
class=
"btn btn-cancel"
@
click
.
stop=
"handleCancel(item)"
>
取消订单
</button>
<
template
v-else
>
<button
class=
"btn btn-invoice"
@
click
.
stop=
"viewInvoice(item)"
>
查看发票
</button>
</
template
>
</view>
</view>
...
...
@@ -542,6 +526,46 @@ const filterType = (row) => {
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
isPayDisabled
=
(
item
)
=>
{
if
(
isPersonalOrder
(
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
(
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'
return
String
(
item
?.
payStatus
)
!==
'1'
||
String
(
item
?.
auditStatus
)
!==
'2'
||
Number
(
item
?.
price
||
0
)
<=
0
}
const
encodeQueryValue
=
(
value
)
=>
encodeURIComponent
(
value
||
''
)
const
getPayName
=
(
item
)
=>
{
return
item
?.
orderName
||
item
?.
content
?.
orderName
||
item
?.
payDeptName
||
item
?.
payMemName
||
item
?.
content
?.
payDeptName
||
item
?.
content
?.
payMemName
||
item
?.
memberName
||
item
?.
content
?.
memberName
||
''
}
const
getAssoName
=
(
item
)
=>
{
return
item
?.
assoName
||
item
?.
associateName
||
item
?.
associationName
||
item
?.
aname
||
item
?.
parentName
||
item
?.
content
?.
assoName
||
item
?.
content
?.
associateName
||
item
?.
content
?.
associationName
||
item
?.
content
?.
aname
||
item
?.
content
?.
parentName
||
''
}
const
buildPayInfoQuery
=
(
item
)
=>
{
return
`payName=
${
encodeQueryValue
(
getPayName
(
item
))}
&assoName=
${
encodeQueryValue
(
getAssoName
(
item
))}
`
}
// 数据请求核心方法
const
initData
=
async
()
=>
{
...
...
@@ -617,7 +641,7 @@ const confirmDel = async () => {
const
goToDetail
=
(
item
)
=>
{
const
form
=
encodeURIComponent
(
JSON
.
stringify
(
item
))
switch
(
currentTab
.
value
)
{
switch
(
getRowType
(
item
)
)
{
case
'1'
:
uni
.
navigateTo
({
url
:
`/group/groupOrderDetail?form=
${
form
}
`
});
break
;
...
...
@@ -641,13 +665,27 @@ const closeDelPopup = () => {
currentOrder
.
value
=
null
;
};
// 去
缴费 - 跳转到单位会员支付页面
// 去
支付:个人会员订单走 payOrder,再次支付携带 common/order 的 id;单位会员订单走 goPay。
const
handlePay
=
async
(
item
)
=>
{
if
(
item
.
payStatus
!==
0
)
return
;
// 跳转到单位会员支付页面
uni
.
navigateTo
({
url
:
`/myCenter/goPay?orderId=
${
item
.
id
}
&renewYear=
${
item
.
content
?.
yearCount
||
1
}
`
});
if
(
isPayDisabled
(
item
))
return
;
const
payInfoQuery
=
buildPayInfoQuery
(
item
)
if
(
isPersonalOrder
(
item
))
{
const
rangeId
=
item
.
sourceId
||
item
.
rangId
||
''
uni
.
navigateTo
({
url
:
`/myCenter/payOrder?orderId=
${
item
.
id
}
&rangeId=
${
rangeId
}
&
${
payInfoQuery
}
`
});
return
;
}
if
(
isGroupOrder
(
item
))
{
uni
.
navigateTo
({
url
:
`/myCenter/goPay?orderId=
${
item
.
id
}
&renewYear=
${
item
.
content
?.
yearCount
||
1
}
&
$
{
payInfoQuery
}
`
});
return;
}
uni.navigateTo({url: `
/
pages
/
rank
/
applyDetail
?
examId
=
$
{
item
.
sourceId
||
item
.
id
}
&
type
=
$
{
getRowType
(
item
)}
`});
};
// 申请开票
...
...
@@ -715,7 +753,7 @@ const closeInvoiceWebview = () => {
// 取消订单
const handleCancel = (item) => {
currentOrder.value = item;
cancelModalContent.value = `
是否确认取消
订单编号为
"${item.tradeNo
}"
的订单?
`;
cancelModalContent.value = `
是否确认取消
缴费编号为
"${item.wfCode
}"
的订单?
`;
showCancelPopup.value = true;
isPopupOpen.value = true;
};
...
...
@@ -1204,9 +1242,13 @@ const onTabSwitch = (index, url) => {
//
border
:
none
;
border
:
1
rpx
solid
#c30d23
;
}
&
:disabled
{
opacity
:
0.6
;
&
.disabled
,
&[
disabled
]
{
background
:
#f5f5f5
!important
;
color
:
#b8b8b8
!important
;
border
:
1
rpx
solid
#e1e1e1
!important
;
opacity
:
1
;
pointer-events
:
none
;
}
}
...
...
personalVip/payment.vue
View file @
a3ab5d8
This diff is collapsed.
Click to expand it.
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