diff --git a/src/api/eam/basicEamWorkshop/index.ts b/src/api/eam/basicEamWorkshop/index.ts index 09d83c2d9..729ea6dae 100644 --- a/src/api/eam/basicEamWorkshop/index.ts +++ b/src/api/eam/basicEamWorkshop/index.ts @@ -1,5 +1,4 @@ import request from '@/config/axios' -import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart"; export interface BasicEamWorkshopVO { id: number diff --git a/src/api/eam/documentTypeSelectSet/index.ts b/src/api/eam/documentTypeSelectSet/index.ts index 13b7164d6..c776a99dd 100644 --- a/src/api/eam/documentTypeSelectSet/index.ts +++ b/src/api/eam/documentTypeSelectSet/index.ts @@ -1,5 +1,4 @@ import request from '@/config/axios' -import {BasicSpotCheckSelectSetVO} from "@/api/eam/spotCheckSelectSet"; export interface DocumentTypeSelectSetVO { id: number diff --git a/src/api/eam/equipmentAccounts/index.ts b/src/api/eam/equipmentAccounts/index.ts index d1e9e401a..6f76580dc 100644 --- a/src/api/eam/equipmentAccounts/index.ts +++ b/src/api/eam/equipmentAccounts/index.ts @@ -15,6 +15,7 @@ export interface EquipmentAccountsVO { principal: string principalTelephone: string status: string + changeReason: string startDate: Date supplierCode: string purchaseTime: Date @@ -81,4 +82,9 @@ export const importTemplate = () => { // 查询设备台账列表 export const getEquipmentAccountsNoPage = async (params) => { return await request.get({ url: `/eam/device/equipment-accounts/noPage`, params }) -} \ No newline at end of file +} + +//停用启用 +export const ableEquipmentAccountsMain = async (data: EquipmentAccountsVO) => { + return await request.post({ url: `/eam/device/equipment-accounts/ables`, data }) +} diff --git a/src/api/eam/inspectionItem/index.ts b/src/api/eam/inspectionItem/index.ts index ddf8cf80f..98f14dc05 100644 --- a/src/api/eam/inspectionItem/index.ts +++ b/src/api/eam/inspectionItem/index.ts @@ -1,5 +1,4 @@ import request from '@/config/axios' -import {InspectionItemSelectSetVO} from "@/api/eam/inspectionItemSelectSet"; export interface InspectionItemVO { id: number diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue index 88439dd30..af8cab620 100644 --- a/src/components/TableForm/src/TableForm.vue +++ b/src/components/TableForm/src/TableForm.vue @@ -406,7 +406,9 @@ routeName == 'DeliverPlanMain' || routeName == 'DeliverRequestMain' || routeName == 'ZZBJDeliverRequestMain' || - routeName == 'UnplannedreceiptRequestMain' + routeName == 'UnplannedreceiptRequestMain'|| + routeName == 'RepleinshRequestMain' + " > diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue index b74ee3325..c56f679cb 100644 --- a/src/components/UploadFile/src/UploadFile.vue +++ b/src/components/UploadFile/src/UploadFile.vue @@ -80,7 +80,7 @@ const uploadHeaders = ref({ // 文件上传之前判断 const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => { if (fileList.value.length >= props.limit) { - message.error(`${t('ts.上传文件数量不能超过')}${props.limit}!`) + message.error(`${t('ts.上传文件数量不能超过').replace('ts.','')}${props.limit}!`) return false } let fileExtension = '' diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index edb8b8d7e..7f637131d 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -1154,7 +1154,7 @@ export function mainCopyBtn(option: any) { // 主列表-部件 export function componentBtn(option: any) { return __defaultBtnOption(option, { - label: '部件', + label: '关联部件', name: 'component', hide: false, type: 'primary', @@ -1166,7 +1166,7 @@ export function componentBtn(option: any) { // 主列表-备件 export function sparePartBtn(option: any) { return __defaultBtnOption(option, { - label: '备件', + label: '关联备件', name: 'sparePart', hide: false, type: 'primary', diff --git a/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts b/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts index 2c9115f5e..f22e6e5dc 100644 --- a/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts +++ b/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts @@ -631,7 +631,7 @@ export const EquipmentAccounts = useCrudSchemas(reactive([ field: 'action', isForm: false, table: { - width: 200, + width: 250, fixed: 'right' } } diff --git a/src/views/eam/equipmentAccounts/index.vue b/src/views/eam/equipmentAccounts/index.vue index e17ae39a8..fe388bea2 100644 --- a/src/views/eam/equipmentAccounts/index.vue +++ b/src/views/eam/equipmentAccounts/index.vue @@ -33,7 +33,7 @@ @@ -50,6 +50,8 @@ :isBusiness="false" /> + + { nextTick(() => { @@ -217,13 +219,30 @@ const buttonBaseClick = (val, item) => { } } +const isShowMainButton = (row,val) => { + if (val.indexOf(row.available) > -1) { + return false + } else { + return true + } +} + // 列表-操作按钮 -const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-accounts:update'}), // 编辑 - defaultButtons.componentBtn({hasPermi:'eam:equipment-accounts:component'}), // 部件 - defaultButtons.sparePartBtn({hasPermi:'eam:equipment-accounts:item'}), // 备件 - // defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-accounts:delete'}), // 删除 -] +const butttondata = (row) => { + return [ + defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-accounts:update'}), // 编辑 + defaultButtons.componentBtn({hasPermi:'eam:equipment-accounts:component'}), // 部件 + defaultButtons.sparePartBtn({hasPermi:'eam:equipment-accounts:item'}), // 备件 + defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:basicFaultType:update'}), + defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:basicFaultType:update'}), + ] +} + +//启用禁用 +const ablesFormRef = ref() +function openables(row, val) { + ablesFormRef.value.open(val,row); +} // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { @@ -235,6 +254,10 @@ const buttonTableClick = async (val, row) => { openComponent(row) } else if (val == 'sparePart') { // 备件 openSparePart(row) + } else if (val == 'enable') { // 启用/禁用 + openables(row,val) + } else if (val == 'disable') { // 启用/禁用 + openables(row,val) } } @@ -351,6 +374,21 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } +//ablesForm 提交按钮回传 +const getData=(val)=> { + nextTick?.(async () => { + await getList() + }) +} + +//ablesForm 关闭按钮回传 +const getClosed=(val)=> { + nextTick?.(() => { + console.log(val) + getList() + }) +} + const searchTableRef = ref() const searchSparePartTableRef = ref() diff --git a/src/views/eam/toolAccounts/index.vue b/src/views/eam/toolAccounts/index.vue index 0442cbfe7..27ebebe3f 100644 --- a/src/views/eam/toolAccounts/index.vue +++ b/src/views/eam/toolAccounts/index.vue @@ -1,18 +1,22 @@