Browse Source

2024-09-02

最晚执行日期
java8
fengyuan_yang 1 year ago
parent
commit
b17598b789
  1. 18
      src/views/modules/eam/eamWorkOrderForMaintenance.vue
  2. 25
      src/views/modules/eam/eamWorkPlanForCheck.vue
  3. 63
      src/views/modules/eam/eamWorkPlanForMaintenance.vue

18
src/views/modules/eam/eamWorkOrderForMaintenance.vue

@ -737,6 +737,24 @@
fixed: '', fixed: '',
columnWidth: 130, columnWidth: 130,
}, },
{
userId: this.$store.state.user.name,
functionId: 101003004,
serialNumber: '101003004Table1LastExecutionDate',
tableId: "101003004Table1",
tableName: "维保工单表",
columnProp: 'lastExecutionDate',
headerAlign: "center",
align: "center",
columnLabel: '最晚执行日期',
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130,
},
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 101003004, functionId: 101003004,

25
src/views/modules/eam/eamWorkPlanForCheck.vue

@ -2618,6 +2618,12 @@
// //
createOrder (row) { createOrder (row) {
if (row.planStartDate < this.dayjs().format("YYYY-MM-DD")) {
this.$alert('计划开始日期小于今天!请修改开始日期', '错误', {
confirmButtonText: '确定'
})
return false
}
let tempData = { let tempData = {
site: row.site, site: row.site,
buNo: row.buNo, buNo: row.buNo,
@ -2629,18 +2635,6 @@
getPlanDetailList(row).then(({data}) => { getPlanDetailList(row).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
tempData.objectList = data.rows tempData.objectList = data.rows
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
if (row.planStartDate < this.dayjs().format("YYYY-MM-DD")) {
this.$alert('计划开始日期小于今天!请修改开始日期', '错误', {
confirmButtonText: '确定'
})
return false
}
this.$confirm(`是否下达点检工单?`, '提示', { this.$confirm(`是否下达点检工单?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -2663,7 +2657,12 @@
} }
this.dataListLoading = false this.dataListLoading = false
}) })
}).catch(() => {
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}) })
}, },

63
src/views/modules/eam/eamWorkPlanForMaintenance.vue

@ -2325,25 +2325,6 @@
} }
this.saveLoading = true this.saveLoading = true
this.modalData.objectList = this.dataListSelections this.modalData.objectList = this.dataListSelections
// let obj = document.getElementsByName('addWorkOrderRule')
// let s = ''
// for (let i = 0; i < obj.length; i++) {
// if (obj[i].checked) {
// s += obj[i].value + ','
// }
// }
// s = s.substring(0,s.length-1)
// this.modalData.workOrderRule = s
// //
// let obj2 = document.getElementsByName('addAutoRenewalRule')
// let s2 = ''
// for (let i = 0; i < obj2.length; i++) {
// if (obj2[i].checked) {
// s2 += obj2[i].value + ','
// }
// }
// s2 = s2.substring(0, s2.length - 1)
// this.modalData.autoRenewal = s2
eamWorkPlanSave(this.modalData).then(({data}) => { eamWorkPlanSave(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
@ -2364,25 +2345,6 @@
} else { } else {
this.updateLoading = true this.updateLoading = true
this.modalData.objectList = this.updateObjectList this.modalData.objectList = this.updateObjectList
// let obj = document.getElementsByName('updateWorkOrderRule')
// let s = ''
// for (let i = 0; i < obj.length; i++) {
// if (obj[i].checked) {
// s += obj[i].value + ','
// }
// }
// s = s.substring(0,s.length-1)
// this.modalData.workOrderRule = s
// //
// let obj2 = document.getElementsByName('updateAutoRenewalRule')
// let s2 = ''
// for (let i = 0; i < obj2.length; i++) {
// if (obj2[i].checked) {
// s2 += obj2[i].value + ','
// }
// }
// s2 = s2.substring(0, s2.length - 1)
// this.modalData.autoRenewal = s2
eamWorkPlanEdit(this.modalData).then(({data}) => { eamWorkPlanEdit(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
@ -2608,6 +2570,12 @@
// //
createOrder (row) { createOrder (row) {
if (row.planStartDate < this.dayjs().format("YYYY-MM-DD")) {
this.$alert('计划开始日期小于今天!请修改开始日期', '错误', {
confirmButtonText: '确定'
})
return false
}
let tempData = { let tempData = {
site: row.site, site: row.site,
buNo: row.buNo, buNo: row.buNo,
@ -2619,18 +2587,6 @@
getPlanDetailList(row).then(({data}) => { getPlanDetailList(row).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
tempData.objectList = data.rows tempData.objectList = data.rows
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
if (row.planStartDate < this.dayjs().format("YYYY-MM-DD")) {
this.$alert('计划开始日期小于今天!请修改开始日期', '错误', {
confirmButtonText: '确定'
})
return false
}
row.userId = this.$store.state.user.name row.userId = this.$store.state.user.name
this.$confirm(`是否下达维保工单?`, '提示', { this.$confirm(`是否下达维保工单?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -2654,7 +2610,12 @@
} }
this.dataListLoading = false this.dataListLoading = false
}) })
}).catch(() => {
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}) })
}, },

Loading…
Cancel
Save