houseadd.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <view class="check">
  3. <uni-forms ref="form" :model="datainfo">
  4. <view class="cbox">
  5. <view class="chtop flexc">
  6. <image :src="line"></image>
  7. <view>房屋信息</view>
  8. </view>
  9. <view class="chmain">
  10. <uni-forms-item label="房屋坐落" name="location">
  11. <view class="flexc">
  12. <uni-easyinput v-model="datainfo.location" :disabled="isdisabled" :inputBorder='false' placeholder="请输入房屋坐落" />
  13. <view class="rimg"></view>
  14. </view>
  15. </uni-forms-item>
  16. <uni-forms-item label="房屋所属" name="rightType">
  17. <view class="flexc">
  18. <uni-easyinput v-model="datainfo.rightType" :disabled="isdisabled" :inputBorder='false' placeholder="请输入房屋所属" />
  19. <view class="rimg"></view>
  20. </view>
  21. </uni-forms-item>
  22. <uni-forms-item label="建筑面积" name="area">
  23. <view class="flexc">
  24. <uni-easyinput v-model="datainfo.area" :disabled="isdisabled" :inputBorder='false' placeholder="请输入建筑面积" />
  25. <view class="tips">m²</view>
  26. <view class="rimg"></view>
  27. </view>
  28. </uni-forms-item>
  29. <!-- <uni-forms-item label="建筑面积" name="area">
  30. <picker range-key='dictLabel' :value="yglbidx" :range="yglbList" @change='bindDateChange'>
  31. <view class="flexc">
  32. <view class="flex1 txr f13 co27" v-if="datainfo.staffCategory&&!yglb">{{statusFormats(datainfo.staffCategory,yglbList,'yglb')}}</view>
  33. <view class="flex1 txr f13" v-else :class="yglb?'co27':'coa'">{{yglb||"请选择员工类别"}}</view>
  34. <view class="rimg"><image :src="rimg"></image></view>
  35. </view>
  36. </picker>
  37. </uni-forms-item> -->
  38. <uni-forms-item label="房型" name="realName">
  39. <view class="flexjd">
  40. <picker range-key='dictLabel' :disabled="isdisabled" :value="syqxidx" :range="sexs" @change='bindDateChange'>
  41. <view class="flexc ml10">
  42. <view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择'}}</view>
  43. <view class="tips">室</view>
  44. </view>
  45. </picker>
  46. <picker range-key='dictLabel' :disabled="isdisabled" :value="syqxidx" :range="sexs" @change='bindDateChange'>
  47. <view class="flexc ml10">
  48. <view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择'}}</view>
  49. <view class="tips">厅</view>
  50. </view>
  51. </picker>
  52. <view class="rimg"></view>
  53. </view>
  54. </uni-forms-item>
  55. <uni-forms-item label="居住人口" name="realName">
  56. <picker range-key='dictLabel' :disabled="isdisabled" :value="syqxidx" :range="sexs" @change='bindDateChange'>
  57. <view class="flexc">
  58. <view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择居住人口'}}</view>
  59. <view class="rimg"><image :src="rimg"></image></view>
  60. </view>
  61. </picker>
  62. </uni-forms-item>
  63. <uni-forms-item label="有无车位" name="hasParkingSpace">
  64. <picker range-key='dictLabel' :disabled="isdisabled" :value="syqxidx" :range="sexs" @change='bindDateChange'>
  65. <view class="flexc">
  66. <view class="flex1 txr f13" :class="datainfo.hasParkingSpace?'co27':'coa'">{{datainfo.hasParkingSpace?'是':'请选择有/无'}}</view>
  67. <view class="rimg"><image :src="rimg"></image></view>
  68. </view>
  69. </picker>
  70. </uni-forms-item>
  71. <uni-forms-item label="车位号" name="phonenumber">
  72. <view class="flexc">
  73. <uni-easyinput :disabled="isdisabled" v-model="datainfo.phonenumber" :inputBorder='false' placeholder="请输入车位号" />
  74. <view class="rimg"></view>
  75. </view>
  76. </uni-forms-item>
  77. </view>
  78. </view>
  79. </uni-forms>
  80. <view class="pdlr12 mt55">
  81. <view class="rhbtn" @click="getNext">确定添加</view>
  82. </view>
  83. <loading></loading>
  84. </view>
  85. </template>
  86. <script>
  87. import config from '@/config'
  88. import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
  89. import {uploadIdentify} from '@/utils/common.js'
  90. import {houseInfoAdd,houseInfoPut,houseInfoDet} from "@/api/work/people.js"
  91. import {getDictionaryFn} from "@/api/system/user.js"
  92. import {selectValueKey} from "@/utils/common.js"
  93. export default {
  94. components: {},
  95. data() {
  96. return {
  97. line: require('@/car/static/car/line.png'),
  98. car: require('@/car/static/car/carico.png'),
  99. rimg: require('@/people/static/people/rimg.png'),
  100. aphoto: require('@/people/static/people/aphoto.png'),
  101. check: require('@/people/static/people/check.png'),
  102. ncheck: require('@/people/static/people/ncheck.png'),
  103. baseUrl: config.baseUrl,
  104. checkflag:true,
  105. datainfo: {
  106. // "houseId":"",//房屋信息主键
  107. "ownerName":"",////权利人姓名
  108. "location":"",//房屋坐落位置
  109. "rightType":"",//权利类型,如所有权、使用权等
  110. "area":"",//房屋面积,单位为平方米
  111. "documentNumber":"",//房屋相关的字第号
  112. "propertyUnitNumber":"",//不动产单元号
  113. "coOwnership":"",//房屋的共有情况,如共有比例等
  114. "usageType":"",//房屋用途,如住宅、商业等
  115. "usagePeriod":"",//房屋使用期限
  116. "registrationDate":"",//房屋登记日期
  117. "coOwner":"",//共有人姓名,多个共有人可以用逗号分隔
  118. "detailedAddress":"",//房屋的详细门牌号
  119. "hasParkingSpace":"",//是否有车位,Y表示有,N表示无
  120. "communityName":"",//房屋所在小区名称
  121. "houseStatus":""//房屋状态:1-自住,2-出租,3-空闲,4-待售
  122. },
  123. cwlist:[{dictLabel:'有',dictValue:"Y"},{dictLabel:'无',dictValue:"N"}],
  124. id:'',
  125. fwztidx:'',
  126. fwztList:[],
  127. qllxList:[],
  128. fwytList:[],
  129. isdisabled:false,
  130. }
  131. },
  132. onLoad: function() {
  133. },
  134. methods: {
  135. checkPermi,
  136. checkRole,
  137. init(){
  138. // 房屋状态
  139. getDictionaryFn('house_status').then(res=>{
  140. if(res.code==200){
  141. this.fwztList = res.data.map(v => {
  142. return {
  143. dictLabel: v.dictLabel,
  144. dictValue: v.dictValue
  145. }
  146. })
  147. }
  148. })
  149. //权利类型
  150. getDictionaryFn('types_rights').then(res=>{
  151. if(res.code==200){
  152. this.qllxList = res.data.map(v => {
  153. return {
  154. dictLabel: v.dictLabel,
  155. dictValue: v.dictValue
  156. }
  157. })
  158. }
  159. })
  160. //房屋用途
  161. getDictionaryFn('use_remises').then(res=>{
  162. if(res.code==200){
  163. this.fwytList = res.data.map(v => {
  164. return {
  165. dictLabel: v.dictLabel,
  166. dictValue: v.dictValue
  167. }
  168. })
  169. }
  170. })
  171. },
  172. bindDateChange(e){
  173. var val=e.detail.value;
  174. // this.datainfo.applicationBank=this.sdyhlist[val].value;
  175. // this.applicationBank=this.sdyhlist[val].label;
  176. },
  177. getOcrIdCard(obj) {
  178. var params = {
  179. image: obj.url,
  180. idCardSide: obj.type
  181. }
  182. getOcrIdCard(params).then(res => {
  183. if (res.code == 200) {
  184. var datainfo = res.data;
  185. if (obj.type == 'front') {
  186. this.datainfo.realName = datainfo.realName;
  187. this.datainfo.idCard = datainfo.idCard;
  188. this.datainfo.address = datainfo.address;
  189. } else {
  190. this.datainfo.expirationDate = datainfo.expirationDate
  191. }
  192. }
  193. })
  194. }
  195. }
  196. }
  197. </script>
  198. <style>
  199. page{background: #F3F3F0;}
  200. </style>
  201. <style lang="scss" scoped>
  202. .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;}
  203. .check .cbox /deep/ .uni-forms-item:last-child{border: none;}
  204. .check /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;}
  205. .check /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 26rpx;color: #222327;}
  206. .check /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;}
  207. .check /deep/ .uni-easyinput__placeholder-class{font-size: 26rpx;color: #AAAAAA;}
  208. .check /deep/ .uni-input-input{font-size: 26rpx;}
  209. .check /deep/ .uni-textarea-textarea{font-size: 26rpx;}
  210. .check /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
  211. .check /deep/ .uni-data-checklist .checklist-group .checklist-box{margin:10rpx 8rpx 10rpx 16rpx;}
  212. .check /deep/ .uni-forms-item__label text{width: 110rpx;text-align-last: justify;}
  213. .check /deep/ .uni-data-checklist{flex: 0 0 auto;}
  214. .check{min-height: 100vh;padding: 20rpx 18rpx 24rpx;box-sizing: border-box;}
  215. .cbox{background: #FFFFFF;border-radius: 20rpx;flex: 1;margin-bottom: 24rpx;
  216. .chtop{padding-top: 32rpx;margin-bottom: 8rpx;
  217. image{width: 14rpx;height: 48rpx;margin-right: 20rpx;}
  218. view{font-weight: bold;font-size: 32rpx;color: #272727;}
  219. }
  220. .chmain{
  221. padding: 0 32rpx;
  222. .upbox{height: 224rpx;background: #EFF4FF;border-radius: 20rpx;display: flex;align-items: center;justify-content: center;flex-direction: column;margin-bottom: 8rpx;overflow: auto;
  223. .img{width: 100%;height: 100%;}
  224. .addimg{width: 70rpx;height: 70rpx;margin-bottom: 16rpx;}
  225. view{font-weight: bold;font-size: 26rpx;color: #4C6686;}
  226. }
  227. .rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
  228. image{width: 100%;height: 100%;}
  229. }
  230. .checkimg{width: 80rpx;height: 40rpx;margin-right: 8rpx;}
  231. .aphoto{padding: 0 24rpx;border-left: 2rpx solid #e6e6e6;margin-left: 26rpx;
  232. image{width: 40rpx;height: 38rpx;}
  233. }
  234. }
  235. }
  236. .tips{font-weight: bold;color: #272727;font-size: 26rpx;margin-left: 8rpx;}
  237. </style>