| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="原因分析:" prop="reasonAnalysis"> |
| | | <el-input |
| | | v-model="form.reasonAnalysis" |
| | | type="textarea" |
| | | :rows="4" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="预防与纠正措施:" prop="preventiveCorrective"> |
| | | <el-input |
| | | v-model="form.preventiveCorrective" |
| | | type="textarea" |
| | | :rows="4" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工时损失:" prop="lossWorking"> |
| | | <el-input-number |
| | | v-model="form.lossWorking" |
| | | :min="0" |
| | | :step="0.01" |
| | | :precision="2" |
| | | style="width: 100%" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="材料费损失:" prop="lossMaterial"> |
| | | <el-input-number |
| | | v-model="form.lossMaterial" |
| | | :min="0" |
| | | :step="0.01" |
| | | :precision="2" |
| | | style="width: 100%" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref, reactive, toRefs} from "vue"; |
| | | import {ref, reactive, toRefs, getCurrentInstance} from "vue"; |
| | | import {modelList, productTreeList} from "@/api/basicData/product.js"; |
| | | import { |
| | | getQualityUnqualifiedInfo, |
| | |
| | | dealResult: '', |
| | | dealName: '', |
| | | dealTime: '', |
| | | reasonAnalysis: '', |
| | | preventiveCorrective: '', |
| | | lossWorking: 0, |
| | | lossMaterial: 0, |
| | | }, |
| | | rules: { |
| | | checkTime: [{ required: false, message: "请输入", trigger: "blur" },], |
| | |
| | | unit: '', |
| | | quantity: '', |
| | | productName: '', |
| | | reasonAnalysis: '', |
| | | preventiveCorrective: '', |
| | | lossWorking: 0, |
| | | lossMaterial: 0, |
| | | }; |
| | | } else { |
| | | form.value = {}; |
| | |
| | | if (operationType.value === 'edit') { |
| | | getQualityUnqualifiedInfo(row.id).then(res => { |
| | | const { inspectState, ...rest } = (res.data || {}) |
| | | form.value = { ...rest } |
| | | form.value = { |
| | | reasonAnalysis: '', |
| | | preventiveCorrective: '', |
| | | lossWorking: 0, |
| | | lossMaterial: 0, |
| | | ...rest |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="原因分析:" prop="reasonAnalysis"> |
| | | <el-input |
| | | v-model="form.reasonAnalysis" |
| | | type="textarea" |
| | | :rows="4" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="预防与纠正措施:" prop="preventiveCorrective"> |
| | | <el-input |
| | | v-model="form.preventiveCorrective" |
| | | type="textarea" |
| | | :rows="4" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工时损失:" prop="lossWorking"> |
| | | <el-input-number |
| | | v-model="form.lossWorking" |
| | | :min="0" |
| | | :step="0.01" |
| | | :precision="2" |
| | | style="width: 100%" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="材料费损失:" prop="lossMaterial"> |
| | | <el-input-number |
| | | v-model="form.lossMaterial" |
| | | :min="0" |
| | | :step="0.01" |
| | | :precision="2" |
| | | style="width: 100%" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | |
| | | qualityUnqualifiedDeal |
| | | } from "@/api/qualityManagement/nonconformingManagement.js"; |
| | | import {userListNoPage} from "@/api/system/user.js"; |
| | | import { getCurrentInstance } from "vue"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | | |
| | |
| | | dealResult: '', |
| | | dealName: '', |
| | | dealTime: '', |
| | | method: undefined |
| | | method: undefined, |
| | | reasonAnalysis: '', |
| | | preventiveCorrective: '', |
| | | lossWorking: 0, |
| | | lossMaterial: 0, |
| | | }, |
| | | rules: { |
| | | checkTime: [{ required: false, message: "请输入", trigger: "blur" },], |
| | |
| | | userList.value = []; |
| | | } |
| | | dialogFormVisible.value = true; |
| | | form.value = {}; |
| | | form.value = { |
| | | reasonAnalysis: '', |
| | | preventiveCorrective: '', |
| | | lossWorking: 0, |
| | | lossMaterial: 0, |
| | | }; |
| | | getProductOptions(); |
| | | if (operationType.value === 'edit') { |
| | | getQualityUnqualifiedInfo(row.id).then(res => { |
| | | const { inspectState, ...rest } = (res.data || {}) |
| | | // 有数据就显示默认值,没有就不显示 |
| | | form.value = { ...rest } |
| | | form.value = { |
| | | reasonAnalysis: '', |
| | | preventiveCorrective: '', |
| | | lossWorking: 0, |
| | | lossMaterial: 0, |
| | | ...rest |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | // 不合格管理 |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | :total="page.total" |
| | | ></PIMTable> |
| | | > |
| | | <template #reasonAnalysis="{ row }"> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="openTextPreviewDialog('原因分析', row?.reasonAnalysis)" |
| | | > |
| | | {{ row?.reasonAnalysis}} |
| | | </el-button> |
| | | </template> |
| | | <template #preventiveCorrective="{ row }"> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="openTextPreviewDialog('预防与纠正措施', row?.preventiveCorrective)" |
| | | > |
| | | {{ row?.preventiveCorrective}} |
| | | </el-button> |
| | | </template> |
| | | <template #lossWorking="{ row }"> |
| | | <span>{{ row?.lossWorking ?? '-' }}</span> |
| | | </template> |
| | | <template #lossMaterial="{ row }"> |
| | | <span>{{ row?.lossMaterial ?? '-' }}</span> |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | <el-dialog v-model="textPreviewDialogVisible" :title="textPreviewTitle" width="600px"> |
| | | <div class="text-preview-content">{{ textPreviewContent || "暂无内容" }}</div> |
| | | </el-dialog> |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia> |
| | | </div> |
| | |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "原因分析", |
| | | prop: "reasonAnalysis", |
| | | dataType: "slot", |
| | | slot: "reasonAnalysis", |
| | | width: 160 |
| | | }, |
| | | { |
| | | label: "预防与纠正措施", |
| | | prop: "preventiveCorrective", |
| | | dataType: "slot", |
| | | slot: "preventiveCorrective", |
| | | width: 180 |
| | | }, |
| | | { |
| | | label: "工时损失", |
| | | prop: "lossWorking", |
| | | width: 140 |
| | | }, |
| | | { |
| | | label: "材料费损失", |
| | | prop: "lossMaterial", |
| | | width: 140 |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "操作", |
| | | align: "center", |
| | |
| | | const tableData = ref([]); |
| | | const selectedRows = ref([]); |
| | | const tableLoading = ref(false); |
| | | const textPreviewDialogVisible = ref(false); |
| | | const textPreviewTitle = ref(""); |
| | | const textPreviewContent = ref(""); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | |
| | | inspectionFormDia.value?.openDialog(type, row) |
| | | }) |
| | | }; |
| | | // 查看字段详情 |
| | | const openTextPreviewDialog = (title, content) => { |
| | | textPreviewTitle.value = title; |
| | | textPreviewContent.value = content || ""; |
| | | textPreviewDialogVisible.value = true; |
| | | }; |
| | | |
| | | // 删除 |
| | | const handleDelete = () => { |
| | |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped></style> |
| | | <style scoped> |
| | | .text-preview-content { |
| | | white-space: pre-wrap; |
| | | line-height: 1.6; |
| | | color: #606266; |
| | | word-break: break-word; |
| | | max-height: 60vh; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |