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

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

@ -27,9 +27,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
// 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<CrudSchema[]>([
field: 'productName',
sort: 'custom',
isSearch: true,
table: {
width: 200,
fixed: 'left'
},
isForm: false
},
{
@ -75,13 +79,17 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
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<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: '计划数量',
field: 'planCount',
@ -102,6 +142,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 120
}
},
{
@ -109,40 +152,42 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
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<CrudSchema[]>([
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
@ -181,6 +229,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
@ -196,14 +247,28 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
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<CrudSchema[]>([
sort: 'custom',
isTable: false
},
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '操作',
field: 'action',

Loading…
Cancel
Save