Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
陈薪名 1 year ago
parent
commit
c6b3550915
  1. 164
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts
  2. 173
      src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts

164
src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts

@ -1,33 +1,41 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const PackageunitRules = reactive({
code: [required],
name: [required],
available: [required],
concurrencyStamp: [required],
desc: [required],
})
export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
{ // {
label: 'id', // label: 'id',
field: 'id', // field: 'id',
sort: 'custom', // sort: 'custom',
isForm: false, // isForm: false,
}, // },
{ {
label: '包装代码', label: '包装代码',
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 150
},
}, },
{ {
label: '包装名称', label: '包装名称',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 150
},
},
{
label: '包装类型',
field: 'type',
dictType: DICT_TYPE.PACK_UNIT_TYPE,
dictClass: 'string',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
}, },
{ {
label: '长', label: '长',
@ -74,11 +82,74 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', 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: '生效时间', label: '生效时间',
field: 'activeTime', field: 'activeTime',
sort: 'custom', sort: 'custom',
table: {
width: 180
},
formatter: dateFormatter, formatter: dateFormatter,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
@ -92,6 +163,9 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
label: '失效时间', label: '失效时间',
field: 'expireTime', field: 'expireTime',
sort: 'custom', sort: 'custom',
table: {
width: 180
},
formatter: dateFormatter, formatter: dateFormatter,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
@ -110,6 +184,9 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
table: {
width: 180
},
formatter: dateFormatter, formatter: dateFormatter,
isForm: false, isForm: false,
}, },
@ -117,6 +194,10 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
label: '删除时间', label: '删除时间',
field: 'deletionTime', field: 'deletionTime',
sort: 'custom', sort: 'custom',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter, formatter: dateFormatter,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
@ -127,46 +208,44 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '删除者ID', label: '删除者',
field: 'deleterId', field: 'deleterId',
sort: 'custom', sort: 'custom',
isForm: false,
table: {
width: 150
},
}, },
{ {
label: '扩展属性', label: '扩展属性',
field: 'extraProperties', field: 'extraProperties',
sort: 'custom', sort: 'custom',
isForm: false,
table: {
width: 150
},
}, },
{ {
label: '并发乐观锁', label: '并发乐观锁',
field: 'concurrencyStamp', field: 'concurrencyStamp',
sort: 'custom', sort: 'custom',
isForm: false,
table: {
width: 150
},
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
}, },
}, },
{ {
label: '地点ID', label: '地点',
field: 'siteId', field: 'siteId',
sort: 'custom', sort: 'custom',
isForm: false,
table: {
width: 150
}, },
{
label: '包装描述',
field: 'desc',
sort: 'custom',
isSearch: true,
},
{
label: '是否重复使用',
field: 'reuse',
sort: 'custom',
isSearch: true,
},
{
label: '是否管理包装库存',
field: 'manageBalance',
sort: 'custom',
isSearch: true,
}, },
{ {
label: '操作', label: '操作',
@ -178,3 +257,20 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
])) ]))
// 表单校验
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' }
],
})

173
src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts

@ -106,85 +106,85 @@ export const Supplieritem = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{ // {
label: '供应商包装单位', // label: '供应商包装单位',
field: 'packUnit', // field: 'packUnit',
dictType: DICT_TYPE.PACK_UNIT, // dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
} // }
}, // },
{ // {
label: '供应商包装量', // label: '供应商包装量',
field: 'packQty', // field: 'packQty',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
component: 'InputNumber', // component: 'InputNumber',
componentProps: { // componentProps: {
min: 1, // min: 1,
precision: 6 // precision: 6
} // }
}, // },
}, // },
{ // {
label: '默认收货仓库', // label: '默认收货仓库',
field: 'defaultWarehouseCode', // field: 'defaultWarehouseCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // 开启查询弹窗 // isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 // searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题 // searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 // searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
}] // }]
} // }
} // }
}, // },
{ // {
label: '默认收货库位', // label: '默认收货库位',
field: 'defaultLocationCode', // field: 'defaultLocationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // 开启查询弹窗 // isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本 // searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题 // searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 // searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
},{ // },{
key: 'warehouseCode', // key: 'warehouseCode',
value: 'defaultWarehouseCode', // value: 'defaultWarehouseCode',
message: '请填写默认收货仓库!', // message: '请填写默认收货仓库!',
isMainValue: true // isMainValue: true
}] // }]
} // }
} // }
}, // },
// { // {
// label: '结算方式', // label: '结算方式',
// field: 'settlementType', // field: 'settlementType',
@ -326,15 +326,12 @@ export const SupplieritemRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'} { validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
], ],
packUnit: [ // packUnit: [
{ required: true, message: '请选择供应商包装单位', trigger: 'change' } // { required: true, message: '请选择供应商包装单位', trigger: 'change' }
], // ],
packQty: [ // packQty: [
{ required: true, message: '请输入供应商包装量', trigger: 'blur' } // { required: true, message: '请输入供应商包装量', trigger: 'blur' }
], // ],
packQtyOfContainer: [
{ required: true, message: '请输入每器具包装数', trigger: 'blur' }
],
available: [ available: [
{ required: true, message: '请选择是否可用', trigger: 'change' } { required: true, message: '请选择是否可用', trigger: 'change' }
], ],

Loading…
Cancel
Save