From 74522341365718f79bb0570c840285ff2f68a8c2 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Fri, 03 Nov 2023 15:51:15 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_app
---
api/doorplateAddress/doorplateAddress.js | 11
subPackage/house/roomDetails/index.vue | 33 +
manifest.json | 473 ++++++++++++++++----------------
pages/home/index.vue | 15
subPackage/bs/components/form/rentForm.vue | 20 +
subPackage/bs/views/rentDetail.vue | 147 ++++++++-
subPackage/workbench/views/cscj.vue | 53 +++
subPackage/bs/components/list/rentList.vue | 28 +
subPackage/house/roomControl/index.vue | 22
9 files changed, 500 insertions(+), 302 deletions(-)
diff --git a/api/doorplateAddress/doorplateAddress.js b/api/doorplateAddress/doorplateAddress.js
index 72c0cf1..44c1482 100644
--- a/api/doorplateAddress/doorplateAddress.js
+++ b/api/doorplateAddress/doorplateAddress.js
@@ -84,4 +84,15 @@
},
data
})
+}
+
+// 获取门牌地址
+export const getDoorplateAddressDetail = (params) => {
+ return http.request({
+ url: 'blade-doorplateAddress/doorplateAddress/getDoorplateAddressDetail',
+ method: 'GET',
+ params: {
+ ...params
+ }
+ })
}
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index b98a356..5f6b0b2 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,237 +1,238 @@
{
- "name" : "荆楚水库",
- "appid" : "__UNI__EB167C0",
- "description" : "",
- "versionName" : "1.0.10",
- "versionCode" : 104,
- "transformPx" : false,
- /* 5+App特有相关 */
- "app-plus" : {
- "compatible" : {
- "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
- },
- "safearea" : {
- "bottom" : {
- "offset" : "none"
- }
- },
- "usingComponents" : true,
- "nvueCompiler" : "uni-app",
- "compilerVersion" : 3,
- "splashscreen" : {
- "alwaysShowBeforeRender" : false,
- "waiting" : false,
- "autoclose" : false,
- "delay" : 0
- },
- /* 模块配置 */
- "modules" : {
- "VideoPlayer" : {},
- "Camera" : {},
- "Geolocation" : {},
- "Push" : {},
- "Maps" : {}
- },
- /* 应用发布信息 */
- "distribute" : {
- /* android打包配置 */
- "android" : {
- "permissions" : [
- "<uses-feature android:name=\"android.hardware.camera\"/>",
- "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
- "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
- "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
- "<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
- "<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
- "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
- "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
- "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
- "<uses-permission android:name=\"android.permission.CAMERA\"/>",
- "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
- "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
- "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
- "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
- "<uses-permission android:name=\"android.permission.INTERNET\"/>",
- "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
- "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
- "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
- "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
- "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
- "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
- "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
- "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
- "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
- "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
- "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
- ],
- "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
- },
- /* ios打包配置 */
- "ios" : {
- "dSYMs" : false,
- "UIBackgroundModes" : "",
- "idfa" : false
- },
- /* SDK配置 */
- "sdkConfigs" : {
- "ad" : {},
- "maps" : {
- "amap" : {
- "appkey_ios" : "4bcdf5434597cc9160c9e0168c4a7bc7",
- "appkey_android" : "c21be9bc7343573c28112c4fe272cb41"
- }
- },
- "geolocation" : {
- "amap" : {
- "__platform__" : [ "ios", "android" ],
- "appkey_ios" : "4bcdf5434597cc9160c9e0168c4a7bc7",
- "appkey_android" : "c21be9bc7343573c28112c4fe272cb41"
- },
- "system" : {
- "__platform__" : [ "ios", "android" ]
- }
- },
- "push" : {
- "unipush" : {
- "offline" : true
- }
- }
- },
- "icons" : {
- "android" : {
- "hdpi" : "D:/Desktop/hbsl/app/应用图标/72.png",
- "xhdpi" : "D:/Desktop/hbsl/app/应用图标/96.png",
- "xxhdpi" : "D:/Desktop/hbsl/app/应用图标/144.png",
- "xxxhdpi" : "D:/Desktop/hbsl/app/应用图标/192.png"
- },
- "ios" : {
- "appstore" : "D:/Desktop/icon/1024x1024bb.png",
- "iphone" : {
- "app@2x" : "D:/Desktop/icon/120.png",
- "app@3x" : "D:/Desktop/icon/180.png",
- "spotlight@2x" : "D:/Desktop/icon/80.png",
- "spotlight@3x" : "D:/Desktop/icon/120.png",
- "settings@2x" : "D:/Desktop/icon/58.png",
- "settings@3x" : "D:/Desktop/icon/87.png",
- "notification@2x" : "D:/Desktop/icon/40.png",
- "notification@3x" : "D:/Desktop/icon/60.png"
- },
- "ipad" : {
- "app" : "",
- "app@2x" : "",
- "proapp@2x" : "",
- "spotlight" : "",
- "spotlight@2x" : "",
- "settings" : "",
- "settings@2x" : "",
- "notification" : "",
- "notification@2x" : ""
- }
- }
- },
- "splashscreen" : {
- "useOriginalMsgbox" : true
- }
- },
- "uniStatistics" : {
- "enable" : false
- },
- "nativePlugins" : {}
- },
- /* 快应用特有相关 */
- "quickapp" : {},
- /* 小程序特有相关 */
- "mp-weixin" : {
- "appid" : "wxdc5675f4df850da6",
- "setting" : {
- "urlCheck" : false,
- "minified" : true,
- "postcss" : true,
- "es6" : true
- },
- "usingComponents" : true,
- "optimization" : {
- "subPackages" : true
- },
- "uniStatistics" : {
- "enable" : false
- },
- "permission" : {
- "scope.userLocation" : {
- "desc" : "定位"
- }
- }
- },
- "mp-alipay" : {
- "usingComponents" : true,
- "uniStatistics" : {
- "enable" : false
- }
- },
- "mp-baidu" : {
- "usingComponents" : true,
- "uniStatistics" : {
- "enable" : false
- }
- },
- "mp-toutiao" : {
- "usingComponents" : true,
- "setting" : {
- "es6" : true,
- "minified" : true,
- "postcss" : true,
- "urlCheck" : false
- },
- "uniStatistics" : {
- "enable" : false
- }
- },
- "h5" : {
- "template" : "template.h5.html",
- "router" : {
- "mode" : "hash",
- "base" : "/app"
- },
- "optimization" : {
- "treeShaking" : {
- "enable" : true
- }
- },
- "devServer" : {
- "proxy" : {
- "/api" : {
- "target" : "http://127.0.0.1",
- //"target" : "https://rider.bladex.vip/api",
- "pathRewrite" : {
- "^/api" : "/"
- }
- }
- },
- "port" : "",
- "https" : false
- },
- "uniStatistics" : {
- "enable" : false
- },
- "sdkConfigs" : {
- "maps" : {
- "amap" : {
- "key" : "7fa69abe1defd5888bb85bc736cda874",
- "securityJsCode" : "8ac9e5f522c62ed6e3a5800a87b0d140",
- "serviceHost" : ""
- }
- }
- },
- "unipush" : {
- "enable" : false
- }
- },
- "uniStatistics" : {
- "enable" : false
- },
- "mp-qq" : {
- "uniStatistics" : {
- "enable" : false
- }
- }
-}
+ "name": "荆楚水库",
+ "appid": "__UNI__EB167C0",
+ "description": "",
+ "versionName": "1.0.10",
+ "versionCode": 104,
+ "transformPx": false,
+ /* 5+App特有相关 */
+ "app-plus": {
+ "compatible": {
+ "ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
+ },
+ "safearea": {
+ "bottom": {
+ "offset": "none"
+ }
+ },
+ "usingComponents": true,
+ "nvueCompiler": "uni-app",
+ "compilerVersion": 3,
+ "splashscreen": {
+ "alwaysShowBeforeRender": false,
+ "waiting": false,
+ "autoclose": false,
+ "delay": 0
+ },
+ /* 模块配置 */
+ "modules": {
+ "VideoPlayer": {},
+ "Camera": {},
+ "Geolocation": {},
+ "Push": {},
+ "Maps": {}
+ },
+ /* 应用发布信息 */
+ "distribute": {
+ /* android打包配置 */
+ "android": {
+ "permissions": [
+ "<uses-feature android:name=\"android.hardware.camera\"/>",
+ "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+ "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+ "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+ "<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
+ "<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
+ "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+ "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+ "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+ "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+ "<uses-permission android:name=\"android.permission.INTERNET\"/>",
+ "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+ "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+ "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+ "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+ "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+ "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
+ "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+ "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+ "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
+ "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
+ "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+ ],
+ "abiFilters": ["armeabi-v7a", "arm64-v8a"]
+ },
+ /* ios打包配置 */
+ "ios": {
+ "dSYMs": false,
+ "UIBackgroundModes": "",
+ "idfa": false
+ },
+ /* SDK配置 */
+ "sdkConfigs": {
+ "ad": {},
+ "maps": {
+ "amap": {
+ "appkey_ios": "4bcdf5434597cc9160c9e0168c4a7bc7",
+ "appkey_android": "c21be9bc7343573c28112c4fe272cb41"
+ }
+ },
+ "geolocation": {
+ "amap": {
+ "__platform__": ["ios", "android"],
+ "appkey_ios": "4bcdf5434597cc9160c9e0168c4a7bc7",
+ "appkey_android": "c21be9bc7343573c28112c4fe272cb41"
+ },
+ "system": {
+ "__platform__": ["ios", "android"]
+ }
+ },
+ "push": {
+ "unipush": {
+ "offline": true
+ }
+ }
+ },
+ "icons": {
+ "android": {
+ "hdpi": "D:/Desktop/hbsl/app/应用图标/72.png",
+ "xhdpi": "D:/Desktop/hbsl/app/应用图标/96.png",
+ "xxhdpi": "D:/Desktop/hbsl/app/应用图标/144.png",
+ "xxxhdpi": "D:/Desktop/hbsl/app/应用图标/192.png"
+ },
+ "ios": {
+ "appstore": "D:/Desktop/icon/1024x1024bb.png",
+ "iphone": {
+ "app@2x": "D:/Desktop/icon/120.png",
+ "app@3x": "D:/Desktop/icon/180.png",
+ "spotlight@2x": "D:/Desktop/icon/80.png",
+ "spotlight@3x": "D:/Desktop/icon/120.png",
+ "settings@2x": "D:/Desktop/icon/58.png",
+ "settings@3x": "D:/Desktop/icon/87.png",
+ "notification@2x": "D:/Desktop/icon/40.png",
+ "notification@3x": "D:/Desktop/icon/60.png"
+ },
+ "ipad": {
+ "app": "",
+ "app@2x": "",
+ "proapp@2x": "",
+ "spotlight": "",
+ "spotlight@2x": "",
+ "settings": "",
+ "settings@2x": "",
+ "notification": "",
+ "notification@2x": ""
+ }
+ }
+ },
+ "splashscreen": {
+ "useOriginalMsgbox": true
+ }
+ },
+ "uniStatistics": {
+ "enable": false
+ },
+ "nativePlugins": {}
+ },
+ /* 快应用特有相关 */
+ "quickapp": {},
+ /* 小程序特有相关 */
+ "mp-weixin": {
+ "appid": "wx1ff4bbc24b343ef1",
+ "setting": {
+ "urlCheck": false,
+ "minified": true,
+ "postcss": true,
+ "es6": true
+ },
+ "usingComponents": true,
+ "optimization": {
+ "subPackages": true
+ },
+ "uniStatistics": {
+ "enable": false
+ },
+ "requiredPrivateInfos": ["getLocation"],
+ "permission": {
+ "scope.userLocation": {
+ "desc": "定位"
+ }
+ }
+ },
+ "mp-alipay": {
+ "usingComponents": true,
+ "uniStatistics": {
+ "enable": false
+ }
+ },
+ "mp-baidu": {
+ "usingComponents": true,
+ "uniStatistics": {
+ "enable": false
+ }
+ },
+ "mp-toutiao": {
+ "usingComponents": true,
+ "setting": {
+ "es6": true,
+ "minified": true,
+ "postcss": true,
+ "urlCheck": false
+ },
+ "uniStatistics": {
+ "enable": false
+ }
+ },
+ "h5": {
+ "template": "template.h5.html",
+ "router": {
+ "mode": "hash",
+ "base": "/app"
+ },
+ "optimization": {
+ "treeShaking": {
+ "enable": true
+ }
+ },
+ "devServer": {
+ "proxy": {
+ "/api": {
+ "target": "http://127.0.0.1",
+ //"target" : "https://rider.bladex.vip/api",
+ "pathRewrite": {
+ "^/api": "/"
+ }
+ }
+ },
+ "port": "",
+ "https": false
+ },
+ "uniStatistics": {
+ "enable": false
+ },
+ "sdkConfigs": {
+ "maps": {
+ "amap": {
+ "key": "7fa69abe1defd5888bb85bc736cda874",
+ "securityJsCode": "8ac9e5f522c62ed6e3a5800a87b0d140",
+ "serviceHost": ""
+ }
+ }
+ },
+ "unipush": {
+ "enable": false
+ }
+ },
+ "uniStatistics": {
+ "enable": false
+ },
+ "mp-qq": {
+ "uniStatistics": {
+ "enable": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/pages/home/index.vue b/pages/home/index.vue
index fa68593..8662d03 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -301,7 +301,9 @@
title: '-',
useSlot: true
}],
- menuList: []
+ menuList: [],
+ curHouseCode: ''
+
}
},
@@ -326,7 +328,6 @@
}
}
},
-
methods: {
//初始化
@@ -376,7 +377,7 @@
} else {
this.curSelectSite = dataList[0];
}
-
+ this.curHouseCode = this.curSelectSite.id
}
},
@@ -420,7 +421,8 @@
console.log('confirm', e)
this.curSelectSite = e.value[e.value.length - 1]
this.selectBoxShow = false
- this.getHouseDataList(e.value[1].id)
+ this.getHouseDataList(e.value[1]?.id)
+ this.curHouseCode = e.value[0].id
console.log("curSite=>", this.curSelectSite);
},
getMenu(menuName, menuList, resultArr) {
@@ -523,7 +525,7 @@
navTo() {
- this.$u.func.globalNavigator("/subPackage/bs/views/zhsb", "navTo")
+ this.$u.func.globalNavigator(`/subPackage/bs/views/zhsb?houseCode=${this.curHouseCode}`, "navTo")
},
navigatorPage() {
@@ -567,8 +569,7 @@
obj[arr[0]] = arr[1];
}
return obj
- }
-
+ },
}
}
</script>
diff --git a/subPackage/bs/components/form/rentForm.vue b/subPackage/bs/components/form/rentForm.vue
index 987b39b..c7eb16c 100644
--- a/subPackage/bs/components/form/rentForm.vue
+++ b/subPackage/bs/components/form/rentForm.vue
@@ -1,5 +1,5 @@
<template>
- <u-form :model="form" class="form-box" :rules="rules">
+ <u-form :model="form" class="form-box" :rules="rules" ref="refForm">
<u-form-item class="form-item" label="姓名" required prop="name" labelWidth="80">
<u-input v-model="form.name" border="none" placeholder="姓名" />
</u-form-item>
@@ -37,9 +37,21 @@
trigger: ['change', 'blur'],
}],
idCard: [{
- required: true,
- message: '请输入身份证号',
- // 可以单个或者同时写两个触发验证方式
+ required: true,
+ message: '请输入身份证号',
+ // 可以单个或者同时写两个触发验证方式
+ trigger: ['change', 'blur'],
+ }, {
+ // 自定义验证函数,见上说明
+ validator: (rule, value, callback) => {
+ const reg = /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/
+ if (reg.test(value)) {
+ return true
+ }
+ return false
+ },
+ message: '请输入正确的身份证号',
+ // 触发器可以同时用blur和change
trigger: ['change', 'blur'],
}]
}
diff --git a/subPackage/bs/components/list/rentList.vue b/subPackage/bs/components/list/rentList.vue
index 775b31a..3fd1ebd 100644
--- a/subPackage/bs/components/list/rentList.vue
+++ b/subPackage/bs/components/list/rentList.vue
@@ -11,8 +11,8 @@
<view class="line">
<view class="l">{{item.rentalTime}} - {{item.dueTime}}</view>
- <view class="r status">
- {{item.status}}
+ <view class="r status">
+ {{ findObjValue(item.status, status) }}
</view>
</view>
@@ -57,10 +57,30 @@
isPickerShow: false,
istPickerShow: false,
currentRentalId: '',
- isModelShow: false
+ isModelShow: false,
+ status: [
+ {
+ name: '未到期',
+ value: 0
+ },
+ {
+ name: '已到期',
+ value: 1
+ },
+ {
+ name: '已终止',
+ value: 2
+ },
+ ]
}
},
- methods: {
+ methods: {
+ findObjValue(value, obj) {
+ const res = obj.find(item => {
+ return item.value == value
+ })
+ return res.name
+ },
deleteRental(item) {
this.currentRentalId = item.housingRentalId
this.isModelShow = true
diff --git a/subPackage/bs/views/rentDetail.vue b/subPackage/bs/views/rentDetail.vue
index 5d2a033..424245f 100644
--- a/subPackage/bs/views/rentDetail.vue
+++ b/subPackage/bs/views/rentDetail.vue
@@ -3,31 +3,31 @@
<u-form labelWidth="70" :model="form" :rules="rules" ref="form">
<view class="basic-info">
<u-form-item @click="showSelectBus(dataList.relation, '租客关系', 'relationName', 'relation')"
- class="form-item" labelWidth="100" label="租客关系" required prop="type">
+ class="form-item" labelWidth="100" label="租客关系" required prop="relation">
<u--input border="none" v-model="relationName" disabled disabledColor="#ffffff" placeholder="请选择">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item @click="showSelectBus(dataList.houseType, '房屋状态', 'houseTypeName', 'houseType')"
- class="form-item" labelWidth="100" label="房屋状态:" required prop="type">
+ class="form-item" labelWidth="100" label="房屋状态:" required prop="houseType">
<u--input border="none" v-model="houseTypeName" disabled disabledColor="#ffffff" placeholder="请选择">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item @click="showSelectBus(dataList.rentalUse, '租房用途', 'rentalUseName', 'rentalUse')"
- class="form-item" labelWidth="100" label="租房用途:" required prop="type">
+ class="form-item" labelWidth="100" label="租房用途:" required prop="rentalUse">
<u--input border="none" v-model="rentalUseName" disabled disabledColor="#ffffff" placeholder="请选择">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item @click="rentTimeShow = true" class="form-item" labelWidth="100" label="租房时间:" required
- prop="type">
+ prop="rentTime">
<u--input border="none" v-model="form.rentTime" disabled disabledColor="#ffffff" placeholder="请选择">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item @click="dueTimeShow = true" class="form-item" labelWidth="100" label="到期时间:" required
- prop="type">
+ prop="dueTime">
<u--input border="none" v-model="form.dueTime" disabled disabledColor="#ffffff" placeholder="请选择">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
@@ -48,8 +48,8 @@
<view class="line"></view>
<view class="title">{{ '租客信息-#' + item }}</view>
</view>
- <view class="r" v-if="index === 1">
- <u-icon name="trash-fill" color="#ff0000" size="20" @click="decRentForm"></u-icon>
+ <view class="r" v-if="item > 1">
+ <u-icon name="trash-fill" color="#ff0000" size="20" @click="decRentForm(index)"></u-icon>
</view>
</view>
<rentForm ref="rentform" />
@@ -65,9 +65,9 @@
:popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
</select-bus>
<!--出租时间选择-->
- <u-datetime-picker :show="rentTimeShow" mode="date" @confirm="rentTimeConfirm"
+ <u-datetime-picker :closeOnClickOverlay="true" @close="rentTimeShow = false" :show="rentTimeShow" mode="date" @confirm="rentTimeConfirm"
@cancel="rentTimeShow = false"></u-datetime-picker>
- <u-datetime-picker :show="dueTimeShow" mode="date" @confirm="dueTimeConfirm"
+ <u-datetime-picker :closeOnClickOverlay="true" @close="dueTimeShow = false" :show="dueTimeShow" mode="date" @confirm="dueTimeConfirm"
@cancel="dueTimeShow = false"></u-datetime-picker>
<view class="bottom-tools">
@@ -103,13 +103,35 @@
},
data() {
return {
+ currentRole: '',
form: {
relation: "",
rentTime: "",
dueTime: "",
},
imagesList: [],
- rules: {},
+ rules: {
+ relation: [{
+ required: true,
+ message: '请选择租客关系'
+ }],
+ houseType: [{
+ required: true,
+ message: '请选择房屋状态'
+ }],
+ rentalUse: [{
+ required: true,
+ message: '请选择房屋用途'
+ }],
+ rentTime: [{
+ required: true,
+ message: '请选择租房时间'
+ }],
+ dueTime: [{
+ required: true,
+ message: '请选择到期时间'
+ }]
+ },
rentTimeShow: false,
dueTimeShow: false,
rentFormNum: 1,
@@ -175,6 +197,9 @@
}
},
+ mounted() {
+ this.currentRole = uni.getStorageSync("activeRole")
+ },
methods: {
showSelectBus(data, title, model, key) {
this.selectBusList = data
@@ -199,22 +224,53 @@
this.form.dueTime = time
this.dueTimeShow = false
},
- beforeUpload(e) {
- console.log(e)
- return false
+ async afterReadImg(e) {
+ // const formData = new FormData()
+ // const { file } = e
+ // formData.append('file', file[0])
+ // const res = await uploadFile(formData)
},
addRentForm() {
this.rentFormNum++
},
- decRentForm() {
- this.rentFormNum > 1 && this.rentFormNum--
+ decRentForm(i) {
+ try{
+ let formData = []
+ this.$refs.rentform.forEach(vc => {
+ formData.push(vc.form)
+ })
+ formData.splice(i, 1)
+ formData.forEach((sform, i) => {
+ this.$refs.rentform[i].form = sform
+ })
+ this.rentFormNum > 1 && this.rentFormNum--
+ uni.showToast({
+ title: "删除成功",
+ icon: "success",
+ duration: 1500
+ })
+ }catch(e){
+ uni.showToast({
+ title: "删除失败",
+ icon: "success",
+ duration: 1500
+ })
+ }
},
saveOrUpdate() {
- if (this.rentId === '') {
- this.save()
- return
- }
- this.update()
+ this.$refs.form.validate().then(res => {
+ let rentFormValidGroup = []
+ this.$refs.rentform.forEach(item => {
+ rentFormValidGroup.push(item.$refs.refForm.validate());
+ })
+ Promise.all(rentFormValidGroup).then(result => {
+ if (this.rentId === '') {
+ this.save()
+ return
+ }
+ this.update()
+ })
+ })
},
async save() {
let houseTenantVOList = []
@@ -225,6 +281,7 @@
const statusIndex = this.dataList.houseType.findIndex(item => item.name === this.houseTypeName)
const rentalIndex = this.dataList.rentalUse.findIndex(item => item.name === this.rentalUseName)
let params = {
+ audit_status: this.currentRole.roleAlias === 'inhabitant' ? 0 : 1,
houseCode: this.houseCode,
tenantRelationship: this.dataList.relation[relationIndex].value,
rentalTime: this.form.rentTime,
@@ -233,8 +290,28 @@
rentalUse: this.dataList.rentalUse[rentalIndex].value,
houseTenantVOList
}
-
- const res = await addHouseRental(params)
+ const {
+ code,
+ data
+ } = await addHouseRental(params)
+ if (code !== 200) {
+ uni.showToast({
+ title: "添加租户信息失败",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ uni.showToast({
+ title: "添加租户信息成功",
+ icon: "success",
+ duration: 1500,
+ success: () => {
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1500)
+ }
+ })
},
async update() {
let houseTenantVOList = []
@@ -255,6 +332,24 @@
houseTenantVOList
}
const res = await updateRetalInfo(data)
+ if (res.code !== 200) {
+ uni.showToast({
+ title: "修改租户信息失败",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ uni.showToast({
+ title: "修改租户信息成功",
+ icon: "success",
+ duration: 1500,
+ success: () => {
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1500)
+ }
+ })
},
findObjValue(value, obj) {
const res = obj.find(item => {
@@ -286,10 +381,10 @@
this.relationName = this.findObjValue(tenantRelationship, this.dataList.relation)
this.houseTypeName = this.findObjValue(houseStatus, this.dataList.houseType)
this.rentFormNum = houseTenantVOList.length
- this.$nextTick(() => {
- houseTenantVOList.forEach((item, index) => {
- this.$refs.rentform[index].form = item
- })
+ this.$nextTick(() => {
+ houseTenantVOList.forEach((item, index) => {
+ this.$refs.rentform[index].form = item
+ })
})
}
}
diff --git a/subPackage/house/roomControl/index.vue b/subPackage/house/roomControl/index.vue
index 0ab9ad1..d255440 100644
--- a/subPackage/house/roomControl/index.vue
+++ b/subPackage/house/roomControl/index.vue
@@ -147,6 +147,7 @@
},
onShow() {
this.getLabelList()
+ this.getHouseDetailInfo()
},
methods: {
showLabelPopup(item) {
@@ -163,17 +164,16 @@
},
async getHouseDetailInfo() {
const res = await getHouseDetail()
- const { phone, address, property_price, service_due, image_urls } = res.data
- this.form = {
- phone,
- address,
- property_price,
- service_due,
- image_urls: [
- image_urls
- ]
- }
-
+ // const { phone, address, property_price, service_due, image_urls } = res.data
+ // this.form = {
+ // phone,
+ // address,
+ // property_price,
+ // service_due,
+ // image_urls: [
+ // image_urls
+ // ]
+ // }
},
async getLabelList() {
const res = await getHouseLabelList()
diff --git a/subPackage/house/roomDetails/index.vue b/subPackage/house/roomDetails/index.vue
index 313f698..9b76e5f 100644
--- a/subPackage/house/roomDetails/index.vue
+++ b/subPackage/house/roomDetails/index.vue
@@ -11,7 +11,7 @@
{{ houseInfo.unitName }}单元 {{ houseInfo.houseName }}室(共{{ houseInfo.allNum }}人)
</view>
<view class="flex a-i-c">
- <u-button @click="pushPage" size='small' shape="circle" type="primary" :plain="true"
+ <u-button @click="rommManage" size='small' shape="circle" type="primary" :plain="true"
text="房屋管理"></u-button>
</view>
</view>
@@ -93,11 +93,11 @@
<view class="edit-btn">
<view>
- <u-button type="primary" text="添加成员"></u-button>
+ <u-button type="primary" text="添加成员" @click="addMember"></u-button>
</view>
<view>
- <u-button type="primary" :plain="true" text="添加租赁信息"></u-button>
+ <u-button type="primary" :plain="true" text="添加租赁信息" @click="addRental"></u-button>
</view>
</view>
</view>
@@ -114,6 +114,7 @@
data() {
return {
currentId: '',
+ houseCode: '',
houseInfo: {
// 房间号
houseName: '',
@@ -141,15 +142,24 @@
methods: {
async getHouseRentInfoList() {
const res = await getHouseRentInfo(this.currentId)
+ if (res.code !== 200) {
+ uni.showToast({
+ title: "数据加载失败",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
const {
+ addressCode,
aoiName,
buildingName,
houseName,
unitName,
houseRentalList,
householdList
- } = res.data
- console.log(res.data)
+ } = res.data
+ this.houseCode = addressCode
this.rentOutList = houseRentalList
this.ownerInfoList = householdList
this.houseInfo.houseName = houseName
@@ -165,12 +175,19 @@
// 多人个租客将第一个作为显示
item.tenant = item.houseTenantVOList.length > 0 ? item.houseTenantVOList[0].name : ''
})
- this.houseInfo.allNum = householdList.length
- console.log(res.data)
+ this.houseInfo.allNum = householdList.length
+
},
- pushPage() {
+ rommManage() {
const url = `/subPackage/house/roomControl/index?code=${this.currentId}`
this.$u.func.globalNavigator(url, "navTo")
+ },
+ addRental() {
+ const url = `/subPackage/bs/views/rentDetail?houseCode=${this.houseCode}`
+ this.$u.func.globalNavigator(url, "navTo")
+ },
+ addMember() {
+ this.$u.func.globalNavigator('/subPackage/house/member/index')
}
}
}
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index 2f5f5df..2a87976 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -150,6 +150,7 @@
getLabelList
} from "@/api/label/label";
import {
+ getDoorplateAddressDetail,
getDoorplateAddressList
} from "@/api/doorplateAddress/doorplateAddress";
import {
@@ -174,7 +175,7 @@
buildingCode: "",
label: "",
remark: "",
- imageUrls: [],
+ imageUrls: "",
},
rules: {
'buildingCode': {
@@ -315,7 +316,9 @@
},
activeIds: [],
- showLabelList: []
+ showLabelList: [],
+
+ stdId: "",
}
},
watch: {
@@ -323,7 +326,13 @@
handler(newVal) {
this.form.label = newVal.join(",")
}
+ },
+ "form.buildingCode": {
+ handler(newVal) {
+ console.log(newVal)
+ }
}
+
},
created() {
@@ -332,7 +341,16 @@
mounted() {
},
+ options: {
+ styleIsolation: 'shared', // 解除样式隔离
+ },
onLoad(option) {
+ this.stdId = option.stdId
+ console.log(this.stdId, "----------")
+ if (this.stdId) {
+ this.getBuildingDetail()
+ }
+
},
onShow() {
@@ -340,6 +358,26 @@
this.getLocation()
},
methods: {
+
+ getBuildingDetail(params = {}) {
+
+
+ getDoorplateAddressDetail(Object.assign(params, {
+ stdId: this.stdId
+ })).then(res => {
+ let data = res.data
+ this.form.buildingCode = data.buildingCode
+
+ let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName,
+ data.buildingName
+ ]
+ let arr = buildingNameArr.filter(e => {
+ return e != null || e != ''
+ })
+ this.form.building = arr.join("")
+
+ })
+ },
//表单提交
submit() {
@@ -421,7 +459,6 @@
},
confirmPicker(e) {
- console.log(e, "--------------------")
if (e.value[4]) {
this.selectValue = e.value
@@ -441,9 +478,7 @@
// 微信小程序无法将picker实例传出来,只能通过ref操作
picker = this.$refs.uPicker
} = e
- console.log(e, "/*/*/*")
let item = e.values[columnIndex][index]
- console.log(item, "-----------")
//街道
if (columnIndex === 0) {
//获取社区列表
@@ -568,7 +603,7 @@
.item {
- /deep/ .form-item {
+ .form-item {
background-color: #ffffff;
padding: 2rpx 10px;
border-bottom: 1px solid #eff1f3;
@@ -609,6 +644,12 @@
}
}
+ /deep/ .u-form-item {
+ background-color: #ffffff;
+ padding: 2rpx 10px;
+ border-bottom: 1px solid #eff1f3;
+ }
+
.red {
background-color: red;
border-radius: 10rpx 0rpx 0rpx 10rpx;
--
Gitblit v1.9.3