From 99c9f3dc121834b7f529098704bcb35ae5703005 Mon Sep 17 00:00:00 2001 From: bjang03 Date: Tue, 9 Apr 2024 11:52:03 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=AE=A2=E5=8D=95=E6=9C=88=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/ordermonthplan/index.ts | 5 - .../ordermonthplan/mesOrderMonthMain.data.ts | 45 +++++-- .../ordermonthplan/mesOrderMonthSub.data.ts | 116 +++++++++++++----- 3 files changed, 122 insertions(+), 44 deletions(-) diff --git a/src/api/mes/ordermonthplan/index.ts b/src/api/mes/ordermonthplan/index.ts index ba1c7eb15..daf0c42ea 100644 --- a/src/api/mes/ordermonthplan/index.ts +++ b/src/api/mes/ordermonthplan/index.ts @@ -108,8 +108,3 @@ export const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => { export const deleteMesOrderMonthSub = async (id: number) => { return await request.delete({ url: `/plan/mes-order-month-sub/delete?id=` + id }) } - -// 导出订单月计划子 Excel -export const exportMesOrderMonthSub = async (params) => { - return await request.download({ url: `/plan/mes-order-month-sub/export-excel`, params }) -} diff --git a/src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts b/src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts index 62cdd8d45..422b79c07 100644 --- a/src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts +++ b/src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts @@ -8,6 +8,14 @@ export const MesOrderMonthMainRules = reactive({ planType: [required], factoryCode: [required] }) +export const FactoryList = useCrudSchemas(reactive([{ + label: '工厂编码', + field: 'id' +}, + { + label: '工厂名称', + field: 'name' + }])) export const MesOrderMonthMain = useCrudSchemas(reactive([ @@ -26,7 +34,25 @@ export const MesOrderMonthMain = useCrudSchemas(reactive([ label: '工厂编码', field: 'factoryCode', sort: 'custom', - isTable: false + isTable: false, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择工厂', // 输入框占位文本 + // searchField: 'id', // 查询弹窗赋值字段 + // searchTitle: '请选择工厂', // 查询弹窗标题 + // searchAllSchemas: FactoryList.allSchemas, // 查询弹窗所需类 + // searchPage: TenantApi.getTenantPage, // 查询弹窗所需分页方法 + // isHideFilterButton: true, + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // } + // ] + // } + // } }, { label: '工厂名称', @@ -51,6 +77,13 @@ export const MesOrderMonthMain = useCrudSchemas(reactive([ sort: 'custom', isTable: false }, + { + label: '创建者用户名', + field: 'creator', + sort: 'custom', + isSearch: true, + isForm: false + }, { label: '创建时间', field: 'createTime', @@ -70,13 +103,6 @@ export const MesOrderMonthMain = useCrudSchemas(reactive([ }, isForm: false }, - { - label: '创建者用户名', - field: 'creator', - sort: 'custom', - isSearch: true, - isForm: false - }, { label: '操作', field: 'action', @@ -90,5 +116,4 @@ export const MesOrderMonthMain = useCrudSchemas(reactive([ export const TabsList = [{ label: "子计划", prop: 'mesOrderMonthSub', -} -] +}] diff --git a/src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts b/src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts index 7e98714aa..176082762 100644 --- a/src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts +++ b/src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts @@ -27,9 +27,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '产品编码', // 输入框占位文本 + searchListPlaceholder: '请选择产品', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '产品信息', // 查询弹窗标题 + searchTitle: '请选择产品', // 查询弹窗标题 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 isHideFilterButton:true, @@ -55,6 +55,10 @@ export const MesOrderMonthSub = useCrudSchemas(reactive([ field: 'productName', sort: 'custom', isSearch: true, + table: { + width: 200, + fixed: 'left' + }, isForm: false }, { @@ -75,13 +79,17 @@ export const MesOrderMonthSub = useCrudSchemas(reactive([ field: 'inStoreCode', sort: 'custom', isSearch: true, + table: { + width: 140, + fixed: 'left' + }, form: { // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择', // 输入框占位文本 + searchListPlaceholder: '请选择仓库', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '仓库编码', // 查询弹窗标题 + searchTitle: '请选择仓库', // 查询弹窗标题 searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 searchPage: WorehouseApi.getWarehousePage, // 查询弹窗所需分页方法 isHideFilterButton:true, @@ -94,6 +102,38 @@ export const MesOrderMonthSub = useCrudSchemas(reactive([ } } }, + { + label: '产品批次号', + field: 'productBatchcode', + sort: 'custom', + isSearch: true, + table: { + width: 120, + fixed: 'left' + }, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 100, + fixed: 'left' + }, + }, + { + label: '是否回冲', + field: 'flagBackwash', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 120, + fixed: 'left' + }, + }, { label: '计划数量', field: 'planCount', @@ -102,6 +142,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive([ form: { component: 'InputNumber', value: 0 + }, + table: { + width: 120 } }, { @@ -109,40 +152,42 @@ export const MesOrderMonthSub = useCrudSchemas(reactive([ field: 'finishCount', sort: 'custom', isSearch: true, - isForm: false + isForm: false, + table: { + width: 120 + } }, { label: '合格数量', field: 'qualifiedCount', sort: 'custom', isSearch: true, - isForm: false + isForm: false, + table: { + width: 120 + } }, { label: '不合格数量', field: 'unqualifiedCount', sort: 'custom', isSearch: true, - isForm: false - }, - { - label: '是否回冲', - field: 'flagBackwash', - sort: 'custom', - isSearch: true, - isForm: false - }, - { - label: '产品批次号', - field: 'productBatchcode', - sort: 'custom', - isSearch: true + isForm: false, + table: { + width: 120 + } }, { label: '创建时间', field: 'createTime', sort: 'custom', formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, isSearch: true, + table: { + width: 180 + }, search: { component: 'DatePicker', componentProps: { @@ -162,6 +207,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive([ detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, + table: { + width: 180 + }, form: { component: 'DatePicker', componentProps: { @@ -181,6 +229,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive([ detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, + table: { + width: 180 + }, form: { component: 'DatePicker', componentProps: { @@ -196,14 +247,28 @@ export const MesOrderMonthSub = useCrudSchemas(reactive([ field: 'realStart', sort: 'custom', isSearch: true, - isForm: false + isForm: false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + } }, { label: '实际完工日期', field: 'realFinish', sort: 'custom', isSearch: true, - isForm: false + isForm: false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + } }, { label: '备注', @@ -211,13 +276,6 @@ export const MesOrderMonthSub = useCrudSchemas(reactive([ sort: 'custom', isTable: false }, - { - label: '状态', - field: 'status', - sort: 'custom', - isSearch: true, - isForm: false - }, { label: '操作', field: 'action',