{{ t('h5.invite.posterTip') }}
+ +{{ t('h5.invite.qrTip') }}
++ {{ t('h5.placeOrder.senderEmpty') }} +
+{{ fieldError('sender') }}
+ + -{{ fieldError('clientNo') }}
{{ fieldError('productCode') }}
-{{ fieldError('cargoAttribute') }}
-{{ fieldError('warehouseId') }}
{{ fieldError('actualWeight') }}
+ {{ fieldError('receiver.recipientsName') }} +
-+ {{ fieldError('receiver.phone') }} +
-+ {{ fieldError('receiver.countryCode') }} +
+ {{ fieldError('receiver.streetAddress1') }} +
+ {{ fieldError('receiver.zipCode') }} +
+ {{ declarationLiveHint }} +
+ {{ fieldError('declaredCurrency') }} +
+ {{ fieldError('itemsEmpty') }} +
++ {{ fieldError(`items.${idx}.enName`) }} +
+ {{ + fieldError(`items.${idx}.unitPrice`) || + fieldError(`items.${idx}.unitWeight`) || + fieldError(`items.${idx}.quantity`) + }} +
{{ t('h5.placeOrder.amount') }} {{ row.amount || '-' }} ·
{{ t('h5.placeOrder.itemWeight') }} {{ row.weight || '-' }}
@@ -224,7 +370,7 @@ import { useI18n } from 'vue-i18n';
import { Message, Modal } from '@arco-design/web-vue';
import { IconClose } from '@arco-design/web-vue/es/icon';
import { postOrderParcelCreate } from '@/api/order';
-import { getSenderAddressList } from '@/api/order/senderAddress';
+import { createSenderAddress, getSenderAddressList } from '@/api/order/senderAddress';
import { getSalesProductList } from '@/api/channel/salesProduct';
import { getDictListAll } from '@/api/system/dict';
import { getCountryList } from '@/api/system/country';
@@ -234,6 +380,17 @@ import { pickField } from '@/utils/warehouseListMapper';
import { h5Navigate } from '@/utils/device';
import { isCustomerContactRequiredError } from '@/utils/customerContactGate';
+function isSenderRequiredError(error: unknown): boolean {
+ const msg = String(
+ (error as any)?.response?.data?.message ||
+ (error as any)?.response?.data?.Message ||
+ (error as any)?.message ||
+ error ||
+ '',
+ );
+ return msg.includes('发件人姓名不能为空') || /sender\s*name/i.test(msg);
+}
+
defineOptions({ name: 'H5PlaceOrderSheet' });
const PRICE_CHECK_ORDER_DRAFT_KEY = 'oms_price_check_order_draft';
@@ -255,9 +412,21 @@ const router = useRouter();
const step = ref(0);
const optionsLoading = ref(false);
const senderLoading = ref(false);
+const showSenderForm = ref(false);
+const savingSender = ref(false);
+const senderForm = reactive({
+ senderName: '',
+ phone: '',
+ province: '',
+ city: '',
+ streetAddress1: '',
+ countryCode: 'CN',
+});
const submitting = ref(false);
const handoffTip = ref('');
const selectedSenderId = ref