|
|
@@ -225,6 +225,23 @@ const handleCloseRadio = (val: any) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 删除 Frequency tag
|
|
|
+const NotimethodsMil = ref()
|
|
|
+const NotimethodsCon = ref()
|
|
|
+const NotimethodsDep = ref()
|
|
|
+const NotimethodsETD = ref()
|
|
|
+const handleCloseMethods = (val: any) => {
|
|
|
+ if (val == 'Mil') {
|
|
|
+ NotimethodsMil.value.handleCloseMethods()
|
|
|
+ } else if (val == 'Con') {
|
|
|
+ NotimethodsCon.value.handleCloseMethods()
|
|
|
+ } else if (val == 'Dep') {
|
|
|
+ NotimethodsDep.value.handleCloseMethods()
|
|
|
+ } else {
|
|
|
+ NotimethodsETD.value.handleCloseMethods()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// methods 切换
|
|
|
const MilMethodsList = ref()
|
|
|
const ChangeMethodsAddMil = (val: any, type: any) => {
|
|
|
@@ -358,24 +375,28 @@ const SaveSuceessful = () => {
|
|
|
}
|
|
|
const Savesubscribe = () => {
|
|
|
let str = ''
|
|
|
+ missingmessage.value = ''
|
|
|
if (props.TitleType == 'Milestone') {
|
|
|
savesubscribeobj.rules_type = 'Milestone_Update'
|
|
|
if (
|
|
|
OceanCheckList.value == undefined ||
|
|
|
AirCheckList.value == undefined ||
|
|
|
+ OceanCheckList.value.length == 0 ||
|
|
|
+ AirCheckList.value.length == 0 ||
|
|
|
MilFrequencyList.value.length == 0 ||
|
|
|
+ MilMethodsList.value == undefined ||
|
|
|
MilMethodsList.value.length == 0
|
|
|
) {
|
|
|
- if (OceanCheckList.value == undefined) {
|
|
|
+ if (OceanCheckList.value == undefined || OceanCheckList.value.length == 0) {
|
|
|
missingmessage.value += 'Ocean Shipments, '
|
|
|
}
|
|
|
- if (AirCheckList.value == undefined) {
|
|
|
+ if (AirCheckList.value == undefined || AirCheckList.value.length == 0) {
|
|
|
missingmessage.value += 'Air Shipments, '
|
|
|
}
|
|
|
if (MilFrequencyList.value.length == 0) {
|
|
|
missingmessage.value += 'Notification Frequency, '
|
|
|
}
|
|
|
- if (MilMethodsList.value.length == 0) {
|
|
|
+ if (MilMethodsList.value.length == 0 || MilMethodsList.value == undefined) {
|
|
|
missingmessage.value += 'Notification Method, '
|
|
|
}
|
|
|
missingmessage.value = missingmessage.value.substring(0, missingmessage.value.length - 2)
|
|
|
@@ -396,22 +417,24 @@ const Savesubscribe = () => {
|
|
|
savesubscribeobj.rules_type = 'Container_Status_Update'
|
|
|
if (
|
|
|
ContainerOceanList.value == undefined ||
|
|
|
+ ContainerOceanList.value.length == 0 ||
|
|
|
ConFrequencyList.value.length == 0 ||
|
|
|
+ ConMethodsList.value == undefined ||
|
|
|
ConMethodsList.value.length == 0
|
|
|
) {
|
|
|
- if (ContainerOceanList.value == undefined) {
|
|
|
+ if (ContainerOceanList.value == undefined || ContainerOceanList.value.length == 0) {
|
|
|
missingmessage.value += 'Ocean Shipments, '
|
|
|
}
|
|
|
if (ConFrequencyList.value.length == 0) {
|
|
|
missingmessage.value += 'Notification Frequency, '
|
|
|
}
|
|
|
- if (ConMethodsList.value.length == 0) {
|
|
|
+ if (ConMethodsList.value.length == 0 || ConMethodsList.value == undefined) {
|
|
|
missingmessage.value += 'Notification Method, '
|
|
|
}
|
|
|
missingmessage.value = missingmessage.value.substring(0, missingmessage.value.length - 2)
|
|
|
UnableSaveVisible.value = true
|
|
|
} else {
|
|
|
- savesubscribeobj.ocean_ctnr_status = ContainerOceanList.value
|
|
|
+ savesubscribeobj.ocean_ctnr_status = ContainerOceanCode.value
|
|
|
str = 'Ocean Container: ' + ContainerOceanList.value.join(',')
|
|
|
savesubscribeobj.event_details = str
|
|
|
SaveSuceessful()
|
|
|
@@ -420,20 +443,23 @@ const Savesubscribe = () => {
|
|
|
savesubscribeobj.rules_type = 'Departure/Arrival_Delay'
|
|
|
if (
|
|
|
DelayedDeparturedList.value == undefined ||
|
|
|
+ DelayedDeparturedList.value.length == 0 ||
|
|
|
DelayedAirdList.value == undefined ||
|
|
|
+ DelayedAirdList.value.length == 0 ||
|
|
|
DepFrequencyList.value.length == 0 ||
|
|
|
+ DepMethodsList.value == undefined ||
|
|
|
DepMethodsList.value.length == 0
|
|
|
) {
|
|
|
- if (DelayedDeparturedList.value == undefined) {
|
|
|
+ if (DelayedDeparturedList.value == undefined || DelayedDeparturedList.value.length == 0) {
|
|
|
missingmessage.value += 'Ocean Shipments, '
|
|
|
}
|
|
|
- if (DelayedAirdList.value == undefined) {
|
|
|
+ if (DelayedAirdList.value == undefined || DelayedAirdList.value.length == 0) {
|
|
|
missingmessage.value += 'Air Shipments, '
|
|
|
}
|
|
|
if (DepFrequencyList.value.length == 0) {
|
|
|
missingmessage.value += 'Notification Frequency, '
|
|
|
}
|
|
|
- if (DepMethodsList.value.length == 0) {
|
|
|
+ if (DepMethodsList.value.length == 0 || DepMethodsList.value == undefined) {
|
|
|
missingmessage.value += 'Notification Method, '
|
|
|
}
|
|
|
missingmessage.value = missingmessage.value.substring(0, missingmessage.value.length - 2)
|
|
|
@@ -451,18 +477,19 @@ const Savesubscribe = () => {
|
|
|
ETDAirList.value == undefined ||
|
|
|
ETDAirList.value.length == 0 ||
|
|
|
ETDFrequencyList.value.length == 0 ||
|
|
|
+ ETDMethodsList.value == undefined ||
|
|
|
ETDMethodsList.value.length == 0
|
|
|
) {
|
|
|
- if (ETDOceanList.value == undefined) {
|
|
|
+ if (ETDOceanList.value == undefined || ETDOceanList.value.length == 0) {
|
|
|
missingmessage.value += 'Ocean Shipments, '
|
|
|
}
|
|
|
- if (ETDAirList.value == undefined) {
|
|
|
+ if (ETDAirList.value == undefined || ETDAirList.value.length == 0) {
|
|
|
missingmessage.value += 'Air Shipments, '
|
|
|
}
|
|
|
if (ETDFrequencyList.value.length == 0) {
|
|
|
missingmessage.value += 'Notification Frequency, '
|
|
|
}
|
|
|
- if (ETDMethodsList.value.length == 0) {
|
|
|
+ if (ETDMethodsList.value.length == 0 || ETDMethodsList.value == undefined) {
|
|
|
missingmessage.value += 'Notification Method, '
|
|
|
}
|
|
|
missingmessage.value = missingmessage.value.substring(0, missingmessage.value.length - 2)
|
|
|
@@ -485,12 +512,14 @@ const clearData = (val: any) => {
|
|
|
MilestoneOceanListChecked.value = []
|
|
|
MilestoneAirListChecked.value = []
|
|
|
handleCloseRadio('Mil')
|
|
|
+ handleCloseMethods('Mil')
|
|
|
} else if (val == 'Container_Status_Update') {
|
|
|
ContainerOceanList.value = []
|
|
|
ConFrequencyList.value = []
|
|
|
ConMethodsList.value = []
|
|
|
ContainerOceanListChecked.value = []
|
|
|
handleCloseRadio('Con')
|
|
|
+ handleCloseMethods('Con')
|
|
|
} else if (val == 'Departure/Arrival_Delay') {
|
|
|
DelayedDeparturedList.value = []
|
|
|
DelayedAirdList.value = []
|
|
|
@@ -499,12 +528,14 @@ const clearData = (val: any) => {
|
|
|
OceanDelayed.value.ClearData()
|
|
|
AirDelayed.value.ClearData()
|
|
|
handleCloseRadio('Dep')
|
|
|
+ handleCloseMethods('Dep')
|
|
|
} else {
|
|
|
ETDOceanList.value = []
|
|
|
ETDAirList.value = []
|
|
|
ETDFrequencyList.value = []
|
|
|
ETDMethodsList.value = []
|
|
|
handleCloseRadio('ETD')
|
|
|
+ handleCloseMethods('ETD')
|
|
|
OceanETD.value.ClearData()
|
|
|
AirETD.value.ClearData()
|
|
|
}
|
|
|
@@ -719,21 +750,25 @@ defineExpose({
|
|
|
<NotiMethods
|
|
|
v-if="props.TitleType == 'Milestone'"
|
|
|
:MethodsData="MethodsDataMil"
|
|
|
+ ref="NotimethodsMil"
|
|
|
@ChangeMethodsAdd="ChangeMethodsAddMil"
|
|
|
></NotiMethods>
|
|
|
<NotiMethods
|
|
|
v-if="props.TitleType == 'Container'"
|
|
|
:MethodsData="MethodsDataCon"
|
|
|
+ ref="NotimethodsCon"
|
|
|
@ChangeMethodsAdd="ChangeMethodsAddCon"
|
|
|
></NotiMethods>
|
|
|
<NotiMethods
|
|
|
v-if="props.TitleType == 'Departure'"
|
|
|
:MethodsData="MethodsDataDep"
|
|
|
+ ref="NotimethodsDep"
|
|
|
@ChangeMethodsAdd="ChangeMethodsAddDep"
|
|
|
></NotiMethods>
|
|
|
<NotiMethods
|
|
|
v-if="props.TitleType == 'ETDChange'"
|
|
|
:MethodsData="MethodsDataETD"
|
|
|
+ ref="NotimethodsETD"
|
|
|
@ChangeMethodsAdd="ChangeMethodsAddETD"
|
|
|
></NotiMethods>
|
|
|
</el-collapse-item>
|