diff --git a/src/api/eam/basic/inspection/index.ts b/src/api/eam/basic/inspection/index.ts
index a422e70..5a0ffd0 100644
--- a/src/api/eam/basic/inspection/index.ts
+++ b/src/api/eam/basic/inspection/index.ts
@@ -69,7 +69,6 @@ export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
// 修改模具项记录表(设备 模具 保养 维修 巡检点检)
export const updateMoldItems = async (data: DeviceMoldItemsVO) => {
- debugger
data.type="MOLD"
data.status="INSPECTION"
return await request.put({ url: `/eam/device-mold-items/update`, data })
@@ -85,4 +84,13 @@ export const exportDeviceMoldItems = async (params) => {
return await request.download({ url: `/eam/device-mold-items/export-excel`, params })
}
+// 查询模具项记录表(设备 模具 保养 维修 巡检点检)列表
+export const getListByNumber = async (number: string) => {
+ return await request.get({ url: `/eam/device-mold-items/getListByNumber?number=` + number })
+}
+
+// 查询模具项记录表(设备 模具 保养 维修 巡检点检)列表
+export const getAllByNumber = async (number: string) => {
+ return await request.get({ url: `/eam/device-mold-items/getAllByNumber?number=` + number })
+}
diff --git a/src/api/eam/basic/repairRelation/index.ts b/src/api/eam/basic/repairRelation/index.ts
new file mode 100644
index 0000000..9c307db
--- /dev/null
+++ b/src/api/eam/basic/repairRelation/index.ts
@@ -0,0 +1,60 @@
+import request from '@/config/axios'
+
+export interface RepairRelationVO {
+ id: number
+ repairNumber: number
+ spotInspectionId: number
+ siteId: string
+ available: string
+ concurrencyStamp: number
+}
+
+// 查询点检项和报修工单关系列表
+export const getRepairRelationPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/inspection/repair-relation/senior', data })
+ } else {
+ return await request.get({ url: `/inspection/repair-relation/page`, params })
+ }
+}
+
+// 查询点检项和报修工单关系详情
+export const getRepairRelation = async (id: number) => {
+ return await request.get({ url: `/inspection/repair-relation/get?id=` + id })
+}
+
+// 新增点检项和报修工单关系
+export const createRepairRelation = async (data: RepairRelationVO) => {
+ return await request.post({ url: `/inspection/repair-relation/create`, data })
+}
+
+// 修改点检项和报修工单关系
+export const updateRepairRelation = async (data: RepairRelationVO) => {
+ return await request.put({ url: `/inspection/repair-relation/update`, data })
+}
+
+// 删除点检项和报修工单关系
+export const deleteRepairRelation = async (id: number) => {
+ return await request.delete({ url: `/inspection/repair-relation/delete?id=` + id })
+}
+// 删除点检项和报修工单关系
+export const deleteBatchByIds = async (ids: number[]) => {
+ return await request.delete({ url: `/inspection/repair-relation/deleteBatchByIds?ids=` + ids })
+}
+
+// 导出点检项和报修工单关系 Excel
+export const exportRepairRelation = async (params) => {
+ return await request.download({ url: `/inspection/repair-relation/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/inspection/repair-relation/get-import-template' })
+}
+
+// 查询点检项和报修工单关系详情
+export const getRepairRelationNoPage = async (params) => {
+ return await request.get({ url: `/inspection/repair-relation/noPage`,params })
+}
\ No newline at end of file
diff --git a/src/api/eam/device/deviceAccounts/index.ts b/src/api/eam/device/deviceAccounts/index.ts
index 7476910..5ecc4ac 100644
--- a/src/api/eam/device/deviceAccounts/index.ts
+++ b/src/api/eam/device/deviceAccounts/index.ts
@@ -61,8 +61,8 @@ export const importTemplate = () => {
// 查询设备台账列表
-export const getDeviceAccountsNoPage = async (params) => {
- return await request.get({ url: `/eam/device-accounts/selectData`, params })
+export const getDeviceAccountsNoPage = async (data: DeviceAccountsVO) => {
+ return await request.post({ url: `/eam/device-accounts/dataScopeNoPage`, data })
}
diff --git a/src/api/eam/device/deviceMaintenanceMain/index.ts b/src/api/eam/device/deviceMaintenanceMain/index.ts
index 8547c06..2b2d968 100644
--- a/src/api/eam/device/deviceMaintenanceMain/index.ts
+++ b/src/api/eam/device/deviceMaintenanceMain/index.ts
@@ -27,6 +27,11 @@ export const getDeviceMaintenanceMainPage = async (params) => {
}
}
+// 查询设备维修工单主列表
+export const getDeviceMaintenanceMainPageNew = async (params) => {
+ return await request.get({ url: `/eam/device-maintenance-job-main/page`, params })
+}
+
// 查询维修工单主详情
export const getDeviceMaintenanceMain = async (id: number) => {
return await request.get({ url: `/eam/device-maintenance-job-main/get?id=` + id })
diff --git a/src/api/eam/device/problemSharingPlatform/index.ts b/src/api/eam/device/problemSharingPlatform/index.ts
new file mode 100644
index 0000000..11eda3e
--- /dev/null
+++ b/src/api/eam/device/problemSharingPlatform/index.ts
@@ -0,0 +1,54 @@
+import request from '@/config/axios'
+
+export interface ProblemSharingPlatformVO {
+ id: number
+ number: string
+ questionName: string
+ questionDescription: string
+ questionType: string
+ siteId: string
+ available: string
+ concurrencyStamp: number
+ deptId: number
+}
+
+// 查询问题分享平台列表
+export const getProblemSharingPlatformPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/question/sharing-platform/senior', data })
+ } else {
+ return await request.get({ url: `/question/sharing-platform/page`, params })
+ }
+}
+
+// 查询问题分享平台详情
+export const getProblemSharingPlatform = async (id: number) => {
+ return await request.get({ url: `/question/sharing-platform/get?id=` + id })
+}
+
+// 新增问题分享平台
+export const createProblemSharingPlatform = async (data: ProblemSharingPlatformVO) => {
+ return await request.post({ url: `/question/sharing-platform/create`, data })
+}
+
+// 修改问题分享平台
+export const updateProblemSharingPlatform = async (data: ProblemSharingPlatformVO) => {
+ return await request.put({ url: `/question/sharing-platform/update`, data })
+}
+
+// 删除问题分享平台
+export const deleteProblemSharingPlatform = async (id: number) => {
+ return await request.delete({ url: `/question/sharing-platform/delete?id=` + id })
+}
+
+// 导出问题分享平台 Excel
+export const exportProblemSharingPlatform = async (params) => {
+ return await request.download({ url: `/question/sharing-platform/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/question/sharing-platform/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/api/eam/mold/moldAccounts/index.ts b/src/api/eam/mold/moldAccounts/index.ts
index c0e8e00..e4f8385 100644
--- a/src/api/eam/mold/moldAccounts/index.ts
+++ b/src/api/eam/mold/moldAccounts/index.ts
@@ -61,8 +61,8 @@ export const importTemplate = () => {
// 查询模具台账列表
-export const getMoldAccountsNoPage = async (params) => {
- return await request.get({ url: `/eam/mold-accounts/selectData`, params })
+export const getMoldAccountsNoPage = async (data: MoldAccountsVO) => {
+ return await request.post({ url: `/eam/mold-accounts/dataScopeNoPage`, data })
}
diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue
index d5f4c20..5034772 100644
--- a/src/components/Form/src/Form.vue
+++ b/src/components/Form/src/Form.vue
@@ -232,7 +232,6 @@ export default defineComponent({
const formItemSlotsSearchList: Recordable = setFormItemSlots(slots, item.field)
if (item?.componentProps?.isSearchList) {
if(item?.componentProps?.multiple){
-
formItemSlotsSearchList[item.field] = () => {
return (
<>
diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue
index 1556cf9..7d38aa3 100644
--- a/src/components/TableForm/src/TableForm.vue
+++ b/src/components/TableForm/src/TableForm.vue
@@ -19,7 +19,7 @@
v-if="isShowReduceButton"
v-slot="{ row, $index }"
>
-
+
([
{
label: '编号',
@@ -119,6 +130,20 @@ export const DeviceMoldItems = useCrudSchemas(reactive([
isSearch: true,
},
+ {
+ label: '记录是否必填',
+ field: 'numberNeedSwitch',
+ sort: 'custom',
+ isSearch: false,
+ formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => {
+ return trueOrFalse.find((account) => account.value == cellValue)?.label
+ },
+ form: {
+ component: 'Switch',
+ value: false,
+ }
+ },
+
// {
// label: '是否可用',
// field: 'available',
diff --git a/src/views/eam/basic/moldInspection/moldInspection.data.ts b/src/views/eam/basic/moldInspection/moldInspection.data.ts
index a57a9fe..22b367c 100644
--- a/src/views/eam/basic/moldInspection/moldInspection.data.ts
+++ b/src/views/eam/basic/moldInspection/moldInspection.data.ts
@@ -11,6 +11,17 @@ export const DeviceMoldItemsRules = reactive({
concurrencyStamp: [required],
})
+const trueOrFalse = [
+ {
+ label: '是',
+ value: true
+ },
+ {
+ label: '否',
+ value: false
+ }
+]
+
export const DeviceMOLD = useCrudSchemas(reactive([
{
label: '编号',
@@ -119,6 +130,20 @@ export const DeviceMoldItems = useCrudSchemas(reactive([
isSearch: true,
},
+ {
+ label: '记录是否必填',
+ field: 'numberNeedSwitch',
+ sort: 'custom',
+ isSearch: false,
+ formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => {
+ return trueOrFalse.find((account) => account.value == cellValue)?.label
+ },
+ form: {
+ component: 'Switch',
+ value: false,
+ }
+ },
+
// {
// label: '是否可用',
// field: 'available',
diff --git a/src/views/eam/device/deviceRepair/deviceRepair.data.ts b/src/views/eam/device/deviceRepair/deviceRepair.data.ts
index 385598c..5cc6410 100644
--- a/src/views/eam/device/deviceRepair/deviceRepair.data.ts
+++ b/src/views/eam/device/deviceRepair/deviceRepair.data.ts
@@ -151,6 +151,18 @@ export const DeviceRepair = useCrudSchemas(reactive([
},
}
},
+ {
+ label: '工单来源',
+ field: 'orderSourceType',
+ sort: 'custom',
+ isSearch: false,
+ isForm: false,
+ dictType: DICT_TYPE.ORDER_SOURCE_TYPE,
+ dictClass: 'string',
+ table: {
+ width: '150',
+ },
+ },
{
label: '报修人电话',
field: 'declarerPhone',
diff --git a/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts b/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts
index efc735d..6cce951 100644
--- a/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts
+++ b/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts
@@ -187,13 +187,6 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive([
width: '150',
},
isSearch: false,
- api: () => repairList,
// formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
// return repairList.find((account) => account.number == cellValue)?.name
// },
@@ -69,22 +71,43 @@ export const DeviceInspectionMain = useCrudSchemas(reactive([
api: () => repairList,
componentProps: {
optionsAlias: {
- labelField: 'number',
+ labelField: 'describes',
valueField: 'number'
},
filterable: true,
}
},
+ // form: {
+ // component: 'Select',
+ // api: () => repairList,
+ // componentProps: {
+ // optionsAlias: {
+ // labelField: 'describes',
+ // valueField: 'number'
+ // },
+ // filterable: true,
+ // },
+ // }
form: {
- component: 'Select',
- api: () => repairList,
componentProps: {
- optionsAlias: {
- labelField: 'number',
- valueField: 'number'
- },
- filterable: true,
- },
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择备件', // 输入框占位文本
+ searchField: 'number', // 查询弹窗赋值字段
+ searchTitle: '备件', // 查询弹窗标题
+ searchAllSchemas: DeviceMaintenanceMain.allSchemas, // 查询弹窗所需类
+ searchPage: DeviceMaintenanceMainApi.getDeviceMaintenanceMainPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'type',
+ value: 'DEVICE',
+ message: '请选择设备模具编号!',
+ isMainValue: false
+ },{
+ key: 'result',
+ value: 'TEMPORARILY',
+ message: '请选择设备模具编号!',
+ isMainValue: false
+ }]
+ }
}
},
{
@@ -285,6 +308,24 @@ export const DeviceInspectionMain = useCrudSchemas(reactive([
filterable: true,
},
},
+ {
+ label: '工单来源类型',
+ field: 'sourceType',
+ sort: 'custom',
+ table: {
+ width: '150',
+ },
+ dictType: DICT_TYPE.ORDER_SOURCE_TYPE,
+ dictClass: 'string',
+ form: {
+ value: '0',
+ component: 'Select',
+ componentProps: {
+ disabled: true,
+ placeholder: "请选择工单来源类型"
+ },
+ },
+ },
// {
// label: '创建时间',
// field: 'createTime',
@@ -654,3 +695,117 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive([
isTableForm: false,
}
]))
+
+
+// 表单校验
+export const DeviceInspectionAddDetailRules = reactive({
+ chargePeoples: [
+ required,
+ ],
+ peoples: [
+ required,
+ { validator: validateNum, message: '请输入正整数', trigger: 'blur' },
+ { validator: validateNum100, message: '预估人数不得超出100', trigger: 'blur' },
+ ],
+ estimatedMinutes: [
+ required,
+ { validator: validateNum, message: '请输入正整数', trigger: 'blur' },
+ ],
+ number: [required],
+ status: [required],
+ actualMinutes: [
+ required,
+ { validator: validateNum, message: '请输入正整数', trigger: 'blur' },
+ ],
+ maintenance: [required],
+ uncompleted: [
+ { required: true, message: '该项为必填项', trigger: 'blur' }
+ ],
+})
+
+
+export const DeviceInspectionAddDetail = useCrudSchemas(reactive([
+ {
+ label: '检修内容',
+ field: 'name',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ component: 'Input',
+ componentProps: {
+ type:'textarea'
+ }
+ },
+ },
+ {
+ label: '责任人',
+ field: 'chargePeoples',
+ sort: 'custom',
+ table: {
+ width: '150',
+ },
+ tableForm: {
+ type: 'Select',
+ initOptions: dutyUserList,
+ multiple: true,
+ collapseTags: true,
+ collapseTagsTooltip: true,
+ optionsAlias: {
+ labelField: 'name',
+ valueField: 'id'
+ },
+ filterable: true,
+ },
+ formatter: (_: Recordable, __: TableColumn, cellValue) => {
+ const cellValueList = cellValue?.split(',');
+ return userListAll
+ .filter(item => cellValueList.includes(item.id.toString()))
+ .map(item => item.nickname)
+ .join(',');
+ },
+ form: {
+ component: 'Select',
+ api: () => dutyUserList,
+ componentProps: {
+ disabled: false,
+ optionsAlias: {
+ labelField: 'name',
+ valueField: 'id'
+ },
+ filterable: true,
+ placeholder: "请选择责任人",
+ multiple: true,
+ },
+ }
+ },
+ {
+ label: '预计分钟',
+ field: 'estimatedMinutes',
+ sort: 'custom',
+ table: {
+ width: '150',
+ },
+ isSearch: false,
+ isTable: true,
+ form: {
+ component: 'Input',
+ },
+ },
+ {
+ label: '预估人数',
+ field: 'peoples',
+ sort: 'custom',
+ table: {
+ width: '150',
+ },
+ isSearch: false,
+ form: {
+ component: 'InputNumber',
+ },
+ isTable: true,
+ tableForm: {
+ type: 'InputNumber',
+ },
+ },
+
+]))
diff --git a/src/views/eam/device/deviceinspectionjob/index.vue b/src/views/eam/device/deviceinspectionjob/index.vue
index 5d6e9cc..b111939 100644
--- a/src/views/eam/device/deviceinspectionjob/index.vue
+++ b/src/views/eam/device/deviceinspectionjob/index.vue
@@ -44,13 +44,12 @@
@searchTableSuccess="searchTableSuccess"
:isBusiness="true"
@onChange="onChange"
- :tableAllSchemas="DeviceInspectionDetail.allSchemas"
- :tableFormRules="DeviceInspectionDetailRules"
+ :tableAllSchemas="DeviceInspectionAddDetail.allSchemas"
+ :tableFormRules="DeviceInspectionAddDetailRules"
:tableData="tableData"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@submitForm="submitForm"
- :isSearchTableItem="true"
@formSelectChange="formSelectChange"
/>
@@ -113,7 +112,7 @@
+
+
diff --git a/src/views/eam/device/problemSharingPlatform/index.vue b/src/views/eam/device/problemSharingPlatform/index.vue
new file mode 100644
index 0000000..42955c2
--- /dev/null
+++ b/src/views/eam/device/problemSharingPlatform/index.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/eam/device/problemSharingPlatform/problemSharingPlatform.data.ts b/src/views/eam/device/problemSharingPlatform/problemSharingPlatform.data.ts
new file mode 100644
index 0000000..2ed823c
--- /dev/null
+++ b/src/views/eam/device/problemSharingPlatform/problemSharingPlatform.data.ts
@@ -0,0 +1,104 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+// 表单校验
+export const ProblemSharingPlatformRules = reactive({
+ number: [required],
+ questionName: [required],
+ questionType: [required],
+ questionDescription: [required],
+ concurrencyStamp: [required],
+ deptId: [required]
+})
+
+export const ProblemSharingPlatform = useCrudSchemas(reactive([
+ {
+ label: '编号',
+ field: 'number',
+ sort: 'custom',
+ isSearch: true,
+ fixed: 'left',
+ isForm: false,
+ },
+ {
+ label: '问题名称',
+ field: 'questionName',
+ sort: 'custom',
+ isSearch: true
+ },
+ {
+ label: '问题类型',
+ field: 'questionType',
+ sort: 'custom',
+ isSearch: true,
+ dictClass: 'string',
+ dictType: 'problem_type',
+ form: {
+ component: 'Select',
+ }
+ },
+ {
+ label: '问题描述',
+ field: 'questionDescription',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ component: 'Input',
+ colProps: {
+ span: 24,
+ },
+ componentProps: {
+ type: 'textarea',
+ }
+ }
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isSearch: true,
+ search: {
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'daterange',
+ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
+ }
+ },
+ isForm: false
+ },
+ {
+ label: '图片',
+ field: 'uploadImgs',
+ isForm: true,
+ isTable: false,
+ form: {
+ component: 'UploadImgs',
+ componentProps: {
+ limit:3,
+ }
+ }
+ },
+ {
+ label: '文档',
+ field: 'uploadFiles',
+ isForm: true,
+ isTable: false,
+ form: {
+ component: 'UploadFile',
+ componentProps: {
+ limit:3,
+ }
+ }
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))
diff --git a/src/views/eam/mold/moldRepair/moldRepair.data.ts b/src/views/eam/mold/moldRepair/moldRepair.data.ts
index d7a8db0..a8aa6db 100644
--- a/src/views/eam/mold/moldRepair/moldRepair.data.ts
+++ b/src/views/eam/mold/moldRepair/moldRepair.data.ts
@@ -152,7 +152,18 @@ export const MoldRepair = useCrudSchemas(reactive([
},
}
},
-
+ {
+ label: '工单来源',
+ field: 'orderSourceType',
+ sort: 'custom',
+ dictType: DICT_TYPE.ORDER_SOURCE_TYPE,
+ dictClass: 'string',
+ isSearch: false,
+ isForm: false,
+ table: {
+ width: '150',
+ },
+ },
{
label: '报修人电话',
field: 'declarerPhone',
diff --git a/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue b/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue
index b485ad3..bc74601 100644
--- a/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue
+++ b/src/views/eam/mold/moldSpotInspectionRecordMain/index.vue
@@ -137,6 +137,7 @@ import * as DeviceSpotInspectionRecordDetailApi from '@/api/eam/device/deviceSpo
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { useUserStore } from '@/store/modules/user'
import * as UserApi from '@/api/system/user'
+import * as DeviceMoldItemsApi from '@/api/eam/basic/moldInspection'
defineOptions({ name: 'MoldSpotInspectionRecordMain' })
const message = useMessage() // 消息弹窗
diff --git a/src/views/eam/mold/moldSpotInspectionRecordMain/moldSpotInspectionRecordMain.data.ts b/src/views/eam/mold/moldSpotInspectionRecordMain/moldSpotInspectionRecordMain.data.ts
index ad4d575..8ae87fa 100644
--- a/src/views/eam/mold/moldSpotInspectionRecordMain/moldSpotInspectionRecordMain.data.ts
+++ b/src/views/eam/mold/moldSpotInspectionRecordMain/moldSpotInspectionRecordMain.data.ts
@@ -259,6 +259,15 @@ export const DeviceSpotInspectionRecordDetail = useCrudSchemas(reactive
@@ -113,7 +113,7 @@
+
+
+