From 90ddb208d83e0f9c1207851a0e53dbee69d7a02b Mon Sep 17 00:00:00 2001 From: chenfang Date: Wed, 24 Apr 2024 11:01:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=93=81=E4=B8=8A=E6=9E=B6=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E7=B1=BB=E5=9E=8B=E5=8C=BA=E5=88=86=EF=BC=9A=E9=A2=84?= =?UTF-8?q?=E7=94=9F=E4=BA=A7/=E8=A3=85=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/productputawayJobMain/index.ts | 25 + src/api/wms/productputawayRecordMain/index.ts | 26 + .../wms/productputawayRequestMain/index.ts | 25 + .../productputawayAssembleJobMain/index.vue | 285 ++++++ .../productputawayAssembleJobMain.data.ts | 809 ++++++++++++++++++ .../index.vue | 179 ++++ .../productputawayAssembleRecordMain.data.ts | 665 ++++++++++++++ .../index.vue | 415 +++++++++ .../productputawayAssembleRequestMain.data.ts | 757 ++++++++++++++++ 9 files changed, 3186 insertions(+) create mode 100644 src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue create mode 100644 src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts create mode 100644 src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue create mode 100644 src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/productputawayAssembleRecordMain.data.ts create mode 100644 src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue create mode 100644 src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts diff --git a/src/api/wms/productputawayJobMain/index.ts b/src/api/wms/productputawayJobMain/index.ts index 9789444e8..d9379684f 100644 --- a/src/api/wms/productputawayJobMain/index.ts +++ b/src/api/wms/productputawayJobMain/index.ts @@ -42,6 +42,7 @@ export interface ProductputawayJobMainVO { // 查询制品上架任务主列表 export const getProductputawayJobMainPage = async (params) => { + params.type = 'predict' if (params.isSearch) { delete params.isSearch const data = {...params} @@ -51,6 +52,17 @@ export const getProductputawayJobMainPage = async (params) => { } } +// 查询制品上架任务主列表 +export const getProductputawayJobMainAssemblePage = async (params) => { + params.type = 'assemble' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productputaway-job-main/senior', data }) + } else { + return await request.get({ url: `/wms/productputaway-job-main/page`, params }) + } +} // 查询制品上架任务主详情 export const getProductputawayJobMain = async (id: number) => { return await request.get({ url: `/wms/productputaway-job-main/get?id=` + id }) @@ -73,6 +85,19 @@ export const deleteProductputawayJobMain = async (id: number) => { // 导出制品上架任务主 Excel export const exportProductputawayJobMain = async (params) => { + params.type = 'predict' + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/productputaway-job-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productputaway-job-main/export-excel`, params }) + } +} + + +// 导出制品上架任务主 Excel +export const exportProductputawayJobMainAssemble = async (params) => { + params.type = 'assemble' if (params.isSearch) { const data = {...params} return await request.downloadPost({ url: `/wms/productputaway-job-main/export-excel-senior`, data }) diff --git a/src/api/wms/productputawayRecordMain/index.ts b/src/api/wms/productputawayRecordMain/index.ts index ef29d16f6..716646115 100644 --- a/src/api/wms/productputawayRecordMain/index.ts +++ b/src/api/wms/productputawayRecordMain/index.ts @@ -30,6 +30,19 @@ export interface ProductputawayRecordMainVO { // 查询制品上架记录主列表 export const getProductputawayRecordMainPage = async (params) => { + params.type = 'predict' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productputaway-record-main/senior', data }) + } else { + return await request.get({ url: `/wms/productputaway-record-main/page`, params }) + } +} + +// 查询制品上架记录主列表 +export const getProductputawayRecordMainAssemblePage = async (params) => { + params.type = 'assemble' if (params.isSearch) { delete params.isSearch const data = {...params} @@ -61,6 +74,19 @@ export const deleteProductputawayRecordMain = async (id: number) => { // 导出制品上架记录主 Excel export const exportProductputawayRecordMain = async (params) => { + params.type = 'predict' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productputaway-record-main/export-excel-senior', data }) + } else { + return await request.download({ url: `/wms/productputaway-record-main/export-excel`, params }) + } +} + +// 导出制品上架记录主 Excel +export const exportProductputawayRecordMainAssemble = async (params) => { + params.type = 'assemble' if (params.isSearch) { delete params.isSearch const data = {...params} diff --git a/src/api/wms/productputawayRequestMain/index.ts b/src/api/wms/productputawayRequestMain/index.ts index 7975d1ea5..6696beea6 100644 --- a/src/api/wms/productputawayRequestMain/index.ts +++ b/src/api/wms/productputawayRequestMain/index.ts @@ -28,6 +28,19 @@ export interface ProductputawayRequestMainVO { // 查询制品上架申请主列表 export const getProductputawayRequestMainPage = async (params) => { + params.type = 'predict' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productputaway-request-main/senior', data }) + } else { + return await request.get({ url: `/wms/productputaway-request-main/page`, params }) + } +} + +// 查询制品上架申请主列表 +export const getProductputawayRequestMainAssemblePage = async (params) => { + params.type = 'assemble' if (params.isSearch) { delete params.isSearch const data = {...params} @@ -59,6 +72,18 @@ export const deleteProductputawayRequestMain = async (id: number) => { // 导出制品上架申请主 Excel export const exportProductputawayRequestMain = async (params) => { + params.type = 'predict' + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/productputaway-request-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productputaway-request-main/export-excel`, params }) + } +} + +// 导出制品上架申请主 Excel +export const exportProductputawayRequestMainAssemble = async (params) => { + params.type = 'assemble' if (params.isSearch) { const data = {...params} return await request.downloadPost({ url: `/wms/productputaway-request-main/export-excel-senior`, data }) diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue new file mode 100644 index 000000000..3a391c4be --- /dev/null +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue @@ -0,0 +1,285 @@ + + + diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts new file mode 100644 index 000000000..3cd26c74d --- /dev/null +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/productputawayAssembleJobMain.data.ts @@ -0,0 +1,809 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +/** + * @returns {Array} 制品上架任务主表 + */ +export const ProductputawayJobMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + }, + // { + // label: '供应商代码', + // field: 'supplierCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '要求截止时间', + field: 'requestDueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + // { + // label: '状态', + // field: 'jobStageStatus', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '过期时间', + field: 'expiredTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '最后更新者', + field: 'update', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + 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', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '承接人用户名', + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '承接时间', + field: 'acceptTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH: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', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '完成时间', + field: 'completeTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + 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: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '自动完成', + field: 'autoComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改库位', + field: 'allowModifyLocation', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改数量', + field: 'allowModifyQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许大于推荐数量', + field: 'allowBiggerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许小于推荐数量', + field: 'allowSmallerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改库存状态', + field: 'allowModifyInventoryStatus', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许连续扫描', + field: 'allowContinuousScanning', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许部分完成', + field: 'allowPartialComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改批次', + field: 'allowModifyBatch', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改箱码', + field: 'allowModifyPackingNumber', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + // { + // label: '操作', + // field: 'action', + // isDetail: false, + // isForm: false, + // table: { + // width: 120, + // fixed: 'right' + // }, + // } +])) + +//表单校验 +export const ProductputawayJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toAreaTypes: [ + { required: true, message: '请选择到库区类型范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + // 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', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemdesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + 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: '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' } + ], +}) diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue new file mode 100644 index 000000000..6e69d6146 --- /dev/null +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue @@ -0,0 +1,179 @@ + + + diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/productputawayAssembleRecordMain.data.ts b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/productputawayAssembleRecordMain.data.ts new file mode 100644 index 000000000..adecda095 --- /dev/null +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/productputawayAssembleRecordMain.data.ts @@ -0,0 +1,665 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' + +/** + * @returns {Array} 制品上架记录主表 + */ +export const ProductputawayRecordMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, + { + label: '任务单号', + field: 'jobNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, + // { + // label: '供应商代码', + // field: 'supplierCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '执行时间', + field: 'executeTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '生效日期', + field: 'activeDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建者', + 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: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '是否可用', + field: 'available', + 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 ProductputawayRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toAreaTypes: [ + { required: true, message: '请选择到库区类型范围', trigger: 'change' } + ], + outTransaction: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransaction: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + executeTime: [ + { required: true, message: '请输入执行时间', trigger: 'change' } + ], + activeDate: [ + { required: true, message: '请输入生效日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: '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', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到包装号', + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从批次', + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到批次', + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位组代码', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区代码', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库位组代码', + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区代码', + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + 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: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '从器具号', + field: 'fromContainerNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到器具号', + 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' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue new file mode 100644 index 000000000..0b77db453 --- /dev/null +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue @@ -0,0 +1,415 @@ + + + diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts new file mode 100644 index 000000000..abe333bba --- /dev/null +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts @@ -0,0 +1,757 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' + +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +import { TableColumn } from '@/types/table' + +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'ProductPutawayRequest' +} + const data = await getRequestsettingApi.getRequestsettingPage(queryParams) + const requestsettingData =data?.list[0]||{} + + // 获取当前操作人的部门 +import { useUserStore } from '@/store/modules/user' +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept + // id 转str 否则form回显匹配不到 + userDept.id = userDept.id.toString() +const userDeptArray:any = [userDept] + +/** + * @returns {Array} 制品上架申请主表 + */ +export const ProductputawayRequestMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true, + }, + // { + // label: '供应商代码', + // field: 'supplierCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isSearch: true, + // isForm: false, + // }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'ProductPutaway', + componentProps: { + disabled: true + } + }, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isForm:false, + table: { + width: 150 + }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id == cellValue)?.name + }, + form: { + value: userDept.id, + component: 'Select', + api: () => userDeptArray, + componentProps: { + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } + } + } + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isForm:false, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoCommit, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoExecute, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '直接生成记录', + field: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' + }, + } +])) + +//表单校验 +export const ProductputawayRequestMainRules = reactive({ + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], + // dueTime: [ + // { required: true, message: '请选择截止时间', trigger: 'change' } + // ], +}) + +/** + * @returns {Array} 制品上架申请子表 + */ +export const ProductputawayRequestDetail = useCrudSchemas(reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法 + } + } + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTableForm: false, + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTableForm: false, + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + } + }, + tableForm:{ + type: 'InputNumber', + min: 0, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm:{ + type: 'Select', + disabled: true + } + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:false, + } +])) + +//表单校验 +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' } + // ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], +}) \ No newline at end of file