From 7a6dc6d28d36e4c3558391bac52d188d5075543f Mon Sep 17 00:00:00 2001 From: zhuguifei <zhuguifei@zhuguifeideiMac.local> Date: 星期二, 22 四月 2025 16:27:27 +0800 Subject: [PATCH] 1.完成移动端点检汇总和点检明细 --- eims-ui-mobile/src/pages/inspect/insp-record.vue | 42 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 39 insertions(+), 3 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..f0b128d 100644 --- a/eims-ui-mobile/src/pages/inspect/insp-record.vue +++ b/eims-ui-mobile/src/pages/inspect/insp-record.vue @@ -109,6 +109,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 +128,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 +146,14 @@ } interface InspSt { + id: string inspCode: string equName: string assetNo: string planTimeStr?: string + status: string + inspUser: number | string + specialNote: string } const dataChange = ref(false) @@ -148,10 +164,14 @@ // 鐐规姹囨�绘暟鎹�(涓婁釜椤甸潰浼犲��) const inspSt = reactive<InspSt>({ + id: '', inspCode: '', equName: '', assetNo: '', planTimeStr: '', + status: '', + inspUser: '', + specialNote: '', }) const paging = ref(null) @@ -180,7 +200,7 @@ } function inspResultClick(item: any) { - // userStore?.userInfo?.realName + // userStore?.userInfo?.userId } const goBack = () => { @@ -191,7 +211,7 @@ } const toggleCollapse = () => { - isAllExpanded.value = !isAllExpanded.value + isAllExpanded.value = !isAllExpanded.value collapseRef.value.toggleAll(isAllExpanded.value) } @@ -218,9 +238,22 @@ const params = { inspRecordList: dataList.value, } + // 鏇存柊鐐规璁板綍 updateInspRecordBatch(params) .then((res: any) => { + updateInspSt(resolve) + }) + .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 +277,13 @@ { 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.specialNote = options?.specialNote + inspSt.inspUser = userStore?.userInfo?.userId }) const dataCount = computed(() => dataList.value.length) -- Gitblit v1.9.3