From c67f38b68366fd30eb3b8512f49e68045d58b6d5 Mon Sep 17 00:00:00 2001 From: 廖井涛 <2265517004@qq.com> Date: 星期三, 26 六月 2024 15:14:33 +0800 Subject: [PATCH] 修改 --- north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue | 144 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 142 insertions(+), 2 deletions(-) diff --git a/north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue b/north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue index 7c7ab4b..412978b 100644 --- a/north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue +++ b/north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue @@ -6,10 +6,120 @@ import CreateBasicData from "@/views/sd/basicData/CreateBasicData.vue" import {useRouter,useRoute} from "vue-router" import {useI18n} from "vue-i18n" +import {changeFilterEvent, filterChanged} from "@/hook"; const { t } = useI18n() let dialogTableVisible = ref(false) const router = useRouter() + +let basic = ref({ + basicType : ['',''], +}) +let options=ref([ + { "label": t('orderBasicData.order'), + "value": "order", + "children": [ + { + "label": t('orderBasicData.orderType'), + "value": "orderType" + }, + { + "label": t('orderBasicData.orderClassify'), + "value": "orderClassify" + }, + { + "label": t('orderBasicData.icon'), + "value": "icon" + }, + { + "label": t('orderBasicData.packType'), + "value": "packType" + }, + { + "label": t('orderBasicData.alType'), + "value": "alType" + }, + { + "label": t('orderBasicData.saleMan'), + "value": "saleMan" + } + ] + }, + { + "label": t('orderBasicData.product'), + "value": "product", + "children": [ + { + "label": t('orderBasicData.stuffThickness'), + "value": "stuffThickness" + }, + { + "label": t('orderBasicData.stuffColor'), + "value": "stuffColor" + }, + { + "label": t('orderBasicData.stuffCraft'), + "value": "stuffCraft" + }, + { + "label": t('orderBasicData.stuffPosition'), + "value": "stuffPosition" + }, + { + "label": t('orderBasicData.stuffLowE'), + "value": "stuffLowE" + }, + { + "label": t('orderBasicData.InterlayerThickness'), + "value": "InterlayerThickness" + }, + { + "label": t('orderBasicData.InterlayerType'), + "value": "InterlayerType" + }, + { + "label": t('orderBasicData.InterlayerColor'), + "value": "InterlayerColor" + }, + { + "label": t('orderBasicData.process'), + "value": "process" + }, + { + "label": t('orderBasicData.hollowThickness'), + "value": "hollowThickness" + }, + { + "label": t('orderBasicData.hollowGasType'), + "value": "hollowGasType" + }, + { + "label": t('orderBasicData.hollowType'), + "value": "hollowType" + }, + { + "label": t('orderBasicData.hollowGlueDepth'), + "value": "hollowGlueDepth" + } + ] + }, + { + "children": [ + { + "label": t('orderBasicData.paymentTerms'), + "value": "paymentTerms" + }, + { + "label": t('orderBasicData.payMethod'), + "value": "payMethod" + } + ], + "label": t('orderBasicData.delivery'), + "value": "delivery" + } +]) + + const xGrid = ref() const gridOptions = reactive({ border: "full",//琛ㄦ牸鍔犺竟妗� @@ -28,7 +138,7 @@ useKey: true }, filterConfig: { //绛涢�夐厤缃」 - remote: true + //remote: true }, customConfig: { storage: true @@ -43,7 +153,7 @@ columns:[ {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left",}, {type: 'seq', title: t('basicData.number'), width: 80 ,fixed:"left",}, - {field:'basicName',title: t('orderBasicData.name')}, + {field:'basicName',title: t('orderBasicData.name'),filters: [{data: ''}],slots: {filter: 'num1_filter'},filterMethod: filterChanged}, {field:'nickname',title: t('orderBasicData.alias')}, {field:'createTime',title: t('basicData.creationTime')}, @@ -122,10 +232,31 @@ } } +const handleChange = () => { + console.log(basic.value.basicType[1]) + request.get(`/basicData/BasicDataByType/${basic.value.basicType[0]}/${basic.value.basicType[1]}`).then(res => { + if(res.code==='200'){ + xGrid.value.reloadData(res.data) + } + }) + +} + </script> <template> <div> + <el-row> + <el-col :span="8"> + <el-cascader + v-model="basic.basicType" + @change="handleChange" + :options="options" + clearable + placeholder="" + /> + </el-col> + </el-row> <vxe-grid style="width: 40vw;" class="mytable-scrollbar" @@ -143,6 +274,15 @@ </el-popconfirm> </template> + <template #num1_filter="{ column, $panel }"> + <div> + <div v-for="(option, index) in column.filters" :key="index"> + <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> + </div> + </div> + </template> + + </vxe-grid> <el-dialog v-model="dialogTableVisible" -- Gitblit v1.8.0