This commit is contained in:
zpc 2026-03-19 07:19:30 +08:00
parent a7f3e85a1d
commit 4c0c96baea

View File

@ -122,7 +122,12 @@
<el-tag :type="getStatusType(statusForm.currentStatus)">{{ statusForm.currentStatusName }}</el-tag>
</el-form-item>
<el-form-item label="新状态">
<DictSelect v-model="statusForm.status" type="booking_status" placeholder="请选择状态" style="width: 100%" />
<el-select v-model="statusForm.status" placeholder="请选择状态" style="width: 100%">
<el-option label="待联系" :value="1" />
<el-option label="联系中" :value="2" />
<el-option label="已完成" :value="3" />
<el-option label="已取消" :value="4" />
</el-select>
</el-form-item>
</el-form>
<template #footer>
@ -138,7 +143,7 @@
* 预约记录管理页面
* @description 管理规划师预约记录支持搜索查看详情状态修改导出
*/
import { ref, reactive, onMounted } from 'vue'
import { ref, reactive, onMounted, nextTick } from 'vue'
import { ElMessage } from 'element-plus'
import { Search, Refresh, Download } from '@element-plus/icons-vue'
import DictSelect from '@/components/DictSelect/index.vue'
@ -275,19 +280,22 @@ const handleChangeStatus = (row: BookingItem) => {
statusForm.id = row.id
statusForm.currentStatus = row.status
statusForm.currentStatusName = row.statusName
statusForm.status = row.status
statusForm.status = 0
statusDialogVisible.value = true
nextTick(() => {
statusForm.status = row.status
})
}
//
const handleSubmitStatus = async () => {
if (statusForm.status === statusForm.currentStatus) {
if (statusForm.status === String(statusForm.currentStatus)) {
ElMessage.warning('状态未变更')
return
}
statusLoading.value = true
try {
const res = await updateBookingStatus({ id: statusForm.id, status: statusForm.status })
const res = await updateBookingStatus({ id: statusForm.id, status: Number(statusForm.status) })
if (res.code === 0) {
ElMessage.success('状态更新成功')
statusDialogVisible.value = false