Browse Source

BUG修改

hella_online_20240829
parent
commit
dddfaee650
  1. 87
      src/views/qms/aql/aql.data.ts
  2. 71
      src/views/qms/counter/counter.data.ts
  3. 90
      src/views/qms/dynamicRule/dynamicRule.data.ts
  4. 68
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  5. 92
      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. 193
      src/views/qms/inspectionScheme/inspectionScheme.data.ts
  9. 167
      src/views/qms/inspectionTemplate/inspectionTemplate.data.ts
  10. 83
      src/views/qms/qualityNotice/qualityNoticeMain.data.ts
  11. 102
      src/views/qms/sampleCode/sampleCode.data.ts
  12. 87
      src/views/qms/samplingProcess/samplingProcess.data.ts
  13. 80
      src/views/qms/samplingScheme/samplingScheme.data.ts
  14. 78
      src/views/qms/selectedSet/selectedSet.data.ts

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

@ -1,13 +1,17 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { getSamplingScheme } from "@/api/qms/aql";
import {validateNum, validateSampleCode} from "@/utils/validator";
import { getSamplingScheme } from '@/api/qms/aql'
import { validateNum, validateSampleCode } from '@/utils/validator'
// 表单校验
export const AqlRules = reactive({
code: [required],
inspectionQualification: [required],
sampleCharacterCode: [required, {max: 1, message: '长度不得超过1个字符', trigger: 'blur' }, {validator: validateSampleCode, message: '请输入1个大写字母', trigger: 'blur' }],
sampleCharacterCode: [
required,
{ max: 1, message: '长度不得超过1个字符', trigger: 'blur' },
{ validator: validateSampleCode, message: '请输入1个大写字母', trigger: 'blur' }
],
sampleQty: [required, { validator: validateNum, message: '请输入整数', trigger: 'blur' }],
a0separator010: [required, { validator: validateNum, message: '请输入整数', trigger: 'blur' }],
r0separator010: [required, { validator: validateNum, message: '请输入整数', trigger: 'blur' }],
@ -60,10 +64,11 @@ export const AqlRules = reactive({
a650: [required, { validator: validateNum, message: '请输入整数', trigger: 'blur' }],
r650: [required, { validator: validateNum, message: '请输入整数', trigger: 'blur' }],
a1000: [required, { validator: validateNum, message: '请输入整数', trigger: 'blur' }],
r1000: [required,{validator: validateNum, message: '请输入整数', trigger: 'blur' }],
r1000: [required, { validator: validateNum, message: '请输入整数', trigger: 'blur' }]
})
const samplingSchemeList = await getSamplingScheme()
export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
export const Aql = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '采样方案编码',
field: 'code',
@ -76,7 +81,7 @@ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'description',
valueField: 'code'
},
}
}
},
table: {
@ -534,50 +539,76 @@ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
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',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 175
width: 150
}
},
// {
// 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: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
])
)

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

@ -13,7 +13,8 @@ export const CounterRules = reactive({
concurrencyStamp: [required]
})
export const Counter = useCrudSchemas(reactive<CrudSchema[]>([
export const Counter = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '物料编码',
field: 'itemCode',
@ -147,6 +148,71 @@ export const Counter = useCrudSchemas(reactive<CrudSchema[]>([
width: 140
}
},
{
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',
@ -156,4 +222,5 @@ export const Counter = useCrudSchemas(reactive<CrudSchema[]>([
// fixed: 'right'
// }
// }
]))
])
)

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

@ -2,23 +2,24 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { string } from 'vue-types'
const trueFalse = [{
const trueFalse = [
{
label: '是',
value: true
}, {
},
{
label: '否',
value: false
}]
}
]
// 表单校验
export const DynamicRuleRules = reactive({
description: [
required,
{ max: 1024, message: '不得超过1024个字符', trigger: 'blur' },
]
description: [required, { max: 1024, message: '不得超过1024个字符', trigger: 'blur' }]
})
export const DynamicRule = useCrudSchemas(reactive<CrudSchema[]>([
export const DynamicRule = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
@ -51,14 +52,79 @@ export const DynamicRule = useCrudSchemas(reactive<CrudSchema[]>([
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',
isDetail: false,
isForm: false,
isDetail: false,
table: {
width: 330,
width: 150,
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: '操作',
field: 'action',
isDetail: false,
isForm: false,
isDetail: false,
table: {
width: 300,
width: 150,
fixed: 'right'
}
}

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

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

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

@ -399,33 +399,74 @@ export const InspectionRecordMain = useCrudSchemas(
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
isSearch: false,
search: {
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
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')]
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: 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: '操作',
field: 'action',
isDetail: false,
isForm: false,
isDetail: false,
table: {
width: 200,
width: 150,
fixed: 'right'
}
}

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

@ -388,14 +388,79 @@ export const InspectionMain = useCrudSchemas(
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 240,
fixed: 'right'
}
}
      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'
      }
    }
])
)

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

@ -4,71 +4,30 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const InspectionTemplateRules = reactive({
description: [
{ required: true, message: '请填写描述', trigger: 'blur' }
],
version: [
{ required: true, message: '请填写版本', trigger: 'blur' }
],
inspectionCode: [
{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' }
],
sequenceCode: [
{ required: true, message: '请填写顺序号', trigger: 'blur' }
],
inspectionCharCode: [
{ required: true, message: '请选择检验特性编码', trigger: 'blur' }
],
describe: [
{ required: true, message: '请填写描述', trigger: 'blur' }
],
inspectionMethodCode: [
{ 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' }
],
description: [{ required: true, message: '请填写描述', trigger: 'blur' }],
version: [{ required: true, message: '请填写版本', trigger: 'blur' }],
inspectionCode: [{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' }],
sequenceCode: [{ required: true, message: '请填写顺序号', trigger: 'blur' }],
inspectionCharCode: [{ required: true, message: '请选择检验特性编码', trigger: 'blur' }],
describe: [{ required: true, message: '请填写描述', trigger: 'blur' }],
inspectionMethodCode: [{ 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',
@ -92,7 +51,7 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 200
},
isSearch: true,
isSearch: true
},
{
label: '物料编码',
@ -101,22 +60,25 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
}, {
isSearch: true
},
{
label: '描述',
field: 'description',
sort: 'custom',
table: {
width: 150
}
},
}, {
{
label: '版本',
field: 'version',
sort: 'custom',
table: {
width: 150
}
}, {
},
{
label: '检验类型编码',
field: 'inspectionType',
dictType: DICT_TYPE.INSPECTION_TYPE,
@ -125,14 +87,16 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 175
}
}, {
},
{
label: '检验模板编码',
field: 'programmeTemplateCode',
sort: 'custom',
table: {
width: 175
}
}, {
},
{
label: '拆分规则',
field: 'splitRule',
sort: 'custom',
@ -140,8 +104,9 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
table: {
width: 175
}
},
}, {
{
label: 'aql',
field: 'aql',
sort: 'custom',
@ -150,7 +115,8 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
}
}, {
},
{
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
@ -159,7 +125,7 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
isSearch: true
},
{
label: '每份样品量',
@ -184,12 +150,12 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
table: {
width: 175
},
}
},
{
label: '失效时间',
@ -206,12 +172,12 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
table: {
width: 175
},
}
},
{
label: '是否可用',
@ -231,14 +197,79 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
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',
isDetail: false,
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
},
}
]))
}
])
)

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

@ -4,71 +4,30 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const InspectionTemplateRules = reactive({
description: [
{ required: true , message: '请填写描述', trigger: 'blur' }
],
version: [
{ required: true , message: '请填写版本', trigger: 'blur' }
],
inspectionCode: [
{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' }
],
sequenceCode: [
{ required: true, message: '请填写顺序号', trigger: 'blur' }
],
inspectionCharCode: [
{ required: true, message: '请选择检验特性编码', trigger: 'blur' }
],
describe: [
{ required: true, message: '请填写描述', trigger: 'blur' }
],
inspectionMethodCode: [
{ 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' }
],
description: [{ required: true, message: '请填写描述', trigger: 'blur' }],
version: [{ required: true, message: '请填写版本', trigger: 'blur' }],
inspectionCode: [{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' }],
sequenceCode: [{ required: true, message: '请填写顺序号', trigger: 'blur' }],
inspectionCharCode: [{ required: true, message: '请选择检验特性编码', trigger: 'blur' }],
describe: [{ required: true, message: '请填写描述', trigger: 'blur' }],
inspectionMethodCode: [{ 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',
@ -84,15 +43,17 @@ export const InspectionTemplateMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '描述',
field: 'description',
sort: 'custom',
},{
sort: 'custom'
},
{
label: '动态修改规则',
field: 'dynamicUpdateName',
sort: 'custom',
},{
sort: 'custom'
},
{
label: '版本',
field: 'version',
sort: 'custom',
sort: 'custom'
},
{
label: '是否可用',
@ -112,16 +73,82 @@ export const InspectionTemplateMain = useCrudSchemas(reactive<CrudSchema[]>([
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'
}
}
]))
])
)
export const InspectionTemplateProcess = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',

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

@ -8,7 +8,8 @@ const { t } = useI18n() // 国际化
/**
* @returns {Array}
*/
export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
export const QualityNoticeMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
@ -50,7 +51,8 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 200
}
}, {
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
@ -63,7 +65,7 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
disabled: true
}
},
}
},
{
label: '状态',
@ -78,7 +80,7 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
disabled: true
}
},
}
},
{
label: '报告人',
@ -93,7 +95,7 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
disabled: true
}
},
}
},
{
label: '报告时间',
@ -315,17 +317,82 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 175
}
},
{
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',
isDetail: false,
isForm: false,
isDetail: false,
table: {
width: 200,
width: 150,
fixed: 'right'
}
}
]))
])
)
//表单校验
export const QualityNoticeMainRules = reactive({

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

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

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

@ -1,6 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {getSamplingScheme} from "@/api/qms/samplingProcess";
import { getSamplingScheme } from '@/api/qms/samplingProcess'
import { validateInteger, validateTwoNum } from '@/utils/validator'
// 表单校验
@ -8,12 +8,19 @@ export const SamplingProcessRules = reactive({
sampleType: [required],
evaluationMode: [required],
description: [required],
sampleQty:[{ required: true, message: '该项为必填项', trigger: 'blur' },{validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}],
sampleQty: [
{ required: true, message: '该项为必填项', trigger: 'blur' },
{ validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }
],
sampleProgCode: [{ required: true, message: '该项为必填项', trigger: 'blur' }],
inspectionQty: [required, {validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}]
inspectionQty: [
required,
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
]
})
const samplingSchemeList = await getSamplingScheme()
export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([
export const SamplingProcess = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
@ -68,16 +75,34 @@ export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([
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',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
@ -87,32 +112,62 @@ export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
{
label: '是否可用',
field: 'available',
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'Switch',
value: 'TRUE',
component: 'DatePicker',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
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'
}
}
]))
])
)

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

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

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

@ -1,6 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import * as DictTypeApi from '@/api/system/dict/dict.type'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const SelectedSetRules = reactive({
@ -10,8 +10,8 @@ export const SelectedSetRules = reactive({
concurrencyStamp: [required]
})
export const SelectedSet = useCrudSchemas(reactive<CrudSchema[]>([
export const SelectedSet = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
@ -44,15 +44,79 @@ export const SelectedSet = useCrudSchemas(reactive<CrudSchema[]>([
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'
},
isTableForm: false,
isDetail: false
}
]))
}
])
)

Loading…
Cancel
Save