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.
 
 
 

644 lines
11 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const StockupMainJobRules = reactive({
})
export const StockupMainJob = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 180
},
},
{
label: '发货计划单号',
field: 'deliverPlanNumber',
sort: 'custom',
isForm: false,
table: {
width: 180
},
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isForm: false,
table: {
width: 180
},
isTable: false
},
{
label: '从仓库',
field: 'fromWarehouseCode',
sort: 'custom',
isForm: false,
table: {
width: 150
},
sortTableDefault:1000
},
{
label: '到仓库',
field: 'toWarehouseCode',
sort: 'custom',
isForm: false,
table: {
width: 150
},
sortTableDefault:1000
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: false,
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '申请时间',
field: 'requestTime',
sort: 'custom',
formatter: dateFormatter,
table: {
width: 180
},
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
isTable: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '要求截止时间',
field: 'requestDueTime',
sort: 'custom',
formatter: dateFormatter,
table: {
width: 180
},
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
isTable: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '过期时间',
field: 'expiredTime',
sort: 'custom',
formatter: dateFormatter,
table: {
width: 180
},
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
isTable: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isTable: false,
},
{
label: '承接人用户名',
field: 'acceptUserName',
sort: 'custom',
isTable: false,
table: {
width: 150
},
},
{
label: '承接时间',
field: 'acceptTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
isTable: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '完成人用户名',
field: 'completeUserName',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '完成时间',
field: 'completeTime',
sort: 'custom',
formatter: dateFormatter,
table: {
width: 180
},
isTable: false,
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '到库区类型范围',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isTable: false,
form: {
component: 'SelectV2'
},
table: {
width: 120
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isTable: false,
},
{
label: '自动完成',
field: 'autoComplete',
sort: 'custom',
table: {
width: 120
},
isTable: false,
},
{
label: '允许修改库位',
field: 'allowModifyLocation',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '允许修改数量',
field: 'allowModifyQty',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '允许大于推荐数量',
field: 'allowBiggerQty',
sort: 'custom',
table: {
width: 180
},
isTable: false,
},
{
label: '允许小于推荐数量',
field: 'allowSmallerQty',
sort: 'custom',
table: {
width: 180
},
isTable: false,
},
{
label: '允许修改库存状态',
field: 'allowModifyInventoryStatus',
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'Radio'
},
},
{
label: '允许连续扫描',
field: 'allowContinuousScanning',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '允许部分完成',
field: 'allowPartialComplete',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '允许修改批次',
field: 'allowModifyBatch',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '允许修改箱码',
field: 'allowModifyPackingNumber',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '入库库存状态范围',
field: 'inInventoryStatuses',
sort: 'custom',
table: {
width: 180
},
isTable: false,
},
{
label: '出库库存状态范围',
field: 'outInventoryStatuses',
sort: 'custom',
table: {
width: 180
},
isTable: false,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
table: {
width: 120
},
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
hiddenInMain: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isTableForm: false,
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const StockupDetailJobRules = reactive({
})
export const StockupDetailJob = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true
},
{
label: '库存状态',
field: 'inventoryStatus',
sort: 'custom',
form: {
component: 'Radio'
},
hiddenInMain:true,
table: {
width: 120
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 120
},
hiddenInMain:true,
},
{
label: '器具号',
field: 'containerNumber',
sort: 'custom',
table: {
width: 120
},
hiddenInMain:true,
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 120
},
hiddenInMain:true,
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 120
},
hiddenInMain:true,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 120
},
hiddenInMain:true,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '从库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 120
},
},
{
label: '到库位',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 120
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
hiddenInMain:true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
hiddenInMain:true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
table: {
width: 180
},
isForm: false,
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 120
},
isTable: false,
},
{
label: '操作',
field: 'action',
isSearch: false,
isTable: false,
isForm:false,
isDetail:false,
hiddenInMain: true,
table: {
width: 150,
fixed: 'right'
}
}
]))