f813fede by lttnew

优化

1 parent f1508768
...@@ -118,62 +118,62 @@ const preferentialPolicy = ref(false) ...@@ -118,62 +118,62 @@ const preferentialPolicy = ref(false)
118 const preferentialData = ref({ 118 const preferentialData = ref({
119 name: '优惠' 119 name: '优惠'
120 }) 120 })
121 const payType = ref('2') 121 const payType = ref('2')
122 const isPaying = ref(false) 122 const isPaying = ref(false)
123 const payName = ref('') 123 const payName = ref('')
124 const assoName = ref('') 124 const assoName = ref('')
125 const app = getApp() 125 const app = getApp()
126 126
127 const pickFirst = (...values) => { 127 const pickFirst = (...values) => {
128 const value = values.find(item => item !== undefined && item !== null && String(item).trim() !== '') 128 const value = values.find(item => item !== undefined && item !== null && String(item).trim() !== '')
129 return value ? String(value) : '' 129 return value ? String(value) : ''
130 } 130 }
131 131
132 const getOrderContent = (content) => { 132 const getOrderContent = (content) => {
133 if (!content) return {} 133 if (!content) return {}
134 if (typeof content === 'object') return content 134 if (typeof content === 'object') return content
135 try { 135 try {
136 return JSON.parse(content) 136 return JSON.parse(content)
137 } catch (e) { 137 } catch (e) {
138 return {} 138 return {}
139 } 139 }
140 } 140 }
141 141
142 const fillPayDisplayInfo = (data = {}, content = {}, option = {}) => { 142 const fillPayDisplayInfo = (data = {}, content = {}, option = {}) => {
143 const memberInfo = app.globalData?.memberInfo || {} 143 const memberInfo = app.globalData?.memberInfo || {}
144 const deptInfo = app.globalData?.dept || app.globalData?.userInfo?.dept || {} 144 const deptInfo = app.globalData?.dept || app.globalData?.userInfo?.dept || {}
145 payName.value = pickFirst( 145 payName.value = pickFirst(
146 memberInfo.name, 146 memberInfo.name,
147 content.memberName, 147 content.memberName,
148 data.memberName, 148 data.memberName,
149 data.payDeptName, 149 data.payDeptName,
150 content.payDeptName, 150 content.payDeptName,
151 data.payMemName, 151 data.payMemName,
152 content.payMemName, 152 content.payMemName,
153 option.payName ? decodeURIComponent(option.payName) : '', 153 option.payName ? decodeURIComponent(option.payName) : '',
154 data.orderName, 154 data.orderName,
155 content.orderName, 155 content.orderName,
156 deptInfo.deptName 156 deptInfo.deptName
157 ) 157 )
158 assoName.value = pickFirst( 158 assoName.value = pickFirst(
159 memberInfo.aname, 159 memberInfo.aname,
160 memberInfo.associateName, 160 memberInfo.associateName,
161 memberInfo.assoName, 161 memberInfo.assoName,
162 deptInfo.aname, 162 deptInfo.aname,
163 deptInfo.associateName, 163 deptInfo.associateName,
164 data.assoName, 164 data.assoName,
165 data.associateName, 165 data.associateName,
166 data.associationName, 166 data.associationName,
167 data.aname, 167 data.aname,
168 data.parentName, 168 data.parentName,
169 content.assoName, 169 content.assoName,
170 content.associateName, 170 content.associateName,
171 content.associationName, 171 content.associationName,
172 content.aname, 172 content.aname,
173 content.parentName, 173 content.parentName,
174 option.assoName ? decodeURIComponent(option.assoName) : '' 174 option.assoName ? decodeURIComponent(option.assoName) : ''
175 ) 175 )
176 } 176 }
177 177
178 const memberTotalFee = computed(() => { 178 const memberTotalFee = computed(() => {
179 const total = memberFee.value * form.value.renewYear 179 const total = memberFee.value * form.value.renewYear
...@@ -246,14 +246,14 @@ const handelPay = async () => { ...@@ -246,14 +246,14 @@ const handelPay = async () => {
246 let data 246 let data
247 // 再次支付 247 // 再次支付
248 if (payForm.value.id && payForm.value.payStatus === '0') { 248 if (payForm.value.id && payForm.value.payStatus === '0') {
249 const [err, res] = await to(api.payForOrder({ 249 const [err, res] = await to(api.payForOrder({
250 id: payForm.value.id, 250 id: payForm.value.id,
251 renewYear: form.value.renewYear, 251 renewYear: form.value.renewYear,
252 payType: payType.value, 252 payType: payType.value,
253 type: payType.value, 253 type: payType.value,
254 contactPerson: form.value.contactPerson, 254 contactPerson: form.value.contactPerson,
255 contactTel: form.value.contactTel 255 contactTel: form.value.contactTel
256 })) 256 }))
257 if (err || res.code !== 200) { 257 if (err || res.code !== 200) {
258 uni.hideLoading() 258 uni.hideLoading()
259 isPaying.value = false 259 isPaying.value = false
...@@ -325,29 +325,29 @@ const handelPay = async () => { ...@@ -325,29 +325,29 @@ const handelPay = async () => {
325 isPaying.value = false 325 isPaying.value = false
326 } 326 }
327 327
328 onLoad((option) => { 328 onLoad((option) => {
329 console.log(66, option) 329 console.log(66, option)
330 fillPayDisplayInfo({}, {}, option) 330 fillPayDisplayInfo({}, {}, option)
331 // 接收订单ID(再次支付时) 331 // 接收订单ID(再次支付时)
332 if (option.orderId) { 332 if (option.orderId) {
333 payForm.value.id = option.orderId 333 payForm.value.id = option.orderId
334 payForm.value.payStatus = '0' 334 payForm.value.payStatus = '0'
335 // 获取订单详情 335 // 获取订单详情
336 to(api.orderDetail(option.orderId)).then(([err, res]) => { 336 to(api.orderDetail(option.orderId)).then(([err, res]) => {
337 if (!err && res.data) { 337 if (!err && res.data) {
338 const content = getOrderContent(res.data.content) 338 const content = getOrderContent(res.data.content)
339 form.value.renewYear = content.yearCount || 1 339 form.value.renewYear = content.yearCount || 1
340 fillPayDisplayInfo(res.data, content, option) 340 fillPayDisplayInfo(res.data, content, option)
341 } 341 }
342 }) 342 })
343 } 343 }
344 // 接收年限 344 // 接收年限
345 if (option.renewYear) { 345 if (option.renewYear) {
346 form.value.renewYear = Number(option.renewYear) 346 form.value.renewYear = Number(option.renewYear)
347 } 347 }
348 // 初始化获取费用和优惠 348 // 初始化获取费用和优惠
349 init() 349 init()
350 }) 350 })
351 351
352 // 初始化接口 352 // 初始化接口
353 async function init() { 353 async function init() {
...@@ -424,6 +424,7 @@ async function getZtxDiscountPolicyApi() { ...@@ -424,6 +424,7 @@ async function getZtxDiscountPolicyApi() {
424 } 424 }
425 425
426 .info-label { 426 .info-label {
427 width: 120rpx;
427 font-size: 28rpx; 428 font-size: 28rpx;
428 color: #666; 429 color: #666;
429 } 430 }
......
...@@ -118,8 +118,8 @@ ...@@ -118,8 +118,8 @@
118 <view class="invoice-info-list"> 118 <view class="invoice-info-list">
119 <view class="invoice-info-row"> 119 <view class="invoice-info-row">
120 <view class="invoice-info-label">发票类型</view> 120 <view class="invoice-info-label">发票类型</view>
121 <view :class="{ 'vat-type': invoiceData.invoiceType == 2 }" class="invoice-type-badge"> 121 <view :class="{ 'vat-type': invoiceData.invoiceStatus == 2 }" class="invoice-type-badge">
122 {{ invoiceData.invoiceType == 1 ? '普通发票' : '增值税专用发票' }} 122 {{ invoiceData.specialFlag == '2' ? '普通发票' : '增值税专用发票' }}
123 </view> 123 </view>
124 </view> 124 </view>
125 <view class="invoice-info-row"> 125 <view class="invoice-info-row">
...@@ -541,6 +541,8 @@ const viewInvoice = (item) => { ...@@ -541,6 +541,8 @@ const viewInvoice = (item) => {
541 // 其他类型显示发票信息弹窗 541 // 其他类型显示发票信息弹窗
542 invoiceData.value = { 542 invoiceData.value = {
543 invoiceType: item.invoiceType || 1, 543 invoiceType: item.invoiceType || 1,
544 specialFlag: item.specialFlag ,
545 invoiceStatus: item.invoiceStatus ,
544 invoiceBuyerName: item.invoiceTitle || item.invoiceBuyerName || '—', 546 invoiceBuyerName: item.invoiceTitle || item.invoiceBuyerName || '—',
545 invoiceBuyerTaxno: item.invoiceTaxno || item.invoiceBuyerTaxno || '', 547 invoiceBuyerTaxno: item.invoiceTaxno || item.invoiceBuyerTaxno || '',
546 invoicePushPhone: item.invoiceEmail || item.invoicePushPhone || '—', 548 invoicePushPhone: item.invoiceEmail || item.invoicePushPhone || '—',
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
23 <view v-else class="lh35">{{form.phone}}</view> 23 <view v-else class="lh35">{{form.phone}}</view>
24 </uni-forms-item> 24 </uni-forms-item>
25 25
26 <uni-forms-item label="地址"> 26 <!-- <uni-forms-item label="地址">
27 <uni-data-picker :readonly="!edit" :clear-icon="false" v-if="form.siteRegionId" 27 <uni-data-picker :readonly="!edit" :clear-icon="false" v-if="form.siteRegionId"
28 v-model="form.siteRegionId" :localdata="options" @change="onchangeRegionId"> 28 v-model="form.siteRegionId" :localdata="options" @change="onchangeRegionId">
29 </uni-data-picker> 29 </uni-data-picker>
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
33 <uni-data-picker :readonly="!edit" :clear-icon="false" v-else-if="form.siteProvinceId" 33 <uni-data-picker :readonly="!edit" :clear-icon="false" v-else-if="form.siteProvinceId"
34 v-model="form.siteProvinceId" :localdata="options" @change="onchangeRegionId"> 34 v-model="form.siteProvinceId" :localdata="options" @change="onchangeRegionId">
35 </uni-data-picker> 35 </uni-data-picker>
36 </uni-forms-item> 36 </uni-forms-item> -->
37 37
38 <uni-forms-item label="详细地址"> 38 <!-- <uni-forms-item label="详细地址">
39 <uni-easyinput v-if="edit" type="textarea" v-model="form.siteAddress"></uni-easyinput> 39 <uni-easyinput v-if="edit" type="textarea" v-model="form.siteAddress"></uni-easyinput>
40 <view v-else class="lh35">{{form.siteAddress}}</view> 40 <view v-else class="lh35">{{form.siteAddress}}</view>
41 </uni-forms-item> 41 </uni-forms-item> -->
42 42
43 <uni-forms-item label="机构介绍"> 43 <uni-forms-item label="机构介绍">
44 <uni-easyinput v-if="edit" type="textarea" v-model="form.introduce"></uni-easyinput> 44 <uni-easyinput v-if="edit" type="textarea" v-model="form.introduce"></uni-easyinput>
......
...@@ -150,8 +150,8 @@ ...@@ -150,8 +150,8 @@
150 <view class="invoice-info-list"> 150 <view class="invoice-info-list">
151 <view class="invoice-info-row"> 151 <view class="invoice-info-row">
152 <view class="invoice-info-label">票据类型</view> 152 <view class="invoice-info-label">票据类型</view>
153 <view :class="{ 'vat-type': invoiceData.invoiceType == 2 }" class="invoice-type-badge"> 153 <view :class="{ 'vat-type': invoiceData.invoiceStatus == 2 }" class="invoice-type-badge">
154 {{ invoiceData.invoiceType == 1 ? '普通票据' : '增值税专用票据' }} 154 {{ invoiceData.specialFlag == '2' ? '普通发票' : '增值税专用发票' }}
155 </view> 155 </view>
156 </view> 156 </view>
157 <view class="invoice-info-row"> 157 <view class="invoice-info-row">
...@@ -663,6 +663,8 @@ const viewInvoice = (item) => { ...@@ -663,6 +663,8 @@ const viewInvoice = (item) => {
663 // 其他类型显示发票信息弹窗 663 // 其他类型显示发票信息弹窗
664 invoiceData.value = { 664 invoiceData.value = {
665 invoiceType: item.invoiceType || 1, 665 invoiceType: item.invoiceType || 1,
666 specialFlag: item.specialFlag ,
667 invoiceStatus: item.invoiceStatus ,
666 invoiceBuyerName: item.invoiceTitle || item.invoiceBuyerName || '—', 668 invoiceBuyerName: item.invoiceTitle || item.invoiceBuyerName || '—',
667 invoiceBuyerTaxno: item.invoiceTaxno || item.invoiceBuyerTaxno || '', 669 invoiceBuyerTaxno: item.invoiceTaxno || item.invoiceBuyerTaxno || '',
668 invoicePushPhone: item.invoiceEmail || item.invoicePushPhone || '—', 670 invoicePushPhone: item.invoiceEmail || item.invoicePushPhone || '—',
......
...@@ -271,6 +271,7 @@ function closeSuccessModal() { ...@@ -271,6 +271,7 @@ function closeSuccessModal() {
271 271
272 .content { 272 .content {
273 padding: 20rpx; 273 padding: 20rpx;
274 padding-bottom: 80rpx;
274 } 275 }
275 276
276 .form-item { 277 .form-item {
......
...@@ -367,17 +367,17 @@ const confirmBind = async () => { ...@@ -367,17 +367,17 @@ const confirmBind = async () => {
367 idcCode: bindForm.value.idcCode 367 idcCode: bindForm.value.idcCode
368 })) 368 }))
369 uni.hideLoading() 369 uni.hideLoading()
370 if (res.data != 1) { 370 // if (res.data != 1) {
371 handelGo() 371 // // handelGo()
372 closeBindPopup() 372 // closeBindPopup()
373 } else { 373 // } else {
374 uni.showToast({ 374 uni.showToast({
375 title: '绑定成功', 375 title: '绑定成功',
376 icon: 'success' 376 icon: 'success'
377 }) 377 })
378 closeBindPopup() 378 closeBindPopup()
379 await getWebInfo() 379 await getWebInfo()
380 } 380 // }
381 if (err) { 381 if (err) {
382 console.log(err) 382 console.log(err)
383 handelGo() 383 handelGo()
......
...@@ -148,45 +148,6 @@ ...@@ -148,45 +148,6 @@
148 </view> 148 </view>
149 </scroll-view> 149 </scroll-view>
150 150
151 <!-- 发票查看弹窗 -->
152 <view v-if="showInvoicePopup" class="invoice-popup-mask" @click="closeInvoicePopup">
153 <view class="invoice-popup-content" @click.stop>
154 <view class="invoice-popup-header">
155 <text class="invoice-popup-title">发票信息</text>
156 <view class="invoice-popup-close" @click.stop="closeInvoicePopup"></view>
157 </view>
158 <view class="invoice-popup-body">
159 <view class="invoice-info-list">
160 <view class="invoice-info-row">
161 <view class="invoice-info-label">发票类型</view>
162 <view :class="{ 'vat-type': invoiceData.invoiceType == 2 }" class="invoice-type-badge">
163 {{ invoiceData.invoiceType == 1 ? '普通发票' : '增值税专用发票' }}
164 </view>
165 </view>
166 <view class="invoice-info-row">
167 <text class="invoice-info-label">发票抬头</text>
168 <text class="invoice-info-value">{{ invoiceData.invoiceBuyerName || '—' }}</text>
169 </view>
170 <view v-if="invoiceData.invoiceBuyerTaxno" class="invoice-info-row">
171 <text class="invoice-info-label">纳税人识别号</text>
172 <text class="invoice-info-value">{{ invoiceData.invoiceBuyerTaxno }}</text>
173 </view>
174 <view class="invoice-info-row">
175 <text class="invoice-info-label">接收邮箱</text>
176 <text class="invoice-info-value">{{ invoiceData.invoicePushPhone || '—' }}</text>
177 </view>
178 <view class="invoice-info-row">
179 <text class="invoice-info-label">开票时间</text>
180 <text class="invoice-info-value">{{ invoiceData.invoiceTime || '—' }}</text>
181 </view>
182 <view class="invoice-info-row">
183 <text class="invoice-info-label">开票金额</text>
184 <text class="invoice-info-value">{{ invoiceData.price || '—' }}</text>
185 </view>
186 </view>
187 </view>
188 </view>
189 </view>
190 151
191 <!-- 自定义删除确认弹窗 --> 152 <!-- 自定义删除确认弹窗 -->
192 <view v-if="showDelPopup" class="popup-mask" @touchmove.stop.prevent @click.stop="closeDelPopup"> 153 <view v-if="showDelPopup" class="popup-mask" @touchmove.stop.prevent @click.stop="closeDelPopup">
...@@ -471,11 +432,6 @@ const viewInvoice = (item) => { ...@@ -471,11 +432,6 @@ const viewInvoice = (item) => {
471 } 432 }
472 }; 433 };
473 434
474 // 关闭发票弹窗
475 const closeInvoicePopup = () => {
476 showInvoicePopup.value = false;
477 isPopupOpen.value = false;
478 };
479 435
480 // 取消订单 436 // 取消订单
481 const handleCancel = (item) => { 437 const handleCancel = (item) => {
......
...@@ -130,8 +130,8 @@ ...@@ -130,8 +130,8 @@
130 <view class="invoice-info-list"> 130 <view class="invoice-info-list">
131 <view class="invoice-info-row"> 131 <view class="invoice-info-row">
132 <view class="invoice-info-label">票据类型</view> 132 <view class="invoice-info-label">票据类型</view>
133 <view :class="{ 'vat-type': invoiceData.invoiceType == 2 }" class="invoice-type-badge"> 133 <view :class="{ 'vat-type': invoiceData.invoiceType == 1 }" class="invoice-type-badge">
134 {{ invoiceData.invoiceType == 1 ? '普通票据' : '增值税专用票据' }} 134 {{ invoiceData.invoiceType == 2 ? '普通票据' : '增值税专用票据' }}
135 </view> 135 </view>
136 </view> 136 </view>
137 <view class="invoice-info-row"> 137 <view class="invoice-info-row">
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!