From 746a7a78abdd6f9dfaccdf4e2c2d4d3d5077b0e9 Mon Sep 17 00:00:00 2001 From: chenfang Date: Thu, 14 Mar 2024 16:55:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E5=BA=93=E5=8C=BA=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=89=8D=E6=AE=B5=E6=90=9C=E7=B4=A2=E6=A1=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../itemManage/itemarea/index.vue | 9 ++ .../itemManage/itemarea/itemarea.data.ts | 87 ++++++++++++++++++- 2 files changed, 94 insertions(+), 2 deletions(-) diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue index 9be383b88..f932f89c5 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue @@ -113,6 +113,15 @@ const updataTableColumns = (val) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { + if (type == 'tableForm') { + if(formField == 'locationGroupCode') { + row['locationGroupCode'] = val[0]['code'] + }else if(formField == 'locationCode') { + row['locationCode'] = val[0]['code'] + }else{ + row[formField] = val[0][searchField] + } + } const setV = {} setV[formField] = val[0][searchField] formRef.setValues(setV) diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts index 61b173455..928f75071 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts @@ -1,9 +1,18 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' + import * as ItembasicApi from '@/api/wms/itembasic' import { Itembasic } from '../itembasic/itembasic.data' + import * as AreaApi from '@/api/wms/areabasic' import { Area } from '../../factoryModeling/areabasic/areabasic.data' + +import * as LocationgroupApi from '@/api/wms/locationgroup' +import { Locationgroup } from '../../factoryModeling/locationgroup/locationgroup.data' + +import * as LocationApi from '@/api/wms/location' +import { Location } from '../../factoryModeling/location/location.data' + import * as PackageunitApi from '@/api/wms/packageunit' import { Packageunit } from '../packageunit/packageunit.data' @@ -637,13 +646,83 @@ export const ItemareaRules = reactive({ export const ItemareaDetail = useCrudSchemas(reactive([ { label: '库位组', - field: 'locationGroup', - sort: 'custom', + field: 'locationGroupCode', + sort: 'custom', + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位组代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位组基础信息', // 查询弹窗标题 + searchAllSchemas: Locationgroup.allSchemas, // 查询弹窗所需类 + searchPage: LocationgroupApi.getLocationgroupPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位组代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位组基础信息', // 查询弹窗标题 + searchAllSchemas: Locationgroup.allSchemas, // 查询弹窗所需类 + searchPage: LocationgroupApi.getLocationgroupPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + }] + } + } }, { label: '库位代码', field: 'locationCode', sort: 'custom', + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位基础信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'locationGroupCode', + value: 'locationGroupCode', + message: '请选择库位组!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位基础信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'locationGroupCode', + value: 'locationGroupCode', + message: '请选择库位组!', + isMainValue: true + }] + } + } }, { label: '备注', @@ -656,12 +735,14 @@ export const ItemareaDetail = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isForm: false, + isTableForm: false, }, { label: '创建者Id', field: 'creator', sort: 'custom', isForm: false, + isTableForm: false, }, { label: '最后更新时间', @@ -669,12 +750,14 @@ export const ItemareaDetail = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isForm: false, + isTableForm: false, }, { label: '最后更新者Id', field: 'updater', sort: 'custom', isForm: false, + isTableForm: false, }, { label: '操作',