From 42a1a434f77154746038c476ef70ca9be0b8e4e0 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 19 一月 2026 18:02:46 +0800
Subject: [PATCH] fix: 完成资金管理,财务对账
---
src/views/collaborativeApproval/notificationManagement/meetSetting/index.vue | 320 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 320 insertions(+), 0 deletions(-)
diff --git a/src/views/collaborativeApproval/notificationManagement/meetSetting/index.vue b/src/views/collaborativeApproval/notificationManagement/meetSetting/index.vue
new file mode 100644
index 0000000..ad4931a
--- /dev/null
+++ b/src/views/collaborativeApproval/notificationManagement/meetSetting/index.vue
@@ -0,0 +1,320 @@
+<template>
+ <div>
+ <!-- 鎼滅储鍖哄煙 -->
+ <el-form :model="searchForm" label-width="100px" class="search-form">
+ <el-form-item label="浼氳瀹ゅ悕绉�">
+ <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ヤ細璁鍚嶇О" clearable />
+ </el-form-item>
+ <el-form-item label="浣嶇疆">
+ <el-input v-model="searchForm.location" placeholder="璇疯緭鍏ヤ綅缃�" clearable />
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="handleSearch">鎼滅储</el-button>
+ <el-button @click="resetSearch">閲嶇疆</el-button>
+ </el-form-item>
+ <el-form-item class="search-actions">
+ <el-button @click="handleExport">瀵煎嚭</el-button>
+ <el-button type="primary" @click="handleAdd">
+ <el-icon><Plus /></el-icon>
+ 鏂板浼氳瀹�
+ </el-button>
+ </el-form-item>
+ </el-form>
+
+ <!-- 浼氳瀹ゅ垪琛� -->
+ <el-card>
+ <el-table v-loading="loading" :data="meetingRoomList" border :height="tableHeight">
+ <el-table-column prop="name" label="浼氳瀹ゅ悕绉�" align="center" />
+ <el-table-column prop="location" label="浣嶇疆" align="center" />
+ <el-table-column prop="capacity" label="瀹圭撼浜烘暟" align="center" />
+ <el-table-column prop="equipment" label="璁惧閰嶇疆" align="center">
+ <template #default="scope">
+ <el-tag v-for="item in scope.row.equipment" :key="item" style="margin-right: 5px; margin-bottom: 5px;">
+ {{ item }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="status" label="鐘舵��" align="center" width="100">
+ <template #default="scope">
+ <el-tag :type="scope.row.status === 1 ? 'success' : 'danger'">
+ {{ scope.row.status === 1 ? '鍚敤' : '绂佺敤' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" align="center" width="200">
+ <template #default="scope">
+ <el-button type="primary" link @click="handleEdit(scope.row)">缂栬緫</el-button>
+ <el-button type="danger" link @click="handleDelete(scope.row)">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <!-- 鍒嗛〉 -->
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ v-model:page="queryParams.current"
+ v-model:limit="queryParams.size"
+ @pagination="getList"
+ />
+ </el-card>
+
+ <!-- 娣诲姞/缂栬緫瀵硅瘽妗� -->
+ <el-dialog :title="dialogTitle" v-model="dialogVisible" width="600px" @close="cancel">
+ <el-form ref="meetingRoomFormRef" :model="meetingRoomForm" :rules="rules" label-width="100px">
+ <el-form-item label="浼氳瀹ゅ悕绉�" prop="name">
+ <el-input v-model="meetingRoomForm.name" placeholder="璇疯緭鍏ヤ細璁鍚嶇О" />
+ </el-form-item>
+ <el-form-item label="浣嶇疆" prop="location">
+ <el-input v-model="meetingRoomForm.location" placeholder="璇疯緭鍏ヤ細璁浣嶇疆" />
+ </el-form-item>
+ <el-form-item label="瀹圭撼浜烘暟" prop="capacity">
+ <el-input-number v-model="meetingRoomForm.capacity" :min="1" placeholder="璇疯緭鍏ュ绾充汉鏁�" />
+ </el-form-item>
+ <el-form-item label="璁惧閰嶇疆" prop="equipment">
+ <el-select v-model="meetingRoomForm.equipment" multiple placeholder="璇烽�夋嫨璁惧閰嶇疆" style="width: 100%">
+ <el-option
+ v-for="item in equipmentOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鐘舵��" prop="status">
+ <el-radio-group v-model="meetingRoomForm.status">
+ <el-radio :label="1">鍚敤</el-radio>
+ <el-radio :label="0">绂佺敤</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input v-model="meetingRoomForm.remark" type="textarea" placeholder="璇疯緭鍏ュ娉�" />
+ </el-form-item>
+ </el-form>
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button @click="cancel">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+ </div>
+ </template>
+ </el-dialog>
+ </div>
+</template>
+
+<script setup>
+import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import { Plus } from '@element-plus/icons-vue'
+import Pagination from '@/components/Pagination/index.vue'
+import {getMeetingRoomList,saveRoom,delRoom} from '@/api/collaborativeApproval/meeting.js'
+
+// 鏁版嵁鍒楄〃鍔犺浇鐘舵��
+const loading = ref(false)
+
+// 鎬绘潯鏁�
+const total = ref(0)
+
+// 琛ㄦ牸楂樺害锛堟牴鎹獥鍙i珮搴﹁嚜閫傚簲锛�
+const tableHeight = ref(window.innerHeight - 380)
+
+// 浼氳瀹ゅ垪琛ㄦ暟鎹�
+const meetingRoomList = ref([])
+
+// 鏌ヨ鍙傛暟
+const queryParams = reactive({
+ current: 1,
+ size: 10
+})
+
+// 鎼滅储琛ㄥ崟
+const searchForm = reactive({
+ name: '',
+ location: ''
+})
+
+// 瀵硅瘽妗嗘爣棰�
+const dialogTitle = ref('')
+
+// 鏄惁鏄剧ず瀵硅瘽妗�
+const dialogVisible = ref(false)
+
+// 璁惧閰嶇疆閫夐」
+const equipmentOptions = ref([
+ { value: '鎶曞奖浠�', label: '鎶曞奖浠�' },
+ { value: '鐢佃', label: '鐢佃' },
+ { value: '闊冲搷', label: '闊冲搷' },
+ { value: '鐢佃瘽', label: '鐢佃瘽' },
+ { value: '瑙嗛浼氳绯荤粺', label: '瑙嗛浼氳绯荤粺' },
+ { value: '鐧芥澘', label: '鐧芥澘' },
+ { value: '鍐欏瓧鏉�', label: '鍐欏瓧鏉�' },
+ { value: '鏃犵嚎缃戠粶', label: '鏃犵嚎缃戠粶' }
+])
+
+// 琛ㄥ崟鏁版嵁
+const meetingRoomForm = reactive({
+ id: undefined,
+ name: '',
+ location: '',
+ capacity: 10,
+ equipment: [],
+ status: 1,
+ remark: ''
+})
+
+// 琛ㄥ崟鏍¢獙瑙勫垯
+const rules = {
+ name: [{ required: true, message: '浼氳瀹ゅ悕绉颁笉鑳戒负绌�', trigger: 'blur' }],
+ location: [{ required: true, message: '浣嶇疆涓嶈兘涓虹┖', trigger: 'blur' }],
+ capacity: [{ required: true, message: '瀹圭撼浜烘暟涓嶈兘涓虹┖', trigger: 'blur' }]
+}
+
+// 琛ㄥ崟寮曠敤
+const meetingRoomFormRef = ref(null)
+
+// 鏌ヨ鏁版嵁
+const getList = async () => {
+ loading.value = true
+
+ let resp = await getMeetingRoomList({...searchForm,...queryParams})
+ meetingRoomList.value = resp.data.records.map(it=>{
+ it.equipment = it.equipment.split(',')
+ return it;
+ })
+ total.value = resp.data.total
+ loading.value = false
+
+}
+
+// 鎼滅储鎸夐挳鎿嶄綔
+const handleSearch = () => {
+ queryParams.current = 1
+ getList()
+}
+
+// 閲嶇疆鎼滅储琛ㄥ崟
+const resetSearch = () => {
+ Object.assign(searchForm, {
+ name: '',
+ location: ''
+ })
+ handleSearch()
+}
+
+// 娣诲姞鎸夐挳鎿嶄綔
+const handleAdd = () => {
+ dialogTitle.value = '娣诲姞浼氳瀹�'
+ dialogVisible.value = true
+}
+
+// 淇敼鎸夐挳鎿嶄綔
+const handleEdit = (row) => {
+ dialogTitle.value = '淇敼浼氳瀹�'
+ Object.assign(meetingRoomForm, row)
+ dialogVisible.value = true
+}
+
+// 鍒犻櫎鎸夐挳鎿嶄綔
+const handleDelete = (row) => {
+ ElMessageBox.confirm(
+ `鏄惁纭鍒犻櫎浼氳瀹� "${row.name}"?`,
+ '璀﹀憡',
+ {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }
+ ).then(() => {
+ // 妯℃嫙鍒犻櫎鎿嶄綔
+ delRoom(row.id).then(resp=>{
+ ElMessage.success('鍒犻櫎鎴愬姛')
+ getList()
+ })
+
+ }).catch(() => {})
+}
+
+// 鍙栨秷鎸夐挳
+const cancel = () => {
+ dialogVisible.value = false
+ reset()
+}
+
+// 琛ㄥ崟閲嶇疆
+const reset = () => {
+ Object.assign(meetingRoomForm, {
+ id: undefined,
+ name: '',
+ location: '',
+ capacity: 10,
+ equipment: [],
+ status: 1,
+ remark: ''
+ })
+ meetingRoomFormRef.value?.resetFields()
+}
+
+// 鎻愪氦琛ㄥ崟
+const submitForm = () => {
+ meetingRoomFormRef.value?.validate((valid) => {
+ if (valid) {
+ // 妯℃嫙鎻愪氦鎿嶄綔
+
+ let formData = {... meetingRoomForm}
+ formData.equipment = formData.equipment.join(',')
+ saveRoom(formData).then(resp=>{
+ ElMessage.success('淇濆瓨鎴愬姛')
+ dialogVisible.value = false
+ getList()
+ })
+ }
+ })
+}
+
+// 瀵煎嚭
+const { proxy } = getCurrentInstance()
+const handleExport = () => {
+ proxy.download('/meeting/export', { ...searchForm }, '浼氳瀹よ缃�.xlsx')
+}
+
+// 椤甸潰鍔犺浇鏃惰幏鍙栨暟鎹�
+onMounted(() => {
+ getList()
+})
+</script>
+
+<style scoped>
+.app-container {
+ padding: 20px;
+}
+
+.search-form {
+ display: flex;
+ /* align-items: center; */
+}
+
+.search-actions {
+ margin-left: auto;
+}
+
+.page-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 20px;
+}
+
+.page-header h2 {
+ margin: 0;
+ color: #303133;
+}
+
+.search-card {
+ margin-bottom: 20px;
+}
+
+.dialog-footer {
+ display: flex;
+ justify-content: flex-end;
+ gap: 10px;
+}
+</style>
--
Gitblit v1.9.3