diff --git a/src/api/device/standingBook.ts b/src/api/device/standingBook.ts index fe3c99e..c91c8ca 100644 --- a/src/api/device/standingBook.ts +++ b/src/api/device/standingBook.ts @@ -9,6 +9,7 @@ data, }) } + // 删除固定资产 export function assetsDeleteApi(data: object) { return request({ diff --git a/src/api/device/standingBook.ts b/src/api/device/standingBook.ts index fe3c99e..c91c8ca 100644 --- a/src/api/device/standingBook.ts +++ b/src/api/device/standingBook.ts @@ -9,6 +9,7 @@ data, }) } + // 删除固定资产 export function assetsDeleteApi(data: object) { return request({ diff --git a/src/api/measure/measureDept.ts b/src/api/measure/measureDept.ts index faecb03..deaeb2d 100644 --- a/src/api/measure/measureDept.ts +++ b/src/api/measure/measureDept.ts @@ -10,6 +10,14 @@ data, }) } +// 固定资产列表(分页) +export function meterEquipmentByDeptId(data: any) { + return request({ + url: `/meter/assets/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} // 详情 export function deptDetailApi(data: object) { return request({ diff --git a/src/api/device/standingBook.ts b/src/api/device/standingBook.ts index fe3c99e..c91c8ca 100644 --- a/src/api/device/standingBook.ts +++ b/src/api/device/standingBook.ts @@ -9,6 +9,7 @@ data, }) } + // 删除固定资产 export function assetsDeleteApi(data: object) { return request({ diff --git a/src/api/measure/measureDept.ts b/src/api/measure/measureDept.ts index faecb03..deaeb2d 100644 --- a/src/api/measure/measureDept.ts +++ b/src/api/measure/measureDept.ts @@ -10,6 +10,14 @@ data, }) } +// 固定资产列表(分页) +export function meterEquipmentByDeptId(data: any) { + return request({ + url: `/meter/assets/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} // 详情 export function deptDetailApi(data: object) { return request({ diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index fe7a556..3f02d6c 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -271,7 +271,7 @@ ElMessage.warning('请先保存') } else { - submitAcceptanceCheck({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { + submitAcceptanceCheck({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, processId: processId.value }).then((res) => { if (res.code === 200) { close() } diff --git a/src/api/device/standingBook.ts b/src/api/device/standingBook.ts index fe3c99e..c91c8ca 100644 --- a/src/api/device/standingBook.ts +++ b/src/api/device/standingBook.ts @@ -9,6 +9,7 @@ data, }) } + // 删除固定资产 export function assetsDeleteApi(data: object) { return request({ diff --git a/src/api/measure/measureDept.ts b/src/api/measure/measureDept.ts index faecb03..deaeb2d 100644 --- a/src/api/measure/measureDept.ts +++ b/src/api/measure/measureDept.ts @@ -10,6 +10,14 @@ data, }) } +// 固定资产列表(分页) +export function meterEquipmentByDeptId(data: any) { + return request({ + url: `/meter/assets/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} // 详情 export function deptDetailApi(data: object) { return request({ diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index fe7a556..3f02d6c 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -271,7 +271,7 @@ ElMessage.warning('请先保存') } else { - submitAcceptanceCheck({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { + submitAcceptanceCheck({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, processId: processId.value }).then((res) => { if (res.code === 200) { close() } diff --git a/src/views/measure/measureDept/components/addDialog.vue b/src/views/measure/measureDept/components/addDialog.vue index 1c03550..3f75ec2 100644 --- a/src/views/measure/measureDept/components/addDialog.vue +++ b/src/views/measure/measureDept/components/addDialog.vue @@ -7,7 +7,7 @@ import { getDictByCode } from '@/api/system/dict' import { getStaffDetail, getStaffList } from '@/api/measure/person' import type { userType } from '@/views/system/user/user-interface' -import { getpDeptApi, listPageApi, standardlistPageApi, updateApi } from '@/api/measure/measureDept' +import { getpDeptApi, listPageApi, meterEquipmentByDeptId, standardlistPageApi, updateApi } from '@/api/measure/measureDept' import type { dictType } from '@/global' const $route = useRoute() const $router = useRouter() @@ -23,7 +23,9 @@ director: '', // 负责人 phone: '', // 联系方式 administrationJob: '', // 行政职务 + administrationJobName: '', // 行政职务名称 technologyJob: '', // 技术职务 + technologyJobName: '', // 技术职务名称 meterMajor: '', // 计量专业 remark: '', // 备注 pDeptId: '', // 父级 @@ -44,8 +46,8 @@ organizeName: [{ required: true, message: '名称必填', trigger: ['blur', 'change'] }], director: [{ required: true, message: '负责人必填', trigger: ['blur', 'change'] }], phone: [{ required: true, message: '联系方式必填', trigger: ['blur', 'change'] }], - administrationJob: [{ required: true, message: '行政职务必填', trigger: ['blur', 'change'] }], - technologyJob: [{ required: true, message: '技术职务必填', trigger: ['blur', 'change'] }], + // administrationJob: [{ required: true, message: '行政职务必填', trigger: ['blur', 'change'] }], + // technologyJob: [{ required: true, message: '技术职务必填', trigger: ['blur', 'change'] }], isLab: [{ required: true, message: '是否为实验室必填', trigger: ['blur', 'change'] }], }) // 表单验证规则 const userList = ref([]) // 用户列表 @@ -94,12 +96,14 @@ }) } // 选择负责人自动填充职务信息 -const directorChange = (val: string) => { - const selectUser = userList.value.filter(item => item.name === val)[0] - getStaffDetail(selectUser).then((res) => { +const directorChange = (id: string) => { + getStaffDetail({ id }).then((res) => { if (res.code === 200) { - ruleForm.value.administrationJob = res.data.administrationJob - ruleForm.value.technologyJob = res.data.technologyJob + ruleForm.value.administrationJob = res.data.administrationJob // 行政职务字典 + ruleForm.value.technologyJob = res.data.technologyJob // 技术职务 + ruleForm.value.technologyJobName = !res.data.technologyJob ? '' : res.data.technologyJobName + ruleForm.value.administrationJobName = !res.data.administrationJob ? '' : res.data.administrationJobName + ruleForm.value.director = res.data.name // 负责人后端要名称 } }) } @@ -120,7 +124,7 @@ const form = { ...ruleForm.value, labCapacity: ruleForm.value.labCapacity.join(',') } updateApi(form).then((res) => { if (res.code == 200) { - formEl?.resetFields() + // formEl?.resetFields() ElMessage.success('保存成功') $router.go(-1) } @@ -129,9 +133,9 @@ } }) } -// 取消 +// 关闭 const resetForm = (formEl: FormInstance | undefined) => { - formEl?.resetFields() + // formEl?.resetFields() $router.go(-1) } // 重置 @@ -238,28 +242,28 @@ data: [], column: [ { - label: '统一编号', - data: '', + label: '设备编号', + data: 'equipmentNo', }, { label: '设备名称', - data: 'name', + data: 'equipmentName', }, { label: '型号', - data: '', + data: 'modelNo', }, { label: '测量范围', - data: '', + data: 'mesureRange', }, { label: '使用部门', - data: '', + data: 'useDeptName', }, { label: '使用人', - data: '', + data: 'usePersonName', }, ], }, @@ -328,28 +332,28 @@ data: [], column: [ { - label: '统一编号', - data: '', + label: '设备编号', + data: 'equipmentNo', }, { label: '设备名称', - data: 'name', + data: 'equipmentName', }, { label: '型号', - data: '', + data: 'modelNo', }, { label: '测量范围', - data: '', + data: 'mesureRange', }, { label: '使用部门', - data: '', + data: 'useDeptName', }, { label: '使用人', - data: '', + data: 'usePersonName', }, ], }, @@ -394,7 +398,7 @@ listPageApi({ organizeNo: '', organizeName: '', - limit: 9999, + limit: 99999999, offset: 1, organizeType: '3', createEndTime: '', // 创建时间 @@ -433,7 +437,7 @@ major: '', verifierCertificateNo: '', certificateStatus: '', - limit: 9999, + limit: 999999, offset: 1, } getStaffList(params).then((response) => { @@ -443,11 +447,31 @@ } // 获取仪器信息 const getInstrumentInfo = () => { - // 接口暂未写好 根据实际情况赋值 - // getDictByCode('pDeptId').then((response) => { - // changeList_ks.value[1].data = response.data - // changeList_gcz.value[1].data = response.data - // }) + const searchQuery = { + equipmentNo: '', // 设备编号 + equipmentName: '', // 名称 + mesureType: '', // 检定方式 + managerState: '', // 管理状态 + useDept: ruleForm.value.deptId, // 使用部门 + assetType: '1', // 资产类型 1测量设备 + equipmentCategory: '', // 设备类别 + isCalibrationTestEquipment: '', // 校准/检定设备 + isMeasureAccount: '', // 测量工装 + isStandardSupportEquipment: '', // 标准配套设备 + isFixedAssets: '', // 固定资产 + validDateStart: '', // 有效开始日期 + validDateEnd: '', // 有效结束日期 + abc: '', + limit: 999999, + offset: 1, + ids: [] as string[], + } // 查询参数 + meterEquipmentByDeptId(searchQuery).then((res: any) => { + if (res.code === 200) { + changeList_ks.value[1].data = res.data.rows // 科室 + changeList_gcz.value[1].data = res.data.rows // 工程组 + } + }) } // 获取标准装置信息 const getDeviceInfo = () => { @@ -489,8 +513,8 @@ getDepartmentList() getuserInfoList() if (title.value.split('-')[1] !== '部门') { - getInstrumentInfo() - getDeviceInfo() + getInstrumentInfo() // 仪器信息 + getDeviceInfo() // 获取标准装置信息 } console.log(row, 'row') // 不同组织来判断展示的列表 @@ -547,7 +571,7 @@ - + @@ -592,13 +616,13 @@ - + - + - + - + diff --git a/src/api/device/standingBook.ts b/src/api/device/standingBook.ts index fe3c99e..c91c8ca 100644 --- a/src/api/device/standingBook.ts +++ b/src/api/device/standingBook.ts @@ -9,6 +9,7 @@ data, }) } + // 删除固定资产 export function assetsDeleteApi(data: object) { return request({ diff --git a/src/api/measure/measureDept.ts b/src/api/measure/measureDept.ts index faecb03..deaeb2d 100644 --- a/src/api/measure/measureDept.ts +++ b/src/api/measure/measureDept.ts @@ -10,6 +10,14 @@ data, }) } +// 固定资产列表(分页) +export function meterEquipmentByDeptId(data: any) { + return request({ + url: `/meter/assets/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} // 详情 export function deptDetailApi(data: object) { return request({ diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index fe7a556..3f02d6c 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -271,7 +271,7 @@ ElMessage.warning('请先保存') } else { - submitAcceptanceCheck({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { + submitAcceptanceCheck({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, processId: processId.value }).then((res) => { if (res.code === 200) { close() } diff --git a/src/views/measure/measureDept/components/addDialog.vue b/src/views/measure/measureDept/components/addDialog.vue index 1c03550..3f75ec2 100644 --- a/src/views/measure/measureDept/components/addDialog.vue +++ b/src/views/measure/measureDept/components/addDialog.vue @@ -7,7 +7,7 @@ import { getDictByCode } from '@/api/system/dict' import { getStaffDetail, getStaffList } from '@/api/measure/person' import type { userType } from '@/views/system/user/user-interface' -import { getpDeptApi, listPageApi, standardlistPageApi, updateApi } from '@/api/measure/measureDept' +import { getpDeptApi, listPageApi, meterEquipmentByDeptId, standardlistPageApi, updateApi } from '@/api/measure/measureDept' import type { dictType } from '@/global' const $route = useRoute() const $router = useRouter() @@ -23,7 +23,9 @@ director: '', // 负责人 phone: '', // 联系方式 administrationJob: '', // 行政职务 + administrationJobName: '', // 行政职务名称 technologyJob: '', // 技术职务 + technologyJobName: '', // 技术职务名称 meterMajor: '', // 计量专业 remark: '', // 备注 pDeptId: '', // 父级 @@ -44,8 +46,8 @@ organizeName: [{ required: true, message: '名称必填', trigger: ['blur', 'change'] }], director: [{ required: true, message: '负责人必填', trigger: ['blur', 'change'] }], phone: [{ required: true, message: '联系方式必填', trigger: ['blur', 'change'] }], - administrationJob: [{ required: true, message: '行政职务必填', trigger: ['blur', 'change'] }], - technologyJob: [{ required: true, message: '技术职务必填', trigger: ['blur', 'change'] }], + // administrationJob: [{ required: true, message: '行政职务必填', trigger: ['blur', 'change'] }], + // technologyJob: [{ required: true, message: '技术职务必填', trigger: ['blur', 'change'] }], isLab: [{ required: true, message: '是否为实验室必填', trigger: ['blur', 'change'] }], }) // 表单验证规则 const userList = ref([]) // 用户列表 @@ -94,12 +96,14 @@ }) } // 选择负责人自动填充职务信息 -const directorChange = (val: string) => { - const selectUser = userList.value.filter(item => item.name === val)[0] - getStaffDetail(selectUser).then((res) => { +const directorChange = (id: string) => { + getStaffDetail({ id }).then((res) => { if (res.code === 200) { - ruleForm.value.administrationJob = res.data.administrationJob - ruleForm.value.technologyJob = res.data.technologyJob + ruleForm.value.administrationJob = res.data.administrationJob // 行政职务字典 + ruleForm.value.technologyJob = res.data.technologyJob // 技术职务 + ruleForm.value.technologyJobName = !res.data.technologyJob ? '' : res.data.technologyJobName + ruleForm.value.administrationJobName = !res.data.administrationJob ? '' : res.data.administrationJobName + ruleForm.value.director = res.data.name // 负责人后端要名称 } }) } @@ -120,7 +124,7 @@ const form = { ...ruleForm.value, labCapacity: ruleForm.value.labCapacity.join(',') } updateApi(form).then((res) => { if (res.code == 200) { - formEl?.resetFields() + // formEl?.resetFields() ElMessage.success('保存成功') $router.go(-1) } @@ -129,9 +133,9 @@ } }) } -// 取消 +// 关闭 const resetForm = (formEl: FormInstance | undefined) => { - formEl?.resetFields() + // formEl?.resetFields() $router.go(-1) } // 重置 @@ -238,28 +242,28 @@ data: [], column: [ { - label: '统一编号', - data: '', + label: '设备编号', + data: 'equipmentNo', }, { label: '设备名称', - data: 'name', + data: 'equipmentName', }, { label: '型号', - data: '', + data: 'modelNo', }, { label: '测量范围', - data: '', + data: 'mesureRange', }, { label: '使用部门', - data: '', + data: 'useDeptName', }, { label: '使用人', - data: '', + data: 'usePersonName', }, ], }, @@ -328,28 +332,28 @@ data: [], column: [ { - label: '统一编号', - data: '', + label: '设备编号', + data: 'equipmentNo', }, { label: '设备名称', - data: 'name', + data: 'equipmentName', }, { label: '型号', - data: '', + data: 'modelNo', }, { label: '测量范围', - data: '', + data: 'mesureRange', }, { label: '使用部门', - data: '', + data: 'useDeptName', }, { label: '使用人', - data: '', + data: 'usePersonName', }, ], }, @@ -394,7 +398,7 @@ listPageApi({ organizeNo: '', organizeName: '', - limit: 9999, + limit: 99999999, offset: 1, organizeType: '3', createEndTime: '', // 创建时间 @@ -433,7 +437,7 @@ major: '', verifierCertificateNo: '', certificateStatus: '', - limit: 9999, + limit: 999999, offset: 1, } getStaffList(params).then((response) => { @@ -443,11 +447,31 @@ } // 获取仪器信息 const getInstrumentInfo = () => { - // 接口暂未写好 根据实际情况赋值 - // getDictByCode('pDeptId').then((response) => { - // changeList_ks.value[1].data = response.data - // changeList_gcz.value[1].data = response.data - // }) + const searchQuery = { + equipmentNo: '', // 设备编号 + equipmentName: '', // 名称 + mesureType: '', // 检定方式 + managerState: '', // 管理状态 + useDept: ruleForm.value.deptId, // 使用部门 + assetType: '1', // 资产类型 1测量设备 + equipmentCategory: '', // 设备类别 + isCalibrationTestEquipment: '', // 校准/检定设备 + isMeasureAccount: '', // 测量工装 + isStandardSupportEquipment: '', // 标准配套设备 + isFixedAssets: '', // 固定资产 + validDateStart: '', // 有效开始日期 + validDateEnd: '', // 有效结束日期 + abc: '', + limit: 999999, + offset: 1, + ids: [] as string[], + } // 查询参数 + meterEquipmentByDeptId(searchQuery).then((res: any) => { + if (res.code === 200) { + changeList_ks.value[1].data = res.data.rows // 科室 + changeList_gcz.value[1].data = res.data.rows // 工程组 + } + }) } // 获取标准装置信息 const getDeviceInfo = () => { @@ -489,8 +513,8 @@ getDepartmentList() getuserInfoList() if (title.value.split('-')[1] !== '部门') { - getInstrumentInfo() - getDeviceInfo() + getInstrumentInfo() // 仪器信息 + getDeviceInfo() // 获取标准装置信息 } console.log(row, 'row') // 不同组织来判断展示的列表 @@ -547,7 +571,7 @@ - + @@ -592,13 +616,13 @@ - + - + - + - + diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue index 44cad86..f52bd54 100644 --- a/src/views/measure/measureDept/components/templatePage.vue +++ b/src/views/measure/measureDept/components/templatePage.vue @@ -201,6 +201,8 @@ searchQuery.offset = 1 searchQuery.director = '' // 负责人 searchQuery.meterMajor = '' // 专业 + searchQuery.createEndTime = '' + searchQuery.createStartTime = '' getList() } // 表格被选中的行 @@ -288,11 +290,11 @@ diff --git a/src/api/device/standingBook.ts b/src/api/device/standingBook.ts index fe3c99e..c91c8ca 100644 --- a/src/api/device/standingBook.ts +++ b/src/api/device/standingBook.ts @@ -9,6 +9,7 @@ data, }) } + // 删除固定资产 export function assetsDeleteApi(data: object) { return request({ diff --git a/src/api/measure/measureDept.ts b/src/api/measure/measureDept.ts index faecb03..deaeb2d 100644 --- a/src/api/measure/measureDept.ts +++ b/src/api/measure/measureDept.ts @@ -10,6 +10,14 @@ data, }) } +// 固定资产列表(分页) +export function meterEquipmentByDeptId(data: any) { + return request({ + url: `/meter/assets/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} // 详情 export function deptDetailApi(data: object) { return request({ diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index fe7a556..3f02d6c 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -271,7 +271,7 @@ ElMessage.warning('请先保存') } else { - submitAcceptanceCheck({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { + submitAcceptanceCheck({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, processId: processId.value }).then((res) => { if (res.code === 200) { close() } diff --git a/src/views/measure/measureDept/components/addDialog.vue b/src/views/measure/measureDept/components/addDialog.vue index 1c03550..3f75ec2 100644 --- a/src/views/measure/measureDept/components/addDialog.vue +++ b/src/views/measure/measureDept/components/addDialog.vue @@ -7,7 +7,7 @@ import { getDictByCode } from '@/api/system/dict' import { getStaffDetail, getStaffList } from '@/api/measure/person' import type { userType } from '@/views/system/user/user-interface' -import { getpDeptApi, listPageApi, standardlistPageApi, updateApi } from '@/api/measure/measureDept' +import { getpDeptApi, listPageApi, meterEquipmentByDeptId, standardlistPageApi, updateApi } from '@/api/measure/measureDept' import type { dictType } from '@/global' const $route = useRoute() const $router = useRouter() @@ -23,7 +23,9 @@ director: '', // 负责人 phone: '', // 联系方式 administrationJob: '', // 行政职务 + administrationJobName: '', // 行政职务名称 technologyJob: '', // 技术职务 + technologyJobName: '', // 技术职务名称 meterMajor: '', // 计量专业 remark: '', // 备注 pDeptId: '', // 父级 @@ -44,8 +46,8 @@ organizeName: [{ required: true, message: '名称必填', trigger: ['blur', 'change'] }], director: [{ required: true, message: '负责人必填', trigger: ['blur', 'change'] }], phone: [{ required: true, message: '联系方式必填', trigger: ['blur', 'change'] }], - administrationJob: [{ required: true, message: '行政职务必填', trigger: ['blur', 'change'] }], - technologyJob: [{ required: true, message: '技术职务必填', trigger: ['blur', 'change'] }], + // administrationJob: [{ required: true, message: '行政职务必填', trigger: ['blur', 'change'] }], + // technologyJob: [{ required: true, message: '技术职务必填', trigger: ['blur', 'change'] }], isLab: [{ required: true, message: '是否为实验室必填', trigger: ['blur', 'change'] }], }) // 表单验证规则 const userList = ref([]) // 用户列表 @@ -94,12 +96,14 @@ }) } // 选择负责人自动填充职务信息 -const directorChange = (val: string) => { - const selectUser = userList.value.filter(item => item.name === val)[0] - getStaffDetail(selectUser).then((res) => { +const directorChange = (id: string) => { + getStaffDetail({ id }).then((res) => { if (res.code === 200) { - ruleForm.value.administrationJob = res.data.administrationJob - ruleForm.value.technologyJob = res.data.technologyJob + ruleForm.value.administrationJob = res.data.administrationJob // 行政职务字典 + ruleForm.value.technologyJob = res.data.technologyJob // 技术职务 + ruleForm.value.technologyJobName = !res.data.technologyJob ? '' : res.data.technologyJobName + ruleForm.value.administrationJobName = !res.data.administrationJob ? '' : res.data.administrationJobName + ruleForm.value.director = res.data.name // 负责人后端要名称 } }) } @@ -120,7 +124,7 @@ const form = { ...ruleForm.value, labCapacity: ruleForm.value.labCapacity.join(',') } updateApi(form).then((res) => { if (res.code == 200) { - formEl?.resetFields() + // formEl?.resetFields() ElMessage.success('保存成功') $router.go(-1) } @@ -129,9 +133,9 @@ } }) } -// 取消 +// 关闭 const resetForm = (formEl: FormInstance | undefined) => { - formEl?.resetFields() + // formEl?.resetFields() $router.go(-1) } // 重置 @@ -238,28 +242,28 @@ data: [], column: [ { - label: '统一编号', - data: '', + label: '设备编号', + data: 'equipmentNo', }, { label: '设备名称', - data: 'name', + data: 'equipmentName', }, { label: '型号', - data: '', + data: 'modelNo', }, { label: '测量范围', - data: '', + data: 'mesureRange', }, { label: '使用部门', - data: '', + data: 'useDeptName', }, { label: '使用人', - data: '', + data: 'usePersonName', }, ], }, @@ -328,28 +332,28 @@ data: [], column: [ { - label: '统一编号', - data: '', + label: '设备编号', + data: 'equipmentNo', }, { label: '设备名称', - data: 'name', + data: 'equipmentName', }, { label: '型号', - data: '', + data: 'modelNo', }, { label: '测量范围', - data: '', + data: 'mesureRange', }, { label: '使用部门', - data: '', + data: 'useDeptName', }, { label: '使用人', - data: '', + data: 'usePersonName', }, ], }, @@ -394,7 +398,7 @@ listPageApi({ organizeNo: '', organizeName: '', - limit: 9999, + limit: 99999999, offset: 1, organizeType: '3', createEndTime: '', // 创建时间 @@ -433,7 +437,7 @@ major: '', verifierCertificateNo: '', certificateStatus: '', - limit: 9999, + limit: 999999, offset: 1, } getStaffList(params).then((response) => { @@ -443,11 +447,31 @@ } // 获取仪器信息 const getInstrumentInfo = () => { - // 接口暂未写好 根据实际情况赋值 - // getDictByCode('pDeptId').then((response) => { - // changeList_ks.value[1].data = response.data - // changeList_gcz.value[1].data = response.data - // }) + const searchQuery = { + equipmentNo: '', // 设备编号 + equipmentName: '', // 名称 + mesureType: '', // 检定方式 + managerState: '', // 管理状态 + useDept: ruleForm.value.deptId, // 使用部门 + assetType: '1', // 资产类型 1测量设备 + equipmentCategory: '', // 设备类别 + isCalibrationTestEquipment: '', // 校准/检定设备 + isMeasureAccount: '', // 测量工装 + isStandardSupportEquipment: '', // 标准配套设备 + isFixedAssets: '', // 固定资产 + validDateStart: '', // 有效开始日期 + validDateEnd: '', // 有效结束日期 + abc: '', + limit: 999999, + offset: 1, + ids: [] as string[], + } // 查询参数 + meterEquipmentByDeptId(searchQuery).then((res: any) => { + if (res.code === 200) { + changeList_ks.value[1].data = res.data.rows // 科室 + changeList_gcz.value[1].data = res.data.rows // 工程组 + } + }) } // 获取标准装置信息 const getDeviceInfo = () => { @@ -489,8 +513,8 @@ getDepartmentList() getuserInfoList() if (title.value.split('-')[1] !== '部门') { - getInstrumentInfo() - getDeviceInfo() + getInstrumentInfo() // 仪器信息 + getDeviceInfo() // 获取标准装置信息 } console.log(row, 'row') // 不同组织来判断展示的列表 @@ -547,7 +571,7 @@ - + @@ -592,13 +616,13 @@ - + - + - + - + diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue index 44cad86..f52bd54 100644 --- a/src/views/measure/measureDept/components/templatePage.vue +++ b/src/views/measure/measureDept/components/templatePage.vue @@ -201,6 +201,8 @@ searchQuery.offset = 1 searchQuery.director = '' // 负责人 searchQuery.meterMajor = '' // 专业 + searchQuery.createEndTime = '' + searchQuery.createStartTime = '' getList() } // 表格被选中的行 @@ -288,11 +290,11 @@ diff --git a/src/views/measure/measureDept/measureDept-interface.ts b/src/views/measure/measureDept/measureDept-interface.ts index 0528cc7..1e1945b 100644 --- a/src/views/measure/measureDept/measureDept-interface.ts +++ b/src/views/measure/measureDept/measureDept-interface.ts @@ -7,7 +7,7 @@ organizeType?: string // 类型 createTime?: string // 创建时间 director?: string // 负责人 - meterMajor: string // 专业 + meterMajor?: string // 专业 pDeptId?: string // 所属科室 createEndTime?: string createStartTime?: string diff --git a/src/api/device/standingBook.ts b/src/api/device/standingBook.ts index fe3c99e..c91c8ca 100644 --- a/src/api/device/standingBook.ts +++ b/src/api/device/standingBook.ts @@ -9,6 +9,7 @@ data, }) } + // 删除固定资产 export function assetsDeleteApi(data: object) { return request({ diff --git a/src/api/measure/measureDept.ts b/src/api/measure/measureDept.ts index faecb03..deaeb2d 100644 --- a/src/api/measure/measureDept.ts +++ b/src/api/measure/measureDept.ts @@ -10,6 +10,14 @@ data, }) } +// 固定资产列表(分页) +export function meterEquipmentByDeptId(data: any) { + return request({ + url: `/meter/assets/listPage?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} // 详情 export function deptDetailApi(data: object) { return request({ diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index fe7a556..3f02d6c 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -271,7 +271,7 @@ ElMessage.warning('请先保存') } else { - submitAcceptanceCheck({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { + submitAcceptanceCheck({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, processId: processId.value }).then((res) => { if (res.code === 200) { close() } diff --git a/src/views/measure/measureDept/components/addDialog.vue b/src/views/measure/measureDept/components/addDialog.vue index 1c03550..3f75ec2 100644 --- a/src/views/measure/measureDept/components/addDialog.vue +++ b/src/views/measure/measureDept/components/addDialog.vue @@ -7,7 +7,7 @@ import { getDictByCode } from '@/api/system/dict' import { getStaffDetail, getStaffList } from '@/api/measure/person' import type { userType } from '@/views/system/user/user-interface' -import { getpDeptApi, listPageApi, standardlistPageApi, updateApi } from '@/api/measure/measureDept' +import { getpDeptApi, listPageApi, meterEquipmentByDeptId, standardlistPageApi, updateApi } from '@/api/measure/measureDept' import type { dictType } from '@/global' const $route = useRoute() const $router = useRouter() @@ -23,7 +23,9 @@ director: '', // 负责人 phone: '', // 联系方式 administrationJob: '', // 行政职务 + administrationJobName: '', // 行政职务名称 technologyJob: '', // 技术职务 + technologyJobName: '', // 技术职务名称 meterMajor: '', // 计量专业 remark: '', // 备注 pDeptId: '', // 父级 @@ -44,8 +46,8 @@ organizeName: [{ required: true, message: '名称必填', trigger: ['blur', 'change'] }], director: [{ required: true, message: '负责人必填', trigger: ['blur', 'change'] }], phone: [{ required: true, message: '联系方式必填', trigger: ['blur', 'change'] }], - administrationJob: [{ required: true, message: '行政职务必填', trigger: ['blur', 'change'] }], - technologyJob: [{ required: true, message: '技术职务必填', trigger: ['blur', 'change'] }], + // administrationJob: [{ required: true, message: '行政职务必填', trigger: ['blur', 'change'] }], + // technologyJob: [{ required: true, message: '技术职务必填', trigger: ['blur', 'change'] }], isLab: [{ required: true, message: '是否为实验室必填', trigger: ['blur', 'change'] }], }) // 表单验证规则 const userList = ref([]) // 用户列表 @@ -94,12 +96,14 @@ }) } // 选择负责人自动填充职务信息 -const directorChange = (val: string) => { - const selectUser = userList.value.filter(item => item.name === val)[0] - getStaffDetail(selectUser).then((res) => { +const directorChange = (id: string) => { + getStaffDetail({ id }).then((res) => { if (res.code === 200) { - ruleForm.value.administrationJob = res.data.administrationJob - ruleForm.value.technologyJob = res.data.technologyJob + ruleForm.value.administrationJob = res.data.administrationJob // 行政职务字典 + ruleForm.value.technologyJob = res.data.technologyJob // 技术职务 + ruleForm.value.technologyJobName = !res.data.technologyJob ? '' : res.data.technologyJobName + ruleForm.value.administrationJobName = !res.data.administrationJob ? '' : res.data.administrationJobName + ruleForm.value.director = res.data.name // 负责人后端要名称 } }) } @@ -120,7 +124,7 @@ const form = { ...ruleForm.value, labCapacity: ruleForm.value.labCapacity.join(',') } updateApi(form).then((res) => { if (res.code == 200) { - formEl?.resetFields() + // formEl?.resetFields() ElMessage.success('保存成功') $router.go(-1) } @@ -129,9 +133,9 @@ } }) } -// 取消 +// 关闭 const resetForm = (formEl: FormInstance | undefined) => { - formEl?.resetFields() + // formEl?.resetFields() $router.go(-1) } // 重置 @@ -238,28 +242,28 @@ data: [], column: [ { - label: '统一编号', - data: '', + label: '设备编号', + data: 'equipmentNo', }, { label: '设备名称', - data: 'name', + data: 'equipmentName', }, { label: '型号', - data: '', + data: 'modelNo', }, { label: '测量范围', - data: '', + data: 'mesureRange', }, { label: '使用部门', - data: '', + data: 'useDeptName', }, { label: '使用人', - data: '', + data: 'usePersonName', }, ], }, @@ -328,28 +332,28 @@ data: [], column: [ { - label: '统一编号', - data: '', + label: '设备编号', + data: 'equipmentNo', }, { label: '设备名称', - data: 'name', + data: 'equipmentName', }, { label: '型号', - data: '', + data: 'modelNo', }, { label: '测量范围', - data: '', + data: 'mesureRange', }, { label: '使用部门', - data: '', + data: 'useDeptName', }, { label: '使用人', - data: '', + data: 'usePersonName', }, ], }, @@ -394,7 +398,7 @@ listPageApi({ organizeNo: '', organizeName: '', - limit: 9999, + limit: 99999999, offset: 1, organizeType: '3', createEndTime: '', // 创建时间 @@ -433,7 +437,7 @@ major: '', verifierCertificateNo: '', certificateStatus: '', - limit: 9999, + limit: 999999, offset: 1, } getStaffList(params).then((response) => { @@ -443,11 +447,31 @@ } // 获取仪器信息 const getInstrumentInfo = () => { - // 接口暂未写好 根据实际情况赋值 - // getDictByCode('pDeptId').then((response) => { - // changeList_ks.value[1].data = response.data - // changeList_gcz.value[1].data = response.data - // }) + const searchQuery = { + equipmentNo: '', // 设备编号 + equipmentName: '', // 名称 + mesureType: '', // 检定方式 + managerState: '', // 管理状态 + useDept: ruleForm.value.deptId, // 使用部门 + assetType: '1', // 资产类型 1测量设备 + equipmentCategory: '', // 设备类别 + isCalibrationTestEquipment: '', // 校准/检定设备 + isMeasureAccount: '', // 测量工装 + isStandardSupportEquipment: '', // 标准配套设备 + isFixedAssets: '', // 固定资产 + validDateStart: '', // 有效开始日期 + validDateEnd: '', // 有效结束日期 + abc: '', + limit: 999999, + offset: 1, + ids: [] as string[], + } // 查询参数 + meterEquipmentByDeptId(searchQuery).then((res: any) => { + if (res.code === 200) { + changeList_ks.value[1].data = res.data.rows // 科室 + changeList_gcz.value[1].data = res.data.rows // 工程组 + } + }) } // 获取标准装置信息 const getDeviceInfo = () => { @@ -489,8 +513,8 @@ getDepartmentList() getuserInfoList() if (title.value.split('-')[1] !== '部门') { - getInstrumentInfo() - getDeviceInfo() + getInstrumentInfo() // 仪器信息 + getDeviceInfo() // 获取标准装置信息 } console.log(row, 'row') // 不同组织来判断展示的列表 @@ -547,7 +571,7 @@ - + @@ -592,13 +616,13 @@ - + - + - + - + diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue index 44cad86..f52bd54 100644 --- a/src/views/measure/measureDept/components/templatePage.vue +++ b/src/views/measure/measureDept/components/templatePage.vue @@ -201,6 +201,8 @@ searchQuery.offset = 1 searchQuery.director = '' // 负责人 searchQuery.meterMajor = '' // 专业 + searchQuery.createEndTime = '' + searchQuery.createStartTime = '' getList() } // 表格被选中的行 @@ -288,11 +290,11 @@ diff --git a/src/views/measure/measureDept/measureDept-interface.ts b/src/views/measure/measureDept/measureDept-interface.ts index 0528cc7..1e1945b 100644 --- a/src/views/measure/measureDept/measureDept-interface.ts +++ b/src/views/measure/measureDept/measureDept-interface.ts @@ -7,7 +7,7 @@ organizeType?: string // 类型 createTime?: string // 创建时间 director?: string // 负责人 - meterMajor: string // 专业 + meterMajor?: string // 专业 pDeptId?: string // 所属科室 createEndTime?: string createStartTime?: string diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue index 55d8156..180e744 100644 --- a/src/views/measure/person/components/addPerson.vue +++ b/src/views/measure/person/components/addPerson.vue @@ -752,7 +752,7 @@ - + @@ -778,7 +778,7 @@ - +