| | |
| | | :is-show-custom-address="false" |
| | | @selected="selected" |
| | | exist-address-title="选择地址" |
| | | ></nut-address> |
| | | > |
| | | <template #bottom v-if="!infiniteLoadingProps?.flattenListData?.length"> |
| | | <div class="select-address-bottom"> |
| | | <nut-button type="primary" @click="goAddAddress">新增地址</nut-button> |
| | | </div> |
| | | </template> |
| | | </nut-address> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | import dayjs from 'dayjs'; |
| | | import { EnumUserBankCardAccess, EnumUserBankCardAccessTextFormStandard } from '@12333/constants'; |
| | | import { Message } from '@12333/utils'; |
| | | import { template } from 'lodash'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | |
| | | const { infiniteLoadingProps } = useEnterpriseAddresses({ |
| | | rows: 100, |
| | | refeshDidShow: false, |
| | | onSuccess(res) { |
| | | const data = res.pages[0].data; |
| | | const address = data.find((item) => item.isDefault); |
| | |
| | | const existAddress = computed(() => { |
| | | return infiniteLoadingProps.value.flattenListData.map((x) => ({ |
| | | id: x.id, |
| | | addressDetail: x.addressDetail, |
| | | addressDetail: `${x.addressName}${x.addressDetail}`, |
| | | cityName: '', |
| | | countyName: '', |
| | | provinceName: '', |
| | |
| | | form.selectAddressVisible = true; |
| | | } |
| | | |
| | | function goAddAddress() { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.editAddress}`, |
| | | }); |
| | | } |
| | | |
| | | const selected = (prevExistAdd, nowExistAdd, arr) => { |
| | | form.addressId = nowExistAdd.id; |
| | | }; |
| | |
| | | specPrice: spec.value.price ?? 0, |
| | | specNumber: specNumber, |
| | | addressId: form.addressId, |
| | | name: detail.value.name, |
| | | name: selectedAddress.value.name, |
| | | contactPhoneNumber: selectedAddress.value.contactPhoneNumber, |
| | | provinceCode: selectedAddress.value.provinceCode, |
| | | provinceContent: selectedAddress.value.provinceContent, |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .select-address-bottom { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 40px 0; |
| | | } |
| | | } |
| | | </style> |