wupengfei
2 天以前 c0ea4cbdde5f0f13fe401596ba7642a2906c484d
apps/housekeepingMiniApp/src/subpackages/sercice/addStandardOrder/InnerPage.vue
@@ -120,7 +120,13 @@
      :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>
@@ -141,6 +147,7 @@
import dayjs from 'dayjs';
import { EnumUserBankCardAccess, EnumUserBankCardAccessTextFormStandard } from '@12333/constants';
import { Message } from '@12333/utils';
import { template } from 'lodash';
defineOptions({
  name: 'InnerPage',
@@ -200,6 +207,7 @@
const { infiniteLoadingProps } = useEnterpriseAddresses({
  rows: 100,
  refeshDidShow: false,
  onSuccess(res) {
    const data = res.pages[0].data;
    const address = data.find((item) => item.isDefault);
@@ -214,7 +222,7 @@
const existAddress = computed(() => {
  return infiniteLoadingProps.value.flattenListData.map((x) => ({
    id: x.id,
    addressDetail: x.addressDetail,
    addressDetail: `${x.addressName}${x.addressDetail}`,
    cityName: '',
    countyName: '',
    provinceName: '',
@@ -239,6 +247,12 @@
  form.selectAddressVisible = true;
}
function goAddAddress() {
  Taro.navigateTo({
    url: `${RouterPath.editAddress}`,
  });
}
const selected = (prevExistAdd, nowExistAdd, arr) => {
  form.addressId = nowExistAdd.id;
};
@@ -268,7 +282,7 @@
      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,
@@ -348,5 +362,11 @@
      }
    }
  }
  .select-address-bottom {
    display: flex;
    justify-content: center;
    padding: 40px 0;
  }
}
</style>