"use strict";
const common_vendor = require("../../../common/vendor.js");
const common_libraries_day = require("../../../common/libraries/day.js");
const ME_instrument_add_method = require("./method.js");
const ME_instrument_add_model = require("./model.js");
require("../../../common/libraries/apiLoading.js");
require("../../../common/libraries/naviHelper.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_upload2 = common_vendor.resolveComponent("hs-upload");
  const _easycom_hs_cell_textarea2 = common_vendor.resolveComponent("hs-cell-textarea");
  const _easycom_hs_footer2 = common_vendor.resolveComponent("hs-footer");
  (_easycom_hs_upload2 + _easycom_hs_cell_textarea2 + _easycom_hs_footer2)();
}
const _easycom_hs_upload = () => "../../../components/hs-upload/hs-upload.js";
const _easycom_hs_cell_textarea = () => "../../../components/hs-cell-textarea/hs-cell-textarea.js";
const _easycom_hs_footer = () => "../../../components/hs-footer/hs-footer.js";
if (!Math) {
  (_easycom_hs_upload + _easycom_hs_cell_textarea + _easycom_hs_footer)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    common_vendor.onLoad((e) => {
      var _a, _b;
      (_a = ME_instrument_add_method.method) == null ? void 0 : _a.init(e);
      (_b = ME_instrument_add_method.method) == null ? void 0 : _b.getShow(e);
    });
    common_vendor.onUnload(() => {
      ME_instrument_add_model.useModel.formData.value = { is_anonymous: false };
    });
    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, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K;
      return common_vendor.e({
        a: ((_c = (_b = (_a = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _a.showData) == null ? void 0 : _b.value) == null ? void 0 : _c.usage_type) === "WaterMeter"
      }, ((_f = (_e = (_d = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _d.showData) == null ? void 0 : _e.value) == null ? void 0 : _f.usage_type) === "WaterMeter" ? {} : {}, {
        b: ((_i = (_h = (_g = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _g.showData) == null ? void 0 : _h.value) == null ? void 0 : _i.usage_type) === "ElectricMeter"
      }, ((_l = (_k = (_j = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _j.showData) == null ? void 0 : _k.value) == null ? void 0 : _l.usage_type) === "ElectricMeter" ? {} : {}, {
        c: ((_o = (_n = (_m = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _m.showData) == null ? void 0 : _n.value) == null ? void 0 : _o.usage_type) === "GasMeter"
      }, ((_r = (_q = (_p = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _p.showData) == null ? void 0 : _q.value) == null ? void 0 : _r.usage_type) === "GasMeter" ? {} : {}, {
        d: ((_u = (_t = (_s = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _s.showData) == null ? void 0 : _t.value) == null ? void 0 : _u.usage_type) === "HeatingMeter"
      }, ((_x = (_w = (_v = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _v.showData) == null ? void 0 : _w.value) == null ? void 0 : _x.usage_type) === "HeatingMeter" ? {} : {}, {
        e: common_vendor.f((_A = (_z = (_y = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _y.showData) == null ? void 0 : _z.value) == null ? void 0 : _A.house_meter_has_houses, (res, index, i0) => {
          return {
            a: common_vendor.t(res == null ? void 0 : res.full_name),
            b: `house_${index}`
          };
        }),
        f: common_vendor.t(((_D = (_C = (_B = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _B.showData) == null ? void 0 : _C.value) == null ? void 0 : _D.name) || "-"),
        g: common_vendor.t(((_G = (_F = (_E = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _E.showData) == null ? void 0 : _F.value) == null ? void 0 : _G.latest_value) || "-"),
        h: common_vendor.t(common_vendor.unref(common_libraries_day.showDay)((_J = (_I = (_H = common_vendor.unref(ME_instrument_add_model.useModel)) == null ? void 0 : _H.showData) == null ? void 0 : _I.value) == null ? void 0 : _J.latest_time)),
        i: common_vendor.t(common_vendor.unref(common_libraries_day.getDay)()),
        j: common_vendor.unref(ME_instrument_add_model.useModel).formData.value.current_reading,
        k: common_vendor.o(($event) => common_vendor.unref(ME_instrument_add_model.useModel).formData.value.current_reading = $event.detail.value),
        l: common_vendor.o(($event) => common_vendor.unref(ME_instrument_add_model.useModel).formData.value.image = $event),
        m: common_vendor.p({
          title: "上传图片",
          count: 6,
          valueModel: common_vendor.unref(ME_instrument_add_model.useModel).formData.value.image
        }),
        n: common_vendor.o(($event) => common_vendor.unref(ME_instrument_add_model.useModel).formData.value.remark = $event),
        o: common_vendor.p({
          borderTop: true,
          title: "备注（选填）",
          placeholder: "请输入此次抄表的备注，选填",
          valueModel: common_vendor.unref(ME_instrument_add_model.useModel).formData.value.remark
        }),
        p: common_vendor.o((_K = common_vendor.unref(ME_instrument_add_method.method)) == null ? void 0 : _K.handleSubmit),
        q: common_vendor.p({
          btnParimaryName: "提交"
        })
      });
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/ME/instrument/add/index.vue"]]);
wx.createPage(MiniProgramPage);
