21
This commit is contained in:
parent
a7f3e85a1d
commit
4c0c96baea
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user