9a38e7d0 by 张猛

开票

1 parent 11fa3904
...@@ -1780,7 +1780,7 @@ export function cancelPay(id) { ...@@ -1780,7 +1780,7 @@ export function cancelPay(id) {
1780 1780
1781 export const outputInvoiceNo = (data) => { 1781 export const outputInvoiceNo = (data) => {
1782 return request({ 1782 return request({
1783 url: `/common/order/outputInvoiceNo/${data.id}`, 1783 url: `/common/order/outputInvoiceNo/${data.id}?taxno=${data.taxno}&phone=${data.phone}&name=${data.name}&invoiceType=${data.invoiceType}&amount=${data.amount}`,
1784 method: 'post', 1784 method: 'post',
1785 params: data 1785 params: data
1786 }) 1786 })
......
1 // dev 1 // dev
2 // const baseUrl_api = 'http://192.168.1.125:8787' 2 // const baseUrl_api = 'http://192.168.1.125:8787'
3 const baseUrl_api = 'https://tk001.wxjylt.com/stage-api/' 3 const baseUrl_api = 'http://47.98.186.233:8787'
4 // const baseUrl_api = 'https://tk001.wxjylt.com/stage-api/'
4 const loginImage_api = 'https://tk001.wxjylt.com/stage-api' 5 const loginImage_api = 'https://tk001.wxjylt.com/stage-api'
5 const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' 6 const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do'
6 7
......
1 <template> 1 <template>
2 <view class="order-page" :class="{ 'no-scroll': isPopupOpen }"> 2 <view :class="{ 'no-scroll': isPopupOpen }" class="order-page">
3 <!-- 顶部标签栏 --> 3 <!-- 顶部标签栏 -->
4 <view class="tab-bar"> 4 <view class="tab-bar">
5 <view 5 <view
6 v-for="(tab, index) in tabs" 6 v-for="(tab, index) in tabs"
7 :key="index" 7 :key="index"
8 class="tab-item"
9 :class="{ active: currentTab === tab.type }" 8 :class="{ active: currentTab === tab.type }"
9 class="tab-item"
10 @click="switchTab(tab.type)" 10 @click="switchTab(tab.type)"
11 > 11 >
12 {{ tab.name }} 12 {{ tab.name }}
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
15 15
16 <!-- 订单列表 --> 16 <!-- 订单列表 -->
17 <scroll-view 17 <scroll-view
18 scroll-y
19 class="order-list-scroll"
20 :show-scrollbar="false"
21 :scroll-enabled="!isPopupOpen" 18 :scroll-enabled="!isPopupOpen"
22 @scrolltolower="loadMore" 19 :show-scrollbar="false"
20 class="order-list-scroll"
23 lower-threshold="200" 21 lower-threshold="200"
22 scroll-y
23 @scrolltolower="loadMore"
24 > 24 >
25 <view class="order-list"> 25 <view class="order-list">
26 <!-- 有数据才循环 --> 26 <!-- 有数据才循环 -->
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
36 <view class="date"> 36 <view class="date">
37 <!-- <image :src="config.baseUrl_api + '/fs/static/calendar@2x.png'" mode="widthFix" style="width:30rpx;height:30rpx;"/> --> 37 <!-- <image :src="config.baseUrl_api + '/fs/static/calendar@2x.png'" mode="widthFix" style="width:30rpx;height:30rpx;"/> -->
38 <!-- --> 38 <!-- -->
39 <text class="value text-primary" >{{ item.wfCode || '——' }}</text> 39 <text class="value text-primary">{{ item.wfCode || '——' }}</text>
40 </view> 40 </view>
41 <view class="status-tags"> 41 <view class="status-tags">
42 <!-- <view 42 <!-- <view
...@@ -50,13 +50,13 @@ ...@@ -50,13 +50,13 @@
50 {{ getStatusText(item.payStatus) }} 50 {{ getStatusText(item.payStatus) }}
51 </view> --> 51 </view> -->
52 <view 52 <view
53 class="status-tag ml-10"
54 :class="{ 53 :class="{
55 'status-wait': item.auditStatus == 0, 54 'status-wait': item.auditStatus == 0,
56 'status-pending': item.auditStatus == 1, 55 'status-pending': item.auditStatus == 1,
57 'status-success': item.auditStatus == 2, 56 'status-success': item.auditStatus == 2,
58 'status-danger': item.auditStatus == 3 57 'status-danger': item.auditStatus == 3
59 }" 58 }"
59 class="status-tag ml-10"
60 > 60 >
61 {{ getAuditStatusText(item.auditStatus) }} 61 {{ getAuditStatusText(item.auditStatus) }}
62 </view> 62 </view>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
68 <text class="label">订单编号:</text> 68 <text class="label">订单编号:</text>
69 <text class="value">{{ item.tradeNo || '——' }}</text> 69 <text class="value">{{ item.tradeNo || '——' }}</text>
70 </view> 70 </view>
71 <view class="info-row" v-if="item.orderName"> 71 <view v-if="item.orderName" class="info-row">
72 <text class="label">缴费名称:</text> 72 <text class="label">缴费名称:</text>
73 <text class="value">{{ item.orderName || '' }}</text> 73 <text class="value">{{ item.orderName || '' }}</text>
74 </view> 74 </view>
...@@ -78,22 +78,22 @@ ...@@ -78,22 +78,22 @@
78 </view> --> 78 </view> -->
79 79
80 <!-- 核心:前2tab仅展示缴费年限,后2tab仅展示人数合计 --> 80 <!-- 核心:前2tab仅展示缴费年限,后2tab仅展示人数合计 -->
81 <view class="info-section flex f-j-s" v-if="item.content"> 81 <view v-if="item.content" class="info-section flex f-j-s">
82 <!-- 个人/单位会员(仅缴费年限) --> 82 <!-- 个人/单位会员(仅缴费年限) -->
83 <view v-if="currentTab === '0' || currentTab === '1'" class="single-info"> 83 <view v-if="currentTab === '0' || currentTab === '1'" class="single-info">
84 <view class="label">缴费年限:</view> 84 <view class="label">缴费年限:</view>
85 <view class="value">{{ item.content.yearCount || 0 }}</view> 85 <view class="value">{{ item.content.yearCount || 0 }}</view>
86 </view> 86 </view>
87 <view class="line" v-if="currentTab === '0' || currentTab === '1'"></view> 87 <view v-if="currentTab === '0' || currentTab === '1'" class="line"></view>
88 <!-- 级位/段位考试(仅人数合计) --> 88 <!-- 级位/段位考试(仅人数合计) -->
89 <view v-if="currentTab === '2' || currentTab === '3' || currentTab === '4'" class="single-info"> 89 <view v-if="currentTab === '2' || currentTab === '3' || currentTab === '4'" class="single-info">
90 <view class="label">人数合计</view> 90 <view class="label">人数合计</view>
91 <view class="value">{{ item.content.personCount || 0 }}</view> 91 <view class="value">{{ item.content.personCount || 0 }}</view>
92 </view> 92 </view>
93 <view class="line" v-if="currentTab === '2' || currentTab === '3' || currentTab === '4'"></view> 93 <view v-if="currentTab === '2' || currentTab === '3' || currentTab === '4'" class="line"></view>
94 <view class="single-info"> 94 <view class="single-info">
95 <view class="label">订单状态</view> 95 <view class="label">订单状态</view>
96 <view class="value" :class="item.effect == 1 ? 'text-success' : 'text-warning'"> 96 <view :class="item.effect == 1 ? 'text-success' : 'text-warning'" class="value">
97 {{ item.effect == 1 ? '已生效' : '未生效' }} 97 {{ item.effect == 1 ? '已生效' : '未生效' }}
98 </view> 98 </view>
99 </view> 99 </view>
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
115 <view class="btn-group"> 115 <view class="btn-group">
116 <!-- 已缴费:申请开票/已开票(需要审核通过才能开票) --> 116 <!-- 已缴费:申请开票/已开票(需要审核通过才能开票) -->
117 <template v-if="item.payStatus == 1 && item.invoiceStatus != 1&& item.auditStatus == 2"> 117 <template v-if="item.payStatus == 1 && item.invoiceStatus != 1&& item.auditStatus == 2">
118 <button class="btn btn-view-invoice" @click="makeInvoiceFN(item)" :disabled="item.invoiceStatus === 1"> 118 <button :disabled="item.invoiceStatus === 1" class="btn btn-view-invoice" @click="makeInvoiceFN(item)">
119 开票 119 开票
120 </button> 120 </button>
121 </template> 121 </template>
...@@ -134,13 +134,13 @@ ...@@ -134,13 +134,13 @@
134 134
135 <!-- 空状态 --> 135 <!-- 空状态 -->
136 <view v-else class="empty"> 136 <view v-else class="empty">
137 <image class="empty-img" mode="aspectFit" :src="config.baseUrl_api + '/fs/static/nodata.png'"></image> 137 <image :src="config.baseUrl_api + '/fs/static/nodata.png'" class="empty-img" mode="aspectFit"></image>
138 <text class="empty-text">暂无订单记录</text> 138 <text class="empty-text">暂无订单记录</text>
139 </view> 139 </view>
140 140
141 <!-- 加载/无更多提示 --> 141 <!-- 加载/无更多提示 -->
142 <view class="loading-tip" v-if="loading">加载中...</view> 142 <view v-if="loading" class="loading-tip">加载中...</view>
143 <view class="no-more" v-if="!loading && !hasMore && list.length">没有更多了</view> 143 <view v-if="!loading && !hasMore && list.length" class="no-more">没有更多了</view>
144 </view> 144 </view>
145 </scroll-view> 145 </scroll-view>
146 146
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
157 <view class="invoice-info-list"> 157 <view class="invoice-info-list">
158 <view class="invoice-info-row"> 158 <view class="invoice-info-row">
159 <view class="invoice-info-label">发票类型</view> 159 <view class="invoice-info-label">发票类型</view>
160 <view class="invoice-type-badge" :class="{ 'vat-type': invoiceData.invoiceType == 2 }"> 160 <view :class="{ 'vat-type': invoiceData.invoiceType == 2 }" class="invoice-type-badge">
161 {{ invoiceData.invoiceType == 1 ? '普通发票' : '增值税专用发票' }} 161 {{ invoiceData.invoiceType == 1 ? '普通发票' : '增值税专用发票' }}
162 </view> 162 </view>
163 </view> 163 </view>
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
165 <text class="invoice-info-label">发票抬头</text> 165 <text class="invoice-info-label">发票抬头</text>
166 <text class="invoice-info-value">{{ invoiceData.invoiceBuyerName || '—' }}</text> 166 <text class="invoice-info-value">{{ invoiceData.invoiceBuyerName || '—' }}</text>
167 </view> 167 </view>
168 <view class="invoice-info-row" v-if="invoiceData.invoiceBuyerTaxno"> 168 <view v-if="invoiceData.invoiceBuyerTaxno" class="invoice-info-row">
169 <text class="invoice-info-label">纳税人识别号</text> 169 <text class="invoice-info-label">纳税人识别号</text>
170 <text class="invoice-info-value">{{ invoiceData.invoiceBuyerTaxno }}</text> 170 <text class="invoice-info-value">{{ invoiceData.invoiceBuyerTaxno }}</text>
171 </view> 171 </view>
...@@ -173,6 +173,14 @@ ...@@ -173,6 +173,14 @@
173 <text class="invoice-info-label">接收邮箱</text> 173 <text class="invoice-info-label">接收邮箱</text>
174 <text class="invoice-info-value">{{ invoiceData.invoicePushPhone || '—' }}</text> 174 <text class="invoice-info-value">{{ invoiceData.invoicePushPhone || '—' }}</text>
175 </view> 175 </view>
176 <view class="invoice-info-row">
177 <text class="invoice-info-label">开票时间</text>
178 <text class="invoice-info-value">{{ invoiceData.invoiceTime || '—' }}</text>
179 </view>
180 <view class="invoice-info-row">
181 <text class="invoice-info-label">开票金额</text>
182 <text class="invoice-info-value">¥{{ invoiceData.price || '—' }}</text>
183 </view>
176 </view> 184 </view>
177 </view> 185 </view>
178 </view> 186 </view>
...@@ -205,17 +213,17 @@ ...@@ -205,17 +213,17 @@
205 </template> 213 </template>
206 214
207 <script setup> 215 <script setup>
208 import { ref, reactive, onMounted, computed } from 'vue'; 216 import {ref, reactive, onMounted, computed} from 'vue';
209 import { 217 import {
210 onShow, 218 onShow,
211 onLoad 219 onLoad
212 } from '@dcloudio/uni-app' 220 } from '@dcloudio/uni-app'
213 import * as api from '@/common/api.js' 221 import * as api from '@/common/api.js'
214 import config from '@/config.js' 222 import config from '@/config.js'
215 // 获取deptType值(初始值为0,在onMounted中设置实际值) 223 // 获取deptType值(初始值为0,在onMounted中设置实际值)
216 const deptType = ref(0); 224 const deptType = ref(0);
217 const goToDetail = (item) => { 225 const goToDetail = (item) => {
218 uni.navigateTo({ url: `/pages/rank/applyDetail?examId=${item.sourceId || item.id}&type=${queryParams.type}` }); 226 uni.navigateTo({url: `/pages/rank/applyDetail?examId=${item.sourceId || item.id}&type=${queryParams.type}`});
219 } 227 }
220 228
221 // 标签栏配置(根据deptType动态生成) 229 // 标签栏配置(根据deptType动态生成)
...@@ -226,25 +234,25 @@ const tabs = computed(() => { ...@@ -226,25 +234,25 @@ const tabs = computed(() => {
226 if (dt === 6) { 234 if (dt === 6) {
227 console.log('返回3个tab: 个人会员、单位会员、级位考试'); 235 console.log('返回3个tab: 个人会员、单位会员、级位考试');
228 return [ 236 return [
229 { name: '个人会员', type: '0' }, 237 {name: '个人会员', type: '0'},
230 { name: '单位会员', type: '1' }, 238 {name: '单位会员', type: '1'},
231 { name: '级位考试', type: '2' } 239 {name: '级位考试', type: '2'}
232 ]; 240 ];
233 } else if (dt === 2) { 241 } else if (dt === 2) {
234 console.log('返回3个tab: 单位会员、段位考试、越段考试'); 242 console.log('返回3个tab: 单位会员、段位考试、越段考试');
235 return [ 243 return [
236 // { name: '单位会员', type: '1' }, 244 // { name: '单位会员', type: '1' },
237 { name: '段位考试', type: '3' }, 245 {name: '段位考试', type: '3'},
238 { name: '越段考试', type: '4' } 246 {name: '越段考试', type: '4'}
239 ]; 247 ];
240 } else { 248 } else {
241 console.log('返回默认5个tab, dt值为:', dt); 249 console.log('返回默认5个tab, dt值为:', dt);
242 return [ 250 return [
243 { name: '个人会员', type: '0' }, 251 {name: '个人会员', type: '0'},
244 { name: '单位会员', type: '1' }, 252 {name: '单位会员', type: '1'},
245 { name: '级位考试', type: '2' }, 253 {name: '级位考试', type: '2'},
246 { name: '段位考试', type: '3' }, 254 {name: '段位考试', type: '3'},
247 { name: '越段考试', type: '4' } 255 {name: '越段考试', type: '4'}
248 ]; 256 ];
249 } 257 }
250 }); 258 });
...@@ -287,7 +295,7 @@ onLoad((option) => { ...@@ -287,7 +295,7 @@ onLoad((option) => {
287 deptType.value = Number(app.globalData?.deptType || 0); 295 deptType.value = Number(app.globalData?.deptType || 0);
288 const firstType = tabs.value[0]?.type ?? '0'; 296 const firstType = tabs.value[0]?.type ?? '0';
289 currentTab.value = option.type || firstType; 297 currentTab.value = option.type || firstType;
290 queryParams.type = option.type ||firstType; 298 queryParams.type = option.type || firstType;
291 initData(); 299 initData();
292 }); 300 });
293 301
...@@ -379,7 +387,7 @@ const initData = async () => { ...@@ -379,7 +387,7 @@ const initData = async () => {
379 hasMore.value = res.rows.length === pageSize.value; 387 hasMore.value = res.rows.length === pageSize.value;
380 } catch (e) { 388 } catch (e) {
381 console.error('订单加载异常:', e); 389 console.error('订单加载异常:', e);
382 uni.showToast({ title: '加载失败', icon: 'none' }); 390 uni.showToast({title: '加载失败', icon: 'none'});
383 hasMore.value = false; 391 hasMore.value = false;
384 } finally { 392 } finally {
385 loading.value = false; 393 loading.value = false;
...@@ -399,13 +407,13 @@ const confirmDel = async () => { ...@@ -399,13 +407,13 @@ const confirmDel = async () => {
399 if (!currentOrder.value) return; 407 if (!currentOrder.value) return;
400 try { 408 try {
401 await api.deleteOrder(currentOrder.value.id); 409 await api.deleteOrder(currentOrder.value.id);
402 uni.showToast({ title: '删除成功', icon: 'success' }); 410 uni.showToast({title: '删除成功', icon: 'success'});
403 pageNum.value = 1; 411 pageNum.value = 1;
404 list.value = []; 412 list.value = [];
405 initData(); 413 initData();
406 closeDelPopup(); 414 closeDelPopup();
407 } catch (e) { 415 } catch (e) {
408 uni.showToast({ title: '删除失败', icon: 'error' }); 416 uni.showToast({title: '删除失败', icon: 'error'});
409 } 417 }
410 }; 418 };
411 419
...@@ -420,10 +428,10 @@ const closeDelPopup = () => { ...@@ -420,10 +428,10 @@ const closeDelPopup = () => {
420 const handlePay = async (item) => { 428 const handlePay = async (item) => {
421 if (item.payStatus !== 0) return; 429 if (item.payStatus !== 0) return;
422 try { 430 try {
423 await api.goPay({ id: item.id }); 431 await api.goPay({id: item.id});
424 uni.navigateTo({ url: `/pages/pay/pay?orderId=${item.id}` }); 432 uni.navigateTo({url: `/pages/pay/pay?orderId=${item.id}`});
425 } catch (e) { 433 } catch (e) {
426 uni.showToast({ title: '发起支付失败', icon: 'none' }); 434 uni.showToast({title: '发起支付失败', icon: 'none'});
427 } 435 }
428 }; 436 };
429 437
...@@ -447,7 +455,9 @@ const viewInvoice = (item) => { ...@@ -447,7 +455,9 @@ const viewInvoice = (item) => {
447 invoiceType: item.invoiceType || 1, 455 invoiceType: item.invoiceType || 1,
448 invoiceBuyerName: item.invoiceTitle || item.invoiceBuyerName || '—', 456 invoiceBuyerName: item.invoiceTitle || item.invoiceBuyerName || '—',
449 invoiceBuyerTaxno: item.invoiceTaxno || item.invoiceBuyerTaxno || '', 457 invoiceBuyerTaxno: item.invoiceTaxno || item.invoiceBuyerTaxno || '',
450 invoicePushPhone: item.invoiceEmail || item.invoicePushPhone || '—' 458 invoicePushPhone: item.invoiceEmail || item.invoicePushPhone || '—',
459 price: item.price || '-',
460 invoiceTime: item.invoiceTime || '—'
451 }; 461 };
452 showInvoicePopup.value = true; 462 showInvoicePopup.value = true;
453 isPopupOpen.value = true; 463 isPopupOpen.value = true;
...@@ -472,13 +482,13 @@ const confirmCancel = async () => { ...@@ -472,13 +482,13 @@ const confirmCancel = async () => {
472 if (!currentOrder.value) return; 482 if (!currentOrder.value) return;
473 try { 483 try {
474 await api.cancelPay(currentOrder.value.id); 484 await api.cancelPay(currentOrder.value.id);
475 uni.showToast({ title: '取消成功', icon: 'success' }); 485 uni.showToast({title: '取消成功', icon: 'success'});
476 pageNum.value = 1; 486 pageNum.value = 1;
477 list.value = []; 487 list.value = [];
478 initData(); 488 initData();
479 closeCancelPopup(); 489 closeCancelPopup();
480 } catch (e) { 490 } catch (e) {
481 uni.showToast({ title: '取消失败', icon: 'error' }); 491 uni.showToast({title: '取消失败', icon: 'error'});
482 } 492 }
483 }; 493 };
484 494
...@@ -665,11 +675,13 @@ const closeCancelPopup = () => { ...@@ -665,11 +675,13 @@ const closeCancelPopup = () => {
665 justify-content: space-around; 675 justify-content: space-around;
666 margin: 20rpx 0; 676 margin: 20rpx 0;
667 } 677 }
668 .line{ 678
679 .line {
669 width: 1rpx; 680 width: 1rpx;
670 height: 90%; 681 height: 90%;
671 background: #eee; 682 background: #eee;
672 } 683 }
684
673 .single-info { 685 .single-info {
674 padding: 16rpx 20rpx; 686 padding: 16rpx 20rpx;
675 border-radius: 8rpx; 687 border-radius: 8rpx;
...@@ -750,10 +762,12 @@ const closeCancelPopup = () => { ...@@ -750,10 +762,12 @@ const closeCancelPopup = () => {
750 background: transparent; 762 background: transparent;
751 text-align: center; 763 text-align: center;
752 margin: 0; 764 margin: 0;
765
753 &::after { 766 &::after {
754 border: none; 767 border: none;
755 display: none; // 关键:隐藏伪元素 768 display: none; // 关键:隐藏伪元素
756 } 769 }
770
757 &.btn-delete { 771 &.btn-delete {
758 background: #fff; 772 background: #fff;
759 color: #e4393c; 773 color: #e4393c;
...@@ -879,6 +893,7 @@ const closeCancelPopup = () => { ...@@ -879,6 +893,7 @@ const closeCancelPopup = () => {
879 border: none; 893 border: none;
880 } 894 }
881 } 895 }
896
882 .code-text { 897 .code-text {
883 font-size: 28rpx; 898 font-size: 28rpx;
884 font-weight: 600; 899 font-weight: 600;
......
...@@ -186,6 +186,7 @@ const handleSubmit = async () => { ...@@ -186,6 +186,7 @@ const handleSubmit = async () => {
186 uni.navigateBack(); 186 uni.navigateBack();
187 }, 1500); 187 }, 1500);
188 } catch (error) { 188 } catch (error) {
189 console.log(error)
189 submitting.value = false; 190 submitting.value = false;
190 // 错误已由 request.js 处理 191 // 错误已由 request.js 处理
191 } finally { 192 } finally {
......
...@@ -141,6 +141,7 @@ const queryParams = reactive({ ...@@ -141,6 +141,7 @@ const queryParams = reactive({
141 pageNum: 1, 141 pageNum: 1,
142 pageSize: 10, 142 pageSize: 10,
143 type: '0', // 0表示个人会员 143 type: '0', // 0表示个人会员
144 subType: '1', //0道馆 1个人
144 // queryType: '1', 145 // queryType: '1',
145 // payStatus: '', 146 // payStatus: '',
146 perId: '' 147 perId: ''
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!