develop #1

Merged
zsq merged 10 commits from develop into main 2026-01-30 10:01:26 +08:00
6 changed files with 63 additions and 7 deletions
Showing only changes of commit a746c00481 - Show all commits

View File

@ -120,7 +120,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
}, 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: "入住时间",
title: "入住日期",
borderTop: true,
isLink: true,
valueModel: common_vendor.unref(INDEX_binding_model.model).formData.value.move_in_date

View File

@ -9,6 +9,8 @@ const method = {
var _a;
if (e[3]) {
INDEX_binding_model.model.formData.value.asset_houses_id = (_a = e[3]) == null ? void 0 : _a.id;
} else {
INDEX_binding_model.model.formData.value.asset_houses_id = "";
}
console.log(e, "e");
},
@ -18,8 +20,26 @@ const method = {
console.log(e, "e");
},
handleSubmit: (e) => {
var _a;
console.log((_a = INDEX_binding_model.model) == null ? void 0 : _a.formData.value, "formData");
var _a, _b, _c, _d, _e, _f;
if (!INDEX_binding_model.model.formData.value.asset_houses_id) {
return common_libraries_naviHelper.showToast("请先选择小区!");
}
if (!INDEX_binding_model.model.formData.value.type) {
return common_libraries_naviHelper.showToast("请先选择身份!");
}
if (!INDEX_binding_model.model.formData.value.name || !INDEX_binding_model.model.formData.value.phone) {
return common_libraries_naviHelper.showToast("请先设置姓名和手机号!");
}
if (!((_a = INDEX_binding_model.model.formData.value.card_front_image) == null ? void 0 : _a.length) || !((_b = INDEX_binding_model.model.formData.value.card_back_image) == null ? void 0 : _b.length)) {
return common_libraries_naviHelper.showToast("请先上传身份证正反面!");
}
if (INDEX_binding_model.model.formData.value.type === "Owner" && !((_d = (_c = INDEX_binding_model.model.formData.value) == null ? void 0 : _c.ownership_info) == null ? void 0 : _d.length)) {
return common_libraries_naviHelper.showToast("请先上传房产证!");
}
if (INDEX_binding_model.model.formData.value.is_live_in && !((_e = INDEX_binding_model.model.formData.value) == null ? void 0 : _e.move_in_date)) {
return common_libraries_naviHelper.showToast("请选择入住日期!");
}
console.log((_f = INDEX_binding_model.model) == null ? void 0 : _f.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);

View File

@ -17,5 +17,13 @@ function showToastBack(label, delta = 1, back = true) {
}
});
}
function showToast(label) {
common_vendor.index.showToast({
title: label || "提交成功!",
duration: 1e3,
icon: "none"
});
}
exports.goto = goto;
exports.showToast = showToast;
exports.showToastBack = showToastBack;

View File

@ -24,10 +24,10 @@
</view>
<view class="form_card" v-if="model.formData.value.type">
<hs-cell title="是否入住该房屋" required >
<hs-cell title="是否入住该房屋" required>
<switch color="#FFCC33" :checked="model.formData.value.is_live_in" style="transform:scale(0.7)" @change="method?.handleIsLiveIn" />
</hs-cell>
<hs-date-picker v-if="model.formData.value.is_live_in" title="入住时间" v-model:valueModel="model.formData.value.move_in_date" 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="绑定房屋" @handleParmaryClick="method?.handleSubmit" />
</view>

View File

@ -2,19 +2,39 @@ 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";
import { showToastBack,showToast } from "@/common/libraries/naviHelper";
export default {
handleSelectProject: (e:any) => {
if(e[3]){
model.formData.value.asset_houses_id = e[3]?.id
} else {
model.formData.value.asset_houses_id = ''
}
console.log(e,'e')
},
handleIsLiveIn(e){
handleIsLiveIn(e:any){
model.formData.value.is_live_in = e?.detail?.value
console.log(e,'e')
},
handleSubmit: (e:any) => {
if(!model.formData.value.asset_houses_id){
return showToast('请先选择小区!')
}
if(!model.formData.value.type){
return showToast('请先选择身份!')
}
if(!model.formData.value.name || !model.formData.value.phone){
return showToast('请先设置姓名和手机号!')
}
if(!model.formData.value.card_front_image?.length || !model.formData.value.card_back_image?.length){
return showToast('请先上传身份证正反面!')
}
if(model.formData.value.type === 'Owner' && !model.formData.value?.ownership_info?.length){
return showToast('请先上传房产证!')
}
if(model.formData.value.is_live_in && !model.formData.value?.move_in_date){
return showToast('请选择入住日期!')
}
console.log(model?.formData.value,'formData')
getApiLoading(Apis.Archive.HouseRegisters.Store, {...model.formData.value,customer_info:[model.formData.value]}).then(res => {
showToastBack('提交成功!',1,true)

View File

@ -16,3 +16,11 @@ export function showToastBack(label?: string, delta = 1, back = true) {
}
})
}
export function showToast(label?: string) {
uni.showToast({
title: label || '提交成功!',
duration: 1000,
icon: 'none',
})
}