diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue index 8a44325a..729979a6 100644 --- a/src/views/distribution/turndelivery/deliveryDiscuss.vue +++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue @@ -320,7 +320,7 @@ align="center" > @@ -1886,14 +1886,44 @@ const soclear=()=>{ SearchFu() } + +function scrollToElementWithPartialId(partialId) { + // 首先清空之前所有元素的颜色样式 + document.querySelectorAll('[id]').forEach(function(el) { + el.style.backgroundColor = ''; // 移除背景颜色 + el.style.color = ''; // 移除文字颜色 + }); + + // 现在开始搜索含有 partialId 的元素 + const allElements = document.querySelectorAll(`[id*="${partialId}"]`); + if (allElements.length > 0) { + // 获取第一个匹配的元素 + const targetElement = allElements[0]; + // 添加背景颜色和文字颜色 + targetElement.style.backgroundColor = '#ff0000'; // 设置背景颜色为红色 + targetElement.style.color = '#fff'; // 设置文字颜色为白色 + // 将匹配元素滚动到视野区域 + targetElement.scrollIntoView(); + } +} + // 编辑多功能搜索 const SearchFu = () => { + if(multifunctional.value){ + scrollToElementWithPartialId(multifunctional.value) + }else{ + document.querySelectorAll('[id]').forEach(function(el) { + el.style.backgroundColor = ''; // 移除背景颜色 + el.style.color = ''; // 移除文字颜色 + }); + } + + return if(multifunctional.value){ document.getElementById(multifunctional.value).scrollIntoView() } return console.log(soInpuState.value, '当前搜索状态'); - if (!multifunctional.value && !dataInfoTemp.value.length) { soInpuState.value = false; //重置搜索状态 ElMessage({ @@ -3050,7 +3080,12 @@ const SubmitCommercial = () => { width: 100px; } } + .static-class { - background-color: seagreen; + padding: 0 4px; + scroll-behavior: smooth; + background-color: #ff0000; + color: #fff; } + diff --git a/src/views/warehouse/parcelList/distributionParcelList.vue b/src/views/warehouse/parcelList/distributionParcelList.vue index 544eb224..a1cde114 100644 --- a/src/views/warehouse/parcelList/distributionParcelList.vue +++ b/src/views/warehouse/parcelList/distributionParcelList.vue @@ -450,10 +450,14 @@ export default { sortable: true, }, { - label: '配送车牌', prop: 'dvehicleName', - display: false, - hide: true, + label: '配送车牌', + type: 2, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, }, { prop: 'firsts',