Browse Source

商配页面新增搜索

pre-production
马远东 1 year ago
parent
commit
7d097710eb
  1. 16
      src/components/tablecmt/tablecmt.vue
  2. 2
      src/views/aftersales/aftersalesWorkOrder.vue
  3. 7
      src/views/distribution/turndelivery/deliveryDiscuss.vue

16
src/components/tablecmt/tablecmt.vue

@ -24,6 +24,7 @@
:sortable="column.sortable" :sortable="column.sortable"
:selectable="isselectfun" :selectable="isselectfun"
v-show="column.head" v-show="column.head"
> >
<!-- <template #header> <!-- <template #header>
<el-text class="mx-1">{{ column.label }}</el-text> <el-text class="mx-1">{{ column.label }}</el-text>
@ -85,6 +86,11 @@
<template #default="scope"> <template #default="scope">
<el-text <el-text
class="mx-2 tabculconte" class="mx-2 tabculconte"
:class="scope.row[column.prop] == props.searchInput && scope.row[column.prop]
? 'static-class'
: ''
"
:id="scope.row[column.prop]"
v-if="Number(column.type) < 6 && Number(column.type) > 0" v-if="Number(column.type) < 6 && Number(column.type) > 0"
>{{ scope.row[column.prop] }}</el-text >{{ scope.row[column.prop] }}</el-text
> >
@ -282,6 +288,10 @@ let props = defineProps({
type: Array as PropType<TableColumnType[]>, type: Array as PropType<TableColumnType[]>,
required: true, required: true,
}, },
searchInput:{
type: String,
required: false,
},
tableData: { tableData: {
type: Array as PropType<TableDataType[]>, type: Array as PropType<TableDataType[]>,
required: true, required: true,
@ -789,4 +799,10 @@ defineExpose({ handleCheckSelect });
background-color: var(--el-fill-color-light) !important; background-color: var(--el-fill-color-light) !important;
} }
} }
.static-class {
padding: 0 4px;
scroll-behavior: smooth;
background-color: #ff0000;
color: #fff;
}
</style> </style>

2
src/views/aftersales/aftersalesWorkOrder.vue

@ -3747,7 +3747,7 @@ $_exportAftersalesWorkOrder(dataID).then(res => {
const currentDate = new Date(); const currentDate = new Date();
const formattedDate = `${currentDate.getFullYear()}${(currentDate.getMonth() + 1).toString().padStart(2, '0')}${currentDate.getDate().toString().padStart(2, '0')}${currentDate.getHours().toString().padStart(2, '0')}${currentDate.getMinutes().toString().padStart(2, '0')}${currentDate.getSeconds().toString().padStart(2, '0')}`; const formattedDate = `${currentDate.getFullYear()}${(currentDate.getMonth() + 1).toString().padStart(2, '0')}${currentDate.getDate().toString().padStart(2, '0')}${currentDate.getHours().toString().padStart(2, '0')}${currentDate.getMinutes().toString().padStart(2, '0')}${currentDate.getSeconds().toString().padStart(2, '0')}`;
console.log(res, '导出'); console.log(res, '导出');
downloadXls(res.data, `导出异常工单数据${formattedDate}.xlsx`); downloadXls(res.data, `导出工单数据${formattedDate}.xlsx`);
}); });

7
src/views/distribution/turndelivery/deliveryDiscuss.vue

@ -545,7 +545,12 @@
@inputTxt="inputsc" @inputTxt="inputsc"
@selection="TCselectAll" @selection="TCselectAll"
:isselectfun="ProhibitSelection" :isselectfun="ProhibitSelection"
:searchInput="multifunctional"
> >
<template #default="slotProps">
</template>
</tablecmt> </tablecmt>
<!-- 表格翻页功能 --> <!-- 表格翻页功能 -->
<div class="flex-c-sb"> <div class="flex-c-sb">
@ -1943,6 +1948,8 @@ function scrollToElementWithinTableRow(partialIdString) {
} }
// //
const SearchFu = () => { const SearchFu = () => {
console.log(multifunctional.value,'搜索的参数值');
if (multifunctional.value) { if (multifunctional.value) {
scrollToElementWithinTableRow(multifunctional.value); scrollToElementWithinTableRow(multifunctional.value);
} else { } else {

Loading…
Cancel
Save