"use strict";
const common_vendor = require("../../../common/vendor.js");
const INDEX_visitor_applies_add_method = require("./method.js");
const INDEX_visitor_applies_add_model = require("./model.js");
const gen_Enums = require("../../../gen/Enums.js");
require("../../../gen/Apis.js");
require("../../../common/libraries/request.js");
require("../../../common/store/useWeAppAuthStore.js");
require("../../../common/libraries/setTabBar.js");
require("../../../common/libraries/apiLoading.js");
require("../../../common/store/useWorkStore.js");
require("../../../common/libraries/userUserLogin.js");
require("../../../common/libraries/naviHelper.js");
if (!Array) {
  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  const _easycom_hs_cell2 = common_vendor.resolveComponent("hs-cell");
  const _easycom_hs_input2 = common_vendor.resolveComponent("hs-input");
  const _easycom_hs_radio_cell_picker2 = common_vendor.resolveComponent("hs-radio-cell-picker");
  const _easycom_hs_date_picker2 = common_vendor.resolveComponent("hs-date-picker");
  const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
  const _easycom_hs_button2 = common_vendor.resolveComponent("hs-button");
  const _easycom_hs_footer2 = common_vendor.resolveComponent("hs-footer");
  (_easycom_uni_icons2 + _easycom_hs_cell2 + _easycom_hs_input2 + _easycom_hs_radio_cell_picker2 + _easycom_hs_date_picker2 + _easycom_u_icon2 + _easycom_hs_button2 + _easycom_hs_footer2)();
}
const _easycom_uni_icons = () => "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_hs_cell = () => "../../../components/hs-cell/hs-cell.js";
const _easycom_hs_input = () => "../../../components/hs-input/hs-input.js";
const _easycom_hs_radio_cell_picker = () => "../../../components/hs-radio-cell-picker/hs-radio-cell-picker.js";
const _easycom_hs_date_picker = () => "../../../components/hs-date-picker/hs-date-picker.js";
const _easycom_u_icon = () => "../../../node-modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_hs_button = () => "../../../components/hs-button/hs-button.js";
const _easycom_hs_footer = () => "../../../components/hs-footer/hs-footer.js";
if (!Math) {
  (_easycom_uni_icons + _easycom_hs_cell + _easycom_hs_input + _easycom_hs_radio_cell_picker + _easycom_hs_date_picker + _easycom_u_icon + _easycom_hs_button + _easycom_hs_footer)();
}
const _sfc_defineComponent = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    common_vendor.onShow(() => {
      var _a;
      (_a = INDEX_visitor_applies_add_method.method) == null ? void 0 : _a.init({});
    });
    common_vendor.onLoad((e) => {
      var _a;
      console.log(e, "show_e");
      if ((e == null ? void 0 : e.page_type) === "share") {
        INDEX_visitor_applies_add_model.useModel.formData.value = e;
        (_a = INDEX_visitor_applies_add_method.method) == null ? void 0 : _a.init(e);
      }
    });
    common_vendor.onUnload(() => {
      INDEX_visitor_applies_add_model.useModel.formData.value = {
        companions_json: [
          {
            name: ""
          }
        ]
      };
    });
    common_vendor.onShareAppMessage(() => {
      var _a, _b, _c, _d;
      return {
        title: "好友邀请你填写访客信息！",
        path: `/INDEX/visitor_applies/add/index?id=${(_b = (_a = INDEX_visitor_applies_add_model.useModel) == null ? void 0 : _a.formData.value) == null ? void 0 : _b.asset_houses_id}&full_name=${(_d = (_c = INDEX_visitor_applies_add_model.useModel) == null ? void 0 : _c.formData.value) == null ? void 0 : _d.full_name}&page_type=share`,
        imageUrl: "https://pay-prod-1369486729.cos.ap-guangzhou.myqcloud.com/uploads/cs-test/01KFYMMS6X8YP52NQQ4TCFED51.jpg"
      };
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
      return common_vendor.e({
        a: ((_c = (_b = (_a = common_vendor.unref(INDEX_visitor_applies_add_model.useModel)) == null ? void 0 : _a.formData) == null ? void 0 : _b.value) == null ? void 0 : _c.page_type) !== "share"
      }, ((_f = (_e = (_d = common_vendor.unref(INDEX_visitor_applies_add_model.useModel)) == null ? void 0 : _d.formData) == null ? void 0 : _e.value) == null ? void 0 : _f.page_type) !== "share" ? {
        b: common_vendor.p({
          type: "right",
          size: "14",
          color: "#fff"
        })
      } : {}, {
        c: ((_i = (_h = (_g = common_vendor.unref(INDEX_visitor_applies_add_model.useModel)) == null ? void 0 : _g.formData) == null ? void 0 : _h.value) == null ? void 0 : _i.page_type) !== "share"
      }, ((_l = (_k = (_j = common_vendor.unref(INDEX_visitor_applies_add_model.useModel)) == null ? void 0 : _j.formData) == null ? void 0 : _k.value) == null ? void 0 : _l.page_type) !== "share" ? {
        d: common_vendor.o((_m = common_vendor.unref(INDEX_visitor_applies_add_method.method)) == null ? void 0 : _m.handleToSelectHouse),
        e: common_vendor.p({
          title: "房屋信息",
          required: true,
          isLink: true,
          value: (_p = (_o = (_n = common_vendor.unref(INDEX_visitor_applies_add_model.useModel)) == null ? void 0 : _n.formData) == null ? void 0 : _o.value) == null ? void 0 : _p.full_name
        })
      } : {
        f: common_vendor.p({
          title: "房屋信息",
          required: true,
          value: (_s = (_r = (_q = common_vendor.unref(INDEX_visitor_applies_add_model.useModel)) == null ? void 0 : _q.formData) == null ? void 0 : _r.value) == null ? void 0 : _s.full_name
        })
      }, {
        g: common_vendor.o(($event) => common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.visitor_name = $event),
        h: common_vendor.p({
          textAlign: "right",
          valueModel: common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.visitor_name
        }),
        i: common_vendor.p({
          title: "访客姓名",
          required: true
        }),
        j: common_vendor.o(($event) => common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.visitor_phone = $event),
        k: common_vendor.p({
          maxLength: "11",
          textAlign: "right",
          type: "number",
          valueModel: common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.visitor_phone
        }),
        l: common_vendor.p({
          title: "访客电话",
          required: true,
          borderTop: true
        }),
        m: common_vendor.o(($event) => common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.visit_reason = $event),
        n: common_vendor.p({
          title: "来访事由",
          required: true,
          isLink: true,
          borderTop: true,
          Enums: common_vendor.unref(gen_Enums.VisitReasonEnum),
          valueModel: common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.visit_reason
        }),
        o: common_vendor.p({
          type: "plusempty",
          size: "14",
          color: "#2a7efb"
        }),
        p: common_vendor.o(
          //@ts-ignore
          (...args) => {
            var _a2, _b2;
            return ((_a2 = common_vendor.unref(INDEX_visitor_applies_add_method.method)) == null ? void 0 : _a2.handleAddGoods) && ((_b2 = common_vendor.unref(INDEX_visitor_applies_add_method.method)) == null ? void 0 : _b2.handleAddGoods(...args));
          }
        ),
        q: common_vendor.f((_v = (_u = (_t = common_vendor.unref(INDEX_visitor_applies_add_model.useModel)) == null ? void 0 : _t.formData) == null ? void 0 : _u.value) == null ? void 0 : _v.companions_json, (i, index, i0) => {
          return {
            a: "074dc314-9-" + i0,
            b: common_vendor.o(($event) => i.name = $event, `input_${index}`),
            c: common_vendor.p({
              placeholder: "随访人姓名",
              valueModel: i.name
            }),
            d: "074dc314-10-" + i0,
            e: common_vendor.o(($event) => {
              var _a2;
              return (_a2 = common_vendor.unref(INDEX_visitor_applies_add_method.method)) == null ? void 0 : _a2.handleDeleteGoods(index);
            }, `input_${index}`),
            f: `input_${index}`
          };
        }),
        r: common_vendor.p({
          type: "trash-filled",
          color: "#999",
          size: "22"
        }),
        s: common_vendor.o(($event) => common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.visit_start_time = $event),
        t: common_vendor.p({
          title: "预计到访时间",
          required: true,
          isLink: true,
          valueModel: common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.visit_start_time
        }),
        v: common_vendor.o(($event) => common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.visit_end_time = $event),
        w: common_vendor.p({
          title: "预计离开时间",
          borderTop: true,
          required: true,
          isLink: true,
          valueModel: common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.visit_end_time
        }),
        x: common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.remark,
        y: common_vendor.o(($event) => common_vendor.unref(INDEX_visitor_applies_add_model.useModel).formData.value.remark = $event.detail.value),
        z: common_vendor.p({
          name: "order",
          size: "24"
        }),
        A: common_vendor.o(
          //@ts-ignore
          (...args) => {
            var _a2, _b2;
            return ((_a2 = common_vendor.unref(INDEX_visitor_applies_add_method.method)) == null ? void 0 : _a2.handleToApplyRecords) && ((_b2 = common_vendor.unref(INDEX_visitor_applies_add_method.method)) == null ? void 0 : _b2.handleToApplyRecords(...args));
          }
        ),
        B: common_vendor.o(common_vendor.unref(INDEX_visitor_applies_add_method.method).handleSubmit),
        C: common_vendor.p({
          label: "提交申请",
          type: "primary",
          size: "md"
        })
      });
    };
  }
});
_sfc_defineComponent.__runtimeHooks = 2;
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_defineComponent, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/INDEX/visitor_applies/add/index.vue"]]);
wx.createPage(MiniProgramPage);
