Browse Source

QMS ——> 检验任务 bug更新

hella_online_20240829
gaojs 4 months ago
parent
commit
c7fe517535
  1. 121
      src/views/eam/equipmentAccounts/ablesForm.vue
  2. 5
      src/views/qms/inspectionJob/addForm.vue

121
src/views/eam/equipmentAccounts/ablesForm.vue

@ -0,0 +1,121 @@
<template>
<Dialog v-model="dialogVisible" :title="dialogTitle" :close-on-click-modal="false">
<el-form ref="basicFormRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="变更原因" prop="verifyContent">
<el-input v-model="formData.changeReason" type="textarea" :input-style="{height:'100px'}" maxlength="300" placeholder="请输入变更原因" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm('success')"> </el-button>
<el-button @click="handleClose('close')"> </el-button>
</template>
</Dialog>
</template>
<script lang="ts" setup>
import * as EquipmentAccountsApi from '@/api/eam/equipmentAccounts'
import {ElInput} from "element-plus";
defineOptions({ name: 'TeamForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') //
const formData = ref({
id:'',
code:'',
changeReason: '',
status:'',
available:''
})
const formRules = reactive({
changeReason: [
{ required: true, message: '变更原因不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
const basicFormRef = ref() // Ref
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
if(type == 'disable'){
dialogTitle.value = '禁用'
formData.value.status = 'DISABLE'
formData.value.available = 'FALSE'
}else if(type == 'enable'){
dialogTitle.value = '启用'
formData.value.status = 'NORMAL'
formData.value.available = 'TRUE'
}else{
dialogTitle.value = t('action.' + type)
}
formType.value = type
//
formData.value.id = row.id
formData.value.code = row.code
}
defineExpose({ open }) // open
/** 提交表单 */
const submitForm = async (val) => {
//
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
//
await EquipmentAccountsApi.ableEquipmentAccountsMain(formData.value)
//success
emit('success',formData.value.id)
dialogVisible.value = false
}
const handleClose=(val)=>{
dialogVisible.value = false
emit('close',val)
}
//
const emit = defineEmits(['close','success'])
</script>
<style scoped>
.tag-container {
margin-top: 10px; /* 可根据需要调整标签容器与表单项之间的间距 */
border: 1px solid #ccc; /* 添加边框样式 */
padding: 10px; /* 可根据需要调整容器内边距 */
width: 950px; /* 设置固定宽度为 950px */
overflow-y: auto; /* 当内容溢出容器高度时显示滚动条 */
word-wrap: break-word; /* 使用 word-wrap 属性实现超出范围换行 */
overflow-wrap: break-word; /* 兼容性更好的写法 */
flex-wrap: wrap;
}
.input-with-button {
display: flex;
align-items: center;
width: 100%;
}
.input-with-button > .el-input {
flex: 1;
/*margin-right: 10px;*/
}
</style>

5
src/views/qms/inspectionJob/addForm.vue

@ -175,7 +175,7 @@
</el-col> </el-col>
<!-- 手动评估的时候显示 --> <!-- 手动评估的时候显示 -->
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1"> <el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1">
<el-form-item label="评估代码" required> <el-form-item label="评估代码" required prop="inspectionJobCharacteristicsUpdateReqVO.estimateCode">
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.estimateCode" placeholder="请选择评估代码" <el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.estimateCode" placeholder="请选择评估代码"
@change="changeFeatureType"> @change="changeFeatureType">
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value" <el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value"
@ -473,6 +473,9 @@
rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = false rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = false
} }
}) })
list.forEach(item => {
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime = new Date()
})
data.value.subList = list data.value.subList = list
/** /**
设置采样数量默认第一个包装采样数量<总数量显示数量字段第二个包装和剩下的总数量对比以此类推 设置采样数量默认第一个包装采样数量<总数量显示数量字段第二个包装和剩下的总数量对比以此类推

Loading…
Cancel
Save