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/meetApplication/index.vue |  394 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 394 insertions(+), 0 deletions(-)

diff --git a/src/views/collaborativeApproval/notificationManagement/meetApplication/index.vue b/src/views/collaborativeApproval/notificationManagement/meetApplication/index.vue
new file mode 100644
index 0000000..7781593
--- /dev/null
+++ b/src/views/collaborativeApproval/notificationManagement/meetApplication/index.vue
@@ -0,0 +1,394 @@
+<template>
+  <div>
+
+    <!-- 鐢宠绫诲瀷閫夋嫨 -->
+    <el-card class="type-card">
+      <div class="type-selector">
+        <div
+            v-for="type in applicationTypes"
+            :key="type.value"
+            class="type-item"
+            :class="{ active: currentType === type.value }"
+            @click="changeType(type.value)"
+        >
+          <div class="type-icon">
+            <el-icon :size="24"><component :is="type.icon"/></el-icon>
+          </div>
+          <div class="type-info">
+            <div class="type-name">{{ type.name }}</div>
+            <div class="type-desc">{{ type.desc }}</div>
+          </div>
+        </div>
+      </div>
+    </el-card>
+
+    <!-- 浼氳鐢宠琛ㄥ崟 -->
+    <el-card>
+      <div class="form-header">
+        <h3>{{ getCurrentTypeName() }}鐢宠</h3>
+      </div>
+
+      <el-form
+          ref="meetingFormRef"
+          :model="meetingForm"
+          :rules="rules"
+          label-width="100px"
+      >
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="浼氳涓婚" prop="title">
+              <el-input v-model="meetingForm.title" placeholder="璇疯緭鍏ヤ細璁富棰�"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="浼氳瀹�" prop="roomId">
+              <el-select v-model="meetingForm.roomId" placeholder="璇烽�夋嫨浼氳瀹�" style="width: 100%">
+                <el-option
+                    v-for="room in meetingRooms"
+                    :key="room.id"
+                    :label="`${room.name} (${room.location})`"
+                    :value="room.id"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="涓绘寔浜�" prop="host">
+              <el-input v-model="meetingForm.host" placeholder="璇疯緭鍏ヤ富鎸佷汉濮撳悕"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="浼氳鏃ユ湡" prop="meetingDate">
+              <el-date-picker
+                  v-model="meetingForm.meetingDate"
+                  type="date"
+                  placeholder="璇烽�夋嫨浼氳鏃ユ湡"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                  :disabled-date="disabledDate"
+                  style="width: 100%"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <!-- 绌哄垪锛屼繚鎸佸竷灞� -->
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="寮�濮嬫椂闂�" prop="startTime">
+              <el-select
+                  v-model="meetingForm.startTime"
+                  placeholder="璇烽�夋嫨寮�濮嬫椂闂�"
+                  style="width: 100%"
+              >
+                <el-option
+                    v-for="time in timeOptions"
+                    :key="time.value"
+                    :label="time.label"
+                    :value="time.value"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="缁撴潫鏃堕棿" prop="endTime">
+              <el-select
+                  v-model="meetingForm.endTime"
+                  placeholder="璇烽�夋嫨缁撴潫鏃堕棿"
+                  style="width: 100%"
+              >
+                <el-option
+                    v-for="time in timeOptions"
+                    :key="time.value"
+                    :label="time.label"
+                    :value="time.value"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-form-item label="鍙備細浜哄憳" prop="participants">
+          <el-select
+              v-model="meetingForm.participants"
+              multiple
+              filterable
+              placeholder="璇烽�夋嫨鍙備細浜哄憳"
+              style="width: 100%"
+          >
+            <el-option
+                v-for="person in employees"
+                :key="person.id"
+                :label="`${person.staffName} (${person.postJob})`"
+                :value="person.id"
+            />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="浼氳璇存槑" prop="description">
+          <el-input
+              v-model="meetingForm.description"
+              type="textarea"
+              :rows="4"
+              placeholder="璇疯緭鍏ヤ細璁鏄�"
+          />
+        </el-form-item>
+      </el-form>
+
+      <div class="form-footer">
+        <el-button @click="resetForm">閲嶇疆</el-button>
+        <el-button type="primary" @click="submitForm">鎻愪氦</el-button>
+      </div>
+    </el-card>
+  </div>
+</template>
+
+<script setup>
+import {ref, reactive, onMounted} from 'vue'
+import {ElMessage} from 'element-plus'
+import {Plus, Document, Promotion, Bell} from '@element-plus/icons-vue'
+import {getRoomEnum, saveMeetingApplication} from '@/api/collaborativeApproval/meeting.js'
+import {getStaffOnJob} from "@/api/personnelManagement/onboarding.js";
+
+// 褰撳墠鐢宠绫诲瀷
+const currentType = ref('department') // approval: 瀹℃壒娴佺▼, department: 閮ㄩ棬绾�, notification: 閫氱煡鍙戝竷
+
+// 鐢宠绫诲瀷閫夐」
+const applicationTypes = ref([
+  {
+    value: 'approval',
+    name: '瀹℃壒娴佺▼浼氳',
+    desc: '闇�瑕佺粡杩囧绾у鎵圭殑浼氳鐢宠',
+    icon: Document
+  },
+  {
+    value: 'department',
+    name: '閮ㄩ棬绾т細璁�',
+    desc: '閮ㄩ棬鍐呴儴浼氳鐢宠娴佺▼',
+    icon: Promotion
+  },
+  {
+    value: 'notification',
+    name: '浼氳閫氱煡',
+    desc: '鏃犻渶瀹℃壒鐩存帴鍙戝竷鐨勪細璁�氱煡',
+    icon: Bell
+  }
+])
+
+// 琛ㄥ崟鏁版嵁
+const meetingForm = reactive({
+  title: '',
+  type: '',
+  roomId: '',
+  host: '',
+  meetingDate: '',
+  startTime: '',
+  endTime: '',
+  participants: [],
+  description: ''
+})
+
+// 琛ㄥ崟鏍¢獙瑙勫垯
+const rules = {
+  title: [{required: true, message: '璇疯緭鍏ヤ細璁富棰�', trigger: 'blur'}],
+  roomId: [{required: true, message: '璇烽�夋嫨浼氳瀹�', trigger: 'change'}],
+  host: [{required: true, message: '璇疯緭鍏ヤ富鎸佷汉', trigger: 'blur'}],
+  meetingDate: [{required: true, message: '璇烽�夋嫨浼氳鏃ユ湡', trigger: 'change'}],
+  startTime: [{required: true, message: '璇烽�夋嫨寮�濮嬫椂闂�', trigger: 'change'}],
+  endTime: [{required: true, message: '璇烽�夋嫨缁撴潫鏃堕棿', trigger: 'change'}],
+  participants: [{required: true, message: '璇烽�夋嫨鍙備細浜哄憳', trigger: 'change'}]
+}
+
+// 琛ㄥ崟寮曠敤
+const meetingFormRef = ref(null)
+
+// 浼氳瀹ゅ垪琛�
+const meetingRooms = ref([])
+
+// 鍛樺伐鍒楄〃
+const employees = ref([])
+
+// 鏃堕棿閫夐」锛堜互鍗婂皬鏃朵负闂撮殧锛�
+const timeOptions = ref([])
+
+// 鍒濆鍖栨椂闂撮�夐」
+const initTimeOptions = () => {
+  const options = []
+  for (let hour = 8; hour <= 18; hour++) {
+    // 姣忎釜灏忔椂娣诲姞涓や釜閫夐」锛氭暣鐐瑰拰鍗婄偣
+    options.push({
+      value: `${hour.toString().padStart(2, '0')}:00`,
+      label: `${hour.toString().padStart(2, '0')}:00`
+    })
+
+    if (hour < 18) { // 18:00涔嬪悗娌℃湁鍗婄偣閫夐」
+      options.push({
+        value: `${hour.toString().padStart(2, '0')}:30`,
+        label: `${hour.toString().padStart(2, '0')}:30`
+      })
+    }
+  }
+  timeOptions.value = options
+}
+
+// 绂佺敤鏃ユ湡锛堢鐢ㄤ粖澶╀箣鍓嶇殑鏃ユ湡锛�
+const disabledDate = (time) => {
+  // 绂佺敤浠婂ぉ涔嬪墠鐨勬棩鏈�
+  return time.getTime() < Date.now() - 86400000
+}
+
+// 鍒囨崲鐢宠绫诲瀷
+const changeType = (type) => {
+  currentType.value = type
+}
+
+// 鑾峰彇褰撳墠绫诲瀷鍚嶇О
+const getCurrentTypeName = () => {
+  const type = applicationTypes.value.find(t => t.value === currentType.value)
+  return type ? type.name : ''
+}
+
+// 閲嶇疆琛ㄥ崟
+const resetForm = () => {
+  meetingFormRef.value?.resetFields()
+}
+
+// 鎻愪氦琛ㄥ崟
+const submitForm = () => {
+  meetingFormRef.value?.validate((valid) => {
+    if (valid) {
+
+      let formData = {...meetingForm}
+      formData.applicationType = currentType.value
+      formData.startTime = `${meetingForm.meetingDate} ${meetingForm.startTime}:00`
+      formData.endTime = `${meetingForm.meetingDate} ${meetingForm.endTime}:00`
+      formData.participants = JSON.stringify(formData.participants)
+      console.log(formData)
+      saveMeetingApplication(formData).then(() => {
+
+        // 妯℃嫙鎻愪氦鎿嶄綔
+        ElMessage.success(`${getCurrentTypeName()}鎻愪氦鎴愬姛`)
+
+        // 鏍规嵁涓嶅悓绫诲瀷鎵ц涓嶅悓鎿嶄綔
+        switch (currentType.value) {
+          case 'approval':
+            ElMessage.info('浼氳宸叉彁浜ゅ鎵规祦绋�')
+            break
+          case 'department':
+            ElMessage.info('閮ㄩ棬绾т細璁敵璇峰凡鎻愪氦')
+            break
+          case 'notification':
+            ElMessage.info('浼氳閫氱煡宸插彂甯�')
+            break
+        }
+        resetForm()
+      })
+
+    }
+  })
+}
+
+// 椤甸潰鍔犺浇鏃跺垵濮嬪寲
+onMounted(() => {
+  initTimeOptions()
+  getRoomEnum().then(res => {
+    meetingRooms.value = res.data
+  })
+  getStaffOnJob().then(res => {
+    employees.value = res.data.sort((a, b) => a.postJob.localeCompare(b.postJob))
+  })
+})
+</script>
+
+<style scoped>
+.app-container {
+  padding: 20px;
+}
+
+.page-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 20px;
+}
+
+.page-header h2 {
+  margin: 0;
+  color: #303133;
+}
+
+.type-card {
+  margin-bottom: 20px;
+}
+
+.type-selector {
+  display: flex;
+  gap: 20px;
+}
+
+.type-item {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  padding: 20px;
+  border: 1px solid #ebeef5;
+  border-radius: 8px;
+  cursor: pointer;
+  transition: all 0.3s;
+}
+
+.type-item:hover {
+  border-color: #409eff;
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+}
+
+.type-item.active {
+  border-color: #409eff;
+  background-color: #ecf5ff;
+}
+
+.type-icon {
+  margin-right: 15px;
+  color: #409eff;
+}
+
+.type-name {
+  font-size: 16px;
+  font-weight: 500;
+  color: #303133;
+  margin-bottom: 5px;
+}
+
+.type-desc {
+  font-size: 14px;
+  color: #909399;
+}
+
+.form-header {
+  margin-bottom: 20px;
+  padding-bottom: 15px;
+  border-bottom: 1px solid #ebeef5;
+}
+
+.form-header h3 {
+  margin: 0;
+  color: #303133;
+}
+
+.form-footer {
+  display: flex;
+  justify-content: flex-end;
+  gap: 10px;
+  margin-top: 30px;
+  padding-top: 20px;
+  border-top: 1px solid #ebeef5;
+}
+</style>

--
Gitblit v1.9.3