From 8033bc71ffb0962793af34fd63f385af9271dae6 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期五, 13 九月 2024 15:26:51 +0800 Subject: [PATCH] 设备遗失功能 完成 --- src/views/ecg/doctor/DevDismantle.vue | 27 ++++++++++++++++++++++++++- src/api/ecg/devrent/index.ts | 5 +++++ 2 files changed, 31 insertions(+), 1 deletions(-) diff --git a/src/api/ecg/devrent/index.ts b/src/api/ecg/devrent/index.ts index 8605fd7..fd188c1 100644 --- a/src/api/ecg/devrent/index.ts +++ b/src/api/ecg/devrent/index.ts @@ -66,5 +66,10 @@ return await request.post({ url: `/ecg/dev-rent/dev-cancel`, data }) }, + // 閬楀け + devLose: async (data: DevRentVO) => { + return await request.post({ url: `/ecg/dev-rent/dev-lose`, data }) + }, + } diff --git a/src/views/ecg/doctor/DevDismantle.vue b/src/views/ecg/doctor/DevDismantle.vue index bd01bc8..5dd07d8 100644 --- a/src/views/ecg/doctor/DevDismantle.vue +++ b/src/views/ecg/doctor/DevDismantle.vue @@ -47,12 +47,17 @@ </el-form> <el-button @click="submitForm" type="primary" :disabled="formLoading">鎷嗘満瀹屾垚</el-button> <el-button @click="resetForm()">閲� 缃�</el-button> - <el-button @click="submitForm" :disabled="formLoading">閬� 澶�</el-button> + <el-button @click="loseDismantle" :disabled="formLoading">閬� 澶�</el-button> <!-- 鍖荤敓鎷嗘満鍒楄〃 --> <ContentWrap> <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @current-change="onCurChange" > <el-table-column label="id" align="center" prop="id" /> + <el-table-column label="--" align="center" prop="lost" > + <template #default="scope"> + {{scope.row.lost == 1 ? "閬楀け" : ""}} + </template> + </el-table-column> <!-- <el-table-column label="浣滀笟绫诲瀷" align="center" prop="jobType" />--> <!-- <el-table-column label="鍖荤敓缂栧彿" align="center" prop="docId" />--> <el-table-column label="鍖荤敓鍚嶇О" align="center" prop="docName" /> @@ -167,6 +172,26 @@ } } +// 閬楀け鎿嶄綔 +const loseDismantle = async () => { + // 鏍¢獙琛ㄥ崟 + await formRef.value.validate() + // 鎻愪氦璇锋眰 + formLoading.value = true + try { + const data = formData.value as unknown as DevRentVO + await DevRentApi.devLose(data) + message.success(t('鎿嶄綔鎴愬姛')) + dialogVisible.value = false + // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢 + emit('success') + resetForm() + getList() + } finally { + formLoading.value = false + } +} + /** 閲嶇疆琛ㄥ崟 */ const resetForm = () => { formData.value = { -- Gitblit v1.9.3