diff --git a/src/api/wms/productionscrapRecordDetail/index.ts b/src/api/wms/productionscrapRecordDetail/index.ts new file mode 100644 index 000000000..1aa05cb5e --- /dev/null +++ b/src/api/wms/productionscrapRecordDetail/index.ts @@ -0,0 +1,77 @@ +import request from '@/config/axios' + +export interface ProductionscrapRecordDetailVO { + id: number + productionLineCode: string + workStationCode: string + inventoryStatus: string + fromOwnerCode: string + fromPackingNumber: string + fromContainerNumber: string + fromBatch: string + fromLocationCode: string + fromLocationGroupCode: string + fromAreaCode: string + toOwnerCode: string + toPackingNumber: string + toContainerNumber: string + toBatch: string + toLocationCode: string + toLocationGroupCode: string + toAreaCode: string + masterId: number + number: string + itemCode: string + remark: string + siteId: string + itemName: string + itemDesc1: string + itemDesc2: string + projectCode: string + qty: number + uom: string + code: string + interfaceType: string + jobDetailId: string +} + +// 查询线边原料报废记录子列表 +export const getProductionscrapRecordDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionscrap-record-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productionscrap-record-detail/page`, params }) + } +} + +// 查询线边原料报废记录子详情 +export const getProductionscrapRecordDetail = async (id: number) => { + return await request.get({ url: `/wms/productionscrap-record-detail/get?id=` + id }) +} + +// 新增线边原料报废记录子 +export const createProductionscrapRecordDetail = async (data: ProductionscrapRecordDetailVO) => { + return await request.post({ url: `/wms/productionscrap-record-detail/create`, data }) +} + +// 修改线边原料报废记录子 +export const updateProductionscrapRecordDetail = async (data: ProductionscrapRecordDetailVO) => { + return await request.put({ url: `/wms/productionscrap-record-detail/update`, data }) +} + +// 删除线边原料报废记录子 +export const deleteProductionscrapRecordDetail = async (id: number) => { + return await request.delete({ url: `/wms/productionscrap-record-detail/delete?id=` + id }) +} + +// 导出线边原料报废记录子 Excel +export const exportProductionscrapRecordDetail = async (params) => { + return await request.download({ url: `/wms/productionscrap-record-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productionscrap-record-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/productionscrapRecordMain/index.ts b/src/api/wms/productionscrapRecordMain/index.ts new file mode 100644 index 000000000..8cde1c0b8 --- /dev/null +++ b/src/api/wms/productionscrapRecordMain/index.ts @@ -0,0 +1,72 @@ +import request from '@/config/axios' + +export interface ProductionscrapRecordMainVO { + id: number + requestNumber: string + jobNumber: string + workshopCode: string + details: string + outTransactionType: string + inTransactionType: string + executeTime: Date + activeDate: Date + available: string + requestTime: Date + dueTime: Date + departmentCode: string + userGroupCode: string + interfaceType: string + number: string + businessType: string + remark: string + extraProperties: string + siteId: string + code: string + fromWarehouseCode: string + fromAreaTypes: string + fromAreaCodes: string + toWarehouseCode: string + toAreaTypes: string + toAreaCodes: string +} + +// 查询线边原料报废记录主列表 +export const getProductionscrapRecordMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionscrap-record-main/senior', data }) + } else { + return await request.get({ url: `/wms/productionscrap-record-main/page`, params }) + } +} + +// 查询线边原料报废记录主详情 +export const getProductionscrapRecordMain = async (id: number) => { + return await request.get({ url: `/wms/productionscrap-record-main/get?id=` + id }) +} + +// 新增线边原料报废记录主 +export const createProductionscrapRecordMain = async (data: ProductionscrapRecordMainVO) => { + return await request.post({ url: `/wms/productionscrap-record-main/create`, data }) +} + +// 修改线边原料报废记录主 +export const updateProductionscrapRecordMain = async (data: ProductionscrapRecordMainVO) => { + return await request.put({ url: `/wms/productionscrap-record-main/update`, data }) +} + +// 删除线边原料报废记录主 +export const deleteProductionscrapRecordMain = async (id: number) => { + return await request.delete({ url: `/wms/productionscrap-record-main/delete?id=` + id }) +} + +// 导出线边原料报废记录主 Excel +export const exportProductionscrapRecordMain = async (params) => { + return await request.download({ url: `/wms/productionscrap-record-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productionscrap-record-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/productionscrapRequestDetail/index.ts b/src/api/wms/productionscrapRequestDetail/index.ts new file mode 100644 index 000000000..b5b5fd42d --- /dev/null +++ b/src/api/wms/productionscrapRequestDetail/index.ts @@ -0,0 +1,69 @@ +import request from '@/config/axios' + +export interface ProductionscrapRequestDetailVO { + id: number + productionLineCode: string + workStationCode: string + inventoryStatus: string + packingNumber: string + containerNumber: string + batch: string + fromLocationCode: string + masterId: number + number: string + itemCode: string + remark: string + siteId: string + itemName: string + itemDesc1: string + itemDesc2: string + projectCode: string + qty: number + uom: string + packUnit: string + packQty: number + fromOwnerCode: string + toOwnerCode: string + concurrencyStamp: number +} + +// 查询线边原料报废子列表 +export const getProductionscrapRequestDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionscrap-request-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productionscrap-request-detail/page`, params }) + } +} + +// 查询线边原料报废子详情 +export const getProductionscrapRequestDetail = async (id: number) => { + return await request.get({ url: `/wms/productionscrap-request-detail/get?id=` + id }) +} + +// 新增线边原料报废子 +export const createProductionscrapRequestDetail = async (data: ProductionscrapRequestDetailVO) => { + return await request.post({ url: `/wms/productionscrap-request-detail/create`, data }) +} + +// 修改线边原料报废子 +export const updateProductionscrapRequestDetail = async (data: ProductionscrapRequestDetailVO) => { + return await request.put({ url: `/wms/productionscrap-request-detail/update`, data }) +} + +// 删除线边原料报废子 +export const deleteProductionscrapRequestDetail = async (id: number) => { + return await request.delete({ url: `/wms/productionscrap-request-detail/delete?id=` + id }) +} + +// 导出线边原料报废子 Excel +export const exportProductionscrapRequestDetail = async (params) => { + return await request.download({ url: `/wms/productionscrap-request-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productionscrap-request-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/productionscrapRequestMain/index.ts b/src/api/wms/productionscrapRequestMain/index.ts new file mode 100644 index 000000000..0dbd97128 --- /dev/null +++ b/src/api/wms/productionscrapRequestMain/index.ts @@ -0,0 +1,102 @@ +import request from '@/config/axios' + +export interface ProductionscrapRequestMainVO { + id: number + workshopCode: string + fromWarehouseCode: string + fromAreaTypes: string + fromAreaCodes: string + details: string + number: string + businessType: string + remark: string + extraProperties: string + siteId: string + requestTime: Date + dueTime: Date + departmentCode: string + status: string + autoCommit: string + autoAgree: string + autoExecute: string + directCreateRecord: string + concurrencyStamp: number + ruleUserId: number + toWarehouseCode: string + toAreaTypes: string + toAreaCodes: string + serialNumber: string + inInventoryStatuses: string + outInventoryStatuses: string +} + +// 查询线边原料报废主列表 +export const getProductionscrapRequestMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionscrap-request-main/senior', data }) + } else { + return await request.get({ url: `/wms/productionscrap-request-main/page`, params }) + } +} + +// 查询线边原料报废主详情 +export const getProductionscrapRequestMain = async (id: number) => { + return await request.get({ url: `/wms/productionscrap-request-main/get?id=` + id }) +} + +// 新增线边原料报废主 +export const createProductionscrapRequestMain = async (data: ProductionscrapRequestMainVO) => { + return await request.post({ url: `/wms/productionscrap-request-main/create`, data }) +} + +// 修改线边原料报废主 +export const updateProductionscrapRequestMain = async (data: ProductionscrapRequestMainVO) => { + return await request.put({ url: `/wms/productionscrap-request-main/update`, data }) +} + +// 删除线边原料报废主 +export const deleteProductionscrapRequestMain = async (id: number) => { + return await request.delete({ url: `/wms/productionscrap-request-main/delete?id=` + id }) +} + +// 导出线边原料报废主 Excel +export const exportProductionscrapRequestMain = async (params) => { + return await request.download({ url: `/wms/productionscrap-request-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productionscrap-request-main/get-import-template' }) +} + +// 关闭 +export const close = (id) => { + return request.put({ url: '/wms/productionscrap-request-main/close?id=' + id }) +} + +// 重新添加 +export const reAdd = (id) => { + return request.put({ url: '/wms/productionscrap-request-main/reAdd?id=' + id }) +} + +// 提交审批 +export const submit = (id) => { + return request.put({ url: '/wms/productionscrap-request-main/submit?id=' + id }) +} + +// 驳回 +export const refused = (id) => { + return request.put({ url: '/wms/productionscrap-request-main/refused?id=' + id }) +} + +// 审批通过 +export const agree = (id) => { + return request.put({ url: '/wms/productionscrap-request-main/agree?id=' + id }) +} + +// 处理 +export const handle = (id) => { + return request.put({ url: '/wms/productionscrap-request-main/handle?id=' + id }) +} \ No newline at end of file diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue new file mode 100644 index 000000000..ffea787c7 --- /dev/null +++ b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue @@ -0,0 +1,179 @@ + + + diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts new file mode 100644 index 000000000..5675cd6f0 --- /dev/null +++ b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts @@ -0,0 +1,685 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' + +/** + * @returns {Array} 生产退料记录主表 + */ +export const ProductionreturnRecordMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + isSearch: true + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '执行时间', + field: 'executeTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '生效日期', + field: 'activeDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: true, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isDetail: true, + isForm: false, + isTable: false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + { + label: '最后更新者', + field: 'updater', + isDetail: true, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: false, + 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' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toAreaTypes: [ + { required: true, message: '请选择到库区类型范围', trigger: 'change' } + ], + outTransaction: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransaction: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + executeTime: [ + { required: true, message: '请输入执行时间', trigger: 'change' } + ], + activeDate: [ + { required: true, message: '请输入生效日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请输入是否可用', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + interfaceType: [ + { required: true, message: '请选择接口类型', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 生产退料记录子表 + */ +export const ProductionreturnRecordDetail = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '工位代码', + field: 'workStationCode', + 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', + hiddenInMain: true, + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + hiddenInMain: true, + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + form: { + component: 'InputNumber', + } + }, + { + label: '从批次', + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '到批次', + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '从包装号', + field: 'fromPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '到包装号', + field: 'toPackingNumber', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位组代码', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '到库位组代码', + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '从库区代码', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '到库区代码', + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + }, + +])) + +//表单校验 +export const ProductionreturnRecordDetailRules = reactive({ + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + frompackingNumber: [ + { required: true, message: '请选择从包装号', trigger: 'change' } + ], + frombatch: [ + { required: true, message: '请输入从批次', trigger: 'change' } + ], + 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: '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' } + ], +}) diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue new file mode 100644 index 000000000..0b9c057de --- /dev/null +++ b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue @@ -0,0 +1,798 @@ + + + diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts new file mode 100644 index 000000000..7f9576a6e --- /dev/null +++ b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts @@ -0,0 +1,1405 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' + +import * as WorkshopApi from '@/api/wms/workshop' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' + +import * as ProductionlineApi from '@/api/wms/productionline' +import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' + +import * as WorkstationApi from '@/api/wms/workstation' +import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' + +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +import * as ItempackagingApi from '@/api/wms/itempackage' +import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' + +import * as SupplieritemApi from '@/api/wms/supplieritem' +import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' + +import { useUserStore } from '@/store/modules/user' +import { TableColumn } from '@/types/table' + +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'MaterialReturnRequest' +} + const data = await getRequestsettingApi.getRequestsettingPage(queryParams) + const requestsettingData =data?.list[0]||{} + + //console.log(34, requestsettingData) + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + // id 转str 否则form回显匹配不到 + userDept.id = userDept.id.toString() + const userDeptArray:any = [userDept] + +/** + * @returns {Array} 生产退料申请主表 + */ +export const ProductionscrapRequestMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '车间', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择车间代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + }, + }, + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'workshopCode', + value: 'workshopCode', + message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示 + isMainValue: true + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'workshopCode', + value: 'workshopCode', + message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示 + isMainValue: true + }] + }, + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isSearch: true, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false, + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false, + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isForm:false, + table: { + width: 150 + }, + isTable: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id == cellValue)?.name + }, + form: { + value: userDept.id, + component: 'Select', + api: () => userDeptArray, + componentProps: { + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } + } + } + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm:false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoCommit, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true, + } + } + }, + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + 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: false, + 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: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: true, + isForm: false + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' + }, + isTable: false, + } +])) + +//表单校验 +export const ProductionscrapRequestMainRules = reactive({ + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', 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' } + ], + workshopCode: [ + { required: true, message: '请选择车间', trigger: 'change' } + ], + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], +}) + +/** + * @returns {Array} 生产退料申请子表 + */ +export const ProductionscrapRequestDetail = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'workshopCode', + value: 'workshopCode', + message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示 + isMainValue: true + }] + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'workshopCode', + value: 'workshopCode', + message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示 + isMainValue: true + }] + }, + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工位信息', // 查询弹窗标题 + searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'workshopCode', + value: 'workshopCode', + message: '请选择车间信息!', + isMainValue: true + },{ + key: 'productionLineCode', + value: 'productionLineCode', + message: '请选择生产线信息!', + isMainValue: true + }], + + + } + }, + tableForm:{ + multiple:true, + disabled:true, + // isInpuFocusShow: true, + searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工位信息', // 查询弹窗标题 + searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'workshopCode', + value: 'workshopCode', + message: '请选择车间信息!', + isMainValue: true + },{ + key: 'productionLineCode', + value: 'productionLineCode', + message: '请选择生产线信息!', + isMainValue: true + }], + verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法 + isShowTableFormSearch: true, + isRepeat: true,//是否可以重复添加该条数据 + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + }, + { + label: '原料库位', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + }, + isDetail:false, + isTable:false, + isTableForm: true, + isForm: false, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法 + searchCondition:[ + { + key: 'locationCode', + value: 'fromLocationCode', + message: '请填写原料库位!', + isMainValue: true + }, + { + key: 'inventoryStatus', + value: 'OK', + isMainValue: false + }] + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法 + searchCondition:[ + { + key: 'locationCode', + value: 'fromLocationCode', + message: '请填写原料库位!', + isMainValue: true + }, + { + key: 'inventoryStatus', + value: 'OK', + isMainValue: false + },{ + key: 'businessType', + value: 'ReturnToStore', // 合格退料 + isMainValue: false + }] + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + 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: 120 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + isTableForm: false, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源库位', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '从货主', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false, + }, + { + label: '到货主', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTableForm: false, + isForm: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + isSearch: true, + table: { + width: 120 + }, + isTable:true, + isTableForm: true, + tableForm: { + enterSearch:true, + isInpuFocusShow: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装规格', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'itemCode', + value: 'itemCode', + message: '请先选择物料代码!', + isMainValue: true + }], + verificationParams: [{ + key: 'packUnit', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装规格', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'itemCode', + value: 'itemCode', + message: '请先选择物料代码!', // 当前置条件为空时 弹出信息提示 + isMainValue: true + }] + } + } + }, + { + label: '标包数量', + field: 'packQty', + sort: 'custom', + table: { + width: 120 + }, + isTable:true, + isTableForm: true, + tableForm:{ + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + isTableForm: false, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable:false, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + isTableForm: false, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 250, + fixed: 'right' + }, + isTableForm:false, + } +])) + +//表单校验 +export const ProductionscrapRequestDetailRules = reactive({ + workStationCode: [ + { required: true, message: '请选择工位代码', trigger: 'change' } + ], + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + itemCode: [ + { required: true, message: '请输入物料代码', trigger: 'blur' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: 'blur' } + ] +}) + +/** + * @returns {Array} 生产退料申请子表创建标签 + */ +export const ProductionscrapRequestDetailLabel = useCrudSchemas(reactive([ + { + label: '标签生产线代码', + field: 'productionLineCodePackage', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + } + }, + { + label: '标签供应商代码', + field: 'supplierItemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + enterSearch:true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'supplierCode', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'itemCode', + value: 'itemCode', + message: '请填写物料代码!', + isMainValue: true + }] + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + 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: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, +])) + +//表单校验 +export const ProductionscrapRequestDetailLabelRules = reactive({ + supplierItemCode: [ + { required: true, message: '请选择供应商', trigger: 'change' } + ], + productionLineCodePackage: [ + { required: true, message: '请选择生产线', trigger: 'change' } + ] +}) + + +export const SupplierdeliverRequestPackage = useCrudSchemas(reactive([ + { + label: '包装号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + width: 180, + fixed: 'left' + }, + }, +{ + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150, + }, + }, +{ + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + table: { + width: 150, + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150, + }, + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'SelectV2' + }, + table: { + width: 150, + }, + }, + +])) + diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts index db236e918..99db532f3 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts @@ -989,7 +989,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive