Merge branch 'master' of https://git.evo-techina.com/sgc/mes-vue
# Conflicts: # src/views/biz/orderProcessPlan/board.vue
This commit is contained in:
commit
cb67fc53a2
@ -1,82 +0,0 @@
|
||||
import { request } from '@/utils/request'
|
||||
|
||||
// 让步接收申请表 类型定义
|
||||
export interface ConcessionApply {
|
||||
id?: number
|
||||
|
||||
qcId?: number
|
||||
|
||||
concessionQty?: number
|
||||
|
||||
applyRemark?: string
|
||||
|
||||
applyContent?: string
|
||||
|
||||
applyFile?: string
|
||||
|
||||
applyUserId?: number
|
||||
|
||||
deptId?: number
|
||||
|
||||
instanceId?: string
|
||||
|
||||
approveStatus?: number
|
||||
|
||||
createTime?: string
|
||||
|
||||
updateTime?: string
|
||||
|
||||
}
|
||||
|
||||
// 让步接收申请表 API
|
||||
export const concessionApplyApi = {
|
||||
// 分页查询
|
||||
page(params: { page: number; pageSize: number; id?: number }) {
|
||||
return request({ url: '/biz/concessionApply/page', method: 'get', params })
|
||||
},
|
||||
|
||||
// 获取详情
|
||||
detail(id: string) {
|
||||
return request({ url: `/biz/concessionApply/${id}`, method: 'get' })
|
||||
},
|
||||
|
||||
// 新增
|
||||
create(data: ConcessionApply) {
|
||||
return request({ url: '/biz/concessionApply', method: 'post', data })
|
||||
},
|
||||
|
||||
// 修改
|
||||
update(data: ConcessionApply) {
|
||||
return request({ url: '/biz/concessionApply', method: 'put', data })
|
||||
},
|
||||
|
||||
// 删除
|
||||
delete(ids: string[]) {
|
||||
return request({ url: `/biz/concessionApply/${ids.join(',')}`, method: 'delete' })
|
||||
},
|
||||
|
||||
// 导出
|
||||
export(params?: { ids?: string[]; id?: number }) {
|
||||
const p: Record<string, any> = {}
|
||||
if (params?.ids?.length) p.ids = params.ids.join(',')
|
||||
if (params?.id !== undefined && params?.id !== null) p.id = params.id
|
||||
return request({ url: `/biz/concessionApply/export`, method: 'get', params: p, responseType: 'blob' })
|
||||
},
|
||||
|
||||
// 导入
|
||||
importData(file: File) {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
return request<{ success: number; fail: number; errors: string[] }>({
|
||||
url: `/biz/concessionApply/import`,
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
},
|
||||
|
||||
// 下载导入模板
|
||||
downloadTemplate() {
|
||||
return request({ url: `/biz/concessionApply/template`, method: 'get', responseType: 'blob' })
|
||||
}
|
||||
}
|
||||
@ -1,80 +0,0 @@
|
||||
import { request } from '@/utils/request'
|
||||
|
||||
// MES设备维修保养记录表 类型定义
|
||||
export interface MaintenanceRecord {
|
||||
recordId?: string
|
||||
|
||||
equipmentId?: string
|
||||
|
||||
recordType?: string
|
||||
|
||||
itemContent?: string
|
||||
|
||||
handleContent?: string
|
||||
|
||||
executorId?: number
|
||||
|
||||
startTime?: string
|
||||
|
||||
endTime?: string
|
||||
|
||||
recordStatus?: string
|
||||
|
||||
createTime?: string
|
||||
|
||||
updateTime?: string
|
||||
|
||||
}
|
||||
|
||||
// MES设备维修保养记录表 API
|
||||
export const maintenanceRecordApi = {
|
||||
// 分页查询
|
||||
page(params: { page: number; pageSize: number; recordId?: string }) {
|
||||
return request({ url: '/biz/maintenanceRecord/page', method: 'get', params })
|
||||
},
|
||||
|
||||
// 获取详情
|
||||
detail(recordId: string) {
|
||||
return request({ url: `/biz/maintenanceRecord/${recordId}`, method: 'get' })
|
||||
},
|
||||
|
||||
// 新增
|
||||
create(data: MaintenanceRecord) {
|
||||
return request({ url: '/biz/maintenanceRecord', method: 'post', data })
|
||||
},
|
||||
|
||||
// 修改
|
||||
update(data: MaintenanceRecord) {
|
||||
return request({ url: '/biz/maintenanceRecord', method: 'put', data })
|
||||
},
|
||||
|
||||
// 删除
|
||||
delete(recordIds: string[]) {
|
||||
return request({ url: `/biz/maintenanceRecord/${recordIds.join(',')}`, method: 'delete' })
|
||||
},
|
||||
|
||||
// 导出
|
||||
export(params?: { ids?: string[]; recordId?: string }) {
|
||||
const p: Record<string, any> = {}
|
||||
if (params?.ids?.length) p.ids = params.ids.join(',')
|
||||
if (params?.recordId !== undefined && params?.recordId !== null) p.recordId = params.recordId
|
||||
return request({ url: `/biz/maintenanceRecord/export`, method: 'get', params: p, responseType: 'blob' })
|
||||
},
|
||||
|
||||
// 导入
|
||||
importData(file: File) {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
return request<{ success: number; fail: number; errors: string[] }>({
|
||||
url: `/biz/maintenanceRecord/import`,
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
},
|
||||
|
||||
// 下载导入模板
|
||||
downloadTemplate() {
|
||||
return request({ url: `/biz/maintenanceRecord/template`, method: 'get', responseType: 'blob' })
|
||||
}
|
||||
}
|
||||
@ -1,100 +0,0 @@
|
||||
import { request } from '@/utils/request'
|
||||
|
||||
// 委外记录表 类型定义
|
||||
export interface Outsourcing {
|
||||
id?: number
|
||||
|
||||
name?: string
|
||||
|
||||
code?: string
|
||||
|
||||
businessType?: number
|
||||
|
||||
businessId?: number
|
||||
|
||||
businessCode?: string
|
||||
|
||||
orderItemId?: number
|
||||
|
||||
quantity?: number
|
||||
|
||||
supplierId?: number
|
||||
|
||||
supplierName?: string
|
||||
|
||||
unitPrice?: string
|
||||
|
||||
totalAmount?: string
|
||||
|
||||
beginPreparationTime?: string
|
||||
|
||||
endPreparationTime?: string
|
||||
|
||||
beginTime?: string
|
||||
|
||||
endTime?: string
|
||||
|
||||
remark?: string
|
||||
|
||||
createTime?: string
|
||||
|
||||
createBy?: string
|
||||
|
||||
overdue?: number
|
||||
|
||||
}
|
||||
|
||||
// 委外记录表 API
|
||||
export const outsourcingApi = {
|
||||
// 分页查询
|
||||
page(params: { page: number; pageSize: number; id?: number; name?: string; businessType?: number }) {
|
||||
return request({ url: '/biz/outsourcing/page', method: 'get', params })
|
||||
},
|
||||
|
||||
// 获取详情
|
||||
detail(id: string) {
|
||||
return request({ url: `/biz/outsourcing/${id}`, method: 'get' })
|
||||
},
|
||||
|
||||
// 新增
|
||||
create(data: Outsourcing) {
|
||||
return request({ url: '/biz/outsourcing', method: 'post', data })
|
||||
},
|
||||
|
||||
// 修改
|
||||
update(data: Outsourcing) {
|
||||
return request({ url: '/biz/outsourcing', method: 'put', data })
|
||||
},
|
||||
|
||||
// 删除
|
||||
delete(ids: string[]) {
|
||||
return request({ url: `/biz/outsourcing/${ids.join(',')}`, method: 'delete' })
|
||||
},
|
||||
|
||||
// 导出
|
||||
export(params?: { ids?: string[]; id?: number; name?: string; businessType?: number }) {
|
||||
const p: Record<string, any> = {}
|
||||
if (params?.ids?.length) p.ids = params.ids.join(',')
|
||||
if (params?.id !== undefined && params?.id !== null) p.id = params.id
|
||||
if (params?.name !== undefined && params?.name !== null) p.name = params.name
|
||||
if (params?.businessType !== undefined && params?.businessType !== null) p.businessType = params.businessType
|
||||
return request({ url: `/biz/outsourcing/export`, method: 'get', params: p, responseType: 'blob' })
|
||||
},
|
||||
|
||||
// 导入
|
||||
importData(file: File) {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
return request<{ success: number; fail: number; errors: string[] }>({
|
||||
url: `/biz/outsourcing/import`,
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
},
|
||||
|
||||
// 下载导入模板
|
||||
downloadTemplate() {
|
||||
return request({ url: `/biz/outsourcing/template`, method: 'get', responseType: 'blob' })
|
||||
}
|
||||
}
|
||||
@ -38,7 +38,7 @@ export const errorNotificationApi = {
|
||||
},
|
||||
|
||||
// 获取详情
|
||||
detail(id: string) {
|
||||
detail(id: number) {
|
||||
return request({ url: `/biz/errorNotification/${id}`, method: 'get' })
|
||||
},
|
||||
|
||||
|
||||
71
src/api/exceptionFilter.ts
Normal file
71
src/api/exceptionFilter.ts
Normal file
@ -0,0 +1,71 @@
|
||||
import { request } from '@/utils/request'
|
||||
|
||||
// 异常过滤表 类型定义
|
||||
export interface ExceptionFilter {
|
||||
id?: number
|
||||
|
||||
title?: string
|
||||
|
||||
filterCondition?: string
|
||||
|
||||
description?: string
|
||||
|
||||
status?: 0
|
||||
|
||||
deleted?: number
|
||||
|
||||
}
|
||||
|
||||
// 异常过滤表 API
|
||||
export const exceptionFilterApi = {
|
||||
// 分页查询
|
||||
page(params: { page: number; pageSize: number; id?: number; status?: number }) {
|
||||
return request({ url: '/biz/exceptionFilter/page', method: 'get', params })
|
||||
},
|
||||
|
||||
// 获取详情
|
||||
detail(id: string) {
|
||||
return request({ url: `/biz/exceptionFilter/${id}`, method: 'get' })
|
||||
},
|
||||
|
||||
// 新增
|
||||
create(data: ExceptionFilter) {
|
||||
return request({ url: '/biz/exceptionFilter', method: 'post', data })
|
||||
},
|
||||
|
||||
// 修改
|
||||
update(data: ExceptionFilter) {
|
||||
return request({ url: '/biz/exceptionFilter', method: 'put', data })
|
||||
},
|
||||
|
||||
// 删除
|
||||
delete(ids: string[]) {
|
||||
return request({ url: `/biz/exceptionFilter/${ids.join(',')}`, method: 'delete' })
|
||||
},
|
||||
|
||||
// 导出
|
||||
export(params?: { ids?: string[]; id?: number; status?: number }) {
|
||||
const p: Record<string, any> = {}
|
||||
if (params?.ids?.length) p.ids = params.ids.join(',')
|
||||
if (params?.id !== undefined && params?.id !== null) p.id = params.id
|
||||
if (params?.status !== undefined && params?.status !== null) p.status = params.status
|
||||
return request({ url: `/biz/exceptionFilter/export`, method: 'get', params: p, responseType: 'blob' })
|
||||
},
|
||||
|
||||
// 导入
|
||||
importData(file: File) {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
return request<{ success: number; fail: number; errors: string[] }>({
|
||||
url: `/biz/exceptionFilter/import`,
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
},
|
||||
|
||||
// 下载导入模板
|
||||
downloadTemplate() {
|
||||
return request({ url: `/biz/exceptionFilter/template`, method: 'get', responseType: 'blob' })
|
||||
}
|
||||
}
|
||||
@ -13,7 +13,13 @@ export interface SysNotice {
|
||||
status: number
|
||||
createBy?: number
|
||||
createName?: string
|
||||
createTime?: string
|
||||
createTime?: string,
|
||||
abnormalReporting?:number,
|
||||
reportReason?:string,
|
||||
errorNotificationId?:number,
|
||||
filler?:number,
|
||||
filingStatus?:number,
|
||||
deviceName?:string
|
||||
}
|
||||
|
||||
export interface NoticeChannelOption {
|
||||
|
||||
@ -97,6 +97,7 @@ export function exportNccode(params:any) {
|
||||
return request({
|
||||
url: `biz/ncCode/export`,
|
||||
method: 'get',
|
||||
params
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
@ -132,6 +132,8 @@ export interface ProcessPlanItemVO {
|
||||
|
||||
assignWorkList?: AssignWorkItem[]
|
||||
|
||||
proWorkshop?: string
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -230,6 +232,8 @@ export function processItemToEntity(
|
||||
|
||||
orderItemId?: number,
|
||||
|
||||
proWorkshop?:string
|
||||
|
||||
): OrderProcessPlan {
|
||||
|
||||
return {
|
||||
@ -262,7 +266,9 @@ export function processItemToEntity(
|
||||
|
||||
storageEntry: item.storageEntry,
|
||||
|
||||
workCenterName:item.workCenterName
|
||||
workCenterName:item.workCenterName,
|
||||
|
||||
proWorkshop
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -103,5 +103,10 @@ export const qualityTestingApi = {
|
||||
// 下载导入模板
|
||||
downloadTemplate() {
|
||||
return request({ url: `/biz/qualityTesting/template`, method: 'get', responseType: 'blob' })
|
||||
},
|
||||
|
||||
//加载质检单
|
||||
loadQualityTestingList(assingId:number) {
|
||||
return request({url:`/mes/qc/loadQualityTestingList/${assingId}`,method:'get'})
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ export const sectionApi = {
|
||||
})
|
||||
},
|
||||
|
||||
list(params:{sectionName:string}) {
|
||||
list(params:{sectionName:string,workShop:string}) {
|
||||
return request({
|
||||
url:"/biz/section/listBySectionName",
|
||||
method:"get",
|
||||
|
||||
@ -87,5 +87,19 @@ export const submitLogApi = {
|
||||
//按派工单id查询汇报
|
||||
getByDispatch(dispatchId:number){
|
||||
return request({url:`/mes/report/bydispatch/${dispatchId}`,method:"get"})
|
||||
},
|
||||
|
||||
//根据工序Id查询汇报
|
||||
getProcessReportDetail(params?:{page?:number;pageSize?:number;submitStatus?:number;processId?:number;}){
|
||||
return request({url:`/mes/report/submitLogToProcess`,method:"get",params})
|
||||
},
|
||||
//根据订单Id查询汇报
|
||||
getOrderItemReportDetail(params?:{page?:number;pageSize?:number;submitStatus?:number;orderItemId?:number;}){
|
||||
return request({url:`/mes/report/allSubmitLogByorderItemId`,method:"get",params})
|
||||
},
|
||||
|
||||
//加载汇报列表
|
||||
loadSumbitLog(assingId?:number){
|
||||
return request({url:`/mes/report/loadSumbitLog/${assingId}`,method:'get'})
|
||||
}
|
||||
}
|
||||
|
||||
217
src/components/ErrorReportModal.vue
Normal file
217
src/components/ErrorReportModal.vue
Normal file
@ -0,0 +1,217 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import {onMounted, ref, watch} from "vue";
|
||||
import { Notifications } from '@vicons/ionicons5'
|
||||
import {} from '@/api/system.ts'
|
||||
import {noticeApi, SysNotice} from '@/api/message'
|
||||
import type {FormInst} from "naive-ui";
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:show', value: boolean): void
|
||||
}>()
|
||||
|
||||
const props = defineProps<{
|
||||
show: boolean
|
||||
|
||||
notice:SysNotice,
|
||||
}>()
|
||||
|
||||
const showModal = ref(false)
|
||||
|
||||
const formRef = ref<FormInst | null>(null)
|
||||
|
||||
const isFili = ref<Boolean>(false)
|
||||
const isShow = ref<Boolean>(true)
|
||||
const disabled = ref<Boolean>(false)
|
||||
const rules = {
|
||||
fillingPerson:[{required: true, message: '请填写填报原因'}]
|
||||
}
|
||||
|
||||
const formData = ref<SysNotice>({
|
||||
id:undefined,
|
||||
reportReason:undefined,
|
||||
filingStatus:undefined
|
||||
})
|
||||
|
||||
watch(()=>props.show, (val) => {
|
||||
showModal.value = val
|
||||
//关闭弹框重置
|
||||
if (!val) {
|
||||
isFili.value = false
|
||||
formData.value = {
|
||||
id:undefined,
|
||||
reportReason:undefined,
|
||||
filingStatus:undefined,
|
||||
}
|
||||
isShow.value = true
|
||||
disabled.value = false
|
||||
}
|
||||
|
||||
if (props.notice.abnormalReporting) {//需要填报
|
||||
isFili.value = true
|
||||
formData.value = {...props.notice}
|
||||
//已经填报禁用填报栏 隐藏提交按钮
|
||||
if (formData.value.filingStatus == 1) {
|
||||
isShow.value = false
|
||||
disabled.value = true
|
||||
}else {
|
||||
isShow.value = true
|
||||
disabled.value = false
|
||||
}
|
||||
}else {
|
||||
isFili.value = false
|
||||
isShow.value = true
|
||||
disabled.value = false
|
||||
}
|
||||
},{immediate:true})
|
||||
|
||||
watch(showModal, (val) => {
|
||||
emit("update:show",val)
|
||||
})
|
||||
|
||||
async function handleSubmit() {
|
||||
try {
|
||||
await formRef.value?.validate()
|
||||
formData.value.id = props.notice.id
|
||||
formData.value.filingStatus = 1
|
||||
//修改通知表
|
||||
noticeApi.update({
|
||||
id:formData.value.id,
|
||||
reportReason:formData.value.reportReason,
|
||||
filingStatus:formData.value.filingStatus
|
||||
})
|
||||
window.$message?.success('填报成功')
|
||||
showModal.value= false
|
||||
}catch ( error:any) {
|
||||
if (error?.message) {
|
||||
window.$message?.error(error.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-modal
|
||||
v-model:show="showModal"
|
||||
preset="card"
|
||||
:style="{ width: '1200px', height: '600px'}"
|
||||
:mask-closable="false"
|
||||
>
|
||||
<template #header >
|
||||
<div style="text-align: center;">
|
||||
<h2>
|
||||
<n-icon>
|
||||
<Notifications />
|
||||
</n-icon>
|
||||
异常填报
|
||||
</h2>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<n-split direction="horizontal" :max="0.75" :min="0.25" v-if="isFili">
|
||||
<template #1>
|
||||
<n-grid x-gap="12" :cols="1">
|
||||
<n-gi>
|
||||
<h2>通知内容</h2>
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
<n-form
|
||||
label-placement="left"
|
||||
label-width="100"
|
||||
style="margin: 10px"
|
||||
>
|
||||
<n-form-item label="通知标题" path="title">
|
||||
<n-input
|
||||
v-model:value="props.notice.title"
|
||||
disabled
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="异常设备" path="title">
|
||||
<n-input
|
||||
v-model:value="props.notice.deviceName"
|
||||
disabled
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="通知内容" path="notifierContent">
|
||||
<n-input
|
||||
v-model:value="props.notice.content"
|
||||
type="textarea"
|
||||
disabled
|
||||
/>
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
</template>
|
||||
<template #2>
|
||||
<n-grid x-gap="12" :cols="1">
|
||||
<n-gi>
|
||||
<h2>异常填报</h2>
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
<n-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-placement="left"
|
||||
label-width="100"
|
||||
style="margin: 10px"
|
||||
:rules="rules"
|
||||
>
|
||||
<n-form-item ref="reason" label="填报原因" path="reportReason">
|
||||
<n-input
|
||||
v-model:value="formData.reportReason"
|
||||
type="textarea"
|
||||
placeholder="请填写填报原因"
|
||||
:disabled="disabled"
|
||||
/>
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
</template>
|
||||
</n-split>
|
||||
|
||||
<div v-if="!isFili">
|
||||
<n-grid x-gap="12" :cols="1">
|
||||
<n-gi>
|
||||
<h2>通知内容</h2>
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
<n-form
|
||||
label-placement="left"
|
||||
label-width="100"
|
||||
style="margin: 10px"
|
||||
>
|
||||
<n-form-item label="通知标题" path="title">
|
||||
<n-input
|
||||
v-model:value="props.notice.title"
|
||||
disabled
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="异常设备" path="title">
|
||||
<n-input
|
||||
v-model:value="props.notice.deviceName"
|
||||
disabled
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="通知内容" path="notifierContent">
|
||||
<n-input
|
||||
v-model:value="props.notice.content"
|
||||
type="textarea"
|
||||
disabled
|
||||
/>
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<template #action>
|
||||
<n-space justify="end">
|
||||
<n-button @click="showModal = false">关闭</n-button>
|
||||
<n-button v-if="isFili && isShow" type="primary" @click="handleSubmit">提交</n-button>
|
||||
</n-space>
|
||||
</template>
|
||||
</n-modal>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@ -331,6 +331,13 @@
|
||||
|
||||
<!-- 消息通知弹窗 -->
|
||||
<MessageNotification />
|
||||
|
||||
<!--异常填报弹窗-->
|
||||
<ErrorReportModal
|
||||
v-model:show="showErrorReportModal"
|
||||
:errorNotifiaction ="errorNotifiaction"
|
||||
:notice = "notice"
|
||||
/>
|
||||
</n-layout>
|
||||
</template>
|
||||
|
||||
@ -382,6 +389,8 @@ import TabBar from '@/components/TabBar.vue'
|
||||
import SiteLogoMark from '@/components/SiteLogoMark.vue'
|
||||
import { noticeApi, chatApi, type SysNotice, type ChatMessage } from '@/api/message'
|
||||
import { iconMap as externalIconMap } from '@/utils/icons'
|
||||
import ErrorReportModal from "@/components/ErrorReportModal.vue";
|
||||
import {errorNotificationApi} from "@/api/errorNotification.ts";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@ -405,6 +414,7 @@ window.$message = message
|
||||
const collapsed = ref(false)
|
||||
const showProfileModal = ref(false)
|
||||
const showPasswordModal = ref(false)
|
||||
const showErrorReportModal = ref(false)
|
||||
const messageTab = ref('notice')
|
||||
|
||||
// 消息相关
|
||||
@ -599,18 +609,27 @@ function stripHtml(html: string | undefined): string {
|
||||
}
|
||||
|
||||
// 点击通知
|
||||
//是否需要填报
|
||||
const notice = ref<SysNotice>( {})
|
||||
async function handleNoticeClick(item: SysNotice) {
|
||||
// 标记已读
|
||||
if (item.id) {
|
||||
try {
|
||||
await noticeApi.markAsRead(item.id)
|
||||
// 刷新未读数量
|
||||
loadUnreadCount()
|
||||
} catch (error) {
|
||||
// 忽略
|
||||
}
|
||||
}
|
||||
router.push({ path: '/message/notice', query: { id: item.id?.toString() } })
|
||||
notice.value = item
|
||||
//异常填报直接弹窗
|
||||
showErrorReportModal.value = true
|
||||
// if (item.abnormalReporting) {
|
||||
//
|
||||
// }else {
|
||||
// // 标记已读
|
||||
// if (item.id) {
|
||||
// try {
|
||||
// await noticeApi.markAsRead(item.id)
|
||||
// // 刷新未读数量
|
||||
// loadUnreadCount()
|
||||
// } catch (error) {
|
||||
// // 忽略
|
||||
// }
|
||||
// }
|
||||
// router.push({ path: '/message/notice', query: { id: item.id?.toString() } })
|
||||
// }
|
||||
}
|
||||
|
||||
// 点击聊天
|
||||
|
||||
@ -289,18 +289,18 @@ const routes: RouteRecordRaw[] = [
|
||||
component: () => import('@/views/biz/outsourcing/index.vue'),
|
||||
meta: { title: '工序委外', icon: 'ListOutline' }
|
||||
},
|
||||
{
|
||||
path: 'biz/tool',
|
||||
name: 'tool',
|
||||
component: () => import('@/views/biz/tool/index.vue'),
|
||||
meta: { title: '刀具管理', icon: 'ToolOutline' }
|
||||
},
|
||||
{
|
||||
path: 'biz/tool/usage',
|
||||
name: 'toolUsage',
|
||||
component: () => import('@/views/biz/tool/usage.vue'),
|
||||
meta: { title: '刀具使用记录', icon: 'ToolOutline', activeMenu: '/biz/tool' }
|
||||
},
|
||||
// {
|
||||
// path: 'biz/tool',
|
||||
// name: 'tool',
|
||||
// component: () => import('@/views/biz/tool/index.vue'),
|
||||
// meta: { title: '刀具管理', icon: 'ToolOutline' }
|
||||
// },
|
||||
// {
|
||||
// path: 'biz/tool/usage',
|
||||
// name: 'toolUsage',
|
||||
// component: () => import('@/views/biz/tool/usage.vue'),
|
||||
// meta: { title: '刀具使用记录', icon: 'ToolOutline', activeMenu: '/biz/tool' }
|
||||
// },
|
||||
{
|
||||
path: 'biz/errorNotification',
|
||||
name: 'errorNotification',
|
||||
|
||||
@ -1,828 +0,0 @@
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<!-- 用户列表 -->
|
||||
<n-card class="user-list-card" size="small">
|
||||
<!-- 搜索表单 -->
|
||||
<div class="search-form">
|
||||
<n-form
|
||||
inline
|
||||
:model="searchForm"
|
||||
label-placement="left"
|
||||
>
|
||||
|
||||
<n-form-item label="NC代码编号">
|
||||
<n-input v-model:value="searchForm.ncCode" placeholder="请输入NC代码编号" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="NC代码名称">
|
||||
<n-input v-model:value="searchForm.ncName" placeholder="请输入NC代码名称" />
|
||||
</n-form-item>
|
||||
|
||||
|
||||
<n-space>
|
||||
<n-button type="primary" @click="search">
|
||||
<template #icon><n-icon><SearchOutline /></n-icon></template>
|
||||
搜索
|
||||
</n-button>
|
||||
<n-button @click="reset">
|
||||
<template #icon><n-icon><RefreshOutline /></n-icon></template>
|
||||
重置
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
|
||||
</n-form>
|
||||
</div>
|
||||
|
||||
<n-space style="margin-bottom: 15px;">
|
||||
<n-button v-if="hasPermission('biz:ncCode:add')" type="primary" @click="addhand(1)" size="small">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<AddOutline />
|
||||
</n-icon>
|
||||
</template>
|
||||
新增
|
||||
</n-button>
|
||||
<!-- <n-button type="error" @click="delhand" size="small">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<ArrowDownCircleOutline />
|
||||
</n-icon>
|
||||
</template>
|
||||
删除
|
||||
</n-button> -->
|
||||
<n-button v-if="hasPermission('biz:ncCode:export')" type="success" @click="handleExport" size="small">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<ArrowDownCircleOutline />
|
||||
</n-icon>
|
||||
</template>
|
||||
导出
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
<!-- 表格 -->
|
||||
<n-data-table
|
||||
:columns="columns"
|
||||
size="small"
|
||||
striped
|
||||
:data="datalist"
|
||||
:bordere="false"
|
||||
:single-line="false"
|
||||
:loading="loading"
|
||||
remote
|
||||
:row-key="rowKey"
|
||||
@update:checked-row-keys="handleCheck"
|
||||
/>
|
||||
|
||||
<div class="pagination-container" style="display: flex; justify-content: flex-end; margin-top: 12px">
|
||||
<n-pagination
|
||||
v-model:page="pagination.page"
|
||||
v-model:page-size="pagination.pageSize"
|
||||
:item-count="pagination.itemCount"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
show-size-picker
|
||||
show-quick-jumper
|
||||
@update:page="handlePageChange"
|
||||
@update:page-size="handlePageSizeChange"
|
||||
>
|
||||
<template #prefix>
|
||||
共 {{ pagination.itemCount }} 条
|
||||
</template>
|
||||
</n-pagination>
|
||||
</div>
|
||||
</n-card>
|
||||
|
||||
<n-modal
|
||||
v-model:show="addModel"
|
||||
:title="cztype[isstype]"
|
||||
preset="card"
|
||||
style="width: 600px"
|
||||
:mask-closable="false"
|
||||
>
|
||||
|
||||
<n-form
|
||||
ref="addformRef"
|
||||
:model="formData"
|
||||
:rules="addrules"
|
||||
label-placement="left"
|
||||
label-width="100"
|
||||
>
|
||||
<n-grid :cols="1" :x-gap="24">
|
||||
<n-gi>
|
||||
<n-form-item path="ncCode" label="NC代码编号">
|
||||
<n-input v-model:value="formData.ncCode" placeholder="自动生成" disabled />
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<n-form-item path="ncName" label="NC代码名称">
|
||||
<n-input v-model:value="formData.ncName" placeholder="请输入NC代码名称" />
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<n-form-item label="状态">
|
||||
<n-radio-group v-model:value="formData.status" :default-value="1" name="radiogroup">
|
||||
<n-space>
|
||||
<n-radio :value="1">
|
||||
启用
|
||||
</n-radio>
|
||||
<n-radio :value="0">
|
||||
禁用
|
||||
</n-radio>
|
||||
</n-space>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<!--type="textarea"-->
|
||||
<n-form-item path="ncContent" label="NC代码内容">
|
||||
<n-input type="textarea" v-model:value="formData.ncContent" placeholder="请输入NC代码内容" />
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<n-form-item label="备注">
|
||||
<n-input type="textarea" v-model:value="formData.remark" placeholder="请输入备注" />
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<!-- <n-gi>
|
||||
<n-form-item label="工作中心">
|
||||
<n-input v-model:value="formData.workCenter" placeholder="请输入工作中心" />
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<n-form-item label="设备ID">
|
||||
<n-input v-model:value="formData.deviceId" placeholder="请输入设备ID" />
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<n-form-item label="设备名称">
|
||||
<n-input v-model:value="formData.deviceName" placeholder="请输入设备名称" />
|
||||
</n-form-item>
|
||||
</n-gi> -->
|
||||
|
||||
<!-- <n-gi>
|
||||
<n-form-item label="下发状态">
|
||||
<n-radio-group v-model:value="formData.isIssued" name="radiogroup">
|
||||
<n-space>
|
||||
<n-radio :value="1">
|
||||
已下发
|
||||
</n-radio>
|
||||
<n-radio :value="0">
|
||||
未下发
|
||||
</n-radio>
|
||||
</n-space>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
</n-gi> -->
|
||||
<!-- <template v-if="formData.isIssued == 1">
|
||||
<n-gi>
|
||||
<n-form-item label="下发时间">
|
||||
<n-date-picker
|
||||
v-model:formatted-value="formData.issueTime"
|
||||
type="datetime"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
/>
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<n-form-item label="下发人">
|
||||
<n-input v-model:value="formData.issueBy" placeholder="请选择下发人" />
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
</template> -->
|
||||
|
||||
|
||||
</n-grid>
|
||||
</n-form>
|
||||
<template #footer>
|
||||
<n-space justify="end">
|
||||
<n-button @click="addModel = false">取消</n-button>
|
||||
<n-button
|
||||
type="primary"
|
||||
|
||||
@click="savehand"
|
||||
>确认</n-button>
|
||||
</n-space>
|
||||
|
||||
</template>
|
||||
</n-modal>
|
||||
|
||||
<!--下发-->
|
||||
<n-modal
|
||||
v-model:show="issueModel"
|
||||
title="下发"
|
||||
preset="card"
|
||||
style="width: 600px"
|
||||
:mask-closable="false"
|
||||
>
|
||||
<n-transfer
|
||||
v-model:value="value"
|
||||
style="height:500px;"
|
||||
:options="options"
|
||||
:render-source-list="renderSourceList"
|
||||
source-filterable
|
||||
@update:value="tranupdate"
|
||||
/>
|
||||
<template #footer>
|
||||
<n-space justify="end">
|
||||
<n-button @click="issueModel = false">取消</n-button>
|
||||
<n-button
|
||||
type="primary"
|
||||
@click="isssavehand"
|
||||
>确认</n-button>
|
||||
</n-space>
|
||||
|
||||
</template>
|
||||
</n-modal>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
h,
|
||||
onMounted,
|
||||
} from 'vue'
|
||||
|
||||
|
||||
import {
|
||||
NTree,
|
||||
NButton,
|
||||
NIcon,
|
||||
NSpace,
|
||||
NPagination,
|
||||
NGrid,
|
||||
useMessage,
|
||||
useDialog,
|
||||
NDropdown,
|
||||
} from 'naive-ui'
|
||||
|
||||
import {
|
||||
SearchOutline,
|
||||
RefreshOutline,
|
||||
AddOutline,
|
||||
ArrowDownCircleOutline,
|
||||
EllipsisHorizontalOutline
|
||||
} from '@vicons/ionicons5'
|
||||
|
||||
import { useUserStore } from '@/stores/user'
|
||||
|
||||
import {
|
||||
addnccode,
|
||||
nccodelist,
|
||||
batchIssue,
|
||||
editccode,
|
||||
issuecopy,
|
||||
generateNccode,
|
||||
opertree,
|
||||
exportNccode
|
||||
} from '@/api/nccode'
|
||||
|
||||
const dialog = useDialog()
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
// 权限检查
|
||||
const hasPermission = (permission: string) => userStore.hasPermission(permission)
|
||||
|
||||
//const ncDispatchRecords = ref<ncCode[]>([])
|
||||
|
||||
//派工状态字典
|
||||
//const qcAssingStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||
|
||||
// ==================== 搜索表单 ====================
|
||||
const searchForm = reactive({
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
ncCode:'',
|
||||
ncName:'',
|
||||
status:1
|
||||
})
|
||||
|
||||
|
||||
|
||||
// ==================== 表格 ====================
|
||||
const datalist = ref<any>([])
|
||||
const loading = ref(false)
|
||||
|
||||
//分页
|
||||
const pagination = reactive({
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
itemCount: 0
|
||||
})
|
||||
|
||||
|
||||
const columns = [
|
||||
// {
|
||||
// type: 'selection',
|
||||
// minWidth:60
|
||||
// },
|
||||
{
|
||||
align:"center",
|
||||
title:"NC代码编号",
|
||||
key:"ncCode",
|
||||
minWidth:150
|
||||
},
|
||||
{
|
||||
align:"center",
|
||||
title:"NC代码名称",
|
||||
key:"ncName",
|
||||
minWidth:150
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
align:"center",
|
||||
title:"NC代码内容",
|
||||
key:"ncContent",
|
||||
minWidth:150
|
||||
},
|
||||
|
||||
// {
|
||||
// align:"center",
|
||||
// title:"工作中心",
|
||||
// key:"workCenter",
|
||||
// minWidth:150
|
||||
// },
|
||||
|
||||
// {
|
||||
// align:"center",
|
||||
// title:"设备ID",
|
||||
// key:"deviceId",
|
||||
// minWidth:150
|
||||
// },
|
||||
|
||||
// {
|
||||
// align:"center",
|
||||
// title:"设备名称",
|
||||
// key:"deviceName",
|
||||
// minWidth:150
|
||||
// },
|
||||
|
||||
{
|
||||
align:"center",
|
||||
title:"状态",
|
||||
key:"status",
|
||||
minWidth:150,
|
||||
render(row:any) {
|
||||
if(row.status == 1){
|
||||
return '启用'
|
||||
}
|
||||
return '禁用'
|
||||
}
|
||||
},
|
||||
{
|
||||
align:"center",
|
||||
title:"是否下发",
|
||||
key:"isIssued",
|
||||
minWidth:150,
|
||||
render(row:any) {
|
||||
if(row.isIssued == 1){
|
||||
return '已下发'
|
||||
}
|
||||
return '未下发'
|
||||
}
|
||||
},
|
||||
{
|
||||
align:"center",
|
||||
title:"下发时间",
|
||||
key:"issueTime",
|
||||
minWidth:150
|
||||
},
|
||||
|
||||
{
|
||||
align:"center",
|
||||
title:"下发人",
|
||||
key:"issueBy",
|
||||
minWidth:150
|
||||
},
|
||||
{
|
||||
align:"center",
|
||||
title:"备注",
|
||||
key:"remark",
|
||||
minWidth:150
|
||||
},
|
||||
|
||||
{
|
||||
align:'center',
|
||||
title: '操作',
|
||||
key: 'actions',
|
||||
width: 260,
|
||||
fixed: 'right',
|
||||
render(row:any) {
|
||||
const buttons:any = []
|
||||
|
||||
if(hasPermission('biz:ncCode:issue')){
|
||||
buttons.push(h(NButton, {
|
||||
size: 'small',
|
||||
type:'info',
|
||||
ghost:true,
|
||||
onClick: () => {
|
||||
issuehand()
|
||||
} },
|
||||
{ default: () => '下发'}
|
||||
))
|
||||
}
|
||||
if(hasPermission('biz:nccode:add')){
|
||||
buttons.push(h(NButton, {
|
||||
size: 'small',
|
||||
type:'warning',
|
||||
ghost:true,
|
||||
onClick: () => {
|
||||
addhand(3,row)
|
||||
}},
|
||||
{ default: () => '复制'}
|
||||
))
|
||||
}
|
||||
|
||||
if(hasPermission('biz:ncCode:edit')){
|
||||
buttons.push(h(NButton, {
|
||||
size: 'small',
|
||||
type:'primary',
|
||||
ghost:true,
|
||||
onClick: () => {
|
||||
addhand(2,row)
|
||||
} },
|
||||
{ default: () => '编辑'}
|
||||
))
|
||||
}
|
||||
if(hasPermission('biz:ncCode:remove')){
|
||||
buttons.push(h(NButton, {
|
||||
size: 'small',
|
||||
type:'error',
|
||||
ghost:true,
|
||||
onClick: () => {
|
||||
dialog.warning({
|
||||
title: '警告',
|
||||
content: `你确定删除NC代码编号为:${row.ncCode}的数据`,
|
||||
positiveText: '确定',
|
||||
negativeText: '取消',
|
||||
//draggable: true,
|
||||
onPositiveClick: () => {
|
||||
deleteIssue(row.id).then(() => {
|
||||
message.success('操作成功')
|
||||
setTimeout(() => {
|
||||
search()
|
||||
},1000)
|
||||
})
|
||||
|
||||
},
|
||||
onNegativeClick: () => {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
} },
|
||||
{ default: () => '删除'}
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
return buttons.length > 0 ? h(NSpace, {justify:'center'}, { default: () => buttons }) : '-'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//搜索数据
|
||||
function search() {
|
||||
pagination.page = 1
|
||||
searchForm.page = 1
|
||||
searchForm.pageSize = 20
|
||||
getlist()
|
||||
}
|
||||
|
||||
//重置
|
||||
function reset() {
|
||||
|
||||
}
|
||||
|
||||
//获取列表数据
|
||||
function getlist() {
|
||||
nccodelist(searchForm).then((rps:any) => {
|
||||
datalist.value = rps.list
|
||||
pagination.itemCount = rps.total
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
function handlePageChange(page: number) {
|
||||
pagination.page = page
|
||||
searchForm.page = page
|
||||
getlist()
|
||||
}
|
||||
|
||||
function handlePageSizeChange(pageSize: number) {
|
||||
pagination.pageSize = pageSize
|
||||
pagination.page = 1
|
||||
searchForm.page = 1
|
||||
searchForm.pageSize = pageSize
|
||||
getlist()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// // 加载字典选项
|
||||
// async function loadDictOptions() {
|
||||
// //qcCancelLoading = true
|
||||
// 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 }))
|
||||
// }catch {}
|
||||
// }
|
||||
|
||||
|
||||
//新增
|
||||
let addModel = ref(false)
|
||||
|
||||
const addformRef = ref()
|
||||
|
||||
let formData = reactive<any>({
|
||||
id:'',
|
||||
ncCode:'', //NC代码编号
|
||||
ncName:'', //NC代码名称
|
||||
ncContent:'', //NC代码内容
|
||||
workCenter:'', //工作中心
|
||||
deviceId:'', //设备ID
|
||||
deviceName:'', //设备名称
|
||||
status:1, //状态:1-启用 0-禁用
|
||||
// isIssued:1, //是否已下发:1-已下发 0-未下发
|
||||
// issueTime:null, //下发时间
|
||||
// issueBy:'', //下发人
|
||||
remark:'' //备注
|
||||
})
|
||||
const addrules = {
|
||||
ncCode: [
|
||||
{ required: true, message: '请输入NC代码编号', trigger: 'blur' },
|
||||
// {
|
||||
// validator(rule:any,value: any) {
|
||||
// if(value > pauseform.qcNum){
|
||||
// return new Error(`报检数量最大为${pauseform.qcNum}`)
|
||||
// }
|
||||
// return true
|
||||
// },
|
||||
// trigger: ['blur']
|
||||
// }
|
||||
],
|
||||
ncName:[
|
||||
{ required: true, message: '请输入NC代码名称', trigger: 'blur' }
|
||||
],
|
||||
ncContent:[
|
||||
{ required: true, message: '请输入NC代码内容', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
let isstype = ref<any>(1)
|
||||
|
||||
const cztype = reactive<any>({
|
||||
1:'新增',
|
||||
2:'编辑',
|
||||
3:'复制'
|
||||
})
|
||||
|
||||
function addhand(type:any,row?:any) {
|
||||
addModel.value = true
|
||||
formData.value?.restoreValidation()
|
||||
isstype.value = type
|
||||
if(type == 1 || type == 3){
|
||||
generateNccode().then(rps => {
|
||||
formData.ncCode = rps
|
||||
})
|
||||
}
|
||||
|
||||
if(row){
|
||||
formData.id = row.id
|
||||
formData.ncName = row.ncName
|
||||
formData.ncContent = row.ncContent
|
||||
formData.workCenter = row.workCenter
|
||||
formData.deviceId = row.deviceId
|
||||
formData.deviceName = row.deviceName
|
||||
formData.status = row.status
|
||||
// formData.isIssued = row.isIssued
|
||||
// formData.issueTime = row.issueTime
|
||||
// formData.issueBy = row.issueBy
|
||||
formData.remark = row.remark
|
||||
if(type == 2){
|
||||
formData.ncCode = row.ncCode
|
||||
}else{
|
||||
formData.ncCode = ''
|
||||
}
|
||||
}else{
|
||||
formData.id = ''
|
||||
formData.ncCode = ''
|
||||
formData.ncName = ''
|
||||
formData.ncContent = ''
|
||||
formData.workCenter = ''
|
||||
formData.deviceId = ''
|
||||
formData.deviceName = ''
|
||||
formData.status = 1
|
||||
// formData.isIssued = ''
|
||||
// formData.issueTime = ''
|
||||
// formData.issueBy = ''
|
||||
formData.remark = ''
|
||||
}
|
||||
}
|
||||
|
||||
function addEdi(){
|
||||
if(isstype.value == 1){
|
||||
return addnccode(formData)
|
||||
}
|
||||
if(isstype.value == 2){
|
||||
return editccode(formData)
|
||||
}
|
||||
formData.id = ''
|
||||
return issuecopy(formData)
|
||||
|
||||
}
|
||||
|
||||
function savehand() {
|
||||
addformRef.value?.validate((e:any) => {
|
||||
if (!e) {
|
||||
|
||||
addEdi().then(() => {
|
||||
message.success(`${cztype[isstype.value]}成功`)
|
||||
setTimeout(() => {
|
||||
getlist()
|
||||
addModel.value = false
|
||||
},1500)
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//表格选中
|
||||
|
||||
function rowKey(row:any) {
|
||||
return row.id
|
||||
}
|
||||
|
||||
let chearr = ref<any>([])
|
||||
function handleCheck(v:any) {
|
||||
chearr.value = v
|
||||
console.log(v)
|
||||
}
|
||||
|
||||
//删除
|
||||
function delhand() {
|
||||
if(chearr.value.length > 0){
|
||||
batchIssue(chearr.value).then(() => {
|
||||
message.success('操作成功')
|
||||
})
|
||||
}else{
|
||||
message.error('请勾选设备')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//下发任务列表
|
||||
//let isstasklist = ref<any>([])
|
||||
|
||||
//下发设备列表
|
||||
//let issequiplist = ref<any>([])
|
||||
|
||||
let treeData:any = []
|
||||
let value = ref<Array<string | number>>([])
|
||||
let renderSourceList:any = ''
|
||||
|
||||
let options = ref<any>([]) //flattenTree(createData())
|
||||
|
||||
function flattenTree(list: undefined | any[]) {
|
||||
const result: any[] = []
|
||||
function flatten(_list: any[] = []) {
|
||||
_list.forEach((item) => {
|
||||
//result.push(item)
|
||||
if(item.childList){
|
||||
flatten(item.childList)
|
||||
}else{
|
||||
result.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
flatten(list)
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
function tranupdate(v:any) {
|
||||
console.log(v)
|
||||
}
|
||||
|
||||
//下发
|
||||
let issueModel = ref(false)
|
||||
// let issformData = reactive<any>({
|
||||
// taskid:'',
|
||||
// equis:''
|
||||
// })
|
||||
// const issaddrules = {
|
||||
// taskid:[
|
||||
// { required: true, message: '请选择下发任务', trigger: 'blur' }
|
||||
// ],
|
||||
// equis:[
|
||||
// { required: true, message: '请选择下发设备', trigger: 'blur' }
|
||||
// ]
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
function renderlabe() {}
|
||||
|
||||
function issuehand() {
|
||||
|
||||
issueModel.value = true
|
||||
|
||||
|
||||
}
|
||||
|
||||
const issformRef = ref()
|
||||
|
||||
function isssavehand() {
|
||||
issformRef.value?.validate((e:any) => {
|
||||
if (!e) {
|
||||
batchIssue('').then(() => {
|
||||
message.success('操作成功')
|
||||
setTimeout(() => {
|
||||
getlist()
|
||||
issueModel.value = false
|
||||
},1500)
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
//导出
|
||||
//let selectedIds = ref<any>([])
|
||||
function handleExport() {
|
||||
|
||||
|
||||
exportNccode({}).then(rps => {
|
||||
const url = window.URL.createObjectURL(rps)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = 'NC代码数据.xlsx'
|
||||
link.click()
|
||||
window.URL.revokeObjectURL(url)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getlist()
|
||||
|
||||
//查看下发记录
|
||||
async function handleDispatchRecord(row:ncCode){
|
||||
const ncId = row.id
|
||||
// ncDispatchRecords.value = await
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
//加载任务树
|
||||
opertree().then(rps => {
|
||||
treeData = rps
|
||||
options.value = flattenTree(treeData)
|
||||
console.log(rps,'112')
|
||||
renderSourceList = function (obj:any) {
|
||||
return h(NTree, {
|
||||
style: 'margin: 0 4px;',
|
||||
keyField: 'value',
|
||||
checkable: true,
|
||||
selectable: false,
|
||||
blockLine: true,
|
||||
checkOnClick: true,
|
||||
childrenField:'childList',
|
||||
data: treeData,
|
||||
cascade:true,
|
||||
defaultExpandAll:true,
|
||||
pattern:obj.pattern,
|
||||
checkedKeys: value.value,
|
||||
onUpdateCheckedKeys: (checkedKeys: Array<string | number>) => {
|
||||
obj.onCheck(checkedKeys)
|
||||
console.log(value.value,'tree')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
//loadDictOptions()
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@ -19,7 +19,7 @@ const searchForm = ref({
|
||||
|
||||
const pagination = reactive({
|
||||
page: 1,
|
||||
pageSize: 2,
|
||||
pageSize: 10,
|
||||
itemCount: 0,
|
||||
showSizePicker: true,
|
||||
pageSizes: [10, 20, 50]
|
||||
@ -62,8 +62,12 @@ const load = async()=>{
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '下发编号',
|
||||
key: 'issueCode'
|
||||
title: '工序名称',
|
||||
key: 'processName'
|
||||
},
|
||||
{
|
||||
title: '工序名称',
|
||||
key: 'assingCode'
|
||||
},
|
||||
{
|
||||
title: '下发类型',
|
||||
@ -89,6 +93,12 @@ const columns = [
|
||||
title: '下发时间',
|
||||
key: 'issueTime'
|
||||
},
|
||||
// {
|
||||
// title: '下发文件',
|
||||
// render(row) {
|
||||
// return row.
|
||||
// }
|
||||
// },
|
||||
{
|
||||
title: '备注',
|
||||
key: 'remark'
|
||||
@ -138,11 +148,6 @@ onMounted(()=>{
|
||||
<n-card v-if="!showSearchInput">
|
||||
<n-form inline :model="searchForm" label-placement="left">
|
||||
<n-grid :x-gap="8" :cols="4">
|
||||
<n-gi>
|
||||
<n-form-item label="下发编号">
|
||||
<n-input v-model:value="searchForm.issueCode" placeholder="请输入设备下发编号" clearable style="width: 200px"/>
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<n-form-item label="下发状态">
|
||||
<n-select
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<!-- 搜索表单 -->
|
||||
<div class="search-form">
|
||||
<n-form inline :model="searchForm" label-placement="left">
|
||||
<n-form-item label="主键ID">
|
||||
<n-form-item label="设备编码">
|
||||
<n-input v-model:value="searchForm.deviceCode" placeholder="请输入设备编码" clearable/>
|
||||
</n-form-item>
|
||||
<n-form-item>
|
||||
|
||||
@ -4,8 +4,11 @@
|
||||
<!-- 搜索表单 -->
|
||||
<div class="search-form">
|
||||
<n-form inline :model="searchForm" label-placement="left">
|
||||
<n-form-item label="主键id">
|
||||
<n-input v-model:value="searchForm.id" placeholder="请输入主键id" clearable />
|
||||
<n-form-item label="主键ID">
|
||||
<n-input v-model:value="searchForm.id" placeholder="请输入主键ID" clearable />
|
||||
</n-form-item>
|
||||
<n-form-item label="状态">
|
||||
<n-select v-model:value="searchForm.status" placeholder="请选择状态" clearable style="width: 150px" :options="statusOptions" />
|
||||
</n-form-item>
|
||||
<n-form-item>
|
||||
<n-space>
|
||||
@ -61,29 +64,26 @@
|
||||
<!-- 新增/编辑弹窗 -->
|
||||
<n-modal v-model:show="modalVisible" preset="card" :title="modalTitle" style="width: 600px">
|
||||
<n-form ref="formRef" :model="formData" :rules="formRules" label-placement="left" label-width="100px">
|
||||
<n-form-item label="质检编号" path="qcId">
|
||||
<n-input v-model:value="formData.qcId" placeholder="请输入质检编号" />
|
||||
<n-form-item label="异常过滤标题" path="title">
|
||||
<n-input v-model:value="formData.title" placeholder="请输入异常过滤标题" />
|
||||
</n-form-item>
|
||||
<n-form-item label="让步接收数量" path="concessionQty">
|
||||
<n-input v-model:value="formData.concessionQty" placeholder="请输入让步接收数量" />
|
||||
<n-form-item label="过滤条件" path="filterCondition">
|
||||
<n-input v-model:value="formData.filterCondition" type="textarea" placeholder="请输入过滤条件" />
|
||||
</n-form-item>
|
||||
<n-form-item label="申请原因" path="applyRemark">
|
||||
<n-input v-model:value="formData.applyRemark" type="textarea" placeholder="请输入申请原因" />
|
||||
<n-form-item label="描述" path="description">
|
||||
<n-input v-model:value="formData.description" type="textarea" placeholder="请输入描述" />
|
||||
</n-form-item>
|
||||
<n-form-item label="申请内容" path="applyContent">
|
||||
<n-input v-model:value="formData.applyContent" type="textarea" placeholder="请输入申请内容" />
|
||||
</n-form-item>
|
||||
<n-form-item label="申请人id(发去人id)" path="applyUserId">
|
||||
<n-input v-model:value="formData.applyUserId" placeholder="请输入申请人id(发去人id)" />
|
||||
</n-form-item>
|
||||
<n-form-item label="部门id" path="deptId">
|
||||
<n-input v-model:value="formData.deptId" placeholder="请输入部门id" />
|
||||
</n-form-item>
|
||||
<n-form-item label="钉钉单据id" path="instanceId">
|
||||
<n-input v-model:value="formData.instanceId" placeholder="请输入钉钉单据id" />
|
||||
</n-form-item>
|
||||
<n-form-item label="审批状态 1待审批 2审批通过 3 审批驳回" path="approveStatus">
|
||||
<n-select v-model:value="formData.approveStatus" placeholder="请选择审批状态 1待审批 2审批通过 3 审批驳回" :options="approveStatusOptions" />
|
||||
<n-form-item label="状态">
|
||||
<n-radio-group v-model:value="formData.status" :default-value="0" >
|
||||
<n-space>
|
||||
<n-radio :value="1">
|
||||
启用
|
||||
</n-radio>
|
||||
<n-radio :value="0">
|
||||
禁用
|
||||
</n-radio>
|
||||
</n-space>
|
||||
</n-radio-group>
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
<template #footer>
|
||||
@ -95,7 +95,7 @@
|
||||
</n-modal>
|
||||
|
||||
<!-- 导入弹窗 -->
|
||||
<n-modal v-model:show="importModalVisible" preset="card" title="导入让步接收申请表" style="width: 500px">
|
||||
<n-modal v-model:show="importModalVisible" preset="card" title="导入异常过滤表" style="width: 500px">
|
||||
<n-space vertical>
|
||||
<n-alert type="info">
|
||||
<template #header>导入说明</template>
|
||||
@ -131,7 +131,7 @@
|
||||
import { ref, reactive, h, onMounted } from 'vue'
|
||||
import { NButton, NSpace, NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions } from 'naive-ui'
|
||||
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline } from '@vicons/ionicons5'
|
||||
import { concessionApplyApi, type ConcessionApply } from '@/api/concessionApply'
|
||||
import { exceptionFilterApi, type ExceptionFilter } from '@/api/exceptionFilter'
|
||||
import { dictDataApi } from '@/api/org'
|
||||
|
||||
const message = useMessage()
|
||||
@ -140,10 +140,11 @@ const dialog = useDialog()
|
||||
// 搜索表单
|
||||
const searchForm = reactive({
|
||||
id: null as number | null,
|
||||
status: null as number | null,
|
||||
})
|
||||
|
||||
// 表格数据
|
||||
const tableData = ref<ConcessionApply[]>([])
|
||||
const tableData = ref<ExceptionFilter[]>([])
|
||||
const loading = ref(false)
|
||||
const selectedIds = ref<number[]>([])
|
||||
const pagination = reactive({
|
||||
@ -159,47 +160,35 @@ const modalVisible = ref(false)
|
||||
const modalTitle = ref('')
|
||||
const importModalVisible = ref(false)
|
||||
const formRef = ref()
|
||||
const defaultFormData: ConcessionApply = {
|
||||
qcId: undefined,
|
||||
concessionQty: undefined,
|
||||
applyRemark: '',
|
||||
applyContent: '',
|
||||
applyFile: '',
|
||||
applyUserId: undefined,
|
||||
deptId: undefined,
|
||||
instanceId: '',
|
||||
approveStatus: undefined,
|
||||
const defaultFormData: ExceptionFilter = {
|
||||
title: '',
|
||||
filterCondition: '',
|
||||
description: '',
|
||||
status: undefined,
|
||||
}
|
||||
const formData = reactive<ConcessionApply>({ ...defaultFormData })
|
||||
const formData = reactive<ExceptionFilter>({ ...defaultFormData })
|
||||
|
||||
// 字典选项(下拉框/单选框/复选框关联字典时使用)
|
||||
const approveStatusOptions = ref<{ label: string; value: any }[]>([])
|
||||
const statusOptions = ref<{ label: string; value: any }[]>([])
|
||||
|
||||
// 表单校验规则
|
||||
const formRules = {
|
||||
}
|
||||
|
||||
// 表格列
|
||||
const columns: DataTableColumns<ConcessionApply> = [
|
||||
const columns: DataTableColumns<ExceptionFilter> = [
|
||||
{ type: 'selection' },
|
||||
{ title: '主键id', key: 'id' },
|
||||
{ title: '质检编号', key: 'qcId' },
|
||||
{ title: '让步接收数量', key: 'concessionQty' },
|
||||
{ title: '申请原因', key: 'applyRemark' },
|
||||
{ title: '申请内容', key: 'applyContent' },
|
||||
{ title: '申请附件', key: 'applyFile' },
|
||||
{ title: '申请人id(发去人id)', key: 'applyUserId' },
|
||||
{ title: '部门id', key: 'deptId' },
|
||||
{ title: '钉钉单据id', key: 'instanceId' },
|
||||
{ title: '审批状态 1待审批 2审批通过 3 审批驳回', key: 'approveStatus',
|
||||
{ title: '主键ID', key: 'id' },
|
||||
{ title: '异常过滤标题', key: 'title' },
|
||||
{ title: '过滤条件', key: 'filterCondition' },
|
||||
{ title: '描述', key: 'description' },
|
||||
{ title: '状态', key: 'status',
|
||||
render(row) {
|
||||
const val = row.approveStatus
|
||||
const opt = approveStatusOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
const val = row.status
|
||||
const opt = statusOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
return opt ? opt.label : (val ?? '-')
|
||||
}
|
||||
},
|
||||
{ title: '创建时间', key: 'createTime', width: 180 },
|
||||
{ title: '更新时间', key: 'updateTime', width: 180 },
|
||||
{
|
||||
title: '操作',
|
||||
key: 'actions',
|
||||
@ -222,10 +211,11 @@ const columns: DataTableColumns<ConcessionApply> = [
|
||||
async function loadData() {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await concessionApplyApi.page({
|
||||
const res = await exceptionFilterApi.page({
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
id: searchForm.id || undefined,
|
||||
status: searchForm.status || undefined,
|
||||
})
|
||||
tableData.value = res.list
|
||||
pagination.itemCount = res.total
|
||||
@ -244,6 +234,8 @@ function handleSearch() {
|
||||
function handleReset() {
|
||||
searchForm.id = null
|
||||
|
||||
searchForm.status = null
|
||||
|
||||
handleSearch()
|
||||
}
|
||||
|
||||
@ -266,21 +258,15 @@ function handleCheck(keys: Array<string | number>) {
|
||||
|
||||
// 新增
|
||||
function handleAdd() {
|
||||
modalTitle.value = '新增让步接收申请表'
|
||||
modalTitle.value = '新增异常过滤表'
|
||||
Object.assign(formData, defaultFormData)
|
||||
modalVisible.value = true
|
||||
}
|
||||
|
||||
// 编辑
|
||||
function handleEdit(row: ConcessionApply) {
|
||||
modalTitle.value = '编辑让步接收申请表'
|
||||
function handleEdit(row: ExceptionFilter) {
|
||||
modalTitle.value = '编辑异常过滤表'
|
||||
Object.assign(formData, row)
|
||||
if (formData.createTime && typeof formData.createTime === 'string') {
|
||||
formData.createTime = new Date(formData.createTime.replace(' ', 'T')).getTime()
|
||||
}
|
||||
if (formData.updateTime && typeof formData.updateTime === 'string') {
|
||||
formData.updateTime = new Date(formData.updateTime.replace(' ', 'T')).getTime()
|
||||
}
|
||||
modalVisible.value = true
|
||||
}
|
||||
|
||||
@ -288,18 +274,12 @@ function handleEdit(row: ConcessionApply) {
|
||||
async function handleSubmit() {
|
||||
await formRef.value?.validate()
|
||||
try {
|
||||
const submitData = { ...formData } as ConcessionApply
|
||||
if (typeof submitData.createTime === 'number') {
|
||||
submitData.createTime = new Date(submitData.createTime).toISOString().slice(0, 19).replace('T', ' ')
|
||||
}
|
||||
if (typeof submitData.updateTime === 'number') {
|
||||
submitData.updateTime = new Date(submitData.updateTime).toISOString().slice(0, 19).replace('T', ' ')
|
||||
}
|
||||
const submitData = { ...formData } as ExceptionFilter
|
||||
if (submitData.id) {
|
||||
await concessionApplyApi.update(submitData)
|
||||
await exceptionFilterApi.update(submitData)
|
||||
message.success('修改成功')
|
||||
} else {
|
||||
await concessionApplyApi.create(submitData)
|
||||
await exceptionFilterApi.create(submitData)
|
||||
message.success('新增成功')
|
||||
}
|
||||
modalVisible.value = false
|
||||
@ -310,7 +290,7 @@ async function handleSubmit() {
|
||||
}
|
||||
|
||||
// 删除
|
||||
function handleDelete(row: ConcessionApply) {
|
||||
function handleDelete(row: ExceptionFilter) {
|
||||
dialog.warning({
|
||||
title: '提示',
|
||||
content: '确定要删除该记录吗?',
|
||||
@ -318,7 +298,7 @@ function handleDelete(row: ConcessionApply) {
|
||||
negativeText: '取消',
|
||||
onPositiveClick: async () => {
|
||||
try {
|
||||
await concessionApplyApi.delete([row.id!])
|
||||
await exceptionFilterApi.delete([row.id!])
|
||||
message.success('删除成功')
|
||||
loadData()
|
||||
} catch (error) {
|
||||
@ -337,7 +317,7 @@ function handleBatchDelete() {
|
||||
negativeText: '取消',
|
||||
onPositiveClick: async () => {
|
||||
try {
|
||||
await concessionApplyApi.delete(selectedIds.value)
|
||||
await exceptionFilterApi.delete(selectedIds.value)
|
||||
message.success('删除成功')
|
||||
selectedIds.value = []
|
||||
loadData()
|
||||
@ -354,11 +334,12 @@ async function handleExport() {
|
||||
const params: Record<string, any> = {}
|
||||
if (selectedIds.value.length > 0) params.ids = selectedIds.value
|
||||
if (searchForm.id != null) params.id = searchForm.id
|
||||
const blob = await concessionApplyApi.export(params)
|
||||
if (searchForm.status != null) params.status = searchForm.status
|
||||
const blob = await exceptionFilterApi.export(params)
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = '让步接收申请表数据.xlsx'
|
||||
link.download = '异常过滤表数据.xlsx'
|
||||
link.click()
|
||||
window.URL.revokeObjectURL(url)
|
||||
} catch (error) {
|
||||
@ -369,11 +350,11 @@ async function handleExport() {
|
||||
// 下载导入模板
|
||||
async function handleDownloadTemplate() {
|
||||
try {
|
||||
const blob = await concessionApplyApi.downloadTemplate()
|
||||
const blob = await exceptionFilterApi.downloadTemplate()
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = '让步接收申请表导入模板.xlsx'
|
||||
link.download = '异常过滤表导入模板.xlsx'
|
||||
link.click()
|
||||
window.URL.revokeObjectURL(url)
|
||||
} catch (error) {
|
||||
@ -385,7 +366,7 @@ async function handleDownloadTemplate() {
|
||||
async function handleImportUpload({ file }: UploadCustomRequestOptions) {
|
||||
if (!file.file) return
|
||||
try {
|
||||
const result = await concessionApplyApi.importData(file.file)
|
||||
const result = await exceptionFilterApi.importData(file.file)
|
||||
if (result.fail > 0) {
|
||||
dialog.warning({
|
||||
title: '导入结果',
|
||||
@ -406,7 +387,7 @@ async function handleImportUpload({ file }: UploadCustomRequestOptions) {
|
||||
async function loadDictOptions() {
|
||||
try {
|
||||
const data = await dictDataApi.listByType('sys_status')
|
||||
approveStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
statusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue) }))
|
||||
} catch {}
|
||||
}
|
||||
|
||||
@ -373,6 +373,7 @@
|
||||
:obj="n"
|
||||
:index="i"
|
||||
:section="dispatchform.workCenterName"
|
||||
:workShop="dispatchform.workShop"
|
||||
listname="list"
|
||||
@addhand="addpgnum"
|
||||
@delehand="deletenum(i)"
|
||||
@ -551,10 +552,28 @@
|
||||
|
||||
|
||||
<!-- 汇报详情弹窗 -->
|
||||
<n-modal v-model:show="submitLogModalVisible" preset="card" title="导入工序计划" style="width: 500px">
|
||||
|
||||
<n-modal v-model:show="submitLogModalVisible" preset="card" title="工序汇报详情" style="width: 2000px">
|
||||
<ReportDetailPage
|
||||
:planId="processId"
|
||||
/>
|
||||
<template #footer>
|
||||
<n-space justify="end">
|
||||
<n-button size="small" @click="submitLogModalVisible = false">取消</n-button>
|
||||
</n-space>
|
||||
</template>
|
||||
</n-modal>
|
||||
|
||||
|
||||
<n-modal v-model:show="submitModalVisible" preset="card" title="工单汇报详情" style="width: 2000px">
|
||||
<OrderReportDetailPage
|
||||
:orderItemId="orderItemId"
|
||||
/>
|
||||
<template #footer>
|
||||
<n-space justify="end">
|
||||
<n-button size="small" @click="submitLogModalVisible = false">取消</n-button>
|
||||
</n-space>
|
||||
</template>
|
||||
</n-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -570,7 +589,7 @@ import {
|
||||
AddOutline, RemoveOutline, SearchOutline, RefreshOutline, CloudUploadOutline,
|
||||
DownloadOutline, ChevronDownOutline, CheckmarkCircleOutline, CheckmarkCircle,
|
||||
EllipseOutline, TimeOutline, PrintOutline, SyncOutline, PeopleOutline,
|
||||
GitBranchOutline, CloseCircleOutline, LockClosedOutline, TrashOutline,
|
||||
GitBranchOutline, CloseCircleOutline, LockClosedOutline, TrashOutline, EyeSharp,
|
||||
} from '@vicons/ionicons5'
|
||||
import {
|
||||
orderProcessPlanApi,
|
||||
@ -588,8 +607,8 @@ import ProcessCard from './components/ProcessCard.vue'
|
||||
import PlmModelDrawer from '@/components/PlmModelDrawer.vue'
|
||||
import type { PlmModelOpenContext } from '@/api/plmModel'
|
||||
import Pgitem from './pgitem.vue'
|
||||
import { submitLogApi } from '@/api/submitLog.ts'
|
||||
|
||||
import ReportDetailPage from "@/views/biz/orderProcessPlan/components/ReportDetail.vue";
|
||||
import OrderReportDetailPage from "@/views/biz/orderProcessPlan/components/OrderReportDetail.vue";
|
||||
|
||||
|
||||
const message = useMessage()
|
||||
@ -630,15 +649,14 @@ const dispatchLoading = ref(false)
|
||||
const dispatchformRef = ref()
|
||||
const dispatchform = reactive<any>({
|
||||
id: '', name: '', beginTime: '', endTime: '', quantity: '',workCenterName:'',
|
||||
completedQty: 0,
|
||||
remainQty: 0,
|
||||
list: [{ sectionId: '', deviceId: '', userList: '', quantity: '' }],
|
||||
list: [{ sectionId:'',deviceId:'', quantity: '' }],
|
||||
})
|
||||
const dispatchrules = {}
|
||||
|
||||
const importModalVisible = ref(false)
|
||||
const plmModelDrawerRef = ref<InstanceType<typeof PlmModelDrawer> | null>(null)
|
||||
|
||||
const submitModalVisible = ref<Boolean>(false)
|
||||
|
||||
const outsourceModalVisible = ref(false)
|
||||
const outsourceOptionsLoading = ref(false)
|
||||
@ -681,13 +699,14 @@ function openPlmModel(order: OrderProcessPlanVO, process?: ProcessPlanItemVO) {
|
||||
|
||||
//汇报记录详情
|
||||
const submitLogModalVisible = ref<Boolean>(false)
|
||||
|
||||
const processId = ref<number | null>(null)
|
||||
|
||||
//汇报详情
|
||||
function openDetailModel(order:ProcessPlanItemVO,procces?:OrderProcessPlanVO) {
|
||||
function openDetailModel(order:ProcessPlanItemVO,process?:OrderProcessPlanVO) {
|
||||
|
||||
// submitLogModalVisible.value = true
|
||||
// const processId = procces.planId
|
||||
submitLogModalVisible.value = true
|
||||
console.log(process.planId)
|
||||
processId.value = process.planId
|
||||
|
||||
}
|
||||
|
||||
@ -726,6 +745,7 @@ const moreOptions = [
|
||||
{ label: '创建返工单', key: 'createRework', icon: dropdownIcon(SyncOutline) },
|
||||
{ label: '创建工序委外', key: 'createOutsource', icon: dropdownIcon(PeopleOutline) },
|
||||
{ label: '拆分工单', key: 'splitWorkOrder', icon: dropdownIcon(GitBranchOutline) },
|
||||
{ label: '汇报详情', key: 'reportDetailView', icon: dropdownIcon(EyeSharp) },
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -880,6 +900,11 @@ function onMoreSelect(key: string, order: OrderProcessPlanVO) {
|
||||
openOutsource(order)
|
||||
return
|
||||
}
|
||||
if (key === 'reportDetailView') {
|
||||
openReportDetail(order)
|
||||
return;
|
||||
}
|
||||
|
||||
const labels: Record<string, string> = {
|
||||
print: '打印',
|
||||
createRework: '创建返工单',
|
||||
@ -1056,7 +1081,7 @@ async function handleSubmit() {
|
||||
}
|
||||
|
||||
function disphand(process: ProcessPlanItemVO, order?: OrderProcessPlanVO) {
|
||||
const entity = processItemToEntity(process, order?.orderItemId)
|
||||
const entity = processItemToEntity(process, order?.orderItemId,order?.proWorkshop)
|
||||
|
||||
const planQty = Number(entity.quantity) || 0
|
||||
const completedQty = Number(process.completedQty) || 0
|
||||
@ -1075,6 +1100,12 @@ function disphand(process: ProcessPlanItemVO, order?: OrderProcessPlanVO) {
|
||||
dispatchform.orderItemId = entity.orderItemId
|
||||
dispatchform.sort = entity.sort
|
||||
dispatchform.workCenterName = entity.workCenterName
|
||||
dispatchform.workShop = entity.proWorkshop
|
||||
dispatchform.list = [{ sectionId:'',deviceId:'', quantity: '' }]
|
||||
|
||||
console.log(dispatchform)
|
||||
|
||||
|
||||
dispatchform.list = [{ sectionId: '', deviceId: '', userList: '', quantity: remainQty || '' }]
|
||||
}
|
||||
|
||||
@ -1156,6 +1187,15 @@ async function handleImportUpload({ file }: UploadCustomRequestOptions) {
|
||||
loadData()
|
||||
}
|
||||
|
||||
|
||||
const orderItemId = ref<number>(null)
|
||||
|
||||
function openReportDetail(order) {
|
||||
submitModalVisible.value = true
|
||||
orderItemId.value = order.orderItemId
|
||||
|
||||
}
|
||||
|
||||
onMounted(loadData)
|
||||
</script>
|
||||
|
||||
|
||||
211
src/views/biz/orderProcessPlan/components/OrderReportDetail.vue
Normal file
211
src/views/biz/orderProcessPlan/components/OrderReportDetail.vue
Normal file
@ -0,0 +1,211 @@
|
||||
<script setup lang="ts">
|
||||
import {SubmitLog, submitLogApi} from '@/api/submitLog'
|
||||
import {h, onMounted, reactive, ref} from "vue";
|
||||
import {NButton, NDataTable, NIcon, NSpace, NTag} from "naive-ui";
|
||||
import { dictDataApi } from "@/api/org";
|
||||
import {ArrowDown, ArrowUp, RefreshOutline, SearchOutline} from "@vicons/ionicons5";
|
||||
const props = defineProps<{
|
||||
orderItemId: number
|
||||
}>()
|
||||
|
||||
const searchForm = ref({
|
||||
submitStatus: undefined
|
||||
})
|
||||
|
||||
const submitList = ref<SubmitLog[]>([])
|
||||
//根据工序Id加载汇报详情
|
||||
async function loadReportDetail() {
|
||||
try {
|
||||
|
||||
console.log(props.orderItemId)
|
||||
const res = await submitLogApi.getOrderItemReportDetail({
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
submitStatus: searchForm.value.submitStatus,
|
||||
orderItemId:props.orderItemId
|
||||
})
|
||||
submitList.value = res.list
|
||||
pagination.itemCount = res.total
|
||||
} catch (error) {
|
||||
console.error('加载汇报详情失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '提交数量',
|
||||
key: 'quantity',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '提交人',
|
||||
key: 'userName',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '提交时间',
|
||||
key: 'createTime',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '汇报状态',
|
||||
key: 'submitStatus',
|
||||
width: 120,
|
||||
render(row) {
|
||||
const option = submitStatusOptions.value.find(o => o.value === row.submitStatus)
|
||||
return h(NTag, { type: option.class, size: 'small' }, { default: () => option.label })
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
const submitStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||
|
||||
// 加载字典选项
|
||||
async function loadDictOptions() {
|
||||
try {
|
||||
const data = await dictDataApi.listByType('submit_status')
|
||||
submitStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
|
||||
}catch {}
|
||||
}
|
||||
|
||||
const doShowInner = () => {
|
||||
if (showSearchInput.value) {
|
||||
showSearchInput.value = false
|
||||
}else {
|
||||
showSearchInput.value = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const showSearchInput = ref<Boolean>(false)
|
||||
|
||||
|
||||
const pagination = reactive({
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
itemCount: 0,
|
||||
showSizePicker: true,
|
||||
pageSizes: [10, 20, 50]
|
||||
})
|
||||
|
||||
|
||||
const handleSearch = () => {
|
||||
loadReportDetail()
|
||||
}
|
||||
|
||||
|
||||
const handleReset = () => {
|
||||
searchForm.value.submitStatus = null
|
||||
pagination.page = 1
|
||||
pagination.pageSize = 10
|
||||
loadReportDetail()
|
||||
}
|
||||
|
||||
|
||||
// 分页
|
||||
function handlePageChange(page: number) {
|
||||
pagination.page = page
|
||||
loadReportDetail()
|
||||
}
|
||||
|
||||
function handlePageSizeChange(pageSize: number) {
|
||||
pagination.pageSize = pageSize
|
||||
pagination.page = 1
|
||||
loadReportDetail()
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
loadReportDetail()
|
||||
loadDictOptions()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<n-button @click="doShowInner" v-if="showSearchInput">
|
||||
<n-icon size="20" :depth="3">
|
||||
<ArrowDown/>
|
||||
</n-icon>
|
||||
展开
|
||||
</n-button>
|
||||
<n-card v-if="!showSearchInput">
|
||||
<n-form inline :model="searchForm" label-placement="left">
|
||||
<n-grid :x-gap="8" :cols="4">
|
||||
<n-gi>
|
||||
<n-form-item label="汇报状态">
|
||||
<n-select
|
||||
v-model:value="searchForm.submitStatus"
|
||||
:options="submitStatusOptions"
|
||||
placeholder="请选择异常类型"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<n-form-item>
|
||||
<n-space>
|
||||
<n-button type="primary" @click="handleSearch">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<SearchOutline/>
|
||||
</n-icon>
|
||||
</template>
|
||||
搜索
|
||||
</n-button>
|
||||
<n-button @click="handleReset">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<RefreshOutline/>
|
||||
</n-icon>
|
||||
</template>
|
||||
重置
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
|
||||
|
||||
</n-form>
|
||||
<n-button @click="doShowInner" v-if="!showSearchInput" style="float: right;margin: 10px">
|
||||
<n-icon size="20" :depth="3">
|
||||
<ArrowUp/>
|
||||
</n-icon>
|
||||
闭合
|
||||
</n-button>
|
||||
</n-card>
|
||||
|
||||
<n-card style="margin: 10px 0">
|
||||
<n-scrollbar x-scrollable>
|
||||
<n-data-table
|
||||
:columns="columns"
|
||||
:data="submitList"
|
||||
:bordered="false"
|
||||
/>
|
||||
|
||||
<div class="pagination-container" style="display: flex; justify-content: flex-end; margin-top: 12px">
|
||||
<n-pagination
|
||||
v-model:page="pagination.page"
|
||||
v-model:page-size="pagination.pageSize"
|
||||
:item-count="pagination.itemCount"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
show-size-picker
|
||||
show-quick-jumper
|
||||
@update:page="handlePageChange"
|
||||
@update:page-size="handlePageSizeChange"
|
||||
>
|
||||
<template #prefix>
|
||||
共 {{ pagination.itemCount }} 条
|
||||
</template>
|
||||
</n-pagination>
|
||||
</div>
|
||||
</n-scrollbar>
|
||||
|
||||
</n-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@ -96,7 +96,7 @@
|
||||
>委外</n-button>
|
||||
<n-button
|
||||
size="tiny"
|
||||
quaternary
|
||||
type="info"
|
||||
ghost
|
||||
@click="emit('submitDetail', process)"
|
||||
>汇报</n-button>
|
||||
|
||||
209
src/views/biz/orderProcessPlan/components/ReportDetail.vue
Normal file
209
src/views/biz/orderProcessPlan/components/ReportDetail.vue
Normal file
@ -0,0 +1,209 @@
|
||||
<script setup lang="ts">
|
||||
import {SubmitLog, submitLogApi} from '@/api/submitLog'
|
||||
import {h, onMounted, reactive, ref} from "vue";
|
||||
import {NButton, NDataTable, NIcon, NSpace, NTag} from "naive-ui";
|
||||
import { dictDataApi } from "@/api/org";
|
||||
import {ArrowDown, ArrowUp, RefreshOutline, SearchOutline} from "@vicons/ionicons5";
|
||||
const props = defineProps<{
|
||||
planId: number
|
||||
}>()
|
||||
|
||||
const searchForm = ref({
|
||||
submitStatus: undefined
|
||||
})
|
||||
|
||||
const submitList = ref<SubmitLog[]>([])
|
||||
//根据工序Id加载汇报详情
|
||||
async function loadReportDetail() {
|
||||
try {
|
||||
const res = await submitLogApi.getProcessReportDetail({
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
submitStatus: searchForm.value.submitStatus,
|
||||
processId:props.planId
|
||||
})
|
||||
submitList.value = res.list
|
||||
pagination.itemCount = res.total
|
||||
} catch (error) {
|
||||
console.error('加载汇报详情失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '提交数量',
|
||||
key: 'quantity',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '提交人',
|
||||
key: 'userName',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '提交时间',
|
||||
key: 'createTime',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '汇报状态',
|
||||
key: 'submitStatus',
|
||||
width: 120,
|
||||
render(row) {
|
||||
const option = submitStatusOptions.value.find(o => o.value === row.submitStatus)
|
||||
return h(NTag, { type: option.class, size: 'small' }, { default: () => option.label })
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
const submitStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||
|
||||
// 加载字典选项
|
||||
async function loadDictOptions() {
|
||||
try {
|
||||
const data = await dictDataApi.listByType('submit_status')
|
||||
submitStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
|
||||
}catch {}
|
||||
}
|
||||
|
||||
const doShowInner = () => {
|
||||
if (showSearchInput.value) {
|
||||
showSearchInput.value = false
|
||||
}else {
|
||||
showSearchInput.value = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const showSearchInput = ref<Boolean>(false)
|
||||
|
||||
|
||||
const pagination = reactive({
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
itemCount: 0,
|
||||
showSizePicker: true,
|
||||
pageSizes: [10, 20, 50]
|
||||
})
|
||||
|
||||
|
||||
const handleSearch = () => {
|
||||
loadReportDetail()
|
||||
}
|
||||
|
||||
|
||||
const handleReset = () => {
|
||||
searchForm.value.submitStatus = null
|
||||
pagination.page = 1
|
||||
pagination.pageSize = 10
|
||||
loadReportDetail()
|
||||
}
|
||||
|
||||
|
||||
// 分页
|
||||
function handlePageChange(page: number) {
|
||||
pagination.page = page
|
||||
loadReportDetail()
|
||||
}
|
||||
|
||||
function handlePageSizeChange(pageSize: number) {
|
||||
pagination.pageSize = pageSize
|
||||
pagination.page = 1
|
||||
loadReportDetail()
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
loadReportDetail()
|
||||
loadDictOptions()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<n-button @click="doShowInner" v-if="showSearchInput">
|
||||
<n-icon size="20" :depth="3">
|
||||
<ArrowDown/>
|
||||
</n-icon>
|
||||
展开
|
||||
</n-button>
|
||||
<n-card v-if="!showSearchInput">
|
||||
<n-form inline :model="searchForm" label-placement="left">
|
||||
<n-grid :x-gap="8" :cols="4">
|
||||
<n-gi>
|
||||
<n-form-item label="汇报状态">
|
||||
<n-select
|
||||
v-model:value="searchForm.submitStatus"
|
||||
:options="submitStatusOptions"
|
||||
placeholder="请选择异常类型"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<n-form-item>
|
||||
<n-space>
|
||||
<n-button type="primary" @click="handleSearch">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<SearchOutline/>
|
||||
</n-icon>
|
||||
</template>
|
||||
搜索
|
||||
</n-button>
|
||||
<n-button @click="handleReset">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<RefreshOutline/>
|
||||
</n-icon>
|
||||
</template>
|
||||
重置
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
|
||||
|
||||
</n-form>
|
||||
<n-button @click="doShowInner" v-if="!showSearchInput" style="float: right;margin: 10px">
|
||||
<n-icon size="20" :depth="3">
|
||||
<ArrowUp/>
|
||||
</n-icon>
|
||||
闭合
|
||||
</n-button>
|
||||
</n-card>
|
||||
|
||||
<n-card style="margin: 10px 0">
|
||||
<n-scrollbar x-scrollable>
|
||||
<n-data-table
|
||||
:columns="columns"
|
||||
:data="submitList"
|
||||
:bordered="false"
|
||||
/>
|
||||
|
||||
<div class="pagination-container" style="display: flex; justify-content: flex-end; margin-top: 12px">
|
||||
<n-pagination
|
||||
v-model:page="pagination.page"
|
||||
v-model:page-size="pagination.pageSize"
|
||||
:item-count="pagination.itemCount"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
show-size-picker
|
||||
show-quick-jumper
|
||||
@update:page="handlePageChange"
|
||||
@update:page-size="handlePageSizeChange"
|
||||
>
|
||||
<template #prefix>
|
||||
共 {{ pagination.itemCount }} 条
|
||||
</template>
|
||||
</n-pagination>
|
||||
</div>
|
||||
</n-scrollbar>
|
||||
|
||||
</n-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@ -95,6 +95,7 @@
|
||||
obj:any,
|
||||
index:any
|
||||
section:string
|
||||
workShop: string
|
||||
}>(), {
|
||||
obj:{}
|
||||
})
|
||||
@ -155,7 +156,7 @@
|
||||
//加载工段
|
||||
async function loadSection() {
|
||||
//根据section 进行匹配
|
||||
const res = await sectionApi.list({sectionName:props.section})
|
||||
const res = await sectionApi.list({sectionName:props.section,workShop:props.workShop})
|
||||
const mesSection = res.MesSection;
|
||||
const mesDevice = res.MesDevice
|
||||
console.log(mesSection);
|
||||
|
||||
@ -311,7 +311,7 @@ const defaultFormData: QcItem = {
|
||||
plans: '',
|
||||
description: '',
|
||||
createby: undefined,
|
||||
status:undefined
|
||||
status:0
|
||||
}
|
||||
const formData = reactive<QcItem>({ ...defaultFormData })
|
||||
|
||||
@ -319,6 +319,8 @@ const formData = reactive<QcItem>({ ...defaultFormData })
|
||||
|
||||
// 表单校验规则
|
||||
const formRules = {
|
||||
name: [{ required: true, message: '请输入质检项名称', trigger: 'blur' }],
|
||||
spec: [{ required: true, message: '请输入质检项规格', trigger: 'blur' }],
|
||||
}
|
||||
|
||||
// 表格列
|
||||
@ -497,15 +499,16 @@ async function handleSubmit() {
|
||||
if (typeof submitData.updateTime === 'number') {
|
||||
submitData.updateTime = new Date(submitData.updateTime).toISOString().slice(0, 19).replace('T', ' ')
|
||||
}
|
||||
if (submitData.id) {
|
||||
await qcItemApi.update(submitData)
|
||||
message.success('修改成功')
|
||||
} else {
|
||||
await qcItemApi.create(submitData)
|
||||
message.success('新增成功')
|
||||
}
|
||||
modalVisible.value = false
|
||||
loadData()
|
||||
console.log(submitData)
|
||||
// if (submitData.id) {
|
||||
// await qcItemApi.update(submitData)
|
||||
// message.success('修改成功')
|
||||
// } else {
|
||||
// await qcItemApi.create(submitData)
|
||||
// message.success('新增成功')
|
||||
// }
|
||||
// modalVisible.value = false
|
||||
// loadData()
|
||||
} catch (error) {
|
||||
// 错误已在拦截器处理
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
</n-button>
|
||||
</n-space>
|
||||
</div>
|
||||
<n-scrollbar x-scrollable>
|
||||
<n-data-table
|
||||
v-model:expanded-row-keys="AssingWorkExpandedKeys"
|
||||
:columns="AssingWorkColumns"
|
||||
@ -22,6 +23,8 @@
|
||||
size="small"
|
||||
style="margin-bottom:15px"
|
||||
/>
|
||||
</n-scrollbar>
|
||||
|
||||
<div class="pagination-container" style="display: flex; justify-content: flex-end; margin-top: 12px">
|
||||
<n-pagination
|
||||
v-model:page="pagination.page"
|
||||
@ -43,12 +46,12 @@
|
||||
<div>
|
||||
<SubmitLogInfoPage
|
||||
v-if="baseInfo.logOrQuality === 'log'"
|
||||
:submitLogList="submitLogList"
|
||||
:assingId="assingId"
|
||||
:baseInfo="baseInfo"
|
||||
/>
|
||||
<QualityInfoPage
|
||||
v-if="baseInfo.logOrQuality === 'Quality'"
|
||||
:qualityTestingList="qualityList"
|
||||
:assingId="assingId"
|
||||
:baseInfo="baseInfo"
|
||||
/>
|
||||
</div>
|
||||
@ -506,10 +509,11 @@ async function loadDictOptions() {
|
||||
}
|
||||
|
||||
//汇报信息弹窗
|
||||
const assingId = ref<number>(null)
|
||||
function handleReportRecords(row:any) {
|
||||
showQcReport.value = true
|
||||
reportTitle.value = "汇报信息"
|
||||
submitLogList.value = row.submitLogList
|
||||
assingId.value = row.id
|
||||
baseInfo.value = {...row}
|
||||
baseInfo.value.logOrQuality = "log"
|
||||
}
|
||||
@ -520,8 +524,7 @@ function handleReportRecords(row:any) {
|
||||
function handleQualityRecords(row:any) {
|
||||
showQcReport.value = true
|
||||
reportTitle.value = "质检信息"
|
||||
qualityList.value = row.qualityTestingList
|
||||
console.log(qualityList.value)
|
||||
assingId.value = row.id
|
||||
baseInfo.value = {...row}
|
||||
baseInfo.value.logOrQuality = "Quality"
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
<n-data-table
|
||||
:columns="reportRecordsColums"
|
||||
size="small"
|
||||
:data="props.qualityTestingList"
|
||||
:data="qualityTestingList"
|
||||
remote
|
||||
:scroll-x="600"
|
||||
/>
|
||||
@ -39,11 +39,11 @@ import { NCard, NDataTable, NGi,NTag, NGrid,DataTableColumns} from "naive-ui";
|
||||
import {onMounted, ref,h} from "vue";
|
||||
import { dictDataApi } from '@/api/org'
|
||||
|
||||
import {QualityTesting} from "@/api/qualityTesting.ts";
|
||||
import {QualityTesting,qualityTestingApi} from "@/api/qualityTesting.ts";
|
||||
|
||||
const props =defineProps(
|
||||
{
|
||||
qualityTestingList:Object,
|
||||
assingId:Object,
|
||||
baseInfo:Object
|
||||
}
|
||||
)
|
||||
@ -91,9 +91,15 @@ async function loadDictOptions() {
|
||||
}
|
||||
|
||||
|
||||
const qualityTestingList = ref<QualityTesting[]>([])
|
||||
async function loadQualityTestingList() {
|
||||
const res = await qualityTestingApi.loadQualityTestingList(props.assingId)
|
||||
qualityTestingList.value = res
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
loadDictOptions()
|
||||
loadQualityTestingList()
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
<n-data-table
|
||||
:columns="reportRecordsColums"
|
||||
size="small"
|
||||
:data="props.submitLogList"
|
||||
:data="submitLogList"
|
||||
remote
|
||||
:scroll-x="600"
|
||||
/>
|
||||
@ -38,11 +38,11 @@
|
||||
import { NCard, NDataTable, NGi,NTag, NGrid,DataTableColumns} from "naive-ui";
|
||||
import {onMounted, ref,h} from "vue";
|
||||
import { dictDataApi } from '@/api/org'
|
||||
import { SubmitLog } from '@/api/submitLog'
|
||||
import { SubmitLog,submitLogApi} from '@/api/submitLog'
|
||||
|
||||
const props =defineProps(
|
||||
{
|
||||
submitLogList:Object,
|
||||
assingId:Number,
|
||||
baseInfo:Object
|
||||
}
|
||||
)
|
||||
@ -64,7 +64,8 @@ const reportRecordsColums:DataTableColumns<SubmitLog> = [
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '汇报时间', key: 'createTime',align: 'center' },
|
||||
]
|
||||
|
||||
// 加载字典选项
|
||||
@ -75,10 +76,16 @@ async function loadDictOptions() {
|
||||
}catch {}
|
||||
}
|
||||
|
||||
|
||||
//加载汇报信息
|
||||
const submitLogList = ref<SubmitLog[]>([])
|
||||
async function load() {
|
||||
const res = await submitLogApi.loadSumbitLog(props.assingId)
|
||||
submitLogList.value = res
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
loadDictOptions()
|
||||
load()
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@ -280,19 +280,6 @@ const pagination = reactive({
|
||||
|
||||
const plmModelDrawerRef = ref<InstanceType<typeof PlmModelDrawer> | null>(null)
|
||||
|
||||
function openPlmModel(row: Record<string, unknown>) {
|
||||
console.log(row);
|
||||
|
||||
const ctx: PlmModelOpenContext = {
|
||||
orderItemId: row.orderItemId as string | number,
|
||||
dispatchId: row.id as number | string,
|
||||
materialCode: row.materialCode as string | undefined,
|
||||
materialName: row.materialName as string | undefined,
|
||||
drawingNo: (row.drawingNo as string | undefined) || (row.materialCode as string | undefined),
|
||||
title: `三维模型 · ${row.processName || row.materialName || ''}`,
|
||||
}
|
||||
plmModelDrawerRef.value?.open(ctx)
|
||||
}
|
||||
|
||||
const columns = [
|
||||
// {
|
||||
@ -541,9 +528,7 @@ const columns = [
|
||||
]
|
||||
|
||||
|
||||
function dropdownIcon(icon: Component) {
|
||||
return () => h(NIcon, null, { default: () => h(icon) })
|
||||
}
|
||||
|
||||
|
||||
|
||||
//搜索数据
|
||||
|
||||
Loading…
Reference in New Issue
Block a user