"use strict";
const common_vendor = require("../../../../common/vendor.js");
const gen_Enums = require("../../../../gen/Enums.js");
const BILL_outstanding_fee_show_model = require("../model.js");
const common_libraries_day = require("../../../../common/libraries/day.js");
const BILL_outstanding_fee_show_method = require("../method.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_hs_enum_tag2 = common_vendor.resolveComponent("hs-enum-tag");
  const _easycom_hs_level2 = common_vendor.resolveComponent("hs-level");
  const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
  (_easycom_hs_enum_tag2 + _easycom_hs_level2 + _easycom_up_icon2)();
}
const _easycom_hs_enum_tag = () => "../../../../components/hs-enum-tag/hs-enum-tag.js";
const _easycom_hs_level = () => "../../../../components/hs-level/hs-level.js";
const _easycom_up_icon = () => "../../../../node-modules/uview-plus/components/u-icon/u-icon.js";
if (!Math) {
  (_easycom_hs_enum_tag + _easycom_hs_level + _easycom_up_icon)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "WorkOrderList",
  setup(__props) {
    let tabList = [
      { label: "全部", value: void 0 },
      { label: "待处理", value: "Pending" },
      { label: "处理中", value: "Processing" },
      { label: "已完成", value: "Completed" }
    ];
    const toPageShow = (e) => {
      common_vendor.index.navigateTo({
        url: `/WORKORDER/show/index?id=${e == null ? void 0 : e.id}`
      });
    };
    const handleTabChange = (e) => {
      var _a;
      BILL_outstanding_fee_show_model.useModel.formData.value.status = e == null ? void 0 : e.value;
      BILL_outstanding_fee_show_model.useModel.listData.value = [];
      (_a = BILL_outstanding_fee_show_method.method) == null ? void 0 : _a.loadMore(1);
    };
    return (_ctx, _cache) => {
      var _a, _b;
      return {
        a: common_vendor.f(common_vendor.unref(tabList), (i, index, i0) => {
          var _a2, _b2, _c;
          return {
            a: common_vendor.t(i == null ? void 0 : i.label),
            b: `tab_${index}`,
            c: common_vendor.n(`items ${((_c = (_b2 = (_a2 = common_vendor.unref(BILL_outstanding_fee_show_model.useModel)) == null ? void 0 : _a2.formData) == null ? void 0 : _b2.value) == null ? void 0 : _c.status) === (i == null ? void 0 : i.value) ? "active" : ""}`),
            d: common_vendor.o(($event) => handleTabChange(i), `tab_${index}`)
          };
        }),
        b: common_vendor.f((_b = (_a = common_vendor.unref(BILL_outstanding_fee_show_model.useModel)) == null ? void 0 : _a.listData) == null ? void 0 : _b.value, (i, index, i0) => {
          var _a2, _b2, _c, _d, _e;
          return common_vendor.e({
            a: "fb0c29a5-0-" + i0,
            b: common_vendor.p({
              value: i == null ? void 0 : i.type,
              Enums: common_vendor.unref(gen_Enums.HouseWorkOrdersTypeEnum)
            }),
            c: "fb0c29a5-1-" + i0,
            d: common_vendor.p({
              level: i == null ? void 0 : i.level
            }),
            e: "fb0c29a5-2-" + i0,
            f: common_vendor.p({
              value: i == null ? void 0 : i.status,
              Enums: common_vendor.unref(gen_Enums.HouseWorkOrdersStatusEnum)
            }),
            g: common_vendor.n(`btn_status status_${i == null ? void 0 : i.status}`),
            h: common_vendor.t((_a2 = i == null ? void 0 : i.asset_house) == null ? void 0 : _a2.full_name),
            i: common_vendor.t(i == null ? void 0 : i.content),
            j: common_vendor.f(i == null ? void 0 : i.attachments, (k, idx, i1) => {
              return {
                a: k == null ? void 0 : k.url,
                b: `img_${idx}`
              };
            }),
            k: (i == null ? void 0 : i.status) === "Pending"
          }, (i == null ? void 0 : i.status) === "Pending" ? {
            l: "fb0c29a5-3-" + i0,
            m: common_vendor.p({
              name: "clock",
              color: ((_b2 = common_vendor.unref(common_libraries_day.getTimeStatus)(i == null ? void 0 : i.expect_end_time)) == null ? void 0 : _b2.color) || "#000",
              size: "14"
            }),
            n: common_vendor.t((_c = common_vendor.unref(common_libraries_day.getTimeStatus)(i == null ? void 0 : i.expect_end_time)) == null ? void 0 : _c.label),
            o: common_vendor.n(`todo_done_card_footer status_${(_d = common_vendor.unref(common_libraries_day.getTimeStatus)(i == null ? void 0 : i.expect_end_time)) == null ? void 0 : _d.status}`)
          } : {}, {
            p: common_vendor.t(i == null ? void 0 : i.created_at),
            q: `items_${index}`,
            r: common_vendor.o(($event) => toPageShow(i), `items_${index}`),
            s: common_vendor.n(`todo_done_card ${(i == null ? void 0 : i.status) === "Pending" ? `card_status_${(_e = common_vendor.unref(common_libraries_day.getTimeStatus)(i == null ? void 0 : i.expect_end_time)) == null ? void 0 : _e.status}` : ""}`)
          });
        })
      };
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-fb0c29a5"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/BILL/outstanding_fee/show/components/WorkOrderList.vue"]]);
wx.createComponent(Component);
