From 8347ef1b32e505da2d1399e4f1d1b8b1ab94862d Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期二, 10 二月 2026 17:50:25 +0800
Subject: [PATCH] 消息列表跳转字段

---
 src/pages/humanResources/monthlyStatistics/index.vue |  247 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 247 insertions(+), 0 deletions(-)

diff --git a/src/pages/humanResources/monthlyStatistics/index.vue b/src/pages/humanResources/monthlyStatistics/index.vue
new file mode 100644
index 0000000..f1edbfc
--- /dev/null
+++ b/src/pages/humanResources/monthlyStatistics/index.vue
@@ -0,0 +1,247 @@
+<template>
+  <view class="sales-accoun">
+    <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
+    <PageHeader title="钖祫鍙拌处"
+                @back="goBack" />
+    <!-- 鎼滅储鍜岀瓫閫夊尯鍩� -->
+    <view class="search-section">
+      <view class="search-bar">
+        <view class="search-input">
+          <up-input class="search-text"
+                    placeholder="璇疯緭鍏ュ憳宸ュ鍚�"
+                    v-model="searchKeyword"
+                    @blur="getList"
+                    clearable />
+        </view>
+        <view class="filter-button"
+              @click="getList">
+          <u-icon name="search"
+                  size="24"
+                  color="#999"></u-icon>
+        </view>
+      </view>
+    </view>
+    <!-- 钖祫鍙拌处鍒楄〃 -->
+    <view class="ledger-list"
+          v-if="ledgerList.length > 0">
+      <view v-for="(item, index) in ledgerList"
+            :key="index">
+        <view class="ledger-item">
+          <view class="item-header">
+            <view class="item-left">
+              <view class="document-icon">
+                <up-icon name="file-text"
+                         size="16"
+                         color="#ffffff"></up-icon>
+              </view>
+              <text class="item-id">钖祫鏈堜唤锛歿{ item.payDate }}</text>
+            </view>
+          </view>
+          <up-divider></up-divider>
+          <view class="item-details">
+            <view class="detail-row">
+              <text class="detail-label">鍛樺伐濮撳悕</text>
+              <text class="detail-value">{{ item.staffName || '-' }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">鍩烘湰宸ヨ祫</text>
+              <text class="detail-value">{{ item.basicSalary || 0 }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">璁′欢宸ヨ祫</text>
+              <text class="detail-value">{{ item.pieceworkSalary || 0 }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">璁℃椂宸ヨ祫</text>
+              <text class="detail-value">{{ item.hourlySalary || 0 }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">鍏朵粬鏀跺叆</text>
+              <text class="detail-value">{{ item.otherIncome || 0 }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">搴斿彂宸ヨ祫</text>
+              <text class="detail-value">{{ item.payableWages || 0 }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">搴旀墸宸ヨ祫</text>
+              <text class="detail-value">{{ item.deductibleWages || 0 }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">瀹炲彂宸ヨ祫</text>
+              <text class="detail-value">{{ item.actualWages || 0 }}</text>
+            </view>
+          </view>
+          <!-- 鎸夐挳鍖哄煙 -->
+          <view class="action-buttons">
+            <u-button type="primary"
+                      size="small"
+                      class="action-btn"
+                      @click="editItem(item)">
+              缂栬緫
+            </u-button>
+            <u-button type="error"
+                      size="small"
+                      class="action-btn"
+                      @click="deleteItem(item)">
+              鍒犻櫎
+            </u-button>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view v-else
+          class="no-data">
+      <text>鏆傛棤钖祫鍙拌处鏁版嵁</text>
+    </view>
+    <!-- 娴姩鏂板鎸夐挳 -->
+    <view class="fab-button"
+          @click="addItem">
+      <up-icon name="plus"
+               size="24"
+               color="#ffffff"></up-icon>
+    </view>
+  </view>
+</template>
+
+<script setup>
+  import { ref, onMounted } from "vue";
+  import { onShow } from "@dcloudio/uni-app";
+  import PageHeader from "@/components/PageHeader.vue";
+  import {
+    monthlyStatisticsListPage,
+    monthlyStatisticsDelete,
+  } from "@/api/personnelManagement/monthlyStatistics";
+  import useUserStore from "@/store/modules/user";
+
+  // 鏇挎崲 toast 鏂规硶
+  defineOptions({ name: "monthly-statistics-index" });
+  const showToast = message => {
+    uni.showToast({
+      title: message,
+      icon: "none",
+    });
+  };
+
+  const userStore = useUserStore();
+
+  // 鎼滅储鍏抽敭璇�
+  const searchKeyword = ref("");
+
+  // 钖祫鍙拌处鏁版嵁
+  const ledgerList = ref([]);
+  // 杩斿洖涓婁竴椤�
+  const goBack = () => {
+    uni.navigateBack();
+  };
+
+  // 鏌ヨ鍒楄〃
+  const getList = () => {
+    showLoadingToast("鍔犺浇涓�...");
+    const params = {
+      current: -1,
+      size: -1,
+      staffName: searchKeyword.value,
+    };
+    monthlyStatisticsListPage(params)
+      .then(res => {
+        ledgerList.value = res.records || res.data?.records || [];
+        closeToast();
+      })
+      .catch(() => {
+        closeToast();
+        showToast("鑾峰彇鏁版嵁澶辫触");
+      });
+  };
+
+  // 鏄剧ず鍔犺浇鎻愮ず
+  const showLoadingToast = message => {
+    uni.showLoading({
+      title: message,
+      mask: true,
+    });
+  };
+
+  // 鍏抽棴鎻愮ず
+  const closeToast = () => {
+    uni.hideLoading();
+  };
+
+  // 鏂板钖祫鍙拌处
+  const addItem = () => {
+    uni.setStorageSync("monthlyStatistics", {});
+    uni.navigateTo({
+      url: "/pages/humanResources/monthlyStatistics/detail",
+    });
+  };
+  // 缂栬緫钖祫鍙拌处
+  const editItem = item => {
+    uni.setStorageSync("monthlyStatistics", item);
+    uni.navigateTo({
+      url: "/pages/humanResources/monthlyStatistics/detail",
+    });
+  };
+  // 鍒犻櫎钖祫鍙拌处
+  const deleteItem = item => {
+    uni.showModal({
+      title: "鍒犻櫎纭",
+      content: `纭畾瑕佸垹闄よ钖祫鍙拌处璁板綍鍚楋紵`,
+      success: res => {
+        if (res.confirm) {
+          deleteItemById(item.id);
+        }
+      },
+    });
+  };
+
+  // 鍒犻櫎钖祫鍙拌处璁板綍
+  const deleteItemById = id => {
+    showLoadingToast("鍒犻櫎涓�...");
+    monthlyStatisticsDelete([id])
+      .then(() => {
+        closeToast();
+        showToast("鍒犻櫎鎴愬姛");
+        getList();
+      })
+      .catch(() => {
+        closeToast();
+        showToast("鍒犻櫎澶辫触");
+      });
+  };
+
+  onMounted(() => {
+    getList();
+  });
+
+  onShow(() => {
+    getList();
+  });
+</script>
+
+<style scoped lang="scss">
+  @import "../../../styles/sales-common.scss";
+
+  // 椤甸潰鐗瑰畾鐨勬牱寮忚鐩�
+  .sales-accoun {
+    min-height: 100vh;
+    background: #f8f9fa;
+    position: relative;
+    padding-bottom: 80px;
+  }
+
+  // 鐗瑰畾鐨勫浘鏍囨牱寮�
+  .document-icon {
+    background: #667eea; // 淇濇寔椤甸潰鐗规湁鐨勮儗鏅壊
+  }
+
+  // 鐗规湁鏍峰紡
+  .detail-value {
+    word-break: break-all; // 淇濈暀椤甸潰鐗规湁鐨勬枃鏈崲琛屾牱寮�
+  }
+
+  // 鐗瑰畾鐨勬诞鍔ㄦ寜閽牱寮�
+  .fab-button {
+    background: #667eea; // 淇濇寔椤甸潰鐗规湁鐨勮儗鏅壊
+    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3); // 淇濇寔椤甸潰鐗规湁鐨勯槾褰辨晥鏋�
+  }
+</style>
\ No newline at end of file

--
Gitblit v1.9.3