From 33476702ada264b6be270d9aef35fa82f9ba1010 Mon Sep 17 00:00:00 2001 From: yinq Date: Thu, 27 Feb 2025 19:04:19 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=B7=BB=E5=8A=A0=E7=A4=BA=E6=96=B9?= =?UTF-8?q?=E4=B9=A6=E7=BB=B4=E6=8A=A4=E3=80=81=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/samplePrescription/index.ts | 81 ++++ src/api/mes/samplePrescription/types.ts | 186 +++++++++ src/components/FileUpload/index.vue | 3 +- src/views/mes/samplePrescription/index.vue | 415 +++++++++++++++++++++ 4 files changed, 684 insertions(+), 1 deletion(-) create mode 100644 src/api/mes/samplePrescription/index.ts create mode 100644 src/api/mes/samplePrescription/types.ts create mode 100644 src/views/mes/samplePrescription/index.vue diff --git a/src/api/mes/samplePrescription/index.ts b/src/api/mes/samplePrescription/index.ts new file mode 100644 index 0000000..7fcbc73 --- /dev/null +++ b/src/api/mes/samplePrescription/index.ts @@ -0,0 +1,81 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { + SamplePrescriptionVO, + SamplePrescriptionForm, + SamplePrescriptionQuery +} from '@/api/mes/samplePrescription/types'; + +/** + * 查询示方书维护列表 + * @param query + * @returns {*} + */ + +export const listSamplePrescription = (query?: SamplePrescriptionQuery): AxiosPromise => { + return request({ + url: '/mes/samplePrescription/list', + method: 'get', + params: query + }); +}; + +/** + * 查询示方书维护详细 + * @param sampleId + */ +export const getSamplePrescription = (sampleId: string | number): AxiosPromise => { + return request({ + url: '/mes/samplePrescription/' + sampleId, + method: 'get' + }); +}; + +/** + * 新增示方书维护 + * @param data + */ +export const addSamplePrescription = (data: SamplePrescriptionForm) => { + return request({ + url: '/mes/samplePrescription', + method: 'post', + data: data + }); +}; + +/** + * 修改示方书维护 + * @param data + */ +export const updateSamplePrescription = (data: SamplePrescriptionForm) => { + return request({ + url: '/mes/samplePrescription', + method: 'put', + data: data + }); +}; + +/** + * 删除示方书维护 + * @param sampleId + */ +export const delSamplePrescription = (sampleId: string | number | Array) => { + return request({ + url: '/mes/samplePrescription/' + sampleId, + method: 'delete' + }); +}; + + +/** + * 下拉框查询示方书维护列表 + * @param query + * @returns {*} + */ +export function getProdSamplePrescriptionList(query) { + return request({ + url: '/mes/samplePrescription/getProdSamplePrescriptionList', + method: 'get', + params: query + }); +}; diff --git a/src/api/mes/samplePrescription/types.ts b/src/api/mes/samplePrescription/types.ts new file mode 100644 index 0000000..c69bf42 --- /dev/null +++ b/src/api/mes/samplePrescription/types.ts @@ -0,0 +1,186 @@ +export interface SamplePrescriptionVO { + /** + * 主键标识 + */ + sampleId: string | number; + + /** + * 工序ID + */ + processId: string | number; + + /** + * 物料ID + */ + materialId: string | number; + + /** + * 物料BOMID + */ + materialBomId: string | number; + + /** + * 工艺ID + */ + technologyId: string | number; + + /** + * 对象存储ID + */ + oosId: string | number; + + /** + * 文件名 + */ + originalName: string; + + /** + * 文件地址 + */ + fileUrl: string; + + /** + * 激活标识(1是 0否) + */ + activeFlag: string; + + /** + * 备注 + */ + remark: string; + + /** + * 创建人 + */ + createBy: number; + + /** + * 创建时间 + */ + createTime: string; + +} + +export interface SamplePrescriptionForm extends BaseEntity { + /** + * 主键标识 + */ + sampleId?: string | number; + + /** + * 工序ID + */ + processId?: string | number; + + /** + * 物料ID + */ + materialId?: string | number; + + /** + * 物料BOMID + */ + materialBomId?: string | number; + + /** + * 工艺ID + */ + technologyId?: string | number; + + /** + * 对象存储ID + */ + oosId?: string | number; + + /** + * 文件名 + */ + originalName?: string; + + /** + * 文件地址 + */ + fileUrl?: string; + + /** + * 激活标识(1是 0否) + */ + activeFlag?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 文件 + */ + file?: string | []; + +} + +export interface SamplePrescriptionQuery extends PageQuery { + + /** + * 主键标识 + */ + sampleId?: string | number; + + /** + * 工序ID + */ + processId?: string | number; + + /** + * 物料ID + */ + materialId?: string | number; + + /** + * 物料BOMID + */ + materialBomId?: string | number; + + /** + * 工艺ID + */ + technologyId?: string | number; + + /** + * 对象存储ID + */ + oosId?: string | number; + + /** + * 文件名 + */ + originalName?: string; + + /** + * 文件地址 + */ + fileUrl?: string; + + /** + * 激活标识(1是 0否) + */ + activeFlag?: string; + + /** + * 创建人 + */ + createBy?: number; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index aaaa45c..50189c7 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -176,7 +176,8 @@ const uploadedSuccessfully = () => { fileList.value = fileList.value.filter((f) => f.url !== undefined).concat(uploadList.value); uploadList.value = []; number.value = 0; - emit('update:modelValue', listToString(fileList.value)); + // emit('update:modelValue', listToString(fileList.value)); + emit('update:modelValue', fileList.value); proxy?.$modal.closeLoading(); } }; diff --git a/src/views/mes/samplePrescription/index.vue b/src/views/mes/samplePrescription/index.vue new file mode 100644 index 0000000..dd449ea --- /dev/null +++ b/src/views/mes/samplePrescription/index.vue @@ -0,0 +1,415 @@ + + +