Browse Source

BUG修改

hella_online_20240829
parent
commit
dddfaee650
  1. 1177
      src/views/qms/aql/aql.data.ts
  2. 333
      src/views/qms/counter/counter.data.ts
  3. 170
      src/views/qms/dynamicRule/dynamicRule.data.ts
  4. 68
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  5. 218
      src/views/qms/inspectionMethod/inspectionMethod.data.ts
  6. 61
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
  7. 81
      src/views/qms/inspectionRequest/inspectionRequestMain.data.ts
  8. 489
      src/views/qms/inspectionScheme/inspectionScheme.data.ts
  9. 253
      src/views/qms/inspectionTemplate/inspectionTemplate.data.ts
  10. 629
      src/views/qms/qualityNotice/qualityNoticeMain.data.ts
  11. 302
      src/views/qms/sampleCode/sampleCode.data.ts
  12. 265
      src/views/qms/samplingProcess/samplingProcess.data.ts
  13. 166
      src/views/qms/samplingScheme/samplingScheme.data.ts
  14. 152
      src/views/qms/selectedSet/selectedSet.data.ts

1177
src/views/qms/aql/aql.data.ts

File diff suppressed because it is too large

333
src/views/qms/counter/counter.data.ts

@ -13,147 +13,214 @@ export const CounterRules = reactive({
concurrencyStamp: [required] concurrencyStamp: [required]
}) })
export const Counter = useCrudSchemas(reactive<CrudSchema[]>([ export const Counter = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '物料编码', {
field: 'itemCode', label: '物料编码',
sort: 'custom', field: 'itemCode',
isSearch: true, sort: 'custom',
fixed: 'left', isSearch: true,
table: {
fixed: 'left', fixed: 'left',
width: 175 table: {
} fixed: 'left',
}, width: 175
{
label: '检验类型编码',
field: 'inspectionType',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.INSPECTION_TYPE,
table: {
width: 175
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
table: {
width: 175
}
},
{
label: '连续合格次数',
field: 'qualifiedTimes',
sort: 'custom',
isSearch: false,
table: {
width: 140
}
},
{
label: '最后合格批次',
field: 'lastQualifiedBatch',
sort: 'custom',
isSearch: false,
table: {
width: 140
}
},
{
label: '最后合格时间',
field: 'lastQualifiedTime',
sort: 'custom',
formatter: dateFormatter,
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')]
} }
}, },
form: { {
component: 'DatePicker', label: '检验类型编码',
componentProps: { field: 'inspectionType',
type: 'datetime', sort: 'custom',
valueFormat: 'x' isSearch: true,
dictType: DICT_TYPE.INSPECTION_TYPE,
table: {
width: 175
} }
}, },
table: { {
width: 175 label: '供应商编码',
} field: 'supplierCode',
}, sort: 'custom',
{ isSearch: true,
label: '连续不合格次数', table: {
field: 'unqualifiedTimes', width: 175
sort: 'custom', }
isSearch: false, },
form: { {
component: 'InputNumber', label: '连续合格次数',
value: 0 field: 'qualifiedTimes',
sort: 'custom',
isSearch: false,
table: {
width: 140
}
},
{
label: '最后合格批次',
field: 'lastQualifiedBatch',
sort: 'custom',
isSearch: false,
table: {
width: 140
}
},
{
label: '最后合格时间',
field: 'lastQualifiedTime',
sort: 'custom',
formatter: dateFormatter,
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 175
}
},
{
label: '连续不合格次数',
field: 'unqualifiedTimes',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 140
}
}, },
table: { {
width: 140 label: '最后不合格批次',
} field: 'lastUnqualifiedBatch',
}, sort: 'custom',
{ isSearch: false,
label: '最后不合格批次', form: {
field: 'lastUnqualifiedBatch', component: 'InputNumber',
sort: 'custom', value: 0
isSearch: false, },
form: { table: {
component: 'InputNumber', width: 175
value: 0 }
},
{
label: '最后不合格时间',
field: 'lastUnqualifiedTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 175
}
}, },
table: { {
width: 175 label: '下一检验阶段',
} field: 'nextStage',
}, sort: 'custom',
{ isSearch: false,
label: '最后不合格时间', table: {
field: 'lastUnqualifiedTime', width: 140
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
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')]
} }
}, },
form: { {
component: 'DatePicker', label: '创建时间',
componentProps: { field: 'createTime',
type: 'datetime', isForm: false,
valueFormat: 'x' table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
table: { {
width: 175 label: '创建者',
} field: 'creator',
}, table: {
{ width: 130
label: '下一检验阶段', },
field: 'nextStage', isForm: false,
sort: 'custom', isTable: true
isSearch: false, },
table: { {
width: 140 label: '最后更新时间',
} field: 'updateTime',
}, sort: 'custom',
// { isDetail: true,
// label: '操作', isForm: false,
// field: 'action', isTable: false,
// isForm: false, formatter: dateFormatter,
// table: { detail: {
// width: 150, dateFormat: 'YYYY-MM-DD HH:mm:ss'
// fixed: 'right' },
// } table: {
// } width: 180
])) },
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
])
)

170
src/views/qms/dynamicRule/dynamicRule.data.ts

@ -2,63 +2,129 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { string } from 'vue-types' import { string } from 'vue-types'
const trueFalse = [{ const trueFalse = [
label: '是', {
value: true label: '是',
}, { value: true
label: '否', },
value: false {
}] label: '否',
value: false
}
]
// 表单校验 // 表单校验
export const DynamicRuleRules = reactive({ export const DynamicRuleRules = reactive({
description: [ description: [required, { max: 1024, message: '不得超过1024个字符', trigger: 'blur' }]
required,
{ max: 1024, message: '不得超过1024个字符', trigger: 'blur' },
]
}) })
export const DynamicRule = useCrudSchemas(reactive<CrudSchema[]>([ export const DynamicRule = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '编码', {
field: 'code', label: '编码',
sort: 'custom', field: 'code',
isSearch: true, sort: 'custom',
isForm: false, isSearch: true,
fixed: 'left' isForm: false,
}, fixed: 'left'
{ },
label: '描述', {
field: 'description', label: '描述',
sort: 'custom', field: 'description',
isSearch: true sort: 'custom',
}, isSearch: true
{ },
label: '是否可用', {
field: 'available', label: '是否可用',
sort: 'custom', field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, sort: 'custom',
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictType: DICT_TYPE.TRUE_FALSE,
form: { dictClass: 'string', // 默认都是字符串类型其他暂不考虑
component: 'Switch', form: {
value: 'TRUE', component: 'Switch',
componentProps: { value: 'TRUE',
inactiveValue: 'FALSE', componentProps: {
activeValue: 'TRUE' inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
table: {
width: 110
} }
}, },
table: { {
width: 110 label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
}
} }
}, ])
{ )
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 330,
fixed: 'right'
},
}
]))

68
src/views/qms/inspectionJob/inspectionJobMain.data.ts

@ -438,13 +438,77 @@ export const InspectionJobMain = useCrudSchemas(
// } // }
// } // }
// }, // },
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
isDetail: false,
isForm: false, isForm: false,
isDetail: false,
table: { table: {
width: 300, width: 150,
fixed: 'right' fixed: 'right'
} }
} }

218
src/views/qms/inspectionMethod/inspectionMethod.data.ts

@ -3,99 +3,145 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const InspectionMethodRules = reactive({ export const InspectionMethodRules = reactive({
description: [required], description: [required]
}) })
export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionMethod = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '编码', {
field: 'code', label: '编码',
sort: 'custom', field: 'code',
isSearch: true, sort: 'custom',
isForm:false, isSearch: true,
table: { isForm: false,
fixed: 'left' table: {
} fixed: 'left'
}, }
{ },
label: '描述', {
field: 'description', label: '描述',
sort: 'custom', field: 'description',
}, sort: 'custom'
{ },
label: '版本', {
field: 'version', label: '版本',
sort: 'custom', field: 'version',
}, sort: 'custom'
{ },
label: '操作指导', {
field: 'operationGuidance', label: '操作指导',
sort: 'custom', field: 'operationGuidance',
}, sort: 'custom'
{
label: '文件',
field: 'videoAddress',
sort: 'custom',
isTable: false,
table: {
}, },
form: { {
component: 'UploadFile', label: '文件',
componentProps: { field: 'videoAddress',
upData:{ sort: 'custom',
tableName:'basicInspectionMethod', isTable: false,
tableId:'', table: {},
}, form: {
fileType:['doc', 'xls', 'ppt', 'txt'], component: 'UploadFile',
modelValue:[] componentProps: {
upData: {
tableName: 'basicInspectionMethod',
tableId: ''
},
fileType: ['doc', 'xls', 'ppt', 'txt'],
modelValue: []
}
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}, },
table: {
} width: 110
}, }
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
form: { {
component: 'DatePicker', label: '创建时间',
componentProps: { field: 'createTime',
style: {width: '100%'}, isForm: false,
type: 'datetime', table: {
dateFormat: 'YYYY-MM-DD HH:mm:ss', width: 180
valueFormat: 'x', },
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
}, {
{ label: '最后更新者',
label: '是否可用', field: 'updater',
field: 'available', isDetail: true,
sort: 'custom', isForm: false,
dictType: DICT_TYPE.TRUE_FALSE, isTable: false,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 table: {
form: { width: 150
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
} }
}, },
table: { {
width: 110 label: '操作',
} field: 'action',
}, isForm: false,
{ isDetail: false,
label: '操作', table: {
field: 'action', width: 150,
isForm: false, fixed: 'right'
table: { }
width: 150,
fixed: 'right'
} }
}, ])
])) )

61
src/views/qms/inspectionRecord/inspectionRecordMain.data.ts

@ -399,33 +399,74 @@ export const InspectionRecordMain = useCrudSchemas(
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', isForm: false,
table: {
width: 180
},
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, detail: {
search: { dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss', style: { width: '100%' },
type: 'daterange', type: 'datetime',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
} }
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
}, },
isForm: false, isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
table: { table: {
width: 175 width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
} }
}, },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
isDetail: false,
isForm: false, isForm: false,
isDetail: false,
table: { table: {
width: 200, width: 150,
fixed: 'right' fixed: 'right'
} }
} }

81
src/views/qms/inspectionRequest/inspectionRequestMain.data.ts

@ -388,14 +388,79 @@ export const InspectionMain = useCrudSchemas(
} }
}, },
{ {
label: '操作',       label: '创建时间',
field: 'action',       field: 'createTime',
isForm: false,       isForm: false,
table: {       table: {
width: 240,         width: 180
fixed: 'right'       },
}       formatter: dateFormatter,
}       detail: {
        dateFormat: 'YYYY-MM-DD HH:mm:ss'
      },
      form: {
        component: 'DatePicker',
        componentProps: {
          style: { width: '100%' },
          type: 'datetime',
          dateFormat: 'YYYY-MM-DD HH:mm:ss',
          valueFormat: 'x'
        }
      }
    },
    {
      label: '创建者',
      field: 'creator',
      table: {
        width: 130
      },
      isForm: false,
      isTable: true
    },
    {
      label: '最后更新时间',
      field: 'updateTime',
      sort: 'custom',
      isDetail: true,
      isForm: false,
      isTable: false,
      formatter: dateFormatter,
      detail: {
        dateFormat: 'YYYY-MM-DD HH:mm:ss'
      },
      table: {
        width: 180
      },
      form: {
        component: 'DatePicker',
        componentProps: {
          style: { width: '100%' },
          type: 'datetime',
          dateFormat: 'YYYY-MM-DD HH:mm:ss',
          valueFormat: 'x'
        }
      }
    },
    {
      label: '最后更新者',
      field: 'updater',
      isDetail: true,
      isForm: false,
      isTable: false,
      table: {
        width: 150
      }
    },
    {
      label: '操作',
      field: 'action',
      isForm: false,
      isDetail: false,
      table: {
        width: 150,
        fixed: 'right'
      }
    }
]) ])
) )

489
src/views/qms/inspectionScheme/inspectionScheme.data.ts

@ -4,241 +4,272 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const InspectionTemplateRules = reactive({ export const InspectionTemplateRules = reactive({
description: [ description: [{ required: true, message: '请填写描述', trigger: 'blur' }],
{ required: true, message: '请填写描述', trigger: 'blur' } version: [{ required: true, message: '请填写版本', trigger: 'blur' }],
], inspectionCode: [{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' }],
version: [ sequenceCode: [{ required: true, message: '请填写顺序号', trigger: 'blur' }],
{ required: true, message: '请填写版本', trigger: 'blur' } inspectionCharCode: [{ required: true, message: '请选择检验特性编码', trigger: 'blur' }],
], describe: [{ required: true, message: '请填写描述', trigger: 'blur' }],
inspectionCode: [ inspectionMethodCode: [{ required: true, message: '请选择检验方法编码', trigger: 'blur' }],
{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' } dynamicUpdateCode: [{ required: true, message: '请选择采样过程编码', trigger: 'blur' }],
], inspectionMethod: [{ required: true, message: '请选择动态修改规则编码', trigger: 'blur' }],
sequenceCode: [ isCanUpdate: [{ required: true, message: '请选择是否允许修改特征值', trigger: 'blur' }],
{ required: true, message: '请填写顺序号', trigger: 'blur' } isDestructionInspection: [{ required: true, message: '请选择是否破坏性检验', trigger: 'blur' }],
], resultEntryMethod: [{ required: true, message: '请选择结果录入方式', trigger: 'blur' }],
inspectionCharCode: [ featureType: [{ required: true, message: '请选择特征类型', trigger: 'blur' }],
{ required: true, message: '请选择检验特性编码', trigger: 'blur' } quantifyIsCapping: [{ required: true, message: '请选择是否设定上限', trigger: 'blur' }],
], quantifyIsLowlimit: [{ required: true, message: '请选择是否设定下限', trigger: 'blur' }],
describe: [ quantifyTarget: [{ required: true, message: '请输入目标值', trigger: 'blur' }],
{ required: true, message: '请填写描述', trigger: 'blur' } quantifyCapping: [{ required: true, message: '请输入上限值', trigger: 'blur' }],
], quantifyLowlimit: [{ required: true, message: '请输入下限值', trigger: 'blur' }],
inspectionMethodCode: [ quantifyquantifyUomLowlimit: [{ required: true, message: '请选择计量单位', trigger: 'blur' }],
{ required: true, message: '请选择检验方法编码', trigger: 'blur' } quantifyDecimal: [{ required: true, message: '请输入小数位', trigger: 'blur' }],
], quantifyQuantifyCode: [{ required: true, message: '请输入选择集编码', trigger: 'blur' }]
dynamicUpdateCode: [
{ required: true, message: '请选择采样过程编码', trigger: 'blur' }
],
inspectionMethod: [
{ required: true, message: '请选择动态修改规则编码', trigger: 'blur' }
],
isCanUpdate: [
{ required: true, message: '请选择是否允许修改特征值', trigger: 'blur' }
],
isDestructionInspection: [
{ required: true, message: '请选择是否破坏性检验', trigger: 'blur' }
],
resultEntryMethod: [
{ required: true, message: '请选择结果录入方式', trigger: 'blur' }
],
featureType: [
{ required: true, message: '请选择特征类型', trigger: 'blur' }
],
quantifyIsCapping: [
{ required: true, message: '请选择是否设定上限', trigger: 'blur' }
],
quantifyIsLowlimit: [
{ required: true, message: '请选择是否设定下限', trigger: 'blur' }
],
quantifyTarget: [
{ required: true, message: '请输入目标值', trigger: 'blur' }
],
quantifyCapping: [
{ required: true, message: '请输入上限值', trigger: 'blur' }
],
quantifyLowlimit: [
{ required: true, message: '请输入下限值', trigger: 'blur' }
],
quantifyquantifyUomLowlimit: [
{ required: true, message: '请选择计量单位', trigger: 'blur' }
],
quantifyDecimal: [
{ required: true, message: '请输入小数位', trigger: 'blur' }
],
quantifyQuantifyCode: [
{ required: true, message: '请输入选择集编码', trigger: 'blur' }
],
}) })
export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionSchemeMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '编码', {
field: 'code', label: '编码',
sort: 'custom', field: 'code',
table: { sort: 'custom',
width: 220, table: {
fixed: 'left' width: 220,
}, fixed: 'left'
isSearch: true, },
form: { isSearch: true,
componentProps: { form: {
disabled: true, componentProps: {
placeholder: '系统自动获取' disabled: true,
placeholder: '系统自动获取'
}
} }
} },
}, {
{ label: '物料名称',
label: '物料名称', field: 'itemName',
field: 'itemName', sort: 'custom',
sort: 'custom', table: {
table: { width: 200
width: 200 },
}, isSearch: true
isSearch: true, },
}, {
{ label: '物料编码',
label: '物料编码', field: 'itemCode',
field: 'itemCode', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 },
}, isSearch: true
isSearch: true, },
}, { {
label: '描述', label: '描述',
field: 'description', field: 'description',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, { },
label: '版本', {
field: 'version', label: '版本',
sort: 'custom', field: 'version',
table: { sort: 'custom',
width: 150 table: {
} width: 150
}, { }
label: '检验类型编码', },
field: 'inspectionType', {
dictType: DICT_TYPE.INSPECTION_TYPE, label: '检验类型编码',
dictClass: 'string', field: 'inspectionType',
sort: 'custom', dictType: DICT_TYPE.INSPECTION_TYPE,
table: { dictClass: 'string',
width: 175 sort: 'custom',
} table: {
}, { width: 175
label: '检验模板编码', }
field: 'programmeTemplateCode', },
sort: 'custom', {
table: { label: '检验模板编码',
width: 175 field: 'programmeTemplateCode',
} sort: 'custom',
}, { table: {
label: '拆分规则', width: 175
field: 'splitRule', }
sort: 'custom', },
dictType: DICT_TYPE.SPLIT_RULES, {
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 label: '拆分规则',
table: { field: 'splitRule',
width: 175 sort: 'custom',
}, dictType: DICT_TYPE.SPLIT_RULES,
}, { dictClass: 'string', // 默认都是字符串类型其他暂不考虑
label: 'aql', table: {
field: 'aql', width: 175
sort: 'custom', }
dictType: DICT_TYPE.BASIC_AQL, },
dictClass: 'string', {
table: { label: 'aql',
width: 150 field: 'aql',
} sort: 'custom',
}, { dictType: DICT_TYPE.BASIC_AQL,
label: '检验水平', dictClass: 'string',
field: 'inspectionLevel', table: {
sort: 'custom', width: 150
dictType: DICT_TYPE.INSPECTION_LEVEL, }
dictClass: 'string', },
table: { {
width: 150 label: '检验水平',
}, field: 'inspectionLevel',
isSearch: true, sort: 'custom',
}, dictType: DICT_TYPE.INSPECTION_LEVEL,
{ dictClass: 'string',
label: '每份样品量', table: {
field: 'samplePieceSize', width: 150
sort: 'custom', },
table: { isSearch: true
width: 140 },
} {
}, label: '每份样品量',
{ field: 'samplePieceSize',
label: '生效时间', sort: 'custom',
field: 'effectiveDate', table: {
sort: 'custom', width: 140
formatter: dateFormatter, }
isForm: false, },
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '生效时间',
}, field: 'effectiveDate',
form: { sort: 'custom',
component: 'DatePicker', formatter: dateFormatter,
componentProps: { isForm: false,
style: { width: '100%' }, detail: {
type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss'
dateFormat: 'YYYY-MM-DD HH:mm:ss', },
valueFormat: 'x', form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
table: {
width: 175
} }
}, },
table: { {
width: 175 label: '失效时间',
}, field: 'expirationDate',
}, sort: 'custom',
{ formatter: dateFormatter,
label: '失效时间', isForm: false,
field: 'expirationDate', detail: {
sort: 'custom', dateFormat: 'YYYY-MM-DD HH:mm:ss'
formatter: dateFormatter, },
isForm: false, form: {
detail: { component: 'DatePicker',
dateFormat: 'YYYY-MM-DD HH:mm:ss' componentProps: {
}, style: { width: '100%' },
form: { type: 'datetime',
component: 'DatePicker', dateFormat: 'YYYY-MM-DD HH:mm:ss',
componentProps: { valueFormat: 'x'
style: { width: '100%' }, }
type: 'datetime', },
dateFormat: 'YYYY-MM-DD HH:mm:ss', table: {
valueFormat: 'x', width: 175
} }
}, },
table: { {
width: 175 label: '是否可用',
}, field: 'available',
}, sort: 'custom',
{ dictType: DICT_TYPE.TRUE_FALSE,
label: '是否可用', dictClass: 'string', // 默认都是字符串类型其他暂不考虑
field: 'available', form: {
sort: 'custom', component: 'Switch',
dictType: DICT_TYPE.TRUE_FALSE, value: 'TRUE',
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 componentProps: {
form: { inactiveValue: 'FALSE',
component: 'Switch', activeValue: 'TRUE'
value: 'TRUE', }
componentProps: { },
inactiveValue: 'FALSE', table: {
activeValue: 'TRUE' width: 110
} }
}, },
table: { {
width: 110 label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
}
} }
}, ])
{ )
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
}
]))

253
src/views/qms/inspectionTemplate/inspectionTemplate.data.ts

@ -4,124 +4,151 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const InspectionTemplateRules = reactive({ export const InspectionTemplateRules = reactive({
description: [ description: [{ required: true, message: '请填写描述', trigger: 'blur' }],
{ required: true , message: '请填写描述', trigger: 'blur' } version: [{ required: true, message: '请填写版本', trigger: 'blur' }],
], inspectionCode: [{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' }],
version: [ sequenceCode: [{ required: true, message: '请填写顺序号', trigger: 'blur' }],
{ required: true , message: '请填写版本', trigger: 'blur' } inspectionCharCode: [{ required: true, message: '请选择检验特性编码', trigger: 'blur' }],
], describe: [{ required: true, message: '请填写描述', trigger: 'blur' }],
inspectionCode: [ inspectionMethodCode: [{ required: true, message: '请选择检验方法编码', trigger: 'blur' }],
{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' } dynamicUpdateCode: [{ required: true, message: '请选择采样过程编码', trigger: 'blur' }],
], inspectionMethod: [{ required: true, message: '请选择动态修改规则编码', trigger: 'blur' }],
sequenceCode: [ isCanUpdate: [{ required: true, message: '请选择是否允许修改特征值', trigger: 'blur' }],
{ required: true, message: '请填写顺序号', trigger: 'blur' } isDestructionInspection: [{ required: true, message: '请选择是否破坏性检验', trigger: 'blur' }],
], resultEntryMethod: [{ required: true, message: '请选择结果录入方式', trigger: 'blur' }],
inspectionCharCode: [ featureType: [{ required: true, message: '请选择特征类型', trigger: 'blur' }],
{ required: true, message: '请选择检验特性编码', trigger: 'blur' } quantifyIsCapping: [{ required: true, message: '请选择是否设定上限', trigger: 'blur' }],
], quantifyIsLowlimit: [{ required: true, message: '请选择是否设定下限', trigger: 'blur' }],
describe: [ quantifyTarget: [{ required: true, message: '请输入目标值', trigger: 'blur' }],
{ required: true, message: '请填写描述', trigger: 'blur' } quantifyCapping: [{ required: true, message: '请输入上限值', trigger: 'blur' }],
], quantifyLowlimit: [{ required: true, message: '请输入下限值', trigger: 'blur' }],
inspectionMethodCode: [ quantifyquantifyUomLowlimit: [{ required: true, message: '请选择计量单位', trigger: 'blur' }],
{ required: true, message: '请选择检验方法编码', trigger: 'blur' } quantifyDecimal: [{ required: true, message: '请输入小数位', trigger: 'blur' }],
], quantifyQuantifyCode: [{ required: true, message: '请输入选择集编码', trigger: 'blur' }]
dynamicUpdateCode: [
{ required: true, message: '请选择采样过程编码', trigger: 'blur' }
],
inspectionMethod: [
{ required: true, message: '请选择动态修改规则编码', trigger: 'blur' }
],
isCanUpdate: [
{ required: true, message: '请选择是否允许修改特征值', trigger: 'blur' }
],
isDestructionInspection: [
{ required: true, message: '请选择是否破坏性检验', trigger: 'blur' }
],
resultEntryMethod: [
{ required: true, message: '请选择结果录入方式', trigger: 'blur' }
],
featureType: [
{ required: true, message: '请选择特征类型', trigger: 'blur' }
],
quantifyIsCapping: [
{ required: true, message: '请选择是否设定上限', trigger: 'blur' }
],
quantifyIsLowlimit: [
{ required: true, message: '请选择是否设定下限', trigger: 'blur' }
],
quantifyTarget: [
{ required: true, message: '请输入目标值', trigger: 'blur' }
],
quantifyCapping: [
{ required: true, message: '请输入上限值', trigger: 'blur' }
],
quantifyLowlimit: [
{ required: true, message: '请输入下限值', trigger: 'blur' }
],
quantifyquantifyUomLowlimit: [
{ required: true, message: '请选择计量单位', trigger: 'blur' }
],
quantifyDecimal: [
{ required: true, message: '请输入小数位', trigger: 'blur' }
],
quantifyQuantifyCode: [
{ required: true, message: '请输入选择集编码', trigger: 'blur' }
],
}) })
export const InspectionTemplateMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionTemplateMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '编码', {
field: 'code', label: '编码',
sort: 'custom', field: 'code',
isSearch:true, sort: 'custom',
form:{ isSearch: true,
componentProps:{ form: {
disabled:true, componentProps: {
placeholder:'系统自动获取' disabled: true,
placeholder: '系统自动获取'
}
} }
} },
}, {
{ label: '描述',
label: '描述', field: 'description',
field: 'description', sort: 'custom'
sort: 'custom', },
},{ {
label: '动态修改规则', label: '动态修改规则',
field: 'dynamicUpdateName', field: 'dynamicUpdateName',
sort: 'custom', sort: 'custom'
},{ },
label: '版本', {
field: 'version', label: '版本',
sort: 'custom', field: 'version',
}, sort: 'custom'
{ },
label: '是否可用', {
field: 'available', label: '是否可用',
sort: 'custom', field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, sort: 'custom',
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictType: DICT_TYPE.TRUE_FALSE,
form: { dictClass: 'string', // 默认都是字符串类型其他暂不考虑
component: 'Switch', form: {
value: 'TRUE', component: 'Switch',
componentProps: { value: 'TRUE',
inactiveValue: 'FALSE', componentProps: {
activeValue: 'TRUE' inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
table: {
width: 110
} }
}, },
table: { {
width: 110 label: '创建时间',
} field: 'createTime',
}, isForm: false,
{ table: {
label: '操作', width: 180
field: 'action', },
isForm: false, formatter: dateFormatter,
table: { detail: {
width: 150, dateFormat: 'YYYY-MM-DD HH:mm:ss'
fixed: 'right' },
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
}
} }
} ])
])) )
export const InspectionTemplateProcess = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionTemplateProcess = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '编码', label: '编码',

629
src/views/qms/qualityNotice/qualityNoticeMain.data.ts

@ -8,324 +8,391 @@ const { t } = useI18n() // 国际化
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([ export const QualityNoticeMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '编码', {
field: 'number', label: '编码',
sort: 'custom', field: 'number',
isSearch: true, sort: 'custom',
isForm: false, isSearch: true,
table: { isForm: false,
width: 200, table: {
fixed: 'left' width: 200,
} fixed: 'left'
},
{
label: '类型',
field: 'type',
dictType: DICT_TYPE.QUALITY_NOTIFICATION_TYPE,
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 150
}
},
{
label: '描述',
field: 'description',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
}
},
{
label: '详情',
field: 'detail',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
}
}, {
label: '优先级',
field: 'priority',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
} }
}, },
}, {
{ label: '类型',
label: '状态', field: 'type',
field: 'status', dictType: DICT_TYPE.QUALITY_NOTIFICATION_TYPE,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: true,
isForm: false, isForm: false,
table: { table: {
width: 150 width: 150
},
form: {
componentProps: {
disabled: true
} }
}, },
}, {
{ label: '描述',
label: '报告人', field: 'description',
field: 'reporter', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: false, isForm: false,
isForm: false, table: {
table: { width: 200
width: 150 }
}, },
form: { {
componentProps: { label: '详情',
disabled: true field: 'detail',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
} }
}, },
}, {
{ label: '优先级',
label: '报告时间', field: 'priority',
field: 'reportTime', sort: 'custom',
sort: 'custom', isSearch: false,
formatter: dateFormatter, isForm: false,
isSearch: false, table: {
isForm: false, width: 150
search: { },
component: 'DatePicker', form: {
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss', disabled: true
type: 'daterange', }
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
form: { {
component: 'DatePicker', label: '状态',
componentProps: { field: 'status',
type: 'datetime', sort: 'custom',
valueFormat: 'x' isSearch: false,
isForm: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
} }
}, },
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '报告人',
field: 'reporter',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
}, },
table: { {
width: 175 label: '报告时间',
} field: 'reportTime',
}, sort: 'custom',
{ formatter: dateFormatter,
label: '要求开始时间', isSearch: false,
field: 'requestStartTime', isForm: false,
sort: 'custom', search: {
formatter: dateFormatter, component: 'DatePicker',
isSearch: false, componentProps: {
isForm: false, valueFormat: 'YYYY-MM-DD HH:mm:ss',
search: { type: 'daterange',
component: 'DatePicker', defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
componentProps: { }
valueFormat: 'YYYY-MM-DD HH:mm:ss', },
type: 'daterange', form: {
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
} }
}, },
form: { {
component: 'DatePicker', label: '要求开始时间',
componentProps: { field: 'requestStartTime',
type: 'datetime', sort: 'custom',
valueFormat: 'x' formatter: dateFormatter,
isSearch: false,
isForm: false,
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
} }
}, },
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '要求结束时间',
field: 'requestEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
}, },
table: { {
width: 175 label: '是否造成停机',
} field: 'whetherCausesMachineHalt',
}, dictType: DICT_TYPE.FALSE_OR_TRUE,
{ sort: 'custom',
label: '要求结束时间', isSearch: false,
field: 'requestEndTime', isForm: false,
sort: 'custom', table: {
formatter: dateFormatter, width: 150
isSearch: false,
isForm: false,
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')]
} }
}, },
form: { {
component: 'DatePicker', label: '停机开始时间',
componentProps: { field: 'machineHaltStartTime',
type: 'datetime', sort: 'custom',
valueFormat: 'x' formatter: dateFormatter,
isSearch: false,
isForm: false,
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
} }
}, },
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '停机结束时间',
field: 'machineHaltEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
}, },
table: { {
width: 175 label: '协调人',
} field: 'coordinator',
}, sort: 'custom',
{ isSearch: false,
label: '是否造成停机', isForm: false,
field: 'whetherCausesMachineHalt', table: {
dictType: DICT_TYPE.FALSE_OR_TRUE, width: 150
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
{
label: '停机开始时间',
field: 'machineHaltStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
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')]
} }
}, },
form: { {
component: 'DatePicker', label: '任务模板编号',
componentProps: { field: 'taskTemplateCode',
type: 'datetime', sort: 'custom',
valueFormat: 'x' isSearch: false,
isForm: false,
table: {
width: 150
} }
}, },
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '完成时间',
field: 'finishTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
}, },
table: { {
width: 175 // reference_certificate_row
} label: '参考通知编号',
}, field: 'referenceNoticeCode',
{ sort: 'custom',
label: '停机结束时间', isSearch: false,
field: 'machineHaltEndTime', isForm: false,
sort: 'custom', form: {
formatter: dateFormatter, component: 'InputNumber',
isSearch: false, value: 0
isForm: false, },
search: { table: {
component: 'DatePicker', width: 175
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
form: { {
component: 'DatePicker', label: '创建时间',
componentProps: { field: 'createTime',
type: 'datetime', isForm: false,
valueFormat: 'x' table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
}, },
table: { {
width: 175 label: '最后更新时间',
} field: 'updateTime',
}, sort: 'custom',
{ isDetail: true,
label: '协调人', isForm: false,
field: 'coordinator', isTable: false,
sort: 'custom', formatter: dateFormatter,
isSearch: false, detail: {
isForm: false, dateFormat: 'YYYY-MM-DD HH:mm:ss'
table: { },
width: 150 table: {
} width: 180
}, },
{ form: {
label: '任务模板编号', component: 'DatePicker',
field: 'taskTemplateCode', componentProps: {
sort: 'custom', style: { width: '100%' },
isSearch: false, type: 'datetime',
isForm: false, dateFormat: 'YYYY-MM-DD HH:mm:ss',
table: { valueFormat: 'x'
width: 150 }
}
},
{
label: '完成时间',
field: 'finishTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
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')]
} }
}, },
form: { {
component: 'DatePicker', label: '最后更新者',
componentProps: { field: 'updater',
type: 'datetime', isDetail: true,
valueFormat: 'x' isForm: false,
isTable: false,
table: {
width: 150
} }
}, },
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '操作',
}, field: 'action',
table: { isForm: false,
width: 175 isDetail: false,
} table: {
}, width: 150,
{ fixed: 'right'
// reference_certificate_row }
label: '参考通知编号',
field: 'referenceNoticeCode',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 175
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 200,
fixed: 'right'
} }
} ])
])) )
//表单校验 //表单校验
export const QualityNoticeMainRules = reactive({ export const QualityNoticeMainRules = reactive({

302
src/views/qms/sampleCode/sampleCode.data.ts

@ -1,145 +1,193 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import {getSamplingScheme} from '@/api/qms/sampleCode/index' import { getSamplingScheme } from '@/api/qms/sampleCode/index'
import {validateNum} from "@/utils/validator"; import { validateNum } from '@/utils/validator'
// 表单校验 // 表单校验
export const SampleCodeRules = reactive({ export const SampleCodeRules = reactive({
code: [required], code: [required],
batchLowLimiting: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], batchLowLimiting: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }],
batchUpperLimiting: [{ required:true, message: '该项为必填', trigger: 'blur'}, { validator:validateNum, message: '请输入整数', trigger: 'blur'}], batchUpperLimiting: [
s1: [ required ], { required: true, message: '该项为必填', trigger: 'blur' },
s2: [required ], { validator: validateNum, message: '请输入整数', trigger: 'blur' }
s3: [ required ], ],
s4: [ required ], s1: [required],
g1: [ required ], s2: [required],
g2: [ required ], s3: [required],
g3: [ required ] s4: [required],
g1: [required],
g2: [required],
g3: [required]
}) })
const samplingSchemeList = await getSamplingScheme() const samplingSchemeList = await getSamplingScheme()
export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([ export const SampleCode = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '采样方案编码', {
field: 'code', label: '采样方案编码',
sort: 'custom', field: 'code',
isSearch: true, sort: 'custom',
form: { isSearch: true,
component: 'Select', form: {
componentProps: { component: 'Select',
options: samplingSchemeList, componentProps: {
optionsAlias: { options: samplingSchemeList,
labelField: 'code', optionsAlias: {
valueField: 'code' labelField: 'code',
}, valueField: 'code'
}
}
},
table: {
width: 175,
fixed: 'left'
} }
}, },
table: { {
width: 175, label: '批量下限',
fixed: 'left' field: 'batchLowLimiting',
} sort: 'custom',
}, isSearch: true,
{ form: {
label: '批量下限', component: 'InputNumber',
field: 'batchLowLimiting', value: 0
sort: 'custom', }
isSearch: true, },
form: { {
component: 'InputNumber', label: '批量上限',
value: 0 field: 'batchUpperLimiting',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: 's1',
field: 's1',
sort: 'custom'
},
{
label: 's2',
field: 's2',
sort: 'custom'
},
{
label: 's3',
field: 's3',
sort: 'custom'
},
{
label: 's4',
field: 's4',
sort: 'custom'
},
{
label: 'g1',
field: 'g1',
sort: 'custom'
}, },
}, {
{ label: 'g2',
label: '批量上限', field: 'g2',
field: 'batchUpperLimiting', sort: 'custom'
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}, },
}, {
{ label: 'g3',
label: 's1', field: 'g3',
field: 's1', sort: 'custom'
sort: 'custom',
},
{
label: 's2',
field: 's2',
sort: 'custom',
},
{
label: 's3',
field: 's3',
sort: 'custom',
},
{
label: 's4',
field: 's4',
sort: 'custom',
},
{
label: 'g1',
field: 'g1',
sort: 'custom',
},
{
label: 'g2',
field: 'g2',
sort: 'custom',
},
{
label: 'g3',
field: 'g3',
sort: 'custom',
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
form: { {
component: 'DatePicker', label: '是否可用',
componentProps: { field: 'available',
style: {width: '100%'}, sort: 'custom',
type: 'datetime', dictType: DICT_TYPE.TRUE_FALSE,
dateFormat: 'YYYY-MM-DD HH:mm:ss', dictClass: 'string', // 默认都是字符串类型其他暂不考虑
valueFormat: 'x', form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
table: {
width: 110
} }
}, },
table: { {
width: 175 label: '创建时间',
} field: 'createTime',
}, isForm: false,
{ table: {
label: '是否可用', width: 180
field: 'available', },
sort: 'custom', formatter: dateFormatter,
dictType: DICT_TYPE.TRUE_FALSE, detail: {
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dateFormat: 'YYYY-MM-DD HH:mm:ss'
form: { },
component: 'Switch', form: {
value: 'TRUE', component: 'DatePicker',
componentProps: { componentProps: {
inactiveValue: 'FALSE', style: { width: '100%' },
activeValue: 'TRUE' type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
table: { {
width: 110 label: '创建者',
} field: 'creator',
}, table: {
{ width: 130
label: '操作', },
field: 'action', isForm: false,
isForm: false, isTable: true
table: { },
width: 150, {
fixed: 'right' label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
}
} }
} ])
])) )

265
src/views/qms/samplingProcess/samplingProcess.data.ts

@ -1,118 +1,173 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import {getSamplingScheme} from "@/api/qms/samplingProcess"; import { getSamplingScheme } from '@/api/qms/samplingProcess'
import { validateInteger ,validateTwoNum} from '@/utils/validator' import { validateInteger, validateTwoNum } from '@/utils/validator'
// 表单校验 // 表单校验
export const SamplingProcessRules = reactive({ export const SamplingProcessRules = reactive({
sampleType: [required], sampleType: [required],
evaluationMode: [required], evaluationMode: [required],
description: [required], description: [required],
sampleQty:[{ required: true, message: '该项为必填项', trigger: 'blur' },{validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}], sampleQty: [
sampleProgCode:[{ required: true, message: '该项为必填项', trigger: 'blur' }], { required: true, message: '该项为必填项', trigger: 'blur' },
inspectionQty: [required, {validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}] { validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }
],
sampleProgCode: [{ required: true, message: '该项为必填项', trigger: 'blur' }],
inspectionQty: [
required,
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
]
}) })
const samplingSchemeList = await getSamplingScheme() const samplingSchemeList = await getSamplingScheme()
export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([ export const SamplingProcess = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '编码', {
field: 'code', label: '编码',
sort: 'custom', field: 'code',
isSearch: true, sort: 'custom',
isForm: false, isSearch: true,
table: { isForm: false,
width: 175, table: {
fixed: 'left' width: 175,
} fixed: 'left'
},
{
label: '描述',
field: 'description',
sort: 'custom',
isSearch: true
},
{
label: '取样类型',
field: 'sampleType',
sort: 'custom',
dictType: DICT_TYPE.SAMPLING_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '评估模式',
field: 'evaluationMode',
sort: 'custom',
dictType: DICT_TYPE.EVALUATION_MODE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Select'
}
},
{
label: '样品份数',
field: 'sampleQty',
sort: 'custom'
},
{
label: '采样方案编码',
field: 'sampleProgCode',
sort: 'custom',
form: {
component: 'Select',
componentProps: {
options: samplingSchemeList,
optionsAlias: {
labelField: 'description',
valueField: 'code'
},
} }
} },
}, {
{ label: '描述',
label: '创建时间', field: 'description',
field: 'createTime', sort: 'custom',
sort: 'custom', isSearch: true
formatter: dateFormatter, },
isForm: false, {
detail: { label: '取样类型',
dateFormat: 'YYYY-MM-DD HH:mm:ss' field: 'sampleType',
}, sort: 'custom',
form: { dictType: DICT_TYPE.SAMPLING_TYPE,
component: 'DatePicker', dictClass: 'string', // 默认都是字符串类型其他暂不考虑
componentProps: { isSearch: true,
style: {width: '100%'}, form: {
type: 'datetime', component: 'Select'
dateFormat: 'YYYY-MM-DD HH:mm:ss', }
valueFormat: 'x', },
} {
} label: '评估模式',
}, field: 'evaluationMode',
{ sort: 'custom',
label: '是否可用', dictType: DICT_TYPE.EVALUATION_MODE,
field: 'available', dictClass: 'string', // 默认都是字符串类型其他暂不考虑
sort: 'custom', form: {
dictType: DICT_TYPE.TRUE_FALSE, component: 'Select'
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 }
form: { },
component: 'Switch', {
value: 'TRUE', label: '样品份数',
componentProps: { field: 'sampleQty',
inactiveValue: 'FALSE', sort: 'custom'
activeValue: 'TRUE' },
{
label: '采样方案编码',
field: 'sampleProgCode',
sort: 'custom',
form: {
component: 'Select',
componentProps: {
options: samplingSchemeList,
optionsAlias: {
labelField: 'description',
valueField: 'code'
}
}
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
} }
} }
}, ])
{ )
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

166
src/views/qms/samplingScheme/samplingScheme.data.ts

@ -3,70 +3,118 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const SamplingSchemeRules = reactive({ export const SamplingSchemeRules = reactive({
description: [required], description: [required]
}) })
export const SamplingScheme = useCrudSchemas(reactive<CrudSchema[]>([ export const SamplingScheme = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '编码', {
field: 'code', label: '编码',
sort: 'custom', field: 'code',
isSearch: true, sort: 'custom',
isForm: false, isSearch: true,
table: { isForm: false,
fixed: 'left' table: {
} fixed: 'left'
}, }
{ },
label: '描述', {
field: 'description', label: '描述',
sort: 'custom', field: 'description',
isSearch: true, sort: 'custom',
}, isSearch: true
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
form: { {
component: 'DatePicker', label: '是否可用',
componentProps: { field: 'available',
style: {width: '100%'}, sort: 'custom',
type: 'datetime', dictType: DICT_TYPE.TRUE_FALSE,
dateFormat: 'YYYY-MM-DD HH:mm:ss', dictClass: 'string', // 默认都是字符串类型其他暂不考虑
valueFormat: 'x', form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
table: {
width: 110
} }
}, },
}, {
{ label: '创建时间',
label: '是否可用', field: 'createTime',
field: 'available', isForm: false,
sort: 'custom', table: {
dictType: DICT_TYPE.TRUE_FALSE, width: 180
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 },
form: { formatter: dateFormatter,
component: 'Switch', detail: {
value: 'TRUE', dateFormat: 'YYYY-MM-DD HH:mm:ss'
componentProps: { },
inactiveValue: 'FALSE', form: {
activeValue: 'TRUE' component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
table: { {
width: 110 label: '创建者',
} field: 'creator',
}, table: {
{ width: 130
label: '操作', },
field: 'action', isForm: false,
isForm: false, isTable: true
table: { },
width: 150, {
fixed: 'right' label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
}
} }
} ])
])) )

152
src/views/qms/selectedSet/selectedSet.data.ts

@ -1,6 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import * as DictTypeApi from '@/api/system/dict/dict.type' import * as DictTypeApi from '@/api/system/dict/dict.type'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const SelectedSetRules = reactive({ export const SelectedSetRules = reactive({
@ -10,49 +10,113 @@ export const SelectedSetRules = reactive({
concurrencyStamp: [required] concurrencyStamp: [required]
}) })
export const SelectedSet = useCrudSchemas(reactive<CrudSchema[]>([ export const SelectedSet = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '编码', label: '编码',
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isSearch: true, isSearch: true,
fixed: 'left' fixed: 'left'
}, },
{ {
label: '描述', label: '描述',
field: 'description', field: 'description',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TRUE', value: 'TRUE',
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE' activeValue: 'TRUE'
}
},
table: {
width: 110
} }
}, },
table: { {
width: 110 label: '创建时间',
} field: 'createTime',
}, isForm: false,
{ table: {
label: '操作', width: 180
field: 'action', },
isForm: false, formatter: dateFormatter,
table: { detail: {
width: 150, dateFormat: 'YYYY-MM-DD HH:mm:ss'
fixed: 'right' },
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
}, },
isTableForm: false, {
isDetail: false label: '最后更新时间',
} field: 'updateTime',
])) sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
}
}
])
)

Loading…
Cancel
Save