diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index f674ce21b..58e3fdf2a 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -1,5 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import * as WorkMainApi from '@/api/wms/workMain' import * as WorkDetailApi from '@/api/wms/workDetail' import { WorkDetail, WorkMain } from '../workMain/workMain.data' @@ -38,12 +38,31 @@ export const ProductionMain = useCrudSchemas(reactive([ field: 'number', sort: 'custom', table: { - width: 150, + width: 170, fixed: 'left' }, isForm: false, isSearch: true, }, + { + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.PLAN_STATUS, + dictClass: 'string', + isTable: true, + table: { + width: 150 + }, + // form: { + // value: '1', + // componentProps: { + // disabled: true + // } + // }, + isForm:false, + isSearch: true, + }, { label: '顺序', field: 'displayOrder', @@ -161,20 +180,20 @@ export const ProductionMain = useCrudSchemas(reactive([ { label: '计划日期', field: 'planDate', - formatter: dateFormatter, + formatter: dateFormatter2, detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' + dateFormat: 'YYYY-MM-DD' }, sort: 'custom', table: { - width: 180 + width: 120 }, form: { component: 'DatePicker', componentProps: { style: {width: '100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'date', + dateFormat: 'YYYY-MM-DD', valueFormat: 'x', } }, @@ -245,55 +264,6 @@ export const ProductionMain = useCrudSchemas(reactive([ }, isTable: false, }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - isForm: 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: 'status', - sort: 'custom', - dictType: DICT_TYPE.PLAN_STATUS, - dictClass: 'string', - isTable: true, - table: { - width: 150 - }, - form: { - value: '1', - componentProps: { - disabled: true - } - }, - isSearch: true, - }, { label: '是否可用', field: 'available', @@ -374,6 +344,7 @@ export const ProductionMain = useCrudSchemas(reactive([ } } }, + // { // label: '开始时间', // field: 'beginTime', @@ -460,6 +431,37 @@ export const ProductionMain = useCrudSchemas(reactive([ // isTable: false, // isForm: false, // }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isForm: 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: 'updater',