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
c18acc6e
authored
2026-04-27 12:05:24 +0800
by
lttnew
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
https://code.itechtop.cn/yangyang/ztx_wx_gzt
2 parents
3915c951
9a38e7d0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
200 additions
and
178 deletions
common/api.js
config.js
myCenter/order.vue
pages/invoice/apply.vue
personal/goPay_per.vue
personal/order.vue
common/api.js
View file @
c18acc6
...
...
@@ -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 @
c18acc6
// 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 @
c18acc6
<
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 @
c18acc6
...
...
@@ -6,9 +6,9 @@
<text
class=
"label"
>
发票类型
</text>
<view
class=
"type-select"
>
<view
:class=
"
{ active: form.invoiceType === '2' }"
class="type-option"
:class=
"
{ active: form.invoiceType === '1' }"
@click="form.invoiceType = '1'"
@click="form.invoiceType = '2'"
>
<view
class=
"type-icon"
>
个
</view>
<view
class=
"type-info"
>
...
...
@@ -17,9 +17,10 @@
</view>
</view>
<view
v-if=
"type==0"
:class=
"
{ active: form.invoiceType === '1' }"
class="type-option"
:class=
"
{ active: form.invoiceType === '2' }"
@click="form.invoiceType = '2'"
@click="form.invoiceType = '1'"
>
<view
class=
"type-icon enterprise"
>
企
</view>
<view
class=
"type-info"
>
...
...
@@ -34,21 +35,21 @@
<view
class=
"form-item column"
>
<text
class=
"label"
>
发票抬头
</text>
<input
class=
"input"
v-model=
"form.name"
class=
"input"
placeholder=
"请输入公司全称或个人姓名"
/>
<text
class=
"hint"
>
请确保发票抬头与公司营业执照或个人身份证上的名称一致。
</text>
</view>
<!-- 纳税人识别号(企业才显示) -->
<view
class=
"form-item column"
v-if=
"form.invoiceType === '2'
"
>
<view
v-if=
"form.invoiceType === '1'"
class=
"form-item column
"
>
<text
class=
"label"
>
纳税人识别号
</text>
<input
class=
"input"
v-model=
"form.taxno"
placeholder=
"请输入纳税人识别号
"
class=
"input
"
maxlength=
"20"
placeholder=
"请输入纳税人识别号"
/>
<text
class=
"hint"
>
企业税务登记证上的号码,一般为 15、18 或 20 位
</text>
</view>
...
...
@@ -78,8 +79,8 @@
<view
class=
"form-item column"
>
<text
class=
"label"
>
接收邮箱号码
</text>
<input
class=
"input"
v-model=
"form.phone"
class=
"input"
placeholder=
"请输入接收发票的邮箱号码"
type=
"text"
/>
...
...
@@ -89,7 +90,7 @@
<!-- 提交按钮 -->
<view
class=
"btn-wrap"
>
<view
class=
"submit-btn"
:class=
"
{ loading: submitting }
" @click="handleSubmit">
<view
:class=
"
{ loading: submitting }" class="submit-btn
" @click="handleSubmit">
{{
submitting
?
'提交中...'
:
'提交申请'
}}
</view>
</view>
...
...
@@ -97,15 +98,15 @@
</
template
>
<
script
setup
>
import
{
ref
,
reactive
}
from
'vue'
;
import
{
onLoad
}
from
'@dcloudio/uni-app'
;
import
{
outputInvoiceNo
}
from
'@/common/api.js'
;
import
{
ref
,
reactive
}
from
'vue'
;
import
{
onLoad
}
from
'@dcloudio/uni-app'
;
import
{
outputInvoiceNo
}
from
'@/common/api.js'
;
const
submitting
=
ref
(
false
);
const
type
=
ref
(
0
)
//1个人订单只开普票
// 表单数据(与PC端字段完全对齐)
const
form
=
reactive
({
invoiceType
:
'
1'
,
// 1=个人 2=企业
invoiceType
:
'
2'
,
// 1=企业 2=个人
deliveryMethod
:
'1'
,
// 接收方式:1=电子发票
name
:
''
,
// 发票抬头
taxno
:
''
,
// 纳税人识别号
...
...
@@ -123,43 +124,45 @@ onLoad((options) => {
if
(
options
.
invoiceType
)
{
form
.
invoiceType
=
options
.
invoiceType
;
}
type
.
value
=
options
.
type
??
0
console
.
log
(
options
)
});
// 表单验证
const
validateForm
=
()
=>
{
// 发票抬头校验
if
(
!
form
.
name
)
{
uni
.
showToast
({
title
:
'请输入发票抬头'
,
icon
:
'none'
});
uni
.
showToast
({
title
:
'请输入发票抬头'
,
icon
:
'none'
});
return
false
;
}
if
(
form
.
name
.
length
<
2
||
form
.
name
.
length
>
100
)
{
uni
.
showToast
({
title
:
'发票抬头长度在2-100个字符之间'
,
icon
:
'none'
});
uni
.
showToast
({
title
:
'发票抬头长度在2-100个字符之间'
,
icon
:
'none'
});
return
false
;
}
// 企业必须填纳税人识别号
if
(
form
.
invoiceType
===
'
2
'
&&
!
form
.
taxno
)
{
uni
.
showToast
({
title
:
'请输入纳税人识别号'
,
icon
:
'none'
});
if
(
form
.
invoiceType
===
'
1
'
&&
!
form
.
taxno
)
{
uni
.
showToast
({
title
:
'请输入纳税人识别号'
,
icon
:
'none'
});
return
false
;
}
// 纳税人识别号格式校验(同PC)
if
(
form
.
invoiceType
===
'
2
'
)
{
if
(
form
.
invoiceType
===
'
1
'
)
{
const
taxReg
=
/^
[
A-Z0-9
]{15}
$|^
[
A-Z0-9
]{18}
$|^
[
A-Z0-9
]{20}
$/
;
if
(
!
taxReg
.
test
(
form
.
taxno
))
{
uni
.
showToast
({
title
:
'纳税人识别号格式不正确'
,
icon
:
'none'
});
uni
.
showToast
({
title
:
'纳税人识别号格式不正确'
,
icon
:
'none'
});
return
false
;
}
}
// 邮箱校验
if
(
!
form
.
phone
)
{
uni
.
showToast
({
title
:
'请输入接收邮箱'
,
icon
:
'none'
});
uni
.
showToast
({
title
:
'请输入接收邮箱'
,
icon
:
'none'
});
return
false
;
}
const
phoneReg
=
/^
[
a-zA-Z0-9._%+-
]
+@
[
a-zA-Z0-9.-
]
+
\.[
a-zA-Z
]{2,}
$/
;
if
(
!
phoneReg
.
test
(
form
.
phone
))
{
uni
.
showToast
({
title
:
'请输入正确的邮箱地址'
,
icon
:
'none'
});
uni
.
showToast
({
title
:
'请输入正确的邮箱地址'
,
icon
:
'none'
});
return
false
;
}
...
...
@@ -183,6 +186,7 @@ const handleSubmit = async () => {
uni
.
navigateBack
();
},
1500
);
}
catch
(
error
)
{
console
.
log
(
error
)
submitting
.
value
=
false
;
// 错误已由 request.js 处理
}
finally
{
...
...
personal/goPay_per.vue
View file @
c18acc6
...
...
@@ -5,13 +5,15 @@
<view
class=
"yearRow"
>
<view
class=
"label"
>
缴费年限
</view>
<view
class=
"control"
>
<image
class=
"icon"
@
click=
"minusYear"
:src=
"config.baseUrl_api + '/fs/static/dd_02.png'"
mode=
"widthFix"
v-if=
"form.payYear > 1"
></image>
<image
class=
"icon"
:src=
"config.baseUrl_api + '/fs/static/dd_02_g.png'"
mode=
"widthFix"
v-else
></image>
<image
v-if=
"form.payYear > 1"
:src=
"config.baseUrl_api + '/fs/static/dd_02.png'"
class=
"icon"
mode=
"widthFix"
@
click=
"minusYear"
></image>
<image
v-else
:src=
"config.baseUrl_api + '/fs/static/dd_02_g.png'"
class=
"icon"
mode=
"widthFix"
></image>
<text
class=
"num"
>
{{
form
.
payYear
}}
年
</text>
<image
class=
"icon"
:src=
"config.baseUrl_api + '/fs/static/btn_03.png'"
mode=
"widthFix"
@
click=
"plusYear"
v-if=
"form.payYear
< 5
"
></image>
<image
class=
"icon"
:src=
"config.baseUrl_api + '/fs/static/btn_03_g.png'"
mode=
"widthFix"
v-else
></image>
<image
v-if=
"form.payYear
< 5
"
:src=
"config.baseUrl_api + '/fs/static/btn_03.png'"
class=
"icon"
mode=
"widthFix"
@
click=
"plusYear"
></image>
<image
v-else
:src=
"config.baseUrl_api + '/fs/static/btn_03_g.png'"
class=
"icon"
mode=
"widthFix"
></image>
</view>
</view>
</view>
...
...
@@ -27,9 +29,9 @@
<view
class=
"payRow "
>
<radio-group
@
change=
"onPayTypeChange"
>
<label
class=
"radioItem"
>
<radio
value=
"1"
:checked=
"payType === '1'"
class=
"custom-radio"
/>
<radio
:checked=
"payType === '1'"
class=
"custom-radio"
value=
"1"
/>
<view
class=
"payInfo"
>
<image
class=
"icon"
:src=
"config.baseUrl_api + '/fs/static/min.png'
"
mode=
"widthFix"
></image>
<image
:src=
"config.baseUrl_api + '/fs/static/min.png'"
class=
"icon
"
mode=
"widthFix"
></image>
<text>
民生付
</text>
</view>
</label>
...
...
@@ -44,42 +46,43 @@
</view>
<view
class=
"bottomBtn"
>
<button
class=
"payBtn"
@
click=
"handelPay"
:loading=
"isPaying
"
>
立即支付 ¥
{{
memberTotalFee
}}
</button>
<button
:loading=
"isPaying"
class=
"payBtn"
@
click=
"handelPay
"
>
立即支付 ¥
{{
memberTotalFee
}}
</button>
</view>
</view>
</
template
>
<
script
setup
>
import
{
import
{
ref
,
computed
,
onMounted
}
from
'vue'
import
{
}
from
'vue'
import
{
onLoad
}
from
'@dcloudio/uni-app'
;
import
to
from
'await-to-js'
import
*
as
api
from
'@/common/api.js'
import
{
}
from
'@dcloudio/uni-app'
;
import
to
from
'await-to-js'
import
*
as
api
from
'@/common/api.js'
import
{
minShengPay
}
from
'@/common/pay.js'
}
from
'@/common/pay.js'
import
config
from
'@/config.js'
const
form
=
ref
({
const
form
=
ref
({
payYear
:
1
})
})
// 支付方式
const
payType
=
ref
(
'1'
)
const
isPaying
=
ref
(
false
)
// 支付方式
const
payType
=
ref
(
'1'
)
const
isPaying
=
ref
(
false
)
// 费用与优惠
const
memberFee
=
ref
(
0
)
const
memberTotalFee
=
computed
(()
=>
{
// 费用与优惠
const
memberFee
=
ref
(
0
)
const
memberTotalFee
=
computed
(()
=>
{
return
memberFee
.
value
*
form
.
value
.
payYear
})
onLoad
((
options
)
=>
{
})
onLoad
((
options
)
=>
{
if
(
options
.
baseFormData
)
{
const
data
=
JSON
.
parse
(
decodeURIComponent
(
options
.
baseFormData
))
form
.
value
=
{
...
...
@@ -89,30 +92,29 @@ import config from '@/config.js'
}
// 初始化接口
getMyMemberCertUnitFeeApi
()
})
})
// 减年限
const
minusYear
=
()
=>
{
// 减年限
const
minusYear
=
()
=>
{
if
(
form
.
value
.
payYear
>
1
)
{
form
.
value
.
payYear
--
}
}
}
// 加年限(最大 5 年)
const
plusYear
=
()
=>
{
// 加年限(最大 5 年)
const
plusYear
=
()
=>
{
if
(
form
.
value
.
payYear
<
5
)
{
form
.
value
.
payYear
++
}
}
}
// 支付方式切换
const
onPayTypeChange
=
(
e
)
=>
{
// 支付方式切换
const
onPayTypeChange
=
(
e
)
=>
{
payType
.
value
=
e
.
detail
.
value
}
}
const
handelPay
=
async
()
=>
{
const
handelPay
=
async
()
=>
{
if
(
memberTotalFee
.
value
<=
0
)
{
uni
.
showToast
({
title
:
'支付金额异常'
,
...
...
@@ -127,13 +129,13 @@ import config from '@/config.js'
mask
:
true
})
isPaying
.
value
=
true
form
.
value
.
validityDate
=
undefined
// 拼接完整参数
const
postData
=
{
...
form
.
value
,
payYear
:
form
.
value
.
payYear
,
payType
:
payType
.
value
,
totalFee
:
memberTotalFee
.
value
totalFee
:
memberTotalFee
.
value
,
}
// 创建订单
...
...
@@ -172,95 +174,94 @@ import config from '@/config.js'
uni
.
redirectTo
({
url
:
`/personal/sucPay?orderId=
${
orderRes
.
data
.
orderId
}
`
})
}
}
// 获取会员费
async
function
getMyMemberCertUnitFeeApi
()
{
// 获取会员费
async
function
getMyMemberCertUnitFeeApi
()
{
const
res
=
await
api
.
getZtxFeeConfig
()
memberFee
.
value
=
Number
(
res
.
data
.
personMemberFee
||
1500
)
}
}
</
script
>
<
style
scoped
>
.container
{
.container
{
min-height
:
100vh
;
background-color
:
#f7f7f7
;
}
}
.content
{
.content
{
padding
:
20
rpx
20
rpx
120
rpx
;
}
}
.card
{
.card
{
background
:
#fff
;
border-radius
:
8
rpx
;
padding
:
25
rpx
20
rpx
;
margin-bottom
:
20
rpx
;
}
}
.yearRow
{
.yearRow
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
20
rpx
;
}
}
.yearRow
.label
{
.yearRow
.label
{
font-size
:
28
rpx
;
color
:
#333
;
}
}
.yearRow
.control
{
.yearRow
.control
{
display
:
flex
;
align-items
:
center
;
}
}
.control
image
{
.control
image
{
width
:
50
rpx
;
height
:
50
rpx
;
}
}
.yearRow
.num
{
.yearRow
.num
{
font-size
:
28
rpx
;
color
:
#333
;
min-width
:
80
rpx
;
text-align
:
center
;
margin
:
0
10
rpx
;
}
}
.row
{
.row
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
}
.row
.label
{
.row
.label
{
font-size
:
28
rpx
;
color
:
#333
;
}
}
.row
.value
{
.row
.value
{
font-size
:
30
rpx
;
color
:
#C4121B
;
font-weight
:
500
;
}
}
.hintRow
{
.hintRow
{
display
:
flex
;
align-items
:
flex-start
;
font-size
:
24
rpx
;
line-height
:
1.4
;
}
}
.hintRow
.hintText
{
.hintRow
.hintText
{
color
:
#FF8124
;
flex
:
1
;
margin-top
:
10
rpx
;
}
}
.deductRow
{
.deductRow
{
background
:
#fff
;
padding
:
20
rpx
20
rpx
;
display
:
flex
;
...
...
@@ -268,48 +269,48 @@ import config from '@/config.js'
align-items
:
center
;
margin-bottom
:
10
rpx
;
border-radius
:
8
rpx
;
}
}
.deductRow
.label
{
.deductRow
.label
{
font-size
:
28
rpx
;
color
:
#333
;
}
}
.deductRow
.value
{
.deductRow
.value
{
font-size
:
30
rpx
;
color
:
#C4121B
;
}
}
.payRow
{
.payRow
{
background
:
#fff
;
border-radius
:
8
rpx
;
padding
:
20
rpx
20
rpx
;
margin-bottom
:
20
rpx
;
}
}
.radioItem
{
.radioItem
{
display
:
flex
;
align-items
:
center
;
}
}
.payInfo
{
.payInfo
{
display
:
flex
;
align-items
:
center
;
margin-left
:
15
rpx
;
}
}
.payInfo
.icon
{
.payInfo
.icon
{
width
:
40
rpx
;
height
:
40
rpx
;
margin-right
:
10
rpx
;
}
}
.payInfo
text
{
.payInfo
text
{
font-size
:
28
rpx
;
color
:
#333
;
}
}
.totalRow
{
.totalRow
{
background
:
#fff
;
border-radius
:
8
rpx
;
padding
:
20
rpx
20
rpx
;
...
...
@@ -317,20 +318,20 @@ import config from '@/config.js'
justify-content
:
space-between
;
align-items
:
center
;
margin-top
:
10
rpx
;
}
}
.totalRow
.label
{
.totalRow
.label
{
font-size
:
28
rpx
;
color
:
#333
;
}
}
.redBig
{
.redBig
{
font-size
:
32
rpx
;
color
:
#C4121B
;
font-weight
:
bold
;
}
}
.bottomBtn
{
.bottomBtn
{
position
:
fixed
;
bottom
:
0
;
left
:
0
;
...
...
@@ -338,9 +339,9 @@ import config from '@/config.js'
padding
:
20
rpx
20
rpx
;
background
:
#fff
;
border-top
:
1
rpx
solid
#eee
;
}
}
.payBtn
{
.payBtn
{
width
:
100%
;
height
:
88
rpx
;
line-height
:
88
rpx
;
...
...
@@ -350,30 +351,30 @@ import config from '@/config.js'
font-size
:
32
rpx
;
text-align
:
center
;
border
:
none
;
}
}
.payBtn
[
disabled
]
{
.payBtn
[
disabled
]
{
background-color
:
#ccc
;
color
:
#999
;
}
}
.red
{
.red
{
color
:
#C4121B
;
}
}
.icon
{
.icon
{
width
:
30px
;
}
}
::v-deep
.custom-radio
.wx-radio-input
{
::v-deep
.custom-radio
.wx-radio-input
{
width
:
30
rpx
;
height
:
30
rpx
;
border-radius
:
50%
;
border
:
2
rpx
solid
#ccc
;
}
}
::v-deep
.custom-radio
.wx-radio-input.wx-radio-input-checked
{
::v-deep
.custom-radio
.wx-radio-input.wx-radio-input-checked
{
border-color
:
#C4121B
!important
;
background
:
#C4121B
!important
;
}
}
</
style
>
...
...
personal/order.vue
View file @
c18acc6
...
...
@@ -141,6 +141,7 @@ const queryParams = reactive({
pageNum
:
1
,
pageSize
:
10
,
type
:
'0'
,
// 0表示个人会员
subType
:
'1'
,
//0道馆 1个人
// queryType: '1',
// payStatus: '',
perId
:
''
...
...
@@ -269,7 +270,7 @@ const handlePay = async (item) => {
// 申请开票
const
makeInvoiceFN
=
(
item
)
=>
{
uni
.
navigateTo
({
url
:
`/pages/invoice/apply?orderId=
${
item
.
id
}
amount=
${
item
.
price
}
`
});
uni
.
navigateTo
({
url
:
`/pages/invoice/apply?orderId=
${
item
.
id
}
&amount=
${
item
.
price
}
&type=1
`
});
};
// 取消订单
...
...
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