"use strict";
const common_vendor = require("../../../common/vendor.js");
const gen_Enums = require("../../../gen/Enums.js");
const BILL_record_urge_payment_method = require("./method.js");
const BILL_record_urge_payment_model = require("./model.js");
require("../../../common/libraries/apiLoading.js");
require("../../../gen/Apis.js");
require("../../../common/libraries/request.js");
require("../../../common/store/useWeAppAuthStore.js");
require("../../../common/store/useWatermarkStore.js");
require("../../../common/store/useWorkStore.js");
if (!Array) {
  const _easycom_hs_enum_tag2 = common_vendor.resolveComponent("hs-enum-tag");
  const _easycom_up_steps_item2 = common_vendor.resolveComponent("up-steps-item");
  const _easycom_up_steps2 = common_vendor.resolveComponent("up-steps");
  const _easycom_cc_scroll_loading2 = common_vendor.resolveComponent("cc-scroll-loading");
  const _easycom_hs_footer2 = common_vendor.resolveComponent("hs-footer");
  (_easycom_hs_enum_tag2 + _easycom_up_steps_item2 + _easycom_up_steps2 + _easycom_cc_scroll_loading2 + _easycom_hs_footer2)();
}
const _easycom_hs_enum_tag = () => "../../../components/hs-enum-tag/hs-enum-tag.js";
const _easycom_up_steps_item = () => "../../../node-modules/uview-plus/components/u-steps-item/u-steps-item.js";
const _easycom_up_steps = () => "../../../node-modules/uview-plus/components/u-steps/u-steps.js";
const _easycom_cc_scroll_loading = () => "../../../common/components/cc-scroll-loading/cc-scroll-loading.js";
const _easycom_hs_footer = () => "../../../components/hs-footer/hs-footer.js";
if (!Math) {
  (_easycom_hs_enum_tag + _easycom_up_steps_item + _easycom_up_steps + _easycom_cc_scroll_loading + _easycom_hs_footer)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    const toAdd = () => {
      var _a, _b, _c, _d, _e, _f;
      common_vendor.index.navigateTo({
        url: `/BILL/outstanding_fee/add/index?amount=${(_c = (_b = (_a = BILL_record_urge_payment_model.useModel) == null ? void 0 : _a.formData) == null ? void 0 : _b.value) == null ? void 0 : _c.total_pending_amount}&id=${(_f = (_e = (_d = BILL_record_urge_payment_model.useModel) == null ? void 0 : _d.formData) == null ? void 0 : _e.value) == null ? void 0 : _f.asset_houses_id}`
      });
    };
    common_vendor.onShow(() => {
      var _a, _b, _c, _d;
      if ((_c = (_b = (_a = BILL_record_urge_payment_model.useModel) == null ? void 0 : _a.listData) == null ? void 0 : _b.value) == null ? void 0 : _c.length) {
        BILL_record_urge_payment_model.useModel.listData.value = [];
        (_d = BILL_record_urge_payment_method.method) == null ? void 0 : _d.loadMore(1);
      }
    });
    common_vendor.onLoad((e) => {
      var _a;
      console.log(e, "e");
      BILL_record_urge_payment_model.useModel.formData.value = {
        asset_houses_id: e == null ? void 0 : e.asset_houses_id,
        total_pending_amount: e == null ? void 0 : e.total_pending_amount,
        page: 1
      };
      (_a = BILL_record_urge_payment_method.method) == null ? void 0 : _a.getHouseCollectionRecords();
    });
    common_vendor.onUnload(() => {
      BILL_record_urge_payment_model.useModel.listData.value = [];
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e, _f, _g, _h;
      return {
        a: common_vendor.f((_b = (_a = common_vendor.unref(BILL_record_urge_payment_model.useModel)) == null ? void 0 : _a.listData) == null ? void 0 : _b.value, (i, index, i0) => {
          var _a2;
          return common_vendor.e({
            a: common_vendor.t(i == null ? void 0 : i.created_at),
            b: common_vendor.t((_a2 = i == null ? void 0 : i.company_employee) == null ? void 0 : _a2.name),
            c: common_vendor.t(i == null ? void 0 : i.total_unpaid_amount),
            d: i == null ? void 0 : i.collection_result
          }, (i == null ? void 0 : i.collection_result) ? {
            e: "30ebd59a-3-" + i0 + "," + ("30ebd59a-2-" + i0),
            f: common_vendor.p({
              value: i == null ? void 0 : i.collection_result,
              Enums: common_vendor.unref(gen_Enums.HouseCollectionRecordsCollectionResultEnum)
            }),
            g: common_vendor.n(`tag_${i == null ? void 0 : i.collection_result}`)
          } : {}, {
            h: "30ebd59a-4-" + i0 + "," + ("30ebd59a-2-" + i0),
            i: common_vendor.p({
              value: i == null ? void 0 : i.channel,
              Enums: common_vendor.unref(gen_Enums.HouseCollectionTasksChannelEnum)
            }),
            j: i == null ? void 0 : i.collection_content
          }, (i == null ? void 0 : i.collection_content) ? {
            k: common_vendor.t(i == null ? void 0 : i.collection_content)
          } : {}, {
            l: `pay_item_${index}`,
            m: "30ebd59a-2-" + i0 + ",30ebd59a-1"
          });
        }),
        b: common_vendor.p({
          direction: "column",
          dot: true,
          current: ((_e = (_d = (_c = common_vendor.unref(BILL_record_urge_payment_model.useModel)) == null ? void 0 : _c.listData) == null ? void 0 : _d.value) == null ? void 0 : _e.length) - 1
        }),
        c: common_vendor.o((_f = common_vendor.unref(BILL_record_urge_payment_method.method)) == null ? void 0 : _f.loadMore),
        d: common_vendor.p({
          meta: (_h = (_g = common_vendor.unref(BILL_record_urge_payment_model.useModel)) == null ? void 0 : _g.metaData) == null ? void 0 : _h.value
        }),
        e: common_vendor.o(toAdd),
        f: common_vendor.p({
          btnParimaryName: "新增催缴记录"
        })
      };
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/BILL/record/urge_payment/index.vue"]]);
wx.createPage(MiniProgramPage);
