Browse Source

模具信息管理时间查询更新

master_hella_20240701
gaojs 7 months ago
parent
commit
4ecaa5e95b
  1. 97
      src/views/mes/pattern/pattern.data.ts

97
src/views/mes/pattern/pattern.data.ts

@ -1,9 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {PatternType} from "@/views/mes/patternType/patternType.data";
import * as PatternTypeApi from "@/api/mes/patternType";
import {validateInteger} from '@/utils/validator'
// 表单校验
export const PatternRules = reactive({
concurrencyStamp: [required],
code: [required],
name: [required],
partternName: [required],
})
export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([
@ -112,6 +117,23 @@ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([
field: 'partternName',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '模具类型', // 查询弹窗标题
searchAllSchemas: PatternType.allSchemas, // 查询弹窗所需类
searchField: 'name', // 查询弹窗赋值字段
searchPage: PatternTypeApi.getPatternTypePage, // 查询弹窗所需分页方法
multiple:true,
searchCondition: [{
key: 'status',
value: '1',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '产品编码',
@ -124,12 +146,47 @@ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([
field: 'dateUseStart',
sort: 'custom',
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
formatter: dateFormatter,
isForm: true,
form: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '停用时间',
field: 'dateUseStop',
sort: 'custom',
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
formatter: dateFormatter,
isForm: true,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '模具来源',
@ -148,18 +205,56 @@ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([
field: 'initCout',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
componentProps: {
min: 1
}
},
},
{
label: '有效期开始时间',
field: 'effectStart',
sort: 'custom',
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '有效期结束时间',
field: 'effectEnd',
sort: 'custom',
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '所属单位编码',

Loading…
Cancel
Save