houseuser-check.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <template>
  2. <basic-container>
  3. <avue-form :option="option" v-model="reviewDetail" ref="form">
  4. </avue-form>
  5. <div v-if="reviewType">
  6. <el-row>
  7. <el-col span="24" align="right">
  8. <el-button type="primary" icon="el-icon-check" size="small" @click="reviewExamine(1)">通过</el-button>
  9. <el-button type="info" icon="el-icon-delete" size="small" @click="reviewExamine(2)">不通过</el-button>
  10. </el-col>
  11. </el-row>
  12. </div>
  13. </basic-container>
  14. </template>
  15. <script>
  16. import {updateByCheckStatus, getDetail} from "@/api/estate/applyuser";
  17. import {validatePhone} from "../../util/validator";
  18. import done from "@/views/work/done";
  19. export default {
  20. name: 'houseuser-check',
  21. props: {
  22. closeFn: {type: Function},
  23. reviewDetail: {},
  24. url: '',
  25. reviewType: false,
  26. },
  27. data() {
  28. return {
  29. option:{
  30. menuBtn: false,
  31. column: [
  32. {
  33. label: "住户姓名",
  34. prop: "name",
  35. disabled: true,
  36. },
  37. {
  38. label: "性别",
  39. prop: "sex",
  40. type: "select",
  41. dataType: "string",
  42. disabled: true,
  43. hide: true,
  44. width: 80,
  45. dicData:[
  46. {
  47. label: "未定义",
  48. value: -1
  49. },
  50. {
  51. label: "男",
  52. value: 1
  53. },
  54. {
  55. label: "女",
  56. value: 2
  57. },
  58. ],
  59. // dicUrl: "/api/blade-system/dict-biz/dictionary?code=sex",
  60. // props: {
  61. // label: "dictValue",
  62. // value: "dictKey"
  63. // },
  64. },
  65. {
  66. label: "住户类型",
  67. prop: "type",
  68. type: "select",
  69. dataType: "string",
  70. disabled: true,
  71. hide: true,
  72. dicData:[
  73. {
  74. label: "业主",
  75. value: 0
  76. },
  77. {
  78. label: "家属",
  79. value: 1
  80. },
  81. {
  82. label: "租客",
  83. value: 2
  84. },
  85. ],
  86. // dicUrl: "/api/blade-system/dict-biz/dictionary?code=household-type",
  87. // props: {
  88. // label: "dictValue",
  89. // value: "dictKey"
  90. // },
  91. },
  92. {
  93. label: "身份证",
  94. prop: "idCard",
  95. width: 150,
  96. disabled: true,
  97. },
  98. {
  99. label: "小区名称",
  100. prop: "residentialName",
  101. editDisplay: false,
  102. addDisplay: false,
  103. disabled: true,
  104. hide: true,
  105. },
  106. // {
  107. // label: "所属小区",
  108. // prop: "residentialId",
  109. // type: "select",
  110. // disabled: true,
  111. // cascaderItem: ['buildingId'],
  112. // dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}",
  113. // dicFormatter:(res)=>{
  114. // return res.data.records;//返回字典的层级结构
  115. // },
  116. // // dicFlag: false,
  117. // filterable: true,
  118. // props: {
  119. // label: "name",
  120. // value: "id"
  121. // },
  122. // rules: [{
  123. // required: true,
  124. // message: "请输入所属小区id",
  125. // trigger: "blur"
  126. // }]
  127. // },
  128. // {
  129. // label: "小区名称",
  130. // prop: "residentialName",
  131. // display: false,
  132. // hide: true,
  133. // rules: [{
  134. // required: true,
  135. // message: "请输入小区名称",
  136. // trigger: "blur"
  137. // }]
  138. // },
  139. // {
  140. // label: "所属楼栋",
  141. // prop: "buildingId",
  142. // type: "select",
  143. // disabled: true,
  144. // search: true,
  145. // cascaderItem: ['unitId'],
  146. // dicUrl: "/api/cyzh-community/building/list?residentialId={{key}}",
  147. // dicFormatter:(res)=>{
  148. // return res.data.records;//返回字典的层级结构
  149. // },
  150. // props: {
  151. // label: "name",
  152. // value: "id"
  153. // },
  154. // rules: [{
  155. // required: false,
  156. // message: "请输入楼栋id",
  157. // trigger: "blur"
  158. // }]
  159. // },
  160. {
  161. label: "楼栋名称",
  162. prop: "buildingName",
  163. editDisplay: false,
  164. addDisplay: false,
  165. disabled: true,
  166. hide: true,
  167. },
  168. // {
  169. // label: "所属单元",
  170. // prop: "unitId",
  171. // type: "select",
  172. // disabled: true,
  173. // search: true,
  174. // cascaderItem: ['floorId'],
  175. // dicUrl: "/api/cyzh-community/unit/list?buildingId={{key}}",
  176. // dicFormatter:(res)=>{
  177. // return res.data.records;//返回字典的层级结构
  178. // },
  179. // dicFlag: false,
  180. // filterable: true,
  181. // props: {
  182. // label: "name",
  183. // value: "id"
  184. // },
  185. // rules: [{
  186. // required: false,
  187. // message: "请输入所属单元id",
  188. // trigger: "blur"
  189. // }]
  190. // },
  191. {
  192. label: "单元名称",
  193. prop: "unitName",
  194. editDisplay: false,
  195. addDisplay: false,
  196. disabled: true,
  197. hide: true,
  198. },
  199. // {
  200. // label: "所属房间",
  201. // prop: "roomId",
  202. // type: "select",
  203. // disabled: true,
  204. // search: true,
  205. // dicUrl: "/api/cyzh-community/room/list?floorId={{key}}",
  206. // dicFormatter:(res)=>{
  207. // return res.data.records;//返回字典的层级结构
  208. // },
  209. // filterable: true,
  210. // props: {
  211. // label: "name",
  212. // value: "id"
  213. // },
  214. // rules: [{
  215. // required: false,
  216. // message: "请输入所属房间id",
  217. // trigger: "blur"
  218. // }]
  219. // },
  220. {
  221. label: "房间名称",
  222. prop: "roomName",
  223. editDisplay: false,
  224. addDisplay: false,
  225. disabled: true,
  226. hide: true,
  227. },
  228. {
  229. label: "联系电话",
  230. prop: "tel",
  231. editDisplay: false,
  232. addDisplay: false,
  233. disabled: true,
  234. rules: [{
  235. required: true,
  236. message: "请输入联系电话",
  237. },{
  238. validator: validatePhone,
  239. trigger: "blur"
  240. }]
  241. },
  242. {
  243. label: "审核状态",
  244. prop: "checkState",
  245. type: 'select',
  246. disabled: !this.reviewType,
  247. dicData:[
  248. {
  249. label: '待审核',
  250. value: 0
  251. },
  252. {
  253. label: '审核通过',
  254. value: 1
  255. },{
  256. label: '审核不通过',
  257. value: 2
  258. }
  259. ],
  260. viewDisplay: true,
  261. display: false,
  262. },
  263. {
  264. label: "护照照片",
  265. prop: "passportImgUri",
  266. hide: true,
  267. display: false,
  268. disabled: true,
  269. type: 'upload',
  270. listType: 'picture-img',
  271. propsHttp: {
  272. res: "data",
  273. url: "link"
  274. },
  275. action: "/api/blade-resource/oss/endpoint/put-file",
  276. tip: '只能生产jpg/png图片,且不超过500kb',
  277. },
  278. {
  279. label: "入境证明",
  280. prop: "entryImgUri",
  281. hide: true,
  282. display: false,
  283. disabled: true,
  284. type: 'upload',
  285. listType: 'picture-img',
  286. propsHttp: {
  287. res: "data",
  288. url: "link"
  289. },
  290. action: "/api/blade-resource/oss/endpoint/put-file",
  291. tip: '只能生产jpg/png图片,且不超过500kb',
  292. },
  293. {
  294. label: "人脸图片",
  295. prop: "imageUri",
  296. hide: true,
  297. disabled: true,
  298. type: 'upload',
  299. row: true,
  300. listType: 'picture-img',
  301. propsHttp: {
  302. res: "data",
  303. url: "link"
  304. },
  305. action: "/api/blade-resource/oss/endpoint/put-file",
  306. tip: '只能生产jpg/png图片,且不超过500kb',
  307. },
  308. {
  309. label: "审核意见",
  310. prop: "checkOpinion",
  311. type: 'textarea',
  312. disabled: !this.reviewType,
  313. rules: [{
  314. required: false,
  315. message: "请输入审核意见",
  316. trigger: "blur"
  317. }]
  318. }
  319. ]
  320. }
  321. }
  322. },
  323. created(){
  324. if(this.reviewType){
  325. this.option.column[9].display = false;
  326. }else{
  327. this.option.column[9].display = true;
  328. }
  329. },
  330. methods: {
  331. reviewExamine(examine, done) {
  332. if (examine == 2 && !this.reviewDetail.checkOpinion) {
  333. this.$message({
  334. type: "error",
  335. message: "请输入审核意见!"
  336. })
  337. return;
  338. }
  339. this.reviewDetail.checkState = examine;
  340. updateByCheckStatus(this.reviewDetail).then(()=>{
  341. this.$message({
  342. type: "success",
  343. message: "操作成功!"
  344. })
  345. this.$emit('updateEmit', false);
  346. }, error => {
  347. console.log(error);
  348. })
  349. },
  350. }
  351. }
  352. </script>
  353. <style scoped>
  354. </style>