新疆马铃薯
1.质量管理三种检验要自动判断是否合格
2.指标维护修改权限放开
| | |
| | | }) |
| | | } |
| | | |
| | | // å忰项èªå¨å¤æ |
| | | export function autoJudge(data) { |
| | | return request({ |
| | | url: '/quality/qualityInspect/autoJudge', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | } |
| | | |
| | | // æ´ä½èªå¨å¤æ |
| | | export function autoJudgeAll(inspectId) { |
| | | return request({ |
| | | url: `/quality/qualityInspect/autoJudgeAll/${inspectId}`, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£éªè§å" prop="inspectRule"> |
| | | <el-radio-group v-model="form.inspectRule"> |
| | | <el-radio-group v-model="form.inspectRule" :disabled="isViewMode"> |
| | | <el-radio :label="0">å
¨æ£</el-radio> |
| | | <el-radio :label="1">æ½æ£</el-radio> |
| | | </el-radio-group> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµç»æï¼" prop="checkResult"> |
| | | <el-select v-model="form.checkResult" :disabled="isViewMode"> |
| | | <el-option label="åæ ¼" value="åæ ¼" /> |
| | | <el-option label="ä¸åæ ¼" value="ä¸åæ ¼" /> |
| | | <el-option label="é¨ååæ ¼" value="é¨ååæ ¼" /> |
| | | </el-select> |
| | | <el-radio-group v-model="form.checkResult" :disabled="isViewMode || autoJudgeResult === 'ä¸åæ ¼'"> |
| | | <el-radio label="åæ ¼">åæ ¼</el-radio> |
| | | <el-radio label="ä¸åæ ¼">ä¸åæ ¼</el-radio> |
| | | <el-radio label="é¨ååæ ¼">é¨ååæ ¼</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :tableLoading="tableLoading" |
| | | :isShowPagination="false" |
| | | height="400" |
| | | > |
| | | <template #slot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable :disabled="isViewMode"/> |
| | | <template #judgeTypeSlot="{ row }"> |
| | | <el-tag v-if="row.judgeType === 'â¥'" type="success">â¥</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'â¤'" type="warning">â¤</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'èå´'" type="info">èå´</el-tag> |
| | | <el-tag v-else>æå</el-tag> |
| | | </template> |
| | | <template #isRequiredSlot="{ row }"> |
| | | <el-tag v-if="row.isRequired === 1" type="danger">æ¯</el-tag> |
| | | <el-tag v-else type="info">å¦</el-tag> |
| | | </template> |
| | | <template #testValueSlot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable :disabled="isViewMode" @input="handleTestValueChange(row)" /> |
| | | </template> |
| | | <template #isQualifiedSlot="{ row }"> |
| | | <template v-if="row.judgeType !== 'æåæè¿°'"> |
| | | <el-tag v-if="row.isQualified === 1" type="success">åæ ¼</el-tag> |
| | | <el-tag v-else-if="row.isQualified === 0" type="danger">ä¸åæ ¼</el-tag> |
| | | <span v-else>-</span> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="row.isQualified" placeholder="è¯·éæ©" size="small" :disabled="isViewMode" @change="handleTextResultChange"> |
| | | <el-option :value="1" label="åæ ¼" /> |
| | | <el-option :value="0" label="ä¸åæ ¼" /> |
| | | </el-select> |
| | | </template> |
| | | </template> |
| | | </PIMTable> |
| | | |
| | | <div v-if="!isViewMode" style="margin-top: 16px;"> |
| | | <el-form label-width="120px"> |
| | | <el-form-item label="èªå¨å¤æç»æ"> |
| | | <template v-if="autoJudgeResult"> |
| | | <el-tag v-if="autoJudgeResult === 'åæ ¼'" type="success" size="large">åæ ¼</el-tag> |
| | | <el-tag v-else-if="autoJudgeResult === 'é¨ååæ ¼'" type="warning" size="large">é¨ååæ ¼</el-tag> |
| | | <el-tag v-else type="danger" size="large">ä¸åæ ¼</el-tag> |
| | | <span v-if="autoJudgeResult === 'ä¸åæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°æä¸åæ ¼é¡¹ï¼ä¸å¯æå¨ä¿®æ¹ï¼ |
| | | </span> |
| | | <span v-if="autoJudgeResult === 'é¨ååæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°ååæ ¼ï¼éå¿
è¦åæ°æä¸åæ ¼é¡¹ï¼å¯æå¨éæ©æç»ç»æï¼ |
| | | </span> |
| | | </template> |
| | | <template v-else> |
| | | <el-tag type="info" size="large">éæå¨å¤æ</el-tag> |
| | | <span style="margin-left: 10px; color: #909399;"> |
| | | ï¼ææåæ°å为æåæè¿°ç±»åï¼è¯·æå¨éæ©ï¼ |
| | | </span> |
| | | </template> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <template v-if="!isViewMode"> |
| | |
| | | model: "", |
| | | testStandardId: "", |
| | | unit: "", |
| | | quantity: "", |
| | | quantity: undefined, |
| | | qualifiedQuantity: "", |
| | | unqualifiedQuantity: "", |
| | | checkCompany: "", |
| | |
| | | const supplierList = ref([]); |
| | | const productOptions = ref([]); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "ææ ", |
| | | prop: "parameterItem", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "åå®¶æ åå¼", |
| | | prop: "standardValue", |
| | | }, |
| | | { |
| | | label: "å
æ§å¼", |
| | | prop: "controlValue", |
| | | }, |
| | | { |
| | | label: "æ£éªå¼", |
| | | prop: "testValue", |
| | | dataType: 'slot', |
| | | slot: 'slot', |
| | | }, |
| | | { label: "ææ ", prop: "parameterItem" }, |
| | | { label: "åä½", prop: "unit" }, |
| | | { label: "åå®¶æ åå¼", prop: "standardValue" }, |
| | | { label: "ä¸éå¼", prop: "minValue" }, |
| | | { label: "ä¸éå¼", prop: "maxValue" }, |
| | | { label: "å
æ§å¼", prop: "controlValue" }, |
| | | { label: "å¤æç±»å", prop: "judgeType", dataType: 'slot', slot: 'judgeTypeSlot' }, |
| | | { label: "å¿
è¦å¤æ", prop: "isRequired", dataType: 'slot', slot: 'isRequiredSlot' }, |
| | | { label: "æ£éªå¼", prop: "testValue", dataType: 'slot', slot: 'testValueSlot' }, |
| | | { label: "æ¯å¦åæ ¼", prop: "isQualified", dataType: 'slot', slot: 'isQualifiedSlot' }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const autoJudgeResult = ref(null); |
| | | const userList = ref([]); |
| | | const currentProductId = ref(0); |
| | | const testStandardOptions = ref([]); // ææ éæ©ä¸ææ¡æ°æ® |
| | |
| | | const openDialog = async (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | autoJudgeResult.value = null; |
| | | // å
æ¸
空表åéªè¯ç¶æï¼é¿å
éªç |
| | | await nextTick(); |
| | | proxy.$refs.formRef?.clearValidate(); |
| | |
| | | |
| | | const handleQualifiedQuantityChange = (value) => { |
| | | if (value === null || value === undefined) { |
| | | form.value.qualifiedQuantity = 0; |
| | | form.value.qualifiedQuantity = undefined; |
| | | return; |
| | | } |
| | | const quantity = parseFloat(form.value.quantity) || 0; |
| | | const quantity = parseFloat(form.value.quantity); |
| | | if (isNaN(quantity) || quantity <= 0) return; |
| | | const qualified = parseFloat(value) || 0; |
| | | form.value.qualifiedQuantity = qualified > quantity?quantity:qualified; |
| | | form.value.qualifiedQuantity = Math.min(qualified, quantity); |
| | | form.value.unqualifiedQuantity = Math.max(0, quantity - qualified); |
| | | }; |
| | | |
| | | const handleUnqualifiedQuantityChange = (value) => { |
| | | if (value === null || value === undefined) { |
| | | form.value.unqualifiedQuantity = 0; |
| | | form.value.unqualifiedQuantity = undefined; |
| | | return; |
| | | } |
| | | const quantity = parseFloat(form.value.quantity) || 0; |
| | | const quantity = parseFloat(form.value.quantity); |
| | | if (isNaN(quantity) || quantity <= 0) return; |
| | | const unqualified = parseFloat(value) || 0; |
| | | form.value.unqualifiedQuantity = unqualified > quantity?quantity:unqualified; |
| | | form.value.unqualifiedQuantity = Math.min(unqualified, quantity); |
| | | form.value.qualifiedQuantity = Math.max(0, quantity - unqualified); |
| | | }; |
| | | |
| | |
| | | return newItem; |
| | | }); |
| | | } |
| | | const handleTestValueChange = (row) => { |
| | | if (isViewMode.value) return; |
| | | if (!row.testValue || !row.judgeType || row.judgeType === 'æåæè¿°') { |
| | | return; |
| | | } |
| | | const testVal = parseFloat(row.testValue); |
| | | if (isNaN(testVal)) return; |
| | | |
| | | let qualified = false; |
| | | if (row.judgeType === 'â¥') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal >= stdVal; |
| | | } else if (row.judgeType === 'â¤') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal <= stdVal; |
| | | } else if (row.judgeType === 'èå´') { |
| | | const minVal = parseFloat(row.minValue); |
| | | const maxVal = parseFloat(row.maxValue); |
| | | if (isNaN(minVal) || isNaN(maxVal)) return; |
| | | qualified = testVal >= minVal && testVal <= maxVal; |
| | | } else { |
| | | return; |
| | | } |
| | | row.isQualified = qualified ? 1 : 0; |
| | | performAutoJudgeAll(); |
| | | }; |
| | | |
| | | const handleTextResultChange = () => { |
| | | performAutoJudgeAll() |
| | | }; |
| | | |
| | | const performAutoJudgeAll = () => { |
| | | if (!tableData.value.length) return; |
| | | const allTextDesc = tableData.value.every(item => item.judgeType === 'æåæè¿°'); |
| | | if (allTextDesc) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const requiredParams = tableData.value.filter(item => item.isRequired === 1); |
| | | if (requiredParams.length === 0) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const hasUnqualified = requiredParams.some(item => item.isQualified === 0); |
| | | const allJudged = requiredParams.every(item => item.isQualified === 1 || item.isQualified === 0); |
| | | if (!allJudged) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | if (hasUnqualified) { |
| | | autoJudgeResult.value = 'ä¸åæ ¼'; |
| | | form.value.checkResult = 'ä¸åæ ¼'; |
| | | return; |
| | | } |
| | | const nonRequiredUnqualified = tableData.value.filter(item => item.isRequired !== 1 && item.isQualified === 0); |
| | | if (nonRequiredUnqualified.length > 0) { |
| | | autoJudgeResult.value = 'é¨ååæ ¼'; |
| | | form.value.checkResult = 'é¨ååæ ¼'; |
| | | } else { |
| | | autoJudgeResult.value = 'åæ ¼'; |
| | | form.value.checkResult = 'åæ ¼'; |
| | | } |
| | | }; |
| | | |
| | | // æäº¤äº§å表å |
| | | const submitForm = () => { |
| | | proxy.$refs.formRef.validate(valid => { |
| | | if (valid) { |
| | | performAutoJudgeAll(); |
| | | form.value.inspectType = 2; |
| | | if (operationType.value === "add") { |
| | | tableData.value.forEach((item) => { |
| | |
| | | tableData.value = []; |
| | | testStandardOptions.value = []; |
| | | form.value.testStandardId = ''; |
| | | autoJudgeResult.value = null; |
| | | dialogFormVisible.value = false; |
| | | emit('close'); |
| | | } |
| | |
| | | width="70%" |
| | | @close="closeDia" |
| | | > |
| | | <div style="margin-bottom: 10px;text-align: right"> |
| | | <div v-if="!isViewMode" style="margin-bottom: 10px;text-align: right"> |
| | | <el-button type="danger" plain @click="handleDelete">å é¤</el-button> |
| | | </div> |
| | | <PIMTable |
| | |
| | | :tableData="tableData" |
| | | :tableLoading="tableLoading" |
| | | :isSelection="true" |
| | | :isShowPagination="false" |
| | | @selection-change="handleSelectionChange" |
| | | height="600" |
| | | height="400" |
| | | > |
| | | <template #slot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable/> |
| | | <template #judgeTypeSlot="{ row }"> |
| | | <el-tag v-if="row.judgeType === 'â¥'" type="success">â¥</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'â¤'" type="warning">â¤</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'èå´'" type="info">èå´</el-tag> |
| | | <el-tag v-else>æå</el-tag> |
| | | </template> |
| | | <template #isRequiredSlot="{ row }"> |
| | | <el-tag v-if="row.isRequired === 1" type="danger">æ¯</el-tag> |
| | | <el-tag v-else type="info">å¦</el-tag> |
| | | </template> |
| | | <template #testValueSlot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable :disabled="isViewMode" @input="handleTestValueChange(row)" /> |
| | | </template> |
| | | <template #isQualifiedSlot="{ row }"> |
| | | <template v-if="row.judgeType !== 'æåæè¿°'"> |
| | | <el-tag v-if="row.isQualified === 1" type="success">åæ ¼</el-tag> |
| | | <el-tag v-else-if="row.isQualified === 0" type="danger">ä¸åæ ¼</el-tag> |
| | | <span v-else>-</span> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="row.isQualified" placeholder="è¯·éæ©" size="small" :disabled="isViewMode" @change="handleTextResultChange(row)"> |
| | | <el-option :value="1" label="åæ ¼" /> |
| | | <el-option :value="0" label="ä¸åæ ¼" /> |
| | | </el-select> |
| | | </template> |
| | | </template> |
| | | </PIMTable> |
| | | |
| | | <div style="margin-top: 16px;"> |
| | | <el-form label-width="120px"> |
| | | <el-form-item label="èªå¨å¤æç»æ"> |
| | | <template v-if="autoJudgeResult"> |
| | | <el-tag v-if="autoJudgeResult === 'åæ ¼'" type="success" size="large">åæ ¼</el-tag> |
| | | <el-tag v-else-if="autoJudgeResult === 'é¨ååæ ¼'" type="warning" size="large">é¨ååæ ¼</el-tag> |
| | | <el-tag v-else type="danger" size="large">ä¸åæ ¼</el-tag> |
| | | <span v-if="autoJudgeResult === 'ä¸åæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°æä¸åæ ¼é¡¹ï¼ä¸å¯æå¨ä¿®æ¹ï¼ |
| | | </span> |
| | | <span v-if="autoJudgeResult === 'é¨ååæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°ååæ ¼ï¼éå¿
è¦åæ°æä¸åæ ¼é¡¹ï¼å¯æå¨éæ©æç»ç»æï¼ |
| | | </span> |
| | | </template> |
| | | <template v-else> |
| | | <el-tag type="info" size="large">éæå¨å¤æ</el-tag> |
| | | <span style="margin-left: 10px; color: #909399;"> |
| | | ï¼ææåæ°å为æåæè¿°ç±»åï¼è¯·æå¨éæ©ï¼ |
| | | </span> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="æç»å¤å®"> |
| | | <el-radio-group v-model="checkResult" :disabled="isViewMode || autoJudgeResult === 'ä¸åæ ¼'"> |
| | | <el-radio label="åæ ¼">åæ ¼</el-radio> |
| | | <el-radio label="ä¸åæ ¼">ä¸åæ ¼</el-radio> |
| | | <el-radio label="é¨ååæ ¼">é¨ååæ ¼</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <template v-if="!isViewMode"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | | </template> |
| | | <el-button v-else @click="closeDia">å
³é</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import { ref, computed, getCurrentInstance } from "vue"; |
| | | import { |
| | | qualityInspectParamDel, |
| | | qualityInspectParamInfo, |
| | |
| | | const operationType = ref('') |
| | | const currentId = ref('') |
| | | const selectedRows = ref([]); |
| | | const autoJudgeResult = ref(null) |
| | | const checkResult = ref('') |
| | | const isViewMode = computed(() => operationType.value === 'view') |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "ææ ", |
| | | prop: "parameterItem", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "åå®¶æ åå¼", |
| | | prop: "standardValue", |
| | | }, |
| | | { |
| | | label: "å
æ§å¼", |
| | | prop: "controlValue", |
| | | }, |
| | | { |
| | | label: "æ£éªå¼", |
| | | prop: "testValue", |
| | | dataType: 'slot', |
| | | slot: 'slot', |
| | | }, |
| | | { label: "ææ ", prop: "parameterItem" }, |
| | | { label: "åä½", prop: "unit" }, |
| | | { label: "åå®¶æ åå¼", prop: "standardValue" }, |
| | | { label: "ä¸éå¼", prop: "minValue" }, |
| | | { label: "ä¸éå¼", prop: "maxValue" }, |
| | | { label: "å
æ§å¼", prop: "controlValue" }, |
| | | { label: "å¤æç±»å", prop: "judgeType", dataType: 'slot', slot: 'judgeTypeSlot' }, |
| | | { label: "å¿
è¦å¤æ", prop: "isRequired", dataType: 'slot', slot: 'isRequiredSlot' }, |
| | | { label: "æ£éªå¼", prop: "testValue", dataType: 'slot', slot: 'testValueSlot' }, |
| | | { label: "æ¯å¦åæ ¼", prop: "isQualified", dataType: 'slot', slot: 'isQualifiedSlot' }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | if (operationType.value === 'edit') { |
| | | autoJudgeResult.value = null |
| | | checkResult.value = '' |
| | | if (operationType.value === 'edit' || operationType.value === 'view') { |
| | | currentId.value = row.id; |
| | | getList() |
| | | } |
| | |
| | | tableData.value = res.data; |
| | | }) |
| | | } |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | // æäº¤äº§å表å |
| | | |
| | | const handleTestValueChange = (row) => { |
| | | if (isViewMode.value) return; |
| | | if (!row.testValue || !row.judgeType || row.judgeType === 'æåæè¿°') { |
| | | return; |
| | | } |
| | | const testVal = parseFloat(row.testValue); |
| | | if (isNaN(testVal)) return; |
| | | |
| | | let qualified = false; |
| | | if (row.judgeType === 'â¥') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal >= stdVal; |
| | | } else if (row.judgeType === 'â¤') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal <= stdVal; |
| | | } else if (row.judgeType === 'èå´') { |
| | | const minVal = parseFloat(row.minValue); |
| | | const maxVal = parseFloat(row.maxValue); |
| | | if (isNaN(minVal) || isNaN(maxVal)) return; |
| | | qualified = testVal >= minVal && testVal <= maxVal; |
| | | } else { |
| | | return; |
| | | } |
| | | row.isQualified = qualified ? 1 : 0; |
| | | performAutoJudgeAll(); |
| | | }; |
| | | |
| | | const handleTextResultChange = () => { |
| | | performAutoJudgeAll() |
| | | }; |
| | | |
| | | const performAutoJudgeAll = () => { |
| | | if (!tableData.value.length) return; |
| | | const allTextDesc = tableData.value.every(item => item.judgeType === 'æåæè¿°'); |
| | | if (allTextDesc) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const requiredParams = tableData.value.filter(item => item.isRequired === 1); |
| | | if (requiredParams.length === 0) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const hasUnqualified = requiredParams.some(item => item.isQualified === 0); |
| | | const allJudged = requiredParams.every(item => item.isQualified === 1 || item.isQualified === 0); |
| | | if (!allJudged) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | if (hasUnqualified) { |
| | | autoJudgeResult.value = 'ä¸åæ ¼'; |
| | | checkResult.value = 'ä¸åæ ¼'; |
| | | return; |
| | | } |
| | | const nonRequiredUnqualified = tableData.value.filter(item => item.isRequired !== 1 && item.isQualified === 0); |
| | | if (nonRequiredUnqualified.length > 0) { |
| | | autoJudgeResult.value = 'é¨ååæ ¼'; |
| | | checkResult.value = 'é¨ååæ ¼'; |
| | | } else { |
| | | autoJudgeResult.value = 'åæ ¼'; |
| | | checkResult.value = 'åæ ¼'; |
| | | } |
| | | }; |
| | | |
| | | const submitForm = () => { |
| | | performAutoJudgeAll(); |
| | | qualityInspectParamUpdate(tableData.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }) |
| | | } |
| | | // å
³éå¼¹æ¡ |
| | | const closeDia = () => { |
| | | dialogFormVisible.value = false; |
| | | emit('close') |
| | | }; |
| | | // å é¤ |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥åä½" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æç±»å" prop="judgeType"> |
| | | <el-select v-model="form.judgeType" placeholder="è¯·éæ©å¤æç±»å" @change="handleJudgeTypeChange"> |
| | | <el-option label="大äºçäº(â¥)" value="â¥" /> |
| | | <el-option label="å°äºçäº(â¤)" value="â¤" /> |
| | | <el-option label="èå´" value="èå´" /> |
| | | <el-option label="æåæè¿°" value="æåæè¿°" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.judgeType === 'èå´'" label="èå´ä¸éå¼" prop="maxValue"> |
| | | <el-input-number v-model="form.maxValue" :precision="4" :min="0" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.judgeType === 'èå´'" label="èå´ä¸éå¼" prop="minValue"> |
| | | <el-input-number v-model="form.minValue" :precision="4" :min="0" /> |
| | | </el-form-item> |
| | | <el-form-item label="åå®¶æ åå¼" prop="standardValue"> |
| | | <el-input v-model="form.standardValue" placeholder="请è¾å
¥åå®¶æ åå¼" /> |
| | | </el-form-item> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="é»è®¤å¼" prop="defaultValue"> |
| | | <el-input v-model="form.defaultValue" placeholder="请è¾å
¥é»è®¤å¼" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦å¿
è¦å¤æ" prop="isRequired"> |
| | | <el-switch v-model="form.isRequired" :active-value="1" :inactive-value="0" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </FormDialog> |
| | |
| | | |
| | | const computedTitle = computed(() => (props.operationType === 'edit' ? 'ç¼è¾æ ååæ°' : 'æ°å¢æ ååæ°')) |
| | | |
| | | const handleJudgeTypeChange = (val) => { |
| | | if (val !== 'èå´') { |
| | | props.form.minValue = null |
| | | props.form.maxValue = null |
| | | } |
| | | } |
| | | |
| | | const handleConfirm = () => { |
| | | formRef.value?.validate?.((valid) => { |
| | | if (valid) emit('confirm') |
| | |
| | | </div> |
| | | |
| | | <div class="right-toolbar"> |
| | | <el-button type="primary" :disabled="!currentStandard || isStandardReadonly" @click="openParamDialog('add')"> |
| | | <el-button type="primary" :disabled="!currentStandard" @click="openParamDialog('add')"> |
| | | æ°å¢ |
| | | </el-button> |
| | | <el-button type="danger" plain :disabled="!currentStandard || isStandardReadonly" @click="handleParamBatchDelete" v-hasPermi="['qualityManagement:metricMaintenance:remove']"> |
| | | <el-button type="danger" plain :disabled="!currentStandard" @click="handleParamBatchDelete" v-hasPermi="['qualityManagement:metricMaintenance:remove']"> |
| | | å é¤ |
| | | </el-button> |
| | | </div> |
| | |
| | | <el-table-column prop="unit" label="åä½" width="80" /> |
| | | <el-table-column prop="standardValue" label="åå®¶æ åå¼" min-width="120" /> |
| | | <el-table-column prop="controlValue" label="å
æ§å¼" min-width="120" /> |
| | | <el-table-column label="å¤æç±»å" width="100"> |
| | | <template #default="{ row }"> |
| | | <el-tag v-if="row.judgeType === 'â¥'" type="success">â¥</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'â¤'" type="warning">â¤</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'èå´'" type="info">èå´</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'æåæè¿°'">æå</el-tag> |
| | | <span v-else>-</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¿
è¦å¤æ" width="80"> |
| | | <template #default="{ row }"> |
| | | <el-tag v-if="row.isRequired === 1" type="danger">æ¯</el-tag> |
| | | <el-tag v-else type="info">å¦</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="minValue" label="èå´ä¸é" width="100" /> |
| | | <el-table-column prop="maxValue" label="èå´ä¸é" width="100" /> |
| | | <el-table-column prop="defaultValue" label="é»è®¤å¼" min-width="120" /> |
| | | <el-table-column label="æä½" width="140" fixed="right" align="center"> |
| | | <template #default="{ row }"> |
| | | <el-button link type="primary" :disabled="isStandardReadonly" @click="openParamDialog('edit', row)"> |
| | | <el-button link type="primary" @click="openParamDialog('edit', row)"> |
| | | ç¼è¾ |
| | | </el-button> |
| | | <el-button link type="danger" :disabled="isStandardReadonly" @click="handleParamDelete(row)" v-hasPermi="['qualityManagement:metricMaintenance:remove']"> |
| | | <el-button link type="danger" @click="handleParamDelete(row)" v-hasPermi="['qualityManagement:metricMaintenance:remove']"> |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | |
| | | |
| | | <script setup> |
| | | import { Search } from '@element-plus/icons-vue' |
| | | import { ref, reactive, toRefs, onMounted, getCurrentInstance, computed } from 'vue' |
| | | import { ref, reactive, toRefs, onMounted, getCurrentInstance } from 'vue' |
| | | import { ElMessageBox } from 'element-plus' |
| | | import { |
| | | qualityTestStandardListPage, |
| | |
| | | // 左侧æ ååè¡¨ï¼æ´è¡å
容å±
ä¸ï¼é
åæ ·å¼ï¼ |
| | | const rowClassNameCenter = () => 'row-center' |
| | | |
| | | // æ åç¶æä¸ºâéè¿(1)âæ¶ï¼å³ä¾§åæ°ç¦æ¢å¢å æ¹ |
| | | const isStandardReadonly = computed(() => { |
| | | const state = currentStandard.value?.state |
| | | return state === 1 || state === '1' |
| | | }) |
| | | |
| | | // æç´¢æ¡ä»¶ |
| | | const data = reactive({ |
| | |
| | | unit: '', |
| | | standardValue: '', |
| | | controlValue: '', |
| | | defaultValue: '' |
| | | defaultValue: '', |
| | | judgeType: null, |
| | | isRequired: 0, |
| | | minValue: null, |
| | | maxValue: null |
| | | }) |
| | | |
| | | // å¼¹çª |
| | |
| | | |
| | | const openParamDialog = (type, row) => { |
| | | if (!currentStandard.value?.id) return |
| | | if (isStandardReadonly.value) { |
| | | proxy.$message.warning('该æ åå·²éè¿ï¼åæ°ä¸å¯ç¼è¾') |
| | | return |
| | | } |
| | | paramOperationType.value = type |
| | | if (type === 'add') { |
| | | Object.assign(paramForm, { |
| | |
| | | unit: '', |
| | | standardValue: '', |
| | | controlValue: '', |
| | | defaultValue: '' |
| | | defaultValue: '', |
| | | judgeType: null, |
| | | isRequired: 0, |
| | | minValue: null, |
| | | maxValue: null |
| | | }) |
| | | } else if (type === 'edit' && row) { |
| | | Object.assign(paramForm, row) |
| | |
| | | const submitParamForm = async () => { |
| | | const testStandardId = currentStandard.value?.id |
| | | if (!testStandardId) return |
| | | if (isStandardReadonly.value) { |
| | | proxy.$message.warning('该æ åå·²éè¿ï¼åæ°ä¸å¯ç¼è¾') |
| | | return |
| | | } |
| | | const payload = { ...paramForm, testStandardId } |
| | | if (paramOperationType.value === 'edit') { |
| | | await qualityTestStandardParamUpdate(payload) |
| | |
| | | |
| | | const handleParamDelete = async (row) => { |
| | | if (!row?.id) return |
| | | if (isStandardReadonly.value) { |
| | | proxy.$message.warning('该æ åå·²éè¿ï¼åæ°ä¸å¯ç¼è¾') |
| | | return |
| | | } |
| | | try { |
| | | await ElMessageBox.confirm('确认å é¤è¯¥åæ°ï¼', 'æç¤º', { type: 'warning' }) |
| | | } catch { |
| | |
| | | } |
| | | |
| | | const handleParamBatchDelete = async () => { |
| | | if (isStandardReadonly.value) { |
| | | proxy.$message.warning('该æ åå·²éè¿ï¼åæ°ä¸å¯ç¼è¾') |
| | | return |
| | | } |
| | | if (!paramSelectedRows.value.length) { |
| | | proxy.$message.warning('è¯·éæ©æ°æ®') |
| | | return |
| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£éªè§å" prop="inspectRule"> |
| | | <el-radio-group v-model="form.inspectRule"> |
| | | <el-radio-group v-model="form.inspectRule" :disabled="isViewMode"> |
| | | <el-radio :label="0">å
¨æ£</el-radio> |
| | | <el-radio :label="1">æ½æ£</el-radio> |
| | | </el-radio-group> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµç»æï¼" |
| | | prop="checkResult"> |
| | | <el-select v-model="form.checkResult" :disabled="isViewMode"> |
| | | <el-option label="åæ ¼" |
| | | value="åæ ¼" /> |
| | | <el-option label="ä¸åæ ¼" |
| | | value="ä¸åæ ¼" /> |
| | | <el-option label="é¨ååæ ¼" |
| | | value="é¨ååæ ¼" /> |
| | | </el-select> |
| | | <el-radio-group v-model="form.checkResult" :disabled="isViewMode || autoJudgeResult === 'ä¸åæ ¼'"> |
| | | <el-radio label="åæ ¼">åæ ¼</el-radio> |
| | | <el-radio label="ä¸åæ ¼">ä¸åæ ¼</el-radio> |
| | | <el-radio label="é¨ååæ ¼">é¨ååæ ¼</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :tableLoading="tableLoading" |
| | | :isShowPagination="false" |
| | | height="400"> |
| | | <template #slot="{ row }"> |
| | | <template #judgeTypeSlot="{ row }"> |
| | | <el-tag v-if="row.judgeType === 'â¥'" type="success">â¥</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'â¤'" type="warning">â¤</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'èå´'" type="info">èå´</el-tag> |
| | | <el-tag v-else>æå</el-tag> |
| | | </template> |
| | | <template #isRequiredSlot="{ row }"> |
| | | <el-tag v-if="row.isRequired === 1" type="danger">æ¯</el-tag> |
| | | <el-tag v-else type="info">å¦</el-tag> |
| | | </template> |
| | | <template #testValueSlot="{ row }"> |
| | | <el-input v-model="row.testValue" |
| | | clearable |
| | | :disabled="isViewMode" /> |
| | | :disabled="isViewMode" |
| | | @input="handleTestValueChange(row)" /> |
| | | </template> |
| | | <template #isQualifiedSlot="{ row }"> |
| | | <template v-if="row.judgeType !== 'æåæè¿°'"> |
| | | <el-tag v-if="row.isQualified === 1" type="success">åæ ¼</el-tag> |
| | | <el-tag v-else-if="row.isQualified === 0" type="danger">ä¸åæ ¼</el-tag> |
| | | <span v-else>-</span> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="row.isQualified" placeholder="è¯·éæ©" size="small" :disabled="isViewMode" @change="handleTextResultChange"> |
| | | <el-option :value="1" label="åæ ¼" /> |
| | | <el-option :value="0" label="ä¸åæ ¼" /> |
| | | </el-select> |
| | | </template> |
| | | </template> |
| | | </PIMTable> |
| | | |
| | | <div v-if="!isViewMode" style="margin-top: 16px;"> |
| | | <el-form label-width="120px"> |
| | | <el-form-item label="èªå¨å¤æç»æ"> |
| | | <template v-if="autoJudgeResult"> |
| | | <el-tag v-if="autoJudgeResult === 'åæ ¼'" type="success" size="large">åæ ¼</el-tag> |
| | | <el-tag v-else-if="autoJudgeResult === 'é¨ååæ ¼'" type="warning" size="large">é¨ååæ ¼</el-tag> |
| | | <el-tag v-else type="danger" size="large">ä¸åæ ¼</el-tag> |
| | | <span v-if="autoJudgeResult === 'ä¸åæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°æä¸åæ ¼é¡¹ï¼ä¸å¯æå¨ä¿®æ¹ï¼ |
| | | </span> |
| | | <span v-if="autoJudgeResult === 'é¨ååæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°ååæ ¼ï¼éå¿
è¦åæ°æä¸åæ ¼é¡¹ï¼å¯æå¨éæ©æç»ç»æï¼ |
| | | </span> |
| | | </template> |
| | | <template v-else> |
| | | <el-tag type="info" size="large">éæå¨å¤æ</el-tag> |
| | | <span style="margin-left: 10px; color: #909399;"> |
| | | ï¼ææåæ°å为æåæè¿°ç±»åï¼è¯·æå¨éæ©ï¼ |
| | | </span> |
| | | </template> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <template v-if="!isViewMode"> |
| | |
| | | model: "", |
| | | testStandardId: "", |
| | | unit: "", |
| | | quantity: "", |
| | | quantity: undefined, |
| | | qualifiedQuantity: "", |
| | | unqualifiedQuantity: "", |
| | | checkCompany: "", |
| | |
| | | const productOptions = ref([]); |
| | | const purchaseContractList = ref([]); // éè´ååå·å表 |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "ææ ", |
| | | prop: "parameterItem", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "åå®¶æ åå¼", |
| | | prop: "standardValue", |
| | | }, |
| | | { |
| | | label: "å
æ§å¼", |
| | | prop: "controlValue", |
| | | }, |
| | | { |
| | | label: "æ£éªå¼", |
| | | prop: "testValue", |
| | | dataType: "slot", |
| | | slot: "slot", |
| | | }, |
| | | { label: "ææ ", prop: "parameterItem" }, |
| | | { label: "åä½", prop: "unit" }, |
| | | { label: "åå®¶æ åå¼", prop: "standardValue" }, |
| | | { label: "ä¸éå¼", prop: "minValue" }, |
| | | { label: "ä¸éå¼", prop: "maxValue" }, |
| | | { label: "å
æ§å¼", prop: "controlValue" }, |
| | | { label: "å¤æç±»å", prop: "judgeType", dataType: "slot", slot: "judgeTypeSlot" }, |
| | | { label: "å¿
è¦å¤æ", prop: "isRequired", dataType: "slot", slot: "isRequiredSlot" }, |
| | | { label: "æ£éªå¼", prop: "testValue", dataType: "slot", slot: "testValueSlot" }, |
| | | { label: "æ¯å¦åæ ¼", prop: "isQualified", dataType: "slot", slot: "isQualifiedSlot" }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const autoJudgeResult = ref(null); |
| | | const currentProductId = ref(0); |
| | | const testStandardOptions = ref([]); // ææ éæ©ä¸ææ¡æ°æ® |
| | | const modelOptions = ref([]); |
| | |
| | | model: "", |
| | | testStandardId: "", |
| | | unit: "", |
| | | quantity: "", |
| | | quantity: undefined, |
| | | checkCompany: "", |
| | | checkResult: "", |
| | | purchaseContractNo: "", |
| | |
| | | getQualityInspectParamList(row.id); |
| | | } |
| | | } |
| | | autoJudgeResult.value = null; |
| | | // æååæå¼å¼¹çªï¼å¹¶æ¸
çæ ¡éªæï¼é¿å
å¿
å¡«æç¤ºéªç |
| | | dialogFormVisible.value = true; |
| | | nextTick(() => { |
| | |
| | | |
| | | const handleQualifiedQuantityChange = (value) => { |
| | | if (value === null || value === undefined) { |
| | | form.value.qualifiedQuantity = 0; |
| | | form.value.qualifiedQuantity = undefined; |
| | | return; |
| | | } |
| | | const quantity = parseFloat(form.value.quantity) || 0; |
| | | const quantity = parseFloat(form.value.quantity); |
| | | if (isNaN(quantity) || quantity <= 0) return; |
| | | const qualified = parseFloat(value) || 0; |
| | | form.value.qualifiedQuantity = qualified > quantity?quantity:qualified; |
| | | form.value.qualifiedQuantity = Math.min(qualified, quantity); |
| | | form.value.unqualifiedQuantity = Math.max(0, quantity - qualified); |
| | | }; |
| | | |
| | | const handleUnqualifiedQuantityChange = (value) => { |
| | | if (value === null || value === undefined) { |
| | | form.value.unqualifiedQuantity = 0; |
| | | form.value.unqualifiedQuantity = undefined; |
| | | return; |
| | | } |
| | | const quantity = parseFloat(form.value.quantity) || 0; |
| | | const quantity = parseFloat(form.value.quantity); |
| | | if (isNaN(quantity) || quantity <= 0) return; |
| | | const unqualified = parseFloat(value) || 0; |
| | | form.value.unqualifiedQuantity = unqualified > quantity?quantity:unqualified; |
| | | form.value.unqualifiedQuantity = Math.min(unqualified, quantity); |
| | | form.value.qualifiedQuantity = Math.max(0, quantity - unqualified); |
| | | }; |
| | | |
| | |
| | | return newItem; |
| | | }); |
| | | } |
| | | const handleTestValueChange = (row) => { |
| | | if (isViewMode.value) return; |
| | | if (!row.testValue || !row.judgeType || row.judgeType === 'æåæè¿°') { |
| | | return; |
| | | } |
| | | const testVal = parseFloat(row.testValue); |
| | | if (isNaN(testVal)) return; |
| | | |
| | | let qualified = false; |
| | | if (row.judgeType === 'â¥') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal >= stdVal; |
| | | } else if (row.judgeType === 'â¤') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal <= stdVal; |
| | | } else if (row.judgeType === 'èå´') { |
| | | const minVal = parseFloat(row.minValue); |
| | | const maxVal = parseFloat(row.maxValue); |
| | | if (isNaN(minVal) || isNaN(maxVal)) return; |
| | | qualified = testVal >= minVal && testVal <= maxVal; |
| | | } else { |
| | | return; |
| | | } |
| | | row.isQualified = qualified ? 1 : 0; |
| | | performAutoJudgeAll(); |
| | | }; |
| | | |
| | | const handleTextResultChange = () => { |
| | | performAutoJudgeAll() |
| | | }; |
| | | |
| | | const performAutoJudgeAll = () => { |
| | | if (!tableData.value.length) return; |
| | | const allTextDesc = tableData.value.every(item => item.judgeType === 'æåæè¿°'); |
| | | if (allTextDesc) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const requiredParams = tableData.value.filter(item => item.isRequired === 1); |
| | | if (requiredParams.length === 0) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const hasUnqualified = requiredParams.some(item => item.isQualified === 0); |
| | | const allJudged = requiredParams.every(item => item.isQualified === 1 || item.isQualified === 0); |
| | | if (!allJudged) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | if (hasUnqualified) { |
| | | autoJudgeResult.value = 'ä¸åæ ¼'; |
| | | form.value.checkResult = 'ä¸åæ ¼'; |
| | | return; |
| | | } |
| | | const nonRequiredUnqualified = tableData.value.filter(item => item.isRequired !== 1 && item.isQualified === 0); |
| | | if (nonRequiredUnqualified.length > 0) { |
| | | autoJudgeResult.value = 'é¨ååæ ¼'; |
| | | form.value.checkResult = 'é¨ååæ ¼'; |
| | | } else { |
| | | autoJudgeResult.value = 'åæ ¼'; |
| | | form.value.checkResult = 'åæ ¼'; |
| | | } |
| | | }; |
| | | |
| | | // å·¥åºååå¤ç |
| | | // æäº¤äº§å表å |
| | | const submitForm = () => { |
| | | proxy.$refs.formRef.validate(valid => { |
| | | if (valid) { |
| | | performAutoJudgeAll(); |
| | | form.value.inspectType = 1; |
| | | const processName = form.value.process || ""; |
| | | if (operationType.value === "add") { |
| | |
| | | tableData.value = []; |
| | | testStandardOptions.value = []; |
| | | form.value.testStandardId = ""; |
| | | autoJudgeResult.value = null; |
| | | dialogFormVisible.value = false; |
| | | emit("close"); |
| | | }; |
| | |
| | | width="70%" |
| | | @close="closeDia" |
| | | > |
| | | <div style="margin-bottom: 10px;text-align: right"> |
| | | <div v-if="!isViewMode" style="margin-bottom: 10px;text-align: right"> |
| | | <el-button type="danger" plain @click="handleDelete">å é¤</el-button> |
| | | </div> |
| | | <PIMTable |
| | |
| | | :tableData="tableData" |
| | | :tableLoading="tableLoading" |
| | | :isSelection="true" |
| | | :isShowPagination="false" |
| | | @selection-change="handleSelectionChange" |
| | | height="600" |
| | | height="400" |
| | | > |
| | | <template #slot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable/> |
| | | <template #judgeTypeSlot="{ row }"> |
| | | <el-tag v-if="row.judgeType === 'â¥'" type="success">â¥</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'â¤'" type="warning">â¤</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'èå´'" type="info">èå´</el-tag> |
| | | <el-tag v-else>æå</el-tag> |
| | | </template> |
| | | <template #isRequiredSlot="{ row }"> |
| | | <el-tag v-if="row.isRequired === 1" type="danger">æ¯</el-tag> |
| | | <el-tag v-else type="info">å¦</el-tag> |
| | | </template> |
| | | <template #testValueSlot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable :disabled="isViewMode" @input="handleTestValueChange(row)" /> |
| | | </template> |
| | | <template #isQualifiedSlot="{ row }"> |
| | | <template v-if="row.judgeType !== 'æåæè¿°'"> |
| | | <el-tag v-if="row.isQualified === 1" type="success">åæ ¼</el-tag> |
| | | <el-tag v-else-if="row.isQualified === 0" type="danger">ä¸åæ ¼</el-tag> |
| | | <span v-else>-</span> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="row.isQualified" placeholder="è¯·éæ©" size="small" :disabled="isViewMode" @change="handleTextResultChange(row)"> |
| | | <el-option :value="1" label="åæ ¼" /> |
| | | <el-option :value="0" label="ä¸åæ ¼" /> |
| | | </el-select> |
| | | </template> |
| | | </template> |
| | | </PIMTable> |
| | | |
| | | <div style="margin-top: 16px;"> |
| | | <el-form label-width="120px"> |
| | | <el-form-item label="èªå¨å¤æç»æ"> |
| | | <template v-if="autoJudgeResult"> |
| | | <el-tag v-if="autoJudgeResult === 'åæ ¼'" type="success" size="large">åæ ¼</el-tag> |
| | | <el-tag v-else-if="autoJudgeResult === 'é¨ååæ ¼'" type="warning" size="large">é¨ååæ ¼</el-tag> |
| | | <el-tag v-else type="danger" size="large">ä¸åæ ¼</el-tag> |
| | | <span v-if="autoJudgeResult === 'ä¸åæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°æä¸åæ ¼é¡¹ï¼ä¸å¯æå¨ä¿®æ¹ï¼ |
| | | </span> |
| | | <span v-if="autoJudgeResult === 'é¨ååæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°ååæ ¼ï¼éå¿
è¦åæ°æä¸åæ ¼é¡¹ï¼å¯æå¨éæ©æç»ç»æï¼ |
| | | </span> |
| | | </template> |
| | | <template v-else> |
| | | <el-tag type="info" size="large">éæå¨å¤æ</el-tag> |
| | | <span style="margin-left: 10px; color: #909399;"> |
| | | ï¼ææåæ°å为æåæè¿°ç±»åï¼è¯·æå¨éæ©ï¼ |
| | | </span> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="æç»å¤å®"> |
| | | <el-radio-group v-model="checkResult" :disabled="isViewMode || autoJudgeResult === 'ä¸åæ ¼'"> |
| | | <el-radio label="åæ ¼">åæ ¼</el-radio> |
| | | <el-radio label="ä¸åæ ¼">ä¸åæ ¼</el-radio> |
| | | <el-radio label="é¨ååæ ¼">é¨ååæ ¼</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <template v-if="!isViewMode"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | | </template> |
| | | <el-button v-else @click="closeDia">å
³é</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import { ref, computed, getCurrentInstance } from "vue"; |
| | | import { |
| | | qualityInspectParamDel, |
| | | qualityInspectParamInfo, |
| | |
| | | const operationType = ref('') |
| | | const currentId = ref('') |
| | | const selectedRows = ref([]); |
| | | const autoJudgeResult = ref(null) |
| | | const checkResult = ref('') |
| | | const isViewMode = computed(() => operationType.value === 'view') |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "ææ ", |
| | | prop: "parameterItem", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "åå®¶æ åå¼", |
| | | prop: "standardValue", |
| | | }, |
| | | { |
| | | label: "å
æ§å¼", |
| | | prop: "controlValue", |
| | | }, |
| | | { |
| | | label: "æ£éªå¼", |
| | | prop: "testValue", |
| | | dataType: 'slot', |
| | | slot: 'slot', |
| | | }, |
| | | { label: "ææ ", prop: "parameterItem" }, |
| | | { label: "åä½", prop: "unit" }, |
| | | { label: "åå®¶æ åå¼", prop: "standardValue" }, |
| | | { label: "ä¸éå¼", prop: "minValue" }, |
| | | { label: "ä¸éå¼", prop: "maxValue" }, |
| | | { label: "å
æ§å¼", prop: "controlValue" }, |
| | | { label: "å¤æç±»å", prop: "judgeType", dataType: 'slot', slot: 'judgeTypeSlot' }, |
| | | { label: "å¿
è¦å¤æ", prop: "isRequired", dataType: 'slot', slot: 'isRequiredSlot' }, |
| | | { label: "æ£éªå¼", prop: "testValue", dataType: 'slot', slot: 'testValueSlot' }, |
| | | { label: "æ¯å¦åæ ¼", prop: "isQualified", dataType: 'slot', slot: 'isQualifiedSlot' }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | if (operationType.value === 'edit') { |
| | | autoJudgeResult.value = null |
| | | checkResult.value = '' |
| | | if (operationType.value === 'edit' || operationType.value === 'view') { |
| | | currentId.value = row.id; |
| | | getList() |
| | | } |
| | |
| | | tableData.value = res.data; |
| | | }) |
| | | } |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | // æäº¤äº§å表å |
| | | |
| | | const handleTestValueChange = (row) => { |
| | | if (isViewMode.value) return; |
| | | if (!row.testValue || !row.judgeType || row.judgeType === 'æåæè¿°') { |
| | | return; |
| | | } |
| | | const testVal = parseFloat(row.testValue); |
| | | if (isNaN(testVal)) return; |
| | | |
| | | let qualified = false; |
| | | if (row.judgeType === 'â¥') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal >= stdVal; |
| | | } else if (row.judgeType === 'â¤') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal <= stdVal; |
| | | } else if (row.judgeType === 'èå´') { |
| | | const minVal = parseFloat(row.minValue); |
| | | const maxVal = parseFloat(row.maxValue); |
| | | if (isNaN(minVal) || isNaN(maxVal)) return; |
| | | qualified = testVal >= minVal && testVal <= maxVal; |
| | | } else { |
| | | return; |
| | | } |
| | | row.isQualified = qualified ? 1 : 0; |
| | | performAutoJudgeAll(); |
| | | }; |
| | | |
| | | const handleTextResultChange = () => { |
| | | performAutoJudgeAll() |
| | | }; |
| | | |
| | | const performAutoJudgeAll = () => { |
| | | if (!tableData.value.length) return; |
| | | const allTextDesc = tableData.value.every(item => item.judgeType === 'æåæè¿°'); |
| | | if (allTextDesc) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const requiredParams = tableData.value.filter(item => item.isRequired === 1); |
| | | if (requiredParams.length === 0) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const hasUnqualified = requiredParams.some(item => item.isQualified === 0); |
| | | const allJudged = requiredParams.every(item => item.isQualified === 1 || item.isQualified === 0); |
| | | if (!allJudged) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | if (hasUnqualified) { |
| | | autoJudgeResult.value = 'ä¸åæ ¼'; |
| | | checkResult.value = 'ä¸åæ ¼'; |
| | | return; |
| | | } |
| | | const nonRequiredUnqualified = tableData.value.filter(item => item.isRequired !== 1 && item.isQualified === 0); |
| | | if (nonRequiredUnqualified.length > 0) { |
| | | autoJudgeResult.value = 'é¨ååæ ¼'; |
| | | checkResult.value = 'é¨ååæ ¼'; |
| | | } else { |
| | | autoJudgeResult.value = 'åæ ¼'; |
| | | checkResult.value = 'åæ ¼'; |
| | | } |
| | | }; |
| | | |
| | | const submitForm = () => { |
| | | performAutoJudgeAll(); |
| | | qualityInspectParamUpdate(tableData.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }) |
| | | } |
| | | // å
³éå¼¹æ¡ |
| | | const closeDia = () => { |
| | | dialogFormVisible.value = false; |
| | | emit('close') |
| | | }; |
| | | // å é¤ |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åæ ¼æ°éï¼" prop="qualifiedQuantity"> |
| | | <el-input-number :step="0.01" :min="0" :max="form.quantity || 0" style="width: 100%" |
| | | <el-input-number :step="0.01" :min="0" :max="form.quantity || undefined" style="width: 100%" |
| | | v-model="form.qualifiedQuantity" placeholder="请è¾å
¥" :precision="2" |
| | | @change="onQualifiedChange" :disabled="isViewMode"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸åæ ¼æ°éï¼" prop="unqualifiedQuantity"> |
| | | <el-input-number :step="0.01" :min="0" :max="form.quantity || 0" style="width: 100%" |
| | | <el-input-number :step="0.01" :min="0" :max="form.quantity || undefined" style="width: 100%" |
| | | v-model="form.unqualifiedQuantity" placeholder="请è¾å
¥" :precision="2" |
| | | @change="onUnqualifiedChange" :disabled="isViewMode"/> |
| | | </el-form-item> |
| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£éªè§å" prop="inspectRule"> |
| | | <el-radio-group v-model="form.inspectRule"> |
| | | <el-radio-group v-model="form.inspectRule" :disabled="isViewMode"> |
| | | <el-radio :label="0">å
¨æ£</el-radio> |
| | | <el-radio :label="1">æ½æ£</el-radio> |
| | | </el-radio-group> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµç»æï¼" prop="checkResult"> |
| | | <el-select v-model="form.checkResult" :disabled="isViewMode"> |
| | | <el-option label="åæ ¼" value="åæ ¼"/> |
| | | <el-option label="ä¸åæ ¼" value="ä¸åæ ¼"/> |
| | | <el-option label="é¨ååæ ¼" value="é¨ååæ ¼"/> |
| | | </el-select> |
| | | <el-radio-group v-model="form.checkResult" :disabled="isViewMode || autoJudgeResult === 'ä¸åæ ¼'"> |
| | | <el-radio label="åæ ¼">åæ ¼</el-radio> |
| | | <el-radio label="ä¸åæ ¼">ä¸åæ ¼</el-radio> |
| | | <el-radio label="é¨ååæ ¼">é¨ååæ ¼</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :tableLoading="tableLoading" |
| | | :isShowPagination="false" |
| | | height="400" |
| | | > |
| | | <template #slot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable :disabled="isViewMode"/> |
| | | <template #judgeTypeSlot="{ row }"> |
| | | <el-tag v-if="row.judgeType === 'â¥'" type="success">â¥</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'â¤'" type="warning">â¤</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'èå´'" type="info">èå´</el-tag> |
| | | <el-tag v-else>æå</el-tag> |
| | | </template> |
| | | <template #isRequiredSlot="{ row }"> |
| | | <el-tag v-if="row.isRequired === 1" type="danger">æ¯</el-tag> |
| | | <el-tag v-else type="info">å¦</el-tag> |
| | | </template> |
| | | <template #testValueSlot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable :disabled="isViewMode" @input="handleTestValueChange(row)" /> |
| | | </template> |
| | | <template #isQualifiedSlot="{ row }"> |
| | | <template v-if="row.judgeType !== 'æåæè¿°'"> |
| | | <el-tag v-if="row.isQualified === 1" type="success">åæ ¼</el-tag> |
| | | <el-tag v-else-if="row.isQualified === 0" type="danger">ä¸åæ ¼</el-tag> |
| | | <span v-else>-</span> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="row.isQualified" placeholder="è¯·éæ©" size="small" :disabled="isViewMode" @change="handleTextResultChange"> |
| | | <el-option :value="1" label="åæ ¼" /> |
| | | <el-option :value="0" label="ä¸åæ ¼" /> |
| | | </el-select> |
| | | </template> |
| | | </template> |
| | | </PIMTable> |
| | | |
| | | <div v-if="!isViewMode" style="margin-top: 16px;"> |
| | | <el-form label-width="120px"> |
| | | <el-form-item label="èªå¨å¤æç»æ"> |
| | | <template v-if="autoJudgeResult"> |
| | | <el-tag v-if="autoJudgeResult === 'åæ ¼'" type="success" size="large">åæ ¼</el-tag> |
| | | <el-tag v-else-if="autoJudgeResult === 'é¨ååæ ¼'" type="warning" size="large">é¨ååæ ¼</el-tag> |
| | | <el-tag v-else type="danger" size="large">ä¸åæ ¼</el-tag> |
| | | <span v-if="autoJudgeResult === 'ä¸åæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°æä¸åæ ¼é¡¹ï¼ä¸å¯æå¨ä¿®æ¹ï¼ |
| | | </span> |
| | | <span v-if="autoJudgeResult === 'é¨ååæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°ååæ ¼ï¼éå¿
è¦åæ°æä¸åæ ¼é¡¹ï¼å¯æå¨éæ©æç»ç»æï¼ |
| | | </span> |
| | | </template> |
| | | <template v-else> |
| | | <el-tag type="info" size="large">éæå¨å¤æ</el-tag> |
| | | <span style="margin-left: 10px; color: #909399;"> |
| | | ï¼ææåæ°å为æåæè¿°ç±»åï¼è¯·æå¨éæ©ï¼ |
| | | </span> |
| | | </template> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <template v-if="!isViewMode"> |
| | |
| | | model: "", |
| | | testStandardId: "", |
| | | unit: "", |
| | | quantity: "", |
| | | quantity: undefined, |
| | | stockInRatio: 100.00, |
| | | checkCompany: "", |
| | | checkResult: "", |
| | |
| | | }, |
| | | }); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "ææ ", |
| | | prop: "parameterItem", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "åå®¶æ åå¼", |
| | | prop: "standardValue", |
| | | }, |
| | | { |
| | | label: "å
æ§å¼", |
| | | prop: "controlValue", |
| | | }, |
| | | { |
| | | label: "æ£éªå¼", |
| | | prop: "testValue", |
| | | dataType: 'slot', |
| | | slot: 'slot', |
| | | }, |
| | | { label: "ææ ", prop: "parameterItem" }, |
| | | { label: "åä½", prop: "unit" }, |
| | | { label: "åå®¶æ åå¼", prop: "standardValue" }, |
| | | { label: "ä¸éå¼", prop: "minValue" }, |
| | | { label: "ä¸éå¼", prop: "maxValue" }, |
| | | { label: "å
æ§å¼", prop: "controlValue" }, |
| | | { label: "å¤æç±»å", prop: "judgeType", dataType: 'slot', slot: 'judgeTypeSlot' }, |
| | | { label: "å¿
è¦å¤æ", prop: "isRequired", dataType: 'slot', slot: 'isRequiredSlot' }, |
| | | { label: "æ£éªå¼", prop: "testValue", dataType: 'slot', slot: 'testValueSlot' }, |
| | | { label: "æ¯å¦åæ ¼", prop: "isQualified", dataType: 'slot', slot: 'isQualifiedSlot' }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const autoJudgeResult = ref(null); |
| | | |
| | | const {form, rules} = toRefs(data); |
| | | const supplierList = ref([]); |
| | |
| | | console.error("å è½½æ£éªåå表失败", e); |
| | | userList.value = []; |
| | | } |
| | | // å
éç½®è¡¨åæ°æ®ï¼ä¿æåæ®µå®æ´ï¼é¿å
å¼¹çªé¦æ¬¡æ¸²ææ¶è§¦åå¿
填红æ¡âéªä¸ä¸âï¼ |
| | | // å
éç½®è¡¨åæ°æ®ï¼ä¿æåæ®µå®æ´ï¼é¿å
å¼¹çªé¦æ¬¡æ¸²ææ¶è§¦åå¿
填红æ¡"éªä¸ä¸"ï¼ |
| | | form.value = { |
| | | checkTime: "", |
| | | supplier: "", |
| | |
| | | model: "", |
| | | testStandardId: "", |
| | | unit: "", |
| | | quantity: "", |
| | | quantity: undefined, |
| | | stockInRatio: 100.00, |
| | | checkCompany: "", |
| | | checkResult: "", |
| | |
| | | getQualityInspectParamList(row.id); |
| | | } |
| | | } |
| | | autoJudgeResult.value = null; |
| | | // æååæå¼å¼¹çªï¼å¹¶æ¸
çæ ¡éªæï¼é¿å
å¿
å¡«æç¤ºéªç |
| | | dialogFormVisible.value = true; |
| | | nextTick(() => { |
| | |
| | | }); |
| | | } |
| | | |
| | | const handleTestValueChange = (row) => { |
| | | if (isViewMode.value) return; |
| | | if (!row.testValue || !row.judgeType || row.judgeType === 'æåæè¿°') { |
| | | return; |
| | | } |
| | | const testVal = parseFloat(row.testValue); |
| | | if (isNaN(testVal)) return; |
| | | |
| | | let qualified = false; |
| | | if (row.judgeType === 'â¥') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal >= stdVal; |
| | | } else if (row.judgeType === 'â¤') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal <= stdVal; |
| | | } else if (row.judgeType === 'èå´') { |
| | | const minVal = parseFloat(row.minValue); |
| | | const maxVal = parseFloat(row.maxValue); |
| | | if (isNaN(minVal) || isNaN(maxVal)) return; |
| | | qualified = testVal >= minVal && testVal <= maxVal; |
| | | } else { |
| | | return; |
| | | } |
| | | row.isQualified = qualified ? 1 : 0; |
| | | performAutoJudgeAll(); |
| | | }; |
| | | |
| | | const handleTextResultChange = () => { |
| | | performAutoJudgeAll() |
| | | }; |
| | | |
| | | const performAutoJudgeAll = () => { |
| | | if (!tableData.value.length) return; |
| | | const allTextDesc = tableData.value.every(item => item.judgeType === 'æåæè¿°'); |
| | | if (allTextDesc) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const requiredParams = tableData.value.filter(item => item.isRequired === 1); |
| | | if (requiredParams.length === 0) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const hasUnqualified = requiredParams.some(item => item.isQualified === 0); |
| | | const allJudged = requiredParams.every(item => item.isQualified === 1 || item.isQualified === 0); |
| | | if (!allJudged) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | if (hasUnqualified) { |
| | | autoJudgeResult.value = 'ä¸åæ ¼'; |
| | | form.value.checkResult = 'ä¸åæ ¼'; |
| | | return; |
| | | } |
| | | const nonRequiredUnqualified = tableData.value.filter(item => item.isRequired !== 1 && item.isQualified === 0); |
| | | if (nonRequiredUnqualified.length > 0) { |
| | | autoJudgeResult.value = 'é¨ååæ ¼'; |
| | | form.value.checkResult = 'é¨ååæ ¼'; |
| | | } else { |
| | | autoJudgeResult.value = 'åæ ¼'; |
| | | form.value.checkResult = 'åæ ¼'; |
| | | } |
| | | }; |
| | | |
| | | // æäº¤äº§å表å |
| | | const submitForm = () => { |
| | | proxy.$refs.formRef.validate(valid => { |
| | | if (valid) { |
| | | performAutoJudgeAll(); |
| | | form.value.inspectType = 0 |
| | | if (operationType.value === "add") { |
| | | tableData.value.forEach((item) => { |
| | |
| | | } |
| | | // èªå¨è®¡ç®åæ ¼æ°éååæ¶çä¸åæ ¼æ°é |
| | | const onQualifiedChange = (value) => { |
| | | if (form.value.quantity !== undefined && form.value.quantity !== null) { |
| | | const maxUnqualified = form.value.quantity - value; |
| | | if (maxUnqualified >= 0) { |
| | | form.value.unqualifiedQuantity = maxUnqualified; |
| | | } else { |
| | | form.value.qualifiedQuantity = form.value.quantity; |
| | | form.value.unqualifiedQuantity = 0; |
| | | } |
| | | } |
| | | const qty = parseFloat(form.value.quantity); |
| | | if (isNaN(qty) || qty <= 0) return; |
| | | const val = parseFloat(value) || 0; |
| | | form.value.unqualifiedQuantity = Math.max(0, qty - val); |
| | | }; |
| | | |
| | | // èªå¨è®¡ç®ä¸åæ ¼æ°éååæ¶çåæ ¼æ°é |
| | | const onUnqualifiedChange = (value) => { |
| | | if (form.value.quantity !== undefined && form.value.quantity !== null) { |
| | | const maxQualified = form.value.quantity - value; |
| | | if (maxQualified >= 0) { |
| | | form.value.qualifiedQuantity = maxQualified; |
| | | } else { |
| | | form.value.unqualifiedQuantity = form.value.quantity; |
| | | form.value.qualifiedQuantity = 0; |
| | | } |
| | | } |
| | | const qty = parseFloat(form.value.quantity); |
| | | if (isNaN(qty) || qty <= 0) return; |
| | | const val = parseFloat(value) || 0; |
| | | form.value.qualifiedQuantity = Math.max(0, qty - val); |
| | | }; |
| | | |
| | | // å
³éå¼¹æ¡ |
| | |
| | | tableData.value = []; |
| | | testStandardOptions.value = []; |
| | | form.value.testStandardId = ''; |
| | | autoJudgeResult.value = null; |
| | | dialogFormVisible.value = false; |
| | | emit('close') |
| | | }; |
| | |
| | | width="70%" |
| | | @close="closeDia" |
| | | > |
| | | <div style="margin-bottom: 10px;text-align: right"> |
| | | <div v-if="!isViewMode" style="margin-bottom: 10px;text-align: right"> |
| | | <el-button type="danger" plain @click="handleDelete">å é¤</el-button> |
| | | </div> |
| | | <PIMTable |
| | |
| | | :tableData="tableData" |
| | | :tableLoading="tableLoading" |
| | | :isSelection="true" |
| | | :isShowPagination="false" |
| | | @selection-change="handleSelectionChange" |
| | | height="600" |
| | | height="400" |
| | | > |
| | | <template #slot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable/> |
| | | <template #judgeTypeSlot="{ row }"> |
| | | <el-tag v-if="row.judgeType === 'â¥'" type="success">â¥</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'â¤'" type="warning">â¤</el-tag> |
| | | <el-tag v-else-if="row.judgeType === 'èå´'" type="info">èå´</el-tag> |
| | | <el-tag v-else>æå</el-tag> |
| | | </template> |
| | | <template #isRequiredSlot="{ row }"> |
| | | <el-tag v-if="row.isRequired === 1" type="danger">æ¯</el-tag> |
| | | <el-tag v-else type="info">å¦</el-tag> |
| | | </template> |
| | | <template #testValueSlot="{ row }"> |
| | | <el-input v-model="row.testValue" clearable :disabled="isViewMode" @input="handleTestValueChange(row)" /> |
| | | </template> |
| | | <template #isQualifiedSlot="{ row }"> |
| | | <template v-if="row.judgeType !== 'æåæè¿°'"> |
| | | <el-tag v-if="row.isQualified === 1" type="success">åæ ¼</el-tag> |
| | | <el-tag v-else-if="row.isQualified === 0" type="danger">ä¸åæ ¼</el-tag> |
| | | <span v-else>-</span> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="row.isQualified" placeholder="è¯·éæ©" size="small" :disabled="isViewMode" @change="handleTextResultChange(row)"> |
| | | <el-option :value="1" label="åæ ¼" /> |
| | | <el-option :value="0" label="ä¸åæ ¼" /> |
| | | </el-select> |
| | | </template> |
| | | </template> |
| | | </PIMTable> |
| | | |
| | | <div style="margin-top: 16px;"> |
| | | <el-form label-width="120px"> |
| | | <el-form-item label="èªå¨å¤æç»æ"> |
| | | <template v-if="autoJudgeResult"> |
| | | <el-tag v-if="autoJudgeResult === 'åæ ¼'" type="success" size="large">åæ ¼</el-tag> |
| | | <el-tag v-else-if="autoJudgeResult === 'é¨ååæ ¼'" type="warning" size="large">é¨ååæ ¼</el-tag> |
| | | <el-tag v-else type="danger" size="large">ä¸åæ ¼</el-tag> |
| | | <span v-if="autoJudgeResult === 'ä¸åæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°æä¸åæ ¼é¡¹ï¼ä¸å¯æå¨ä¿®æ¹ï¼ |
| | | </span> |
| | | <span v-if="autoJudgeResult === 'é¨ååæ ¼'" style="margin-left: 10px; color: #909399;"> |
| | | ï¼å¿
è¦å¤æåæ°ååæ ¼ï¼éå¿
è¦åæ°æä¸åæ ¼é¡¹ï¼å¯æå¨éæ©æç»ç»æï¼ |
| | | </span> |
| | | </template> |
| | | <template v-else> |
| | | <el-tag type="info" size="large">éæå¨å¤æ</el-tag> |
| | | <span style="margin-left: 10px; color: #909399;"> |
| | | ï¼ææåæ°å为æåæè¿°ç±»åï¼è¯·æå¨éæ©ï¼ |
| | | </span> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="æç»å¤å®"> |
| | | <el-radio-group v-model="checkResult" :disabled="isViewMode || autoJudgeResult === 'ä¸åæ ¼'"> |
| | | <el-radio label="åæ ¼">åæ ¼</el-radio> |
| | | <el-radio label="ä¸åæ ¼">ä¸åæ ¼</el-radio> |
| | | <el-radio label="é¨ååæ ¼">é¨ååæ ¼</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <template v-if="!isViewMode"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | | </template> |
| | | <el-button v-else @click="closeDia">å
³é</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import { ref, computed, getCurrentInstance } from "vue"; |
| | | import { |
| | | qualityInspectParamDel, |
| | | qualityInspectParamInfo, |
| | |
| | | const operationType = ref('') |
| | | const currentId = ref('') |
| | | const selectedRows = ref([]); |
| | | const autoJudgeResult = ref(null) |
| | | const checkResult = ref('') |
| | | const isViewMode = computed(() => operationType.value === 'view') |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "ææ ", |
| | | prop: "parameterItem", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "åå®¶æ åå¼", |
| | | prop: "standardValue", |
| | | }, |
| | | { |
| | | label: "å
æ§å¼", |
| | | prop: "controlValue", |
| | | }, |
| | | { |
| | | label: "æ£éªå¼", |
| | | prop: "testValue", |
| | | dataType: 'slot', |
| | | slot: 'slot', |
| | | }, |
| | | { label: "ææ ", prop: "parameterItem" }, |
| | | { label: "åä½", prop: "unit" }, |
| | | { label: "åå®¶æ åå¼", prop: "standardValue" }, |
| | | { label: "ä¸éå¼", prop: "minValue" }, |
| | | { label: "ä¸éå¼", prop: "maxValue" }, |
| | | { label: "å
æ§å¼", prop: "controlValue" }, |
| | | { label: "å¤æç±»å", prop: "judgeType", dataType: 'slot', slot: 'judgeTypeSlot' }, |
| | | { label: "å¿
è¦å¤æ", prop: "isRequired", dataType: 'slot', slot: 'isRequiredSlot' }, |
| | | { label: "æ£éªå¼", prop: "testValue", dataType: 'slot', slot: 'testValueSlot' }, |
| | | { label: "æ¯å¦åæ ¼", prop: "isQualified", dataType: 'slot', slot: 'isQualifiedSlot' }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | if (operationType.value === 'edit') { |
| | | autoJudgeResult.value = null |
| | | checkResult.value = '' |
| | | if (operationType.value === 'edit' || operationType.value === 'view') { |
| | | currentId.value = row.id; |
| | | getList() |
| | | } |
| | |
| | | tableData.value = res.data; |
| | | }) |
| | | } |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | // æäº¤äº§å表å |
| | | |
| | | const handleTestValueChange = (row) => { |
| | | if (isViewMode.value) return; |
| | | if (!row.testValue || !row.judgeType || row.judgeType === 'æåæè¿°') { |
| | | return; |
| | | } |
| | | const testVal = parseFloat(row.testValue); |
| | | if (isNaN(testVal)) return; |
| | | |
| | | let qualified = false; |
| | | if (row.judgeType === 'â¥') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal >= stdVal; |
| | | } else if (row.judgeType === 'â¤') { |
| | | const stdVal = parseFloat(row.standardValue); |
| | | if (isNaN(stdVal)) return; |
| | | qualified = testVal <= stdVal; |
| | | } else if (row.judgeType === 'èå´') { |
| | | const minVal = parseFloat(row.minValue); |
| | | const maxVal = parseFloat(row.maxValue); |
| | | if (isNaN(minVal) || isNaN(maxVal)) return; |
| | | qualified = testVal >= minVal && testVal <= maxVal; |
| | | } else { |
| | | return; |
| | | } |
| | | row.isQualified = qualified ? 1 : 0; |
| | | performAutoJudgeAll(); |
| | | }; |
| | | |
| | | const handleTextResultChange = () => { |
| | | performAutoJudgeAll() |
| | | }; |
| | | |
| | | const performAutoJudgeAll = () => { |
| | | if (!tableData.value.length) return; |
| | | const allTextDesc = tableData.value.every(item => item.judgeType === 'æåæè¿°'); |
| | | if (allTextDesc) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const requiredParams = tableData.value.filter(item => item.isRequired === 1); |
| | | if (requiredParams.length === 0) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | const hasUnqualified = requiredParams.some(item => item.isQualified === 0); |
| | | const allJudged = requiredParams.every(item => item.isQualified === 1 || item.isQualified === 0); |
| | | if (!allJudged) { |
| | | autoJudgeResult.value = null; |
| | | return; |
| | | } |
| | | if (hasUnqualified) { |
| | | autoJudgeResult.value = 'ä¸åæ ¼'; |
| | | checkResult.value = 'ä¸åæ ¼'; |
| | | return; |
| | | } |
| | | const nonRequiredUnqualified = tableData.value.filter(item => item.isRequired !== 1 && item.isQualified === 0); |
| | | if (nonRequiredUnqualified.length > 0) { |
| | | autoJudgeResult.value = 'é¨ååæ ¼'; |
| | | checkResult.value = 'é¨ååæ ¼'; |
| | | } else { |
| | | autoJudgeResult.value = 'åæ ¼'; |
| | | checkResult.value = 'åæ ¼'; |
| | | } |
| | | }; |
| | | |
| | | const submitForm = () => { |
| | | performAutoJudgeAll(); |
| | | qualityInspectParamUpdate(tableData.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }) |
| | | } |
| | | // å
³éå¼¹æ¡ |
| | | const closeDia = () => { |
| | | dialogFormVisible.value = false; |
| | | emit('close') |
| | | }; |
| | | // å é¤ |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # å 餿鮿éåæ´ææ¡£ |
| | | |
| | | ## åæ´æ¦è¿° |
| | | |
| | | 为项ç®ä¸ææå 餿鮿·»å äº `v-hasPermi` æéæä»¤ï¼æ¶å **149 ä¸ªé¡µé¢æä»¶**ï¼æ°å¢ **107 个æéæ è¯**ã |
| | | |
| | | ## åæ´æ¹å¼ |
| | | |
| | | ### 1. ç´æ¥ `<el-button>` å
ç´ |
| | | |
| | | å¨å 餿é®ç HTML æ ç¾ä¸æ·»å `v-hasPermi` æä»¤ï¼ |
| | | |
| | | ```html |
| | | <!-- ä¿®æ¹å --> |
| | | <el-button type="danger" @click="handleDelete">å é¤</el-button> |
| | | |
| | | <!-- ä¿®æ¹å --> |
| | | <el-button type="danger" @click="handleDelete" v-hasPermi="['module:entity:remove']">å é¤</el-button> |
| | | ``` |
| | | |
| | | ### 2. PIMTable ç»ä»¶å
æä½æé® |
| | | |
| | | å¨è¡¨æ ¼æä½åçå 餿ä½é
ç½®å¯¹è±¡ä¸æ·»å `hasPermi` 屿§ï¼ |
| | | |
| | | ```javascript |
| | | // ä¿®æ¹å |
| | | { name: "å é¤", type: "text", clickFun: (row) => handleDelete(row) } |
| | | |
| | | // ä¿®æ¹å |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => handleDelete(row), |
| | | hasPermi: ['module:entity:remove'] |
| | | } |
| | | ``` |
| | | |
| | | ### 3. åºç¡ç»ä»¶æ¯æ |
| | | |
| | | - **PIMTable.vue**ï¼`src/components/PIMTable/PIMTable.vue`ï¼ï¼æä½æé®å¢å `v-hasPermi="o.hasPermi"` æ¯æ |
| | | - **hasPermi.js**ï¼`src/directive/permission/hasPermi.js`ï¼ï¼ç§»é¤æªé
ç½®æéæ¶çå¼å¸¸æåºï¼æ¹ä¸ºéé»è·³è¿ï¼ä½¿ `hasPermi` å为å¯é屿§ |
| | | |
| | | ## æéå½åè§è |
| | | |
| | | æ ¼å¼ï¼`module:entity:action` |
| | | |
| | | - `module` â æ¨¡åç®å½åï¼é©¼å³°æ ¼å¼ä¿æä¸è´ï¼ |
| | | - `entity` â å®ä½/页é¢åï¼å»æ `.vue` åç¼å `components`/`Detail` ç®å½å±çº§ï¼ |
| | | - `action` â æä½ç±»åï¼å é¤ç»ä¸ä½¿ç¨ `remove` |
| | | |
| | | ## æéæ¸
åï¼ææ¨¡åï¼ |
| | | |
| | | ### åºç¡æ°æ®ï¼basicDataï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `basicData:customerFile:remove` | å®¢æ·æ¡£æ¡ | |
| | | | `basicData:customerFileOpenSea:remove` | å
¬æµ·å®¢æ·æ¡£æ¡ | |
| | | | `basicData:parameterMaintenance:remove` | åæ°ç»´æ¤ | |
| | | | `basicData:product:remove` | 产å管ç | |
| | | | `basicData:supplierManage:remove` | ä¾åºå管çï¼å«é»ååãéä»¶å¼¹çªï¼ | |
| | | |
| | | ### åååå
¬ï¼collaborativeApprovalï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `collaborativeApproval:approvalManagement:remove` | 审æ¹ç®¡ç | |
| | | | `collaborativeApproval:approvalProcess:remove` | å®¡æ¹æµç¨ | |
| | | | `collaborativeApproval:attendanceManagement:remove` | èå¤ç®¡ç | |
| | | | `collaborativeApproval:knowledgeBase:remove` | ç¥è¯åº | |
| | | | `collaborativeApproval:meetDraft:remove` | ä¼è®®è稿 | |
| | | | `collaborativeApproval:meetSetting:remove` | ä¼è®®è®¾ç½® | |
| | | | `collaborativeApproval:noticeManagement:remove` | éç¥å
¬å管ç | |
| | | | `collaborativeApproval:notificationManagement:remove` | æ¶æ¯éç¥ç®¡ç | |
| | | | `collaborativeApproval:officeSupplies:remove` | åå
¬ç¨å | |
| | | | `collaborativeApproval:purchaseApproval:remove` | éè´å®¡æ¹ | |
| | | | `collaborativeApproval:rpaManagement:remove` | RPA 管ç | |
| | | |
| | | ### 客æç®¡çï¼customerServiceï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `customerService:expiryAfterSales:remove` | å°æå®å | |
| | | | `customerService:feedbackRegistration:remove` | åé¦ç»è®° | |
| | | |
| | | ### è½æºç®¡çï¼energyManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `energyManagement:dynamicEnergySaving:remove` | 卿èè½ | |
| | | | `energyManagement:energyArea:remove` | è½æºåºå | |
| | | | `energyManagement:energyPeriodTime:remove` | è½æºæ¶æ®µ | |
| | | | `energyManagement:energyPower:remove` | è½æºçµå | |
| | | | `energyManagement:meterCollection:remove` | 仪表éé | |
| | | | `energyManagement:waterManagement:remove` | ç¨æ°´ç®¡çï¼å«æ°´è´¹è´¦åï¼ | |
| | | |
| | | ### 设å¤ç®¡çï¼equipmentManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `equipmentManagement:brand:remove` | åç管ç | |
| | | | `equipmentManagement:calibration:remove` | è®¡éæ ¡å | |
| | | | `equipmentManagement:inspectionManagement:remove` | å·¡æ£ç®¡ç | |
| | | | `equipmentManagement:ledger:remove` | 设å¤å°è´¦ | |
| | | | `equipmentManagement:measurementEquipment:remove` | 计éå¨å
·ï¼å«éä»¶å¼¹çªï¼ | |
| | | | `equipmentManagement:repair:remove` | 设å¤ç»´ä¿® | |
| | | | `equipmentManagement:spareParts:remove` | å¤åå¤ä»¶ | |
| | | | `equipmentManagement:upkeep:remove` | 设å¤ä¿å
» | |
| | | |
| | | ### æ¡£æ¡ç®¡çï¼fileManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `fileManagement:bookshelf:remove` | 书æ¶ç®¡ç | |
| | | | `fileManagement:borrow:remove` | åé
管ç | |
| | | | `fileManagement:document:remove` | ææ¡£ç®¡çï¼å«é件管çï¼ | |
| | | | `fileManagement:return:remove` | å½è¿ç®¡ç | |
| | | |
| | | ### è´¢å¡ç®¡çï¼financialManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `financialManagement:fixedAssets:remove` | åºå®èµäº§ | |
| | | | `financialManagement:intangibleAssets:remove` | æ å½¢èµäº§ | |
| | | | `financialManagement:generalLedger:remove` | æ»è´¦ | |
| | | | `financialManagement:voucher:remove` | åè¯ç®¡ç | |
| | | | `financialManagement:inputInvoice:remove` | è¿é¡¹å票 | |
| | | | `financialManagement:outputInvoice:remove` | é项å票 | |
| | | | `financialManagement:invoiceApply:remove` | å¼ç¥¨ç³è¯· | |
| | | | `financialManagement:receipt:remove` | æ¶æ¬¾å | |
| | | | `financialManagement:paymentApply:remove` | 仿¬¾ç³è¯· | |
| | | | `financialManagement:payableReconciliation:remove` | åºä»å¯¹è´¦ | |
| | | | `financialManagement:receivableReconciliation:remove` | åºæ¶å¯¹è´¦ | |
| | | | `financialManagement:payable:remove` | åºä»è´¦æ¬¾ | |
| | | |
| | | ### åºå管çï¼inventoryManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `inventoryManagement:inventoryManagement:remove` | åºåæ»è§ | |
| | | | `inventoryManagement:dispatchLog:remove` | åè´§è®°å½ | |
| | | | `inventoryManagement:receiptManagement:remove` | æ¶è´§ç®¡ç | |
| | | | `inventoryManagement:stockWarning:remove` | åºåé¢è¦ | |
| | | | `inventoryManagement:transportTaskManagement:remove` | è¿è¾ä»»å¡ç®¡ç | |
| | | | `inventoryManagement:vehicleManagement:remove` | 车è¾ç®¡ç | |
| | | | `inventoryManagement:vehicleFuelManagement:remove` | 车è¾ç油管ç | |
| | | |
| | | ### å·¥å管çï¼lavorissueï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `lavorissue:ledger:remove` | å·¥åå°è´¦ï¼å«éä»¶å¼¹çªï¼ | |
| | | |
| | | ### åå
¬æµç¨èªå¨åï¼officeProcessAutomationï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `officeProcessAutomation:enterpriseNews:remove` | ä¼ä¸æ°é» | |
| | | | `officeProcessAutomation:approveList:remove` | 审æ¹å表 | |
| | | | `officeProcessAutomation:approveTemplate:remove` | å®¡æ¹æ¨¡æ¿ | |
| | | | `officeProcessAutomation:reimburseManage:remove` | æ¥é管çï¼å·®æ
æ¥éãè´¹ç¨æ¥éï¼ | |
| | | | `officeProcessAutomation:staffContract:remove` | åå·¥åå | |
| | | | `officeProcessAutomation:staffArchive:remove` | åå·¥æ¡£æ¡ | |
| | | |
| | | ### 人äºç®¡çï¼personnelManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `personnelManagement:attendanceCheckin:remove` | è夿å¡è§å | |
| | | | `personnelManagement:monthlyStatistics:remove` | æåº¦ç»è®¡ | |
| | | | `personnelManagement:payrollManagement:remove` | èªé
¬ç®¡ç | |
| | | | `personnelManagement:scheduling:remove` | æç管ç | |
| | | | `personnelManagement:selfService:remove` | èªå©æå¡ | |
| | | | `personnelManagement:socialSecuritySet:remove` | 社ä¿è®¾ç½® | |
| | | |
| | | ### éè´ç®¡çï¼procurementManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `procurementManagement:advancedPriceManagement:remove` | é«çº§ä»·æ ¼ç®¡ç | |
| | | | `procurementManagement:arrivalManagement:remove` | å°è´§ç®¡ç | |
| | | | `procurementManagement:priceManagement:remove` | ä»·æ ¼ç®¡ç | |
| | | | `procurementManagement:procurementLedger:remove` | éè´å°è´¦ | |
| | | | `procurementManagement:procurementPlan:remove` | éè´è®¡å | |
| | | | `procurementManagement:purchaseOrder:remove` | éè´è®¢å | |
| | | | `procurementManagement:purchaseReturnOrder:remove` | éè´éè´§å | |
| | | | `procurementManagement:qualityInspection:remove` | è´¨éæ£éª | |
| | | | `procurementManagement:returnManagement:remove` | é货管ç | |
| | | |
| | | ### 产å管çï¼productManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `productManagement:productIdentifier:remove` | äº§åæ è¯ | |
| | | |
| | | ### ç产管çï¼productionManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|-----------| |
| | | | `product:bom:remove` | 产åç»æï¼BOMï¼ | |
| | | | `productionManagement:processRoute:remove` | å·¥èºè·¯çº¿å表 | |
| | | | `productionManagement:productionProcess:remove` | å·¥åºç®¡ç | |
| | | | `productionManagement:productionReporting:remove` | æ¥å·¥å°è´¦ | |
| | | |
| | | ### ç产计åï¼productionPlanï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|-------| |
| | | | `productionPlan:productionPlan:remove` | 主ç产计å | |
| | | |
| | | ### 项ç®ç®¡çï¼projectManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `projectManagement:Management:remove` | 项ç®ç®¡ç | |
| | | | `projectManagement:projectType:remove` | 项ç®ç±»å | |
| | | |
| | | ### è´¨é管çï¼qualityManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `qualityManagement:finalInspection:remove` | æåæ£éª | |
| | | | `qualityManagement:metricBinding:remove` | ææ ç»å® | |
| | | | `qualityManagement:metricMaintenance:remove` | ææ ç»´æ¤ | |
| | | | `qualityManagement:nonconformingManagement:remove` | ä¸åæ ¼å管ç | |
| | | | `qualityManagement:processInspection:remove` | è¿ç¨æ£éª | |
| | | | `qualityManagement:rawMaterialInspection:remove` | åæææ£éª | |
| | | |
| | | ### å®å
¨ç产ï¼safeProductionï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `safeProduction:accidentReportingRecord:remove` | äºæ
æ¥åè®°å½ | |
| | | | `safeProduction:dangerInvestigation:remove` | éæ£ææ¥ | |
| | | | `safeProduction:emergencyPlanReview:remove` | åºæ¥é¢æ¡è¯å®¡ | |
| | | | `safeProduction:hazardSourceLedger:remove` | å±é©æºå°è´¦ | |
| | | | `safeProduction:hazardousMaterialsControl:remove` | å±é©åç®¡æ§ | |
| | | | `safeProduction:safeQualifications:remove` | å®å
¨èµè´¨ | |
| | | | `safeProduction:safeWorkApproval:remove` | å®å
¨ä½ä¸å®¡æ¹ | |
| | | | `safeProduction:safetyTrainingAssessment:remove` | å®å
¨å¹è®èæ ¸ | |
| | | |
| | | ### éå®ç®¡çï¼salesManagementï¼ |
| | | |
| | | | æéæ è¯ | 对åºé¡µé¢ | |
| | | |---|---| |
| | | | `salesManagement:deliveryLedger:remove` | åè´§å°è´¦ | |
| | | | `salesManagement:paymentShipping:remove` | 仿¬¾åè´§ | |
| | | | `salesManagement:returnOrder:remove` | éè´§å | |
| | | | `salesManagement:salesLedger:remove` | éå®å°è´¦ | |
| | | | `salesManagement:salesQuotation:remove` | é宿¥ä»· | |
| | | | `salesManagement:salespersonManagement:remove` | éå®å管ç | |
| | | | `salesManagement:strategyControl:remove` | çç¥æ§å¶ | |
| | | |
| | | ## ç»è®¡æ±æ» |
| | | |
| | | | é¡¹ç® | æ°é | |
| | | |---|---| |
| | | | æ°å¢æéæ è¯ | 104 | |
| | | | ä¿®æ¹é¡µé¢æä»¶ | 145 | |
| | | | æ¶åä¸å¡æ¨¡å | 20 | |
| | | |
| | | ## æéçææºå¶ |
| | | |
| | | 1. æééè¿ `v-hasPermi` æä»¤æ§å¶ï¼æä»¤ä»å½åç»å½ç¨æ·ç `permissions` åè¡¨ä¸æ¥æ¾å¹é
项 |
| | | 2. 管ç忥æéé
æé `*:*:*`ï¼ä¸å任使ééå¶ |
| | | 3. æ®éç¨æ·éå¨åå°ä¸ºå
¶è§è²åé
å¯¹åºæ¨¡åç `remove` æéåï¼æè½çå°å¹¶ä½¿ç¨å é¤æé® |
| | | 4. æªé
ç½®æéæ°ç»æ¶ï¼`hasPermi` 为 `undefined`ï¼ï¼æé®æ£å¸¸æ¾ç¤ºï¼ååå
¼å®¹ï¼ |