From d28bb7d7acdc4d27a553e5b6b2458d5e7ec43165 Mon Sep 17 00:00:00 2001
From: zhuguifei <zhuguifei@zhuguifeideiMac.local>
Date: 星期二, 29 四月 2025 14:40:44 +0800
Subject: [PATCH] 完成设备维修工单

---
 eims-ui-mobile/src/service/repair.ts                                                                 |   51 ++
 eims-ui-mobile/src/service/repair.d.ts                                                               |  148 ++++++++
 eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/service/impl/EimsRepairResServiceImpl.java |   30 +
 eims-ui-mobile/src/pages.json                                                                        |   50 +++
 eims-ui-mobile/src/pages/login/index.vue                                                             |    7 
 eims-ui-mobile/src/pages/repair/feedback.vue                                                         |  198 ++++++++++++
 eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/domain/vo/EimsRepairResVo.java             |    1 
 eims-ui-mobile/src/types/uni-pages.d.ts                                                              |    2 
 eims-ui-mobile/src/pages/repair/res-detail.vue                                                       |  273 +++++++++++++++++
 eims-ui-mobile/src/pages/repair/res-list.vue                                                         |  157 +++++++++
 10 files changed, 880 insertions(+), 37 deletions(-)

diff --git a/eims-ui-mobile/src/pages.json b/eims-ui-mobile/src/pages.json
index f174d9d..6fb3e3e 100644
--- a/eims-ui-mobile/src/pages.json
+++ b/eims-ui-mobile/src/pages.json
@@ -209,6 +209,31 @@
       }
     },
     {
+      "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",
@@ -258,6 +283,31 @@
       }
     },
     {
+      "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",
diff --git a/eims-ui-mobile/src/pages/login/index.vue b/eims-ui-mobile/src/pages/login/index.vue
index bc68841..c02558c 100644
--- a/eims-ui-mobile/src/pages/login/index.vue
+++ b/eims-ui-mobile/src/pages/login/index.vue
@@ -42,10 +42,7 @@
       </wd-button>
 
       <view class="copyright-info">
-        <text>
-          涓婃捣鍏板疂浼犳劅绉戞妧鑲′唤鏈夐檺鍏徃
-        </text>
-
+        <text>涓婃捣鍏板疂浼犳劅绉戞妧鑲′唤鏈夐檺鍏徃</text>
       </view>
     </view>
   </wd-form>
@@ -129,7 +126,7 @@
   }
   userStore.setUserInfo(userInfo)
   const { query } = currRoute()
-  uni.switchTab({ url: query.redirect })
+  uni.switchTab({ url: '/pages/home/index' })
 }
 </script>
 
diff --git a/eims-ui-mobile/src/pages/repair/feedback.vue b/eims-ui-mobile/src/pages/repair/feedback.vue
new file mode 100644
index 0000000..98688e0
--- /dev/null
+++ b/eims-ui-mobile/src/pages/repair/feedback.vue
@@ -0,0 +1,198 @@
+<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>
diff --git a/eims-ui-mobile/src/pages/repair/res-detail.vue b/eims-ui-mobile/src/pages/repair/res-detail.vue
new file mode 100644
index 0000000..77b739b
--- /dev/null
+++ b/eims-ui-mobile/src/pages/repair/res-detail.vue
@@ -0,0 +1,273 @@
+<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>
diff --git a/eims-ui-mobile/src/pages/repair/res-list.vue b/eims-ui-mobile/src/pages/repair/res-list.vue
index 2f3951c..096aedd 100644
--- a/eims-ui-mobile/src/pages/repair/res-list.vue
+++ b/eims-ui-mobile/src/pages/repair/res-list.vue
@@ -61,7 +61,7 @@
             </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"
@@ -102,10 +102,10 @@
               </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>
@@ -113,9 +113,75 @@
             </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>
@@ -126,9 +192,11 @@
 <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()
@@ -181,11 +249,76 @@
  * 鏉$洰鐐瑰嚮浜嬩欢
  * @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) {
-    handleSelectReq()
+    if (isLeader()) {
+      toast.info('璇风櫥褰曠淮淇伐璐﹀彿鎺ュ崟')
+    } else if (isOperatorOrRepair()) {
+      handleSelectReq()
+    }
   }
 })
 
@@ -240,8 +373,12 @@
   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>
 
diff --git a/eims-ui-mobile/src/service/repair.d.ts b/eims-ui-mobile/src/service/repair.d.ts
index 65eb8fd..cf677cc 100644
--- a/eims-ui-mobile/src/service/repair.d.ts
+++ b/eims-ui-mobile/src/service/repair.d.ts
@@ -90,70 +90,192 @@
    *
    */
   id: number | string;
+  // 璇勪环
+  fbId?: number | string;
 
   /**
    * 鎶ヤ慨鍗昳d
    */
-  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;
+
+  /**
+   * 鎶ヤ慨鍗昳d
+   */
+  reqId?: number | string;
+
+  /**
+   * 缁翠慨鍗昳d
+   */
+  resId?: number | string;
+
+  /**
+   * 澶勭悊鏃堕棿
+   */
+  handleTime?: string;
+
+  /**
+   * 鎿嶄綔鐢ㄦ埛
+   */
+  operaUser?: number;
+  operaUserName?: string;
+
+
+  /**
+   * 鎿嶄綔(瀛楀吀)
+   */
+  opera?: string;
+
+  /**
+   * 鎿嶄綔缁撴灉
+   */
+  operaResult?: string;
+
+  /**
+   * 澶囨敞
+   */
+  remark?: string;
+}
+
diff --git a/eims-ui-mobile/src/service/repair.ts b/eims-ui-mobile/src/service/repair.ts
index b763de3..1d2e7c3 100644
--- a/eims-ui-mobile/src/service/repair.ts
+++ b/eims-ui-mobile/src/service/repair.ts
@@ -1,5 +1,5 @@
 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
 
 /**
@@ -23,10 +23,6 @@
   return http.get<RepairReqVO[]>('/eims/repairReq/list', params)
 }
 
-
-
-
-
 /**
  * 缁翠慨鍗曞垪琛�
  */
@@ -34,9 +30,54 @@
   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)
+}
diff --git a/eims-ui-mobile/src/types/uni-pages.d.ts b/eims-ui-mobile/src/types/uni-pages.d.ts
index 6b710ba..3792d6f 100644
--- a/eims-ui-mobile/src/types/uni-pages.d.ts
+++ b/eims-ui-mobile/src/types/uni-pages.d.ts
@@ -16,8 +16,10 @@
        "/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";
 }
diff --git a/eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/domain/vo/EimsRepairResVo.java b/eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/domain/vo/EimsRepairResVo.java
index 6436efc..aec73bf 100644
--- a/eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/domain/vo/EimsRepairResVo.java
+++ b/eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/domain/vo/EimsRepairResVo.java
@@ -140,6 +140,7 @@
     @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;//鎶ヤ慨閮ㄩ棬
diff --git a/eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/service/impl/EimsRepairResServiceImpl.java b/eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/service/impl/EimsRepairResServiceImpl.java
index 323765b..781ab33 100644
--- a/eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/service/impl/EimsRepairResServiceImpl.java
+++ b/eims/ruoyi-modules/lb-eims/src/main/java/org/dromara/eims/service/impl/EimsRepairResServiceImpl.java
@@ -18,9 +18,10 @@
 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;
@@ -29,7 +30,6 @@
 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;
 
@@ -49,6 +49,8 @@
     private final EimsRepairReqMapper reqMapper;
     private final SysDeptMapper deptMapper;
     private final EimsRepairRecordMapper recordMapper;
+    private final EimsEquMapper equMapper;
+    private final EimsFixtureMapper fixtureMapper;
 
     /**
      * 鏌ヨ缁翠慨宸ュ崟
@@ -58,7 +60,27 @@
      */
     @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;
     }
 
     /**

--
Gitblit v1.9.3