| | |
| | | import { defineComponent } from 'vue' |
| | | import { defineComponent, reactive, ref, computed } from 'vue' |
| | | import type { Ref } from 'vue' |
| | | import BaseTable from '@/components/Table/Table' |
| | | import styles from './WmsStore.module.scss' |
| | |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | | import { vPermission } from '@/libs/Permission/Permission' |
| | | import { ElForm, ElFormItem, ElInput } from 'element-plus' |
| | | import { getWmsEnumData } from '@/widgets/HIAWms/Models/Service/WmsMaterialDrawer' |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useWmsStore(props, ctx) |
| | | |
| | | // 新增的查询条件 |
| | | const queryForm = ref({ |
| | | storeCode: '', |
| | | storeName: '', |
| | | filter: '', |
| | | }) |
| | | |
| | | const queryParams = computed(() => ({ |
| | | ...queryForm.value, |
| | | })) |
| | | |
| | | // 新增的查询方法 |
| | | const handleQuery = async () => { |
| | | console.log('查询条件:', queryParams.value) |
| | | // tableRef.value.getTableList() |
| | | tableRef.value.getList(queryParams.value) |
| | | } |
| | | |
| | | // 重置查询条件 |
| | | const resetQuery = () => { |
| | | queryForm.value = { |
| | | storeCode: '', |
| | | storeName: '', |
| | | filter: '', |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @returns 表格 |
| | |
| | | sort={sort.value} |
| | | onConfirm={onConfirmWmsStore} |
| | | /> |
| | | |
| | | {/* 新增的查询表单 */} |
| | | <ElForm |
| | | inline |
| | | model={queryForm.value} |
| | | class={styles.queryForm} |
| | | label-width="80px" |
| | | > |
| | | <ElFormItem label="关键字"> |
| | | <ElInput |
| | | v-model={queryForm.value.filter} |
| | | placeholder="请输入关键字搜索" |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="仓库编码"> |
| | | <ElInput |
| | | v-model={queryForm.value.storeCode} |
| | | placeholder="请输入仓库编码" |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="仓库名称"> |
| | | <ElInput |
| | | v-model={queryForm.value.storeName} |
| | | placeholder="请输入仓库名称" |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem> |
| | | <IconButton type="primary" icon="search" onClick={handleQuery}> |
| | | 查询 |
| | | </IconButton> |
| | | <IconButton |
| | | style="margin-left: 10px;" |
| | | icon="refresh" |
| | | onClick={resetQuery} |
| | | > |
| | | 重置 |
| | | </IconButton> |
| | | </ElFormItem> |
| | | </ElForm> |
| | | |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | |
| | | 导出 |
| | | </IconButton> |
| | | </div> |
| | | <Search |
| | | {/* <Search |
| | | placeholder="请输入关键字" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> |
| | | /> */} |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/HIAWms/wmsStore" |