Merge branch 'master' of https://git.evo-techina.com/sgc/mes-vue
This commit is contained in:
commit
2762769bc8
@ -24,6 +24,9 @@ export interface QualityTesting {
|
||||
|
||||
status?: number
|
||||
|
||||
inspectQty?:number
|
||||
|
||||
|
||||
inspectorId?: number
|
||||
|
||||
inspectTime?: string
|
||||
|
||||
@ -153,7 +153,9 @@
|
||||
</n-upload> -->
|
||||
<!-- @before-upload ="flchang"
|
||||
@change="flchang"
|
||||
@remove="flchang"-->
|
||||
@remove="flchang"
|
||||
.doc,.docx,
|
||||
-->
|
||||
<n-upload
|
||||
directory-dnd
|
||||
auto-upload="false"
|
||||
@ -162,6 +164,7 @@
|
||||
Authorization:TOKEN
|
||||
}"
|
||||
:max="20"
|
||||
accept=".pdf,.png,.jpg"
|
||||
v-model:file-list="flist"
|
||||
@finish="flchang"
|
||||
@remove="flremove"
|
||||
|
||||
@ -35,6 +35,26 @@ const columns = [
|
||||
key: 'quantity',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '完成数量',
|
||||
key: 'qualifiedQty',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '报废数量',
|
||||
key: 'scrapQty',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '返工数量',
|
||||
key: 'reworkQty',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '让步接收数量',
|
||||
key: 'connectionQty',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '提交人',
|
||||
key: 'userName',
|
||||
|
||||
@ -63,6 +63,7 @@
|
||||
:border="false"
|
||||
:single-line="false"
|
||||
striped
|
||||
|
||||
/>
|
||||
<div class="pagination-container" style="display: flex; justify-content: flex-end; margin-top: 12px">
|
||||
<n-pagination
|
||||
@ -244,6 +245,29 @@
|
||||
</n-space>
|
||||
</n-drawer>
|
||||
|
||||
<!--派工详情弹窗-->
|
||||
<n-modal v-model:show="showQualityTestingDetail" title="派工详情" style="width: 1000px" >
|
||||
<n-card>
|
||||
<n-descriptions :column="2" bordered size="small" label-placement="left" style="margin-bottom: 16px">
|
||||
<n-descriptions-item label="物料编码">{{ qualityTestingInfo.materialCode || '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="物料名称">{{ qualityTestingInfo.materialName || '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="工单号">{{ qualityTestingInfo.workOrderCode || '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="工序名称">{{ qualityTestingInfo.processName || '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="派工编号">{{ qualityTestingInfo.assingCode || '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="报工数量">{{ qualityTestingInfo.totalQty ?? '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="质检数量">{{ qualityTestingInfo.inspectQty ?? '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="质检状态">{{ handlerPatchStatus(qualityTestingInfo.status) ?? '-' }}</n-descriptions-item>
|
||||
|
||||
</n-descriptions>
|
||||
|
||||
<template #footer>
|
||||
<n-space justify="end">
|
||||
<n-button @click="showQualityTestingDetail = false">取消</n-button>
|
||||
</n-space>
|
||||
</template>
|
||||
</n-card>
|
||||
|
||||
</n-modal>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@ -251,8 +275,8 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, h, onMounted } from 'vue'
|
||||
import {
|
||||
NButton, NSpace, NIcon, NUpload,NTag, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions,
|
||||
NDropdown
|
||||
NButton, NSpace, NIcon, NUpload, NTag, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions,
|
||||
NDropdown, NDescriptions, NDescriptionsItem
|
||||
} from 'naive-ui'
|
||||
|
||||
import {
|
||||
@ -479,18 +503,37 @@ const formRules = {
|
||||
// 表格列
|
||||
const columns: DataTableColumns<QualityTesting> = [
|
||||
// { type: 'selection' },
|
||||
{ title: '质检编号', key: 'qcNo',align: 'center' },
|
||||
{ title: '质检编号', key: 'qcNo',align: 'center',minWidth: 150,
|
||||
render(row:any) {
|
||||
return h(
|
||||
'a',
|
||||
{
|
||||
class: 'route-code-link',
|
||||
href: 'javascript:;',
|
||||
style: {
|
||||
color: '#2080f0',
|
||||
textDecoration: 'underline',
|
||||
cursor: 'pointer',
|
||||
},
|
||||
onClick: (e: MouseEvent) => {
|
||||
viewQualityTestingDetail(row)
|
||||
},
|
||||
},
|
||||
row.assingCode
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
key: 'materialName',
|
||||
align: 'center',
|
||||
width: 150
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
title: '物料编码',
|
||||
key: 'materialCode',
|
||||
align: 'center',
|
||||
width: 120
|
||||
minWidth: 120
|
||||
},
|
||||
// { title: '来源类型', key: 'sourceType',align: 'center',
|
||||
// render(row) {
|
||||
@ -501,15 +544,39 @@ const columns: DataTableColumns<QualityTesting> = [
|
||||
// return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
// }
|
||||
// },
|
||||
{ title: '业务来源', key: 'businessName',align: 'center'},
|
||||
{
|
||||
title: '业务来源',
|
||||
key: 'businessName',
|
||||
align: 'center',
|
||||
minWidth:100
|
||||
},
|
||||
// { title: '来源业务ID(汇报单/派工单等)', key: 'sourceId' },
|
||||
// { title: '关联生产订单ID', key: 'orderId' },
|
||||
// { title: '关联工序计划ID', key: 'processId' },
|
||||
// { title: '物料ID', key: 'itemId' },
|
||||
{ title: '追溯码', key: 'traceCode',align: 'center' },
|
||||
{ title: '报检总数', key: 'totalQty',align: 'center' },
|
||||
{ title: '已检验数量', key: 'inspectQty',align: 'center' },
|
||||
{ title: '质检状态', key: 'status',align: 'center',
|
||||
{
|
||||
title: '追溯码',
|
||||
key: 'traceCode',
|
||||
align: 'center',
|
||||
minWidth:300
|
||||
},
|
||||
{
|
||||
title: '报检总数',
|
||||
key: 'totalQty',
|
||||
align: 'center',
|
||||
minWidth:80
|
||||
},
|
||||
{
|
||||
title: '已检验数量',
|
||||
key: 'inspectQty',
|
||||
align: 'center',
|
||||
minWidth:100
|
||||
},
|
||||
{
|
||||
title: '质检状态',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
minWidth:80,
|
||||
render(row) {
|
||||
const val = row.status
|
||||
const opt = qcStatusOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
@ -517,9 +584,23 @@ const columns: DataTableColumns<QualityTesting> = [
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
}
|
||||
},
|
||||
{ title: '检验员', key: 'inspector',align: 'center' },
|
||||
{ title: '检验完成时间', key: 'inspectTime',align: 'center' },
|
||||
{ title: '追溯类型', key: 'traceType',align: 'center',
|
||||
{
|
||||
title: '检验员',
|
||||
key: 'inspector',
|
||||
align: 'center',
|
||||
minWidth:100
|
||||
},
|
||||
{
|
||||
title: '检验完成时间',
|
||||
key: 'inspectTime',
|
||||
align: 'center',
|
||||
minWidth:150
|
||||
},
|
||||
{
|
||||
title: '追溯类型',
|
||||
key: 'traceType',
|
||||
align: 'center',
|
||||
minWidth:100,
|
||||
render(row) {
|
||||
const val = row.traceType
|
||||
const opt = qcTraceTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
@ -528,13 +609,19 @@ const columns: DataTableColumns<QualityTesting> = [
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
}
|
||||
},
|
||||
{ title: '创建时间', key: 'createTime',align: 'center', width: 180 },
|
||||
{
|
||||
title: '创建时间',
|
||||
key: 'createTime',
|
||||
align: 'center',
|
||||
minWidth: 180
|
||||
},
|
||||
{ title: '更新时间', key: 'updateTime',align: 'center', width: 180 },
|
||||
{
|
||||
title: '操作',
|
||||
key: 'actions',
|
||||
width: 140,
|
||||
minWidth: 140,
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
render(row) {
|
||||
return h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'nowrap' } }, [
|
||||
h(NButton, { size: 'small', quaternary: true, onClick: () => handleEdit(row) }, {
|
||||
@ -893,8 +980,23 @@ function handleSubmitDetail(submitDetail:any){
|
||||
|
||||
}
|
||||
|
||||
const qualityTestingInfo = ref<QualityTesting>()
|
||||
const showQualityTestingDetail = ref<Boolean>(false)
|
||||
|
||||
|
||||
//查看质检详情
|
||||
const viewQualityTestingDetail = (row)=>{
|
||||
console.log(row)
|
||||
showQualityTestingDetail.value = true
|
||||
qualityTestingInfo.value = row
|
||||
}
|
||||
|
||||
const handlerPatchStatus = (qualityTestingStatus)=>{
|
||||
const opt = qcStatusOptions.value.find(o => o.value === qualityTestingStatus || String(o.value) === String(qualityTestingStatus))
|
||||
if (!opt) return qualityTestingStatus ?? '-'
|
||||
return opt.label
|
||||
}
|
||||
|
||||
async function handleSubmitResultDetail() {
|
||||
|
||||
formDetailOKData.qcId = qcId.value
|
||||
|
||||
@ -208,8 +208,8 @@
|
||||
}"
|
||||
:max="20"
|
||||
v-model:file-list="flist"
|
||||
|
||||
@finish="flchang"
|
||||
accept=".pdf,.png,.jpg"
|
||||
>
|
||||
|
||||
<n-upload-dragger>
|
||||
|
||||
@ -68,6 +68,7 @@
|
||||
<n-descriptions :column="2" bordered size="small" label-placement="left" style="margin-bottom: 16px">
|
||||
<n-descriptions-item label="物料编码">{{ assingWorkDetail.materialCode || '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="物料名称">{{ assingWorkDetail.materialName || '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="工单号">{{ assingWorkDetail.workOrderCode || '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="工序名称">{{ assingWorkDetail.processName || '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="车间名称">{{ assingWorkDetail.workshopName || '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="生产工段">{{ assingWorkDetail.sectionName || '-' }}</n-descriptions-item>
|
||||
@ -193,7 +194,13 @@ const AssingWorkColumns :DataTableColumns<AssingWork> = [
|
||||
return row.materialName || '-'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
align:'center',
|
||||
title: '工单号',
|
||||
key: 'workOrderCode',
|
||||
width: 120,
|
||||
ellipsis: { tooltip: true }
|
||||
},
|
||||
{
|
||||
align:'center',
|
||||
title: '工序名称',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user