物业催缴优化(home)
This commit is contained in:
parent
32a2258ac8
commit
c09bd2ed61
|
|
@ -169,16 +169,16 @@
|
|||
<text class="li-text-30 li-text-#ff4d4f">¥{{bill.amount}}</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-center li-mt-15">
|
||||
<text class="li-text-26 li-text-#999">账单期间:</text>
|
||||
<text class="li-text-26 li-text-#666">{{bill.period}}</text>
|
||||
<text class="li-text-26 li-text-#999">创建时间:</text>
|
||||
<text class="li-text-26 li-text-#666">{{bill.overdueTime}}</text>
|
||||
</view>
|
||||
<view class="li-flex li-items-center li-mt-10">
|
||||
<text class="li-text-26 li-text-#999">逾期时间:</text>
|
||||
<text class="li-text-26 li-text-#666">{{bill.overdueTime}}</text>
|
||||
<text class="li-text-26 li-text-#999">缴费时间段:</text>
|
||||
<text class="li-text-26 li-text-#666">{{bill.period}}</text>
|
||||
</view>
|
||||
<view class="li-flex li-justify-between li-items-center li-flex-row-reverse li-mt-20">
|
||||
<wd-button size="small" type="primary"
|
||||
@click="callOwner(selectedHouse)">电话催缴</wd-button>
|
||||
@click="prepareCaller(selectedHouse)">电话催缴</wd-button>
|
||||
<!-- <wd-button size="small" type="primary"
|
||||
@click="sendReminder(selectedHouse)">发送通知</wd-button> -->
|
||||
</view>
|
||||
|
|
@ -194,6 +194,11 @@
|
|||
</wd-popup>
|
||||
<community-selector :communities="formattedCommunityList" v-model="selectedCommunity"
|
||||
v-model:visible="showCommunityPicker" @confirm="handleCommunityConfirm" />
|
||||
|
||||
<!-- 电话催缴动作面板 -->
|
||||
<wd-action-sheet v-model="showPhoneActionSheet" :actions="phoneActions" title="选择拨打业主电话" cancel-text="取消"
|
||||
@select="handlePhoneSelect" :close-on-click-action="true" :close-on-click-modal="true"
|
||||
custom-style="border-radius: 16px; max-height: 70vh;" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -309,7 +314,7 @@
|
|||
}
|
||||
|
||||
floorGroups[floor].houses.push({
|
||||
id: house.house_id,
|
||||
id: String(house.house_id), // 使用字符串ID
|
||||
number: house.house_name,
|
||||
unpaid: (house.estate || []).length + (house.meter || []).length,
|
||||
owner: house.owner && house.owner.length > 0 ? house.owner[0].owner_name : '未知',
|
||||
|
|
@ -412,42 +417,94 @@
|
|||
id: '',
|
||||
number: '',
|
||||
unpaid: 0,
|
||||
owner: '',
|
||||
owner: [],
|
||||
phone: '',
|
||||
bills: []
|
||||
});
|
||||
|
||||
// 电话催缴动作面板
|
||||
const showPhoneActionSheet = ref(false);
|
||||
const phoneActions = ref([]);
|
||||
|
||||
// 显示房屋详情
|
||||
const showHouseDetailFunc = (house) => {
|
||||
selectedHouse.value = house;
|
||||
showHouseDetail.value = true;
|
||||
};
|
||||
|
||||
// 电话催缴
|
||||
const callOwner = (house) => {
|
||||
console.log(house);
|
||||
if (!house.phone) {
|
||||
Toast.fail('没有可用的联系电话');
|
||||
// 准备并显示电话催缴动作面板
|
||||
const prepareCaller = (house) => {
|
||||
// 显示加载状态
|
||||
uni.showLoading({
|
||||
title: '获取联系人...',
|
||||
mask: true
|
||||
});
|
||||
|
||||
// 找到原始房屋数据
|
||||
if (!activeBuilding.value || !activeUnitId.value) {
|
||||
uni.hideLoading();
|
||||
Toast.fail('无法获取房屋信息');
|
||||
return;
|
||||
}
|
||||
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: house.phone,
|
||||
success: () => {
|
||||
console.log('拨打电话成功');
|
||||
},
|
||||
fail: () => {
|
||||
Toast.fail('拨打电话失败');
|
||||
}
|
||||
});
|
||||
const region = village.value.regions?.find(r => String(r.region_id) === activeBuilding.value);
|
||||
if (!region) {
|
||||
uni.hideLoading();
|
||||
Toast.fail('未找到楼栋信息');
|
||||
return;
|
||||
}
|
||||
|
||||
const cell = region.cells?.find(c => String(c.cell_id) === activeUnitId.value);
|
||||
if (!cell) {
|
||||
uni.hideLoading();
|
||||
Toast.fail('未找到单元信息');
|
||||
return;
|
||||
}
|
||||
|
||||
// 找到对应的房屋
|
||||
const originalHouse = cell.houses.find(h => String(h.house_id) === String(house.id));
|
||||
if (!originalHouse || !originalHouse.owner) {
|
||||
uni.hideLoading();
|
||||
Toast.fail('未找到该房屋业主信息');
|
||||
return;
|
||||
}
|
||||
|
||||
// 生成业主电话列表
|
||||
if (originalHouse.owner.length === 0) {
|
||||
uni.hideLoading();
|
||||
Toast.fail('该房屋暂无业主联系方式');
|
||||
return;
|
||||
}
|
||||
|
||||
// 更新selectedHouse的owner字段
|
||||
selectedHouse.value.owner = originalHouse.owner;
|
||||
|
||||
// 生成动作列表
|
||||
phoneActions.value = originalHouse.owner.map(owner => ({
|
||||
name: `${owner.owner_name || '未知'}${owner.sex === 0 ? '(先生)' : owner.sex === 1 ? '(女士)' : ''}`,
|
||||
subname: owner.mobile || '无电话',
|
||||
disabled: !owner.mobile,
|
||||
color: !owner.mobile ? '#999999' : ''
|
||||
}));
|
||||
|
||||
// 隐藏加载状态
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
// 显示动作面板
|
||||
showPhoneActionSheet.value = true;
|
||||
}, 300);
|
||||
};
|
||||
|
||||
// 发送通知
|
||||
const sendReminder = (house) => {
|
||||
Toast.success('已发送催缴通知');
|
||||
setTimeout(() => {
|
||||
showHouseDetail.value = false;
|
||||
}, 1500);
|
||||
// 电话催缴 - 选择后执行
|
||||
const handlePhoneSelect = (item, index) => {
|
||||
const owner = item.item.subname;
|
||||
if (!owner) {
|
||||
Toast.error('无效的联系电话');
|
||||
return;
|
||||
}
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: owner,
|
||||
});
|
||||
};
|
||||
|
||||
// 刷新按钮点击处理
|
||||
|
|
|
|||
|
|
@ -1,75 +1,45 @@
|
|||
|
||||
.li-items-center{align-items:center}
|
||||
.items-center{align-items:center}
|
||||
.li-justify-center{justify-content:center}
|
||||
.justify-end{justify-content:end}
|
||||
.justify-center{justify-content:center}
|
||||
.li-justify-between{justify-content:space-between}
|
||||
.justify-between{justify-content:space-between}
|
||||
.li-bg-white{background-color:rgb(255,255,255)}
|
||||
.li-flex{display:flex}
|
||||
.li-flex-col{flex-direction:column}
|
||||
.li-h-130{height:130rpx}
|
||||
.li-h-160{height:160rpx}
|
||||
.li-h-58{height:58rpx}
|
||||
.li-justify-around{justify-content:space-around}
|
||||
.li-ml-22{margin-left:22rpx}
|
||||
.li-ml-25{margin-left:25rpx}
|
||||
.li-ml-35{margin-left:35rpx}
|
||||
.li-mt-10{margin-top:10rpx}
|
||||
.li-mt-12{margin-top:12rpx}
|
||||
.li-mt-14{margin-top:14rpx}
|
||||
.li-mt-15{margin-top:15rpx}
|
||||
.li-mt-20{margin-top:20rpx}
|
||||
.li-mt-30{margin-top:30rpx}
|
||||
.li-mx-auto{margin-left:auto;margin-right:auto}
|
||||
.li-px-25{padding-left:25rpx;padding-right:25rpx}
|
||||
.li-px-30{padding-left:30rpx;padding-right:30rpx}
|
||||
.li-px-40{padding-left:40rpx;padding-right:40rpx}
|
||||
.li-py-25{padding-top:25rpx;padding-bottom:25rpx}
|
||||
.li-rd-10{border-radius:10rpx}
|
||||
.li-rd-15{border-radius:15rpx}
|
||||
.li-text-010B3E-color{color:rgb(1,11,62)}
|
||||
.li-text-22{font-size:22rpx}
|
||||
.li-text-26{font-size:26rpx}
|
||||
.li-text-28{font-size:28rpx}
|
||||
.li-text-30{font-size:30rpx}
|
||||
.li-text-343333-color{color:rgb(52,51,51)}
|
||||
.li-text-AFB2B8-color{color:rgb(175,178,184)}
|
||||
.li-text-B1B0B0-color{color:rgb(177,176,176)}
|
||||
.li-w-130{width:130rpx}
|
||||
.li-w-310{width:310rpx}
|
||||
.li-w-58{width:58rpx}
|
||||
.li-w-full-70{width:70%}
|
||||
.li-w-full-88{width:88%}
|
||||
.li-flex-center{display:flex;align-items:center;justify-content:center}
|
||||
.li-h-100{height:100rpx}
|
||||
.li-items-center{align-items:center}
|
||||
.li-justify-between{justify-content:space-between}
|
||||
.li-ml-20{margin-left:20rpx}
|
||||
.li-ml-200{margin-left:200rpx}
|
||||
.li-ml-25{margin-left:25rpx}
|
||||
.li-ml-30{margin-left:30rpx}
|
||||
.li-mr-10{margin-right:10rpx}
|
||||
.li-mr-30{margin-right:30rpx}
|
||||
.li-mt-10{margin-top:10rpx}
|
||||
.li-mt-20{margin-top:20rpx}
|
||||
.li-mt-300-important{margin-top:300rpx !important}
|
||||
.li-pt-2{padding-top:2rpx}
|
||||
.li-px-30{padding-left:30rpx;padding-right:30rpx}
|
||||
.li-py-20{padding-top:20rpx;padding-bottom:20rpx}
|
||||
.li-rd-full-50{border-radius:50%}
|
||||
.li-text-25{font-size:25rpx}
|
||||
.li-text-26{font-size:26rpx}
|
||||
.li-text-30{font-size:30rpx}
|
||||
.li-text-35{font-size:35rpx}
|
||||
.li-text-38{font-size:38rpx}
|
||||
.li-text-42{font-size:42rpx}
|
||||
.li-text-46{font-size:46rpx}
|
||||
.li-text-B1B0B0-color{color:rgb(177,176,176)}
|
||||
.li-w-100{width:100rpx}
|
||||
.li-w-full-80{width:80%}
|
||||
.bg-0070F0{background-color:rgb(0,112,240)}
|
||||
.bg-FFFFFF{background-color:rgb(255,255,255)}
|
||||
.bg-f9f9f9{background-color:rgb(249,249,249)}
|
||||
.border-4-white{border-style:solid;border-color:rgb(255,255,255);border-width:4rpx}
|
||||
.li-flex-col{flex-direction:column}
|
||||
.li-font-bold{font-weight:bold}
|
||||
.li-h-240{height:240rpx}
|
||||
.li-h-250{height:250rpx}
|
||||
.li-h-50{height:50rpx}
|
||||
.li-h-60{height:60rpx}
|
||||
.li-items-end{align-items:end}
|
||||
.li-justify-center{justify-content:center}
|
||||
.li-justify-start{justify-content:start}
|
||||
.li-mb-2{margin-bottom:2rpx}
|
||||
.li-ml-4{margin-left:4rpx}
|
||||
|
|
@ -77,9 +47,11 @@
|
|||
.li-mr-20{margin-right:20rpx}
|
||||
.li-mr-50{margin-right:50rpx}
|
||||
.li-mt-26{margin-top:26rpx}
|
||||
.li-mt-30{margin-top:30rpx}
|
||||
.li-mt-60{margin-top:60rpx}
|
||||
.li-mx-20{margin-left:20rpx;margin-right:20rpx}
|
||||
.li-mx-40{margin-left:40rpx;margin-right:40rpx}
|
||||
.li-mx-auto{margin-left:auto;margin-right:auto}
|
||||
.li-pb-10{padding-bottom:10rpx}
|
||||
.li-pb-14{padding-bottom:14rpx}
|
||||
.li-pb-20{padding-bottom:20rpx}
|
||||
|
|
@ -105,6 +77,7 @@
|
|||
.li-w-60{width:60rpx}
|
||||
.li-w-full-94{width:94%}
|
||||
.li-font-550{font-weight:550}
|
||||
.li-h-130{height:130rpx}
|
||||
.li-h-68{height:68rpx}
|
||||
.li-mt-100{margin-top:100rpx}
|
||||
.li-mt-28{margin-top:28rpx}
|
||||
|
|
@ -115,10 +88,37 @@
|
|||
.li-rd-40{border-radius:40rpx}
|
||||
.li-text-2EA1EA-color{color:rgb(46,161,234)}
|
||||
.li-text-a5a5a5-color{color:rgb(165,165,165)}
|
||||
.li-w-130{width:130rpx}
|
||||
.li-w-150{width:150rpx}
|
||||
.li-w-420{width:420rpx}
|
||||
.li-w-full-85{width:85%}
|
||||
.li-w-full-90{width:90%}
|
||||
.items-center{align-items:center}
|
||||
.justify-end{justify-content:end}
|
||||
.justify-center{justify-content:center}
|
||||
.justify-between{justify-content:space-between}
|
||||
.li-h-160{height:160rpx}
|
||||
.li-h-58{height:58rpx}
|
||||
.li-justify-around{justify-content:space-around}
|
||||
.li-ml-22{margin-left:22rpx}
|
||||
.li-ml-35{margin-left:35rpx}
|
||||
.li-mt-12{margin-top:12rpx}
|
||||
.li-mt-14{margin-top:14rpx}
|
||||
.li-mt-15{margin-top:15rpx}
|
||||
.li-px-25{padding-left:25rpx;padding-right:25rpx}
|
||||
.li-px-40{padding-left:40rpx;padding-right:40rpx}
|
||||
.li-py-25{padding-top:25rpx;padding-bottom:25rpx}
|
||||
.li-rd-10{border-radius:10rpx}
|
||||
.li-rd-15{border-radius:15rpx}
|
||||
.li-text-010B3E-color{color:rgb(1,11,62)}
|
||||
.li-text-22{font-size:22rpx}
|
||||
.li-text-28{font-size:28rpx}
|
||||
.li-text-343333-color{color:rgb(52,51,51)}
|
||||
.li-text-AFB2B8-color{color:rgb(175,178,184)}
|
||||
.li-w-310{width:310rpx}
|
||||
.li-w-58{width:58rpx}
|
||||
.li-w-full-70{width:70%}
|
||||
.li-w-full-88{width:88%}
|
||||
.li-mb-8{margin-bottom:8rpx}
|
||||
.li-ml-15{margin-left:15rpx}
|
||||
.li-ml-6{margin-left:6rpx}
|
||||
|
|
@ -161,14 +161,15 @@
|
|||
.li-font-400{font-weight:400}
|
||||
.li-m-30{margin:30rpx}
|
||||
.li-text-595959-color{color:rgb(89,89,89)}
|
||||
.li-mt-100-important{margin-top:100rpx !important}
|
||||
.li-mt-8{margin-top:8rpx}
|
||||
.li-text-999-color{color:rgb(153,153,153)}
|
||||
.li-mb-30{margin-bottom:30rpx}
|
||||
.li-ml-10{margin-left:10rpx}
|
||||
.li-mr-200{margin-right:200rpx}
|
||||
.li-mr-4{margin-right:4rpx}
|
||||
.li-mt-100-important{margin-top:100rpx !important}
|
||||
.li-mt-4{margin-top:4rpx}
|
||||
.li-mt-50{margin-top:50rpx}
|
||||
.li-mt-8{margin-top:8rpx}
|
||||
.li-py-40{padding-top:40rpx;padding-bottom:40rpx}
|
||||
.li-text-0070F0-color{color:rgb(0,112,240)}
|
||||
.li-text-333-color{color:rgb(51,51,51)}
|
||||
|
|
@ -176,7 +177,6 @@
|
|||
.li-text-44{font-size:44rpx}
|
||||
.li-text-48{font-size:48rpx}
|
||||
.li-text-90{font-size:90rpx}
|
||||
.li-text-999-color{color:rgb(153,153,153)}
|
||||
.li-text-center{text-align:center}
|
||||
.li-text-white{color:rgb(255,255,255)}
|
||||
.li-w-500{width:500rpx}
|
||||
|
|
@ -190,42 +190,43 @@
|
|||
.li-h-90{height:90rpx}
|
||||
.li-text-47{font-size:47rpx}
|
||||
.li-w-90{width:90rpx}
|
||||
.li-flex-1{flex:1}
|
||||
.li-flex-wrap{flex-wrap:wrap}
|
||||
.li-mt-25{margin-top:25rpx}
|
||||
.li-mt-5{margin-top:5rpx}
|
||||
.li-text-999999-color{color:rgb(153,153,153)}
|
||||
.li-w-160{width:160rpx}
|
||||
.li-block{display:block}
|
||||
.li-items-baseline{align-items:baseline}
|
||||
.li-mr-15{margin-right:15rpx}
|
||||
.li-mt-5{margin-top:5rpx}
|
||||
.li-opacity-100{undefined:1}
|
||||
.li-rd-12{border-radius:12rpx}
|
||||
.li-rd-16{border-radius:16rpx}
|
||||
.li-text-0a4696-color{color:rgb(10,70,150)}
|
||||
.li-flex-1{flex:1}
|
||||
.li-flex-wrap{flex-wrap:wrap}
|
||||
.li-mt-25{margin-top:25rpx}
|
||||
.li-text-999999-color{color:rgb(153,153,153)}
|
||||
.li-w-160{width:160rpx}
|
||||
.li-line-clamp-2{overflow:hidden;display:-webkit-box;line-clamp:2;-webkit-box-orient:vertical;-webkit-line-clamp:2}
|
||||
.li-w-full-96{width:96%}
|
||||
.li-mt-200{margin-top:200rpx}
|
||||
.li-pt-6{padding-top:6rpx}
|
||||
.li-opacity-80{undefined:0.8}
|
||||
.li-pb-40{padding-bottom:40rpx}
|
||||
|
||||
.li-my-10{margin-top:10rpx;margin-bottom:10rpx}
|
||||
.li-p-20{padding:20rpx}
|
||||
.li-px-20{padding-left:20rpx;padding-right:20rpx}
|
||||
.li-py-10{padding-top:10rpx;padding-bottom:10rpx}
|
||||
.li-py-100{padding-top:100rpx;padding-bottom:100rpx}
|
||||
.li-py-60{padding-top:60rpx;padding-bottom:60rpx}
|
||||
.li-rd-30{border-radius:30rpx}
|
||||
.li-rd-8{border-radius:8rpx}
|
||||
.li-text-dddddd-color{color:rgb(221,221,221)}
|
||||
.li-text-ff9900-color{color:rgb(255,153,0)}
|
||||
|
||||
.li-flex-row-reverse{flex-direction:row-reverse}
|
||||
.li-opacity-80{undefined:0.8}
|
||||
.li-pb-40{padding-bottom:40rpx}
|
||||
.li-py-100{padding-top:100rpx;padding-bottom:100rpx}
|
||||
.li-text-100{font-size:100rpx}
|
||||
.li-text-3e9bff-color{color:rgb(62,155,255)}
|
||||
.li-text-50{font-size:50rpx}
|
||||
.li-text-52c41a-color{color:rgb(82,196,26)}
|
||||
.li-text-ff4d4f-color{color:rgb(255,77,79)}
|
||||
|
||||
.li-my-10{margin-top:10rpx;margin-bottom:10rpx}
|
||||
.li-p-20{padding:20rpx}
|
||||
.li-rd-8{border-radius:8rpx}
|
||||
.li-text-dddddd-color{color:rgb(221,221,221)}
|
||||
.li-text-ff9900-color{color:rgb(255,153,0)}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue