分享一个基于微信小程序的房地产销售管理系统springboot(源码、调试、LW、开题、PPT)

💕💕作者:计算机源码社
💕💕个人简介:本人 八年开发经验,擅长Java、Python、PHP、.NET、Node.js、Android、微信小程序、爬虫、大数据、机器学习等,大家有这一块的问题可以一起交流!
💕💕学习资料、程序开发、技术解答、文档报告
💕💕如需要源码,可以扫取文章下方二维码联系咨询

💕💕Java项目
💕💕微信小程序项目
💕💕Android项目
💕💕Python项目
💕💕PHP项目
💕💕ASP.NET项目
💕💕Node.js项目
💕💕选题推荐

项目实战|基于springboot的房地产销售管理微信小程序

1、选题背景

  在当前房地产市场快速发展和数字化转型的背景下,传统的房地产销售管理模式已经难以满足日益增长的市场需求和管理效率要求。随着移动互联网技术的普及和微信小程序平台的兴起,为房地产行业提供了新的营销渠道和管理工具。基于微信小程序的房地产销售管理系统应运而生,它整合了现代信息技术和房地产销售管理的实际需求,旨在打造一个高效、便捷、全面的房地产销售管理平台。该系统利用Java、Spring Boot、Vue等先进技术,结合微信小程序的广泛普及性,为房地产销售管理提供了新的解决方案。

2、研究目的和意义

  开发房地产销售小程序的主要目的是优化房地产销售流程,提高管理效率,增强客户体验。通过整合管理员、用户和销售员工三个角色的功能需求,系统实现了从房源管理、客户咨询、预约看房到最终成交的全流程数字化管理。对于管理员,系统提供了全面的后台管理功能,包括用户管理、房源管理、订单管理等;对于用户,系统提供了便捷的房源查询、咨询预约、在线交易等服务;对于销售员工,系统则提供了客户跟进、预约管理、订单处理等功能。这种全方位的功能设计旨在创造一个高效、透明、互动的房地产销售生态系统。

  开发基于微信小程序的房地产销售管理系统具有重要的实践意义,房地产销售小程序顺应了移动互联网时代的发展趋势,充分利用了微信小程序的便捷性和广泛性,使得房地产销售管理可以突破时间和空间的限制。该系统通过数字化和智能化手段,大大提高了房地产销售的效率和精准度,降低了运营成本,优化了资源配置。系统的开发为房地产企业提供了一个创新的营销平台,有助于提升品牌形象,扩大市场份额。通过提供透明、便捷的服务,系统有效改善了用户体验,增强了客户满意度和忠诚度,为房地产行业的可持续发展奠定了基础。

3、系统研究内容

在这里插入图片描述

基于微信小程序的房地产销售管理系统的研究内容可以包括以下几个方面:

系统需求分析与设计
进行详细的用户需求调研,包括管理员、用户和销售员工三类角色的具体需求
分析当前房地产销售管理的痛点和挑战
设计系统整体架构,包括前端微信小程序、后端服务和数据库
制定系统功能模块,设计用户界面和交互流程

微信小程序前端开发
研究微信小程序开发框架和最佳实践
使用Vue.js框架开发responsive和用户友好的界面
实现房源展示、在线咨询、预约看房等核心功能
设计并实现用户端和销售员工端的不同界面和功能

后端服务开发
基于Spring Boot框架搭建后端服务架构
实现RESTful API,处理前端请求和数据交互
开发用户认证和授权模块,确保系统安全
实现房源管理、订单处理、员工管理等核心业务逻辑

数据库设计与优化
设计MySQL数据库schema,包括用户、房源、订单等核心实体
优化数据库查询性能,实现高效的数据检索和更新
实现数据备份和恢复机制,确保数据安全

系统集成与测试
整合前端小程序、后端服务和数据库
进行功能测试、性能测试和安全测试
优化系统响应速度和并发处理能力

4、系统页面设计

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

如需要源码,可以扫取文章下方二维码联系咨询

5、参考文献

[1]师艺玮.基于SSH框架的房地产销售管理系统的设计与实现[D].电子科技大学,2021. DOI:10.27005/d.cnki.gdzku.2021.003134.
[2]王亚强.基于数据挖掘技术的房地产企业销售系统[J].计算机产品与流通,2020,(03):92.
[3]黄泽欢,房产销售管理系统V1.0.湖北省,湖北榜样网络有限公司,2018-11-02.
[4]程丝.基于数据挖掘技术的房地产销售管理系统设计与实现[D].湖北工业大学,2018. DOI:10.27131/d.cnki.ghugc.2018.000169.
[5]顾华奇,彭惠卿,黄雄.房产销售地理信息系统关键技术研究[J].建材与装饰,2017,(51):306-307.
[6]李孔泽.房地产企业销售管理系统的设计与实现[D].吉林大学,2017.
[7]陈炫燕.房产公司管理系统设计与实现[J].电脑编程技巧与维护,2017,(08):65-67+89.DOI:10.16184/j.cnki.comprg.2017.08.022.
[8]杨磊.基于Web的房产销售管理系统设计与实现[J].科技创新导报,2017,14(07):113-114.DOI:10.16660/j.cnki.1674-098X.2017.07.113.
[9]文燕.房地产销售信息管理系统的设计与实现[D].西南交通大学,2016.
[10]靳铮.商品房预销售系统的设计与实现[D].吉林大学,2016.
[11]温兴华.杭州新洲房产有限公司的房产销售信息系统的研究与分析[D].云南大学,2016.
[12]周俊男.房地产销售管理系统的设计与实现分析[J].电脑知识与技术,2016,12(06):107-109.DOI:10.14004/j.cnki.ckt.2016.0687.
[13]沈军.房产销售管理系统的设计与实现[D].浙江工商大学,2016.
[14]訾慧明.房地产公司营销管理系统的设计与实现[D].西安电子科技大学,2016.
[15]孙德忠,徐鸣.新时期房地产管理系统应用与研究[J].信息与电脑(理论版),2016,(01):51-52.
[16]伊娜.房地产公司销售部门业务综合管理系统的设计与实现[D].东北大学,2016.
[17]李亚伟.房地产综合信息管理系统的设计与实现[D].东北大学,2016.
[18]施杨.新建商品房网上备案系统设计与实现[D].浙江工业大学,2015.
[19]印涛.金地大百汇房地产公司售楼管理系统的研究与分析[D].云南大学,2015.
[20]孙磊.房地产销售管理系统的设计和实现[D].大连理工大学,2015.

6、核心代码

<template>
<view class="content">
	<view :style='{"width":"100%","padding":"0 0 144rpx 0","position":"relative","background":"url(http://codegen.caihongy.cn/20221018/6b04e4b2331b4f3d85b1103feff37414.jpg)","height":"100%"}'>
		<form :style='{"width":"100%","padding":"24rpx","background":"none","display":"block","height":"auto"}' class="app-update-pv">
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class="">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">标题</view>
				<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.biaoti" v-model="ruleForm.biaoti" placeholder="标题"></input>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class=" select">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">房源类型</view>
				<picker :style='{"width":"100%","flex":"1","height":"auto"}' @change="fangyuanleixingChange" :value="fangyuanleixingIndex"  :range="fangyuanleixingOptions">
					<view :style='{"width":"100%","lineHeight":"80rpx","fontSize":"28rpx","color":"rgb(255, 170, 51)"}' class="uni-input">{{ruleForm.fangyuanleixing?ruleForm.fangyuanleixing:"请选择房源类型"}}</view>
				</picker>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class=" select">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">房源户型</view>
				<picker :style='{"width":"100%","flex":"1","height":"auto"}' @change="fangyuanhuxingChange" :value="fangyuanhuxingIndex"  :range="fangyuanhuxingOptions">
					<view :style='{"width":"100%","lineHeight":"80rpx","fontSize":"28rpx","color":"rgb(255, 170, 51)"}' class="uni-input">{{ruleForm.fangyuanhuxing?ruleForm.fangyuanhuxing:"请选择房源户型"}}</view>
				</picker>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class=" select">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">状态</view>
				<picker :style='{"width":"100%","flex":"1","height":"auto"}' @change="zhuangtaiChange" :value="zhuangtaiIndex"  :range="zhuangtaiOptions">
					<view :style='{"width":"100%","lineHeight":"80rpx","fontSize":"28rpx","color":"rgb(255, 170, 51)"}' class="uni-input">{{ruleForm.zhuangtai?ruleForm.zhuangtai:"请选择状态"}}</view>
				</picker>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class="">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">建筑面积</view>
				<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.jianzhumianji" v-model="ruleForm.jianzhumianji" placeholder="建筑面积"></input>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class="">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">楼层</view>
				<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.louceng" v-model="ruleForm.louceng" placeholder="楼层"></input>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class="">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">价格</view>
				<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.jiage" v-model="ruleForm.jiage" placeholder="价格"></input>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class="">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">朝向</view>
				<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.chaoxiang" v-model="ruleForm.chaoxiang" placeholder="朝向"></input>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class=" select">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">发布时间</view>
				<picker :style='{"width":"100%","flex":"1","height":"auto"}' mode="date" :value="ruleForm.fabushijian" @change="fabushijianChange">
					<view :style='{"width":"100%","lineHeight":"80rpx","fontSize":"28rpx","color":"rgb(255, 170, 51)"}' class="uni-input">{{ruleForm.fabushijian?ruleForm.fabushijian:"请选择发布时间"}}</view>
				</picker>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class="" @tap="tupianTap">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">图片</view>
				<image :style='{"width":"80rpx","borderRadius":"100%","objectFit":"cover","display":"block","height":"80rpx"}' class="avator" v-if="ruleForm.tupian" :src="baseUrl+ruleForm.tupian.split(',')[0]" mode="aspectFill"></image>
				<image :style='{"width":"80rpx","borderRadius":"100%","objectFit":"cover","display":"block","height":"80rpx"}' class="avator" v-else src="../../static/gen/upload.png" mode="aspectFill"></image>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class="">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">房源地址</view>
				<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.fangyuandizhi" v-model="ruleForm.fangyuandizhi" placeholder="房源地址"></input>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class="">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">交付类型</view>
				<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.jiaofuleixing" v-model="ruleForm.jiaofuleixing" placeholder="交付类型"></input>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class=" select">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">员工工号</view>
				<picker :style='{"width":"100%","flex":"1","height":"auto"}' @change="yuangonggonghaoChange" :value="yuangonggonghaoIndex"  :range="yuangonggonghaoOptions">
					<view :style='{"width":"100%","lineHeight":"80rpx","fontSize":"28rpx","color":"rgb(255, 170, 51)"}' class="uni-input">{{yuangonggonghaoOptions[yuangonggonghaoIndex]}}</view>
				</picker>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class="">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">员工姓名</view>
				<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.yuangongxingming" v-model="ruleForm.yuangongxingming" placeholder="员工姓名"></input>
			</view>
			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class="">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">电话号码</view>
				<input :style='{"border":"0","padding":"0px 24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx","height":"80rpx"}' :disabled="ro.dianhuahaoma" v-model="ruleForm.dianhuahaoma" placeholder="电话号码"></input>
			</view>
			
			<!---->
 

			<view :style='{"padding":"4rpx 0","margin":"0 0 8rpx 0","borderColor":"#e8e8e8","alignItems":"center","borderRadius":"16rpx","borderWidth":"0 0 2rpx 0","background":"-webkit-linear-gradient(top,#eee,#fff)","display":"flex","width":"100%","borderStyle":"solid","height":"auto"}' class="">
				<view :style='{"width":"160rpx","padding":"0 20rpx 0 0","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","textAlign":"right"}' class="title">房屋用途</view>
				<textarea :style='{"border":"0","minHeight":"240rpx","padding":"24rpx","margin":"0px","color":"rgb(0, 0, 0)","borderRadius":"8rpx","flex":"1","background":"rgba(255, 255, 255, 0)","fontSize":"28rpx"}' v-model="ruleForm.fangwuyongtu" placeholder="房屋用途"></textarea>
			</view>
			
			<view :style='{"padding":"12rpx 0","margin":"0 0 24rpx 0","borderColor":"#ccc","borderWidth":"0 0 2rpx 0","width":"100%","borderStyle":"solid","height":"auto"}' class="">
				<view :style='{"width":"100%","lineHeight":"80rpx","fontSize":"28rpx","color":"#333","fontWeight":"500"}' class="title">房源详情</view>
                <xia-editor ref="editor" :style='{"minHeight":"300rpx","border":"2rpx solid #efefef","width":"100%","height":"auto"}' v-model="ruleForm.fangyuanxiangqing" placeholder="房源详情" @editorChange="fangyuanxiangqingChange"></xia-editor>
			</view>
			
			<view :style='{"width":"100%","margin":"32rpx 0 0 0","justifyContent":"center","display":"flex","height":"auto"}' class="btn" >
				<button :style='{"border":"2rpx solid #ffaa33","padding":"0px","boxShadow":"2rpx 4rpx 8rpx #a86b15,inset 0px 0px 112rpx 0px #ffaa33","margin":"0 5% 0 0","color":"rgb(255, 255, 255)","borderRadius":"16rpx","background":"#ffe6c3","width":"28%","lineHeight":"80rpx","fontSize":"28rpx","height":"80rpx"}' @tap="onSubmitTap" class="bg-red">提交</button>
			</view>
		</form>

		<w-picker mode="dateTime" step="1" :current="false" :hasSecond="false" @confirm="clicktimeConfirm" ref="clicktime" themeColor="#333333"></w-picker>
	</view>
</view>
</template>

<script>
	import wPicker from "@/components/w-picker/w-picker.vue";
    import xiaEditor from '@/components/xia-editor/xia-editor';
	export default {
		data() {
			return {
				cross:'',
				ruleForm: {
				biaoti: '',
				fangyuanleixing: '',
				fangyuanhuxing: '',
			        zhuangtai: '未出售',
				jianzhumianji: '',
				louceng: '',
				jiage: '',
				chaoxiang: '',
				fabushijian: '',
				tupian: '',
				fangyuandizhi: '',
				jiaofuleixing: '',
				fangwuyongtu: '',
				fangyuanxiangqing: '',
				yuangonggonghao: '',
				yuangongxingming: '',
				dianhuahaoma: '',
				},
				fangyuanleixingOptions: [],
				fangyuanleixingIndex: 0,
				fangyuanhuxingOptions: [],
				fangyuanhuxingIndex: 0,
				zhuangtaiOptions: [],
				zhuangtaiIndex: 0,
				yuangonggonghaoOptions: [],
				yuangonggonghaoIndex: 0,
				// 登陆用户信息
				user: {},
                ro:{
                   biaoti : false,
                   fangyuanleixing : false,
                   fangyuanhuxing : false,
                   zhuangtai : false,
                   jianzhumianji : false,
                   louceng : false,
                   jiage : false,
                   chaoxiang : false,
                   fabushijian : false,
                   tupian : false,
                   fangyuandizhi : false,
                   jiaofuleixing : false,
                   fangwuyongtu : false,
                   fangyuanxiangqing : false,
                   yuangonggonghao : false,
                   yuangongxingming : false,
                   dianhuahaoma : false,
                   clicktime : false,
                   clicknum : false,
                },
			}
		},
		components: {
			wPicker,
            xiaEditor
		},
		computed: {
			baseUrl() {
				return this.$base.url;
			},



		},
		async onLoad(options) {
            this.ruleForm.fabushijian = this.$utils.getCurDate();
			let table = uni.getStorageSync("nowTable");
			// 获取用户信息
			let res = await this.$api.session(table);
			this.user = res.data;
			
			// ss读取
			this.ruleForm.yuangonggonghao = this.user.yuangonggonghao
			this.ro.yuangonggonghao = true;
			this.ruleForm.yuangongxingming = this.user.yuangongxingming
			this.ro.yuangongxingming = true;
			this.ruleForm.dianhuahaoma = this.user.dianhuahaoma
			this.ro.dianhuahaoma = true;


			// 下拉框
			res = await this.$api.option(`fangyuanleixing`,`fangyuanleixing`,{});
			this.fangyuanleixingOptions = res.data;
            this.fangyuanleixingOptions.unshift("请选择房源类型");
			// 下拉框
			res = await this.$api.option(`fangyuanhuxing`,`fangyuanhuxing`,{});
			this.fangyuanhuxingOptions = res.data;
            this.fangyuanhuxingOptions.unshift("请选择房源户型");
			// 自定义下拉框值
			this.zhuangtaiOptions = "已售,未出售".split(',')
			// 下2
			res = await this.$api.option(`xiaoshouyuangong`,`yuangonggonghao`,{});
			this.yuangonggonghaoOptions = res.data;

			// 如果有登陆,获取登陆后保存的userid
			this.ruleForm.userid = uni.getStorageSync("userid")
			if (options.refid) {
				// 如果上一级页面传递了refid,获取改refid数据信息
				this.ruleForm.refid = options.refid;
				this.ruleForm.nickname = uni.getStorageSync("nickname");
			}
			// 如果是更新操作
			if (options.id) {
				this.ruleForm.id = options.id;
				// 获取信息
				res = await this.$api.info(`fangyuanxinxi`, this.ruleForm.id);
				this.ruleForm = res.data;
			}
			// 跨表
			this.cross = options.cross;
			if(options.cross){
				var obj = uni.getStorageSync('crossObj');
				for (var o in obj){
					if(o=='biaoti'){
					this.ruleForm.biaoti = obj[o];
					this.ro.biaoti = true;
					continue;
					}
					if(o=='fangyuanleixing'){
					this.ruleForm.fangyuanleixing = obj[o];
					this.ro.fangyuanleixing = true;
					continue;
					}
					if(o=='fangyuanhuxing'){
					this.ruleForm.fangyuanhuxing = obj[o];
					this.ro.fangyuanhuxing = true;
					continue;
					}
					if(o=='zhuangtai'){
					this.ruleForm.zhuangtai = obj[o];
					this.ro.zhuangtai = true;
					continue;
					}
					if(o=='jianzhumianji'){
					this.ruleForm.jianzhumianji = obj[o];
					this.ro.jianzhumianji = true;
					continue;
					}
					if(o=='louceng'){
					this.ruleForm.louceng = obj[o];
					this.ro.louceng = true;
					continue;
					}
					if(o=='jiage'){
					this.ruleForm.jiage = obj[o];
					this.ro.jiage = true;
					continue;
					}
					if(o=='chaoxiang'){
					this.ruleForm.chaoxiang = obj[o];
					this.ro.chaoxiang = true;
					continue;
					}
					if(o=='fabushijian'){
					this.ruleForm.fabushijian = obj[o];
					this.ro.fabushijian = true;
					continue;
					}
					if(o=='tupian'){
					this.ruleForm.tupian = obj[o].split(",")[0];
					this.ro.tupian = true;
					continue;
					}
					if(o=='fangyuandizhi'){
					this.ruleForm.fangyuandizhi = obj[o];
					this.ro.fangyuandizhi = true;
					continue;
					}
					if(o=='jiaofuleixing'){
					this.ruleForm.jiaofuleixing = obj[o];
					this.ro.jiaofuleixing = true;
					continue;
					}
					if(o=='fangwuyongtu'){
					this.ruleForm.fangwuyongtu = obj[o];
					this.ro.fangwuyongtu = true;
					continue;
					}
					if(o=='fangyuanxiangqing'){
					this.ruleForm.fangyuanxiangqing = obj[o];
					this.ro.fangyuanxiangqing = true;
					continue;
					}
					if(o=='yuangonggonghao'){
					this.ruleForm.yuangonggonghao = obj[o];
					this.ro.yuangonggonghao = true;
					continue;
					}
					if(o=='yuangongxingming'){
					this.ruleForm.yuangongxingming = obj[o];
					this.ro.yuangongxingming = true;
					continue;
					}
					if(o=='dianhuahaoma'){
					this.ruleForm.dianhuahaoma = obj[o];
					this.ro.dianhuahaoma = true;
					continue;
					}
					if(o=='clicktime'){
					this.ruleForm.clicktime = obj[o];
					this.ro.clicktime = true;
					continue;
					}
					if(o=='clicknum'){
					this.ruleForm.clicknum = obj[o];
					this.ro.clicknum = true;
					continue;
					}
				}
			}
			this.styleChange()
		},
		methods: {
            fangyuanxiangqingChange(e) {
                this.ruleForm.fangyuanxiangqing = e
            },
			styleChange() {
				this.$nextTick(()=>{
					// document.querySelectorAll('.app-update-pv . .uni-input-input').forEach(el=>{
					//   el.style.backgroundColor = this.addUpdateForm.input.content.backgroundColor
					// })
				})
			},
			// 下二随
			async yuangonggonghaoChange (e) {
				this.yuangonggonghaoIndex = e.target.value
				this.ruleForm.yuangonggonghao = this.yuangonggonghaoOptions[this.yuangonggonghaoIndex]
				let res = await this.$api.follow(`xiaoshouyuangong`, `yuangonggonghao`,{
					columnValue: this.ruleForm.yuangonggonghao
				});
				if(res.data.yuangongxingming){
					this.ruleForm.yuangongxingming = res.data.yuangongxingming
				}
				if(res.data.dianhuahaoma){
					this.ruleForm.dianhuahaoma = res.data.dianhuahaoma
				}
			},

			// 多级联动参数

			fabushijianChange(e) {
				this.ruleForm.fabushijian = e.target.value;
				this.$forceUpdate();
			},

			// 日长控件选择日期时间
			clicktimeConfirm(val) {
				console.log(val)
				this.ruleForm.clicktime = val.result;
				this.$forceUpdate();
			},

			// 下拉变化
			fangyuanleixingChange(e) {
				this.fangyuanleixingIndex = e.target.value
				this.ruleForm.fangyuanleixing = this.fangyuanleixingOptions[this.fangyuanleixingIndex]
			},
			// 下拉变化
			fangyuanhuxingChange(e) {
				this.fangyuanhuxingIndex = e.target.value
				this.ruleForm.fangyuanhuxing = this.fangyuanhuxingOptions[this.fangyuanhuxingIndex]
			},
			// 下拉变化
			zhuangtaiChange(e) {
				this.zhuangtaiIndex = e.target.value
				this.ruleForm.zhuangtai = this.zhuangtaiOptions[this.zhuangtaiIndex]
			},

			tupianTap() {
				let _this = this;
				this.$api.upload(function(res) {
					_this.ruleForm.tupian = 'upload/' + res.file;
					_this.$forceUpdate();
					_this.$nextTick(()=>{
						_this.styleChange()
					})
				});
			},

			getUUID () {
				return new Date().getTime();
			},
			async onSubmitTap() {
//跨表计算判断
				var obj;
				if((!this.ruleForm.biaoti)){
					this.$utils.msg(`标题不能为空`);
					return
				}
				if((!this.ruleForm.fangyuanleixing)){
					this.$utils.msg(`房源类型不能为空`);
					return
				}
				if((!this.ruleForm.fangyuanhuxing)){
					this.$utils.msg(`房源户型不能为空`);
					return
				}
				if((!this.ruleForm.zhuangtai)){
					this.$utils.msg(`状态不能为空`);
					return
				}
				if((!this.ruleForm.jiage)){
					this.$utils.msg(`价格不能为空`);
					return
				}
				if(this.ruleForm.jiage&&(!this.$validate.isNumber(this.ruleForm.jiage))){
					this.$utils.msg(`价格应输入数字`);
					return
				}
				if(this.ruleForm.clicknum&&(!this.$validate.isIntNumer(this.ruleForm.clicknum))){
					this.$utils.msg(`点击次数应输入整数`);
					return
				}
				//更新跨表属性
			       var crossuserid;
			       var crossrefid;
			       var crossoptnum;
				if(this.cross){
					var statusColumnName = uni.getStorageSync('statusColumnName');
					var statusColumnValue = uni.getStorageSync('statusColumnValue');
					if(statusColumnName!='') {
                        if(!obj) {
						    obj = uni.getStorageSync('crossObj');
                        }
						if(!statusColumnName.startsWith("[")) {
							for (var o in obj){
								if(o==statusColumnName){
									obj[o] = statusColumnValue;
								}

							}
							var table = uni.getStorageSync('crossTable');
							await this.$api.update(`${table}`, obj);
						} else {
						       crossuserid=Number(uni.getStorageSync('userid'));
						       crossrefid=obj['id'];
						       crossoptnum=uni.getStorageSync('statusColumnName');
						       crossoptnum=crossoptnum.replace(/\[/,"").replace(/\]/,"");
						}
					}
				}
				if(crossrefid && crossuserid) {
					this.ruleForm.crossuserid=crossuserid;
					this.ruleForm.crossrefid=crossrefid;
					let params = {
						page: 1,
						limit:10,
						crossuserid:crossuserid,
						crossrefid:crossrefid,
					}
					let res = await this.$api.list(`fangyuanxinxi`, params);
					if (res.data.total >= crossoptnum) {
						this.$utils.msg(uni.getStorageSync('tips'));
						return false;
					} else {
                //跨表计算
						if(this.ruleForm.id){
							await this.$api.update(`fangyuanxinxi`, this.ruleForm);
						}else{
							await this.$api.add(`fangyuanxinxi`, this.ruleForm);
						}
						this.$utils.msgBack('提交成功');
					}
				} else {
                //跨表计算
					if(this.ruleForm.id){
						await this.$api.update(`fangyuanxinxi`, this.ruleForm);
					}else{
						await this.$api.add(`fangyuanxinxi`, this.ruleForm);
					}
					this.$utils.msgBack('提交成功');
				}
			},
			optionsChange(e) {
				this.index = e.target.value
			},
			bindDateChange(e) {
				this.date = e.target.value
			},
			getDate(type) {
				const date = new Date();
				let year = date.getFullYear();
				let month = date.getMonth() + 1;
				let day = date.getDate();
				if (type === 'start') {
					year = year - 60;
				} else if (type === 'end') {
					year = year + 2;
				}
				month = month > 9 ? month : '0' + month;;
				day = day > 9 ? day : '0' + day;
				return `${year}-${month}-${day}`;
			},
			toggleTab(str) {
				this.$refs[str].show();
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		min-height: calc(100vh - 44px);
		box-sizing: border-box;
	}
</style>

💕💕作者:计算机源码社
💕💕个人简介:本人 八年开发经验,擅长Java、Python、PHP、.NET、Node.js、Android、微信小程序、爬虫、大数据、机器学习等,大家有这一块的问题可以一起交流!
💕💕学习资料、程序开发、技术解答、文档报告
💕💕如需要源码,可以扫取文章下方二维码联系咨询

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值