diff --git a/src/views/eam/basic/deviceMaintenanceConfig/index.vue b/src/views/eam/basic/deviceMaintenanceConfig/index.vue
new file mode 100644
index 0000000..97df977
--- /dev/null
+++ b/src/views/eam/basic/deviceMaintenanceConfig/index.vue
@@ -0,0 +1,428 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.deviceNumber }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/eam/basic/deviceMaintenanceConfig/moldMaintenanceConfig.data.ts b/src/views/eam/basic/deviceMaintenanceConfig/moldMaintenanceConfig.data.ts
new file mode 100644
index 0000000..240ab00
--- /dev/null
+++ b/src/views/eam/basic/deviceMaintenanceConfig/moldMaintenanceConfig.data.ts
@@ -0,0 +1,112 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance'
+
+// 表单校验
+export const MoldMaintenanceConfigRules = reactive({
+ deviceNumber: [required],
+ executionCycle: [required],
+})
+
+export const DeviceMOLD = useCrudSchemas(reactive([
+ {
+ label: '编号',
+ field: 'number',
+ sort: 'custom',
+ isForm: false,
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+
+ },
+ {
+ label: '名称',
+ field: 'name',
+ sort: 'custom',
+ },
+ {
+ label: '规格型号',
+ field: 'specification',
+ sort: 'custom',
+ },
+
+]))
+
+export const MoldMaintenanceConfig = useCrudSchemas(reactive([
+ {
+ label: '设备编号',
+ field: 'deviceNumber',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择设备', // 输入框占位文本
+ searchField: 'number', // 查询弹窗赋值字段
+ searchTitle: '设备信息', // 查询弹窗标题
+ searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
+ searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
+ searchCondition: [
+ {
+ key: 'available',
+ value: "TRUE",
+ isMainValue: false
+ }, {
+ key: 'type',
+ value: "DEVICE",
+ isMainValue: false
+ }
+ ]
+ }
+ }
+ },
+ {
+ label: '设备名称',
+ field: 'deviceName',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ },
+ },
+ {
+ label: '保养周期',
+ field: 'executionCycle',
+ dictType: DICT_TYPE.EXECUTION_CYCLE,
+ dictClass: 'string',
+ sort: 'custom',
+ isSearch: false,
+ form: {
+ component: 'Select'
+ },
+ },
+ {
+ label: '类型',
+ field: 'type',
+ isTable: false,
+ isForm: false,
+ isSearch: false,
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isForm: false,
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))
+
+
diff --git a/src/views/eam/basic/moldMaintenance/index.vue b/src/views/eam/basic/moldMaintenance/index.vue
index 3f45d3a..c27c230 100644
--- a/src/views/eam/basic/moldMaintenance/index.vue
+++ b/src/views/eam/basic/moldMaintenance/index.vue
@@ -235,6 +235,8 @@ const formsSuccess = async (formType,data) => {
if (formType === 'create') {
await MoldMaintenanceApi.createDeviceMoldItems(data)
message.success(t('common.createSuccess'))
+ basicFormRef.value.dialogVisible = false
+ getList()
} else {
openDataNew.value = data
if(judgeSame()){
diff --git a/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts b/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts
index 2edb531..c4582e3 100644
--- a/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts
+++ b/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts
@@ -68,41 +68,41 @@ export const MoldMaintenance = useCrudSchemas(reactive([
sort: 'custom',
isSearch: false,
},
- {
- label: '模具编号',
- field: 'deviceNumber',
- sort: 'custom',
- isSearch: true,
- form: {
- // labelMessage: '信息提示说明!!!',
- componentProps: {
- isSearchList: true, // 开启查询弹窗
- searchListPlaceholder: '请选择模具编号', // 输入框占位文本
- searchField: 'number', // 查询弹窗赋值字段
- searchTitle: '模具信息', // 查询弹窗标题
- searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
- searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
- searchCondition: [
- {
- key: 'available',
- value: "TRUE",
- isMainValue: false
- }, {
- key: 'type',
- value: "MOLD",
- isMainValue: false
- }
- ]
- }
- }
- },
- {
- label: '模具名称',
- field: 'deviceName',
- sort: 'custom',
- isSearch: true,
- isForm: false,
- },
+ // {
+ // label: '模具编号',
+ // field: 'deviceNumber',
+ // sort: 'custom',
+ // isSearch: true,
+ // form: {
+ // // labelMessage: '信息提示说明!!!',
+ // componentProps: {
+ // isSearchList: true, // 开启查询弹窗
+ // searchListPlaceholder: '请选择模具编号', // 输入框占位文本
+ // searchField: 'number', // 查询弹窗赋值字段
+ // searchTitle: '模具信息', // 查询弹窗标题
+ // searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
+ // searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
+ // searchCondition: [
+ // {
+ // key: 'available',
+ // value: "TRUE",
+ // isMainValue: false
+ // }, {
+ // key: 'type',
+ // value: "MOLD",
+ // isMainValue: false
+ // }
+ // ]
+ // }
+ // }
+ // },
+ // {
+ // label: '模具名称',
+ // field: 'deviceName',
+ // sort: 'custom',
+ // isSearch: true,
+ // isForm: false,
+ // },
{
label: '项类型',
field: 'status',
@@ -118,17 +118,17 @@ export const MoldMaintenance = useCrudSchemas(reactive([
}
},
},
- {
- label: '保养周期',
- field: 'executionCycle',
- dictType: DICT_TYPE.MOLD_EXECUTION_CYCLE,
- dictClass: 'string',
- sort: 'custom',
- isSearch: false,
- form: {
- component: 'Select'
- },
- },
+ // {
+ // label: '保养周期',
+ // field: 'executionCycle',
+ // dictType: DICT_TYPE.MOLD_EXECUTION_CYCLE,
+ // dictClass: 'string',
+ // sort: 'custom',
+ // isSearch: false,
+ // form: {
+ // component: 'Select'
+ // },
+ // },
// {
// label: '涂装保养周期-月份',
// field: 'executionCycleMonth',
diff --git a/src/views/eam/basic/moldMaintenanceConfig/index.vue b/src/views/eam/basic/moldMaintenanceConfig/index.vue
index 869ab7b..fd9fe89 100644
--- a/src/views/eam/basic/moldMaintenanceConfig/index.vue
+++ b/src/views/eam/basic/moldMaintenanceConfig/index.vue
@@ -101,7 +101,7 @@ import * as DeviceMaintenanceApi from '@/api/eam/basic/deviceMaintenance'
// import { DeviceAccounts } from '@/views/eam/device/deviceAccounts/deviceAccounts.data'
// import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts'
-defineOptions({ name: 'DeviceMoldMaintenanceConfig' })
+defineOptions({ name: 'MoldMaintenanceConfig' })
/**
* tableForm方法
@@ -166,7 +166,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// 主子数据 提交
const submitForm = async (formType, submitData) => {
let data = {...submitData}
- data.type = 'DEVICE'
+ data.type = 'MOLD'
formRef.value.formLoading = true
try {
if (formType === 'create') {
@@ -417,6 +417,10 @@ const deteleNewFuction =async (row)=>{
/** 初始化 **/
onMounted(async () => {
+ tableObject.params = {
+ available: 'TRUE',
+ type: 'MOLD'
+ }
getList()
importTemplateData.templateUrl = await MoldMaintenanceConfigApi.importTemplate()
})
diff --git a/src/views/eam/basic/moldMaintenanceConfig/moldMaintenanceConfig.data.ts b/src/views/eam/basic/moldMaintenanceConfig/moldMaintenanceConfig.data.ts
index 1021c6e..a8d170c 100644
--- a/src/views/eam/basic/moldMaintenanceConfig/moldMaintenanceConfig.data.ts
+++ b/src/views/eam/basic/moldMaintenanceConfig/moldMaintenanceConfig.data.ts
@@ -35,17 +35,17 @@ export const DeviceMOLD = useCrudSchemas(reactive([
export const MoldMaintenanceConfig = useCrudSchemas(reactive([
{
- label: '设备编号',
+ label: '模具编号',
field: 'deviceNumber',
sort: 'custom',
- isSearch: false,
+ isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
- searchListPlaceholder: '请选择单号', // 输入框占位文本
+ searchListPlaceholder: '请选择模具', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
- searchTitle: '单号信息', // 查询弹窗标题
+ searchTitle: '模具信息', // 查询弹窗标题
searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
searchCondition: [
@@ -55,7 +55,7 @@ export const MoldMaintenanceConfig = useCrudSchemas(reactive([
isMainValue: false
}, {
key: 'type',
- value: "DEVICE",
+ value: "MOLD",
isMainValue: false
}
]
@@ -63,7 +63,7 @@ export const MoldMaintenanceConfig = useCrudSchemas(reactive([
}
},
{
- label: '设备名称',
+ label: '模具名称',
field: 'deviceName',
sort: 'custom',
isSearch: true,