From 84077c1b4c32191ff996f0cf17aee72a0715c156 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 29 Jun 2026 16:28:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=9C=80=E6=96=B0=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- ci/project.config.json | 2 +- src/INDEX/bill/list/method.ts | 32 ++++++++ src/INDEX/pay/index.vue | 6 +- src/INDEX/pay/method.ts | 1 + src/INDEX/pay/model.ts | 3 +- src/INDEX/pay/style.scss | 16 +++- src/INDEX/pay_general/index.vue | 81 +++++++++++++++++++ src/INDEX/pay_general/method.ts | 66 ++++++++++++++++ src/INDEX/pay_general/model.ts | 13 +++ src/INDEX/pay_general/style.scss | 70 ++++++++++++++++ src/INDEX/pay_general/success.vue | 33 ++++++++ src/INDEX/visitor_applies/add/method.ts | 3 + src/ME/decoration/list/index.vue | 26 +++--- src/ME/decoration/show/index.vue | 5 +- src/ME/incidental_expenses/index.vue | 69 ++++++++++++++++ src/ME/incidental_expenses/method.ts | 29 +++++++ src/ME/incidental_expenses/model.ts | 8 ++ src/ME/incidental_expenses/style.scss | 41 ++++++++++ src/ME/pass/components/SwitchSelectBtn.vue | 4 +- src/ME/pass/index.vue | 11 ++- src/ME/pass/method.ts | 16 ++-- src/gen/ApiTypes.d.ts | 9 ++- src/gen/Apis.ts | 6 ++ src/gen/Enums.ts | 92 +++++++++++++++++++++- src/pages.json | 11 +++ src/pages/me/components/AreaFunctional.vue | 5 ++ src/pages/me/components/header.vue | 6 +- src/pages/transfer/index.vue | 6 ++ src/static/svg/incidental_expenses.svg | 1 + 30 files changed, 635 insertions(+), 40 deletions(-) create mode 100644 src/INDEX/pay_general/index.vue create mode 100644 src/INDEX/pay_general/method.ts create mode 100644 src/INDEX/pay_general/model.ts create mode 100644 src/INDEX/pay_general/style.scss create mode 100644 src/INDEX/pay_general/success.vue create mode 100644 src/ME/incidental_expenses/index.vue create mode 100644 src/ME/incidental_expenses/method.ts create mode 100644 src/ME/incidental_expenses/model.ts create mode 100644 src/ME/incidental_expenses/style.scss create mode 100644 src/static/svg/incidental_expenses.svg diff --git a/.env.development b/.env.development index 8798391..fa660cd 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ NODE_ENV= development -VITE_HTTP_BASE_URL = http://10.39.13.78:8002/api/ -# VITE_HTTP_BASE_URL = http://test-weapp-api.linyikj.com.cn/api/ +# VITE_HTTP_BASE_URL = http://10.39.13.78:8002/api/ +VITE_HTTP_BASE_URL = http://test-weapp-api.linyikj.com.cn/api/ # VITE_HTTP_BASE_URL = https://weapp-api.linyikj.com.cn/api/ VITE_ACCESS_TOKEN_KEY= 'ACCESS_TOKEN_CUSTOMER' \ No newline at end of file diff --git a/ci/project.config.json b/ci/project.config.json index 2954887..3acf702 100644 --- a/ci/project.config.json +++ b/ci/project.config.json @@ -1,3 +1,3 @@ { - "version": "0.0.108" + "version": "0.0.113" } \ No newline at end of file diff --git a/src/INDEX/bill/list/method.ts b/src/INDEX/bill/list/method.ts index c23fd31..3369ef7 100644 --- a/src/INDEX/bill/list/method.ts +++ b/src/INDEX/bill/list/method.ts @@ -96,19 +96,51 @@ export default { }, handleSubmitOrder() { let bill_ids: any = [] + let selectedHouseName = '' // 记录选中的房屋名称 + let hasSelectedBills = false // 是否有选中的账单 + console.log(model?.items?.value,'model?.items?.value') + model?.items?.value?.map((res: any) => { res?.bills?.map((k: any) => { k?.details?.map((i: any) => { if (k?.checked) { + // 检查是否跨房屋 + if (!hasSelectedBills) { + // 第一次选中,记录房屋名称 + selectedHouseName = res?.house_name + hasSelectedBills = true + } else if (selectedHouseName !== res?.house_name) { + // 发现跨房屋的情况 + showToast('不能跨房屋提交账单,请选择同一房屋的账单进行支付!') + return + } bill_ids.push(i?.id) } }) }) }) + + console.log(bill_ids) if (!bill_ids?.length) { showToast('至少选择一个账单!') return } + + // 再次检查是否跨房屋(双重检查) + const houseSet = new Set() + model?.items?.value?.forEach((res: any) => { + res?.bills?.forEach((k: any) => { + if (k?.checked) { + houseSet.add(res?.house_name) + } + }) + }) + + if (houseSet.size > 1) { + showToast('不能跨房屋提交账单,请选择同一房屋的账单进行支付!') + return + } + getApiLoading(Apis.HouseOrder.HouseOrders.Store, { bill_ids: bill_ids, amount: model?.total_amount?.value, diff --git a/src/INDEX/pay/index.vue b/src/INDEX/pay/index.vue index 5a64593..0cea5db 100644 --- a/src/INDEX/pay/index.vue +++ b/src/INDEX/pay/index.vue @@ -1,9 +1,13 @@ + + diff --git a/src/ME/incidental_expenses/method.ts b/src/ME/incidental_expenses/method.ts new file mode 100644 index 0000000..82b0ea7 --- /dev/null +++ b/src/ME/incidental_expenses/method.ts @@ -0,0 +1,29 @@ +import { Apis } from '@/gen/Apis' +import useModel from './model' +import { useWeAppAuthStore } from '@/common' +import { getApiLoading } from '@/common/libraries/apiLoading' +import userLoginStatus from '@/common/libraries/userUserLogin' +import { showToastBack, showToast } from '@/common/libraries/naviHelper' +const auth = useWeAppAuthStore() + +const getList = () => { + getApiLoading(Apis.Bill.Bills.List, useModel?.formData?.value).then(res => { + useModel.listData.value = [...useModel.listData.value, ...res.data] + useModel.metaData.value = res.meta + useModel.loadingStatus.value = true + console.log(res) + }) +} + +export default { + getList, + loadMore(page: number) { + useModel.formData.value.page = page + this.getList() + }, + showPassedDoc(res: { id: string }) { + uni.navigateTo({ + url: `/ME/release_items/show/index?id=${res?.id}` + }) + } +} diff --git a/src/ME/incidental_expenses/model.ts b/src/ME/incidental_expenses/model.ts new file mode 100644 index 0000000..e74a5a9 --- /dev/null +++ b/src/ME/incidental_expenses/model.ts @@ -0,0 +1,8 @@ +import { reactive, ref } from 'vue' +export default { + listData: ref([]), + formData: ref({ page: 1 }), + metaData: ref({}), + currentTabs: ref(0), + loadingStatus: ref(false) +} diff --git a/src/ME/incidental_expenses/style.scss b/src/ME/incidental_expenses/style.scss new file mode 100644 index 0000000..3bf3973 --- /dev/null +++ b/src/ME/incidental_expenses/style.scss @@ -0,0 +1,41 @@ +page { + background-color: #f8f8f8; +} +.release_items_page { + padding-bottom: calc(130rpx + constant(safe-area-inset-bottom)); + padding-bottom: calc(130rpx + env(safe-area-inset-bottom)); +} +.items { + margin: 30rpx 30rpx 0 30rpx; + background-color: #fff; + border-radius: 15rpx; + padding: 30rpx 30rpx 0 30rpx; + .cell_items { + display: flex; + align-items: center; + justify-content: space-between; + color: #3d3d3d; + font-size: 28rpx; + padding-bottom: 25rpx; + } + .footer_items { + display: flex; + align-items: center; + justify-content: flex-end; + border-top: 1px solid #eee; + padding: 25rpx 0; + } + .status { + color: #fff; + border-radius: 8rpx; + padding: 6rpx 12rpx; + font-size: 23rpx; + background-color: #c5c5c5; + } + .status_Pending { + background-color: #ff8d1a; + } + .status_Paid { + background-color: #52c41a; + } +} diff --git a/src/ME/pass/components/SwitchSelectBtn.vue b/src/ME/pass/components/SwitchSelectBtn.vue index 8298319..c57b8c0 100644 --- a/src/ME/pass/components/SwitchSelectBtn.vue +++ b/src/ME/pass/components/SwitchSelectBtn.vue @@ -15,9 +15,7 @@ const bindPickerChange = (e: any) => { let data = useModel?.listData?.value[e.detail.value] || {} console.log(data, 'data') useModel.currentHouse.value = data - if (data?.type === 2) { - method?.getQrCode() - } + method?.getQrCode() }