|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const StockupMainRequestRules = reactive({
|
|
|
|
})
|
|
|
|
|
|
|
|
export const StockupMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
{
|
|
|
|
label: '单据号',
|
|
|
|
field: 'number',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '发货计划单号',
|
|
|
|
field: 'deliverPlanNumber',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '从仓库代码',
|
|
|
|
field: 'fromWarehouseCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '到仓库代码',
|
|
|
|
field: 'toWarehouseCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '从库区类型范围',
|
|
|
|
field: 'fromAreaTypes',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '从库区代码范围',
|
|
|
|
field: 'fromAreaCodes',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '业务类型',
|
|
|
|
field: 'businessType',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
form: {
|
|
|
|
component: 'SelectV2'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '备注',
|
|
|
|
field: 'remark',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '创建时间',
|
|
|
|
field: 'createTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: 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')]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
isForm: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '申请时间',
|
|
|
|
field: 'requestTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: 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: 'dueTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: 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',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '状态',
|
|
|
|
field: 'status',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
form: {
|
|
|
|
component: 'Radio'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '自动提交',
|
|
|
|
field: 'autoCommit',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '自动通过',
|
|
|
|
field: 'autoAgree',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '自动执行',
|
|
|
|
field: 'autoExecute',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '直接生成记录',
|
|
|
|
field: 'directCreateRecord',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '到库区类型范围',
|
|
|
|
field: 'toAreaTypes',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '到库区范围',
|
|
|
|
field: 'toAreaCodes',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '发货日期',
|
|
|
|
field: 'deliverDate',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: 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: 'inInventoryStatuses',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '出库库存状态范围',
|
|
|
|
field: 'outInventoryStatuses',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '操作',
|
|
|
|
field: 'action',
|
|
|
|
isForm: false,
|
|
|
|
table: {
|
|
|
|
width: 150,
|
|
|
|
fixed: 'right'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]))
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const StockupDetailRequestRules = reactive({
|
|
|
|
itemCode: [required],
|
|
|
|
})
|
|
|
|
|
|
|
|
//子表
|
|
|
|
export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
{
|
|
|
|
label: '包装号',
|
|
|
|
field: 'packingNumber',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '器具号',
|
|
|
|
field: 'containerNumber',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '批次',
|
|
|
|
field: 'batch',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '库存状态',
|
|
|
|
field: 'inventoryStatus',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
form: {
|
|
|
|
component: 'Radio'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '到货主代码',
|
|
|
|
field: 'toOwnerCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '到库位代码',
|
|
|
|
field: 'toLocationCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '主表ID',
|
|
|
|
field: 'masterId',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
form: {
|
|
|
|
component: 'InputNumber',
|
|
|
|
value: 0
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '单据号',
|
|
|
|
field: 'number',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '备注',
|
|
|
|
field: 'remark',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '创建时间',
|
|
|
|
field: 'createTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
isSearch: 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')]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
isForm: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '物品代码',
|
|
|
|
field: 'itemCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '物品名称',
|
|
|
|
field: 'itemName',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '物品描述1',
|
|
|
|
field: 'itemDesc1',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '物品描述2',
|
|
|
|
field: 'itemDesc2',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '项目代码',
|
|
|
|
field: 'projectCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '数量',
|
|
|
|
field: 'qty',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '计量单位',
|
|
|
|
field: 'uom',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '从货主代码',
|
|
|
|
field: 'fromOwnerCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '操作',
|
|
|
|
field: 'action',
|
|
|
|
isForm: false,
|
|
|
|
table: {
|
|
|
|
width: 150,
|
|
|
|
fixed: 'right'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]))
|
|
|
|
|