已添加25个文件
已重命名1个文件
已修改28个文件
| | |
| | | // scanç¹æ®å¤ç |
| | | if (index === 2) { |
| | | tabbarStore.setCurIdx(tabbarStore.lastIdx) |
| | | |
| | | // 模ææå |
| | | // uni.navigateTo({ |
| | | // url: `/pages/scan/index?result=GPA2024NL025`, |
| | | // }) |
| | | // return false |
| | | // 模ææå |
| | | |
| | | // åªå
许éè¿ç¸æºæ«ç |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: function (res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType) |
| | | console.log('æ¡ç å
容ï¼' + res.result) |
| | | if (res?.scanType !== 'QR_CODE') { |
| | | uni.showToast({ |
| | | title: '请使ç¨äºç»´ç è¿è¡æ«ç ', |
| | | icon: 'none', |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | // 使ç¨splitæ¹æ³æªåèµäº§ç¼å· |
| | | // const assetCode = res.result.split('èµäº§ç¼å·ï¼')[1].split(' ')[0] |
| | | uni.navigateTo({ |
| | | url: `/pages/scan/index?result=${res.result}`, |
| | | }) |
| | | }, |
| | | fail: function (res) {}, |
| | | }) |
| | | } else { |
| | | tabbarStore.setCurIdx(index) |
| | |
| | | "layout": "tabbar", |
| | | "needLogin": true, |
| | | "style": { |
| | | "navigationBarTitleText": "å
³äº" |
| | | "navigationBarTitleText": "设å¤" |
| | | } |
| | | }, |
| | | { |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/repair/feedback", |
| | | "type": "page", |
| | | "layout": "default", |
| | | "needLogin": true, |
| | | "style": { |
| | | "navigationBarTitleText": "ç»´ä¿®è¯ä»·", |
| | | "app-plus": { |
| | | "titleNView": { |
| | | "buttons": [ |
| | | { |
| | | "text": "æäº¤", |
| | | "fontSize": "14px", |
| | | "color": "#FFFFFF" |
| | | }, |
| | | { |
| | | "text": "", |
| | | "fontSize": "14px", |
| | | "color": "#FFFFFF" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/repair/repair-add", |
| | | "type": "page", |
| | | "layout": "default", |
| | |
| | | { |
| | | "text": "", |
| | | "fontSize": "24px", |
| | | "color": "#FFFFFF" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/repair/repair-fb", |
| | | "type": "page", |
| | | "layout": "default", |
| | | "needLogin": true, |
| | | "style": { |
| | | "navigationBarTitleText": "ç»´ä¿®è¯ä»·", |
| | | "app-plus": { |
| | | "titleNView": { |
| | | "buttons": [ |
| | | { |
| | | "text": "æäº¤", |
| | | "fontSize": "14px", |
| | | "color": "#FFFFFF" |
| | | }, |
| | | { |
| | | "text": "", |
| | | "fontSize": "14px", |
| | | "color": "#FFFFFF" |
| | | } |
| | | ] |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/scan/index", |
| | | "type": "page" |
| | | }, |
| | | { |
| | | "path": "pages/spare/index", |
| | | "type": "page", |
| | | "layout": "tabbar", |
| | | "needLogin": true, |
| | | "style": { |
| | | "navigationBarTitleText": "spare" |
| | | "navigationBarTitleText": "å¤ä»¶" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/spare/spare-list", |
| | | "type": "page", |
| | | "layout": "default", |
| | | "needLogin": true, |
| | | "style": { |
| | | "navigationBarTitleText": "å¤ä»¶å表" |
| | | } |
| | | } |
| | | ], |
| | |
| | | <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time> |
| | | <template #top> |
| | | <wd-drop-menu> |
| | | <wd-drop-menu-item v-model="equTypeId" :options="typeList" @change="handleEquType" /> |
| | | <wd-drop-menu-item v-model="status" :options="statusList" @change="handleEquStatu" /> |
| | | <wd-drop-menu-item |
| | | v-model="equTypeId" |
| | | label-key="dictLabel" |
| | | value-key="dictValue" |
| | | :options="typeList" |
| | | @change="handleEquType" |
| | | /> |
| | | <wd-drop-menu-item |
| | | v-model="status" |
| | | label-key="dictLabel" |
| | | value-key="dictValue" |
| | | :options="statusList" |
| | | @change="handleEquStatu" |
| | | /> |
| | | </wd-drop-menu> |
| | | </template> |
| | | |
| | |
| | | <view class="flex items-center menu-title-box"> |
| | | <view class="menu-indicator"></view> |
| | | <text class="ml-1 text-xs">{{ item.assetNo }}</text> |
| | | <wd-tag v-if="item.status === '0'" class="ml-2" bg-color="cyan">è¯ç¨</wd-tag> |
| | | <wd-tag v-else-if="item.status === '1'" class="ml-2" type="success">使ç¨</wd-tag> |
| | | <wd-tag v-else-if="item.status === '2'" class="ml-2" type="danger">åç¨</wd-tag> |
| | | <wd-tag v-else-if="item.status === '3'" class="ml-2" bg-color="pink">æ¥åº</wd-tag> |
| | | <wd-tag v-else-if="item.status === '4'" class="ml-2" type="warning">é²ç½®</wd-tag> |
| | | <wd-tag v-else-if="item.status === '5'" class="ml-2">æ°å¢</wd-tag> |
| | | </view> |
| | | |
| | | <view> |
| | | <view @click.stop="handleInfo"> |
| | | <text class="icon-color-base">详æ
</text> |
| | | <wd-icon name="arrow-right" custom-class="icon-color-base"></wd-icon> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <view class="flex h-[80rpx] items-center" @click.stop="itemClick(item)"> |
| | | <view class="flex h-[90rpx] items-center" @click.stop="itemClick(item)"> |
| | | <image class="slot-img text-center" src="/static/images/camera.png" /> |
| | | <view class="flex-1"> |
| | | <view class="text-color-base"> |
| | |
| | | </view> |
| | | </view> |
| | | <view v-if="isSelectEqu"> |
| | | <wd-button |
| | | size="small" |
| | | icon="edit-outline" |
| | | @click.stop="handleSelectEqu(item)" |
| | | > |
| | | <wd-button size="small" icon="edit-outline" @click.stop="handleSelectEqu(item)"> |
| | | éä¸ |
| | | </wd-button> |
| | | </view> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import { onMounted, getCurrentInstance, ref } from 'vue' |
| | | |
| | | import { getEquList } from '@/service/equ' |
| | | import { DICT_SYS_EQU_STATUS, getDictInfo } from '@/service/dict' |
| | | |
| | | // 设å¤ç±»å |
| | | const equTypeId = ref<number>(0) |
| | | const equTypeId = ref<number>(-1) |
| | | // 设å¤ç¶æ |
| | | const status = ref<number>(0) |
| | | const status = ref<number>(-1) |
| | | |
| | | const isSelectEqu = ref(false) |
| | | |
| | | const typeList = ref<Record<string, any>[]>([{ label: 'ææè®¾å¤', value: 0 }]) |
| | | const statusList = ref<Record<string, any>[]>([{ label: 'ææç¶æ', value: 0 }]) |
| | | const typeList = ref<Record<string, any>[]>([{ dictLabel: '设å¤ç±»å', dictValue: -1 }]) |
| | | const statusList = ref<Record<string, any>[]>([{ dictLabel: 'ææç¶æ', dictValue: -1 }]) |
| | | function handleEquType({ value }) { |
| | | reloadData() |
| | | console.log(value) |
| | | } |
| | | function handleEquStatu({ value }) { |
| | | reloadData() |
| | | console.log(value) |
| | | } |
| | | |
| | |
| | | const dataList = ref([]) |
| | | |
| | | const queryList = (pageNum?: number, pageSize?: number) => { |
| | | // è¿éçpageNoåpageSizeä¼èªå¨è®¡ç®å¥½ï¼ç´æ¥ä¼ ç»æå¡å¨å³å¯ |
| | | // è¿éç请æ±åªæ¯æ¼ç¤ºï¼è¯·æ¿æ¢æèªå·±ç项ç®çç½ç»è¯·æ±ï¼å¹¶å¨ç½ç»è¯·æ±åè°ä¸éè¿paging.value.complete(请æ±åæ¥çæ°ç»)å°è¯·æ±ç»æä¼ ç»z-paging |
| | | getEquList({ pageNum, pageSize }) |
| | | const parmams = { |
| | | pageNum, |
| | | pageSize, |
| | | equTypeId: equTypeId.value, |
| | | status: status.value, |
| | | } |
| | | if (equTypeId.value === -1) { |
| | | delete parmams.equTypeId |
| | | } |
| | | if (status.value === -1) { |
| | | delete parmams.status |
| | | } |
| | | getEquList(parmams) |
| | | .then((res: any) => { |
| | | // 请å¿å¨ç½ç»è¯·æ±åè°ä¸ç»dataListèµå¼ï¼ï¼åªéè¦è°ç¨completeå°±å¯ä»¥äº |
| | | paging.value.completeByTotal(res.rows, res.total) |
| | |
| | | * è®¾å¤æ¡ç®ç¹å»äºä»¶ |
| | | * @param item |
| | | */ |
| | | function itemClick(item: any) { |
| | | |
| | | function itemClick(item: any) {} |
| | | function handleInfo() { |
| | | uni.showToast({ |
| | | title: 'åè½å¼åä¸', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * å
¶å®é¡µé¢éæ©è®¾å¤ |
| | | * @param item |
| | |
| | | }) |
| | | } |
| | | |
| | | |
| | | const eventChannel = ref<any>() |
| | | onMounted(() => { |
| | | const instance: any = getCurrentInstance().proxy |
| | |
| | | isSelectEqu.value = true |
| | | console.log('OnSelectEqu', data) |
| | | }) |
| | | }) |
| | | |
| | | function reloadData() { |
| | | paging.value.reload() |
| | | } |
| | | |
| | | async function initData() { |
| | | const sList: any = await getDictInfo(DICT_SYS_EQU_STATUS) |
| | | statusList.value.push(...sList) |
| | | } |
| | | |
| | | onLoad(() => { |
| | | initData() |
| | | }) |
| | | </script> |
| | | |
| | |
| | | :deep(.wd-card__footer) { |
| | | padding: 10rpx !important; |
| | | } |
| | | :deep(.wd-card__title-content) { |
| | | padding: 16rpx !important; |
| | | } |
| | | </style> |
| | |
| | | layout: 'tabbar', |
| | | needLogin: true, |
| | | style: { |
| | | navigationBarTitleText: 'å
³äº', |
| | | navigationBarTitleText: '设å¤', |
| | | }, |
| | | } |
| | | </route> |
| | | |
| | | <template> |
| | | <view |
| | | class="bg-white overflow-hidden pt-2 px-4" |
| | | :style="{ marginTop: safeAreaInsets?.top + 'px' }" |
| | | > |
| | | <view class="text-center text-3xl mt-8"> |
| | | 鸽åä»¬å¥½ï¼ææ¯ |
| | | <text class="text-red-500">è²é¸½</text> |
| | | </view> |
| | | <RequestComp /> |
| | | <UploadComp /> |
| | | <view class="bg-base" :style="{ marginTop: safeAreaInsets?.top + 'px' }"> |
| | | <wd-cell-group border> |
| | | <wd-cell |
| | | title="设å¤å表" |
| | | is-link |
| | | to="/pages/equ/equ-list" |
| | | icon="list" |
| | | custom-icon-class="icon-color-base" |
| | | /> |
| | | <wd-cell |
| | | title="éç¹è®¾å¤" |
| | | is-link |
| | | icon="keywords" |
| | | custom-icon-class="icon-color-base" |
| | | @click="handleInfo" |
| | | /> |
| | | <wd-cell |
| | | title="æ·»å 设å¤" |
| | | is-link |
| | | icon="add" |
| | | custom-icon-class="icon-color-base" |
| | | @click="handleInfo" |
| | | /> |
| | | </wd-cell-group> |
| | | <wd-cell-group border class="mt-2"> |
| | | <wd-cell |
| | | title="设å¤çç¹" |
| | | is-link |
| | | icon="filter" |
| | | custom-icon-class="icon-color-base" |
| | | @click="handleInfo" |
| | | /> |
| | | </wd-cell-group> |
| | | </view> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import RequestComp from './components/request.vue' |
| | | import UploadComp from './components/upload.vue' |
| | | |
| | | // è·åå±å¹è¾¹çå°å®å
¨åºåè·ç¦» |
| | | const { safeAreaInsets } = uni.getSystemInfoSync() |
| | | |
| | | function handleInfo() { |
| | | uni.showToast({ |
| | | title: 'åè½å¼åä¸', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | <view class="bg-white h-[80rpx] px-2 flex items-center justify-between"> |
| | | <view class="flex items-center" @click="handleUserInfo"> |
| | | <wd-icon name="user" size="40rpx" class="icon-color-base"></wd-icon> |
| | | <text class="ml-1 text-color-base">å¼ ä¸</text> |
| | | <text class="ml-1 text-color-base">{{ realName }}</text> |
| | | </view> |
| | | |
| | | <view class="flex items-center"> |
| | | <wd-icon name="notification" size="40rpx" class="icon-color-base mr-3"></wd-icon> |
| | | <wd-icon name="tips" size="40rpx" class="icon-color-base mr-3"></wd-icon> |
| | | <wd-icon name="app" size="40rpx" class="icon-color-base"></wd-icon> |
| | | <wd-icon name="notification" size="40rpx" class="icon-color-base mr-3" @click="handleInfo"></wd-icon> |
| | | <wd-icon name="tips" size="40rpx" class="icon-color-base mr-3" @click="handleInfo"></wd-icon> |
| | | <wd-icon name="app" size="40rpx" class="icon-color-base" @click="handleInfo"></wd-icon> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | </view> |
| | | </wd-card> |
| | | </view> |
| | | |
| | | <view class="bg-white mt-2"> |
| | | <wd-card type="rectangle"> |
| | | <template #title> |
| | | <view class="flex items-center menu-title-box"> |
| | | <view class="menu-indicator"></view> |
| | | <view class="ml-1 text-xs">设å¤ç®¡ç</view> |
| | | <view class="ml-1 text-xs">å¿«æ·æä½</view> |
| | | </view> |
| | | </template> |
| | | <wd-grid :column="4"> |
| | | <wd-grid-item |
| | | use-slot |
| | | class="flex justify-center items-center" |
| | | v-for="(item, index) in equMenu" |
| | | v-for="(item, index) in commonMenu" |
| | | :key="item.id" |
| | | @click.stop="goItemPage(item.path)" |
| | | > |
| | | <image class="slot-img text-center" :src="item.icon" /> |
| | |
| | | </wd-grid> |
| | | </wd-card> |
| | | </view> |
| | | |
| | | <view class="bg-white mt-2"> |
| | | <wd-card type="rectangle"> |
| | | <template #title> |
| | | <view class="flex items-center menu-title-box"> |
| | | <view class="menu-indicator"></view> |
| | | <view class="ml-1 text-xs">设å¤ç¹æ£</view> |
| | | <view class="ml-1 text-xs">设å¤ç®¡ç</view> |
| | | </view> |
| | | </template> |
| | | <wd-grid :column="4"> |
| | |
| | | </wd-grid> |
| | | </wd-card> |
| | | </view> |
| | | <view class="bg-white mt-2"> |
| | | <wd-card type="rectangle"> |
| | | <template #title> |
| | | <view class="flex items-center menu-title-box"> |
| | | <view class="menu-indicator"></view> |
| | | <view class="ml-1 text-xs">å°è´¦ç¸å
³</view> |
| | | </view> |
| | | </template> |
| | | <wd-grid :column="4"> |
| | | <wd-grid-item |
| | | use-slot |
| | | class="flex justify-center items-center" |
| | | v-for="(item, index) in equMenu" |
| | | @click.stop="goItemPage(item.path)" |
| | | > |
| | | <image class="slot-img text-center" :src="item.icon" /> |
| | | <text>{{ item.name }}</text> |
| | | </wd-grid-item> |
| | | </wd-grid> |
| | | </wd-card> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { getAllMenusApi } from '@/service/menu' |
| | | |
| | | import { useUserStore } from '@/store' |
| | | import { tabbarStore } from '@/components/fg-tabbar/tabbar' |
| | | defineOptions({ |
| | | name: 'Home', |
| | | }) |
| | | |
| | | const userStore = useUserStore() |
| | | |
| | | // è·åå±å¹è¾¹çå°å®å
¨åºåè·ç¦» |
| | | const { safeAreaInsets } = uni.getSystemInfoSync() |
| | |
| | | const getAllMenus = async () => { |
| | | const menuList = await getAllMenusApi() |
| | | console.error(menuList) |
| | | } |
| | | function handleInfo() { |
| | | uni.showToast({ |
| | | title: 'åè½å¼åä¸', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | |
| | | const goItemPage = (path: string) => { |
| | |
| | | // getAllMenus() |
| | | }) |
| | | |
| | | |
| | | const commonMenu = reactive([ |
| | | { |
| | | id: 1, |
| | | name: 'æ
éæ¥ä¿®', |
| | | icon: '/static/ico/ico20.png', |
| | | path: 'pages/repair/repair-add', |
| | | } |
| | | ]) |
| | | |
| | | const equMenu = reactive([ |
| | | { |
| | | id: 1, |
| | | name: '设å¤ç®¡ç', |
| | | icon: '/static/menu/menu1.png', |
| | | name: '设å¤å表', |
| | | icon: '/static/ico/ico15.png', |
| | | path: 'pages/equ/equ-list', |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: 'å·¥å
·ç®¡ç', |
| | | icon: '/static/menu/menu1.png', |
| | | name: 'å·¥å
·å表', |
| | | icon: '/static/ico/ico16.png', |
| | | path: 'pages/fixture/fixture-list', |
| | | }, |
| | | ]) |
| | |
| | | { |
| | | id: 1, |
| | | name: 'ç¹æ£æ±æ»', |
| | | icon: '/static/menu/menu4.png', |
| | | icon: '/static/ico/ico17.png', |
| | | path: 'pages/inspect/insp-st', |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: 'ä¿å
»æ±æ»', |
| | | icon: '/static/menu/menu3.png', |
| | | icon: '/static/ico/ico11.png', |
| | | path: 'pages/maint/maint-st', |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: 'è®¾å¤æ¥ä¿®', |
| | | icon: '/static/menu/menu1.png', |
| | | name: 'æ¥ä¿®å表', |
| | | icon: '/static/ico/ico18.png', |
| | | path: 'pages/repair/req-list', |
| | | }, |
| | | { |
| | | id: 4, |
| | | name: '设å¤ç»´ä¿®', |
| | | icon: '/static/menu/menu2.png', |
| | | name: 'ç»´ä¿®å表', |
| | | icon: '/static/ico/ico19.png', |
| | | path: 'pages/repair/res-list', |
| | | }, |
| | | ]) |
| | | |
| | | function handleUserInfo() { |
| | | getAllMenus() |
| | | goToMy() |
| | | } |
| | | |
| | | function goToMy() { |
| | | tabbarStore.setCurIdx(4) |
| | | uni.switchTab({ |
| | | url: '/pages/my/index', |
| | | }) |
| | | } |
| | | |
| | | const realName = computed(() => userStore?.userInfo?.realName) |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | } |
| | | </route> |
| | | <template> |
| | | <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time> |
| | | <z-paging ref="paging" v-model="dataList" :auto="false" @query="queryList" show-refresher-update-time> |
| | | <template #top> |
| | | <wd-card type="rectangle"> |
| | | <template #title> |
| | |
| | | <text class="ml-1">è¿è¡ä¸</text> |
| | | </template> |
| | | </view> |
| | | <view class="text-color-gray text-xs mt-2 flex"> |
| | | å建æ¶é´: {{inspSt.createTime}} |
| | | </view> |
| | | <view class="text-color-gray text-xs mt-2 flex">å建æ¶é´: {{ inspSt.createTime }}</view> |
| | | </view> |
| | | </view> |
| | | </wd-card> |
| | |
| | | </view> |
| | | </wd-collapse-item> |
| | | </wd-collapse> |
| | | <view class="w-full h-[1rpx] bg-base"></view> |
| | | <view class="w-full h-[24rpx]"></view> |
| | | <wd-cell> |
| | | <template #title> |
| | | <text class="text-color-gray">å
¶å®</text> |
| | | </template> |
| | | </wd-cell> |
| | | <view class="w-full h-[1px] bg-base"></view> |
| | | <wd-textarea |
| | | label="ç¹è®°äºé¡¹" |
| | | label-width="200rpx" |
| | |
| | | <script setup lang="ts"> |
| | | import { ref } from 'vue' |
| | | import { useUserStore, useAccessStore, useSystemConfigStore } from '@/store' |
| | | import { getInspStRecordList, updateInspectSt, updateInspRecordBatch } from '@/service/inspect' |
| | | import { |
| | | getInspStRecordList, |
| | | getInspSt, |
| | | updateInspectSt, |
| | | updateInspRecordBatch, |
| | | } from '@/service/inspect' |
| | | import { useToast, useMessage } from 'wot-design-uni' |
| | | import type { CollapseInstance } from 'wot-design-uni/components/wd-collapse/types' |
| | | const message = useMessage() |
| | |
| | | |
| | | const collapseRef = ref<CollapseInstance>() |
| | | const isAllExpanded = ref(false) |
| | | const viewMode = ref<string>('Day') |
| | | |
| | | // å®ä¹æ¥å£ |
| | | interface QueryParams { |
| | |
| | | updateInspRecordBatch(params) |
| | | .then((res: any) => { |
| | | updateInspSt(resolve) |
| | | toast.success("æä½æå") |
| | | toast.success('æä½æå') |
| | | }) |
| | | .catch((res) => { |
| | | console.error(res) |
| | |
| | | { deep: true }, |
| | | ) |
| | | onLoad((options) => { |
| | | inspSt.id = options.id |
| | | inspSt.inspCode = options.inspCode |
| | | inspSt.equName = options.equName |
| | | inspSt.assetNo = options.assetNo |
| | | inspSt.planTimeStr = options.planTimeStr |
| | | inspSt.createTime = options.createTime |
| | | inspSt.specialNote = options?.specialNote |
| | | inspSt.inspUser = userStore?.userInfo?.userId |
| | | // inspSt.id = options.id |
| | | // inspSt.inspCode = options.inspCode |
| | | // inspSt.equName = options.equName |
| | | // inspSt.assetNo = options.assetNo |
| | | // inspSt.planTimeStr = options.planTimeStr |
| | | // inspSt.createTime = options.createTime |
| | | // inspSt.specialNote = options?.specialNote |
| | | // inspSt.inspUser = userStore?.userInfo?.userId |
| | | viewMode.value = options.viewMode |
| | | initData(options.id) |
| | | }) |
| | | |
| | | function initData(id: any) { |
| | | getInspSt(id) |
| | | .then((res: any) => { |
| | | if (res?.id) { |
| | | const inspCode = `${res?.equId}_${res?.planTime}_${viewMode.value}` |
| | | inspSt.inspCode = inspCode |
| | | Object.assign(inspSt, res) |
| | | reloadData() |
| | | } else { |
| | | uni.showToast({ |
| | | title: 'æ°æ®æ¥è¯¢å¤±è´¥ï¼è¯·è系管çå', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | }) |
| | | .catch((res) => { |
| | | console.error(res) |
| | | }) |
| | | } |
| | | function reloadData() { |
| | | paging.value.reload() |
| | | } |
| | | const dataCount = computed(() => dataList.value.length) |
| | | const checkCount = computed(() => dataList.value.filter((item) => item.status === '1').length) |
| | | const normalNum = computed(() => dataList.value.filter((item) => item.inspResult === '1').length) |
| | |
| | | } |
| | | |
| | | function itemClick(item) { |
| | | const inspCode = `${item.equId}_${item.planTime}_${viewMode.value}` |
| | | // const inspCode = `${item.equId}_${item.planTime}_${viewMode.value}` |
| | | uni.navigateTo({ |
| | | url: `/pages/inspect/insp-record?id=${item.id}&createTime=${item.createTime}&inspCode=${inspCode}&specialNote=${item.specialNote ?? ''}&equName=${item.equName ?? ''}&assetNo=${item.assetNo ?? ''}&planTimeStr=${item.planTimeStr ?? ''}`, |
| | | // url: `/pages/inspect/insp-record?id=${item.id}&createTime=${item.createTime}&inspCode=${inspCode}&specialNote=${item.specialNote ?? ''}&equName=${item.equName ?? ''}&assetNo=${item.assetNo ?? ''}&planTimeStr=${item.planTimeStr ?? ''}`, |
| | | url: `/pages/inspect/insp-record?id=${item.id}&viewMode=${viewMode.value}`, |
| | | }) |
| | | } |
| | | |
| | |
| | | import { useToast } from 'wot-design-uni' |
| | | import { login, getUserInfo } from '@/service/login' |
| | | import type { UserInfo } from '@/service/login.d' |
| | | import { TestEnum } from '@/typings' |
| | | import { tabbarStore } from '@/components/fg-tabbar/tabbar' |
| | | const userStore = useUserStore() |
| | | const accessStore = useAccessStore() |
| | | const configStore = useSystemConfigStore() |
| | | const { success: showSuccess } = useToast() |
| | | |
| | | const model = reactive<{ |
| | | username: string |
| | |
| | | userStore.setUserInfo(userInfo) |
| | | const { query } = currRoute() |
| | | uni.switchTab({ url: '/pages/home/index' }) |
| | | tabbarStore?.setCurIdx(0) |
| | | tabbarStore?.setLastIdx(0) |
| | | } |
| | | </script> |
| | | |
| | |
| | | <text class="ml-1">è¿è¡ä¸</text> |
| | | </template> |
| | | </view> |
| | | <view class="text-color-gray text-xs mt-2 flex"> |
| | | å建æ¶é´: {{item.createTime}} |
| | | </view> |
| | | <view class="text-color-gray text-xs mt-2 flex">å建æ¶é´: {{ item.createTime }}</view> |
| | | </view> |
| | | <wd-button size="small" icon="edit-outline" @click.stop="itemClick(item)">æç»</wd-button> |
| | | </view> |
| | |
| | | import { ref } from 'vue' |
| | | import { getMaintStList } from '@/service/maint' |
| | | |
| | | /** |
| | | * å
¶ä»é¡µé¢ä¼ è¿æ¥çæ°æ® |
| | | * assetNo: èµäº§ç¼å· |
| | | * from: æ¯å¦æ¯æ«ç è¿æ¥çï¼å¦ææ¯æ«ç è¿æ¥ï¼åªè½æ¥è¯¢åºå®è®¾å¤çæ°æ® |
| | | */ |
| | | interface PageParams { |
| | | assetNo?: string |
| | | from?: string |
| | | } |
| | | |
| | | interface QueryParams { |
| | | pageNum: number |
| | | pageSize: number |
| | | assetNo?: string |
| | | equName?: string |
| | | status?: string |
| | | } |
| | | |
| | | // 页é¢åæ°ï¼ä¸ä¸ªé¡µé¢ä¼ éè¿æ¥çåæ° |
| | | const option = reactive<PageParams>({ |
| | | assetNo: '', |
| | | from: '', |
| | | }) |
| | | const status = ref<string>('-1') |
| | | const equName = ref<string>('-1') |
| | | |
| | |
| | | if (status.value === '-1') { |
| | | delete params.status |
| | | } |
| | | // 妿æ¯ä»æ«ç 页é¢è¿æ¥ï¼åªè½æ¥è¯¢åºå®è®¾å¤çæ°æ® |
| | | if (option?.from === 'scan') { |
| | | params.assetNo = option.assetNo |
| | | } |
| | | |
| | | getMaintStList(params) |
| | | .then((res: any) => { |
| | |
| | | function reloadData() { |
| | | paging.value.reload() |
| | | } |
| | | onLoad(() => { |
| | | onLoad((options) => { |
| | | Object.assign(option, options) |
| | | uni.$on('maint-st-refresh', reloadData) |
| | | }) |
| | | onUnload(() => { |
| | |
| | | </route> |
| | | |
| | | <template> |
| | | <view class="pt-40 text-xl text-center text-green-500">æç页é¢</view> |
| | | <view class="bg-base"> |
| | | <wd-cell-group border> |
| | | <wd-cell title="ç»å½ç¨æ·" :value="realName" icon="user" is-link /> |
| | | <wd-cell title="è§è²" :value="loginRoleName()" icon="bags" is-link /> |
| | | <wd-cell title="人å管ç" icon="usergroup" is-link @click="handleInfo" /> |
| | | </wd-cell-group> |
| | | <wd-cell-group border class="mt-2"> |
| | | <wd-cell title="éåºç»å½" icon="login" is-link @click="handleLogout" /> |
| | | </wd-cell-group> |
| | | </view> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | // |
| | | import { useUserStore, useAccessStore, useSystemConfigStore } from '@/store' |
| | | import { loginRoleName } from '@/utils/RoleUtils' |
| | | import { useMessage } from 'wot-design-uni' |
| | | const message = useMessage() |
| | | const userStore = useUserStore() |
| | | const accessStore = useAccessStore() |
| | | const configStore = useSystemConfigStore() |
| | | const realName = computed(() => userStore?.userInfo?.realName) |
| | | |
| | | function handleLogout() { |
| | | if (!isLogined()) { |
| | | uni.navigateTo({ url: '/pages/login/index' }) |
| | | return false |
| | | } |
| | | message |
| | | .confirm({ |
| | | msg: 'æç¤º', |
| | | title: 'ç¡®å®éåºç»å½åï¼', |
| | | }) |
| | | .then(() => { |
| | | userStore.clearUserInfo() |
| | | accessStore.clearAccessInfo() |
| | | configStore.clearConfigInfo() |
| | | uni.navigateTo({ url: '/pages/login/index' }) |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | | |
| | | const isLogined = () => { |
| | | return accessStore.isLogined |
| | | } |
| | | |
| | | function handleInfo() { |
| | | uni.showToast({ |
| | | title: 'åè½å¼åä¸', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | label="æ
éç±»å" |
| | | v-model="model.reqType" |
| | | @confirm="handleConfirmReqType" |
| | | :disabled="reqTypeDis" |
| | | /> |
| | | </wd-cell-group> |
| | | |
| | |
| | | const toast = useToast() |
| | | const userStore = useUserStore() |
| | | |
| | | /** |
| | | * å
¶ä»é¡µé¢ä¼ è¿æ¥çæ°æ® |
| | | * assetNo: èµäº§ç¼å· |
| | | * from: æ¯å¦æ¯æ«ç è¿æ¥çï¼å¦ææ¯æ«ç è¿æ¥ï¼åªè½æ¥è¯¢åºå®è®¾å¤çæ°æ® |
| | | */ |
| | | interface PageParams { |
| | | equId?: string |
| | | equName?: string |
| | | from?: string |
| | | } |
| | | |
| | | // 页é¢åæ°ï¼ä¸ä¸ªé¡µé¢ä¼ éè¿æ¥çåæ° |
| | | const option = reactive<PageParams>({ |
| | | equId: '', |
| | | equName: '', |
| | | from: '', |
| | | }) |
| | | |
| | | const reqTypeDis = ref(false) |
| | | // æ¥ä¿®ç±»å |
| | | const reqList = ref<any>([]) |
| | | // æ
éç±»å« |
| | |
| | | * éæ©è®¾å¤ |
| | | */ |
| | | function handleSelectEqu() { |
| | | if(reqTypeDis.value){ |
| | | return false |
| | | } |
| | | uni.navigateTo({ |
| | | url: '/pages/equ/equ-list', |
| | | events: { |
| | |
| | | |
| | | function handleAddRepairReq() { |
| | | // è¡¥å
å¿
è¦å段 |
| | | model.status = '0' |
| | | model.status = '0' // æ¥ä¿®åé»è®¤ç¶æä¸ºå¾
æ¥å |
| | | model.reqTime = formatDate(new Date()) |
| | | model.reqDept = userStore?.userInfo?.deptId |
| | | model.reqUser = userStore?.userInfo?.userId |
| | |
| | | }) |
| | | |
| | | onLoad((options) => { |
| | | Object.assign(option, options) |
| | | // æ«ç 页é¢è¿å
¥çä¸äºåå§å |
| | | if (option.from === 'scan') { |
| | | model.equId = option?.equId |
| | | model.equName = option?.equName |
| | | // 设置类å为设å¤ç±»å |
| | | model.reqType = '1' |
| | | reqTypeDis.value = true |
| | | } |
| | | initData() |
| | | }) |
| | | </script> |
ÎļþÃû´Ó eims-ui-mobile/src/pages/repair/feedback.vue ÐÞ¸Ä |
| | |
| | | </view> |
| | | </template> |
| | | </wd-step> |
| | | |
| | | </wd-steps> |
| | | </wd-card> |
| | | |
| | |
| | | </view> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { getRepairRes, getRepairFb, getRepairRecordList } from '@/service/repair' |
| | | import { |
| | | getRepairRes, |
| | | getRepairFb, |
| | | getRepairRecordList, |
| | | addRepairFb, |
| | | updateRepairFb, |
| | | } from '@/service/repair' |
| | | import { reactive } from 'vue' |
| | | import { isLeader, isOperatorOrRepair } from '@/utils/RoleUtils' |
| | | import { RepairResVO, RepairFbVO, RepairRecordVO } from '@/service/repair.d' |
| | | |
| | | const isUpdate = ref(false) |
| | | const repairRes = reactive<RepairResVO>({ |
| | | id: '', |
| | | resCode: '', |
| | |
| | | |
| | | const repairFb = reactive<RepairFbVO>({ |
| | | id: '', |
| | | resId: '', |
| | | resCode: '', |
| | | fbResult: '', |
| | | suggestions: '', |
| | |
| | | .catch((res) => {}) |
| | | } |
| | | |
| | | |
| | | function initRepairRes(id: any) { |
| | | getRepairRes(id) |
| | | .then((res: any) => { |
| | |
| | | function getFeedBack(id: any) { |
| | | getRepairFb(id) |
| | | .then((res: any) => { |
| | | // å¨è¿éè¿è¡æ°æ®ç±»åè½¬æ¢ |
| | | res.repairSatisfaction = Number(res?.repairSatisfaction) |
| | | res.repairTimeliness = Number(res?.repairTimeliness) |
| | | res.serviceAttitude = Number(res?.serviceAttitude) |
| | | res.repairSs = Number(res?.repairSs) |
| | | Object.assign(repairFb, res) |
| | | }) |
| | | .catch((res) => {}) |
| | | } |
| | | async function initData(options: any) { |
| | | initRepairRes(options.id) |
| | | |
| | | function handleRepairFb() { |
| | | if(isOperatorOrRepair()){ |
| | | uni.showToast({ |
| | | title: 'æ æé,请ç»å½ç®¡çåè´¦å·æä½', |
| | | icon: 'none', |
| | | }) |
| | | return false |
| | | } |
| | | const id = repairFb.id |
| | | isUpdate.value = !!id |
| | | if (isUpdate.value) { |
| | | updateRepairFb(repairFb) |
| | | .then((res: any) => { |
| | | if (res?.code === 200) { |
| | | uni.showToast({ |
| | | title: 'ä¿®æ¹æå', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | }) |
| | | .catch((res) => {}) |
| | | } else { |
| | | addRepairFb(repairFb) |
| | | .then((res: any) => { |
| | | if (res?.code === 200) { |
| | | uni.showToast({ |
| | | title: 'è¯ä»·æå', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | }) |
| | | .catch((res) => {}) |
| | | } |
| | | } |
| | | |
| | | async function initData(options: any) { |
| | | repairFb.resId = options.id |
| | | initRepairRes(options.id) |
| | | } |
| | | |
| | | onNavigationBarButtonTap((e) => { |
| | | if (e.index === 0) { |
| | | handleRepairFb() |
| | | } |
| | | }) |
| | | |
| | | onLoad((options) => { |
| | | initData(options) |
| | |
| | | size="small" |
| | | icon="edit-outline" |
| | | @click.stop="goToFeedBack(item)" |
| | | v-if="item.fbId === null" |
| | | > |
| | | åè¯ä»· |
| | | æ¥çè¯ä»· |
| | | </wd-button> |
| | | </view> |
| | | </template> |
| | |
| | | size="small" |
| | | icon="edit-outline" |
| | | @click.stop="goToFeedBack(item)" |
| | | v-if="item.fbId === null" |
| | | > |
| | | åè¯ä»· |
| | | {{ item.fbId == null ? 'åè¯ä»·' : 'æ¥çè¯ä»·' }} |
| | | </wd-button> |
| | | </view> |
| | | </template> |
| | |
| | | |
| | | const message = useMessage() |
| | | const toast = useToast() |
| | | |
| | | /** |
| | | * å
¶ä»é¡µé¢ä¼ è¿æ¥çæ°æ® |
| | | * assetNo: èµäº§ç¼å· |
| | | * from: æ¯å¦æ¯æ«ç è¿æ¥çï¼å¦ææ¯æ«ç è¿æ¥ï¼åªè½æ¥è¯¢åºå®è®¾å¤çæ°æ® |
| | | */ |
| | | interface PageParams { |
| | | assetNo?: string |
| | | from?: string |
| | | } |
| | | |
| | | // 页é¢åæ°ï¼ä¸ä¸ªé¡µé¢ä¼ éè¿æ¥çåæ° |
| | | const option = reactive<PageParams>({ |
| | | assetNo: '', |
| | | from: '', |
| | | }) |
| | | |
| | | // ç»´ä¿®åç±»å |
| | | const resTypeId = ref<number>(0) |
| | | const resTypeId = ref<number>(-1) |
| | | // ç»´ä¿®åå¤çç¶æ |
| | | const status = ref<number>(0) |
| | | const status = ref<number>(-1) |
| | | |
| | | const isSelectRes = ref(false) |
| | | |
| | | const resTypeList = ref<any>([{ dictLabel: 'ææç±»å', dictValue: 0 }]) |
| | | const statusList = ref<any>([{ dictLabel: 'ææç¶æ', dictValue: 0 }]) |
| | | const resTypeList = ref<any>([{ dictLabel: 'ææç±»å', dictValue: -1 }]) |
| | | const statusList = ref<any>([{ dictLabel: 'ææç¶æ', dictValue: -1 }]) |
| | | function handleResType({ value }) { |
| | | reloadData() |
| | | } |
| | |
| | | const dataList = ref([]) |
| | | |
| | | const queryList = (pageNum?: number, pageSize?: number) => { |
| | | const parmams = { |
| | | const params: any = { |
| | | pageNum, |
| | | pageSize, |
| | | reqType: resTypeId.value, |
| | | status: status.value, |
| | | } |
| | | if (resTypeId.value === 0) { |
| | | delete parmams.reqType |
| | | if (resTypeId.value === -1) { |
| | | delete params.reqType |
| | | } |
| | | if (status.value === 0) { |
| | | delete parmams.status |
| | | if (status.value === -1) { |
| | | delete params.status |
| | | } |
| | | getRepairResList(parmams) |
| | | // 妿æ¯ä»æ«ç 页é¢è¿æ¥ï¼åªè½æ¥è¯¢åºå®è®¾å¤çæ°æ® |
| | | if (option?.from === 'scan') { |
| | | params.assetNo = option.assetNo |
| | | } |
| | | getRepairResList(params) |
| | | .then((res: any) => { |
| | | paging.value.completeByTotal(res.rows, res.total) |
| | | }) |
| | |
| | | |
| | | function goToFeedBack(item) { |
| | | uni.navigateTo({ |
| | | url: `/pages/repair/feedback?id=${item.id}`, |
| | | url: `/pages/repair/repair-fb?id=${item.id}`, |
| | | }) |
| | | } |
| | | |
| | |
| | | const sList: any = await getDictInfo(DICT_REPAIR_RES_STATUS) |
| | | statusList.value.push(...sList) |
| | | } |
| | | onLoad(() => { |
| | | onLoad((options) => { |
| | | Object.assign(option, options) |
| | | initData() |
| | | uni.$on('res-list-refresh', reloadData) |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="bg-base"> |
| | | <view v-if="exist"> |
| | | <wd-cell> |
| | | <template #title> |
| | | <text class="text-color-gray">设å¤å¾ç</text> |
| | | </template> |
| | | </wd-cell> |
| | | <view class="h-[1px] bg-base"></view> |
| | | <image class="equ-img" src="/static/images/cgq.png" /> |
| | | |
| | | <wd-cell class="mt-2"> |
| | | <template #title> |
| | | <text class="text-color-gray">设å¤ä¿¡æ¯</text> |
| | | </template> |
| | | </wd-cell> |
| | | <wd-card type="rectangle"> |
| | | <template #title> |
| | | <view class="flex justify-between items-baseline"> |
| | | <view class="flex items-center menu-title-box"> |
| | | <view class="menu-indicator"></view> |
| | | <text class="ml-1 text-xs">{{ model.assetNo }}</text> |
| | | <wd-tag v-if="model.status === '0'" class="ml-2" bg-color="cyan">è¯ç¨</wd-tag> |
| | | <wd-tag v-else-if="model.status === '1'" class="ml-2" type="success">使ç¨</wd-tag> |
| | | <wd-tag v-else-if="model.status === '2'" class="ml-2" type="danger">åç¨</wd-tag> |
| | | <wd-tag v-else-if="model.status === '3'" class="ml-2" bg-color="pink">æ¥åº</wd-tag> |
| | | <wd-tag v-else-if="model.status === '4'" class="ml-2" type="warning">é²ç½®</wd-tag> |
| | | <wd-tag v-else-if="model.status === '5'" class="ml-2">æ°å¢</wd-tag> |
| | | </view> |
| | | |
| | | <view @click="handleInfo"> |
| | | <text class="icon-color-base">详æ
</text> |
| | | <wd-icon name="arrow-right" custom-class="icon-color-base"></wd-icon> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <view class="flex h-[90rpx] items-center"> |
| | | <image class="slot-img text-center" src="/static/images/camera.png" /> |
| | | <view class="flex-1"> |
| | | <view class="text-color-base"> |
| | | {{ model.equName }} |
| | | <text class="text-color-gray ml-2 text-mini">{{ model.modelNo }}</text> |
| | | </view> |
| | | <view class="text-color-gray text-xs mt-1"> |
| | | {{ model.location }} | {{ model.madeIn }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </wd-card> |
| | | |
| | | <view class="mt-2"> |
| | | <wd-cell class="mt-2"> |
| | | <template #title> |
| | | <text class="text-color-gray">æä½</text> |
| | | </template> |
| | | </wd-cell> |
| | | <view class="h-[1px] bg-base"></view> |
| | | <view class="bg-white flex justify-around py-4"> |
| | | <wd-button icon="edit-outline" @click.stop="handleInsp">ç¹æ£</wd-button> |
| | | <wd-button icon="laptop" @click.stop="handMaint">ä¿å
»</wd-button> |
| | | <wd-button icon="tools" @click.stop="showActions">ç»´ä¿®</wd-button> |
| | | </view> |
| | | </view> |
| | | |
| | | <wd-action-sheet |
| | | v-model="show" |
| | | :actions="actions" |
| | | @close="close" |
| | | @select="select" |
| | | cancel-text="åæ¶" |
| | | /> |
| | | </view> |
| | | <view v-else> |
| | | <wd-status-tip image="search" tip="å½åæç´¢æ ç»æ" /> |
| | | <view class="w-full flex justify-center">{{ scanResult }}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import dayjs from 'dayjs' |
| | | import type { EquVO } from '@/service/equ.d' |
| | | import { useToast, useMessage } from 'wot-design-uni' |
| | | import { getEquByAssetNo } from '@/service/equ' |
| | | import { getInspStByStId } from '@/service/inspect' |
| | | const message = useMessage() |
| | | const toast = useToast() |
| | | const model = reactive<EquVO>({}) |
| | | |
| | | const scanResult = ref<string>('') |
| | | const show = ref<boolean>(false) |
| | | const exist = ref<boolean>(false) |
| | | const actions = ref([ |
| | | { |
| | | name: 'æ°å¢æ¥ä¿®', |
| | | }, |
| | | { |
| | | name: 'å»ç»´ä¿®', |
| | | }, |
| | | ]) |
| | | |
| | | function initData(assetNo: any) { |
| | | getEquByAssetNo(assetNo) |
| | | .then((res: any) => { |
| | | if (res.data) { |
| | | Object.assign(model, res) |
| | | } else { |
| | | toast.error('æªæ¥è¯¢å°è¯¥èµäº§ç¼å·ç¸å
³æ°æ®ï¼') |
| | | } |
| | | }) |
| | | .catch((res) => { |
| | | console.error(res) |
| | | toast.error(res?.data?.msg || '请æ±å¤±è´¥') |
| | | }) |
| | | } |
| | | function handleInfo() { |
| | | uni.showToast({ |
| | | title: 'åè½å¼åä¸', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | |
| | | function handleInsp() { |
| | | // æ¼æ¥åºst_id (ç±æ¥æ+设å¤idç»æ) |
| | | const today = dayjs().format('YYYYMMDD') |
| | | const stId = `${today}_${model.equId}` |
| | | |
| | | getInspStByStId(stId).then((res: any) => { |
| | | if (res?.id) { |
| | | uni.navigateTo({ |
| | | url: `/pages/inspect/insp-record?id=${res?.id}&viewMode=Day`, |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: '设å¤ä»å¤©æ²¡æç¹æ£è®°å½ï¼è¯·è系管çåï¼', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | function handMaint() { |
| | | if (!model?.assetNo) { |
| | | uni.showToast({ |
| | | title: 'æªæ¥è¯¢å°è®¾å¤ï¼è¯·è系管çåï¼', |
| | | icon: 'none', |
| | | }) |
| | | return false |
| | | } |
| | | uni.navigateTo({ |
| | | url: `/pages/maint/maint-st?assetNo=${model?.assetNo}&from=scan`, |
| | | }) |
| | | } |
| | | |
| | | function showActions() { |
| | | show.value = true |
| | | } |
| | | |
| | | function close() { |
| | | show.value = false |
| | | } |
| | | function select({ item, index }) { |
| | | console.error(model?.equId) |
| | | console.error(!model?.equId) |
| | | if (!model?.equId) { |
| | | uni.showToast({ |
| | | title: 'æªæ¥è¯¢å°è®¾å¤ï¼è¯·è系管çåï¼', |
| | | icon: 'none', |
| | | }) |
| | | return false |
| | | } |
| | | switch (index) { |
| | | case 0: |
| | | uni.navigateTo({ |
| | | url: `/pages/repair/repair-add?equId=${model?.equId}&equName=${model?.equName}&from=scan`, |
| | | }) |
| | | break |
| | | case 1: |
| | | uni.navigateTo({ |
| | | url: `/pages/repair/res-list?assetNo=${model?.assetNo}&from=scan`, |
| | | }) |
| | | break |
| | | } |
| | | } |
| | | onLoad((options) => { |
| | | scanResult.value = options?.result |
| | | initData(options?.result) |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .equ-img { |
| | | width: 100%; |
| | | height: 300rpx; |
| | | } |
| | | .slot-img { |
| | | width: 72rpx; |
| | | height: 72rpx; |
| | | margin-right: 24rpx; |
| | | } |
| | | .text-mini { |
| | | font-size: 22rpx; |
| | | } |
| | | |
| | | .menu-indicator { |
| | | width: 6rpx; |
| | | height: 22rpx; |
| | | border-radius: 10rpx; |
| | | background-color: $uni-color-primary; |
| | | } |
| | | :deep(.wd-card__footer) { |
| | | padding: 10rpx !important; |
| | | } |
| | | :deep(.wd-card__title-content) { |
| | | padding: 16rpx 0 !important; |
| | | } |
| | | </style> |
| | |
| | | layout: 'tabbar', |
| | | needLogin: true, |
| | | style: { |
| | | navigationBarTitleText: 'spare', |
| | | navigationBarTitleText: 'å¤ä»¶', |
| | | }, |
| | | } |
| | | </route> |
| | | |
| | | <template> |
| | | <view class="pt-40 text-xl text-center text-green-500">å¤ä»¶</view> |
| | | <view class="bg-base"> |
| | | <view class="flex px-4 py-3 bg-white"> |
| | | <div class="box-border h-[150rpx] flex-1 bg-tag rounded-sm mr-2 px-2 py-2"> |
| | | <wd-count-to |
| | | :startVal="0" |
| | | :endVal="0" |
| | | :fontSize="24" |
| | | color="text-color-base" |
| | | ></wd-count-to> |
| | | <view class="text-color-gray mt-1">åºåä¸è¶³</view> |
| | | </div> |
| | | <div class="box-border h-[150rpx] flex-1 bg-tag rounded-sm mr-2 px-2 py-2"> |
| | | <wd-count-to |
| | | :startVal="0" |
| | | :endVal="0" |
| | | :fontSize="24" |
| | | color="text-color-base" |
| | | ></wd-count-to> |
| | | <view class="text-color-gray mt-1">åºåè¿é</view> |
| | | </div> |
| | | </view> |
| | | <wd-cell-group border> |
| | | <wd-cell |
| | | title="å¤ä»¶å表" |
| | | is-link |
| | | to="/pages/spare/spare-list" |
| | | icon="list" |
| | | custom-icon-class="icon-color-base" |
| | | /> |
| | | <wd-cell |
| | | title="æ·»å å¤ä»¶" |
| | | is-link |
| | | icon="add" |
| | | custom-icon-class="icon-color-base" |
| | | @click="handleInfo" |
| | | /> |
| | | </wd-cell-group> |
| | | <wd-cell-group border class="mt-2"> |
| | | <wd-cell |
| | | title="æ·»å åºåº" |
| | | is-link |
| | | icon="add-circle" |
| | | custom-icon-class="icon-color-base" |
| | | @click="handleInfo" |
| | | /> |
| | | <wd-cell |
| | | title="æ·»å å
¥åº" |
| | | is-link |
| | | icon="add-circle" |
| | | custom-icon-class="icon-color-base" |
| | | @click="handleInfo" |
| | | /> |
| | | </wd-cell-group> |
| | | </view> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | // |
| | | function handleInfo() { |
| | | uni.showToast({ |
| | | title: 'åè½å¼åä¸', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | // |
| | | .bg-tag { |
| | | background: #f5f8ff; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <route lang="json5" type="page"> |
| | | { |
| | | layout: 'default', |
| | | needLogin: true, |
| | | style: { |
| | | navigationBarTitleText: 'å¤ä»¶å表', |
| | | }, |
| | | } |
| | | </route> |
| | | <template> |
| | | <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time> |
| | | <template #top> |
| | | <wd-drop-menu> |
| | | <wd-drop-menu-item v-model="typeId" :options="typeList" @change="handleSpareType" /> |
| | | <wd-drop-menu-item v-model="status" :options="statusList" @change="handleSpareStatu" /> |
| | | </wd-drop-menu> |
| | | </template> |
| | | |
| | | <view class="bg-base"> |
| | | <wd-card type="rectangle" v-for="(item, index) in dataList" :key="item.id"> |
| | | <template #title> |
| | | <view class="flex justify-between items-baseline"> |
| | | <view class="flex items-center menu-title-box"> |
| | | <view class="menu-indicator"></view> |
| | | <text class="ml-1 text-xs">{{ item.code }}</text> |
| | | </view> |
| | | |
| | | <view> |
| | | <text class="icon-color-base">详æ
</text> |
| | | <wd-icon name="arrow-right" custom-class="icon-color-base"></wd-icon> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <view class="flex h-[80rpx] items-center" @click.stop="itemClick(item)"> |
| | | <image class="slot-img text-center" src="/static/images/camera.png" /> |
| | | <view class="flex-1"> |
| | | <view class="text-color-base"> |
| | | {{ item.name }} |
| | | <text class="text-color-gray ml-2 text-mini">{{ item.modelNo }}</text> |
| | | </view> |
| | | <view class="text-color-gray text-xs mt-1"> |
| | | åºå: {{ item.actualStock }} | åä»·: {{ item.referPrice }} |
| | | </view> |
| | | <view class="text-color-gray text-xs mt-1"> |
| | | ä¾åºå: {{ item.supplier }} |
| | | </view> |
| | | </view> |
| | | <view v-if="isSelectSpare"> |
| | | <wd-button size="small" icon="edit-outline" @click.stop="handleSelectSpare(item)"> |
| | | éä¸ |
| | | </wd-button> |
| | | </view> |
| | | </view> |
| | | </wd-card> |
| | | </view> |
| | | </z-paging> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { onMounted, getCurrentInstance, ref } from 'vue' |
| | | |
| | | import { getSpareList } from '@/service/spare' |
| | | |
| | | // å¤ä»¶ç±»å |
| | | const typeId = ref<number>(-1) |
| | | // å¤ä»¶ç¶æ |
| | | const status = ref<number>(-1) |
| | | |
| | | const isSelectSpare = ref(false) |
| | | |
| | | const typeList = ref<Record<string, any>[]>([{ label: 'å¤ä»¶ç±»å', value: -1 }]) |
| | | const statusList = ref<Record<string, any>[]>([{ label: 'ææç¶æ', value: -1 }]) |
| | | function handleSpareType({ value }) { |
| | | console.log(value) |
| | | } |
| | | function handleSpareStatu({ value }) { |
| | | console.log(value) |
| | | } |
| | | |
| | | const paging = ref(null) |
| | | const dataList = ref([]) |
| | | |
| | | const queryList = (pageNum?: number, pageSize?: number) => { |
| | | getSpareList({ pageNum, pageSize }) |
| | | .then((res: any) => { |
| | | paging.value.completeByTotal(res.rows, res.total) |
| | | }) |
| | | .catch((res) => { |
| | | paging.value.complete(false) |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * å¤ä»¶æ¡ç®ç¹å»äºä»¶ |
| | | * @param item |
| | | */ |
| | | function itemClick(item: any) {} |
| | | |
| | | /** |
| | | * å
¶å®é¡µé¢éæ©å¤ä»¶ |
| | | * @param item |
| | | */ |
| | | function handleSelectSpare(item: any) { |
| | | if (isSelectSpare.value) { |
| | | emitSelectSpare(item) |
| | | uni.navigateBack() |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * éæ©å¤ä»¶åè° |
| | | * @param spare |
| | | */ |
| | | function emitSelectSpare(spare: any) { |
| | | eventChannel.value.emit('selectSpare', { |
| | | data: spare, |
| | | }) |
| | | } |
| | | |
| | | const eventChannel = ref<any>() |
| | | onMounted(() => { |
| | | const instance: any = getCurrentInstance().proxy |
| | | const event = instance.getOpenerEventChannel() |
| | | eventChannel.value = event |
| | | event.on('OnSelectSpare', function (data) { |
| | | isSelectSpare.value = true |
| | | console.log('OnSelectSpare', data) |
| | | }) |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .menu-title-box { |
| | | height: 30rpx; |
| | | line-height: 30rpx; |
| | | } |
| | | |
| | | .slot-img { |
| | | width: 72rpx; |
| | | height: 72rpx; |
| | | margin-right: 24rpx; |
| | | } |
| | | .text-mini { |
| | | font-size: 22rpx; |
| | | } |
| | | |
| | | .menu-indicator { |
| | | width: 6rpx; |
| | | height: 22rpx; |
| | | border-radius: 10rpx; |
| | | background-color: $uni-color-primary; |
| | | } |
| | | :deep(.wd-card__footer) { |
| | | padding: 10rpx !important; |
| | | } |
| | | </style> |
| | |
| | | export const DICT_REPAIR_REQ_STATUS = 'repair_req_status' |
| | | export const DICT_REPAIR_RES_STATUS = 'repair_res_status' |
| | | |
| | | export const DICT_SYS_EQU_STATUS = 'sys_equ_status' |
| | | |
| | | export const getDictInfo = (dictType: string) => { |
| | | return http.get<DictData[]>(`/system/dict/data/type/${dictType}`) |
| | | } |
| | | |
| | |
| | | /** |
| | | * |
| | | */ |
| | | equId: number | string; |
| | | equId?: number | string; |
| | | |
| | | /** |
| | | * èµäº§ç¼å· |
| | | */ |
| | | assetNo: string; |
| | | assetNo?: string; |
| | | /** |
| | | * 设å¤ç¼ç |
| | | */ |
| | | equCode: string; |
| | | equCode?: string; |
| | | |
| | | /** |
| | | * 设å¤åç§° |
| | | |
| | | */ |
| | | equName: string; |
| | | equName?: string; |
| | | /** |
| | | * 设å¤ç±»å |
| | | |
| | | */ |
| | | equTypeName: string; |
| | | equTypeName?: string; |
| | | |
| | | /** |
| | | * åå· |
| | | */ |
| | | modelNo: string; |
| | | modelNo?: string; |
| | | |
| | | /** |
| | | * å¶é å |
| | | */ |
| | | madeIn: string; |
| | | madeIn?: string; |
| | | |
| | | /** |
| | | * é¢åº¦åç |
| | | */ |
| | | ratedPower: number; |
| | | ratedPower?: number; |
| | | |
| | | /** |
| | | * éçä¿¡æ¯ |
| | | */ |
| | | plateInfo: string; |
| | | plateInfo?: string; |
| | | |
| | | /** |
| | | * éè´æ¥æ |
| | | */ |
| | | purchaseDate: string; |
| | | purchaseDate?: string; |
| | | |
| | | /** |
| | | * ç¶æ |
| | | */ |
| | | status: string; |
| | | status?: string; |
| | | |
| | | /** |
| | | * æå¨åºæ |
| | | */ |
| | | location: string; |
| | | location?: string; |
| | | |
| | | /** |
| | | * 使ç¨é¨é¨ï¼å
³èidï¼ |
| | | */ |
| | | deptUsed: number; |
| | | deptUsed?: number; |
| | | /** |
| | | * 使ç¨é¨é¨åç§° |
| | | */ |
| | | deptName: number; |
| | | deptName?: number; |
| | | |
| | | /** |
| | | * 责任人(å
³èid) |
| | | */ |
| | | respPerson: number; |
| | | respPerson?: number; |
| | | /** |
| | | * 责任人 |
| | | */ |
| | | respPersonName: string; |
| | | respPersonName?: string; |
| | | |
| | | /** |
| | | * èç³»çµè¯ |
| | | */ |
| | | contactPhone: string; |
| | | contactPhone?: string; |
| | | |
| | | /** |
| | | * æ£å¼ä½¿ç¨æ¥æ |
| | | */ |
| | | deployDate: string; |
| | | deployDate?: string; |
| | | |
| | | /** |
| | | * å¼å§è¯ç¨æ¥æ |
| | | */ |
| | | trialDate: string; |
| | | trialDate?: string; |
| | | |
| | | /** |
| | | * 计åéªæ¶æ¥æ |
| | | */ |
| | | planAcceptDate: string; |
| | | planAcceptDate?: string; |
| | | |
| | | /** |
| | | * å®é
éªæ¶æ¥æ |
| | | */ |
| | | actualAcceptDate: string; |
| | | actualAcceptDate?: string; |
| | | |
| | | /** |
| | | * 导å
¥ç¶æï¼åå
¸ï¼ |
| | | */ |
| | | importStatus: number; |
| | | importStatus?: number; |
| | | |
| | | /** |
| | | * çç¹æ å¿ |
| | | */ |
| | | inventoryFlag: number; |
| | | inventoryFlag?: number; |
| | | |
| | | /** |
| | | * 䏿¬¡çç¹æ¥æ |
| | | */ |
| | | inventoryDate: string; |
| | | inventoryDate?: string; |
| | | |
| | | /** |
| | | * 使ç¨å¹´é |
| | | */ |
| | | serviceLife: number; |
| | | serviceLife?: number; |
| | | } |
| | |
| | | export const getEquList = (params: any) => { |
| | | return http.get<EquVO[]>('/eims/equ/list', params) |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®èµäº§ç¼å·æ¥è¯¢è®¾å¤ |
| | | * @param id |
| | | */ |
| | | export const getEquByAssetNo = (assetNo: string) => { |
| | | return http.get<EquVO>(`/eims/equ/info/${assetNo}`) |
| | | } |
| | |
| | | import { http } from '@/utils/http' |
| | | import type { InspectStVO, InspectRecordVO } from './inspect.d' |
| | | |
| | | type ID = number | string |
| | | /** |
| | | * ç¹æ£æ±æ»å表 |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥è¯¢æ±æ» |
| | | * @param id |
| | | */ |
| | | export const getInspSt = (id: ID) => { |
| | | return http.get<InspectStVO>(`/eims/inspectSt/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥è¯¢æ±æ» |
| | | * @param stId |
| | | */ |
| | | export const getInspStByStId = (stId: string) => { |
| | | return http.get<InspectStVO>(`/eims/inspectSt/info/${stId}`) |
| | | } |
| | | |
| | | /** |
| | | * ç¹æ£æ±æ»å表ä¸ç¹æ£è®°å½å表 |
| | | */ |
| | | export const getInspStRecordList = (params: any) => { |
| | |
| | | /** |
| | | * ç»´ä¿®åæ¶æ§(åå
¸) |
| | | */ |
| | | repairTimeliness?: number | string; |
| | | repairTimeliness?: number ; |
| | | |
| | | /** |
| | | * æå¡æåº¦ |
| | | */ |
| | | serviceAttitude?: number | string; |
| | | serviceAttitude?: number ; |
| | | |
| | | /** |
| | | * ç»´ä¿®ç°åº6s |
| | | */ |
| | | repairSs?: number | string; |
| | | repairSs?: number ; |
| | | |
| | | /** |
| | | * 维修满æåº¦ |
| | | */ |
| | | repairSatisfaction?: number | string; |
| | | repairSatisfaction?: number ; |
| | | |
| | | /** |
| | | * æè§æå»ºè®® |
| | |
| | | return http.post<void>('/eims/repairFb', data) |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * ç¼è¾ç»´ä¿®è¯ä»· |
| | | * @param data |
| | | */ |
| | | export const updateRepairFb = (data: any) => { |
| | | return http.put<void>('/eims/repairFb', data) |
| | | } |
| | | |
| | | /** |
| | | * 维修记å½å表 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export interface SpareVO { |
| | | /** |
| | | * |
| | | */ |
| | | id: number | string; |
| | | |
| | | /** |
| | | * ç±»å |
| | | */ |
| | | type: number; |
| | | |
| | | /** |
| | | * å¤ä»¶åç§° |
| | | */ |
| | | name: string; |
| | | |
| | | /** |
| | | * å¤ä»¶ç¼ç |
| | | */ |
| | | code: string; |
| | | |
| | | /** |
| | | * å¤ä»¶å¾ç |
| | | */ |
| | | img: number; |
| | | |
| | | /** |
| | | * å¤ä»¶å¾çUrl |
| | | */ |
| | | imgUrl: string; |
| | | /** |
| | | * åå· |
| | | */ |
| | | modelNo: string; |
| | | |
| | | /** |
| | | * å¶é å |
| | | */ |
| | | madeIn: string; |
| | | |
| | | /** |
| | | * ä¾åºå |
| | | */ |
| | | supplier: string; |
| | | |
| | | /** |
| | | * 计éåä½ï¼åå
¸ï¼ |
| | | */ |
| | | unit: string; |
| | | |
| | | /** |
| | | * åèä»·æ ¼ |
| | | */ |
| | | referPrice: number; |
| | | |
| | | /** |
| | | * åºåä¸é |
| | | */ |
| | | upperStock: number; |
| | | |
| | | /** |
| | | * åºåä¸é |
| | | */ |
| | | lowerStock: number; |
| | | |
| | | /** |
| | | * å®é
åºå |
| | | */ |
| | | actualStock: number; |
| | | |
| | | /** |
| | | * åºåéé¢ |
| | | */ |
| | | stockAmount: number; |
| | | |
| | | /** |
| | | * æ´æ¢å¨æ |
| | | */ |
| | | replaceCycle: number; |
| | | |
| | | /** |
| | | * æ´æ¢å¨æåä½ï¼åå
¸ï¼ |
| | | */ |
| | | cycleUnit: string; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | remark: string; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { http } from '@/utils/http' |
| | | import type { SpareVO } from './spare.d' |
| | | |
| | | /** |
| | | * å¤ä»¶å表 |
| | | */ |
| | | export const getSpareList = (params: any) => { |
| | | return http.get<SpareVO[]>('/eims/spare/list', params) |
| | | } |
| | |
| | | background: $uni-color-primary; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | "/pages/maint/maint-st" | |
| | | "/pages/maint/order-detail" | |
| | | "/pages/my/index" | |
| | | "/pages/repair/feedback" | |
| | | "/pages/repair/repair-add" | |
| | | "/pages/repair/repair-fb" | |
| | | "/pages/repair/req-list" | |
| | | "/pages/repair/res-detail" | |
| | | "/pages/repair/res-list" | |
| | | "/pages/spare/index"; |
| | | "/pages/scan/index" | |
| | | "/pages/spare/index" | |
| | | "/pages/spare/spare-list"; |
| | | } |
| | | interface RedirectToOptions extends NavigateToOptions {} |
| | | |
| | |
| | | roles.includes(ROLE_LINE) || roles.includes(ROLE_SUPER_ADMIN) || roles.includes(ROLE_LEADER) |
| | | ) |
| | | } |
| | | |
| | | export const loginRoleName = () => { |
| | | const roles = useUserStore()?.userInfo?.roles || [] |
| | | if (roles.includes(ROLE_SUPER_ADMIN)) { |
| | | return 'è¶
级管çå' |
| | | } |
| | | if (roles.includes(ROLE_LEADER)) { |
| | | return '管çå' |
| | | } |
| | | if (roles.includes(ROLE_OPERATOR)) { |
| | | return 'æä½å' |
| | | } |
| | | if (roles.includes(ROLE_LINE)) { |
| | | return '线é¿' |
| | | } |
| | | if (roles.includes(ROLE_REPAIR)) { |
| | | return '维修工' |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * è·åã设å¤å°è´¦ã详ç»ä¿¡æ¯ |
| | | * |
| | | * @param assetNo |
| | | */ |
| | | @SaCheckPermission("eims:equ:query") |
| | | @GetMapping("/info/{assetNo}") |
| | | public R<EimsEquVo> getInfoByAssetNo(@NotNull(message = "èµäº§ç¼å·ä¸è½ä¸ºç©º") |
| | | @PathVariable String assetNo) { |
| | | return R.ok(eimsEquipmentService.queryByAssetNo(assetNo)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ã设å¤å°è´¦ã |
| | | */ |
| | | @SaCheckPermission("eims:equ:add") |
| | |
| | | return R.ok(eimsInspectStService.queryById(id)); |
| | | } |
| | | |
| | | @SaCheckPermission("eims:inspectSt:query") |
| | | @GetMapping("/info/{stId}") |
| | | public R<EimsInspectStVo> getInfoByStid(@NotNull(message = "主é®ä¸è½ä¸ºç©º") |
| | | @PathVariable String stId) { |
| | | return R.ok(eimsInspectStService.queryByStId(stId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£æ±æ» |
| | | */ |
| | |
| | | // å
³èè¡¨åæ®µ |
| | | private String reqCode;//æ¥ä¿®åç¼ç |
| | | private String reqType;//æ¥ä¿®åç±»å |
| | | private String assetNo;//设å¤èµäº§ç¼å· |
| | | |
| | | |
| | | |
| | |
| | | package org.dromara.eims.service; |
| | | |
| | | import jakarta.validation.constraints.NotNull; |
| | | import org.dromara.eims.domain.vo.EimsInspectStVo; |
| | | import org.dromara.eims.domain.bo.EimsInspectStBo; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | |
| | | * @return ç¹æ£æ±æ» |
| | | */ |
| | | EimsInspectStVo queryById(Long id); |
| | | |
| | | EimsInspectStVo queryByStId(String stId); |
| | | /** |
| | | * å页æ¥è¯¢ç¹æ£æ±æ»å表 |
| | | * |
| | |
| | | * @return æ¯å¦å 餿å |
| | | */ |
| | | Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.eims.domain.EimsEqu; |
| | | import org.dromara.eims.domain.EimsInspectRecord; |
| | | import org.dromara.eims.domain.vo.EimsInspectRecordVo; |
| | | import org.dromara.eims.mapper.EimsEquMapper; |
| | | import org.dromara.eims.mapper.EimsInspectRecordMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.dromara.eims.domain.bo.EimsInspectStBo; |
| | |
| | | public class EimsInspectStServiceImpl implements IEimsInspectStService { |
| | | |
| | | private final EimsInspectStMapper baseMapper; |
| | | private final EimsEquMapper equMapper; |
| | | private final EimsInspectRecordMapper recordMapper; |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public EimsInspectStVo queryById(Long id){ |
| | | EimsInspectStVo stVo = baseMapper.selectVoById(id); |
| | | if(stVo!=null&&stVo.getEquId()!=null){ |
| | | EimsEqu eimsEqu = equMapper.selectById(stVo.getEquId()); |
| | | stVo.setEquName(eimsEqu.getEquName()); |
| | | stVo.setAssetNo(eimsEqu.getAssetNo()); |
| | | } |
| | | // fillStDataSingle(stVo); |
| | | return stVo; |
| | | } |
| | | |
| | | @Override |
| | | public EimsInspectStVo queryByStId(String stId) { |
| | | QueryWrapper<EimsInspectSt> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("st_id", stId); |
| | | EimsInspectStVo stVo = baseMapper.selectVoOne(queryWrapper); |
| | | if(stVo!=null&&stVo.getEquId()!=null){ |
| | | EimsEqu eimsEqu = equMapper.selectById(stVo.getEquId()); |
| | | stVo.setEquName(eimsEqu.getEquName()); |
| | | stVo.setAssetNo(eimsEqu.getAssetNo()); |
| | | } |
| | | // fillStDataSingle(stVo); |
| | | return stVo; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * |
| | | * @param stVo |
| | | * @param type Day-æ¥è§å¾ Month-æè§å¾ |
| | | * @param stVo type Day-æ¥è§å¾ Month-æè§å¾ |
| | | * @param |
| | | */ |
| | | private void fillStDataSingle(EimsInspectStVo stVo,String type) { |
| | | private void fillStDataSingle(EimsInspectStVo stVo) { |
| | | |
| | | LambdaQueryWrapper<EimsInspectRecord> recordLqw = Wrappers.lambdaQuery(); |
| | | recordLqw.eq(EimsInspectRecord::getEquId, stVo.getEquId()); |
| | |
| | | LocalDate endOfMonth = planTime.with(TemporalAdjusters.lastDayOfMonth()); |
| | | |
| | | // æ¥è§å¾æ¥è¯¢èå´ |
| | | if(type.equals("Day")){ |
| | | if(stVo.getType().equals("Day")){ |
| | | recordLqw.between(EimsInspectRecord::getPlanTime, planTime, planTime); |
| | | }else { |
| | | // æè§å¾æ¥è¯¢èå´ |
| | |
| | | qw.eq(bo.getResUser() != null, "res.res_user", bo.getResUser()); |
| | | qw.eq(bo.getReqType() != null, "req.req_type", bo.getReqType()); |
| | | qw.eq(bo.getReqUser() != null, "res.req_user", bo.getReqUser()); |
| | | qw.eq(bo.getAssetNo() != null, "equ.asset_no", bo.getAssetNo()); |
| | | |
| | | List<Long> resDeptIds = getAllDescendantIds(bo.getResDept()); |
| | | qw.in(bo.getResDept() != null, "res.res_dept", resDeptIds); |