|
@@ -0,0 +1,1110 @@
|
|
|
|
|
+<script lang="ts" setup>
|
|
|
|
|
+import { ref, watch } from 'vue'
|
|
|
|
|
+import RulesShipments from './components/RulesShipments.vue'
|
|
|
|
|
+import AddedrluesTag from './components/AddedrluesTag.vue'
|
|
|
|
|
+import DelayedType from './components/DelayedType.vue'
|
|
|
|
|
+import ETDShipments from './components/ETDShipments.vue'
|
|
|
|
|
+import ShipmentRange from './components/ShipmentRange.vue'
|
|
|
|
|
+import { defaultTimeZone } from '@/utils/timezone'
|
|
|
|
|
+import moment from 'moment-timezone'
|
|
|
|
|
+interface CheckboxItem {
|
|
|
|
|
+ value: string
|
|
|
|
|
+ label: string
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+interface Props {
|
|
|
|
|
+ SystemList: Object
|
|
|
|
|
+ TitleType: String
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const MilestoneOceanListInit = ref<CheckboxItem[]>([])
|
|
|
|
|
+const MilestoneAirListInit = ref<CheckboxItem[]>([])
|
|
|
|
|
+const ContainerOceanListInit = ref<CheckboxItem[]>([])
|
|
|
|
|
+const props = defineProps<Props>()
|
|
|
|
|
+let savesubscribeobj: any = {}
|
|
|
|
|
+
|
|
|
|
|
+const SystemList = ref(props.SystemList)
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => props.SystemList,
|
|
|
|
|
+ (current) => {
|
|
|
|
|
+ console.log(current)
|
|
|
|
|
+ SystemList.value = current
|
|
|
|
|
+ MilestoneOceanListInit.value = current['Milestone_Update'].OceanCheckBoxList
|
|
|
|
|
+ MilestoneAirListInit.value = current['Milestone_Update'].AirCheckBoxList
|
|
|
|
|
+ ContainerOceanListInit.value = current['Container_Status_Update'].CtnrCheckBoxList
|
|
|
|
|
+ }
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
|
|
+const RulesActive = ref(['SelectMilestone', 'NotificationFrequency', 'NotificationMethod'])
|
|
|
|
|
+const OceanCheckList = ref()
|
|
|
|
|
+const AirCheckList = ref()
|
|
|
|
|
+const ContainerOceanList = ref()
|
|
|
|
|
+const FrequencyList = ref()
|
|
|
|
|
+const IsFirstActive = ref(true)
|
|
|
|
|
+const IsTwoActive = ref(true)
|
|
|
|
|
+const IsThreeActive = ref(true)
|
|
|
|
|
+const radio = ref(0)
|
|
|
|
|
+const DailyTime = ref('')
|
|
|
|
|
+const WeeklyTime = ref('')
|
|
|
|
|
+const WeeklyDay = ref('')
|
|
|
|
|
+const WeekDay = ref([
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'Monday',
|
|
|
|
|
+ value: 'Monday'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'Tuesday',
|
|
|
|
|
+ value: 'Tuesday'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'Wednesday',
|
|
|
|
|
+ value: 'Wednesday'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'Thursday',
|
|
|
|
|
+ value: 'Thursday'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'Friday',
|
|
|
|
|
+ value: 'Friday'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'Saturday',
|
|
|
|
|
+ value: 'Saturday'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'Sunday',
|
|
|
|
|
+ value: 'Sunday'
|
|
|
|
|
+ }
|
|
|
|
|
+])
|
|
|
|
|
+const TimeZone = ref([
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC-08',
|
|
|
|
|
+ value: 'UTC-08'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC-07',
|
|
|
|
|
+ value: 'UTC-07'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC-06',
|
|
|
|
|
+ value: 'UTC-06'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC-05',
|
|
|
|
|
+ value: 'UTC-05'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC-04',
|
|
|
|
|
+ value: 'UTC-04'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC-03',
|
|
|
|
|
+ value: 'UTC-03'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC-02',
|
|
|
|
|
+ value: 'UTC-02'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC-01',
|
|
|
|
|
+ value: 'UTC-01'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC-00',
|
|
|
|
|
+ value: 'UTC-00'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+01',
|
|
|
|
|
+ value: 'UTC+01'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+02',
|
|
|
|
|
+ value: 'UTC+02'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+03',
|
|
|
|
|
+ value: 'UTC+03'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+04',
|
|
|
|
|
+ value: 'UTC+04'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+05',
|
|
|
|
|
+ value: 'UTC+05'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+05:30',
|
|
|
|
|
+ value: 'UTC+05:30'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+06',
|
|
|
|
|
+ value: 'UTC+06'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+07',
|
|
|
|
|
+ value: 'UTC+07'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+08',
|
|
|
|
|
+ value: 'UTC+08'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+09',
|
|
|
|
|
+ value: 'UTC+09'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+10',
|
|
|
|
|
+ value: 'UTC+10'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+11',
|
|
|
|
|
+ value: 'UTC+11'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'UTC+12',
|
|
|
|
|
+ value: 'UTC+12'
|
|
|
|
|
+ }
|
|
|
|
|
+])
|
|
|
|
|
+const TimeZoneDailySelect = ref()
|
|
|
|
|
+const TimeZoneWeeklySelect = ref()
|
|
|
|
|
+const CancelRulesVisible = ref(false)
|
|
|
|
|
+TimeZoneDailySelect.value = 'UTC' + moment().tz(moment.tz.guess()).format('Z').slice(0, 3)
|
|
|
|
|
+TimeZoneWeeklySelect.value = 'UTC' + moment().tz(moment.tz.guess()).format('Z').slice(0, 3)
|
|
|
|
|
+const isDaily = ref(false)
|
|
|
|
|
+const isWeekly = ref(false)
|
|
|
|
|
+const checkMethodList = ref()
|
|
|
|
|
+const DelayedDeparturedList = ref()
|
|
|
|
|
+const DelayedAirdList = ref()
|
|
|
|
|
+const ETDOceanList = ref()
|
|
|
|
|
+const ETDAirList = ref()
|
|
|
|
|
+const CreateRuleOceanCheckList = ref()
|
|
|
|
|
+const CreateRuleAirCheckList = ref()
|
|
|
|
|
+
|
|
|
|
|
+// 给tag list赋值
|
|
|
|
|
+const ChangeCheckOceanRules = (val: any) => {
|
|
|
|
|
+ OceanCheckList.value = val
|
|
|
|
|
+}
|
|
|
|
|
+const ChangeContainerRules = (val: any) => {
|
|
|
|
|
+ ContainerOceanList.value = val
|
|
|
|
|
+}
|
|
|
|
|
+const ChangeDeayedRules = (val: any) => {
|
|
|
|
|
+ DelayedDeparturedList.value = []
|
|
|
|
|
+ if (val.Departure != '') {
|
|
|
|
|
+ DelayedDeparturedList.value.push(val.Departure)
|
|
|
|
|
+ savesubscribeobj.ocean_atd_sub_etd = val.Departure.split(' ')[3]
|
|
|
|
|
+ savesubscribeobj.ocean_atd_sub_etd_unit = val.Departure.split(' ')[4]
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete savesubscribeobj.ocean_atd_sub_etd
|
|
|
|
|
+ delete savesubscribeobj.ocean_atd_sub_etd_unit
|
|
|
|
|
+ }
|
|
|
|
|
+ if (val.Arrival != '') {
|
|
|
|
|
+ DelayedDeparturedList.value.push(val.Arrival)
|
|
|
|
|
+ savesubscribeobj.ocean_ata_sub_eta = val.Departure.split(' ')[4]
|
|
|
|
|
+ savesubscribeobj.ocean_ata_sub_eta_unit = val.Departure.split(' ')[5]
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete savesubscribeobj.ocean_ata_sub_eta
|
|
|
|
|
+ delete savesubscribeobj.ocean_ata_sub_eta_unit
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+const ChangeAirRules = (val: any) => {
|
|
|
|
|
+ DelayedAirdList.value = []
|
|
|
|
|
+ if (val.Departure != '') {
|
|
|
|
|
+ DelayedAirdList.value.push(val.Departure)
|
|
|
|
|
+ savesubscribeobj.air_atd_sub_etd = val.Departure.split(' ')[3]
|
|
|
|
|
+ savesubscribeobj.air_atd_sub_etd_unit = val.Departure.split(' ')[4]
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete savesubscribeobj.air_atd_sub_etd
|
|
|
|
|
+ delete savesubscribeobj.air_atd_sub_etd_unit
|
|
|
|
|
+ }
|
|
|
|
|
+ if (val.Arrival != '') {
|
|
|
|
|
+ DelayedAirdList.value.push(val.Arrival)
|
|
|
|
|
+ savesubscribeobj.air_ata_sub_eta = val.Departure.split(' ')[4]
|
|
|
|
|
+ savesubscribeobj.air_ata_sub_eta_unit = val.Departure.split(' ')[5]
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete savesubscribeobj.air_ata_sub_eta
|
|
|
|
|
+ delete savesubscribeobj.air_ata_sub_eta_unit
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+const ChangeCheckAirRules = (val: any) => {
|
|
|
|
|
+ AirCheckList.value = val
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//选择create new rules
|
|
|
|
|
+const createList = ref()
|
|
|
|
|
+const ChangeCheckCreateRuleOceanRules = (val: any) => {
|
|
|
|
|
+ CreateRuleOceanCheckList.value = val
|
|
|
|
|
+}
|
|
|
|
|
+const ChangeCheckCreateRuleAirRules = (val: any) => {
|
|
|
|
|
+ CreateRuleAirCheckList.value = val
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+let createObj: any = {
|
|
|
|
|
+ Transportstr: '',
|
|
|
|
|
+ Timestr: ''
|
|
|
|
|
+}
|
|
|
|
|
+const changecheckCreateRules = (val: any) => {
|
|
|
|
|
+ createList.value = []
|
|
|
|
|
+ createObj.Transportstr = val
|
|
|
|
|
+ if (createObj.Transportstr != '') {
|
|
|
|
|
+ createList.value.push(createObj.Transportstr)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (createObj.Timestr != '') {
|
|
|
|
|
+ createList.value.push(createObj.Timestr)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+const ChangeCheckTimeRules = (val: any) => {
|
|
|
|
|
+ createList.value = []
|
|
|
|
|
+ createObj.Timestr = val
|
|
|
|
|
+ if (createObj.Transportstr != '') {
|
|
|
|
|
+ createList.value.push(createObj.Transportstr)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (createObj.Timestr != '') {
|
|
|
|
|
+ createList.value.push(createObj.Timestr)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+// 删除create tag
|
|
|
|
|
+const ShipmentRangeRef = ref()
|
|
|
|
|
+const handleCloseCreateRule = (val: any) => {
|
|
|
|
|
+ if (val.indexOf('ETD') != -1 || val.indexOf('ETA') != -1) {
|
|
|
|
|
+ createObj.Timestr = ''
|
|
|
|
|
+ } else if (val.indexOf('Transport') != -1) {
|
|
|
|
|
+ createObj.Transportstr = ''
|
|
|
|
|
+ }
|
|
|
|
|
+ ShipmentRangeRef.value.handleCloseCreateRule(val)
|
|
|
|
|
+}
|
|
|
|
|
+// 更改Frequency时间
|
|
|
|
|
+const ChangeFrequency = (val: any) => {
|
|
|
|
|
+ FrequencyList.value = []
|
|
|
|
|
+ let str: any = ''
|
|
|
|
|
+ if (val == 1) {
|
|
|
|
|
+ isDaily.value = false
|
|
|
|
|
+ isWeekly.value = false
|
|
|
|
|
+ str = 'Instant notification for each update'
|
|
|
|
|
+ FrequencyList.value.push(str)
|
|
|
|
|
+ savesubscribeobj.frequency_type = 'Instant'
|
|
|
|
|
+ savesubscribeobj.frequency_display = str
|
|
|
|
|
+ } else if (val == 2) {
|
|
|
|
|
+ isDaily.value = true
|
|
|
|
|
+ isWeekly.value = false
|
|
|
|
|
+ str = 'Daily, ' + DailyTime.value + ', ' + TimeZoneDailySelect.value
|
|
|
|
|
+ if (DailyTime.value != '' && TimeZoneDailySelect.value !== '') {
|
|
|
|
|
+ FrequencyList.value.push(str)
|
|
|
|
|
+ }
|
|
|
|
|
+ savesubscribeobj.frequency_type = 'Daily'
|
|
|
|
|
+ savesubscribeobj.daily_time = DailyTime.value
|
|
|
|
|
+ savesubscribeobj.daily_time_zone = TimeZoneDailySelect.value
|
|
|
|
|
+ savesubscribeobj.frequency_display = str
|
|
|
|
|
+ } else if (val == 3) {
|
|
|
|
|
+ isDaily.value = false
|
|
|
|
|
+ isWeekly.value = true
|
|
|
|
|
+ str = 'Weekly, ' + WeeklyDay.value + ', ' + WeeklyTime.value + ', ' + TimeZoneWeeklySelect.value
|
|
|
|
|
+ if (WeeklyDay.value != '' && WeeklyTime.value != '' && TimeZoneWeeklySelect.value !== '') {
|
|
|
|
|
+ FrequencyList.value.push(str)
|
|
|
|
|
+ }
|
|
|
|
|
+ savesubscribeobj.frequency_type = 'Weekly'
|
|
|
|
|
+ if (WeeklyDay.value == 'Monday') {
|
|
|
|
|
+ savesubscribeobj.weekly_week = 1
|
|
|
|
|
+ } else if (WeeklyDay.value == 'Tuesday') {
|
|
|
|
|
+ savesubscribeobj.weekly_week = 2
|
|
|
|
|
+ } else if (WeeklyDay.value == 'Wednesday') {
|
|
|
|
|
+ savesubscribeobj.weekly_week = 3
|
|
|
|
|
+ } else if (WeeklyDay.value == 'Thursday') {
|
|
|
|
|
+ savesubscribeobj.weekly_week = 4
|
|
|
|
|
+ } else if (WeeklyDay.value == 'Friday') {
|
|
|
|
|
+ savesubscribeobj.weekly_week = 5
|
|
|
|
|
+ } else if (WeeklyDay.value == 'Saturday') {
|
|
|
|
|
+ savesubscribeobj.weekly_week = 6
|
|
|
|
|
+ } else if (WeeklyDay.value == 'Sunday') {
|
|
|
|
|
+ savesubscribeobj.weekly_week = 0
|
|
|
|
|
+ }
|
|
|
|
|
+ savesubscribeobj.weekly_time = WeeklyTime.value
|
|
|
|
|
+ savesubscribeobj.weekly_time_zone = TimeZoneWeeklySelect.value
|
|
|
|
|
+ savesubscribeobj.frequency_display = str
|
|
|
|
|
+ } else {
|
|
|
|
|
+ isDaily.value = false
|
|
|
|
|
+ isWeekly.value = false
|
|
|
|
|
+ DailyTime.value = ''
|
|
|
|
|
+ WeeklyTime.value = ''
|
|
|
|
|
+ WeeklyDay.value = ''
|
|
|
|
|
+ delete savesubscribeobj.frequency_type
|
|
|
|
|
+ delete savesubscribeobj.daily_time
|
|
|
|
|
+ delete savesubscribeobj.daily_time_zone
|
|
|
|
|
+ delete savesubscribeobj.weekly_week
|
|
|
|
|
+ delete savesubscribeobj.weekly_time
|
|
|
|
|
+ delete savesubscribeobj.weekly_time_zone
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+const changeTime = (val: any) => {
|
|
|
|
|
+ if (val == 'Daily') {
|
|
|
|
|
+ ChangeFrequency(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ChangeFrequency(3)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+// 删除 Frequency tag
|
|
|
|
|
+const handleCloseRadio = () => {
|
|
|
|
|
+ radio.value = 0
|
|
|
|
|
+ ChangeFrequency(0)
|
|
|
|
|
+}
|
|
|
|
|
+const OceanDelayed = ref()
|
|
|
|
|
+const AirDelayed = ref()
|
|
|
|
|
+
|
|
|
|
|
+const handleCloseDelayed = (val: any) => {
|
|
|
|
|
+ OceanDelayed.value.closeDelayed(val)
|
|
|
|
|
+}
|
|
|
|
|
+const handleCloseAirDelayed = (val: any) => {
|
|
|
|
|
+ AirDelayed.value.closeDelayed(val)
|
|
|
|
|
+}
|
|
|
|
|
+// ETD Change
|
|
|
|
|
+const ChangeETDOceanRules = (val: any) => {
|
|
|
|
|
+ ETDOceanList.value = []
|
|
|
|
|
+ if (val.ETD != '') {
|
|
|
|
|
+ if (val.ETD.indexOf('≥') != -1) {
|
|
|
|
|
+ savesubscribeobj.ocean_etd_change = false
|
|
|
|
|
+ savesubscribeobj.ocean_etd_old_sub_new = val.ETD.split(' ')[6]
|
|
|
|
|
+ savesubscribeobj.ocean_etd_old_sub_new_unit = val.ETD.split(' ')[7]
|
|
|
|
|
+ } else {
|
|
|
|
|
+ savesubscribeobj.ocean_etd_change = true
|
|
|
|
|
+ }
|
|
|
|
|
+ ETDOceanList.value.push(val.ETD)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete savesubscribeobj.ocean_etd_change
|
|
|
|
|
+ delete savesubscribeobj.ocean_etd_old_sub_new
|
|
|
|
|
+ delete savesubscribeobj.ocean_etd_old_sub_new_unit
|
|
|
|
|
+ }
|
|
|
|
|
+ if (val.ETA != '') {
|
|
|
|
|
+ if (val.ETA.indexOf('≥') != -1) {
|
|
|
|
|
+ savesubscribeobj.ocean_eta_change = false
|
|
|
|
|
+ savesubscribeobj.ocean_eta_old_sub_new = val.ETD.split(' ')[6]
|
|
|
|
|
+ savesubscribeobj.ocean_eta_old_sub_new_unit = val.ETD.split(' ')[7]
|
|
|
|
|
+ } else {
|
|
|
|
|
+ savesubscribeobj.ocean_eta_change = true
|
|
|
|
|
+ }
|
|
|
|
|
+ ETDOceanList.value.push(val.ETA)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete savesubscribeobj.ocean_eta_change
|
|
|
|
|
+ delete savesubscribeobj.ocean_eta_old_sub_new
|
|
|
|
|
+ delete savesubscribeobj.ocean_eta_old_sub_new_unit
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+// 删除ETD tag
|
|
|
|
|
+const OceanETD = ref()
|
|
|
|
|
+const closeOceanETD = (val: any) => {
|
|
|
|
|
+ OceanETD.value.closeETD(val)
|
|
|
|
|
+}
|
|
|
|
|
+// ETA Change
|
|
|
|
|
+const ChangeETDAirRules = (val: any) => {
|
|
|
|
|
+ ETDAirList.value = []
|
|
|
|
|
+ if (val.ETD != '') {
|
|
|
|
|
+ if (val.ETD.indexOf('≥') != -1) {
|
|
|
|
|
+ savesubscribeobj.air_etd_change = false
|
|
|
|
|
+ savesubscribeobj.air_etd_old_sub_new = val.ETD.split(' ')[6]
|
|
|
|
|
+ savesubscribeobj.air_etd_old_sub_new_unit = val.ETD.split(' ')[7]
|
|
|
|
|
+ } else {
|
|
|
|
|
+ savesubscribeobj.air_etd_change = true
|
|
|
|
|
+ }
|
|
|
|
|
+ ETDAirList.value.push(val.ETD)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete savesubscribeobj.air_etd_change
|
|
|
|
|
+ delete savesubscribeobj.air_etd_old_sub_new
|
|
|
|
|
+ delete savesubscribeobj.air_etd_old_sub_new_unit
|
|
|
|
|
+ }
|
|
|
|
|
+ if (val.ETA != '') {
|
|
|
|
|
+ if (val.ETA.indexOf('≥') != -1) {
|
|
|
|
|
+ savesubscribeobj.air_eta_change = false
|
|
|
|
|
+ savesubscribeobj.air_eta_old_sub_new = val.ETD.split(' ')[6]
|
|
|
|
|
+ savesubscribeobj.air_eta_old_sub_new_unit = val.ETD.split(' ')[7]
|
|
|
|
|
+ } else {
|
|
|
|
|
+ savesubscribeobj.air_eta_change = true
|
|
|
|
|
+ }
|
|
|
|
|
+ ETDAirList.value.push(val.ETA)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete savesubscribeobj.air_eta_change
|
|
|
|
|
+ delete savesubscribeobj.air_eta_old_sub_new
|
|
|
|
|
+ delete savesubscribeobj.air_eta_old_sub_new_unit
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+// 删除ETA tag
|
|
|
|
|
+const AirETD = ref()
|
|
|
|
|
+const closeAirETD = (val: any) => {
|
|
|
|
|
+ AirETD.value.closeETD(val)
|
|
|
|
|
+}
|
|
|
|
|
+const emits = defineEmits(['UnsavedCollapse'])
|
|
|
|
|
+// 不保存修改的折叠面板
|
|
|
|
|
+const UnsavedCollapse = () => {
|
|
|
|
|
+ CancelRulesVisible.value = false
|
|
|
|
|
+ emits('UnsavedCollapse')
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 选中Method
|
|
|
|
|
+const changeMethod = (val: any) => {
|
|
|
|
|
+ if (val.indexOf('By Email') != -1) {
|
|
|
|
|
+ savesubscribeobj.method_by_email = true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ savesubscribeobj.method_by_email = false
|
|
|
|
|
+ }
|
|
|
|
|
+ if (val.indexOf('By System Message ') != -1) {
|
|
|
|
|
+ savesubscribeobj.method_by_message = true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ savesubscribeobj.method_by_message = false
|
|
|
|
|
+ }
|
|
|
|
|
+ if (val.length != 0) {
|
|
|
|
|
+ savesubscribeobj.method_display = val.map((e: any) => e.replace('By ', '')).join(',')
|
|
|
|
|
+ } else {
|
|
|
|
|
+ savesubscribeobj.method_display = ''
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 保存subscribe配置
|
|
|
|
|
+const Savesubscribe = () => {
|
|
|
|
|
+ let str = ''
|
|
|
|
|
+ if (props.TitleType == 'Milestone') {
|
|
|
|
|
+ savesubscribeobj.rules_type = 'Milestone_Update'
|
|
|
|
|
+ savesubscribeobj.ocean_milestone = OceanCheckList.value
|
|
|
|
|
+ savesubscribeobj.air_milestone = AirCheckList.value
|
|
|
|
|
+ str =
|
|
|
|
|
+ 'Ocean Milestones: ' +
|
|
|
|
|
+ OceanCheckList.value.join(',') +
|
|
|
|
|
+ ';\nAir Milestones: ' +
|
|
|
|
|
+ AirCheckList.value.join(',') +
|
|
|
|
|
+ ';'
|
|
|
|
|
+ } else if (props.TitleType == 'Container') {
|
|
|
|
|
+ savesubscribeobj.rules_type = 'Container_Status_Update'
|
|
|
|
|
+ savesubscribeobj.ocean_milestone = ContainerOceanList.value
|
|
|
|
|
+ str = 'Ocean Container: ' + ContainerOceanList.value.join(',')
|
|
|
|
|
+ } else if (props.TitleType == 'Departure') {
|
|
|
|
|
+ console.log(DelayedDeparturedList.value)
|
|
|
|
|
+ savesubscribeobj.rules_type = 'Departure/Arrival_Delay'
|
|
|
|
|
+ str = DelayedDeparturedList.value.join(';\n') + ';\n' + DelayedAirdList.value.join(';\n')
|
|
|
|
|
+ } else {
|
|
|
|
|
+ savesubscribeobj.rules_type = 'ETD/ETA_Change'
|
|
|
|
|
+ str = ETDOceanList.value.join(';\n') + ';\n' + ETDAirList.value.join(';\n')
|
|
|
|
|
+ }
|
|
|
|
|
+ savesubscribeobj.event_details = str
|
|
|
|
|
+ $api
|
|
|
|
|
+ .Savesubscribe({
|
|
|
|
|
+ ...savesubscribeobj
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res: any) => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ console.log(res.data)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="Rules_flex">
|
|
|
|
|
+ <div class="Rules_left">
|
|
|
|
|
+ <div class="Rules_collapse">
|
|
|
|
|
+ <el-collapse
|
|
|
|
|
+ v-model="RulesActive"
|
|
|
|
|
+ @change="IsFirstActive = !IsFirstActive"
|
|
|
|
|
+ v-if="props.TitleType == 'Milestone'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-collapse-item name="SelectMilestone">
|
|
|
|
|
+ <template #title>
|
|
|
|
|
+ <div class="Rules_Title">
|
|
|
|
|
+ <span class="iconfont_icon">
|
|
|
|
|
+ <svg class="iconfont" aria-hidden="true">
|
|
|
|
|
+ <use
|
|
|
|
|
+ :xlink:href="IsFirstActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
|
|
+ ></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span class="stars_red">*</span>Select Milestone
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <RulesShipments
|
|
|
|
|
+ Title="Ocean shipments"
|
|
|
|
|
+ @ChangeCheckRules="ChangeCheckOceanRules"
|
|
|
|
|
+ :CheckboxList="MilestoneOceanListInit"
|
|
|
|
|
+ ></RulesShipments>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <RulesShipments
|
|
|
|
|
+ Title="Air shipments"
|
|
|
|
|
+ @ChangeCheckRules="ChangeCheckAirRules"
|
|
|
|
|
+ :CheckboxList="MilestoneAirListInit"
|
|
|
|
|
+ ></RulesShipments>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ </el-collapse>
|
|
|
|
|
+ <el-collapse
|
|
|
|
|
+ v-model="RulesActive"
|
|
|
|
|
+ @change="IsFirstActive = !IsFirstActive"
|
|
|
|
|
+ v-if="props.TitleType == 'Container'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-collapse-item name="SelectMilestone">
|
|
|
|
|
+ <template #title>
|
|
|
|
|
+ <div class="Rules_Title">
|
|
|
|
|
+ <span class="iconfont_icon">
|
|
|
|
|
+ <svg class="iconfont" aria-hidden="true">
|
|
|
|
|
+ <use
|
|
|
|
|
+ :xlink:href="IsFirstActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
|
|
+ ></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span class="stars_red">*</span>Select Container Status
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <RulesShipments
|
|
|
|
|
+ Title="Ocean shipments"
|
|
|
|
|
+ @ChangeCheckRules="ChangeContainerRules"
|
|
|
|
|
+ :CheckboxList="ContainerOceanListInit"
|
|
|
|
|
+ ></RulesShipments>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ </el-collapse>
|
|
|
|
|
+ <el-collapse
|
|
|
|
|
+ v-model="RulesActive"
|
|
|
|
|
+ @change="IsFirstActive = !IsFirstActive"
|
|
|
|
|
+ v-if="props.TitleType == 'Departure'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-collapse-item name="SelectMilestone">
|
|
|
|
|
+ <template #title>
|
|
|
|
|
+ <div class="Rules_Title">
|
|
|
|
|
+ <span class="iconfont_icon">
|
|
|
|
|
+ <svg class="iconfont" aria-hidden="true">
|
|
|
|
|
+ <use
|
|
|
|
|
+ :xlink:href="IsFirstActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
|
|
+ ></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span class="stars_red">*</span>Select Delayed Type
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <DelayedType
|
|
|
|
|
+ Title="Ocean shipments"
|
|
|
|
|
+ ref="OceanDelayed"
|
|
|
|
|
+ @ChangeCheckRules="ChangeDeayedRules"
|
|
|
|
|
+ ></DelayedType>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <DelayedType
|
|
|
|
|
+ Title="Air shipments"
|
|
|
|
|
+ ref="AirDelayed"
|
|
|
|
|
+ @ChangeCheckRules="ChangeAirRules"
|
|
|
|
|
+ ></DelayedType>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ </el-collapse>
|
|
|
|
|
+ <el-collapse
|
|
|
|
|
+ v-model="RulesActive"
|
|
|
|
|
+ @change="IsFirstActive = !IsFirstActive"
|
|
|
|
|
+ v-if="props.TitleType == 'CreateRule'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-collapse-item name="SelectMilestone">
|
|
|
|
|
+ <template #title>
|
|
|
|
|
+ <div class="Rules_Title">
|
|
|
|
|
+ <span class="iconfont_icon">
|
|
|
|
|
+ <svg class="iconfont" aria-hidden="true">
|
|
|
|
|
+ <use
|
|
|
|
|
+ :xlink:href="IsFirstActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
|
|
+ ></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span class="stars_red">*</span>Shipment Range
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <ShipmentRange
|
|
|
|
|
+ ref="ShipmentRangeRef"
|
|
|
|
|
+ @ChangeCheckRules="changecheckCreateRules"
|
|
|
|
|
+ @ChangeCheckTimeRules="ChangeCheckTimeRules"
|
|
|
|
|
+ ></ShipmentRange>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ </el-collapse>
|
|
|
|
|
+ <el-collapse
|
|
|
|
|
+ v-model="RulesActive"
|
|
|
|
|
+ @change="IsFirstActive = !IsFirstActive"
|
|
|
|
|
+ v-if="props.TitleType == 'CreateRule'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-collapse-item name="SelectMilestone">
|
|
|
|
|
+ <template #title>
|
|
|
|
|
+ <div class="Rules_Title">
|
|
|
|
|
+ <span class="iconfont_icon">
|
|
|
|
|
+ <svg class="iconfont" aria-hidden="true">
|
|
|
|
|
+ <use
|
|
|
|
|
+ :xlink:href="IsFirstActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
|
|
+ ></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span class="stars_red">*</span>Select Milestone
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <RulesShipments
|
|
|
|
|
+ Title="Ocean shipments"
|
|
|
|
|
+ @ChangeCheckRules="ChangeCheckCreateRuleOceanRules"
|
|
|
|
|
+ ></RulesShipments>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <RulesShipments
|
|
|
|
|
+ Title="Air shipments"
|
|
|
|
|
+ @ChangeCheckRules="ChangeCheckCreateRuleAirRules"
|
|
|
|
|
+ ></RulesShipments>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ </el-collapse>
|
|
|
|
|
+ <el-collapse
|
|
|
|
|
+ v-model="RulesActive"
|
|
|
|
|
+ @change="IsFirstActive = !IsFirstActive"
|
|
|
|
|
+ v-if="props.TitleType == 'ETDChange'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-collapse-item name="SelectMilestone">
|
|
|
|
|
+ <template #title>
|
|
|
|
|
+ <div class="Rules_Title">
|
|
|
|
|
+ <span class="iconfont_icon">
|
|
|
|
|
+ <svg class="iconfont" aria-hidden="true">
|
|
|
|
|
+ <use
|
|
|
|
|
+ :xlink:href="IsFirstActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
|
|
+ ></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span class="stars_red">*</span>Select Delayed Type
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <ETDShipments
|
|
|
|
|
+ Title="Ocean shipments"
|
|
|
|
|
+ ref="OceanETD"
|
|
|
|
|
+ @ChangeCheckRules="ChangeETDOceanRules"
|
|
|
|
|
+ ></ETDShipments>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <ETDShipments
|
|
|
|
|
+ Title="Air shipments"
|
|
|
|
|
+ ref="AirETD"
|
|
|
|
|
+ @ChangeCheckRules="ChangeETDAirRules"
|
|
|
|
|
+ ></ETDShipments>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ </el-collapse>
|
|
|
|
|
+ <el-collapse
|
|
|
|
|
+ style="margin-top: 17px; margin-right: 16px"
|
|
|
|
|
+ v-model="RulesActive"
|
|
|
|
|
+ @change="IsTwoActive = !IsTwoActive"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-collapse-item name="NotificationFrequency">
|
|
|
|
|
+ <template #title>
|
|
|
|
|
+ <div class="Rules_Title">
|
|
|
|
|
+ <span class="iconfont_icon">
|
|
|
|
|
+ <svg class="iconfont" aria-hidden="true">
|
|
|
|
|
+ <use
|
|
|
|
|
+ :xlink:href="IsTwoActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
|
|
+ ></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span class="stars_red">*</span>Notification Frequency
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div style="margin-top: 11px">
|
|
|
|
|
+ <el-radio-group v-model="radio" @change="ChangeFrequency">
|
|
|
|
|
+ <el-radio :value="1">Instant notification for each update</el-radio>
|
|
|
|
|
+ <el-radio :value="2">
|
|
|
|
|
+ <div>Daily Summary</div>
|
|
|
|
|
+ <div class="Daily" v-if="isDaily">
|
|
|
|
|
+ <div class="Daily_left" style="margin-right: 8px">
|
|
|
|
|
+ Select Time
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-time-select
|
|
|
|
|
+ v-model="DailyTime"
|
|
|
|
|
+ start="00:00"
|
|
|
|
|
+ step="00:30"
|
|
|
|
|
+ end="23:30"
|
|
|
|
|
+ prefix-icon=""
|
|
|
|
|
+ @change="changeTime('Daily')"
|
|
|
|
|
+ placeholder="Select Time"
|
|
|
|
|
+ ></el-time-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="Daily_left">
|
|
|
|
|
+ Select Time Zone
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="TimeZoneDailySelect"
|
|
|
|
|
+ placeholder="Select Time Zone"
|
|
|
|
|
+ @change="changeTime('Daily')"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in TimeZone"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ <el-radio :value="3">
|
|
|
|
|
+ <div>Weekly Summary</div>
|
|
|
|
|
+ <div class="Daily" v-if="isWeekly">
|
|
|
|
|
+ <div class="Weekly_left">
|
|
|
|
|
+ Select Day
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="WeeklyDay"
|
|
|
|
|
+ @change="changeTime('Weekly')"
|
|
|
|
|
+ placeholder="Select Day"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in WeekDay"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="Weekly_left" style="margin: 0 8px">
|
|
|
|
|
+ Select Time
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-time-select
|
|
|
|
|
+ v-model="WeeklyTime"
|
|
|
|
|
+ @change="changeTime('Weekly')"
|
|
|
|
|
+ start="00:00"
|
|
|
|
|
+ step="00:30"
|
|
|
|
|
+ end="23:30"
|
|
|
|
|
+ prefix-icon=""
|
|
|
|
|
+ placeholder="Select time"
|
|
|
|
|
+ ></el-time-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="Weekly_left">
|
|
|
|
|
+ Select Time Zone
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="TimeZoneWeeklySelect"
|
|
|
|
|
+ placeholder="Select Time Zone"
|
|
|
|
|
+ @change="changeTime('Weekly')"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in TimeZone"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ </el-collapse>
|
|
|
|
|
+ <el-collapse
|
|
|
|
|
+ style="margin: 17px 0"
|
|
|
|
|
+ v-model="RulesActive"
|
|
|
|
|
+ @change="IsThreeActive = !IsThreeActive"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-collapse-item name="NotificationMethod">
|
|
|
|
|
+ <template #title>
|
|
|
|
|
+ <div class="Rules_Title">
|
|
|
|
|
+ <span class="iconfont_icon">
|
|
|
|
|
+ <svg class="iconfont" aria-hidden="true">
|
|
|
|
|
+ <use
|
|
|
|
|
+ :xlink:href="IsThreeActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
|
|
+ ></use>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span class="stars_red">*</span>Notification Method
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div style="margin-top: 11px">
|
|
|
|
|
+ <div class="Method">
|
|
|
|
|
+ <el-checkbox-group v-model="checkMethodList" @change="changeMethod">
|
|
|
|
|
+ <el-checkbox class="methodcheckbox" value="By Email">
|
|
|
|
|
+ <div>By Email</div>
|
|
|
|
|
+ <div class="methos_image"><img src="./images/illustration_email@2x.png" /></div>
|
|
|
|
|
+ </el-checkbox>
|
|
|
|
|
+ <el-checkbox class="methodcheckbox" value="By System Message ">
|
|
|
|
|
+ <div>By System Message</div>
|
|
|
|
|
+ <div class="methos_image">
|
|
|
|
|
+ <img src="./images/illustration_system massage@2x.png" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-checkbox>
|
|
|
|
|
+ </el-checkbox-group>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-item>
|
|
|
|
|
+ </el-collapse>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="Rules_right">
|
|
|
|
|
+ <div class="right_Title">Added Rules</div>
|
|
|
|
|
+ <AddedrluesTag
|
|
|
|
|
+ v-if="props.TitleType == 'CreateRule'"
|
|
|
|
|
+ :CheckedList="createList"
|
|
|
|
|
+ Title="Shipment Range"
|
|
|
|
|
+ @handleCloseRadio="handleCloseCreateRule"
|
|
|
|
|
+ ></AddedrluesTag>
|
|
|
|
|
+ <AddedrluesTag
|
|
|
|
|
+ :CheckedList="DelayedDeparturedList"
|
|
|
|
|
+ v-if="props.TitleType == 'Departure'"
|
|
|
|
|
+ @handleCloseRadio="handleCloseDelayed"
|
|
|
|
|
+ Title="Ocean Shipments"
|
|
|
|
|
+ ></AddedrluesTag>
|
|
|
|
|
+ <AddedrluesTag
|
|
|
|
|
+ v-if="props.TitleType == 'Milestone'"
|
|
|
|
|
+ :CheckedList="OceanCheckList"
|
|
|
|
|
+ Title="Ocean Shipments"
|
|
|
|
|
+ ></AddedrluesTag>
|
|
|
|
|
+ <AddedrluesTag
|
|
|
|
|
+ v-if="props.TitleType == 'CreateRule'"
|
|
|
|
|
+ :CheckedList="CreateRuleOceanCheckList"
|
|
|
|
|
+ Title="Ocean Shipments"
|
|
|
|
|
+ ></AddedrluesTag>
|
|
|
|
|
+ <AddedrluesTag
|
|
|
|
|
+ v-if="props.TitleType == 'Container'"
|
|
|
|
|
+ :CheckedList="ContainerOceanList"
|
|
|
|
|
+ Title="Ocean Shipments"
|
|
|
|
|
+ ></AddedrluesTag>
|
|
|
|
|
+ <AddedrluesTag
|
|
|
|
|
+ :CheckedList="ETDOceanList"
|
|
|
|
|
+ v-if="props.TitleType == 'ETDChange'"
|
|
|
|
|
+ Title="Ocean Shipments"
|
|
|
|
|
+ @handleCloseRadio="closeOceanETD"
|
|
|
|
|
+ ></AddedrluesTag>
|
|
|
|
|
+ <AddedrluesTag
|
|
|
|
|
+ :CheckedList="ETDAirList"
|
|
|
|
|
+ v-if="props.TitleType == 'ETDChange'"
|
|
|
|
|
+ @handleCloseRadio="closeAirETD"
|
|
|
|
|
+ Title="Air Shipments"
|
|
|
|
|
+ ></AddedrluesTag>
|
|
|
|
|
+ <AddedrluesTag
|
|
|
|
|
+ v-if="props.TitleType == 'CreateRule'"
|
|
|
|
|
+ :CheckedList="CreateRuleAirCheckList"
|
|
|
|
|
+ Title="Air Shipments"
|
|
|
|
|
+ ></AddedrluesTag>
|
|
|
|
|
+ <AddedrluesTag
|
|
|
|
|
+ :CheckedList="DelayedAirdList"
|
|
|
|
|
+ v-if="props.TitleType == 'Departure'"
|
|
|
|
|
+ @handleCloseRadio="handleCloseAirDelayed"
|
|
|
|
|
+ Title="Air Shipments"
|
|
|
|
|
+ ></AddedrluesTag>
|
|
|
|
|
+ <AddedrluesTag
|
|
|
|
|
+ v-if="props.TitleType == 'Milestone'"
|
|
|
|
|
+ :CheckedList="AirCheckList"
|
|
|
|
|
+ Title="Air Shipments"
|
|
|
|
|
+ ></AddedrluesTag>
|
|
|
|
|
+ <AddedrluesTag
|
|
|
|
|
+ :CheckedList="FrequencyList"
|
|
|
|
|
+ Title="Notification Frequency"
|
|
|
|
|
+ @handleCloseRadio="handleCloseRadio"
|
|
|
|
|
+ ></AddedrluesTag>
|
|
|
|
|
+ <AddedrluesTag :CheckedList="checkMethodList" Title="Notification Method"></AddedrluesTag>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="Rules_buttom" v-if="props.TitleType != 'CreateRule'">
|
|
|
|
|
+ <el-button class="el-button--dark rules_button" @click="Savesubscribe">Save</el-button>
|
|
|
|
|
+ <el-button @click="CancelRulesVisible = true" class="rules_button" type="default"
|
|
|
|
|
+ >Cancel</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-dialog v-model="CancelRulesVisible" title="Tips" width="480">
|
|
|
|
|
+ <div>You have unsaved changes.</div>
|
|
|
|
|
+ <div>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="UnsavedCollapse" 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>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+.Rules_flex {
|
|
|
|
|
+ padding: 0 0 0 8px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+}
|
|
|
|
|
+.Rules_left {
|
|
|
|
|
+ width: 60%;
|
|
|
|
|
+ border-right: 1px solid var(--color-user-config-title-bottom-border);
|
|
|
|
|
+}
|
|
|
|
|
+.Rules_right {
|
|
|
|
|
+ width: 40%;
|
|
|
|
|
+ background-color: var(--more-filters-background-color);
|
|
|
|
|
+}
|
|
|
|
|
+.right_Title {
|
|
|
|
|
+ color: var(--color-neutral-1);
|
|
|
|
|
+ padding: 9px 8px;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ border-bottom: 1px solid var(--color-user-config-title-bottom-border);
|
|
|
|
|
+ background-color: var(--color-drawer-body-bg);
|
|
|
|
|
+}
|
|
|
|
|
+.iconfont {
|
|
|
|
|
+ width: 16px;
|
|
|
|
|
+ height: 16px;
|
|
|
|
|
+ margin-right: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.Rules_Title) {
|
|
|
|
|
+ color: var(--color-neutral-1);
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ height: 22px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+}
|
|
|
|
|
+.stars_red {
|
|
|
|
|
+ color: var(--color-danger);
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-collapse-item__header) {
|
|
|
|
|
+ height: 25px !important;
|
|
|
|
|
+ margin: 14px 0 0 0 !important;
|
|
|
|
|
+ border: none !important;
|
|
|
|
|
+ padding: 0 !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-collapse-item__header):hover {
|
|
|
|
|
+ background-color: #fff !important;
|
|
|
|
|
+ border: none !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-collapse-item__arrow) {
|
|
|
|
|
+ width: 0 !important;
|
|
|
|
|
+ height: 0 !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-icon svg) {
|
|
|
|
|
+ width: 0 !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-collapse-item__header.is-active) {
|
|
|
|
|
+ background-color: transparent !important;
|
|
|
|
|
+ border-color: transparent !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-collapse-item__arrow.is-active) {
|
|
|
|
|
+ transform: rotate(-180deg) !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.Ocean_collapse .el-collapse-item__arrow) {
|
|
|
|
|
+ width: 16px !important;
|
|
|
|
|
+ height: 16px !important;
|
|
|
|
|
+ background-image: url('../src/images/icon_expand.png') !important;
|
|
|
|
|
+ background-size: contain;
|
|
|
|
|
+ background-repeat: no-repeat;
|
|
|
|
|
+ transform: rotate(0);
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.Ocean_collapse .el-collapse-item__header) {
|
|
|
|
|
+ background-color: #fff !important;
|
|
|
|
|
+ padding: 0 8px !important;
|
|
|
|
|
+ height: 40px !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.Ocean_collapse .el-collapse-item) {
|
|
|
|
|
+ background-color: var(--color-dialog-header-bg);
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.Ocean_collapse .el-collapse-item__wrap) {
|
|
|
|
|
+ padding: 0 8px !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.Ocean_collapse .el-collapse-item__header.is-active) {
|
|
|
|
|
+ background-color: var(--color-dialog-header-bg) !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-checkbox__input.is-checked + .el-checkbox__label) {
|
|
|
|
|
+ color: var(--color-neutral-1);
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-radio-group) {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-radio) {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ min-height: 32px;
|
|
|
|
|
+ border: 1px solid var(--color-select-border);
|
|
|
|
|
+ margin-bottom: 4px;
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ padding: 0 8px;
|
|
|
|
|
+ margin-right: 0;
|
|
|
|
|
+ height: fit-content;
|
|
|
|
|
+ line-height: 32px;
|
|
|
|
|
+ align-items: start;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-radio__input.is-checked + .el-radio__label) {
|
|
|
|
|
+ color: var(--color-neutral-1);
|
|
|
|
|
+}
|
|
|
|
|
+.Daily {
|
|
|
|
|
+ margin: 0 0 9px 0;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+}
|
|
|
|
|
+.Daily_left {
|
|
|
|
|
+ color: var(--color-neutral-2);
|
|
|
|
|
+ width: 50%;
|
|
|
|
|
+}
|
|
|
|
|
+.Weekly_left {
|
|
|
|
|
+ color: var(--color-neutral-2);
|
|
|
|
|
+ width: 33%;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-select__icon.el-icon svg) {
|
|
|
|
|
+ width: 1em !important;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-select__wrapper.is-filterable) {
|
|
|
|
|
+ padding-left: 7px;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-radio__inner) {
|
|
|
|
|
+ margin-top: 7px;
|
|
|
|
|
+}
|
|
|
|
|
+.methodcheckbox {
|
|
|
|
|
+ align-items: start;
|
|
|
|
|
+ height: fit-content;
|
|
|
|
|
+ width: 49%;
|
|
|
|
|
+ margin-right: 5px;
|
|
|
|
|
+ background-color: var(--color-dialog-header-bg);
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ padding: 11px 0 0 13px;
|
|
|
|
|
+}
|
|
|
|
|
+.methos_image {
|
|
|
|
|
+ margin: 9px 0;
|
|
|
|
|
+}
|
|
|
|
|
+.Rules_buttom {
|
|
|
|
|
+ padding: 8px;
|
|
|
|
|
+ border-top: 1px solid var(--color-border-1);
|
|
|
|
|
+}
|
|
|
|
|
+.rules_button {
|
|
|
|
|
+ width: 100px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+}
|
|
|
|
|
+.cancel_header {
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: var(--color-neutral-1);
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+}
|
|
|
|
|
+.icon_warning {
|
|
|
|
|
+ width: 22px;
|
|
|
|
|
+ height: 22px;
|
|
|
|
|
+ margin-right: 0;
|
|
|
|
|
+ fill: var(--color-btn-warning-bg);
|
|
|
|
|
+}
|
|
|
|
|
+.iconfont_warning {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(header.el-dialog__header) {
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(footer.el-dialog__footer) {
|
|
|
|
|
+ border-top: none;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.el-collapse) {
|
|
|
|
|
+ margin-right: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|