diff --git a/index.html b/index.html
index 847a1533b..e322068ed 100644
--- a/index.html
+++ b/index.html
@@ -6,14 +6,8 @@
-
-
+
+
%VITE_APP_TITLE%
diff --git a/src/api/eam/equipmentRepairJobMain/index.ts b/src/api/eam/equipmentRepairJobMain/index.ts
index ed01ac342..e06982c20 100644
--- a/src/api/eam/equipmentRepairJobMain/index.ts
+++ b/src/api/eam/equipmentRepairJobMain/index.ts
@@ -79,6 +79,7 @@ export const updateEquipmentRepairMain = async (data: EquipmentRepairJobMainVO)
return await request.post({ url: `/eam/equipment-repair-job-main/updateRepair`, data })
}
+
// 完成维修工单主
export const executeEquipmentRepairJobMain = async (data: EquipmentRepairJobMainVO) => {
return await request.post({ url: `/eam/equipment-repair-job-main/execute`, data })
diff --git a/src/api/eam/equipmentReportRepairRequest/index.ts b/src/api/eam/equipmentReportRepairRequest/index.ts
index 1eeec7e86..10542bbf9 100644
--- a/src/api/eam/equipmentReportRepairRequest/index.ts
+++ b/src/api/eam/equipmentReportRepairRequest/index.ts
@@ -81,3 +81,8 @@ export const updateEquipmentReportRepairOrder = async (data: EquipmentReportRepa
export const createEquipmentWeixiuOrder = async (data: EquipmentReportRepairRequestVO) => {
return await request.post({ url: `/eam/equipment-report-repair-request/updateCreateOrder`, data })
}
+
+// 查询报修工单文件附件
+export const getEquipmentReportFileInfo = async (data) => {
+ return await request.post({ url: `/eam/equipment-report-repair-request/fileListInfo`, data })
+}
diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts
index e56253106..8081b48ef 100644
--- a/src/utils/disposition/defaultButtons.ts
+++ b/src/utils/disposition/defaultButtons.ts
@@ -440,6 +440,18 @@ export function mainListValidateRepairBtn(option:any) {
hasPermi: ''
})
}
+// 主列表-预览按钮
+export function viewBtn(option:any) {
+ return __defaultBtnOption(option,{
+ label: '预览',
+ name: 'view',
+ hide: false,
+ type: 'success',
+ color: '',
+ link: true, // 文本展现按钮
+ hasPermi: ''
+ })
+}
// 主列表-审核按钮
export function mainListAuditingBtn(option:any) {
diff --git a/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts b/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts
index d431d5ddd..e6e3a50f6 100644
--- a/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts
+++ b/src/views/eam/equipmentRepairJobMain/equipmentRepairJobMain.data.ts
@@ -4,7 +4,6 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {BasicFaultCause} from "@/views/eam/basicFaultCause/basicFaultCause.data";
import * as ItemApi from "@/api/eam/basicFaultCause";
-import {getBasicFaultCausePage} from "@/api/eam/basicFaultCause";
// 表单校验
export const EquipmentRepairJobMainRules = reactive({
@@ -14,9 +13,9 @@ export const EquipmentRepairJobMainRules = reactive({
urgency: [required],
level: [required],
equipmentCode: [required],
- totalMinutes: [required],
faultType: [required],
status: [required],
+ shutDown:[required],
})
export const EquipmentRepairJobMain = useCrudSchemas(reactive([
@@ -34,6 +33,9 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
field: 'number',
sort: 'custom',
isSearch: true,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
label: '设备类别',
@@ -48,20 +50,30 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
field: 'repairNumber',
sort: 'custom',
isSearch: true,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
- label: '来源字典',
+ label: '来源',
field: 'sources',
sort: 'custom',
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
dictClass: 'string',
isSearch: false,
+ isForm: true,
+ form:{
+ value:'1'
+ }
},
{
label: '维修描述',
field: 'maintenanceDesc',
sort: 'custom',
- isSearch: false,
+ isSearch: true,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
label: '紧急程度',
@@ -121,6 +133,9 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
search: {
component: 'DatePicker',
componentProps: {
@@ -143,6 +158,9 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
search: {
component: 'DatePicker',
componentProps: {
@@ -164,18 +182,27 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
field: 'totalMinutes',
sort: 'custom',
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
label: '维修验证人',
field: 'verifyerRepair',
sort: 'custom',
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
label: '维修验证内容',
field: 'verifyContentRepair',
sort: 'custom',
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
label: '维修验证时间',
@@ -183,6 +210,9 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
search: {
component: 'DatePicker',
componentProps: {
@@ -204,12 +234,18 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
field: 'verifyerReport',
sort: 'custom',
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
label: '报修验证内容',
field: 'verifyContentReport',
sort: 'custom',
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
label: '报修验证时间',
@@ -217,6 +253,9 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
search: {
component: 'DatePicker',
componentProps: {
@@ -238,12 +277,18 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
field: 'maintenancer',
sort: 'custom',
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
label: '维修人联系电话',
field: 'maintenancePhone',
sort: 'custom',
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
label: '结果',
@@ -251,7 +296,10 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
sort: 'custom',
dictType: DICT_TYPE.EAM_COMPLETE_RESULT,
dictClass: 'string',
- isSearch: true,
+ isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
label: '完成时间',
@@ -259,6 +307,9 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
search: {
component: 'DatePicker',
componentProps: {
@@ -306,6 +357,9 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
search: {
component: 'DatePicker',
componentProps: {
@@ -327,6 +381,9 @@ export const EquipmentRepairJobMain = useCrudSchemas(reactive([
field: 'repairer',
sort: 'custom',
isSearch: false,
+ isTable: true,
+ isForm: false,
+ isDetail:true,
},
{
label: '故障类型',
diff --git a/src/views/eam/equipmentRepairJobMain/finishForm1.vue b/src/views/eam/equipmentRepairJobMain/finishForm1.vue
index 6fe664349..d0b042e01 100644
--- a/src/views/eam/equipmentRepairJobMain/finishForm1.vue
+++ b/src/views/eam/equipmentRepairJobMain/finishForm1.vue
@@ -63,6 +63,7 @@ const InputRef = ref>()
const formData = ref({
id:'',
number:'',
+ sources:'',
verifyerRepair: '',
verifyContentRepair: '',
verifyTimeRepair: '',
@@ -158,6 +159,7 @@ const open = async (type: string, row?: object) => {
//初始化数据
formData.value.id = row.id
formData.value.number = row.number
+ formData.value.sources = row.sources
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
@@ -172,7 +174,7 @@ const submitForm = async (val) => {
//发送数据
await EquipmentRepairJobMainApi.updateEquipmentRepairJobMain(formData.value)
//把success函数传递到父页面
- emit('success',formData.value.id)
+ emit('success',formData.value.id,formData.value.sources)
dialogVisible.value = false
}
diff --git a/src/views/eam/equipmentRepairJobMain/index.vue b/src/views/eam/equipmentRepairJobMain/index.vue
index 5943cdd48..71dd0c1f4 100644
--- a/src/views/eam/equipmentRepairJobMain/index.vue
+++ b/src/views/eam/equipmentRepairJobMain/index.vue
@@ -48,6 +48,7 @@
:apiCreate="EquipmentRepairJobMainApi.createEquipmentRepairJobMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
+ @onChange="onChange"
/>
@@ -88,6 +89,10 @@ import Detail from '@/views/eam/equipmentRepairJobMain/EquipmentRepairJobDetail.
import FinishForm1 from '@/views/eam/equipmentRepairJobMain/finishForm1.vue'
import FinishForm2 from '@/views/eam/equipmentRepairJobMain/finishForm2.vue'
import FinishForm3 from '@/views/eam/equipmentRepairJobMain/finishForm3.vue'
+import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
+import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
+import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data";
+import * as ToolItemApi from "@/api/eam/toolAccounts";
defineOptions({ name: 'EquipmentRepairJobMain' })
@@ -163,6 +168,15 @@ const isShowStatusButton = (row,val) => {
}
}
+//true 是隐藏
+const isShowBaoXiuButton = (row) => {
+ if(row.sources =='0' && row.status == '7'){
+ return false
+ }else{
+ return true
+ }
+}
+
// 列表-操作按钮
const butttondata = (row) => {
@@ -172,7 +186,7 @@ const butttondata = (row) => {
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), // 执行
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentRepairJobMain:update'}), //完成
defaultButtons.mainListValidateRepairBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentRepairJobMain:update'}), // 维修验证
- defaultButtons.mainListValidateReportBtn({hide: isShowStatusButton(row,['7']),hasPermi:'eam:equipmentRepairJobMain:update'}), // 报修验证
+ defaultButtons.mainListValidateReportBtn({hide: isShowBaoXiuButton(row),hasPermi:'eam:equipmentRepairJobMain:update'}), // 报修验证
]
}
@@ -200,6 +214,27 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
+ if(type == "create"){
+ EquipmentRepairJobMain.allSchemas.formSchema.forEach((item) => {
+ if(item.field == 'sources'){
+ item.value = '1'
+ item.componentProps.disabled = true
+ }
+ if(item.field == 'status'){
+ item.value = '3'
+ item.componentProps.disabled = true
+ }
+ })
+ }else{
+ EquipmentRepairJobMain.allSchemas.formSchema.forEach((item) => {
+ if(item.field == 'sources'){
+ item.componentProps.disabled = true
+ }
+ if(item.field == 'status'){
+ item.componentProps.disabled = true
+ }
+ })
+ }
basicFormRef.value.open(type, row)
}
@@ -384,16 +419,20 @@ const getClosed1=(val)=> {
}
//finishForm1 提交按钮回传
-const getData1=(val)=> {
+const getData1=(val1,val2)=> {
nextTick?.(async () => {
- console.log(val)
try {
const params = ref({
id: '',
status:'',
})
- params.value.id = val
- params.value.status = '7'
+ params.value.id = val1
+ if(val2 == '1'){
+ params.value.status = '8'
+ }
+ if(val2 == '0'){
+ params.value.status = '7'
+ }
await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
message.success(t('工单已流转'))
// 刷新列表
@@ -461,6 +500,33 @@ const getData3=(val)=> {
)
}
+const onChange = (field, item) => {
+ //设备
+ if(field == 'type' && item == 'DEVICE'){
+ EquipmentRepairJobMain.allSchemas.formSchema.forEach((items) => {
+ if (items.field == 'equipmentCode') {
+ basicFormRef.value.formRef.setValues({
+ equipmentCode:''
+ })
+ items.componentProps.searchAllSchemas = EquipmentAccounts.allSchemas
+ items.componentProps.searchPage = EquipmentItemApi.getEquipmentAccountsPage
+ }
+ })
+ }
+ //工装
+ if(field == 'type' && item == 'EQUIPMENT'){
+ EquipmentRepairJobMain.allSchemas.formSchema.forEach((items) => {
+ if (items.field == 'equipmentCode') {
+ basicFormRef.value.formRef.setValues({
+ equipmentCode:''
+ })
+ items.componentProps.searchAllSchemas = ToolAccounts.allSchemas
+ items.componentProps.searchPage = ToolItemApi.getToolAccountsPage
+ }
+ })
+ }
+}
+
/** 导出按钮操作 */
const exportLoading = ref(false) // 导出的加载中
const handleExport = async () => {
diff --git a/src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts b/src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts
index c42362e3a..c21187fa8 100644
--- a/src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts
+++ b/src/views/eam/equipmentRepairRecordMain/equipmentRepairRecordMain.data.ts
@@ -42,7 +42,7 @@ export const EquipmentRepairRecordMain = useCrudSchemas(reactive([
sort: 'custom',
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
- isSearch: false
+ isSearch: false,
},
{
label: '维修描述',
diff --git a/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts b/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts
index c20a61e45..3099abca8 100644
--- a/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts
+++ b/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts
@@ -98,6 +98,19 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive
+
+
+
@@ -54,6 +57,16 @@
+
+
@@ -61,6 +74,7 @@
+