diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue index c0be801..c0c3744 100644 --- a/src/views/measure/source/components/listApproval.vue +++ b/src/views/measure/source/components/listApproval.vue @@ -2,13 +2,15 @@ import type { PropType, Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IButton, ISupplier, IlistTypes, supplierExportQuery } from '../list_interface' +import type { IButton, ISupplier, IlistTypes, rowReturn, supplierExportQuery } from '../list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getSoucreListDelete, getapprovalListPage, sourceSubmit } from '@/api/measure/source' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { printJSON } from '@/utils/printUtils' import { SCHEDULE } from '@/utils/scheduleDict' import { cancelApproval, submitApproval } from '@/api/approval' +import type { IAddress } from '@/components/AddressSelect/address-interface' + const props = defineProps({ status: { type: String, @@ -20,21 +22,31 @@ }, }) const emit = defineEmits(['setData']) // 关闭 +const companyAddress = ref([]) // 公司地址 // 获取权限 const { proxy } = getCurrentInstance() as any // 操作列宽度-计算属性 const operationWidth = computed(() => { - return props.buttons.length * 40 + 24 + // 审批中状态时候长度返回错误 + if (props.status === '3' || props.status === '6') { + props.buttons.length = 4 // 传递长度 + 判断条件下显示按钮长度 + } + return props.buttons.length * 40 + 23 }) // 查询条件 const listQuery: Ref = ref({ approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -47,8 +59,6 @@ const list = ref([]) // 总数 const total = ref(0) -// 控制审批操作弹窗的开关 -const applyShow = ref(false) // 表头 const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' }, @@ -63,18 +73,11 @@ ]) // 初始化路由 const $router = useRouter() -const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') -// 点击按钮 -const buttonType = ref('') const loadingTable = ref(false) + +// 获取数据 const fetchData = (isNowPage: boolean) => { loadingTable.value = true if (!isNowPage) { @@ -83,15 +86,11 @@ } getapprovalListPage(listQuery.value).then((response) => { list.value = response.data.rows - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] + companyAddress.value = [response.data.rows[0].companyCountry, response.data.rows[0].companyProvince, response.data.rows[0].companyCity, response.data.rows[0].companyArea, response.data.rows[0].companyAddress] total.value = parseInt(response.data.total) + console.log(companyAddress.value) loadingTable.value = false }).catch((_) => { - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] loadingTable.value = false }) } @@ -100,10 +99,16 @@ const handleSelectionChange = (e: any) => { checkoutList.value = e.map((item: { id: string }) => item.id) } -// 点击删除和编辑的参数类型 -interface rowReturn { - id: string - supplierName: string +// 公司地址变化后给对象赋值 +function companyAddressChange(addressObj: IAddress) { + listQuery.value.companyCountry = addressObj.country + listQuery.value.companyProvince = addressObj.province + listQuery.value.companyCity = addressObj.city + listQuery.value.companyArea = addressObj.area + listQuery.value.companyCountryName = addressObj.countryName + listQuery.value.companyProvinceName = addressObj.provinceName + listQuery.value.companyCityName = addressObj.cityName + listQuery.value.companyAreaName = addressObj.areaName } // 点击删除或者取消 const handleDelete = (row: rowReturn) => { @@ -143,7 +148,7 @@ type: 'warning', }, ).then(() => { - cancelApproval(params).then((res) => { + cancelApproval(params).then(() => { ElMessage.success('取消成功') fetchData(true) }) @@ -162,9 +167,14 @@ listQuery.value = { approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -209,8 +219,11 @@ fetchData(true) } // 跳转到详情 -const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) +const goDetail = (row: Omit) => { + $router.push({ + path: `approve/${props.status}/${row.id}`, + query: { ...row }, + }) } // 新建溯源供方 const add = () => { @@ -224,10 +237,7 @@ const approvalSuccess = () => { fetchData(true) } -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} + // 提交 const approvalSubmit = (row: ISupplier) => { ElMessageBox.confirm('确认提交吗?', '提示', { @@ -285,11 +295,12 @@ watch ( () => props.status, (newVal: string) => { - console.log('change status') + console.log('change status', newVal) listQuery.value.approvalStatus = newVal fetchData(false) }, { immediate: true }) + // 打印列表 function printList() { // 打印列 @@ -333,47 +344,105 @@ - + + - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - + 查看 - - 编辑 - - - 编辑 - - - 提交 - - + 同意 - + 驳回 - + 拒绝 - + + 编辑 + + + 提交 + + + 取消 - + + 删除 diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue index c0be801..c0c3744 100644 --- a/src/views/measure/source/components/listApproval.vue +++ b/src/views/measure/source/components/listApproval.vue @@ -2,13 +2,15 @@ import type { PropType, Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IButton, ISupplier, IlistTypes, supplierExportQuery } from '../list_interface' +import type { IButton, ISupplier, IlistTypes, rowReturn, supplierExportQuery } from '../list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getSoucreListDelete, getapprovalListPage, sourceSubmit } from '@/api/measure/source' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { printJSON } from '@/utils/printUtils' import { SCHEDULE } from '@/utils/scheduleDict' import { cancelApproval, submitApproval } from '@/api/approval' +import type { IAddress } from '@/components/AddressSelect/address-interface' + const props = defineProps({ status: { type: String, @@ -20,21 +22,31 @@ }, }) const emit = defineEmits(['setData']) // 关闭 +const companyAddress = ref([]) // 公司地址 // 获取权限 const { proxy } = getCurrentInstance() as any // 操作列宽度-计算属性 const operationWidth = computed(() => { - return props.buttons.length * 40 + 24 + // 审批中状态时候长度返回错误 + if (props.status === '3' || props.status === '6') { + props.buttons.length = 4 // 传递长度 + 判断条件下显示按钮长度 + } + return props.buttons.length * 40 + 23 }) // 查询条件 const listQuery: Ref = ref({ approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -47,8 +59,6 @@ const list = ref([]) // 总数 const total = ref(0) -// 控制审批操作弹窗的开关 -const applyShow = ref(false) // 表头 const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' }, @@ -63,18 +73,11 @@ ]) // 初始化路由 const $router = useRouter() -const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') -// 点击按钮 -const buttonType = ref('') const loadingTable = ref(false) + +// 获取数据 const fetchData = (isNowPage: boolean) => { loadingTable.value = true if (!isNowPage) { @@ -83,15 +86,11 @@ } getapprovalListPage(listQuery.value).then((response) => { list.value = response.data.rows - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] + companyAddress.value = [response.data.rows[0].companyCountry, response.data.rows[0].companyProvince, response.data.rows[0].companyCity, response.data.rows[0].companyArea, response.data.rows[0].companyAddress] total.value = parseInt(response.data.total) + console.log(companyAddress.value) loadingTable.value = false }).catch((_) => { - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] loadingTable.value = false }) } @@ -100,10 +99,16 @@ const handleSelectionChange = (e: any) => { checkoutList.value = e.map((item: { id: string }) => item.id) } -// 点击删除和编辑的参数类型 -interface rowReturn { - id: string - supplierName: string +// 公司地址变化后给对象赋值 +function companyAddressChange(addressObj: IAddress) { + listQuery.value.companyCountry = addressObj.country + listQuery.value.companyProvince = addressObj.province + listQuery.value.companyCity = addressObj.city + listQuery.value.companyArea = addressObj.area + listQuery.value.companyCountryName = addressObj.countryName + listQuery.value.companyProvinceName = addressObj.provinceName + listQuery.value.companyCityName = addressObj.cityName + listQuery.value.companyAreaName = addressObj.areaName } // 点击删除或者取消 const handleDelete = (row: rowReturn) => { @@ -143,7 +148,7 @@ type: 'warning', }, ).then(() => { - cancelApproval(params).then((res) => { + cancelApproval(params).then(() => { ElMessage.success('取消成功') fetchData(true) }) @@ -162,9 +167,14 @@ listQuery.value = { approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -209,8 +219,11 @@ fetchData(true) } // 跳转到详情 -const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) +const goDetail = (row: Omit) => { + $router.push({ + path: `approve/${props.status}/${row.id}`, + query: { ...row }, + }) } // 新建溯源供方 const add = () => { @@ -224,10 +237,7 @@ const approvalSuccess = () => { fetchData(true) } -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} + // 提交 const approvalSubmit = (row: ISupplier) => { ElMessageBox.confirm('确认提交吗?', '提示', { @@ -285,11 +295,12 @@ watch ( () => props.status, (newVal: string) => { - console.log('change status') + console.log('change status', newVal) listQuery.value.approvalStatus = newVal fetchData(false) }, { immediate: true }) + // 打印列表 function printList() { // 打印列 @@ -333,47 +344,105 @@ - + + - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - + 查看 - - 编辑 - - - 编辑 - - - 提交 - - + 同意 - + 驳回 - + 拒绝 - + + 编辑 + + + 提交 + + + 取消 - + + 删除 diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue index 7b89b15..8d9d22d 100644 --- a/src/views/measure/source/components/sourceApprovalDetail.vue +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -1,18 +1,25 @@ + - + 同意 @@ -168,20 +178,6 @@ - - - - - - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} - - - - + + + + diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue index c0be801..c0c3744 100644 --- a/src/views/measure/source/components/listApproval.vue +++ b/src/views/measure/source/components/listApproval.vue @@ -2,13 +2,15 @@ import type { PropType, Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IButton, ISupplier, IlistTypes, supplierExportQuery } from '../list_interface' +import type { IButton, ISupplier, IlistTypes, rowReturn, supplierExportQuery } from '../list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getSoucreListDelete, getapprovalListPage, sourceSubmit } from '@/api/measure/source' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { printJSON } from '@/utils/printUtils' import { SCHEDULE } from '@/utils/scheduleDict' import { cancelApproval, submitApproval } from '@/api/approval' +import type { IAddress } from '@/components/AddressSelect/address-interface' + const props = defineProps({ status: { type: String, @@ -20,21 +22,31 @@ }, }) const emit = defineEmits(['setData']) // 关闭 +const companyAddress = ref([]) // 公司地址 // 获取权限 const { proxy } = getCurrentInstance() as any // 操作列宽度-计算属性 const operationWidth = computed(() => { - return props.buttons.length * 40 + 24 + // 审批中状态时候长度返回错误 + if (props.status === '3' || props.status === '6') { + props.buttons.length = 4 // 传递长度 + 判断条件下显示按钮长度 + } + return props.buttons.length * 40 + 23 }) // 查询条件 const listQuery: Ref = ref({ approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -47,8 +59,6 @@ const list = ref([]) // 总数 const total = ref(0) -// 控制审批操作弹窗的开关 -const applyShow = ref(false) // 表头 const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' }, @@ -63,18 +73,11 @@ ]) // 初始化路由 const $router = useRouter() -const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') -// 点击按钮 -const buttonType = ref('') const loadingTable = ref(false) + +// 获取数据 const fetchData = (isNowPage: boolean) => { loadingTable.value = true if (!isNowPage) { @@ -83,15 +86,11 @@ } getapprovalListPage(listQuery.value).then((response) => { list.value = response.data.rows - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] + companyAddress.value = [response.data.rows[0].companyCountry, response.data.rows[0].companyProvince, response.data.rows[0].companyCity, response.data.rows[0].companyArea, response.data.rows[0].companyAddress] total.value = parseInt(response.data.total) + console.log(companyAddress.value) loadingTable.value = false }).catch((_) => { - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] loadingTable.value = false }) } @@ -100,10 +99,16 @@ const handleSelectionChange = (e: any) => { checkoutList.value = e.map((item: { id: string }) => item.id) } -// 点击删除和编辑的参数类型 -interface rowReturn { - id: string - supplierName: string +// 公司地址变化后给对象赋值 +function companyAddressChange(addressObj: IAddress) { + listQuery.value.companyCountry = addressObj.country + listQuery.value.companyProvince = addressObj.province + listQuery.value.companyCity = addressObj.city + listQuery.value.companyArea = addressObj.area + listQuery.value.companyCountryName = addressObj.countryName + listQuery.value.companyProvinceName = addressObj.provinceName + listQuery.value.companyCityName = addressObj.cityName + listQuery.value.companyAreaName = addressObj.areaName } // 点击删除或者取消 const handleDelete = (row: rowReturn) => { @@ -143,7 +148,7 @@ type: 'warning', }, ).then(() => { - cancelApproval(params).then((res) => { + cancelApproval(params).then(() => { ElMessage.success('取消成功') fetchData(true) }) @@ -162,9 +167,14 @@ listQuery.value = { approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -209,8 +219,11 @@ fetchData(true) } // 跳转到详情 -const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) +const goDetail = (row: Omit) => { + $router.push({ + path: `approve/${props.status}/${row.id}`, + query: { ...row }, + }) } // 新建溯源供方 const add = () => { @@ -224,10 +237,7 @@ const approvalSuccess = () => { fetchData(true) } -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} + // 提交 const approvalSubmit = (row: ISupplier) => { ElMessageBox.confirm('确认提交吗?', '提示', { @@ -285,11 +295,12 @@ watch ( () => props.status, (newVal: string) => { - console.log('change status') + console.log('change status', newVal) listQuery.value.approvalStatus = newVal fetchData(false) }, { immediate: true }) + // 打印列表 function printList() { // 打印列 @@ -333,47 +344,105 @@ - + + - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - + 查看 - - 编辑 - - - 编辑 - - - 提交 - - + 同意 - + 驳回 - + 拒绝 - + + 编辑 + + + 提交 + + + 取消 - + + 删除 diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue index 7b89b15..8d9d22d 100644 --- a/src/views/measure/source/components/sourceApprovalDetail.vue +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -1,18 +1,25 @@ + - + 同意 @@ -168,20 +178,6 @@ - - - - - - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} - - - - + + + + diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index 7cfd1ea..e2778fe 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -6,7 +6,6 @@ import type { TableColumn } from '@/components/NormalTable/table_interface' import { exportSourceList, getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { SCHEDULE } from '@/utils/scheduleDict' @@ -151,9 +150,7 @@ const searchList = () => { fetchData(true) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -167,27 +164,6 @@ fetchData(true) } -// 上传文件/批量导入 -const onFileChange = (event: any) => { - if (event.target.files[0].type === 'application/pdf') { - if (event.target.files?.length !== 0) { - // 创建formdata对象 - const fd = new FormData() - fd.append('multipartFile', event.target.files[0]) - uploadApi(fd).then((res) => { - if (res.code === 200) { - ElMessage.success('上传成功') - } - else { - ElMessage.error(res.message) - } - }) - } - } - else { - ElMessage.error('请上传pdf格式') - } -} // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -294,13 +270,19 @@ - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue index c0be801..c0c3744 100644 --- a/src/views/measure/source/components/listApproval.vue +++ b/src/views/measure/source/components/listApproval.vue @@ -2,13 +2,15 @@ import type { PropType, Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IButton, ISupplier, IlistTypes, supplierExportQuery } from '../list_interface' +import type { IButton, ISupplier, IlistTypes, rowReturn, supplierExportQuery } from '../list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getSoucreListDelete, getapprovalListPage, sourceSubmit } from '@/api/measure/source' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { printJSON } from '@/utils/printUtils' import { SCHEDULE } from '@/utils/scheduleDict' import { cancelApproval, submitApproval } from '@/api/approval' +import type { IAddress } from '@/components/AddressSelect/address-interface' + const props = defineProps({ status: { type: String, @@ -20,21 +22,31 @@ }, }) const emit = defineEmits(['setData']) // 关闭 +const companyAddress = ref([]) // 公司地址 // 获取权限 const { proxy } = getCurrentInstance() as any // 操作列宽度-计算属性 const operationWidth = computed(() => { - return props.buttons.length * 40 + 24 + // 审批中状态时候长度返回错误 + if (props.status === '3' || props.status === '6') { + props.buttons.length = 4 // 传递长度 + 判断条件下显示按钮长度 + } + return props.buttons.length * 40 + 23 }) // 查询条件 const listQuery: Ref = ref({ approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -47,8 +59,6 @@ const list = ref([]) // 总数 const total = ref(0) -// 控制审批操作弹窗的开关 -const applyShow = ref(false) // 表头 const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' }, @@ -63,18 +73,11 @@ ]) // 初始化路由 const $router = useRouter() -const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') -// 点击按钮 -const buttonType = ref('') const loadingTable = ref(false) + +// 获取数据 const fetchData = (isNowPage: boolean) => { loadingTable.value = true if (!isNowPage) { @@ -83,15 +86,11 @@ } getapprovalListPage(listQuery.value).then((response) => { list.value = response.data.rows - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] + companyAddress.value = [response.data.rows[0].companyCountry, response.data.rows[0].companyProvince, response.data.rows[0].companyCity, response.data.rows[0].companyArea, response.data.rows[0].companyAddress] total.value = parseInt(response.data.total) + console.log(companyAddress.value) loadingTable.value = false }).catch((_) => { - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] loadingTable.value = false }) } @@ -100,10 +99,16 @@ const handleSelectionChange = (e: any) => { checkoutList.value = e.map((item: { id: string }) => item.id) } -// 点击删除和编辑的参数类型 -interface rowReturn { - id: string - supplierName: string +// 公司地址变化后给对象赋值 +function companyAddressChange(addressObj: IAddress) { + listQuery.value.companyCountry = addressObj.country + listQuery.value.companyProvince = addressObj.province + listQuery.value.companyCity = addressObj.city + listQuery.value.companyArea = addressObj.area + listQuery.value.companyCountryName = addressObj.countryName + listQuery.value.companyProvinceName = addressObj.provinceName + listQuery.value.companyCityName = addressObj.cityName + listQuery.value.companyAreaName = addressObj.areaName } // 点击删除或者取消 const handleDelete = (row: rowReturn) => { @@ -143,7 +148,7 @@ type: 'warning', }, ).then(() => { - cancelApproval(params).then((res) => { + cancelApproval(params).then(() => { ElMessage.success('取消成功') fetchData(true) }) @@ -162,9 +167,14 @@ listQuery.value = { approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -209,8 +219,11 @@ fetchData(true) } // 跳转到详情 -const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) +const goDetail = (row: Omit) => { + $router.push({ + path: `approve/${props.status}/${row.id}`, + query: { ...row }, + }) } // 新建溯源供方 const add = () => { @@ -224,10 +237,7 @@ const approvalSuccess = () => { fetchData(true) } -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} + // 提交 const approvalSubmit = (row: ISupplier) => { ElMessageBox.confirm('确认提交吗?', '提示', { @@ -285,11 +295,12 @@ watch ( () => props.status, (newVal: string) => { - console.log('change status') + console.log('change status', newVal) listQuery.value.approvalStatus = newVal fetchData(false) }, { immediate: true }) + // 打印列表 function printList() { // 打印列 @@ -333,47 +344,105 @@ - + + - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - + 查看 - - 编辑 - - - 编辑 - - - 提交 - - + 同意 - + 驳回 - + 拒绝 - + + 编辑 + + + 提交 + + + 取消 - + + 删除 diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue index 7b89b15..8d9d22d 100644 --- a/src/views/measure/source/components/sourceApprovalDetail.vue +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -1,18 +1,25 @@ + - + 同意 @@ -168,20 +178,6 @@ - - - - - - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} - - - - + + + + diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index 7cfd1ea..e2778fe 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -6,7 +6,6 @@ import type { TableColumn } from '@/components/NormalTable/table_interface' import { exportSourceList, getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { SCHEDULE } from '@/utils/scheduleDict' @@ -151,9 +150,7 @@ const searchList = () => { fetchData(true) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -167,27 +164,6 @@ fetchData(true) } -// 上传文件/批量导入 -const onFileChange = (event: any) => { - if (event.target.files[0].type === 'application/pdf') { - if (event.target.files?.length !== 0) { - // 创建formdata对象 - const fd = new FormData() - fd.append('multipartFile', event.target.files[0]) - uploadApi(fd).then((res) => { - if (res.code === 200) { - ElMessage.success('上传成功') - } - else { - ElMessage.error(res.message) - } - }) - } - } - else { - ElMessage.error('请上传pdf格式') - } -} // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -294,13 +270,19 @@ - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue index c0be801..c0c3744 100644 --- a/src/views/measure/source/components/listApproval.vue +++ b/src/views/measure/source/components/listApproval.vue @@ -2,13 +2,15 @@ import type { PropType, Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IButton, ISupplier, IlistTypes, supplierExportQuery } from '../list_interface' +import type { IButton, ISupplier, IlistTypes, rowReturn, supplierExportQuery } from '../list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getSoucreListDelete, getapprovalListPage, sourceSubmit } from '@/api/measure/source' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { printJSON } from '@/utils/printUtils' import { SCHEDULE } from '@/utils/scheduleDict' import { cancelApproval, submitApproval } from '@/api/approval' +import type { IAddress } from '@/components/AddressSelect/address-interface' + const props = defineProps({ status: { type: String, @@ -20,21 +22,31 @@ }, }) const emit = defineEmits(['setData']) // 关闭 +const companyAddress = ref([]) // 公司地址 // 获取权限 const { proxy } = getCurrentInstance() as any // 操作列宽度-计算属性 const operationWidth = computed(() => { - return props.buttons.length * 40 + 24 + // 审批中状态时候长度返回错误 + if (props.status === '3' || props.status === '6') { + props.buttons.length = 4 // 传递长度 + 判断条件下显示按钮长度 + } + return props.buttons.length * 40 + 23 }) // 查询条件 const listQuery: Ref = ref({ approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -47,8 +59,6 @@ const list = ref([]) // 总数 const total = ref(0) -// 控制审批操作弹窗的开关 -const applyShow = ref(false) // 表头 const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' }, @@ -63,18 +73,11 @@ ]) // 初始化路由 const $router = useRouter() -const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') -// 点击按钮 -const buttonType = ref('') const loadingTable = ref(false) + +// 获取数据 const fetchData = (isNowPage: boolean) => { loadingTable.value = true if (!isNowPage) { @@ -83,15 +86,11 @@ } getapprovalListPage(listQuery.value).then((response) => { list.value = response.data.rows - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] + companyAddress.value = [response.data.rows[0].companyCountry, response.data.rows[0].companyProvince, response.data.rows[0].companyCity, response.data.rows[0].companyArea, response.data.rows[0].companyAddress] total.value = parseInt(response.data.total) + console.log(companyAddress.value) loadingTable.value = false }).catch((_) => { - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] loadingTable.value = false }) } @@ -100,10 +99,16 @@ const handleSelectionChange = (e: any) => { checkoutList.value = e.map((item: { id: string }) => item.id) } -// 点击删除和编辑的参数类型 -interface rowReturn { - id: string - supplierName: string +// 公司地址变化后给对象赋值 +function companyAddressChange(addressObj: IAddress) { + listQuery.value.companyCountry = addressObj.country + listQuery.value.companyProvince = addressObj.province + listQuery.value.companyCity = addressObj.city + listQuery.value.companyArea = addressObj.area + listQuery.value.companyCountryName = addressObj.countryName + listQuery.value.companyProvinceName = addressObj.provinceName + listQuery.value.companyCityName = addressObj.cityName + listQuery.value.companyAreaName = addressObj.areaName } // 点击删除或者取消 const handleDelete = (row: rowReturn) => { @@ -143,7 +148,7 @@ type: 'warning', }, ).then(() => { - cancelApproval(params).then((res) => { + cancelApproval(params).then(() => { ElMessage.success('取消成功') fetchData(true) }) @@ -162,9 +167,14 @@ listQuery.value = { approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -209,8 +219,11 @@ fetchData(true) } // 跳转到详情 -const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) +const goDetail = (row: Omit) => { + $router.push({ + path: `approve/${props.status}/${row.id}`, + query: { ...row }, + }) } // 新建溯源供方 const add = () => { @@ -224,10 +237,7 @@ const approvalSuccess = () => { fetchData(true) } -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} + // 提交 const approvalSubmit = (row: ISupplier) => { ElMessageBox.confirm('确认提交吗?', '提示', { @@ -285,11 +295,12 @@ watch ( () => props.status, (newVal: string) => { - console.log('change status') + console.log('change status', newVal) listQuery.value.approvalStatus = newVal fetchData(false) }, { immediate: true }) + // 打印列表 function printList() { // 打印列 @@ -333,47 +344,105 @@ - + + - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - + 查看 - - 编辑 - - - 编辑 - - - 提交 - - + 同意 - + 驳回 - + 拒绝 - + + 编辑 + + + 提交 + + + 取消 - + + 删除 diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue index 7b89b15..8d9d22d 100644 --- a/src/views/measure/source/components/sourceApprovalDetail.vue +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -1,18 +1,25 @@ + - + 同意 @@ -168,20 +178,6 @@ - - - - - - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} - - - - + + + + diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index 7cfd1ea..e2778fe 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -6,7 +6,6 @@ import type { TableColumn } from '@/components/NormalTable/table_interface' import { exportSourceList, getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { SCHEDULE } from '@/utils/scheduleDict' @@ -151,9 +150,7 @@ const searchList = () => { fetchData(true) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -167,27 +164,6 @@ fetchData(true) } -// 上传文件/批量导入 -const onFileChange = (event: any) => { - if (event.target.files[0].type === 'application/pdf') { - if (event.target.files?.length !== 0) { - // 创建formdata对象 - const fd = new FormData() - fd.append('multipartFile', event.target.files[0]) - uploadApi(fd).then((res) => { - if (res.code === 200) { - ElMessage.success('上传成功') - } - else { - ElMessage.error(res.message) - } - }) - } - } - else { - ElMessage.error('请上传pdf格式') - } -} // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -294,13 +270,19 @@ - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue index c0be801..c0c3744 100644 --- a/src/views/measure/source/components/listApproval.vue +++ b/src/views/measure/source/components/listApproval.vue @@ -2,13 +2,15 @@ import type { PropType, Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IButton, ISupplier, IlistTypes, supplierExportQuery } from '../list_interface' +import type { IButton, ISupplier, IlistTypes, rowReturn, supplierExportQuery } from '../list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getSoucreListDelete, getapprovalListPage, sourceSubmit } from '@/api/measure/source' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { printJSON } from '@/utils/printUtils' import { SCHEDULE } from '@/utils/scheduleDict' import { cancelApproval, submitApproval } from '@/api/approval' +import type { IAddress } from '@/components/AddressSelect/address-interface' + const props = defineProps({ status: { type: String, @@ -20,21 +22,31 @@ }, }) const emit = defineEmits(['setData']) // 关闭 +const companyAddress = ref([]) // 公司地址 // 获取权限 const { proxy } = getCurrentInstance() as any // 操作列宽度-计算属性 const operationWidth = computed(() => { - return props.buttons.length * 40 + 24 + // 审批中状态时候长度返回错误 + if (props.status === '3' || props.status === '6') { + props.buttons.length = 4 // 传递长度 + 判断条件下显示按钮长度 + } + return props.buttons.length * 40 + 23 }) // 查询条件 const listQuery: Ref = ref({ approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -47,8 +59,6 @@ const list = ref([]) // 总数 const total = ref(0) -// 控制审批操作弹窗的开关 -const applyShow = ref(false) // 表头 const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' }, @@ -63,18 +73,11 @@ ]) // 初始化路由 const $router = useRouter() -const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') -// 点击按钮 -const buttonType = ref('') const loadingTable = ref(false) + +// 获取数据 const fetchData = (isNowPage: boolean) => { loadingTable.value = true if (!isNowPage) { @@ -83,15 +86,11 @@ } getapprovalListPage(listQuery.value).then((response) => { list.value = response.data.rows - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] + companyAddress.value = [response.data.rows[0].companyCountry, response.data.rows[0].companyProvince, response.data.rows[0].companyCity, response.data.rows[0].companyArea, response.data.rows[0].companyAddress] total.value = parseInt(response.data.total) + console.log(companyAddress.value) loadingTable.value = false }).catch((_) => { - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] loadingTable.value = false }) } @@ -100,10 +99,16 @@ const handleSelectionChange = (e: any) => { checkoutList.value = e.map((item: { id: string }) => item.id) } -// 点击删除和编辑的参数类型 -interface rowReturn { - id: string - supplierName: string +// 公司地址变化后给对象赋值 +function companyAddressChange(addressObj: IAddress) { + listQuery.value.companyCountry = addressObj.country + listQuery.value.companyProvince = addressObj.province + listQuery.value.companyCity = addressObj.city + listQuery.value.companyArea = addressObj.area + listQuery.value.companyCountryName = addressObj.countryName + listQuery.value.companyProvinceName = addressObj.provinceName + listQuery.value.companyCityName = addressObj.cityName + listQuery.value.companyAreaName = addressObj.areaName } // 点击删除或者取消 const handleDelete = (row: rowReturn) => { @@ -143,7 +148,7 @@ type: 'warning', }, ).then(() => { - cancelApproval(params).then((res) => { + cancelApproval(params).then(() => { ElMessage.success('取消成功') fetchData(true) }) @@ -162,9 +167,14 @@ listQuery.value = { approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -209,8 +219,11 @@ fetchData(true) } // 跳转到详情 -const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) +const goDetail = (row: Omit) => { + $router.push({ + path: `approve/${props.status}/${row.id}`, + query: { ...row }, + }) } // 新建溯源供方 const add = () => { @@ -224,10 +237,7 @@ const approvalSuccess = () => { fetchData(true) } -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} + // 提交 const approvalSubmit = (row: ISupplier) => { ElMessageBox.confirm('确认提交吗?', '提示', { @@ -285,11 +295,12 @@ watch ( () => props.status, (newVal: string) => { - console.log('change status') + console.log('change status', newVal) listQuery.value.approvalStatus = newVal fetchData(false) }, { immediate: true }) + // 打印列表 function printList() { // 打印列 @@ -333,47 +344,105 @@ - + + - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - + 查看 - - 编辑 - - - 编辑 - - - 提交 - - + 同意 - + 驳回 - + 拒绝 - + + 编辑 + + + 提交 + + + 取消 - + + 删除 diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue index 7b89b15..8d9d22d 100644 --- a/src/views/measure/source/components/sourceApprovalDetail.vue +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -1,18 +1,25 @@ + - + 同意 @@ -168,20 +178,6 @@ - - - - - - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} - - - - + + + + diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index 7cfd1ea..e2778fe 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -6,7 +6,6 @@ import type { TableColumn } from '@/components/NormalTable/table_interface' import { exportSourceList, getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { SCHEDULE } from '@/utils/scheduleDict' @@ -151,9 +150,7 @@ const searchList = () => { fetchData(true) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -167,27 +164,6 @@ fetchData(true) } -// 上传文件/批量导入 -const onFileChange = (event: any) => { - if (event.target.files[0].type === 'application/pdf') { - if (event.target.files?.length !== 0) { - // 创建formdata对象 - const fd = new FormData() - fd.append('multipartFile', event.target.files[0]) - uploadApi(fd).then((res) => { - if (res.code === 200) { - ElMessage.success('上传成功') - } - else { - ElMessage.error(res.message) - } - }) - } - } - else { - ElMessage.error('请上传pdf格式') - } -} // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -294,13 +270,19 @@ - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue index c0be801..c0c3744 100644 --- a/src/views/measure/source/components/listApproval.vue +++ b/src/views/measure/source/components/listApproval.vue @@ -2,13 +2,15 @@ import type { PropType, Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IButton, ISupplier, IlistTypes, supplierExportQuery } from '../list_interface' +import type { IButton, ISupplier, IlistTypes, rowReturn, supplierExportQuery } from '../list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getSoucreListDelete, getapprovalListPage, sourceSubmit } from '@/api/measure/source' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { printJSON } from '@/utils/printUtils' import { SCHEDULE } from '@/utils/scheduleDict' import { cancelApproval, submitApproval } from '@/api/approval' +import type { IAddress } from '@/components/AddressSelect/address-interface' + const props = defineProps({ status: { type: String, @@ -20,21 +22,31 @@ }, }) const emit = defineEmits(['setData']) // 关闭 +const companyAddress = ref([]) // 公司地址 // 获取权限 const { proxy } = getCurrentInstance() as any // 操作列宽度-计算属性 const operationWidth = computed(() => { - return props.buttons.length * 40 + 24 + // 审批中状态时候长度返回错误 + if (props.status === '3' || props.status === '6') { + props.buttons.length = 4 // 传递长度 + 判断条件下显示按钮长度 + } + return props.buttons.length * 40 + 23 }) // 查询条件 const listQuery: Ref = ref({ approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -47,8 +59,6 @@ const list = ref([]) // 总数 const total = ref(0) -// 控制审批操作弹窗的开关 -const applyShow = ref(false) // 表头 const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' }, @@ -63,18 +73,11 @@ ]) // 初始化路由 const $router = useRouter() -const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') -// 点击按钮 -const buttonType = ref('') const loadingTable = ref(false) + +// 获取数据 const fetchData = (isNowPage: boolean) => { loadingTable.value = true if (!isNowPage) { @@ -83,15 +86,11 @@ } getapprovalListPage(listQuery.value).then((response) => { list.value = response.data.rows - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] + companyAddress.value = [response.data.rows[0].companyCountry, response.data.rows[0].companyProvince, response.data.rows[0].companyCity, response.data.rows[0].companyArea, response.data.rows[0].companyAddress] total.value = parseInt(response.data.total) + console.log(companyAddress.value) loadingTable.value = false }).catch((_) => { - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] loadingTable.value = false }) } @@ -100,10 +99,16 @@ const handleSelectionChange = (e: any) => { checkoutList.value = e.map((item: { id: string }) => item.id) } -// 点击删除和编辑的参数类型 -interface rowReturn { - id: string - supplierName: string +// 公司地址变化后给对象赋值 +function companyAddressChange(addressObj: IAddress) { + listQuery.value.companyCountry = addressObj.country + listQuery.value.companyProvince = addressObj.province + listQuery.value.companyCity = addressObj.city + listQuery.value.companyArea = addressObj.area + listQuery.value.companyCountryName = addressObj.countryName + listQuery.value.companyProvinceName = addressObj.provinceName + listQuery.value.companyCityName = addressObj.cityName + listQuery.value.companyAreaName = addressObj.areaName } // 点击删除或者取消 const handleDelete = (row: rowReturn) => { @@ -143,7 +148,7 @@ type: 'warning', }, ).then(() => { - cancelApproval(params).then((res) => { + cancelApproval(params).then(() => { ElMessage.success('取消成功') fetchData(true) }) @@ -162,9 +167,14 @@ listQuery.value = { approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -209,8 +219,11 @@ fetchData(true) } // 跳转到详情 -const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) +const goDetail = (row: Omit) => { + $router.push({ + path: `approve/${props.status}/${row.id}`, + query: { ...row }, + }) } // 新建溯源供方 const add = () => { @@ -224,10 +237,7 @@ const approvalSuccess = () => { fetchData(true) } -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} + // 提交 const approvalSubmit = (row: ISupplier) => { ElMessageBox.confirm('确认提交吗?', '提示', { @@ -285,11 +295,12 @@ watch ( () => props.status, (newVal: string) => { - console.log('change status') + console.log('change status', newVal) listQuery.value.approvalStatus = newVal fetchData(false) }, { immediate: true }) + // 打印列表 function printList() { // 打印列 @@ -333,47 +344,105 @@ - + + - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - + 查看 - - 编辑 - - - 编辑 - - - 提交 - - + 同意 - + 驳回 - + 拒绝 - + + 编辑 + + + 提交 + + + 取消 - + + 删除 diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue index 7b89b15..8d9d22d 100644 --- a/src/views/measure/source/components/sourceApprovalDetail.vue +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -1,18 +1,25 @@ + - + 同意 @@ -168,20 +178,6 @@ - - - - - - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} - - - - + + + + diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index 7cfd1ea..e2778fe 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -6,7 +6,6 @@ import type { TableColumn } from '@/components/NormalTable/table_interface' import { exportSourceList, getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { SCHEDULE } from '@/utils/scheduleDict' @@ -151,9 +150,7 @@ const searchList = () => { fetchData(true) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -167,27 +164,6 @@ fetchData(true) } -// 上传文件/批量导入 -const onFileChange = (event: any) => { - if (event.target.files[0].type === 'application/pdf') { - if (event.target.files?.length !== 0) { - // 创建formdata对象 - const fd = new FormData() - fd.append('multipartFile', event.target.files[0]) - uploadApi(fd).then((res) => { - if (res.code === 200) { - ElMessage.success('上传成功') - } - else { - ElMessage.error(res.message) - } - }) - } - } - else { - ElMessage.error('请上传pdf格式') - } -} // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -294,13 +270,19 @@ - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - diff --git a/src/views/measure/train/components/planApprovalDetail.vue b/src/views/measure/train/components/planApprovalDetail.vue index 8fe0388..38fca62 100644 --- a/src/views/measure/train/components/planApprovalDetail.vue +++ b/src/views/measure/train/components/planApprovalDetail.vue @@ -67,16 +67,6 @@ const getInfo = () => { getListDetail({ id: infoId.value }).then((res) => { dataForm.value.trainStaffList = res.data.trainStaffList - // if (dataForm.value.approvalStatus) { - // // 待审批 - // if (dataForm.value.approvalStatus == '2') { - // buttonArray.value = buttonsSet[dataForm.value.approvalStatus] - // } - // else if (dataForm.value.approvalStatus == '3') { // 审批中 - // // todo:判断当前用户是否为发起人 - // buttonArray.value = buttonsSet[dataForm.value.approvalStatus] - // } - // } }) } getInfo() diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue index c0be801..c0c3744 100644 --- a/src/views/measure/source/components/listApproval.vue +++ b/src/views/measure/source/components/listApproval.vue @@ -2,13 +2,15 @@ import type { PropType, Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IButton, ISupplier, IlistTypes, supplierExportQuery } from '../list_interface' +import type { IButton, ISupplier, IlistTypes, rowReturn, supplierExportQuery } from '../list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getSoucreListDelete, getapprovalListPage, sourceSubmit } from '@/api/measure/source' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { printJSON } from '@/utils/printUtils' import { SCHEDULE } from '@/utils/scheduleDict' import { cancelApproval, submitApproval } from '@/api/approval' +import type { IAddress } from '@/components/AddressSelect/address-interface' + const props = defineProps({ status: { type: String, @@ -20,21 +22,31 @@ }, }) const emit = defineEmits(['setData']) // 关闭 +const companyAddress = ref([]) // 公司地址 // 获取权限 const { proxy } = getCurrentInstance() as any // 操作列宽度-计算属性 const operationWidth = computed(() => { - return props.buttons.length * 40 + 24 + // 审批中状态时候长度返回错误 + if (props.status === '3' || props.status === '6') { + props.buttons.length = 4 // 传递长度 + 判断条件下显示按钮长度 + } + return props.buttons.length * 40 + 23 }) // 查询条件 const listQuery: Ref = ref({ approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -47,8 +59,6 @@ const list = ref([]) // 总数 const total = ref(0) -// 控制审批操作弹窗的开关 -const applyShow = ref(false) // 表头 const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' }, @@ -63,18 +73,11 @@ ]) // 初始化路由 const $router = useRouter() -const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') -// 点击按钮 -const buttonType = ref('') const loadingTable = ref(false) + +// 获取数据 const fetchData = (isNowPage: boolean) => { loadingTable.value = true if (!isNowPage) { @@ -83,15 +86,11 @@ } getapprovalListPage(listQuery.value).then((response) => { list.value = response.data.rows - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] + companyAddress.value = [response.data.rows[0].companyCountry, response.data.rows[0].companyProvince, response.data.rows[0].companyCity, response.data.rows[0].companyArea, response.data.rows[0].companyAddress] total.value = parseInt(response.data.total) + console.log(companyAddress.value) loadingTable.value = false }).catch((_) => { - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] loadingTable.value = false }) } @@ -100,10 +99,16 @@ const handleSelectionChange = (e: any) => { checkoutList.value = e.map((item: { id: string }) => item.id) } -// 点击删除和编辑的参数类型 -interface rowReturn { - id: string - supplierName: string +// 公司地址变化后给对象赋值 +function companyAddressChange(addressObj: IAddress) { + listQuery.value.companyCountry = addressObj.country + listQuery.value.companyProvince = addressObj.province + listQuery.value.companyCity = addressObj.city + listQuery.value.companyArea = addressObj.area + listQuery.value.companyCountryName = addressObj.countryName + listQuery.value.companyProvinceName = addressObj.provinceName + listQuery.value.companyCityName = addressObj.cityName + listQuery.value.companyAreaName = addressObj.areaName } // 点击删除或者取消 const handleDelete = (row: rowReturn) => { @@ -143,7 +148,7 @@ type: 'warning', }, ).then(() => { - cancelApproval(params).then((res) => { + cancelApproval(params).then(() => { ElMessage.success('取消成功') fetchData(true) }) @@ -162,9 +167,14 @@ listQuery.value = { approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -209,8 +219,11 @@ fetchData(true) } // 跳转到详情 -const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) +const goDetail = (row: Omit) => { + $router.push({ + path: `approve/${props.status}/${row.id}`, + query: { ...row }, + }) } // 新建溯源供方 const add = () => { @@ -224,10 +237,7 @@ const approvalSuccess = () => { fetchData(true) } -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} + // 提交 const approvalSubmit = (row: ISupplier) => { ElMessageBox.confirm('确认提交吗?', '提示', { @@ -285,11 +295,12 @@ watch ( () => props.status, (newVal: string) => { - console.log('change status') + console.log('change status', newVal) listQuery.value.approvalStatus = newVal fetchData(false) }, { immediate: true }) + // 打印列表 function printList() { // 打印列 @@ -333,47 +344,105 @@ - + + - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - + 查看 - - 编辑 - - - 编辑 - - - 提交 - - + 同意 - + 驳回 - + 拒绝 - + + 编辑 + + + 提交 + + + 取消 - + + 删除 diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue index 7b89b15..8d9d22d 100644 --- a/src/views/measure/source/components/sourceApprovalDetail.vue +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -1,18 +1,25 @@ + - + 同意 @@ -168,20 +178,6 @@ - - - - - - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} - - - - + + + + diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index 7cfd1ea..e2778fe 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -6,7 +6,6 @@ import type { TableColumn } from '@/components/NormalTable/table_interface' import { exportSourceList, getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { SCHEDULE } from '@/utils/scheduleDict' @@ -151,9 +150,7 @@ const searchList = () => { fetchData(true) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -167,27 +164,6 @@ fetchData(true) } -// 上传文件/批量导入 -const onFileChange = (event: any) => { - if (event.target.files[0].type === 'application/pdf') { - if (event.target.files?.length !== 0) { - // 创建formdata对象 - const fd = new FormData() - fd.append('multipartFile', event.target.files[0]) - uploadApi(fd).then((res) => { - if (res.code === 200) { - ElMessage.success('上传成功') - } - else { - ElMessage.error(res.message) - } - }) - } - } - else { - ElMessage.error('请上传pdf格式') - } -} // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -294,13 +270,19 @@ - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - diff --git a/src/views/measure/train/components/planApprovalDetail.vue b/src/views/measure/train/components/planApprovalDetail.vue index 8fe0388..38fca62 100644 --- a/src/views/measure/train/components/planApprovalDetail.vue +++ b/src/views/measure/train/components/planApprovalDetail.vue @@ -67,16 +67,6 @@ const getInfo = () => { getListDetail({ id: infoId.value }).then((res) => { dataForm.value.trainStaffList = res.data.trainStaffList - // if (dataForm.value.approvalStatus) { - // // 待审批 - // if (dataForm.value.approvalStatus == '2') { - // buttonArray.value = buttonsSet[dataForm.value.approvalStatus] - // } - // else if (dataForm.value.approvalStatus == '3') { // 审批中 - // // todo:判断当前用户是否为发起人 - // buttonArray.value = buttonsSet[dataForm.value.approvalStatus] - // } - // } }) } getInfo() diff --git a/src/views/measure/train/trainLog.vue b/src/views/measure/train/trainLog.vue index f433559..13ebd99 100644 --- a/src/views/measure/train/trainLog.vue +++ b/src/views/measure/train/trainLog.vue @@ -38,7 +38,7 @@ listQuery.value.trainStartTime = trainTime.value[0] || '' listQuery.value.trainEndTime = trainTime.value[1] || '' listQuery.value.createStartTime = createTime.value[0] || '' - listQuery.value.createEndTime = createTime.value[0] || '' + listQuery.value.createEndTime = createTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 @@ -199,7 +199,7 @@ v-model="trainTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="培训时间开始时间" end-placeholder="培训时间结束时间" @@ -210,10 +210,10 @@ v-model="createTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="培训时间开始时间" - end-placeholder="培训时间结束时间" + start-placeholder="创建时间开始时间" + end-placeholder="创建时间结束时间" /> diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue index c0be801..c0c3744 100644 --- a/src/views/measure/source/components/listApproval.vue +++ b/src/views/measure/source/components/listApproval.vue @@ -2,13 +2,15 @@ import type { PropType, Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IButton, ISupplier, IlistTypes, supplierExportQuery } from '../list_interface' +import type { IButton, ISupplier, IlistTypes, rowReturn, supplierExportQuery } from '../list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getSoucreListDelete, getapprovalListPage, sourceSubmit } from '@/api/measure/source' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { printJSON } from '@/utils/printUtils' import { SCHEDULE } from '@/utils/scheduleDict' import { cancelApproval, submitApproval } from '@/api/approval' +import type { IAddress } from '@/components/AddressSelect/address-interface' + const props = defineProps({ status: { type: String, @@ -20,21 +22,31 @@ }, }) const emit = defineEmits(['setData']) // 关闭 +const companyAddress = ref([]) // 公司地址 // 获取权限 const { proxy } = getCurrentInstance() as any // 操作列宽度-计算属性 const operationWidth = computed(() => { - return props.buttons.length * 40 + 24 + // 审批中状态时候长度返回错误 + if (props.status === '3' || props.status === '6') { + props.buttons.length = 4 // 传递长度 + 判断条件下显示按钮长度 + } + return props.buttons.length * 40 + 23 }) // 查询条件 const listQuery: Ref = ref({ approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -47,8 +59,6 @@ const list = ref([]) // 总数 const total = ref(0) -// 控制审批操作弹窗的开关 -const applyShow = ref(false) // 表头 const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' }, @@ -63,18 +73,11 @@ ]) // 初始化路由 const $router = useRouter() -const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') -// 点击按钮 -const buttonType = ref('') const loadingTable = ref(false) + +// 获取数据 const fetchData = (isNowPage: boolean) => { loadingTable.value = true if (!isNowPage) { @@ -83,15 +86,11 @@ } getapprovalListPage(listQuery.value).then((response) => { list.value = response.data.rows - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] + companyAddress.value = [response.data.rows[0].companyCountry, response.data.rows[0].companyProvince, response.data.rows[0].companyCity, response.data.rows[0].companyArea, response.data.rows[0].companyAddress] total.value = parseInt(response.data.total) + console.log(companyAddress.value) loadingTable.value = false }).catch((_) => { - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] loadingTable.value = false }) } @@ -100,10 +99,16 @@ const handleSelectionChange = (e: any) => { checkoutList.value = e.map((item: { id: string }) => item.id) } -// 点击删除和编辑的参数类型 -interface rowReturn { - id: string - supplierName: string +// 公司地址变化后给对象赋值 +function companyAddressChange(addressObj: IAddress) { + listQuery.value.companyCountry = addressObj.country + listQuery.value.companyProvince = addressObj.province + listQuery.value.companyCity = addressObj.city + listQuery.value.companyArea = addressObj.area + listQuery.value.companyCountryName = addressObj.countryName + listQuery.value.companyProvinceName = addressObj.provinceName + listQuery.value.companyCityName = addressObj.cityName + listQuery.value.companyAreaName = addressObj.areaName } // 点击删除或者取消 const handleDelete = (row: rowReturn) => { @@ -143,7 +148,7 @@ type: 'warning', }, ).then(() => { - cancelApproval(params).then((res) => { + cancelApproval(params).then(() => { ElMessage.success('取消成功') fetchData(true) }) @@ -162,9 +167,14 @@ listQuery.value = { approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -209,8 +219,11 @@ fetchData(true) } // 跳转到详情 -const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) +const goDetail = (row: Omit) => { + $router.push({ + path: `approve/${props.status}/${row.id}`, + query: { ...row }, + }) } // 新建溯源供方 const add = () => { @@ -224,10 +237,7 @@ const approvalSuccess = () => { fetchData(true) } -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} + // 提交 const approvalSubmit = (row: ISupplier) => { ElMessageBox.confirm('确认提交吗?', '提示', { @@ -285,11 +295,12 @@ watch ( () => props.status, (newVal: string) => { - console.log('change status') + console.log('change status', newVal) listQuery.value.approvalStatus = newVal fetchData(false) }, { immediate: true }) + // 打印列表 function printList() { // 打印列 @@ -333,47 +344,105 @@ - + + - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - + 查看 - - 编辑 - - - 编辑 - - - 提交 - - + 同意 - + 驳回 - + 拒绝 - + + 编辑 + + + 提交 + + + 取消 - + + 删除 diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue index 7b89b15..8d9d22d 100644 --- a/src/views/measure/source/components/sourceApprovalDetail.vue +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -1,18 +1,25 @@ + - + 同意 @@ -168,20 +178,6 @@ - - - - - - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} - - - - + + + + diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index 7cfd1ea..e2778fe 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -6,7 +6,6 @@ import type { TableColumn } from '@/components/NormalTable/table_interface' import { exportSourceList, getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { SCHEDULE } from '@/utils/scheduleDict' @@ -151,9 +150,7 @@ const searchList = () => { fetchData(true) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -167,27 +164,6 @@ fetchData(true) } -// 上传文件/批量导入 -const onFileChange = (event: any) => { - if (event.target.files[0].type === 'application/pdf') { - if (event.target.files?.length !== 0) { - // 创建formdata对象 - const fd = new FormData() - fd.append('multipartFile', event.target.files[0]) - uploadApi(fd).then((res) => { - if (res.code === 200) { - ElMessage.success('上传成功') - } - else { - ElMessage.error(res.message) - } - }) - } - } - else { - ElMessage.error('请上传pdf格式') - } -} // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -294,13 +270,19 @@ - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - diff --git a/src/views/measure/train/components/planApprovalDetail.vue b/src/views/measure/train/components/planApprovalDetail.vue index 8fe0388..38fca62 100644 --- a/src/views/measure/train/components/planApprovalDetail.vue +++ b/src/views/measure/train/components/planApprovalDetail.vue @@ -67,16 +67,6 @@ const getInfo = () => { getListDetail({ id: infoId.value }).then((res) => { dataForm.value.trainStaffList = res.data.trainStaffList - // if (dataForm.value.approvalStatus) { - // // 待审批 - // if (dataForm.value.approvalStatus == '2') { - // buttonArray.value = buttonsSet[dataForm.value.approvalStatus] - // } - // else if (dataForm.value.approvalStatus == '3') { // 审批中 - // // todo:判断当前用户是否为发起人 - // buttonArray.value = buttonsSet[dataForm.value.approvalStatus] - // } - // } }) } getInfo() diff --git a/src/views/measure/train/trainLog.vue b/src/views/measure/train/trainLog.vue index f433559..13ebd99 100644 --- a/src/views/measure/train/trainLog.vue +++ b/src/views/measure/train/trainLog.vue @@ -38,7 +38,7 @@ listQuery.value.trainStartTime = trainTime.value[0] || '' listQuery.value.trainEndTime = trainTime.value[1] || '' listQuery.value.createStartTime = createTime.value[0] || '' - listQuery.value.createEndTime = createTime.value[0] || '' + listQuery.value.createEndTime = createTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 @@ -199,7 +199,7 @@ v-model="trainTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="培训时间开始时间" end-placeholder="培训时间结束时间" @@ -210,10 +210,10 @@ v-model="createTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="培训时间开始时间" - end-placeholder="培训时间结束时间" + start-placeholder="创建时间开始时间" + end-placeholder="创建时间结束时间" /> diff --git a/src/views/system/log/listErrorLog.vue b/src/views/system/log/listErrorLog.vue index 1911945..2237efd 100644 --- a/src/views/system/log/listErrorLog.vue +++ b/src/views/system/log/listErrorLog.vue @@ -98,7 +98,7 @@ @@ -106,7 +106,7 @@ diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue index c0be801..c0c3744 100644 --- a/src/views/measure/source/components/listApproval.vue +++ b/src/views/measure/source/components/listApproval.vue @@ -2,13 +2,15 @@ import type { PropType, Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IButton, ISupplier, IlistTypes, supplierExportQuery } from '../list_interface' +import type { IButton, ISupplier, IlistTypes, rowReturn, supplierExportQuery } from '../list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getSoucreListDelete, getapprovalListPage, sourceSubmit } from '@/api/measure/source' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { printJSON } from '@/utils/printUtils' import { SCHEDULE } from '@/utils/scheduleDict' import { cancelApproval, submitApproval } from '@/api/approval' +import type { IAddress } from '@/components/AddressSelect/address-interface' + const props = defineProps({ status: { type: String, @@ -20,21 +22,31 @@ }, }) const emit = defineEmits(['setData']) // 关闭 +const companyAddress = ref([]) // 公司地址 // 获取权限 const { proxy } = getCurrentInstance() as any // 操作列宽度-计算属性 const operationWidth = computed(() => { - return props.buttons.length * 40 + 24 + // 审批中状态时候长度返回错误 + if (props.status === '3' || props.status === '6') { + props.buttons.length = 4 // 传递长度 + 判断条件下显示按钮长度 + } + return props.buttons.length * 40 + 23 }) // 查询条件 const listQuery: Ref = ref({ approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -47,8 +59,6 @@ const list = ref([]) // 总数 const total = ref(0) -// 控制审批操作弹窗的开关 -const applyShow = ref(false) // 表头 const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' }, @@ -63,18 +73,11 @@ ]) // 初始化路由 const $router = useRouter() -const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') -// 点击按钮 -const buttonType = ref('') const loadingTable = ref(false) + +// 获取数据 const fetchData = (isNowPage: boolean) => { loadingTable.value = true if (!isNowPage) { @@ -83,15 +86,11 @@ } getapprovalListPage(listQuery.value).then((response) => { list.value = response.data.rows - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] + companyAddress.value = [response.data.rows[0].companyCountry, response.data.rows[0].companyProvince, response.data.rows[0].companyCity, response.data.rows[0].companyArea, response.data.rows[0].companyAddress] total.value = parseInt(response.data.total) + console.log(companyAddress.value) loadingTable.value = false }).catch((_) => { - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] loadingTable.value = false }) } @@ -100,10 +99,16 @@ const handleSelectionChange = (e: any) => { checkoutList.value = e.map((item: { id: string }) => item.id) } -// 点击删除和编辑的参数类型 -interface rowReturn { - id: string - supplierName: string +// 公司地址变化后给对象赋值 +function companyAddressChange(addressObj: IAddress) { + listQuery.value.companyCountry = addressObj.country + listQuery.value.companyProvince = addressObj.province + listQuery.value.companyCity = addressObj.city + listQuery.value.companyArea = addressObj.area + listQuery.value.companyCountryName = addressObj.countryName + listQuery.value.companyProvinceName = addressObj.provinceName + listQuery.value.companyCityName = addressObj.cityName + listQuery.value.companyAreaName = addressObj.areaName } // 点击删除或者取消 const handleDelete = (row: rowReturn) => { @@ -143,7 +148,7 @@ type: 'warning', }, ).then(() => { - cancelApproval(params).then((res) => { + cancelApproval(params).then(() => { ElMessage.success('取消成功') fetchData(true) }) @@ -162,9 +167,14 @@ listQuery.value = { approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -209,8 +219,11 @@ fetchData(true) } // 跳转到详情 -const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) +const goDetail = (row: Omit) => { + $router.push({ + path: `approve/${props.status}/${row.id}`, + query: { ...row }, + }) } // 新建溯源供方 const add = () => { @@ -224,10 +237,7 @@ const approvalSuccess = () => { fetchData(true) } -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} + // 提交 const approvalSubmit = (row: ISupplier) => { ElMessageBox.confirm('确认提交吗?', '提示', { @@ -285,11 +295,12 @@ watch ( () => props.status, (newVal: string) => { - console.log('change status') + console.log('change status', newVal) listQuery.value.approvalStatus = newVal fetchData(false) }, { immediate: true }) + // 打印列表 function printList() { // 打印列 @@ -333,47 +344,105 @@ - + + - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - + 查看 - - 编辑 - - - 编辑 - - - 提交 - - + 同意 - + 驳回 - + 拒绝 - + + 编辑 + + + 提交 + + + 取消 - + + 删除 diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue index 7b89b15..8d9d22d 100644 --- a/src/views/measure/source/components/sourceApprovalDetail.vue +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -1,18 +1,25 @@ + - + 同意 @@ -168,20 +178,6 @@ - - - - - - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} - - - - + + + + diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index 7cfd1ea..e2778fe 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -6,7 +6,6 @@ import type { TableColumn } from '@/components/NormalTable/table_interface' import { exportSourceList, getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { SCHEDULE } from '@/utils/scheduleDict' @@ -151,9 +150,7 @@ const searchList = () => { fetchData(true) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -167,27 +164,6 @@ fetchData(true) } -// 上传文件/批量导入 -const onFileChange = (event: any) => { - if (event.target.files[0].type === 'application/pdf') { - if (event.target.files?.length !== 0) { - // 创建formdata对象 - const fd = new FormData() - fd.append('multipartFile', event.target.files[0]) - uploadApi(fd).then((res) => { - if (res.code === 200) { - ElMessage.success('上传成功') - } - else { - ElMessage.error(res.message) - } - }) - } - } - else { - ElMessage.error('请上传pdf格式') - } -} // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -294,13 +270,19 @@ - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - diff --git a/src/views/measure/train/components/planApprovalDetail.vue b/src/views/measure/train/components/planApprovalDetail.vue index 8fe0388..38fca62 100644 --- a/src/views/measure/train/components/planApprovalDetail.vue +++ b/src/views/measure/train/components/planApprovalDetail.vue @@ -67,16 +67,6 @@ const getInfo = () => { getListDetail({ id: infoId.value }).then((res) => { dataForm.value.trainStaffList = res.data.trainStaffList - // if (dataForm.value.approvalStatus) { - // // 待审批 - // if (dataForm.value.approvalStatus == '2') { - // buttonArray.value = buttonsSet[dataForm.value.approvalStatus] - // } - // else if (dataForm.value.approvalStatus == '3') { // 审批中 - // // todo:判断当前用户是否为发起人 - // buttonArray.value = buttonsSet[dataForm.value.approvalStatus] - // } - // } }) } getInfo() diff --git a/src/views/measure/train/trainLog.vue b/src/views/measure/train/trainLog.vue index f433559..13ebd99 100644 --- a/src/views/measure/train/trainLog.vue +++ b/src/views/measure/train/trainLog.vue @@ -38,7 +38,7 @@ listQuery.value.trainStartTime = trainTime.value[0] || '' listQuery.value.trainEndTime = trainTime.value[1] || '' listQuery.value.createStartTime = createTime.value[0] || '' - listQuery.value.createEndTime = createTime.value[0] || '' + listQuery.value.createEndTime = createTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 @@ -199,7 +199,7 @@ v-model="trainTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="培训时间开始时间" end-placeholder="培训时间结束时间" @@ -210,10 +210,10 @@ v-model="createTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="培训时间开始时间" - end-placeholder="培训时间结束时间" + start-placeholder="创建时间开始时间" + end-placeholder="创建时间结束时间" /> diff --git a/src/views/system/log/listErrorLog.vue b/src/views/system/log/listErrorLog.vue index 1911945..2237efd 100644 --- a/src/views/system/log/listErrorLog.vue +++ b/src/views/system/log/listErrorLog.vue @@ -98,7 +98,7 @@ @@ -106,7 +106,7 @@ diff --git a/src/views/system/log/listLog.vue b/src/views/system/log/listLog.vue index c225b53..a13655d 100644 --- a/src/views/system/log/listLog.vue +++ b/src/views/system/log/listLog.vue @@ -137,7 +137,7 @@ @@ -145,7 +145,7 @@ diff --git a/src/api/device/checkList.ts b/src/api/device/checkList.ts index 6afd53a..f12a3bd 100644 --- a/src/api/device/checkList.ts +++ b/src/api/device/checkList.ts @@ -107,6 +107,14 @@ data, }) } +// 设备检修列表编辑-未通过-驳回编辑 +export function failUpdateEquipmentApply(data: object) { + return request({ + url: '/equipmentApply/failUpdate', + method: 'post', + data, + }) +} // 设备检修保养验收单保存 export function addAcceptanceCheck(data: object) { diff --git a/src/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue index 9cbd57f..2490650 100644 --- a/src/components/AddressSelect/AddressSelect.vue +++ b/src/components/AddressSelect/AddressSelect.vue @@ -11,6 +11,13 @@ default: () => [], }, /** + * 是否显示详细地址 + */ + isShowDetailedAddress: { + type: Boolean, + default: true, + }, + /** * 是否可编辑 */ disabled: { @@ -160,7 +167,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.province" placeholder="省" - :disabled="detail" + :disabled="detail || !addressObj.country" class="address-select" @change="provinceChange" > @@ -184,7 +191,7 @@ v-if="!detail && (addressObj.country === '' || addressObj.country === 'CN')" v-model="addressObj.city" placeholder="市" - :disabled="detail" + :disabled="detail || !addressObj.province" class="address-select" @change="cityChange" > @@ -209,7 +216,7 @@ v-model="addressObj.area" placeholder="区/县" class="address-select" - :disabled="detail" + :disabled="detail || !addressObj.city" @change="areaChange" > props.approvalRecordData, (newValue) => { diff --git a/src/components/buttonBox/buttonBox.ts b/src/components/buttonBox/buttonBox.ts index 96daa58..b339554 100644 --- a/src/components/buttonBox/buttonBox.ts +++ b/src/components/buttonBox/buttonBox.ts @@ -1,4 +1,5 @@ export interface IMenu { name: string // 名字 - id: string + id?: string + value?: string } diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 2fe1125..77e2576 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -410,9 +410,9 @@ }, }, { - path: 'maintenanceList/:type/:id?/:processId?', + path: 'maintenanceList/:type/:id?/:approvalStatusName?/:processId?', name: 'maintenanceAdd', - component: () => import('@/views/device/deviceMaintenance/components/listPageAdd.vue'), + component: () => import('@/views/device/deviceMaintenance/components/maintenanceDetail.vue'), meta: { title: '设备检修列表', icon: 'ep:key', diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index 2e90deb..f846c51 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -190,13 +190,13 @@ myTestsPieTitle.value = 41 }, 1) // 按钮跳转数据 -const buttomTypes = ref([ - { id: '1', text: '证书打印', url: '/train/trainLog' }, - { id: '2', text: '环境记录单', url: '/person/remind' }, - { id: '3', text: '原始记录', url: '/source/list' }, - { id: '4', text: '现场检测申请', url: '/measureDept/ks' }, - { id: '5', text: '分包项目登记', url: '/measureDept/gcz' }, - { id: '6', text: '分包方档案', url: '/person/list' }, +const buttonTypes = ref([ + { id: '1', text: '证书打印', url: '/schedule/certPrintList' }, + { id: '2', text: '环境记录单', url: '/lab/environmentalList' }, + { id: '3', text: '原始记录', url: '/lab/primitiveLogList' }, + { id: '4', text: '现场检测申请', url: '' }, + { id: '5', text: '分包项目登记', url: '' }, + { id: '6', text: '分包方档案', url: '' }, ]) // 当前进行中样品状态数据 const statusData = ref([ @@ -205,6 +205,15 @@ { name: '检测中', number: '135' }, { name: '成编制报告', number: '135' }, ]) +const router = useRouter() + +// 点击按钮组 +const handleClickButton = (id: string) => { + const index = buttonTypes.value.findIndex(item => item.id === id) + if (index !== -1 && buttonTypes.value[index].url) { + router.push(buttonTypes.value[index].url) + } +} function calcBlockSize() { // 计算工作台区域高度 - 顶部-面包屑-边距 @@ -222,7 +231,6 @@ {{ item.text }} @@ -352,7 +361,6 @@ diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 824572f..9d9e488 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -399,7 +399,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择筹建日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -503,7 +503,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" :disabled="buttonType === 'detail'" /> @@ -564,7 +564,7 @@ type="datetime" style="width: 100%;" :placeholder="buttonType === 'detail' ? '' : '请选择有效日期'" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> @@ -599,7 +599,7 @@ type="datetime" :placeholder="buttonType === 'detail' ? '' : '请选择发证日期'" style="width: 100%;" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" disabled /> diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue index bbaae75..b2ef7cf 100644 --- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue +++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue @@ -147,6 +147,7 @@ message: '请选中', type: 'warning', }) + return } // 将选择好的样品传给父组件 emits('confirmCheckout', checkoutList.value) diff --git a/src/views/customer/advice/adviceList.vue b/src/views/customer/advice/adviceList.vue index 37bfead..b6f79f9 100644 --- a/src/views/customer/advice/adviceList.vue +++ b/src/views/customer/advice/adviceList.vue @@ -245,7 +245,7 @@ v-model="timeRange" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="投诉查询开始时间" end-placeholder="投诉查询结束时间" diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts index d440968..b6c115c 100644 --- a/src/views/device/deviceMaintenance/checkList_interface.ts +++ b/src/views/device/deviceMaintenance/checkList_interface.ts @@ -18,7 +18,15 @@ managerPoinLocation: string // 管理点位置 remark: string // 备注 updateTime: null | string // 更新时间 - + approvalStatusName: string // 审批状态名称 +} +// 标准配套设备表头类型 +export interface columnsType { + text: string + value: string + align: string + required: boolean + width?: string } // 下拉框类型 export interface IOptions { @@ -142,3 +150,20 @@ export interface IManageChecklist { id: string } +export interface IButton { + name: string // 按钮名称 + type: '' | 'default' | 'text' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + proxy?: string // 权限 + show?: Function // 是否显示 +} +export interface menuType { + name: string + value: string +} +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index bf45d1e..a236a10 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -59,6 +59,7 @@ text: '验收单编号', value: 'applyNo', align: 'center', + width: '160', }, { text: '验收单名称', @@ -84,6 +85,7 @@ text: '检修日期', value: 'createTime', align: 'center', + width: '120', }, { text: '审批状态', @@ -96,12 +98,6 @@ const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') // 装载时间数组 const checkTime = ref('') // 点击按钮 @@ -183,9 +179,7 @@ const searchList = () => { fetchData(false) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -383,7 +377,7 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="检查日期开始时间" end-placeholder="检查日期结束时间" @@ -398,10 +392,10 @@ - + @@ -358,28 +372,14 @@ - - - - - - @@ -388,25 +388,32 @@ v-model="checkTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="申请日期开始时间" - end-placeholder="申请日期结束时间" + start-placeholder="检修开始时间" + end-placeholder="检修结束时间" /> - + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -import type { FormInstance } from 'element-plus' -import type { IlistPageAddTypes, returnRowType } from '../checkList_interface' -import { addEquipmentApply, equipmentApplyInfo, submitEquipmentApply, updateEquipmentApply } from '@/api/device/checkList' -import { getDeptTreeList } from '@/api/system/dept' -import { toTreeList } from '@/utils/structure' -import { getUserList } from '@/api/system/user' -import type { deptType } from '@/views/device/standingBook/standingBook-interface' -import type { userType } from '@/views/system/user/user-interface' -import { submitApproval } from '@/api/approval' -import { SCHEDULE } from '@/utils/scheduleDict' -import addRow from '@/views/device/stateManage/components/addRow.vue' -import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -const infoId = ref('') // id -const buttonArray = ref([]) -const pageType = ref('add') // 页面类型: add,edit, detail -const textMap: { [key: string]: string } = { - add: '新建', - edit: '编辑', - detail: '详情', -}// 字典 -// 从路由中获取页面类型参数 -const $route = useRoute() -if ($route.params && $route.params.type) { - pageType.value = $route.params.type as string - if (pageType.value === 'detail') { - buttonArray.value = ['同意', '驳回', '拒绝'] - } - else if (pageType.value === 'edit') { - buttonArray.value = ['提交', '保存'] - } - else { - buttonArray.value = ['提交', '保存'] - } - if ($route.params.id) { - infoId.value = $route.params.id as string - } -} -const ruleFormRef = ref() -const useDeptList = ref([]) // 使用部门列表 -const usePersonList = ref([]) // 使用人列表 -// 逻辑代码 -const formInline = ref({ - acceptanceCheckId: '', // 检修申请id - applyDesc: '', // 申请说明 - applyName: '', // 申请名称 - applyNo: '', // 申请编号 - applyPerson: '', // 申请人 - applyPersonName: '', // 申请人姓名 - applyType: '8', // 申请类型 - applyTypeName: '', // 申请类型名称 - applyUnit: '', // 申请单位 - applyUnitName: '', // 申请单位名称 - approvalStatus: '', // 审批状态 - approvalStatusName: '', // 审批状态名称 - createTime: '', // 创建时间 - createUser: '', // 创建人 - equipmentInfoList: [], // 设备详情列表 - equipmentList: [], // 设备列表 - id: '', // 主键 - isDel: '', // 删除id - overhaulPerson: '', - processId: '', // 审批id - processResult: '', - remark: '', // 备注 - taskId: '', // 任务id - time: '', - updateTime: '', // 更新时间 - version: '', // 版本号 -}) -// 审批弹窗信息收集类型 -interface ListType { - equipmentName: string - equipmentNo: string - modelNo: string - mesureRange: string - useDeptName: string - usePersonName: string - managerStateName: string - validDate: string - equipmentSpecifications: string - manufacturingNo: string - manufacturer: string -} -// 数据 -const list = ref([]) -// 审批弹窗开关 -const applyShow = ref(false) -// 审批弹窗信息收集类型 -interface applyListType { - select: string - epilog: string - approval: string - approvalTime: string -} -// 审批弹窗信息收集 -const applyList = ref({ - select: '', - epilog: '', - approval: '', - approvalTime: '', -}) -// 标准配套设备表头类型 -interface columnsType { - text: string - value: string - align: string - required: boolean - width?: string -} -// 标准配套设备更换表头 -const columns = ref([ - { - text: '设备名称', - value: 'equipmentName', - align: 'center', - required: true, - }, - { - text: '设备编号', - value: 'equipmentNo', - align: 'center', - required: true, - }, - { - text: '型号', - value: 'modelNo', - align: 'center', - required: true, - }, - { - text: '测量范围', - value: 'mesureRange', - align: 'center', - required: true, - }, - { - text: '使用部门', - value: 'useDeptName', - align: 'center', - required: true, - }, - { - text: '使用人', - value: 'usePersonName', - align: 'center', - required: true, - }, - { - text: '管理状态', - value: 'managerStateName', - align: 'center', - required: true, - }, - { - text: '有效日期', - value: 'validDate', - align: 'center', - required: true, - width: '160px', - }, -]) -// 标准配套设备更换查询条件 -const listQuery = ref({ - limit: 10, - offset: 1, -}) -// 标准配套设备更换表格loding -const loadingTable = ref(false) -// 标准配套设备更换表格分页 -const changePage = () => {} -// 初始化router -const $router = useRouter() -// 关闭新增页面的回调 -const close = () => { - $router.back() -} -// 表单验证规则 -const rules = ref({ - applyName: [{ required: true, message: '申请名称不能为空', trigger: ['blur', 'change'] }], - applyUnit: [{ required: true, message: '申请单位不能为空', trigger: ['blur', 'change'] }], - applyPerson: [{ required: true, message: '申请人不能为空', trigger: ['blur', 'change'] }], - time: [{ required: true, message: '检修时间不能为空', trigger: ['blur', 'change'] }], -}) -// 获取部门列表 -getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data, '0', true) -}) -// 获取用户列表 -getUserList({ offset: 1, limit: 99999 }).then((res) => { - usePersonList.value = res.data.rows -}) -// 审批结束回调 -const approvalSuccess = () => { -} - -// 表格选中的数组 -const SelectionList = ref([]) -// 标准实验室发生改变row类型 -interface rowReturn { - phone: string - director: string -} -// 取消 -const handleCancel = () => { - const params = { - taskId: formInline.value.taskId!, - comments: '', - } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) - }) - }) -} -const approvalDialog = ref() -// 点击数据后的操作按钮 -const clickBtn = (buttonType: string) => { - switch (buttonType) { - case '同意': - approvalDialog.value.initDialog('agree', formInline.value.taskId) - break - case '驳回': - approvalDialog.value.initDialog('reject', formInline.value.taskId) - break - case '拒绝': - approvalDialog.value.initDialog('refuse', formInline.value.taskId) - break - case '取消': - handleCancel() - break - } -} -// 获取详情信息 -const getInfo = () => { - equipmentApplyInfo({ id: infoId.value }).then((res) => { - Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { - res.data[item] = res.data[item].toString() - } - }) - formInline.value = res.data - }) -} -if (pageType.value !== 'add') { - getInfo() -} -// 保存后的id -const addId = ref('') -// 点击顶部一排按钮 -const getAddList = async (item: string, formEl: FormInstance | undefined) => { - if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // formInline.equipmentInfoList - addEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } - await formEl.validate((valid, fields) => { - if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateEquipmentApply(formInline.value).then((res) => { - if (res.code === 200) { - ElMessage.success('保存成功') - addId.value = res.data.id - } - }) - }) - } - }) - } - else if (item === '提交') { - if (addId.value === '') { - ElMessage.warning('请先保存') - } - else { - submitEquipmentApply({ id: addId.value, formId: SCHEDULE.DEVICE_FIX_APPROVAL }).then((res) => { - if (res.code === 200) { - close() - } - }) - } - } - else { - clickBtn(item) - } -} - -const addRowRef = ref() -// 点击增加行 -const addRoow = () => { - // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) -} - -// 标准配套设备更换表格删除行 -const removeRow = () => { - if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - // 删除行 - formInline.value.equipmentInfoList = formInline.value.equipmentInfoList.filter((item) => { - return !SelectionList.value.includes(item) - }) - // 删除给equipmentList重新赋值 - formInline.value.equipmentList = [] - formInline.value.equipmentInfoList.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - ElMessage.success('删除成功') - }) - } - else { - ElMessage.warning('请先选择需要删除的数据') - } -} -// 表格多选框 -const handleSelectionChange = (e: any) => { - SelectionList.value = e -} - -// 设备列表添加 -const addRowMethods = (row: returnRowType[]) => { - row = [...formInline.value.equipmentInfoList, ...row] - formInline.value.equipmentList = [] - row.forEach((item: returnRowType, index: number) => { - formInline.value.equipmentList.push({ equipmentId: item.id }) - }) - // 设备状态 - formInline.value.equipmentInfoList = row -} -// 审批弹窗的关闭 -const applyListClose = () => { - applyShow.value = false -} -// 审批弹窗的提交 -const applyListSubmit = () => { - console.log(applyList.value) - if (applyList.value.select == '') { - return ElMessage.error('必须选择审批意见') - } - applyListClose() -} -onMounted(async () => { - formInline.value.processId = $route.params.processId as string // 任务id -}) -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} - - - - - - - - {{ item }} - - - 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 增加行 - - - 删除行 - - - - - - - - *{{ item.text }} - - - - - - - - - - - - - - - diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue new file mode 100644 index 0000000..860d610 --- /dev/null +++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue @@ -0,0 +1,620 @@ + + + + + + + + + {{ item }} + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量增加 + + + + 删除行 + + + + + + + + *{{ item.text }} + + + + + + + + + + + + + + + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 1b9ed05..bc8fe9d 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -1,7 +1,4 @@ @@ -104,7 +113,7 @@ - + @@ -114,7 +123,7 @@ .btns { position: fixed; - top: 76px; + top: 69px; right: 15px; z-index: 999; } diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue index 2ebb393..48f03f5 100644 --- a/src/views/device/standardEquipment/expirationRemind.vue +++ b/src/views/device/standardEquipment/expirationRemind.vue @@ -356,7 +356,7 @@ v-model="preparation" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="筹建开始日期" end-placeholder="筹建结束日期" @@ -367,7 +367,7 @@ v-model="validTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="到期开始日期" end-placeholder="到期结束日期" diff --git a/src/views/device/stateManage/components/addRow.vue b/src/views/device/stateManage/components/addRow.vue deleted file mode 100644 index 83a85a6..0000000 --- a/src/views/device/stateManage/components/addRow.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 确认 - - 取消 - - - - - - - diff --git a/src/views/device/stateManage/components/selectDevice.vue b/src/views/device/stateManage/components/selectDevice.vue new file mode 100644 index 0000000..6edc12a --- /dev/null +++ b/src/views/device/stateManage/components/selectDevice.vue @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/device/stateManage/components/templateAddEditCancel.vue b/src/views/device/stateManage/components/templateAddEditCancel.vue index 8f9aeb4..6f98013 100644 --- a/src/views/device/stateManage/components/templateAddEditCancel.vue +++ b/src/views/device/stateManage/components/templateAddEditCancel.vue @@ -2,7 +2,7 @@ diff --git a/src/views/measure/source/components/listApproval.vue b/src/views/measure/source/components/listApproval.vue index c0be801..c0c3744 100644 --- a/src/views/measure/source/components/listApproval.vue +++ b/src/views/measure/source/components/listApproval.vue @@ -2,13 +2,15 @@ import type { PropType, Ref } from 'vue' import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' -import type { IButton, ISupplier, IlistTypes, supplierExportQuery } from '../list_interface' +import type { IButton, ISupplier, IlistTypes, rowReturn, supplierExportQuery } from '../list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getSoucreListDelete, getapprovalListPage, sourceSubmit } from '@/api/measure/source' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { printJSON } from '@/utils/printUtils' import { SCHEDULE } from '@/utils/scheduleDict' import { cancelApproval, submitApproval } from '@/api/approval' +import type { IAddress } from '@/components/AddressSelect/address-interface' + const props = defineProps({ status: { type: String, @@ -20,21 +22,31 @@ }, }) const emit = defineEmits(['setData']) // 关闭 +const companyAddress = ref([]) // 公司地址 // 获取权限 const { proxy } = getCurrentInstance() as any // 操作列宽度-计算属性 const operationWidth = computed(() => { - return props.buttons.length * 40 + 24 + // 审批中状态时候长度返回错误 + if (props.status === '3' || props.status === '6') { + props.buttons.length = 4 // 传递长度 + 判断条件下显示按钮长度 + } + return props.buttons.length * 40 + 23 }) // 查询条件 const listQuery: Ref = ref({ approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -47,8 +59,6 @@ const list = ref([]) // 总数 const total = ref(0) -// 控制审批操作弹窗的开关 -const applyShow = ref(false) // 表头 const columns = ref([ { text: '溯源供方编号', value: 'supplierNo', width: '160', align: 'center' }, @@ -63,18 +73,11 @@ ]) // 初始化路由 const $router = useRouter() -const buttonArray = ref([]) // 选中的内容 const checkoutList = ref([]) -// 文件上传input -const fileRef = ref() -// 删除id -const deleteId = ref('') -// 详情id -const infoId = ref('0') -// 点击按钮 -const buttonType = ref('') const loadingTable = ref(false) + +// 获取数据 const fetchData = (isNowPage: boolean) => { loadingTable.value = true if (!isNowPage) { @@ -83,15 +86,11 @@ } getapprovalListPage(listQuery.value).then((response) => { list.value = response.data.rows - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] + companyAddress.value = [response.data.rows[0].companyCountry, response.data.rows[0].companyProvince, response.data.rows[0].companyCity, response.data.rows[0].companyArea, response.data.rows[0].companyAddress] total.value = parseInt(response.data.total) + console.log(companyAddress.value) loadingTable.value = false }).catch((_) => { - // list.value = [ - // { approvalStatus: '4', approvalStatusName: '已通过', bankAccount: '453', bankAccountNumber: '354', bankName: '543', briefName: '35431', businessContent: '5434', businessScope: '354', companyAddress: '2313', companyArea: '210103', companyCity: '210100', companyCountry: '中国', companyProvince: '210000', createTime: '2022-12-06 17:21:40', director: '354', fax: '354', id: '1600057880174956546', invoiceAddress: '213123', invoiceArea: '150302', invoiceCity: '150300', invoiceCountry: '中国', invoiceProvince: '150000', mailbox: '354', minioFileName: '', mobile: '354', phone: '354', postalCode: '534', remark: '', supplierName: '北京公司2', supplierNo: 'sygf202212060003', taxNumber: '3543', traceSupplierPersonList: [], website: '354' }, - // ] loadingTable.value = false }) } @@ -100,10 +99,16 @@ const handleSelectionChange = (e: any) => { checkoutList.value = e.map((item: { id: string }) => item.id) } -// 点击删除和编辑的参数类型 -interface rowReturn { - id: string - supplierName: string +// 公司地址变化后给对象赋值 +function companyAddressChange(addressObj: IAddress) { + listQuery.value.companyCountry = addressObj.country + listQuery.value.companyProvince = addressObj.province + listQuery.value.companyCity = addressObj.city + listQuery.value.companyArea = addressObj.area + listQuery.value.companyCountryName = addressObj.countryName + listQuery.value.companyProvinceName = addressObj.provinceName + listQuery.value.companyCityName = addressObj.cityName + listQuery.value.companyAreaName = addressObj.areaName } // 点击删除或者取消 const handleDelete = (row: rowReturn) => { @@ -143,7 +148,7 @@ type: 'warning', }, ).then(() => { - cancelApproval(params).then((res) => { + cancelApproval(params).then(() => { ElMessage.success('取消成功') fetchData(true) }) @@ -162,9 +167,14 @@ listQuery.value = { approvalStatus: props.status, businessContent: '', - companyArea: '', - companyCity: '', - companyProvince: '', + companyArea: '', // 区 + companyCity: '', // 市 + companyProvince: '', // 省 + companyCountry: '', // 国家 + companyAreaName: '', // 区 + companyCityName: '', // 市 + companyCountryName: '', // 国家 + companyProvinceName: '', // 省 formId: SCHEDULE.SUPPLIER_APPROVAL, supplierName: '', supplierNo: '', @@ -209,8 +219,11 @@ fetchData(true) } // 跳转到详情 -const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) +const goDetail = (row: Omit) => { + $router.push({ + path: `approve/${props.status}/${row.id}`, + query: { ...row }, + }) } // 新建溯源供方 const add = () => { @@ -224,10 +237,7 @@ const approvalSuccess = () => { fetchData(true) } -// 审批弹窗关闭 -const handleClose = () => { - applyShow.value = false -} + // 提交 const approvalSubmit = (row: ISupplier) => { ElMessageBox.confirm('确认提交吗?', '提示', { @@ -285,11 +295,12 @@ watch ( () => props.status, (newVal: string) => { - console.log('change status') + console.log('change status', newVal) listQuery.value.approvalStatus = newVal fetchData(false) }, { immediate: true }) + // 打印列表 function printList() { // 打印列 @@ -333,47 +344,105 @@ - + + - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - + 查看 - - 编辑 - - - 编辑 - - - 提交 - - + 同意 - + 驳回 - + 拒绝 - + + 编辑 + + + 提交 + + + 取消 - + + 删除 diff --git a/src/views/measure/source/components/sourceApprovalDetail.vue b/src/views/measure/source/components/sourceApprovalDetail.vue index 7b89b15..8d9d22d 100644 --- a/src/views/measure/source/components/sourceApprovalDetail.vue +++ b/src/views/measure/source/components/sourceApprovalDetail.vue @@ -1,18 +1,25 @@ + - + 同意 @@ -168,20 +178,6 @@ - - - - - - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} - - - - + + + + diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index 7cfd1ea..e2778fe 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -6,7 +6,6 @@ import type { TableColumn } from '@/components/NormalTable/table_interface' import { exportSourceList, getSoucreList, getSoucreListDelete } from '@/api/measure/source' import { uploadApi } from '@/api/system/notice' -import { exportExcel } from '@/utils/exportXlsx' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { SCHEDULE } from '@/utils/scheduleDict' @@ -151,9 +150,7 @@ const searchList = () => { fetchData(true) } -const cancelEvent = () => { - console.log('cancel!') -} + // 点击重置 const clearList = () => { listQuery.value = { @@ -167,27 +164,6 @@ fetchData(true) } -// 上传文件/批量导入 -const onFileChange = (event: any) => { - if (event.target.files[0].type === 'application/pdf') { - if (event.target.files?.length !== 0) { - // 创建formdata对象 - const fd = new FormData() - fd.append('multipartFile', event.target.files[0]) - uploadApi(fd).then((res) => { - if (res.code === 200) { - ElMessage.success('上传成功') - } - else { - ElMessage.error(res.message) - } - }) - } - } - else { - ElMessage.error('请上传pdf格式') - } -} // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -294,13 +270,19 @@ - + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + - + - diff --git a/src/views/measure/train/components/planApprovalDetail.vue b/src/views/measure/train/components/planApprovalDetail.vue index 8fe0388..38fca62 100644 --- a/src/views/measure/train/components/planApprovalDetail.vue +++ b/src/views/measure/train/components/planApprovalDetail.vue @@ -67,16 +67,6 @@ const getInfo = () => { getListDetail({ id: infoId.value }).then((res) => { dataForm.value.trainStaffList = res.data.trainStaffList - // if (dataForm.value.approvalStatus) { - // // 待审批 - // if (dataForm.value.approvalStatus == '2') { - // buttonArray.value = buttonsSet[dataForm.value.approvalStatus] - // } - // else if (dataForm.value.approvalStatus == '3') { // 审批中 - // // todo:判断当前用户是否为发起人 - // buttonArray.value = buttonsSet[dataForm.value.approvalStatus] - // } - // } }) } getInfo() diff --git a/src/views/measure/train/trainLog.vue b/src/views/measure/train/trainLog.vue index f433559..13ebd99 100644 --- a/src/views/measure/train/trainLog.vue +++ b/src/views/measure/train/trainLog.vue @@ -38,7 +38,7 @@ listQuery.value.trainStartTime = trainTime.value[0] || '' listQuery.value.trainEndTime = trainTime.value[1] || '' listQuery.value.createStartTime = createTime.value[0] || '' - listQuery.value.createEndTime = createTime.value[0] || '' + listQuery.value.createEndTime = createTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 @@ -199,7 +199,7 @@ v-model="trainTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="培训时间开始时间" end-placeholder="培训时间结束时间" @@ -210,10 +210,10 @@ v-model="createTime" type="datetimerange" range-separator="到" - format="YYYY/MM/DD HH:mm:ss" + format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" - start-placeholder="培训时间开始时间" - end-placeholder="培训时间结束时间" + start-placeholder="创建时间开始时间" + end-placeholder="创建时间结束时间" /> diff --git a/src/views/system/log/listErrorLog.vue b/src/views/system/log/listErrorLog.vue index 1911945..2237efd 100644 --- a/src/views/system/log/listErrorLog.vue +++ b/src/views/system/log/listErrorLog.vue @@ -98,7 +98,7 @@ @@ -106,7 +106,7 @@ diff --git a/src/views/system/log/listLog.vue b/src/views/system/log/listLog.vue index c225b53..a13655d 100644 --- a/src/views/system/log/listLog.vue +++ b/src/views/system/log/listLog.vue @@ -137,7 +137,7 @@ @@ -145,7 +145,7 @@ diff --git a/src/views/system/log/loginLog.vue b/src/views/system/log/loginLog.vue index b3c56f8..b1cb93d 100644 --- a/src/views/system/log/loginLog.vue +++ b/src/views/system/log/loginLog.vue @@ -122,7 +122,7 @@ @@ -130,7 +130,7 @@