From 2966a54994713b65573f783e2b5dc38fe79e552f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Thu, 11 Jul 2024 16:16:13 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspectionJob/inspectionJobMain.data.ts | 2 +- .../issue/issueJobMain/issueJobMain.data.ts | 1848 ++++++++-------- .../issueRecordMain/issueRecordMain.data.ts | 1554 +++++++------ .../issueRequestMain/issueRequestMain.data.ts | 1958 +++++++++-------- 4 files changed, 2676 insertions(+), 2686 deletions(-) diff --git a/src/views/qms/inspectionJob/inspectionJobMain.data.ts b/src/views/qms/inspectionJob/inspectionJobMain.data.ts index 51c9b2d86..cf3999056 100644 --- a/src/views/qms/inspectionJob/inspectionJobMain.data.ts +++ b/src/views/qms/inspectionJob/inspectionJobMain.data.ts @@ -444,7 +444,7 @@ export const InspectionJobMain = useCrudSchemas( isDetail: false, isForm: false, table: { - width: 250, + width: 300, fixed: 'right' } } diff --git a/src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts b/src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts index 8c9d6859b..c11f0d6c3 100644 --- a/src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts +++ b/src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts @@ -4,980 +4,966 @@ import { dateFormatter } from '@/utils/formatTime' /** * @returns {Array} 发料任务主表 */ -export const IssueJobMain = useCrudSchemas(reactive([ - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180, - fixed: 'left' - }, - sortSearchDefault:1, - isSearch: true, - }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - }, - { - label: '供应商代码', - field: 'supplierCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '车间代码', - field: 'workShopCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '从仓库代码', - field: 'fromWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '申请时间', - field: 'requestTime', - 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', +export const IssueJobMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + sortSearchDefault: 1, + isSearch: true + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: false + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '车间代码', + field: 'workShopCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '申请时间', + field: 'requestTime', + 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: 'requestDueTime', - 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', + { + label: '要求截止时间', + field: 'requestDueTime', + 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' + } + }, + isTable: false + }, + { + 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' + } } }, - isTable: false, - }, - { - 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: 'status', + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1 + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '生产线代码', + field: 'detailProductionLineCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '工位代码', + field: 'detailWorkStationCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false }, - }, - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.JOB_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:1, - }, - { - label: '到仓库代码', - field: 'toWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '生产线代码', - field: 'detailProductionLineCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '工位代码', - field: 'detailWorkStationCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '最后更新时间', - field: 'updateTime', - 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: 'updateTime', + 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: 'updater', - sort: 'custom', - table: { - width: 150 + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTable: false }, - isTable: false, - - }, - { - 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: 'acceptUserId', - 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: 'priority', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber' } }, - }, - { - label: '完成人用户名', - field: 'completeUserId', - 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: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + component: 'InputNumber' } }, - }, - { - 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: 'businessType', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '备注', - field: 'remark', - 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: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '承接人用户名', + field: 'acceptUserId', + 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: 'creator', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '最后更新时间', - field: 'updateTime', - sort: 'custom', - isDetail: true, - isForm: false, - isTable: false, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '完成人用户名', + field: 'completeUserId', + 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: 'updater', - isDetail: true, - isForm: false, - isTable: false, - 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: 'useOnTheWayLocation', - // dictType: DICT_TYPE.TRUE_FALSE, - // dictClass: 'string', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTable: false, - // form: { - // component: 'Switch', - // value: 'TRUE', - // componentProps: { - // inactiveValue: 'FALSE', - // activeValue: 'TRUE' - // } - // } - // }, - { - label: '自动完成', - field: 'autoComplete', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 } - } - }, - { - label: '允许修改库位', - field: 'allowModifyLocation', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 } - } - }, - { - label: '允许修改数量', - field: 'allowModifyQty', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '备注', + field: 'remark', + 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: 'allowBiggerQty', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isDetail: true, + isForm: false, + isTable: false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } - } - }, - { - label: '允许小于推荐数量', - field: 'allowSmallerQty', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + }, + { + label: '最后更新者', + field: 'updater', + isDetail: true, + isForm: false, + isTable: false, + table: { + width: 150 } - } - }, - { - label: '允许修改库存状态', - field: 'allowModifyInventoryStatus', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + // { + // label: '使用在途库', + // field: 'useOnTheWayLocation', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + { + label: '自动完成', + field: 'autoComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - { - label: '允许连续扫描', - field: 'allowContinuousScanning', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + }, + { + label: '允许修改库位', + field: 'allowModifyLocation', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - { - label: '允许部分完成', - field: 'allowPartialComplete', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + }, + { + label: '允许修改数量', + field: 'allowModifyQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - { - label: '允许修改批次', - field: 'allowModifyBatch', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + }, + { + label: '允许大于推荐数量', + field: 'allowBiggerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - { - label: '允许修改箱码', - field: 'allowModifyPackingNumber', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + }, + { + label: '允许小于推荐数量', + field: 'allowSmallerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改库存状态', + field: 'allowModifyInventoryStatus', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许连续扫描', + field: 'allowContinuousScanning', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许部分完成', + field: 'allowPartialComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改批次', + field: 'allowModifyBatch', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改箱码', + field: 'allowModifyPackingNumber', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 120, + fixed: 'right' } } - }, - { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, - table: { - width: 120, - fixed: 'right' - }, - } -])) + ]) +) //表单校验 export const IssueJobMainRules = reactive({ - requestNumber: [ - { required: true, message: '请选择申请单号', trigger: 'change' } - ], - fromWarehouseCode: [ - { required: true, message: '请选择从仓库代码', trigger: 'change' } - ], - fromAreaTypes: [ - { 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' } - ], + requestNumber: [{ required: true, message: '请选择申请单号', trigger: 'change' }], + fromWarehouseCode: [{ required: true, message: '请选择从仓库代码', trigger: 'change' }], + fromAreaTypes: [{ 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' } - ], + 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 IssueJobDetail = useCrudSchemas(reactive([ - { - label: '生产线代码', - field: 'productionLineCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - hiddenInMain:true, - }, - { - label: '工位代码', - field: 'workStationCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - hiddenInMain:true, - }, - { - label: '在途库库位', - field: 'onTheWayLocationCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - hiddenInMain:true, - }, - { - label: '包装号', - field: 'packingNumber', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - sortTableDefault:5, - }, - { - label: '包装规格', - field: 'packUnit', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:5, - }, - { - label: '包装数量', - field: 'packQty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', - }, - sortTableDefault:5, - }, - { - label: '器具号', - field: 'containerNumber', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: true, - isTable:false, - }, - { - label: '批次', - field: 'batch', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - sortSearchDefault:3, - sortTableDefault:4, - }, - { - label: '库存状态', - field: 'inventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '采购订单号', - field: 'poNumber', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - sortTableDefault:2, - }, - { - label: '订单行', - field: 'poLine', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - sortTableDefault:2, - }, - { - label: '从库位代码', - field: 'fromLocationCode', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - }, - { - label: '到库位代码', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - }, - { - label: '物料代码', - field: 'itemCode', - sort: 'custom', - table: { - width: 150 - }, - sortSearchDefault:2, - isSearch: true, - sortTableDefault:3, - }, - { - label: '物料名称', - field: 'itemName', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:3, - }, - { - label: '物料描述1', - field: 'itemDesc1', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: true, - }, - { - label: '物料描述2', - field: 'itemDesc2', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: true, - }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: true, - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', - }, - hiddenInMain: true, - }, - { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:6, - }, - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180 - }, - hiddenInMain: true, - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: true, - }, - { - label: '从货主代码', - field: 'fromOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: true, - }, - { - label: '到货主代码', - field: 'toOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: true, - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - hiddenInMain: true, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', +export const IssueJobDetail = useCrudSchemas( + reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + sortSearchDefault: 2, + isSearch: true, + sortTableDefault: 3 + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 3 + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + sortSearchDefault: 3, + sortTableDefault: 4 + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + }, + hiddenInMain: true + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 6 + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 5 + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + }, + sortTableDefault: 5 + }, + + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '从货主', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '到货主', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } }, - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: true, - }, - { - label: '供应商计量数量', - field: 'supplierQty', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - hiddenInMain: true, - form: { - component: 'InputNumber', - } - }, - { - label: '供应商计量单位', - field: 'supplierUom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - hiddenInMain:true, - }, + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isDetail: false, + hiddenInMain: true + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isDetail: false, + hiddenInMain: true + }, + { + label: '在途库库位', + field: 'onTheWayLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isDetail: false, + hiddenInMain: true + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + isTable: false, + table: { + width: 150 + }, + isSearch: false, + isDetail: false, + sortTableDefault: 5 + }, + + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isDetail: false, + isTable: false + }, -])) + // { + // label: '采购订单号', + // field: 'poNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true, + // isDetail: false, + // sortTableDefault: 2 + // }, + // { + // label: '订单行', + // field: 'poLine', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true, + // isDetail: false, + // sortTableDefault: 2 + // }, + + { + label: '备注', + field: 'remark', + sort: 'custom', + isDetail: false, + table: { + width: 150 + }, + hiddenInMain: true + }, + + { + label: '供应商计量数量', + field: 'supplierQty', + sort: 'custom', + isDetail: false, + table: { + width: 150 + }, + isTable: false, + hiddenInMain: true, + form: { + component: 'InputNumber' + } + }, + { + label: '供应商计量单位', + field: 'supplierUom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isDetail: false, + hiddenInMain: true + } + ]) +) //表单校验 export const IssueJobDetailRules = reactive({ diff --git a/src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts b/src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts index f40cdef01..5e39ab54b 100644 --- a/src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts @@ -1,825 +1,801 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' /** * @returns {Array} 发料记录主表 */ -export const IssueRecordMain = useCrudSchemas(reactive([ - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180, - fixed: 'left' - }, - sortSearchDefault:1, - isSearch: true - }, - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.JOB_STATUS, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:1, - }, - { - label: '申请单号', - field: 'requestNumber', - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - }, - { - label: '任务单号', - field: 'jobNumber', - sort: 'custom', - table: { - width: 180 - }, - isTable: false, - }, - { - label: '供应商代码', - field: 'supplierCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '车间代码', - field: 'workshopCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '出库事务类型', - field: 'outTransactionType', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '入库事务类型', - field: 'inTransactionType', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '执行时间', - field: 'executeTime', - 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', +export const IssueRecordMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + sortSearchDefault: 1, + isSearch: true + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1 + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: false + }, + { + label: '任务单号', + field: 'jobNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: false + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '执行时间', + field: 'executeTime', + 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: 'activeDate', - formatter: dateFormatter2, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - isTable: false, - sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width: '100%'}, - type: 'date', - dateFormat: 'YYYY-MM-DD', - valueFormat: 'x', + { + label: '生效日期', + field: 'activeDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + isTable: false, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x' + } } }, - }, - { - label: '申请时间', - field: 'requestTime', - 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: 'requestTime', + 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: 'dueTime', - 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: 'dueTime', + 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: 'departmentCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '接口类型', - field: 'interfaceType', - dictType: DICT_TYPE.INTERFACE_TYPE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '业务类型', - field: 'businessType', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '备注', - field: 'remark', - 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: true, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 } }, - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - isTable: true, - }, - { - label: '最后更新时间', - field: 'updateTime', - sort: 'custom', - isDetail: true, - isForm: false, - isTable: false, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isDetail: true, + isForm: false, + isTable: false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } - } - }, - { - label: '最后更新者', - field: 'updater', - isDetail: true, - isForm: false, - isTable: false, - table: { - width: 150 - } - }, - // { - // label: '代码', - // field: 'code', - // sort: 'custom', - // table: { - // width: 150 - // }, - // }, - { - label: '从仓库代码', - field: 'fromWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '从库区类型范围', - field: 'fromAreaTypes', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '从库区代码范围', - field: 'fromAreaCodes', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '到仓库代码', - field: 'toWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '到库区类型范围', - field: 'toAreaTypes', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '到库区代码范围', - field: 'toAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - // { - // label: '使用在途库', - // field: 'useOnTheWayLocation', - // dictType: DICT_TYPE.TRUE_FALSE, - // dictClass: 'string', - // isTable: false, - // sort: 'custom', - // table: { - // width: 150 - // }, - // form: { - // component: 'Switch', - // value: 'TRUE', - // componentProps: { - // inactiveValue: 'FALSE', - // activeValue: 'TRUE' - // } - // } - // }, - { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: false, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + }, + { + label: '最后更新者', + field: 'updater', + isDetail: true, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 } + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + // { + // label: '使用在途库', + // field: 'useOnTheWayLocation', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable: false, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '包装号', // 子表数据 只是为了展示 + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 6 + }, + { + label: '批次', // 子表数据 只是为了展示 + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 5 } - }, - { - label: '包装号', // 子表数据 只是为了展示 - field: 'fromPackingNumber', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:6, - }, - { - label: '批次', // 子表数据 只是为了展示 - field: 'fromBatch', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:5, - }, -])) + ]) +) //表单校验 export const IssueRecordMainRules = reactive({ - requestNumber: [ - { required: true, message: '请选择申请单号', trigger: 'change' } - ], - fromWarehouseCode: [ - { required: true, message: '请选择从仓库代码', trigger: 'change' } - ], - fromAreaTypes: [ - { required: true, message: '请选择从库区类型范围', trigger: 'change' } - ], - toWarehouseCode: [ - { required: true, message: '请选择到仓库代码', trigger: 'change' } - ], - toAreaTypes: [ - { required: true, message: '请选择库位类型范围', trigger: 'change' } - ], - outTransaction: [ - { required: true, message: '请输入出库事务类型', trigger: 'blur' } - ], - inTransaction: [ - { required: true, message: '请输入入库事务类型', trigger: 'blur' } - ], - executeTime: [ - { required: true, message: '请输入执行时间', trigger: 'change' } - ], - activeDate: [ - { required: true, message: '请输入生效日期', trigger: 'change' } - ], - available: [ - { required: true, message: '请输入是否可用', trigger: 'blur' } - ], - departmentCode: [ - { required: true, message: '请输入部门', trigger: 'blur' } - ], - interfaceType: [ - { required: true, message: '请选择接口类型', trigger: 'change' } - ], - number: [ - { required: true, message: '请输入单据号', trigger: 'blur' } - ], - businessType: [ - { required: true, message: '请输入业务类型', trigger: 'blur' } - ], - createTime: [ - { required: true, message: '请输入创建时间', trigger: 'blur' } - ], - creator: [ - { required: true, message: '请输入创建者', trigger: 'blur' } - ], + requestNumber: [{ required: true, message: '请选择申请单号', trigger: 'change' }], + fromWarehouseCode: [{ required: true, message: '请选择从仓库代码', trigger: 'change' }], + fromAreaTypes: [{ required: true, message: '请选择从库区类型范围', trigger: 'change' }], + toWarehouseCode: [{ required: true, message: '请选择到仓库代码', trigger: 'change' }], + toAreaTypes: [{ required: true, message: '请选择库位类型范围', trigger: 'change' }], + outTransaction: [{ required: true, message: '请输入出库事务类型', trigger: 'blur' }], + inTransaction: [{ required: true, message: '请输入入库事务类型', trigger: 'blur' }], + executeTime: [{ required: true, message: '请输入执行时间', trigger: 'change' }], + activeDate: [{ required: true, message: '请输入生效日期', trigger: 'change' }], + available: [{ required: true, message: '请输入是否可用', trigger: 'blur' }], + departmentCode: [{ required: true, message: '请输入部门', trigger: 'blur' }], + interfaceType: [{ required: true, message: '请选择接口类型', trigger: 'change' }], + 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 IssueRecordDetail = useCrudSchemas(reactive([ - { - label: '从包装号', - field: 'fromPackingNumber', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - hiddenInMain: true - }, - { - label: '到包装号', - field: 'toPackingNumber', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - hiddenInMain: true - }, - { - label: '包装规格', - field: 'packUnit', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:8, - }, - { - label: '包装数量', - field: 'packQty', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:8, - }, - { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:9, - }, - { - label: '从批次', - field: 'fromBatch', - sort: 'custom', - table: { - width: 150 - }, - sortSearchDefault:3, - isSearch: true, - hiddenInMain: true - }, - { - label: '到批次', - field: 'toBatch', - sort: 'custom', - table: { - width: 150 - }, - sortSearchDefault:4, - isSearch: true, - hiddenInMain: true - }, - { - label: '库存状态', - field: 'inventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '采购订单号', - field: 'poNumber', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - sortTableDefault:2, - }, - { - label: '订单行', - field: 'poLine', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - sortTableDefault:3, - }, - { - label: '生产线代码', - field: 'productionLineCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false - }, - { - label: '工位代码', - field: 'workStationCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false - }, - { - label: '在途库库位', - field: 'onTheWayLocationCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false - }, - - { - label: '供应商代码', - field: 'supplierCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - }, - { - label: '从货主代码', - field: 'fromOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '从库位代码', - field: 'fromLocationCode', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - }, - { - label: '从库位组代码', - field: 'fromLocationGroupCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '从库区代码', - field: 'fromAreaCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '到货主代码', - field: 'toOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '到库位代码', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - }, - { - label: '到库位组代码', - field: 'toLocationGroupCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - - { - label: '到库区代码', - field: 'toAreaCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180 - }, - hiddenInMain:true, +export const IssueRecordDetail = useCrudSchemas( + reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + sortSearchDefault: 2, + sortTableDefault: 4 + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 4 + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 9 + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '从包装号', + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + hiddenInMain: true + }, + { + label: '到包装号', + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + hiddenInMain: true + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 8 + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 8 + }, - }, - { - label: '物料代码', - field: 'itemCode', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - sortSearchDefault:2, - sortTableDefault:4, - }, - { - label: '物料名称', - field: 'itemName', - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:4, - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, + { + label: '从批次', + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + sortSearchDefault: 3, + isSearch: true, + hiddenInMain: true + }, + { + label: '到批次', + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, + sortSearchDefault: 4, + isSearch: true, + hiddenInMain: true + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + } + }, + // { + // label: '采购订单号', + // field: 'poNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true, + // sortTableDefault: 2 + // }, + // { + // label: '订单行', + // field: 'poLine', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true, + // sortTableDefault: 3 + // }, + // { + // label: '生产线代码', + // field: 'productionLineCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false + // }, + // { + // label: '工位代码', + // field: 'workStationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false + // }, + // { + // label: '在途库库位', + // field: 'onTheWayLocationCode', + // 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 - }, - hiddenInMain:true, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + // { + // label: '供应商代码', + // field: 'supplierCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false + // }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '从库位组代码', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '从库区代码', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: true, + isDetail: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + isDetail: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } } }, - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '物料描述1', - field: 'itemDesc1', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '物料描述2', - field: 'itemDesc2', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, + { + label: '到库位组代码', + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + + { + label: '到库区代码', + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true + }, + // { + // label: '单据号', + // field: 'number', + // sort: 'custom', + // table: { + // width: 180 + // }, + // hiddenInMain: true + // }, + + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true + // }, + // { + // label: '创建时间', + // field: 'createTime', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // hiddenInMain: true, + // form: { + // component: 'DatePicker', + // componentProps: { + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x' + // } + // } + // }, + // { + // label: '创建者', + // field: 'creator', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true + // }, + + // { + // label: '项目代码', + // field: 'projectCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true + // }, - }, - { - label: '接口类型', - field: 'interfaceType', - dictType: DICT_TYPE.INTERFACE_TYPE, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '从器具号', - field: 'fromContainerNumber', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, - { - label: '到器具号', - field: 'toContainerNumber', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - }, + // { + // label: '接口类型', + // field: 'interfaceType', + // dictType: DICT_TYPE.INTERFACE_TYPE, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true + // }, + // { + // label: '从器具号', + // field: 'fromContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true + // }, + // { + // label: '到器具号', + // field: 'toContainerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true + // } - // { - // label: '代码', - // field: 'code', - // sort: 'custom', - // table: { - // width: 150 - // }, - // }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, - // { - // label: '任务明细ID', - // field: 'jobDetailId', - // sort: 'custom', - // table: { - // width: 150 - // }, - // }, -])) + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + ]) +) //表单校验 export const IssueRecordDetailRules = reactive({ diff --git a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts index 26d259db7..022e7787d 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts @@ -1,6 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as ProductionlineApi from '@/api/wms/productionline' import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' @@ -24,1044 +24,1072 @@ const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { - pageSize:10, - pageNo:1, - code:'IssueRequest' + pageSize: 10, + pageNo: 1, + code: 'IssueRequest' } - const data = await getRequestsettingApi.getRequestsettingPage(queryParams) - const requestsettingData =data?.list[0]||{} +const data = await getRequestsettingApi.getRequestsettingPage(queryParams) +const requestsettingData = data?.list[0] || {} - // 获取当前操作人的部门 - import { useUserStore } from '@/store/modules/user' - import { TableColumn } from '@/types/table' - const userStore = useUserStore() - const userDept = userStore.userSelfInfo.dept - // id 转str 否则form回显匹配不到 - userDept.id = userDept.id.toString() - const userDeptArray:any = [userDept] +// 获取当前操作人的部门 +import { useUserStore } from '@/store/modules/user' +import { TableColumn } from '@/types/table' +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept +// id 转str 否则form回显匹配不到 +userDept.id = userDept.id.toString() +const userDeptArray: any = [userDept] /** * @returns {Array} 发料申请主表 */ -export const IssueRequestMain = useCrudSchemas(reactive([ - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180, - fixed: 'left' - }, - isForm: false, - isSearch: true, - sortSearchDefault:1, - }, - { - label: '车间代码', - field: 'workshopCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch:true, - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择车间代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '车间信息', // 查询弹窗标题 - searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 - searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] +export const IssueRequestMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true, + sortSearchDefault: 1 + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择车间代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } } - } - }, - { - label: '生产线代码', - field: 'productionLineCode', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - hiddenInMain:true, - tableForm:{ - isInpuFocusShow: true, - searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '生产线信息', // 查询弹窗标题 - searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 - searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 - searchCondition: [{ - key:'workshopCode', - value:'workshopCode', - message: '请填写车间代码!', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + hiddenInMain: true, + tableForm: { + isInpuFocusShow: true, searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '生产线信息', // 查询弹窗标题 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 - searchCondition: [{ - key:'workshopCode', - value:'workshopCode', - message: '请填写车间代码!', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] + searchCondition: [ + { + key: 'workshopCode', + value: 'workshopCode', + message: '请填写车间代码!', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'workshopCode', + value: 'workshopCode', + message: '请填写车间代码!', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } } - } - }, - { - label: '工位代码', - field: 'workStationCode', - sort: 'custom', - table: { - width: 150 }, - isTable:false, - hiddenInMain:true, - tableForm:{ - isInpuFocusShow: true, - searchListPlaceholder: '请选择工位代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '工位信息', // 查询弹窗标题 - searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 - searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key:'productionLineCode', - value:'productionLineCode', - message: '请填写生产线代码!', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch:true, - isSearchList: true, // 开启查询弹窗 + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + hiddenInMain: true, + tableForm: { + isInpuFocusShow: true, searchListPlaceholder: '请选择工位代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '工位信息', // 查询弹窗标题 searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key:'productionLineCode', - value:'productionLineCode', - message: '请填写生产线代码!', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - }, - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.REQUEST_STATUS, - dictClass: 'string', - isForm:false, - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:1, - form: { - value: '1', - componentProps: { - disabled: true + searchCondition: [ + { + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工位信息', // 查询弹窗标题 + searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } } - } - }, - { - label: '申请时间', - field: 'requestTime', - 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: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isForm: false, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1, + form: { + value: '1', + componentProps: { + disabled: true + } } }, - isForm: false, - }, - { - label: '截止时间', - field: 'dueTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable:false, - form: { - component: 'DatePicker', - componentProps: { - style:{width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + { + label: '申请时间', + field: 'requestTime', + 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' + } + }, + isForm: false + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + 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 - }, - isForm: false - }, - { - label: '到库区类型范围', - field: 'toAreaTypes', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - isTable:false, - sort: 'custom', - table: { - width: 150 - }, - isForm: false - }, - { - label: '从库区代码范围', - field: 'fromAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false - }, - { - label: '到库区代码范围', - field: 'toAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false - }, - // { - // label: '从仓库代码', - // field: 'fromWarehouseCode', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTable:false, - // form: { - // // labelMessage: '信息提示说明!!!', - // componentProps: { - // isSearchList: true, // 开启查询弹窗 - // searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 - // searchField: 'code', // 查询弹窗赋值字段 - // searchTitle: '仓库信息', // 查询弹窗标题 - // searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 - // searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 - // searchCondition: [{ - // key: 'available', - // value: 'TRUE', - // isMainValue: false - // }] - // } - // } - // }, - // { - // label: '到仓库代码', - // field: 'toWarehouseCode', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTable:false, - // form: { - // componentProps: { - // disabled: true - // } - // } - // }, - { - label: '业务类型', - field: 'businessType', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - form: { - value: 'Issue', - componentProps: { - disabled: true + { + 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: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + // { + // label: '从仓库代码', + // field: 'fromWarehouseCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '仓库信息', // 查询弹窗标题 + // searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 + // searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, + // { + // label: '到仓库代码', + // field: 'toWarehouseCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // form: { + // componentProps: { + // disabled: true + // } + // } + // }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + form: { + value: 'Issue', + componentProps: { + disabled: true + } + }, + isForm: false + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isForm: false, + table: { + width: 150 + }, + isTable: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id == cellValue)?.name + }, + form: { + value: userDept.id, + component: 'Select', + api: () => userDeptArray, + componentProps: { + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } + } } }, - isForm: false - }, - { - label: '部门', - field: 'departmentCode', - sort: 'custom', - isForm:false, - table: { - width: 150 - }, - isTable:false, - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return userDeptArray.find((account) => account.id == cellValue)?.name - }, - form: { - value: userDept.id, - component: 'Select', - api: () => userDeptArray, - componentProps: { - disabled: true, - optionsAlias: { - labelField: 'name', - valueField: 'id' + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + // { + // label: '使用在途库', + // field: 'useOnTheWayLocation', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable:false, + // isForm:false, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoCommit, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true } } - } - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - // { - // label: '使用在途库', - // field: 'useOnTheWayLocation', - // dictType: DICT_TYPE.TRUE_FALSE, - // dictClass: 'string', - // isTable:false, - // isForm:false, - // sort: 'custom', - // table: { - // width: 150 - // }, - // form: { - // component: 'Switch', - // value: 'TRUE', - // componentProps: { - // inactiveValue: 'FALSE', - // activeValue: 'TRUE' - // } - // } - // }, - { - label: '自动提交', - field: 'autoCommit', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable:false, - isForm:false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: requestsettingData.autoCommit, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } } - } - }, - { - label: '自动通过', - field: 'autoAgree', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isForm:false, - isTable:false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: requestsettingData.autoAgree, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoExecute, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } } - } - }, - { - label: '自动执行', - field: 'autoExecute', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isForm:false, - isTable:false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: requestsettingData.autoExecute, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true + { + label: '直接生成记录', + field: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } } - } - }, - { - label: '直接生成记录', - field: 'directCreateRecord', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isForm: false, - isTable: false, - sort: 'custom', - table: { - width: 150 }, - form: { - component: 'Switch', - value: requestsettingData.directCreateRecord, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: true, + isForm: false + }, + { + label: '最后更新时间', + field: 'updateTime', + 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' + } + }, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 230, + fixed: 'right' } } - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable:true, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - isForm: false, - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - isTable:true, - isForm: false, - }, - { - label: '最后更新时间', - field: 'updateTime', - 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', - } - }, - isForm: false, - }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, - }, - { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, - table: { - width: 230, - fixed: 'right' - }, - }, -])) + ]) +) export const IssueRequestMainRules = reactive({ - workshopCode: [ - { required: true, message: '请选择车间代码', trigger: 'change' } - ], - productionLineCode: [ - { required: true, message: '请选择生产线代码', trigger: 'change' } - ], + workshopCode: [{ required: true, message: '请选择车间代码', trigger: 'change' }], + productionLineCode: [{ required: true, message: '请选择生产线代码', trigger: 'change' }], // fromWarehouseCode: [ // { required: true, message: '请选择从仓库代码', trigger: 'change' } // ], // dueTime: [ // { required: true, message: '请选择截止时间', trigger: 'change' } // ], - remark: [ - { max: 50, message: '不得超过50个字符', trigger: 'blur' } - ], + remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }] }) /** * @returns {Array} 发料申请子表 */ -export const IssueRequestDetail = useCrudSchemas(reactive([ - // { - // label: '生产线代码', - // field: 'productionLineCode', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTable:false, - // hiddenInMain:true, - // tableForm:{ - // isInpuFocusShow: true, - // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 - // searchField: 'code', // 查询弹窗赋值字段 - // searchTitle: '生产线信息', // 查询弹窗标题 - // searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 - // searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 - // searchCondition: [{ - // key:'workshopCode', - // value:'workshopCode', - // message: '请填写车间代码!', - // isMainValue: true - // },{ - // key: 'available', - // value: 'TRUE', - // isMainValue: false - // }] - // }, - // form: { - // // labelMessage: '信息提示说明!!!', - // componentProps: { - // isSearchList: true, // 开启查询弹窗 - // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 - // searchField: 'code', // 查询弹窗赋值字段 - // searchTitle: '生产线信息', // 查询弹窗标题 - // searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 - // searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 - // searchCondition: [{ - // key:'workshopCode', - // value:'workshopCode', - // message: '请填写车间代码!', - // isMainValue: true - // },{ - // key: 'available', - // value: 'TRUE', - // isMainValue: false - // }] - // } - // } - // }, - // { - // label: '工位代码', - // field: 'workStationCode', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isTable:false, - // hiddenInMain:true, - // tableForm:{ - // isInpuFocusShow: true, - // searchListPlaceholder: '请选择工位代码', // 输入框占位文本 - // searchField: 'code', // 查询弹窗赋值字段 - // searchTitle: '工位信息', // 查询弹窗标题 - // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 - // searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 - // searchCondition: [{ - // key:'productionLineCode', - // value:'productionLineCode', - // message: '请填写生产线代码!', - // isMainValue: true - // },{ - // key: 'available', - // value: 'TRUE', - // isMainValue: false - // }] - // }, - // form: { - // // labelMessage: '信息提示说明!!!', - // componentProps: { - // isSearchList: true, // 开启查询弹窗 - // searchListPlaceholder: '请选择工位代码', // 输入框占位文本 - // searchField: 'code', // 查询弹窗赋值字段 - // searchTitle: '工位信息', // 查询弹窗标题 - // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 - // searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 - // searchCondition: [{ - // key:'productionLineCode', - // value:'productionLineCode', - // message: '请填写生产线代码!', - // isMainValue: true - // },{ - // key: 'available', - // value: 'TRUE', - // isMainValue: false - // }] - // } - // } - // }, - { - label: '包装号', - field: 'packingNumber', - sort: 'custom', - table: { - width: 180 - }, - isTable:false, - isSearch: false, - sortSearchDefault:4, - sortTableDefault:6, - isTableForm: false, - isForm: false, - }, - { - label: '器具号', - field: 'containerNumber', - sort: 'custom', - table: { - width: 150 +export const IssueRequestDetail = useCrudSchemas( + reactive([ + // { + // label: '生产线代码', + // field: 'productionLineCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain:true, + // tableForm:{ + // isInpuFocusShow: true, + // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '生产线信息', // 查询弹窗标题 + // searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + // searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '生产线信息', // 查询弹窗标题 + // searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + // searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, + // { + // label: '工位代码', + // field: 'workStationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable:false, + // hiddenInMain:true, + // tableForm:{ + // isInpuFocusShow: true, + // searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '工位信息', // 查询弹窗标题 + // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + // searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'productionLineCode', + // value:'productionLineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '工位信息', // 查询弹窗标题 + // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + // searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'productionLineCode', + // value:'productionLineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + isSearch: false, + sortSearchDefault: 4, + sortTableDefault: 6, + isTableForm: false, + isForm: false + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false, + isTable: false + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isSearch: false, + sortTableDefault: 5, + sortSearchDefault: 3, + isTableForm: false, + isForm: false }, - hiddenInMain:true, - isTableForm: false, - isForm: false, - isTable: false, - }, - { - label: '批次', - field: 'batch', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isSearch: false, - sortTableDefault:5, - sortSearchDefault:3, - isTableForm: false, - isForm: false - }, - { - label: '库存状态', - field: 'inventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - isTableForm: false, - isForm: false - }, - // { - // label: '从库位代码', - // field: 'fromLocationCode', - // sort: 'custom', - // table: { - // width: 150 - // }, - // isSearch: true, - // hiddenInMain:true, - // sortSearchDefault:6, - // }, - { - label: '到库位代码', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150 - }, - isSearch: false, - isTable:false, - sortSearchDefault:6, - sortTableDefault:1100, - isTableForm: false, - isForm: false - }, - { - label: '物料代码', - field: 'itemCode', - sort: 'custom', - table: { - width: 250 - }, - isSearch:true, - sortSearchDefault:2, - sortTableDefault:3, - tableForm:{ - multiple: true, - enterSearch:true, - isInpuFocusShow: true, - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择物料代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '物料信息', // 查询弹窗标题 - searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 - searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false + // { + // label: '从库位代码', + // field: 'fromLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isSearch: true, + // hiddenInMain:true, + // sortSearchDefault:6, + // }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 }, - // ,{ - // key:'productionLineCode', - // value:'productionLineCode', - // message: '请填写生产线代码!', - // isMainValue: true - // }, - { - key: 'businessTypeCode', - value: 'Issue', - isMainValue: false - } - ] - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { + isSearch: false, + isTable: false, + sortSearchDefault: 6, + sortTableDefault: 1100, + isTableForm: false, + isForm: false + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 250 + }, + isSearch: true, + sortSearchDefault: 2, + sortTableDefault: 3, + tableForm: { + multiple: true, + enterSearch: true, + isInpuFocusShow: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '物料信息', // 查询弹窗标题 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + // ,{ + // key:'productionLineCode', + // value:'productionLineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // }, + { + key: 'businessTypeCode', + value: 'Issue', + isMainValue: false + } + ] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物料信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } } - } - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - tableForm: { - type: 'InputNumber', - min: 0, - precision: 6 }, - form: { - component: 'InputNumber', - componentProps: { + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 300 + }, + sortTableDefault: 4, + isTableForm: false, + isForm: false + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + tableForm: { + type: 'InputNumber', min: 0, precision: 6 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + } } - } - }, - - { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - sortTableDefault:9, - tableForm:{ - type: 'Select', - disabled: true - }, - form: { - componentProps: { - disabled: true - } - } - }, - // { - // label: '采购订单号', - // field: 'poNumber', - // sort: 'custom', - // table: { - // width: 150 - // }, - // hiddenInMain:true, - // sortTableDefault:1, - // }, - // { - // label: '订单行', - // field: 'poLine', - // sort: 'custom', - // table: { - // width: 150 - // }, - // hiddenInMain:true, - // sortTableDefault:2, - // }, - { - label: '单据号', - field: 'number', - sort: 'custom', - table: { - width: 180 }, - isTableForm: false, - hiddenInMain:true, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain: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', + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 6, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } } }, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '最后更新时间', - field: 'updateTime', - 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', + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + sortTableDefault: 7, + isTable: true, + isDetail: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + // { + // label: '采购订单号', + // field: 'poNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // sortTableDefault:1, + // }, + // { + // label: '订单行', + // field: 'poLine', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain:true, + // sortTableDefault:2, + // }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + hiddenInMain: true, + form: { + componentProps: { + disabled: true + } } }, - isTable:false, - hiddenInMain:true, - isTableForm: false, - isForm: false, - }, - { - label: '最后更新者', - field: 'updater', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '物料名称', - field: 'itemName', - sort: 'custom', - table: { - width: 300 - }, - sortTableDefault:4, - isTableForm: false, - isForm: false - }, - { - label: '物料描述1', - field: 'itemDesc1', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '物料描述2', - field: 'itemDesc2', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '项目代码', - field: 'projectCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - - { - label: '从货主代码', - field: 'fromOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '到货主代码', - field: 'toOwnerCode', - sort: 'custom', - table: { - width: 150 - }, - hiddenInMain:true, - isTableForm: false, - isForm: false - }, - { - label: '未执行任务数量', - field: 'unexecutedQty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 300 + }, + sortTableDefault: 5, + isTableForm: false, + isForm: false + }, + { + label: '未执行任务数量', + field: 'unexecutedQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber' + }, + isTableForm: false, + hiddenInMain: true + }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true + // }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + 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, + isTableForm: false, + isForm: false + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false }, - isTableForm:false, - hiddenInMain:true, - }, - { - label: '操作', - field: 'action', - hiddenInMain:true, - isDetail: false, - isForm: false , - table: { - width: 200, - fixed: 'right' + + { + label: '从货主', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + label: '到货主', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + label: '最后更新时间', + field: 'updateTime', + 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' + } + }, + isTable: false, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + hiddenInMain: true, + isTableForm: false, + isForm: false }, - isTableForm:false, - } -])) + + { + label: '操作', + field: 'action', + hiddenInMain: true, + isDetail: false, + isForm: false, + table: { + width: 200, + fixed: 'right' + }, + isTableForm: false + } + ]) +) //表单校验 export const IssueRequestDetailRules = reactive({