|
@@ -5,63 +5,49 @@ import NewbookingTable from './components/NewbookingTable.vue'
|
|
|
import AddNewAddress from './images/default_add_address@2x.png'
|
|
import AddNewAddress from './images/default_add_address@2x.png'
|
|
|
import NotAvailable from './images/default_destination_not_available@2x.png'
|
|
import NotAvailable from './images/default_destination_not_available@2x.png'
|
|
|
import NotShipment from './images/default_no_shipment@2x.png'
|
|
import NotShipment from './images/default_no_shipment@2x.png'
|
|
|
|
|
+import submitsucessful from './images/icon_success_big@2x.png'
|
|
|
import { useUserStore } from '@/stores/modules/user'
|
|
import { useUserStore } from '@/stores/modules/user'
|
|
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
|
|
|
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
|
|
|
+const router = useRouter()
|
|
|
|
|
+const { currentRoute } = router
|
|
|
|
|
+const { value } = currentRoute
|
|
|
|
|
+const { query } = value
|
|
|
|
|
+const { a } = query
|
|
|
|
|
|
|
|
const CreateNewBOokingSearch = ref('')
|
|
const CreateNewBOokingSearch = ref('')
|
|
|
|
|
+const DateValue = ref('')
|
|
|
|
|
+const bookingTableRef = ref()
|
|
|
const VesselName = ref([])
|
|
const VesselName = ref([])
|
|
|
|
|
+const VesselNametest = ref('')
|
|
|
const isFocused = ref(false)
|
|
const isFocused = ref(false)
|
|
|
const isataFocused = ref(false)
|
|
const isataFocused = ref(false)
|
|
|
const isetaFocused = ref(false)
|
|
const isetaFocused = ref(false)
|
|
|
const ManageVisible = ref(false)
|
|
const ManageVisible = ref(false)
|
|
|
const AddNewAddressVisible = ref(false)
|
|
const AddNewAddressVisible = ref(false)
|
|
|
const NoPermissionVisible = ref(false)
|
|
const NoPermissionVisible = ref(false)
|
|
|
-const NoEligibleVisible = ref(true)
|
|
|
|
|
|
|
+const NoEligibleVisible = ref(false)
|
|
|
|
|
+const isDisabled = ref(false)
|
|
|
|
|
+const SaveedVisible = ref(false)
|
|
|
|
|
+const UnableSaveVisible = ref(false)
|
|
|
|
|
+const missingmessage = ref('')
|
|
|
const ATATimeList = ref(null)
|
|
const ATATimeList = ref(null)
|
|
|
const ETATimeList = ref(null)
|
|
const ETATimeList = ref(null)
|
|
|
const Addressradio = ref()
|
|
const Addressradio = ref()
|
|
|
const LocationName = ref('')
|
|
const LocationName = ref('')
|
|
|
const AddressLine1 = ref('')
|
|
const AddressLine1 = ref('')
|
|
|
const AddressLine2 = ref('')
|
|
const AddressLine2 = ref('')
|
|
|
|
|
+const CountryCity = ref('')
|
|
|
const PostalCode = ref('')
|
|
const PostalCode = ref('')
|
|
|
const ContactPerson = ref('')
|
|
const ContactPerson = ref('')
|
|
|
const ContactNumber = ref('')
|
|
const ContactNumber = ref('')
|
|
|
const instructions = ref('')
|
|
const instructions = ref('')
|
|
|
-const NewBookingColumnsList = ref([
|
|
|
|
|
- {
|
|
|
|
|
- field: 'HBOLNo',
|
|
|
|
|
- title: 'HBOL No.',
|
|
|
|
|
- type: '',
|
|
|
|
|
- formatter: ''
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- field: 'ContainerNo',
|
|
|
|
|
- title: 'Container No.',
|
|
|
|
|
- type: '',
|
|
|
|
|
- formatter: ''
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- field: 'ServiceType',
|
|
|
|
|
- title: 'Service Type',
|
|
|
|
|
- type: '',
|
|
|
|
|
- formatter: ''
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- field: 'ETD',
|
|
|
|
|
- title: 'ETD',
|
|
|
|
|
- type: '',
|
|
|
|
|
- formatter: 'date'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- field: 'ETA',
|
|
|
|
|
- title: 'ETA',
|
|
|
|
|
- type: '',
|
|
|
|
|
- formatter: 'date'
|
|
|
|
|
- }
|
|
|
|
|
-])
|
|
|
|
|
const modetypeValue = ref('Truck')
|
|
const modetypeValue = ref('Truck')
|
|
|
const Requirements = ref('')
|
|
const Requirements = ref('')
|
|
|
|
|
+const selectedAddressList = ref()
|
|
|
|
|
+const isselectedAddress = ref(null)
|
|
|
|
|
+const checkShipmentsSubmitInfo = ref({})
|
|
|
const ModeType = ref([
|
|
const ModeType = ref([
|
|
|
{
|
|
{
|
|
|
label: 'Truck',
|
|
label: 'Truck',
|
|
@@ -71,29 +57,27 @@ const ModeType = ref([
|
|
|
|
|
|
|
|
// 设置无法点击
|
|
// 设置无法点击
|
|
|
const isNotClickAddress = computed(() => {
|
|
const isNotClickAddress = computed(() => {
|
|
|
- return NoPermissionVisible.value || NoEligibleVisible.value
|
|
|
|
|
|
|
+ return NoPermissionVisible.value || NoEligibleVisible.value || isDisabled.value
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const ManageAddressList = ref([
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Main Distribution Center',
|
|
|
|
|
- Address1: '160#BEIJING ROAD, JINGAN District,',
|
|
|
|
|
- Address2: 'Shenzhen, China',
|
|
|
|
|
- Contact: 'Contact: John Doe (+65 9123 4567)'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Main Distribution Center2',
|
|
|
|
|
- Address1: '160#BEIJING ROAD, JINGAN District,',
|
|
|
|
|
- Address2: 'Shenzhen, China',
|
|
|
|
|
- Contact: 'Contact: John Doe (+65 9123 4567)'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Main Distribution Center3',
|
|
|
|
|
- Address1: '160#BEIJING ROAD, JINGAN District,',
|
|
|
|
|
- Address2: 'Shenzhen, China',
|
|
|
|
|
- Contact: 'Contact: John Doe (+65 9123 4567)'
|
|
|
|
|
|
|
+// 设置无法保存
|
|
|
|
|
+const isNotSubmit = computed(() => {
|
|
|
|
|
+ if(NoPermissionVisible.value || NoEligibleVisible.value || isDisabled.value) {
|
|
|
|
|
+ return true
|
|
|
}
|
|
}
|
|
|
-])
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if(
|
|
|
|
|
+ Object.keys(checkShipmentsSubmitInfo.value).length == 0 ||
|
|
|
|
|
+ selectedAddressList.value == undefined ||
|
|
|
|
|
+ modetypeValue.value == '' ||
|
|
|
|
|
+ DateValue.value == ''
|
|
|
|
|
+ ) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+const ManageAddressList = ref([])
|
|
|
// 需要特殊样式的日期列表
|
|
// 需要特殊样式的日期列表
|
|
|
const specialDates = ref([
|
|
const specialDates = ref([
|
|
|
'2025-05-27',
|
|
'2025-05-27',
|
|
@@ -110,7 +94,8 @@ const DateRangeChangeATA = (val:any) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const showLabel = computed(() => {
|
|
const showLabel = computed(() => {
|
|
|
- return VesselName.value.length!= 0 || isFocused.value
|
|
|
|
|
|
|
+ // return VesselName.value.length!= 0 || isFocused.value
|
|
|
|
|
+ return VesselNametest.value!= '' || isFocused.value
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const showataLabel = computed(() => {
|
|
const showataLabel = computed(() => {
|
|
@@ -125,6 +110,10 @@ const changeFocus = (val: boolean) => {
|
|
|
isFocused.value = val
|
|
isFocused.value = val
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const changeFocustest = (val: boolean) => {
|
|
|
|
|
+ isFocused.value = val
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const DateChangeFocusATA = (val: boolean) => {
|
|
const DateChangeFocusATA = (val: boolean) => {
|
|
|
isataFocused.value = val
|
|
isataFocused.value = val
|
|
|
}
|
|
}
|
|
@@ -134,7 +123,7 @@ const DateChangeFocusETA = (val: boolean) => {
|
|
|
|
|
|
|
|
// 特殊日期样式
|
|
// 特殊日期样式
|
|
|
const getCurrentStyle = (current: any) => {
|
|
const getCurrentStyle = (current: any) => {
|
|
|
- const dateString = current.format('YYYY-MM-DD');
|
|
|
|
|
|
|
+ const dateString = current.format('YYYY.MM.DD');
|
|
|
if (specialDates.value.includes(dateString)) {
|
|
if (specialDates.value.includes(dateString)) {
|
|
|
return {
|
|
return {
|
|
|
background: '#b3e5d4',
|
|
background: '#b3e5d4',
|
|
@@ -146,14 +135,37 @@ const getCurrentStyle = (current: any) => {
|
|
|
// 默认样式
|
|
// 默认样式
|
|
|
return {};
|
|
return {};
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+// 保存新地址
|
|
|
|
|
+const SaveNewAddress = () => {
|
|
|
|
|
+ if(
|
|
|
|
|
+ LocationName.value != '' &&
|
|
|
|
|
+ AddressLine1.value != '' &&
|
|
|
|
|
+ AddressLine2.value != '' &&
|
|
|
|
|
+ CountryCity.value != '' &&
|
|
|
|
|
+ PostalCode.value != '' &&
|
|
|
|
|
+ ContactPerson.value != '' &&
|
|
|
|
|
+ ContactNumber.value != ''
|
|
|
|
|
+ ) {
|
|
|
|
|
+ ManageAddressList.value.push({
|
|
|
|
|
+ location_name: LocationName.value,
|
|
|
|
|
+ address_1: AddressLine1.value,
|
|
|
|
|
+ address_2: AddressLine2.value,
|
|
|
|
|
+ country: CountryCity.value,
|
|
|
|
|
+ city: CountryCity.value,
|
|
|
|
|
+ postal_code: PostalCode.value,
|
|
|
|
|
+ contact_person: ContactPerson.value,
|
|
|
|
|
+ contact_number: ContactNumber.value,
|
|
|
|
|
+ notes: instructions.value,
|
|
|
|
|
+ deliver_address_is_new: 'yes'
|
|
|
|
|
+ })
|
|
|
|
|
+ AddNewAddressVisible.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
// 点击按钮
|
|
// 点击按钮
|
|
|
const handleclickbutton = (val: any) => {
|
|
const handleclickbutton = (val: any) => {
|
|
|
Requirements.value = Requirements.value + val
|
|
Requirements.value = Requirements.value + val
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const selectedAddressList = ref()
|
|
|
|
|
-const isselectedAddress = ref(null)
|
|
|
|
|
const changeAddressRadio = () => {
|
|
const changeAddressRadio = () => {
|
|
|
ManageVisible.value = false
|
|
ManageVisible.value = false
|
|
|
if(Addressradio.value != undefined) {
|
|
if(Addressradio.value != undefined) {
|
|
@@ -162,6 +174,132 @@ const changeAddressRadio = () => {
|
|
|
}
|
|
}
|
|
|
selectedAddressList.value = ManageAddressList.value[Addressradio.value]
|
|
selectedAddressList.value = ManageAddressList.value[Addressradio.value]
|
|
|
}
|
|
}
|
|
|
|
|
+// 页面初始化
|
|
|
|
|
+const getInitBookingData = () => {
|
|
|
|
|
+ $api
|
|
|
|
|
+ .InitCreateBooking({
|
|
|
|
|
+ a: a != undefined ? a: ''
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res: any) => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ if(res.data.msg.includes('No Eligible Shipments for Booking')) {
|
|
|
|
|
+ NoEligibleVisible.value = true
|
|
|
|
|
+ isDisabled.value = true
|
|
|
|
|
+ }
|
|
|
|
|
+ if(res.data.msg.includes('success')) {
|
|
|
|
|
+ bookingTableRef.value.getTableData(res.data.data.tableData)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+// 查询Shipments
|
|
|
|
|
+const SearchShipment = () => {
|
|
|
|
|
+ $api
|
|
|
|
|
+ .BookingTableSearch({
|
|
|
|
|
+ serial_no: a != undefined ? a: '',
|
|
|
|
|
+ text_search: CreateNewBOokingSearch.value,
|
|
|
|
|
+ vessel: VesselNametest.value,
|
|
|
|
|
+ eta_start: ETATimeList.value.length != 0 ? ETATimeList.value[0] : '',
|
|
|
|
|
+ eta_end: ETATimeList.value.length != 0 ? ETATimeList.value[1] : '',
|
|
|
|
|
+ ata_start: ATATimeList.value.length != 0 ? ATATimeList.value[0] : '',
|
|
|
|
|
+ ata_end: ATATimeList.value.length != 0 ? ATATimeList.value[1] : ''
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res: any) => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ console.log(res.data)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 选择shipments获取address book
|
|
|
|
|
+const isrecommenddate = ref()
|
|
|
|
|
+// 判断date是否一致
|
|
|
|
|
+const areAllDateRangesSame = (date: any) => {
|
|
|
|
|
+ const firstRange = date[0].date_range;
|
|
|
|
|
+ return date.every(item => {
|
|
|
|
|
+ const currentRange = item.date_range;
|
|
|
|
|
+ return (
|
|
|
|
|
+ currentRange.length === firstRange.length &&
|
|
|
|
|
+ currentRange.every((date, index) => date === firstRange[index])
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+// 遍历日期
|
|
|
|
|
+const getDateRangeArray = (startDateStr, endDateStr) => {
|
|
|
|
|
+ const parseDate = (str) => {
|
|
|
|
|
+ const [year, month, day] = str.split('.').map(Number);
|
|
|
|
|
+ return new Date(year, month - 1, day); // 月份从0开始计数
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ const startDate = parseDate(startDateStr);
|
|
|
|
|
+ const endDate = parseDate(endDateStr);
|
|
|
|
|
+
|
|
|
|
|
+ const dateArray = [];
|
|
|
|
|
+ const currentDate = new Date(startDate);
|
|
|
|
|
+
|
|
|
|
|
+ while (currentDate <= endDate) {
|
|
|
|
|
+ // 格式化为 YYYY.MM.DD
|
|
|
|
|
+ const formattedDate = [
|
|
|
|
|
+ currentDate.getFullYear(),
|
|
|
|
|
+ (currentDate.getMonth() + 1).toString().padStart(2, '0'),
|
|
|
|
|
+ currentDate.getDate().toString().padStart(2, '0')
|
|
|
|
|
+ ].join('.');
|
|
|
|
|
+ dateArray.push(formattedDate);
|
|
|
|
|
+ currentDate.setDate(currentDate.getDate() + 1);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return dateArray;
|
|
|
|
|
+}
|
|
|
|
|
+const selectChangeEvent = (val: any, date: any, submitInfo: any) => {
|
|
|
|
|
+ checkShipmentsSubmitInfo.value = submitInfo
|
|
|
|
|
+ if(date.length != 0) {
|
|
|
|
|
+ isrecommenddate.value = areAllDateRangesSame(date)
|
|
|
|
|
+ if(isrecommenddate.value) {
|
|
|
|
|
+ specialDates.value = getDateRangeArray(date[0].date_range[0],date[0].date_range[1])
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ specialDates.value = []
|
|
|
|
|
+ }
|
|
|
|
|
+ $api
|
|
|
|
|
+ .getAddressBookList({
|
|
|
|
|
+ ...val,
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res: any) => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ ManageAddressList.value = res.data
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 保存
|
|
|
|
|
+const SubmitBooking = () => {
|
|
|
|
|
+ $api
|
|
|
|
|
+ .SaveBookingList({
|
|
|
|
|
+ ...checkShipmentsSubmitInfo.value,
|
|
|
|
|
+ ...selectedAddressList.value,
|
|
|
|
|
+ delivery_mode: modetypeValue.value,
|
|
|
|
|
+ delivery_date: DateValue.value,
|
|
|
|
|
+ special_requirements: Requirements.value
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res: any) => {
|
|
|
|
|
+ if (res.code === 200 && res.data.msg == 'success') {
|
|
|
|
|
+ SaveedVisible.value = true
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ SaveedVisible.value = false
|
|
|
|
|
+ router.push({ name: 'Destination Delivery'})
|
|
|
|
|
+ }, 3000)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ UnableSaveVisible.value = true
|
|
|
|
|
+ missingmessage.value = res.data.msg
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ getInitBookingData()
|
|
|
|
|
+})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -170,7 +308,7 @@ const changeAddressRadio = () => {
|
|
|
<div>Create New Booking</div>
|
|
<div>Create New Booking</div>
|
|
|
<div class="flex">
|
|
<div class="flex">
|
|
|
<el-button class="el-button--default create-button"><span class="font_family icon-icon_return_b"></span> Cancel</el-button>
|
|
<el-button class="el-button--default create-button"><span class="font_family icon-icon_return_b"></span> Cancel</el-button>
|
|
|
- <el-button :disabled="isNotClickAddress" class="el-button--main create-button"><span class="font_family icon-icon_submit_b"></span> Submit</el-button>
|
|
|
|
|
|
|
+ <el-button :disabled="isNotSubmit" @click="SubmitBooking" class="el-button--main create-button"><span class="font_family icon-icon_submit_b"></span> Submit</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- Select Shipments -->
|
|
<!-- Select Shipments -->
|
|
@@ -199,12 +337,22 @@ const changeAddressRadio = () => {
|
|
|
<span v-if="showataLabel" class="border-label">ATA</span>
|
|
<span v-if="showataLabel" class="border-label">ATA</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="input-with-label" style="margin: 0 8px;">
|
|
<div class="input-with-label" style="margin: 0 8px;">
|
|
|
- <AutoSelect ASPlaceholder="Input Vessel Name" :ASValue="VesselName" @changeFocus="changeFocus"></AutoSelect>
|
|
|
|
|
|
|
+ <!-- <AutoSelect ASPlaceholder="Input Vessel Name" :ASValue="VesselName" @changeFocus="changeFocus"></AutoSelect> -->
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="Input Vessel Name"
|
|
|
|
|
+ v-model="VesselNametest"
|
|
|
|
|
+ @focus="changeFocustest(true)"
|
|
|
|
|
+ @blur="changeFocustest(false)"
|
|
|
|
|
+ class="log_input"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-input>
|
|
|
<span v-if="showLabel" class="border-label">Vessel Name</span>
|
|
<span v-if="showLabel" class="border-label">Vessel Name</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-button class="el-button--dark create-button">Search</el-button>
|
|
|
|
|
|
|
+ <el-button class="el-button--dark create-button" @click="SearchShipment">Search</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
- <NewbookingTable :ColumnsList="NewBookingColumnsList"></NewbookingTable>
|
|
|
|
|
|
|
+ <NewbookingTable ref="bookingTableRef"
|
|
|
|
|
+ @selectChangeEvent="selectChangeEvent"
|
|
|
|
|
+ ></NewbookingTable>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- Delivery Information -->
|
|
<!-- Delivery Information -->
|
|
|
<div class="Delivery">Delivery Information</div>
|
|
<div class="Delivery">Delivery Information</div>
|
|
@@ -221,14 +369,14 @@ const changeAddressRadio = () => {
|
|
|
<el-radio>
|
|
<el-radio>
|
|
|
<div>
|
|
<div>
|
|
|
<div class="radio_top">
|
|
<div class="radio_top">
|
|
|
- <div class="radio_title">{{ selectedAddressList.title }}</div>
|
|
|
|
|
|
|
+ <div class="radio_title">{{ selectedAddressList.location_name }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="radio_content">
|
|
<div class="radio_content">
|
|
|
- <div class="radio_content_text">{{ selectedAddressList.Address1 }}</div>
|
|
|
|
|
- <div class="radio_content_text">{{ selectedAddressList.Address2 }}</div>
|
|
|
|
|
|
|
+ <div class="radio_content_text">{{ selectedAddressList.address_1 }}</div>
|
|
|
|
|
+ <div class="radio_content_text">{{ selectedAddressList.country }},{{ selectedAddressList.city }} {{ selectedAddressList.postal_code }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="radio_bottom radio_content_text">
|
|
<div class="radio_bottom radio_content_text">
|
|
|
- {{ selectedAddressList.Contact }}
|
|
|
|
|
|
|
+ Contact: {{ selectedAddressList.contact_person }} {{ selectedAddressList.contact_number }}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-radio>
|
|
</el-radio>
|
|
@@ -253,6 +401,7 @@ const changeAddressRadio = () => {
|
|
|
<div>
|
|
<div>
|
|
|
<div class="delivery_type_title"><span class="stars_red">*</span>Preferred Delivery Date</div>
|
|
<div class="delivery_type_title"><span class="stars_red">*</span>Preferred Delivery Date</div>
|
|
|
<a-date-picker
|
|
<a-date-picker
|
|
|
|
|
+ v-model:value ="DateValue"
|
|
|
:disabled="isNotClickAddress"
|
|
:disabled="isNotClickAddress"
|
|
|
:showToday="false"
|
|
:showToday="false"
|
|
|
style="width: 240px;"
|
|
style="width: 240px;"
|
|
@@ -290,18 +439,18 @@ const changeAddressRadio = () => {
|
|
|
<el-radio v-for="(item, index) in ManageAddressList" :key="index" :value="index">
|
|
<el-radio v-for="(item, index) in ManageAddressList" :key="index" :value="index">
|
|
|
<div class="addressradio">
|
|
<div class="addressradio">
|
|
|
<div class="radio_top">
|
|
<div class="radio_top">
|
|
|
- <div class="radio_title">{{ item.title }}</div>
|
|
|
|
|
|
|
+ <div class="radio_title">{{ item.location_name }}</div>
|
|
|
<div>
|
|
<div>
|
|
|
<el-button class="el-button--blue"><span class="font_family icon-icon_edit_b"></span></el-button>
|
|
<el-button class="el-button--blue"><span class="font_family icon-icon_edit_b"></span></el-button>
|
|
|
<el-button class="el-button--blue"><span class="font_family icon-icon_delete_b"></span></el-button>
|
|
<el-button class="el-button--blue"><span class="font_family icon-icon_delete_b"></span></el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="radio_content">
|
|
<div class="radio_content">
|
|
|
- <div class="radio_content_text">{{ item.Address1 }}</div>
|
|
|
|
|
- <div class="radio_content_text">{{ item.Address2 }}</div>
|
|
|
|
|
|
|
+ <div class="radio_content_text">{{ item.address_1 }}</div>
|
|
|
|
|
+ <div class="radio_content_text">{{ item.country }},{{ item.city }} {{ item.postal_code }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="radio_bottom radio_content_text">
|
|
<div class="radio_bottom radio_content_text">
|
|
|
- {{ item.Contact }}
|
|
|
|
|
|
|
+ Contact: {{ item.contact_person }} {{ item.contact_number }}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-radio>
|
|
</el-radio>
|
|
@@ -336,7 +485,7 @@ const changeAddressRadio = () => {
|
|
|
<div class="flex">
|
|
<div class="flex">
|
|
|
<div style="margin-right: 9px;width: 50%;">
|
|
<div style="margin-right: 9px;width: 50%;">
|
|
|
<div class="diaolog_add_title"><span class="stars_red">*</span>Country/City</div>
|
|
<div class="diaolog_add_title"><span class="stars_red">*</span>Country/City</div>
|
|
|
- <el-input class="inputmargin" placeholder="Unit number, floor, etc. (optional)" v-model="AddressLine2"></el-input>
|
|
|
|
|
|
|
+ <el-input class="inputmargin" placeholder="Unit number, floor, etc. (optional)" v-model="CountryCity"></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="width: 50%;">
|
|
<div style="width: 50%;">
|
|
|
<div class="diaolog_add_title"><span class="stars_red">*</span>Postal Code</div>
|
|
<div class="diaolog_add_title"><span class="stars_red">*</span>Postal Code</div>
|
|
@@ -359,7 +508,7 @@ const changeAddressRadio = () => {
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="dialog-footer" style="justify-content: end;">
|
|
<div class="dialog-footer" style="justify-content: end;">
|
|
|
<el-button class="el-button--default dialog-button" @click="AddNewAddressVisible = false">Cancel</el-button>
|
|
<el-button class="el-button--default dialog-button" @click="AddNewAddressVisible = false">Cancel</el-button>
|
|
|
- <el-button class="el-button--dark dialog-button" @click="AddNewAddressVisible = false">
|
|
|
|
|
|
|
+ <el-button class="el-button--dark dialog-button" @click=SaveNewAddress>
|
|
|
Save Address
|
|
Save Address
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
@@ -403,6 +552,37 @@ const changeAddressRadio = () => {
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+ <!-- 保存成功 -->
|
|
|
|
|
+ <el-dialog v-model="SaveedVisible" width="320" style="height: 212px">
|
|
|
|
|
+ <div style="text-align: center"><el-image :src="submitsucessful" style="width: 64px;" /></div>
|
|
|
|
|
+ <div style="text-align: center; margin-top: 20px">Saved successfully</div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ <!-- 保存失败 -->
|
|
|
|
|
+ <el-dialog v-model="UnableSaveVisible" width="480">
|
|
|
|
|
+ <div>{{ missingmessage }}</div>
|
|
|
|
|
+ <div>Please complete all required fields.</div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ class="el-button--danger"
|
|
|
|
|
+ @click="UnableSaveVisible = false"
|
|
|
|
|
+ style="width: 100px"
|
|
|
|
|
+ >
|
|
|
|
|
+ OK
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #header>
|
|
|
|
|
+ <div class="cancel_header">
|
|
|
|
|
+ <span class="iconfont_icon iconfont_warning">
|
|
|
|
|
+ <svg class="iconfont icon_danger" aria-hidden="true">
|
|
|
|
|
+ <use xlink:href="#icon-icon_fail_fill_b"></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ Unable to Save
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|