addhouse.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  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} 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. onClear(type){
  344. if(type=='qllx'){
  345. this.datainfo.rightType='';
  346. this.qllx='';
  347. }else if(type=='fwzt'){
  348. this.datainfo.houseStatus='';
  349. this.fwzt='';
  350. }else if(type=='fwyt'){
  351. this.datainfo.usageType='';
  352. this.fwyt='';
  353. }else if(type=='ywcw'){
  354. this.datainfo.hasParkingSpace='';
  355. this.ywcw='';
  356. }
  357. },
  358. init(){
  359. // 房屋状态
  360. getDictionaryFn('house_status').then(res=>{
  361. if(res.code==200){
  362. this.fwztList = res.data.map(v => {
  363. return {
  364. dictLabel: v.dictLabel,
  365. dictValue: v.dictValue
  366. }
  367. })
  368. }
  369. })
  370. // 房屋类型
  371. getDictionaryFn('house_type').then(res=>{
  372. if(res.code==200){
  373. this.fwlxList = res.data.map(v => {
  374. return {
  375. dictLabel: v.dictLabel,
  376. dictValue: v.dictValue
  377. }
  378. })
  379. }
  380. })
  381. //权利类型
  382. getDictionaryFn('types_rights').then(res=>{
  383. if(res.code==200){
  384. this.qllxList = res.data.map(v => {
  385. return {
  386. dictLabel: v.dictLabel,
  387. dictValue: v.dictValue
  388. }
  389. })
  390. }
  391. })
  392. //房屋用途
  393. getDictionaryFn('use_remises').then(res=>{
  394. if(res.code==200){
  395. this.fwytList = res.data.map(v => {
  396. return {
  397. dictLabel: v.dictLabel,
  398. dictValue: v.dictValue
  399. }
  400. })
  401. }
  402. })
  403. },
  404. bindDateChange(e){
  405. var val=e.detail.value;
  406. this.datainfo.rightType=this.qllxList[val].dictValue;
  407. this.qllx=this.qllxList[val].dictLabel;
  408. },
  409. bindDateChangea(e){
  410. var val=e.detail.value;
  411. this.datainfo.registrationDate=val;
  412. },
  413. bindDateChangeb(e){
  414. var val=e.detail.value;
  415. this.datainfo.houseStatus=this.fwztList[val].dictValue;
  416. this.fwzt=this.fwztList[val].dictLabel;
  417. },
  418. bindDateChangec(e){
  419. var val=e.detail.value;
  420. this.datainfo.usageType=this.fwytList[val].dictValue;
  421. this.fwyt=this.fwytList[val].dictLabel;
  422. },
  423. bindDateChanged(e){
  424. var val=e.detail.value;
  425. this.datainfo.hasParkingSpace=this.ywcwList[val].dictValue;
  426. this.ywcw=this.ywcwList[val].dictLabel;
  427. },
  428. bindDateChangee(e){
  429. var val=e.detail.value;
  430. this.datainfo.houseType=this.fwlxList[val].dictValue;
  431. this.fwlx=this.fwlxList[val].dictLabel;
  432. },
  433. getDetail(){
  434. houseInfoDet(this.id).then(res=>{
  435. if(res.code==200){
  436. this.datainfo=res.data;
  437. if(res.data&&res.data.detailedAddress){
  438. this.datainfo.xxaddress=res.data.detailedAddress
  439. var address=res.data.detailedAddress;
  440. var indxa=address.indexOf('栋')
  441. var indxb=address.indexOf('单元')
  442. var a = address.split(/[栋单元]/).filter(Boolean);
  443. this.datainfo.loudong=a[0];
  444. this.datainfo.danyuan=a[1];
  445. this.datainfo.xxaddress=a[2];
  446. }
  447. }
  448. })
  449. },
  450. getSubmit(){
  451. this.$refs.form.validate().then(res => {
  452. var params=JSON.parse(JSON.stringify(this.datainfo))
  453. if(!params.loudong||!params.danyuan){
  454. this.$toast("请输入楼栋")
  455. return
  456. }
  457. if(!params.xxaddress){
  458. this.$toast("请输入门牌号")
  459. return
  460. }
  461. params.detailedAddress=`${params.loudong?params.loudong+'栋':''}` + `${params.danyuan?params.danyuan+'单元':''}` + params.xxaddress;
  462. if(this.ptype=='add'){
  463. houseInfoAdd(params).then(res=>{
  464. if(res.code==200){
  465. this.$toast("新增成功")
  466. setTimeout(function(){
  467. uni.$emit("refHouseList")
  468. uni.navigateBack({
  469. delta:1
  470. })
  471. },1500)
  472. }
  473. })
  474. }else{
  475. houseInfoPut(params).then(res=>{
  476. if(res.code==200){
  477. this.$toast("修改成功")
  478. setTimeout(function(){
  479. uni.$emit("refHouseList")
  480. uni.navigateBack({
  481. delta:1
  482. })
  483. },1500)
  484. }
  485. })
  486. }
  487. })
  488. },
  489. getPreview(img) {
  490. var newArr=[];
  491. var url=this.baseUrl+img
  492. newArr.push(url)
  493. uni.previewImage({
  494. urls: newArr,
  495. current:0,
  496. success: function(data) {},
  497. fail: function(err) {}
  498. });
  499. },
  500. getaddImage(e){
  501. let that = this;
  502. let file =[],count=9
  503. uni.chooseImage({
  504. count: 1,
  505. success:function(res){
  506. let img= res.tempFilePaths;
  507. if(img.length + file.length > count){
  508. uni.showToast({
  509. title: '最多上传'+count+'张图片',
  510. icon: 'none',
  511. duration: 2000
  512. })
  513. }else{
  514. let imglen = res.tempFilePaths.length;
  515. var fuwufile = [];
  516. uploadIdentify('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
  517. var resurl=rs[0];
  518. that.datainfo.houseImage=resurl.fileName
  519. if(rs&&rs.length>0){
  520. var obj={
  521. type:e,
  522. url:resurl.urlOnline
  523. }
  524. that.getOcrIdCard(obj)
  525. }
  526. })
  527. }
  528. }
  529. });
  530. },
  531. getOcrIdCard(obj){
  532. var params={
  533. image:obj.url
  534. }
  535. getrealEstateCertificatee(params).then(res=>{
  536. if(res.code==200){
  537. var datainfo=res.data;
  538. this.datainfo.ownerName=datainfo.ownerName;
  539. this.datainfo.location=datainfo.location;
  540. this.datainfo.rightType=datainfo.rightType;
  541. this.datainfo.area=datainfo.area;
  542. this.datainfo.documentNumber=datainfo.documentNumber;
  543. this.datainfo.propertyUnitNumber=datainfo.propertyUnitNumber;
  544. this.datainfo.coOwnership=datainfo.coOwnership;
  545. this.datainfo.usageType=datainfo.usageType;
  546. this.datainfo.usagePeriod=datainfo.usagePeriod;
  547. this.datainfo.registrationDate=datainfo.registrationDate;
  548. this.datainfo.coOwner=datainfo.coOwner;
  549. }
  550. })
  551. },
  552. }
  553. }
  554. </script>
  555. <style>
  556. page{background: #F3F3F0;}
  557. </style>
  558. <style lang="scss" scoped>
  559. .coa /deep/ .uni-date__x-input{text-align: right;color: #AAAAAA;}
  560. .check /deep/ .uni-date-editor--x__disabled{opacity: 1;}
  561. .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;}
  562. .check /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;}
  563. .check /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 26rpx;color: #222327;}
  564. .check /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;}
  565. .check /deep/ .uni-easyinput__placeholder-class{font-size: 26rpx;color: #AAAAAA;}
  566. .check /deep/ .uni-input-input{font-size: 26rpx;}
  567. .check /deep/ .uni-textarea-textarea{font-size: 26rpx;}
  568. .check /deep/ .uni-forms-item__label text{width: 110rpx;text-align-last: justify;}
  569. .check /deep/ .uni-forms-item__label .is-required{width: auto;}
  570. .check /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
  571. .check{min-height: 100vh;padding: 20rpx 18rpx 22rpx;box-sizing: border-box;display: flex;box-sizing: border-box;}
  572. .cbox{background: #FFFFFF;border-radius: 20rpx;flex: 1;padding-bottom: 28rpx;
  573. .chtop{padding-top: 32rpx;margin-bottom: 22rpx;
  574. .line{width: 14rpx;height: 48rpx;background: #0256FD;border-radius:0 12rpx 12rpx 0;margin-right: 18rpx;}
  575. view{font-weight: bold;font-size: 32rpx;color: #272727;}
  576. }
  577. .chmain{
  578. padding: 0 32rpx;
  579. .upbox{height: 224rpx;background: #EFF4FF;border-radius: 20rpx;display: flex;align-items: center;justify-content: center;flex-direction: column;margin-bottom: 8rpx;overflow: auto;
  580. .img{width: 100%;height: 100%;}
  581. .addimg{width: 90rpx;height: 90rpx;margin-bottom: 8rpx;}
  582. view{font-weight: bold;font-size: 26rpx;color: #4C6686;}
  583. }
  584. }
  585. .rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
  586. image{width: 100%;height: 100%;}
  587. }
  588. }
  589. .tips{font-weight: bold;color: #272727;font-size: 26rpx;margin-left: 8rpx;}
  590. .fczimg{width: 100rpx;height: 100rpx;}
  591. </style>