diff --git a/src/api/wms/productionreturnRequestDetailNo/index.ts b/src/api/wms/productionreturnRequestDetailNo/index.ts new file mode 100644 index 000000000..66dd5921d --- /dev/null +++ b/src/api/wms/productionreturnRequestDetailNo/index.ts @@ -0,0 +1,67 @@ +import request from '@/config/axios' + +export interface ProductionreturnRequestDetailVO { + productionLineCode: string + workStationCode: string + inventoryStatus: string + fromOwnerCode: string + packingNumber: string + containerNumber: string + batch: string + fromLocationCode: string + number: string + itemCode: string + remark: string + createTime: Date + creator: string + itemName: string + itemDesc1: string + itemDesc2: string + projectCode: string + qty: number + uom: string + updateTime: Date + updater: string + toOwnerCode: string +} + +// 查询生产退料申请子列表 +export const getProductionreturnRequestDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionreturn-request-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productionreturn-request-detail/page`, params }) + } +} + +// 查询生产退料申请子详情 +export const getProductionreturnRequestDetail = async (id: number) => { + return await request.get({ url: `/wms/productionreturn-request-detail/get?id=` + id }) +} + +// 新增生产退料申请子 +export const createProductionreturnRequestDetail = async (data: ProductionreturnRequestDetailVO) => { + return await request.post({ url: `/wms/productionreturn-request-detail/create`, data }) +} + +// 修改生产退料申请子 +export const updateProductionreturnRequestDetail = async (data: ProductionreturnRequestDetailVO) => { + return await request.put({ url: `/wms/productionreturn-request-detail/update`, data }) +} + +// 删除生产退料申请子 +export const deleteProductionreturnRequestDetail = async (id: number) => { + return await request.delete({ url: `/wms/productionreturn-request-detail/delete?id=` + id }) +} + +// 导出生产退料申请子 Excel +export const exportProductionreturnRequestDetail = async (params) => { + return await request.download({ url: `/wms/productionreturn-request-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productionreturn-request-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/productionreturnRequestMain/index.ts b/src/api/wms/productionreturnRequestMain/index.ts index 634910b28..3c93fec0a 100644 --- a/src/api/wms/productionreturnRequestMain/index.ts +++ b/src/api/wms/productionreturnRequestMain/index.ts @@ -58,10 +58,45 @@ export const deleteProductionreturnRequestMain = async (id: number) => { // 导出生产退料申请主 Excel export const exportProductionreturnRequestMain = async (params) => { - return await request.download({ url: `/wms/productionreturn-request-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/productionreturn-request-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productionreturn-request-main/export-excel`, params }) + } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/productionreturn-request-main/get-import-template' }) +} + +// 关闭 +export const close = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/close?id=' + id }) +} + +// 重新添加 +export const reAdd = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/reAdd?id=' + id }) +} + +// 提交审批 +export const submit = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/submit?id=' + id }) +} + +// 驳回 +export const refused = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/refused?id=' + id }) +} + +// 审批通过 +export const agree = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/agree?id=' + id }) +} + +// 处理 +export const handle = (id) => { + return request.put({ url: '/wms/productionreturn-request-main/handle?id=' + id }) } \ No newline at end of file diff --git a/src/api/wms/productionreturnRequestMainNo/index.ts b/src/api/wms/productionreturnRequestMainNo/index.ts new file mode 100644 index 000000000..634910b28 --- /dev/null +++ b/src/api/wms/productionreturnRequestMainNo/index.ts @@ -0,0 +1,67 @@ +import request from '@/config/axios' + +export interface ProductionreturnRequestMainVO { + workshopCode: string + fromWarehouseCode: string + fromLocationTypes: string + fromAreaCodes: string + number: string + businessType: string + remark: string + createTime: Date + creator: string + requestTime: Date + dueTime: Date + departmentCode: string + status: string + updateTime: Date + updater: string + toWarehouseCode: string + toLocationTypes: string + toAreaCodes: string + autoCommit: string + autoAgree: string + autoExecute: string + directCreateRecord: string +} + +// 查询生产退料申请主列表 +export const getProductionreturnRequestMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productionreturn-request-main/senior', data }) + } else { + return await request.get({ url: `/wms/productionreturn-request-main/page`, params }) + } +} + +// 查询生产退料申请主详情 +export const getProductionreturnRequestMain = async (id: number) => { + return await request.get({ url: `/wms/productionreturn-request-main/get?id=` + id }) +} + +// 新增生产退料申请主 +export const createProductionreturnRequestMain = async (data: ProductionreturnRequestMainVO) => { + return await request.post({ url: `/wms/productionreturn-request-main/create`, data }) +} + +// 修改生产退料申请主 +export const updateProductionreturnRequestMain = async (data: ProductionreturnRequestMainVO) => { + return await request.put({ url: `/wms/productionreturn-request-main/update`, data }) +} + +// 删除生产退料申请主 +export const deleteProductionreturnRequestMain = async (id: number) => { + return await request.delete({ url: `/wms/productionreturn-request-main/delete?id=` + id }) +} + +// 导出生产退料申请主 Excel +export const exportProductionreturnRequestMain = async (params) => { + return await request.download({ url: `/wms/productionreturn-request-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productionreturn-request-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts b/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts index 1da0eb2b1..9290a46a0 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts @@ -14,7 +14,6 @@ export const Workshop = useCrudSchemas(reactive([ field: 'code', sort: 'custom', table: { - width: 150, fixed: 'left' }, isSearch: true @@ -23,9 +22,6 @@ export const Workshop = useCrudSchemas(reactive([ label: '名称', field: 'name', sort: 'custom', - table: { - width: 150 - }, isSearch: true }, { @@ -36,9 +32,6 @@ export const Workshop = useCrudSchemas(reactive([ isSearch: true, isTable: true, sort: 'custom', - table: { - width: 150 - }, }, { label: '是否可用', @@ -48,9 +41,6 @@ export const Workshop = useCrudSchemas(reactive([ isSearch: true, isTable: true, sort: 'custom', - table: { - width: 150 - }, form: { component: 'Switch', value: 'TRUE', @@ -69,9 +59,6 @@ export const Workshop = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss' }, sort: 'custom', - table: { - width: 180 - }, form: { component: 'DatePicker', componentProps: { @@ -91,9 +78,6 @@ export const Workshop = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss' }, sort: 'custom', - table: { - width: 180 - }, form: { component: 'DatePicker', componentProps: { @@ -112,9 +96,6 @@ export const Workshop = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss' }, sort: 'custom', - table: { - width: 180 - }, form: { component: 'DatePicker', componentProps: { @@ -131,17 +112,11 @@ export const Workshop = useCrudSchemas(reactive([ label: '备注', field: 'remark', sort: 'custom', - table: { - width: 150 - }, }, { label: '创建者', field: 'creator', sort: 'custom', - table: { - width: 150 - }, isForm: false, isTable: false }, @@ -151,7 +126,6 @@ export const Workshop = useCrudSchemas(reactive([ isDetail: false, isForm: false , table: { - width: 150, fixed: 'right' } } diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 93567545d..c60dd2d38 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -67,13 +67,9 @@ :apiUpdate="ProductionreturnRequestDetailApi.updateProductionreturnRequestDetail" :apiPage="ProductionreturnRequestDetailApi.getProductionreturnRequestDetailPage" :apiDelete="ProductionreturnRequestDetailApi.deleteProductionreturnRequestDetail" - :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" /> - - diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 77d039a7a..77beca909 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -59,36 +59,6 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive } }, }, - { - label: '从仓库代码', - field: 'fromWarehouseCode', - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, - { - label: '从库位类型范围', - field: 'fromLocationTypes', - dictType: DICT_TYPE.LOCATION_TYPE, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, - { - label: '从库区代码范围', - field: 'fromAreaCodes', - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, { label: '单据号', field: 'number', @@ -101,53 +71,22 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive isSearch: true, }, { - label: '业务类型', - field: 'businessType', - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - }, - { - label: '备注', - field: 'remark', + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, 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', + value: '1', componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + disabled: true } - }, - isForm: false - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - isForm: false + } }, { label: '申请时间', @@ -193,23 +132,21 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive }, }, { - label: '部门', - field: 'departmentCode', + label: '从库位类型范围', + field: 'fromLocationTypes', + dictType: DICT_TYPE.LOCATION_TYPE, + dictClass: 'string', + isTable: true, sort: 'custom', table: { width: 150 }, - form: { - value: userDept.name, - componentProps: { - disabled: true - } - } + isForm: false, }, { - label: '状态', - field: 'status', - dictType: DICT_TYPE.REQUEST_STATUS, + label: '到库位类型范围', + field: 'toLocationTypes', + dictType: DICT_TYPE.LOCATION_TYPE, dictClass: 'string', isSearch: true, isTable: true, @@ -217,43 +154,34 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive table: { width: 150 }, - form: { - value: '1', - componentProps: { - disabled: true - } - } + isForm: false, }, { - label: '最后更新时间', - field: 'updateTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, + label: '从库区代码范围', + field: 'fromAreaCodes', sort: 'custom', table: { - width: 180 + width: 150 }, - form: { - component: 'DatePicker', - componentProps: { - style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } + isForm: false, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 }, - isForm: false + isForm: false, }, { - label: '最后更新者', - field: 'updater', + label: '从仓库代码', + field: 'fromWarehouseCode', sort: 'custom', table: { width: 150 }, - isForm: false + isForm: false, }, { label: '到仓库代码', @@ -265,27 +193,37 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive isForm: false, }, { - label: '到库位类型范围', - field: 'toLocationTypes', - dictType: DICT_TYPE.LOCATION_TYPE, - dictClass: 'string', - isSearch: true, - isTable: true, + label: '备注', + field: 'remark', sort: 'custom', table: { width: 150 }, - isForm: false, + isTable: false }, { - label: '到库区代码范围', - field: 'toAreaCodes', + label: '业务类型', + field: 'businessType', sort: 'custom', table: { width: 150 }, isForm: false, }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: userDept.name, + componentProps: { + disabled: true + } + } + }, { label: '自动提交', field: 'autoCommit', @@ -366,6 +304,68 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive } } }, + { + label: '创建时间', + field: 'createTime', + 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', + } + }, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '最后更新时间', + field: 'updateTime', + 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', + } + }, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, { label: '操作', field: 'action', @@ -436,6 +436,10 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts new file mode 100644 index 000000000..77d039a7a --- /dev/null +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts @@ -0,0 +1,804 @@ +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' + +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'MaterialReturnRequest' +} + 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 + +/** + * @returns {Array} 生产退料申请主表 + */ +export const ProductionreturnRequestMain = useCrudSchemas(reactive([ + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择车间代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '从库位类型范围', + field: 'fromLocationTypes', + dictType: DICT_TYPE.LOCATION_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isForm: false, + isSearch: true, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + 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: { + style: {width:'100%'}, + 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: { + 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 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: userDept.name, + componentProps: { + disabled: true + } + } + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + 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: { + style: {width:'100%'}, + 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: 'toLocationTypes', + dictType: DICT_TYPE.LOCATION_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, + 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, + 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, + 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', + isTable: true, + 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 ProductionreturnRequestMainRules = reactive({ + // fromWarehouseCode: [ + // { required: true, message: '请输入从仓库代码', trigger: 'blur' } + // ], + // fromLocationTypes: [ + // { required: true, message: '请选择从库位类型范围', trigger: 'change' } + // ], + // toWarehouseCode: [ + // { required: true, message: '请输入到仓库代码', trigger: 'blur' } + // ], + // toLocationTypes: [ + // { required: true, message: '请选择到库位类型范围', trigger: 'change' } + // ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], + // businessType: [ + // { required: true, message: '请输入业务类型', trigger: 'blur' } + // ], +}) + +/** + * @returns {Array} 生产退料申请子表 + */ +export const ProductionreturnRequestDetail = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + }, + { + 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 + }] + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工位信息', // 查询弹窗标题 + searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select' + } + }, + { + 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: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装号', // 输入框占位文本 + searchField: 'packingNumber', // 查询弹窗赋值字段 + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法 + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择包装号', // 输入框占位文本 + searchField: 'packingNumber', // 查询弹窗赋值字段 + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法 + }, + }, + { + label: '器具号', + field: 'containerNumber', + 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: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物品代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + 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: { + style: {width:'100%'}, + 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: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select' + } + }, + { + label: '最后更新时间', + field: 'updateTime', + 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', + } + }, + 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 ProductionreturnRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + // fromLocationCode: [ + // { required: true, message: '请输入从库位代码', trigger: 'blur' } + // ], + itemCode: [ + { required: true, message: '请输入物品代码', trigger: 'blur' } + ], +}) \ No newline at end of file