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() }