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]
})
export const Counter = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
fixed: 'left',
table: {
export const Counter = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
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')]
table: {
fixed: 'left',
width: 175
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '检验类型编码',
field: 'inspectionType',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.INSPECTION_TYPE,
table: {
width: 175
}
},
table: {
width: 175
}
},
{
label: '连续不合格次数',
field: 'unqualifiedTimes',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
{
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',
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,
form: {
component: 'InputNumber',
value: 0
{
label: '最后不合格批次',
field: 'lastUnqualifiedBatch',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 175
}
},
{
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: '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')]
{
label: '下一检验阶段',
field: 'nextStage',
sort: 'custom',
isSearch: false,
table: {
width: 140
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
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'
}
}
},
table: {
width: 175
}
},
{
label: '下一检验阶段',
field: 'nextStage',
sort: 'custom',
isSearch: false,
table: {
width: 140
}
},
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))
{
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,
// 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 { string } from 'vue-types'
const trueFalse = [{
label: '是',
value: true
}, {
label: '否',
value: false
}]
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[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false,
fixed: 'left'
},
{
label: '描述',
field: 'description',
sort: 'custom',
isSearch: true
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
export const DynamicRule = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false,
fixed: 'left'
},
{
label: '描述',
field: 'description',
sort: 'custom',
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
}
},
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: '操作',
field: 'action',
isDetail: false,
isForm: false,
isDetail: false,
table: {
width: 300,
width: 150,
fixed: 'right'
}
}

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

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

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

@ -4,241 +4,272 @@ 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[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
table: {
width: 220,
fixed: 'left'
},
isSearch: true,
form: {
componentProps: {
disabled: true,
placeholder: '系统自动获取'
export const InspectionSchemeMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
table: {
width: 220,
fixed: 'left'
},
isSearch: true,
form: {
componentProps: {
disabled: true,
placeholder: '系统自动获取'
}
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 200
},
isSearch: true,
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
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,
dictClass: 'string',
sort: 'custom',
table: {
width: 175
}
}, {
label: '检验模板编码',
field: 'programmeTemplateCode',
sort: 'custom',
table: {
width: 175
}
}, {
label: '拆分规则',
field: 'splitRule',
sort: 'custom',
dictType: DICT_TYPE.SPLIT_RULES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
table: {
width: 175
},
}, {
label: 'aql',
field: 'aql',
sort: 'custom',
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
table: {
width: 150
}
}, {
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
table: {
width: 150
},
isSearch: true,
},
{
label: '每份样品量',
field: 'samplePieceSize',
sort: 'custom',
table: {
width: 140
}
},
{
label: '生效时间',
field: 'effectiveDate',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
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: 'itemName',
sort: 'custom',
table: {
width: 200
},
isSearch: true
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
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,
dictClass: 'string',
sort: 'custom',
table: {
width: 175
}
},
{
label: '检验模板编码',
field: 'programmeTemplateCode',
sort: 'custom',
table: {
width: 175
}
},
{
label: '拆分规则',
field: 'splitRule',
sort: 'custom',
dictType: DICT_TYPE.SPLIT_RULES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
table: {
width: 175
}
},
{
label: 'aql',
field: 'aql',
sort: 'custom',
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
table: {
width: 150
}
},
{
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
table: {
width: 150
},
isSearch: true
},
{
label: '每份样品量',
field: 'samplePieceSize',
sort: 'custom',
table: {
width: 140
}
},
{
label: '生效时间',
field: 'effectiveDate',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
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
}
},
table: {
width: 175
},
},
{
label: '失效时间',
field: 'expirationDate',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
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: 'expirationDate',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
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
}
},
table: {
width: 175
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: '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
}
},
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({
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[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch:true,
form:{
componentProps:{
disabled:true,
placeholder:'系统自动获取'
export const InspectionTemplateMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true,
placeholder: '系统自动获取'
}
}
}
},
{
label: '描述',
field: 'description',
sort: 'custom',
},{
label: '动态修改规则',
field: 'dynamicUpdateName',
sort: 'custom',
},{
label: '版本',
field: 'version',
sort: 'custom',
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
},
{
label: '描述',
field: 'description',
sort: 'custom'
},
{
label: '动态修改规则',
field: 'dynamicUpdateName',
sort: 'custom'
},
{
label: '版本',
field: 'version',
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
}
},
table: {
width: 110
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
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'
}
}
}
]))
])
)
export const InspectionTemplateProcess = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',

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

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

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

@ -1,145 +1,193 @@
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 { getSamplingScheme } from '@/api/qms/sampleCode/index'
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'}],
s1: [ required ],
s2: [required ],
s3: [ required ],
s4: [ required ],
g1: [ required ],
g2: [ required ],
g3: [ required ]
batchLowLimiting: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }],
batchUpperLimiting: [
{ required: true, message: '该项为必填', trigger: 'blur' },
{ validator: validateNum, message: '请输入整数', trigger: 'blur' }
],
s1: [required],
s2: [required],
s3: [required],
s4: [required],
g1: [required],
g2: [required],
g3: [required]
})
const samplingSchemeList = await getSamplingScheme()
export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '采样方案编码',
field: 'code',
sort: 'custom',
isSearch: true,
form: {
component: 'Select',
componentProps: {
options: samplingSchemeList,
optionsAlias: {
labelField: 'code',
valueField: 'code'
},
export const SampleCode = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '采样方案编码',
field: 'code',
sort: 'custom',
isSearch: true,
form: {
component: 'Select',
componentProps: {
options: samplingSchemeList,
optionsAlias: {
labelField: 'code',
valueField: 'code'
}
}
},
table: {
width: 175,
fixed: 'left'
}
},
table: {
width: 175,
fixed: 'left'
}
},
{
label: '批量下限',
field: 'batchLowLimiting',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
{
label: '批量下限',
field: 'batchLowLimiting',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '批量上限',
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: '批量上限',
field: 'batchUpperLimiting',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
{
label: 'g2',
field: 'g2',
sort: 'custom'
},
},
{
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',
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'
{
label: 'g3',
field: 'g3',
sort: 'custom'
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
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
}
},
table: {
width: 175
}
},
{
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'
}
}
},
table: {
width: 110
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
{
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'
}
}
}
]))
])
)

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

@ -1,118 +1,173 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {getSamplingScheme} from "@/api/qms/samplingProcess";
import { validateInteger ,validateTwoNum} from '@/utils/validator'
import { getSamplingScheme } from '@/api/qms/samplingProcess'
import { validateInteger, validateTwoNum } from '@/utils/validator'
// 表单校验
export const SamplingProcessRules = reactive({
sampleType: [required],
evaluationMode: [required],
description: [required],
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'}]
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' }
]
})
const samplingSchemeList = await getSamplingScheme()
export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
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'
},
export const SamplingProcess = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 175,
fixed: 'left'
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
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: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
},
{
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: '是否可用',
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({
description: [required],
description: [required]
})
export const SamplingScheme = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
fixed: 'left'
}
},
{
label: '描述',
field: 'description',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
export const SamplingScheme = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
fixed: 'left'
}
},
{
label: '描述',
field: 'description',
sort: 'custom',
isSearch: true
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
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: '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'
}
}
},
table: {
width: 110
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
{
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'
}
}
}
]))
])
)

152
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,49 +10,113 @@ export const SelectedSetRules = reactive({
concurrencyStamp: [required]
})
export const SelectedSet = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isForm: false,
isSearch: true,
fixed: 'left'
},
{
label: '描述',
field: 'description',
sort: 'custom',
isSearch: true
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
export const SelectedSet = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isForm: false,
isSearch: true,
fixed: 'left'
},
{
label: '描述',
field: 'description',
sort: 'custom',
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
}
},
table: {
width: 110
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
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
},
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