Compare commits
No commits in common. "7b10c956da8ecfef9f50c3bc7025b335490072e4" and "4a372c24405c25a87b2f43471a714affa5bb7c7a" have entirely different histories.
7b10c956da
...
4a372c2440
@ -400,8 +400,6 @@ const formData = reactive<OrderProject>({ ...defaultFormData })
|
||||
// 字典选项(下拉框/单选框/复选框关联字典时使用)
|
||||
const sourceOptions = ref<{ label: string; value: any }[]>([])
|
||||
const statusOptions = ref<{ label: string; value: any }[]>([])
|
||||
const prodTypeOptions = ref<{label: string; value:any} []>([])
|
||||
|
||||
|
||||
// 表单校验规则
|
||||
const formRules = {
|
||||
@ -421,23 +419,11 @@ const columns: DataTableColumns<OrderProject> = [
|
||||
{ title: '项目来源', key: 'source', width: 110,align: 'center',
|
||||
render(row) {
|
||||
const val = row.source
|
||||
console.log(sourceOptions.value);
|
||||
|
||||
const opt = sourceOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
}
|
||||
},
|
||||
{ title: '生产类型', key: 'prodType', width: 100 ,align: 'center',
|
||||
render(row) {
|
||||
const val = row.prodType
|
||||
const opt = prodTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
return opt ? opt.label : (val ?? '-')
|
||||
}
|
||||
},
|
||||
{ title: '生产类型', key: 'prodType', width: 100 ,align: 'center'},
|
||||
{ title: 'BOM版本', key: 'bomVersion', width: 100 ,align: 'center'},
|
||||
{ title: '规格型号', key: 'specModel', width: 140, ellipsis: { tooltip: true } },
|
||||
{ title: '单位', key: 'unit', width: 70 ,align: 'center'},
|
||||
@ -448,9 +434,7 @@ const columns: DataTableColumns<OrderProject> = [
|
||||
render(row) {
|
||||
const val = row.status
|
||||
const opt = statusOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
return opt ? opt.label : (val ?? '-')
|
||||
}
|
||||
},
|
||||
{ title: '计划完成日期', key: 'planFinishTime', width: 170 ,align: 'center'},
|
||||
@ -486,9 +470,8 @@ const columns: DataTableColumns<OrderProject> = [
|
||||
]
|
||||
|
||||
const pickMtrlStatusMap: Record<string, string> = {
|
||||
'1': '未领料',
|
||||
'2': '待定',
|
||||
'3': '已领料',
|
||||
'0': '未领料',
|
||||
'1': '已领料',
|
||||
}
|
||||
|
||||
const kingdeeMoColumns: DataTableColumns<KingdeeMoTableRow> = [
|
||||
@ -533,8 +516,6 @@ const kingdeeMoColumns: DataTableColumns<KingdeeMoTableRow> = [
|
||||
title: '领料状态', key: 'pickMtrlStatus', width: 90, align: 'center',
|
||||
render(row) {
|
||||
const val = row.pickMtrlStatus
|
||||
console.log(val);
|
||||
|
||||
return val != null ? (pickMtrlStatusMap[String(val)] ?? val) : '-'
|
||||
}
|
||||
},
|
||||
@ -883,16 +864,11 @@ async function handleImportUpload({ file }: UploadCustomRequestOptions) {
|
||||
async function loadDictOptions() {
|
||||
try {
|
||||
const data = await dictDataApi.listByType('pro_source')
|
||||
sourceOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
|
||||
sourceOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
} catch {}
|
||||
try {
|
||||
const data = await dictDataApi.listByType('pro_status')
|
||||
statusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
|
||||
} catch {}
|
||||
|
||||
try {
|
||||
const data = await dictDataApi.listByType("prod_type")
|
||||
prodTypeOptions.value = data.map(d=>({label: d.dictLabel,value:(Number(d.dictValue) || d.dictValue),class:d.listClass}))
|
||||
statusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
||||
@ -317,7 +317,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, h, onMounted } from 'vue'
|
||||
import {
|
||||
NButton, NSpace, NIcon, NUpload,NTag, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions,
|
||||
NButton, NSpace, NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions,
|
||||
NDropdown
|
||||
} from 'naive-ui'
|
||||
import {
|
||||
@ -391,27 +391,22 @@ const detailColumns: DataTableColumns<Object> = [
|
||||
{
|
||||
title: '判定类型',
|
||||
key: 'resultType',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
render: (row) => {
|
||||
const val = row.resultType
|
||||
const opt = qcResultTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
return opt ? opt.label : (val ?? '-')
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '判定数量',
|
||||
key: 'qty',
|
||||
align: 'center',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '批次号',
|
||||
key: 'traceCode',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
render: (row) => {
|
||||
const val = row.traceCode
|
||||
return val ?? '-'
|
||||
@ -421,7 +416,6 @@ const detailColumns: DataTableColumns<Object> = [
|
||||
title: '不良代码',
|
||||
key: 'defectCode',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
render: (row) => {
|
||||
const val = row.defectCode
|
||||
return val ?? '-'
|
||||
@ -431,19 +425,16 @@ const detailColumns: DataTableColumns<Object> = [
|
||||
title: '后续动作',
|
||||
key: 'handleAction',
|
||||
width: 80,
|
||||
align: 'center'
|
||||
|
||||
},
|
||||
{
|
||||
title: '动作执行状态',
|
||||
key: 'actionStatus',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
render: (row) => {
|
||||
const val = row.actionStatus
|
||||
const opt = qcActionStatusOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
return opt ? opt.label : (val ?? '-')
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -506,42 +497,37 @@ const formRules = {
|
||||
// 表格列
|
||||
const columns: DataTableColumns<QualityTesting> = [
|
||||
{ type: 'selection' },
|
||||
{ title: '质检编号', key: 'qcNo',align: 'center' },
|
||||
{ title: '来源类型', key: 'sourceType',align: 'center',
|
||||
{ title: '质检编号', key: 'qcNo' },
|
||||
{ title: '来源类型', key: 'sourceType',
|
||||
render(row) {
|
||||
const val = row.sourceType
|
||||
const opt = qcSourceTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
return opt ? opt.label : (val ?? '-')
|
||||
}
|
||||
},
|
||||
// { title: '来源业务ID(汇报单/派工单等)', key: 'sourceId' },
|
||||
// { title: '关联生产订单ID', key: 'orderId' },
|
||||
// { title: '关联工序计划ID', key: 'processId' },
|
||||
// { title: '物料ID', key: 'itemId' },
|
||||
{ title: '报检总数', key: 'totalQty',align: 'center' },
|
||||
{ title: '质检状态', key: 'status',align: 'center',
|
||||
{ title: '报检总数', key: 'totalQty' },
|
||||
{ title: '质检状态', key: 'status',
|
||||
render(row) {
|
||||
const val = row.status
|
||||
const opt = qcStatusOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
return opt ? opt.label : (val ?? '-')
|
||||
}
|
||||
},
|
||||
{ title: '检验员', key: 'inspector',align: 'center' },
|
||||
{ title: '检验完成时间', key: 'inspectTime',align: 'center' },
|
||||
{ title: '追溯类型', key: 'traceType',align: 'center',
|
||||
{ title: '检验员', key: 'inspector' },
|
||||
{ title: '检验完成时间', key: 'inspectTime' },
|
||||
{ title: '追溯类型', key: 'traceType',
|
||||
render(row) {
|
||||
const val = row.traceType
|
||||
const opt = qcTraceTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
return opt ? opt.label : (val ?? '-')
|
||||
}
|
||||
},
|
||||
{ title: '创建时间', key: 'createTime',align: 'center', width: 180 },
|
||||
{ title: '更新时间', key: 'updateTime',align: 'center', width: 180 },
|
||||
{ title: '创建时间', key: 'createTime', width: 180 },
|
||||
{ title: '更新时间', key: 'updateTime', width: 180 },
|
||||
{
|
||||
title: '操作',
|
||||
key: 'actions',
|
||||
@ -795,28 +781,28 @@ async function handleImportUpload({ file }: UploadCustomRequestOptions) {
|
||||
async function loadDictOptions() {
|
||||
try {
|
||||
const data = await dictDataApi.listByType('sys_status')
|
||||
statusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class: d.listClass }))
|
||||
statusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
} catch {}
|
||||
|
||||
try {
|
||||
const data = await dictDataApi.listByType('qc_status')
|
||||
qcStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class: d.listClass }))
|
||||
qcStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
}catch {}
|
||||
try {
|
||||
const data = await dictDataApi.listByType('source_type')
|
||||
qcSourceTypeOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class: d.listClass }))
|
||||
qcSourceTypeOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
}catch {}
|
||||
try {
|
||||
const data = await dictDataApi.listByType('qc_trace_type')
|
||||
qcTraceTypeOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class: d.listClass }))
|
||||
qcTraceTypeOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
}catch {}
|
||||
try {
|
||||
const data = await dictDataApi.listByType('qc_result_type')
|
||||
qcResultTypeOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class: d.listClass }))
|
||||
qcResultTypeOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
}catch {}
|
||||
try {
|
||||
const data = await dictDataApi.listByType('qc_action_status')
|
||||
qcActionStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class: d.listClass }))
|
||||
qcActionStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
}catch {}
|
||||
}
|
||||
|
||||
|
||||
@ -184,7 +184,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, h, onMounted } from 'vue'
|
||||
import { NButton, NSpace, NIcon,NTag, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions } from 'naive-ui'
|
||||
import { NButton, NSpace, NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions } from 'naive-ui'
|
||||
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline, Options } from '@vicons/ionicons5'
|
||||
import { submitLogApi, type SubmitLog } from '@/api/submitLog'
|
||||
import { dictDataApi } from '@/api/org'
|
||||
@ -243,20 +243,18 @@ const formRules = {
|
||||
// 表格列
|
||||
const columns: DataTableColumns<SubmitLog> = [
|
||||
{ type: 'selection' },
|
||||
{ title: '工序名称', key: 'processName',align: 'center' },
|
||||
{ title: '工序编号', key: 'processCode',align: 'center' },
|
||||
{ title: '派工编号', key: 'assingCode',align: 'center' },
|
||||
{ title: '派工人', key: 'userName',align: 'center' },
|
||||
{ title: '派工状态', key: 'assingStatus',align: 'center',
|
||||
{ title: '工序名称', key: 'processName' },
|
||||
{ title: '工序编号', key: 'processCode' },
|
||||
{ title: '派工编号', key: 'assingCode' },
|
||||
{ title: '派工人', key: 'userName' },
|
||||
{ title: '派工状态', key: 'assingStatus',
|
||||
render: (row) => {
|
||||
const val = row.assingStatus
|
||||
const opt = qcAssingStatusOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
return opt ? opt.label : (val ?? '-')
|
||||
}
|
||||
},
|
||||
{ title: '派工完成时间', key: 'completedTime',align: 'center'},
|
||||
{ title: '派工完成时间', key: 'completedTime'},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'actions',
|
||||
@ -288,9 +286,7 @@ const submitColumns = ref([
|
||||
render: (row) => {
|
||||
const val = row.submitStatus
|
||||
const opt = qcResultTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
return opt ? opt.label : (val ?? '-')
|
||||
}
|
||||
}
|
||||
])
|
||||
@ -478,19 +474,19 @@ async function handleImportUpload({ file }: UploadCustomRequestOptions) {
|
||||
async function loadDictOptions() {
|
||||
try {
|
||||
const data = await dictDataApi.listByType('qc_result_type')
|
||||
qcResultTypeOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
|
||||
qcResultTypeOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
}catch {}
|
||||
try {
|
||||
const data = await dictDataApi.listByType('source_type')
|
||||
qcSourceTypeOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
|
||||
qcSourceTypeOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
}catch {}
|
||||
try {
|
||||
const data = await dictDataApi.listByType('qc_status')
|
||||
qcStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
|
||||
qcStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
}catch {}
|
||||
try {
|
||||
const data = await dictDataApi.listByType('assing_status')
|
||||
qcAssingStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
|
||||
qcAssingStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
}catch {}
|
||||
}
|
||||
|
||||
|
||||
@ -355,15 +355,15 @@ const columns = [
|
||||
minWidth: 150,
|
||||
render(row:any) {
|
||||
let text = ''
|
||||
if(row.assingStatus == 1){
|
||||
if(row.assingStatus == 0){
|
||||
text = '待执行'
|
||||
}else if(row.assingStatus == 2){
|
||||
}else if(row.assingStatus == 1){
|
||||
text = '执行中'
|
||||
}else if(row.assingStatus == 3){
|
||||
}else if(row.assingStatus == 2){
|
||||
text = '质检中'
|
||||
}else if(row.assingStatus == 4){
|
||||
}else if(row.assingStatus == 3){
|
||||
text = '已汇报'
|
||||
}else if(row.assingStatus == 5){
|
||||
}else if(row.assingStatus == 4){
|
||||
text = '已关闭'
|
||||
}
|
||||
|
||||
@ -374,7 +374,7 @@ const columns = [
|
||||
{
|
||||
align:'center',
|
||||
title: '工人名称',
|
||||
key: 'userName',
|
||||
key: 'stringUserName',
|
||||
minWidth: 200
|
||||
},
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user