import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { ResidentVO, ResidentForm, ResidentQuery } from '@/api/system/resident/type'; /** * 查询住户管理列表 * @param query * @returns {*} */ export const listResident = (query?: ResidentQuery): AxiosPromise => { return request({ url: '/resident/list', method: 'get', params: query }); }; /** * 查询住户管理详细 * @param id */ export const getResident = (id: string | number): AxiosPromise => { return request({ url: '/resident/' + id, method: 'get' }); }; /** * 新增住户管理 * @param data */ export const addResident = (data: ResidentForm) => { return request({ url: '/resident', method: 'post', data: data }); }; /** * 修改住户管理 * @param data */ export const updateResident = (data: ResidentForm) => { return request({ url: '/resident', method: 'put', data: data }); }; /** * 删除住户管理 * @param id */ export const delResident = (id: string | number | Array) => { return request({ url: '/resident/' + id, method: 'delete' }); }; /** * 添加住户管理-上传身份证 * @param id */ export const UploadidCardApi = () => { return request({ url: '/resident/uploadImage', method: 'delete' }); }; // ! 住户审核流程-------------------------------------------------------------------------- export interface ResidentReviewProcessVO { /** * 住户审核表 */ id: string | number; /** * 住户表id */ residentId: string | number; /** * 提交时间 */ submitTime: string; /** * 提交状态 0未提交 1已提交 */ submitStatus: string; /** * 物业审核时间 */ propertyTime: string; /** * 物业审核状态 0 待审核 1审核通过 2审核未通过 */ propertyStatus: string; /** * 物业审核意见 */ propertyReviewFeedback: string; /** * 认证时间 */ certificationTime: string; /** * 认证状态 0未认证 1已认证 */ certificationStatus: string; } export interface ResidentReviewProcessForm extends BaseEntity { /** * 住户审核表 */ id?: string | number; /** * 住户表id */ residentId?: string | number; /** * 提交时间 */ submitTime?: string; /** * 提交状态 0未提交 1已提交 */ submitStatus?: string; /** * 物业审核时间 */ propertyTime?: string; /** * 物业审核状态 0 待审核 1审核通过 2审核未通过 */ propertyStatus?: string; /** * 物业审核意见 */ propertyReviewFeedback?: string; /** * 认证时间 */ certificationTime?: string; /** * 认证状态 0未认证 1已认证 */ certificationStatus?: string; } export interface ResidentReviewProcessQuery extends PageQuery { /** * 住户表id */ residentId?: string | number; /** * 提交时间 */ submitTime?: string; /** * 提交状态 0未提交 1已提交 */ submitStatus?: string; /** * 物业审核时间 */ propertyTime?: string; /** * 物业审核状态 0 待审核 1审核通过 2审核未通过 */ propertyStatus?: string; /** * 物业审核意见 */ propertyReviewFeedback?: string; /** * 认证时间 */ certificationTime?: string; /** * 认证状态 0未认证 1已认证 */ certificationStatus?: string; /** * 日期范围参数 */ params?: any; } /** * 获取住户审核流程列表 */ export const getresidentReviewlistAPI = (id: string) => { return request({ url: '/residentReview/list?residentId=' + id, method: 'GET' }); }; /** * 获取单一住户审核流程列表 */ export const getresidentReviewByIdAPI = (id: number): AxiosPromise => { return request({ url: `/residentReview/${id}`, method: 'GET' }); }; /** * 更新 住户 审核 表 */ export const UpdateResidentReviewAPI = (data: ResidentReviewProcessForm) => { return request({ url: `/residentReview`, method: 'PUT', data }); };