diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts index 355ef86cb..10e7f6f1f 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts +++ b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts @@ -1,33 +1,41 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -// 表单校验 -export const PackageunitRules = reactive({ - code: [required], - name: [required], - available: [required], - concurrencyStamp: [required], - desc: [required], -}) - export const Packageunit = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isForm: false, - }, + // { + // label: 'id', + // field: 'id', + // sort: 'custom', + // isForm: false, + // }, { label: '包装代码', field: 'code', sort: 'custom', isSearch: true, + table: { + width: 150 + }, }, { label: '包装名称', field: 'name', sort: 'custom', isSearch: true, + table: { + width: 150 + }, + }, + { + label: '包装类型', + field: 'type', + dictType: DICT_TYPE.PACK_UNIT_TYPE, + dictClass: 'string', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, }, { label: '长', @@ -74,11 +82,74 @@ export const Packageunit = useCrudSchemas(reactive([ label: '是否可用', field: 'available', sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + table: { + width: 150 + }, + }, + { + label: '包装描述', + field: 'desc', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + }, + { + label: '是否重复使用', + field: 'reuse', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + table: { + width: 150 + }, + }, + { + label: '是否管理包装库存', + field: 'manageBalance', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + table: { + width: 170 + }, }, { label: '生效时间', field: 'activeTime', sort: 'custom', + table: { + width: 180 + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -92,6 +163,9 @@ export const Packageunit = useCrudSchemas(reactive([ label: '失效时间', field: 'expireTime', sort: 'custom', + table: { + width: 180 + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -110,6 +184,9 @@ export const Packageunit = useCrudSchemas(reactive([ label: '创建时间', field: 'createTime', sort: 'custom', + table: { + width: 180 + }, formatter: dateFormatter, isForm: false, }, @@ -117,6 +194,10 @@ export const Packageunit = useCrudSchemas(reactive([ label: '删除时间', field: 'deletionTime', sort: 'custom', + isForm: false, + table: { + width: 180 + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -127,46 +208,44 @@ export const Packageunit = useCrudSchemas(reactive([ }, }, { - label: '删除者ID', + label: '删除者', field: 'deleterId', sort: 'custom', + isForm: false, + table: { + width: 150 + }, }, { label: '扩展属性', field: 'extraProperties', sort: 'custom', + isForm: false, + table: { + width: 150 + }, }, { label: '并发乐观锁', field: 'concurrencyStamp', sort: 'custom', + isForm: false, + table: { + width: 150 + }, form: { component: 'InputNumber', value: 0 }, }, { - label: '地点ID', + label: '地点', field: 'siteId', sort: 'custom', - }, - { - label: '包装描述', - field: 'desc', - sort: 'custom', - isSearch: true, - }, - { - label: '是否重复使用', - field: 'reuse', - sort: 'custom', - isSearch: true, - }, - { - label: '是否管理包装库存', - field: 'manageBalance', - sort: 'custom', - isSearch: true, + isForm: false, + table: { + width: 150 + }, }, { label: '操作', @@ -178,3 +257,20 @@ export const Packageunit = useCrudSchemas(reactive([ } } ])) + +// 表单校验 +export const PackageunitRules = reactive({ + code: [ + { required: true, message: '请输入包装代码', trigger: 'change' } + ], + name: [ + { required: true, message: '请输入包装名称', trigger: 'change' } + ], + type: [ + { required: true, message: '请选择包装类型', trigger: 'change' } + ], + desc: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + { required: true, message: '请输入包装描述', trigger: 'change' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts b/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts index 61633f20b..d6543a74a 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts +++ b/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts @@ -106,85 +106,85 @@ export const Supplieritem = useCrudSchemas(reactive([ } }, }, - { - label: '供应商包装单位', - field: 'packUnit', - dictType: DICT_TYPE.PACK_UNIT, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - } - }, - { - label: '供应商包装量', - field: 'packQty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', - componentProps: { - min: 1, - precision: 6 - } - }, - }, - { - label: '默认收货仓库', - field: 'defaultWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '仓库信息', // 查询弹窗标题 - searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 - searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - }, - { - label: '默认收货库位', - field: 'defaultLocationCode', - sort: 'custom', - table: { - width: 150 - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择库位代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '库位信息', // 查询弹窗标题 - searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 - searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - },{ - key: 'warehouseCode', - value: 'defaultWarehouseCode', - message: '请填写默认收货仓库!', - isMainValue: true - }] - } - } - }, + // { + // label: '供应商包装单位', + // field: 'packUnit', + // dictType: DICT_TYPE.PACK_UNIT, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // } + // }, + // { + // label: '供应商包装量', + // field: 'packQty', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // min: 1, + // precision: 6 + // } + // }, + // }, + // { + // label: '默认收货仓库', + // field: 'defaultWarehouseCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '仓库信息', // 查询弹窗标题 + // searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 + // searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, + // { + // label: '默认收货库位', + // field: 'defaultLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '库位信息', // 查询弹窗标题 + // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + // searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // },{ + // key: 'warehouseCode', + // value: 'defaultWarehouseCode', + // message: '请填写默认收货仓库!', + // isMainValue: true + // }] + // } + // } + // }, // { // label: '结算方式', // field: 'settlementType', @@ -326,15 +326,12 @@ export const SupplieritemRules = reactive({ { max: 50, message: '不得超过50个字符', trigger: 'blur' }, { validator:validateYS, message: '请输入正确的代码', trigger: 'blur'} ], - packUnit: [ - { required: true, message: '请选择供应商包装单位', trigger: 'change' } - ], - packQty: [ - { required: true, message: '请输入供应商包装量', trigger: 'blur' } - ], - packQtyOfContainer: [ - { required: true, message: '请输入每器具包装数', trigger: 'blur' } - ], + // packUnit: [ + // { required: true, message: '请选择供应商包装单位', trigger: 'change' } + // ], + // packQty: [ + // { required: true, message: '请输入供应商包装量', trigger: 'blur' } + // ], available: [ { required: true, message: '请选择是否可用', trigger: 'change' } ],