Browse Source

采样流程修改

master_hella_20240701
liuchen864 7 months ago
parent
commit
95f05d9b25
  1. 6
      src/views/qms/aql/aql.data.ts
  2. 22
      src/views/qms/basicDataManage/inspectionScheme/addForm.vue
  3. 26
      src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts
  4. 14
      src/views/qms/samplingProcess/index.vue
  5. 10
      src/views/qms/samplingProcess/samplingProcess.data.ts

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

@ -8,7 +8,7 @@ export const AqlRules = reactive({
code: [required], code: [required],
inspectionQualification: [required], inspectionQualification: [required],
sampleCharacterCode: [{ required, max: 1, message: '长度不得超过1个字符', trigger: 'blur' }], sampleCharacterCode: [{ required, max: 1, message: '长度不得超过1个字符', trigger: 'blur' }],
sampleSize: [required], sampleQty: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }],
a0separator010: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], a0separator010: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }],
r0separator010: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], r0separator010: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }],
a0separator015: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], a0separator015: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }],
@ -108,8 +108,8 @@ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '样本量', label: '样品份数',
field: 'sampleSize', field: 'sampleQty',
sort: 'custom', sort: 'custom',
table: { table: {
width: 95 width: 95

22
src/views/qms/basicDataManage/inspectionScheme/addForm.vue

@ -187,6 +187,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="每份样品量" prop="samplePieceSize">
<el-input v-model="data.samplePieceSize" placeholder="请填写每份样品量" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否整检" prop="isWhole">
<el-switch v-model="data.isWhole" active-value="TRUE" inactive-value="FALSE" />
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="生效时间" prop="effectiveDate"> <el-form-item label="生效时间" prop="effectiveDate">
<el-date-picker <el-date-picker
@ -637,6 +647,7 @@ import * as DynamicRuleApi from '@/api/qms/dynamicRule' //动态修改规则
import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule.data' // import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule.data' //
import * as SelectedSetApi from '@/api/qms/selectedSet' // import * as SelectedSetApi from '@/api/qms/selectedSet' //
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' // import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //
import {validateTwoNum} from '@/utils/validator'
const message = useMessage() // const message = useMessage() //
@ -696,6 +707,8 @@ const data = ref({
available: 'TRUE', available: 'TRUE',
dynamicUpdateCode: '', dynamicUpdateCode: '',
description:'', description:'',
samplePieceSize:'',
isWhole:'TRUE',
process: [] process: []
}) })
@ -721,7 +734,13 @@ const rules = ref({
], ],
splitRule: [{ required: true, message: '请选择拆分规则', trigger: ['blur', 'change'] }], splitRule: [{ required: true, message: '请选择拆分规则', trigger: ['blur', 'change'] }],
aql: [{ required: true, message: '请选择aql', trigger: ['blur', 'change'] }], aql: [{ required: true, message: '请选择aql', trigger: ['blur', 'change'] }],
inspectionLevel: [{ required: true, message: '请选择检验水平', trigger: ['blur', 'change'] }], inspectionLevel: [
{ required: true, message: '请选择检验水平', trigger: ['blur', 'change'] },
],
samplePieceSize: [
{ required: true, message: '请输入每份样品量', trigger: ['blur', 'change']},
{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'},
],
effectiveDate: [{ required: true, message: '请选择生效时间', trigger: ['blur', 'change'] }], effectiveDate: [{ required: true, message: '请选择生效时间', trigger: ['blur', 'change'] }],
expirationDate: [{ required: true, message: '请选择失效时间', trigger: ['blur', 'change'] }], expirationDate: [{ required: true, message: '请选择失效时间', trigger: ['blur', 'change'] }],
'inspectionCharacteristicsBaseVO.description': [ 'inspectionCharacteristicsBaseVO.description': [
@ -826,6 +845,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
available: 'TRUE', available: 'TRUE',
dynamicUpdateCode:'', dynamicUpdateCode:'',
description:"", description:"",
isWhole:"TRUE",
process: [] process: []
} }
} }

26
src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts

@ -161,6 +161,32 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isSearch: true, isSearch: true,
}, },
{
label: '每份样品量',
field: 'samplePieceSize',
sort: 'custom',
table: {
width: 140
}
},
{
label: '是否整检',
field: 'isWhole',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
table: {
width: 110
}
},
{ {
label: '生效时间', label: '生效时间',
field: 'effectiveDate', field: 'effectiveDate',

14
src/views/qms/samplingProcess/index.vue

@ -264,15 +264,17 @@ const updateFormFields = (sampleType, formRef) => {
switch (sampleType) { switch (sampleType) {
case '1': case '1':
sampleSizeLabel = '样品'; sampleSizeLabel = '样品份数';
sampleSizeDisabled = true; sampleSizeDisabled = true;
sampleSizeRequired = false;
if( SamplingProcessRules.sampleSize.length==3){ if( SamplingProcessRules.sampleSize.length==3){
SamplingProcessRules.sampleSize.pop() SamplingProcessRules.sampleSize.pop()
} }
break; break;
case '2': case '2':
sampleSizeLabel = '样品量(%)'; sampleSizeLabel = '样品份数(%)';
sampleSizeRequired = true; sampleSizeDisabled = false;
sampleSizeRequired = false;
if( SamplingProcessRules.sampleSize.length==2){ if( SamplingProcessRules.sampleSize.length==2){
SamplingProcessRules.sampleSize.push({ SamplingProcessRules.sampleSize.push({
validator:validatePercent, message: '百分比范围 0 ~ 100', trigger: 'blur' validator:validatePercent, message: '百分比范围 0 ~ 100', trigger: 'blur'
@ -280,15 +282,17 @@ const updateFormFields = (sampleType, formRef) => {
} }
break; break;
case '3': case '3':
sampleSizeLabel = '样品量'; sampleSizeLabel = '样品份数';
sampleSizeDisabled = false;
sampleSizeRequired = true; sampleSizeRequired = true;
if( SamplingProcessRules.sampleSize.length==3){ if( SamplingProcessRules.sampleSize.length==3){
SamplingProcessRules.sampleSize.pop() SamplingProcessRules.sampleSize.pop()
} }
break; break;
case '4': case '4':
sampleSizeLabel = '样品'; sampleSizeLabel = '样品份数';
sampleSizeDisabled = true; sampleSizeDisabled = true;
sampleSizeRequired = false;
sampleProgCodeDisabled = false; sampleProgCodeDisabled = false;
sampleProgCodeRequired = true; sampleProgCodeRequired = true;
if( SamplingProcessRules.sampleSize.length==3){ if( SamplingProcessRules.sampleSize.length==3){

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

@ -61,17 +61,9 @@ export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([
width: 140 width: 140
} }
}, },
{
label: '样品量',
field: 'sampleSize',
sort: 'custom',
table: {
width: 140
}
},
{ {
label: '样品份数', label: '样品份数',
field: 'inspectionQty', field: 'sampleSize',
sort: 'custom', sort: 'custom',
table: { table: {
width: 140 width: 140

Loading…
Cancel
Save