155 lines
8.3 KiB
JavaScript
155 lines
8.3 KiB
JavaScript
|
|
"use strict";
|
||
|
|
const common_vendor = require("../../common/vendor.js");
|
||
|
|
const CUSTOMER_bind_house_method = require("./method.js");
|
||
|
|
const CUSTOMER_bind_house_model = require("./model.js");
|
||
|
|
const gen_Enums = require("../../gen/Enums.js");
|
||
|
|
require("../../common/libraries/request.js");
|
||
|
|
const common_store_useWeAppAuthStore = require("../../common/store/useWeAppAuthStore.js");
|
||
|
|
require("../../common/store/useWorkStore.js");
|
||
|
|
require("../../common/libraries/naviHelper.js");
|
||
|
|
require("../../gen/Apis.js");
|
||
|
|
require("../../common/libraries/apiLoading.js");
|
||
|
|
require("../../common/libraries/userUserLogin.js");
|
||
|
|
require("../../common/libraries/sendWxWork.js");
|
||
|
|
if (!Array) {
|
||
|
|
const _easycom_hs_input2 = common_vendor.resolveComponent("hs-input");
|
||
|
|
const _easycom_hs_cell2 = common_vendor.resolveComponent("hs-cell");
|
||
|
|
const _easycom_hs_footer2 = common_vendor.resolveComponent("hs-footer");
|
||
|
|
const _easycom_hs_empty2 = common_vendor.resolveComponent("hs-empty");
|
||
|
|
const _easycom_hs_enum_tag2 = common_vendor.resolveComponent("hs-enum-tag");
|
||
|
|
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||
|
|
(_easycom_hs_input2 + _easycom_hs_cell2 + _easycom_hs_footer2 + _easycom_hs_empty2 + _easycom_hs_enum_tag2 + _easycom_uni_icons2)();
|
||
|
|
}
|
||
|
|
const _easycom_hs_input = () => "../../components/hs-input/hs-input.js";
|
||
|
|
const _easycom_hs_cell = () => "../../components/hs-cell/hs-cell.js";
|
||
|
|
const _easycom_hs_footer = () => "../../components/hs-footer/hs-footer.js";
|
||
|
|
const _easycom_hs_empty = () => "../../components/hs-empty/hs-empty.js";
|
||
|
|
const _easycom_hs_enum_tag = () => "../../components/hs-enum-tag/hs-enum-tag.js";
|
||
|
|
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||
|
|
if (!Math) {
|
||
|
|
(_easycom_hs_input + _easycom_hs_cell + _easycom_hs_footer + _easycom_hs_empty + _easycom_hs_enum_tag + _easycom_uni_icons)();
|
||
|
|
}
|
||
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||
|
|
__name: "index",
|
||
|
|
setup(__props) {
|
||
|
|
const auth = common_store_useWeAppAuthStore.useWeAppAuthStore();
|
||
|
|
common_vendor.onLoad(async (e) => {
|
||
|
|
var _a, _b, _c;
|
||
|
|
await ((_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$onLaunched);
|
||
|
|
if (e == null ? void 0 : e.phone) {
|
||
|
|
CUSTOMER_bind_house_model.useModel.bindPhone.value = true;
|
||
|
|
CUSTOMER_bind_house_model.useModel.formData.value = e;
|
||
|
|
(_b = CUSTOMER_bind_house_method.method) == null ? void 0 : _b.nextStep("phone");
|
||
|
|
}
|
||
|
|
if (((_c = auth == null ? void 0 : auth.data) == null ? void 0 : _c.environment) === "wxwork") {
|
||
|
|
common_vendor.index.qy.getCurExternalContact({
|
||
|
|
success: function(res) {
|
||
|
|
CUSTOMER_bind_house_model.useModel.formData.value.external_userid = res == null ? void 0 : res.userId;
|
||
|
|
console.log("开始2", res);
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|
||
|
|
common_vendor.onUnload(() => {
|
||
|
|
CUSTOMER_bind_house_model.useModel.bindHouseSelectPage.value = false;
|
||
|
|
CUSTOMER_bind_house_model.useModel.bindHouseFormPage.value = true;
|
||
|
|
CUSTOMER_bind_house_model.useModel.formData.value = {};
|
||
|
|
});
|
||
|
|
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: (_b = (_a = common_vendor.unref(CUSTOMER_bind_house_model.useModel)) == null ? void 0 : _a.bindHouseFormPage) == null ? void 0 : _b.value
|
||
|
|
}, ((_d = (_c = common_vendor.unref(CUSTOMER_bind_house_model.useModel)) == null ? void 0 : _c.bindHouseFormPage) == null ? void 0 : _d.value) ? {
|
||
|
|
b: common_vendor.o(($event) => common_vendor.unref(CUSTOMER_bind_house_model.useModel).formData.value.name = $event),
|
||
|
|
c: common_vendor.p({
|
||
|
|
textAlign: "right",
|
||
|
|
valueModel: common_vendor.unref(CUSTOMER_bind_house_model.useModel).formData.value.name
|
||
|
|
}),
|
||
|
|
d: common_vendor.p({
|
||
|
|
title: "客户姓名",
|
||
|
|
required: true,
|
||
|
|
borderTop: true
|
||
|
|
}),
|
||
|
|
e: common_vendor.o(($event) => common_vendor.unref(CUSTOMER_bind_house_model.useModel).formData.value.phone = $event),
|
||
|
|
f: common_vendor.p({
|
||
|
|
maxLength: "11",
|
||
|
|
type: "number",
|
||
|
|
textAlign: "right",
|
||
|
|
valueModel: common_vendor.unref(CUSTOMER_bind_house_model.useModel).formData.value.phone
|
||
|
|
}),
|
||
|
|
g: common_vendor.p({
|
||
|
|
title: "手机号",
|
||
|
|
required: true,
|
||
|
|
borderTop: true
|
||
|
|
}),
|
||
|
|
h: common_vendor.o((_e = common_vendor.unref(CUSTOMER_bind_house_method.method)) == null ? void 0 : _e.nextStep),
|
||
|
|
i: common_vendor.o((_f = common_vendor.unref(CUSTOMER_bind_house_method.method)) == null ? void 0 : _f.handleInviteCustomer),
|
||
|
|
j: common_vendor.p({
|
||
|
|
btnParimaryName: "下一步",
|
||
|
|
btnOtherName: "邀请客户绑定",
|
||
|
|
btnOtherShow: true
|
||
|
|
})
|
||
|
|
} : {}, {
|
||
|
|
k: (_h = (_g = common_vendor.unref(CUSTOMER_bind_house_model.useModel)) == null ? void 0 : _g.bindHouseSelectPage) == null ? void 0 : _h.value
|
||
|
|
}, ((_j = (_i = common_vendor.unref(CUSTOMER_bind_house_model.useModel)) == null ? void 0 : _i.bindHouseSelectPage) == null ? void 0 : _j.value) ? common_vendor.e({
|
||
|
|
l: !((_m = (_l = (_k = common_vendor.unref(CUSTOMER_bind_house_model.useModel)) == null ? void 0 : _k.listData) == null ? void 0 : _l.value) == null ? void 0 : _m.length)
|
||
|
|
}, !((_p = (_o = (_n = common_vendor.unref(CUSTOMER_bind_house_model.useModel)) == null ? void 0 : _n.listData) == null ? void 0 : _o.value) == null ? void 0 : _p.length) ? {} : {}, {
|
||
|
|
m: common_vendor.f((_r = (_q = common_vendor.unref(CUSTOMER_bind_house_model.useModel)) == null ? void 0 : _q.listData) == null ? void 0 : _r.value, (i, index, i0) => {
|
||
|
|
var _a2, _b2, _c2, _d2;
|
||
|
|
return common_vendor.e({
|
||
|
|
a: common_vendor.t((_a2 = i == null ? void 0 : i.asset_project) == null ? void 0 : _a2.name),
|
||
|
|
b: common_vendor.t((_b2 = i == null ? void 0 : i.asset_building) == null ? void 0 : _b2.name),
|
||
|
|
c: common_vendor.t((_c2 = i == null ? void 0 : i.asset_unit) == null ? void 0 : _c2.name),
|
||
|
|
d: common_vendor.t((_d2 = i == null ? void 0 : i.asset_house) == null ? void 0 : _d2.name),
|
||
|
|
e: "d9cb103a-6-" + i0,
|
||
|
|
f: common_vendor.p({
|
||
|
|
value: i == null ? void 0 : i.house_relation,
|
||
|
|
size: "md",
|
||
|
|
Enums: common_vendor.unref(gen_Enums.HouseOccupantsHouseRelationEnum)
|
||
|
|
}),
|
||
|
|
g: i == null ? void 0 : i.residential_relation
|
||
|
|
}, (i == null ? void 0 : i.residential_relation) ? {
|
||
|
|
h: "d9cb103a-7-" + i0,
|
||
|
|
i: common_vendor.p({
|
||
|
|
value: i == null ? void 0 : i.residential_relation,
|
||
|
|
size: "md",
|
||
|
|
Enums: common_vendor.unref(gen_Enums.HouseOccupantsResidentialRelationEnum)
|
||
|
|
})
|
||
|
|
} : {}, {
|
||
|
|
j: i == null ? void 0 : i.isSelect
|
||
|
|
}, (i == null ? void 0 : i.isSelect) ? {
|
||
|
|
k: "d9cb103a-8-" + i0,
|
||
|
|
l: common_vendor.p({
|
||
|
|
type: "checkbox-filled",
|
||
|
|
size: "18",
|
||
|
|
color: "#0082FA"
|
||
|
|
})
|
||
|
|
} : {
|
||
|
|
m: "d9cb103a-9-" + i0,
|
||
|
|
n: common_vendor.p({
|
||
|
|
type: "circle",
|
||
|
|
size: "18",
|
||
|
|
color: "#666"
|
||
|
|
})
|
||
|
|
}, {
|
||
|
|
o: `house_${index}`,
|
||
|
|
p: common_vendor.o(($event) => {
|
||
|
|
var _a3;
|
||
|
|
return (_a3 = common_vendor.unref(CUSTOMER_bind_house_method.method)) == null ? void 0 : _a3.selectHouse(i, index);
|
||
|
|
}, `house_${index}`)
|
||
|
|
});
|
||
|
|
}),
|
||
|
|
n: common_vendor.o((_s = common_vendor.unref(CUSTOMER_bind_house_method.method)) == null ? void 0 : _s.handleBindHouse),
|
||
|
|
o: common_vendor.o((_t = common_vendor.unref(CUSTOMER_bind_house_method.method)) == null ? void 0 : _t.handleBack),
|
||
|
|
p: common_vendor.p({
|
||
|
|
btnParimaryName: "绑定房屋",
|
||
|
|
btnOtherShow: true,
|
||
|
|
btnOtherName: ((_v = (_u = common_vendor.unref(CUSTOMER_bind_house_model.useModel)) == null ? void 0 : _u.bindPhone) == null ? void 0 : _v.value) ? "绑定其他房屋" : "上一步"
|
||
|
|
})
|
||
|
|
}) : {});
|
||
|
|
};
|
||
|
|
}
|
||
|
|
});
|
||
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/CUSTOMER/bind_house/index.vue"]]);
|
||
|
|
wx.createPage(MiniProgramPage);
|