From 6b808db0a81ed34e488d291915a1f7d14cc891d9 Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Fri, 24 Nov 2023 15:19:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E9=A1=B9=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/spc/detectionTemplate/index.ts | 1 + src/api/spc/detectionTemplate/indexdetails.ts | 67 ++++ src/components/Detail/src/TemplateDetails.vue | 328 ++++++++++++++++++ src/utils/dict.ts | 2 + .../detectionTemplate.data.ts | 22 +- src/views/spc/detectiontemplate/index.vue | 69 +++- .../templateItemDetails.data.ts | 210 +++++++++++ 7 files changed, 683 insertions(+), 16 deletions(-) create mode 100644 src/api/spc/detectionTemplate/indexdetails.ts create mode 100644 src/components/Detail/src/TemplateDetails.vue create mode 100644 src/views/spc/detectiontemplate/templateItemDetails.data.ts diff --git a/src/api/spc/detectionTemplate/index.ts b/src/api/spc/detectionTemplate/index.ts index b765210..5b2433d 100644 --- a/src/api/spc/detectionTemplate/index.ts +++ b/src/api/spc/detectionTemplate/index.ts @@ -13,6 +13,7 @@ export interface DetectionTemplateVO { concurrencyStamp: string siteId: string itemType: string + lineNumber: string } // 查询检测记录信息列表 diff --git a/src/api/spc/detectionTemplate/indexdetails.ts b/src/api/spc/detectionTemplate/indexdetails.ts new file mode 100644 index 0000000..7893036 --- /dev/null +++ b/src/api/spc/detectionTemplate/indexdetails.ts @@ -0,0 +1,67 @@ +import request from '@/config/axios' + +export interface TemplateItemDetailsVO { + templateId: number + orderNo: number + methods: string + contents: string + levels: string + upLimit: number + available: string + downLimit: number + type: string + image1: string + image2: string + image3: string + remark: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: string + siteId: string +} + +// 查询检测记录明细列表 +export const getTemplateItemDetailsPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/spc/template-item-details/senior', data }) + } else { + return await request.get({ url: `/spc/template-item-details/page`, params }) + } +} + +// 查询检测记录明细详情 +export const getTemplateItemDetails = async (id: number) => { + return await request.get({ url: `/spc/template-item-details/get?id=` + id }) +} + +// 新增检测记录明细 +export const createTemplateItemDetails = async (data: TemplateItemDetailsVO) => { + return await request.post({ url: `/spc/template-item-details/create`, data }) +} + +// 修改检测记录明细 +export const updateTemplateItemDetails = async (data: TemplateItemDetailsVO) => { + return await request.put({ url: `/spc/template-item-details/update`, data }) +} + +// 删除检测记录明细 +export const deleteTemplateItemDetails = async (id: number) => { + return await request.delete({ url: `/spc/template-item-details/delete?id=` + id }) +} + +// 导出检测记录明细 Excel +export const exportTemplateItemDetails = async (params) => { + return await request.download({ url: `/spc/template-item-details/export-excel`, params }) +} + +// 下载导入模板 +export const importTemplate = () => { + return request.download({ url: '/spc/template-item-details/get-import-template' }) +} + +export const selectDetectionItems = async (itemCode: String , detectionType: String) => { + return await request.get({ url: `/spc/template-item-details/selectDetectionItems?itemCode=` + itemCode + `&detectionType=` + detectionType }) +} \ No newline at end of file diff --git a/src/components/Detail/src/TemplateDetails.vue b/src/components/Detail/src/TemplateDetails.vue new file mode 100644 index 0000000..635b88c --- /dev/null +++ b/src/components/Detail/src/TemplateDetails.vue @@ -0,0 +1,328 @@ + + + + diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 5556703..c1ff06c 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -193,6 +193,8 @@ export enum DICT_TYPE { ITEM_CATEGORY = 'Item_category', // 物品种类 ITEM_COLOR = 'item_color', // 物品颜色 ITEMBASIC_TYPE= 'itembasic_type', // 物料检测类型 + ITEMBASIC_RANK= 'template_detec_rank',//检测项级别 + DETECT_TYPE='detect_type',//检测项类型 ITEM_CONFIGURATION = 'item_configuration', // 物品配置 EQ_LEVEL = 'eq_level', // 质量等级 CURRENCY = 'currency', // 货币 diff --git a/src/views/spc/detectiontemplate/detectionTemplate.data.ts b/src/views/spc/detectiontemplate/detectionTemplate.data.ts index 66f6f0d..cd699a4 100644 --- a/src/views/spc/detectiontemplate/detectionTemplate.data.ts +++ b/src/views/spc/detectiontemplate/detectionTemplate.data.ts @@ -2,11 +2,12 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import * as ItembasicApi from '@/api/spc/itembasic/index' import {Itembasic} from '@/views/spc/itembasic/itembasic.data' +import { checkboxProps } from 'element-plus' // 表单校验 -export const DetectionTemplateRules = reactive({ - itemCode: [required] -}) +// export const DetectionTemplateRules = reactive({ +// itemCode: [required] +// }) export const DetectionTemplate = useCrudSchemas(reactive([ { @@ -36,7 +37,7 @@ export const DetectionTemplate = useCrudSchemas(reactive([ label: '物料名称', field: 'itemName', sort: 'custom', - isSearch: true, + isSearch: false, isTable:true, form: { // labelMessage: '信息提示说明!!!', @@ -63,6 +64,19 @@ export const DetectionTemplate = useCrudSchemas(reactive([ field: 'name', sort: 'custom', }, + { + label: '色差行数', + field: 'lineNumber', + sort: 'custom', + isSearch: false, + isTable:false, + form:{ + component: 'InputNumber', + componentProps: { + min: 1, + } + } + }, { label: '备注', field: 'remark', diff --git a/src/views/spc/detectiontemplate/index.vue b/src/views/spc/detectiontemplate/index.vue index 96c7a32..a67e34b 100644 --- a/src/views/spc/detectiontemplate/index.vue +++ b/src/views/spc/detectiontemplate/index.vue @@ -4,7 +4,7 @@ - + @@ -51,21 +51,30 @@ :isBusiness="false" /> - - + + - -