feat(mes): 更新检验单和缺陷记录相关功能,优化表单和列表展示
parent
13e0222d0c
commit
a65c5c4cfb
|
|
@ -63,16 +63,14 @@
|
||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
>
|
>
|
||||||
<el-form-item label="检验行" prop="lineId">
|
<el-form-item label="检验行" prop="lineId">
|
||||||
<el-select
|
<!-- TODO @AI:使用组件 -->
|
||||||
v-model="formData.lineId"
|
<el-select v-model="formData.lineId" placeholder="请选择检验行" filterable class="!w-1/1">
|
||||||
placeholder="请选择检验行"
|
|
||||||
filterable
|
|
||||||
class="!w-1/1"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="line in lineList"
|
v-for="line in lineList"
|
||||||
:key="line.id"
|
:key="line.id"
|
||||||
:label="line.indicatorName + (line.indicatorCode ? ' (' + line.indicatorCode + ')' : '')"
|
:label="
|
||||||
|
line.indicatorName + (line.indicatorCode ? ' (' + line.indicatorCode + ')' : '')
|
||||||
|
"
|
||||||
:value="line.id"
|
:value="line.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -81,11 +79,7 @@
|
||||||
<el-input v-model="formData.defectName" placeholder="请输入缺陷描述" />
|
<el-input v-model="formData.defectName" placeholder="请输入缺陷描述" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="缺陷等级" prop="defectLevel">
|
<el-form-item label="缺陷等级" prop="defectLevel">
|
||||||
<el-select
|
<el-select v-model="formData.defectLevel" placeholder="请选择缺陷等级" class="!w-1/1">
|
||||||
v-model="formData.defectLevel"
|
|
||||||
placeholder="请选择缺陷等级"
|
|
||||||
class="!w-1/1"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getStrDictOptions(DICT_TYPE.MES_DEFECT_LEVEL)"
|
v-for="dict in getStrDictOptions(DICT_TYPE.MES_DEFECT_LEVEL)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="1080px">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="1080px">
|
||||||
<!-- 基本信息表单 -->
|
<!-- 基本信息表单 -->
|
||||||
|
<!-- TODO @AI:分割线:物料与供应商 -->
|
||||||
|
<!-- TODO @AI:分割线:检测情况 -->
|
||||||
|
<!-- TODO @AI:分割线:缺陷情况 -->
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
|
|
@ -219,14 +222,19 @@
|
||||||
<!-- 子表标签页(编辑模式下显示) -->
|
<!-- 子表标签页(编辑模式下显示) -->
|
||||||
<template v-if="formType === 'update' && formData.id">
|
<template v-if="formType === 'update' && formData.id">
|
||||||
<el-divider />
|
<el-divider />
|
||||||
|
<!-- TODO @AI:检验项、检测结果 -->
|
||||||
<el-tabs v-model="activeTab">
|
<el-tabs v-model="activeTab">
|
||||||
<el-tab-pane label="检验行" name="line">
|
<el-tab-pane label="检验项" name="line">
|
||||||
<IqcLineList :iqc-id="formData.id" />
|
<IqcLineList :iqc-id="formData.id" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="缺陷记录" name="defect">
|
<el-tab-pane label="检测结果" name="defect">
|
||||||
<IqcDefectList :iqc-id="formData.id" />
|
<IqcDefectList :iqc-id="formData.id" /> <!-- TODO <--- 这个组件,貌似是缺陷记录; -->
|
||||||
|
<!-- TODO @AI -->
|
||||||
|
<!-- TODO @AI:样品编码:生成操作; -->
|
||||||
|
<!-- TODO @AI:SN -->
|
||||||
|
<!-- TODO @AI:备注 -->
|
||||||
|
<!-- TODO @AI:el 风格符【检测值】:检测项1、检测值 -->
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- TODO @芋艿:检验结果 tab(qc_result 实现后添加) -->
|
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -261,6 +269,8 @@ import MdItemSelect from '@/views/mes/md/item/components/MdItemSelect.vue'
|
||||||
import IqcLineList from './IqcLineList.vue'
|
import IqcLineList from './IqcLineList.vue'
|
||||||
import IqcDefectList from './IqcDefectList.vue'
|
import IqcDefectList from './IqcDefectList.vue'
|
||||||
|
|
||||||
|
// TODO @AI:/Users/yunai/Java/yudao-all-in-one/yudao-ui-admin-vue3/src/views/mes/qc/indicator/IndicatorForm.vue
|
||||||
|
|
||||||
defineOptions({ name: 'IqcForm' })
|
defineOptions({ name: 'IqcForm' })
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
@ -273,6 +283,7 @@ const formType = ref('')
|
||||||
const activeTab = ref('line')
|
const activeTab = ref('line')
|
||||||
|
|
||||||
// 关联数据回显
|
// 关联数据回显
|
||||||
|
// TODO @AI:换成下拉框
|
||||||
const vendorNickname = ref('')
|
const vendorNickname = ref('')
|
||||||
const itemName = ref('')
|
const itemName = ref('')
|
||||||
const itemSpecification = ref('')
|
const itemSpecification = ref('')
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
<div>
|
<div>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||||
|
<!-- TODO @AI:检测项名称、检测项类型、检测工具、检测要求、标准值、单位、误差上限、误差下限、致命缺陷数、严重缺陷数、轻微缺陷数、备注 -->
|
||||||
<el-table-column label="检测指标编码" align="center" prop="indicatorCode" width="140" />
|
<el-table-column label="检测指标编码" align="center" prop="indicatorCode" width="140" />
|
||||||
<el-table-column label="检测指标名称" align="center" prop="indicatorName" min-width="150" />
|
<el-table-column label="检测指标名称" align="center" prop="indicatorName" min-width="150" />
|
||||||
<el-table-column label="检测指标类型" align="center" prop="indicatorType" width="120">
|
<el-table-column label="检测指标类型" align="center" prop="indicatorType" width="120">
|
||||||
|
|
@ -19,6 +20,7 @@
|
||||||
<el-table-column label="致命缺陷数" align="center" prop="criticalQuantity" width="100" />
|
<el-table-column label="致命缺陷数" align="center" prop="criticalQuantity" width="100" />
|
||||||
<el-table-column label="严重缺陷数" align="center" prop="majorQuantity" width="100" />
|
<el-table-column label="严重缺陷数" align="center" prop="majorQuantity" width="100" />
|
||||||
<el-table-column label="轻微缺陷数" align="center" prop="minorQuantity" width="100" />
|
<el-table-column label="轻微缺陷数" align="center" prop="minorQuantity" width="100" />
|
||||||
|
<!-- TODO @AI:操作:【缺陷记录】弹窗 -->
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,8 @@
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- TODO @AI:检测结论 -->
|
||||||
|
<!-- TODO @AI:字典,只需要:校验通过、校验不通过 -->
|
||||||
<el-form-item label="检测结果" prop="checkResult">
|
<el-form-item label="检测结果" prop="checkResult">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.checkResult"
|
v-model="queryParams.checkResult"
|
||||||
|
|
@ -58,13 +60,9 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- TODO @AI:单据状态,去掉 -->
|
||||||
<el-form-item label="单据状态" prop="status">
|
<el-form-item label="单据状态" prop="status">
|
||||||
<el-select
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable class="!w-240px">
|
||||||
v-model="queryParams.status"
|
|
||||||
placeholder="请选择状态"
|
|
||||||
clearable
|
|
||||||
class="!w-240px"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.MES_QC_IQC_STATUS)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.MES_QC_IQC_STATUS)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
|
@ -95,6 +93,7 @@
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- TODO @AI:检测人员,下拉选择 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
|
|
@ -122,10 +121,12 @@
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||||
|
<!-- TODO @AI:来料检验单编号、来料检验单名称 -->
|
||||||
<el-table-column label="检验单编号" align="center" prop="code" width="160" />
|
<el-table-column label="检验单编号" align="center" prop="code" width="160" />
|
||||||
<el-table-column label="检验单名称" align="center" prop="name" min-width="180" />
|
<el-table-column label="检验单名称" align="center" prop="name" min-width="180" />
|
||||||
<el-table-column label="供应商" align="center" prop="vendorNickname" width="120" />
|
<el-table-column label="供应商简称" align="center" prop="vendorNickname" width="120" />
|
||||||
<el-table-column label="供应商批次号" align="center" prop="vendorBatch" width="130" />
|
<el-table-column label="供应商批次号" align="center" prop="vendorBatch" width="130" />
|
||||||
|
<!-- TODO @AI:产品物料编码、产品物料名称 -->
|
||||||
<el-table-column label="物料编码" align="center" prop="itemCode" width="130" />
|
<el-table-column label="物料编码" align="center" prop="itemCode" width="130" />
|
||||||
<el-table-column label="物料名称" align="center" prop="itemName" min-width="150" />
|
<el-table-column label="物料名称" align="center" prop="itemName" min-width="150" />
|
||||||
<el-table-column label="接收数量" align="center" prop="receivedQuantity" width="100" />
|
<el-table-column label="接收数量" align="center" prop="receivedQuantity" width="100" />
|
||||||
|
|
@ -140,23 +141,24 @@
|
||||||
label="来料日期"
|
label="来料日期"
|
||||||
align="center"
|
align="center"
|
||||||
prop="receiveDate"
|
prop="receiveDate"
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter2"
|
||||||
width="180px"
|
width="180px"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="检测日期"
|
label="检测日期"
|
||||||
align="center"
|
align="center"
|
||||||
prop="inspectDate"
|
prop="inspectDate"
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter2"
|
||||||
width="180px"
|
width="180px"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="检测人员" align="center" prop="inspector" width="100" />
|
<el-table-column label="检测人员" align="center" prop="inspector" width="100" />
|
||||||
<el-table-column label="状态" align="center" prop="status" width="80">
|
<el-table-column label="单据状态" align="center" prop="status" width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.MES_QC_IQC_STATUS" :value="scope.row.status" />
|
<dict-tag :type="DICT_TYPE.MES_QC_IQC_STATUS" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="130" fixed="right">
|
<el-table-column label="操作" align="center" width="130" fixed="right">
|
||||||
|
<!-- TODO @AI:完成;是否完成来料检验单编制?【完成后将不能更改】 -->
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
|
|
@ -167,13 +169,15 @@
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<!-- TODO @AI:status 枚举值; -->
|
||||||
|
<!-- TODO @芋艿:查看报表,后续要搞下; -->
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openForm('update', scope.row.id)"
|
@click="openForm('update', scope.row.id)"
|
||||||
v-if="scope.row.status !== 0"
|
v-if="scope.row.status !== 0"
|
||||||
>
|
>
|
||||||
查看
|
查看报表
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
|
|
@ -201,7 +205,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter2 } from '@/utils/formatTime'
|
||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import { QcIqcApi, QcIqcVO } from '@/api/mes/qc/iqc'
|
import { QcIqcApi, QcIqcVO } from '@/api/mes/qc/iqc'
|
||||||
import IqcForm from './IqcForm.vue'
|
import IqcForm from './IqcForm.vue'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue