From 38f7bce772a741daac9e9db953f3ab8810146995 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Sun, 7 Apr 2024 16:03:57 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86/\APP?= =?UTF-8?q?=E5=8D=87=E7=BA=A7/=E5=AE=89=E8=A3=85=E5=8C=85=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=AE=A1=E7=90=86=20---=20=E6=96=B0=E5=A2=9E=EF=BC=9A?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=99=84=E4=BB=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UploadFile/src/UploadFile.vue | 8 +++--- .../system/systemInstallPackage/index.vue | 15 +++++++++++ .../systemInstallPackage.data.ts | 27 ++++++++++++++++++- 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue index ed92c4c18..1f8b90948 100644 --- a/src/components/UploadFile/src/UploadFile.vue +++ b/src/components/UploadFile/src/UploadFile.vue @@ -129,11 +129,11 @@ const excelUploadError: UploadProps['onError'] = (): void => { } // 删除上传文件 const handleRemove = (file) => { - const findex = fileList.value.map((f) => f.name).indexOf(file.name) - if (findex > -1) { - fileList.value.splice(findex, 1) + // const findex = fileList.value.map((f) => f.name).indexOf(file.name) + // if (findex > -1) { + // fileList.value.splice(findex, 1) emit('update:modelValue', listToString(fileList.value)) - } + // } } const handlePreview: UploadProps['onPreview'] = (uploadFile) => { console.log(uploadFile) diff --git a/src/views/system/systemInstallPackage/index.vue b/src/views/system/systemInstallPackage/index.vue index f6b9543ac..e6475b35e 100644 --- a/src/views/system/systemInstallPackage/index.vue +++ b/src/views/system/systemInstallPackage/index.vue @@ -41,6 +41,13 @@ { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if('create'==type){ + const currentTime = new Date().getTime() + const fileId = SystemInstallPackage.allSchemas.formSchema.find(item=>item.field=='fileId') + fileId['value'] = currentTime + const uploadFile = SystemInstallPackage.allSchemas.formSchema.find(item=>item.field=='uploadFile') + uploadFile['componentProps']['upData']['tableId'] = currentTime + } basicFormRef.value.open(type, row) } // form表单提交 const formsSuccess = async (formType,data) => { if (formType === 'create') { + delete data['uploadFile'] await SystemInstallPackageApi.createSystemInstallPackage(data) message.success(t('common.createSuccess')) } else { diff --git a/src/views/system/systemInstallPackage/systemInstallPackage.data.ts b/src/views/system/systemInstallPackage/systemInstallPackage.data.ts index 148027b7b..580aadb6d 100644 --- a/src/views/system/systemInstallPackage/systemInstallPackage.data.ts +++ b/src/views/system/systemInstallPackage/systemInstallPackage.data.ts @@ -25,6 +25,11 @@ export const SystemInstallPackage = useCrudSchemas(reactive([ label: '安装路径', field: 'installPackageUrl', sort: 'custom', + form: { + componentProps: { + disabled: true + }, + } }, { label: '是否强制更新', @@ -53,14 +58,34 @@ export const SystemInstallPackage = useCrudSchemas(reactive([ { label: '附件id', field: 'fileId', - isForm:false, sort: 'custom', + form: { + componentProps: { + disabled: true + }, + value:'', + } }, { label: '备注', field: 'remark', sort: 'custom', }, + { + label: '上传附件', + field: 'uploadFile', + sort: 'custom', + form: { + component: 'UploadFile', + componentProps: { + upData:{ + tableId: '', + tableName: '' + }, + limit:1 + } + }, + }, { label: '创建时间', field: 'createTime', From e2c88d181756a91495717c71829cf66fd319fa6e Mon Sep 17 00:00:00 2001 From: gaojs Date: Sun, 7 Apr 2024 16:05:00 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=A8=A1=E5=85=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/partternType/index.ts | 54 ---- src/api/mes/pattern/index.ts | 66 +++++ src/api/mes/patternType/index.ts | 54 ++++ src/views/mes/pattern/index.vue | 244 ++++++++++++++++++ src/views/mes/pattern/pattern.data.ts | 217 ++++++++++++++++ .../{partternType => patternType}/index.vue | 50 ++-- .../patternType.data.ts} | 5 +- 7 files changed, 609 insertions(+), 81 deletions(-) delete mode 100644 src/api/mes/partternType/index.ts create mode 100644 src/api/mes/pattern/index.ts create mode 100644 src/api/mes/patternType/index.ts create mode 100644 src/views/mes/pattern/index.vue create mode 100644 src/views/mes/pattern/pattern.data.ts rename src/views/mes/{partternType => patternType}/index.vue (76%) rename src/views/mes/{partternType/partternType.data.ts => patternType/patternType.data.ts} (95%) diff --git a/src/api/mes/partternType/index.ts b/src/api/mes/partternType/index.ts deleted file mode 100644 index 29002581a..000000000 --- a/src/api/mes/partternType/index.ts +++ /dev/null @@ -1,54 +0,0 @@ -import request from '@/config/axios' - -export interface PartternTypeVO { - deleteTime: Date - id: number - status: string - concurrencyStamp: number - remark: string - deleter: string - siteId: number - code: string - name: string -} - -// 查询模具类型列表 -export const getPartternTypePage = async (params) => { - if (params.isSearch) { - delete params.isSearch - const data = {...params} - return await request.post({ url: '/mes/parttern-type/senior', data }) - } else { - return await request.get({ url: `/mes/parttern-type/page`, params }) - } -} - -// 查询模具类型详情 -export const getPartternType = async (id: number) => { - return await request.get({ url: `/mes/parttern-type/get?id=` + id }) -} - -// 新增模具类型 -export const createPartternType = async (data: PartternTypeVO) => { - return await request.post({ url: `/mes/parttern-type/create`, data }) -} - -// 修改模具类型 -export const updatePartternType = async (data: PartternTypeVO) => { - return await request.put({ url: `/mes/parttern-type/update`, data }) -} - -// 删除模具类型 -export const deletePartternType = async (id: number) => { - return await request.delete({ url: `/mes/parttern-type/delete?id=` + id }) -} - -// 导出模具类型 Excel -export const exportPartternType = async (params) => { - return await request.download({ url: `/mes/parttern-type/export-excel`, params }) -} - -// 下载用户导入模板 -export const importTemplate = () => { - return request.download({ url: '/mes/parttern-type/get-import-template' }) -} \ No newline at end of file diff --git a/src/api/mes/pattern/index.ts b/src/api/mes/pattern/index.ts new file mode 100644 index 000000000..2ee80689b --- /dev/null +++ b/src/api/mes/pattern/index.ts @@ -0,0 +1,66 @@ +import request from '@/config/axios' + +export interface PatternVO { + deleteTime: Date + id: number + status: string + concurrencyStamp: number + remark: string + deleter: string + siteId: number + code: string + name: string + partternName: string + productCode: string + dateUseStart: Date + dateUseStop: Date + partternFrom: string + partternGo: string + initCout: number + effectStart: Date + effectEnd: Date + factoryCode: string + factoryName: string + factoryType: string +} + +// 查询模具基本信息列表 +export const getPatternPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/pattern/senior', data }) + } else { + return await request.get({ url: `/mes/pattern/page`, params }) + } +} + +// 查询模具基本信息详情 +export const getPattern = async (id: number) => { + return await request.get({ url: `/mes/pattern/get?id=` + id }) +} + +// 新增模具基本信息 +export const createPattern = async (data: PatternVO) => { + return await request.post({ url: `/mes/pattern/create`, data }) +} + +// 修改模具基本信息 +export const updatePattern = async (data: PatternVO) => { + return await request.put({ url: `/mes/pattern/update`, data }) +} + +// 删除模具基本信息 +export const deletePattern = async (id: number) => { + return await request.delete({ url: `/mes/pattern/delete?id=` + id }) +} + +// 导出模具基本信息 Excel +export const exportPattern = async (params) => { + return await request.download({ url: `/mes/pattern/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/pattern/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/mes/patternType/index.ts b/src/api/mes/patternType/index.ts new file mode 100644 index 000000000..f4bf226df --- /dev/null +++ b/src/api/mes/patternType/index.ts @@ -0,0 +1,54 @@ +import request from '@/config/axios' + +export interface PatternTypeVO { + deleteTime: Date + id: number + status: string + concurrencyStamp: number + remark: string + deleter: string + siteId: number + code: string + name: string +} + +// 查询模具类型列表 +export const getPatternTypePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/pattern-type/senior', data }) + } else { + return await request.get({ url: `/mes/pattern-type/page`, params }) + } +} + +// 查询模具类型详情 +export const getPatternType = async (id: number) => { + return await request.get({ url: `/mes/pattern-type/get?id=` + id }) +} + +// 新增模具类型 +export const createPatternType = async (data: PatternTypeVO) => { + return await request.post({ url: `/mes/pattern-type/create`, data }) +} + +// 修改模具类型 +export const updatePatternType = async (data: PatternTypeVO) => { + return await request.put({ url: `/mes/pattern-type/update`, data }) +} + +// 删除模具类型 +export const deletePatternType = async (id: number) => { + return await request.delete({ url: `/mes/pattern-type/delete?id=` + id }) +} + +// 导出模具类型 Excel +export const exportPatternType = async (params) => { + return await request.download({ url: `/mes/pattern-type/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/pattern-type/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/mes/pattern/index.vue b/src/views/mes/pattern/index.vue new file mode 100644 index 000000000..7d201886a --- /dev/null +++ b/src/views/mes/pattern/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/mes/pattern/pattern.data.ts b/src/views/mes/pattern/pattern.data.ts new file mode 100644 index 000000000..35d2afb1d --- /dev/null +++ b/src/views/mes/pattern/pattern.data.ts @@ -0,0 +1,217 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const PatternRules = reactive({ + concurrencyStamp: [required], +}) + +export const Pattern = useCrudSchemas(reactive([ + { + label: '删除时间', + field: 'deleteTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '主键', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '删除用户名', + field: 'deleter', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '位置ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '模具编码', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '模具名称', + field: 'name', + sort: 'custom', + isSearch: true, + }, + { + label: '模具类型', + field: 'partternName', + sort: 'custom', + isSearch: true, + }, + { + label: '产品编码', + field: 'productCode', + sort: 'custom', + isSearch: true, + }, + { + label: '启用时间', + field: 'dateUseStart', + sort: 'custom', + isSearch: true, + }, + { + label: '停用时间', + field: 'dateUseStop', + sort: 'custom', + isSearch: true, + }, + { + label: '模具来源', + field: 'partternFrom', + sort: 'custom', + isSearch: true, + }, + { + label: '模具去向', + field: 'partternGo', + sort: 'custom', + isSearch: true, + }, + { + label: '模具初始数量', + field: 'initCout', + sort: 'custom', + isSearch: true, + }, + { + label: '有效期开始时间', + field: 'effectStart', + sort: 'custom', + isSearch: true, + }, + { + label: '有效期结束时间', + field: 'effectEnd', + sort: 'custom', + isSearch: true, + }, + { + label: '所属单位编码', + field: 'factoryCode', + sort: 'custom', + isSearch: true, + }, + { + label: '所属单位名称', + field: 'factoryName', + sort: 'custom', + isSearch: true, + }, + { + label: '所属单位类别', + field: 'factoryType', + sort: 'custom', + isSearch: true, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.QUALIFY_STATUS, + dictClass: 'string', + isForm: true, + isSearch: true, + isTable: true, + form: { + component: 'Switch', + value: '2', + componentProps: { + inactiveValue: '2', + activeValue: '1' + } + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + isDetail:false, + table: { + width: 150, + fixed: 'right' + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + isTable: false + } +])) diff --git a/src/views/mes/partternType/index.vue b/src/views/mes/patternType/index.vue similarity index 76% rename from src/views/mes/partternType/index.vue rename to src/views/mes/patternType/index.vue index 77a6cefb8..acedd71fe 100644 --- a/src/views/mes/partternType/index.vue +++ b/src/views/mes/patternType/index.vue @@ -1,7 +1,7 @@ diff --git a/src/views/mes/partternType/partternType.data.ts b/src/views/mes/patternType/patternType.data.ts similarity index 95% rename from src/views/mes/partternType/partternType.data.ts rename to src/views/mes/patternType/patternType.data.ts index 2cf9df99c..3ec104df8 100644 --- a/src/views/mes/partternType/partternType.data.ts +++ b/src/views/mes/patternType/patternType.data.ts @@ -2,11 +2,12 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' // 表单校验 -export const PartternTypeRules = reactive({ +export const PatternTypeRules = reactive({ code: [required], + name: [required] }) -export const PartternType = useCrudSchemas(reactive([ +export const PatternType = useCrudSchemas(reactive([ { label: '删除时间', field: 'deleteTime', From 38e7987a326e0ecf7aee936d6bb86f6807f5b964 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Sun, 7 Apr 2024 16:11:32 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E9=9A=90=E8=97=8F=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierinvoiceRequestMain.data.ts | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 9dce779af..ebdecf62d 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -215,6 +215,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( type: 'InputNumber', min: 0, precision: 6, + disabled: true, } }, { @@ -342,6 +343,9 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( table: { width: 150 }, + isTable:false, + isTableForm:false, + isForm:false, formatter: (_: Recordable, __: TableColumn, cellValue: number) => { return userDeptArray.find((account) => account.id == cellValue)?.name }, @@ -616,21 +620,6 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive Date: Sun, 7 Apr 2024 16:41:15 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=83=A8=E5=88=86?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E9=9B=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/api/qms/counter/index.ts | 1 - .../BasicForm/src/BasicFormQmsCode.vue | 696 ++++++++++++++ ...asicFormQms.vue => BasicFormQmsNumber.vue} | 0 src/components/Detail/src/DetailQmsCode.vue | 846 ++++++++++++++++++ .../{DetailQms.vue => DetailQmsNumber.vue} | 6 +- src/utils/dict.ts | 5 +- .../basicDataManage/counter/counter.data.ts | 24 +- .../dynamicRule/dynamicRule.data.ts | 25 +- .../qms/basicDataManage/dynamicRule/index.vue | 4 +- .../selectedProject/selectedProject.data.ts | 135 ++- .../qms/basicDataManage/selectedSet/index.vue | 125 ++- .../selectedSet/selectedSet.data.ts | 87 +- 13 files changed, 1768 insertions(+), 187 deletions(-) create mode 100644 src/components/BasicForm/src/BasicFormQmsCode.vue rename src/components/BasicForm/src/{BasicFormQms.vue => BasicFormQmsNumber.vue} (100%) create mode 100644 src/components/Detail/src/DetailQmsCode.vue rename src/components/Detail/src/{DetailQms.vue => DetailQmsNumber.vue} (99%) diff --git a/package.json b/package.json index c7e26457e..be1ba3e08 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "xml-js": "^1.6.11" }, "devDependencies": { + "@babel/plugin-proposal-optional-chaining": "^7.21.0", "@commitlint/cli": "^17.7.1", "@commitlint/config-conventional": "^17.7.0", "@iconify/json": "^2.2.119", diff --git a/src/api/qms/counter/index.ts b/src/api/qms/counter/index.ts index ee346e189..3a75b8163 100644 --- a/src/api/qms/counter/index.ts +++ b/src/api/qms/counter/index.ts @@ -4,7 +4,6 @@ export interface CounterVO { id: number itemCode: string testTypeCode: string - workingCode: boolean supplierCode: string qualifiedTimes: number lastQualifiedBatch: string diff --git a/src/components/BasicForm/src/BasicFormQmsCode.vue b/src/components/BasicForm/src/BasicFormQmsCode.vue new file mode 100644 index 000000000..03ef9e308 --- /dev/null +++ b/src/components/BasicForm/src/BasicFormQmsCode.vue @@ -0,0 +1,696 @@ + + + diff --git a/src/components/BasicForm/src/BasicFormQms.vue b/src/components/BasicForm/src/BasicFormQmsNumber.vue similarity index 100% rename from src/components/BasicForm/src/BasicFormQms.vue rename to src/components/BasicForm/src/BasicFormQmsNumber.vue diff --git a/src/components/Detail/src/DetailQmsCode.vue b/src/components/Detail/src/DetailQmsCode.vue new file mode 100644 index 000000000..3f393da07 --- /dev/null +++ b/src/components/Detail/src/DetailQmsCode.vue @@ -0,0 +1,846 @@ + + + + + diff --git a/src/components/Detail/src/DetailQms.vue b/src/components/Detail/src/DetailQmsNumber.vue similarity index 99% rename from src/components/Detail/src/DetailQms.vue rename to src/components/Detail/src/DetailQmsNumber.vue index 443d33ccc..424b6c479 100644 --- a/src/components/Detail/src/DetailQms.vue +++ b/src/components/Detail/src/DetailQmsNumber.vue @@ -121,7 +121,7 @@ - ([ sort: 'custom', isSearch: true }, - { - label: '工序编码', - field: 'workingCode', - sort: 'custom', - isSearch: true, - }, { label: '供应商编码', field: 'supplierCode', @@ -120,13 +114,13 @@ export const Counter = useCrudSchemas(reactive([ sort: 'custom', isSearch: false, }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } ])) diff --git a/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts b/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts index 213df1979..9fb81f8c4 100644 --- a/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts +++ b/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts @@ -69,6 +69,9 @@ export const InspectionStage = useCrudSchemas(reactive([ form: { component: 'InputNumber', value: 0 + }, + tableForm: { + type: 'InputNumber', } }, { @@ -79,6 +82,9 @@ export const InspectionStage = useCrudSchemas(reactive([ form: { component: 'InputNumber', value: 0 + }, + tableForm: { + type: 'InputNumber', } }, { @@ -89,6 +95,9 @@ export const InspectionStage = useCrudSchemas(reactive([ form: { component: 'InputNumber', value: 0 + }, + tableForm: { + type: 'InputNumber', } }, { @@ -99,6 +108,9 @@ export const InspectionStage = useCrudSchemas(reactive([ form: { component: 'InputNumber', value: 0 + }, + tableForm: { + type: 'InputNumber', } }, { @@ -112,7 +124,11 @@ export const InspectionStage = useCrudSchemas(reactive([ form: { component: 'Switch', value:true - } + }, + tableForm: { + type: 'Switch', + default: true + }, }, { label: '是否略过检验', @@ -125,6 +141,10 @@ export const InspectionStage = useCrudSchemas(reactive([ form: { component: 'Switch', value:true + }, + tableForm: { + type: 'Switch', + default: true } }, { @@ -137,6 +157,9 @@ export const InspectionStage = useCrudSchemas(reactive([ form: { component: 'Select' }, + tableForm: { + type: 'Select' + }, }, { label: '操作', diff --git a/src/views/qms/basicDataManage/dynamicRule/index.vue b/src/views/qms/basicDataManage/dynamicRule/index.vue index 5b9c4a306..47c7b192a 100644 --- a/src/views/qms/basicDataManage/dynamicRule/index.vue +++ b/src/views/qms/basicDataManage/dynamicRule/index.vue @@ -59,7 +59,7 @@ /> - + @@ -89,6 +90,7 @@ import * as DynamicRuleApi from '@/api/qms/dynamicRule' import * as InspectionStageApi from '@/api/qms/inspectionStage' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import UploadFile from '@/components/UploadFile/src/UploadFile.vue' // import TableHead from '@/components/TableHead/src/TableHead.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import Detail from '@/components/Detail/src/Detail.vue' diff --git a/src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts b/src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts index 29d9820d7..32e9e0f5f 100644 --- a/src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts +++ b/src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts @@ -1,5 +1,13 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import * as DictTypeApi from '@/api/system/dict/dict.type' +const dictTypeList = await DictTypeApi.getSimpleDictTypeList() +const dictTypeListData = dictTypeList.map(item => { + return { + label: item.name, + value: item.type + } +}) // 表单校验 export const SelectedProjectRules = reactive({ @@ -11,113 +19,81 @@ export const SelectedProjectRules = reactive({ }) export const SelectedProject = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isForm: false - }, + { label: '编码', field: 'code', sort: 'custom', + isTableForm: false, isSearch: true }, { - label: '字典编码', + label: '字典', field: 'dictionaryCode', sort: 'custom', - isSearch: true - }, - { - label: '字典项值', - field: 'dictionaryValue', - sort: 'custom', - isSearch: true - }, - { - label: '评估代码', - field: 'estimateCode', - sort: 'custom', - isSearch: true - }, - { - label: '缺陷级别', - field: 'defectLevel', - sort: 'custom', - isSearch: true - }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - isSearch: true - }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, isSearch: true, - search: { - component: 'DatePicker', + tableForm: { + type: 'Select', + initOptions: dictTypeListData, + }, + form: { + component: 'Select', + api: dictTypeListData, componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + options: dictTypeListData, + optionsAlias: { + labelField: 'label', + valueField: 'value' + } } - }, - isForm: false + } }, { - label: '删除时间', - field: 'deletionTime', + label: '字典项值', + field: 'dictionaryValue', sort: 'custom', - formatter: dateFormatter, isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } + tableForm: { + type: 'Select', }, form: { - component: 'DatePicker', + component: 'Select', componentProps: { - type: 'datetime', - valueFormat: 'x' + options: dictTypeListData, + optionsAlias: { + labelField: 'label', + valueField: 'value' + } } } }, { - label: '删除者ID', - field: 'deleterId', - sort: 'custom', - isSearch: true - }, - { - label: '扩展属性', - field: 'extraProperties', - sort: 'custom', - isSearch: true - }, - { - label: '并发乐观锁', - field: 'concurrencyStamp', + label: '评估代码', + field: 'estimateCode', sort: 'custom', isSearch: true, + dictType: DICT_TYPE.DICTIONARY_CLASS, + dictClass: 'string', + tableForm: { + type: 'Select', + }, form: { - component: 'InputNumber', - value: 0 + component: 'Select', } }, { - label: '地点ID', - field: 'siteId', + label: '缺陷级别', + field: 'defectLevel', sort: 'custom', - isSearch: true + isSearch: true, + dictType: DICT_TYPE.DEFECT_LEVEL, + dictClass: 'string', + tableForm: { + type: 'Select', + }, + form: { + component: 'Select', + } }, { label: '操作', @@ -126,6 +102,9 @@ export const SelectedProject = useCrudSchemas(reactive([ table: { width: 150, fixed: 'right' - } + }, + isTableForm: false, } ])) + + diff --git a/src/views/qms/basicDataManage/selectedSet/index.vue b/src/views/qms/basicDataManage/selectedSet/index.vue index 4b96d3710..f4513d891 100644 --- a/src/views/qms/basicDataManage/selectedSet/index.vue +++ b/src/views/qms/basicDataManage/selectedSet/index.vue @@ -44,14 +44,40 @@ @success="formsSuccess" :rules="SelectedSetRules" :formAllSchemas="SelectedSet.allSchemas" + :tableAllSchemas="SelectedProject.allSchemas" + :tableFormRules="SelectedProjectRules" + :tableData="tableData" :apiUpdate="SelectedSetApi.updateSelectedSet" :apiCreate="SelectedSetApi.createSelectedSet" @searchTableSuccess="searchTableSuccess" :isBusiness="false" + @onChange="onChange" + @handleAddTable="handleAddTable" + @handleDeleteTable="handleDeleteTable" + @submitForm="submitForm" + :isSearchTableItem="true" + @formSelectChange="formSelectChange" /> - + @@ -62,9 +88,13 @@ import download from '@/utils/download' import { SelectedSet,SelectedSetRules } from './selectedSet.data' import * as SelectedSetApi from '@/api/qms/selectedSet' import * as defaultButtons from '@/utils/disposition/defaultButtons' -import TableHead from '@/components/TableHead/src/TableHead.vue' -import ImportForm from '@/components/ImportForm/src/ImportForm.vue' -import Detail from '@/components/Detail/src/Detail.vue' +import { SelectedProject,SelectedProjectRules } from '../selectedProject/selectedProject.data' +import * as SelectedProjectApi from '@/api/qms/selectedProject' +import * as DictDataApi from '@/api/system/dict/dict.data' +import component from 'virtual:svg-icons-register' +// import TableHead from '@/components/TableHead/src/TableHead.vue' +// import ImportForm from '@/components/ImportForm/src/ImportForm.vue' +// import Detail from '@/components/Detail/src/Detail.vue' defineOptions({ name: 'SelectedSet' }) @@ -72,7 +102,9 @@ const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 +const tableData = ref([]) const routeName = ref() +const selectDictType = ref() routeName.value = route.name const tableColumns = ref(SelectedSet.allSchemas.tableColumns) @@ -99,9 +131,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:selectedSet:create'}), // 新增 - defaultButtons.defaultImportBtn({hasPermi:'wms:selectedSet:import'}), // 导入 - defaultButtons.defaultExportBtn({hasPermi:'wms:selectedSet:export'}), // 导出 + defaultButtons.defaultAddBtn({hasPermi:'qms:selected-set:query'}), // 新增 + // defaultButtons.defaultImportBtn({hasPermi:'qms:selected-set:import'}), // 导入 + // defaultButtons.defaultExportBtn({hasPermi:'qms:selected-set:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -133,8 +165,8 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'wms:selectedSet:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'wms:selectedSet:delete'}), // 删除 + defaultButtons.mainListEditBtn({hasPermi:'qms:selected-set:update'}), // 编辑 + defaultButtons.mainListDeleteBtn({hasPermi:'qms:selected-set:delete'}), // 删除 ] // 列表-操作按钮事件 @@ -149,6 +181,7 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + tableData.value = [] basicFormRef.value.open(type, row) } @@ -179,6 +212,7 @@ const formsSuccess = async (formType,data) => { /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { + selectDictType.value = row.classification detailRef.value.openDetail(row, titleName, titleValue, 'basicSelectedSet') } @@ -235,6 +269,79 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } + +const tableFormKeys = {} +SelectedProject.allSchemas.tableFormColumns.forEach((item) => { + tableFormKeys[item.field] = item.default ? item.default : '' +}) + +// 添加明细 +const handleAddTable = () => { + tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) +} +// 删除明细 +const handleDeleteTable = (item, index) => { + tableData.value.splice(index, 1) +} + + +// 主子数据 提交 +const submitForm = async (formType, data) => { + data.selectedProjectDOList = tableData.value// 拼接子表数据参数 + console.log(data.subList) + try { + if (formType === 'create') { + await SelectedSetApi.createSelectedSet(data) + message.success(t('common.createSuccess')) + } else { + await SelectedSetApi.updateSelectedSet(data) + message.success(t('common.updateSuccess')) + } + basicFormRef.value.dialogVisible = false + // 刷新当前列表 + getList() + } finally { + basicFormRef.value.formLoading = false + } +} + +const detailValidate = (data) => { + let tag = true; + return tag +} + +const detailOpenForm = (type, row, masterParmas) => { + // if(selectDictType.value){ + + // } + if(type='create'){ + + } +} + + + +const detailBasiFormOnChange = (field,val) => { + console.log(field) + console.log(val) + if(field == 'dictionaryCode'){ + DictDataApi.queryByDictType(val).then(res => { + SelectedProject.allSchemas.formSchema.find(item => { + return item.field == 'dictionaryValue' + }).componentProps.options = res.map(item=>{ + return { + value: item.value, + label: item.label + } + }) + }) + } +} + +const formSelectChange = (a,b,c,d) => { + console.log(111) +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts b/src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts index dc66ae5d9..e4e1d6f0d 100644 --- a/src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts +++ b/src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts @@ -1,24 +1,22 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' +import * as DictTypeApi from '@/api/system/dict/dict.type' + // 表单校验 export const SelectedSetRules = reactive({ + description: [required], code: [required], available: [required], concurrencyStamp: [required] }) export const SelectedSet = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isForm: false - }, + { label: '编码', field: 'code', sort: 'custom', + isForm: false, isSearch: true }, { @@ -31,80 +29,13 @@ export const SelectedSet = useCrudSchemas(reactive([ label: '分类', field: 'classification', sort: 'custom', - isSearch: true - }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - isSearch: true - }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - isForm: false - }, - { - label: '删除时间', - field: 'deletionTime', - sort: 'custom', - formatter: dateFormatter, isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } + dictType: DICT_TYPE.EVALUATION_CODE, + dictClass: 'string', + tableForm: { + type: 'Select', } }, - { - label: '删除者ID', - field: 'deleterId', - sort: 'custom', - isSearch: true - }, - { - label: '扩展属性', - field: 'extraProperties', - sort: 'custom', - isSearch: true - }, - { - label: '并发乐观锁', - field: 'concurrencyStamp', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, - { - label: '地点ID', - field: 'siteId', - sort: 'custom', - isSearch: true - }, { label: '操作', field: 'action', From a1c42a14917e032ebc829f28885c9c91dbfb34a4 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Sun, 7 Apr 2024 17:16:29 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierinvoiceRequestMain/index.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index ed73ce4a9..100b5e5c6 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -85,7 +85,7 @@ }]" :otherHeadButttonData="[{ label: '打印', - name: 'kuozhan', + name: 'printing', hide: false, type: 'primary', // icon: 'ep:operation', @@ -131,6 +131,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as SupplierApi from '@/api/wms/supplier' import { Supplier } from '../../../basicDataManage/supplierManage/supplier/supplier.data' + import { getAccessToken } from '@/utils/auth' defineOptions({ name: 'SupplierinvoiceRequestMain' }) @@ -349,9 +350,11 @@ const handleImport = () => { const { wsCache } = useCache() /** 详情操作 */ const detailRef = ref() + const clicKRowId = ref(); const openDetail = (row : any, titleName : any, titleValue : any) => { const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) + clicKRowId.value = row.id detailRef.value.openDetail(row, titleName, titleValue) } @@ -584,8 +587,20 @@ const importSuccess = () => { // 详情--头部按钮事件 const detailButtonBaseClick = (val, item) => { - console.log(1111) + console.log("点击的按钮",val) + if(val == 'printing'){ + // 单据打印 + handleDocumentPrint(clicKRowId.value) + } + } + + // 单据打印 + const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL + const documentSrc = ref(BASE_URL + '/jmreport/view/936875675614240768?token=' + getAccessToken()) + const handleDocumentPrint = async (id) => { + window.open(documentSrc.value + '&id=' + id) } + /** 初始化 **/ onMounted(async () => { getList() From 1b8bcc067cac1e6993ccb420fdcab5655777b490 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Sun, 7 Apr 2024 17:21:01 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E7=AE=A1=E7=90=86--=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7--?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7=E8=AE=B0=E5=BD=95--?= =?UTF-8?q?=E6=97=A0=E6=A8=AA=E5=90=91=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicForm/src/BasicForm.vue | 1 + src/components/TableForm/src/TableForm.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 950cbeaf7..77b9adec3 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -69,6 +69,7 @@ Date: Sun, 7 Apr 2024 17:43:42 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspectionJob/inspectionJobMain/index.ts | 31 +- src/utils/dict.ts | 1 + .../qms/inspection/inspectionJob/addForm.vue | 573 +++++++----------- .../qms/inspection/inspectionJob/index.vue | 9 +- .../inspectionJob/inspectionJobMain.data.ts | 184 +++++- 5 files changed, 389 insertions(+), 409 deletions(-) diff --git a/src/api/qms/inspectionJob/inspectionJobMain/index.ts b/src/api/qms/inspectionJob/inspectionJobMain/index.ts index 96170650a..289854b37 100644 --- a/src/api/qms/inspectionJob/inspectionJobMain/index.ts +++ b/src/api/qms/inspectionJob/inspectionJobMain/index.ts @@ -1,27 +1,5 @@ import request from '@/config/axios' -export interface InspectionJobMainVO { - number: string - applicationDate: localdate - applicationTime: Date - requestStartTime: Date - requestEndTime: Date - finishTime: Date - supplierCode: string - materialCode: string - batch: string - requestInspectionNum: number - referenceOrderCode: string - referenceOrderRow: number - referenceCertificateCode: string - referenceCertificateRow: number - inspectionSchemeCode: string - inspectionStageCode: string - applicationPackageCode: string - inspectionLevel: string - aqlValue: number - available: string -} // 查询检验申请列表 export const getInspectionJobMainPage = async (params) => { @@ -40,15 +18,18 @@ export const getInspectionJobMain = async (id: number) => { } // 新增检验申请 -export const createInspectionJobMain = async (data: InspectionJobMainVO) => { +export const createInspectionJobMain = async (data) => { return await request.post({ url: `/qms/inspection-job-main/create`, data }) } // 修改检验申请 -export const updateInspectionJobMain = async (data: InspectionJobMainVO) => { +export const updateInspectionJobMain = async (data) => { return await request.put({ url: `/qms/inspection-job-main/update`, data }) } - +// 执行检验申请 +export const executeInspectionJobMain = async (data) => { + return await request.put({ url: `/qms/inspection-job-main/execute`, data }) +} // 删除检验申请 export const deleteInspectionJobMain = async (id: number) => { return await request.delete({ url: `/qms/inspection-job-main/delete?id=` + id }) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 8e8a5834e..4ddb4d195 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -299,6 +299,7 @@ export enum DICT_TYPE { EVALUATION_CODE = "evaluation_code", // 评估代码 DEFECT_LEVEL = "defect_level", // 缺陷级别 DICTIONARY_CLASS = "dictionary_class", // 字典分类 + USAGE_DECISION = "usage_decision", // 使用决策 // ========== 业务 - mes -gaojs ========== QUALIFY_STATUS = 'qualify_status',//质检状态 diff --git a/src/views/qms/inspection/inspectionJob/addForm.vue b/src/views/qms/inspection/inspectionJob/addForm.vue index 3f8177d67..4cca5460d 100644 --- a/src/views/qms/inspection/inspectionJob/addForm.vue +++ b/src/views/qms/inspection/inspectionJob/addForm.vue @@ -16,7 +16,6 @@ :rules="rules" :schema="formSchema" :is-col="true" - :disabled="true" @opensearchTable="opensearchTable" /> - - + +
-
-
-
@@ -220,11 +144,13 @@ - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -519,7 +361,7 @@ const data = ref({ effectiveDate: '', expirationDate: '', available: 'TRUE', - process: [] + subList: [] }) const dialogVisibleName = ref(false) @@ -534,40 +376,40 @@ if (props.basicFormWidth) { } const rules = ref({ ...props.rules, - 'inspectionCharacteristicsBaseVO.description': [ + 'inspectionJobCharacteristicsUpdateReqVO.description': [ { required: true, message: '请填写描述', trigger: ['blur', 'change'] } ], - 'inspectionCharacteristicsBaseVO.inspectionMethodCode': [ + 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode': [ { required: true, message: '请选择检验方法编码', trigger: 'blur' } ], - 'inspectionCharacteristicsBaseVO.dynamicUpdateCode': [ + 'inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode': [ { required: true, message: '请选择采样过程编码', trigger: ['blur', 'change'] } ], - 'inspectionCharacteristicsBaseVO.inspectionMethod': [ + 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethod': [ { required: true, message: '请选择动态修改规则编码', trigger: ['blur', 'change'] } ], - 'inspectionCharacteristicsBaseVO.resultEntryMethod': [ + 'inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod': [ { required: true, message: '请选择结果录入方式', trigger: ['blur', 'change'] } ], - 'inspectionCharacteristicsBaseVO.featureType': [ + 'inspectionJobCharacteristicsUpdateReqVO.featureType': [ { required: true, message: '请选择特征类型', trigger: ['blur', 'change'] } ], - 'inspectionCharacteristicsBaseVO.quantifyTarget': [ + 'inspectionJobCharacteristicsUpdateReqVO.quantifyTarget': [ { required: true, message: '请输入目标值', trigger: 'blur' } ], - 'inspectionCharacteristicsBaseVO.quantifyCapping': [ + 'inspectionJobCharacteristicsUpdateReqVO.quantifyCapping': [ { required: true, message: '请输入上限值', trigger: 'blur' } ], - 'inspectionCharacteristicsBaseVO.quantifyLowlimit': [ + 'inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit': [ { required: true, message: '请输入下限值', trigger: 'blur' } ], - 'inspectionCharacteristicsBaseVO.quantifyUom': [ + 'inspectionJobCharacteristicsUpdateReqVO.quantifyUom': [ { required: true, message: '请选择计量单位', trigger: 'blur' } ], - 'inspectionCharacteristicsBaseVO.quantifyDecimal': [ + 'inspectionJobCharacteristicsUpdateReqVO.quantifyDecimal': [ { required: true, message: '请输入小数位', trigger: 'blur' } ], - 'inspectionCharacteristicsBaseVO.quantifyQuantifyCode': [ + 'inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode': [ { required: true, message: '请输入选择集编码', trigger: 'blur' } ] }) @@ -583,40 +425,40 @@ const rules = ref({ // inspectionLevel: [{ required: true, message: '请选择检验水平', trigger: ['blur', 'change'] }], // effectiveDate: [{ required: true, message: '请选择生效时间', trigger: ['blur', 'change'] }], // expirationDate: [{ required: true, message: '请选择失效时间', trigger: ['blur', 'change'] }], -// 'inspectionCharacteristicsBaseVO.description': [ +// 'inspectionJobCharacteristicsUpdateReqVO.description': [ // { required: true, message: '请填写描述', trigger: ['blur', 'change'] } // ], -// 'inspectionCharacteristicsBaseVO.inspectionMethodCode': [ +// 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode': [ // { required: true, message: '请选择检验方法编码', trigger: 'blur' } // ], -// 'inspectionCharacteristicsBaseVO.dynamicUpdateCode': [ +// 'inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode': [ // { required: true, message: '请选择采样过程编码', trigger: ['blur', 'change'] } // ], -// 'inspectionCharacteristicsBaseVO.inspectionMethod': [ +// 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethod': [ // { required: true, message: '请选择动态修改规则编码', trigger: ['blur', 'change'] } // ], -// 'inspectionCharacteristicsBaseVO.resultEntryMethod': [ +// 'inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod': [ // { required: true, message: '请选择结果录入方式', trigger: ['blur', 'change'] } // ], -// 'inspectionCharacteristicsBaseVO.featureType': [ +// 'inspectionJobCharacteristicsUpdateReqVO.featureType': [ // { required: true, message: '请选择特征类型', trigger: ['blur', 'change'] } // ], -// 'inspectionCharacteristicsBaseVO.quantifyTarget': [ +// 'inspectionJobCharacteristicsUpdateReqVO.quantifyTarget': [ // { required: true, message: '请输入目标值', trigger: 'blur' } // ], -// 'inspectionCharacteristicsBaseVO.quantifyCapping': [ +// 'inspectionJobCharacteristicsUpdateReqVO.quantifyCapping': [ // { required: true, message: '请输入上限值', trigger: 'blur' } // ], -// 'inspectionCharacteristicsBaseVO.quantifyLowlimit': [ +// 'inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit': [ // { required: true, message: '请输入下限值', trigger: 'blur' } // ], -// 'inspectionCharacteristicsBaseVO.quantifyUom': [ +// 'inspectionJobCharacteristicsUpdateReqVO.quantifyUom': [ // { required: true, message: '请选择计量单位', trigger: 'blur' } // ], -// 'inspectionCharacteristicsBaseVO.quantifyDecimal': [ +// 'inspectionJobCharacteristicsUpdateReqVO.quantifyDecimal': [ // { required: true, message: '请输入小数位', trigger: 'blur' } // ], -// 'inspectionCharacteristicsBaseVO.quantifyQuantifyCode': [ +// 'inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode': [ // { required: true, message: '请输入选择集编码', trigger: 'blur' } // ] // }) @@ -633,37 +475,56 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any formType.value = type if (row) { data.value = JSON.parse(JSON.stringify(row)) + console.log(data.value) let list = [] list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) - // if (row.inspectionSchemeJson) { - // list = JSON.parse(JSON.parse(row.inspectionSchemeJson)) - // } else { - // list = await InspectionJobDetailPageApi.getListByTempleteCode(row.programmeTemplateCode) - // } -console.log(list) -console.log(typeof list) list.forEach((item, index) => { editableTabsValue.value = index + 1 item.name = index + 1 - item.inspectionCharacteristicsBaseVO = item.inspectionJobCharacteristicsRespVO + item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO + item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[] + // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true + if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod==0) { + // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true + for(let i=0;i { @@ -708,7 +569,7 @@ const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' | }) } editableTabsValue.value = activeName - data.value.process = tabs.filter((tab) => tab.name !== targetName) + data.value.subList = tabs.filter((tab) => tab.name !== targetName) } } /** 修改名称时间 */ @@ -719,13 +580,13 @@ const buttonBaseClick1 = (val) => { nameRef.value.validate((valid, fields) => { if (valid) { const newTabName = `${++tabIndex}` - data.value.process.push({ + data.value.subList.push({ description: nameForm.value.name, name: newTabName, inspectionCode: '', sequenceCode: '', inspectionCharCode: '', - inspectionJobCharacteristicsRespVO: { + inspectionJobCharacteristicsUpdateReqVO: { describe: '', inspectionMethodCode: '', dynamicUpdateCode: '', @@ -745,7 +606,7 @@ const buttonBaseClick1 = (val) => { quantifyQuantifyCode: '' } }) - console.log(data.value.process) + console.log(data.value.subList) editableTabsValue.value = newTabName dialogVisibleName.value = false @@ -787,36 +648,36 @@ const validateForm = (formRef) => { const submitForm = async () => { try { const validateForm1 = await validateForm(formProcessRef.value) - console.log(validateForm1) - await formMainRef.value.validate() - if (!data.value.process || data.value.process.length == 0) { - message.error(`请添加工序`) - return - } - const bol1 = await validateForm(formProcessRef.value) - const bol2 = await validateForm(formFeaturesRef.value) - if (!bol1 || !bol2) { - message.error(`模板中有检验工序和检验特性未填写完全`) - return - } - const arr = data.value.process.filter( - (item) => - !item.inspectionCharacteristicsBaseVO.quantifyIsCapping && - !item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && - !item.inspectionCharacteristicsBaseVO.quantifyIsTarget && - item.inspectionCharacteristicsBaseVO.featureType == 0 - ) - console.log(arr) - if (arr && arr.length > 0) { - const str = arr.map((item) => item.description).join(',') - message.error(`${str}是否设定上线,是否设定下限,是否是定目标值至少一项为是`) - return - } + // console.log(validateForm1) + // await formMainRef.value.validate() + // if (!data.value.process || data.value.process.length == 0) { + // message.error(`请添加工序`) + // return + // } + // const bol1 = await validateForm(formProcessRef.value) + // const bol2 = await validateForm(formFeaturesRef.value) + // if (!bol1 || !bol2) { + // message.error(`模板中有检验工序和检验特性未填写完全`) + // return + // } + // const arr = data.value.process.filter( + // (item) => + // !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && + // !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && + // !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && + // item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 + // ) + // console.log(arr) + // if (arr && arr.length > 0) { + // const str = arr.map((item) => item.description).join(',') + // message.error(`${str}是否设定上线,是否设定下限,是否是定目标值至少一项为是`) + // return + // } if (formType.value == 'create') { // 主子表——提交请求 emit('submitForm', formType.value, data.value) } else { - // 编辑 + // 编辑/执行 emit('submitForm', formType.value, data.value) } } catch { @@ -837,9 +698,9 @@ if (props.footButttondata) { const changeFeatureType = (e) => { console.log(e) // if (e) { - // rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true + // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode'][0].required = true // } else { - // rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false + // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode'][0].required = false // } } const searchTableRef = ref() @@ -921,13 +782,13 @@ const opensearchTable = ( // val : 弹层列表row 数据 const searchTableSuccess = async (formField, searchField, val, type, row) => { if(type == 'features'){ - row.inspectionCharacteristicsBaseVO[formField] = val[0].code + row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code if(formField == 'inspectionMethodCode'){ - row.inspectionCharacteristicsBaseVO.inspectionMethodName = val[0].description + row.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName = val[0].description }else if(formField == 'dynamicUpdateCode'){ - row.inspectionCharacteristicsBaseVO.dynamicUpdateName = val[0].description + row.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName = val[0].description }else if(formField == 'inspectionMethod'){ - row.inspectionCharacteristicsBaseVO.inspectionName = val[0].description + row.inspectionJobCharacteristicsUpdateReqVO.inspectionName = val[0].description } } else if(type == 'main'){ data.value[formField] = val[0].code @@ -944,51 +805,61 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { editableTabsValue.value = index + 1 item.name = index + 1 // 编辑判断上限下限目标值是否必填 - if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { - rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true + if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { + rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true } else { - rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false + rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false } - if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { - rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true + if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) { + rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true } else { - rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false + rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = false } - if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { - rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true + if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) { + rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true } else { - rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false + rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = false } }) - data.value.process = list + data.value.subList = list } } // emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) } -// 选择是否设定上限值 -const changeIsCapping = (e) => { - if (e) { - rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true - } else { - rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false - } -} -// 选择是否设定下限值 -const changeLowlimit = (e) => { - if (e) { - rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true +// 请选择结果录入方式 +const resultEntryMethodChange = (e,item) => { + item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList =[] + if (e==0) { + // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true + for(let i=0;i { - if (e) { - rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true - } else { - rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false - } +// 选择选定级 +const changeQualitativeCode= (e,item,cur)=>{ + let obj = item.selectedProjectRespVOList.find(cur=>cur.dictionaryValue==e) + console.log(obj) + cur.defectLevel = obj.defectLevel }