105 lines
4.3 KiB
JavaScript
Raw Permalink Normal View History

2025-08-29 09:51:02 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_libraries_apiLoading = require("../../common/libraries/apiLoading.js");
require("../../common/libraries/day.js");
const gen_Apis = require("../../gen/Apis.js");
require("../../common/libraries/request.js");
require("../../common/store/useWeAppAuthStore.js");
2026-01-30 09:54:26 +08:00
require("../../common/libraries/setTabBar.js");
2025-08-29 09:51:02 +08:00
require("../../common/store/useWorkStore.js");
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
const _easycom_hs_popup2 = common_vendor.resolveComponent("hs-popup");
(_easycom_uni_icons2 + _easycom_hs_popup2)();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_hs_popup = () => "../hs-popup/hs-popup.js";
if (!Math) {
(_easycom_uni_icons + _easycom_hs_popup)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "hs-popup-house",
2025-12-15 18:19:04 +08:00
props: ["Apis", "baseStyle"],
2025-08-29 09:51:02 +08:00
emits: ["close", "change"],
setup(__props, { emit }) {
2025-12-15 18:19:04 +08:00
const props = __props;
2025-08-29 09:51:02 +08:00
const selectEd = common_vendor.ref({ name: "全部房屋", id: 0 });
const pickerList = common_vendor.ref([]);
const popupShow = common_vendor.ref(false);
const onPopupShow = () => {
popupShow.value = !popupShow.value;
if (popupShow.value) {
getPickerList();
}
};
const getPickerList = () => {
var _a, _b, _c;
common_libraries_apiLoading.getApiLoading((_c = (_b = (_a = gen_Apis.Apis) == null ? void 0 : _a.Archive) == null ? void 0 : _b.HouseOccupants) == null ? void 0 : _c.List, {}).then((res) => {
2025-12-15 18:19:04 +08:00
pickerList.value = res == null ? void 0 : res.data;
2025-08-29 09:51:02 +08:00
console.log(res);
});
};
const onSelectMerchant = (i) => {
var _a;
2025-12-15 18:19:04 +08:00
selectEd.value = { name: (_a = i == null ? void 0 : i.asset_house) == null ? void 0 : _a.full_name, id: i == null ? void 0 : i.asset_houses_id };
2025-08-29 09:51:02 +08:00
emit("change", (i == null ? void 0 : i.asset_houses_id) || "");
onPopupShow();
};
2025-12-15 18:19:04 +08:00
const handleClose = () => {
selectEd.value = { name: "全部房屋", id: 0 };
emit("change", void 0);
};
2025-08-29 09:51:02 +08:00
return (_ctx, _cache) => {
2025-12-15 18:19:04 +08:00
var _a, _b, _c, _d, _e;
return common_vendor.e({
2025-08-29 09:51:02 +08:00
a: common_vendor.t((_a = selectEd.value) == null ? void 0 : _a.name),
2025-12-15 18:19:04 +08:00
b: common_vendor.s((props == null ? void 0 : props.baseStyle) || {}),
c: ((_b = selectEd.value) == null ? void 0 : _b.name) === "全部房屋"
}, ((_c = selectEd.value) == null ? void 0 : _c.name) === "全部房屋" ? {
d: common_vendor.p({
2025-08-29 09:51:02 +08:00
type: "down",
color: "#333",
size: "12"
2025-12-15 18:19:04 +08:00
})
} : {}, {
e: common_vendor.o(onPopupShow),
f: ((_d = selectEd.value) == null ? void 0 : _d.name) !== "全部房屋"
}, ((_e = selectEd.value) == null ? void 0 : _e.name) !== "全部房屋" ? {
g: common_vendor.p({
type: "close",
color: "#666",
size: "18"
2025-08-29 09:51:02 +08:00
}),
2025-12-15 18:19:04 +08:00
h: common_vendor.o(handleClose)
} : {}, {
i: common_vendor.f(pickerList.value, (i, index, i0) => {
var _a2, _b2, _c2;
2025-08-29 09:51:02 +08:00
return common_vendor.e({
a: common_vendor.t((_a2 = i == null ? void 0 : i.asset_house) == null ? void 0 : _a2.full_name),
2025-12-15 18:19:04 +08:00
b: ((_b2 = selectEd.value) == null ? void 0 : _b2.id) === (i == null ? void 0 : i.asset_houses_id)
}, ((_c2 = selectEd.value) == null ? void 0 : _c2.id) === (i == null ? void 0 : i.asset_houses_id) ? {
c: "cc8caa34-3-" + i0 + ",cc8caa34-2",
2025-08-29 09:51:02 +08:00
d: common_vendor.p({
type: "checkmarkempty",
size: "20",
color: "#2A7EFB"
})
} : {}, {
e: `key_${index}`,
f: common_vendor.o(($event) => onSelectMerchant(i), `key_${index}`)
});
}),
2025-12-15 18:19:04 +08:00
j: common_vendor.o(onPopupShow),
k: common_vendor.p({
2025-08-29 09:51:02 +08:00
show: popupShow.value,
mode: "bottom",
closeable: true,
round: 20
})
2025-12-15 18:19:04 +08:00
});
2025-08-29 09:51:02 +08:00
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-cc8caa34"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/components/hs-popup-house/hs-popup-house.vue"]]);
wx.createComponent(Component);