addhouse.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. <template>
  2. <view class="check">
  3. <view class="cbox">
  4. <view class="chtop flexc">
  5. <view class="line"></view>
  6. <view>房屋信息</view>
  7. </view>
  8. <view class="chmain">
  9. <uni-forms ref="form" :model="datainfo" :rules="rules">
  10. <view class="upbox" @click="getaddImage">
  11. <image :src="cmico" class="addimg"></image>
  12. <view>扫描房产证自动填写</view>
  13. </view>
  14. <uni-forms-item label="房产证" required name="location" v-if="datainfo.houseImage">
  15. <view class="flexc">
  16. <view class="flex1"></view>
  17. <image :src="baseUrl+datainfo.houseImage" class="fczimg" v-if="datainfo.houseImage" @click="getPreview(datainfo.houseImage)"></image>
  18. <view class="rimg"></view>
  19. </view>
  20. </uni-forms-item>
  21. <uni-forms-item label="房屋坐落" required name="location">
  22. <view class="flexc">
  23. <uni-easyinput :disabled="isdisabled" v-model="datainfo.location" :inputBorder='false' placeholder="自动识别" />
  24. <view class="rimg"></view>
  25. </view>
  26. </uni-forms-item>
  27. <uni-forms-item label="房屋类型" required name="houseType">
  28. <picker range-key='dictLabel' :disabled="isdisabled" :value="fwlxidx" :range="fwlxList" @change='bindDateChangee'>
  29. <view class="flexc mh35">
  30. <view class="flex1 txr f13 co27" v-if="datainfo.houseType&&!fwlx">{{statusFormats(datainfo.houseType,fwlxList,'fwlx')}}</view>
  31. <view class="flex1 txr f13" v-else :class="fwlx?'co27':'coa'">{{fwlx||"请选择房屋类型"}}</view>
  32. <view class="rimg"><image :src="rimg"></image></view>
  33. </view>
  34. </picker>
  35. </uni-forms-item>
  36. <uni-forms-item label="权利人姓名" name="ownerName">
  37. <view class="flexc">
  38. <uni-easyinput :disabled="isdisabled" v-model="datainfo.ownerName" :inputBorder='false' placeholder="自动识别" />
  39. <view class="rimg"></view>
  40. </view>
  41. </uni-forms-item>
  42. <uni-forms-item label="权利类型" name="rightType">
  43. <picker range-key='dictLabel' :disabled="isdisabled" :value="qllxidx" :range="qllxList" @change='bindDateChange'>
  44. <view class="flexc">
  45. <view class="flex1 txr f13 co27" v-if="datainfo.rightType&&!qllx">{{statusFormats(datainfo.rightType,qllxList,'qllx')}}</view>
  46. <view class="flex1 txr f13" v-else :class="qllx?'co27':'coa'">{{qllx||"请选择权利类型"}}</view>
  47. <view class="flex0" @click.stop="">
  48. <uni-icons v-if="datainfo.rightType" class="content-clear-icon" type="clear" size="24" color="#c0c4cc" @click="onClear('qllx')"></uni-icons>
  49. </view>
  50. <view class="rimg"><image :src="rimg"></image></view>
  51. </view>
  52. </picker>
  53. </uni-forms-item>
  54. <uni-forms-item label="建筑面积" required name="area">
  55. <view class="flexc">
  56. <uni-easyinput :disabled="isdisabled" v-model="datainfo.area" :inputBorder='false' placeholder="自动识别" />
  57. <view class="tips">m²</view>
  58. <view class="rimg"></view>
  59. </view>
  60. </uni-forms-item>
  61. <uni-forms-item label="不动产单元号" name="propertyUnitNumber">
  62. <view class="flexc">
  63. <uni-easyinput :disabled="isdisabled" v-model="datainfo.propertyUnitNumber" :inputBorder='false' placeholder="请输入不动产单元号" />
  64. <view class="rimg"></view>
  65. </view>
  66. </uni-forms-item>
  67. <uni-forms-item label="相关的字第号" name="documentNumber">
  68. <view class="flexc">
  69. <uni-easyinput :disabled="isdisabled" v-model="datainfo.documentNumber" :inputBorder='false' placeholder="请输入相关的字第号" />
  70. <view class="rimg"></view>
  71. </view>
  72. </uni-forms-item>
  73. <uni-forms-item label="小区名称" name="communityName">
  74. <view class="flexc">
  75. <uni-easyinput :disabled="isdisabled" v-model="datainfo.communityName" :inputBorder='false' placeholder="请输入小区名称" />
  76. <view class="rimg"></view>
  77. </view>
  78. </uni-forms-item>
  79. <uni-forms-item label="楼栋" required name="loudong">
  80. <view class="flexcc">
  81. <view class="flexc ml10">
  82. <uni-easyinput :disabled="isdisabled" v-model="datainfo.loudong" :inputBorder='false' placeholder="请输入" />
  83. <view class="tips">栋</view>
  84. </view>
  85. <view class="flexc ml10">
  86. <uni-easyinput :disabled="isdisabled" v-model="datainfo.danyuan" :inputBorder='false' placeholder="请输入" />
  87. <view class="tips">单元</view>
  88. </view>
  89. <view class="rimg"></view>
  90. </view>
  91. </uni-forms-item>
  92. <uni-forms-item label="门牌号" required name="xxaddress">
  93. <view class="flexc">
  94. <uni-easyinput :disabled="isdisabled" v-model="datainfo.xxaddress" :inputBorder='false' placeholder="请输入门牌号" />
  95. <view class="rimg"></view>
  96. </view>
  97. </uni-forms-item>
  98. <uni-forms-item label="使用期限" name="usagePeriod">
  99. <view class="flexc">
  100. <uni-easyinput :disabled="isdisabled" v-model="datainfo.usagePeriod" :inputBorder='false' placeholder="请输入使用期限" />
  101. <view class="rimg"></view>
  102. </view>
  103. </uni-forms-item>
  104. <uni-forms-item label="登记日期" name="registrationDate">
  105. <!-- <picker mode="timed" :disabled="isdisabled" @change='bindDateChangea'>
  106. <view class="flexc">
  107. <view class="flex1 txr f13" :class="datainfo.registrationDate?'co27':'coa'">{{datainfo.registrationDate||"请选择登记日期"}}</view>
  108. <view class="rimg"><image :src="rimg"></image></view>
  109. </view>
  110. </picker> -->
  111. <!-- :hide-second='true' -->
  112. <view class="flexc">
  113. <uni-datetime-picker :disabled="isdisabled" :class="datainfo.registrationDate?'co27':'coa'" type="datetime" placeholder="请选择登记日期" :border="false" v-model="datainfo.registrationDate" @change="changeLog" />
  114. <view class="rimg"><image :src="rimg"></image></view>
  115. </view>
  116. </uni-forms-item>
  117. <uni-forms-item label="共有姓名" name="coOwner">
  118. <view class="flexc">
  119. <uni-easyinput :disabled="isdisabled" v-model="datainfo.coOwner" :inputBorder='false' placeholder="请输入共有姓名" />
  120. <view class="rimg"></view>
  121. </view>
  122. </uni-forms-item>
  123. <uni-forms-item label="共有情况" name="coOwnership">
  124. <view class="flexc">
  125. <uni-easyinput :disabled="isdisabled" v-model="datainfo.coOwnership" :inputBorder='false' placeholder="请输入共有情况" />
  126. <view class="rimg"></view>
  127. </view>
  128. </uni-forms-item>
  129. <uni-forms-item label="房屋状态" name="houseStatus">
  130. <picker range-key='dictLabel' :disabled="isdisabled" :value="fwztidx" :range="fwztList" @change='bindDateChangeb'>
  131. <view class="flexc">
  132. <view class="flex1 txr f13 co27" v-if="datainfo.houseStatus&&!fwzt">{{statusFormats(datainfo.houseStatus,fwztList,'fwzt')}}</view>
  133. <view class="flex1 txr f13" v-else :class="fwzt?'co27':'coa'">{{fwzt||"请选择房屋状态"}}</view>
  134. <view class="flex0" @click.stop="">
  135. <uni-icons v-if="datainfo.houseStatus" class="content-clear-icon" type="clear" size="24" color="#c0c4cc" @click="onClear('fwzt')"></uni-icons>
  136. </view>
  137. <view class="rimg"><image :src="rimg"></image></view>
  138. </view>
  139. </picker>
  140. </uni-forms-item>
  141. <uni-forms-item label="房屋用途" name="usageType">
  142. <picker range-key='dictLabel' :disabled="isdisabled" :value="fwytidx" :range="fwytList" @change='bindDateChangec'>
  143. <view class="flexc">
  144. <view class="flex1 txr f13 co27" v-if="datainfo.usageType&&!fwyt">{{statusFormats(datainfo.usageType,fwytList,'fwyt')}}</view>
  145. <view class="flex1 txr f13" v-else :class="fwyt?'co27':'coa'">{{fwyt||"请选择房屋用途"}}</view>
  146. <view class="flex0" @click.stop="">
  147. <uni-icons v-if="datainfo.usageType" class="content-clear-icon" type="clear" size="24" color="#c0c4cc" @click="onClear('fwyt')"></uni-icons>
  148. </view>
  149. <view class="rimg"><image :src="rimg"></image></view>
  150. </view>
  151. </picker>
  152. </uni-forms-item>
  153. <uni-forms-item label="有无车位" name="hasParkingSpace">
  154. <picker range-key='dictLabel' :disabled="isdisabled" :value="ywcwidx" :range="ywcwList" @change='bindDateChanged'>
  155. <view class="flexc">
  156. <view class="flex1 txr f13 co27" v-if="datainfo.hasParkingSpace&&!ywcw">{{statusFormats(datainfo.hasParkingSpace,ywcwList,'ywcw')}}</view>
  157. <view class="flex1 txr f13" v-else :class="ywcw?'co27':'coa'">{{ywcw||"请选择有/无"}}</view>
  158. <view class="flex0" @click.stop="">
  159. <uni-icons v-if="datainfo.hasParkingSpace" class="content-clear-icon" type="clear" size="24" color="#c0c4cc" @click="onClear('ywcw')"></uni-icons>
  160. </view>
  161. <view class="rimg"><image :src="rimg"></image></view>
  162. </view>
  163. </picker>
  164. </uni-forms-item>
  165. <uni-forms-item label="车位号" name="parkingNumber">
  166. <view class="flexc">
  167. <uni-easyinput :disabled="isdisabled" v-model="datainfo.parkingNumber" :inputBorder='false' placeholder="请输入车位号" />
  168. <view class="rimg"></view>
  169. </view>
  170. </uni-forms-item>
  171. <!-- <uni-forms-item label="房型" name="realName">
  172. <view class="flexjd">
  173. <picker range-key='dictLabel' :value="syqxidx" :range="sexs" @change='bindDateChange'>
  174. <view class="flexc ml10">
  175. <view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择'}}</view>
  176. <view class="tips">室</view>
  177. </view>
  178. </picker>
  179. <picker range-key='dictLabel' :value="syqxidx" :range="sexs" @change='bindDateChange'>
  180. <view class="flexc ml10">
  181. <view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择'}}</view>
  182. <view class="tips">厅</view>
  183. </view>
  184. </picker>
  185. <view class="rimg"></view>
  186. </view>
  187. </uni-forms-item> -->
  188. <!-- <uni-forms-item label="住户类型" name="realName">
  189. <picker range-key='dictLabel' :disabled="isdisabled" :value="syqxidx" :range="sexs" @change='bindDateChange'>
  190. <view class="flexc">
  191. <view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择住户类型'}}</view>
  192. <view class="rimg"><image :src="rimg"></image></view>
  193. </view>
  194. </picker>
  195. </uni-forms-item> -->
  196. <!-- <uni-forms-item label="是否户主" name="phonenumber">
  197. <view class="flexc">
  198. <uni-easyinput :disabled="isdisabled" v-model="datainfo.phonenumber" disabled :inputBorder='false' placeholder="自动识别" />
  199. <view class="rimg"></view>
  200. </view>
  201. </uni-forms-item>
  202. <uni-forms-item label="与户主关系" :disabled="isdisabled" name="realName">
  203. <picker range-key='dictLabel' :value="syqxidx" :range="sexs" @change='bindDateChange'>
  204. <view class="flexc">
  205. <view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择与户主关系'}}</view>
  206. <view class="rimg"><image :src="rimg"></image></view>
  207. </view>
  208. </picker>
  209. </uni-forms-item>
  210. <uni-forms-item label="居住人口" name="realName">
  211. <picker range-key='dictLabel' :disabled="isdisabled" :value="syqxidx" :range="sexs" @change='bindDateChange'>
  212. <view class="flexc">
  213. <view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择居住人口'}}</view>
  214. <view class="rimg"><image :src="rimg"></image></view>
  215. </view>
  216. </picker>
  217. </uni-forms-item> -->
  218. </uni-forms>
  219. <view class="rhbtn mt30" @click="getEditFn" v-if="isdisabled">修改</view>
  220. <view class="rhbtn mt30" @click="getSubmit" v-else>确定修改</view>
  221. </view>
  222. </view>
  223. <loading></loading>
  224. </view>
  225. </template>
  226. <script>
  227. import config from '@/config'
  228. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  229. import {uploadIdentify,selectValueKey,geocodeAddress,selectDictLabelkey} from '@/utils/common.js'
  230. import {getDictionaryFn} from "@/api/system/user.js"
  231. import {houseInfoAdd,houseInfoPut,houseInfoDet} from "@/api/work/work.js"
  232. import {getrealEstateCertificatee} from "@/api/system/card.js"
  233. export default{
  234. components:{},
  235. data(){
  236. return{
  237. rimg: require('@/people/static/people/rimg.png'),
  238. cmico:require('@/people/static/people/cmico.png'),
  239. baseUrl:config.baseUrl,
  240. datainfo:{
  241. // "houseId":"",//房屋信息主键
  242. "ownerName":"",//权利人姓名
  243. "location":"",//房屋坐落位置
  244. "rightType":"",//权利类型,如所有权、使用权等
  245. "area":"",//房屋面积,单位为平方米
  246. "houseType":null,//房屋类型 1:普通住宅,2:洋房
  247. "documentNumber":"",//房屋相关的字第号
  248. "propertyUnitNumber":"",//不动产单元号
  249. "coOwnership":"",//房屋的共有情况,如共有比例等
  250. "usageType":"",//房屋用途,如住宅、商业等
  251. "usagePeriod":"",//房屋使用期限
  252. "registrationDate":"",//房屋登记日期
  253. "coOwner":"",//共有人姓名,多个共有人可以用逗号分隔
  254. "detailedAddress":"",//房屋的门牌号
  255. "hasParkingSpace":"",//是否有车位,Y表示有,N表示无
  256. "communityName":this.$store.state.user.companyName,//房屋所在小区名称
  257. "houseStatus":"",//房屋状态:1-自住,2-出租,3-空闲,4-待售
  258. "parkingNumber":'',//车位号
  259. 'houseImage':'',//房本照片
  260. },
  261. rules: {
  262. location: {rules: [{required: true,errorMessage: '请输入房屋坐落位置' }]},
  263. // houseType: {rules: [{required: true,errorMessage: '请选择房屋类型' }]},
  264. // detailedAddress: {rules: [{required: true,errorMessage: '请输入门牌号' }]},
  265. area: {rules: [{required: true,errorMessage: '请输入面积' }]},
  266. },
  267. id:'',
  268. ptype:'add',
  269. fwzt:'',
  270. qllx:'',
  271. fwyt:'',
  272. ywcw:'',
  273. fwlx:'',
  274. fwztidx:'',
  275. qllxidx:'',
  276. fwytidx:'',
  277. ywcwidx:'',
  278. fwlxidx:'',
  279. fwztList:[],
  280. qllxList:[],
  281. fwytList:[],
  282. fwlxList:[],
  283. ywcwList:[{dictLabel:'有',dictValue:'Y'},{dictLabel:'无',dictValue:'N'},],
  284. isdisabled:false,
  285. latitude:'',
  286. longitude:"",
  287. starttime:''
  288. }
  289. },
  290. onLoad: function(e) {
  291. if(e.id){
  292. this.id=e.id;
  293. this.ptype="edit";
  294. // this.isdisabled=true;
  295. this.getDetail()
  296. }
  297. this.time()
  298. this.init()
  299. },
  300. onPageScroll(e) {
  301. var scrollTop = Number(e.scrollTop);
  302. if (scrollTop > 0) {
  303. this.backgroundColor = '#45CB99'
  304. } else {
  305. this.backgroundColor = 'transparent'
  306. }
  307. },
  308. methods:{
  309. checkPermi, checkRole,
  310. getEditFn(){
  311. this.isdisabled=false;
  312. },
  313. time() {
  314. var date = new Date();
  315. var y = date.getFullYear();
  316. var m = date.getMonth() + 1;
  317. var d = date.getDate();
  318. var h = date.getHours();
  319. var min = date.getMinutes();
  320. var s = date.getSeconds();
  321. var yearStr = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d)
  322. // var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
  323. // '0' + s) : s);
  324. // var kaTime = yearStr + ' ' + timeStr;
  325. this.starttime=yearStr
  326. // return kaTime
  327. },
  328. statusFormats(data, list,type) {
  329. var aite=selectValueKey(list, data);
  330. if(type=='qllx'){
  331. this.qllxidx=aite.key;
  332. }else if(type=='fwzt'){
  333. this.fwztidx=aite.key;
  334. }else if(type=='fwyt'){
  335. this.fwytidx=aite.key;
  336. }else if(type=='ywcw'){
  337. this.ywcwidx=aite.key;
  338. }else if(type=='fwlx'){
  339. this.fwlxidx=aite.key;
  340. }
  341. return aite.actions;
  342. },
  343. statuslabFormats(data, list,type) {
  344. var aite=selectDictLabelkey(list, data);
  345. if(type=='qllx'){
  346. this.qllxidx=aite.key;
  347. }else if(type=='fwzt'){
  348. this.fwztidx=aite.key;
  349. }else if(type=='fwyt'){
  350. this.fwytidx=aite.key;
  351. }else if(type=='ywcw'){
  352. this.ywcwidx=aite.key;
  353. }else if(type=='fwlx'){
  354. this.fwlxidx=aite.key;
  355. }
  356. return aite.actions;
  357. },
  358. onClear(type){
  359. if(type=='qllx'){
  360. this.datainfo.rightType='';
  361. this.qllx='';
  362. }else if(type=='fwzt'){
  363. this.datainfo.houseStatus='';
  364. this.fwzt='';
  365. }else if(type=='fwyt'){
  366. this.datainfo.usageType='';
  367. this.fwyt='';
  368. }else if(type=='ywcw'){
  369. this.datainfo.hasParkingSpace='';
  370. this.ywcw='';
  371. }
  372. },
  373. init(){
  374. // 房屋状态
  375. getDictionaryFn('house_status').then(res=>{
  376. if(res.code==200){
  377. this.fwztList = res.data.map(v => {
  378. return {
  379. dictLabel: v.dictLabel,
  380. dictValue: v.dictValue
  381. }
  382. })
  383. }
  384. })
  385. // 房屋类型
  386. getDictionaryFn('house_type').then(res=>{
  387. if(res.code==200){
  388. this.fwlxList = res.data.map(v => {
  389. return {
  390. dictLabel: v.dictLabel,
  391. dictValue: v.dictValue
  392. }
  393. })
  394. }
  395. })
  396. //权利类型
  397. getDictionaryFn('types_rights').then(res=>{
  398. if(res.code==200){
  399. this.qllxList = res.data.map(v => {
  400. return {
  401. dictLabel: v.dictLabel,
  402. dictValue: v.dictValue
  403. }
  404. })
  405. }
  406. })
  407. //房屋用途
  408. getDictionaryFn('use_remises').then(res=>{
  409. if(res.code==200){
  410. this.fwytList = res.data.map(v => {
  411. return {
  412. dictLabel: v.dictLabel,
  413. dictValue: v.dictValue
  414. }
  415. })
  416. }
  417. })
  418. },
  419. bindDateChange(e){
  420. var val=e.detail.value;
  421. this.datainfo.rightType=this.qllxList[val].dictValue;
  422. this.qllx=this.qllxList[val].dictLabel;
  423. },
  424. bindDateChangea(e){
  425. var val=e.detail.value;
  426. this.datainfo.registrationDate=val;
  427. },
  428. bindDateChangeb(e){
  429. var val=e.detail.value;
  430. this.datainfo.houseStatus=this.fwztList[val].dictValue;
  431. this.fwzt=this.fwztList[val].dictLabel;
  432. },
  433. bindDateChangec(e){
  434. var val=e.detail.value;
  435. this.datainfo.usageType=this.fwytList[val].dictValue;
  436. this.fwyt=this.fwytList[val].dictLabel;
  437. },
  438. bindDateChanged(e){
  439. var val=e.detail.value;
  440. this.datainfo.hasParkingSpace=this.ywcwList[val].dictValue;
  441. this.ywcw=this.ywcwList[val].dictLabel;
  442. },
  443. bindDateChangee(e){
  444. var val=e.detail.value;
  445. this.datainfo.houseType=this.fwlxList[val].dictValue;
  446. this.fwlx=this.fwlxList[val].dictLabel;
  447. },
  448. changeLog(){
  449. },
  450. getDetail(){
  451. houseInfoDet(this.id).then(res=>{
  452. if(res.code==200){
  453. this.datainfo=res.data;
  454. if(res.data&&res.data.detailedAddress){
  455. this.datainfo.xxaddress=res.data.detailedAddress
  456. var address=res.data.detailedAddress;
  457. var indxa=address.indexOf('栋')
  458. var indxb=address.indexOf('单元')
  459. var a = address.split(/[栋单元]/).filter(Boolean);
  460. this.datainfo.loudong=a[0];
  461. this.datainfo.danyuan=a[1];
  462. this.datainfo.xxaddress=a[2];
  463. }
  464. }
  465. })
  466. },
  467. getSubmit(){
  468. this.$refs.form.validate().then(res => {
  469. var params=JSON.parse(JSON.stringify(this.datainfo))
  470. if(!params.loudong||!params.danyuan){
  471. this.$toast("请输入楼栋")
  472. return
  473. }
  474. if(!params.xxaddress){
  475. this.$toast("请输入门牌号")
  476. return
  477. }
  478. params.detailedAddress=`${params.loudong?params.loudong+'栋':''}` + `${params.danyuan?params.danyuan+'单元':''}` + params.xxaddress;
  479. if(this.ptype=='add'){
  480. houseInfoAdd(params).then(res=>{
  481. if(res.code==200){
  482. this.$toast("新增成功")
  483. setTimeout(function(){
  484. uni.$emit("refHouseList")
  485. uni.navigateBack({
  486. delta:1
  487. })
  488. },1500)
  489. }
  490. })
  491. }else{
  492. houseInfoPut(params).then(res=>{
  493. if(res.code==200){
  494. this.$toast("修改成功")
  495. setTimeout(function(){
  496. uni.$emit("refHouseList")
  497. uni.navigateBack({
  498. delta:1
  499. })
  500. },1500)
  501. }
  502. })
  503. }
  504. })
  505. },
  506. getPreview(img) {
  507. var newArr=[];
  508. var url=this.baseUrl+img
  509. newArr.push(url)
  510. uni.previewImage({
  511. urls: newArr,
  512. current:0,
  513. success: function(data) {},
  514. fail: function(err) {}
  515. });
  516. },
  517. getaddImage(e){
  518. let that = this;
  519. let file =[],count=9
  520. uni.chooseImage({
  521. count: 1,
  522. success:function(res){
  523. let img= res.tempFilePaths;
  524. if(img.length + file.length > count){
  525. uni.showToast({
  526. title: '最多上传'+count+'张图片',
  527. icon: 'none',
  528. duration: 2000
  529. })
  530. }else{
  531. let imglen = res.tempFilePaths.length;
  532. var fuwufile = [];
  533. uploadIdentify('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
  534. var resurl=rs[0];
  535. that.datainfo.houseImage=resurl.fileName
  536. if(rs&&rs.length>0){
  537. var obj={
  538. type:e,
  539. url:resurl.urlOnline
  540. }
  541. that.getOcrIdCard(obj)
  542. }
  543. })
  544. }
  545. }
  546. });
  547. },
  548. getOcrIdCard(obj){
  549. var params={
  550. image:obj.url
  551. }
  552. getrealEstateCertificatee(params).then(res=>{
  553. if(res.code==200){
  554. var datainfo=res.data;
  555. this.datainfo.ownerName=datainfo.ownerName;
  556. this.datainfo.location=datainfo.location;
  557. if(datainfo.rightType){
  558. this.datainfo.rightType=this.statuslabFormats(datainfo.rightType,this.qllxList,'qllx');
  559. this.qllx=datainfo.rightType
  560. }
  561. this.datainfo.area=datainfo.area;
  562. this.datainfo.documentNumber=datainfo.documentNumber;
  563. this.datainfo.propertyUnitNumber=datainfo.propertyUnitNumber;
  564. this.datainfo.coOwnership=datainfo.coOwnership;
  565. if(datainfo.usageType){
  566. this.datainfo.usageType=this.statuslabFormats(datainfo.usageType,this.fwytList,'fcz');
  567. this.fwyt=datainfo.usageType;
  568. }
  569. this.datainfo.usagePeriod=datainfo.usagePeriod;
  570. this.datainfo.registrationDate=datainfo.registrationDate;
  571. this.datainfo.coOwner=datainfo.coOwner;
  572. }
  573. })
  574. },
  575. }
  576. }
  577. </script>
  578. <style>
  579. page{background: #F3F3F0;}
  580. </style>
  581. <style lang="scss" scoped>
  582. .coa /deep/ .uni-date__x-input{text-align: right;color: #AAAAAA;}
  583. .check /deep/ .uni-date-editor--x__disabled{opacity: 1;}
  584. .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;}
  585. .check /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;}
  586. .check /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 26rpx;color: #222327;}
  587. .check /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;}
  588. .check /deep/ .uni-easyinput__placeholder-class{font-size: 26rpx;color: #AAAAAA;}
  589. .check /deep/ .uni-input-input{font-size: 26rpx;}
  590. .check /deep/ .uni-textarea-textarea{font-size: 26rpx;}
  591. .check /deep/ .uni-forms-item__label text{width: 110rpx;text-align-last: justify;}
  592. .check /deep/ .uni-forms-item__label .is-required{width: auto;}
  593. .check /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
  594. .check{min-height: 100vh;padding: 20rpx 18rpx 22rpx;box-sizing: border-box;display: flex;box-sizing: border-box;}
  595. .cbox{background: #FFFFFF;border-radius: 20rpx;flex: 1;padding-bottom: 28rpx;
  596. .chtop{padding-top: 32rpx;margin-bottom: 22rpx;
  597. .line{width: 14rpx;height: 48rpx;background: #0256FD;border-radius:0 12rpx 12rpx 0;margin-right: 18rpx;}
  598. view{font-weight: bold;font-size: 32rpx;color: #272727;}
  599. }
  600. .chmain{
  601. padding: 0 32rpx;
  602. .upbox{height: 224rpx;background: #EFF4FF;border-radius: 20rpx;display: flex;align-items: center;justify-content: center;flex-direction: column;margin-bottom: 8rpx;overflow: auto;
  603. .img{width: 100%;height: 100%;}
  604. .addimg{width: 90rpx;height: 90rpx;margin-bottom: 8rpx;}
  605. view{font-weight: bold;font-size: 26rpx;color: #4C6686;}
  606. }
  607. }
  608. .rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
  609. image{width: 100%;height: 100%;}
  610. }
  611. }
  612. .tips{font-weight: bold;color: #272727;font-size: 26rpx;margin-left: 8rpx;}
  613. .fczimg{width: 100rpx;height: 100rpx;}
  614. </style>