| | |
| | | </div> |
| | | </template> |
| | | <script lang="ts"> |
| | | import { defineComponent } from 'vue'; |
| | | |
| | | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
| | | |
| | | import { defineComponent, onMounted, ref } from 'vue'; |
| | | import { BasicTable, useTable, TableAction, BasicColumn, FormSchema } from '/@/components/Table'; |
| | | import { useDrawer } from '/@/components/Drawer'; |
| | | import RegionDrawer from './regionDrawer.vue'; |
| | | |
| | | import { columns, searchFormSchema } from './region.data'; |
| | | import { DeleteRegion } from '/@/api/tigerapi/wms/region'; |
| | | import { getListByPage } from '/@/api/tigerapi/system'; |
| | | import { fetchJson, getListByPage } from '/@/api/tigerapi/system'; |
| | | import { useGlobSetting } from '/@/hooks/setting'; |
| | | |
| | | export default defineComponent({ |
| | | name: 'LocationManagement', |
| | | components: { BasicTable, RegionDrawer, TableAction }, |
| | | setup() { |
| | | const globSetting = useGlobSetting(); |
| | | const _columns = ref([]); |
| | | const _searchFormSchema = ref([]); |
| | | const [registerDrawer, { openDrawer }] = useDrawer(); |
| | | const [registerTable, { reload }] = useTable({ |
| | | title: '储区列表', |
| | | api: getListByPage, |
| | | columns, |
| | | searchInfo: { TABLE_NAME: 'WMS_REGION' }, |
| | | columns: _columns as unknown as BasicColumn[], |
| | | formConfig: { |
| | | labelWidth: 120, |
| | | schemas: searchFormSchema, |
| | | schemas: _searchFormSchema as unknown as FormSchema[], |
| | | }, |
| | | useSearchForm: true, |
| | | showTableSetting: true, |
| | |
| | | reload(); |
| | | } |
| | | |
| | | onMounted(async () => { |
| | | _searchFormSchema.value = await fetchJson( |
| | | `${globSetting.downloadUrl}/LowCode/regionSearchform.json`, |
| | | ); |
| | | _columns.value = await fetchJson(`${globSetting.downloadUrl}/LowCode/regionBaseform.json`); |
| | | }); |
| | | |
| | | return { |
| | | registerTable, |
| | | registerDrawer, |
| | |
| | | handleEdit, |
| | | handleDelete, |
| | | handleSuccess, |
| | | _columns, |
| | | _searchFormSchema, |
| | | }; |
| | | }, |
| | | }); |