"use strict";
const common_vendor = require("../../common/vendor.js");
const CUSTOMER_list_bill_method = require("./method.js");
const CUSTOMER_list_bill_model = require("./model.js");
const common_libraries_userUserLogin = require("../../common/libraries/userUserLogin.js");
const gen_Enums = require("../../gen/Enums.js");
require("../../common/libraries/request.js");
require("../../common/store/useWeAppAuthStore.js");
require("../../gen/Apis.js");
require("../../common/store/useWatermarkStore.js");
require("../../common/store/useWorkStore.js");
require("../../common/libraries/apiLoading.js");
require("../../common/libraries/naviHelper.js");
require("../../common/libraries/sendWxWork.js");
if (!Array) {
  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  const _easycom_hs_enum_tag2 = common_vendor.resolveComponent("hs-enum-tag");
  const _easycom_cc_scroll_loading2 = common_vendor.resolveComponent("cc-scroll-loading");
  const _easycom_hs_button2 = common_vendor.resolveComponent("hs-button");
  (_easycom_uni_icons2 + _easycom_hs_enum_tag2 + _easycom_cc_scroll_loading2 + _easycom_hs_button2)();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_hs_enum_tag = () => "../../components/hs-enum-tag/hs-enum-tag.js";
const _easycom_cc_scroll_loading = () => "../../common/components/cc-scroll-loading/cc-scroll-loading.js";
const _easycom_hs_button = () => "../../components/hs-button/hs-button.js";
if (!Math) {
  (_easycom_uni_icons + _easycom_hs_enum_tag + _easycom_cc_scroll_loading + _easycom_hs_button)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    common_vendor.onUnload(() => {
      CUSTOMER_list_bill_model.useModel.items.value = [];
      CUSTOMER_list_bill_model.useModel.formData.value.page = 1;
    });
    common_vendor.onLoad(async (e) => {
      var _a, _b, _c;
      await ((_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$onLaunched);
      CUSTOMER_list_bill_model.useModel.formData.value = e;
      if ((_b = common_libraries_userUserLogin.getUser) == null ? void 0 : _b.getLoginStatus()) {
        (_c = CUSTOMER_list_bill_method.method) == null ? void 0 : _c.handleGetList();
      }
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
      return {
        a: common_vendor.t((_c = (_b = (_a = common_vendor.unref(CUSTOMER_list_bill_model.useModel)) == null ? void 0 : _a.formData) == null ? void 0 : _b.value) == null ? void 0 : _c.name),
        b: common_vendor.f((_e = (_d = common_vendor.unref(CUSTOMER_list_bill_model.useModel)) == null ? void 0 : _d.items) == null ? void 0 : _e.value, (i, index, i0) => {
          return common_vendor.e({
            a: i == null ? void 0 : i.checked
          }, (i == null ? void 0 : i.checked) ? {
            b: "1712258e-1-" + i0 + ",1712258e-0",
            c: common_vendor.p({
              type: "checkbox-filled",
              size: "20",
              color: "#2A7EFB"
            })
          } : {
            d: "1712258e-2-" + i0 + ",1712258e-0",
            e: common_vendor.p({
              type: "circle",
              size: "20",
              color: "#888"
            })
          }, {
            f: common_vendor.t((i == null ? void 0 : i.display_text) || ""),
            g: common_vendor.o(($event) => {
              var _a2;
              return (_a2 = common_vendor.unref(CUSTOMER_list_bill_method.method)) == null ? void 0 : _a2.handleCollapseAllCheckedBtn(index, i);
            }, `items_${index}`),
            h: common_vendor.t((i == null ? void 0 : i.pending_amount) || "0.00"),
            i: "1712258e-3-" + i0 + ",1712258e-0",
            j: common_vendor.o(($event) => {
              var _a2;
              return (_a2 = common_vendor.unref(CUSTOMER_list_bill_method.method)) == null ? void 0 : _a2.handleCollapseClick(index, i);
            }, `items_${index}`),
            k: i == null ? void 0 : i.show
          }, (i == null ? void 0 : i.show) ? {
            l: common_vendor.f(i == null ? void 0 : i.bills, (k, idx, i1) => {
              return common_vendor.e({
                a: k == null ? void 0 : k.checked
              }, (k == null ? void 0 : k.checked) ? {
                b: "1712258e-4-" + i0 + "-" + i1 + ",1712258e-0",
                c: common_vendor.p({
                  type: "checkbox-filled",
                  size: "20",
                  color: "#2A7EFB"
                })
              } : {
                d: "1712258e-5-" + i0 + "-" + i1 + ",1712258e-0",
                e: common_vendor.p({
                  type: "circle",
                  size: "20",
                  color: "#888"
                })
              }, {
                f: "1712258e-6-" + i0 + "-" + i1 + ",1712258e-0",
                g: common_vendor.p({
                  Enums: common_vendor.unref(gen_Enums.HouseBillsTypeEnum),
                  value: k == null ? void 0 : k.type,
                  objStyle: {
                    color: "#555",
                    fontSize: "28rpx"
                  }
                }),
                h: common_vendor.t((k == null ? void 0 : k.total_payable_amount) || "-"),
                i: `ks_${index}_${idx}`,
                j: common_vendor.o(($event) => {
                  var _a2;
                  return (_a2 = common_vendor.unref(CUSTOMER_list_bill_method.method)) == null ? void 0 : _a2.handleCalculatePrice(index, idx, k);
                }, `ks_${index}_${idx}`)
              });
            })
          } : {}, {
            m: `items_${index}`
          });
        }),
        c: common_vendor.p({
          type: "down",
          size: "15",
          color: "#999"
        }),
        d: common_vendor.o((_f = common_vendor.unref(CUSTOMER_list_bill_method.method)) == null ? void 0 : _f.handleLoadMore),
        e: common_vendor.p({
          meta: (_h = (_g = common_vendor.unref(CUSTOMER_list_bill_model.useModel)) == null ? void 0 : _g.metaData) == null ? void 0 : _h.value
        }),
        f: common_vendor.o((_i = common_vendor.unref(CUSTOMER_list_bill_method.method)) == null ? void 0 : _i.handleQRCode),
        g: common_vendor.p({
          label: "二维码收款",
          size: "md",
          type: "ghost"
        }),
        h: common_vendor.o((_j = common_vendor.unref(CUSTOMER_list_bill_method.method)) == null ? void 0 : _j.handleSelectExternalContact),
        i: common_vendor.p({
          type: "primary",
          size: "md",
          label: "分享账单"
        })
      };
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/CUSTOMER/list_bill/index.vue"]]);
wx.createPage(MiniProgramPage);
