You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
2.8 KiB

12 months ago
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
/**
* @returns {Array}
*/
export const Expectout = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '任务号',
field: 'jobNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150
},
},
]))
// 表单校验
export const ExpectoutRules = reactive({
jobNumber: [
{ required: true, message: '请选择任务号', trigger: 'change' }
],
businessType: [
{ required: true, message: '请选择业务类型', trigger: 'change' }
],
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' }
],
qty: [
{ required: true, message: '请输入数量', trigger: 'blur' }
],
locationCode: [
{ required: true, message: '请选择库位代码', trigger: 'change' }
],
warehouseCode: [
{ required: true, message: '请选择仓库代码', trigger: 'change' }
],
ownerCode: [
{ required: true, message: '请选择货主代码', trigger: 'change' }
],
})