|
|
@@ -457,31 +457,50 @@ const changeAutoSelectVal = (val: any, value: any) => {
|
|
|
}
|
|
|
// 点击search
|
|
|
const emit = defineEmits(['MoreFiltersSearch', 'clearMoreFiltersTags'])
|
|
|
+const errorList: any = ref({
|
|
|
+ partyorigin: false,
|
|
|
+ partydestination: false,
|
|
|
+ partysales: false
|
|
|
+})
|
|
|
const SearchMore = () => {
|
|
|
- // 判断是否有验证样式
|
|
|
- const input_change = document.getElementsByClassName('input_change')
|
|
|
+ console.log(AddDateType.value)
|
|
|
if (AddDateType.value.length) {
|
|
|
- AddDateType.value.forEach((item: any, index: any) => {
|
|
|
+ AddDateType.value.forEach((item: any) => {
|
|
|
if (item.partyType != '' && item.partyname.length == 0) {
|
|
|
- item.isshowVerfication = true
|
|
|
- verification.value = 'Please input Party Details'
|
|
|
- input_change[index].classList.add('AlertInput')
|
|
|
- } else {
|
|
|
- item.isshowVerfication = false
|
|
|
- input_change[index].classList.remove('AlertInput')
|
|
|
+ if (item.partyType == 'Origin Agent') {
|
|
|
+ errorList.value.partyorigin = true
|
|
|
+ } else if (item.partyType == 'Destination Agent') {
|
|
|
+ errorList.value.partydestination = true
|
|
|
+ } else {
|
|
|
+ errorList.value.partysales = true
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
- const AlertInput = document.getElementsByClassName('AlertInput')
|
|
|
- if (AlertInput.length == 0) {
|
|
|
- // 传数据给父组件
|
|
|
- emit('MoreFiltersSearch', MoreFiltersObj, MoreFiltersObj2)
|
|
|
- drawer.value = false
|
|
|
- }
|
|
|
- } else {
|
|
|
- // 传数据给父组件
|
|
|
- emit('MoreFiltersSearch', MoreFiltersObj, MoreFiltersObj2)
|
|
|
- drawer.value = false
|
|
|
}
|
|
|
+ // 判断是否有验证样式
|
|
|
+ // const input_change = document.getElementsByClassName('input_change')
|
|
|
+ // if (AddDateType.value.length) {
|
|
|
+ // AddDateType.value.forEach((item: any, index: any) => {
|
|
|
+ // if (item.partyType != '' && item.partyname.length == 0) {
|
|
|
+ // item.isshowVerfication = true
|
|
|
+ // verification.value = 'Please input Party Details'
|
|
|
+ // input_change[index].classList.add('AlertInput')
|
|
|
+ // } else {
|
|
|
+ // item.isshowVerfication = false
|
|
|
+ // input_change[index].classList.remove('AlertInput')
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // const AlertInput = document.getElementsByClassName('AlertInput')
|
|
|
+ // if (AlertInput.length == 0) {
|
|
|
+ // // 传数据给父组件
|
|
|
+ // emit('MoreFiltersSearch', MoreFiltersObj, MoreFiltersObj2)
|
|
|
+ // drawer.value = false
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // // 传数据给父组件
|
|
|
+ // emit('MoreFiltersSearch', MoreFiltersObj, MoreFiltersObj2)
|
|
|
+ // drawer.value = false
|
|
|
+ // }
|
|
|
}
|
|
|
// 清除
|
|
|
const clearrest = () => {
|