From df4008433b9f0d23366323e92a7e3b8dce8841ab Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Wed, 29 May 2024 11:07:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E5=AE=9A=E9=9B=86=E5=92=8C=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E4=BF=AE=E6=94=B9=E8=A7=84=E5=88=99=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=87=8C=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/equipmentShutdown/index.ts | 61 ++++ src/api/eam/equipmentSigning/index.ts | 72 ++++ src/api/system/user/index.ts | 7 + src/components/Detail/src/DetailLedger.vue | 20 +- src/utils/dict.ts | 4 +- .../equipmentAccounts.data.ts | 3 +- .../equipmentShutdown.data.ts | 112 ++++++ src/views/eam/equipmentShutdown/index.vue | 244 +++++++++++++ .../equipmentSigning/equipmentSigning.data.ts | 343 ++++++++++++++++++ src/views/eam/equipmentSigning/index.vue | 263 ++++++++++++++ .../equipmentSpotCheckRecordDetail.data.ts | 128 ++----- .../equipmentTransferRecord.data.ts | 156 ++------ .../eam/equipmentTransferRecord/index.vue | 10 +- src/views/qms/dynamicRule/index.vue | 9 +- src/views/qms/selectedSet/index.vue | 7 +- 15 files changed, 1206 insertions(+), 233 deletions(-) create mode 100644 src/api/eam/equipmentShutdown/index.ts create mode 100644 src/api/eam/equipmentSigning/index.ts create mode 100644 src/views/eam/equipmentShutdown/equipmentShutdown.data.ts create mode 100644 src/views/eam/equipmentShutdown/index.vue create mode 100644 src/views/eam/equipmentSigning/equipmentSigning.data.ts create mode 100644 src/views/eam/equipmentSigning/index.vue diff --git a/src/api/eam/equipmentShutdown/index.ts b/src/api/eam/equipmentShutdown/index.ts new file mode 100644 index 000000000..61ff870ff --- /dev/null +++ b/src/api/eam/equipmentShutdown/index.ts @@ -0,0 +1,61 @@ +import request from '@/config/axios' + +export interface EquipmentShutdownVO { + id: number + equipmentCode: string + operationDate: Date + operationer: string + factoryAreaCode: string + workshopCode: string + workshopSectionCode: string + status: string + shutdownCause: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询设备停机记录列表 +export const getEquipmentShutdownPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/equipment-shutdown/senior', data }) + } else { + return await request.get({ url: `/eam/equipment-shutdown/page`, params }) + } +} + +// 查询设备停机记录详情 +export const getEquipmentShutdown = async (id: number) => { + return await request.get({ url: `/eam/equipment-shutdown/get?id=` + id }) +} + +// 新增设备停机记录 +export const createEquipmentShutdown = async (data: EquipmentShutdownVO) => { + return await request.post({ url: `/eam/equipment-shutdown/create`, data }) +} + +// 修改设备停机记录 +export const updateEquipmentShutdown = async (data: EquipmentShutdownVO) => { + return await request.put({ url: `/eam/equipment-shutdown/update`, data }) +} + +// 删除设备停机记录 +export const deleteEquipmentShutdown = async (id: number) => { + return await request.delete({ url: `/eam/equipment-shutdown/delete?id=` + id }) +} + +// 导出设备停机记录 Excel +export const exportEquipmentShutdown = async (params) => { + return await request.download({ url: `/eam/equipment-shutdown/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/equipment-shutdown/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/equipmentSigning/index.ts b/src/api/eam/equipmentSigning/index.ts new file mode 100644 index 000000000..e9db1653b --- /dev/null +++ b/src/api/eam/equipmentSigning/index.ts @@ -0,0 +1,72 @@ +import request from '@/config/axios' + +export interface EquipmentSigningVO { + id: number + equipmentCode: string + operationDate: Date + operationer: string + operationDept: string + telephone: string + supplierCode: string + supplierPeople: string + supplierTelephone: string + status: string + approver: number + approveContent: string + approveTime: Date + autoExamine: string + autoAgree: string + directCreateRecord: string + storageLocation: string + factoryAreaCode: string + workshopCode: string + workshopSectionCode: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询设备到货签收记录列表 +export const getEquipmentSigningPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/equipment-signing/senior', data }) + } else { + return await request.get({ url: `/eam/equipment-signing/page`, params }) + } +} + +// 查询设备到货签收记录详情 +export const getEquipmentSigning = async (id: number) => { + return await request.get({ url: `/eam/equipment-signing/get?id=` + id }) +} + +// 新增设备到货签收记录 +export const createEquipmentSigning = async (data: EquipmentSigningVO) => { + return await request.post({ url: `/eam/equipment-signing/create`, data }) +} + +// 修改设备到货签收记录 +export const updateEquipmentSigning = async (data: EquipmentSigningVO) => { + return await request.put({ url: `/eam/equipment-signing/update`, data }) +} + +// 删除设备到货签收记录 +export const deleteEquipmentSigning = async (id: number) => { + return await request.delete({ url: `/eam/equipment-signing/delete?id=` + id }) +} + +// 导出设备到货签收记录 Excel +export const exportEquipmentSigning = async (params) => { + return await request.download({ url: `/eam/equipment-signing/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/equipment-signing/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 0aaa49507..4161dd29e 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -97,3 +97,10 @@ export const forgetPassword = (data : UserVO) => { export const updatePassword = (data : UserVO) => { return request.put({ url: '/system/user/updatePassword', data }) } + + +// 查询用户详情 +export const getUserListByDeptIds = (data : Array) => { + return request.post({ url: '/system/user/getUserListByDeptIds', data }) +} + diff --git a/src/components/Detail/src/DetailLedger.vue b/src/components/Detail/src/DetailLedger.vue index 887778ba4..b0f221ab0 100644 --- a/src/components/Detail/src/DetailLedger.vue +++ b/src/components/Detail/src/DetailLedger.vue @@ -216,6 +216,23 @@ @onBlur="onBlur" @formFormDateChange="formFormDateChange" /> + + + @@ -1123,6 +1140,7 @@ const dialogUploadNumber = ref() const dialogUploadBusiCode = ref() const dialogFormKey = ref(0) const openDialog = async(row: any, titleName: any, titleValue: any) => { + debugger const { tableObject, tableMethods } = useTable({ getListApi: props.dialogApiPage, // 分页接口 defaultParams: getDialogParams(row) @@ -1140,7 +1158,7 @@ const openDialog = async(row: any, titleName: any, titleValue: any) => { function getDialogParams(row: any) { return { - number: row.number + 'masterId': row.id } } diff --git a/src/utils/dict.ts b/src/utils/dict.ts index d5f4d1d75..05d390269 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -348,9 +348,9 @@ export enum DICT_TYPE { SUBJECT = 'subject', //科目 REGION = 'region', //区域 PART_CLASS = 'part_class', //备件分类 - FAILURE_DEGREE = 'failure_degree', // 紧急程度 + FAILURE_DEGREE = 'failure_degree', // 故障紧急程度 FAILURE_REASON = 'failure_reason', //故障类型 - REPAIR_DEGREE = 'repair_degree', // + REPAIR_DEGREE = 'repair_degree', //维修紧急程度 REPAIR_LEVEL = 'repair_level', //维修级别 IS_COMPLETED = 'is_completed', //是否完成 MAINTENANCE_CYCLE ='maintenance_cycle', // 保养周期 diff --git a/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts b/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts index ceb6d3314..f3bbe38b9 100644 --- a/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts +++ b/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts @@ -1,8 +1,9 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' import * as WorkshopApi from '@/api/wms/workshop' import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' -import { validateHanset, validateNum, validateNum100 } from '@/utils/validator' +import { validateHanset, validateNum } from '@/utils/validator' import { EquipmentSupplier } from '@/views/eam/equipmentSupplier/equipmentSupplier.data' import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' import { EquipmentManufacturer } from '@/views/eam/equipmentManufacturer/equipmentManufacturer.data' diff --git a/src/views/eam/equipmentShutdown/equipmentShutdown.data.ts b/src/views/eam/equipmentShutdown/equipmentShutdown.data.ts new file mode 100644 index 000000000..b6cb80aa9 --- /dev/null +++ b/src/views/eam/equipmentShutdown/equipmentShutdown.data.ts @@ -0,0 +1,112 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const EquipmentShutdownRules = reactive({ + equipmentCode: [required], + operationDate: [required], + concurrencyStamp: [required] +}) + +export const EquipmentShutdown = useCrudSchemas(reactive([ + { + label: '设备编码', + field: 'equipmentCode', + sort: 'custom', + isSearch: true + }, + { + label: '操作日期', + field: 'operationDate', + 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' + } + } + }, + { + label: '操作人', + field: 'operationer', + sort: 'custom', + isSearch: true + }, + // { + // label: '所属厂区编号', + // field: 'factoryAreaCode', + // sort: 'custom', + // isSearch: true + // }, + { + label: '车间编号', + field: 'workshopCode', + sort: 'custom', + isSearch: true + }, + { + label: '工段编号', + field: 'workshopSectionCode', + sort: 'custom', + isSearch: false + }, + { + label: '是否停机', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: false, + form: { + component: 'Radio' + } + }, + { + label: '设备停机原因', + field: 'shutdownCause', + sort: 'custom', + isSearch: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false + }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: true, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/equipmentShutdown/index.vue b/src/views/eam/equipmentShutdown/index.vue new file mode 100644 index 000000000..18b838012 --- /dev/null +++ b/src/views/eam/equipmentShutdown/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/equipmentSigning/equipmentSigning.data.ts b/src/views/eam/equipmentSigning/equipmentSigning.data.ts new file mode 100644 index 000000000..99bcd1af5 --- /dev/null +++ b/src/views/eam/equipmentSigning/equipmentSigning.data.ts @@ -0,0 +1,343 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as WorkshopApi from '@/api/wms/workshop' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' +import { handleTreeToComponentOptions } from '@/utils/tree' +import * as DeptApi from '@/api/system/dept' +import * as UserApi from '@/api/system/user' +import { EquipmentAccounts,EquipmentAccountsRules } from '../equipmentAccounts/equipmentAccounts.data' +import * as EquipmentAccountsApi from '@/api/eam/equipmentAccounts' + +export interface User { + id: number, + nickname: string +} + +const deptList = ref([]) // 树形结构 +const workshopNoPage = await WorkshopApi.getWorkshopNoPage({}) +const userList = ref([]) +// 加载部门树(默认格式) +deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList()) + +// 表单校验 +export const EquipmentSigningRules = reactive({ + equipmentCode: [required], + operationDate: [required], + operationer: [required], + operationDept: [required], + supplierCode: [required], + status: [required], + storageLocation: [required], + concurrencyStamp: [required] +}) + +export const EquipmentSigning = useCrudSchemas(reactive([ + { + label: '设备编码', + field: 'equipmentCode', + sort: 'custom', + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择设备', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '设备信息', // 查询弹窗标题 + searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类 + searchPage: EquipmentAccountsApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + }, + { + label: '验收日期', + field: 'operationDate', + sort: 'custom', + formatter: dateFormatter, + isSearch: 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: 'operationDept', + sort: 'custom', + isSearch: true, + form: { + component: 'TreeSelect', + componentProps: { // 假设deptList是部门数据列表 + data: deptList, + disabled: false, + placeholder: "请选择部门", + filterable: true, + multiple: false, + } + } + }, + { + label: '验收人', + field: 'operationer', + sort: 'custom', + isSearch: true, + form: { + component: 'Select', + componentProps: { // 假设deptList是部门数据列表 + options: [], + optionsAlias: { + valueField: 'id', + labelField: 'nickname' + }, + disabled: false, + placeholder: "请先选择部门", + filterable: true, + multiple: false, + } + } + }, + { + label: '验收人联系方式', + field: 'telephone', + sort: 'custom', + isSearch: false + }, + { + label: '供应商编号', + field: 'supplierCode', + sort: 'custom', + isSearch: true + }, + { + label: '供应商联系人', + field: 'supplierPeople', + sort: 'custom', + isSearch: true + }, + { + label: '供应商联系方式', + field: 'supplierTelephone', + sort: 'custom', + isSearch: false + }, + // { + // label: '流程状态', + // field: 'status', + // sort: 'custom', + // isSearch: true, + // dictType: DICT_TYPE.JOB_STATUS, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // form: { + // component: 'Select' + // } + // }, + // { + // label: '审核人', + // field: 'approver', + // sort: 'custom', + // isSearch: true, + // form: { + // component: 'InputNumber', + // value: 0 + // } + // }, + // { + // label: '审核内容', + // field: 'approveContent', + // sort: 'custom', + // isSearch: false, + // form: { + // component: 'Input', + // componentProps: { + // type: 'textarea', + // valueHtml: '', + // height: 200 + // } + // } + // }, + // { + // label: '审核时间', + // field: 'approveTime', + // sort: 'custom', + // formatter: dateFormatter, + // isSearch: 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: 'autoExamine', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + // { + // label: '自动通过', + // field: 'autoAgree', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + // { + // label: '直接生成记录', + // field: 'directCreateRecord', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + { + label: '存放位置描述', + field: 'storageLocation', + sort: 'custom', + isSearch: false, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + placeholder: '请输入存放位置描述' + } + } + }, + // { + // label: '所属厂区编号', + // field: 'factoryAreaCode', + // sort: 'custom', + // isSearch: false + // }, + { + label: '车间编号', + field: 'workshopCode', + sort: 'custom', + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择车间代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + }, + { + label: '产线编号', + field: 'lineCode', + sort: 'custom', + isSearch: true, + form: { + component: 'Select' + } + }, + { + label: '工序编号', + field: 'processCode', + sort: 'custom', + isSearch: true, + form: { + component: 'Select' + } + }, + { + label: '工位编号', + field: 'workstationCode', + sort: 'custom', + isSearch: true, + form: { + component: 'Select' + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false + }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: true, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/equipmentSigning/index.vue b/src/views/eam/equipmentSigning/index.vue new file mode 100644 index 000000000..571bfccb3 --- /dev/null +++ b/src/views/eam/equipmentSigning/index.vue @@ -0,0 +1,263 @@ + + + diff --git a/src/views/eam/equipmentSpotCheckRecordDetail/equipmentSpotCheckRecordDetail.data.ts b/src/views/eam/equipmentSpotCheckRecordDetail/equipmentSpotCheckRecordDetail.data.ts index 0ffa3a064..96ac8c29e 100644 --- a/src/views/eam/equipmentSpotCheckRecordDetail/equipmentSpotCheckRecordDetail.data.ts +++ b/src/views/eam/equipmentSpotCheckRecordDetail/equipmentSpotCheckRecordDetail.data.ts @@ -10,34 +10,28 @@ export const EquipmentSpotCheckRecordDetailRules = reactive({ }) export const EquipmentSpotCheckRecordDetail = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isForm: false - }, { label: '点检工单号', field: 'number', sort: 'custom', isSearch: true }, - { - label: '主表', - field: 'masterId', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, + // { + // label: '主表', + // field: 'masterId', + // sort: 'custom', + // isSearch: false, + // form: { + // component: 'InputNumber', + // value: 0 + // } + // }, { label: '完成时间', field: 'completionTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -58,27 +52,27 @@ export const EquipmentSpotCheckRecordDetail = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isForm: false - }, { label: '设备编码', field: 'equipmentCode', @@ -24,19 +18,19 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive([ label: '设备类型枚举', field: 'type', sort: 'custom', - dictType: DICT_TYPE.DEVICE_TYPE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true, - form: { - component: 'SelectV2' - } + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: false, + form: { + component: 'Select' + } }, { label: '操作日期', field: 'operationDate', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -57,14 +51,14 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive([ label: '操作人', field: 'operationer', sort: 'custom', - isSearch: true - }, - { - label: '原所属厂区编号', - field: 'beforeFactoryAreaCode', - sort: 'custom', - isSearch: true + isSearch: false }, + // { + // label: '原所属厂区编号', + // field: 'beforeFactoryAreaCode', + // sort: 'custom', + // isSearch: false + // }, { label: '原地点', field: 'beforeLocation', @@ -81,7 +75,7 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive([ label: '原工段编号', field: 'beforeWorkshopSectionCode', sort: 'custom', - isSearch: true + isSearch: false }, { label: '现地点', @@ -89,12 +83,12 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive([ sort: 'custom', isSearch: true }, - { - label: '所属厂区编号', - field: 'factoryAreaCode', - sort: 'custom', - isSearch: true - }, + // { + // label: '所属厂区编号', + // field: 'factoryAreaCode', + // sort: 'custom', + // isSearch: true + // }, { label: '车间编号', field: 'workshopCode', @@ -105,96 +99,24 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive([ label: '工段编号', field: 'workshopSectionCode', 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: 'departmentCode', - sort: 'custom', - isSearch: true - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - isSearch: true - }, - { - label: '地点', - field: 'siteId', - sort: 'custom', - isSearch: true - }, - { - label: '是否可用默认TRUE', - field: 'available', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - } - }, - { - 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' - } - } - }, - { - label: '删除人', - field: 'deleterId', - sort: 'custom', - isSearch: true - }, - { - label: '并发乐观锁', - field: 'concurrencyStamp', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - } - }, + isSearch: false + }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, { label: '操作', field: 'action', diff --git a/src/views/eam/equipmentTransferRecord/index.vue b/src/views/eam/equipmentTransferRecord/index.vue index f90ae8def..dcab8a1ec 100644 --- a/src/views/eam/equipmentTransferRecord/index.vue +++ b/src/views/eam/equipmentTransferRecord/index.vue @@ -99,9 +99,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:equipmentTransferRecord:create'}), // 新增 - defaultButtons.defaultImportBtn({hasPermi:'wms:equipmentTransferRecord:import'}), // 导入 - defaultButtons.defaultExportBtn({hasPermi:'wms:equipmentTransferRecord:export'}), // 导出 + defaultButtons.defaultAddBtn({hasPermi:'eam:equipment-transfer-record:create'}), // 新增 + defaultButtons.defaultImportBtn({hasPermi:'eam:equipment-transfer-record:import'}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:'eam:equipment-transfer-record:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'wms:equipmentTransferRecord:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'wms:equipmentTransferRecord:delete'}), // 删除 + defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-transfer-record:update'}), // 编辑 + defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-transfer-record:delete'}), // 删除 ] // 列表-操作按钮事件 diff --git a/src/views/qms/dynamicRule/index.vue b/src/views/qms/dynamicRule/index.vue index 49e9ff621..4eb9bf10a 100644 --- a/src/views/qms/dynamicRule/index.vue +++ b/src/views/qms/dynamicRule/index.vue @@ -70,10 +70,10 @@ :apiPage="InspectionStageApi.getInspectionStagePage" :apiDelete="InspectionStageApi.deleteInspectionStage" :detailValidate="detailValidate" - @searchTableSuccessDetail="searchTableSuccessDetail" - :detailButtonIsShowEdit=true - :detailButtonIsShowAdd=true - :detailButtonIsShowDelete=true + @searchTableSuccessDetail="searchTableSuccessDetail" + :detailButtonIsShowEdit="checkPermi(['qms:inspection-stage:update'])" + :detailButtonIsShowAdd="checkPermi(['qms:inspection-stage:create'])" + :detailButtonIsShowDelete="checkPermi(['qms:inspection-stage:delete'])" @detailOpenForm="detailOpenForm" myFuncTypeSign="InspectionStage" /> @@ -91,6 +91,7 @@ import * as InspectionStageApi from '@/api/qms/inspectionStage' import * as defaultButtons from '@/utils/disposition/defaultButtons' import UploadFile from '@/components/UploadFile/src/UploadFile.vue' +import { checkPermi } from '@/utils/permission' // 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/selectedSet/index.vue b/src/views/qms/selectedSet/index.vue index b302283f1..63d287b40 100644 --- a/src/views/qms/selectedSet/index.vue +++ b/src/views/qms/selectedSet/index.vue @@ -72,9 +72,9 @@ :apiDelete="SelectedProjectApi.deleteSelectedProject" :detailValidate="detailValidate" @searchTableSuccessDetail="searchTableSuccessDetail" - :detailButtonIsShowEdit=true - :detailButtonIsShowAdd=true - :detailButtonIsShowDelete=true + :detailButtonIsShowEdit="checkPermi(['qms:selected-project:update'])" + :detailButtonIsShowAdd="checkPermi(['qms:selected-project:create'])" + :detailButtonIsShowDelete="checkPermi(['qms:selected-project:delete'])" @detailOpenForm="detailOpenForm" @detailBasicFormOnChange="detailBasiFormOnChange" :detailButtonIsShowFilter="false" @@ -94,6 +94,7 @@ import * as SelectedProjectApi from '@/api/qms/selectedProject' import * as DictDataApi from '@/api/system/dict/dict.data' import component from 'virtual:svg-icons-register' import * as DictTypeApi from '@/api/system/dict/dict.type' +import { checkPermi } from '@/utils/permission' // import TableHead from '@/components/TableHead/src/TableHead.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import Detail from '@/components/Detail/src/Detail.vue'