diff --git a/src/api/business/task.ts b/src/api/business/task.ts index c7e8343..cba53af 100644 --- a/src/api/business/task.ts +++ b/src/api/business/task.ts @@ -14,6 +14,15 @@ }) } +// 任务分发详情 +export function getTaskDetail(data: { orderId: string; sampleId: string }) { + return request({ + url: '/business/labExecutive/handOut/detail', + method: 'post', + data, + }) +} + // 导出列表 export function exportTaskList(data: Omit) { return request({ @@ -24,10 +33,19 @@ }) } -// 检测流程配置 -export function setMeasureProcess(data: { id: string; scheduleId: string }) { +// 任务分发 +export function setMeasureProcess(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { return request({ - url: `${prefix}/schedule/task/setSchedule`, + url: '/business/labExecutive/handOut/execute', + method: 'post', + data, + }) +} + +// 分发员编辑实验室检测列表 +export function setMeasureProcessByFfy(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { + return request({ + url: '/business/labExecutive/handOut/updateList', method: 'post', data, }) @@ -78,3 +96,20 @@ }) } +// 我的检测-列表 +export function getMyMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/myExecutive/list?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 我的检测-列表 +export function getDeptMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/deptExecutive/List?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/business/task.ts b/src/api/business/task.ts index c7e8343..cba53af 100644 --- a/src/api/business/task.ts +++ b/src/api/business/task.ts @@ -14,6 +14,15 @@ }) } +// 任务分发详情 +export function getTaskDetail(data: { orderId: string; sampleId: string }) { + return request({ + url: '/business/labExecutive/handOut/detail', + method: 'post', + data, + }) +} + // 导出列表 export function exportTaskList(data: Omit) { return request({ @@ -24,10 +33,19 @@ }) } -// 检测流程配置 -export function setMeasureProcess(data: { id: string; scheduleId: string }) { +// 任务分发 +export function setMeasureProcess(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { return request({ - url: `${prefix}/schedule/task/setSchedule`, + url: '/business/labExecutive/handOut/execute', + method: 'post', + data, + }) +} + +// 分发员编辑实验室检测列表 +export function setMeasureProcessByFfy(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { + return request({ + url: '/business/labExecutive/handOut/updateList', method: 'post', data, }) @@ -78,3 +96,20 @@ }) } +// 我的检测-列表 +export function getMyMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/myExecutive/list?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 我的检测-列表 +export function getDeptMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/deptExecutive/List?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/measureDept.ts b/src/api/measure/measureDept.ts index 3d34a2b..faecb03 100644 --- a/src/api/measure/measureDept.ts +++ b/src/api/measure/measureDept.ts @@ -51,3 +51,12 @@ data, }) } + +// 获取父级组织 +export function getOrganizeList(data: object) { + return request({ + url: '/meter/organize/list', + method: 'post', + data, + }) +} diff --git a/src/api/business/task.ts b/src/api/business/task.ts index c7e8343..cba53af 100644 --- a/src/api/business/task.ts +++ b/src/api/business/task.ts @@ -14,6 +14,15 @@ }) } +// 任务分发详情 +export function getTaskDetail(data: { orderId: string; sampleId: string }) { + return request({ + url: '/business/labExecutive/handOut/detail', + method: 'post', + data, + }) +} + // 导出列表 export function exportTaskList(data: Omit) { return request({ @@ -24,10 +33,19 @@ }) } -// 检测流程配置 -export function setMeasureProcess(data: { id: string; scheduleId: string }) { +// 任务分发 +export function setMeasureProcess(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { return request({ - url: `${prefix}/schedule/task/setSchedule`, + url: '/business/labExecutive/handOut/execute', + method: 'post', + data, + }) +} + +// 分发员编辑实验室检测列表 +export function setMeasureProcessByFfy(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { + return request({ + url: '/business/labExecutive/handOut/updateList', method: 'post', data, }) @@ -78,3 +96,20 @@ }) } +// 我的检测-列表 +export function getMyMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/myExecutive/list?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 我的检测-列表 +export function getDeptMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/deptExecutive/List?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/measureDept.ts b/src/api/measure/measureDept.ts index 3d34a2b..faecb03 100644 --- a/src/api/measure/measureDept.ts +++ b/src/api/measure/measureDept.ts @@ -51,3 +51,12 @@ data, }) } + +// 获取父级组织 +export function getOrganizeList(data: object) { + return request({ + url: '/meter/organize/list', + method: 'post', + data, + }) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index be9415b..127d571 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -51,6 +51,8 @@ name: '', // 姓名 deptId: '', // 部门 administrationJob: '', // 行政职务 + major: '', // 专业 + staffNo: '', // 人员编号 limit: 10, offset: 1, }) @@ -104,6 +106,7 @@ // 是否显示当前页,否则跳转第一页 listQuery.offset = 1 } + listQuery.deptId = props.deptId loading.value = true getStaffList(listQuery).then((res) => { list.value = res.data.records diff --git a/src/api/business/task.ts b/src/api/business/task.ts index c7e8343..cba53af 100644 --- a/src/api/business/task.ts +++ b/src/api/business/task.ts @@ -14,6 +14,15 @@ }) } +// 任务分发详情 +export function getTaskDetail(data: { orderId: string; sampleId: string }) { + return request({ + url: '/business/labExecutive/handOut/detail', + method: 'post', + data, + }) +} + // 导出列表 export function exportTaskList(data: Omit) { return request({ @@ -24,10 +33,19 @@ }) } -// 检测流程配置 -export function setMeasureProcess(data: { id: string; scheduleId: string }) { +// 任务分发 +export function setMeasureProcess(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { return request({ - url: `${prefix}/schedule/task/setSchedule`, + url: '/business/labExecutive/handOut/execute', + method: 'post', + data, + }) +} + +// 分发员编辑实验室检测列表 +export function setMeasureProcessByFfy(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { + return request({ + url: '/business/labExecutive/handOut/updateList', method: 'post', data, }) @@ -78,3 +96,20 @@ }) } +// 我的检测-列表 +export function getMyMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/myExecutive/list?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 我的检测-列表 +export function getDeptMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/deptExecutive/List?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/measureDept.ts b/src/api/measure/measureDept.ts index 3d34a2b..faecb03 100644 --- a/src/api/measure/measureDept.ts +++ b/src/api/measure/measureDept.ts @@ -51,3 +51,12 @@ data, }) } + +// 获取父级组织 +export function getOrganizeList(data: object) { + return request({ + url: '/meter/organize/list', + method: 'post', + data, + }) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index be9415b..127d571 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -51,6 +51,8 @@ name: '', // 姓名 deptId: '', // 部门 administrationJob: '', // 行政职务 + major: '', // 专业 + staffNo: '', // 人员编号 limit: 10, offset: 1, }) @@ -104,6 +106,7 @@ // 是否显示当前页,否则跳转第一页 listQuery.offset = 1 } + listQuery.deptId = props.deptId loading.value = true getStaffList(listQuery).then((res) => { list.value = res.data.records diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 72623a6..9f8e6fa 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -116,7 +116,7 @@ } // 点击详情 const handleDetail = (row: ITaskList) => { - $router.push(`/schedule/task/distribute/${row.sampleId}`) + $router.push(`/schedule/task/dispatch/${row.sampleId}?order=${row.orderId}`) } // 点击分发, 弹窗 diff --git a/src/api/business/task.ts b/src/api/business/task.ts index c7e8343..cba53af 100644 --- a/src/api/business/task.ts +++ b/src/api/business/task.ts @@ -14,6 +14,15 @@ }) } +// 任务分发详情 +export function getTaskDetail(data: { orderId: string; sampleId: string }) { + return request({ + url: '/business/labExecutive/handOut/detail', + method: 'post', + data, + }) +} + // 导出列表 export function exportTaskList(data: Omit) { return request({ @@ -24,10 +33,19 @@ }) } -// 检测流程配置 -export function setMeasureProcess(data: { id: string; scheduleId: string }) { +// 任务分发 +export function setMeasureProcess(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { return request({ - url: `${prefix}/schedule/task/setSchedule`, + url: '/business/labExecutive/handOut/execute', + method: 'post', + data, + }) +} + +// 分发员编辑实验室检测列表 +export function setMeasureProcessByFfy(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { + return request({ + url: '/business/labExecutive/handOut/updateList', method: 'post', data, }) @@ -78,3 +96,20 @@ }) } +// 我的检测-列表 +export function getMyMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/myExecutive/list?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 我的检测-列表 +export function getDeptMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/deptExecutive/List?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/measureDept.ts b/src/api/measure/measureDept.ts index 3d34a2b..faecb03 100644 --- a/src/api/measure/measureDept.ts +++ b/src/api/measure/measureDept.ts @@ -51,3 +51,12 @@ data, }) } + +// 获取父级组织 +export function getOrganizeList(data: object) { + return request({ + url: '/meter/organize/list', + method: 'post', + data, + }) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index be9415b..127d571 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -51,6 +51,8 @@ name: '', // 姓名 deptId: '', // 部门 administrationJob: '', // 行政职务 + major: '', // 专业 + staffNo: '', // 人员编号 limit: 10, offset: 1, }) @@ -104,6 +106,7 @@ // 是否显示当前页,否则跳转第一页 listQuery.offset = 1 } + listQuery.deptId = props.deptId loading.value = true getStaffList(listQuery).then((res) => { list.value = res.data.records diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 72623a6..9f8e6fa 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -116,7 +116,7 @@ } // 点击详情 const handleDetail = (row: ITaskList) => { - $router.push(`/schedule/task/distribute/${row.sampleId}`) + $router.push(`/schedule/task/dispatch/${row.sampleId}?order=${row.orderId}`) } // 点击分发, 弹窗 diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue index 800419d..fbe064c 100644 --- a/src/views/business/lab/myMeasure/myMeasureList.vue +++ b/src/views/business/lab/myMeasure/myMeasureList.vue @@ -4,12 +4,12 @@ import type { DateModelType } from 'element-plus' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import RollbackDialog from './../components/rollbackDialog.vue' -import type { ITaskList, ITaskQuery } from '@/views/business/schedule/task/task-interface' +import type { ILabQuery, ITaskList, ITaskQuery } from '@/views/business/schedule/task/task-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' -import { exportTaskList, getTaskList } from '@/api/business/task' +import { getMyMeasureList } from '@/api/business/task' import type { dictType } from '@/global' const { proxy } = getCurrentInstance() as any const $router = useRouter() @@ -22,28 +22,26 @@ const currentMenu = ref('2') // 当前选中状态 // 查询条件 const timeRange = ref<[DateModelType, DateModelType]>(['', '']) -const listQuery: Ref = ref({ +const listQuery: Ref = ref({ sampleNo: '', // 样品编号 sampleName: '', // 样品名称 orderNo: '', // 委托书编号 customerNo: '', // 委托方代码 customerName: '', // 委托方名称 isUrgent: '', // 是否加急 - sampleAttr: '', // 样品属性 + sampleBelong: '', // 样品属性 startTime: '', // 应检完时间-开始 endTime: '', // 应检完时间-结束 - sendState: '2', // 分发状态 - outState: '', // 超期状态 - formId: 'jlglsygfsp', // 任务分发formId + measureStatus: '2', // 检测状态 offset: 1, limit: 20, }) // --------------获取所需字典值---------------- -const sampleAttrList = ref([]) // 样品属性列表 +const sampleBelongList = ref([]) // 样品属性列表 function getDict() { // 获取样品属性 getDictByCode('sampleBelong').then((response) => { - sampleAttrList.value = response.data + sampleBelongList.value = response.data }) } getDict() @@ -57,9 +55,9 @@ { text: '委托书编号', value: 'orderNo', align: 'center' }, { text: '委托方代码', value: 'customerNo', align: 'center' }, { text: '委托方名称', value: 'customerName', align: 'center' }, - { text: '是否加急', value: 'isUrgent', align: 'center', width: '55px', filter: (row: ITaskList) => { return row.isUrgent == '1' ? '是' : '否' }, styleFilter: (row: ITaskList) => { return row.isUrgent == '1' ? 'color: red' : '' } }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '55px', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '110px' }, - { text: '样品属性', value: 'sampleAttrName', align: 'center' }, + { text: '样品属性', value: 'sampleBelongName', align: 'center' }, { text: '当前检定环节', value: 'currentMeasureStateName', align: 'center', width: '80px' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) @@ -79,18 +77,14 @@ // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - // 模拟数据 - list.value = [ - { orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', isUrgent: '1', sampleAttr: '1', sampleAttrName: '客户样品', sampleModel: 'JBT-011', manufacturingNo: '24432231124', requireOverTime: '2023-02-01', sampleId: '1', currentMeasureState: '1', currentMeasureStateName: '待检测', currentCertifications: 0, requireCertifications: 0, labelBind: '', distributeState: '1', distributeStateName: '初次分发' }, - { orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', isUrgent: '0', sampleAttr: '1', sampleAttrName: '客户样品', sampleModel: 'JBT-011', manufacturingNo: '24432231124', requireOverTime: '2023-02-01', sampleId: '1', currentMeasureState: '1', currentMeasureStateName: '待检测', currentCertifications: 0, requireCertifications: 0, labelBind: '', distributeState: '2', distributeStateName: '退回分发' }, - ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { - // list.value = response.data.rows - // total.value = parseInt(response.data.total) - // loadingTable.value = false - // }) + getMyMeasureList(listQuery.value).then((res) => { + list.value = res.data.rows.map((item: ITaskList) => { + item.isUrgentName = item.isUrgent == 1 ? '是' : '否' + return item + }) + total.value = res.total + loadingTable.value = false + }) } // 多选发生改变时 function handleSelectionChange(e: any) { @@ -110,10 +104,10 @@ customerNo: '', // 委托方代码 customerName: '', // 委托方名称 isUrgent: '', // 是否加急 - sampleAttr: '', // 样品属性 - formId: 'jlglsygfsp', - sendState: '2', // 分发状态 - outState: '', // 超期状态 + sampleBelong: '', // 样品属性 + startTime: '', // 应检完时间-开始 + endTime: '', // 应检完时间-结束 + measureStatus: listQuery.value.measureStatus, // 检测状态 offset: 1, limit: 20, } @@ -249,7 +243,7 @@ // 选择按钮变更 watch(currentMenu, (val: string) => { - listQuery.value.sendState = val + listQuery.value.measureStatus = val fetchData(false) }) @@ -321,15 +315,15 @@ - - + + @@ -343,13 +337,13 @@ 详情 - + 收入 - + 退回 - + 检测完成 diff --git a/src/api/business/task.ts b/src/api/business/task.ts index c7e8343..cba53af 100644 --- a/src/api/business/task.ts +++ b/src/api/business/task.ts @@ -14,6 +14,15 @@ }) } +// 任务分发详情 +export function getTaskDetail(data: { orderId: string; sampleId: string }) { + return request({ + url: '/business/labExecutive/handOut/detail', + method: 'post', + data, + }) +} + // 导出列表 export function exportTaskList(data: Omit) { return request({ @@ -24,10 +33,19 @@ }) } -// 检测流程配置 -export function setMeasureProcess(data: { id: string; scheduleId: string }) { +// 任务分发 +export function setMeasureProcess(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { return request({ - url: `${prefix}/schedule/task/setSchedule`, + url: '/business/labExecutive/handOut/execute', + method: 'post', + data, + }) +} + +// 分发员编辑实验室检测列表 +export function setMeasureProcessByFfy(data: { orderId: string; sampleId: string; measureProcessList: any[] }) { + return request({ + url: '/business/labExecutive/handOut/updateList', method: 'post', data, }) @@ -78,3 +96,20 @@ }) } +// 我的检测-列表 +export function getMyMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/myExecutive/list?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 我的检测-列表 +export function getDeptMeasureList(data: ILabQuery) { + return request({ + url: `/business/labExecutive/deptExecutive/List?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/measureDept.ts b/src/api/measure/measureDept.ts index 3d34a2b..faecb03 100644 --- a/src/api/measure/measureDept.ts +++ b/src/api/measure/measureDept.ts @@ -51,3 +51,12 @@ data, }) } + +// 获取父级组织 +export function getOrganizeList(data: object) { + return request({ + url: '/meter/organize/list', + method: 'post', + data, + }) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index be9415b..127d571 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -51,6 +51,8 @@ name: '', // 姓名 deptId: '', // 部门 administrationJob: '', // 行政职务 + major: '', // 专业 + staffNo: '', // 人员编号 limit: 10, offset: 1, }) @@ -104,6 +106,7 @@ // 是否显示当前页,否则跳转第一页 listQuery.offset = 1 } + listQuery.deptId = props.deptId loading.value = true getStaffList(listQuery).then((res) => { list.value = res.data.records diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 72623a6..9f8e6fa 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -116,7 +116,7 @@ } // 点击详情 const handleDetail = (row: ITaskList) => { - $router.push(`/schedule/task/distribute/${row.sampleId}`) + $router.push(`/schedule/task/dispatch/${row.sampleId}?order=${row.orderId}`) } // 点击分发, 弹窗 diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue index 800419d..fbe064c 100644 --- a/src/views/business/lab/myMeasure/myMeasureList.vue +++ b/src/views/business/lab/myMeasure/myMeasureList.vue @@ -4,12 +4,12 @@ import type { DateModelType } from 'element-plus' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import RollbackDialog from './../components/rollbackDialog.vue' -import type { ITaskList, ITaskQuery } from '@/views/business/schedule/task/task-interface' +import type { ILabQuery, ITaskList, ITaskQuery } from '@/views/business/schedule/task/task-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' -import { exportTaskList, getTaskList } from '@/api/business/task' +import { getMyMeasureList } from '@/api/business/task' import type { dictType } from '@/global' const { proxy } = getCurrentInstance() as any const $router = useRouter() @@ -22,28 +22,26 @@ const currentMenu = ref('2') // 当前选中状态 // 查询条件 const timeRange = ref<[DateModelType, DateModelType]>(['', '']) -const listQuery: Ref = ref({ +const listQuery: Ref = ref({ sampleNo: '', // 样品编号 sampleName: '', // 样品名称 orderNo: '', // 委托书编号 customerNo: '', // 委托方代码 customerName: '', // 委托方名称 isUrgent: '', // 是否加急 - sampleAttr: '', // 样品属性 + sampleBelong: '', // 样品属性 startTime: '', // 应检完时间-开始 endTime: '', // 应检完时间-结束 - sendState: '2', // 分发状态 - outState: '', // 超期状态 - formId: 'jlglsygfsp', // 任务分发formId + measureStatus: '2', // 检测状态 offset: 1, limit: 20, }) // --------------获取所需字典值---------------- -const sampleAttrList = ref([]) // 样品属性列表 +const sampleBelongList = ref([]) // 样品属性列表 function getDict() { // 获取样品属性 getDictByCode('sampleBelong').then((response) => { - sampleAttrList.value = response.data + sampleBelongList.value = response.data }) } getDict() @@ -57,9 +55,9 @@ { text: '委托书编号', value: 'orderNo', align: 'center' }, { text: '委托方代码', value: 'customerNo', align: 'center' }, { text: '委托方名称', value: 'customerName', align: 'center' }, - { text: '是否加急', value: 'isUrgent', align: 'center', width: '55px', filter: (row: ITaskList) => { return row.isUrgent == '1' ? '是' : '否' }, styleFilter: (row: ITaskList) => { return row.isUrgent == '1' ? 'color: red' : '' } }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '55px', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '110px' }, - { text: '样品属性', value: 'sampleAttrName', align: 'center' }, + { text: '样品属性', value: 'sampleBelongName', align: 'center' }, { text: '当前检定环节', value: 'currentMeasureStateName', align: 'center', width: '80px' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) @@ -79,18 +77,14 @@ // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - // 模拟数据 - list.value = [ - { orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', isUrgent: '1', sampleAttr: '1', sampleAttrName: '客户样品', sampleModel: 'JBT-011', manufacturingNo: '24432231124', requireOverTime: '2023-02-01', sampleId: '1', currentMeasureState: '1', currentMeasureStateName: '待检测', currentCertifications: 0, requireCertifications: 0, labelBind: '', distributeState: '1', distributeStateName: '初次分发' }, - { orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', isUrgent: '0', sampleAttr: '1', sampleAttrName: '客户样品', sampleModel: 'JBT-011', manufacturingNo: '24432231124', requireOverTime: '2023-02-01', sampleId: '1', currentMeasureState: '1', currentMeasureStateName: '待检测', currentCertifications: 0, requireCertifications: 0, labelBind: '', distributeState: '2', distributeStateName: '退回分发' }, - ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { - // list.value = response.data.rows - // total.value = parseInt(response.data.total) - // loadingTable.value = false - // }) + getMyMeasureList(listQuery.value).then((res) => { + list.value = res.data.rows.map((item: ITaskList) => { + item.isUrgentName = item.isUrgent == 1 ? '是' : '否' + return item + }) + total.value = res.total + loadingTable.value = false + }) } // 多选发生改变时 function handleSelectionChange(e: any) { @@ -110,10 +104,10 @@ customerNo: '', // 委托方代码 customerName: '', // 委托方名称 isUrgent: '', // 是否加急 - sampleAttr: '', // 样品属性 - formId: 'jlglsygfsp', - sendState: '2', // 分发状态 - outState: '', // 超期状态 + sampleBelong: '', // 样品属性 + startTime: '', // 应检完时间-开始 + endTime: '', // 应检完时间-结束 + measureStatus: listQuery.value.measureStatus, // 检测状态 offset: 1, limit: 20, } @@ -249,7 +243,7 @@ // 选择按钮变更 watch(currentMenu, (val: string) => { - listQuery.value.sendState = val + listQuery.value.measureStatus = val fetchData(false) }) @@ -321,15 +315,15 @@ - - + + @@ -343,13 +337,13 @@ 详情 - + 收入 - + 退回 - + 检测完成 diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue index 61ad34d..2783ee2 100644 --- a/src/views/business/schedule/task/components/chooseLab.vue +++ b/src/views/business/schedule/task/components/chooseLab.vue @@ -3,12 +3,23 @@ import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { ILabList, ILabSearchQuery } from '@/views/business/schedule/task/components/lab-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getOrganizeList } from '@/api/measure/measureDept' +import type { dictType } from '@/global' +import { getDictByCode } from '@/api/system/dict' const emits = defineEmits(['confirmCheckout']) // 是否多选 const multi = ref(false) const dialogVisible = ref(false) +const measureMajorList = ref([]) // 计量专业 +// 获取字典值 +function getDict() { + // 获取计量专业 + getDictByCode('measureMajor').then((response) => { + measureMajorList.value = response.data + }) +} +getDict() // 查询条件 const listQuery = ref({ organizeNo: '', // 实验室编号 @@ -17,15 +28,17 @@ organizeType: '3', // 组织类型 director: '', // 负责人 isLab: '1', // 是否是实验室 - measureItems: '', + createStartTime: '', + createEndTime: '', }) // 表头 const columns = ref([ { text: '实验室名称', value: 'organizeName', width: '160', align: 'center' }, - { text: '所属部门', value: 'pDeptName', align: 'center', width: '150' }, + // { text: '所属部门', value: 'pDeptName', align: 'center', width: '150' }, { text: '负责人', value: 'director', align: 'center', width: '120' }, - { text: '检测能力', value: 'measureItems', align: 'center' }, + { text: '计量专业', value: 'meterMajorName', align: 'center' }, + { text: '实验室能力', value: 'labCapacityName', align: 'center' }, ]) // 表格数据 const list = ref([]) @@ -39,41 +52,11 @@ const singleChecked = ref() // 数据查询 function fetchData(isNowPage = false) { - // getCustomerList(listQuery.value).then((response) => { - // // 模拟数据 - // response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }] - // list.value = response.data.rows.map((item: ILabList) => { - // if (item.companyProvinceName && item.companyCityName) { - // item.briefName = `${item.companyProvinceName}/${item.companyCityName}` - // } - // else { - // item.briefName = item.companyProvinceName || item.companyCityName - // } - // return item - // }) - // total.value = parseInt(response.data.total) - // loadingTable.value = false - // }) - - // 模拟数据 - const response = [ - { id: '1', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '力学检测实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '检测中心', organizeType: '3', remark: '' }, - { id: '2', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '特种检测实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '3', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '电磁兼容实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '4', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环评实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '5', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '几何量实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '检测中心', organizeType: '3', remark: '' }, - { id: '6', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '7', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '8', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '9', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '10', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '11', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '12', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - ] - list.value = response.map((item: ILabList) => { - return item + getOrganizeList(listQuery.value).then((response) => { + list.value = response.data + total.value = parseInt(response.data.length) + loadingTable.value = false }) - total.value = 50 loadingTable.value = false } // 多选发生改变时 @@ -93,7 +76,8 @@ organizeType: '3', // 组织类型 director: '', // 负责人 isLab: '1', // 是否是实验室 - measureItems: '', + createStartTime: '', + createEndTime: '', } } @@ -156,11 +140,18 @@ /> - + placeholder="计量专业" + > + +
@@ -173,6 +164,7 @@ :is-showmulti-select="multi" :is-multi="multi" :pagination="false" + size="small" @multi-select="handleSelectionChange" > diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue index 61ad34d..2783ee2 100644 --- a/src/views/business/schedule/task/components/chooseLab.vue +++ b/src/views/business/schedule/task/components/chooseLab.vue @@ -3,12 +3,23 @@ import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { ILabList, ILabSearchQuery } from '@/views/business/schedule/task/components/lab-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getOrganizeList } from '@/api/measure/measureDept' +import type { dictType } from '@/global' +import { getDictByCode } from '@/api/system/dict' const emits = defineEmits(['confirmCheckout']) // 是否多选 const multi = ref(false) const dialogVisible = ref(false) +const measureMajorList = ref([]) // 计量专业 +// 获取字典值 +function getDict() { + // 获取计量专业 + getDictByCode('measureMajor').then((response) => { + measureMajorList.value = response.data + }) +} +getDict() // 查询条件 const listQuery = ref({ organizeNo: '', // 实验室编号 @@ -17,15 +28,17 @@ organizeType: '3', // 组织类型 director: '', // 负责人 isLab: '1', // 是否是实验室 - measureItems: '', + createStartTime: '', + createEndTime: '', }) // 表头 const columns = ref([ { text: '实验室名称', value: 'organizeName', width: '160', align: 'center' }, - { text: '所属部门', value: 'pDeptName', align: 'center', width: '150' }, + // { text: '所属部门', value: 'pDeptName', align: 'center', width: '150' }, { text: '负责人', value: 'director', align: 'center', width: '120' }, - { text: '检测能力', value: 'measureItems', align: 'center' }, + { text: '计量专业', value: 'meterMajorName', align: 'center' }, + { text: '实验室能力', value: 'labCapacityName', align: 'center' }, ]) // 表格数据 const list = ref([]) @@ -39,41 +52,11 @@ const singleChecked = ref() // 数据查询 function fetchData(isNowPage = false) { - // getCustomerList(listQuery.value).then((response) => { - // // 模拟数据 - // response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }] - // list.value = response.data.rows.map((item: ILabList) => { - // if (item.companyProvinceName && item.companyCityName) { - // item.briefName = `${item.companyProvinceName}/${item.companyCityName}` - // } - // else { - // item.briefName = item.companyProvinceName || item.companyCityName - // } - // return item - // }) - // total.value = parseInt(response.data.total) - // loadingTable.value = false - // }) - - // 模拟数据 - const response = [ - { id: '1', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '力学检测实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '检测中心', organizeType: '3', remark: '' }, - { id: '2', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '特种检测实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '3', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '电磁兼容实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '4', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环评实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '5', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '几何量实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '检测中心', organizeType: '3', remark: '' }, - { id: '6', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '7', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '8', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '9', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '10', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '11', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '12', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - ] - list.value = response.map((item: ILabList) => { - return item + getOrganizeList(listQuery.value).then((response) => { + list.value = response.data + total.value = parseInt(response.data.length) + loadingTable.value = false }) - total.value = 50 loadingTable.value = false } // 多选发生改变时 @@ -93,7 +76,8 @@ organizeType: '3', // 组织类型 director: '', // 负责人 isLab: '1', // 是否是实验室 - measureItems: '', + createStartTime: '', + createEndTime: '', } } @@ -156,11 +140,18 @@ /> - + placeholder="计量专业" + > + +
@@ -173,6 +164,7 @@ :is-showmulti-select="multi" :is-multi="multi" :pagination="false" + size="small" @multi-select="handleSelectionChange" > diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue index 61ad34d..2783ee2 100644 --- a/src/views/business/schedule/task/components/chooseLab.vue +++ b/src/views/business/schedule/task/components/chooseLab.vue @@ -3,12 +3,23 @@ import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { ILabList, ILabSearchQuery } from '@/views/business/schedule/task/components/lab-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getOrganizeList } from '@/api/measure/measureDept' +import type { dictType } from '@/global' +import { getDictByCode } from '@/api/system/dict' const emits = defineEmits(['confirmCheckout']) // 是否多选 const multi = ref(false) const dialogVisible = ref(false) +const measureMajorList = ref([]) // 计量专业 +// 获取字典值 +function getDict() { + // 获取计量专业 + getDictByCode('measureMajor').then((response) => { + measureMajorList.value = response.data + }) +} +getDict() // 查询条件 const listQuery = ref({ organizeNo: '', // 实验室编号 @@ -17,15 +28,17 @@ organizeType: '3', // 组织类型 director: '', // 负责人 isLab: '1', // 是否是实验室 - measureItems: '', + createStartTime: '', + createEndTime: '', }) // 表头 const columns = ref([ { text: '实验室名称', value: 'organizeName', width: '160', align: 'center' }, - { text: '所属部门', value: 'pDeptName', align: 'center', width: '150' }, + // { text: '所属部门', value: 'pDeptName', align: 'center', width: '150' }, { text: '负责人', value: 'director', align: 'center', width: '120' }, - { text: '检测能力', value: 'measureItems', align: 'center' }, + { text: '计量专业', value: 'meterMajorName', align: 'center' }, + { text: '实验室能力', value: 'labCapacityName', align: 'center' }, ]) // 表格数据 const list = ref([]) @@ -39,41 +52,11 @@ const singleChecked = ref() // 数据查询 function fetchData(isNowPage = false) { - // getCustomerList(listQuery.value).then((response) => { - // // 模拟数据 - // response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }] - // list.value = response.data.rows.map((item: ILabList) => { - // if (item.companyProvinceName && item.companyCityName) { - // item.briefName = `${item.companyProvinceName}/${item.companyCityName}` - // } - // else { - // item.briefName = item.companyProvinceName || item.companyCityName - // } - // return item - // }) - // total.value = parseInt(response.data.total) - // loadingTable.value = false - // }) - - // 模拟数据 - const response = [ - { id: '1', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '力学检测实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '检测中心', organizeType: '3', remark: '' }, - { id: '2', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '特种检测实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '3', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '电磁兼容实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '4', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环评实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '5', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '几何量实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '检测中心', organizeType: '3', remark: '' }, - { id: '6', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '7', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '8', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '9', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '10', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '11', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '12', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - ] - list.value = response.map((item: ILabList) => { - return item + getOrganizeList(listQuery.value).then((response) => { + list.value = response.data + total.value = parseInt(response.data.length) + loadingTable.value = false }) - total.value = 50 loadingTable.value = false } // 多选发生改变时 @@ -93,7 +76,8 @@ organizeType: '3', // 组织类型 director: '', // 负责人 isLab: '1', // 是否是实验室 - measureItems: '', + createStartTime: '', + createEndTime: '', } } @@ -156,11 +140,18 @@ /> - + placeholder="计量专业" + > + +
@@ -173,6 +164,7 @@ :is-showmulti-select="multi" :is-multi="multi" :pagination="false" + size="small" @multi-select="handleSelectionChange" > diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue index 61ad34d..2783ee2 100644 --- a/src/views/business/schedule/task/components/chooseLab.vue +++ b/src/views/business/schedule/task/components/chooseLab.vue @@ -3,12 +3,23 @@ import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { ILabList, ILabSearchQuery } from '@/views/business/schedule/task/components/lab-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getOrganizeList } from '@/api/measure/measureDept' +import type { dictType } from '@/global' +import { getDictByCode } from '@/api/system/dict' const emits = defineEmits(['confirmCheckout']) // 是否多选 const multi = ref(false) const dialogVisible = ref(false) +const measureMajorList = ref([]) // 计量专业 +// 获取字典值 +function getDict() { + // 获取计量专业 + getDictByCode('measureMajor').then((response) => { + measureMajorList.value = response.data + }) +} +getDict() // 查询条件 const listQuery = ref({ organizeNo: '', // 实验室编号 @@ -17,15 +28,17 @@ organizeType: '3', // 组织类型 director: '', // 负责人 isLab: '1', // 是否是实验室 - measureItems: '', + createStartTime: '', + createEndTime: '', }) // 表头 const columns = ref([ { text: '实验室名称', value: 'organizeName', width: '160', align: 'center' }, - { text: '所属部门', value: 'pDeptName', align: 'center', width: '150' }, + // { text: '所属部门', value: 'pDeptName', align: 'center', width: '150' }, { text: '负责人', value: 'director', align: 'center', width: '120' }, - { text: '检测能力', value: 'measureItems', align: 'center' }, + { text: '计量专业', value: 'meterMajorName', align: 'center' }, + { text: '实验室能力', value: 'labCapacityName', align: 'center' }, ]) // 表格数据 const list = ref([]) @@ -39,41 +52,11 @@ const singleChecked = ref() // 数据查询 function fetchData(isNowPage = false) { - // getCustomerList(listQuery.value).then((response) => { - // // 模拟数据 - // response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }] - // list.value = response.data.rows.map((item: ILabList) => { - // if (item.companyProvinceName && item.companyCityName) { - // item.briefName = `${item.companyProvinceName}/${item.companyCityName}` - // } - // else { - // item.briefName = item.companyProvinceName || item.companyCityName - // } - // return item - // }) - // total.value = parseInt(response.data.total) - // loadingTable.value = false - // }) - - // 模拟数据 - const response = [ - { id: '1', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '力学检测实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '检测中心', organizeType: '3', remark: '' }, - { id: '2', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '特种检测实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '3', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '电磁兼容实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '4', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环评实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '5', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '几何量实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '检测中心', organizeType: '3', remark: '' }, - { id: '6', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '7', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '8', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '9', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '10', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '11', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '12', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - ] - list.value = response.map((item: ILabList) => { - return item + getOrganizeList(listQuery.value).then((response) => { + list.value = response.data + total.value = parseInt(response.data.length) + loadingTable.value = false }) - total.value = 50 loadingTable.value = false } // 多选发生改变时 @@ -93,7 +76,8 @@ organizeType: '3', // 组织类型 director: '', // 负责人 isLab: '1', // 是否是实验室 - measureItems: '', + createStartTime: '', + createEndTime: '', } } @@ -156,11 +140,18 @@ /> - + placeholder="计量专业" + > + +
@@ -173,6 +164,7 @@ :is-showmulti-select="multi" :is-multi="multi" :pagination="false" + size="small" @multi-select="handleSelectionChange" > diff --git a/src/views/business/schedule/task/components/chooseLab.vue b/src/views/business/schedule/task/components/chooseLab.vue index 61ad34d..2783ee2 100644 --- a/src/views/business/schedule/task/components/chooseLab.vue +++ b/src/views/business/schedule/task/components/chooseLab.vue @@ -3,12 +3,23 @@ import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { ILabList, ILabSearchQuery } from '@/views/business/schedule/task/components/lab-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getOrganizeList } from '@/api/measure/measureDept' +import type { dictType } from '@/global' +import { getDictByCode } from '@/api/system/dict' const emits = defineEmits(['confirmCheckout']) // 是否多选 const multi = ref(false) const dialogVisible = ref(false) +const measureMajorList = ref([]) // 计量专业 +// 获取字典值 +function getDict() { + // 获取计量专业 + getDictByCode('measureMajor').then((response) => { + measureMajorList.value = response.data + }) +} +getDict() // 查询条件 const listQuery = ref({ organizeNo: '', // 实验室编号 @@ -17,15 +28,17 @@ organizeType: '3', // 组织类型 director: '', // 负责人 isLab: '1', // 是否是实验室 - measureItems: '', + createStartTime: '', + createEndTime: '', }) // 表头 const columns = ref([ { text: '实验室名称', value: 'organizeName', width: '160', align: 'center' }, - { text: '所属部门', value: 'pDeptName', align: 'center', width: '150' }, + // { text: '所属部门', value: 'pDeptName', align: 'center', width: '150' }, { text: '负责人', value: 'director', align: 'center', width: '120' }, - { text: '检测能力', value: 'measureItems', align: 'center' }, + { text: '计量专业', value: 'meterMajorName', align: 'center' }, + { text: '实验室能力', value: 'labCapacityName', align: 'center' }, ]) // 表格数据 const list = ref([]) @@ -39,41 +52,11 @@ const singleChecked = ref() // 数据查询 function fetchData(isNowPage = false) { - // getCustomerList(listQuery.value).then((response) => { - // // 模拟数据 - // response.data.rows = [{ bankAccount: '银行账户', bankAccountNumber: '银行账号', bankName: '工商银行', briefName: '京东', businessContent: '电商', businessScope: 'test1', grade: '1', gradeName: 'A', companySize: '1', companySizeName: '小微企业', businessSize: '1', businessSizeName: '0-10万', evaluation: '1', evaluationName: '优质', companyAddress: '五棵松', companyAreaName: '海淀区', companyCityName: '北京市', companyCountryName: '中国', companyProvinceName: '北京', companyArea: '110007', companyCity: '110000', companyCountry: 'CN', companyProvince: '100000', createTime: '2022-11-29 21:14:50', director: '刘强东', fax: 'test1', id: '1597579843411234817', invoiceAddress: '五棵松', invoiceAreaName: '海淀区', invoiceCityName: '北京市', invoiceCountryName: '中国', invoiceProvinceName: '北京', invoiceyArea: '110007', invoiceCity: '110000', invoiceCountry: 'CN', invoiceProvince: '100000', mailbox: 'test1', minioFileName: 'test', mobile: 'test', phone: '950618', postalCode: 'test', remark: 'test', customerName: '京东集团', customerNo: 'sygf202211290001', taxNumber: 'test', updateTime: '2023-01-10 09:56:57', website: 'test' }] - // list.value = response.data.rows.map((item: ILabList) => { - // if (item.companyProvinceName && item.companyCityName) { - // item.briefName = `${item.companyProvinceName}/${item.companyCityName}` - // } - // else { - // item.briefName = item.companyProvinceName || item.companyCityName - // } - // return item - // }) - // total.value = parseInt(response.data.total) - // loadingTable.value = false - // }) - - // 模拟数据 - const response = [ - { id: '1', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '力学检测实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '检测中心', organizeType: '3', remark: '' }, - { id: '2', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '特种检测实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '3', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '电磁兼容实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '4', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环评实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '5', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '几何量实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '检测中心', organizeType: '3', remark: '' }, - { id: '6', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '7', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '8', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '9', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '10', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '11', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - { id: '12', deptId: '1', director: '张三', phone: '1532421', meterMajor: '光学', organizeNo: '121', organizeName: '环境试验实验室', measureItems: '工频耐压、启动电压、净负荷拉力', pDeptId: '', pDeptName: '校准中心', organizeType: '3', remark: '' }, - ] - list.value = response.map((item: ILabList) => { - return item + getOrganizeList(listQuery.value).then((response) => { + list.value = response.data + total.value = parseInt(response.data.length) + loadingTable.value = false }) - total.value = 50 loadingTable.value = false } // 多选发生改变时 @@ -93,7 +76,8 @@ organizeType: '3', // 组织类型 director: '', // 负责人 isLab: '1', // 是否是实验室 - measureItems: '', + createStartTime: '', + createEndTime: '', } } @@ -156,11 +140,18 @@ /> - + placeholder="计量专业" + > + +
@@ -173,6 +164,7 @@ :is-showmulti-select="multi" :is-multi="multi" :pagination="false" + size="small" @multi-select="handleSelectionChange" >