Browse Source

搜索

dev-xx
马远东 1 year ago
parent
commit
a8d8e088de
  1. 56
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  2. 4
      vite.config.js

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

@ -267,6 +267,16 @@
<el-button type="primary" @click="AddInfo" <el-button type="primary" @click="AddInfo"
><el-icon><Plus /></el-icon> </el-button ><el-icon><Plus /></el-icon> </el-button
> >
<div class="el_multifunctional">
<el-input
v-model="multifunctional"
placeholder="请输入要搜索的值"
clearable
/>
<el-button type="primary" @click="SearchFu"
><el-icon><Plus /></el-icon></el-button
>
</div>
</div> </div>
</div> </div>
<!-- 顶部结束 --> <!-- 顶部结束 -->
@ -309,11 +319,14 @@
align="center" align="center"
> >
<template #default="props"> <template #default="props">
<span>{{ props.row[item.prop] ? props.row[item.prop] : '/' }}</span> <span :class="props.row[item.prop]=='state'?'.static-class':''">{{ props.row[item.prop] ? props.row[item.prop] : '/' }}</span>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-if="item.type === 2"> <template v-if="item.type === 2">
<el-table-column <el-table-column
v-if="item.head" v-if="item.head"
@ -814,6 +827,7 @@ const data = ref([]); // 表格数据
const wrapData = ref([]); // const wrapData = ref([]); //
const wrapLoading = ref(false); // const wrapLoading = ref(false); //
const dataInfo = ref([]); // const dataInfo = ref([]); //
// const dataInfoTemp=ref([]);//
const dataTmp = ref([]); // const dataTmp = ref([]); //
const TabHeight = ref(230); // const TabHeight = ref(230); //
const TCTabHeight = ref(600); // const TCTabHeight = ref(600); //
@ -843,6 +857,7 @@ const SjTc = ref(false); //司机信息弹窗
const editLoading = ref(false); // const editLoading = ref(false); //
const state = ref(false); // const state = ref(false); //
const tableRefs = ref(null); // const tableRefs = ref(null); //
const multifunctional = ref(''); //
const dataId = ref(null); //ID,ID const dataId = ref(null); //ID,ID
const wrapDataInfo = ref([]); // const wrapDataInfo = ref([]); //
const RouteId = ref(null); //ID const RouteId = ref(null); //ID
@ -1978,6 +1993,29 @@ const Entering = val => {
isZeroTable.value = res.data.data; isZeroTable.value = res.data.data;
}); });
}; };
//
const SearchFu = () => {
console.log('多功能搜索功能');
console.log(dataInfo.value, '当前订单');
let st= dataInfo.value.filter(item => {
return Object.values(item).some(val => {
if (typeof val === 'string') {
return val.includes(multifunctional.value);
}
return false;
});
});
st.forEach(item=>{
item.state=true;
})
console.log(st, '搜索结果');
};
// //
const QuantityEntry = val => { const QuantityEntry = val => {
dataId.value = findIndexById(val.id); // dataId.value = findIndexById(val.id); //
@ -2536,6 +2574,7 @@ const SubmitCommercial = () => {
justify-content: space-between; justify-content: space-between;
} }
.el-Cart-button-left { .el-Cart-button-left {
width: 100%;
:deep(button) { :deep(button) {
padding: 0 14px; padding: 0 14px;
min-width: 70px; min-width: 70px;
@ -2943,4 +2982,19 @@ const SubmitCommercial = () => {
margin-top: 26px; margin-top: 26px;
} }
} }
.el_multifunctional {
display: flex;
align-items: center;
justify-content: space-between;
width: 24%;
.el-input {
margin-right: 4px;
}
button {
width: 100px;
}
}
.static-class {
background-color: seagreen;
}
</style> </style>

4
vite.config.js

@ -23,7 +23,7 @@ export default ({ mode, command }) => {
// 新zyc // 新zyc
// target: 'http://192.168.6.116:8777', // target: 'http://192.168.6.116:8777',
// target: 'http://192.168.6.122:8777', // target: 'http://192.168.6.122:8777',
// target: 'http://192.168.10.25:13000', target: 'http://192.168.10.25:13000',
// target: 'http://192.168.10.25:2888', // target: 'http://192.168.10.25:2888',
// target: 'http://192.168.6.148:9777', // target: 'http://192.168.6.148:9777',
// target: 'http://192.168.10.57:13000', // target: 'http://192.168.10.57:13000',
@ -32,7 +32,7 @@ export default ({ mode, command }) => {
// target: 'http://192.168.10.94:8888', // target: 'http://192.168.10.94:8888',
// target: 'http://192.168.10.29:13000', // target: 'http://192.168.10.29:13000',
// target: 'http://h5uapi.huitongys.com', // target: 'http://h5uapi.huitongys.com',
target: 'http://test.api.huitongys.com', // target: 'http://test.api.huitongys.com',
changeOrigin: true, changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''), rewrite: path => path.replace(/^\/api/, ''),
}, },

Loading…
Cancel
Save