From 1dc84e14accf77681279e63fbba188770bfc8b40 Mon Sep 17 00:00:00 2001 From: zhuguifei <zhuguifei@zhuguifeideiMac.local> Date: 星期三, 23 四月 2025 17:58:10 +0800 Subject: [PATCH] 新增保养工单,准备开发保养工单角色权限控制 --- eims-ui-mobile/src/pages/inspect/insp-record.vue | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 42 insertions(+), 4 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..620f323 100644 --- a/eims-ui-mobile/src/pages/inspect/insp-record.vue +++ b/eims-ui-mobile/src/pages/inspect/insp-record.vue @@ -1,5 +1,6 @@ <route lang="json5"> { + needLogin: true, style: { navigationBarTitleText: '鐐规璁板綍', navigationStyle: 'custom', @@ -52,7 +53,7 @@ <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> @@ -109,6 +110,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 +129,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 +147,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 +165,14 @@ // 鐐规姹囨�绘暟鎹�(涓婁釜椤甸潰浼犲��) const inspSt = reactive<InspSt>({ + id: '', inspCode: '', equName: '', assetNo: '', planTimeStr: '', + status: '', + inspUser: '', + specialNote: '', }) const paging = ref(null) @@ -180,7 +201,7 @@ } function inspResultClick(item: any) { - // userStore?.userInfo?.realName + // userStore?.userInfo?.userId } const goBack = () => { @@ -191,7 +212,7 @@ } const toggleCollapse = () => { - isAllExpanded.value = !isAllExpanded.value + isAllExpanded.value = !isAllExpanded.value collapseRef.value.toggleAll(isAllExpanded.value) } @@ -218,9 +239,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 +278,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) @@ -294,5 +331,6 @@ :deep(.wd-navbar__title) { color: white; font-weight: 0; + font-size: 32rpx; } </style> -- Gitblit v1.9.3