From f0610c371668b042d36d7772cb04b49a2afc69ea Mon Sep 17 00:00:00 2001
From: zhuguifei <zhuguifei@zhuguifeideiMac.local>
Date: 星期四, 24 四月 2025 14:51:56 +0800
Subject: [PATCH] 完成移动端保养

---
 eims-ui-mobile/src/pages/inspect/insp-record.vue |   92 ++++++++++++++++++++++++++++++++++++----------
 1 files changed, 72 insertions(+), 20 deletions(-)

diff --git a/eims-ui-mobile/src/pages/inspect/insp-record.vue b/eims-ui-mobile/src/pages/inspect/insp-record.vue
index f176fda..cf97685 100644
--- a/eims-ui-mobile/src/pages/inspect/insp-record.vue
+++ b/eims-ui-mobile/src/pages/inspect/insp-record.vue
@@ -1,25 +1,31 @@
 <route lang="json5">
 {
+  layout: 'default',
+  needLogin: true,
   style: {
     navigationBarTitleText: '鐐规璁板綍',
-    navigationStyle: 'custom',
-    navigationBarBackgroundColor: '#4D80F0',
+    'app-plus': {
+      titleNView: {
+        buttons: [
+          {
+            text: '鎻愪氦',
+            fontSize: '14px',
+            color: '#FFFFFF',
+          },
+          {
+            text: '',
+            fontSize: '24px',
+            color: '#FFFFFF',
+          },
+        ],
+      },
+    },
   },
 }
 </route>
 <template>
   <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time>
     <template #top>
-      <wd-navbar
-        title="鐐规璁板綍"
-        left-arrow
-        @click-left="goBack"
-        right-text="鎻愪氦"
-        @click-right="handleClickRight"
-        custom-style="background: #4D80F0;"
-        safeAreaInsetTop
-      ></wd-navbar>
-
       <wd-card type="rectangle">
         <template #title>
           <view class="flex justify-between">
@@ -34,7 +40,7 @@
             </view>
           </view>
         </template>
-        <view class="flex h-[100rpx]" items-center>
+        <view class="flex h-[140rpx]" items-center>
           <image class="slot-img text-center" src="/static/images/camera.png" />
           <view class="flex-1">
             <view class="text-color-gray text-xs mt-1 flex">
@@ -52,13 +58,16 @@
             <view class="text-color-gray text-xs mt-2 flex">
               <text>鐘舵�侊細</text>
               <template v-if="dataCount > 0 && dataCount === checkCount">
-                <wd-icon class="icon-color-success" name="check-outline" size="40rpx"></wd-icon>
+                <wd-icon class="icon-color-success" name="check-outline" size="34rpx"></wd-icon>
                 <text class="ml-1">宸插畬鎴�</text>
               </template>
               <template v-else>
                 <wd-icon class="icon-color-base" name="detection" size="40rpx"></wd-icon>
                 <text class="ml-1">杩涜涓�</text>
               </template>
+            </view>
+            <view class="text-color-gray text-xs mt-2 flex">
+              鍒涘缓鏃堕棿: {{inspSt.createTime}}
             </view>
           </view>
         </view>
@@ -109,6 +118,18 @@
           </view>
         </wd-collapse-item>
       </wd-collapse>
+      <view class="w-full h-[1rpx] bg-base"></view>
+      <wd-textarea
+        label="鐗硅浜嬮」"
+        label-width="200rpx"
+        type="textarea"
+        v-model="inspSt.specialNote"
+        auto-height
+        :maxlength="200"
+        show-word-limit
+        placeholder="璇疯緭鍏ョ壒璁颁簨椤�"
+        clearable
+      />
     </view>
   </z-paging>
 </template>
@@ -116,7 +137,7 @@
 <script setup lang="ts">
 import { ref } from 'vue'
 import { useUserStore, useAccessStore, useSystemConfigStore } from '@/store'
-import { getInspStRecordList, updateInspRecord, updateInspRecordBatch } from '@/service/inspect'
+import { getInspStRecordList, 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()
@@ -134,10 +155,15 @@
 }
 
 interface InspSt {
+  id: string
   inspCode: string
   equName: string
   assetNo: string
   planTimeStr?: string
+  createTime?: string
+  status: string
+  inspUser: number | string
+  specialNote: string
 }
 
 const dataChange = ref(false)
@@ -148,10 +174,15 @@
 
 // 鐐规姹囨�绘暟鎹�(涓婁釜椤甸潰浼犲��)
 const inspSt = reactive<InspSt>({
+  id: '',
   inspCode: '',
   equName: '',
   assetNo: '',
   planTimeStr: '',
+  createTime: '',
+  status: '',
+  inspUser: '',
+  specialNote: '',
 })
 
 const paging = ref(null)
@@ -180,18 +211,20 @@
 }
 
 function inspResultClick(item: any) {
-  // userStore?.userInfo?.realName
+  // userStore?.userInfo?.userId
 }
 
 const goBack = () => {
   uni.navigateBack()
 }
-function handleClickRight() {
-  handleConfirm()
-}
+onNavigationBarButtonTap((e) => {
+  if (e.index === 0) {
+    handleConfirm()
+  }
+})
 
 const toggleCollapse = () => {
-  isAllExpanded.value = !isAllExpanded.value  
+  isAllExpanded.value = !isAllExpanded.value
   collapseRef.value.toggleAll(isAllExpanded.value)
 }
 
@@ -218,9 +251,23 @@
   const params = {
     inspRecordList: dataList.value,
   }
+  // 鏇存柊鐐规璁板綍
   updateInspRecordBatch(params)
     .then((res: any) => {
+      updateInspSt(resolve)
+      toast.success("鎿嶄綔鎴愬姛")
+    })
+    .catch((res) => {
+      console.error(res)
+    })
+}
+function updateInspSt(resolve: any) {
+  // 鏇存柊鐐规姹囨��
+  inspSt.status = '1'
+  updateInspectSt(inspSt)
+    .then((res: any) => {
       paging.value.reload()
+      uni.$emit('insp-st-refresh')
       resolve(true)
     })
     .catch((res) => {
@@ -244,10 +291,14 @@
   { 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
 })
 
 const dataCount = computed(() => dataList.value.length)
@@ -294,5 +345,6 @@
 :deep(.wd-navbar__title) {
   color: white;
   font-weight: 0;
+  font-size: 32rpx;
 }
 </style>

--
Gitblit v1.9.3