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

2
src/views/aftersales/aftersalesWorkOrder.vue

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

Loading…
Cancel
Save