diff --git a/src/views/wms/inventoryManage/package/index.vue b/src/views/wms/inventoryManage/package/index.vue index df0e9e8e9..2ed0e267b 100644 --- a/src/views/wms/inventoryManage/package/index.vue +++ b/src/views/wms/inventoryManage/package/index.vue @@ -91,6 +91,8 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row nextTick(() => { const setV = {} setV[formField] = val[0][searchField] + setV['itemName'] = val[0]['name'] + basicFormRef.setValues(setV) basicFormRef.setValues(setV) }) } @@ -103,7 +105,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), // 新增 + defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 diff --git a/src/views/wms/inventoryManage/package/package.data.ts b/src/views/wms/inventoryManage/package/package.data.ts index ee72aae78..cd0625bf5 100644 --- a/src/views/wms/inventoryManage/package/package.data.ts +++ b/src/views/wms/inventoryManage/package/package.data.ts @@ -1,5 +1,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; +import * as ItembasicApi from "@/api/wms/itembasic"; // 表单校验 export const PackageRules = reactive({ @@ -31,10 +33,27 @@ export const Package = useCrudSchemas(reactive([ label: '物料代码', field: 'itemCode', sort: 'custom', - isSearch: true, table: { - width: 150, + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物料基础信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } }, + isSearch: true }, { label: '物料名称',