From 50afcfcc1966fa6d1baedebc85b22169ee8db6d2 Mon Sep 17 00:00:00 2001 From: zhousq Date: Fri, 24 May 2024 16:59:51 +0800 Subject: [PATCH] =?UTF-8?q?2024-05-20=20=20=E8=8A=82=E5=81=87=E6=97=A5?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3=EF=BC=9B=E8=B4=A8=E6=A3=80=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=85=A5=EF=BC=8C=E8=B4=A8=E6=A3=80=E7=B1=BB?= =?UTF-8?q?=E5=88=AB=E5=BD=95=E5=85=A5=EF=BC=9B=E8=B4=A8=E6=A3=80=E5=88=86?= =?UTF-8?q?=E7=BB=84=E5=BD=95=E5=85=A5=EF=BC=9B=E5=B7=A5=E4=BD=9C=E7=AB=99?= =?UTF-8?q?=E7=9A=84=E4=BA=BA=E5=91=98=E8=83=BD=E5=8A=9B=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/holiday/holiday.data.ts | 4 +- src/views/mes/item/index.vue | 4 ++ src/views/mes/item/item.data.ts | 57 ++++++++++++------- .../mes/qualityclass/qualityclass.data.ts | 31 ++++++++-- .../mes/qualitygroup/qualitygroup.data.ts | 21 ++++--- src/views/mes/workstation/workstation.data.ts | 4 +- 6 files changed, 79 insertions(+), 42 deletions(-) diff --git a/src/views/mes/holiday/holiday.data.ts b/src/views/mes/holiday/holiday.data.ts index 55096dbd7..cf0937d6b 100644 --- a/src/views/mes/holiday/holiday.data.ts +++ b/src/views/mes/holiday/holiday.data.ts @@ -89,7 +89,7 @@ export const Holiday = useCrudSchemas(reactive([ label: '状态', field: 'status', sort: 'custom', - dictType: DICT_TYPE.QUALIFY_STATUS, + dictType: DICT_TYPE.COMMON_STATUS, dictClass: 'string', isForm: true, isSearch: false, @@ -98,7 +98,7 @@ export const Holiday = useCrudSchemas(reactive([ component: 'Switch', value: '1', componentProps: { - inactiveValue: '2', + inactiveValue: '0', activeValue: '1' } }, diff --git a/src/views/mes/item/index.vue b/src/views/mes/item/index.vue index 81515d30d..3cb92bb40 100644 --- a/src/views/mes/item/index.vue +++ b/src/views/mes/item/index.vue @@ -81,7 +81,11 @@ const tableColumns = ref(Item.allSchemas.tableColumns) const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { const setV = {} + console.log("item-search-success-84-val",val) + console.log("item-search-success-84-formField",formField) setV[formField] = val[0][searchField] + setV["itemType"] = val[0]["groupCode"] + //setV[] = val[0][searchField] formRef.setValues(setV) }) } diff --git a/src/views/mes/item/item.data.ts b/src/views/mes/item/item.data.ts index ef09018c2..146ed1730 100644 --- a/src/views/mes/item/item.data.ts +++ b/src/views/mes/item/item.data.ts @@ -1,14 +1,15 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -import * as QualitygroupApi from '@/api/mes/qualitygroup' -import { Qualitygroup } from '../qualitygroup/qualitygroup.data' - +import * as QualityclassApi from '@/api/mes/qualityclass' +import { Qualityclass } from '@/views/mes/qualityclass/qualityclass.data' +// import * as QualitygroupApi from '@/api/mes/qualitygroup' +// import { Qualitygroup } from '@/views/mes/qualitygroup/qualitygroup.data' // 表单校验 export const ItemRules = reactive({ - concurrencyStamp: [required], - itemCode: [{ required: true, message: '请输入编码', trigger: 'blur' }], - itemType: [required], - dataType: [required] + itemCode: [{ required: true, message: '请输入项目编码', trigger: 'blur' }], + itemName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }], + qmsClass: [{ required: true, message: '请选择一个质检类别', trigger: 'blur' }], + dataType:[{ required: true, message: '请选择一个数据类型!', trigger: 'blur' }], }) export const Item = useCrudSchemas(reactive([ @@ -111,19 +112,40 @@ export const Item = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, + // { + // label: '分组编码', + // field: 'itemType', + // sort: 'custom', + // isSearch: true, + // // form: { + // // componentProps: { + // // isSearchList: true, // 开启查询弹窗 + // // searchTitle: '质检分组', // 查询弹窗标题 + // // searchListPlaceholder: '请选择质检分组', // 输入框占位文本 + // // searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类 + // // searchField: 'code', // 查询弹窗赋值字段 + // // searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法 + // // searchCondition: [{ + // // key: 'status', + // // value: '1', + // // action: '==' + // // }] + // // } + // // } + // }, { - label: '类别编码', - field: 'itemType', + label: '质检科目编码', + field: 'qmsClass', sort: 'custom', isSearch: true, form: { componentProps: { isSearchList: true, // 开启查询弹窗 - searchTitle: '质检科目信息', // 查询弹窗标题 - searchListPlaceholder: '请选择 类别编码', // 输入框占位文本 - searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类 + searchTitle: '质检分组', // 查询弹窗标题 + searchListPlaceholder: '请选择质检分组', // 输入框占位文本 + searchAllSchemas: Qualityclass.allSchemas, // 查询弹窗所需类 searchField: 'code', // 查询弹窗赋值字段 - searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法 + searchPage: QualityclassApi.getQualityclassPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'status', value: '1', @@ -132,13 +154,6 @@ export const Item = useCrudSchemas(reactive([ } } }, - { - label: '质检科目编码', - field: 'qmsClass', - sort: 'custom', - isSearch: true, - - }, { label: '数据类型', field: 'dataType', @@ -187,7 +202,7 @@ export const Item = useCrudSchemas(reactive([ isForm: true, form: { component: 'Switch', - value: '2', + value: '1', componentProps: { inactiveValue: '2', activeValue: '1' diff --git a/src/views/mes/qualityclass/qualityclass.data.ts b/src/views/mes/qualityclass/qualityclass.data.ts index ddc384661..8978ddcdd 100644 --- a/src/views/mes/qualityclass/qualityclass.data.ts +++ b/src/views/mes/qualityclass/qualityclass.data.ts @@ -1,11 +1,13 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' - +import * as QualitygroupApi from '@/api/mes/qualitygroup' +import { Qualitygroup } from '@/views/mes/qualitygroup/qualitygroup.data' // 表单校验 export const QualityclassRules = reactive({ - concurrencyStamp: [required], - code: [{ required: true, message: '请输入代码', trigger: 'blur' }], - name: [required], + + code: [{ required: true, message: '请输入编码', trigger: 'blur' }], + name: [{ required: true, message: '请输入名称', trigger: 'blur' }], + groupCode: [{ required: true, message: '请选择一个分组', trigger: 'blur' }], }) export const Qualityclass = useCrudSchemas(reactive([ @@ -108,10 +110,27 @@ export const Qualityclass = useCrudSchemas(reactive([ isSearch: true, }, { - label: '分组类别', + label: '分组', field: 'groupCode', sort: 'custom', isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择一个分组', // 输入框占位文本 + multiple:false, + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '分组编码', // 查询弹窗标题 + searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类 + searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'status', + value: '1', + isMainValue: false + }] + } + } }, { label: '状态', @@ -124,7 +143,7 @@ export const Qualityclass = useCrudSchemas(reactive([ isTable: true, form: { component: 'Switch', - value: '2', + value: '1', componentProps: { inactiveValue: '2', activeValue: '1' diff --git a/src/views/mes/qualitygroup/qualitygroup.data.ts b/src/views/mes/qualitygroup/qualitygroup.data.ts index 7cf7a5bf9..9744622c9 100644 --- a/src/views/mes/qualitygroup/qualitygroup.data.ts +++ b/src/views/mes/qualitygroup/qualitygroup.data.ts @@ -3,9 +3,8 @@ import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const QualitygroupRules = reactive({ - concurrencyStamp: [required], - code: [required], - name: [required], + code: [{ required: true, message: '请输入编码', trigger: 'blur' }], + name: [{ required: true, message: '请输入名称', trigger: 'blur' }], }) export const Qualitygroup = useCrudSchemas(reactive([ @@ -102,17 +101,17 @@ export const Qualitygroup = useCrudSchemas(reactive([ isSearch: true, }, { - label: '编码名称', + label: '分组名称', field: 'name', sort: 'custom', isSearch: true, }, - { - label: '分组类别', - field: 'groupCode', - sort: 'custom', - isSearch: true, - }, + // { + // label: '分组类别', + // field: 'groupCode', + // sort: 'custom', + // isSearch: true, + // }, { label: '状态', field: 'status', @@ -124,7 +123,7 @@ export const Qualitygroup = useCrudSchemas(reactive([ isTable: true, form: { component: 'Switch', - value: '2', + value: '1', componentProps: { inactiveValue: '2', activeValue: '1' diff --git a/src/views/mes/workstation/workstation.data.ts b/src/views/mes/workstation/workstation.data.ts index 50c88e58b..8ef670d05 100644 --- a/src/views/mes/workstation/workstation.data.ts +++ b/src/views/mes/workstation/workstation.data.ts @@ -319,8 +319,8 @@ export const abilityPopList = useCrudSchemas(reactive([ searchAllSchemas: AbilityInfo.allSchemas, // 查询弹窗所需类 searchPage: AbilityInfoApi.getAbilityInfoPage, // 查询弹窗所需分页方法 searchCondition: [{ - key: 'available', - value: 'TRUE', + key: 'status', + value: '1', isMainValue: false }] }