From 5bd0410fc59e65967d64d6fa7cf2e9bb529b575d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Mon, 30 Oct 2023 14:45:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/disposition/tableColumns.ts | 44167 +++++++++++++++++++++--- 1 file changed, 39561 insertions(+), 4606 deletions(-) diff --git a/src/utils/disposition/tableColumns.ts b/src/utils/disposition/tableColumns.ts index 5eae688b3..6fd8a3295 100644 --- a/src/utils/disposition/tableColumns.ts +++ b/src/utils/disposition/tableColumns.ts @@ -11711,14 +11711,16 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ }, sort: 'custom', table: { - width: 150 + width: 180 }, form: { component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '开始时间', @@ -11730,14 +11732,16 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ }, sort: 'custom', table: { - width: 150 + width: 180 }, form: { component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '结束时间', @@ -11749,14 +11753,16 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ }, sort: 'custom', table: { - width: 150 + width: 180 }, form: { component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '单据号', @@ -11806,8 +11812,10 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '创建者', @@ -11847,6 +11855,18 @@ export const DemandforecastingMainRules = reactive({ status: [ { 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' } + ], }) /** @@ -11855,7 +11875,11 @@ export const DemandforecastingMainRules = reactive({ export const DemandforecastingDetail = useCrudSchemas(reactive([ { label: '预测时间类型', - field: 'predictTimeType' + field: 'predictTimeType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '预测日期', @@ -11863,19 +11887,35 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' - } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itremCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -11883,15 +11923,38 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划数量', - field: 'planQty' + field: 'planQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -11899,7 +11962,11 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -11907,11 +11974,27 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, } ])) @@ -11921,7 +12004,7 @@ export const DemandforecastingDetailRules = reactive({ { required: true, message: '请选择预测时间类型', trigger: 'change' } ], predictTime: [ - { required: true, message: '请输入预测时间', trigger: 'blur' } + { required: true, message: '请输入预测时间', trigger: 'change' } ], planQty: [ { required: true, message: '请输入计划数量', trigger: 'blur' } @@ -11929,6 +12012,18 @@ export const DemandforecastingDetailRules = reactive({ uom: [ { required: true, message: '请选择计量单位', trigger: 'change' } ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'change' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], }) /** @@ -12015,8 +12110,10 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '结束时间', @@ -12034,8 +12131,10 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '创建时间', @@ -12053,8 +12152,10 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '创建者', @@ -12080,8 +12181,10 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '最后更新者', @@ -12098,6 +12201,10 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ dictClass: 'string', isSearch: true, isTable: true, + sort: 'custom', + table: { + width: 150 + }, form: { component: 'Switch', value: 'TRUE', @@ -12113,7 +12220,22 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ export const PurchasePlanMainRules = reactive({ available: [ { required: true, message: '请选择是否可用', trigger: 'change' } - ] + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], }) /** @@ -12122,23 +12244,43 @@ export const PurchasePlanMainRules = reactive({ export const PurchasePlanDetail = useCrudSchemas(reactive([ { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + } }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + } }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + } }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + } }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + } }, { label: '创建时间', @@ -12146,39 +12288,89 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + } }, { label: '已发货数量', - field: 'shippedQty' + field: 'shippedQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, }, { label: '计划数量', - field: 'planQty' + field: 'planQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + }, }, { label: '计量单位', field: 'uom', + sort: 'custom', dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + table: { + width: 150 + } }, { label: '最后更新者', - field: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + } }, { label: '最后更新时间', field: 'updateTime', + sort: 'custom', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' - } + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '是否可用', @@ -12186,7 +12378,19 @@ export const PurchasePlanDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) @@ -12196,11 +12400,17 @@ export const PurchasePlanDetailRules = reactive({ { required: true, message: '请选择是否可用', trigger: 'change' } ], poNumber: [ - { required: true, message: '请输入订单号', trigger: 'blur' } + { required: true, message: '请选择采购订单号', trigger: 'change' } ], shippedQty: [ { required: true, message: '请输入已发货数量', trigger: 'blur' } ], + uom: [ + { required: true, message: '请选择计量单位', trigger: 'change' } + ], + planQty: [ + { required: true, message: '请输入计划数量', trigger: 'blur' } + ], }) /** @@ -12296,7 +12506,15 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( }, sort: 'custom', table: { - width: 150 + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } }, }, { @@ -12358,6 +12576,14 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( table: { width: 180 }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '创建者', @@ -12378,6 +12604,14 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( table: { width: 180 }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '截止时间', @@ -12390,6 +12624,14 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( table: { width: 180 }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '部门', @@ -12417,11 +12659,27 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -12429,7 +12687,19 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -12437,7 +12707,19 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -12445,7 +12727,19 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -12453,10 +12747,71 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } } ])) +//表单校验 +export const SupplierdeliverRequestMainRules = reactive({ + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toDockCode: [ + { required: true, message: '请输入到月台代码', trigger: 'change' } + ], + planArriveTime: [ + { required: true, message: '请输入计划到货时间', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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} 供应商发货申请子表 */ @@ -12504,6 +12859,14 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '要货计划单号', - field: 'ppNumber' + field: 'ppNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货单号', - field: 'asnNumber' + field: 'asnNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '联系人姓名', - field: 'contactName' + field: 'contactName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '联系人电话', - field: 'contactPhone' + field: 'contactPhone', + sort: 'custom', + table: { + width: 150 + }, }, { label: '联系人电子邮件', - field: 'contactEmail' + field: 'contactEmail', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到月台代码', - field: 'toDockCode' + field: 'toDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '时间窗口', - field: 'timeWindow' + field: 'timeWindow', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划到货时间', @@ -12705,27 +13275,59 @@ export const SupplierdeliverRecordMain = useCrudSchemas(reactive([ 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: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransaction' + field: 'outTransaction', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransaction' + field: 'inTransaction', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -12733,7 +13335,19 @@ export const SupplierdeliverRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -12741,7 +13355,19 @@ export const SupplierdeliverRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -12749,7 +13375,19 @@ export const SupplierdeliverRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -12757,11 +13395,27 @@ export const SupplierdeliverRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -12769,19 +13423,35 @@ export const SupplierdeliverRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -12789,53 +13459,156 @@ export const SupplierdeliverRecordMain = useCrudSchemas(reactive([ 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: 'creator' - }, + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, { label: '是否可用', field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const SupplierdeliverRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请输入申请单号', trigger: 'blur' } + ], + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toDockCode: [ + { required: true, message: '请输入到月台代码', trigger: 'blur' } + ], + planArriveTime: [ + { required: true, message: '请输入计划到货时间', trigger: 'blur' } + ], + outTransaction: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransaction: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + executeTime: [ + { required: true, message: '请输入执行时间', trigger: 'blur' } + ], + activeDate: [ + { required: true, message: '请输入生效日期', trigger: 'blur' } + ], + 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 SupplierdeliverRecordDetail = useCrudSchemas(reactive([ { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '替代批次', - field: 'altBatch' + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货日期', @@ -12843,7 +13616,19 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive 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: '生产日期', @@ -12851,7 +13636,19 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive 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: '过期日期', @@ -12859,19 +13656,46 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive 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: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '标包数量', - field: 'stdPackQty' + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '标包单位', @@ -12879,11 +13703,22 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商计量数量', - field: 'supplierQty' + field: 'supplierQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '供应商计量单位', @@ -12891,63 +13726,126 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -12955,15 +13853,27 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -12971,53 +13881,163 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const SupplierdeliverRecordDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请输入从包装号', trigger: 'blur' } + ], + toPackingNumber: [ + { required: true, message: '请输入到包装号', trigger: 'blur' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + arriveDate: [ + { required: true, message: '请输入到货日期', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'blur' } + ], + expireDate: [ + { required: true, message: '请输入到货日期', trigger: 'blur' } + ], + poNumber: [ + { required: true, message: '请输入订单号', trigger: 'blur' } + ], + poLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + stdPackQty: [ + { required: true, message: '请输入标包数量', trigger: 'blur' } + ], + stdPackUnit: [ + { required: true, message: '请选择标包单位', trigger: 'blur' } + ], + toLocationCode: [ + { required: true, message: '请输入到库位代码', trigger: 'blur' } + ], + toLocationGroupCode: [ + { required: true, message: '请输入到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请输入到库区代码', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 采购收货申请主表 */ export const PurchasereceiptRequestMain = useCrudSchemas(reactive([ { label: '发货单号', - field: 'asnNumber' + field: 'asnNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '要货计划单号', - field: 'ppNumber' + field: 'ppNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -13025,7 +14045,11 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -13033,31 +14057,59 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到月台代码', - field: 'toDockCode' + field: 'toDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -13065,11 +14117,27 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -13077,11 +14145,27 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -13089,7 +14173,19 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( 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: '截止时间', @@ -13097,11 +14193,27 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -13109,7 +14221,11 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -13117,7 +14233,19 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -13125,7 +14253,19 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -13133,37 +14273,121 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true - }, - { - label: '直接生成记录', - field: 'directCreateRecord', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: true, - isTable: true - }, -])) - + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '直接生成记录', + field: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, +])) + +//表单校验 +export const PurchasereceiptRequestMainRules = reactive({ + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toLocationTypes: [ + { required: true, message: '请输入到库位类型范围', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 PurchasereceiptRequestDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '替代批次', - field: 'altBatch' + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货日期', @@ -13171,7 +14395,19 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货单号', - field: 'asnNumber' + field: 'asnNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '要货计划单号', - field: 'ppNumber' + field: 'ppNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到月台代码', - field: 'toDockCode' + field: 'toDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '申请时间', - field: 'requestTime' + field: 'requestTime', + sort: 'custom', + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '要求截止时间', - field: 'requestDueTime' + field: 'requestDueTime', + sort: 'custom', + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '状态', @@ -13369,7 +14886,11 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -13377,31 +14898,73 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ 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: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '岗位', - field: 'userPositionCode' + field: 'userPositionCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -13409,11 +14972,27 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -13421,7 +15000,19 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -13429,7 +15020,11 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -13437,31 +15032,59 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -13469,11 +15092,27 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -13481,7 +15120,19 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ 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: '自动完成', @@ -13489,7 +15140,19 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '允许修改库位', @@ -13497,7 +15160,19 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '允许修改数量', @@ -13505,7 +15180,19 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '允许大于推荐数量', @@ -13513,7 +15200,19 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '允许小于推荐数量', @@ -13521,7 +15220,19 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '允许修改库存状态', @@ -13529,7 +15240,19 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '允许连续扫描', @@ -13537,7 +15260,19 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '允许部分完成', @@ -13545,7 +15280,19 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '允许修改批次', @@ -13553,7 +15300,19 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '允许修改箱码', @@ -13561,29 +15320,109 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + sort: 'custom', + table: { + width: 180 + }, } ])) +//表单校验 +export const PurchasereceiptJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + supplierCode: [ + { required: true, message: '请选择供应商代码', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 采购收货任务子表 */ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '替代批次', - field: 'altBatch' + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货日期', @@ -13591,7 +15430,19 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ 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: '生产日期', @@ -13599,7 +15450,19 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ 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: '过期日期', @@ -13607,7 +15470,19 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ 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: '库存状态', @@ -13615,27 +15490,54 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '标包数量', - field: 'stdPackQty' + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '标包单位', @@ -13643,11 +15545,22 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商计量数量', - field: 'supplierQty' + field: 'supplierQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '供应商计量单位', @@ -13655,43 +15568,89 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '转换率', - field: 'convertRate' + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -13699,19 +15658,35 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - fiield: 'remark' + fiield: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -13719,57 +15694,165 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive([ 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', + } + }, }, ])) +//表单校验 +export const PurchasereceiptJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + arriveDate: [ + { required: true, message: '请输入到货日期', trigger: 'change' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入过期日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + poLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + stdPackQty: [ + { required: true, message: '请输入标包数量', trigger: 'blur' } + ], + stdPackUnit: [ + { required: true, message: '请选择标包单位', trigger: 'change' } + ], + convertRate: [ + { required: true, message: '请输入转换率', trigger: 'blur' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 采购收货记录主表 */ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货单号', - field: 'asnNumber' + field: 'asnNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '要货计划单号', - field: 'ppNumber' + field: 'ppNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到月台代码', - field: 'toDockCode' + field: 'toDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -13777,7 +15860,11 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -13785,23 +15872,43 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransaction' + field: 'outTransaction', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransaction' + field: 'inTransaction', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -13809,7 +15916,19 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -13817,7 +15936,19 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -13825,7 +15956,19 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -13833,15 +15976,35 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -13849,23 +16012,43 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -13873,7 +16056,19 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ 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: '是否可用', @@ -13881,7 +16076,19 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } } ])) @@ -13891,31 +16098,59 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive([ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive([ { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '替代批次', - field: 'altBatch' + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货日期', @@ -13923,7 +16158,19 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive 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: '生产日期', @@ -13931,7 +16178,19 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive 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: '过期日期', @@ -13939,7 +16198,19 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive 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: '库存状态', @@ -13947,51 +16218,102 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '标包数量', - field: 'stdPackQty' + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '标包单位', @@ -13999,11 +16321,22 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -14011,11 +16344,22 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商计量数量', - field: 'supplierQty' + field: 'supplierQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '供应商计量单位', @@ -14023,19 +16367,38 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '转换率', - field: 'convertRate' + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '目检结果', - field: 'visualInspectResult' + field: 'visualInspectResult', + sort: 'custom', + table: { + width: 150 + }, }, { label: '目检照片', - field: 'visualInspectPhotos' + field: 'visualInspectPhotos', + sort: 'custom', + table: { + width: 150 + }, }, { label: '不合格原因', @@ -14043,43 +16406,92 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.PURCHASE_RETURN_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单价', - field: 'singlePrice' + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '金额', - field: 'amount' + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -14087,15 +16499,27 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -14103,11 +16527,19 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -14115,11 +16547,27 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, } ])) @@ -14129,39 +16577,75 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive export const PurchasereturnRequestMain = useCrudSchemas(reactive([ { label: '采购收货记录单号', - field: 'purchaseReceiptRecordNumber' + field: 'purchaseReceiptRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货单号', - field: 'asnNumber' + field: 'asnNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '要货计划单号', - field: 'ppNumber' + field: 'ppNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -14169,7 +16653,11 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -14177,27 +16665,51 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从月台代码', - field: 'fromDockCode' + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -14205,7 +16717,19 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -14213,11 +16737,27 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -14225,15 +16765,27 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -14241,11 +16793,27 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -14253,7 +16821,19 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ 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: '自动提交', @@ -14261,7 +16841,19 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -14269,7 +16861,19 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -14277,7 +16881,19 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -14285,33 +16901,108 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const PurchasereturnRequestMainRules = reactive({ + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 PurchasereturnRequestDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '替代批次', - field: 'altBatch' + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -14319,55 +17010,110 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', - field: 'reason' + field: 'reason', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -14375,15 +17121,27 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -14391,11 +17149,19 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' - } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '最后更新者', - field: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -14403,57 +17169,147 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive 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', + } + }, } ])) +//表单校验 +export const PurchasereturnRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请输入包装号', trigger: 'blur' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请输入订单号', trigger: 'blur' } + ], + poLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + reason: [ + { required: true, message: '请选择原因', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 采购退货任务主表 */ export const PurchasereturnJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '采购收货记录单号', - field: 'purchaseReceiptRecordNumber' + field: 'purchaseReceiptRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货单号', - field: 'asnNumber' + field: 'asnNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '要货计划单号', - field: 'ppNumber' + field: 'ppNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货月台', - field: 'deliverDock' + field: 'deliverDock', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -14461,7 +17317,11 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -14469,19 +17329,35 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从月台代码', - field: 'fromDockCode' + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -14489,7 +17365,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -14497,15 +17385,35 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ 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: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -14513,11 +17421,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -14525,23 +17441,57 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ 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: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -14549,11 +17499,27 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -14561,7 +17527,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ 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: '自动完成', @@ -14569,7 +17547,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -14577,7 +17567,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -14585,7 +17587,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -14593,7 +17607,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -14601,7 +17627,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -14609,7 +17647,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -14617,7 +17667,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -14625,7 +17687,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -14633,7 +17707,19 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -14641,15 +17727,35 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -14657,11 +17763,27 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -14669,45 +17791,141 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive([ 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', + } + }, } ])) +//表单校验 +export const PurchasereturnJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + supplierCode: [ + { required: true, message: '请选择供应商代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 采购退货任务子表 */ export const PurchasereturnJobDetail = useCrudSchemas(reactive([ { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '替代批次', - field: 'altBatch' + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -14715,15 +17933,27 @@ export const PurchasereturnJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -14731,31 +17961,62 @@ export const PurchasereturnJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.PURCHASE_RETURN_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -14763,15 +18024,27 @@ export const PurchasereturnJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -14779,73 +18052,182 @@ export const PurchasereturnJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, } ])) +//表单校验 +export const PurchasereturnJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + poLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + reason: [ + { required: true, message: '请选择原因', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 采购退货记录主表 */ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '采购收货记录单号', - field: 'purchaseReceiptRecordNumber' + field: 'purchaseReceiptRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货单号', - field: 'asnNumber' + field: 'asnNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '要货计划单号', - field: 'ppNumber' + field: 'ppNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从月台代码', - field: 'fromDockCode' + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -14853,7 +18235,11 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -14861,15 +18247,27 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -14877,7 +18275,19 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -14885,7 +18295,19 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -14893,7 +18315,19 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -14901,15 +18335,35 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -14917,15 +18371,27 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -14933,11 +18399,19 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'available' + field: 'available', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -14945,77 +18419,202 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, } ])) +//表单校验 +export const PurchasereturnRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + supplierCode: [ + { required: true, message: '请选择供应商代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { 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: 'change' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 采购退货记录子表 */ export const PurchasereturnRecordDetail = useCrudSchemas(reactive([ { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '替代批次', - field: 'altBatch' + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -15023,15 +18622,27 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poline' + field: 'poline', + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -15039,35 +18650,76 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.PURCHASE_RETURN_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单价', - field: 'singlePrice' + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '金额', - field: 'amount' + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -15075,15 +18727,27 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -15091,15 +18755,27 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -15107,41 +18783,118 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive( 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: 'creator' - } + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, ])) +//表单校验 +export const PurchasereturnRecordDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + reason: [ + { required: true, message: '请选择原因', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + poline: [ + { required: true, message: '请选择订单行', trigger: 'change' } + ], +}) + /** * @returns {Array} 检验申请主表 */ export const InspectRequestMain = useCrudSchemas(reactive([ { label: '采购收货记录单号', - field: 'purchaseReceiptRecordNumber' + field: 'purchaseReceiptRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -15149,15 +18902,27 @@ export const InspectRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -15165,7 +18930,19 @@ export const InspectRequestMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -15173,7 +18950,19 @@ export const InspectRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -15181,11 +18970,27 @@ export const InspectRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -15193,11 +18998,19 @@ export const InspectRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新者', - field: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -15205,23 +19018,51 @@ export const InspectRequestMain = useCrudSchemas(reactive([ 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: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemcode' + field: 'itemcode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '检验类型', @@ -15229,7 +19070,11 @@ export const InspectRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INSPECT_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '下一步检验动作', @@ -15237,7 +19082,11 @@ export const InspectRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.NEXT_ACTION, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '抽检方式', @@ -15245,7 +19094,11 @@ export const InspectRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.SAMPLE_METHOD, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '计量单位', @@ -15253,19 +19106,41 @@ export const InspectRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '收货数量', - field: 'receiveQty' + field: 'receiveQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '样品数量', - field: 'sampleQty' + field: 'sampleQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -15273,7 +19148,19 @@ export const InspectRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -15281,7 +19168,19 @@ export const InspectRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -15289,7 +19188,19 @@ export const InspectRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -15297,21 +19208,108 @@ export const InspectRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const InspectRequestMainRules = reactive({ + purchaseReceiptRecordNumber: [ + { required: true, message: '请输入采购收货记录单号', trigger: 'blur' } + ], + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请输入订单号', trigger: 'blur' } + ], + poLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inspectType: [ + { required: true, message: '请选择检验类型', trigger: 'change' } + ], + nextAction: [ + { required: true, message: '请选择下一步检验动作', trigger: 'change' } + ], + receiveQty: [ + { required: true, message: '请输入收货数量', trigger: 'blur' } + ], + sampleQty: [ + { required: true, message: '请输入样品数量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 InspectRequestDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -15319,11 +19317,19 @@ export const InspectRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -15331,35 +19337,78 @@ export const InspectRequestDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -15367,29 +19416,74 @@ export const InspectRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, } ])) +//表单校验 +export const InspectRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请输入包装号', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请输入库位代码', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 检验任务主表 */ export const InspectJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '采购收货记录单号', - field: 'purchaseReceiptRecordNumber' + field: 'purchaseReceiptRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -15397,7 +19491,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -15405,11 +19511,27 @@ export const InspectJobMain = useCrudSchemas(reactive([ 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: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -15417,7 +19539,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -15425,11 +19559,27 @@ export const InspectJobMain = useCrudSchemas(reactive([ 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: 'update' + field: 'update', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -15437,23 +19587,49 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人用户名', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -15461,11 +19637,27 @@ export const InspectJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -15473,7 +19665,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -15481,7 +19685,11 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -15489,19 +19697,35 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -15509,27 +19733,59 @@ export const InspectJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '检验类型', @@ -15537,7 +19793,11 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INSPECT_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '下一步检验动作', @@ -15545,7 +19805,11 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.NEXT_ACTION, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '抽检方式', @@ -15553,7 +19817,11 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.SAMPLE_METHOD, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '计量单位', @@ -15561,19 +19829,41 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '收货数量', - field: 'receiveQty' + field: 'receiveQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '样品数量', - field: 'sampleQty' + field: 'sampleQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '货主代码', - field: 'owner' + field: 'owner', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -15581,7 +19871,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -15589,7 +19891,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -15597,7 +19911,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -15605,7 +19931,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -15613,7 +19951,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -15621,7 +19971,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -15629,7 +19991,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -15637,7 +20011,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -15645,7 +20031,19 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -15653,21 +20051,114 @@ export const InspectJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const InspectJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + purchaseReceiptRecordNumber: [ + { required: true, message: '请输入选择采购收货记录单号', trigger: 'change' } + ], + supplierCode: [ + { required: true, message: '请选择供应商代码', trigger: 'change' } + ], + warehouseCode: [ + { required: true, message: '请选择仓库代码', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + poLine: [ + { required: true, message: '请选择订单行', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inspectType: [ + { required: true, message: '请选择检验类型', trigger: 'change' } + ], + nextAction: [ + { required: true, message: '请选择下一步检验动作', trigger: 'change' } + ], + receiveQty: [ + { required: true, message: '请输入收货数量', trigger: 'blur' } + ], + sampleQty: [ + { required: true, message: '请输入样品数量', trigger: 'blur' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 检验任务子表 */ export const InspectJobDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -15675,19 +20166,35 @@ export const InspectJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -15695,35 +20202,78 @@ export const InspectJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -15731,37 +20281,90 @@ export const InspectJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const InspectJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 检验记录主表 */ export const InspectRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '采购收货记录单号', - field: 'purchaseReceiptRecordNumber' + field: 'purchaseReceiptRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -15769,7 +20372,19 @@ export const InspectRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -15777,7 +20392,19 @@ export const InspectRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -15785,7 +20412,19 @@ export const InspectRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -15793,11 +20432,27 @@ export const InspectRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -15805,19 +20460,35 @@ export const InspectRecordMain = useCrudSchemas(reactive([ isSearch: true, isTable: true, dictType: DICT_TYPE.INTERFACE_TYPE, - dictClass: 'string' + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -15825,27 +20496,59 @@ export const InspectRecordMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '检验类型', @@ -15853,7 +20556,11 @@ export const InspectRecordMain = useCrudSchemas(reactive([ isSearch: true, isTable: true, dictType: DICT_TYPE.INSPECT_TYPE, - dictClass: 'string' + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, }, { label: '下一步检验动作', @@ -15861,7 +20568,11 @@ export const InspectRecordMain = useCrudSchemas(reactive([ isSearch: true, isTable: true, dictType: DICT_TYPE.NEXT_ACTION, - dictClass: 'string' + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, }, { label: '抽检方式', @@ -15869,7 +20580,11 @@ export const InspectRecordMain = useCrudSchemas(reactive([ isSearch: true, isTable: true, dictType: DICT_TYPE.SAMPLE_METHOD, - dictClass: 'string' + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计量单位', @@ -15877,39 +20592,93 @@ export const InspectRecordMain = useCrudSchemas(reactive([ isSearch: true, isTable: true, dictType: DICT_TYPE.UOM, - dictClass: 'string' + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, }, { label: '收货数量', - field: 'receiveQty' + field: 'receiveQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '样品数量', - field: 'sampleQty' + field: 'sampleQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '合格数量', - field: 'batchGoodQty' + field: 'batchGoodQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '不合格数量', - field: 'batchFaildQty' + field: 'batchFaildQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '破坏数量', - field: 'batchCrackQty' + field: 'batchCrackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '最终不合格数量', - field: 'batchNotPassedQty' + field: 'batchNotPassedQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -15917,15 +20686,27 @@ export const InspectRecordMain = useCrudSchemas(reactive([ isSearch: true, isTable: true, dictType: DICT_TYPE.LOCATION_TYPE, - dictClass: 'string' + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -15933,53 +20714,205 @@ export const InspectRecordMain = useCrudSchemas(reactive([ isSearch: true, isTable: true, dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string' + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const InspectRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + purchaseReceiptRecordNumber: [ + { required: true, message: '请选择采购收货记录单号', trigger: 'change' } + ], + supplierCode: [ + { required: true, message: '请选择供应商代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + poNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + poLine: [ + { required: true, message: '请选择订单行', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inspectType: [ + { required: true, message: '请选择检验类型', trigger: 'change' } + ], + nextAction: [ + { required: true, message: '请选择下一步检验动作', trigger: 'change' } + ], + receiveQty: [ + { required: true, message: '请选择收货数量', trigger: 'blur' } + ], + sampleQty: [ + { required: true, message: '请输入样品数量', trigger: 'blur' } + ], + batchGoodQty: [ + { required: true, message: '请输入合格数量', trigger: 'blur' } + ], + batchFaildQty: [ + { required: true, message: '请输入不合格数量', trigger: 'blur' } + ], + batchCrackQty: [ + { required: true, message: '请输入破坏数量', trigger: 'blur' } + ], + batchNotPassedQty: [ + { required: true, message: '请输入最终不合格数量', trigger: 'blur' } + ], + 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: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 检验记录子表 */ export const InspectRecordDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '样品数量', - field: 'sampleQty' + field: 'sampleQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '合格数量', - field: 'goodQty' + field: 'goodQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '不合格数量', - field: 'failedQty' + field: 'failedQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '破坏数量', - field: 'crackQty' + field: 'crackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '最终不合格数量', - field: 'notPassedQty' + field: 'notPassedQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '不合格原因', @@ -15987,15 +20920,27 @@ export const InspectRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INSPECT_FAILED_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '异常照片', - field: 'photos' + field: 'photos', + sort: 'custom', + table: { + width: 150 + }, }, { label: '检验人', - field: 'inspectUser' + field: 'inspectUser', + sort: 'custom', + table: { + width: 150 + }, }, { label: '检验结果', @@ -16003,35 +20948,67 @@ export const InspectRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INSPECT_RESULT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '外观', - field: 'appearance' + field: 'appearance', + sort: 'custom', + table: { + width: 150 + }, }, { label: '尺寸', - field: 'volume' + field: 'volume', + sort: 'custom', + table: { + width: 150 + }, }, { label: '重量', - field: 'weight' + field: 'weight', + sort: 'custom', + table: { + width: 150 + }, }, { label: '其他属性', - field: 'otherProperties' + field: 'otherProperties', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -16039,31 +21016,70 @@ export const InspectRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -16071,11 +21087,19 @@ export const InspectRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -16083,25 +21107,87 @@ export const InspectRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const InspectRecordDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + sampleQty: [ + { required: true, message: '请输入样品数量', trigger: 'blur' } + ], + goodQty: [ + { required: true, message: '请输入合格数量', trigger: 'blur' } + ], + failedQty: [ + { required: true, message: '请输入不合格数量', trigger: 'blur' } + ], + crackQty: [ + { required: true, message: '请输入破坏数量', trigger: 'blur' } + ], + notPassedQty: [ + { required: true, message: '请输入最终不合格数量', trigger: 'blur' } + ], + inspectResult: [ + { required: true, message: '请选择检验结果', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 上架申请主表 */ export const PutawayRequestMain = useCrudSchemas(reactive([ { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -16109,23 +21195,43 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -16133,11 +21239,27 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -16145,7 +21267,19 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -16153,11 +21287,27 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -16165,7 +21315,11 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -16173,15 +21327,35 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -16189,11 +21363,19 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -16201,7 +21383,19 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -16209,7 +21403,19 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -16217,7 +21423,19 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -16225,10 +21443,67 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const PutawayRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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} 上架申请子表 @@ -16236,15 +21511,27 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ export const PutawayRequestDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -16252,31 +21539,59 @@ export const PutawayRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -16284,31 +21599,70 @@ export const PutawayRequestDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -16316,15 +21670,27 @@ export const PutawayRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -16332,29 +21698,85 @@ export const PutawayRequestDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const PutawayRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请输入包装号', trigger: 'blur' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请输入从库位代码', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 上架任务主表 */ export const PutawayJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -16362,7 +21784,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -16370,11 +21804,27 @@ export const PutawayJobMain = useCrudSchemas(reactive([ 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: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -16382,7 +21832,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -16390,11 +21852,27 @@ export const PutawayJobMain = useCrudSchemas(reactive([ 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: 'update' + field: 'update', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -16402,23 +21880,49 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人用户名', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -16426,11 +21930,27 @@ export const PutawayJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -16438,7 +21958,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -16446,7 +21978,11 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -16454,19 +21990,35 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -16474,23 +22026,51 @@ export const PutawayJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -16498,7 +22078,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -16506,7 +22098,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -16514,7 +22118,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -16522,7 +22138,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -16530,7 +22158,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -16538,7 +22178,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -16546,7 +22198,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -16554,7 +22218,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -16562,7 +22238,19 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -16570,25 +22258,104 @@ export const PutawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const PutawayJobMainRulee = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 上架任务子表 */ export const PutawayJobDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -16596,47 +22363,94 @@ export const PutawayJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemdesc2' + field: 'itemdesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -16644,23 +22458,43 @@ export const PutawayJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -16668,37 +22502,104 @@ export const PutawayJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const PutawayJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 上架记录主表 */ export const PutawayRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -16706,7 +22607,19 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -16714,7 +22627,19 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -16722,7 +22647,19 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -16730,11 +22667,27 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -16742,23 +22695,43 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -16766,19 +22739,43 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -16786,11 +22783,19 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -16798,11 +22803,19 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -16810,29 +22823,109 @@ export const PutawayRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const PutawayRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { 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: 'change' } + ], + 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 PutawayRecordDetail = useCrudSchemas(reactive([ { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -16840,59 +22933,115 @@ export const PutawayRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -16900,31 +23049,70 @@ export const PutawayRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -16932,11 +23120,19 @@ export const PutawayRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -16944,45 +23140,130 @@ export const PutawayRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const PutawayRecordDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 备料计划主表 */ export const PreparetoissueMain = useCrudSchemas(reactive([ { label: '生产计划单号', - field: 'productionPlanNumber' + field: 'productionPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间', - field: 'workshop' + field: 'workshop', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产线', - field: 'prodLine' + field: 'prodLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班次', - field: 'shift' + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班组', - field: 'team' + field: 'team', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划日期', @@ -16990,15 +23271,35 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ 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: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '开始时间', @@ -17006,7 +23307,19 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ 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: '结束时间', @@ -17014,11 +23327,27 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ 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: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -17026,11 +23355,27 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -17038,15 +23383,35 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'status' + field: 'status', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -17054,21 +23419,78 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const PreparetoissueMainRules = reactive({ + workshop: [ + { required: true, message: '请选择车间', trigger: 'change' } + ], + prodLine: [ + { required: true, message: '请选择生产线', trigger: 'change' } + ], + shift: [ + { required: true, message: '请选择班次', trigger: 'change' } + ], + team: [ + { required: true, message: '请选择班组', trigger: 'change' } + ], + planDate: [ + { required: true, message: '请输入计划日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], +}) + /** * @returns {Array} 备料计划子表 */ export const PreparetoissueDetail = useCrudSchemas(reactive([ { label: '目标库位', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位', - field: 'workStation' + field: 'workStation', + sort: 'custom', + table: { + width: 150 + }, }, { label: '截止时间', @@ -17076,19 +23498,43 @@ export const PreparetoissueDetail = useCrudSchemas(reactive([ 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: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -17096,15 +23542,38 @@ export const PreparetoissueDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划数量', - field: 'planQty' + field: 'planQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -17112,11 +23581,19 @@ export const PreparetoissueDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新者', - field: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -17124,7 +23601,19 @@ export const PreparetoissueDetail = useCrudSchemas(reactive([ 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: '是否可用', @@ -17132,17 +23621,58 @@ export const PreparetoissueDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const PreparetoissueDetailRules = reactive({ + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + uom: [ + { required: true, message: '请选择计量单位', trigger: 'change' } + ], + planQty: [ + { required: true, message: '请输入计划数量', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 补料申请主表 */ export const RepleinshRequestMain = useCrudSchemas(reactive([ { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -17150,15 +23680,27 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -17166,23 +23708,43 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -17190,11 +23752,27 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -17202,7 +23780,19 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -17210,11 +23800,27 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -17222,7 +23828,11 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -17230,11 +23840,27 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -17242,7 +23868,19 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -17250,7 +23888,19 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -17258,7 +23908,19 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -17266,10 +23928,68 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const RepleinshRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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} 补料申请子表 */ @@ -17280,23 +24000,43 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -17304,31 +24044,70 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -17336,15 +24115,27 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -17352,25 +24143,71 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const RepleinshRequestDetailRules = reactive({ + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请输入到库位代码', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 补料任务主表 */ export const RepleinshJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -17378,7 +24215,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -17386,11 +24235,27 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ 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: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -17398,7 +24263,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -17406,11 +24283,27 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ 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: 'update' + field: 'update', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -17418,23 +24311,49 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人用户名', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -17442,11 +24361,27 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -17454,7 +24389,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -17462,7 +24409,11 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -17470,19 +24421,35 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -17490,23 +24457,51 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -17514,7 +24509,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -17522,7 +24529,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -17530,7 +24549,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -17538,7 +24569,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -17546,7 +24589,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -17554,7 +24609,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -17562,7 +24629,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -17570,7 +24649,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -17578,7 +24669,19 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -17586,25 +24689,104 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const RepleinshJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 补料任务子表 */ export const RepleinshJobDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -17612,39 +24794,78 @@ export const RepleinshJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemdesc2' + field: 'itemdesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -17652,23 +24873,43 @@ export const RepleinshJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -17676,33 +24917,96 @@ export const RepleinshJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const RepleinshJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 补料记录主表 */ export const RepleinshRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -17710,7 +25014,19 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -17718,7 +25034,19 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -17726,7 +25054,19 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -17734,11 +25074,27 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -17746,23 +25102,43 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -17770,19 +25146,43 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -17790,11 +25190,19 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -17802,11 +25210,19 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -17814,29 +25230,109 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const RepleinshRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { 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 RepleinshRecordDetail = useCrudSchemas(reactive([ { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -17844,51 +25340,99 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -17896,31 +25440,70 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -17928,11 +25511,19 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -17940,29 +25531,86 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const RepleinshRecordDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], +}) + /** * @returns {Array} 拣料申请主表 */ export const PickRequestMain = useCrudSchemas(reactive([ { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -17970,15 +25618,27 @@ export const PickRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -17986,23 +25646,43 @@ export const PickRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -18010,11 +25690,27 @@ export const PickRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -18022,7 +25718,19 @@ export const PickRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -18030,11 +25738,27 @@ export const PickRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -18042,7 +25766,11 @@ export const PickRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -18050,11 +25778,27 @@ export const PickRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -18062,7 +25806,19 @@ export const PickRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -18070,7 +25826,19 @@ export const PickRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -18078,7 +25846,19 @@ export const PickRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -18086,10 +25866,68 @@ export const PickRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const PickRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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} 拣料申请子表 */ @@ -18100,23 +25938,43 @@ export const PickRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -18124,31 +25982,70 @@ export const PickRequestDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -18156,15 +26053,27 @@ export const PickRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -18172,25 +26081,71 @@ export const PickRequestDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const PickRequestDetailRules = reactive({ + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请输入到库位代码', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 拣料任务主表 */ export const PickJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -18198,7 +26153,19 @@ export const PickJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -18206,11 +26173,27 @@ export const PickJobMain = useCrudSchemas(reactive([ 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: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -18218,7 +26201,19 @@ export const PickJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -18226,11 +26221,27 @@ export const PickJobMain = useCrudSchemas(reactive([ 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: 'update' + field: 'update', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -18238,23 +26249,49 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人用户名', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -18262,11 +26299,27 @@ export const PickJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -18274,7 +26327,19 @@ export const PickJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -18282,7 +26347,11 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -18290,19 +26359,35 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -18310,23 +26395,51 @@ export const PickJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -18334,7 +26447,19 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -18342,7 +26467,19 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -18350,7 +26487,19 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -18358,7 +26507,19 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -18366,7 +26527,19 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -18374,7 +26547,19 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -18382,7 +26567,19 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -18390,7 +26587,19 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -18398,7 +26607,19 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -18406,25 +26627,104 @@ export const PickJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const PickJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 拣料任务子表 */ export const PickJobDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -18432,39 +26732,78 @@ export const PickJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemdesc2' + field: 'itemdesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -18472,23 +26811,43 @@ export const PickJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -18496,33 +26855,96 @@ export const PickJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const PickJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 拣料记录主表 */ export const PickRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -18530,7 +26952,19 @@ export const PickRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -18538,7 +26972,19 @@ export const PickRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -18546,7 +26992,19 @@ export const PickRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -18554,11 +27012,27 @@ export const PickRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -18566,23 +27040,43 @@ export const PickRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -18590,19 +27084,43 @@ export const PickRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -18610,11 +27128,19 @@ export const PickRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -18622,11 +27148,19 @@ export const PickRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -18634,29 +27168,109 @@ export const PickRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const PickRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { 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 PickRecordDetail = useCrudSchemas(reactive([ { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -18664,51 +27278,99 @@ export const PickRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -18716,31 +27378,70 @@ export const PickRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -18748,11 +27449,19 @@ export const PickRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -18760,33 +27469,106 @@ export const PickRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const PickRecordDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 发料申请主表 */ export const IssueRequestMain = useCrudSchemas(reactive([ { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -18794,15 +27576,27 @@ export const IssueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -18810,23 +27604,43 @@ export const IssueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -18834,11 +27648,27 @@ export const IssueRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -18846,7 +27676,19 @@ export const IssueRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -18854,11 +27696,27 @@ export const IssueRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -18866,7 +27724,11 @@ export const IssueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -18874,11 +27736,27 @@ export const IssueRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -18886,7 +27764,19 @@ export const IssueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -18894,7 +27784,19 @@ export const IssueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -18902,7 +27804,19 @@ export const IssueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -18910,7 +27824,19 @@ export const IssueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '使用在途库', @@ -18918,33 +27844,110 @@ export const IssueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +export const IssueRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 IssueRequestDetail = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -18952,23 +27955,43 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -18976,31 +27999,67 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计量单位', @@ -19008,15 +28067,27 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -19024,33 +28095,93 @@ export const IssueRequestDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const IssueRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请输入包装号', trigger: 'blur' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请输入到库位代码', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 发料任务主表 */ export const IssueJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workShopCode' + field: 'workShopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -19058,7 +28189,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -19066,11 +28209,27 @@ export const IssueJobMain = useCrudSchemas(reactive([ 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: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -19078,7 +28237,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -19086,11 +28257,27 @@ export const IssueJobMain = useCrudSchemas(reactive([ 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: 'update' + field: 'update', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -19098,23 +28285,49 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人用户名', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -19122,11 +28335,27 @@ export const IssueJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -19134,7 +28363,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -19142,7 +28383,11 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -19150,19 +28395,35 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -19170,19 +28431,43 @@ export const IssueJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '使用在途库', @@ -19190,7 +28475,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动完成', @@ -19198,7 +28495,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -19206,7 +28515,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -19214,7 +28535,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -19222,7 +28555,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -19230,7 +28575,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -19238,7 +28595,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -19246,7 +28615,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -19254,7 +28635,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -19262,7 +28655,19 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -19270,21 +28675,96 @@ export const IssueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const IssueJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 发料任务子表 */ export const IssueJobDetail = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -19292,51 +28772,102 @@ export const IssueJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '在途库库位', - field: 'onTheWayLocationCode' + field: 'onTheWayLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemmDesc2' + field: 'itemmDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '标包数量', - field: 'stdPackQty' + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '标包单位', @@ -19344,11 +28875,22 @@ export const IssueJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商计量数量', - field: 'supplierQty' + field: 'supplierQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '供应商计量单位', @@ -19356,15 +28898,30 @@ export const IssueJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -19372,15 +28929,27 @@ export const IssueJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -19388,45 +28957,120 @@ export const IssueJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const IssueJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 发料记录主表 */ export const IssueRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -19434,7 +29078,19 @@ export const IssueRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -19442,7 +29098,19 @@ export const IssueRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -19450,7 +29118,19 @@ export const IssueRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -19458,11 +29138,27 @@ export const IssueRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -19470,19 +29166,35 @@ export const IssueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -19490,19 +29202,43 @@ export const IssueRecordMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -19510,15 +29246,27 @@ export const IssueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -19526,11 +29274,19 @@ export const IssueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '使用在途库', @@ -19538,7 +29294,19 @@ export const IssueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '是否可用', @@ -19546,25 +29314,101 @@ export const IssueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const IssueRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { 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: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '在途库库位', - field: 'onTheWayLocationCode' + field: 'onTheWayLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -19572,79 +29416,155 @@ export const IssueRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -19652,27 +29572,63 @@ export const IssueRecordDetail = useCrudSchemas(reactive([ 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: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '计量单位', @@ -19680,11 +29636,19 @@ export const IssueRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -19692,33 +29656,106 @@ export const IssueRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const IssueRecordDetailRules = reactive({ + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 生产收料任务主表 */ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ { label: '发料任务单号', - field: 'issueJobNumber' + field: 'issueJobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -19726,7 +29763,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -19734,7 +29783,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -19742,11 +29803,27 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', - field: 'expiredTime' + field: 'expiredTime', + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '最后更新时间', @@ -19754,31 +29831,73 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ 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: 'update' + field: 'update', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -19786,11 +29905,27 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -19798,7 +29933,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -19806,7 +29953,11 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -19814,19 +29965,35 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -19834,19 +30001,43 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '使用在途库', @@ -19854,7 +30045,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动完成', @@ -19862,7 +30065,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -19870,7 +30085,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -19878,7 +30105,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -19886,7 +30125,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -19894,7 +30145,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -19902,7 +30165,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -19910,7 +30185,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -19918,7 +30205,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -19926,7 +30225,19 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -19934,37 +30245,92 @@ export const ProductionreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductionreceiptJobMainRules = reactive({ + issueJobNumber: [ + { required: true, message: '请选择发料任务单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], +}) + /** * @returns {Array} 生产收料任务子表 */ export const ProductionreceiptJobDetail = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '在途库库位', - field: 'onTheWayLocationCode' + field: 'onTheWayLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -19972,39 +30338,78 @@ export const ProductionreceiptJobDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -20012,15 +30417,27 @@ export const ProductionreceiptJobDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -20028,45 +30445,120 @@ export const ProductionreceiptJobDetail = useCrudSchemas(reactive( formater: 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ProductionreceiptJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 生产收料记录主表 */ export const ProductionreceiptRecordMain = useCrudSchemas(reactive([ { label: '发料任务单号', - field: 'issueJobNumber' + field: 'issueJobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -20074,7 +30566,19 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive formatter: dateFormatter, detai: { 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: '生效日期', @@ -20082,7 +30586,19 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive formatter: dateFormatter, detai: { 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: '申请时间', @@ -20090,7 +30606,19 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive formatter: dateFormatter, detai: { 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: '截止时间', @@ -20098,11 +30626,27 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive formatter: dateFormatter, detai: { 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -20110,23 +30654,43 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -20134,15 +30698,35 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive formatter: dateFormatter, detai: { 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -20150,15 +30734,27 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -20166,11 +30762,19 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '使用在途库', @@ -20178,7 +30782,19 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '是否可用', @@ -20186,41 +30802,133 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } } ])) +//表单校验 +export const ProductionreceiptRecordMainRules = reactive({ + issueJobNumber: [ + { required: true, message: '请选择发料任务单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { 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 ProductionreceiptRecordDetail = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '在途库库位', - field: 'onTheWayLocationCode' + field: 'onTheWayLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -20228,43 +30936,83 @@ export const ProductionreceiptRecordDetail = useCrudSchemas(reactive([ { label: '发料记录单号', - field: 'issueRecordNumber' + field: 'issueRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -20360,7 +31236,15 @@ export const OnlinesettlementRequestMain = useCrudSchemas(reactive formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' - } + }, + sort: 'custom', + table: { + width: 180 + }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '截止时间', @@ -20368,11 +31252,23 @@ export const OnlinesettlementRequestMain = useCrudSchemas(reactive formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' - } + }, + sort: 'custom', + table: { + width: 180 + }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -20380,7 +31276,11 @@ export const OnlinesettlementRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -20388,23 +31288,47 @@ export const OnlinesettlementRequestMain = useCrudSchemas(reactive formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' - } + }, + sort: 'custom', + table: { + width: 180 + }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新者', - field: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -20412,11 +31336,23 @@ export const OnlinesettlementRequestMain = useCrudSchemas(reactive formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' - } + }, + sort: 'custom', + table: { + width: 180 + }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -20424,7 +31360,19 @@ export const OnlinesettlementRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -20432,7 +31380,19 @@ export const OnlinesettlementRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -20440,7 +31400,19 @@ export const OnlinesettlementRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -20448,25 +31420,89 @@ export const OnlinesettlementRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const OnlinesettlementRequestMainRules = reactive({ + issueRecordNumber: [ + { required: true, message: '请输入发料记录单号', trigger: 'blur' } + ], + warehouseCode: [ + { required: true, message: '请输入仓库代码', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 OnlinesettlementRequestDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -20474,31 +31510,62 @@ export const OnlinesettlementRequestDetail = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发料记录单号', - field: 'issueRecordNumber' + field: 'issueRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -20576,7 +31739,19 @@ export const OnlinesettlementRecordMain = useCrudSchemas(reactive( 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: '生效日期', @@ -20584,7 +31759,19 @@ export const OnlinesettlementRecordMain = useCrudSchemas(reactive( 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: '申请时间', @@ -20592,7 +31779,19 @@ export const OnlinesettlementRecordMain = useCrudSchemas(reactive( 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: '截止时间', @@ -20600,11 +31799,27 @@ export const OnlinesettlementRecordMain = useCrudSchemas(reactive( 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -20612,23 +31827,43 @@ export const OnlinesettlementRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -20636,7 +31871,19 @@ export const OnlinesettlementRecordMain = useCrudSchemas(reactive( 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: '是否可用', @@ -20644,25 +31891,87 @@ export const OnlinesettlementRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const OnlinesettlementRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + issueRecordNumber: [ + { required: true, message: '请选择发料记录单号', trigger: 'change' } + ], + warehouseCode: [ + { 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 OnlinesettlementRecordDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -20670,43 +31979,86 @@ export const OnlinesettlementRecordDetail = useCrudSchemas(reactive([ { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -20760,23 +32174,43 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -20784,11 +32218,27 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -20796,7 +32246,19 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive 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: '截止时间', @@ -20804,11 +32266,27 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -20816,7 +32294,11 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -20824,15 +32306,35 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -20840,11 +32342,19 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -20852,7 +32362,19 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -20860,7 +32382,19 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -20868,7 +32402,19 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -20876,21 +32422,87 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductionreturnRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 ProductionreturnRequestDetail = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -20898,43 +32510,83 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -21016,7 +32771,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -21024,7 +32791,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -21032,7 +32811,11 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -21040,7 +32823,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -21048,31 +32843,73 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -21080,11 +32917,27 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -21092,7 +32945,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -21100,7 +32965,11 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -21108,19 +32977,35 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -21128,19 +33013,43 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -21148,7 +33057,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -21156,7 +33077,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -21164,7 +33097,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -21172,7 +33117,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -21180,7 +33137,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -21188,7 +33157,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -21196,7 +33177,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -21204,7 +33197,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -21212,7 +33217,19 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -21220,33 +33237,120 @@ export const ProductionreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductionreturnJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 生产退料任务子表 */ export const ProductionreturnJobDetail = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -21254,39 +33358,78 @@ export const ProductionreturnJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -21294,19 +33437,35 @@ export const ProductionreturnJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -21314,41 +33473,112 @@ export const ProductionreturnJobDetail = useCrudSchemas(reactive([ 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: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ProductionreturnJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 生产退料记录主表 */ export const ProductionreturnRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -21356,7 +33586,19 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( 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: '生效日期', @@ -21364,7 +33606,19 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( 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: '申请时间', @@ -21372,7 +33626,19 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( 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: '截止时间', @@ -21380,11 +33646,27 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -21392,23 +33674,43 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -21416,15 +33718,35 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -21432,15 +33754,27 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -21448,11 +33782,19 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -21460,21 +33802,93 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductionreturnRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { 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 ProductionreturnRecordDetail = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -21482,75 +33896,147 @@ export const ProductionreturnRecordDetail = useCrudSchemas(reactive([ { label: '供应商代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单类型', @@ -21624,7 +34218,11 @@ export const WorkMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.WORK_ORDER_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单日期', @@ -21632,7 +34230,19 @@ export const WorkMain = useCrudSchemas(reactive([ 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: '截止日期', @@ -21640,23 +34250,51 @@ export const WorkMain = useCrudSchemas(reactive([ 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: 'version' + field: 'version', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -21664,11 +34302,27 @@ export const WorkMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -21676,15 +34330,35 @@ export const WorkMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '当前阶段', - field: 'currentStage' + field: 'currentStage', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -21696,33 +34370,88 @@ export const WorkMain = useCrudSchemas(reactive([ }, ])) +//表单校验 +export const WorkMainRules = reactive({ + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + type: [ + { required: true, message: '请选择订单类型', trigger: 'change' } + ], + orderDate: [ + { required: true, message: '请输入订单日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], +}) + /** * @returns {Array} 生产订单子表 */ export const WorkDetail = useCrudSchemas(reactive([ { label: '行号', - field: 'lineNumber' + field: 'lineNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完工数量', - field: 'finishedQty' + field: 'finishedQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -21730,15 +34459,38 @@ export const WorkDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单数量', - field: 'orderQty' + field: 'orderQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -21746,7 +34498,11 @@ export const WorkDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -21754,11 +34510,27 @@ export const WorkDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -21766,33 +34538,93 @@ export const WorkDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const WorkDetailRules = reactive({ + lineNumber: [ + { required: true, message: '请输入行号', trigger: 'change' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + uom: [ + { required: true, message: '请选择计量单位', trigger: 'change' } + ], + planQty: [ + { required: true, message: '请输入计划数量', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], +}) + /** * @returns {Array} 生产计划主表 */ export const ProductionMain = useCrudSchemas(reactive([ { label: '顺序', - field: 'displayOrder' + field: 'displayOrder', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间', - field: 'workshop' + field: 'workshop', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产线', - field: 'productionLine' + field: 'productionLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班次', - field: 'shift' + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班组', - field: 'team' + field: 'team', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划日期', @@ -21800,23 +34632,51 @@ export const ProductionMain = useCrudSchemas(reactive([ 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: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remrk' + field: 'remrk', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -21824,11 +34684,27 @@ export const ProductionMain = useCrudSchemas(reactive([ 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: 'status' + field: 'status', + sort: 'custom', + table: { + width: 150 + }, }, { label: '开始时间', @@ -21836,7 +34712,19 @@ export const ProductionMain = useCrudSchemas(reactive([ 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: '结束时间', @@ -21844,11 +34732,27 @@ export const ProductionMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -21856,7 +34760,19 @@ export const ProductionMain = useCrudSchemas(reactive([ 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: '是否可用', @@ -21864,45 +34780,135 @@ export const ProductionMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductionMainRules = reactive({ + displayOrder: [ + { required: true, message: '请输入顺序', trigger: 'blur' } + ], + workshop: [ + { required: true, message: '请选择车间', trigger: 'change' } + ], + productionLine: [ + { required: true, message: '请选择生产线', trigger: 'change' } + ], + shift: [ + { required: true, message: '请选择班次', trigger: 'change' } + ], + team: [ + { required: true, message: '请选择班组', trigger: 'change' } + ], + planDate: [ + { required: true, message: '请输入计划日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], +}) + /** * @returns {Array} 生产计划子表 */ export const ProductionDeatil = useCrudSchemas(reactive([ { label: '订单号', - field: 'woNumber' + field: 'woNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'woLine' + field: 'woLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: 'Bom版本', - field: 'bomVersion' + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, }, { label: '合格数量', - field: 'goodQty' + field: 'goodQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '不合格数量', - field: 'notGoodQty' + field: 'notGoodQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -21910,15 +34916,38 @@ export const ProductionDeatil = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划数量', - field: 'planQty' + field: 'planQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -21926,7 +34955,11 @@ export const ProductionDeatil = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -21934,11 +34967,27 @@ export const ProductionDeatil = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -21946,33 +34995,102 @@ export const ProductionDeatil = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductionDeatilRules = reactive({ + woNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + bomVersion: [ + { required: true, message: '请输入Bom版本', trigger: 'blur' } + ], + goodQty: [ + { required: true, message: '请输入合格数量', trigger: 'blur' } + ], + notGoodQty: [ + { required: true, message: '请输入不合格数量', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + uom: [ + { required: true, message: '请选择计量单位', trigger: 'change' } + ], + planQty: [ + { required: true, message: '请输入计划数量', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品收货申请主表 */ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ { label: '生产计划单号', - field: 'productionPlanNumber' + field: 'productionPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班组', - field: 'team' + field: 'team', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班次', - field: 'shift' + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -21980,23 +35098,43 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -22004,11 +35142,27 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -22016,7 +35170,19 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -22024,11 +35190,27 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -22036,7 +35218,11 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -22044,11 +35230,27 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -22056,7 +35258,19 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -22064,7 +35278,19 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -22072,7 +35298,19 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -22080,37 +35318,116 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductreceiptRequestMainRules = reactive({ + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请输入到库区代码范围', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 ProductreceiptRequestDetail = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产日期', @@ -22118,7 +35435,19 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive 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: '过期日期', @@ -22126,7 +35455,19 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive 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: '库存状态', @@ -22134,19 +35475,38 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'woNumber' + field: 'woNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'woLine' + field: 'woLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '标包数量', - field: 'stdPackQty' + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '标包单位', @@ -22154,23 +35514,43 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -22178,31 +35558,67 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计量单位', @@ -22210,7 +35626,11 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -22218,37 +35638,119 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, } ])) +//表单校验 +export const ProductreceiptRequestDetailRules = reactive({ + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请输入包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请选择生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请选择过期日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + woNumber: [ + { required: true, message: '请输入订单号', trigger: 'blur' } + ], + woLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + stdPackQty: [ + { required: true, message: '请输入标包数量', trigger: 'blur' } + ], + stdPackUnit: [ + { required: true, message: '请选择标包单位', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品收货申请子表 */ export const BackflushRequestDetailb = useCrudSchemas(reactive([ { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: 'BOM版本', - field: 'bomVersion' + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -22256,31 +35758,70 @@ export const BackflushRequestDetailb = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -22288,7 +35829,11 @@ export const BackflushRequestDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -22296,41 +35841,97 @@ export const BackflushRequestDetailb = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, } ])) +//表单校验 +export const BackflushRequestDetailbRules = reactive({ + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品收货任务主表 */ export const ProductreceiptJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产线代码', - field: 'productionPlanNumber' + field: 'productionPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班组', - field: 'team' + field: 'team', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班次', - field: 'shift' + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -22338,7 +35939,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -22346,7 +35959,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -22354,7 +35979,11 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -22362,7 +35991,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -22370,31 +36011,73 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -22402,11 +36085,27 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -22414,7 +36113,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -22422,7 +36133,11 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -22430,19 +36145,35 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -22450,15 +36181,35 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -22466,7 +36217,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -22474,7 +36237,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -22482,7 +36257,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -22490,7 +36277,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -22498,7 +36297,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -22506,7 +36317,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -22514,7 +36337,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -22522,7 +36357,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -22530,7 +36377,19 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -22538,37 +36397,125 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductreceiptJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品收货任务子表 */ export const ProductreceiptJobDetail = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产日期', @@ -22576,7 +36523,19 @@ export const ProductreceiptJobDetail = useCrudSchemas(reactive([ 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: '过期日期', @@ -22584,7 +36543,19 @@ export const ProductreceiptJobDetail = useCrudSchemas(reactive([ 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: '库存状态', @@ -22592,23 +36563,46 @@ export const ProductreceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'woNumber' + field: 'woNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'woLine' + field: 'woLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '标包数量', - field: 'stdPackQty' + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '标包单位', @@ -22616,31 +36610,62 @@ export const ProductreceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -22648,19 +36673,35 @@ export const ProductreceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -22668,49 +36709,146 @@ export const ProductreceiptJobDetail = useCrudSchemas(reactive([ 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: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ProductreceiptJobDetailRules = reactive({ + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入过期日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + woNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + woLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + stdPackQty: [ + { required: true, message: '请输入标包数量', trigger: 'blur' } + ], + stdPackUnit: [ + { required: true, message: '请选择标包单位', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品收货记录主表 */ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产计划单号', - field: 'productionPlanNumber' + field: 'productionPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班组', - field: 'team' + field: 'team', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班次', - field: 'shift' + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -22718,7 +36856,19 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -22726,7 +36876,19 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -22734,7 +36896,19 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -22742,11 +36916,27 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -22754,23 +36944,43 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -22778,15 +36988,35 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -22794,11 +37024,19 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -22806,37 +37044,122 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductreceiptRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { 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 ProductreceiptRecordDetail = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产日期', @@ -22844,7 +37167,19 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( 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: '过期日期', @@ -22852,7 +37187,19 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( 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: '库存状态', @@ -22860,35 +37207,70 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'woNumber' + field: 'woNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'woLine' + field: 'woLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '标包数量', - field: 'stdPackQty' + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '标包单位', @@ -22896,19 +37278,35 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -22916,31 +37314,70 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -22948,15 +37385,27 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -22964,29 +37413,104 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ProductreceiptRecordDetailRules = reactive({ + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入到货日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + woNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + woLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + stdPackQty: [ + { required: true, message: '请输入标包数量', trigger: 'blur' } + ], + stdPackUnit: [ + { required: true, message: '请选择标包单位', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品收货记录子表 */ export const BackflushRecordDetailb = useCrudSchemas(reactive([ { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: 'BOM版本', - field: 'bomVersion' + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -22994,31 +37518,59 @@ export const BackflushRecordDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -23026,31 +37578,70 @@ export const BackflushRecordDetailb = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -23058,15 +37649,27 @@ export const BackflushRecordDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -23074,29 +37677,80 @@ export const BackflushRecordDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const BackflushRecordDetailbRules = reactive({ + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品拆解申请主表 */ export const ProductdismantleRequestMain = useCrudSchemas(reactive([ { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班组', - field: 'team' + field: 'team', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班次', - field: 'shift' + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -23104,23 +37758,43 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -23128,11 +37802,27 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -23140,7 +37830,19 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive 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: '截止时间', @@ -23148,11 +37850,27 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -23160,7 +37878,11 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -23168,11 +37890,27 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -23180,7 +37918,19 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -23188,7 +37938,19 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -23196,7 +37958,19 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -23204,37 +37978,116 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) - + +//表单校验 +export const ProductdismantleRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 ProductdismantleRequestDetaila = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产日期', @@ -23242,7 +38095,19 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive([ { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: 'BOM版本', - field: 'bomVersion' + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -23372,31 +38393,70 @@ export const DismantleRequestDetailb = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -23404,7 +38464,11 @@ export const DismantleRequestDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -23412,37 +38476,81 @@ export const DismantleRequestDetailb = useCrudSchemas(reactive([ formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' - } + }, + sort: 'custom', + table: { + width: 180 + }, }, { label: '最后更新者', - field: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, } ])) +//表单校验 +export const DismantleRequestDetailbRules = reactive({ + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品拆解任务主表 */ export const ProductdismantleJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班组', - field: 'team' + field: 'team', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班次', - field: 'shift' + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -23450,7 +38558,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -23458,7 +38578,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -23466,7 +38598,11 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -23474,7 +38610,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -23482,31 +38630,73 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -23514,11 +38704,27 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -23526,7 +38732,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -23534,7 +38752,11 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -23542,19 +38764,35 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -23562,15 +38800,35 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -23578,7 +38836,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -23586,7 +38856,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -23594,7 +38876,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -23602,7 +38896,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -23610,7 +38916,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -23618,7 +38936,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -23626,7 +38956,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -23634,7 +38976,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -23642,7 +38996,19 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -23650,37 +39016,125 @@ export const ProductdismantleJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductdismantleJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品拆解任务子表 */ export const ProductdismantleJobDetail = useCrudSchemas(reactive([ { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产日期', @@ -23688,7 +39142,19 @@ export const ProductdismantleJobDetail = useCrudSchemas(reactive([ 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: '过期日期', @@ -23696,7 +39162,19 @@ export const ProductdismantleJobDetail = useCrudSchemas(reactive([ 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: '库存状态', @@ -23704,11 +39182,22 @@ export const ProductdismantleJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '标包数量', - field: 'stdPackQty' + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '标包单位', @@ -23716,31 +39205,62 @@ export const ProductdismantleJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -23748,70 +39268,176 @@ export const ProductdismantleJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, - { 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: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ProductdismantleJobDetailRules = reactive({ + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入过期日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + stdPackQty: [ + { required: true, message: '请输入标包数量', trigger: 'blur' } + ], + stdPackUnit: [ + { required: true, message: '请选择标包单位', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品拆解记录主表 */ export const ProductdismantleRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班组', - field: 'team' + field: 'team', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班次', - field: 'shift' + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -23819,7 +39445,19 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive( 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: '生效日期', @@ -23827,7 +39465,19 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive( 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: '申请时间', @@ -23835,7 +39485,19 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive( 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: '截止时间', @@ -23843,11 +39505,27 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive( 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -23855,23 +39533,43 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -23879,15 +39577,35 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive( 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -23895,11 +39613,19 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -23907,41 +39633,130 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductdismantleRecordMainRuels = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { 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 ProductdismantleRecordDetaila = useCrudSchemas(reactive([ { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产日期', @@ -23949,7 +39764,19 @@ export const ProductdismantleRecordDetaila = useCrudSchemas(reactive([ { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: 'BOM版本', - field: 'bomVersion' + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -24075,31 +40056,59 @@ export const DismantleRecordDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -24107,31 +40116,70 @@ export const DismantleRecordDetailb = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -24139,15 +40187,27 @@ export const DismantleRecordDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -24155,29 +40215,80 @@ export const DismantleRecordDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const DismantleRecordDetailbRules = reactive({ + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品返修申请主表 */ export const ProductrepairRequestMain = useCrudSchemas(reactive([ { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班组', - field: 'team' + field: 'team', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班次', - field: 'shift' + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -24185,23 +40296,43 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -24209,11 +40340,27 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -24221,7 +40368,19 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -24229,11 +40388,27 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -24241,7 +40416,11 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -24249,11 +40428,27 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -24261,7 +40456,19 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -24269,7 +40476,19 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -24277,7 +40496,19 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -24285,45 +40516,132 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductrepairRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 ProductrepairRequestDetaila = useCrudSchemas(reactive([ { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -24331,19 +40649,35 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -24351,31 +40685,70 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -24383,7 +40756,11 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -24391,14 +40768,61 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, } ])) +//表单校验 +export const ProductrepairRequestDetailaRules = reactive({ + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请输入库存状态', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品返修申请子表 */ @@ -24409,31 +40833,59 @@ export const ConsumereRequestDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -24441,31 +40893,70 @@ export const ConsumereRequestDetailb = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -24473,7 +40964,11 @@ export const ConsumereRequestDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -24481,41 +40976,109 @@ export const ConsumereRequestDetailb = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, } ])) +//表单校验 +export const ConsumereRequestDetailbRules = reactive({ + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品返修记录主表 */ export const ProductrepairRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车间代码', - field: 'workshopCode' + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班组', - field: 'team' + field: 'team', + sort: 'custom', + table: { + width: 150 + }, }, { label: '班次', - field: 'shift' + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -24523,7 +41086,19 @@ export const ProductrepairRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -24531,7 +41106,19 @@ export const ProductrepairRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -24539,7 +41126,19 @@ export const ProductrepairRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -24547,11 +41146,27 @@ export const ProductrepairRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -24559,23 +41174,43 @@ export const ProductrepairRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -24583,15 +41218,35 @@ export const ProductrepairRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -24599,11 +41254,19 @@ export const ProductrepairRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -24611,41 +41274,130 @@ export const ProductrepairRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductrepairRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { 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 ProductrepairRecordDetail = useCrudSchemas(reactive([ { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产线代码', - field: 'productionLineCode' + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工位代码', - field: 'workStationCode' + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '工序代码', - field: 'processCode' + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '生产日期', @@ -24653,7 +41405,19 @@ export const ProductrepairRecordDetail = useCrudSchemas(reactive([ 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: '过期日期', @@ -24661,7 +41425,19 @@ export const ProductrepairRecordDetail = useCrudSchemas(reactive([ 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: '库存状态', @@ -24669,31 +41445,59 @@ export const ProductrepairRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -24701,31 +41505,70 @@ export const ProductrepairRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -24733,15 +41576,27 @@ export const ProductrepairRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -24749,21 +41604,76 @@ export const ProductrepairRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ProductrepairRecordDetailRules = reactive({ + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入过期日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品返修记录子表 */ export const ConsumeRecordDetailb = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -24771,31 +41681,59 @@ export const ConsumeRecordDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -24803,31 +41741,70 @@ export const ConsumeRecordDetailb = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -24835,11 +41812,19 @@ export const ConsumeRecordDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -24847,17 +41832,56 @@ export const ConsumeRecordDetailb = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ConsumeRecordDetailbRules = reactive({ + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品报废申请主表 */ export const ProductscrapRequestMain = useCrudSchemas(reactive([ { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -24865,23 +41889,43 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -24889,11 +41933,27 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -24901,7 +41961,19 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -24909,11 +41981,27 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -24921,7 +42009,11 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -24929,11 +42021,27 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -24941,7 +42049,19 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -24949,7 +42069,19 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -24957,7 +42089,19 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -24965,33 +42109,108 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductscrapRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 ProductscrapRequestDetail = useCrudSchemas(reactive([ { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -24999,7 +42218,11 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -25007,27 +42230,54 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.SCRAP_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计量单位', @@ -25035,7 +42285,11 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -25043,23 +42297,51 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -25067,25 +42349,77 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ProductscrapRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品报废任务主表 */ export const ProductscrapJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -25093,7 +42427,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -25101,7 +42447,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -25109,7 +42467,11 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -25117,7 +42479,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -25125,31 +42499,73 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', field: 'priority' + form: { + component: 'InputNumber', + }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级增量', field: 'priorityIncrement' + form: { + component: 'InputNumber', + }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -25157,11 +42573,27 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -25169,7 +42601,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -25177,7 +42621,11 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -25185,19 +42633,35 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -25205,15 +42669,35 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -25221,7 +42705,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -25229,7 +42725,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -25237,7 +42745,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -25245,7 +42765,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -25253,7 +42785,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -25261,7 +42805,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -25269,7 +42825,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -25277,7 +42845,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -25285,7 +42865,19 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -25293,33 +42885,117 @@ export const ProductscrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductscrapJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品报废任务子表 */ export const ProductscrapJobDetail = useCrudSchemas(reactive([ { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -25327,7 +43003,11 @@ export const ProductscrapJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -25335,31 +43015,62 @@ export const ProductscrapJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.SCRAP_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -25367,19 +43078,35 @@ export const ProductscrapJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -25387,29 +43114,85 @@ export const ProductscrapJobDetail = useCrudSchemas(reactive([ 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', + } + }, }, ])) +//表单校验 +export const ProductscrapJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品报废记录主表 */ export const ProductscrapRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -25417,7 +43200,19 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -25425,7 +43220,19 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -25433,7 +43240,19 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -25441,11 +43260,27 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -25453,23 +43288,43 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -25477,15 +43332,35 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -25493,11 +43368,19 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -25505,41 +43388,130 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductscrapRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { 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 ProductscrapRecordDetail = useCrudSchemas(reactive([ { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -25547,7 +43519,11 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -25555,27 +43531,57 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.SCRAP_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单价', - field: 'singlePrice' + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '金额', - field: 'amount' + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -25583,31 +43589,70 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -25615,15 +43660,27 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -25631,21 +43688,67 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ProductscrapRecordDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品上架申请主表 */ export const ProductputawayRequestMain = useCrudSchemas(reactive([ { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -25653,23 +43756,43 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -25677,11 +43800,27 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -25689,7 +43828,19 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -25697,11 +43848,27 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -25709,7 +43876,11 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -25717,15 +43888,35 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -25733,11 +43924,19 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -25745,7 +43944,19 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -25753,7 +43964,19 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -25761,7 +43984,19 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -25769,25 +44004,95 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductputawayRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请输入到仓库代码', trigger: 'blur' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 ProductputawayRequestDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -25795,31 +44100,59 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -25827,31 +44160,70 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -25859,15 +44231,27 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -25875,29 +44259,85 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ProductputawayRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请输入包装号', trigger: 'blur' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请输入从库位代码', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品上架任务主表 */ export const ProductputawayJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -25905,7 +44345,19 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -25913,11 +44365,27 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ 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: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -25925,7 +44393,19 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -25933,11 +44413,27 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ 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: 'update' + field: 'update', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -25945,23 +44441,49 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + form: { + component: 'InputNumber', + }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + form: { + component: 'InputNumber', + }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人用户名', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -25969,11 +44491,27 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -25981,7 +44519,19 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -25989,7 +44539,11 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -25997,19 +44551,35 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -26017,23 +44587,51 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -26041,7 +44639,19 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -26050,6 +44660,18 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictClass: 'string', isSearch: true, isTable: true + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -26057,7 +44679,19 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -26065,7 +44699,19 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -26073,7 +44719,19 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -26081,7 +44739,19 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -26089,7 +44759,19 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -26097,7 +44779,19 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -26105,7 +44799,19 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -26113,25 +44819,104 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductputawayJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品上架任务子表 */ export const ProductputawayJobDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -26139,47 +44924,94 @@ export const ProductputawayJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemdesc2' + field: 'itemdesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -26187,23 +45019,43 @@ export const ProductputawayJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -26211,37 +45063,104 @@ export const ProductputawayJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ProductputawayJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 制品上架记录主表 */ export const ProductputawayRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '供应商代码', - field: 'supplierCode' + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -26249,7 +45168,19 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -26257,7 +45188,19 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -26265,7 +45208,19 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -26273,11 +45228,27 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -26285,23 +45256,43 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -26309,19 +45300,43 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -26329,11 +45344,19 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -26341,11 +45364,19 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -26353,29 +45384,109 @@ export const ProductputawayRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ProductputawayRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { 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: 'change' } + ], + 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 ProductputawayRecordDetail = useCrudSchemas(reactive([ { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -26383,59 +45494,115 @@ export const ProductputawayRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -26443,31 +45610,70 @@ export const ProductputawayRecordDetail = useCrudSchemas(reactive( 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -26475,11 +45681,19 @@ export const ProductputawayRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -26487,45 +45701,130 @@ export const ProductputawayRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ProductputawayRecordDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 下线结算申请主表 */ export const OfflinesettlementRequestMain = useCrudSchemas(reactive([ { label: '制品收货记录单号', - field: 'productReceiptRecordNumber' + field: 'productReceiptRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -26533,11 +45832,27 @@ export const OfflinesettlementRequestMain = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -26635,23 +46098,43 @@ export const OfflinesettlementRequestDetail = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '制品收货记录单号', - field: 'productReceiptRecordNumber' + field: 'productReceiptRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -26745,7 +46343,19 @@ export const OfflinesettlementRecordMain = useCrudSchemas(reactive 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: '生效日期', @@ -26753,7 +46363,19 @@ export const OfflinesettlementRecordMain = useCrudSchemas(reactive 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: '申请时间', @@ -26761,7 +46383,19 @@ export const OfflinesettlementRecordMain = useCrudSchemas(reactive 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: '截止时间', @@ -26769,11 +46403,27 @@ export const OfflinesettlementRecordMain = useCrudSchemas(reactive 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -26781,23 +46431,42 @@ export const OfflinesettlementRecordMain = useCrudSchemas(reactive dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -26805,7 +46474,18 @@ export const OfflinesettlementRecordMain = useCrudSchemas(reactive formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' - } + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '是否可用', @@ -26813,25 +46493,94 @@ export const OfflinesettlementRecordMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const OfflinesettlementRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + productReceiptRecordNumber: [ + { required: true, message: '请选择制品收货记录单号', trigger: 'change' } + ], + warehouseCode: [ + { 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 OfflinesettlementRecordDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -26839,39 +46588,75 @@ export const OfflinesettlementRecordDetail = useCrudSchemas(reactive([ { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, + }, { label: '订单类型', @@ -26933,7 +46804,11 @@ export const SaleMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.SALE_ORDER_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单日期', @@ -26941,7 +46816,19 @@ export const SaleMain = useCrudSchemas(reactive([ 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: '截止日期', @@ -26949,43 +46836,94 @@ export const SaleMain = useCrudSchemas(reactive([ 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: 'version' + field: 'version', + sort: 'custom', + table: { + width: 150 + }, }, { label: '税率', - field: 'taxRate' + field: 'taxRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '联系人姓名', - field: 'contactName' + field: 'contactName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '联系人电话', - field: 'contactPhone' + field: 'contactPhone', + sort: 'custom', + table: { + width: 150 + }, }, { label: '联系人电子邮件', - field: 'contactEmail' + field: 'contactEmail', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -26993,11 +46931,27 @@ export const SaleMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -27005,11 +46959,27 @@ export const SaleMain = useCrudSchemas(reactive([ 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: 'currentStage' + field: 'currentStage', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -27017,25 +46987,83 @@ export const SaleMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const SaleMainRules = reactive({ + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + type: [ + { required: true, message: '请选择订单类型', trigger: 'change' } + ], + orderDate: [ + { required: true, message: '请输入订单日期', trigger: 'change' } + ], + taxRate: [ + { required: true, message: '请输入税率', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) + /** * @returns {Array} 销售订单子表 */ export const SaleDetail = useCrudSchemas(reactive([ { label: '行号', - field: 'lineNumber' + field: 'lineNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '标包数量', - field: 'stdPackQty' + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '标包单位', @@ -27043,11 +47071,22 @@ export const SaleDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户计量数量', - field: 'customerPackQty' + field: 'customerPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '客户计量单位', @@ -27055,43 +47094,95 @@ export const SaleDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '转换率', - field: 'convertRate' + field: 'convertRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '已发货数量', - field: 'shippedQty' + field: 'shippedQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '已收货数量', - field: 'receivedQty' + field: 'receivedQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '已退货数量', - field: 'returnedQty' + field: 'returnedQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '单价', - field: 'singlePrice' + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, }, { label: '金额', - field: 'amount' + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -27099,15 +47190,38 @@ export const SaleDetail = useCrudSchemas(reactive([ 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: 'creater' + field: 'creater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单数量', - field: 'orderQty' + field: 'orderQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -27115,7 +47229,11 @@ export const SaleDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -27123,11 +47241,27 @@ export const SaleDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -27135,17 +47269,70 @@ export const SaleDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const SaleDetailRules = reactive({ + lineNumber: [ + { required: true, message: '请输入行号', trigger: 'blur' } + ], + stdPackQty: [ + { required: true, message: '请输入标包数量', trigger: 'blur' } + ], + stdPackUnit: [ + { required: true, message: '请选择标包单位', trigger: 'change' } + ], + convertRate: [ + { required: true, message: '请输入转换率', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + uom: [ + { required: true, message: '请选择计量单位', trigger: 'change' } + ], + planQty: [ + { required: true, message: '请输入计划数量', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 发货计划主表 */ export const DeliverPlanMain = useCrudSchemas(reactive([ { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划日期', @@ -27153,19 +47340,43 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ 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: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -27173,11 +47384,27 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '开始时间', @@ -27185,7 +47412,19 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ 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: '结束时间', @@ -27193,15 +47432,35 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ 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: 'status' + field: 'status', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新者', - field: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -27209,7 +47468,19 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ 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: '是否可用', @@ -27217,41 +47488,106 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const DeliverPlanMainRules = reactive({ + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], +}) + /** * @returns {Array} 发货计划子表 */ export const DeliverPlanDetail = useCrudSchemas(reactive([ { label: '销售订单号', - field: 'soNumber' + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '销售订单行', - field: 'soLine' + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户月台', - field: 'customerDockCode' + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目', - field: 'project' + field: 'project', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -27259,15 +47595,38 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划数量', - field: 'planQty' + field: 'planQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -27275,7 +47634,11 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -27283,11 +47646,27 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -27295,49 +47674,125 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } } ])) +//表单校验 +export const DeliverPlanDetailRules = reactive({ + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + uom: [ + { required: true, message: '请选择计量单位', trigger: 'change' } + ], + planQty: [ + { required: true, message: '请输入计划数量', trigger: 'blur' } + ], + soNumber: [ + { required: true, message: '请选择销售订单号', trigger: 'change' } + ], +}) + /** * @returns {Array} 发货申请主表 */ export const DeliverRequestMain = useCrudSchemas(reactive([ { label: '发货计划单号', - field: 'deliverPlanNumber' + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户发货单号', - field: 'customerDeliverNumber' + field: 'customerDeliverNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户月台代码', - field: 'customerDockCode' + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -27345,7 +47800,11 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -27353,31 +47812,59 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从月台代码', - field: 'fromDockCode' + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -27385,11 +47872,27 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -27397,7 +47900,19 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -27405,11 +47920,27 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -27417,7 +47948,11 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -27425,11 +47960,27 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -27437,7 +47988,19 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -27445,7 +48008,19 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -27453,7 +48028,19 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -27461,33 +48048,120 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const DeliverRequestMainRueles = reactive({ + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + customerDockCode: [ + { required: true, message: '请选择客户月台代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 DeliverRequestDetail = useCrudSchemas(reactive([ { label: '销售订单号', - field: 'soNumber' + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '销售订单行', - field: 'soLine' + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -27495,27 +48169,51 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -27523,31 +48221,70 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -27555,11 +48292,19 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -27567,61 +48312,152 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const DeliverRequestDetailRules = reactive({ + soNumber: [ + { required: true, message: '请选择销售订单号', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 发货任务主表 */ export const DeliverJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货计划单号', - field: 'deliverPlanNumber' + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户发货单号', - field: 'customerDeliverNumber' + field: 'customerDeliverNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户月台代码', - field: 'customerDockCode' + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货月台', - field: 'deliverDock' + field: 'deliverDock', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -27629,7 +48465,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -27637,7 +48485,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -27645,7 +48505,11 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -27653,7 +48517,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -27661,31 +48537,73 @@ export const DeliverJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -27693,11 +48611,27 @@ export const DeliverJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -27705,7 +48639,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -27713,7 +48659,11 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -27721,19 +48671,35 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -27741,23 +48707,51 @@ export const DeliverJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从月台代码', - field: 'fromDockCode' + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -27765,7 +48759,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -27773,7 +48779,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -27781,7 +48799,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -27789,7 +48819,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -27797,7 +48839,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -27805,7 +48859,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -27813,7 +48879,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -27821,7 +48899,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -27829,7 +48919,19 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -27837,37 +48939,137 @@ export const DeliverJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const DeliverJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + customerDockCode: [ + { required: true, message: '请选择客户月台代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 发货任务子表 */ export const DeliverJobDetail = useCrudSchemas(reactive([ { label: '销售订单号', - field: 'soNumber' + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '销售订单行', - field: 'soLine' + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -27875,39 +49077,78 @@ export const DeliverJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemdesc2' + field: 'itemdesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -27915,15 +49156,27 @@ export const DeliverJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -27931,69 +49184,168 @@ export const DeliverJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const DeliverJobDetailRules = reactive({ + soNumber: [ + { required: true, message: '请选择销售订单号', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 发货记录主表 */ export const DeliverRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货计划单号', - field: 'deliverPlanNumber' + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户发货单号', - field: 'customerDeliverNumber' + field: 'customerDeliverNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户月台代码', - field: 'customerDockCode' + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -28001,7 +49353,19 @@ export const DeliverRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -28009,7 +49373,19 @@ export const DeliverRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -28017,7 +49393,19 @@ export const DeliverRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -28025,11 +49413,27 @@ export const DeliverRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -28037,23 +49441,43 @@ export const DeliverRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -28061,11 +49485,27 @@ export const DeliverRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -28073,11 +49513,19 @@ export const DeliverRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -28085,15 +49533,27 @@ export const DeliverRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从月台代码', - field: 'fromDockCode' + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -28101,29 +49561,118 @@ export const DeliverRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const DeliverRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + customerDockCode: [ + { required: true, message: '请选择客户月台代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { 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 DeliverRecordDetail = useCrudSchemas(reactive([ { label: '销售订单号', - field: 'soNumber' + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '销售订单行', - field: 'soLine' + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -28131,67 +49680,137 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单价', - field: 'singlePrice' + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '金额', - field: 'amount' + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -28199,31 +49818,70 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -28231,15 +49889,27 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -28247,49 +49917,135 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const DeliverRecordDetailRules = reactive({ + soNumber: [ + { required: true, message: '请选择销售订单号', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 客户收货申请主表 */ export const CustomerreceiptRequestMain = useCrudSchemas(reactive([ { label: '发货申请单号', - field: 'deliverRequestNumber' + field: 'deliverRequestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货计划单号', - field: 'deliverPlanNumber' + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户月台代码', - field: 'customerDockCode' + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -28297,7 +50053,11 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -28305,27 +50065,51 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -28333,11 +50117,35 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '申请时间', @@ -28345,7 +50153,19 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( 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: '截止时间', @@ -28353,11 +50173,27 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -28365,7 +50201,11 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -28373,11 +50213,27 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -28385,7 +50241,19 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -28393,7 +50261,19 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -28401,7 +50281,19 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -28409,33 +50301,120 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const CustomerreceiptRequestMainRules = reactive({ + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + customerDockCode: [ + { required: true, message: '请选择客户月台代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 CustomerreceiptRequestDetail = useCrudSchemas(reactive([ { label: '销售订单号', - field: 'soNumber' + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '销售订单行', - field: 'soLine' + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -28443,27 +50422,51 @@ export const CustomerreceiptRequestDetail = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货记录单号', - field: 'deliverRecordNumber' + field: 'deliverRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货计划单号', - field: 'deliverPlanNumber' + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户月台代码', - field: 'customerDockCode' + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -28585,7 +50737,19 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -28593,7 +50757,19 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -28601,7 +50777,19 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -28609,11 +50797,27 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -28621,23 +50825,43 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -28645,11 +50869,27 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -28657,11 +50897,19 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -28669,11 +50917,19 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -28681,29 +50937,118 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const CustomerreceiptRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + customerDockCode: [ + { required: true, message: '请选择客户月台代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { 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 CustomerreceiptRecordDetail = useCrudSchemas(reactive([ { label: '销售订单号', - field: 'soNumber' + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '销售订单行', - field: 'soLine' + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -28711,67 +51056,137 @@ export const CustomerreceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单价', - field: 'singlePrice' + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '金额', - field: 'amount' + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -28779,31 +51194,70 @@ export const CustomerreceiptRecordDetail = useCrudSchemas(reactive formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' - } + }, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -28811,15 +51265,27 @@ export const CustomerreceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -28827,69 +51293,181 @@ export const CustomerreceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, } ])) +//表单校验 +export const CustomerreceiptRecordDetailRules = reactive({ + soNumber: [ + { required: true, message: '请选择销售订单号', trigger: 'blur' } + ], + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'blur' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'blur' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'blur' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'blur' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'blur' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'blur' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'blur' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'blur' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 客户退货申请主表 */ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货记录单号', - field: 'deliverRecordNumber' + field: 'deliverRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货计划单号', - field: 'deliverPlanNumber' + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户月台代码', - field: 'customerDockCode' + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到月台代码', - field: 'toDockCode' + field: 'toDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -28897,7 +51475,11 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -28905,27 +51487,51 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -28933,11 +51539,27 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -28945,7 +51567,19 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -28953,11 +51587,27 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -28965,7 +51615,11 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -28973,11 +51627,27 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -28985,7 +51655,19 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -28993,7 +51675,19 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -29001,7 +51695,19 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -29009,33 +51715,126 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const CustomerreturnRequestMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + customerDockCode: [ + { required: true, message: '请选择客户月台代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 CustomerreturnRequestDetail = useCrudSchemas(reactive([ { label: '销售订单号', - field: 'soNumber' + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '销售订单行', - field: 'soLine' + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -29043,27 +51842,51 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -29071,31 +51894,70 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -29103,15 +51965,27 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -29119,61 +51993,152 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CustomerreturnRequestDetailRules = reactive({ + soNumber: [ + { required: true, message: '请选择销售订单号', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 客户退货任务主表 */ export const CustomerreturnJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货记录单号', - field: 'deliverRecordNumber' + field: 'deliverRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货计划单号', - field: 'deliverPlanNumber' + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户月台代码', - field: 'customerDockCode' + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '收货月台', - field: 'receiptDock' + field: 'receiptDock', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -29181,7 +52146,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -29189,7 +52166,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -29197,7 +52186,11 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -29205,7 +52198,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -29213,31 +52218,73 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -29245,11 +52292,27 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -29257,7 +52320,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -29265,7 +52340,11 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -29273,19 +52352,35 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -29293,23 +52388,51 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到月台代码', - field: 'toDockCode' + field: 'toDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -29317,7 +52440,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -29325,7 +52460,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -29333,7 +52480,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -29341,7 +52500,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -29349,7 +52520,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -29357,7 +52540,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -29365,7 +52560,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -29373,7 +52580,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -29381,7 +52600,19 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -29389,37 +52620,140 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const CustomerreturnJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + customerDockCode: [ + { required: true, message: '请选择客户月台代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 客户退货任务子表 */ export const CustomerreturnJobDetail = useCrudSchemas(reactive([ { label: '销售订单号', - field: 'soNumber' + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '销售订单行', - field: 'soLine' + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -29427,39 +52761,78 @@ export const CustomerreturnJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemdesc2' + field: 'itemdesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -29467,15 +52840,27 @@ export const CustomerreturnJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -29483,69 +52868,168 @@ export const CustomerreturnJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CustomerreturnJobDetailRules = reactive({ + soNumber: [ + { required: true, message: '请选择销售订单号', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 客户退货记录主表 */ export const CustomerreturnRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货记录单号', - field: 'deliverRecordNumber' + field: 'deliverRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货计划单号', - field: 'deliverPlanNumber' + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户月台代码', - field: 'customerDockCode' + field: 'customerDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -29553,7 +53037,19 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -29561,7 +53057,19 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -29569,7 +53077,19 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -29577,11 +53097,27 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -29589,23 +53125,43 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -29613,11 +53169,27 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -29625,11 +53197,19 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -29637,15 +53217,27 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到月台代码', - field: 'toDockCode' + field: 'toDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -29653,29 +53245,121 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const CustomerreturnRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + customerDockCode: [ + { required: true, message: '请选择客户月台代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { 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 CustomerreturnRecordDetail = useCrudSchemas(reactive([ { label: '销售订单号', - field: 'soNumber' + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '销售订单行', - field: 'soLine' + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -29683,67 +53367,137 @@ export const CustomerreturnRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单价', - field: 'singlePrice' + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '金额', - field: 'amount' + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -29751,31 +53505,70 @@ export const CustomerreturnRecordDetail = useCrudSchemas(reactive( 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -29783,15 +53576,27 @@ export const CustomerreturnRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -29799,41 +53604,125 @@ export const CustomerreturnRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, } ])) +//表单校验 +export const CustomerreturnRecordDetailRules = reactive({ + soNumber: [ + { required: true, message: '请选择销售订单号', trigger: 'change' } + ], + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 客户结算申请主表 */ export const CustomersettleRequestMain = useCrudSchemas(reactive([ { label: '发货记录单号', - field: 'deliverRecordNumber' + field: 'deliverRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货计划单号', - field: 'deliverPlanNumber' + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -29841,23 +53730,43 @@ export const CustomersettleRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -29865,11 +53774,27 @@ export const CustomersettleRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -29877,7 +53802,19 @@ export const CustomersettleRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -29885,11 +53822,27 @@ export const CustomersettleRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -29897,7 +53850,11 @@ export const CustomersettleRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -29905,11 +53862,27 @@ export const CustomersettleRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -29917,7 +53890,19 @@ export const CustomersettleRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -29925,7 +53910,19 @@ export const CustomersettleRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -29933,7 +53930,19 @@ export const CustomersettleRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -29941,33 +53950,111 @@ export const CustomersettleRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const CustomersettleRequestMainRules = reactive({ + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 CustomersettleRequestDetail = useCrudSchemas(reactive([ { label: '销售订单号', - field: 'soNumber' + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '销售订单行', - field: 'soLine' + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -29975,23 +54062,43 @@ export const CustomersettleRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -29999,31 +54106,70 @@ export const CustomersettleRequestDetail = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -30031,7 +54177,11 @@ export const CustomersettleRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -30039,45 +54189,120 @@ export const CustomersettleRequestDetail = useCrudSchemas(reactive 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CustomersettleRequestDetailRules = reactive({ + soNumber: [ + { required: true, message: '请选择销售订单号', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 客户结算记录主表 */ export const CustomersettleRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货记录单号', - field: 'deliverRecordNumber' + field: 'deliverRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货计划单号', - field: 'deliverPlanNumber' + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '客户代码', - field: 'customerCode' + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -30085,7 +54310,19 @@ export const CustomersettleRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -30093,7 +54330,19 @@ export const CustomersettleRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -30101,7 +54350,19 @@ export const CustomersettleRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -30109,11 +54370,27 @@ export const CustomersettleRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -30121,23 +54398,43 @@ export const CustomersettleRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -30145,11 +54442,27 @@ export const CustomersettleRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -30157,11 +54470,19 @@ export const CustomersettleRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -30169,33 +54490,117 @@ export const CustomersettleRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const CustomersettleRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + customerCode: [ + { required: true, message: '请选择客户代码', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { 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 CustomersettleRecordDetail = useCrudSchemas(reactive([ { label: '销售订单号', - field: 'soNumber' + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '销售订单行', - field: 'soLine' + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -30203,54 +54608,108 @@ export const CustomersettleRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationCode' + field: 'fromLocationGruopCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromLocationCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单价', - field: 'singlePrice' + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '金额', - field: 'amount' + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', field: 'interfaceType', dictType: DICT_TYPE.INTERFACE_TYPE, isTable: true, - isSearch: true + isSearch: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -30258,31 +54717,70 @@ export const CustomersettleRecordDetail = useCrudSchemas(reactive( 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -30290,7 +54788,11 @@ export const CustomersettleRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -30298,33 +54800,102 @@ export const CustomersettleRecordDetail = useCrudSchemas(reactive( 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CustomersettleRecordDetailRules = reactive({ + soNumber: [ + { required: true, message: '请选择销售订单号', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGruopCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 库存初始化申请主表 */ export const InventoryinitRequestMain = useCrudSchemas(reactive([ { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -30332,11 +54903,27 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -30344,7 +54931,19 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -30352,11 +54951,27 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -30364,7 +54979,11 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -30372,11 +54991,27 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -30384,7 +55019,19 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -30392,7 +55039,19 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -30400,7 +55059,19 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -30408,33 +55079,102 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const InventoryinitRequestMainRules = reactive({ + warehouseCode: [ + { required: true, message: '请选择仓库代码', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 InventoryinitRequestDetail = useCrudSchemas(reactive([ { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '替代批次', - field: 'altBatch' + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货日期', @@ -30442,7 +55182,19 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive( 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: '生产日期', @@ -30450,7 +55202,19 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive( 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: '过期日期', @@ -30458,7 +55222,19 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive( 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: '库存状态', @@ -30466,23 +55242,46 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位代码', - field: 'locationCode' + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位组代码', - field: 'locationGroupCode' + field: 'locationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库区代码', - field: 'areaCode' + field: 'areaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '标包数量', - field: 'stdPackQty' + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '标包单位', @@ -30490,19 +55289,35 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -30510,31 +55325,70 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive( 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -30542,7 +55396,11 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -30550,33 +55408,114 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive( 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const InventoryinitRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + arriveDate: [ + { required: true, message: '请选择到货日期', trigger: 'change' } + ], + produceDate: [ + { required: true, message: '请选择生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请选择过期日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + locationCode: [ + { required: true, message: '请选择库位代码', trigger: 'change' } + ], + locationGroupCode: [ + { required: true, message: '请选择库位组代码', trigger: 'change' } + ], + areaCode: [ + { required: true, message: '请选择库区代码', trigger: 'change' } + ], + stdPackQty: [ + { required: true, message: '请输入标包数量', trigger: 'blur' } + ], + stdPackUnit: [ + { required: true, message: '请选择标包单位', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 库存初始化记录主表 */ export const InventoryinitRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -30584,6 +55523,18 @@ export const InventoryinitRecordMain = useCrudSchemas(reactive([ formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } }, { @@ -30592,6 +55543,18 @@ export const InventoryinitRecordMain = useCrudSchemas(reactive([ formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } }, { @@ -30600,6 +55563,18 @@ export const InventoryinitRecordMain = useCrudSchemas(reactive([ formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } }, { @@ -30608,11 +55583,27 @@ export const InventoryinitRecordMain = useCrudSchemas(reactive([ formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -30620,23 +55611,43 @@ export const InventoryinitRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -30644,11 +55655,27 @@ export const InventoryinitRecordMain = useCrudSchemas(reactive([ formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -30656,33 +55683,108 @@ export const InventoryinitRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const InventoryinitRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + warehouseCode: [ + { 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 InventoryinitRecordDetail = useCrudSchemas(reactive([ { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '替代批次', - field: 'altBatch' + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货日期', @@ -30690,7 +55792,19 @@ export const InventoryinitRecordDetail = useCrudSchemas(reactive([ 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: '生产日期', @@ -30698,7 +55812,19 @@ export const InventoryinitRecordDetail = useCrudSchemas(reactive([ 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: '过期日期', @@ -30706,7 +55832,19 @@ export const InventoryinitRecordDetail = useCrudSchemas(reactive([ 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: '库存状态', @@ -30714,23 +55852,46 @@ export const InventoryinitRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位代码', - field: 'locationCode' + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位组代码', - field: 'locationGroupCode' + field: 'locationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库区代码', - field: 'areaCode' + field: 'areaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '标包数量', - field: 'stdPackQty' + field: 'stdPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '标包单位', @@ -30738,31 +55899,59 @@ export const InventoryinitRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单价', - field: 'singlePrice' + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, }, { label: '金额', - field: 'amount' + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -30770,31 +55959,70 @@ export const InventoryinitRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -30802,7 +56030,11 @@ export const InventoryinitRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -30810,21 +56042,90 @@ export const InventoryinitRecordDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const InventoryinitRecordDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + arriveDate: [ + { required: true, message: '请输入到货日期', trigger: 'change' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入过期日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + locationCode: [ + { required: true, message: '请选择库位代码', trigger: 'change' } + ], + locationGroupCode: [ + { required: true, message: '请选择库位组代码', trigger: 'change' } + ], + areaCode: [ + { required: true, message: '请选择库区代码', trigger: 'change' } + ], + stdPackQty: [ + { required: true, message: '请输入标包数量', trigger: 'blur' } + ], + stdPackUnit: [ + { required: true, message: '请选择标包单位', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 库存转移申请主表 */ export const InventorymoveRequestMain = useCrudSchemas(reactive([ { label: '从仓库代码', - field: 'fromWarehouseOde' + field: 'fromWarehouseOde', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -30832,15 +56133,27 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -30848,23 +56161,43 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -30872,11 +56205,27 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -30884,7 +56233,19 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -30892,11 +56253,27 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -30904,7 +56281,11 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -30912,11 +56293,27 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -30924,7 +56321,19 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -30932,7 +56341,19 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -30940,7 +56361,19 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -30948,7 +56381,19 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '使用在途库', @@ -30956,33 +56401,114 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const InventorymoveRequestMainRules = reactive({ + fromWarehouseOde: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 InventorymoveRequestDetail = useCrudSchemas(reactive([ { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库存状态', @@ -30990,27 +56516,51 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库存状态', @@ -31018,19 +56568,35 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -31038,31 +56604,70 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( 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: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -31070,11 +56675,19 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新者', - field: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -31082,17 +56695,61 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( 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', + } + }, }, ])) +//表单校验 +export const InventorymoveRequestDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromInventoryStatus: [ + { required: true, message: '请选择从库存状态', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toInventoryStatus: [ + { required: true, message: '请选择到库存状态', trigger: 'change' } + ], +}) + /** * @returns {Array} 库存转移任务主表 */ export const InventorymoveJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '使用在途库', @@ -31100,11 +56757,27 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -31112,7 +56785,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -31120,7 +56805,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -31128,7 +56825,11 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -31136,7 +56837,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -31144,31 +56857,73 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -31176,11 +56931,27 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -31188,7 +56959,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -31196,7 +56979,11 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -31204,19 +56991,35 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -31224,23 +57027,51 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -31248,7 +57079,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -31256,7 +57099,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -31264,7 +57119,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -31272,7 +57139,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -31280,7 +57159,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -31288,7 +57179,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -31296,7 +57199,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -31304,7 +57219,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -31312,7 +57239,19 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -31320,25 +57259,104 @@ export const InventorymoveJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const InventorymoveJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 库存转移任务子表 */ export const InventorymoveJobDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -31346,55 +57364,110 @@ export const InventorymoveJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单号', - field: 'poNumber' + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '订单行', - field: 'poLine' + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -31402,15 +57475,27 @@ export const InventorymoveJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -31418,25 +57503,80 @@ export const InventorymoveJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const InventorymoveJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 库存转移记录主表 */ export const InventorymoveRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '使用在途库', @@ -31444,15 +57584,35 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -31460,7 +57620,11 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -31468,27 +57632,51 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -31496,7 +57684,19 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -31504,7 +57704,19 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -31512,7 +57724,19 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -31520,11 +57744,27 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -31532,23 +57772,43 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -31556,11 +57816,27 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -31568,45 +57844,144 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const InventorymoveRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { 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 InventorymoveRecordDetail = useCrudSchemas(reactive([ { label: '在途库库位', - field: 'onTheWayLocationCode' + field: 'onTheWayLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库存状态', @@ -31614,35 +57989,67 @@ export const InventorymoveRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库存状态', @@ -31650,23 +58057,43 @@ export const InventorymoveRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -31674,31 +58101,70 @@ export const InventorymoveRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -31706,11 +58172,19 @@ export const InventorymoveRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -31718,29 +58192,101 @@ export const InventorymoveRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const InventorymoveRecordDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + fromInventoryStatus: [ + { required: true, message: '请选择从库存状态', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + toInventoryStatus: [ + { required: true, message: '请选择到库存状态', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 库存修改申请主表 */ export const InventorychangeRequestMain = useCrudSchemas(reactive([ { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -31748,11 +58294,27 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -31760,7 +58322,19 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( 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: '截止时间', @@ -31768,11 +58342,27 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -31780,7 +58370,11 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -31788,11 +58382,27 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -31800,7 +58410,19 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -31808,7 +58430,19 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -31816,7 +58450,19 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -31824,49 +58470,137 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const InventorychangeRequestMainRules = reactive({ + warehouseCode: [ + { required: true, message: '请选择仓库代码', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 InventorychangeRequestDetail = useCrudSchemas(reactive([ { label: '库位代码', - field: 'locationCode' + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位组代码', - field: 'locationGroupCode' + field: 'locationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库区代码', - field: 'areaCode' + field: 'areaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从数量', - field: 'fromQty' + field: 'fromQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从替代批次', - field: 'fromAltbatch' + field: 'fromAltbatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从到货日期', @@ -31874,7 +58608,19 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -32048,7 +59001,19 @@ export const InventorychangeRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -32056,7 +59021,19 @@ export const InventorychangeRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -32064,7 +59041,19 @@ export const InventorychangeRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -32072,11 +59061,27 @@ export const InventorychangeRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -32084,23 +59089,43 @@ export const InventorychangeRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -32108,11 +59133,27 @@ export const InventorychangeRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -32120,49 +59161,143 @@ export const InventorychangeRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const InventorychangeRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + warehouseCode: [ + { 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 InventorychangeRecordDetail = useCrudSchemas(reactive([ { label: '库位代码', - field: 'locationCode' + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位组代码', - field: 'locationGroupCode' + field: 'locationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库区代码', - field: 'areaCode' + field: 'areaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从数量', - field: 'fromQty' + field: 'fromQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从替代批次', - field: 'fromAltbatch' + field: 'fromAltbatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从到货日期', @@ -32170,7 +59305,19 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive 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: '从生产日期', @@ -32178,7 +59325,19 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive 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: '从过期日期', @@ -32186,7 +59345,19 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive 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: '从库存状态', @@ -32194,31 +59365,62 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到数量', - field: 'toQty' + field: 'toQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到替代批次', - field: 'toAltBatch' + field: 'toAltBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到到货日期', @@ -32226,7 +59428,19 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive 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: '到生产日期', @@ -32234,7 +59448,19 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive 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: '到过期日期', @@ -32242,7 +59468,19 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive 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: '到库存状态', @@ -32250,23 +59488,43 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -32274,31 +59532,70 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -32306,11 +59603,19 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -32318,33 +59623,82 @@ export const InventorychangeRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const InventorychangeRecordDetailRules = reactive({ + locationCode: [ + { required: true, message: '请选择库位代码', trigger: 'change' } + ], + locationGroupCode: [ + { required: true, message: '请选择库位组代码', trigger: 'change' } + ], + areaCode: [ + { required: true, message: '请选择库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 调拨出库申请主表 */ export const TransferissueRequestMain = useCrudSchemas(reactive([ { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -32352,7 +59706,11 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -32360,31 +59718,59 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromDockCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从月台代码', - field: 'fromDockCode' + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -32392,11 +59778,27 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -32404,7 +59806,19 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -32412,11 +59826,27 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -32424,7 +59854,11 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -32432,11 +59866,27 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -32444,7 +59894,19 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -32452,7 +59914,19 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -32460,7 +59934,19 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -32468,25 +59954,101 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const TransferissueRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 TransferissueRequestDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -32494,31 +60056,59 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -32526,31 +60116,70 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive( 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: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -32558,11 +60187,19 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新者', - field: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -32570,53 +60207,127 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive( 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', + } + }, }, ])) +//表单校验 +export const TransferissueRequestDetailRules = reactive({ + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 调拨出库任务主表 */ export const TransferissueJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '发货月台', - field: 'deliverDock' + field: 'deliverDock', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从月台代码', - field: 'fromDockCode' + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -32624,7 +60335,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -32632,7 +60355,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -32640,7 +60375,11 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -32648,7 +60387,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -32656,31 +60407,73 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -32688,11 +60481,27 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -32700,7 +60509,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -32708,7 +60529,11 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -32716,19 +60541,35 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -32736,11 +60577,27 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -32748,7 +60605,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -32756,7 +60625,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -32764,7 +60645,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -32772,7 +60665,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -32780,7 +60685,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -32788,7 +60705,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -32796,7 +60725,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -32804,7 +60745,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -32812,7 +60765,19 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -32820,25 +60785,110 @@ export const TransferissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const TransferissueJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 调拨出库任务子表 */ export const TransferissueJobDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -32846,47 +60896,94 @@ export const TransferissueJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + form: { + component: 'InputNumber', + }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '计量单位', @@ -32894,15 +60991,27 @@ export const TransferissueJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -32910,45 +61019,120 @@ export const TransferissueJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const TransferissueJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 调拨出库记录主表 */ export const TransferissueRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -32956,7 +61140,11 @@ export const TransferissueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -32964,27 +61152,51 @@ export const TransferissueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从月台代码', - field: 'fromDockCode' + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -32992,7 +61204,19 @@ export const TransferissueRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -33000,7 +61224,19 @@ export const TransferissueRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -33008,7 +61244,19 @@ export const TransferissueRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -33016,11 +61264,27 @@ export const TransferissueRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -33028,23 +61292,43 @@ export const TransferissueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -33052,11 +61336,27 @@ export const TransferissueRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -33064,37 +61364,131 @@ export const TransferissueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const TransferissueRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { 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 TransferissueRecordDetail = useCrudSchemas(reactive([ { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -33102,55 +61496,107 @@ export const TransferissueRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -33158,31 +61604,70 @@ export const TransferissueRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -33190,11 +61675,19 @@ export const TransferissueRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -33202,33 +61695,106 @@ export const TransferissueRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const TransferissueRecordDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 调拨入库申请主表 */ export const TransferreceiptRequestMain = useCrudSchemas(reactive([ { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -33236,7 +61802,11 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -33244,31 +61814,59 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromDockCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到月台代码', - field: 'toDockCode' + field: 'toDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -33276,11 +61874,27 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -33288,7 +61902,19 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( 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: '截止时间', @@ -33296,11 +61922,27 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -33308,7 +61950,11 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -33316,11 +61962,27 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -33328,7 +61990,19 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -33336,7 +62010,19 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -33344,7 +62030,19 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -33352,25 +62050,101 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const TransferreceiptRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 TransferreceiptRequestDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -33378,31 +62152,59 @@ export const TransferreceiptRequestDetail = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到月台代码', - field: 'toDockCode' + field: 'toDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -33504,7 +62423,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -33512,7 +62443,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -33520,7 +62463,11 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -33528,7 +62475,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -33536,31 +62495,73 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -33568,11 +62569,27 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -33580,7 +62597,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -33588,7 +62617,11 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -33596,19 +62629,35 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -33616,11 +62665,27 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -33628,7 +62693,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -33636,7 +62713,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -33644,7 +62733,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -33652,7 +62753,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -33660,7 +62773,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -33668,7 +62793,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -33676,7 +62813,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -33684,7 +62833,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -33692,7 +62853,19 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -33700,25 +62873,110 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const TransferreceiptJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 调拨入库任务子表 */ export const TransferreceiptJobDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -33726,47 +62984,94 @@ export const TransferreceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -33774,15 +63079,27 @@ export const TransferreceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -33790,49 +63107,128 @@ export const TransferreceiptJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const TransferreceiptJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 调拨入库记录主表 */ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '收货月台', - field: 'receiptDock' + field: 'receiptDock', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承运商', - field: 'carrierCode' + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '运输方式', - field: 'transferMode' + field: 'transferMode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '车牌号', - field: 'vehiclePlateNumber' + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -33840,7 +63236,11 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -33848,27 +63248,51 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到月台代码', - field: 'toDockCode' + field: 'toDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -33876,7 +63300,19 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -33884,7 +63320,19 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -33892,7 +63340,19 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -33900,11 +63360,27 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -33912,23 +63388,43 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -33936,11 +63432,27 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -33948,37 +63460,131 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const TransferreceiptRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { 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 TransferreceiptRecordDetail = useCrudSchemas(reactive([ { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从批次', - field: 'fromBatch' + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到批次', - field: 'toBatch' + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -33986,55 +63592,107 @@ export const TransferreceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货主代码', - field: 'toOwnerCode' + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位组代码', - field: 'toLocationGroupCode' + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码', - field: 'toAreaCode' + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -34042,31 +63700,70 @@ export const TransferreceiptRecordDetail = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -34074,11 +63771,19 @@ export const TransferreceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -34086,17 +63791,74 @@ export const TransferreceiptRecordDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const TransferreceiptRecordDetailRules = reactive({ + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + toPackingNumber: [ + { required: true, message: '请选择到包装号', trigger: 'change' } + ], + fromBatch: [ + { required: true, message: '请输入从批次', trigger: 'blur' } + ], + toBatch: [ + { required: true, message: '请输入到批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 计划外出库申请主表 */ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -34104,23 +63866,43 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -34128,11 +63910,27 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -34140,7 +63938,19 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -34148,11 +63958,27 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -34160,7 +63986,11 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -34168,11 +63998,27 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -34180,7 +64026,19 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -34188,7 +64046,19 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -34196,7 +64066,19 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -34204,25 +64086,92 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const UnplannedissueRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 UnplannedissueRequestDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -34230,11 +64179,19 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -34242,23 +64199,43 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -34266,31 +64243,70 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive 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: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -34298,11 +64314,19 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新者', - field: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -34310,25 +64334,69 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' - } + }, + sort: 'custom', + table: { + width: 180 + }, }, ])) +//表单校验 +export const UnplannedissueRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 计划外出库任务主表 */ export const UnplannedissueJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -34336,7 +64404,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -34344,7 +64424,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -34352,7 +64444,11 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -34360,7 +64456,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -34368,31 +64476,73 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -34400,11 +64550,27 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -34412,7 +64578,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -34420,7 +64598,11 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -34428,19 +64610,35 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -34448,11 +64646,27 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -34460,7 +64674,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -34468,7 +64694,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -34476,7 +64714,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -34484,7 +64734,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -34492,7 +64754,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -34500,7 +64774,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -34508,7 +64794,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -34516,7 +64814,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -34524,7 +64834,19 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -34532,25 +64854,101 @@ export const UnplannedissueJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const UnplannedissueJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 计划外出库任务子表 */ export const UnplannedissueJobDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -34558,7 +64956,11 @@ export const UnplannedissueJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -34566,39 +64968,78 @@ export const UnplannedissueJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -34606,15 +65047,27 @@ export const UnplannedissueJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -34622,29 +65075,85 @@ export const UnplannedissueJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const UnplannedissueJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 计划外出库记录主表 */ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -34652,23 +65161,43 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从月台代码', - field: 'fromDockCode' + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -34676,7 +65205,19 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -34684,7 +65225,19 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -34692,7 +65245,19 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -34700,11 +65265,27 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -34712,23 +65293,43 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -34736,11 +65337,27 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -34748,25 +65365,98 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const UnplannedissueRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { 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 UnplannedissueRecordDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -34774,23 +65464,43 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -34798,31 +65508,65 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单价', - field: 'singlePrice' + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '金额', - field: 'amount' + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -34830,31 +65574,70 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -34862,11 +65645,19 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -34874,17 +65665,59 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const UnplannedissueRecordDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 计划外入库申请主表 */ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive([ { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -34892,23 +65725,43 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -34916,11 +65769,27 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -34928,7 +65797,19 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive 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: '截止时间', @@ -34936,11 +65817,27 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -34948,7 +65845,11 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -34956,11 +65857,27 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -34968,7 +65885,19 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -34976,7 +65905,19 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -34984,7 +65925,19 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -34992,29 +65945,100 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const UnplannedreceiptRequestMainRules = reactive({ + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 UnplannedreceiptRequestDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '替代批次', - field: 'altBatch' + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货日期', @@ -35022,7 +66046,19 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -35152,7 +66348,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -35160,7 +66368,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -35168,7 +66388,11 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -35176,7 +66400,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -35184,31 +66420,73 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -35216,11 +66494,27 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -35228,7 +66522,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -35236,7 +66542,11 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -35244,19 +66554,35 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -35264,11 +66590,27 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -35276,7 +66618,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库位', @@ -35284,7 +66638,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改数量', @@ -35292,7 +66658,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许大于推荐数量', @@ -35300,7 +66678,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许小于推荐数量', @@ -35308,7 +66698,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改库存状态', @@ -35316,7 +66718,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许连续扫描', @@ -35324,7 +66738,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许部分完成', @@ -35332,7 +66758,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改批次', @@ -35340,7 +66778,19 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '允许修改箱码', @@ -35348,29 +66798,109 @@ export const UnplannedreceiptJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const UnplannedreceiptJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 计划外入库任务子表 */ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '替代批次', - field: 'altBatch' + field: 'altBatch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -35378,7 +66908,11 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -35386,39 +66920,78 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位代码', - field: 'toLocationCode' + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -35426,15 +66999,27 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -35442,11 +67027,27 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到货日期', @@ -35454,7 +67055,19 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ 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: '生产日期', @@ -35462,7 +67075,19 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ 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: '过期日期', @@ -35470,25 +67095,86 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ 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', + } + }, }, ])) +//表单校验 +export const UnplannedreceiptJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + arriveDate: [ + { required: true, message: '请输入到货日期', trigger: 'change' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入从过期日期', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 计划外入库记录主表 */ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到仓库代码', - field: 'toWarehouseCode' + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -35496,19 +67182,35 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库区代码范围', - field: 'toAreaCodes' + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -35516,7 +67218,19 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( 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: '生效日期', @@ -35524,7 +67238,19 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( 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: '申请时间', @@ -35532,7 +67258,19 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( 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: '截止时间', @@ -35540,11 +67278,27 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -35552,23 +67306,43 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -35576,11 +67350,27 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -35588,25 +67378,98 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const UnplannedreceiptRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toLocationTypes: [ + { required: true, message: '请选择到库位类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { 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 UnplannedreceiptRecordDetail = useCrudSchemas(reactive([ { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -35614,7 +67477,11 @@ export const UnplannedreceiptRecordDetail = useCrudSchemas(reactive([ { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -35756,23 +67795,43 @@ export const ScrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -35780,11 +67839,27 @@ export const ScrapRequestMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -35792,7 +67867,19 @@ export const ScrapRequestMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -35800,11 +67887,27 @@ export const ScrapRequestMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -35812,7 +67915,11 @@ export const ScrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -35820,11 +67927,27 @@ export const ScrapRequestMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -35832,7 +67955,19 @@ export const ScrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动通过', @@ -35840,7 +67975,19 @@ export const ScrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '自动执行', @@ -35848,7 +67995,19 @@ export const ScrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '直接生成记录', @@ -35856,33 +68015,108 @@ export const ScrapRequestMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, ])) +//表单校验 +export const ScrapRequestMainRules = reactive({ + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 ScrapRequestDetail = useCrudSchemas(reactive([ { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -35890,7 +68124,11 @@ export const ScrapRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -35898,27 +68136,54 @@ export const ScrapRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.SCRAP_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计量单位', @@ -35926,7 +68191,11 @@ export const ScrapRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -35934,23 +68203,51 @@ export const ScrapRequestDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -35958,25 +68255,77 @@ export const ScrapRequestDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ScrapRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 报废出库任务主表 */ export const ScrapJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -35984,7 +68333,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -35992,7 +68353,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -36000,7 +68373,11 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -36008,7 +68385,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -36016,31 +68405,73 @@ export const ScrapJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -36048,11 +68479,27 @@ export const ScrapJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -36060,7 +68507,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -36068,7 +68527,11 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -36076,19 +68539,35 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -36096,15 +68575,35 @@ export const ScrapJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -36112,7 +68611,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '允许修改库位', @@ -36120,7 +68631,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '允许修改数量', @@ -36128,7 +68651,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '允许大于推荐数量', @@ -36136,7 +68671,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '允许小于推荐数量', @@ -36144,7 +68691,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '允许修改库存状态', @@ -36152,7 +68711,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '允许连续扫描', @@ -36160,7 +68731,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '允许部分完成', @@ -36168,7 +68751,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '允许修改批次', @@ -36176,7 +68771,19 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '允许修改箱码', @@ -36184,33 +68791,117 @@ export const ScrapJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, ])) +//表单校验 +export const ScrapJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 报废出库任务子表 */ export const ScrapJobDetail = useCrudSchemas(reactive([ { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -36218,7 +68909,11 @@ export const ScrapJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -36226,31 +68921,62 @@ export const ScrapJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.SCRAP_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -36258,19 +68984,35 @@ export const ScrapJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -36278,29 +69020,85 @@ export const ScrapJobDetail = useCrudSchemas(reactive([ 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', + } + }, }, ])) +//表单校验 +export const ScrapJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 报废出库记录主表 */ export const ScrapRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -36308,7 +69106,19 @@ export const ScrapRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -36316,7 +69126,19 @@ export const ScrapRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -36324,7 +69146,19 @@ export const ScrapRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -36332,11 +69166,27 @@ export const ScrapRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -36344,23 +69194,43 @@ export const ScrapRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -36368,15 +69238,35 @@ export const ScrapRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从仓库代码', - field: 'fromWarehouseCode' + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位类型范围', @@ -36384,11 +69274,19 @@ export const ScrapRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -36408,37 +69306,114 @@ export const ScrapRecordMain = useCrudSchemas(reactive([ }, ])) +//表单校验 +export const ScrapRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromLocationTypes: [ + { required: true, message: '请选择从库位类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { 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 ScrapRecordDetail = useCrudSchemas(reactive([ { label: '从货主代码', - field: 'fromOwnerCode' + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位代码', - field: 'fromLocationCode' + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库位组代码', - field: 'fromLocationGroupCode' + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码', - field: 'fromAreaCode' + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -36446,7 +69421,11 @@ export const ScrapRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '原因', @@ -36454,27 +69433,57 @@ export const ScrapRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.SCRAP_REASON, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单价', - field: 'singlePrice' + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '金额', - field: 'amount' + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -36482,31 +69491,70 @@ export const ScrapRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -36514,15 +69562,27 @@ export const ScrapRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -36530,10 +69590,48 @@ export const ScrapRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const ScrapRecordDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 盘点计划主表 */ @@ -36544,11 +69642,19 @@ export const CountPlanMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.COUNT_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行周期', - field: 'crontab' + field: 'crontab', + sort: 'custom', + table: { + width: 150 + }, }, { label: '维度', @@ -36556,23 +69662,46 @@ export const CountPlanMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.COUNT_DIMENSION, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '限值', - field: 'limitedValue' + field: 'limitedValue', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '物品忽略名单', - field: 'ignoreListOfItem' + field: 'ignoreListOfItem', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位忽略名单', - field: 'ignoreListOfLocation' + field: 'ignoreListOfLocation', + sort: 'custom', + table: { + width: 150 + }, }, { label: '盘点范围列表', - field: 'scopeList' + field: 'scopeList', + sort: 'custom', + table: { + width: 150 + }, }, { label: '快照盘点', @@ -36589,6 +69718,10 @@ export const CountPlanMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '冻结盘点', @@ -36605,6 +69738,10 @@ export const CountPlanMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '盘点空库位', @@ -36621,6 +69758,10 @@ export const CountPlanMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '盘点零库存', @@ -36637,6 +69778,10 @@ export const CountPlanMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '盘点负库存', @@ -36653,6 +69798,10 @@ export const CountPlanMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '明盘', @@ -36669,22 +69818,42 @@ export const CountPlanMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -36692,7 +69861,19 @@ export const CountPlanMain = useCrudSchemas(reactive([ 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: '开始时间', @@ -36700,7 +69881,19 @@ export const CountPlanMain = useCrudSchemas(reactive([ 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: '结束时间', @@ -36708,7 +69901,19 @@ export const CountPlanMain = useCrudSchemas(reactive([ 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: '状态', @@ -36716,7 +69921,11 @@ export const CountPlanMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.COUNT_PLAN_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -36724,11 +69933,27 @@ export const CountPlanMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -36748,6 +69973,49 @@ export const CountPlanMain = useCrudSchemas(reactive([ }, ])) +//表单校验 +export const CountPlanMainRules = reactive({ + type: [ + { required: true, message: '请选择盘点类型', trigger: 'change' } + ], + isSnapshot: [ + { required: true, message: '请选择快照盘点', trigger: 'change' } + ], + isFreeze: [ + { required: true, message: '请选择冻结盘点', trigger: 'change' } + ], + isCountEmptyLocation: [ + { required: true, message: '请选择盘点空库位', trigger: 'change' } + ], + isCountZeroInventory: [ + { required: true, message: '请选择盘点零库存', trigger: 'change' } + ], + isCountNegativeInventory: [ + { required: true, message: '请选择盘点负库存', trigger: 'change' } + ], + isOpenCount: [ + { required: true, message: '请选择明盘', trigger: 'change' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], +}) + /** * @returns {Array} 盘点计划子表 */ @@ -36758,27 +70026,51 @@ export const CountPlanDetail = useCrudSchemas(([ dictType: DICT_TYPE.COUNT_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '盘点范围值', - field: 'value' + field: 'value', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -36786,7 +70078,19 @@ export const CountPlanDetail = useCrudSchemas(([ 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: '最后更新时间', @@ -36794,15 +70098,38 @@ export const CountPlanDetail = useCrudSchemas(([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划数量', - field: 'planQty' + field: 'planQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -36810,7 +70137,11 @@ export const CountPlanDetail = useCrudSchemas(([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -36827,20 +70158,57 @@ export const CountPlanDetail = useCrudSchemas(([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CountPlanDetailRules = reactive({ + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + uom: [ + { required: true, message: '请选择计量单位', trigger: 'change' } + ], + planQty: [ + { required: true, message: '请输入计划数量', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 盘点申请主表 */ export const CountRequestMain = useCrudSchemas(([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划单号', - field: 'planNumber' + field: 'planNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '阶段', @@ -36848,23 +70216,43 @@ export const CountRequestMain = useCrudSchemas(([ dictType: DICT_TYPE.COUNT_STAGE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -36872,11 +70260,27 @@ export const CountRequestMain = useCrudSchemas(([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -36884,7 +70288,19 @@ export const CountRequestMain = useCrudSchemas(([ 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: '截止时间', @@ -36892,11 +70308,27 @@ export const CountRequestMain = useCrudSchemas(([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -36904,7 +70336,11 @@ export const CountRequestMain = useCrudSchemas(([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -36912,11 +70348,27 @@ export const CountRequestMain = useCrudSchemas(([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -36933,6 +70385,10 @@ export const CountRequestMain = useCrudSchemas(([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动通过', @@ -36949,6 +70405,10 @@ export const CountRequestMain = useCrudSchemas(([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动执行', @@ -36965,6 +70425,10 @@ export const CountRequestMain = useCrudSchemas(([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '直接生成记录', @@ -36981,40 +70445,116 @@ export const CountRequestMain = useCrudSchemas(([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CountRequestMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + stage: [ + { required: true, message: '请选择阶段', trigger: 'change' } + ], + warehouseCode: [ + { required: true, message: '请选择仓库代码', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 CountRequestDetail = useCrudSchemas(reactive([ { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从包装号', - field: 'fromPackingNumber' + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从器具号', - field: 'fromContainerNumber' + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到包装号', - field: 'toPackingNumber' + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '到器具号', - field: 'toContainerNumber' + field: 'toContainerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位代码', - field: 'locationCode' + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -37022,31 +70562,62 @@ export const CountRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '盘点明细号', - field: 'countDetailNumber' + field: 'countDetailNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计量单位', @@ -37054,7 +70625,11 @@ export const CountRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -37062,23 +70637,51 @@ export const CountRequestDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -37086,25 +70689,68 @@ export const CountRequestDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CountRequestDetailRules = reactive({ + countDetailNumber: [ + { required: true, message: '请输入盘点明细号', trigger: 'blur' } + ], + fromPackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + locationCode: [ + { required: true, message: '请选择库位代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], +}) + /** * @returns {Array} 盘点任务主表 */ export const CountJobMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划单号', - field: 'planNumber' + field: 'planNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '阶段', @@ -37112,15 +70758,27 @@ export const CountJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.COUNT_STAGE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位代码', - field: 'locationCode' + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -37128,7 +70786,19 @@ export const CountJobMain = useCrudSchemas(reactive([ 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: '要求截止时间', @@ -37136,7 +70806,19 @@ export const CountJobMain = useCrudSchemas(reactive([ 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: '状态', @@ -37144,7 +70826,11 @@ export const CountJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.JOB_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '过期时间', @@ -37152,7 +70838,19 @@ export const CountJobMain = useCrudSchemas(reactive([ 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: '最后更新时间', @@ -37160,31 +70858,73 @@ export const CountJobMain = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', - field: 'jobStageStatus' + field: 'jobStageStatus', + sort: 'custom', + table: { + width: 150 + }, }, { label: '优先级', - field: 'priority' + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '优先级增量', - field: 'priorityIncrement' + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '部门', - field: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接人', - field: 'acceptUserId' + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '承接时间', @@ -37192,11 +70932,27 @@ export const CountJobMain = useCrudSchemas(reactive([ 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: 'completeUserId' + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '完成时间', @@ -37204,7 +70960,19 @@ export const CountJobMain = useCrudSchemas(reactive([ 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: '从库位类型范围', @@ -37212,7 +70980,11 @@ export const CountJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '到库位类型范围', @@ -37220,19 +70992,35 @@ export const CountJobMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -37240,15 +71028,35 @@ export const CountJobMain = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '从库区代码范围', - field: 'fromAreaCodes' + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动完成', @@ -37265,6 +71073,10 @@ export const CountJobMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '允许修改库位', @@ -37281,6 +71093,10 @@ export const CountJobMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '允许修改数量', @@ -37297,6 +71113,10 @@ export const CountJobMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '允许大于推荐数量', @@ -37313,6 +71133,10 @@ export const CountJobMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '允许小于推荐数量', @@ -37329,6 +71153,10 @@ export const CountJobMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '允许修改库存状态', @@ -37345,6 +71173,10 @@ export const CountJobMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '允许连续扫描', @@ -37361,6 +71193,10 @@ export const CountJobMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '允许部分完成', @@ -37377,6 +71213,10 @@ export const CountJobMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '允许修改批次', @@ -37393,6 +71233,10 @@ export const CountJobMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '允许修改箱码', @@ -37409,32 +71253,108 @@ export const CountJobMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CountJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + stage: [ + { required: true, message: '请选择阶段', trigger: 'change' } + ], + warehouseCode: [ + { required: true, message: '请选择仓库代码', trigger: 'change' } + ], + locationCode: [ + { required: true, message: '请选择库位代码', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + jobStageStatus: [ + { required: true, message: '请选择阶段状态', trigger: 'change' } + ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 盘点任务子表 */ export const CountJobDetail = useCrudSchemas(reactive([ { label: '盘点明细号', - field: 'countDetailNumber' + field: 'countDetailNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -37442,31 +71362,62 @@ export const CountJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -37474,19 +71425,35 @@ export const CountJobDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -37494,25 +71461,65 @@ export const CountJobDetail = useCrudSchemas(reactive([ 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', + } + }, }, ])) +//表单校验 +export const CountJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + countDetailNumber: [ + { required: true, message: '输入盘点明细号', trigger: 'blur' } + ], +}) + /** * @returns {Array} 盘点记录主表 */ export const CountRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务单号', - field: 'jobNumber' + field: 'jobNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计划单号', - field: 'planNumber' + field: 'planNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '阶段', @@ -37520,19 +71527,35 @@ export const CountRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.COUNT_STAGE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -37540,7 +71563,19 @@ export const CountRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -37548,7 +71583,19 @@ export const CountRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -37556,7 +71603,19 @@ export const CountRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -37564,11 +71623,27 @@ export const CountRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -37576,23 +71651,43 @@ export const CountRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -37600,11 +71695,27 @@ export const CountRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -37621,44 +71732,129 @@ export const CountRecordMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CountRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + jobNumber: [ + { required: true, message: '请选择任务单号', trigger: 'change' } + ], + stage: [ + { required: true, message: '请选择阶段', trigger: 'change' } + ], + warehouseCode: [ + { 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 CountRecordDetail = useCrudSchemas(reactive([ { label: '盘点明细号', - field: 'countDetailNumber' + field: 'countDetailNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位代码', - field: 'locationCode' + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位组代码', - field: 'locationGroupCode' + field: 'locationGroupCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库区代码', - field: 'areaCode' + field: 'areaCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -37666,11 +71862,22 @@ export const CountRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '盘点数量', - field: 'countQty' + field: 'countQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '盘点时间', @@ -37678,27 +71885,59 @@ export const CountRecordDetail = useCrudSchemas(reactive([ 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: 'countUser' + field: 'countUser', + sort: 'custom', + table: { + width: 150 + }, }, { label: '盘点描述', - field: 'countDescription' + field: 'countDescription', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -37706,31 +71945,70 @@ export const CountRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -37738,15 +72016,27 @@ export const CountRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -37754,37 +72044,111 @@ export const CountRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CountRecordDetailRules = reactive({ + countDetailNumber: [ + { required: true, message: '请输入盘点明细号', trigger: 'blur' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + locationCode: [ + { required: true, message: '请选择库位代码', trigger: 'change' } + ], + locationGroupCode: [ + { required: true, message: '请选择库位组代码', trigger: 'change' } + ], + areaCode: [ + { required: true, message: '请选择库区代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + countQty: [ + { required: true, message: '请输入盘点数量', trigger: 'blur' } + ], + countTime: [ + { required: true, message: '请输入盘点时间', trigger: 'change' } + ], + countUser: [ + { required: true, message: '请输入盘点人', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 盘点调整申请主表 */ export const CountadjustRequestMain = useCrudSchemas(([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '盘点记录单号', - field: 'countRecordNumber' + field: 'countRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -37792,11 +72156,27 @@ export const CountadjustRequestMain = useCrudSchemas(([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '申请时间', @@ -37804,7 +72184,19 @@ export const CountadjustRequestMain = useCrudSchemas(([ 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: '截止时间', @@ -37812,11 +72204,27 @@ export const CountadjustRequestMain = useCrudSchemas(([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '状态', @@ -37824,7 +72232,11 @@ export const CountadjustRequestMain = useCrudSchemas(([ dictType: DICT_TYPE.REQUEST_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -37832,11 +72244,27 @@ export const CountadjustRequestMain = useCrudSchemas(([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动提交', @@ -37853,6 +72281,10 @@ export const CountadjustRequestMain = useCrudSchemas(([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动通过', @@ -37869,6 +72301,10 @@ export const CountadjustRequestMain = useCrudSchemas(([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '自动执行', @@ -37885,6 +72321,10 @@ export const CountadjustRequestMain = useCrudSchemas(([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, { label: '直接生成记录', @@ -37901,36 +72341,104 @@ export const CountadjustRequestMain = useCrudSchemas(([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CountadjustRequestMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + warehouseCode: [ + { required: true, message: '请选择仓库代码', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { 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 CountadjustRequestDetail = useCrudSchemas(reactive([ { label: '盘点明细号', - field: 'countDetailNumber' + field: 'countDetailNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位代码', - field: 'locationCode' + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -37938,39 +72446,87 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存数量', - field: 'inventoryQty' + field: 'inventoryQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '盘点数量', - field: 'countQty' + field: 'countQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '调整数量', - field: 'adjustQty' + field: 'adjustQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '计量单位', @@ -37978,7 +72534,11 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '最后更新时间', @@ -37986,23 +72546,51 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive([ 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: 'updater' + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -38010,37 +72598,113 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CountadjustRequestDetailRules = reactive({ + countDetailNumber: [ + { required: true, message: '请输入盘点明细号', trigger: 'blur' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + locationCode: [ + { required: true, message: '请选择库位代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + inventoryQty: [ + { required: true, message: '请输入库存数量', trigger: 'blur' } + ], + countQty: [ + { required: true, message: '请输入盘点数量', trigger: 'blur' } + ], + adjustQty: [ + { required: true, message: '请输入调整数量', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + /** * @returns {Array} 盘点调整记录主表 */ export const CountadjustRecordMain = useCrudSchemas(reactive([ { label: '申请单号', - field: 'requestNumber' + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '盘点记录单号', - field: 'countRecordNumber' + field: 'countRecordNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '仓库代码', - field: 'warehouseCode' + field: 'warehouseCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '出库事务类型', - field: 'outTransactionType' + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '入库事务类型', - field: 'inTransactionType' + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '执行时间', @@ -38048,7 +72712,19 @@ export const CountadjustRecordMain = useCrudSchemas(reactive([ 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: '生效日期', @@ -38056,7 +72732,19 @@ export const CountadjustRecordMain = useCrudSchemas(reactive([ 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: '申请时间', @@ -38064,7 +72752,19 @@ export const CountadjustRecordMain = useCrudSchemas(reactive([ 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: '截止时间', @@ -38072,11 +72772,27 @@ export const CountadjustRecordMain = useCrudSchemas(reactive([ 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: 'departmentCode' + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -38084,23 +72800,43 @@ export const CountadjustRecordMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '业务类型', - field: 'businessType' + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建者', - field: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -38108,11 +72844,27 @@ export const CountadjustRecordMain = useCrudSchemas(reactive([ 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: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '是否可用', @@ -38129,36 +72881,107 @@ export const CountadjustRecordMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, + sort: 'custom', + table: { + width: 150 + }, }, ])) +//表单校验 +export const CountadjustRecordMainRules =reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + warehouseCode: [ + { 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 CountadjustRecordDetail = useCrudSchemas(reactive([ { label: '盘点明细号', - field: 'countDetailNumber' + field: 'countDetailNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '货主代码', - field: 'ownerCode' + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '包装号', - field: 'packingNumber' + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '器具号', - field: 'containerNumber' + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, }, { label: '批次', - field: 'batch' + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库位代码', - field: 'locationCode' + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '库存状态', @@ -38166,31 +72989,68 @@ export const CountadjustRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '盘点数量', - field: 'countQty' + field: 'countQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '库存数量', - field: 'inventoryQty' + field: 'inventoryQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '调整数量', - field: 'adjustQty' + field: 'adjustQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '单据号', - field: 'number' + field: 'number', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品代码', - field: 'itemCode' + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '备注', - field: 'remark' + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, }, { label: '创建时间', @@ -38198,31 +73058,70 @@ export const CountadjustRecordDetail = useCrudSchemas(reactive([ 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: 'creator' + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品名称', - field: 'itemName' + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述1', - field: 'itemDesc1' + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, }, { label: '物品描述2', - field: 'itemDesc2' + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, }, { label: '项目代码', - field: 'projectCode' + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, }, { label: '数量', - field: 'qty' + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } }, { label: '计量单位', @@ -38230,15 +73129,27 @@ export const CountadjustRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, { label: '任务明细ID', - field: 'jobDetailId' + field: 'jobDetailId', + sort: 'custom', + table: { + width: 150 + }, }, { label: '代码', - field: 'code' + field: 'code', + sort: 'custom', + table: { + width: 150 + }, }, { label: '接口类型', @@ -38246,6 +73157,50 @@ export const CountadjustRecordDetail = useCrudSchemas(reactive([ dictType: DICT_TYPE.INTERFACE_TYPE, dictClass: 'string', isSearch: true, - isTable: true + isTable: true, + sort: 'custom', + table: { + width: 150 + }, }, -])) \ No newline at end of file +])) + +//表单校验 +export const CountadjustRecordDetailRules =reactive({ + countDetailNumber: [ + { required: true, message: '请输入盘点明细号', trigger: 'blur' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + locationCode: [ + { required: true, message: '请选择库位代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + countQty: [ + { required: true, message: '请输入盘点数量', trigger: 'blur' } + ], + adjustQty: [ + { required: true, message: '请输入调整数量', trigger: 'blur' } + ], + inventoryQty: [ + { required: true, message: '请输入库存数量', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物品代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) \ No newline at end of file