|
@@ -0,0 +1,1482 @@
|
|
|
|
|
+<script setup lang="ts">
|
|
|
|
|
+import CalendarDate from '@/components/DateRange/src/components/CalendarDate.vue'
|
|
|
|
|
+import AutoSelect from '@/components/AutoSelect/src/AutoSelect.vue'
|
|
|
|
|
+import NewbookingTable from './components/NewbookingTable.vue'
|
|
|
|
|
+import AddNewAddress from './images/default_add_address@2x.png'
|
|
|
|
|
+import NotAvailable from './images/default_destination_not_available@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 { useRouter } from 'vue-router'
|
|
|
|
|
+
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
|
|
+const router = useRouter()
|
|
|
|
|
+const { currentRoute } = router
|
|
|
|
|
+const { value } = currentRoute
|
|
|
|
|
+const { query } = value
|
|
|
|
|
+const { a } = query
|
|
|
|
|
+
|
|
|
|
|
+const CreateNewBOokingSearch = ref('')
|
|
|
|
|
+const status = ref('')
|
|
|
|
|
+const booking = ref('')
|
|
|
|
|
+const DateValue = ref('')
|
|
|
|
|
+const DeliveryTime = ref('')
|
|
|
|
|
+const bookingTableRef = ref()
|
|
|
|
|
+const VesselName = ref([])
|
|
|
|
|
+const VesselNametest = ref('')
|
|
|
|
|
+const ShipperValue = ref('')
|
|
|
|
|
+const ConsigneeValue = ref('')
|
|
|
|
|
+const getAddressListData = ref({})
|
|
|
|
|
+// const isFocused = ref(false)
|
|
|
|
|
+const isFocused = ref({
|
|
|
|
|
+ Shipper: false,
|
|
|
|
|
+ Consignee: false,
|
|
|
|
|
+ Vessel: false
|
|
|
|
|
+})
|
|
|
|
|
+const isataFocused = ref(false)
|
|
|
|
|
+const isetaFocused = ref(false)
|
|
|
|
|
+const ManageVisible = ref(false)
|
|
|
|
|
+const AddNewAddressVisible = ref(false)
|
|
|
|
|
+const NoPermissionVisible = ref(false)
|
|
|
|
|
+const CancelRulesVisible = ref(false)
|
|
|
|
|
+const NoEligibleVisible = ref(false)
|
|
|
|
|
+const isDisabled = ref(false)
|
|
|
|
|
+const SaveedVisible = ref(false)
|
|
|
|
|
+const UnableSaveVisible = ref(false)
|
|
|
|
|
+const isRecommendDate = ref(false)
|
|
|
|
|
+const missingmessage = ref('')
|
|
|
|
|
+const recommendateWarning = ref('')
|
|
|
|
|
+const ATATimeList = ref(null)
|
|
|
|
|
+const ETATimeList = ref(null)
|
|
|
|
|
+const Addressradio = ref()
|
|
|
|
|
+const LocationName = ref('')
|
|
|
|
|
+const AddressLine1 = ref('')
|
|
|
|
|
+const AddressLine2 = ref('')
|
|
|
|
|
+const AddressLine3 = ref('')
|
|
|
|
|
+const AddressLine4 = ref('')
|
|
|
|
|
+const CountryCode = ref('')
|
|
|
|
|
+const CityCode = ref('')
|
|
|
|
|
+const CountryCity = ref('')
|
|
|
|
|
+const PostalCode = ref('')
|
|
|
|
|
+const ContactPerson = ref('')
|
|
|
|
|
+const ContactNumber = ref('')
|
|
|
|
|
+const instructions = ref('')
|
|
|
|
|
+const modetypeValue = ref('Truck')
|
|
|
|
|
+const Requirements = ref('')
|
|
|
|
|
+const Modification = ref()
|
|
|
|
|
+const selectedAddressList = ref()
|
|
|
|
|
+const isselectedAddress = ref(null)
|
|
|
|
|
+const checkShipmentsSubmitInfo = ref({})
|
|
|
|
|
+const RecommendateList = ref([])
|
|
|
|
|
+const ModeType = ref([
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'Truck',
|
|
|
|
|
+ value: 'Truck'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'Rail',
|
|
|
|
|
+ value: 'Rail'
|
|
|
|
|
+ }
|
|
|
|
|
+])
|
|
|
|
|
+
|
|
|
|
|
+// 设置无法点击
|
|
|
|
|
+
|
|
|
|
|
+const isNotClickAddress = computed(() => {
|
|
|
|
|
+ if(a == undefined) {
|
|
|
|
|
+ if(Object.keys(getAddressListData.value).length == 0) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(NoPermissionVisible.value || NoEligibleVisible.value || isDisabled.value) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return false
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+// 设置无法保存
|
|
|
|
|
+const isNotSubmit = computed(() => {
|
|
|
|
|
+ if(NoPermissionVisible.value || NoEligibleVisible.value || isDisabled.value) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(a != undefined) {
|
|
|
|
|
+ if(
|
|
|
|
|
+ selectedAddressList.value == undefined ||
|
|
|
|
|
+ modetypeValue.value == '' ||
|
|
|
|
|
+ DateValue.value == '' ||
|
|
|
|
|
+ DeliveryTime.value == '' ||
|
|
|
|
|
+ Modification.value == null ||
|
|
|
|
|
+ Modification.value == ''
|
|
|
|
|
+ ) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(
|
|
|
|
|
+ Object.keys(checkShipmentsSubmitInfo.value).length == 0 ||
|
|
|
|
|
+ selectedAddressList.value == undefined ||
|
|
|
|
|
+ modetypeValue.value == '' ||
|
|
|
|
|
+ DateValue.value == '' ||
|
|
|
|
|
+ DeliveryTime.value == ''
|
|
|
|
|
+ ) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return false
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+// 控制Address是否超长
|
|
|
|
|
+const isShowLimitLine1 = ref(false)
|
|
|
|
|
+const isShowLimitLine2 = ref(false)
|
|
|
|
|
+const isShowLimitLine3 = ref(false)
|
|
|
|
|
+const isShowLimitLine4 = ref(false)
|
|
|
|
|
+const isShowLimitLine1Style = computed(() => {
|
|
|
|
|
+ return AddressLine1.value.length == 45
|
|
|
|
|
+})
|
|
|
|
|
+const isShowLimitLine2Style = computed(() => {
|
|
|
|
|
+ return AddressLine2.value.length == 45
|
|
|
|
|
+})
|
|
|
|
|
+const isShowLimitLine3Style = computed(() => {
|
|
|
|
|
+ return AddressLine3.value.length == 45
|
|
|
|
|
+})
|
|
|
|
|
+const isShowLimitLine4Style = computed(() => {
|
|
|
|
|
+ return AddressLine4.value.length == 45
|
|
|
|
|
+})
|
|
|
|
|
+const createInputLimiter = (targetRef, showRef) => {
|
|
|
|
|
+ return (val: string) => {
|
|
|
|
|
+ if (val.length > 45) {
|
|
|
|
|
+ targetRef.value = val.substring(0, 45)
|
|
|
|
|
+ showRef.value = true
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ showRef.value = false
|
|
|
|
|
+ }, 3000)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+const handleAddressLine1 = createInputLimiter(AddressLine1, isShowLimitLine1)
|
|
|
|
|
+const handleAddressLine2 = createInputLimiter(AddressLine2, isShowLimitLine2)
|
|
|
|
|
+const handleAddressLine3 = createInputLimiter(AddressLine3, isShowLimitLine3)
|
|
|
|
|
+const handleAddressLine4 = createInputLimiter(AddressLine4, isShowLimitLine4)
|
|
|
|
|
+
|
|
|
|
|
+const ManageAddressList = ref([])
|
|
|
|
|
+// 需要特殊样式的日期列表
|
|
|
|
|
+const specialDates = ref([])
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+const DateRangeChangeETA = (val:any) => {
|
|
|
|
|
+ ETATimeList.value = val.data
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const DateRangeChangeATA = (val:any) => {
|
|
|
|
|
+ ATATimeList.value = val.data
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const createShowLabel = (valueRef, focusKey) => computed(() =>
|
|
|
|
|
+ valueRef.value !== '' || isFocused.value[focusKey]
|
|
|
|
|
+)
|
|
|
|
|
+const showLabelShipper = createShowLabel(ShipperValue, 'Shipper')
|
|
|
|
|
+const showLabelConsignee = createShowLabel(ConsigneeValue, 'Consignee')
|
|
|
|
|
+const showLabelVessel = createShowLabel(VesselNametest, 'Vessel')
|
|
|
|
|
+
|
|
|
|
|
+const showataLabel = computed(() => {
|
|
|
|
|
+ return ATATimeList.value != null || isataFocused.value
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+const showETAlabel = computed(() => {
|
|
|
|
|
+ return ETATimeList.value != null || isetaFocused.value
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+const changeFocus = (val: boolean) => {
|
|
|
|
|
+ // isFocused.value = val
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const changeFocustest = (type: any, val: boolean) => {
|
|
|
|
|
+ isFocused.value[type] = val
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const DateChangeFocusATA = (val: boolean) => {
|
|
|
|
|
+ isataFocused.value = val
|
|
|
|
|
+}
|
|
|
|
|
+const DateChangeFocusETA = (val: boolean) => {
|
|
|
|
|
+ isetaFocused.value = val
|
|
|
|
|
+}
|
|
|
|
|
+//自动补全查询
|
|
|
|
|
+interface CountryItem {
|
|
|
|
|
+ value: string
|
|
|
|
|
+ label: string
|
|
|
|
|
+}
|
|
|
|
|
+const countrys = ref<CountryItem[]>([])
|
|
|
|
|
+const Countryoptions = ref<CountryItem[]>([])
|
|
|
|
|
+const Countryloading = ref(false)
|
|
|
|
|
+const city = ref<CountryItem[]>([])
|
|
|
|
|
+const Cityoptions = ref<CountryItem[]>([])
|
|
|
|
|
+const cityloading = ref(false)
|
|
|
|
|
+const getAddressCountryCityData = (type: any) => {
|
|
|
|
|
+ $api.getAddressCountryCityData({
|
|
|
|
|
+ term: '',
|
|
|
|
|
+ term_type: type,
|
|
|
|
|
+ limit: type == 'country' ? CityCode.value : CountryCode.value
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res: any) => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ if(type == 'country') {
|
|
|
|
|
+ countrys.value = res.data
|
|
|
|
|
+ } else {
|
|
|
|
|
+ city.value = res.data
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+const querySearchCountry = (query: string) => {
|
|
|
|
|
+ if (query) {
|
|
|
|
|
+ Countryloading.value = true
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ Countryloading.value = false
|
|
|
|
|
+ Countryoptions.value = countrys.value.filter((item) => {
|
|
|
|
|
+ return item.label.toLowerCase().includes(query.toLowerCase())
|
|
|
|
|
+ })
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ Countryoptions.value = []
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+const querySearchCity = (query: string) => {
|
|
|
|
|
+ if (query) {
|
|
|
|
|
+ cityloading.value = true
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ cityloading.value = false
|
|
|
|
|
+ Cityoptions.value = city.value.filter((item) => {
|
|
|
|
|
+ return item.label.toLowerCase().includes(query.toLowerCase())
|
|
|
|
|
+ })
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ Cityoptions.value = []
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+// 特殊日期样式
|
|
|
|
|
+const getCurrentStyle = (current: any) => {
|
|
|
|
|
+ const dateString = current.format('YYYY.MM.DD')
|
|
|
|
|
+ if (specialDates.value.includes(dateString)) {
|
|
|
|
|
+ return {
|
|
|
|
|
+ background: '#b3e5d4',
|
|
|
|
|
+ borderRadius: '6px',
|
|
|
|
|
+ color: `var(--color-neutral-1)`
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 默认样式
|
|
|
|
|
+ return {}
|
|
|
|
|
+}
|
|
|
|
|
+const submitAddressList = ref([])
|
|
|
|
|
+const currentEditAddress = ref<any>(null)
|
|
|
|
|
+const updateAddressList = (addressData) => {
|
|
|
|
|
+ const { sync_key, contact_type } = addressData
|
|
|
|
|
+ const existingIndex = submitAddressList.value.findIndex(
|
|
|
|
|
+ item => item.sync_key === sync_key
|
|
|
|
|
+ )
|
|
|
|
|
+ if (contact_type === 'Delete') {
|
|
|
|
|
+ submitAddressList.value.push({
|
|
|
|
|
+ ...addressData,
|
|
|
|
|
+ contact_type: 'Delete'
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if (existingIndex !== -1) {
|
|
|
|
|
+ submitAddressList.value.splice(existingIndex, 1, {
|
|
|
|
|
+ ...submitAddressList.value[existingIndex],
|
|
|
|
|
+ ...addressData,
|
|
|
|
|
+ contact_type
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ submitAddressList.value.push(addressData)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+const isAddNewAddressVisible = ref(false)
|
|
|
|
|
+const AddNewAddressDelivery = () => {
|
|
|
|
|
+ currentEditAddress.value = null
|
|
|
|
|
+ isAddNewAddressVisible.value = true
|
|
|
|
|
+ AddNewAddressVisible.value = true
|
|
|
|
|
+ AddressLine1.value = ''
|
|
|
|
|
+ AddressLine2.value = ''
|
|
|
|
|
+ AddressLine3.value = ''
|
|
|
|
|
+ AddressLine4.value = ''
|
|
|
|
|
+ CountryCode.value = ''
|
|
|
|
|
+ CityCode.value = ''
|
|
|
|
|
+ PostalCode.value = ''
|
|
|
|
|
+ ContactPerson.value = ''
|
|
|
|
|
+ ContactNumber.value = ''
|
|
|
|
|
+}
|
|
|
|
|
+// 保存新地址
|
|
|
|
|
+const SaveNewAddress = () => {
|
|
|
|
|
+ if(
|
|
|
|
|
+ AddressLine1.value != '' ||
|
|
|
|
|
+ AddressLine2.value != '' ||
|
|
|
|
|
+ AddressLine3.value != '' ||
|
|
|
|
|
+ AddressLine4.value != '' &&
|
|
|
|
|
+ CountryCode.value != '' &&
|
|
|
|
|
+ CityCode.value != '' &&
|
|
|
|
|
+ PostalCode.value != '' &&
|
|
|
|
|
+ ContactPerson.value != '' &&
|
|
|
|
|
+ ContactNumber.value != ''
|
|
|
|
|
+ ) {
|
|
|
|
|
+ const addressData = {
|
|
|
|
|
+ address_1: AddressLine1.value,
|
|
|
|
|
+ address_2: AddressLine2.value,
|
|
|
|
|
+ address_3: AddressLine3.value,
|
|
|
|
|
+ address_4: AddressLine4.value,
|
|
|
|
|
+ country: CountryCode.value,
|
|
|
|
|
+ city: CityCode.value,
|
|
|
|
|
+ postal_code: PostalCode.value,
|
|
|
|
|
+ contact_person: ContactPerson.value,
|
|
|
|
|
+ contact_number: ContactNumber.value,
|
|
|
|
|
+ contact_id: currentEditAddress.value? currentEditAddress.value.contact_id : '',
|
|
|
|
|
+ sync_key: currentEditAddress.value? currentEditAddress.value.sync_key : '',
|
|
|
|
|
+ from_station: currentEditAddress.value? currentEditAddress.value.from_station :'',
|
|
|
|
|
+ contact_type: 'Add',
|
|
|
|
|
+ create_user: 'Online_D_Address',
|
|
|
|
|
+ id: `temp_${Date.now()}`
|
|
|
|
|
+ }
|
|
|
|
|
+ if (currentEditAddress.value) {
|
|
|
|
|
+ const key = currentEditAddress.value.contact_type == 'Unedit' ? 'sync_key' : 'id'
|
|
|
|
|
+ addressData[key] = currentEditAddress.value[key]
|
|
|
|
|
+ addressData.contact_type = 'Modify'
|
|
|
|
|
+ const index = ManageAddressList.value.findIndex(
|
|
|
|
|
+ item => item[key] === currentEditAddress.value[key]
|
|
|
|
|
+ )
|
|
|
|
|
+ if (index !== -1) {
|
|
|
|
|
+ ManageAddressList.value.splice(index, 1, addressData)
|
|
|
|
|
+ }
|
|
|
|
|
+ updateAddressList(addressData)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ManageAddressList.value.push(addressData)
|
|
|
|
|
+ updateAddressList(addressData)
|
|
|
|
|
+ }
|
|
|
|
|
+ if(isAddNewAddressVisible.value) {
|
|
|
|
|
+ handleClickAddress()
|
|
|
|
|
+ }
|
|
|
|
|
+ AddNewAddressVisible.value = false
|
|
|
|
|
+ currentEditAddress.value = null
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+// 点击按钮
|
|
|
|
|
+const handleclickbutton = (val: any) => {
|
|
|
|
|
+ Requirements.value = Requirements.value + val
|
|
|
|
|
+}
|
|
|
|
|
+let delivery_address = ''
|
|
|
|
|
+const changeAddressRadio = () => {
|
|
|
|
|
+ ManageVisible.value = false
|
|
|
|
|
+ if(Addressradio.value != undefined) {
|
|
|
|
|
+ isselectedAddress.value = Addressradio.value
|
|
|
|
|
+ }
|
|
|
|
|
+ selectedAddressList.value = ManageAddressList.value[Addressradio.value]
|
|
|
|
|
+ delivery_address = `${selectedAddressList.value.contact_person}(${selectedAddressList.value.contact_number})\n${selectedAddressList.value.address_1}\n${selectedAddressList.value.address_2}\n${selectedAddressList.value.address_3}\n${selectedAddressList.value.address_4},${selectedAddressList.value.country},${selectedAddressList.value.city},${selectedAddressList.value.postal_code}`
|
|
|
|
|
+}
|
|
|
|
|
+// 页面初始化
|
|
|
|
|
+let checkShipments = []
|
|
|
|
|
+let checkShipmentsSubmit = []
|
|
|
|
|
+let checkShipmentsdata = []
|
|
|
|
|
+let checkShipmentsInfo = {}
|
|
|
|
|
+let checkShipmentsSubmitInfoData = {}
|
|
|
|
|
+const getInitBookingData = () => {
|
|
|
|
|
+ $api
|
|
|
|
|
+ .InitCreateBooking({
|
|
|
|
|
+ serial_no: 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)
|
|
|
|
|
+ if(a) {
|
|
|
|
|
+ status.value = res.data.data.status
|
|
|
|
|
+ booking.value = res.data.data.booking_no
|
|
|
|
|
+ Requirements.value = res.data.data.special_requirements
|
|
|
|
|
+ modetypeValue.value = res.data.data.delivery_mode
|
|
|
|
|
+ DateValue.value = res.data.data.delivery_date
|
|
|
|
|
+ DeliveryTime.value = res.data.data.delivery_time
|
|
|
|
|
+ Modification.value = res.data.data.modify_reason
|
|
|
|
|
+ selectedAddressList.value = res.data.data.delivery_address_detail
|
|
|
|
|
+ isselectedAddress.value = ''
|
|
|
|
|
+ const sync_key = res.data.data.delivery_address_detail.sync_key
|
|
|
|
|
+ checkShipments = res.data.data.tableData.map(item => ({ consignee_id: item.consignee_id, country: item.dc_country}))
|
|
|
|
|
+ checkShipmentsdata = Object.keys(checkShipments?.[0])
|
|
|
|
|
+ checkShipmentsSubmit = Object.keys(res.data.data.tableData?.[0])
|
|
|
|
|
+ checkShipmentsdata.forEach((item) => {
|
|
|
|
|
+ Object.assign(checkShipmentsInfo, {
|
|
|
|
|
+ [item]: checkShipments.map((row) => row[item] )
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ checkShipmentsSubmit.forEach((item) => {
|
|
|
|
|
+ if(item == 'serial_no') return
|
|
|
|
|
+ Object.assign(checkShipmentsSubmitInfoData, {
|
|
|
|
|
+ [item]: res.data.data.tableData.map((row) => {
|
|
|
|
|
+ if(row[item] == null){
|
|
|
|
|
+ return ''
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return row[item]
|
|
|
|
|
+ }
|
|
|
|
|
+ } )
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ $api
|
|
|
|
|
+ .getAddressBookList({
|
|
|
|
|
+ ...checkShipmentsInfo,
|
|
|
|
|
+ delivery_serial_no: a? a: ''
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res: any) => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ ManageAddressList.value = res.data
|
|
|
|
|
+ ManageAddressList.value.forEach((item, index) => {
|
|
|
|
|
+ if(item.sync_key === sync_key) {
|
|
|
|
|
+ selectedAddressList.value = item
|
|
|
|
|
+ isselectedAddress.value = index
|
|
|
|
|
+ Addressradio.value = index
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+// 查询Shipments
|
|
|
|
|
+const SearchShipment = () => {
|
|
|
|
|
+ let obj = {
|
|
|
|
|
+ text_search: CreateNewBOokingSearch.value,
|
|
|
|
|
+ vessel: VesselNametest.value,
|
|
|
|
|
+ eta_start: ETATimeList.value != null ? ETATimeList.value[0] : '',
|
|
|
|
|
+ eta_end: ETATimeList.value != null ? ETATimeList.value[1] : '',
|
|
|
|
|
+ ata_start: ATATimeList.value != null ? ATATimeList.value[0] : '',
|
|
|
|
|
+ ata_end: ATATimeList.value != null ? ATATimeList.value[1] : ''
|
|
|
|
|
+ }
|
|
|
|
|
+ bookingTableRef.value.searchTableData(obj)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 选择shipments获取address book
|
|
|
|
|
+const isrecommenddate = ref()
|
|
|
|
|
+const isConsistent = ref(false)
|
|
|
|
|
+// 判断date是否一致
|
|
|
|
|
+const areAllDateRangesSame = (date: any) => {
|
|
|
|
|
+ const firstRange = date[0].date_range
|
|
|
|
|
+ return date.every(item => {
|
|
|
|
|
+ const currentRange = item.date_range
|
|
|
|
|
+ if(currentRange.length === firstRange.length &&
|
|
|
|
|
+ currentRange.every((date, index) => date === firstRange[index])) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ isConsistent.value = true
|
|
|
|
|
+ RecommendateList.value = date.map(item => ({Hbol: item.Hbol}))
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+// 遍历日期
|
|
|
|
|
+const getDateRangeArray = (startDateStr, endDateStr) => {
|
|
|
|
|
+ if(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) => {
|
|
|
|
|
+ getAddressListData.value = {...val}
|
|
|
|
|
+ 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 = []
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 点击 Address Book
|
|
|
|
|
+const handleClickAddress = () => {
|
|
|
|
|
+ if(!isAddNewAddressVisible.value) {
|
|
|
|
|
+ ManageVisible.value = true
|
|
|
|
|
+ }
|
|
|
|
|
+ const nonDeletedAddresses = ManageAddressList.value.filter(
|
|
|
|
|
+ item => item.contact_type !== 'Delete'
|
|
|
|
|
+ )
|
|
|
|
|
+ if(a == undefined) {
|
|
|
|
|
+ $api
|
|
|
|
|
+ .getAddressBookList({
|
|
|
|
|
+ ...getAddressListData.value,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res: any) => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ const newAddresses = res.data.filter(
|
|
|
|
|
+ (apiAddr: any) =>
|
|
|
|
|
+ !nonDeletedAddresses.some(localAddr => localAddr.id === apiAddr.id)
|
|
|
|
|
+ )
|
|
|
|
|
+ ManageAddressList.value = [...nonDeletedAddresses, ...newAddresses]
|
|
|
|
|
+ ManageVisible.value = true
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//选择日期
|
|
|
|
|
+const changeDatePicker = (val:any) => {
|
|
|
|
|
+ if(specialDates.value.length != 0 ){
|
|
|
|
|
+ if(isConsistent.value) {
|
|
|
|
|
+ isRecommendDate.value = true
|
|
|
|
|
+ recommendateWarning.value = 'This date for following shipments is outside recommended period.'
|
|
|
|
|
+ isConsistent.value = false
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if(!specialDates.value.includes(val)) {
|
|
|
|
|
+ isRecommendDate.value = true
|
|
|
|
|
+ recommendateWarning.value = 'This date is outside our recommended period.'
|
|
|
|
|
+ isConsistent.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ isRecommendDate.value = true
|
|
|
|
|
+ recommendateWarning.value = 'This date for following shipments is outside recommended period.'
|
|
|
|
|
+ isConsistent.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+// 新增地址
|
|
|
|
|
+const handleClickAddNewAddress = () => {
|
|
|
|
|
+ currentEditAddress.value = null
|
|
|
|
|
+ AddNewAddressVisible.value = true
|
|
|
|
|
+ isAddNewAddressVisible.value = false
|
|
|
|
|
+ AddressLine1.value = ''
|
|
|
|
|
+ AddressLine2.value = ''
|
|
|
|
|
+ AddressLine3.value = ''
|
|
|
|
|
+ AddressLine4.value = ''
|
|
|
|
|
+ CountryCode.value = ''
|
|
|
|
|
+ CityCode.value = ''
|
|
|
|
|
+ PostalCode.value = ''
|
|
|
|
|
+ ContactPerson.value = ''
|
|
|
|
|
+ ContactNumber.value = ''
|
|
|
|
|
+}
|
|
|
|
|
+// 编辑地址
|
|
|
|
|
+const handleClickEditAddress = (val:any) => {
|
|
|
|
|
+ currentEditAddress.value = val
|
|
|
|
|
+ AddNewAddressVisible.value = true
|
|
|
|
|
+ AddressLine1.value = val.address_1
|
|
|
|
|
+ AddressLine2.value = val.address_2
|
|
|
|
|
+ AddressLine3.value = val.address_3
|
|
|
|
|
+ AddressLine4.value = val.address_4
|
|
|
|
|
+ CountryCode.value = val.country
|
|
|
|
|
+ CityCode.value = val.city
|
|
|
|
|
+ PostalCode.value = val.postal_code
|
|
|
|
|
+ ContactPerson.value = val.contact_person
|
|
|
|
|
+ ContactNumber.value = val.contact_number
|
|
|
|
|
+ const updatedAddress = {
|
|
|
|
|
+ ...val,
|
|
|
|
|
+ contact_type: val.contact_type == 'Unedit'? 'Modify' : 'Add'
|
|
|
|
|
+ }
|
|
|
|
|
+ updateAddressList(updatedAddress)
|
|
|
|
|
+}
|
|
|
|
|
+// 删除地址
|
|
|
|
|
+const handleDeleteAddress = (val: any) => {
|
|
|
|
|
+ const key = val.contact_type == 'Unedit' ? 'sync_key' : 'id'
|
|
|
|
|
+ console.log(val.contact_type)
|
|
|
|
|
+ if (val.contact_type !== 'Add') {
|
|
|
|
|
+ updateAddressList({ ...val, contact_type: 'Delete' })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ ManageAddressList.value = ManageAddressList.value.filter((item) => item[key] !== val[key])
|
|
|
|
|
+
|
|
|
|
|
+ if (selectedAddressList.value?.[key] === val[key]) {
|
|
|
|
|
+ selectedAddressList.value = undefined
|
|
|
|
|
+ isselectedAddress.value = null
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+// 保存
|
|
|
|
|
+const SubmitBooking = () => {
|
|
|
|
|
+ let datetwo = ''
|
|
|
|
|
+ if (a != undefined) {
|
|
|
|
|
+ const value = DateValue.value
|
|
|
|
|
+ const parts = value.includes(' ')
|
|
|
|
|
+ ? value.split(' ')[0].split('-')
|
|
|
|
|
+ : value.split('.')
|
|
|
|
|
+ datetwo = `${parts[1]}/${parts[2]}/${parts[0]}`
|
|
|
|
|
+ } else {
|
|
|
|
|
+ const parts = DateValue.value.split('.')
|
|
|
|
|
+ datetwo = `${parts[1]}/${parts[2]}/${parts[0]}`
|
|
|
|
|
+ }
|
|
|
|
|
+ let result = []
|
|
|
|
|
+ if(submitAddressList.value.length != 0) {
|
|
|
|
|
+ result = submitAddressList.value.filter(item =>
|
|
|
|
|
+ item.id === selectedAddressList.value.id ||
|
|
|
|
|
+ item.contact_type === 'Delete'
|
|
|
|
|
+ )
|
|
|
|
|
+ const key = selectedAddressList.value.contact_type == 'Unedit' ? 'sync_key' : 'id'
|
|
|
|
|
+ const objExists = submitAddressList.value.some(item => item[key] === selectedAddressList.value[key])
|
|
|
|
|
+ if (!objExists) {
|
|
|
|
|
+ result.push(selectedAddressList.value)
|
|
|
|
|
+ }
|
|
|
|
|
+ }else {
|
|
|
|
|
+ result.push(selectedAddressList.value)
|
|
|
|
|
+ }
|
|
|
|
|
+ let addressshipment = []
|
|
|
|
|
+ let addressshipmentinfo = {}
|
|
|
|
|
+ addressshipment = Object.keys(selectedAddressList.value)
|
|
|
|
|
+ addressshipment.forEach((item) => {
|
|
|
|
|
+ Object.assign(addressshipmentinfo, {
|
|
|
|
|
+ [item]: result.map((row) => row[item] )
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ $api
|
|
|
|
|
+ .SaveBookingList({
|
|
|
|
|
+ serial_no: a != undefined ? a : '',
|
|
|
|
|
+ ...checkShipmentsSubmitInfo.value,
|
|
|
|
|
+ ...addressshipmentinfo,
|
|
|
|
|
+ ...checkShipmentsSubmitInfoData,
|
|
|
|
|
+ delivery_time: DeliveryTime.value,
|
|
|
|
|
+ delivery_mode: modetypeValue.value,
|
|
|
|
|
+ delivery_date: datetwo,
|
|
|
|
|
+ delivery_address: delivery_address,
|
|
|
|
|
+ special_requirements: Requirements.value,
|
|
|
|
|
+ modify_reason: Modification.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>
|
|
|
|
|
+
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div class="Title">
|
|
|
|
|
+ <div v-if="a == undefined">Create New Booking</div>
|
|
|
|
|
+ <div v-else>Modify Booking</div>
|
|
|
|
|
+ <div class="flex">
|
|
|
|
|
+ <el-button @click="CancelRulesVisible = true" class="el-button--default create-button"><span class="font_family icon-icon_return_b"></span> Cancel</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 class="booking-info" v-if="a != undefined">
|
|
|
|
|
+ <div class="booking-no">
|
|
|
|
|
+ <span class="no">Booking No.{{ booking }}</span>
|
|
|
|
|
+ <v-tag class="tag" type="Pending Approval">{{ status }}</v-tag>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-divider v-if="a != undefined" style="margin: 8px 0" />
|
|
|
|
|
+ <!-- Select Shipments -->
|
|
|
|
|
+ <div class="select_shipments">
|
|
|
|
|
+ <div v-if="isNotClickAddress" class="alertIndormation">Please select same consignee with same delivery information </div>
|
|
|
|
|
+ <div style="margin-bottom: 16px;"><span class="stars_red">*</span>Select Shipments<span class="title_warning">*Please select items with the same consignee.</span></div>
|
|
|
|
|
+ <div class="shipments_search" v-if="a == undefined">
|
|
|
|
|
+ <div class="flex">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="Enter Booking/HBL/PO/Carrier Booking No. "
|
|
|
|
|
+ v-model="CreateNewBOokingSearch"
|
|
|
|
|
+ style="width: 34%;"
|
|
|
|
|
+ class="log_input"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #prefix>
|
|
|
|
|
+ <span class="iconfont_icon">
|
|
|
|
|
+ <svg class="iconfont icon_search" aria-hidden="true">
|
|
|
|
|
+ <use xlink:href="#icon-icon_search_b"></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ <div class="input-with-label" style="margin: 0 8px;">
|
|
|
|
|
+ <!-- <AutoSelect ASPlaceholder="Input Vessel Name" :ASValue="VesselName" @changeFocus="changeFocus"></AutoSelect> -->
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="Shipper"
|
|
|
|
|
+ v-model="ShipperValue"
|
|
|
|
|
+ @focus="changeFocustest('Shipper',true)"
|
|
|
|
|
+ @blur="changeFocustest('Shipper',false)"
|
|
|
|
|
+ class="log_input"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ <span v-if="showLabelShipper" class="border-label">Shipper</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="input-with-label" style="margin-right: 8px;">
|
|
|
|
|
+ <!-- <AutoSelect ASPlaceholder="Input Vessel Name" :ASValue="VesselName" @changeFocus="changeFocus"></AutoSelect> -->
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="Consignee"
|
|
|
|
|
+ v-model="ConsigneeValue"
|
|
|
|
|
+ @focus="changeFocustest('Consignee',true)"
|
|
|
|
|
+ @blur="changeFocustest('Consignee',false)"
|
|
|
|
|
+ class="log_input"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ <span v-if="showLabelConsignee" class="border-label">Consignee</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-button style="width: 108px;" class="el-button--dark create-button" @click="SearchShipment">Search</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex" style="margin-top: 8px;">
|
|
|
|
|
+ <div class="input-with-label">
|
|
|
|
|
+ <CalendarDate :isNeedFooter="false" :isETA="true"
|
|
|
|
|
+ CalendarWidth="100%"
|
|
|
|
|
+ @DateRangeChange="DateRangeChangeETA" @DateChangeFocus="DateChangeFocusETA"></CalendarDate>
|
|
|
|
|
+ <span v-if="showETAlabel" class="border-label">ETA</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="input-with-label" style="margin: 0 8px">
|
|
|
|
|
+ <CalendarDate :isNeedFooter="false"
|
|
|
|
|
+ CalendarWidth="100%" @DateRangeChange="DateRangeChangeATA" @DateChangeFocus="DateChangeFocusATA"></CalendarDate>
|
|
|
|
|
+ <span v-if="showataLabel" class="border-label">ATA</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="input-with-label" style="margin-right: 8px;">
|
|
|
|
|
+ <!-- <AutoSelect ASPlaceholder="Input Vessel Name" :ASValue="VesselName" @changeFocus="changeFocus"></AutoSelect> -->
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="Input Vessel Name"
|
|
|
|
|
+ v-model="VesselNametest"
|
|
|
|
|
+ @focus="changeFocustest('Vessel',true)"
|
|
|
|
|
+ @blur="changeFocustest('Vessel',false)"
|
|
|
|
|
+ class="log_input"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ <span v-if="showLabelVessel" class="border-label">Vessel Name</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="width: 108px;"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <NewbookingTable ref="bookingTableRef"
|
|
|
|
|
+ @selectChangeEvent="selectChangeEvent"
|
|
|
|
|
+ ></NewbookingTable>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- Delivery Information -->
|
|
|
|
|
+ <div class="Delivery">Delivery Information</div>
|
|
|
|
|
+ <div class="delivery_address">
|
|
|
|
|
+ <div class="deliverty_flex">
|
|
|
|
|
+ <div><span class="stars_red">*</span>Delivery Address</div>
|
|
|
|
|
+ <el-button :disabled="isNotClickAddress" @click="handleClickAddress" class="el-button--noborder--configuration"><span class="font_family icon-icon_location_b"></span> Address Book</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="empty_address" v-if="isselectedAddress == null">
|
|
|
|
|
+ <img :src="AddNewAddress" width="48" style="margin-bottom: 8px;" />
|
|
|
|
|
+ <el-button :disabled="isNotClickAddress" class="el-button--main" @click="AddNewAddressDelivery"> + Add New Address</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else class="addressradio" style="padding-bottom: 4px;">
|
|
|
|
|
+ <el-radio class="selectedAddress">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div class="radio_top">
|
|
|
|
|
+ <div class="radio_title">{{ selectedAddressList.contact_person }} ({{ selectedAddressList.contact_number }})</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="radio_content">
|
|
|
|
|
+ <div v-if="selectedAddressList.address_1 != null && selectedAddressList.address_1 != ''" class="radio_content_text">{{ selectedAddressList.address_1 }}</div>
|
|
|
|
|
+ <div v-if="selectedAddressList.address_2 != null && selectedAddressList.address_2 != ''" class="radio_content_text">{{ selectedAddressList.address_2 }}</div>
|
|
|
|
|
+ <div v-if="selectedAddressList.address_3 != null && selectedAddressList.address_3 != ''" class="radio_content_text">{{ selectedAddressList.address_3 }}</div>
|
|
|
|
|
+ <div v-if="selectedAddressList.address_4 != null && selectedAddressList.address_4 != ''" class="radio_content_text">{{ selectedAddressList.address_4 }}</div>
|
|
|
|
|
+ <div class="radio_content_text">{{ selectedAddressList.country }},{{ selectedAddressList.city }},{{ selectedAddressList.postal_code }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="delivery_type">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div class="delivery_type_title"><span class="stars_red">*</span>Mode Type</div>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="modetypeValue"
|
|
|
|
|
+ placeholder="Select"
|
|
|
|
|
+ :disabled="isNotClickAddress"
|
|
|
|
|
+ style="width: 240px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in ModeType"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="margin: 0 12px;">
|
|
|
|
|
+ <div class="delivery_type_title"><span class="stars_red">*</span>Preferred Delivery Date</div>
|
|
|
|
|
+ <a-date-picker
|
|
|
|
|
+ v-model:value ="DateValue"
|
|
|
|
|
+ :disabled="isNotClickAddress"
|
|
|
|
|
+ @change="changeDatePicker"
|
|
|
|
|
+ :showToday="false"
|
|
|
|
|
+ style="width: 240px;"
|
|
|
|
|
+ :format="userStore.dateFormat"
|
|
|
|
|
+ placeholder="Please Select Date"
|
|
|
|
|
+ valueFormat="YYYY.MM.DD"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #renderExtraFooter>
|
|
|
|
|
+ <div class="recommended"><div class="recommend_color"></div>Recommended delivery date</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #dateRender="{ current }">
|
|
|
|
|
+ <div class="ant-picker-cell-inner" :style="getCurrentStyle(current)">
|
|
|
|
|
+ {{ current.date() }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-date-picker>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div class="delivery_type_title"><span class="stars_red">*</span>Delivery Time</div>
|
|
|
|
|
+ <el-time-select
|
|
|
|
|
+ v-model="DeliveryTime"
|
|
|
|
|
+ :disabled="isNotClickAddress"
|
|
|
|
|
+ start="00:00"
|
|
|
|
|
+ step="00:30"
|
|
|
|
|
+ end="23:30"
|
|
|
|
|
+ style="width: 240px;"
|
|
|
|
|
+ prefix-icon=""
|
|
|
|
|
+ placeholder="Please Select Time"
|
|
|
|
|
+ ></el-time-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="delivery_type_title">Special Requirements</div>
|
|
|
|
|
+ <div class="flex" style="margin-top: 8px;">
|
|
|
|
|
+ <el-button :disabled="isNotClickAddress" class="el-button--grey" @click="handleclickbutton('Tail Lift Required')">Tail Lift Required</el-button>
|
|
|
|
|
+ <el-button :disabled="isNotClickAddress" class="el-button--grey" @click="handleclickbutton('Side Loading')">Side Loading</el-button>
|
|
|
|
|
+ <el-button :disabled="isNotClickAddress" class="el-button--grey" @click="handleclickbutton('Forklift Required')">Forklift Required</el-button>
|
|
|
|
|
+ <el-button :disabled="isNotClickAddress" class="el-button--grey" @click="handleclickbutton('Special Equipment')">Special Equipment</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-input :disabled="isNotClickAddress" v-model="Requirements" placeholder="Eenter any additional requirements or notes..." type="textarea" style="margin-top: 8px;" :rows="4"></el-input>
|
|
|
|
|
+ <div v-if="a!= undefined" class="delivery_type_title" style="margin-top: 16px;"><span class="stars_red">*</span>Modification Reason</div>
|
|
|
|
|
+ <el-input v-if="a!=undefined" :disabled="isNotClickAddress" v-model="Modification" placeholder="Eenter any additional requirements or notes..." type="textarea" style="margin-top: 8px;" :rows="4"></el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="ManageVisible"
|
|
|
|
|
+ width="640"
|
|
|
|
|
+ class="ManageDialog"
|
|
|
|
|
+ :show-close="false"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-radio-group v-model="Addressradio">
|
|
|
|
|
+ <el-radio v-for="(item, index) in ManageAddressList" :key="index" :value="index">
|
|
|
|
|
+ <div class="addressradio">
|
|
|
|
|
+ <div class="radio_top">
|
|
|
|
|
+ <div class="radio_title">{{ item.contact_person }}({{ item.contact_number }})</div>
|
|
|
|
|
+ <div v-if="item.create_user == 'Online_D_Address'">
|
|
|
|
|
+ <el-button @click="handleClickEditAddress(item)" class="el-button--blue"><span class="font_family icon-icon_edit_b"></span></el-button>
|
|
|
|
|
+ <el-button @click="handleDeleteAddress(item)" class="el-button--blue"><span class="font_family icon-icon_delete_b"></span></el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="radio_content">
|
|
|
|
|
+ <div v-if="item.address_1 != null && item.address_1 != ''" class="radio_content_text">{{ item.address_1 }}</div>
|
|
|
|
|
+ <div v-if="item.address_2 != null && item.address_2 != ''" class="radio_content_text">{{ item.address_2 }}</div>
|
|
|
|
|
+ <div v-if="item.address_3 != null && item.address_3 != ''" class="radio_content_text">{{ item.address_3 }}</div>
|
|
|
|
|
+ <div v-if="item.address_4 != null && item.address_4 != ''" class="radio_content_text">{{ item.address_4 }}</div>
|
|
|
|
|
+ <div class="radio_content_text">{{ item.country }},{{ item.city }},{{ item.postal_code }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ <template #header>
|
|
|
|
|
+ <div class="my-header">
|
|
|
|
|
+ <div class="header_Title">Manage Address</div>
|
|
|
|
|
+ <el-button @click="handleClickAddNewAddress" class="el-button--noborder--configuration">+ Add New Address</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <el-button class="el-button--default dialog-button" @click="ManageVisible = false">Cancel</el-button>
|
|
|
|
|
+ <el-button class="el-button--dark dialog-button" @click="changeAddressRadio">
|
|
|
|
|
+ OK
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="AddNewAddressVisible"
|
|
|
|
|
+ width="640"
|
|
|
|
|
+ title="Add New Delivery Address"
|
|
|
|
|
+ :show-close="false"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="diaolog_add_title"><span class="stars_red">*</span>Address</div>
|
|
|
|
|
+ <el-tooltip
|
|
|
|
|
+ class="box-item"
|
|
|
|
|
+ :visible="isShowLimitLine1"
|
|
|
|
|
+ effect="dark"
|
|
|
|
|
+ content="Maximum character limit reached (45 characters)"
|
|
|
|
|
+ placement="bottom"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input @input="handleAddressLine1" class="inputmargin2" placeholder="Line 1" v-model="AddressLine1">
|
|
|
|
|
+ <template #suffix>
|
|
|
|
|
+ <div class="character-counter" :class="{ 'limit-reached': isShowLimitLine1Style }">
|
|
|
|
|
+ {{ AddressLine1.length }}/45
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ <el-tooltip
|
|
|
|
|
+ class="box-item"
|
|
|
|
|
+ :visible="isShowLimitLine2"
|
|
|
|
|
+ effect="dark"
|
|
|
|
|
+ content="Maximum character limit reached (45 characters)"
|
|
|
|
|
+ placement="bottom"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input @input="handleAddressLine2" class="inputmargin2" placeholder="Line 2" v-model="AddressLine2">
|
|
|
|
|
+ <template #suffix>
|
|
|
|
|
+ <div class="character-counter" :class="{ 'limit-reached': isShowLimitLine2Style }">
|
|
|
|
|
+ {{ AddressLine2.length }}/45
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ <el-tooltip
|
|
|
|
|
+ class="box-item"
|
|
|
|
|
+ :visible="isShowLimitLine3"
|
|
|
|
|
+ effect="dark"
|
|
|
|
|
+ content="Maximum character limit reached (45 characters)"
|
|
|
|
|
+ placement="bottom"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input @input="handleAddressLine3" class="inputmargin2" placeholder="Line 3" v-model="AddressLine3">
|
|
|
|
|
+ <template #suffix>
|
|
|
|
|
+ <div class="character-counter" :class="{ 'limit-reached': isShowLimitLine3Style }">
|
|
|
|
|
+ {{ AddressLine3.length }}/45
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ <el-tooltip
|
|
|
|
|
+ class="box-item"
|
|
|
|
|
+ :visible="isShowLimitLine4"
|
|
|
|
|
+ effect="dark"
|
|
|
|
|
+ content="Maximum character limit reached (45 characters)"
|
|
|
|
|
+ placement="bottom"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input style="margin-bottom: 16px;" @input="handleAddressLine4" class="inputmargin2" placeholder="Line 4" v-model="AddressLine4">
|
|
|
|
|
+ <template #suffix>
|
|
|
|
|
+ <div class="character-counter" :class="{ 'limit-reached': isShowLimitLine4Style }">
|
|
|
|
|
+ {{ AddressLine4.length }}/45
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ <div class="flex">
|
|
|
|
|
+ <div style="width: 33%;">
|
|
|
|
|
+ <div class="diaolog_add_title"><span class="stars_red">*</span>Country Code</div>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="CountryCode"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ remote
|
|
|
|
|
+ @focus="getAddressCountryCityData('country')"
|
|
|
|
|
+ placeholder="Select Country"
|
|
|
|
|
+ :remote-method="querySearchCountry"
|
|
|
|
|
+ :loading="Countryloading"
|
|
|
|
|
+ class="inputmargin"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in Countryoptions"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="margin: 0 9px;width: 33%;">
|
|
|
|
|
+ <div class="diaolog_add_title"><span class="stars_red">*</span>City Code</div>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="CityCode"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ remote
|
|
|
|
|
+ @focus="getAddressCountryCityData('city')"
|
|
|
|
|
+ placeholder="Select City"
|
|
|
|
|
+ :remote-method="querySearchCity"
|
|
|
|
|
+ :loading="cityloading"
|
|
|
|
|
+ class="inputmargin"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in Cityoptions"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="width: 33%;">
|
|
|
|
|
+ <div class="diaolog_add_title"><span class="stars_red">*</span>Postal Code</div>
|
|
|
|
|
+ <el-input class="inputmargin" placeholder="Enter postal code" v-model="PostalCode"></el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="diaolog_add_title_bold">Contact Information</div>
|
|
|
|
|
+ <div class="flex">
|
|
|
|
|
+ <div style="margin-right: 9px;width: 50%;">
|
|
|
|
|
+ <div class="diaolog_add_title"><span class="stars_red">*</span>Contact Person</div>
|
|
|
|
|
+ <el-input style="margin-top: 4px;" placeholder="Name" v-model="ContactPerson"></el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="width: 50%;">
|
|
|
|
|
+ <div class="diaolog_add_title"><span class="stars_red">*</span>Contact Number</div>
|
|
|
|
|
+ <el-input style="margin-top: 4px;" placeholder="Mobile Numer" v-model="ContactNumber"></el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <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--dark dialog-button" @click=SaveNewAddress>
|
|
|
|
|
+ Save Address
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ <!-- 无站点权限弹框 -->
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="NoPermissionVisible"
|
|
|
|
|
+ :show-close="false"
|
|
|
|
|
+ align-center
|
|
|
|
|
+ class="notDialog"
|
|
|
|
|
+ width="480"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="flex_center">
|
|
|
|
|
+ <img :src="NotAvailable" width="100" />
|
|
|
|
|
+ <div class="alert_title">Destination Delivery Service Not Available</div>
|
|
|
|
|
+ <div class="alert_text">Destination delivery service is not yet available for your shipment destinations. To request this service, please contact the destination office first.</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <el-button style="width: 80px;" class="el-button--dark" @click="NoPermissionVisible = false">OK</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ <!-- 无符合条件弹框 -->
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="NoEligibleVisible"
|
|
|
|
|
+ :show-close="false"
|
|
|
|
|
+ align-center
|
|
|
|
|
+ class="notDialog"
|
|
|
|
|
+ width="480"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="flex_center">
|
|
|
|
|
+ <img :src="NotShipment" width="100" />
|
|
|
|
|
+ <div class="alert_title">No Eligible Shipments for Booking</div>
|
|
|
|
|
+ <div class="alert_text">Your shipments are currently outside the booking window. Eligible shipments will appear here when booking window opens.</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <el-button style="width: 80px;" class="el-button--dark" @click="NoEligibleVisible = false">OK</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </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">
|
|
|
|
|
+ <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>
|
|
|
|
|
+ <!-- 取消保存 -->
|
|
|
|
|
+ <el-dialog v-model="CancelRulesVisible" width="480">
|
|
|
|
|
+ <div style="font-weight: 400">You have unsaved changes.</div>
|
|
|
|
|
+ <div style="font-weight: 400">Are you sure you want to leave this page?</div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <el-button type="default" @click="CancelRulesVisible = false" style="width: 100px"
|
|
|
|
|
+ >Cancel</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button class="el-button--warning" @click="router.back()" style="width: 100px">
|
|
|
|
|
+ OK
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #header>
|
|
|
|
|
+ <div class="cancel_header">
|
|
|
|
|
+ <span class="iconfont_icon iconfont_warning">
|
|
|
|
|
+ <svg class="iconfont icon_warning" aria-hidden="true">
|
|
|
|
|
+ <use xlink:href="#icon-icon_tipsfilled_b"></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ Unsaved Changes
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ <!-- 當選擇非建議日期内的date時給出的提示 -->
|
|
|
|
|
+ <el-dialog v-model="isRecommendDate" width="480">
|
|
|
|
|
+ <div>{{ recommendateWarning }}</div>
|
|
|
|
|
+ <div style="margin-top: 4px;">Additional storage fees may apply.</div>
|
|
|
|
|
+ <div style="margin-top: 8px;">
|
|
|
|
|
+ <div class="Notice" v-for="(item, index) in RecommendateList" :key="index">HOBL: {{ item.Hbol }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer" style="justify-content: end;">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ class="el-button--warning"
|
|
|
|
|
+ @click="isRecommendDate = false"
|
|
|
|
|
+ style="width: 100px"
|
|
|
|
|
+ >
|
|
|
|
|
+ OK
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #header>
|
|
|
|
|
+ <div class="cancel_header">
|
|
|
|
|
+ <span class="iconfont_icon">
|
|
|
|
|
+ <svg class="iconfont iconfont_warning" aria-hidden="true">
|
|
|
|
|
+ <use xlink:href="#icon-icon_tipsfilled_b"></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ Additional Fees Notice
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+.Title {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ height: 68px;
|
|
|
|
|
+ border: 1px solid var(--color-border);
|
|
|
|
|
+ border-top: none;
|
|
|
|
|
+ border-width: 1px 0 1px 0;
|
|
|
|
|
+ font-size: var(--font-size-6);
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ padding: 0 24px;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+}
|
|
|
|
|
+.flex {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+}
|
|
|
|
|
+.deliverty_flex {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ margin-bottom: 4px;
|
|
|
|
|
+}
|
|
|
|
|
+.con-icon_submit_b {
|
|
|
|
|
+ transform: rotate(-45deg);
|
|
|
|
|
+}
|
|
|
|
|
+.create-button {
|
|
|
|
|
+ width: 115px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+}
|
|
|
|
|
+.select_shipments {
|
|
|
|
|
+ border: 1px solid var(--color-border);
|
|
|
|
|
+ margin: 17px 24px 12px 24px;
|
|
|
|
|
+ padding: 9px 16px 16px 16px;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+}
|
|
|
|
|
+.alertIndormation {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 35%;
|
|
|
|
|
+ top: 30%;
|
|
|
|
|
+ z-index: 1213;
|
|
|
|
|
+ background-color: var(--color-btn-default-dark-bg);
|
|
|
|
|
+ color: var(--color-btn-default-bg-color);
|
|
|
|
|
+ padding: 2px 4px;
|
|
|
|
|
+ border-radius: 3px;
|
|
|
|
|
+ box-shadow: 1px 1px 6px 0 rgba(0, 0, 0, 0.25);
|
|
|
|
|
+}
|
|
|
|
|
+.delivery_address {
|
|
|
|
|
+ border: 1px solid var(--color-border);
|
|
|
|
|
+ margin: 0 24px 12px 24px;
|
|
|
|
|
+ padding: 9px 16px 16px 16px;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+.stars_red {
|
|
|
|
|
+ color: var(--color-danger);
|
|
|
|
|
+}
|
|
|
|
|
+.title_warning {
|
|
|
|
|
+ margin-left: 8px;
|
|
|
|
|
+ color: var(--color-neutral-2);
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+.shipments_search {
|
|
|
|
|
+ margin: 0 0 8px 0;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.log_input .el-input__wrapper) {
|
|
|
|
|
+ box-shadow: 0 0 0 1px var(--color-select-border) inset;
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+}
|
|
|
|
|
+.input-with-label {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ width: 34%;
|
|
|
|
|
+}
|
|
|
|
|
+.border-label {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: -7px;
|
|
|
|
|
+ left: 10px;
|
|
|
|
|
+ background: white; /* 用背景色覆盖边框 */
|
|
|
|
|
+ padding: 0 5px;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: var(--color-neutral-2);
|
|
|
|
|
+ z-index: 1;
|
|
|
|
|
+}
|
|
|
|
|
+.vessel_input {
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-select__wrapper.is-filterable) {
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+}
|
|
|
|
|
+.Delivery {
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ margin: 11px 0 14px 24px;
|
|
|
|
|
+}
|
|
|
|
|
+.empty_address {
|
|
|
|
|
+ height: 122px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ border: 2px dashed #ED6D00;
|
|
|
|
|
+ background: rgba(237, 109, 0, 0.05);
|
|
|
|
|
+}
|
|
|
|
|
+.delivery_type {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ margin: 16px 0;
|
|
|
|
|
+}
|
|
|
|
|
+.delivery_type_title {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ margin-bottom: 4px;
|
|
|
|
|
+}
|
|
|
|
|
+.recommended {
|
|
|
|
|
+ background: #F5F7FA;
|
|
|
|
|
+ border-bottom: 1px solid var(--color-border);
|
|
|
|
|
+ height: 24px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding-left: 16px;
|
|
|
|
|
+ font-size: 10px;
|
|
|
|
|
+ color: var(--color-neutral-2);
|
|
|
|
|
+}
|
|
|
|
|
+.recommend_color {
|
|
|
|
|
+ width: 8px;
|
|
|
|
|
+ height: 8px;
|
|
|
|
|
+ border-radius: 1px;
|
|
|
|
|
+ opacity: 0.3;
|
|
|
|
|
+ background: #00A870;
|
|
|
|
|
+ margin-right: 4px;
|
|
|
|
|
+}
|
|
|
|
|
+.reco_button {
|
|
|
|
|
+ height: 56px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: end;
|
|
|
|
|
+ padding: 0 16px;
|
|
|
|
|
+}
|
|
|
|
|
+.recomend-button {
|
|
|
|
|
+ width: 80px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+}
|
|
|
|
|
+.el-button--grey {
|
|
|
|
|
+ padding: 10px 16px;
|
|
|
|
|
+ border-radius: 15px;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-textarea) {
|
|
|
|
|
+ .el-textarea__inner {
|
|
|
|
|
+ resize: none; // 去除右下角图标
|
|
|
|
|
+ padding: 5px 7px 5px 10px;
|
|
|
|
|
+ box-shadow: 0 0 0 1px var(--color-select-border) inset;
|
|
|
|
|
+ color: var(--color-neutral-1);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+.dialog-button {
|
|
|
|
|
+ width: 115px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+}
|
|
|
|
|
+.my-header {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ height: 48px;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.ManageDialog .el-dialog__header) {
|
|
|
|
|
+ padding: 0 16px;
|
|
|
|
|
+ height: 48px;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.ManageDialog) {
|
|
|
|
|
+ max-height: 800px;
|
|
|
|
|
+ overflow-y: scroll;
|
|
|
|
|
+}
|
|
|
|
|
+.header_Title {
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+}
|
|
|
|
|
+.addressradio {
|
|
|
|
|
+ background-color: #F8F9FD;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ padding: 13px 8px 16px 16px;
|
|
|
|
|
+}
|
|
|
|
|
+.radio_top {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+}
|
|
|
|
|
+.radio_title {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+}
|
|
|
|
|
+.radio_content_text {
|
|
|
|
|
+ color: var(--color-neutral-2);
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ height: 21px;
|
|
|
|
|
+}
|
|
|
|
|
+.radio_content {
|
|
|
|
|
+ margin-bottom: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-radio-group) {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-radio) {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ min-height: 32px;
|
|
|
|
|
+ margin-bottom: 8px;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ margin-right: 0;
|
|
|
|
|
+ height: fit-content;
|
|
|
|
|
+ line-height: 32px;
|
|
|
|
|
+ align-items: baseline;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.selectedAddress) {
|
|
|
|
|
+ align-items: start;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.selectedAddress .radio_title) {
|
|
|
|
|
+ margin-top: -8px;
|
|
|
|
|
+}
|
|
|
|
|
+.el-button--blue {
|
|
|
|
|
+ width: 24px;
|
|
|
|
|
+ height: 24px;
|
|
|
|
|
+}
|
|
|
|
|
+.diaolog_add_title {
|
|
|
|
|
+ color: var(--color-neutral-2);
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-input__wrapper) {
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+}
|
|
|
|
|
+.inputmargin {
|
|
|
|
|
+ margin: 4px 0 16px 0;
|
|
|
|
|
+}
|
|
|
|
|
+.inputmargin2 {
|
|
|
|
|
+ margin-top: 4px ;
|
|
|
|
|
+}
|
|
|
|
|
+.diaolog_add_title_bold {
|
|
|
|
|
+ color: var(--color-neutral-1);
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ margin-bottom: 11px;
|
|
|
|
|
+}
|
|
|
|
|
+.dialog-footer {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: end;
|
|
|
|
|
+}
|
|
|
|
|
+.flex_center {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ padding: 0 19px;
|
|
|
|
|
+}
|
|
|
|
|
+.alert_title {
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+}
|
|
|
|
|
+.alert_text {
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ line-height: 21px;
|
|
|
|
|
+ margin-top: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.notDialog .el-dialog__header) {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+}
|
|
|
|
|
+.iconfont_warning {
|
|
|
|
|
+ fill: var(--color-warning)
|
|
|
|
|
+}
|
|
|
|
|
+.Notice {
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ margin-top: 4px;
|
|
|
|
|
+}
|
|
|
|
|
+.booking-info {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ height: 48px;
|
|
|
|
|
+ padding: 0 16px;
|
|
|
|
|
+ margin: 17px 24px 8px 24px;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ background-image: var(--color-booking-info-linear-bg);
|
|
|
|
|
+
|
|
|
|
|
+ .booking-no {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ .no {
|
|
|
|
|
+ margin-top: 2px;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ line-height: 21px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .tag {
|
|
|
|
|
+ margin-left: 8px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .created-time {
|
|
|
|
|
+ margin-top: 8px;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: var(--color-neutral-2);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-select__wrapper.is-filterable) {
|
|
|
|
|
+ height: 32px !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.inputmargin .el-select__wrapper.is-filterable) {
|
|
|
|
|
+ height: 40px !important;
|
|
|
|
|
+}
|
|
|
|
|
+.character-counter {
|
|
|
|
|
+ color: var(--color-neutral-3);
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+.limit-reached {
|
|
|
|
|
+ color: var(--color-warning-2);
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|