"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
  (SsSearchButton + SsCard)();
}
const SsSearchButton = () => "../../components/SsSearchButton/index.js";
const SsCard = () => "../../components/SsCard/index.js";
const _sfc_main = {
  __name: "index",
  setup(__props) {
    const handleAddRecord = () => {
      common_vendor.index.__f__("log", "at pages/xfjl/index.vue:45", "点击了新增消费记录");
      common_vendor.index.showToast({
        title: "新增消费记录",
        icon: "none"
      });
    };
    const records = [
      {
        id: "XFJ-001-20250612122200001",
        type: "expense",
        // expense: 支出, income: 收入
        amount: -10,
        balance: 120,
        time: "2025年6月12日 12:22",
        location: "第一饭堂001消费机",
        orderNo: "XFJ-001-20250612122200001"
      },
      {
        id: "XFJ-001-20250612122200002",
        type: "income",
        amount: 100,
        balance: 120,
        time: "2025年6月12日 12:22",
        location: "充值",
        orderNo: "XFJ-001-20250612122200001"
      },
      {
        id: "XFJ-001-20250612122200003",
        type: "expense",
        amount: -15,
        balance: 20,
        time: "2025年6月12日 11:35",
        location: "第二饭堂002消费机",
        orderNo: "XFJ-001-20250612113500001"
      }
    ];
    const handleCardClick = (record) => {
      common_vendor.index.__f__("log", "at pages/xfjl/index.vue:86", "点击了记录:", record);
      common_vendor.index.showToast({
        title: `点击了${record.type === "expense" ? "支出" : "充值"}记录`,
        icon: "none"
      });
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.o(handleAddRecord),
        b: common_vendor.p({
          text: "充值",
          ["pre-icon"]: "icon-jiahao"
        }),
        c: common_vendor.f(records, (record, k0, i0) => {
          return {
            a: common_vendor.t(record.amount > 0 ? "+" : ""),
            b: common_vendor.t(record.amount),
            c: common_vendor.n(record.type),
            d: common_vendor.t(record.balance),
            e: common_vendor.t(record.time),
            f: common_vendor.t(record.location),
            g: common_vendor.t(record.orderNo),
            h: record.id,
            i: common_vendor.o(($event) => handleCardClick(record), record.id),
            j: "25784ea2-1-" + i0
          };
        }),
        d: common_vendor.gei(_ctx, "")
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-25784ea2"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/xfjl/index.js.map
