diff --git a/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts b/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts index 52045b242..3f11aa5a5 100644 --- a/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts +++ b/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts @@ -53,6 +53,7 @@ export const Callmaterials = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 diff --git a/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue b/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue index d6f628ede..961ddc139 100644 --- a/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue +++ b/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue @@ -55,6 +55,7 @@ callmaterialQtySum:qty*callmaterialQty, }) }" + @onEnter="onEnter" /> @@ -75,7 +76,9 @@ import Detail from '@/components/Detail/src/Detail.vue' import { formatTime } from '@/utils/index' import { getAccessToken } from '@/utils/auth' import * as PackageApi from '@/api/wms/package' - +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' +// 叫料标签 defineOptions({ name: 'Callmaterials' }) const message = useMessage() // 消息弹窗 @@ -86,6 +89,25 @@ const routeName = ref() routeName.value = route.name const tableColumns = ref(Callmaterials.allSchemas.tableColumns) + +const onEnter = async (field,value)=>{ + console.log(field,value) + if(field=='itemCode'){ + basicFormRef.value.opensearchTable('itemCode', 'code', '物料信息', Itembasic.allSchemas, ItembasicApi.getItembasicPage,[{ + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'code', + value: value, + action: '==', + isSearch: true, + isMainValue: false + }]) + } +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => {