zouling 3 сар өмнө
parent
commit
b530eceeab

+ 38 - 0
property_ui/api/work/car.js

@@ -45,4 +45,42 @@ export function illegalParkingCancel(data) {
     method: 'post',
 	'data': data
   })
+}
+// 业主车辆-新增wuYe:car:add
+export function carAdd(data) {
+  return request({
+    url: '/wuYe/car',
+    method: 'post',
+    'data': data
+  })
+}
+// 业主车辆-修改wuYe:car:edit
+export function carPut(data) {
+  return request({
+    url: '/wuYe/car/put',
+    method: 'post',
+    'data': data
+  })
+}
+// 业主车辆-删除wuYe:car:remove
+export function carDel(data) {
+  return request({
+    url: '/wuYe/car/delete/'+data,
+    method: 'get',
+  })
+}
+// 业主车辆-列表wuYe:car:list
+export function carList(data) {
+  return request({
+    url: '/wuYe/car/list',
+    method: 'get',
+    'data': data
+  })
+}
+// 业主车辆-详情wuYe:car:query
+export function carDet(data) {
+  return request({
+    url: '/wuYe/car/'+data,
+    method: 'get',
+  })
 }

+ 12 - 18
property_ui/health/pages/health/add.vue

@@ -39,7 +39,7 @@
 					<uni-forms-item label="性别" required name="residentGender">
 						<view class="flexc">
 							<view class="flex1"></view>
-							<uni-data-checkbox  :disabled="isdisabled" selectedColor="#0156FE" selectedTextColor="#272727" v-model="datainfo.residentGender" :localdata="sexs" />
+							<uni-data-checkbox  :map="map" :disabled="isdisabled" selectedColor="#0156FE" selectedTextColor="#272727" :value="datainfo.residentGender" :localdata="xbList" />
 						</view>
 					</uni-forms-item>
 					<uni-forms-item label="手机号码" required name="residentPhone">
@@ -54,7 +54,7 @@
 						      :list='fwlist'
 						      valueName='label' 
 						      keyName="value"
-							  :chosevalue="datainfo.houseId"
+							  :chosevalue="datainfo.detailedAddress"
 							  :filterable='filterable'
 						      @change='getchange'
 						    >
@@ -149,7 +149,7 @@
 	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
 	import {uploadIdentify,uploadmore} from '@/utils/common.js'
 	import {houseInfolistNoPage} from "@/api/work/work.js"
-	import {residentInfoAdd,residentInfoPut,residentInfoDel} from "@/api/work/people.js"
+	import {residentInfoAdd,residentInfoPut,residentInfoDet} from "@/api/work/people.js"
 	import {getDictionaryFn} from "@/api/system/user.js"
 	import {selectValueKey} from "@/utils/common.js"
 	import wSelect from "@/people/components/w-select/w-select.vue"
@@ -171,25 +171,17 @@
 					// "userId":"",//关联sys_user表中user_id
 					"detailedAddress":"",//居住人员的详细门牌号
 					"residentName":"",//居住人员姓名
-					"residentIdCard":"340622198001021245",//居住人员身份证号码,18位
+					"residentIdCard":"",//居住人员身份证号码,18位
 					"residentBirthday":"",//居住人员出生日期
 					// "yearsOld":"",//年龄
 					"residentPhone":"",//居住人员手机号
-					"residentGender":" ",//居住人员性别:1-男,2-女
+					"residentGender":1,//居住人员性别:1-男,2-女
 					"residentRelationship":"",//居住人员与户主的关系,如父子、夫妻等
 					"isHouseholder":"",//是否是户主 N不是 Y是
 					"isTenant":"",//是否是租户:Y-是,N-否
 					"residentEmployer":"",//居住人员工作单位
 					"residentAppearance":""//居住人员面貌,如党员、群众等
 				},
-				syqxidx:'',
-				sexs: [{
-					text: '男',
-					value: 0
-				}, {
-					text: '女',
-					value: 1
-				}],
 				rules:{
 					residentIdCard: {rules: [{required: true,errorMessage: '请输入身份证号码' }]},
 					residentName: {rules: [{required: true,errorMessage: '请输入姓名' }]},
@@ -200,6 +192,7 @@
 					// residentRelationship: {rules: [{required: true,errorMessage: '请选择与户主关系' }]},
 					// isTenant: {rules: [{required: true,errorMessage: '请选择是否租户' }]},
 					// residentAppearance: {rules: [{required: true,errorMessage: '请选择人员面貌' }]},
+					residentPhone: {rules: [{required: true,errorMessage: '请输入手机号'}, {pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,errorMessage:'请输入正确的手机号码'}]},
 				  },
 				sfhz:"",
 				hzgx:"",
@@ -221,6 +214,7 @@
 				ptype:'add',
 				filterable:true,
 				chooseValue:'',
+				map:{text:'dictLabel',value:'dictValue'}
 			}
 		},
 		onLoad: function(e) {
@@ -319,7 +313,7 @@
 						this.xbList = res.data.map(v => {
 							return {
 								dictLabel: v.dictLabel,
-								dictValue: v.dictValue
+								dictValue: Number(v.dictValue)
 							}
 						})
 					}
@@ -374,10 +368,10 @@
 					// 	this.$toast('请输入资产名称')
 					// 	return
 					// }
-					// if(!params.equipmentNumber){
-					// 	this.$toast('请输入资产编号')
-					// 	return
-					// }
+					if(!params.detailedAddress){
+						this.$toast('请选择居住门户')
+						return
+					}
 					let _IDRe18 =
 						/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
 					let _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/

+ 18 - 0
property_ui/pages.json

@@ -107,6 +107,24 @@
 					}
 				}
 			},
+			{
+				"path": "pages/manage/car",
+				"style": {
+					"navigationBarTitleText": "车辆信息",
+					"h5":{
+						"titleNView":false
+					}
+				}
+			},
+			{
+				"path": "pages/manage/addcar",
+				"style": {
+					"navigationBarTitleText": "车辆信息",
+					"h5":{
+						"titleNView":false
+					}
+				}
+			},
 			{
 				"path": "pages/manage/moneydetail",
 				"style": {

+ 108 - 42
property_ui/people/components/car/list.vue

@@ -4,41 +4,73 @@
 	<block v-if="datainfo.length>0">
 		<!-- 人员管理 -->
 		<block v-if="type=='people'">
-			<view class="carlist peolist" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
+			<view class="carlist peolist" v-for="(ite,idx) in datainfo" :key="idx">
 				<view class="ctop flexc">
-					<image :src="hicoa" class="imgs" v-if="ite.type==1"></image>
-					<image :src="hicob" class="imgs" v-if="ite.type==2"></image>
-					<view class="tit">一号楼3单元1101</view>
+					<image :src="house" class="imgs" v-if="ite.houseStatus==1"></image>
+					<image :src="housea" class="imgs" v-if="ite.houseStatus==2"></image>
+					<image :src="houseb" class="imgs" v-if="ite.houseStatus==3"></image>
+					<image :src="housec" class="imgs" v-if="ite.houseStatus==4"></image>
+					<!-- <image :src="hicoa" class="imgs" v-if="ite.type==1"></image>
+					<image :src="hicob" class="imgs" v-if="ite.type==2"></image> -->
+					<view class="tit">{{ite.detailedAddress}}</view>
 					<view class="flex1"></view>
-					<view class="txt ca" v-if="ite.type==1">业主</view>
-					<view class="txt cb" v-if="ite.type==2">租户</view>
+					<!-- <view class="txt ca" v-if="ite.type==1">业主</view>
+					<view class="txt cb" v-if="ite.type==2">租户</view> -->
+					<view class="txt ca" v-if="ite.houseStatus==1">自住</view>
+					<view class="txt cb" v-if="ite.houseStatus==2">出租</view>
+					<view class="txt cc" v-if="ite.houseStatus==3">空闲</view>
+					<view class="txt co6" v-if="ite.houseStatus==4">代售</view>
 				</view>
 				<view class="plists">
-					<view class="plist flexc">
-						<image :src="man" class="head" v-if="ite.sex==0"></image>
-						<image :src="woman" class="head" v-else></image>
-						<view class="flex1">
-							<view class="ptit">张伟<view class="btn btnc ml10" v-if="ite.hzflag">户主</view></view>
-							<view class="ptxt">身份证号 | 41072719880603022X</view>
-							<view class="flexc">
-								<view class="ptxt">性别 | {{ite.sex==0?'男':'女'}}</view>
-								<view class="ptxt">年龄 | 36岁</view>
+					<block v-for="(aite,aidx) in ite.residentInfoList">
+						<view class="flexc pr mb12"   :key="`peo${aidx}`" v-if="aidx==0" @click="getDetail(aite.residentId)"
+							:data-idx="idx" :data-aidx="aidx" data-type="peo"
+							@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+aite.right+'px'"
+						>
+							<view class="plist flexc">
+								<image :src="man" class="head" v-if="aite.residentGender==1"></image>
+								<image :src="woman" class="head" v-else></image>
+								<view class="flex1">
+									<view class="ptit">{{aite.residentName}}
+										<view class="btn btnc ml10" v-if="aite.isHouseholder=='Y'">户主</view>
+									</view>
+									<view class="ptxt">身份证号 | {{aite.residentIdCard}}</view>
+									<view class="flexc">
+										<view class="ptxt">性别 | {{aite.residentGender==1?'男':'女'}}</view>
+										<view class="ptxt">年龄 | {{getAgeFromID(aite.residentIdCard)}}岁</view>
+									</view>
+									<view class="flexc" v-if="aite.residentAppearance">
+										<view class="ptxt">人员面貌 | {{kaType(aite.residentAppearance,rymmList)}}</view>
+									</view>
+								</view>
 							</view>
+							<view class="spdel" v-if="aite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(aite.residentId)">删除</view>
 						</view>
-					</view>
-					<view class="plist flexc" v-if="ite.zhanflag">
-						<image :src="man" class="head" v-if="ite.sex==0"></image>
-						<image :src="woman" class="head" v-else></image>
-						<view class="flex1">
-							<view class="ptit">张伟<view class="btn btnc ml10" v-if="ite.hzflag">户主</view></view>
-							<view class="ptxt">身份证号 | 41072719880603022X</view>
-							<view class="flexc">
-								<view class="ptxt">性别 | {{ite.sex==0?'男':'女'}}</view>
-								<view class="ptxt">年龄 | 36岁</view>
+						<view class="flexc pr mb12"   :key="`peo${aidx}`" v-if="aidx>0&&ite.zhanflag" @click="getDetail(aite.residentId)"
+							:data-idx="idx" :data-aidx="aidx" data-type="peo"
+							@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+aite.right+'px'"
+						>
+							<view class="plist flexc">
+								<image :src="man" class="head" v-if="aite.residentGender==1"></image>
+								<image :src="woman" class="head" v-else></image>
+								<view class="flex1">
+									<view class="ptit">{{aite.residentName}}
+										<view class="btn btnc ml10" v-if="aite.isHouseholder=='Y'">户主</view>
+									</view>
+									<view class="ptxt">身份证号 | {{aite.residentIdCard}}</view>
+									<view class="flexc">
+										<view class="ptxt">性别 | {{aite.residentGender==1?'男':'女'}}</view>
+										<view class="ptxt">年龄 | {{getAgeFromID(aite.residentIdCard)}}岁</view>
+									</view>
+									<view class="flexc" v-if="aite.residentAppearance">
+										<view class="ptxt">人员面貌 | {{kaType(aite.residentAppearance,rymmList)}}</view>
+									</view>
+								</view>
 							</view>
+							<view class="spdel" v-if="aite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(aite.residentId)">删除</view>
 						</view>
-					</view>
-					<image :src="upimg" :class="ite.zhanflag?'act':''" class="upimg" @click="getZhan(idx)"></image>
+					</block>
+					<image :src="upimg" v-if="ite.residentInfoList.length>1" :class="ite.zhanflag?'act':''" class="upimg" @click="getZhan(idx)"></image>
 				</view>
 			</view>
 		</block>
@@ -164,10 +196,20 @@
 				default () {
 					return ''
 				}
+			},
+			rymmList:{//人员面貌
+				type:Array,
+				default () {
+					return []
+				}
 			}
 		},
 		data(){
 			return{
+				house:require("@/work/static/manage/house.png"),
+				housea:require("@/work/static/manage/housea.png"),
+				houseb:require("@/work/static/manage/houseb.png"),
+				housec:require("@/work/static/manage/housec.png"),
 				noiconpimg:require("@/static/nodata.png"),
 				car:require("@/car/static/car/car.png"),
 				cara:require("@/car/static/car/cara.png"),
@@ -185,7 +227,6 @@
 				neye:require("@/people/static/people/neye.png"),
 				time:require("@/work/static/manage/time.png"),
 				house:require("@/work/static/manage/house.png"),
-				housea:require("@/work/static/manage/housea.png"),
 				home:require("@/service/static/service/home.png"),
 				upimg:require("@/static/images/home/up.png"),
 				star:require('@/manage/static/community/star.png'),
@@ -202,6 +243,26 @@
 			kaType(data, list) {
 				return selectDictValue(list, data);
 			},
+			getAgeFromID(idNumber) {
+				if(idNumber){
+					const birthDateStr = idNumber.substring(6, 14);
+					const birthYear = parseInt(birthDateStr.substring(0, 4));
+					const birthMonth = parseInt(birthDateStr.substring(4, 6));
+					const birthDay = parseInt(birthDateStr.substring(6, 8));
+								
+					const today = new Date();
+					const currentYear = today.getFullYear();
+					const currentMonth = today.getMonth() + 1;
+					const currentDay = today.getDate();
+								
+					let age = currentYear - birthYear;
+					if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
+					    age--;
+					}
+								
+					return age;
+				}         
+			 },
 			getDetail(e){
 				this.$emit('getDetail',e)
 			},
@@ -213,12 +274,6 @@
 			},
 			getDelFn(e){
 				var that=this;
-				var id=''
-				if(this.tabval==1){
-					id=e.reservRecordId
-				}else{
-					id=e.visitorManageId
-				}
 				uni.showModal({
 					title: '确认删除',
 					content: "是否确认删除",
@@ -226,7 +281,7 @@
 					confirmText: '确认',
 					success: function(res) {
 						if (res.confirm) {
-							that.$emit('getDelFn',id)
+							that.$emit('getDelFn',e)
 						} else if (res.cancel) {
 						}
 					}
@@ -262,12 +317,18 @@
 			},
 			//触摸滑动
 			drawMove(e) {
-				// console.log("滑动");
+				var idx=e.currentTarget.dataset.idx
+				var aidx=e.currentTarget.dataset.aidx
+				var type=e.currentTarget.dataset.type;
 				for (var index in this.datainfo) {
-					// this.csListArrl[index].right=0
-					this.$set(this.datainfo[index],'right',0);
+					if(type&&type=='peo'){	
+						for(var i in this.datainfo[idx].residentInfoList){
+							this.$set(this.datainfo[idx].residentInfoList[i],'right',0);
+						}
+					}else{
+						 this.$set(this.datainfo[index],'right',0);
+					}	
 				}
-				var idx=e.currentTarget.dataset.idx
 				var touch = e.touches[0];
 				var item = this.datainfo[idx];
 				var disX = this.startX - touch.clientX;
@@ -275,8 +336,13 @@
 				        if (disX > this.delBtnWidth) {
 					    disX = this.delBtnWidth;
 				        }
+						if(type&&type=='peo'){	
+							 this.$set(this.datainfo[idx].residentInfoList[aidx],'right',disX);
+						}else{
+							 this.$set(this.datainfo[idx],'right',disX);
+						}
 						// this.csListArrl[idx].right=disX
-				        this.$set(this.datainfo[idx],'right',disX);
+				       
 				} else {
 					// this.csListArrl[idx].right=0
 					this.$set(this.datainfo[idx],'right',0);
@@ -289,7 +355,7 @@
 				var item = this.datainfo[idx];
 				if (item.right >= this.delBtnWidth / 2) {
 					// this.datainfo[idx].right=this.delBtnWidth
-					this.$set(this.datainfo[idx],'right',this.delBtnWidth);
+					// this.$set(this.datainfo[idx],'right',this.delBtnWidth);
 				} else {
 					this.datainfo[idx].right=0
 				}
@@ -341,7 +407,7 @@ font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
 	.imgs{margin-right: 16rpx !important;}
 	.tit{font-size: 28rpx !important;}
 	.plists{padding: 30rpx 24rpx 6rpx;
-		.plist{background: linear-gradient(-90deg, #F2F5FF 0%, #FBFDFF 100%);border-radius: 20rpx;border: 2rpx solid #E6E6E6;margin-bottom: 24rpx;padding: 18rpx 26rpx 4rpx;
+		.plist{background: linear-gradient(-90deg, #F2F5FF 0%, #FBFDFF 100%);border-radius: 20rpx;border: 2rpx solid #E6E6E6;padding: 18rpx 26rpx 4rpx;width: 100%;z-index: 1;
 		.head{width: 96rpx;height: 98rpx;margin-right: 32rpx;flex: 0 0 auto;}
 		.ptit{font-weight: bold;font-size: 30rpx;color: #272727;display: flex;align-items: center;margin-bottom: 14rpx;}	
 		.ptxt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 14rpx;min-width: 176rpx;}

+ 44 - 9
property_ui/people/pages/people/index.vue

@@ -3,9 +3,9 @@
 		<view class="cartop">
 			<view class="topa flexc">
 				<image :src="reset" class="resetimg" @click="getReset"></image>
-				<picker range-key='dictLabel' 	:range="jclxlist"    @change='bindDateChangea'>
+				<picker range-key='dictLabel' 	:range="rymmList"    @change='bindDateChangea'>
 					<view class="chekt flexc">
-						<view class="over">{{sfxx|| "选择身份"}}</view>
+						<view class="over">{{rymm|| "选择身份"}}</view>
 						<image :src="up"></image>
 					</view>
 				</picker>
@@ -19,7 +19,7 @@
 		</view>
 		<!-- 列表 -->
 		<view class="carlists">
-			<car-list :datainfo="list" :wtdt="wtdt" type='people' @getDelFn="getDelFn"></car-list>
+			<car-list :datainfo="list" :rymmList="rymmList" :wtdt="wtdt" type='people' @getDelFn="getDelFn" @getDetail="getDetail"></car-list>
 		</view>
 		<block v-if="checkPermi(['wuYe:residentInfo:add'])">
 			<view style="height: 100rpx;"></view>
@@ -33,7 +33,9 @@
 	import config from '@/config'
 	const baseUrl = config.baseUrl
 	import carList from "@/people/components/car/list.vue"
+	import {getDictionaryFn} from "@/api/system/user.js"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {houseInfoList} from "@/api/work/work.js"
 	import {residentInfoList,residentInfoDel} from "@/api/work/people.js"
 	export default{
 		components:{carList},
@@ -47,7 +49,9 @@
 				search:require('@/car/static/car/search.png'),
 				sfxx:"",
 				text:'',
-				jclxlist:[{dictLabel:'党员',dictValue:'0'}],
+				rymm:'',
+				rymmid:"",
+				rymmList:[],
 				list:[],
 				pageSize: 10,
 				pageNum: 1,
@@ -66,6 +70,7 @@
 			if(e.id){
 				this.houseId=e.id;
 			}
+			this.init()
 			this.getDataFn()
 		},
 		// 上拉触底加载更多触发事件
@@ -77,14 +82,30 @@
 		},
 		methods:{
 			checkPermi, checkRole,
+			init(){
+				//人员面貌
+				getDictionaryFn('affiliation_personnel').then(res=>{
+					if(res.code==200){
+						this.rymmList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+			},
 			getAddFn(){
 				this.$tab.navigateTo("/health/pages/health/add")
 			},
+			getDetail(id){
+				this.$tab.navigateTo("/health/pages/health/add?id="+id)
+			},
 			getConfirm(){
 				this.getrefreshData()
 			},
 			getReset(){
-				this.sfxx='';
+				this.rymm='';
 				this.text='';
 				this.getrefreshData()
 			},
@@ -99,11 +120,13 @@
 			},
 			bindDateChangea(e){
 				var val=e.detail.value;
-				this.sfxx=this.jclxlist[val].dictLabel;
-				// this.orderFoodType=this.jclxlist[val].dictValue;
+				this.rymm=this.rymmList[val].dictLabel;
+				this.rymmid=this.rymmList[val].dictValue;
+				this.getrefreshData()
 			},
 			getDelFn(id){
 				var that=this;
+				console.log(id)
 				residentInfoDel(id).then(res=>{
 					if(res.code==200){
 						that.$toast("删除成功")
@@ -121,7 +144,13 @@
 				if(this.houseId){
 					params.houseId=this.houseId
 				}
-				residentInfoList(params).then(res=>{
+				if(this.text){
+					params.residentName=this.text
+				}
+				if(this.rymm){
+					params.residentAppearance=this.rymmid
+				}
+				houseInfoList(params).then(res=>{
 					if(res.code==200){
 						if (res.rows.length < this.pageSize) {
 							this.reachflag = false
@@ -138,7 +167,13 @@
 						}
 						var newArr=JSON.parse(JSON.stringify(res.rows))
 						newArr.forEach(ite=>{
-							ite.right=0;
+							var newArr=ite.residentInfoList;
+							if(ite.residentInfoList){
+								newArr.forEach(itea=>{
+									itea.right=0
+								})
+							}
+							ite.zhanflag=false;
 						})
 						if (this.pageNum == 1) {
 							this.list = newArr;

+ 1 - 1
property_ui/static/style.css

@@ -32,7 +32,7 @@ font-weight: bold;font-size: 26rpx;color: #FFFFFF;background: #0256FD;border-rad
 .txr{text-align: right;}
 .overh{overflow: hidden;}
 .delleft{background-color: #ffffff;border-radius: 20rpx;position: relative;z-index: 1;}
-
+.w50{min-width: 50%;}
 
 
 .fw5{font-weight: 500;}

+ 59 - 2
property_ui/work/components/car/list.vue

@@ -10,7 +10,7 @@
 					<image :src="housea" class="imgs" v-if="ite.houseStatus==2"></image>
 					<image :src="houseb" class="imgs" v-if="ite.houseStatus==3"></image>
 					<image :src="housec" class="imgs" v-if="ite.houseStatus==4"></image>
-					<view class="tit">{{ite.communityName}}12#1101室</view>
+					<view class="tit">{{ite.communityName}}{{ite.detailedAddress}}</view>
 					<!-- view class="btn btnbga">预约</view>
 					<view class="btn btnbgb">已来访</view>
 					<view class="btn btnbgc">待来访</view> -->
@@ -39,10 +39,41 @@
 				<view class="btns flexc">
 					<view class="bga" v-if="checkPermi(['wuYe:houseInfo:edit'])" @click.stop="getPut(ite.houseId)">编辑信息</view>
 					<view class="bgb" v-if="checkPermi(['wuYe:residentInfo:list'])" @click.stop="getJuzhu(ite.houseId)">居住信息</view>
-					<view class="bgc"> 车辆信息</view>
+					<view class="bgc" v-if="checkPermi(['wuYe:car:list'])" @click.stop="getCar(ite.houseId)"> 车辆信息</view>
 				</view>
 			</view>
 		</block>
+		<block v-if="type=='mycar'">
+			<view class="carlist pr" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.carId)"
+				:data-idx="idx"
+				@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
+			>
+				<view class="delleft" style="padding: 0 24rpx;">
+					<view class="carltop flexc">
+						<view class="flex1">
+							<view class="tit mb6" :class="ite.vehicleType==1?'co01':'co16'">{{ite.plateNumber}}</view>
+							<view class="txt flexc">
+								<!-- {{ite.plateNumber}} -->
+								<view class="txtbtn flexcc">{{kaType(ite.vehicleBrand,clcxList)}}</view>
+								<!-- <view class="txtbtn flexcc" v-if="ite.vehicleType==2">新能源</view> -->
+							</view>
+						</view>
+						<image :src="cara" class="cara" v-if="ite.vehicleType==1"></image>
+						<image :src="carb" class="carb" v-if="ite.vehicleType==2"></image>
+					</view>
+					<view class="carlf">
+						<view class="clflist">发动机号码 :{{ite.engineNumber}}</view>
+						<view class="clflist">车辆识别代号:{{ite.identificationNumber}}</view>
+						<view class="flexc">
+							<view class="clflist w50">注册日期:{{ite.registrationDate}}</view>
+							<view class="clflist w50">发证日期:{{ite.issueDate}}</view>
+						</view>
+					</view>
+				</view>
+				
+				<view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:car:remove'])" @click.stop="getDelFn(ite.carId)">删除</view>
+			</view>
+		</block>
 		<!-- 物业费管理 -->
 		<block v-if="type=='money'">
 			<view class="carlist peolist" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
@@ -201,6 +232,7 @@
 </template>
 
 <script>
+	import {selectDictValue} from "@/utils/common.js"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 	import config from '@/config'
 	export default{
@@ -228,6 +260,13 @@
 				default () {
 					return ''
 				}
+			},
+				
+			clcxList:{
+				type:Array,
+				default () {
+					return []
+				}
 			}
 		},
 		data(){
@@ -263,6 +302,9 @@
 		},
 		methods:{
 			checkPermi, checkRole,
+			kaType(data, list) {
+				return selectDictValue(list, data);
+			},
 			getDetail(e){
 				this.$emit('getDetail',e)
 			},
@@ -272,6 +314,9 @@
 			getJuzhu(e){
 				this.$emit('getJuzhu',e)
 			},
+			getCar(e){
+				this.$emit('getCar',e)
+			},
 			getAddFn(e){
 				this.$emit('getAddFn',e)
 			},
@@ -346,6 +391,18 @@
 .flexc{display: flex;align-items: center;}
 .mb10{margin-bottom: 20rpx;}
 .carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
+	.carltop{min-height: 154rpx;border-bottom: 2rpx solid #E5E5E5;
+			.tit{font-weight: bold;font-size: 32rpx;}
+			.txt{font-weight: 500;font-size: 26rpx;color: #272727;}
+			.txtbtn{min-width: 82rpx;
+	height: 32rpx;font-weight: 500;font-size: 20rpx;color: #45CB99;
+	border-radius: 16rpx;border: 1px solid #45CB99;margin-left: 12rpx;}
+			.cara{flex: 0 0 auto;width: 232rpx;height: 74rpx;margin-right: 40rpx;}
+			.carb{flex: 0 0 auto;width: 278rpx;height: 130rpx;}
+		}
+		.carlf{padding:26rpx 0 10rpx;
+			.clflist{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 16rpx;}
+		}
 	.ctop{border-bottom: 2rpx solid #E5E5E5;padding:26rpx 24rpx;
 		.imgs{width: 40rpx;height: 42rpx;margin-right: 30rpx;}
 		.tit{font-size: 32rpx;color: #272727;font-weight: bold;margin-right: 14rpx;}

+ 359 - 0
property_ui/work/pages/manage/addcar.vue

@@ -0,0 +1,359 @@
+<template>
+	<view class="check">
+		<view class="cbox">
+			<view class="chtop flexc">
+				<view class="line"></view>
+				<view>车辆信息</view>
+			</view>
+			<view class="chmain">
+				<uni-forms ref="form" :model="datainfo" :rules="rules">
+					<view class="upbox" @click="getaddImage">
+						<image :src="baseUrl+datainfo.front" class="img" v-if="datainfo.front"></image>
+						<image :src="cmico" class="addimg"></image>
+						<view>扫描行驶证自动填写</view>
+					</view>
+					<view class="carcode">
+						<view class="tit mb16 lh18"><text class="cof4">*</text>车牌号码</view>
+						<view>需车牌插件</view>
+					</view>
+					<uni-forms-item label="车牌号" name="plateNumber">
+						<view class="flexc" @click.stop="">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.plateNumber" :inputBorder='false' placeholder="请输入车牌号" />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
+					</uni-forms-item>
+					<block v-if="zhanfalg">
+						<uni-forms-item label="居住门户" name="houseId">
+							<w-select
+							      style="margin-left: 20rpx;" 
+							     v-model="chooseValue"
+							      :list='fwlist'
+							      valueName='label' 
+							      keyName="value"
+								  :chosevalue="datainfo.detailedAddress"
+								  :filterable='filterable'
+							      @change='getchange'
+							    >
+							    </w-select>
+						</uni-forms-item>
+					<uni-forms-item label="品牌车型" name="vehicleBrand">
+						<picker range-key='dictLabel' :disabled="isdisabled" :value="cllxidx" :range="cllxList"   @change='bindDateChange'>
+							<view class="flexc mh35">
+								<view class="flex1 txr f13 co27" v-if="datainfo.vehicleBrand&&!cllx">{{statusFormats(datainfo.vehicleBrand,cllxList,'cllx')}}</view>
+								<view class="flex1 txr f13" v-else :class="cllx?'co27':'coa'">{{cllx||"请选择品牌车型"}}</view>
+								<view class="rimg"><image :src="rimg"></image></view>
+							</view>
+						</picker>
+					</uni-forms-item>
+					<!-- <uni-forms-item label="车辆类型" name="vehicleType">
+						<view class="flexc" @click.stop="">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.vehicleType" :inputBorder='false' placeholder="请输入车辆类型" />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
+					</uni-forms-item> -->
+					<uni-forms-item label="车辆颜色" name="vehicleColour">
+						<view class="flexc" @click.stop="">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.vehicleColour" :inputBorder='false' placeholder="请输入车辆颜色" />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="发动机编号" name="engineNumber">
+						<view class="flexc" @click.stop="">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.engineNumber" :inputBorder='false' placeholder="请输入发动机编号" />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="车辆识别代号" name="identificationNumber">
+						<view class="flexc" @click.stop="">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.identificationNumber" :inputBorder='false' placeholder="请输入车辆识别代号" />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="注册日期" name="registrationDate">
+						<view class="flexc">
+							<uni-datetime-picker  :disabled="isdisabled" :class="datainfo.registrationDate?'co27':'coa'" type="date" placeholder="请选择注册日期" :border="false" :hide-second='true' v-model="datainfo.registrationDate"  />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="发证日期" name="issueDate">
+						<view class="flexc">
+							<uni-datetime-picker  :disabled="isdisabled" :class="datainfo.issueDate?'co27':'coa'" type="date" placeholder="请选择发证日期" :border="false" :hide-second='true' v-model="datainfo.issueDate"  />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
+					</uni-forms-item>
+					</block>
+					<view class="zhanbox flexcc" @click="zhanfalg=!zhanfalg">
+						{{zhanfalg?"折叠信息":'展开信息'}}<image :class="!zhanfalg?'act':''" :src="upimg"></image>
+					</view>
+				</uni-forms>
+				<view class="rhbtn mt30" @click="getEditFn" v-if="isdisabled">修改</view>
+				<view class="rhbtn mt30" @click="getSubmit" v-else>确定</view>
+				<!-- <view class="rhbtn mt30" @click="getNext">确定添加</view> -->
+			</view>
+		</view>
+		<loading></loading>
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {uploadIdentify,selectValueKey} from '@/utils/common.js'
+	import wSelect from "@/people/components/w-select/w-select.vue"
+	import {houseInfolistNoPage} from "@/api/work/work.js"
+	import {carPut,carAdd,carDet} from "@/api/work/car.js"
+	import {getDictionaryFn} from "@/api/system/user.js"
+	export default{
+		components:{wSelect},
+		data(){
+			return{
+				rimg: require('@/work/static/house/rimg.png'),
+				cmico:require('@/work/static/house/cmico.png'),
+				upimg:require('@/work/static/house/up.png'),
+				baseUrl:config.baseUrl,
+				datainfo:{
+					// "carId":"",//业主车辆主键
+					"houseId":"",//房屋信息id
+					"detailedAddress":"",//房屋的详细门牌号
+					"userId":"",//用户id
+					"residentId":"",//居住人员表id
+					"userName":"",//业主姓名
+					"residentPhone":"",//业主手机号
+					"plateNumber":"",//车牌号码
+					"vehicleBrand":"",//车辆车型
+					// "vehicleType":"",//车辆类型
+				},
+				zhanfalg:true,
+				syqxidx:'',
+				filterable:true,
+				chooseValue:'',
+				fwlist:[],
+				isdisabled:false,
+				rules:{
+					houseId: {rules: [{required: true,errorMessage: '请选择居住门户' }]},
+					detailedAddress: {rules: [{required: true,errorMessage: '请输入居住地址' }]},
+					// name: {rules: [{required: true,errorMessage: '请输入访客姓名' }]},
+				 //  portalId: {rules: [{required: true,errorMessage: '请选择来访门户' }]},
+				 //  mobileNumber: {rules: [{required: true,errorMessage: '请输入手机号'}, {pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,errorMessage:'请输入正确的手机号码'}]},
+				  },
+				cllx:"",
+				cllxidx:0,
+				cllxList:[],
+				id:'',
+				isdisabled:false,
+				ptype:'add',
+			}
+		},
+		onLoad: function(e) {
+			if(e.id){
+				this.id=e.id;
+				this.ptype="edit";
+				this.isdisabled=true;
+				this.getDetail()
+			}
+			this.init()
+		},
+		methods:{
+			checkPermi, checkRole,
+			getEditFn(){
+				this.isdisabled=false;
+			},
+			getchange(e){
+				this.datainfo.houseId=e.value;
+				this.datainfo.detailedAddress=e.label;
+			},
+			statusFormats(data, list,type) {
+				var aite=selectValueKey(list, data);
+				if(type=='cllx'){
+					this.cllxidx=aite.key;
+				}
+				return aite.actions;
+			},
+			init(){
+				// 自己的房屋
+				houseInfolistNoPage().then(res=>{
+					if(res.code==200){
+						this.fwlist= res.rows.map(v => {
+							return {
+								label: v.detailedAddress,
+								value: v.houseId,
+								location: v.location
+							}
+						})
+					}
+				})
+				// 车辆类型
+				getDictionaryFn('cartype').then(res=>{
+					if(res.code==200){
+						this.cllxList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+			},
+			bindDateChange(e){
+				var val=e.detail.value;
+				this.datainfo.vehicleBrand=this.cllxList[val].dictValue;
+				this.cllx=this.cllxList[val].dictLabel;
+			},
+			getDetail(){
+				carDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data
+					}
+				})
+			},
+			getSubmit(){
+				this.$refs.form.validate().then(res => {
+					var params=JSON.parse(JSON.stringify(this.datainfo))
+					// if(!params.portalId){
+					// 	this.$toast("请选择来访门户")
+					// 	return
+					// }
+					// if(params.isCar=='Y'&&!params.plateNumber){
+					// 	this.$toast("请输入车牌号")
+					// 	return
+					// }
+					// if(!params.visitorTime){
+					// 	this.$toast("请选择来访时间")
+					// 	return
+					// }
+					if(this.ptype=='add'){
+						carAdd(params).then(res=>{
+							if(res.code==200){
+								this.$toast("新增成功")
+								setTimeout(function(){
+									uni.$emit("carlist")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}else{
+						carPut(params).then(res=>{
+							if(res.code==200){
+								this.$toast("修改成功")
+								setTimeout(function(){
+									uni.$emit("carlist")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}
+				})
+			},
+			getaddImage(e){
+				let that = this;
+				// var rs=['D:\\idcard.png']
+				// if(rs&&rs.length>0){
+				// 	var obj={
+				// 		type:e,
+				// 		// url:baseUrl+rs.join(',')
+				// 		url:rs.join(',')
+				// 	}
+				// 	that.getOcrIdCard(obj)
+				// }
+				// return
+				let file =[],count=9
+				uni.chooseImage({
+					count: 1,
+					success:function(res){
+						let img= res.tempFilePaths;
+						if(img.length + file.length > count){
+							uni.showToast({
+								title: '最多上传'+count+'张图片',
+								icon: 'none',
+								duration: 2000
+							})
+						}else{
+							let imglen = res.tempFilePaths.length;
+							var fuwufile = [];
+							uploadIdentify('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
+								var resurl=rs[0];
+								if(e=='front'){
+									that.datainfo.front=resurl.fileName;
+								}else{
+									that.datainfo.back=resurl.fileName;
+								}
+								if(rs&&rs.length>0){
+									var obj={
+										type:e,
+										url:resurl.urlOnline
+									}
+									that.getOcrIdCard(obj)
+								}
+							})	
+						}
+					}
+				});
+			},
+			getOcrIdCard(obj){
+				var params={
+					image:obj.url,
+					idCardSide:obj.type
+				}
+				getOcrIdCard(params).then(res=>{
+					if(res.code==200){
+						var datainfo=res.data;
+						if(obj.type=='front'){
+							this.datainfo.realName=datainfo.realName;
+							this.datainfo.idCard=datainfo.idCard;
+							this.datainfo.address=datainfo.address;
+						}else{
+							this.datainfo.expirationDate=datainfo.expirationDate
+						}
+					}
+				})
+			}
+		}
+	}
+</script>
+<style>
+	page{background: #F3F3F0;}
+</style>
+<style lang="scss" scoped>
+.coa /deep/ .uni-date__x-input{text-align: right;color: #AAAAAA;}
+.check /deep/ .select-wrap{border: none;width: 100%;}
+.check /deep/ .uni-forms-item{min-height: 106rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;border-bottom: 2rpx solid #E6E6E6;padding:10rpx 0;}
+.check /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;}
+.check /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 26rpx;color: #222327;}
+.check /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;}
+.check /deep/ .uni-easyinput__placeholder-class{font-size: 26rpx;color: #AAAAAA;}
+.check /deep/ .uni-input-input{font-size: 26rpx;}
+.check /deep/ .uni-textarea-textarea{font-size: 26rpx;}
+.check /deep/ .uni-forms-item__label text{width: 110rpx;text-align-last: justify;}
+.check /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
+.check{min-height: 100vh;padding: 20rpx 24rpx 28rpx;box-sizing: border-box;display: flex;box-sizing: border-box;}
+.cbox{background: #FFFFFF;border-radius: 20rpx;flex: 1;padding-bottom: 76rpx;
+	.chtop{padding-top: 32rpx;margin-bottom: 22rpx;
+		.line{width: 14rpx;height: 48rpx;background: #0256FD;border-radius:0 12rpx 12rpx 0;margin-right: 18rpx;}
+		view{font-weight: bold;font-size: 32rpx;color: #272727;}
+	}
+	.chmain{
+		padding: 0 24rpx;
+		.upbox{height: 224rpx;background: #EFF4FF;border-radius: 20rpx;display: flex;align-items: center;justify-content: center;flex-direction: column;margin-bottom: 44rpx;overflow: auto;
+			.img{width: 100%;height: 100%;}
+			.addimg{width: 90rpx;height: 90rpx;margin-bottom: 8rpx;}
+			view{font-weight: bold;font-size: 26rpx;color: #4C6686;}
+		}
+		.carcode{
+			.tit{font-weight: bold;font-size: 26rpx;color: #272727;}
+		}
+	}
+	.rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
+		image{width: 100%;height: 100%;}
+	}
+	.zhanbox{font-weight: 500;font-size: 24rpx;color: #AAAAAA;padding: 16rpx 0;margin-top: 20rpx;
+		image{width: 20rpx;height: 12rpx;margin-left: 18rpx;transition: all 0.3s;
+			&.act{transform: rotate(-180deg);}
+		}
+	}
+}
+.tips{font-weight: bold;color: #272727;font-size: 26rpx;margin-left: 8rpx;}
+</style>

+ 134 - 0
property_ui/work/pages/manage/car.vue

@@ -0,0 +1,134 @@
+<template>
+	<view class="carbox">
+		<view class="flex1 cartop">
+			<box-list :datainfo="list" type="mycar" :clcxList="clcxList" @getDetail="getDetail" @getDelFn="getDelFn"></box-list>
+		</view>
+		<view class="plr12 flex0">
+			<view class="rhbtn" @click="getAddFn">添加车辆</view>
+		</view>
+	<loading></loading>	
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	const baseUrl = config.baseUrl
+	import boxList from "@/work/components/car/list.vue"
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {carList,carDel} from "@/api/work/car.js"
+	import {getDictionaryFn} from "@/api/system/user.js"
+	export default{
+		components:{boxList},
+		data(){
+			return{
+				rimg: require('@/people/static/people/rimg.png'),
+				list:[],
+				pageSize: 10,
+				pageNum: 1,
+				reachflag: true,
+				wtdt:'',
+				clcxList:[]
+			}
+		},
+		onUnload() {
+			uni.$off('carlist')
+		},
+		onLoad: function() {
+			uni.$on('carlist',(res)=>{
+				this.getDataFn()
+			})
+			this.init()
+			this.getDataFn()
+		},
+		// 上拉触底加载更多触发事件
+		onReachBottom() {
+			if (this.reachflag) {
+				this.pageNum++
+				this.getDataFn()
+			}
+		},
+		methods:{
+			checkPermi, checkRole,
+			init(){
+				// 车型
+				getDictionaryFn('cartype').then(res=>{
+					if(res.code==200){
+						this.clcxList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+			},
+			getDelFn(data){
+				var that=this;
+				carDel(data).then(res=>{
+					if(res.code==200){
+						this.$toast("删除成功");
+						setTimeout(function(){
+							that.getDataFn()
+						},1500)
+					}
+				})
+			},
+			getAddFn(){
+				this.$tab.navigateTo("/work/pages/manage/addcar")
+			},
+			getDetail(id){
+				this.$tab.navigateTo("/work/pages/manage/addcar?id="+id)
+			},
+			getChargeFn(){
+				this.$tab.navigateTo("/mine/pages/car/charge")
+			},
+			getDataFn(){
+				var params={
+					pageSize:this.pageSize,
+					pageNum: this.pageNum,
+				}
+				carList(params).then(res=>{
+					if(res.code==200){
+						if (res.rows.length < this.pageSize) {
+							this.reachflag = false
+							this.wtdt = '到底了~';
+						} else {
+							var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -	1)
+							if (num < res.total) {
+								this.reachflag = true
+								this.wtdt = ''
+							} else {
+								this.reachflag = false
+								this.wtdt = '到底了~';
+							}
+						}
+						var newArr=JSON.parse(JSON.stringify(res.rows))
+						newArr.forEach(ite=>{
+							ite.right=0;
+						})
+						if (this.pageNum == 1) {
+							this.list = newArr;
+						} else {
+							this.list = this.list.concat(newArr)
+						}
+					}else{
+						this.$toast(res.msg)
+					}
+				})
+				
+			},
+		}
+	}
+</script>
+<style>
+	page{background: #F3F3F0;}
+</style>
+<style lang="scss" scoped>
+.carbox{display: flex;flex-direction: column;min-height: 100vh;padding: 22rpx 18rpx 100rpx;
+	.cartop{overflow: auto;}
+	.cartips{background: #FFFFFF;border-radius: 20rpx;height: 98rpx;padding: 0 24rpx;
+		image{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;}
+		.tit{font-weight: bold;font-size: 26rpx;color: #272727;}
+	}
+}
+</style>

+ 4 - 1
property_ui/work/pages/manage/house.vue

@@ -22,7 +22,7 @@
 		</view>
 		<!-- 列表 -->
 		<view class="carlists">
-			<car-list :datainfo="list" :wtdt="wtdt" type='comehouse' @getDetail="getDetail" @getPut="getPut" @getJuzhu="getJuzhu"></car-list>
+			<car-list :datainfo="list" :wtdt="wtdt" type='comehouse' @getDetail="getDetail" @getPut="getPut" @getJuzhu="getJuzhu" @getCar="getCar"></car-list>
 		</view>
 		<view class="cdbtns">
 			<view class="btna" @click="getAddFn">单个添加</view>
@@ -104,6 +104,9 @@
 			getPut(e){
 				this.$tab.navigateTo("/work/pages/manage/addhouse?id="+e)
 			},
+			getCar(e){
+				this.$tab.navigateTo("/work/pages/manage/car?id="+e)
+			},
 			getJuzhu(e){
 				this.$tab.navigateTo("/people/pages/people/index?id="+e)
 			},

BIN
property_ui/work/static/house/adrs.png


BIN
property_ui/work/static/house/cara.png


BIN
property_ui/work/static/house/carb.png


BIN
property_ui/work/static/house/carc.png


BIN
property_ui/work/static/house/chara.png


BIN
property_ui/work/static/house/charb.png


BIN
property_ui/work/static/house/cmico.png


BIN
property_ui/work/static/house/edit.png


BIN
property_ui/work/static/house/house.png


BIN
property_ui/work/static/house/icon_tjcl_tjxny.png


BIN
property_ui/work/static/house/rimg.png


BIN
property_ui/work/static/house/up.png