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.
1580 lines
32 KiB
1580 lines
32 KiB
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
|
|
import { fa } from 'element-plus/es/locale'
|
|
import { DICT_TYPE } from '@/utils/dict'
|
|
|
|
/**
|
|
* @returns {Array} 采购收货任务主表
|
|
*/
|
|
export const PurchasereceiptJobMain = useCrudSchemas(
|
|
reactive<CrudSchema[]>([
|
|
{
|
|
label: '单据号',
|
|
field: 'number',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180,
|
|
fixed: 'left'
|
|
},
|
|
isSearch: true,
|
|
sortSearchDefault: 1
|
|
},
|
|
{
|
|
label: '申请单号',
|
|
field: 'requestNumber',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
isSearch: false,
|
|
sortTableDefault: 2
|
|
},
|
|
{
|
|
label: '发货单号',
|
|
field: 'asnNumber',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
sortTableDefault: 3,
|
|
isSearch: true
|
|
},
|
|
{
|
|
label: '要货计划单号',
|
|
field: 'ppNumber',
|
|
sort: 'custom',
|
|
isTable: false,
|
|
table: {
|
|
width: 180
|
|
}
|
|
},
|
|
{
|
|
label: '供应商代码',
|
|
field: 'supplierCode',
|
|
sort: 'custom',
|
|
sortTableDefault: 1,
|
|
table: {
|
|
width: 150
|
|
},
|
|
isSearch: true,
|
|
sortSearchDefault: 2
|
|
},
|
|
{
|
|
label: '到月台代码',
|
|
field: 'toDockCode',
|
|
sort: 'custom',
|
|
isTable: false,
|
|
table: {
|
|
width: 150
|
|
}
|
|
},
|
|
{
|
|
label: '承运商',
|
|
field: 'carrierCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1010
|
|
},
|
|
{
|
|
label: '数据来源',
|
|
field: 'sourceType',
|
|
dictType: DICT_TYPE.PURCHASERECEIPT_SOURCE_TYPE,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
componentProps: {
|
|
disabled: true
|
|
}
|
|
},
|
|
isSearch: false,
|
|
sortTableDefault: 5
|
|
},
|
|
{
|
|
label: '运输方式',
|
|
field: 'transferMode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1011
|
|
},
|
|
{
|
|
label: '车牌号',
|
|
field: 'vehiclePlateNumber',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1012
|
|
},
|
|
{
|
|
label: '从仓库代码',
|
|
field: 'fromWarehouseCode',
|
|
sort: 'custom',
|
|
isTable: false,
|
|
table: {
|
|
width: 150
|
|
}
|
|
},
|
|
{
|
|
label: '到仓库代码',
|
|
field: 'toWarehouseCode',
|
|
sort: 'custom',
|
|
isTable: false,
|
|
table: {
|
|
width: 150
|
|
},
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '申请时间',
|
|
field: 'requestTime',
|
|
sort: 'custom',
|
|
isTable: false,
|
|
table: {
|
|
width: 180
|
|
},
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '要求截止时间',
|
|
field: 'requestDueTime',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
isTable: false,
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '状态',
|
|
field: 'status',
|
|
dictType: DICT_TYPE.PURCHASE_JOB_STATUS,
|
|
dictClass: 'string',
|
|
isSearch: false,
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 6
|
|
},
|
|
{
|
|
label: '过期时间',
|
|
field: 'expiredTime',
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
isTable: false,
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
// {
|
|
// label: '状态',
|
|
// field: 'jobStageStatus',
|
|
// sort: 'custom',
|
|
// table: {
|
|
// width: 150
|
|
// },
|
|
// },
|
|
{
|
|
label: '优先级',
|
|
field: 'priority',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false,
|
|
form: {
|
|
component: 'InputNumber'
|
|
}
|
|
},
|
|
{
|
|
label: '优先级增量',
|
|
field: 'priorityIncrement',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false,
|
|
form: {
|
|
component: 'InputNumber'
|
|
}
|
|
},
|
|
{
|
|
label: '部门',
|
|
field: 'departmentCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false
|
|
},
|
|
{
|
|
label: '岗位',
|
|
field: 'userPositionCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false
|
|
},
|
|
{
|
|
label: '承接人',
|
|
field: 'acceptUserName',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false
|
|
},
|
|
{
|
|
label: '承接时间',
|
|
field: 'acceptTime',
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
isTable: false,
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '完成人',
|
|
field: 'completeUserName',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false
|
|
},
|
|
{
|
|
label: '完成时间',
|
|
field: 'completeTime',
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
isTable: false,
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '从库区类型范围',
|
|
field: 'fromAreaTypes',
|
|
dictType: DICT_TYPE.AREA_TYPE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
}
|
|
},
|
|
{
|
|
label: '到库区类型范围',
|
|
field: 'toAreaTypes',
|
|
dictType: DICT_TYPE.AREA_TYPE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
}
|
|
},
|
|
{
|
|
label: '从库区代码范围',
|
|
field: 'fromAreaCodes',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false
|
|
},
|
|
{
|
|
label: '到库区代码范围',
|
|
field: 'toAreaCodes',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false
|
|
},
|
|
{
|
|
label: '业务类型',
|
|
field: 'businessType',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false
|
|
},
|
|
{
|
|
label: '备注',
|
|
field: 'remark',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false
|
|
},
|
|
{
|
|
label: '创建者',
|
|
field: 'creator',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false
|
|
},
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
isTable: false,
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '自动完成',
|
|
field: 'autoComplete',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
form: {
|
|
component: 'Switch',
|
|
value: 'TRUE',
|
|
componentProps: {
|
|
inactiveValue: 'FALSE',
|
|
activeValue: 'TRUE'
|
|
}
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
}
|
|
},
|
|
{
|
|
label: '允许修改库位',
|
|
field: 'allowModifyLocation',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
form: {
|
|
component: 'Switch',
|
|
value: 'TRUE',
|
|
componentProps: {
|
|
inactiveValue: 'FALSE',
|
|
activeValue: 'TRUE'
|
|
}
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
}
|
|
},
|
|
{
|
|
label: '允许修改数量',
|
|
field: 'allowModifyQty',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
form: {
|
|
component: 'Switch',
|
|
value: 'TRUE',
|
|
componentProps: {
|
|
inactiveValue: 'FALSE',
|
|
activeValue: 'TRUE'
|
|
}
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
}
|
|
},
|
|
{
|
|
label: '允许大于推荐数量',
|
|
field: 'allowBiggerQty',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
form: {
|
|
component: 'Switch',
|
|
value: 'TRUE',
|
|
componentProps: {
|
|
inactiveValue: 'FALSE',
|
|
activeValue: 'TRUE'
|
|
}
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
}
|
|
},
|
|
{
|
|
label: '允许小于推荐数量',
|
|
field: 'allowSmallerQty',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
form: {
|
|
component: 'Switch',
|
|
value: 'TRUE',
|
|
componentProps: {
|
|
inactiveValue: 'FALSE',
|
|
activeValue: 'TRUE'
|
|
}
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
}
|
|
},
|
|
{
|
|
label: '允许修改库存状态',
|
|
field: 'allowModifyInventoryStatus',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
form: {
|
|
component: 'Switch',
|
|
value: 'TRUE',
|
|
componentProps: {
|
|
inactiveValue: 'FALSE',
|
|
activeValue: 'TRUE'
|
|
}
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
}
|
|
},
|
|
{
|
|
label: '允许连续扫描',
|
|
field: 'allowContinuousScanning',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
form: {
|
|
component: 'Switch',
|
|
value: 'TRUE',
|
|
componentProps: {
|
|
inactiveValue: 'FALSE',
|
|
activeValue: 'TRUE'
|
|
}
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
}
|
|
},
|
|
{
|
|
label: '允许部分完成',
|
|
field: 'allowPartialComplete',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
form: {
|
|
component: 'Switch',
|
|
value: 'TRUE',
|
|
componentProps: {
|
|
inactiveValue: 'FALSE',
|
|
activeValue: 'TRUE'
|
|
}
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
}
|
|
},
|
|
{
|
|
label: '允许修改批次',
|
|
field: 'allowModifyBatch',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
form: {
|
|
component: 'Switch',
|
|
value: 'TRUE',
|
|
componentProps: {
|
|
inactiveValue: 'FALSE',
|
|
activeValue: 'TRUE'
|
|
}
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
}
|
|
},
|
|
{
|
|
label: '允许修改箱码',
|
|
field: 'allowModifyPackingNumber',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string',
|
|
isTable: false,
|
|
form: {
|
|
component: 'Switch',
|
|
value: 'TRUE',
|
|
componentProps: {
|
|
inactiveValue: 'FALSE',
|
|
activeValue: 'TRUE'
|
|
}
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
}
|
|
},
|
|
{
|
|
label: '操作',
|
|
field: 'action',
|
|
isDetail: false,
|
|
isForm: false,
|
|
table: {
|
|
width: 250,
|
|
fixed: 'right'
|
|
}
|
|
},
|
|
{
|
|
label: '批次', // 实际是子表的到批次,为了不影响页面,单独放上面
|
|
field: 'toBatch',
|
|
sort: 'custom',
|
|
isForm: false,
|
|
isTableForm: false,
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1001
|
|
},
|
|
{
|
|
label: '包装号', // 实际是子表的到包装号,为了不影响页面,单独放上面
|
|
field: 'toPackingNumber',
|
|
sort: 'custom',
|
|
isForm: false,
|
|
isTableForm: false,
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1001
|
|
},
|
|
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
isForm: false,
|
|
table: {
|
|
width: 180
|
|
},
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
style: { width: '100%' },
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '创建者',
|
|
field: 'creator',
|
|
table: {
|
|
width: 130
|
|
},
|
|
isForm: false,
|
|
isTable: true
|
|
}
|
|
])
|
|
)
|
|
|
|
//表单校验
|
|
export const PurchasereceiptJobMainRules = reactive({
|
|
requestNumber: [{ required: true, message: '请选择申请单号', trigger: 'change' }],
|
|
supplierCode: [{ required: true, message: '请选择供应商代码', trigger: 'change' }],
|
|
toWarehouseCode: [{ required: true, message: '请选择到仓库代码', trigger: 'change' }],
|
|
toAreaTypes: [{ required: true, message: '请选择到库区类型范围', trigger: 'change' }],
|
|
requestTime: [{ required: true, message: '请输入申请时间', trigger: 'change' }],
|
|
requestDueTime: [{ required: true, message: '请输入要求截止时间', trigger: 'change' }],
|
|
status: [{ required: true, message: '请选择状态', trigger: 'change' }],
|
|
// jobStageStatus: [
|
|
// { required: true, message: '请选择阶段状态', trigger: 'change' }
|
|
// ],
|
|
priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }],
|
|
priorityIncrement: [{ required: true, message: '请输入优先级增量', trigger: 'blur' }],
|
|
departmentCode: [{ required: true, message: '请输入部门', trigger: 'blur' }],
|
|
userPositionCode: [{ required: true, message: '请输入岗位', trigger: 'blur' }],
|
|
number: [{ required: true, message: '请输入单据号', trigger: 'blur' }],
|
|
businessType: [{ required: true, message: '请输入业务类型', trigger: 'blur' }],
|
|
createTime: [{ required: true, message: '请输入创建时间', trigger: 'blur' }],
|
|
creator: [{ required: true, message: '请输入创建者', trigger: 'blur' }]
|
|
})
|
|
|
|
/**
|
|
* @returns {Array} 采购收货任务子表
|
|
*/
|
|
export const PurchasereceiptJobDetail = useCrudSchemas(
|
|
reactive<CrudSchema[]>([
|
|
{
|
|
label: '包装号',
|
|
field: 'packingNumber',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isSearch: true,
|
|
hiddenInMain: true,
|
|
sortTableDefault: 1002,
|
|
sortSearchDefault: 1002
|
|
},
|
|
{
|
|
label: '包装规格',
|
|
field: 'packUnit',
|
|
dictClass: 'string',
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1002
|
|
},
|
|
{
|
|
label: '包装数量',
|
|
field: 'qty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
component: 'InputNumber'
|
|
},
|
|
sortTableDefault: 1002
|
|
},
|
|
{
|
|
label: '器具号',
|
|
field: 'containerNumber',
|
|
sort: 'custom',
|
|
hiddenInMain: true,
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false
|
|
},
|
|
{
|
|
label: '批次',
|
|
field: 'batch',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortSearchDefault: 1000,
|
|
isSearch: true,
|
|
hiddenInMain: true,
|
|
sortTableDefault: 8
|
|
},
|
|
{
|
|
label: '替代批次',
|
|
field: 'altBatch',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false,
|
|
hiddenInMain: true
|
|
},
|
|
{
|
|
label: '到货日期',
|
|
field: 'arriveDate',
|
|
formatter: dateFormatter2,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
sortTableDefault: 1005,
|
|
hiddenInMain: true,
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
style: { width: '100%' },
|
|
type: 'date',
|
|
dateFormat: 'YYYY-MM-DD',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '生产日期',
|
|
field: 'produceDate',
|
|
formatter: dateFormatter2,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
sortTableDefault: 1005,
|
|
hiddenInMain: true,
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
style: { width: '100%' },
|
|
type: 'date',
|
|
dateFormat: 'YYYY-MM-DD',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '过期日期',
|
|
field: 'expireDate',
|
|
formatter: dateFormatter2,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
sortTableDefault: 1005,
|
|
hiddenInMain: true,
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
style: { width: '100%' },
|
|
type: 'date',
|
|
dateFormat: 'YYYY-MM-DD',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '库存状态',
|
|
field: 'inventoryStatus',
|
|
dictType: DICT_TYPE.INVENTORY_STATUS,
|
|
dictClass: 'string',
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
sortTableDefault: 1006
|
|
},
|
|
{
|
|
label: '来源库位',
|
|
field: 'fromLocationCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1007
|
|
},
|
|
{
|
|
label: '目标库位',
|
|
field: 'toLocationCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1007
|
|
},
|
|
{
|
|
label: '采购订单号',
|
|
field: 'poNumber',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isSearch: true,
|
|
sortTableDefault: 6
|
|
},
|
|
{
|
|
label: '订单行',
|
|
field: 'poLine',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 6
|
|
},
|
|
{
|
|
label: '行类型',
|
|
field: 'poLineType',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
sortTableDefault: 6,
|
|
hiddenInMain: true,
|
|
isForm: false,
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
|
|
{
|
|
label: '供应商计量数量',
|
|
field: 'supplierQty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1009,
|
|
hiddenInMain: true,
|
|
form: {
|
|
component: 'InputNumber'
|
|
}
|
|
},
|
|
{
|
|
label: '供应商计量单位',
|
|
field: 'supplierUom',
|
|
dictType: DICT_TYPE.UOM,
|
|
dictClass: 'string',
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1009,
|
|
hiddenInMain: true
|
|
},
|
|
{
|
|
label: '转换率',
|
|
field: 'convertRate',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
component: 'InputNumber'
|
|
},
|
|
sortTableDefault: 1009,
|
|
hiddenInMain: true
|
|
},
|
|
{
|
|
label: '从货主',
|
|
field: 'fromOwnerCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
sortTableDefault: 1008
|
|
},
|
|
{
|
|
label: '到货主',
|
|
field: 'toOwnerCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
sortTableDefault: 1008
|
|
},
|
|
{
|
|
label: '物料代码',
|
|
field: 'itemCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 7,
|
|
isSearch: true
|
|
},
|
|
{
|
|
label: '物料名称',
|
|
field: 'itemName',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 7
|
|
},
|
|
{
|
|
label: '物料描述1',
|
|
field: 'itemDesc1',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
sortTableDefault: 7
|
|
},
|
|
{
|
|
label: '物料描述2',
|
|
field: 'itemDesc2',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
sortTableDefault: 7
|
|
},
|
|
{
|
|
label: '项目代码',
|
|
field: 'projectCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
sortTableDefault: 1010
|
|
},
|
|
{
|
|
label: '计量单位',
|
|
field: 'uom',
|
|
dictType: DICT_TYPE.UOM,
|
|
dictClass: 'string',
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1004
|
|
},
|
|
{
|
|
label: '订单数量',
|
|
field: 'orderQty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
sortTableDefault: 1004
|
|
},
|
|
{
|
|
label: '收货数量',
|
|
field: 'qty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
sortTableDefault: 1004
|
|
},
|
|
{
|
|
label: '数量',
|
|
field: 'qty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false,
|
|
form: {
|
|
component: 'InputNumber'
|
|
},
|
|
sortTableDefault: 1004
|
|
},
|
|
{
|
|
label: '单据号',
|
|
field: 'number',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
hiddenInMain: true,
|
|
sortTableDefault: 1011
|
|
},
|
|
{
|
|
label: '备注',
|
|
field: 'remark',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1012,
|
|
hiddenInMain: true
|
|
},
|
|
{
|
|
label: '创建者',
|
|
field: 'creator',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
sortTableDefault: 1012
|
|
},
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
hiddenInMain: true,
|
|
sortTableDefault: 1012
|
|
},
|
|
{
|
|
label: '操作',
|
|
hiddenInMain: true,
|
|
field: 'action',
|
|
isDetail: false,
|
|
isForm: false,
|
|
table: {
|
|
width: 180,
|
|
fixed: 'right'
|
|
},
|
|
isTableForm: true
|
|
}
|
|
])
|
|
)
|
|
|
|
//表单校验
|
|
export const PurchasereceiptJobDetailRules = reactive({
|
|
packingNumber: [{ required: true, message: '请选择包装号', trigger: 'change' }],
|
|
batch: [{ required: true, message: '请输入批次', trigger: 'blur' }],
|
|
arriveDate: [{ required: true, message: '请输入到货日期', trigger: 'change' }],
|
|
produceDate: [{ required: true, message: '请输入生产日期', trigger: 'change' }],
|
|
expireDate: [{ required: true, message: '请输入过期日期', trigger: 'change' }],
|
|
inventoryStatus: [{ required: true, message: '请选择库存状态', trigger: 'change' }],
|
|
poNumber: [{ required: true, message: '请选择订单号', trigger: 'change' }],
|
|
poLine: [{ required: true, message: '请输入订单行', trigger: 'blur' }],
|
|
packQty: [{ required: true, message: '请输入包装数量', trigger: 'blur' }],
|
|
packUnit: [{ required: true, message: '请选择包装规格', trigger: 'change' }],
|
|
convertRate: [{ required: true, message: '请输入转换率', trigger: 'blur' }],
|
|
toLocationCode: [{ required: true, message: '请选择到库位代码', trigger: 'change' }],
|
|
number: [{ required: true, message: '请输入单据号', trigger: 'blur' }],
|
|
itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }],
|
|
createTime: [{ required: true, message: '请输入创建时间', trigger: 'blur' }],
|
|
creator: [{ required: true, message: '请输入创建者', trigger: 'blur' }]
|
|
})
|
|
|
|
/**
|
|
* @returns {Array} 采购收货任务子表
|
|
*/
|
|
export const PurchasereceiptJobDetailPackingNumber = useCrudSchemas(
|
|
reactive<CrudSchema[]>([
|
|
{
|
|
label: '包装号',
|
|
field: 'packingNumber',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
componentProps: {
|
|
disabled: true
|
|
}
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '器具号',
|
|
field: 'containerNumber',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
componentProps: {
|
|
disabled: true
|
|
}
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '批次',
|
|
field: 'batch',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
componentProps: {
|
|
disabled: true
|
|
}
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '替代批次',
|
|
field: 'altBatch',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
componentProps: {
|
|
disabled: true
|
|
}
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '到货日期',
|
|
field: 'arriveDate',
|
|
formatter: dateFormatter2,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
disabled: true,
|
|
style: { width: '100%' },
|
|
type: 'date',
|
|
dateFormat: 'YYYY-MM-DD',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '生产日期',
|
|
field: 'produceDate',
|
|
formatter: dateFormatter2,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
style: { width: '100%' },
|
|
type: 'date',
|
|
dateFormat: 'YYYY-MM-DD',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
tableForm: {
|
|
disabled: true,
|
|
type: 'FormDate',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
{
|
|
label: '过期日期',
|
|
field: 'expireDate',
|
|
formatter: dateFormatter2,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
style: { width: '100%' },
|
|
type: 'date',
|
|
dateFormat: 'YYYY-MM-DD',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
tableForm: {
|
|
disabled: true,
|
|
type: 'FormDate',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
{
|
|
label: '库存状态',
|
|
field: 'inventoryStatus',
|
|
dictType: DICT_TYPE.INVENTORY_STATUS,
|
|
dictClass: 'string',
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '从库位代码',
|
|
field: 'fromLocationCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '到库位代码',
|
|
field: 'toLocationCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '订单号',
|
|
field: 'poNumber',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '订单行',
|
|
field: 'poLine',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '包装数量',
|
|
field: 'packQty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
component: 'InputNumber'
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '包装规格',
|
|
field: 'packUnit',
|
|
dictClass: 'string',
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '供应商计量数量',
|
|
field: 'supplierQty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
component: 'InputNumber'
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '供应商计量单位',
|
|
field: 'supplierUom',
|
|
dictType: DICT_TYPE.UOM,
|
|
dictClass: 'string',
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '转换率',
|
|
field: 'convertRate',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
component: 'InputNumber'
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '从货主代码',
|
|
field: 'fromOwnerCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '到货主代码',
|
|
field: 'toOwnerCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '物料代码',
|
|
field: 'itemCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '物料名称',
|
|
field: 'itemName',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '物料描述1',
|
|
field: 'itemDesc1',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '物料描述2',
|
|
field: 'itemDesc2',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '项目代码',
|
|
field: 'projectCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '数量',
|
|
field: 'qty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
component: 'InputNumber'
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '计量单位',
|
|
field: 'uom',
|
|
dictType: DICT_TYPE.UOM,
|
|
dictClass: 'string',
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
type: 'Select',
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '单据号',
|
|
field: 'number',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '备注',
|
|
fiield: 'remark',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '创建者',
|
|
field: 'creator',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true
|
|
}
|
|
},
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
tableForm: {
|
|
disabled: true,
|
|
type: 'FormDate',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
])
|
|
)
|
|
|