diff --git a/src/views/eam/basic/basciYearEquipment/index.vue b/src/views/eam/basic/basciYearEquipment/index.vue
index 1e9aa76..3d5009b 100644
--- a/src/views/eam/basic/basciYearEquipment/index.vue
+++ b/src/views/eam/basic/basciYearEquipment/index.vue
@@ -38,10 +38,10 @@
- {{ row.goal+"%" }}
+ {{ row.type=='0'?row.goal+"%":row.goal }}
- {{ row.goal==null?"":row.goal+"%" }}
+ {{ row.actual==null||row.actual==""||row.type!='0'?row.actual:row.actual+"%" }}
@@ -170,37 +170,41 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
- if (type == 'update') {
- console.log("123",BasciYearEquipment.allSchemas.formSchema);
- BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'factoryType').componentProps.disabled = true//编辑置灰
- // BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'factory_type').componentProps.disabled = true//编辑置灰
- //BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'year_index').componentProps.disabled = true//编辑置灰
- }
+ // if (type == 'update') {
+ // BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'factoryType').componentProps.disabled = true//编辑置灰
+ // // BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'factory_type').componentProps.disabled = true//编辑置灰
+ // //BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'year_index').componentProps.disabled = true//编辑置灰
+ // }else{
+ // BasciYearEquipment.allSchemas.formSchema.find(item => item.field == 'factoryType').componentProps.disabled = false//编辑置灰
+ // }
basicFormRef.value.open(type, row)
}
// form表单提交
const formsSuccess = async (formType, data) => {
- var isHave = BasciYearEquipment.allSchemas.formSchema.some(function (item) {
- return item.field === 'activeTime' || item.field === 'expireTime'
- })
- if (isHave) {
- if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
- message.error('失效时间要大于生效时间')
- return
+ try {
+ var isHave = BasciYearEquipment.allSchemas.formSchema.some(function (item) {
+ return item.field === 'activeTime' || item.field === 'expireTime'
+ })
+ if (isHave) {
+ if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
+ message.error('失效时间要大于生效时间')
+ return
+ }
}
- }
- if (data.activeTime == 0) data.activeTime = null
- if (data.expireTime == 0) data.expireTime = null
- if (formType === 'create') {
- await BasciYearEquipmentApi.createBasciYearEquipment(data)
- message.success(t('common.createSuccess'))
- } else {
- await BasciYearEquipmentApi.updateBasciYearEquipment(data)
- message.success(t('common.updateSuccess'))
- }
- basicFormRef.value.dialogVisible = false
- getList()
+ if (data.activeTime == 0) data.activeTime = null
+ if (data.expireTime == 0) data.expireTime = null
+ if (formType === 'create') {
+ await BasciYearEquipmentApi.createBasciYearEquipment(data)
+ message.success(t('common.createSuccess'))
+ } else {
+ await BasciYearEquipmentApi.updateBasciYearEquipment(data)
+ message.success(t('common.updateSuccess'))
+ }
+ basicFormRef.value.dialogVisible = false
+ getList()
+ }catch{
+ basicFormRef.value.dialogVisible = false}
}
/** 详情操作 */
diff --git a/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts b/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts
index 187a53d..3a70469 100644
--- a/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts
+++ b/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts
@@ -255,6 +255,7 @@ export const DeviceSpotInspectionRecordDetail = useCrudSchemas(reactive {
getList();
} finally {
formRef.value.formLoading = false;
+ updateFormValue.value.approveOpinion = "";
}
}
diff --git a/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue b/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue
index 449b876..460cf1f 100644
--- a/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue
+++ b/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue
@@ -77,6 +77,7 @@
:apiPage="DeviceSpotInspectionRecordDetailApi.getDeviceSpotInspectionRecordDetailPage"
:apiDelete="DeviceSpotInspectionRecordDetailApi.deleteDeviceSpotInspectionRecordDetail"
:Echo="Echo"
+ :isShowAddBtn="false"
@searchTableSuccessDetail="searchTableSuccessDetail"
@detailOpenForm="detailOpenForm"
:detailValidate="detailValidate"
@@ -538,6 +539,7 @@ const onSubmit = async (status: string) => {
getList();
} finally {
formRef.value.formLoading = false;
+ updateFormValue.value.approveOpinion = "";
}
}
diff --git a/src/views/eam/mold/moldSpotInspectionRecordMain/moldSpotInspectionRecordMain.data.ts b/src/views/eam/mold/moldSpotInspectionRecordMain/moldSpotInspectionRecordMain.data.ts
index 797d16c..88ad4dc 100644
--- a/src/views/eam/mold/moldSpotInspectionRecordMain/moldSpotInspectionRecordMain.data.ts
+++ b/src/views/eam/mold/moldSpotInspectionRecordMain/moldSpotInspectionRecordMain.data.ts
@@ -2,6 +2,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { selectAllFactoryArea } from '@/api/system/dept'
import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts'
+import * as MOldAccountsApi from '@/api/eam/mold/moldAccounts'
import { useUserStore } from '@/store/modules/user'
import { selecUserByType } from '@/api/system/dept'
import { ItemSearchTable } from '../../basic/item/item.data'
@@ -14,8 +15,8 @@ const factoryList = await selectAllFactoryArea()
const deviceList = await DeviceAccountsApi.getDeviceAccountsNoPage({})
const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 })
const userListAll = await UserApi.getSimpleUserList()
-const deviceListNoPage = await DeviceAccountsApi.getDeviceAccountsAllNoPage({})
-const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'DEVICE')
+const deviceListNoPage = await MOldAccountsApi.getMoldAccountsAllNoPage({})
+const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'MOLD')
const deviceDeviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE)
const isConformList = [{
label:'是',
@@ -211,7 +212,7 @@ export const DeviceSpotInspectionRecordDetailRules = reactive({
export const DeviceSpotInspectionRecordDetail = useCrudSchemas(reactive([
{
- label: '检修工单号',
+ label: '巡检点检工单号',
field: 'number',
sort: 'custom',
isSearch: true,
@@ -254,7 +255,8 @@ export const DeviceSpotInspectionRecordDetail = useCrudSchemas(reactive
- 平均故障恢复时间(MTTR/min)
- - {{ yearTarget.zsHFGoal || '0%' }}
+ - {{ yearTarget.zsHFGoal || '0' }}
- {{ yearTarget.zsHFActual || '0%' }}
{{ yearTarget.zsHFActual || '0' }}
- 平均故障间隔时间(H)
- - {{ yearTarget.zsJGGoal || '0%' }}
+ - {{ yearTarget.zsJGGoal || '0' }}
- {{ yearTarget.zsJGActual || '0%' }}
{{ yearTarget.zsJGActual || '0' }}
@@ -178,7 +178,7 @@
- 平均故障恢复时间(MTTR/min)
- - {{ yearTarget.zpHFGoal || '0%' }}
+ - {{ yearTarget.zpHFGoal || '0' }}
- {{ yearTarget.zpHFActual || '0%' }}
{{ yearTarget.zpHFActual || '0' }}
- 平均故障间隔时间(H)
- - {{ yearTarget.zpJGGoal || '0%' }}
+ - {{ yearTarget.zpJGGoal || '0' }}
- {{ yearTarget.zpJGActual || '0%' }}
{{ yearTarget.zpJGActual || '0' }}
@@ -229,7 +229,7 @@
- 平均故障恢复时间(MTTR/min)
- - {{ yearTarget.tzHFGoal || '0%' }}
+ - {{ yearTarget.tzHFGoal || '0' }}
- {{ yearTarget.tzHFActual || '0%' }}
{{ yearTarget.tzHFActual || '0' }}
- 平均故障间隔时间(H)
- - {{ yearTarget.tzJGGoal || '0%' }}
+ - {{ yearTarget.tzJGGoal || '0' }}
- {{ yearTarget.tzJGActual || '0%' }}
{{ yearTarget.tzJGActual || '0' }}