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 @@ + + +