diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ + + + + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 08b03c3..9b5c151 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -1,36 +1,43 @@ @@ -259,20 +255,20 @@
- + - + - + - + - + - - - - + @@ -337,22 +323,22 @@ +
diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ + + + + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 08b03c3..9b5c151 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -1,36 +1,43 @@ @@ -259,20 +255,20 @@
- + - + - + - + - + - - - - + @@ -337,22 +323,22 @@ +
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue index b45c38b..2f40ba2 100644 --- a/src/views/measure/file/components/templatePage.vue +++ b/src/views/measure/file/components/templatePage.vue @@ -8,6 +8,7 @@ // import { exportExcel } from '@/utils/exportXlsx' import { uploadApi } from '@/api/system/notice' import { exportFile } from '@/utils/exportUtils' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ name: { type: String, @@ -37,6 +38,7 @@ offset: 1, fileType: '', // 类型 ids: [] as string[], + formId: SCHEDULE.FILE_APPROVAL, }) // 查询参数 watch(() => publishTime.value, (newVal) => { if (newVal) { diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ + + + + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 08b03c3..9b5c151 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -1,36 +1,43 @@ @@ -259,20 +255,20 @@
- + - + - + - + - + - - - - + @@ -337,22 +323,22 @@ +
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue index b45c38b..2f40ba2 100644 --- a/src/views/measure/file/components/templatePage.vue +++ b/src/views/measure/file/components/templatePage.vue @@ -8,6 +8,7 @@ // import { exportExcel } from '@/utils/exportXlsx' import { uploadApi } from '@/api/system/notice' import { exportFile } from '@/utils/exportUtils' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ name: { type: String, @@ -37,6 +38,7 @@ offset: 1, fileType: '', // 类型 ids: [] as string[], + formId: SCHEDULE.FILE_APPROVAL, }) // 查询参数 watch(() => publishTime.value, (newVal) => { if (newVal) { diff --git a/src/views/measure/file/file-interface.ts b/src/views/measure/file/file-interface.ts index 585d618..b7a47a5 100644 --- a/src/views/measure/file/file-interface.ts +++ b/src/views/measure/file/file-interface.ts @@ -14,6 +14,7 @@ effectiveEndTime: string effectiveStartTime: string ids: string[] + formId: string } // 文件返回值类型 export interface fileListType { diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ + + + + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 08b03c3..9b5c151 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -1,36 +1,43 @@ @@ -259,20 +255,20 @@
- + - + - + - + - + - - - - + @@ -337,22 +323,22 @@ +
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue index b45c38b..2f40ba2 100644 --- a/src/views/measure/file/components/templatePage.vue +++ b/src/views/measure/file/components/templatePage.vue @@ -8,6 +8,7 @@ // import { exportExcel } from '@/utils/exportXlsx' import { uploadApi } from '@/api/system/notice' import { exportFile } from '@/utils/exportUtils' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ name: { type: String, @@ -37,6 +38,7 @@ offset: 1, fileType: '', // 类型 ids: [] as string[], + formId: SCHEDULE.FILE_APPROVAL, }) // 查询参数 watch(() => publishTime.value, (newVal) => { if (newVal) { diff --git a/src/views/measure/file/file-interface.ts b/src/views/measure/file/file-interface.ts index 585d618..b7a47a5 100644 --- a/src/views/measure/file/file-interface.ts +++ b/src/views/measure/file/file-interface.ts @@ -14,6 +14,7 @@ effectiveEndTime: string effectiveStartTime: string ids: string[] + formId: string } // 文件返回值类型 export interface fileListType { diff --git a/src/views/measure/price/list_interface.ts b/src/views/measure/price/list_interface.ts index 9e1df00..6f4ba44 100644 --- a/src/views/measure/price/list_interface.ts +++ b/src/views/measure/price/list_interface.ts @@ -43,11 +43,11 @@ // 价格表单对象类型 export interface priceForm { checkType: string // 校验类型-字典value - createTime: null | string // 创建时间 + createTime?: null | string // 创建时间 directorDiscountPermission: string // 负责人折扣权限-字典value historicalPriceList?: historyPriceItem[] // 历史价格列表 id: null | string // 主键id - isDel: number // 删除标记 + isDel?: number // 删除标记 model: string // 型号 operatorDiscountPermission: string // 业务员折扣权限-字典value price: string // 标准价格(元) @@ -59,5 +59,5 @@ priceStandard: string // 依据标准-计量规程文件名 priceType: string // 价格类别-字典value remark: string // 备注 - updateTime: null | string // 更新时间 + updateTime?: null | string // 更新时间 } diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ + + + + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 08b03c3..9b5c151 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -1,36 +1,43 @@ @@ -259,20 +255,20 @@
- + - + - + - + - + - - - - + @@ -337,22 +323,22 @@ +
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue index b45c38b..2f40ba2 100644 --- a/src/views/measure/file/components/templatePage.vue +++ b/src/views/measure/file/components/templatePage.vue @@ -8,6 +8,7 @@ // import { exportExcel } from '@/utils/exportXlsx' import { uploadApi } from '@/api/system/notice' import { exportFile } from '@/utils/exportUtils' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ name: { type: String, @@ -37,6 +38,7 @@ offset: 1, fileType: '', // 类型 ids: [] as string[], + formId: SCHEDULE.FILE_APPROVAL, }) // 查询参数 watch(() => publishTime.value, (newVal) => { if (newVal) { diff --git a/src/views/measure/file/file-interface.ts b/src/views/measure/file/file-interface.ts index 585d618..b7a47a5 100644 --- a/src/views/measure/file/file-interface.ts +++ b/src/views/measure/file/file-interface.ts @@ -14,6 +14,7 @@ effectiveEndTime: string effectiveStartTime: string ids: string[] + formId: string } // 文件返回值类型 export interface fileListType { diff --git a/src/views/measure/price/list_interface.ts b/src/views/measure/price/list_interface.ts index 9e1df00..6f4ba44 100644 --- a/src/views/measure/price/list_interface.ts +++ b/src/views/measure/price/list_interface.ts @@ -43,11 +43,11 @@ // 价格表单对象类型 export interface priceForm { checkType: string // 校验类型-字典value - createTime: null | string // 创建时间 + createTime?: null | string // 创建时间 directorDiscountPermission: string // 负责人折扣权限-字典value historicalPriceList?: historyPriceItem[] // 历史价格列表 id: null | string // 主键id - isDel: number // 删除标记 + isDel?: number // 删除标记 model: string // 型号 operatorDiscountPermission: string // 业务员折扣权限-字典value price: string // 标准价格(元) @@ -59,5 +59,5 @@ priceStandard: string // 依据标准-计量规程文件名 priceType: string // 价格类别-字典value remark: string // 备注 - updateTime: null | string // 更新时间 + updateTime?: null | string // 更新时间 } diff --git a/src/views/measure/price/priceAdd.vue b/src/views/measure/price/priceAdd.vue index 082a538..6a5aafa 100644 --- a/src/views/measure/price/priceAdd.vue +++ b/src/views/measure/price/priceAdd.vue @@ -135,6 +135,10 @@ else if (type === '提交' && pageType.value === 'edit') { formInline.value.id = infoId.value buttonLoading.value = true + delete formInline.value.isDel + delete formInline.value.createTime + delete formInline.value.historicalPriceList + delete formInline.value.updateTime getUpdatePriceInfo(formInline.value).then((res) => { if (res.code === 200) { close() @@ -184,7 +188,7 @@ @@ -195,7 +199,7 @@ @@ -213,7 +217,7 @@ @@ -231,7 +235,7 @@ @@ -251,7 +255,7 @@ @@ -261,7 +265,7 @@
@@ -270,14 +274,14 @@
- + @@ -287,7 +291,7 @@ @@ -307,7 +311,7 @@ @@ -324,7 +328,7 @@ - + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ + + + + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 08b03c3..9b5c151 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -1,36 +1,43 @@ @@ -259,20 +255,20 @@
- + - + - + - + - + - - - - + @@ -337,22 +323,22 @@ +
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue index b45c38b..2f40ba2 100644 --- a/src/views/measure/file/components/templatePage.vue +++ b/src/views/measure/file/components/templatePage.vue @@ -8,6 +8,7 @@ // import { exportExcel } from '@/utils/exportXlsx' import { uploadApi } from '@/api/system/notice' import { exportFile } from '@/utils/exportUtils' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ name: { type: String, @@ -37,6 +38,7 @@ offset: 1, fileType: '', // 类型 ids: [] as string[], + formId: SCHEDULE.FILE_APPROVAL, }) // 查询参数 watch(() => publishTime.value, (newVal) => { if (newVal) { diff --git a/src/views/measure/file/file-interface.ts b/src/views/measure/file/file-interface.ts index 585d618..b7a47a5 100644 --- a/src/views/measure/file/file-interface.ts +++ b/src/views/measure/file/file-interface.ts @@ -14,6 +14,7 @@ effectiveEndTime: string effectiveStartTime: string ids: string[] + formId: string } // 文件返回值类型 export interface fileListType { diff --git a/src/views/measure/price/list_interface.ts b/src/views/measure/price/list_interface.ts index 9e1df00..6f4ba44 100644 --- a/src/views/measure/price/list_interface.ts +++ b/src/views/measure/price/list_interface.ts @@ -43,11 +43,11 @@ // 价格表单对象类型 export interface priceForm { checkType: string // 校验类型-字典value - createTime: null | string // 创建时间 + createTime?: null | string // 创建时间 directorDiscountPermission: string // 负责人折扣权限-字典value historicalPriceList?: historyPriceItem[] // 历史价格列表 id: null | string // 主键id - isDel: number // 删除标记 + isDel?: number // 删除标记 model: string // 型号 operatorDiscountPermission: string // 业务员折扣权限-字典value price: string // 标准价格(元) @@ -59,5 +59,5 @@ priceStandard: string // 依据标准-计量规程文件名 priceType: string // 价格类别-字典value remark: string // 备注 - updateTime: null | string // 更新时间 + updateTime?: null | string // 更新时间 } diff --git a/src/views/measure/price/priceAdd.vue b/src/views/measure/price/priceAdd.vue index 082a538..6a5aafa 100644 --- a/src/views/measure/price/priceAdd.vue +++ b/src/views/measure/price/priceAdd.vue @@ -135,6 +135,10 @@ else if (type === '提交' && pageType.value === 'edit') { formInline.value.id = infoId.value buttonLoading.value = true + delete formInline.value.isDel + delete formInline.value.createTime + delete formInline.value.historicalPriceList + delete formInline.value.updateTime getUpdatePriceInfo(formInline.value).then((res) => { if (res.code === 200) { close() @@ -184,7 +188,7 @@ @@ -195,7 +199,7 @@ @@ -213,7 +217,7 @@ @@ -231,7 +235,7 @@ @@ -251,7 +255,7 @@ @@ -261,7 +265,7 @@
@@ -270,14 +274,14 @@
- + @@ -287,7 +291,7 @@ @@ -307,7 +311,7 @@ @@ -324,7 +328,7 @@ - + diff --git a/src/views/measure/train/components/listApproval.vue b/src/views/measure/train/components/listApproval.vue new file mode 100644 index 0000000..1e93982 --- /dev/null +++ b/src/views/measure/train/components/listApproval.vue @@ -0,0 +1,429 @@ + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ + + + + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 08b03c3..9b5c151 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -1,36 +1,43 @@ @@ -259,20 +255,20 @@
- + - + - + - + - + - - - - + @@ -337,22 +323,22 @@ +
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue index b45c38b..2f40ba2 100644 --- a/src/views/measure/file/components/templatePage.vue +++ b/src/views/measure/file/components/templatePage.vue @@ -8,6 +8,7 @@ // import { exportExcel } from '@/utils/exportXlsx' import { uploadApi } from '@/api/system/notice' import { exportFile } from '@/utils/exportUtils' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ name: { type: String, @@ -37,6 +38,7 @@ offset: 1, fileType: '', // 类型 ids: [] as string[], + formId: SCHEDULE.FILE_APPROVAL, }) // 查询参数 watch(() => publishTime.value, (newVal) => { if (newVal) { diff --git a/src/views/measure/file/file-interface.ts b/src/views/measure/file/file-interface.ts index 585d618..b7a47a5 100644 --- a/src/views/measure/file/file-interface.ts +++ b/src/views/measure/file/file-interface.ts @@ -14,6 +14,7 @@ effectiveEndTime: string effectiveStartTime: string ids: string[] + formId: string } // 文件返回值类型 export interface fileListType { diff --git a/src/views/measure/price/list_interface.ts b/src/views/measure/price/list_interface.ts index 9e1df00..6f4ba44 100644 --- a/src/views/measure/price/list_interface.ts +++ b/src/views/measure/price/list_interface.ts @@ -43,11 +43,11 @@ // 价格表单对象类型 export interface priceForm { checkType: string // 校验类型-字典value - createTime: null | string // 创建时间 + createTime?: null | string // 创建时间 directorDiscountPermission: string // 负责人折扣权限-字典value historicalPriceList?: historyPriceItem[] // 历史价格列表 id: null | string // 主键id - isDel: number // 删除标记 + isDel?: number // 删除标记 model: string // 型号 operatorDiscountPermission: string // 业务员折扣权限-字典value price: string // 标准价格(元) @@ -59,5 +59,5 @@ priceStandard: string // 依据标准-计量规程文件名 priceType: string // 价格类别-字典value remark: string // 备注 - updateTime: null | string // 更新时间 + updateTime?: null | string // 更新时间 } diff --git a/src/views/measure/price/priceAdd.vue b/src/views/measure/price/priceAdd.vue index 082a538..6a5aafa 100644 --- a/src/views/measure/price/priceAdd.vue +++ b/src/views/measure/price/priceAdd.vue @@ -135,6 +135,10 @@ else if (type === '提交' && pageType.value === 'edit') { formInline.value.id = infoId.value buttonLoading.value = true + delete formInline.value.isDel + delete formInline.value.createTime + delete formInline.value.historicalPriceList + delete formInline.value.updateTime getUpdatePriceInfo(formInline.value).then((res) => { if (res.code === 200) { close() @@ -184,7 +188,7 @@ @@ -195,7 +199,7 @@ @@ -213,7 +217,7 @@ @@ -231,7 +235,7 @@ @@ -251,7 +255,7 @@ @@ -261,7 +265,7 @@
@@ -270,14 +274,14 @@
- + @@ -287,7 +291,7 @@ @@ -307,7 +311,7 @@ @@ -324,7 +328,7 @@ - + diff --git a/src/views/measure/train/components/listApproval.vue b/src/views/measure/train/components/listApproval.vue new file mode 100644 index 0000000..1e93982 --- /dev/null +++ b/src/views/measure/train/components/listApproval.vue @@ -0,0 +1,429 @@ + + + + diff --git a/src/views/measure/train/plan.vue b/src/views/measure/train/plan.vue index 107637b..c630f58 100644 --- a/src/views/measure/train/plan.vue +++ b/src/views/measure/train/plan.vue @@ -6,6 +6,7 @@ import { exportExcel } from '@/utils/exportXlsx' import { exportPlanList, getDeptTree, getListDelete, getPlanList } from '@/api/system/plan' import { printJSON } from '@/utils/printUtils' +import { SCHEDULE } from '@/utils/scheduleDict' import { exportFile } from '@/utils/exportUtils' const listQuery: Ref = ref({ createEndTime: '', @@ -15,6 +16,7 @@ effectiveCompany: '', ids: [], trainEndTime: '', + formId: SCHEDULE.TRAIN_APPROVAL, trainStartTime: '', offset: 1, limit: 20, diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ + + + + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 08b03c3..9b5c151 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -1,36 +1,43 @@ @@ -259,20 +255,20 @@
- + - + - + - + - + - - - - + @@ -337,22 +323,22 @@ +
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue index b45c38b..2f40ba2 100644 --- a/src/views/measure/file/components/templatePage.vue +++ b/src/views/measure/file/components/templatePage.vue @@ -8,6 +8,7 @@ // import { exportExcel } from '@/utils/exportXlsx' import { uploadApi } from '@/api/system/notice' import { exportFile } from '@/utils/exportUtils' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ name: { type: String, @@ -37,6 +38,7 @@ offset: 1, fileType: '', // 类型 ids: [] as string[], + formId: SCHEDULE.FILE_APPROVAL, }) // 查询参数 watch(() => publishTime.value, (newVal) => { if (newVal) { diff --git a/src/views/measure/file/file-interface.ts b/src/views/measure/file/file-interface.ts index 585d618..b7a47a5 100644 --- a/src/views/measure/file/file-interface.ts +++ b/src/views/measure/file/file-interface.ts @@ -14,6 +14,7 @@ effectiveEndTime: string effectiveStartTime: string ids: string[] + formId: string } // 文件返回值类型 export interface fileListType { diff --git a/src/views/measure/price/list_interface.ts b/src/views/measure/price/list_interface.ts index 9e1df00..6f4ba44 100644 --- a/src/views/measure/price/list_interface.ts +++ b/src/views/measure/price/list_interface.ts @@ -43,11 +43,11 @@ // 价格表单对象类型 export interface priceForm { checkType: string // 校验类型-字典value - createTime: null | string // 创建时间 + createTime?: null | string // 创建时间 directorDiscountPermission: string // 负责人折扣权限-字典value historicalPriceList?: historyPriceItem[] // 历史价格列表 id: null | string // 主键id - isDel: number // 删除标记 + isDel?: number // 删除标记 model: string // 型号 operatorDiscountPermission: string // 业务员折扣权限-字典value price: string // 标准价格(元) @@ -59,5 +59,5 @@ priceStandard: string // 依据标准-计量规程文件名 priceType: string // 价格类别-字典value remark: string // 备注 - updateTime: null | string // 更新时间 + updateTime?: null | string // 更新时间 } diff --git a/src/views/measure/price/priceAdd.vue b/src/views/measure/price/priceAdd.vue index 082a538..6a5aafa 100644 --- a/src/views/measure/price/priceAdd.vue +++ b/src/views/measure/price/priceAdd.vue @@ -135,6 +135,10 @@ else if (type === '提交' && pageType.value === 'edit') { formInline.value.id = infoId.value buttonLoading.value = true + delete formInline.value.isDel + delete formInline.value.createTime + delete formInline.value.historicalPriceList + delete formInline.value.updateTime getUpdatePriceInfo(formInline.value).then((res) => { if (res.code === 200) { close() @@ -184,7 +188,7 @@ @@ -195,7 +199,7 @@ @@ -213,7 +217,7 @@ @@ -231,7 +235,7 @@ @@ -251,7 +255,7 @@ @@ -261,7 +265,7 @@
@@ -270,14 +274,14 @@
- + @@ -287,7 +291,7 @@ @@ -307,7 +311,7 @@ @@ -324,7 +328,7 @@ - + diff --git a/src/views/measure/train/components/listApproval.vue b/src/views/measure/train/components/listApproval.vue new file mode 100644 index 0000000..1e93982 --- /dev/null +++ b/src/views/measure/train/components/listApproval.vue @@ -0,0 +1,429 @@ + + + + diff --git a/src/views/measure/train/plan.vue b/src/views/measure/train/plan.vue index 107637b..c630f58 100644 --- a/src/views/measure/train/plan.vue +++ b/src/views/measure/train/plan.vue @@ -6,6 +6,7 @@ import { exportExcel } from '@/utils/exportXlsx' import { exportPlanList, getDeptTree, getListDelete, getPlanList } from '@/api/system/plan' import { printJSON } from '@/utils/printUtils' +import { SCHEDULE } from '@/utils/scheduleDict' import { exportFile } from '@/utils/exportUtils' const listQuery: Ref = ref({ createEndTime: '', @@ -15,6 +16,7 @@ effectiveCompany: '', ids: [], trainEndTime: '', + formId: SCHEDULE.TRAIN_APPROVAL, trainStartTime: '', offset: 1, limit: 20, diff --git a/src/views/measure/train/plan_interface.ts b/src/views/measure/train/plan_interface.ts index a41a274..4869328 100644 --- a/src/views/measure/train/plan_interface.ts +++ b/src/views/measure/train/plan_interface.ts @@ -31,6 +31,7 @@ createEndTime: string createStartTime: string ids: [] + formId: string logNo: string trainEndTime: string trainName: string diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 5ae03f9..28b50ba 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = '/meter' // 列表查询 -export function getStandardList(data: object) { +export function getStandardList(data: { offset: number; limit: number }) { return request({ url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -47,7 +47,7 @@ } // 获取部门信息 -export function getUsersDept(data: object) { +export function getUsersDept(data: { offset: number; limit: number }) { return request({ url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -56,7 +56,7 @@ } // 获取申请列表 -export function getstandardEquipmentApplyList(data: object) { +export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) { return request({ url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`, method: 'post', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 4e41e86..7bde3f8 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -143,6 +143,18 @@ auth: '/file/approve', }, }, + { + path: 'approvedetail/:id?', + name: 'approveDetail', + component: () => import('@/views/measure/file/components/approve/addDialog.vue'), + meta: { + title: '文件审批', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/file/approve', + }, + }, ], }, { diff --git a/src/views/device/borrow/components/handleList.vue b/src/views/device/borrow/components/handleList.vue index 3926c2d..7f3ea3e 100644 --- a/src/views/device/borrow/components/handleList.vue +++ b/src/views/device/borrow/components/handleList.vue @@ -78,25 +78,25 @@ // }).catch((_) => { // loadingTable.value = false // }) - list.value = [ - { - applyName: '借用测试设备', - applyNo: '1433223', - applyUnit: '顶级', - applyPerson: '张三', - time: '2020-12-12 00:00:00', - approvalStatusName: '审批中', - }, - { - applyName: '借用电脑', - applyNo: '1433223', - applyUnit: '徐州分中心', - applyPerson: '里斯', - time: '2020-12-12 00:00:00', - approvalStatusName: '已通过', - }, - ] as any - total.value = 2 + // list.value = [ + // { + // applyName: '借用测试设备', + // applyNo: '1433223', + // applyUnit: '顶级', + // applyPerson: '张三', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '审批中', + // }, + // { + // applyName: '借用电脑', + // applyNo: '1433223', + // applyUnit: '徐州分中心', + // applyPerson: '里斯', + // time: '2020-12-12 00:00:00', + // approvalStatusName: '已通过', + // }, + // ] as any + // total.value = 2 } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index b6f5cf3..fc2cfa7 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -15,6 +15,7 @@ checkResultName: string createTime: null | string createUser: string + createUserName: string fileList: [ { checkId: string diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 0c3445d..5143309 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -13,12 +13,12 @@ import { validatePhone } from '@/utils/validate' import { SCHEDULE } from '@/utils/scheduleDict' import type { IAddress } from '@/components/AddressSelect/address-interface' -import { useUserStore } from '@/store/modules/user' +import useUserStore from '@/store/modules/user' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 -// const { id } = useUserStore() +const userInfo = useUserStore() const textMap: { [key: string]: string } = { edit: '编辑', add: '新建', @@ -40,7 +40,8 @@ checkResult: '', checkResultName: '', createTime: null, - createUser: '', + createUser: userInfo.id, + createUserName: userInfo.username, fileList: [ { checkId: '', @@ -117,9 +118,18 @@ ).then(() => { if (pageType.value === 'add') { getselectCheckInfo(formInline.value).then((res) => { - console.log(res) + if (res.code === '200') { + close() + } }) } + else if (pageType.value === 'edit') { // 编辑 + // getselectCheckInfo(formInline.value).then((res) => { + // if (res.code === '200') { + // close() + // } + // }) + } }) } }) @@ -182,9 +192,6 @@ 打印 - 提交 @@ -259,7 +266,7 @@ 0) { - printJSON(list.value, properties, '溯源供方列表') + printJSON(list.value, properties, '设备管理点检查列表') } else if (checkoutList.value.length > 0) { const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '溯源供方列表') + printJSON(printList, properties, '设备管理点检查列表') } else { ElMessage.warning('无可打印内容') diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index 5234d0b..8882124 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -135,7 +135,7 @@ const loadingTable = ref(false) // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index c25a836..b397cbb 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -143,7 +143,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a75d816..fb10946 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -98,7 +98,7 @@ getSelectList('standardCategory') // 获取类别下拉框 // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', @@ -259,7 +259,7 @@ @@ -269,7 +269,7 @@ @@ -279,7 +279,7 @@ @@ -291,7 +291,7 @@ @@ -304,7 +304,7 @@ > @@ -315,7 +315,7 @@ @@ -346,7 +346,7 @@ @@ -415,7 +415,7 @@ @@ -458,7 +458,7 @@ @@ -471,7 +471,7 @@ @@ -520,7 +520,7 @@ v-model="formInline.assessDate" type="datetime" style="width: 100%;" - placeholder="请选择考核日期" + :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD h:m:s" :disabled="buttonType === 'detail'" @@ -534,7 +534,7 @@ @@ -545,7 +545,7 @@ @@ -560,7 +560,7 @@ @@ -569,7 +569,7 @@ @@ -581,7 +581,7 @@ diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue index 79cc061..c378549 100644 --- a/src/views/device/standardEquipment/components/standardList/templateTable.vue +++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue @@ -20,13 +20,21 @@ type: Number, default: 0, }, + buttonType: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, + title: { // 控制增加行按钮是否显示 + type: String, + default: '', + }, }) -const emits = defineEmits(['changePage']) +const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson']) const searchQuery = ref({ limit: 10, offset: 1, }) -console.log(props.list, '6666') + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -37,16 +45,60 @@ } emits('changePage', searchQuery) } +// 点击增加行 +const addRow = () => { + emits('addRow') +} +// 点击删除行 +const deleteRow = () => { + emits('deleteRow', props.title) +} +// 多选发生改变 +const handleSelectionChange = (object: object[]) => { + emits('handleSelectionChange', object, props.title) +} +// 点击选择的时候 +const selectPerson = (index: string, text: string) => { + emits('selectPerson', index, text) +} diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index bcdcf3b..f04e55b 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -5,6 +5,7 @@ import type { IOptions } from '../standard_interface' import baseInfo from './standardList/baseInfo.vue' import TemplateTable from './standardList/templateTable.vue' +import userListDialog from '@/views/measure/person/components/userListDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard' @@ -80,7 +81,7 @@ const measurementPersonnelColumns = ref([ { text: '姓名', value: 'name', align: 'center' }, { text: '计量人员编号', value: 'staffNo', align: 'center' }, - { text: '工作部门', value: 'deptId', align: 'center' }, + { text: '工作部门', value: 'deptName', align: 'center' }, { text: '计量专业', value: 'major', align: 'center' }, { text: '证书编号', value: 'verifierCertificateNo', align: 'center' }, { text: '证书有效期', value: 'certificateDate', align: 'center' }, @@ -232,6 +233,81 @@ }) }) } +const measurementPersonnelSelectionList = ref([]) // 计量人员选中数组 +const corollaryEquipmentSelectionList = ref([]) // 标准配套设备选中数组 +const regulationVerificationSelectionList = ref([]) // 检定规程选中数组 +const userListRef = ref() +const listIndex = ref(0) +// 新增计量人员 +const measurementPersonnelAddRow = () => { + measurementPersonnel.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增标准配套设备 +const corollaryEquipmentAddRow = () => { + corollaryEquipment.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +// 新增检定规程 +const regulationVerificationAddRow = () => { + regulationVerification.value.push({}) + // ElMessage.warning('请先选择上一条信息') +} +function selectPerson(index: number, text: string) { + if (text === '姓名') { + userListRef.value.initDialog() + listIndex.value = index + } +} +// 多选框选中 +function handleSelectionChange(Array: object[], title: string) { + if (title === '计量人员') { + measurementPersonnelSelectionList.value = Array + } + else if (title === '标准配套设备') { + corollaryEquipmentSelectionList.value = Array + } + else if (title === '检定规程') { + regulationVerificationSelectionList.value = Array + } +} +// 点击删除行 +const deleteRow = (title: string) => { + if (title === '计量人员') { + if (measurementPersonnelSelectionList.value.length > 0) { + measurementPersonnel.value = measurementPersonnel.value.filter(item => !measurementPersonnelSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '标准配套设备') { + if (corollaryEquipmentSelectionList.value.length > 0) { + corollaryEquipment.value = corollaryEquipment.value.filter(item => !corollaryEquipmentSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } + else if (title === '检定规程') { + if (regulationVerificationSelectionList.value.length > 0) { + regulationVerification.value = regulationVerification.value.filter(item => !regulationVerificationSelectionList.value.includes(item)) + } + else { + ElMessage.warning('请先选择中数据') + } + } +} +// 选择完负责人的函数 +const confirmPerson = (object: object) => { + if (!measurementPersonnel.value.includes(object)) { + measurementPersonnel.value[listIndex.value] = object + } + else { + ElMessage.warning('该人员已经存在') + measurementPersonnel.value.splice(listIndex.value, 1) + } +} onMounted(() => { if (pageType.value === 'detail') { // fetchmeasurementPersonnel() // 计量人员 @@ -271,7 +347,7 @@ 关闭 - + - - - - - - + + + + + + + + diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 94520ba..7627e4e 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -120,7 +120,7 @@ const $router = useRouter() // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/standardEquipment/standardList.vue b/src/views/device/standardEquipment/standardList.vue index 17367cb..a66fb7b 100644 --- a/src/views/device/standardEquipment/standardList.vue +++ b/src/views/device/standardEquipment/standardList.vue @@ -128,7 +128,7 @@ // 获取部门信息 getUsersDept({ - createTime: '', + createTime: null, director: '', meterMajor: '', organizeName: '', diff --git a/src/views/device/stateManage/components/templateList.vue b/src/views/device/stateManage/components/templateList.vue index c1b20e7..5b7e91a 100644 --- a/src/views/device/stateManage/components/templateList.vue +++ b/src/views/device/stateManage/components/templateList.vue @@ -100,7 +100,10 @@ loadingTable.value = true getDictByCode('managerState').then((response) => { if (response.code === 200) { - console.log(response.data, 'response') + console.log(response.data, 'response') // 状态 + + // 根据闲置,封存,启封等状态获取不同的列表 + // 接口未写好 getStatusList(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 7588c22..fecdc5f 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,13 +1,13 @@ + + + + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 08b03c3..9b5c151 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -1,36 +1,43 @@ @@ -259,20 +255,20 @@
- + - + - + - + - + - - - - + @@ -337,22 +323,22 @@ +
diff --git a/src/views/measure/file/components/templatePage.vue b/src/views/measure/file/components/templatePage.vue index b45c38b..2f40ba2 100644 --- a/src/views/measure/file/components/templatePage.vue +++ b/src/views/measure/file/components/templatePage.vue @@ -8,6 +8,7 @@ // import { exportExcel } from '@/utils/exportXlsx' import { uploadApi } from '@/api/system/notice' import { exportFile } from '@/utils/exportUtils' +import { SCHEDULE } from '@/utils/scheduleDict' const props = defineProps({ name: { type: String, @@ -37,6 +38,7 @@ offset: 1, fileType: '', // 类型 ids: [] as string[], + formId: SCHEDULE.FILE_APPROVAL, }) // 查询参数 watch(() => publishTime.value, (newVal) => { if (newVal) { diff --git a/src/views/measure/file/file-interface.ts b/src/views/measure/file/file-interface.ts index 585d618..b7a47a5 100644 --- a/src/views/measure/file/file-interface.ts +++ b/src/views/measure/file/file-interface.ts @@ -14,6 +14,7 @@ effectiveEndTime: string effectiveStartTime: string ids: string[] + formId: string } // 文件返回值类型 export interface fileListType { diff --git a/src/views/measure/price/list_interface.ts b/src/views/measure/price/list_interface.ts index 9e1df00..6f4ba44 100644 --- a/src/views/measure/price/list_interface.ts +++ b/src/views/measure/price/list_interface.ts @@ -43,11 +43,11 @@ // 价格表单对象类型 export interface priceForm { checkType: string // 校验类型-字典value - createTime: null | string // 创建时间 + createTime?: null | string // 创建时间 directorDiscountPermission: string // 负责人折扣权限-字典value historicalPriceList?: historyPriceItem[] // 历史价格列表 id: null | string // 主键id - isDel: number // 删除标记 + isDel?: number // 删除标记 model: string // 型号 operatorDiscountPermission: string // 业务员折扣权限-字典value price: string // 标准价格(元) @@ -59,5 +59,5 @@ priceStandard: string // 依据标准-计量规程文件名 priceType: string // 价格类别-字典value remark: string // 备注 - updateTime: null | string // 更新时间 + updateTime?: null | string // 更新时间 } diff --git a/src/views/measure/price/priceAdd.vue b/src/views/measure/price/priceAdd.vue index 082a538..6a5aafa 100644 --- a/src/views/measure/price/priceAdd.vue +++ b/src/views/measure/price/priceAdd.vue @@ -135,6 +135,10 @@ else if (type === '提交' && pageType.value === 'edit') { formInline.value.id = infoId.value buttonLoading.value = true + delete formInline.value.isDel + delete formInline.value.createTime + delete formInline.value.historicalPriceList + delete formInline.value.updateTime getUpdatePriceInfo(formInline.value).then((res) => { if (res.code === 200) { close() @@ -184,7 +188,7 @@ @@ -195,7 +199,7 @@ @@ -213,7 +217,7 @@ @@ -231,7 +235,7 @@ @@ -251,7 +255,7 @@ @@ -261,7 +265,7 @@
@@ -270,14 +274,14 @@
- + @@ -287,7 +291,7 @@ @@ -307,7 +311,7 @@ @@ -324,7 +328,7 @@ - + diff --git a/src/views/measure/train/components/listApproval.vue b/src/views/measure/train/components/listApproval.vue new file mode 100644 index 0000000..1e93982 --- /dev/null +++ b/src/views/measure/train/components/listApproval.vue @@ -0,0 +1,429 @@ + + + + diff --git a/src/views/measure/train/plan.vue b/src/views/measure/train/plan.vue index 107637b..c630f58 100644 --- a/src/views/measure/train/plan.vue +++ b/src/views/measure/train/plan.vue @@ -6,6 +6,7 @@ import { exportExcel } from '@/utils/exportXlsx' import { exportPlanList, getDeptTree, getListDelete, getPlanList } from '@/api/system/plan' import { printJSON } from '@/utils/printUtils' +import { SCHEDULE } from '@/utils/scheduleDict' import { exportFile } from '@/utils/exportUtils' const listQuery: Ref = ref({ createEndTime: '', @@ -15,6 +16,7 @@ effectiveCompany: '', ids: [], trainEndTime: '', + formId: SCHEDULE.TRAIN_APPROVAL, trainStartTime: '', offset: 1, limit: 20, diff --git a/src/views/measure/train/plan_interface.ts b/src/views/measure/train/plan_interface.ts index a41a274..4869328 100644 --- a/src/views/measure/train/plan_interface.ts +++ b/src/views/measure/train/plan_interface.ts @@ -31,6 +31,7 @@ createEndTime: string createStartTime: string ids: [] + formId: string logNo: string trainEndTime: string trainName: string diff --git a/src/views/measure/train/trainPlanApprove.vue b/src/views/measure/train/trainPlanApprove.vue index a20249f..4c0d635 100644 --- a/src/views/measure/train/trainPlanApprove.vue +++ b/src/views/measure/train/trainPlanApprove.vue @@ -1,53 +1,121 @@