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
|
status?: number
|
||||||
|
|
||||||
|
inspectQty?:number
|
||||||
|
|
||||||
|
|
||||||
inspectorId?: number
|
inspectorId?: number
|
||||||
|
|
||||||
inspectTime?: string
|
inspectTime?: string
|
||||||
|
|||||||
@ -153,7 +153,9 @@
|
|||||||
</n-upload> -->
|
</n-upload> -->
|
||||||
<!-- @before-upload ="flchang"
|
<!-- @before-upload ="flchang"
|
||||||
@change="flchang"
|
@change="flchang"
|
||||||
@remove="flchang"-->
|
@remove="flchang"
|
||||||
|
.doc,.docx,
|
||||||
|
-->
|
||||||
<n-upload
|
<n-upload
|
||||||
directory-dnd
|
directory-dnd
|
||||||
auto-upload="false"
|
auto-upload="false"
|
||||||
@ -162,6 +164,7 @@
|
|||||||
Authorization:TOKEN
|
Authorization:TOKEN
|
||||||
}"
|
}"
|
||||||
:max="20"
|
:max="20"
|
||||||
|
accept=".pdf,.png,.jpg"
|
||||||
v-model:file-list="flist"
|
v-model:file-list="flist"
|
||||||
@finish="flchang"
|
@finish="flchang"
|
||||||
@remove="flremove"
|
@remove="flremove"
|
||||||
|
|||||||
@ -35,6 +35,26 @@ const columns = [
|
|||||||
key: 'quantity',
|
key: 'quantity',
|
||||||
width: 120
|
width: 120
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '完成数量',
|
||||||
|
key: 'qualifiedQty',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '报废数量',
|
||||||
|
key: 'scrapQty',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '返工数量',
|
||||||
|
key: 'reworkQty',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '让步接收数量',
|
||||||
|
key: 'connectionQty',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '提交人',
|
title: '提交人',
|
||||||
key: 'userName',
|
key: 'userName',
|
||||||
|
|||||||
@ -55,14 +55,15 @@
|
|||||||
|
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<n-data-table
|
<n-data-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="small"
|
size="small"
|
||||||
remote
|
remote
|
||||||
:border="false"
|
:border="false"
|
||||||
:single-line="false"
|
:single-line="false"
|
||||||
striped
|
striped
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div class="pagination-container" style="display: flex; justify-content: flex-end; margin-top: 12px">
|
<div class="pagination-container" style="display: flex; justify-content: flex-end; margin-top: 12px">
|
||||||
<n-pagination
|
<n-pagination
|
||||||
@ -244,6 +245,29 @@
|
|||||||
</n-space>
|
</n-space>
|
||||||
</n-drawer>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -251,8 +275,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, h, onMounted } from 'vue'
|
import { ref, reactive, h, onMounted } from 'vue'
|
||||||
import {
|
import {
|
||||||
NButton, NSpace, NIcon, NUpload,NTag, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions,
|
NButton, NSpace, NIcon, NUpload, NTag, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions,
|
||||||
NDropdown
|
NDropdown, NDescriptions, NDescriptionsItem
|
||||||
} from 'naive-ui'
|
} from 'naive-ui'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -479,18 +503,37 @@ const formRules = {
|
|||||||
// 表格列
|
// 表格列
|
||||||
const columns: DataTableColumns<QualityTesting> = [
|
const columns: DataTableColumns<QualityTesting> = [
|
||||||
// { type: 'selection' },
|
// { 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: '物料名称',
|
title: '物料名称',
|
||||||
key: 'materialName',
|
key: 'materialName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150
|
minWidth: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '物料编码',
|
title: '物料编码',
|
||||||
key: 'materialCode',
|
key: 'materialCode',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120
|
minWidth: 120
|
||||||
},
|
},
|
||||||
// { title: '来源类型', key: 'sourceType',align: 'center',
|
// { title: '来源类型', key: 'sourceType',align: 'center',
|
||||||
// render(row) {
|
// render(row) {
|
||||||
@ -501,15 +544,39 @@ const columns: DataTableColumns<QualityTesting> = [
|
|||||||
// return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
// 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: 'sourceId' },
|
||||||
// { title: '关联生产订单ID', key: 'orderId' },
|
// { title: '关联生产订单ID', key: 'orderId' },
|
||||||
// { title: '关联工序计划ID', key: 'processId' },
|
// { title: '关联工序计划ID', key: 'processId' },
|
||||||
// { title: '物料ID', key: 'itemId' },
|
// { title: '物料ID', key: 'itemId' },
|
||||||
{ title: '追溯码', key: 'traceCode',align: 'center' },
|
{
|
||||||
{ title: '报检总数', key: 'totalQty',align: 'center' },
|
title: '追溯码',
|
||||||
{ title: '已检验数量', key: 'inspectQty',align: 'center' },
|
key: 'traceCode',
|
||||||
{ title: '质检状态', key: 'status',align: 'center',
|
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) {
|
render(row) {
|
||||||
const val = row.status
|
const val = row.status
|
||||||
const opt = qcStatusOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
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 })
|
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '检验员', key: 'inspector',align: 'center' },
|
{
|
||||||
{ title: '检验完成时间', key: 'inspectTime',align: 'center' },
|
title: '检验员',
|
||||||
{ title: '追溯类型', key: 'traceType',align: 'center',
|
key: 'inspector',
|
||||||
|
align: 'center',
|
||||||
|
minWidth:100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '检验完成时间',
|
||||||
|
key: 'inspectTime',
|
||||||
|
align: 'center',
|
||||||
|
minWidth:150
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '追溯类型',
|
||||||
|
key: 'traceType',
|
||||||
|
align: 'center',
|
||||||
|
minWidth:100,
|
||||||
render(row) {
|
render(row) {
|
||||||
const val = row.traceType
|
const val = row.traceType
|
||||||
const opt = qcTraceTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
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 })
|
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: 'updateTime',align: 'center', width: 180 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
key: 'actions',
|
key: 'actions',
|
||||||
width: 140,
|
minWidth: 140,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
|
align: 'center',
|
||||||
render(row) {
|
render(row) {
|
||||||
return h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'nowrap' } }, [
|
return h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'nowrap' } }, [
|
||||||
h(NButton, { size: 'small', quaternary: true, onClick: () => handleEdit(row) }, {
|
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() {
|
async function handleSubmitResultDetail() {
|
||||||
|
|
||||||
formDetailOKData.qcId = qcId.value
|
formDetailOKData.qcId = qcId.value
|
||||||
|
|||||||
@ -208,8 +208,8 @@
|
|||||||
}"
|
}"
|
||||||
:max="20"
|
:max="20"
|
||||||
v-model:file-list="flist"
|
v-model:file-list="flist"
|
||||||
|
|
||||||
@finish="flchang"
|
@finish="flchang"
|
||||||
|
accept=".pdf,.png,.jpg"
|
||||||
>
|
>
|
||||||
|
|
||||||
<n-upload-dragger>
|
<n-upload-dragger>
|
||||||
|
|||||||
@ -68,6 +68,7 @@
|
|||||||
<n-descriptions :column="2" bordered size="small" label-placement="left" style="margin-bottom: 16px">
|
<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.materialCode || '-' }}</n-descriptions-item>
|
||||||
<n-descriptions-item label="物料名称">{{ assingWorkDetail.materialName || '-' }}</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.processName || '-' }}</n-descriptions-item>
|
||||||
<n-descriptions-item label="车间名称">{{ assingWorkDetail.workshopName || '-' }}</n-descriptions-item>
|
<n-descriptions-item label="车间名称">{{ assingWorkDetail.workshopName || '-' }}</n-descriptions-item>
|
||||||
<n-descriptions-item label="生产工段">{{ assingWorkDetail.sectionName || '-' }}</n-descriptions-item>
|
<n-descriptions-item label="生产工段">{{ assingWorkDetail.sectionName || '-' }}</n-descriptions-item>
|
||||||
@ -193,7 +194,13 @@ const AssingWorkColumns :DataTableColumns<AssingWork> = [
|
|||||||
return row.materialName || '-'
|
return row.materialName || '-'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align:'center',
|
||||||
|
title: '工单号',
|
||||||
|
key: 'workOrderCode',
|
||||||
|
width: 120,
|
||||||
|
ellipsis: { tooltip: true }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align:'center',
|
align:'center',
|
||||||
title: '工序名称',
|
title: '工序名称',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user