feat:房屋绑定
This commit is contained in:
parent
4711f95598
commit
4b0f25d1f2
90
dist/dev/mp-weixin/INDEX/binding/index.js
vendored
90
dist/dev/mp-weixin/INDEX/binding/index.js
vendored
@ -3,6 +3,11 @@ const common_vendor = require("../../common/vendor.js");
|
||||
const gen_Enums = require("../../gen/Enums.js");
|
||||
const INDEX_binding_method = require("./method.js");
|
||||
const INDEX_binding_model = require("./model.js");
|
||||
require("../../common/libraries/apiLoading.js");
|
||||
require("../../gen/Apis.js");
|
||||
require("../../common/libraries/request.js");
|
||||
require("../../common/store/useWeAppAuthStore.js");
|
||||
require("../../common/libraries/naviHelper.js");
|
||||
if (!Array) {
|
||||
const _easycom_hs_popup_project2 = common_vendor.resolveComponent("hs-popup-project");
|
||||
const _easycom_hs_radio_cell_picker2 = common_vendor.resolveComponent("hs-radio-cell-picker");
|
||||
@ -29,78 +34,103 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
return (_ctx, _cache) => {
|
||||
var _a;
|
||||
return {
|
||||
var _a, _b;
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o((_a = common_vendor.unref(INDEX_binding_method.method)) == null ? void 0 : _a.handleSelectProject),
|
||||
b: common_vendor.p({
|
||||
title: "选择小区"
|
||||
}),
|
||||
c: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.type = $event),
|
||||
d: common_vendor.p({
|
||||
Enums: common_vendor.unref(gen_Enums.HouseOccupantsHouseRelationEnum),
|
||||
Enums: common_vendor.unref(gen_Enums.HouseRegistersIdentityTypeEnum),
|
||||
title: "请选择您的身份",
|
||||
required: true,
|
||||
borderTop: true,
|
||||
valueModel: common_vendor.unref(INDEX_binding_model.model).formData.value.type
|
||||
}),
|
||||
e: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.name = $event),
|
||||
f: common_vendor.p({
|
||||
textAlign: "right",
|
||||
modelValue: common_vendor.unref(INDEX_binding_model.model).formData.value.name
|
||||
}),
|
||||
e: common_vendor.unref(INDEX_binding_model.model).formData.value.type
|
||||
}, common_vendor.unref(INDEX_binding_model.model).formData.value.type ? {
|
||||
f: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.name = $event),
|
||||
g: common_vendor.p({
|
||||
textAlign: "right",
|
||||
valueModel: common_vendor.unref(INDEX_binding_model.model).formData.value.name
|
||||
}),
|
||||
h: common_vendor.p({
|
||||
title: "真实姓名",
|
||||
required: true,
|
||||
borderTop: true
|
||||
}),
|
||||
h: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.phone = $event),
|
||||
i: common_vendor.p({
|
||||
textAlign: "right",
|
||||
modelValue: common_vendor.unref(INDEX_binding_model.model).formData.value.phone
|
||||
}),
|
||||
i: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.phone = $event),
|
||||
j: common_vendor.p({
|
||||
maxLength: "11",
|
||||
textAlign: "right",
|
||||
valueModel: common_vendor.unref(INDEX_binding_model.model).formData.value.phone
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
title: "手机号",
|
||||
required: true,
|
||||
borderTop: true
|
||||
}),
|
||||
k: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.name = $event),
|
||||
l: common_vendor.p({
|
||||
})
|
||||
} : {}, {
|
||||
l: common_vendor.unref(INDEX_binding_model.model).formData.value.type
|
||||
}, common_vendor.unref(INDEX_binding_model.model).formData.value.type ? common_vendor.e({
|
||||
m: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.id_card = $event),
|
||||
n: common_vendor.p({
|
||||
textAlign: "right",
|
||||
modelValue: common_vendor.unref(INDEX_binding_model.model).formData.value.name
|
||||
valueModel: common_vendor.unref(INDEX_binding_model.model).formData.value.id_card
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
o: common_vendor.p({
|
||||
title: "身份证号",
|
||||
required: true
|
||||
}),
|
||||
n: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.card_front_image = $event),
|
||||
o: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.card_back_image = $event),
|
||||
p: common_vendor.p({
|
||||
p: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.card_front_image = $event),
|
||||
q: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.card_back_image = $event),
|
||||
r: common_vendor.p({
|
||||
required: true,
|
||||
borderTop: true,
|
||||
valueFrontModel: common_vendor.unref(INDEX_binding_model.model).formData.value.card_front_image,
|
||||
valueBackModel: common_vendor.unref(INDEX_binding_model.model).formData.value.card_back_image
|
||||
}),
|
||||
q: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.ownership_info = $event),
|
||||
r: common_vendor.p({
|
||||
s: common_vendor.unref(INDEX_binding_model.model).formData.value.type === "Owner"
|
||||
}, common_vendor.unref(INDEX_binding_model.model).formData.value.type === "Owner" ? {
|
||||
t: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.ownership_info = $event),
|
||||
v: common_vendor.p({
|
||||
title: "上传房产证",
|
||||
count: 10,
|
||||
size: 4,
|
||||
required: true,
|
||||
valueModel: common_vendor.unref(INDEX_binding_model.model).formData.value.ownership_info
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
})
|
||||
} : {}) : {}, {
|
||||
w: common_vendor.unref(INDEX_binding_model.model).formData.value.type
|
||||
}, common_vendor.unref(INDEX_binding_model.model).formData.value.type ? common_vendor.e({
|
||||
x: common_vendor.unref(INDEX_binding_model.model).formData.value.is_live_in,
|
||||
y: common_vendor.o(
|
||||
//@ts-ignore
|
||||
(...args) => {
|
||||
var _a2, _b2;
|
||||
return ((_a2 = common_vendor.unref(INDEX_binding_method.method)) == null ? void 0 : _a2.handleIsLiveIn) && ((_b2 = common_vendor.unref(INDEX_binding_method.method)) == null ? void 0 : _b2.handleIsLiveIn(...args));
|
||||
}
|
||||
),
|
||||
z: common_vendor.p({
|
||||
title: "是否入住该房屋",
|
||||
required: true
|
||||
}),
|
||||
t: common_vendor.p({
|
||||
A: common_vendor.unref(INDEX_binding_model.model).formData.value.is_live_in
|
||||
}, common_vendor.unref(INDEX_binding_model.model).formData.value.is_live_in ? {
|
||||
B: common_vendor.o(($event) => common_vendor.unref(INDEX_binding_model.model).formData.value.move_in_date = $event),
|
||||
C: common_vendor.p({
|
||||
title: "入住时间",
|
||||
borderTop: true,
|
||||
isLink: true
|
||||
}),
|
||||
v: common_vendor.p({
|
||||
isLink: true,
|
||||
valueModel: common_vendor.unref(INDEX_binding_model.model).formData.value.move_in_date
|
||||
})
|
||||
} : {}) : {}, {
|
||||
D: common_vendor.o((_b = common_vendor.unref(INDEX_binding_method.method)) == null ? void 0 : _b.handleSubmit),
|
||||
E: common_vendor.p({
|
||||
btnParimaryName: "绑定房屋"
|
||||
})
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
2
dist/dev/mp-weixin/INDEX/binding/index.wxml
vendored
2
dist/dev/mp-weixin/INDEX/binding/index.wxml
vendored
@ -1 +1 @@
|
||||
<view class="bangding_form_data"><view class="form_card"><hs-popup-project wx:if="{{b}}" bindchange="{{a}}" u-i="d19a6168-0" bind:__l="__l" u-p="{{b}}"/><hs-radio-cell-picker wx:if="{{d}}" u-i="d19a6168-1" bind:__l="__l" bindupdateValueModel="{{c}}" u-p="{{d}}"/><hs-cell wx:if="{{g}}" u-s="{{['d']}}" u-i="d19a6168-2" bind:__l="__l" u-p="{{g}}"><hs-input wx:if="{{f}}" u-i="d19a6168-3,d19a6168-2" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"/></hs-cell><hs-cell wx:if="{{j}}" u-s="{{['d']}}" u-i="d19a6168-4" bind:__l="__l" u-p="{{j}}"><hs-input wx:if="{{i}}" u-i="d19a6168-5,d19a6168-4" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"/></hs-cell></view><view class="form_card"><hs-cell wx:if="{{m}}" u-s="{{['d']}}" u-i="d19a6168-6" bind:__l="__l" u-p="{{m}}"><hs-input wx:if="{{l}}" u-i="d19a6168-7,d19a6168-6" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"/></hs-cell><hs-upload-id-card wx:if="{{p}}" u-i="d19a6168-8" bind:__l="__l" bindupdateValueFrontModel="{{n}}" bindupdateValueBackModel="{{o}}" u-p="{{p}}"/><hs-upload wx:if="{{r}}" u-i="d19a6168-9" bind:__l="__l" bindupdateValueModel="{{q}}" u-p="{{r}}"/></view><view class="form_card"><hs-cell wx:if="{{s}}" u-s="{{['d']}}" u-i="d19a6168-10" bind:__l="__l" u-p="{{s}}"><switch color="#FFCC33" style="transform:scale(0.7)"/></hs-cell><hs-date-picker wx:if="{{t}}" u-i="d19a6168-11" bind:__l="__l" u-p="{{t}}"/></view><hs-footer wx:if="{{v}}" u-i="d19a6168-12" bind:__l="__l" u-p="{{v}}"/></view>
|
||||
<view class="bangding_form_data"><view class="form_card"><hs-popup-project wx:if="{{b}}" bindchange="{{a}}" u-i="d19a6168-0" bind:__l="__l" u-p="{{b}}"/><hs-radio-cell-picker wx:if="{{d}}" u-i="d19a6168-1" bind:__l="__l" bindupdateValueModel="{{c}}" u-p="{{d}}"/><block wx:if="{{e}}"><hs-cell wx:if="{{h}}" u-s="{{['d']}}" u-i="d19a6168-2" bind:__l="__l" u-p="{{h}}"><hs-input wx:if="{{g}}" u-i="d19a6168-3,d19a6168-2" bind:__l="__l" bindupdateValueModel="{{f}}" u-p="{{g}}"/></hs-cell><hs-cell wx:if="{{k}}" u-s="{{['d']}}" u-i="d19a6168-4" bind:__l="__l" u-p="{{k}}"><hs-input wx:if="{{j}}" u-i="d19a6168-5,d19a6168-4" bind:__l="__l" bindupdateValueModel="{{i}}" u-p="{{j}}"/></hs-cell></block></view><view wx:if="{{l}}" class="form_card"><hs-cell wx:if="{{o}}" u-s="{{['d']}}" u-i="d19a6168-6" bind:__l="__l" u-p="{{o}}"><hs-input wx:if="{{n}}" u-i="d19a6168-7,d19a6168-6" bind:__l="__l" bindupdateValueModel="{{m}}" u-p="{{n}}"/></hs-cell><hs-upload-id-card wx:if="{{r}}" u-i="d19a6168-8" bind:__l="__l" bindupdateValueFrontModel="{{p}}" bindupdateValueBackModel="{{q}}" u-p="{{r}}"/><hs-upload wx:if="{{s}}" u-i="d19a6168-9" bind:__l="__l" bindupdateValueModel="{{t}}" u-p="{{v}}"/></view><view wx:if="{{w}}" class="form_card"><hs-cell wx:if="{{z}}" u-s="{{['d']}}" u-i="d19a6168-10" bind:__l="__l" u-p="{{z}}"><switch color="#FFCC33" checked="{{x}}" style="transform:scale(0.7)" bindchange="{{y}}"/></hs-cell><hs-date-picker wx:if="{{A}}" u-i="d19a6168-11" bind:__l="__l" bindupdateValueModel="{{B}}" u-p="{{C}}"/></view><hs-footer wx:if="{{E}}" bindhandleParmaryClick="{{D}}" u-i="d19a6168-12" bind:__l="__l" u-p="{{E}}"/></view>
|
||||
23
dist/dev/mp-weixin/INDEX/binding/method.js
vendored
23
dist/dev/mp-weixin/INDEX/binding/method.js
vendored
@ -1,12 +1,29 @@
|
||||
"use strict";
|
||||
require("../../common/vendor.js");
|
||||
const INDEX_binding_model = require("./model.js");
|
||||
const common_libraries_apiLoading = require("../../common/libraries/apiLoading.js");
|
||||
const gen_Apis = require("../../gen/Apis.js");
|
||||
const common_libraries_naviHelper = require("../../common/libraries/naviHelper.js");
|
||||
const method = {
|
||||
handleSelectProject: (e) => {
|
||||
INDEX_binding_model.model.formData.value.asset_project_id = e == null ? void 0 : e.id;
|
||||
var _a;
|
||||
if (e[3]) {
|
||||
INDEX_binding_model.model.formData.value.asset_houses_id = (_a = e[3]) == null ? void 0 : _a.id;
|
||||
}
|
||||
console.log(e, "e");
|
||||
},
|
||||
handleSelectHouse: (e) => {
|
||||
INDEX_binding_model.model.formData.value.asset_houses_id = e == null ? void 0 : e.id;
|
||||
handleIsLiveIn(e) {
|
||||
var _a;
|
||||
INDEX_binding_model.model.formData.value.is_live_in = (_a = e == null ? void 0 : e.detail) == null ? void 0 : _a.value;
|
||||
console.log(e, "e");
|
||||
},
|
||||
handleSubmit: (e) => {
|
||||
var _a;
|
||||
console.log((_a = INDEX_binding_model.model) == null ? void 0 : _a.formData.value, "formData");
|
||||
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Archive.HouseRegisters.Store, { ...INDEX_binding_model.model.formData.value, customer_info: [INDEX_binding_model.model.formData.value] }).then((res) => {
|
||||
common_libraries_naviHelper.showToastBack("提交成功!", 1, true);
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
};
|
||||
exports.method = method;
|
||||
|
||||
5
dist/dev/mp-weixin/INDEX/binding/model.js
vendored
5
dist/dev/mp-weixin/INDEX/binding/model.js
vendored
@ -14,7 +14,10 @@ const model = {
|
||||
customer_type: "",
|
||||
house_status: "",
|
||||
usage_plan: "",
|
||||
ownership_info: []
|
||||
ownership_info: [],
|
||||
id_card: "",
|
||||
move_in_date: "",
|
||||
is_live_in: true
|
||||
})
|
||||
};
|
||||
exports.model = model;
|
||||
|
||||
@ -3,4 +3,19 @@ const common_vendor = require("../vendor.js");
|
||||
function goto(url) {
|
||||
common_vendor.index.navigateTo({ url, fail: () => common_vendor.index.switchTab({ url }) });
|
||||
}
|
||||
function showToastBack(label, delta = 1, back = true) {
|
||||
common_vendor.index.showToast({
|
||||
title: label || "提交成功!",
|
||||
duration: 1e3,
|
||||
icon: "none",
|
||||
success() {
|
||||
if (back) {
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack({ delta });
|
||||
}, 1e3);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.goto = goto;
|
||||
exports.showToastBack = showToastBack;
|
||||
|
||||
@ -35,7 +35,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
const pickerListProject = common_vendor.ref([]);
|
||||
const pickerListBuilding = common_vendor.ref([]);
|
||||
const pickerListUnit = common_vendor.ref([]);
|
||||
common_vendor.ref([]);
|
||||
const pickerListHouse = common_vendor.ref([]);
|
||||
const showProjectName = common_vendor.ref("");
|
||||
const popupShow = common_vendor.ref(false);
|
||||
const currentValue = common_vendor.ref(0);
|
||||
const itemsList = common_vendor.ref([{ name: "小区" }]);
|
||||
@ -63,6 +64,23 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
currentValue.value = e == null ? void 0 : e.index;
|
||||
console.log(e, "eee");
|
||||
};
|
||||
common_vendor.watch(() => currentValue.value, (e) => {
|
||||
handleTransfer(e);
|
||||
});
|
||||
const handleTransfer = (idx) => {
|
||||
if (idx === 0) {
|
||||
getPickerList();
|
||||
}
|
||||
if (idx === 1) {
|
||||
handleGetBuilding(selectValueEd.value[0]);
|
||||
}
|
||||
if (idx === 2) {
|
||||
handleGetUnit(selectValueEd.value[1]);
|
||||
}
|
||||
if (idx === 3) {
|
||||
handleGetHouse(selectValueEd.value[2]);
|
||||
}
|
||||
};
|
||||
const getPickerList = () => {
|
||||
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Asset.AssetHouses.SelectProject, { name: searchValue.value, ...formData.value }).then((res) => {
|
||||
pickerListProject.value = res == null ? void 0 : res.data;
|
||||
@ -74,7 +92,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
currentValue.value = 1;
|
||||
itemsList.value = [{ name: "小区" }, { name: "楼栋" }];
|
||||
selectValueEd.value[0] = i;
|
||||
handleGetBuilding(i);
|
||||
};
|
||||
const handleGetBuilding = (data) => {
|
||||
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Asset.AssetHouses.SelectBuilding, { asset_projects_id: data == null ? void 0 : data.id, name: searchValue.value, ...formData.value }).then((res) => {
|
||||
@ -87,7 +104,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
currentValue.value = 2;
|
||||
itemsList.value = [{ name: "小区" }, { name: "楼栋" }, { name: "单元" }];
|
||||
selectValueEd.value[1] = i;
|
||||
handleGetUnit(i);
|
||||
};
|
||||
const handleGetUnit = (data) => {
|
||||
var _a;
|
||||
@ -102,8 +118,22 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
itemsList.value = [{ name: "小区" }, { name: "楼栋" }, { name: "单元" }, { name: "房屋" }];
|
||||
selectValueEd.value[2] = i;
|
||||
};
|
||||
const handleGetHouse = (data) => {
|
||||
var _a, _b;
|
||||
common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Asset.AssetHouses.SelectHouse, { asset_projects_id: (_a = selectValueEd.value[0]) == null ? void 0 : _a.id, asset_buildings_id: (_b = selectValueEd.value[1]) == null ? void 0 : _b.id, asset_units_id: data == null ? void 0 : data.id, name: searchValue.value, ...formData.value }).then((res) => {
|
||||
pickerListHouse.value = res == null ? void 0 : res.data;
|
||||
pickerList.value = res == null ? void 0 : res.data;
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const onSelectHouse = (i) => {
|
||||
selectValueEd.value[3] = i;
|
||||
showProjectName.value = selectValueEd == null ? void 0 : selectValueEd.value.map((res) => res == null ? void 0 : res.name).join("");
|
||||
emit("change", selectValueEd.value);
|
||||
onPopupShow();
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
var _a, _b, _c;
|
||||
var _a, _b;
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o(onPopupShow),
|
||||
b: common_vendor.p({
|
||||
@ -112,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
isPlaceholder: true,
|
||||
required: true,
|
||||
borderTop: true,
|
||||
value: (_a = selectEd.value) == null ? void 0 : _a.name
|
||||
value: showProjectName.value
|
||||
}),
|
||||
c: common_vendor.o([
|
||||
($event) => searchValue.value = $event.detail.value,
|
||||
@ -132,8 +162,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
current: currentValue.value || 0
|
||||
})
|
||||
} : {}, {
|
||||
i: !((_b = pickerList.value) == null ? void 0 : _b.length)
|
||||
}, !((_c = pickerList.value) == null ? void 0 : _c.length) ? {} : {}, {
|
||||
i: !((_a = pickerList.value) == null ? void 0 : _a.length)
|
||||
}, !((_b = pickerList.value) == null ? void 0 : _b.length) ? {} : {}, {
|
||||
j: currentValue.value === 0
|
||||
}, currentValue.value === 0 ? {
|
||||
k: common_vendor.f(pickerListProject.value, (i, index, i0) => {
|
||||
@ -194,8 +224,28 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
p: common_vendor.o(onPopupShow),
|
||||
q: common_vendor.p({
|
||||
p: currentValue.value === 3
|
||||
}, currentValue.value === 3 ? {
|
||||
q: common_vendor.f(pickerListHouse.value, (i, index, i0) => {
|
||||
var _a2, _b2;
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(i == null ? void 0 : i.name),
|
||||
b: ((_a2 = selectEd.value) == null ? void 0 : _a2.id) === (i == null ? void 0 : i.id)
|
||||
}, ((_b2 = selectEd.value) == null ? void 0 : _b2.id) === (i == null ? void 0 : i.id) ? {
|
||||
c: "7ecd4980-7-" + i0 + ",7ecd4980-1",
|
||||
d: common_vendor.p({
|
||||
type: "checkmarkempty",
|
||||
size: "20",
|
||||
color: "#FBA60D"
|
||||
})
|
||||
} : {}, {
|
||||
e: `key_${index}`,
|
||||
f: common_vendor.o(($event) => onSelectHouse(i), `key_${index}`)
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
r: common_vendor.o(onPopupShow),
|
||||
s: common_vendor.p({
|
||||
show: popupShow.value,
|
||||
mode: "bottom",
|
||||
closeable: true,
|
||||
|
||||
@ -1 +1 @@
|
||||
<view class="data-v-7ecd4980"><hs-cell wx:if="{{b}}" class="data-v-7ecd4980" bindclick="{{a}}" u-i="7ecd4980-0" bind:__l="__l" u-p="{{b}}"/><hs-popup wx:if="{{q}}" class="data-v-7ecd4980" u-s="{{['d']}}" bindclose="{{p}}" u-i="7ecd4980-1" bind:__l="__l" u-p="{{q}}"><view class="popup_merchant_select_body data-v-7ecd4980"><view class="popup_merchant_select_title data-v-7ecd4980"> 选择小区 </view><view class="popup_search_input data-v-7ecd4980"><input class="data-v-7ecd4980" placeholder="请输入关键词" confirm-type="search" bindinput="{{c}}" bindconfirm="{{d}}" placeholder-style="font-size:27rpx;color:#ccc;" value="{{e}}"/></view><view wx:if="{{f}}" class="popup_tabs data-v-7ecd4980"><up-tabs wx:if="{{h}}" class="data-v-7ecd4980" bindclick="{{g}}" u-i="7ecd4980-2,7ecd4980-1" bind:__l="__l" u-p="{{h}}"/></view><scroll-view scroll-y="true" class="scroll-Y data-v-7ecd4980"><view class="popup_merchant_body data-v-7ecd4980"><hs-empty wx:if="{{i}}" class="data-v-7ecd4980" u-i="7ecd4980-3,7ecd4980-1" bind:__l="__l"/><block wx:if="{{j}}"><view wx:for="{{k}}" wx:for-item="i" wx:key="e" class="merchant_item data-v-7ecd4980" bindtap="{{i.f}}"><view class="data-v-7ecd4980">{{i.a}}</view><uni-icons wx:if="{{i.b}}" class="data-v-7ecd4980" u-i="{{i.c}}" bind:__l="__l" u-p="{{i.d}}"></uni-icons></view></block><block wx:if="{{l}}"><view wx:for="{{m}}" wx:for-item="i" wx:key="e" class="merchant_item data-v-7ecd4980" bindtap="{{i.f}}"><view class="data-v-7ecd4980">{{i.a}}</view><uni-icons wx:if="{{i.b}}" class="data-v-7ecd4980" u-i="{{i.c}}" bind:__l="__l" u-p="{{i.d}}"></uni-icons></view></block><block wx:if="{{n}}"><view wx:for="{{o}}" wx:for-item="i" wx:key="e" class="merchant_item data-v-7ecd4980" bindtap="{{i.f}}"><view class="data-v-7ecd4980">{{i.a}}</view><uni-icons wx:if="{{i.b}}" class="data-v-7ecd4980" u-i="{{i.c}}" bind:__l="__l" u-p="{{i.d}}"></uni-icons></view></block></view></scroll-view></view></hs-popup></view>
|
||||
<view class="data-v-7ecd4980"><hs-cell wx:if="{{b}}" class="data-v-7ecd4980" bindclick="{{a}}" u-i="7ecd4980-0" bind:__l="__l" u-p="{{b}}"/><hs-popup wx:if="{{s}}" class="data-v-7ecd4980" u-s="{{['d']}}" bindclose="{{r}}" u-i="7ecd4980-1" bind:__l="__l" u-p="{{s}}"><view class="popup_merchant_select_body data-v-7ecd4980"><view class="popup_merchant_select_title data-v-7ecd4980"> 选择小区 </view><view class="popup_search_input data-v-7ecd4980"><input class="data-v-7ecd4980" placeholder="请输入关键词" confirm-type="search" bindinput="{{c}}" bindconfirm="{{d}}" placeholder-style="font-size:27rpx;color:#ccc;" value="{{e}}"/></view><view wx:if="{{f}}" class="popup_tabs data-v-7ecd4980"><up-tabs wx:if="{{h}}" class="data-v-7ecd4980" bindclick="{{g}}" u-i="7ecd4980-2,7ecd4980-1" bind:__l="__l" u-p="{{h}}"/></view><scroll-view scroll-y="true" class="scroll-Y data-v-7ecd4980"><view class="popup_merchant_body data-v-7ecd4980"><hs-empty wx:if="{{i}}" class="data-v-7ecd4980" u-i="7ecd4980-3,7ecd4980-1" bind:__l="__l"/><block wx:if="{{j}}"><view wx:for="{{k}}" wx:for-item="i" wx:key="e" class="merchant_item data-v-7ecd4980" bindtap="{{i.f}}"><view class="data-v-7ecd4980">{{i.a}}</view><uni-icons wx:if="{{i.b}}" class="data-v-7ecd4980" u-i="{{i.c}}" bind:__l="__l" u-p="{{i.d}}"></uni-icons></view></block><block wx:if="{{l}}"><view wx:for="{{m}}" wx:for-item="i" wx:key="e" class="merchant_item data-v-7ecd4980" bindtap="{{i.f}}"><view class="data-v-7ecd4980">{{i.a}}</view><uni-icons wx:if="{{i.b}}" class="data-v-7ecd4980" u-i="{{i.c}}" bind:__l="__l" u-p="{{i.d}}"></uni-icons></view></block><block wx:if="{{n}}"><view wx:for="{{o}}" wx:for-item="i" wx:key="e" class="merchant_item data-v-7ecd4980" bindtap="{{i.f}}"><view class="data-v-7ecd4980">{{i.a}}</view><uni-icons wx:if="{{i.b}}" class="data-v-7ecd4980" u-i="{{i.c}}" bind:__l="__l" u-p="{{i.d}}"></uni-icons></view></block><block wx:if="{{p}}"><view wx:for="{{q}}" wx:for-item="i" wx:key="e" class="merchant_item data-v-7ecd4980" bindtap="{{i.f}}"><view class="data-v-7ecd4980">{{i.a}}</view><uni-icons wx:if="{{i.b}}" class="data-v-7ecd4980" u-i="{{i.c}}" bind:__l="__l" u-p="{{i.d}}"></uni-icons></view></block></view></scroll-view></view></hs-popup></view>
|
||||
@ -1,5 +1,5 @@
|
||||
.cell_content.data-v-565e829c {
|
||||
padding: 10rpx 0;
|
||||
padding: 16rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
10
dist/dev/mp-weixin/gen/Apis.js
vendored
10
dist/dev/mp-weixin/gen/Apis.js
vendored
@ -71,6 +71,16 @@ const Apis = {
|
||||
}
|
||||
}
|
||||
},
|
||||
Grid: {
|
||||
Grids: {
|
||||
GetHousekeeper(data) {
|
||||
return common_libraries_request.request("customer/grid/grids/get_housekeeper", { data });
|
||||
},
|
||||
Show(data) {
|
||||
return common_libraries_request.request("customer/grid/grids/show", { data });
|
||||
}
|
||||
}
|
||||
},
|
||||
HouseOrder: {
|
||||
HouseOrders: {
|
||||
List(data) {
|
||||
|
||||
8
dist/dev/mp-weixin/gen/Enums.js
vendored
8
dist/dev/mp-weixin/gen/Enums.js
vendored
@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
const HouseOccupantsHouseRelationEnum = {
|
||||
const HouseRegistersIdentityTypeEnum = {
|
||||
"Owner": { "text": "产权人", "color": "#2db7f5", "value": "Owner" },
|
||||
"Resident": { "text": "住户", "color": "#87d068", "value": "Resident" },
|
||||
"Tenant": { "text": "租客", "color": "#fa8c16", "value": "Tenant" }
|
||||
"Tenant": { "text": "租客", "color": "#87d068", "value": "Tenant" },
|
||||
"CoResident": { "text": "同住人(亲属)", "color": "#108ee9", "value": "CoResident" }
|
||||
};
|
||||
exports.HouseOccupantsHouseRelationEnum = HouseOccupantsHouseRelationEnum;
|
||||
exports.HouseRegistersIdentityTypeEnum = HouseRegistersIdentityTypeEnum;
|
||||
|
||||
@ -3,34 +3,37 @@
|
||||
<view class="form_card">
|
||||
<hs-popup-project title="选择小区" @change="method?.handleSelectProject" />
|
||||
<!-- <hs_popup_house title="楼栋房号" :formData="model?.formData?.value" @change="method?.handleSelectHouse" /> -->
|
||||
<hs-radio-cell-picker :Enums="HouseOccupantsHouseRelationEnum" title="请选择您的身份" v-model:valueModel="model.formData.value.type" required borderTop />
|
||||
<hs-radio-cell-picker :Enums="HouseRegistersIdentityTypeEnum" title="请选择您的身份" v-model:valueModel="model.formData.value.type" required borderTop />
|
||||
|
||||
<template v-if="model.formData.value.type">
|
||||
<hs-cell title="真实姓名" required borderTop>
|
||||
<hs-input v-model="model.formData.value.name" textAlign="right" />
|
||||
<hs-input v-model:valueModel="model.formData.value.name" textAlign="right" />
|
||||
</hs-cell>
|
||||
<hs-cell title="手机号" required borderTop>
|
||||
<hs-input v-model="model.formData.value.phone" textAlign="right" />
|
||||
<hs-input v-model:valueModel="model.formData.value.phone" maxLength="11" textAlign="right" />
|
||||
</hs-cell>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<view class="form_card">
|
||||
<view class="form_card" v-if="model.formData.value.type">
|
||||
<hs-cell title="身份证号" required>
|
||||
<hs-input v-model="model.formData.value.name" textAlign="right" />
|
||||
<hs-input v-model:valueModel="model.formData.value.id_card" textAlign="right" />
|
||||
</hs-cell>
|
||||
<hs-upload-id-card required borderTop v-model:valueFrontModel="model.formData.value.card_front_image" v-model:valueBackModel="model.formData.value.card_back_image" />
|
||||
<hs-upload title="上传房产证" :count="10" :size="4" required v-model:valueModel="model.formData.value.ownership_info" />
|
||||
<hs-upload v-if="model.formData.value.type === 'Owner'" title="上传房产证" :count="10" :size="4" required v-model:valueModel="model.formData.value.ownership_info" />
|
||||
</view>
|
||||
|
||||
<view class="form_card">
|
||||
<view class="form_card" v-if="model.formData.value.type">
|
||||
<hs-cell title="是否入住该房屋" required >
|
||||
<switch color="#FFCC33" style="transform:scale(0.7)" />
|
||||
<switch color="#FFCC33" :checked="model.formData.value.is_live_in" style="transform:scale(0.7)" @change="method?.handleIsLiveIn" />
|
||||
</hs-cell>
|
||||
<hs-date-picker title="入住时间" borderTop isLink />
|
||||
<hs-date-picker v-if="model.formData.value.is_live_in" title="入住时间" v-model:valueModel="model.formData.value.move_in_date" borderTop isLink />
|
||||
</view>
|
||||
<hs-footer btnParimaryName="绑定房屋" />
|
||||
<hs-footer btnParimaryName="绑定房屋" @handleParmaryClick="method?.handleSubmit" />
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { HouseOccupantsHouseRelationEnum } from "@/gen/Enums"
|
||||
import { HouseRegistersIdentityTypeEnum } from "@/gen/Enums"
|
||||
import method from "./method";
|
||||
import model from "./model";
|
||||
</script>
|
||||
|
||||
@ -1,10 +1,24 @@
|
||||
import { ref } from "vue";
|
||||
import model from "./model";
|
||||
import { getApiLoading } from "@/common/libraries/apiLoading";
|
||||
import { Apis } from "@/gen/Apis";
|
||||
import { showToastBack } from "@/common/libraries/naviHelper";
|
||||
export default {
|
||||
handleSelectProject: (e:any) => {
|
||||
model.formData.value.asset_project_id = e?.id
|
||||
if(e[3]){
|
||||
model.formData.value.asset_houses_id = e[3]?.id
|
||||
}
|
||||
console.log(e,'e')
|
||||
},
|
||||
handleSelectHouse: (e:any) => {
|
||||
model.formData.value.asset_houses_id = e?.id
|
||||
handleIsLiveIn(e){
|
||||
model.formData.value.is_live_in = e?.detail?.value
|
||||
console.log(e,'e')
|
||||
},
|
||||
handleSubmit: (e:any) => {
|
||||
console.log(model?.formData.value,'formData')
|
||||
getApiLoading(Apis.Archive.HouseRegisters.Store, {...model.formData.value,customer_info:[model.formData.value]}).then(res => {
|
||||
showToastBack('提交成功!',1,true)
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -13,6 +13,9 @@ export default {
|
||||
customer_type:"",
|
||||
house_status:"",
|
||||
usage_plan:"",
|
||||
ownership_info:[]
|
||||
ownership_info:[],
|
||||
id_card:'',
|
||||
move_in_date:'',
|
||||
is_live_in:true
|
||||
}),
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<hs-cell :title="props?.title" isLink @click="onPopupShow" isPlaceholder required borderTop :value="selectEd?.name" />
|
||||
<hs-cell :title="props?.title" isLink @click="onPopupShow" isPlaceholder required borderTop :value="showProjectName" />
|
||||
<hs-popup :show="popupShow" @close="onPopupShow" mode="bottom" closeable :round="20">
|
||||
<view class="popup_merchant_select_body">
|
||||
<view class="popup_merchant_select_title"> 选择小区 </view>
|
||||
@ -62,7 +62,22 @@
|
||||
></uni-icons>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template v-if="currentValue === 3">
|
||||
<view
|
||||
v-for="(i, index) in pickerListHouse"
|
||||
class="merchant_item"
|
||||
:key="`key_${index}`"
|
||||
@click="onSelectHouse(i)"
|
||||
>
|
||||
<view>{{ i?.name }}</view>
|
||||
<uni-icons
|
||||
type="checkmarkempty"
|
||||
size="20"
|
||||
v-if="selectEd?.id === i?.id"
|
||||
color="#FBA60D"
|
||||
></uni-icons>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@ -70,7 +85,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue'
|
||||
import { reactive, ref, watch } from 'vue'
|
||||
import { getApiLoading } from '@/common/libraries/apiLoading'
|
||||
import { Apis } from '@/gen/Apis'
|
||||
import { debounce } from '@/common/libraries/tools';
|
||||
@ -85,11 +100,10 @@ const pickerListProject = ref<any>([])
|
||||
const pickerListBuilding = ref<any>([])
|
||||
const pickerListUnit = ref<any>([])
|
||||
const pickerListHouse = ref<any>([])
|
||||
|
||||
const showProjectName = ref('')
|
||||
const popupShow = ref(false)
|
||||
const currentValue = ref(0)
|
||||
const itemsList = ref([{name:"小区"}])
|
||||
|
||||
const selectValueEd = ref<any>([])
|
||||
|
||||
const handleSearch = debounce((e: any) => {
|
||||
@ -120,6 +134,28 @@ const handleSearch = debounce((e: any) => {
|
||||
console.log(e,'eee')
|
||||
}
|
||||
|
||||
watch(() => currentValue.value,(e) =>{
|
||||
handleTransfer(e)
|
||||
})
|
||||
|
||||
const handleTransfer = (idx:number) =>{
|
||||
if(idx === 0){
|
||||
getPickerList()
|
||||
}
|
||||
if(idx === 1){
|
||||
handleGetBuilding(selectValueEd.value[0])
|
||||
}
|
||||
if(idx === 2){
|
||||
handleGetUnit(selectValueEd.value[1])
|
||||
}
|
||||
if(idx === 3){
|
||||
handleGetHouse(selectValueEd.value[2])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const getPickerList = () => {
|
||||
getApiLoading(Apis.Asset.AssetHouses.SelectProject, {name: searchValue.value,...formData.value}).then(res => {
|
||||
pickerListProject.value = res?.data
|
||||
@ -134,7 +170,6 @@ const handleSearch = debounce((e: any) => {
|
||||
currentValue.value = 1
|
||||
itemsList.value = [{name:'小区'},{name:'楼栋'}]
|
||||
selectValueEd.value[0] = i
|
||||
handleGetBuilding(i)
|
||||
// selectEd.value = i
|
||||
// emit('change', i)
|
||||
// onPopupShow()
|
||||
@ -153,11 +188,10 @@ const handleSearch = debounce((e: any) => {
|
||||
currentValue.value = 2
|
||||
itemsList.value = [{name:'小区'},{name:'楼栋'},{name:'单元'}]
|
||||
selectValueEd.value[1] = i
|
||||
handleGetUnit(i)
|
||||
}
|
||||
|
||||
const handleGetUnit = (data:any) =>{
|
||||
//过去单元
|
||||
//获取单元
|
||||
getApiLoading(Apis.Asset.AssetHouses.SelectUnit, {asset_projects_id:selectValueEd.value[0]?.id,asset_buildings_id:data?.id,name: searchValue.value,...formData.value}).then(res => {
|
||||
pickerListUnit.value = res?.data
|
||||
pickerList.value = res?.data
|
||||
@ -170,6 +204,22 @@ const handleSearch = debounce((e: any) => {
|
||||
itemsList.value = [{name:'小区'},{name:'楼栋'},{name:'单元'},{name:'房屋'}]
|
||||
selectValueEd.value[2] = i
|
||||
}
|
||||
|
||||
const handleGetHouse = (data:any) =>{
|
||||
//获取房屋
|
||||
getApiLoading(Apis.Asset.AssetHouses.SelectHouse, {asset_projects_id:selectValueEd.value[0]?.id,asset_buildings_id:selectValueEd.value[1]?.id,asset_units_id:data?.id,name: searchValue.value,...formData.value}).then(res => {
|
||||
pickerListHouse.value = res?.data
|
||||
pickerList.value = res?.data
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
|
||||
const onSelectHouse = (i: { name: string; id: number }) =>{
|
||||
selectValueEd.value[3] = i
|
||||
showProjectName.value = selectValueEd?.value.map((res:any) => res?.name).join('')
|
||||
emit('change', selectValueEd.value)
|
||||
onPopupShow()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -74,7 +74,7 @@ onMounted(() => {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.cell_content{
|
||||
padding: 10rpx 0;
|
||||
padding: 16rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
12
src/gen/ApiTypes.d.ts
vendored
12
src/gen/ApiTypes.d.ts
vendored
@ -18,7 +18,7 @@ declare namespace ApiTypes {
|
||||
};
|
||||
type Store = {
|
||||
"asset_houses_id": number; // 房屋ID
|
||||
"type": string; // 类型,[enum:HouseRegistersTypeEnum]
|
||||
"type": string; // 类型,[HouseRegistersIdentityTypeEnum] [enum:HouseRegistersTypeEnum]
|
||||
"house_status"?: string; // 房屋状态,[enum:HouseRegistersHouseStatusEnum]
|
||||
"usage_plan"?: string; // 使用计划,[enum:HouseRegistersUsagePlanEnum]
|
||||
"customer_type"?: string; // 客户类型,[enum:HouseRegistersCustomerTypeEnum]
|
||||
@ -91,6 +91,16 @@ declare namespace ApiTypes {
|
||||
};
|
||||
}
|
||||
}
|
||||
namespace Grid {
|
||||
namespace Grids {
|
||||
type GetHousekeeper = {
|
||||
"asset_units_id": number; // 资产单元id
|
||||
};
|
||||
type Show = {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
}
|
||||
namespace HouseOrder {
|
||||
namespace HouseOrders {
|
||||
type List = {
|
||||
|
||||
@ -70,6 +70,16 @@ export const Apis = {
|
||||
},
|
||||
},
|
||||
},
|
||||
Grid: {
|
||||
Grids: {
|
||||
GetHousekeeper(data: ApiTypes.Grid.Grids.GetHousekeeper): Promise<MyResponseType> {
|
||||
return request('customer/grid/grids/get_housekeeper', { data });
|
||||
},
|
||||
Show(data: ApiTypes.Grid.Grids.Show): Promise<MyResponseType> {
|
||||
return request('customer/grid/grids/show', { data });
|
||||
},
|
||||
},
|
||||
},
|
||||
HouseOrder: {
|
||||
HouseOrders: {
|
||||
List(data: ApiTypes.HouseOrder.HouseOrders.List): Promise<MyResponseType> {
|
||||
|
||||
@ -96,7 +96,7 @@ export const AssetUnitsBuildingTypeEnum = {
|
||||
|
||||
// 缓存类型
|
||||
export const CacheTypeEnum = {
|
||||
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#c6f0a7","value":"MobilePhoneVerificationCode"},
|
||||
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#10f419","value":"MobilePhoneVerificationCode"},
|
||||
};
|
||||
|
||||
// CompaniesMerchantTypeEnum
|
||||
@ -223,6 +223,13 @@ export const HouseRegistersHouseStatusEnum = {
|
||||
'Vacant': {"text":"空置","color":"#dc3545","value":"Vacant"},
|
||||
};
|
||||
|
||||
// 房屋登记身份类型
|
||||
export const HouseRegistersIdentityTypeEnum = {
|
||||
'Owner': {"text":"产权人","color":"#2db7f5","value":"Owner"},
|
||||
'Tenant': {"text":"租客","color":"#87d068","value":"Tenant"},
|
||||
'CoResident': {"text":"同住人(亲属)","color":"#108ee9","value":"CoResident"},
|
||||
};
|
||||
|
||||
// HouseRegistersStatusEnum
|
||||
export const HouseRegistersStatusEnum = {
|
||||
'Pending': {"text":"待审","color":"#faad14","value":"Pending"},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user