Browse Source

1、订单月计划导入

master_hella_20240701
bjang03 8 months ago
parent
commit
99c9f3dc12
  1. 5
      src/api/mes/ordermonthplan/index.ts
  2. 45
      src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts
  3. 116
      src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts

5
src/api/mes/ordermonthplan/index.ts

@ -108,8 +108,3 @@ export const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
export const deleteMesOrderMonthSub = async (id: number) => { export const deleteMesOrderMonthSub = async (id: number) => {
return await request.delete({ url: `/plan/mes-order-month-sub/delete?id=` + id }) 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 })
}

45
src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts

@ -8,6 +8,14 @@ export const MesOrderMonthMainRules = reactive({
planType: [required], planType: [required],
factoryCode: [required] factoryCode: [required]
}) })
export const FactoryList = useCrudSchemas(reactive<CrudSchema[]>([{
label: '工厂编码',
field: 'id'
},
{
label: '工厂名称',
field: 'name'
}]))
export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -26,7 +34,25 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '工厂编码', label: '工厂编码',
field: 'factoryCode', field: 'factoryCode',
sort: 'custom', 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: '工厂名称', label: '工厂名称',
@ -51,6 +77,13 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isTable: false isTable: false
}, },
{
label: '创建者用户名',
field: 'creator',
sort: 'custom',
isSearch: true,
isForm: false
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -70,13 +103,6 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isForm: false isForm: false
}, },
{
label: '创建者用户名',
field: 'creator',
sort: 'custom',
isSearch: true,
isForm: false
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
@ -90,5 +116,4 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
export const TabsList = [{ export const TabsList = [{
label: "子计划", label: "子计划",
prop: 'mesOrderMonthSub', prop: 'mesOrderMonthSub',
} }]
]

116
src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts

@ -27,9 +27,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '产品编码', // 输入框占位文本 searchListPlaceholder: '请选择产品', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '产品信息', // 查询弹窗标题 searchTitle: '请选择产品', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
isHideFilterButton:true, isHideFilterButton:true,
@ -55,6 +55,10 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
field: 'productName', field: 'productName',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 200,
fixed: 'left'
},
isForm: false isForm: false
}, },
{ {
@ -75,13 +79,17 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inStoreCode', field: 'inStoreCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 140,
fixed: 'left'
},
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择', // 输入框占位文本 searchListPlaceholder: '请选择仓库', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库编码', // 查询弹窗标题 searchTitle: '请选择仓库', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WorehouseApi.getWarehousePage, // 查询弹窗所需分页方法 searchPage: WorehouseApi.getWarehousePage, // 查询弹窗所需分页方法
isHideFilterButton:true, isHideFilterButton:true,
@ -94,6 +102,38 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
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: '计划数量', label: '计划数量',
field: 'planCount', field: 'planCount',
@ -102,6 +142,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
},
table: {
width: 120
} }
}, },
{ {
@ -109,40 +152,42 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
field: 'finishCount', field: 'finishCount',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false isForm: false,
table: {
width: 120
}
}, },
{ {
label: '合格数量', label: '合格数量',
field: 'qualifiedCount', field: 'qualifiedCount',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false isForm: false,
table: {
width: 120
}
}, },
{ {
label: '不合格数量', label: '不合格数量',
field: 'unqualifiedCount', field: 'unqualifiedCount',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false isForm: false,
}, table: {
{ width: 120
label: '是否回冲', }
field: 'flagBackwash',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '产品批次号',
field: 'productBatchcode',
sort: 'custom',
isSearch: true
}, { }, {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isSearch: true, isSearch: true,
table: {
width: 180
},
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -162,6 +207,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
table: {
width: 180
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -181,6 +229,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
table: {
width: 180
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -196,14 +247,28 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
field: 'realStart', field: 'realStart',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
}, },
{ {
label: '实际完工日期', label: '实际完工日期',
field: 'realFinish', field: 'realFinish',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
}, },
{ {
label: '备注', label: '备注',
@ -211,13 +276,6 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isTable: false isTable: false
}, },
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
isForm: false
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

Loading…
Cancel
Save