| | |
| | | } |
| | | }, |
| | | { |
| | | "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", |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/repair/res-detail", |
| | | "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/res-list", |
| | | "type": "page", |
| | | "layout": "default", |
| | |
| | | </wd-button> |
| | | |
| | | <view class="copyright-info"> |
| | | <text> |
| | | 䏿µ·å
°å®ä¼ æç§æè¡ä»½æéå
¬å¸ |
| | | </text> |
| | | |
| | | <text>䏿µ·å
°å®ä¼ æç§æè¡ä»½æéå
¬å¸</text> |
| | | </view> |
| | | </view> |
| | | </wd-form> |
| | |
| | | } |
| | | userStore.setUserInfo(userInfo) |
| | | const { query } = currRoute() |
| | | uni.switchTab({ url: query.redirect }) |
| | | uni.switchTab({ url: '/pages/home/index' }) |
| | | } |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <route lang="json5" type="page"> |
| | | { |
| | | layout: 'default', |
| | | needLogin: true, |
| | | style: { |
| | | navigationBarTitleText: 'ç»´ä¿®è¯ä»·', |
| | | 'app-plus': { |
| | | titleNView: { |
| | | buttons: [ |
| | | { |
| | | text: 'æäº¤', |
| | | fontSize: '14px', |
| | | color: '#FFFFFF', |
| | | }, |
| | | { |
| | | text: '', |
| | | fontSize: '14px', |
| | | color: '#FFFFFF', |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | </route> |
| | | <template> |
| | | <view class="bg-base"> |
| | | <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-steps :active="repairRecordList.length" vertical class="px-4"> |
| | | <wd-step v-for="(item,index) in repairRecordList" > |
| | | <template #title> |
| | | <view class="flex items-center menu-title-box"> |
| | | <view class="ml-1 text-xs">{{ item?.operaResult }}</view> |
| | | </view> |
| | | </template> |
| | | <template #description> |
| | | <view class="flex items-center menu-title-box"> |
| | | <view class="ml-1 text-xs">{{ item?.operaUserName }}</view> |
| | | <view class="ml-1 text-xs">{{ item?.handleTime }}</view> |
| | | </view> |
| | | </template> |
| | | </wd-step> |
| | | |
| | | </wd-steps> |
| | | </wd-card> |
| | | |
| | | <wd-cell-group use-slot border> |
| | | <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-cell title="维修满æåº¦"> |
| | | <wd-rate v-model="repairFb.repairSatisfaction" change="handleChange"></wd-rate> |
| | | </wd-cell> |
| | | <wd-cell title="ç»´ä¿®åæ¶æ§"> |
| | | <wd-rate v-model="repairFb.repairTimeliness" change="handleChange"></wd-rate> |
| | | </wd-cell> |
| | | <wd-cell title="ç»´ä¿®åæåº¦"> |
| | | <wd-rate v-model="repairFb.serviceAttitude" change="handleChange"></wd-rate> |
| | | </wd-cell> |
| | | <wd-cell title="ç»´ä¿®ç°åº6S"> |
| | | <wd-rate v-model="repairFb.repairSs" change="handleChange"></wd-rate> |
| | | </wd-cell> |
| | | |
| | | <wd-textarea |
| | | label="ç»æåé¦" |
| | | label-width="200rpx" |
| | | type="textarea" |
| | | v-model="repairFb.fbResult" |
| | | auto-height |
| | | :maxlength="200" |
| | | show-word-limit |
| | | placeholder="请è¾å
¥ç»æåé¦" |
| | | clearable |
| | | /> |
| | | <wd-textarea |
| | | label="æè§æå»ºè®®" |
| | | label-width="200rpx" |
| | | type="textarea" |
| | | v-model="repairFb.suggestions" |
| | | auto-height |
| | | :maxlength="200" |
| | | show-word-limit |
| | | placeholder="请è¾å
¥æè§æå»ºè®®" |
| | | clearable |
| | | /> |
| | | </wd-cell-group> |
| | | </view> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { getRepairRes, getRepairFb, getRepairRecordList } from '@/service/repair' |
| | | import { reactive } from 'vue' |
| | | import { RepairResVO, RepairFbVO, RepairRecordVO } from '@/service/repair.d' |
| | | |
| | | const repairRes = reactive<RepairResVO>({ |
| | | id: '', |
| | | resCode: '', |
| | | reqType: '', |
| | | reqDesc: '', |
| | | equName: '', |
| | | assetNo: '', |
| | | fixtureName: '', |
| | | resReason: '', |
| | | status: '', |
| | | resHandle: '', |
| | | resPrevent: '', |
| | | fbId: '', |
| | | remark: '', |
| | | }) |
| | | |
| | | const repairFb = reactive<RepairFbVO>({ |
| | | id: '', |
| | | resCode: '', |
| | | fbResult: '', |
| | | suggestions: '', |
| | | repairSatisfaction: 0, |
| | | repairTimeliness: 0, |
| | | serviceAttitude: 0, |
| | | repairSs: 0, |
| | | }) |
| | | |
| | | const repairRecordList = ref<RepairRecordVO[]>([]) |
| | | |
| | | function handleChange({ value }) { |
| | | console.log(value) |
| | | } |
| | | |
| | | function getRepairRecord() { |
| | | if(!repairRes.id){ |
| | | return false |
| | | } |
| | | const params = { |
| | | resId: repairRes.id, |
| | | } |
| | | getRepairRecordList(params) |
| | | .then((res: any) => { |
| | | console.error(res) |
| | | if(res?.code === 200){ |
| | | repairRecordList.value = res?.rows?.sort((a, b) => { |
| | | if (a.handleTime < b.handleTime) { |
| | | return -1 |
| | | } |
| | | if (a.handleTime > b.handleTime) { |
| | | return 1 |
| | | } |
| | | return 0 |
| | | }) |
| | | } |
| | | }) |
| | | .catch((res) => {}) |
| | | } |
| | | |
| | | |
| | | function initRepairRes(id: any) { |
| | | getRepairRes(id) |
| | | .then((res: any) => { |
| | | Object.assign(repairRes, res) |
| | | if (repairRes.fbId != null) { |
| | | getFeedBack(repairRes.fbId) |
| | | } |
| | | getRepairRecord() |
| | | }) |
| | | .catch((res) => {}) |
| | | } |
| | | |
| | | function getFeedBack(id: any) { |
| | | getRepairFb(id) |
| | | .then((res: any) => { |
| | | Object.assign(repairFb, res) |
| | | }) |
| | | .catch((res) => {}) |
| | | } |
| | | async function initData(options: any) { |
| | | initRepairRes(options.id) |
| | | |
| | | } |
| | | |
| | | onLoad((options) => { |
| | | initData(options) |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .menu-indicator { |
| | | width: 6rpx; |
| | | height: 24rpx; |
| | | border-radius: 10rpx; |
| | | background-color: $uni-color-primary; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <route lang="json5" type="page"> |
| | | { |
| | | layout: 'default', |
| | | needLogin: true, |
| | | style: { |
| | | navigationBarTitleText: 'ç»´ä¿®æç»', |
| | | 'app-plus': { |
| | | titleNView: { |
| | | buttons: [ |
| | | { |
| | | text: 'æäº¤', |
| | | fontSize: '14px', |
| | | color: '#FFFFFF', |
| | | }, |
| | | { |
| | | text: 'ä¿å', |
| | | fontSize: '14px', |
| | | color: '#FFFFFF', |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | </route> |
| | | <template> |
| | | <view class="bg-base container" safeAreaInsetTopBottom> |
| | | <wd-form ref="form" :model="repairRes" :rules="rules"> |
| | | <wd-cell-group custom-class="group" title="æ¥ä¿®ä¿¡æ¯" border> |
| | | <wd-cell title="æ
éç±»å" title-width="200rpx" is-link> |
| | | <text>{{ reqType?.dictLabel }}</text> |
| | | </wd-cell> |
| | | <wd-cell title="æ¥ä¿®æè¿°" :label="repairRes?.reqDesc" is-link /> |
| | | </wd-cell-group> |
| | | |
| | | <wd-cell-group |
| | | v-if="repairRes?.reqType === '1'" |
| | | custom-class="mt-2" |
| | | title="设å¤ä¿¡æ¯" |
| | | use-slot |
| | | border |
| | | > |
| | | <wd-cell title="设å¤åç§°" title-width="200rpx" is-link> |
| | | <text>{{ repairRes?.equName }}</text> |
| | | </wd-cell> |
| | | <wd-cell title="èµäº§ç¼å·" title-width="200rpx" is-link> |
| | | <text>{{ repairRes?.assetNo }}</text> |
| | | </wd-cell> |
| | | </wd-cell-group> |
| | | |
| | | <wd-cell-group |
| | | v-if="repairRes?.reqType === '2'" |
| | | custom-class="mt-2" |
| | | title="å·¥å
·ä¿¡æ¯" |
| | | use-slot |
| | | border |
| | | > |
| | | <wd-cell title="å·¥å
·åç§°" title-width="200rpx" is-link> |
| | | <text>{{ repairRes?.fixtureName }}</text> |
| | | </wd-cell> |
| | | <wd-cell title="èµäº§ç¼å·" title-width="200rpx" is-link> |
| | | <text>{{ repairRes?.assetNo }}</text> |
| | | </wd-cell> |
| | | </wd-cell-group> |
| | | |
| | | <wd-cell-group custom-class="mt-2" title="维修信æ¯" use-slot border> |
| | | <wd-textarea |
| | | label="åå åæ" |
| | | label-width="200rpx" |
| | | type="textarea" |
| | | v-model="repairRes.resReason" |
| | | auto-height |
| | | :maxlength="200" |
| | | show-word-limit |
| | | placeholder="请è¾å
¥åå åæ" |
| | | clearable |
| | | /> |
| | | |
| | | <wd-textarea |
| | | label="å¤çæªæ½" |
| | | label-width="200rpx" |
| | | type="textarea" |
| | | v-model="repairRes.resHandle" |
| | | auto-height |
| | | :maxlength="200" |
| | | show-word-limit |
| | | placeholder="请è¾å
¥å¤çæªæ½" |
| | | clearable |
| | | /> |
| | | |
| | | <wd-textarea |
| | | label="é¢é²æªæ½" |
| | | label-width="200rpx" |
| | | type="textarea" |
| | | v-model="repairRes.resPrevent" |
| | | auto-height |
| | | :maxlength="200" |
| | | show-word-limit |
| | | placeholder="请è¾å
¥é¢é²æªæ½" |
| | | clearable |
| | | /> |
| | | |
| | | <wd-textarea |
| | | label="夿³¨" |
| | | label-width="200rpx" |
| | | type="textarea" |
| | | v-model="repairRes.remark" |
| | | auto-height |
| | | :maxlength="200" |
| | | show-word-limit |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | clearable |
| | | /> |
| | | </wd-cell-group> |
| | | <view class="h-[2px] w-full bg-base"></view> |
| | | </wd-form> |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { getRepairRes, updateRepairRes } from '@/service/repair' |
| | | import { RepairResVO } from '@/service/repair.d' |
| | | import { reactive, onMounted, ref } from 'vue' |
| | | import { FormRules } from 'wot-design-uni/components/wd-form/types' |
| | | import { useToast, useMessage } from 'wot-design-uni' |
| | | import { isLeader, isOperatorOrRepair } from '@/utils/RoleUtils' |
| | | import { DICT_REPAIR_REQ_TYPE, getDictInfo } from '@/service/dict' |
| | | import { formatDate } from '@/utils/DateUtils' |
| | | const toast = useToast() |
| | | const message = useMessage() |
| | | |
| | | const fileList = ref<[]>() |
| | | |
| | | // æ¥ä¿®åç±»å |
| | | const reqTypeList = ref<any>([]) |
| | | |
| | | const repairRes = reactive<RepairResVO>({ |
| | | id: '', |
| | | resCode: '', |
| | | reqType: '', |
| | | reqDesc: '', |
| | | equName: '', |
| | | assetNo: '', |
| | | fixtureName: '', |
| | | resReason: '', |
| | | status: '', |
| | | resHandle: '', |
| | | resPrevent: '', |
| | | remark: '', |
| | | }) |
| | | |
| | | const rules: FormRules = { |
| | | startTime: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©ä¿å
»å¼å§æ¶é´', |
| | | }, |
| | | ], |
| | | } |
| | | |
| | | function handleFileChange({ fileList }) {} |
| | | |
| | | function initRepairRes(id: any) { |
| | | getRepairRes(id) |
| | | .then((res: any) => { |
| | | Object.assign(repairRes, res) |
| | | }) |
| | | .catch((res) => {}) |
| | | } |
| | | |
| | | async function initData(options: any) { |
| | | initRepairRes(options.id) |
| | | const reqList = await getDictInfo(DICT_REPAIR_REQ_TYPE) |
| | | reqTypeList.value = reqList |
| | | } |
| | | |
| | | function hanldeUpdateRepairRes(data: any, resolve: any) { |
| | | updateRepairRes(data) |
| | | .then((res: any) => { |
| | | resolve(true) |
| | | toastSucces() |
| | | uni.$emit('res-list-refresh') |
| | | }) |
| | | .catch((res) => { |
| | | console.error(res) |
| | | }) |
| | | } |
| | | function toastSucces() { |
| | | toast.success('æä½æå') |
| | | } |
| | | |
| | | function handleClickRight(data: any) { |
| | | message |
| | | .confirm({ |
| | | msg: 'ç¡®å®æäº¤ï¼', |
| | | title: 'æç¤º', |
| | | beforeConfirm: ({ resolve }) => { |
| | | hanldeUpdateRepairRes(data, resolve) |
| | | }, |
| | | }) |
| | | .then(() => {}) |
| | | .catch((error) => { |
| | | console.log(error) |
| | | }) |
| | | } |
| | | |
| | | onNavigationBarButtonTap((e) => { |
| | | if (e.index === 0) { |
| | | // 管çåè§è² |
| | | if (isLeader()) { |
| | | toast.warning('å½åç»å½è§è²ä¸å¯æä½') |
| | | } else if (isOperatorOrRepair()) { |
| | | switch (repairRes.status) { |
| | | // å·²æ¥å |
| | | case '1': |
| | | break |
| | | // ç»´ä¿®ä¸ |
| | | case '2': |
| | | { |
| | | const data = Object.assign({}, repairRes) |
| | | // æäº¤ä¿®æ¹ç¶æä¸ºå®æ |
| | | data.status = '3' |
| | | // è®¾ç½®ç»´ä¿®å®ææ¶é´ |
| | | data.endTime = formatDate(new Date()) |
| | | handleClickRight(data) |
| | | } |
| | | break |
| | | // 已宿 |
| | | case '3': |
| | | toast.warning('å½å维修工åå®æç¶æï¼ä¸å¯æä½') |
| | | break |
| | | } |
| | | } |
| | | } else if (e.index === 1) { |
| | | if (isLeader()) { |
| | | toast.warning('å½åç»å½è§è²ä¸å¯æä½') |
| | | } else if (isOperatorOrRepair()) { |
| | | switch (repairRes.status) { |
| | | // å·²æ¥å |
| | | case '1': |
| | | break |
| | | // ç»´ä¿®ä¸ |
| | | case '2': |
| | | { |
| | | const data = Object.assign({}, repairRes) |
| | | data.status = '2' |
| | | // ä»
ä¿åä¸ä¿®æ¹ç¶æ |
| | | handleClickRight(data) |
| | | } |
| | | break |
| | | // 已宿 |
| | | case '3': |
| | | toast.warning('å½å维修工åå®æç¶æï¼ä¸å¯æä½') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | |
| | | const reqType = computed(() => |
| | | reqTypeList.value.find((item) => item.dictValue === repairRes.reqType), |
| | | ) |
| | | |
| | | onMounted(() => {}) |
| | | onLoad((options) => { |
| | | initData(options) |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .container { |
| | | } |
| | | </style> |
| | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <view class="flex h-[240rpx] items-center" @click.stop="itemClick(item)"> |
| | | <view class="flex h-[240rpx] items-center"> |
| | | <image |
| | | v-if="item.reqType === '1'" |
| | | class="slot-img text-center" |
| | |
| | | </view> |
| | | |
| | | <view class="text-color-gray mt-1 text-mini"> |
| | | <text>å¼å§æ¶é´: {{ item.startTime }}</text> |
| | | <text>ç»´ä¿®å¼å§: {{ item.startTime }}</text> |
| | | </view> |
| | | <view class="text-color-gray mt-1 text-mini"> |
| | | <text>宿æ¶é´: {{ item.endTime }}</text> |
| | | <text>ç»´ä¿®ç»æ: {{ item.endTime }}</text> |
| | | </view> |
| | | <view class="text-color-gray mt-1 text-mini"> |
| | | <text>维修人: {{ item.resUserName }}</text> |
| | |
| | | </view> |
| | | </view> |
| | | <view> |
| | | <wd-button v-if="item.status === '1'" size="small" icon="edit-outline">å¼å§ç»´ä¿®</wd-button> |
| | | <wd-button v-if="item.status === '2'" size="small" icon="edit-outline">ç»´ä¿®ä¸</wd-button> |
| | | <wd-button v-if="item.status === '3'" size="small" icon="edit-outline">已宿</wd-button> |
| | | <!--æä½å·¥æç»´ä¿®å·¥è§è²--> |
| | | <template v-if="isOperatorOrRepair()"> |
| | | <wd-button |
| | | v-if="item.status === '1'" |
| | | size="small" |
| | | icon="edit-outline" |
| | | @click.stop="handleStartRepair(item)" |
| | | > |
| | | å¼å§ç»´ä¿® |
| | | </wd-button> |
| | | <wd-button |
| | | v-else-if="item.status === '2'" |
| | | size="small" |
| | | icon="edit-outline" |
| | | @click.stop="itemClick(item)" |
| | | > |
| | | ç»´ä¿®ä¸ |
| | | </wd-button> |
| | | <view class="h-full flex flex-col" v-else-if="item.status === '3'"> |
| | | <wd-button size="small" icon="warn-bold" @click.stop="itemClick(item)"> |
| | | 详æ
|
| | | </wd-button> |
| | | <wd-button |
| | | class="mt-4" |
| | | size="small" |
| | | icon="edit-outline" |
| | | @click.stop="goToFeedBack(item)" |
| | | v-if="item.fbId === null" |
| | | > |
| | | åè¯ä»· |
| | | </wd-button> |
| | | </view> |
| | | </template> |
| | | |
| | | <!--管çåè§è²--> |
| | | <template v-else-if="isLeader()"> |
| | | <wd-button |
| | | v-if="item.status === '1'" |
| | | size="small" |
| | | icon="warn-bold" |
| | | disabled |
| | | @click.stop="itemClick(item)" |
| | | > |
| | | å¾
ç»´ä¿® |
| | | </wd-button> |
| | | <wd-button |
| | | v-else-if="item.status === '2'" |
| | | size="small" |
| | | icon="warn-bold" |
| | | disabled |
| | | @click.stop="itemClick(item)" |
| | | > |
| | | ç»´ä¿®ä¸ |
| | | </wd-button> |
| | | <view class="h-full flex flex-col" v-else-if="item.status === '3'"> |
| | | <wd-button size="small" icon="warn-bold" @click.stop="itemClick(item)"> |
| | | 详æ
|
| | | </wd-button> |
| | | <wd-button |
| | | class="mt-4" |
| | | size="small" |
| | | icon="edit-outline" |
| | | @click.stop="goToFeedBack(item)" |
| | | v-if="item.fbId === null" |
| | | > |
| | | åè¯ä»· |
| | | </wd-button> |
| | | </view> |
| | | </template> |
| | | </view> |
| | | </view> |
| | | </wd-card> |
| | |
| | | <script setup lang="ts"> |
| | | import { onMounted, getCurrentInstance, ref } from 'vue' |
| | | import { useToast, useMessage } from 'wot-design-uni' |
| | | import { getRepairResList, addRepairRes } from '@/service/repair' |
| | | import { getRepairResList, addRepairRes, updateRepairRes } from '@/service/repair' |
| | | import { DICT_REPAIR_RES_STATUS, DICT_REPAIR_REQ_TYPE, getDictInfo } from '@/service/dict' |
| | | import { isLeader, isOperatorOrRepair } from '@/utils/RoleUtils' |
| | | import { useUserStore } from '@/store' |
| | | import { formatDate } from '@/utils/DateUtils' |
| | | const userStore = useUserStore() |
| | | |
| | | const message = useMessage() |
| | |
| | | * æ¡ç®ç¹å»äºä»¶ |
| | | * @param item |
| | | */ |
| | | function itemClick(item: any) {} |
| | | function itemClick(item: any) { |
| | | goToDetail(item) |
| | | } |
| | | |
| | | /** |
| | | * å¼å§ç»´ä¿® |
| | | * @param item |
| | | */ |
| | | function handleStartRepair(item: any) { |
| | | // 确认å¼å§ä¿®æ¹ç¶æä¸º2-ç»´ä¿®ä¸ |
| | | const data = Object.assign({}, item) |
| | | // 确认å¼å§ä¿®æ¹ç¶æä¸º2-ç»´ä¿®ä¸ |
| | | data.status = '2' |
| | | // 设置å¼å§ç»´ä¿®æ¶é´ |
| | | data.startTime = formatDate(new Date()) |
| | | message |
| | | .confirm({ |
| | | msg: 'ç¡®å®å¼å§ç»´ä¿®ï¼', |
| | | title: 'æç¤º', |
| | | beforeConfirm: ({ resolve }) => { |
| | | updateRepair(data, resolve) |
| | | }, |
| | | }) |
| | | .then(() => {}) |
| | | .catch((error) => { |
| | | console.log(error) |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ°ç»´ä¿®å·¥å |
| | | * @param data |
| | | * @param resolve |
| | | */ |
| | | function updateRepair(data: any, resolve: any) { |
| | | updateRepairRes(data) |
| | | .then((res: any) => { |
| | | resolve(true) |
| | | if (res?.code === 200) { |
| | | reloadData() |
| | | // ç»´ä¿®ä¸ç¶ææéè¦è·³è½¬ |
| | | if (data?.status === '2') { |
| | | goToDetail(data) |
| | | } |
| | | } |
| | | }) |
| | | .catch((res) => { |
| | | console.error(res) |
| | | }) |
| | | } |
| | | |
| | | function goToDetail(item) { |
| | | uni.navigateTo({ |
| | | url: `/pages/repair/res-detail?id=${item.id}`, |
| | | }) |
| | | } |
| | | |
| | | function goToFeedBack(item) { |
| | | uni.navigateTo({ |
| | | url: `/pages/repair/feedback?id=${item.id}`, |
| | | }) |
| | | } |
| | | |
| | | onNavigationBarButtonTap((e) => { |
| | | if (e.index === 0) { |
| | | if (isLeader()) { |
| | | toast.info('请ç»å½ç»´ä¿®å·¥è´¦å·æ¥å') |
| | | } else if (isOperatorOrRepair()) { |
| | | handleSelectReq() |
| | | } |
| | | } |
| | | }) |
| | | |
| | |
| | | const sList: any = await getDictInfo(DICT_REPAIR_RES_STATUS) |
| | | statusList.value.push(...sList) |
| | | } |
| | | onLoad((options) => { |
| | | onLoad(() => { |
| | | initData() |
| | | uni.$on('res-list-refresh', reloadData) |
| | | }) |
| | | onUnload(() => { |
| | | uni.$off('res-list-refresh', reloadData) |
| | | }) |
| | | </script> |
| | | |
| | |
| | | * |
| | | */ |
| | | id: number | string; |
| | | // è¯ä»· |
| | | fbId?: number | string; |
| | | |
| | | /** |
| | | * æ¥ä¿®åid |
| | | */ |
| | | reqId: number | string; |
| | | reqId?: number | string; |
| | | reqType?: string; |
| | | reqDesc?: string; |
| | | equName?: string; |
| | | assetNo?: string; |
| | | fixtureName?: string; |
| | | |
| | | /** |
| | | * ç»´ä¿®åå· |
| | | */ |
| | | resCode: string; |
| | | resCode?: string; |
| | | |
| | | /** |
| | | * 维修人 |
| | | */ |
| | | resUser: number; |
| | | resUser?: number; |
| | | |
| | | /** |
| | | * 维修人é¨é¨ |
| | | */ |
| | | resDept: number; |
| | | resDept?: number; |
| | | |
| | | /** |
| | | * åå åæ |
| | | |
| | | */ |
| | | resReason: string; |
| | | resReason?: string; |
| | | |
| | | /** |
| | | * å¤çæªæ½ |
| | | */ |
| | | resHandle: string; |
| | | resHandle?: string; |
| | | |
| | | /** |
| | | * é¢é²æªæ½ |
| | | */ |
| | | resPrevent: string; |
| | | resPrevent?: string; |
| | | |
| | | /** |
| | | * ç»´ä¿®ç¶æ(åå
¸) |
| | | */ |
| | | status: string; |
| | | status?: string; |
| | | |
| | | /** |
| | | * å¼å§æ¶é´ |
| | | */ |
| | | startTime: string; |
| | | startTime?: string; |
| | | |
| | | /** |
| | | * ç»ææ¶é´ |
| | | */ |
| | | endTime: string; |
| | | endTime?: string; |
| | | |
| | | /** |
| | | * 使ç¨å·¥å
· |
| | | */ |
| | | useFixture: string; |
| | | useFixture?: string; |
| | | |
| | | /** |
| | | * 使ç¨å¤ä»¶ |
| | | */ |
| | | useParts: string; |
| | | useParts?: string; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | remark: string; |
| | | remark?: string; |
| | | } |
| | | |
| | | |
| | | export interface RepairFbVO { |
| | | /** |
| | | * |
| | | */ |
| | | id: number | string; |
| | | |
| | | /** |
| | | * 维修工åid |
| | | |
| | | */ |
| | | resId?: number | string; |
| | | /** |
| | | * 维修工åcode |
| | | |
| | | */ |
| | | resCode?: string; |
| | | |
| | | /** |
| | | * åé¦ç»æ |
| | | */ |
| | | fbResult?: string; |
| | | |
| | | /** |
| | | * åé¦äºº |
| | | */ |
| | | fbUser?: number; |
| | | |
| | | /** |
| | | * åé¦äººé¨é¨ |
| | | */ |
| | | fbDept?: number; |
| | | |
| | | /** |
| | | * å馿¶é´ |
| | | */ |
| | | fbTime?: string; |
| | | |
| | | /** |
| | | * ç»´ä¿®åæ¶æ§(åå
¸) |
| | | */ |
| | | repairTimeliness?: number | string; |
| | | |
| | | /** |
| | | * æå¡æåº¦ |
| | | */ |
| | | serviceAttitude?: number | string; |
| | | |
| | | /** |
| | | * ç»´ä¿®ç°åº6s |
| | | */ |
| | | repairSs?: number | string; |
| | | |
| | | /** |
| | | * 维修满æåº¦ |
| | | */ |
| | | repairSatisfaction?: number | string; |
| | | |
| | | /** |
| | | * æè§æå»ºè®® |
| | | */ |
| | | suggestions?: string; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | remark?: string; |
| | | } |
| | | |
| | | |
| | | export interface RepairRecordVO { |
| | | /** |
| | | * |
| | | */ |
| | | id: number | string; |
| | | |
| | | /** |
| | | * æ¥ä¿®åid |
| | | */ |
| | | reqId?: number | string; |
| | | |
| | | /** |
| | | * ç»´ä¿®åid |
| | | */ |
| | | resId?: number | string; |
| | | |
| | | /** |
| | | * å¤çæ¶é´ |
| | | */ |
| | | handleTime?: string; |
| | | |
| | | /** |
| | | * æä½ç¨æ· |
| | | */ |
| | | operaUser?: number; |
| | | operaUserName?: string; |
| | | |
| | | |
| | | /** |
| | | * æä½(åå
¸) |
| | | */ |
| | | opera?: string; |
| | | |
| | | /** |
| | | * æä½ç»æ |
| | | */ |
| | | operaResult?: string; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | remark?: string; |
| | | } |
| | | |
| | |
| | | import { http } from '@/utils/http' |
| | | import type { RepairReqVO, RepairResVO } from './repair.d' |
| | | import type { RepairReqVO, RepairResVO, RepairFbVO, RepairRecordVO } from './repair.d' |
| | | type ID = number | string |
| | | |
| | | /** |
| | |
| | | return http.get<RepairReqVO[]>('/eims/repairReq/list', params) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * ç»´ä¿®åå表 |
| | | */ |
| | |
| | | return http.get<RepairResVO[]>('/eims/repairRes/list', params) |
| | | } |
| | | /** |
| | | * æ¥è¯¢ç»´ä¿®å |
| | | * @param data |
| | | */ |
| | | export const getRepairRes = (id: ID) => { |
| | | return http.get<RepairResVO>(`/eims/repairRes/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç»´ä¿®å |
| | | * @param data |
| | | */ |
| | | export const addRepairRes = (data: any) => { |
| | | return http.post<void>('/eims/repairRes/add', data) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ´æ°ç»´ä¿®å·¥å |
| | | * @param data |
| | | */ |
| | | export const updateRepairRes = (data: any) => { |
| | | return http.put<void>('/eims/repairRes', data) |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç»´ä¿®è¯ä»· |
| | | * @param id |
| | | */ |
| | | export const getRepairFb = (id: ID) => { |
| | | return http.get<RepairFbVO>(`/eims/repairFb/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç»´ä¿®è¯ä»· |
| | | * @param data |
| | | */ |
| | | export const addRepairFb = (data: any) => { |
| | | return http.post<void>('/eims/repairFb', data) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 维修记å½å表 |
| | | */ |
| | | export const getRepairRecordList = (params: any) => { |
| | | return http.get<RepairRecordVO[]>('/eims/repairRecord/list', params) |
| | | } |
| | |
| | | "/pages/maint/maint-st" | |
| | | "/pages/maint/order-detail" | |
| | | "/pages/my/index" | |
| | | "/pages/repair/feedback" | |
| | | "/pages/repair/repair-add" | |
| | | "/pages/repair/req-list" | |
| | | "/pages/repair/res-detail" | |
| | | "/pages/repair/res-list" | |
| | | "/pages/spare/index"; |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date reqTime;//æ¥ä¿®æ¶é´ |
| | | private String equName;//设å¤åç§° |
| | | private String assetNo;// |
| | | private String fixtureName;//å·¥å
·åç§° |
| | | private String faultType;//æ
éç±»å« |
| | | private String reqDeptName;//æ¥ä¿®é¨é¨ |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | | import org.dromara.eims.domain.*; |
| | | import org.dromara.eims.domain.vo.EimsEquVo; |
| | | import org.dromara.eims.domain.vo.EimsFixtureVo; |
| | | import org.dromara.eims.domain.vo.EimsRepairReqVo; |
| | | import org.dromara.eims.mapper.EimsRepairRecordMapper; |
| | | import org.dromara.eims.mapper.EimsRepairReqMapper; |
| | | import org.dromara.eims.mapper.*; |
| | | import org.dromara.eims.utils.DataFilterUtil; |
| | | import org.dromara.system.domain.SysDept; |
| | | import org.dromara.system.domain.vo.SysDeptVo; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.dromara.eims.domain.bo.EimsRepairResBo; |
| | | import org.dromara.eims.domain.vo.EimsRepairResVo; |
| | | import org.dromara.eims.mapper.EimsRepairResMapper; |
| | | import org.dromara.eims.service.IEimsRepairResService; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | private final EimsRepairReqMapper reqMapper; |
| | | private final SysDeptMapper deptMapper; |
| | | private final EimsRepairRecordMapper recordMapper; |
| | | private final EimsEquMapper equMapper; |
| | | private final EimsFixtureMapper fixtureMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç»´ä¿®å·¥å |
| | |
| | | */ |
| | | @Override |
| | | public EimsRepairResVo queryById(Long id) { |
| | | return baseMapper.selectVoById(id); |
| | | EimsRepairResVo resVo = baseMapper.selectVoById(id); |
| | | Long reqId = resVo.getReqId(); |
| | | if(reqId!=null){ |
| | | EimsRepairReqVo reqVo = reqMapper.selectVoById(reqId); |
| | | resVo.setReqType(reqVo.getReqType()); |
| | | resVo.setReqCode(reqVo.getCode()); |
| | | |
| | | if(reqVo.getEquId()!=null){ |
| | | EimsEquVo equVo = equMapper.selectVoById(reqVo.getEquId()); |
| | | resVo.setAssetNo(equVo.getAssetNo()); |
| | | resVo.setEquName(equVo.getEquName()); |
| | | } |
| | | if(reqVo.getFixtureId()!=null){ |
| | | EimsFixtureVo fixtureVo = fixtureMapper.selectVoById(reqVo.getFixtureId()); |
| | | resVo.setFixtureName(fixtureVo.getFixtureName()); |
| | | resVo.setAssetNo(fixtureVo.getAssetNo()); |
| | | } |
| | | |
| | | |
| | | } |
| | | return resVo; |
| | | } |
| | | |
| | | /** |