"use strict";
const common_vendor = require("../../common/vendor.js");
const gen_Enums = require("../../gen/Enums.js");
const WORKORDER_add_method = require("./method.js");
const WORKORDER_add_model = require("./model.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");
if (!Array) {
  const _easycom_hs_cell2 = common_vendor.resolveComponent("hs-cell");
  const _easycom_hs_popup_project_houer2 = common_vendor.resolveComponent("hs-popup-project-houer");
  const _easycom_hs_input2 = common_vendor.resolveComponent("hs-input");
  const _easycom_hs_cell_textarea2 = common_vendor.resolveComponent("hs-cell-textarea");
  const _easycom_hs_upload2 = common_vendor.resolveComponent("hs-upload");
  const _easycom_hs_footer2 = common_vendor.resolveComponent("hs-footer");
  (_easycom_hs_cell2 + _easycom_hs_popup_project_houer2 + _easycom_hs_input2 + _easycom_hs_cell_textarea2 + _easycom_hs_upload2 + _easycom_hs_footer2)();
}
const _easycom_hs_cell = () => "../../components/hs-cell/hs-cell.js";
const _easycom_hs_popup_project_houer = () => "../../components/hs-popup-project-houer/hs-popup-project-houer.js";
const _easycom_hs_input = () => "../../components/hs-input/hs-input.js";
const _easycom_hs_cell_textarea = () => "../../components/hs-cell-textarea/hs-cell-textarea.js";
const _easycom_hs_upload = () => "../../components/hs-upload/hs-upload.js";
const _easycom_hs_footer = () => "../../components/hs-footer/hs-footer.js";
if (!Math) {
  (_easycom_hs_cell + _easycom_hs_popup_project_houer + _easycom_hs_input + _easycom_hs_cell_textarea + _easycom_hs_upload + _easycom_hs_footer)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    const HouseWorkOrdersTypeEnumList = common_vendor.ref({});
    common_vendor.onLoad((e) => {
      WORKORDER_add_model.useModel.formData.value.type = (e == null ? void 0 : e.type) || "";
      WORKORDER_add_model.useModel.formData.value.location = (e == null ? void 0 : e.location) || "";
      console.log(e, "2222");
    });
    common_vendor.onShow(() => {
      var _a;
      let Enums = JSON.parse(JSON.stringify(gen_Enums.HouseWorkOrdersTypeEnum));
      Enums == null ? true : delete Enums.Complaint;
      HouseWorkOrdersTypeEnumList.value = Enums;
      gen_Enums.HouseWorkOrdersLocationEnum.MyHome.text = "房屋";
      (_a = WORKORDER_add_method.method) == null ? void 0 : _a.init();
    });
    common_vendor.onUnload(() => {
      var _a;
      (_a = WORKORDER_add_method.method) == null ? void 0 : _a.unInit();
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e, _f, _g, _h;
      return common_vendor.e({
        a: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.location !== "MyHome"
      }, common_vendor.unref(WORKORDER_add_model.useModel).formData.value.location !== "MyHome" ? {
        b: common_vendor.p({
          title: "选择项目",
          required: true,
          borderTop: true,
          isLink: true,
          value: (_c = (_b = (_a = common_vendor.unref(WORKORDER_add_model.useModel)) == null ? void 0 : _a.formData) == null ? void 0 : _b.value) == null ? void 0 : _c.project_name,
          isPlaceholder: "请选择项目",
          url: "/pages/public/select_project/index?source=work_add"
        })
      } : {}, {
        c: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.location === "MyHome"
      }, common_vendor.unref(WORKORDER_add_model.useModel).formData.value.location === "MyHome" ? {
        d: common_vendor.o((_d = common_vendor.unref(WORKORDER_add_method.method)) == null ? void 0 : _d.handleSelectProject),
        e: common_vendor.p({
          title: "选择房屋",
          defaultValueName: (_g = (_f = (_e = common_vendor.unref(WORKORDER_add_model.useModel)) == null ? void 0 : _e.formData) == null ? void 0 : _f.value) == null ? void 0 : _g.full_name
        }),
        f: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.reporter_name = $event),
        g: common_vendor.p({
          textAlign: "right",
          valueModel: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.reporter_name
        }),
        h: common_vendor.p({
          title: "客户姓名",
          required: true,
          borderTop: true
        }),
        i: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.reporter_phone = $event),
        j: common_vendor.p({
          maxLength: "11",
          textAlign: "right",
          valueModel: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.reporter_phone
        }),
        k: common_vendor.p({
          title: "客户电话",
          required: true,
          borderTop: true
        }),
        l: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.contact_phone = $event),
        m: common_vendor.p({
          maxLength: "11",
          textAlign: "right",
          valueModel: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.contact_phone
        }),
        n: common_vendor.p({
          title: "备用联系电话",
          borderTop: true
        })
      } : {}, {
        o: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.content = $event),
        p: common_vendor.p({
          borderTop: true,
          required: true,
          title: "问题描述",
          placeholder: "请详细描述问题情况，包括具体位置现象等",
          valueModel: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.content
        }),
        q: common_vendor.o(($event) => common_vendor.unref(WORKORDER_add_model.useModel).formData.value.attachments = $event),
        r: common_vendor.p({
          borderTop: true,
          title: "上传图片",
          count: 6,
          valueModel: common_vendor.unref(WORKORDER_add_model.useModel).formData.value.attachments
        }),
        s: common_vendor.o((_h = common_vendor.unref(WORKORDER_add_method.method)) == null ? void 0 : _h.handleSubmit),
        t: common_vendor.p({
          btnParimaryName: "提交"
        })
      });
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/WORKORDER/add/index.vue"]]);
wx.createPage(MiniProgramPage);
