diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 72e3a88..7fa8782 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -4,7 +4,8 @@ import type { IEmployees } from './dialog' import { getStaffList } from '@/api/measure/person' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getDictByCode } from '@/api/system/dict' +import type { dictType } from '@/global' const props = defineProps({ visible: { type: Boolean, @@ -64,6 +65,7 @@ // 默认给deptId赋值 listQuery.deptId = props.deptId const checkedList = ref([]) +const jobList = ref([]) // 职务列表 // 多选的数据 const multipleTable = ref([]) const singleChecked = ref('') // 单选选中id @@ -85,7 +87,12 @@ table.value.clearMulti() } }) - +function getDict() { + // 获取样品属性 + getDictByCode('administrationJob').then((response) => { + jobList.value = response.data + }) +} // 点击确定,保存选择的成员配置 const saveDialog = () => { // 多选 @@ -113,6 +120,7 @@ } listQuery.deptId = props.deptId loading.value = true + // list.value = [] getStaffList(listQuery).then((res) => { list.value = res.data.records.filter((item: any) => { if (props.deptName) { @@ -122,6 +130,9 @@ return item } }) + console.log(props.deptName) + console.log(props.deptId) + console.log(list.value) total.value = parseInt(res.data.total) loading.value = false }) @@ -151,6 +162,7 @@ onMounted(() => { // 获取列表数据 fetchData(true) + getDict() }) defineExpose({ fetchData }) @@ -170,7 +182,9 @@ - + + + diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 72e3a88..7fa8782 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -4,7 +4,8 @@ import type { IEmployees } from './dialog' import { getStaffList } from '@/api/measure/person' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getDictByCode } from '@/api/system/dict' +import type { dictType } from '@/global' const props = defineProps({ visible: { type: Boolean, @@ -64,6 +65,7 @@ // 默认给deptId赋值 listQuery.deptId = props.deptId const checkedList = ref([]) +const jobList = ref([]) // 职务列表 // 多选的数据 const multipleTable = ref([]) const singleChecked = ref('') // 单选选中id @@ -85,7 +87,12 @@ table.value.clearMulti() } }) - +function getDict() { + // 获取样品属性 + getDictByCode('administrationJob').then((response) => { + jobList.value = response.data + }) +} // 点击确定,保存选择的成员配置 const saveDialog = () => { // 多选 @@ -113,6 +120,7 @@ } listQuery.deptId = props.deptId loading.value = true + // list.value = [] getStaffList(listQuery).then((res) => { list.value = res.data.records.filter((item: any) => { if (props.deptName) { @@ -122,6 +130,9 @@ return item } }) + console.log(props.deptName) + console.log(props.deptId) + console.log(list.value) total.value = parseInt(res.data.total) loading.value = false }) @@ -151,6 +162,7 @@ onMounted(() => { // 获取列表数据 fetchData(true) + getDict() }) defineExpose({ fetchData }) @@ -170,7 +182,9 @@ - + + + diff --git a/src/router/modules/financial.ts b/src/router/modules/financial.ts new file mode 100644 index 0000000..35f7bb3 --- /dev/null +++ b/src/router/modules/financial.ts @@ -0,0 +1,34 @@ +// 财务管理 +import type { Route } from '@/global' + +const Layout = () => import('@/layouts/index.vue') + +const routes: Route.recordRaw[] = [ + { + path: '/finance', + component: Layout, + redirect: '/finance/businessSettlement', + name: 'businessSettlement', + meta: { + title: '业务结算', + icon: 'ep:key', + auth: '/finance', + }, + children: [ + { + path: 'businessSettlement', + name: 'businessSettlement', + component: () => import('@/views/finance/businessSettlement/list.vue'), + meta: { + title: '业务结算', + auth: '/finance/businessSettlement', + sidebar: false, + breadcrumb: true, + activeMenu: '/finance/businessSettlement', + }, + }, + ], + }, +] + +export default routes diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 72e3a88..7fa8782 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -4,7 +4,8 @@ import type { IEmployees } from './dialog' import { getStaffList } from '@/api/measure/person' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getDictByCode } from '@/api/system/dict' +import type { dictType } from '@/global' const props = defineProps({ visible: { type: Boolean, @@ -64,6 +65,7 @@ // 默认给deptId赋值 listQuery.deptId = props.deptId const checkedList = ref([]) +const jobList = ref([]) // 职务列表 // 多选的数据 const multipleTable = ref([]) const singleChecked = ref('') // 单选选中id @@ -85,7 +87,12 @@ table.value.clearMulti() } }) - +function getDict() { + // 获取样品属性 + getDictByCode('administrationJob').then((response) => { + jobList.value = response.data + }) +} // 点击确定,保存选择的成员配置 const saveDialog = () => { // 多选 @@ -113,6 +120,7 @@ } listQuery.deptId = props.deptId loading.value = true + // list.value = [] getStaffList(listQuery).then((res) => { list.value = res.data.records.filter((item: any) => { if (props.deptName) { @@ -122,6 +130,9 @@ return item } }) + console.log(props.deptName) + console.log(props.deptId) + console.log(list.value) total.value = parseInt(res.data.total) loading.value = false }) @@ -151,6 +162,7 @@ onMounted(() => { // 获取列表数据 fetchData(true) + getDict() }) defineExpose({ fetchData }) @@ -170,7 +182,9 @@ - + + + diff --git a/src/router/modules/financial.ts b/src/router/modules/financial.ts new file mode 100644 index 0000000..35f7bb3 --- /dev/null +++ b/src/router/modules/financial.ts @@ -0,0 +1,34 @@ +// 财务管理 +import type { Route } from '@/global' + +const Layout = () => import('@/layouts/index.vue') + +const routes: Route.recordRaw[] = [ + { + path: '/finance', + component: Layout, + redirect: '/finance/businessSettlement', + name: 'businessSettlement', + meta: { + title: '业务结算', + icon: 'ep:key', + auth: '/finance', + }, + children: [ + { + path: 'businessSettlement', + name: 'businessSettlement', + component: () => import('@/views/finance/businessSettlement/list.vue'), + meta: { + title: '业务结算', + auth: '/finance/businessSettlement', + sidebar: false, + breadcrumb: true, + activeMenu: '/finance/businessSettlement', + }, + }, + ], + }, +] + +export default routes diff --git a/src/router/routes.ts b/src/router/routes.ts index e1140de..54e0d4c 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,6 +7,7 @@ import deviceRoute from './modules/device' import customerRoute from './modules/customer' import businessRoute from './modules/business' +import financialRoute from './modules/financial' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -123,11 +124,12 @@ meta: { title: '财务产值', icon: '', - auth: 'cwcz', + auth: '/finance', }, children: [ - MultilevelMenuExample, - BreadcrumbExample, + ...financialRoute, + // MultilevelMenuExample, + // BreadcrumbExample, ], }, { diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 72e3a88..7fa8782 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -4,7 +4,8 @@ import type { IEmployees } from './dialog' import { getStaffList } from '@/api/measure/person' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getDictByCode } from '@/api/system/dict' +import type { dictType } from '@/global' const props = defineProps({ visible: { type: Boolean, @@ -64,6 +65,7 @@ // 默认给deptId赋值 listQuery.deptId = props.deptId const checkedList = ref([]) +const jobList = ref([]) // 职务列表 // 多选的数据 const multipleTable = ref([]) const singleChecked = ref('') // 单选选中id @@ -85,7 +87,12 @@ table.value.clearMulti() } }) - +function getDict() { + // 获取样品属性 + getDictByCode('administrationJob').then((response) => { + jobList.value = response.data + }) +} // 点击确定,保存选择的成员配置 const saveDialog = () => { // 多选 @@ -113,6 +120,7 @@ } listQuery.deptId = props.deptId loading.value = true + // list.value = [] getStaffList(listQuery).then((res) => { list.value = res.data.records.filter((item: any) => { if (props.deptName) { @@ -122,6 +130,9 @@ return item } }) + console.log(props.deptName) + console.log(props.deptId) + console.log(list.value) total.value = parseInt(res.data.total) loading.value = false }) @@ -151,6 +162,7 @@ onMounted(() => { // 获取列表数据 fetchData(true) + getDict() }) defineExpose({ fetchData }) @@ -170,7 +182,9 @@ - + + + diff --git a/src/router/modules/financial.ts b/src/router/modules/financial.ts new file mode 100644 index 0000000..35f7bb3 --- /dev/null +++ b/src/router/modules/financial.ts @@ -0,0 +1,34 @@ +// 财务管理 +import type { Route } from '@/global' + +const Layout = () => import('@/layouts/index.vue') + +const routes: Route.recordRaw[] = [ + { + path: '/finance', + component: Layout, + redirect: '/finance/businessSettlement', + name: 'businessSettlement', + meta: { + title: '业务结算', + icon: 'ep:key', + auth: '/finance', + }, + children: [ + { + path: 'businessSettlement', + name: 'businessSettlement', + component: () => import('@/views/finance/businessSettlement/list.vue'), + meta: { + title: '业务结算', + auth: '/finance/businessSettlement', + sidebar: false, + breadcrumb: true, + activeMenu: '/finance/businessSettlement', + }, + }, + ], + }, +] + +export default routes diff --git a/src/router/routes.ts b/src/router/routes.ts index e1140de..54e0d4c 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,6 +7,7 @@ import deviceRoute from './modules/device' import customerRoute from './modules/customer' import businessRoute from './modules/business' +import financialRoute from './modules/financial' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -123,11 +124,12 @@ meta: { title: '财务产值', icon: '', - auth: 'cwcz', + auth: '/finance', }, children: [ - MultilevelMenuExample, - BreadcrumbExample, + ...financialRoute, + // MultilevelMenuExample, + // BreadcrumbExample, ], }, { diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 45b4fe4..f3c730c 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -99,6 +99,7 @@ const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') + localStorage.removeItem('name') localStorage.removeItem('token') this.username = '' this.token = '' @@ -117,6 +118,7 @@ this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips + localStorage.setItem('name', res.data.name) } else { reject('该用户无角色') diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 72e3a88..7fa8782 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -4,7 +4,8 @@ import type { IEmployees } from './dialog' import { getStaffList } from '@/api/measure/person' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getDictByCode } from '@/api/system/dict' +import type { dictType } from '@/global' const props = defineProps({ visible: { type: Boolean, @@ -64,6 +65,7 @@ // 默认给deptId赋值 listQuery.deptId = props.deptId const checkedList = ref([]) +const jobList = ref([]) // 职务列表 // 多选的数据 const multipleTable = ref([]) const singleChecked = ref('') // 单选选中id @@ -85,7 +87,12 @@ table.value.clearMulti() } }) - +function getDict() { + // 获取样品属性 + getDictByCode('administrationJob').then((response) => { + jobList.value = response.data + }) +} // 点击确定,保存选择的成员配置 const saveDialog = () => { // 多选 @@ -113,6 +120,7 @@ } listQuery.deptId = props.deptId loading.value = true + // list.value = [] getStaffList(listQuery).then((res) => { list.value = res.data.records.filter((item: any) => { if (props.deptName) { @@ -122,6 +130,9 @@ return item } }) + console.log(props.deptName) + console.log(props.deptId) + console.log(list.value) total.value = parseInt(res.data.total) loading.value = false }) @@ -151,6 +162,7 @@ onMounted(() => { // 获取列表数据 fetchData(true) + getDict() }) defineExpose({ fetchData }) @@ -170,7 +182,9 @@ - + + + diff --git a/src/router/modules/financial.ts b/src/router/modules/financial.ts new file mode 100644 index 0000000..35f7bb3 --- /dev/null +++ b/src/router/modules/financial.ts @@ -0,0 +1,34 @@ +// 财务管理 +import type { Route } from '@/global' + +const Layout = () => import('@/layouts/index.vue') + +const routes: Route.recordRaw[] = [ + { + path: '/finance', + component: Layout, + redirect: '/finance/businessSettlement', + name: 'businessSettlement', + meta: { + title: '业务结算', + icon: 'ep:key', + auth: '/finance', + }, + children: [ + { + path: 'businessSettlement', + name: 'businessSettlement', + component: () => import('@/views/finance/businessSettlement/list.vue'), + meta: { + title: '业务结算', + auth: '/finance/businessSettlement', + sidebar: false, + breadcrumb: true, + activeMenu: '/finance/businessSettlement', + }, + }, + ], + }, +] + +export default routes diff --git a/src/router/routes.ts b/src/router/routes.ts index e1140de..54e0d4c 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,6 +7,7 @@ import deviceRoute from './modules/device' import customerRoute from './modules/customer' import businessRoute from './modules/business' +import financialRoute from './modules/financial' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -123,11 +124,12 @@ meta: { title: '财务产值', icon: '', - auth: 'cwcz', + auth: '/finance', }, children: [ - MultilevelMenuExample, - BreadcrumbExample, + ...financialRoute, + // MultilevelMenuExample, + // BreadcrumbExample, ], }, { diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 45b4fe4..f3c730c 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -99,6 +99,7 @@ const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') + localStorage.removeItem('name') localStorage.removeItem('token') this.username = '' this.token = '' @@ -117,6 +118,7 @@ this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips + localStorage.setItem('name', res.data.name) } else { reject('该用户无角色') diff --git a/src/views/business/lab/components/distributeDialog.vue b/src/views/business/lab/components/distributeDialog.vue index 83b28ca..18e5ea3 100644 --- a/src/views/business/lab/components/distributeDialog.vue +++ b/src/views/business/lab/components/distributeDialog.vue @@ -28,6 +28,7 @@ remark: '', laboratoryId: '', deptId: '', + deptName: '', }) const processNode = ref({ @@ -52,6 +53,7 @@ measurePersonId: '', // 检定人员id measureSegmentId: '', // 实验室id }) +const _selectStaffDialog = ref() // 初始化弹窗 const initDialog = (id: string, sampleid: string, orderid: string) => { @@ -62,10 +64,20 @@ if (res.data) { sampleDetail.value = res.data sampleDetail.value.laboratoryId = id - sampleDetail.value.deptId = res.data.measureProcessList[0].id // 证书类别 - console.log(res.data.certifications) - sampleDetail.value.certifications = ['1'] // 接口未提供字段,默认先使用1 + console.log(res.data) + sampleDetail.value.certifications = [res.data.measureType] + // sampleDetail.value.deptName = res.data.measureProcessList[0].measureSegment + const ItemInfo = res.data.measureProcessList.filter((item: { measurePerson: any; measureSegmentId: any }) => { + return item.measurePerson == localStorage.name + }) + console.log(ItemInfo) + sampleDetail.value.deptId = ItemInfo[0].measureSegmentId + // 延迟使用,因为还没挂载 + nextTick(() => { + _selectStaffDialog.value.fetchData() + }) + // 接口未提供字段,默认先使用1 // sampleDetail.value.certifications = res.data.certifications.split(',') } }) @@ -158,7 +170,8 @@ 取消 - + + diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 72e3a88..7fa8782 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -4,7 +4,8 @@ import type { IEmployees } from './dialog' import { getStaffList } from '@/api/measure/person' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getDictByCode } from '@/api/system/dict' +import type { dictType } from '@/global' const props = defineProps({ visible: { type: Boolean, @@ -64,6 +65,7 @@ // 默认给deptId赋值 listQuery.deptId = props.deptId const checkedList = ref([]) +const jobList = ref([]) // 职务列表 // 多选的数据 const multipleTable = ref([]) const singleChecked = ref('') // 单选选中id @@ -85,7 +87,12 @@ table.value.clearMulti() } }) - +function getDict() { + // 获取样品属性 + getDictByCode('administrationJob').then((response) => { + jobList.value = response.data + }) +} // 点击确定,保存选择的成员配置 const saveDialog = () => { // 多选 @@ -113,6 +120,7 @@ } listQuery.deptId = props.deptId loading.value = true + // list.value = [] getStaffList(listQuery).then((res) => { list.value = res.data.records.filter((item: any) => { if (props.deptName) { @@ -122,6 +130,9 @@ return item } }) + console.log(props.deptName) + console.log(props.deptId) + console.log(list.value) total.value = parseInt(res.data.total) loading.value = false }) @@ -151,6 +162,7 @@ onMounted(() => { // 获取列表数据 fetchData(true) + getDict() }) defineExpose({ fetchData }) @@ -170,7 +182,9 @@ - + + + diff --git a/src/router/modules/financial.ts b/src/router/modules/financial.ts new file mode 100644 index 0000000..35f7bb3 --- /dev/null +++ b/src/router/modules/financial.ts @@ -0,0 +1,34 @@ +// 财务管理 +import type { Route } from '@/global' + +const Layout = () => import('@/layouts/index.vue') + +const routes: Route.recordRaw[] = [ + { + path: '/finance', + component: Layout, + redirect: '/finance/businessSettlement', + name: 'businessSettlement', + meta: { + title: '业务结算', + icon: 'ep:key', + auth: '/finance', + }, + children: [ + { + path: 'businessSettlement', + name: 'businessSettlement', + component: () => import('@/views/finance/businessSettlement/list.vue'), + meta: { + title: '业务结算', + auth: '/finance/businessSettlement', + sidebar: false, + breadcrumb: true, + activeMenu: '/finance/businessSettlement', + }, + }, + ], + }, +] + +export default routes diff --git a/src/router/routes.ts b/src/router/routes.ts index e1140de..54e0d4c 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,6 +7,7 @@ import deviceRoute from './modules/device' import customerRoute from './modules/customer' import businessRoute from './modules/business' +import financialRoute from './modules/financial' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -123,11 +124,12 @@ meta: { title: '财务产值', icon: '', - auth: 'cwcz', + auth: '/finance', }, children: [ - MultilevelMenuExample, - BreadcrumbExample, + ...financialRoute, + // MultilevelMenuExample, + // BreadcrumbExample, ], }, { diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 45b4fe4..f3c730c 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -99,6 +99,7 @@ const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') + localStorage.removeItem('name') localStorage.removeItem('token') this.username = '' this.token = '' @@ -117,6 +118,7 @@ this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips + localStorage.setItem('name', res.data.name) } else { reject('该用户无角色') diff --git a/src/views/business/lab/components/distributeDialog.vue b/src/views/business/lab/components/distributeDialog.vue index 83b28ca..18e5ea3 100644 --- a/src/views/business/lab/components/distributeDialog.vue +++ b/src/views/business/lab/components/distributeDialog.vue @@ -28,6 +28,7 @@ remark: '', laboratoryId: '', deptId: '', + deptName: '', }) const processNode = ref({ @@ -52,6 +53,7 @@ measurePersonId: '', // 检定人员id measureSegmentId: '', // 实验室id }) +const _selectStaffDialog = ref() // 初始化弹窗 const initDialog = (id: string, sampleid: string, orderid: string) => { @@ -62,10 +64,20 @@ if (res.data) { sampleDetail.value = res.data sampleDetail.value.laboratoryId = id - sampleDetail.value.deptId = res.data.measureProcessList[0].id // 证书类别 - console.log(res.data.certifications) - sampleDetail.value.certifications = ['1'] // 接口未提供字段,默认先使用1 + console.log(res.data) + sampleDetail.value.certifications = [res.data.measureType] + // sampleDetail.value.deptName = res.data.measureProcessList[0].measureSegment + const ItemInfo = res.data.measureProcessList.filter((item: { measurePerson: any; measureSegmentId: any }) => { + return item.measurePerson == localStorage.name + }) + console.log(ItemInfo) + sampleDetail.value.deptId = ItemInfo[0].measureSegmentId + // 延迟使用,因为还没挂载 + nextTick(() => { + _selectStaffDialog.value.fetchData() + }) + // 接口未提供字段,默认先使用1 // sampleDetail.value.certifications = res.data.certifications.split(',') } }) @@ -158,7 +170,8 @@ 取消 - + + diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index a383ed9..bd9c8ee 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -310,11 +310,10 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY-MM-DD" - value-format="YYYY-MM-DD" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="应检完开始时间" end-placeholder="应检完结束时间" - style="width: 280px;" /> diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 72e3a88..7fa8782 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -4,7 +4,8 @@ import type { IEmployees } from './dialog' import { getStaffList } from '@/api/measure/person' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getDictByCode } from '@/api/system/dict' +import type { dictType } from '@/global' const props = defineProps({ visible: { type: Boolean, @@ -64,6 +65,7 @@ // 默认给deptId赋值 listQuery.deptId = props.deptId const checkedList = ref([]) +const jobList = ref([]) // 职务列表 // 多选的数据 const multipleTable = ref([]) const singleChecked = ref('') // 单选选中id @@ -85,7 +87,12 @@ table.value.clearMulti() } }) - +function getDict() { + // 获取样品属性 + getDictByCode('administrationJob').then((response) => { + jobList.value = response.data + }) +} // 点击确定,保存选择的成员配置 const saveDialog = () => { // 多选 @@ -113,6 +120,7 @@ } listQuery.deptId = props.deptId loading.value = true + // list.value = [] getStaffList(listQuery).then((res) => { list.value = res.data.records.filter((item: any) => { if (props.deptName) { @@ -122,6 +130,9 @@ return item } }) + console.log(props.deptName) + console.log(props.deptId) + console.log(list.value) total.value = parseInt(res.data.total) loading.value = false }) @@ -151,6 +162,7 @@ onMounted(() => { // 获取列表数据 fetchData(true) + getDict() }) defineExpose({ fetchData }) @@ -170,7 +182,9 @@ - + + + diff --git a/src/router/modules/financial.ts b/src/router/modules/financial.ts new file mode 100644 index 0000000..35f7bb3 --- /dev/null +++ b/src/router/modules/financial.ts @@ -0,0 +1,34 @@ +// 财务管理 +import type { Route } from '@/global' + +const Layout = () => import('@/layouts/index.vue') + +const routes: Route.recordRaw[] = [ + { + path: '/finance', + component: Layout, + redirect: '/finance/businessSettlement', + name: 'businessSettlement', + meta: { + title: '业务结算', + icon: 'ep:key', + auth: '/finance', + }, + children: [ + { + path: 'businessSettlement', + name: 'businessSettlement', + component: () => import('@/views/finance/businessSettlement/list.vue'), + meta: { + title: '业务结算', + auth: '/finance/businessSettlement', + sidebar: false, + breadcrumb: true, + activeMenu: '/finance/businessSettlement', + }, + }, + ], + }, +] + +export default routes diff --git a/src/router/routes.ts b/src/router/routes.ts index e1140de..54e0d4c 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,6 +7,7 @@ import deviceRoute from './modules/device' import customerRoute from './modules/customer' import businessRoute from './modules/business' +import financialRoute from './modules/financial' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -123,11 +124,12 @@ meta: { title: '财务产值', icon: '', - auth: 'cwcz', + auth: '/finance', }, children: [ - MultilevelMenuExample, - BreadcrumbExample, + ...financialRoute, + // MultilevelMenuExample, + // BreadcrumbExample, ], }, { diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 45b4fe4..f3c730c 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -99,6 +99,7 @@ const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') + localStorage.removeItem('name') localStorage.removeItem('token') this.username = '' this.token = '' @@ -117,6 +118,7 @@ this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips + localStorage.setItem('name', res.data.name) } else { reject('该用户无角色') diff --git a/src/views/business/lab/components/distributeDialog.vue b/src/views/business/lab/components/distributeDialog.vue index 83b28ca..18e5ea3 100644 --- a/src/views/business/lab/components/distributeDialog.vue +++ b/src/views/business/lab/components/distributeDialog.vue @@ -28,6 +28,7 @@ remark: '', laboratoryId: '', deptId: '', + deptName: '', }) const processNode = ref({ @@ -52,6 +53,7 @@ measurePersonId: '', // 检定人员id measureSegmentId: '', // 实验室id }) +const _selectStaffDialog = ref() // 初始化弹窗 const initDialog = (id: string, sampleid: string, orderid: string) => { @@ -62,10 +64,20 @@ if (res.data) { sampleDetail.value = res.data sampleDetail.value.laboratoryId = id - sampleDetail.value.deptId = res.data.measureProcessList[0].id // 证书类别 - console.log(res.data.certifications) - sampleDetail.value.certifications = ['1'] // 接口未提供字段,默认先使用1 + console.log(res.data) + sampleDetail.value.certifications = [res.data.measureType] + // sampleDetail.value.deptName = res.data.measureProcessList[0].measureSegment + const ItemInfo = res.data.measureProcessList.filter((item: { measurePerson: any; measureSegmentId: any }) => { + return item.measurePerson == localStorage.name + }) + console.log(ItemInfo) + sampleDetail.value.deptId = ItemInfo[0].measureSegmentId + // 延迟使用,因为还没挂载 + nextTick(() => { + _selectStaffDialog.value.fetchData() + }) + // 接口未提供字段,默认先使用1 // sampleDetail.value.certifications = res.data.certifications.split(',') } }) @@ -158,7 +170,8 @@ 取消 - + + diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index a383ed9..bd9c8ee 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -310,11 +310,10 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY-MM-DD" - value-format="YYYY-MM-DD" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="应检完开始时间" end-placeholder="应检完结束时间" - style="width: 280px;" /> diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue index 06550a8..62f8830 100644 --- a/src/views/business/lab/myMeasure/myMeasureList.vue +++ b/src/views/business/lab/myMeasure/myMeasureList.vue @@ -340,11 +340,10 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY-MM-DD" - value-format="YYYY-MM-DD" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="应检完开始时间" end-placeholder="应检完结束时间" - style="width: 280px;" /> diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 72e3a88..7fa8782 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -4,7 +4,8 @@ import type { IEmployees } from './dialog' import { getStaffList } from '@/api/measure/person' import type { TableColumn } from '@/components/NormalTable/table_interface' - +import { getDictByCode } from '@/api/system/dict' +import type { dictType } from '@/global' const props = defineProps({ visible: { type: Boolean, @@ -64,6 +65,7 @@ // 默认给deptId赋值 listQuery.deptId = props.deptId const checkedList = ref([]) +const jobList = ref([]) // 职务列表 // 多选的数据 const multipleTable = ref([]) const singleChecked = ref('') // 单选选中id @@ -85,7 +87,12 @@ table.value.clearMulti() } }) - +function getDict() { + // 获取样品属性 + getDictByCode('administrationJob').then((response) => { + jobList.value = response.data + }) +} // 点击确定,保存选择的成员配置 const saveDialog = () => { // 多选 @@ -113,6 +120,7 @@ } listQuery.deptId = props.deptId loading.value = true + // list.value = [] getStaffList(listQuery).then((res) => { list.value = res.data.records.filter((item: any) => { if (props.deptName) { @@ -122,6 +130,9 @@ return item } }) + console.log(props.deptName) + console.log(props.deptId) + console.log(list.value) total.value = parseInt(res.data.total) loading.value = false }) @@ -151,6 +162,7 @@ onMounted(() => { // 获取列表数据 fetchData(true) + getDict() }) defineExpose({ fetchData }) @@ -170,7 +182,9 @@ - + + + diff --git a/src/router/modules/financial.ts b/src/router/modules/financial.ts new file mode 100644 index 0000000..35f7bb3 --- /dev/null +++ b/src/router/modules/financial.ts @@ -0,0 +1,34 @@ +// 财务管理 +import type { Route } from '@/global' + +const Layout = () => import('@/layouts/index.vue') + +const routes: Route.recordRaw[] = [ + { + path: '/finance', + component: Layout, + redirect: '/finance/businessSettlement', + name: 'businessSettlement', + meta: { + title: '业务结算', + icon: 'ep:key', + auth: '/finance', + }, + children: [ + { + path: 'businessSettlement', + name: 'businessSettlement', + component: () => import('@/views/finance/businessSettlement/list.vue'), + meta: { + title: '业务结算', + auth: '/finance/businessSettlement', + sidebar: false, + breadcrumb: true, + activeMenu: '/finance/businessSettlement', + }, + }, + ], + }, +] + +export default routes diff --git a/src/router/routes.ts b/src/router/routes.ts index e1140de..54e0d4c 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -7,6 +7,7 @@ import deviceRoute from './modules/device' import customerRoute from './modules/customer' import businessRoute from './modules/business' +import financialRoute from './modules/financial' import type { Route } from '@/global' import useSettingsStore from '@/store/modules/settings' @@ -123,11 +124,12 @@ meta: { title: '财务产值', icon: '', - auth: 'cwcz', + auth: '/finance', }, children: [ - MultilevelMenuExample, - BreadcrumbExample, + ...financialRoute, + // MultilevelMenuExample, + // BreadcrumbExample, ], }, { diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 45b4fe4..f3c730c 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -99,6 +99,7 @@ const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') + localStorage.removeItem('name') localStorage.removeItem('token') this.username = '' this.token = '' @@ -117,6 +118,7 @@ this.roleList = res.data.roleIds this.roleNames = res.data.roleNames this.roleTips = res.data.roleTips + localStorage.setItem('name', res.data.name) } else { reject('该用户无角色') diff --git a/src/views/business/lab/components/distributeDialog.vue b/src/views/business/lab/components/distributeDialog.vue index 83b28ca..18e5ea3 100644 --- a/src/views/business/lab/components/distributeDialog.vue +++ b/src/views/business/lab/components/distributeDialog.vue @@ -28,6 +28,7 @@ remark: '', laboratoryId: '', deptId: '', + deptName: '', }) const processNode = ref({ @@ -52,6 +53,7 @@ measurePersonId: '', // 检定人员id measureSegmentId: '', // 实验室id }) +const _selectStaffDialog = ref() // 初始化弹窗 const initDialog = (id: string, sampleid: string, orderid: string) => { @@ -62,10 +64,20 @@ if (res.data) { sampleDetail.value = res.data sampleDetail.value.laboratoryId = id - sampleDetail.value.deptId = res.data.measureProcessList[0].id // 证书类别 - console.log(res.data.certifications) - sampleDetail.value.certifications = ['1'] // 接口未提供字段,默认先使用1 + console.log(res.data) + sampleDetail.value.certifications = [res.data.measureType] + // sampleDetail.value.deptName = res.data.measureProcessList[0].measureSegment + const ItemInfo = res.data.measureProcessList.filter((item: { measurePerson: any; measureSegmentId: any }) => { + return item.measurePerson == localStorage.name + }) + console.log(ItemInfo) + sampleDetail.value.deptId = ItemInfo[0].measureSegmentId + // 延迟使用,因为还没挂载 + nextTick(() => { + _selectStaffDialog.value.fetchData() + }) + // 接口未提供字段,默认先使用1 // sampleDetail.value.certifications = res.data.certifications.split(',') } }) @@ -158,7 +170,8 @@ 取消 - + + diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index a383ed9..bd9c8ee 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -310,11 +310,10 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY-MM-DD" - value-format="YYYY-MM-DD" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="应检完开始时间" end-placeholder="应检完结束时间" - style="width: 280px;" /> diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue index 06550a8..62f8830 100644 --- a/src/views/business/lab/myMeasure/myMeasureList.vue +++ b/src/views/business/lab/myMeasure/myMeasureList.vue @@ -340,11 +340,10 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY-MM-DD" - value-format="YYYY-MM-DD" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="应检完开始时间" end-placeholder="应检完结束时间" - style="width: 280px;" /> diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index 9643cb8..510917f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -372,6 +372,13 @@ :data="list" :total="total" :columns="columns" :query="listQuery" :list-loading="loadingTable" is-showmulti-select @change="changePage" @multi-select="handleSelectionChange" > + - + + diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index a383ed9..bd9c8ee 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -310,11 +310,10 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY-MM-DD" - value-format="YYYY-MM-DD" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="应检完开始时间" end-placeholder="应检完结束时间" - style="width: 280px;" /> diff --git a/src/views/business/lab/myMeasure/myMeasureList.vue b/src/views/business/lab/myMeasure/myMeasureList.vue index 06550a8..62f8830 100644 --- a/src/views/business/lab/myMeasure/myMeasureList.vue +++ b/src/views/business/lab/myMeasure/myMeasureList.vue @@ -340,11 +340,10 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY-MM-DD" - value-format="YYYY-MM-DD" + format="YYYY-MM-DD HH:mm:ss" + value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="应检完开始时间" end-placeholder="应检完结束时间" - style="width: 280px;" /> diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index 9643cb8..510917f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -372,6 +372,13 @@ :data="list" :total="total" :columns="columns" :query="listQuery" :list-loading="loadingTable" is-showmulti-select @change="changePage" @multi-select="handleSelectionChange" > +