| | |
| | | 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",//表格加边框 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | 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')}, |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | 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" |
| | |
| | | </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" |