| | |
| | | import { LoadingOutlined, PlusOutlined } from '@ant-design/icons'; |
| | | import { forwardRef, useEffect, useImperativeHandle, useState } from 'react'; |
| | | import { customRequest } from '@/utils/utils'; |
| | | import { audit, getDetail,regionTree } from '../service' |
| | | import { audit, getDetail, regionTree } from '../service' |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { span: 8 }, |
| | |
| | | |
| | | // 提交表单 |
| | | const submit = () => { |
| | | console.log('1111111111') |
| | | form.validateFields().then(async (values) => { |
| | | |
| | | values.url = fileList[0].url |
| | | delete values.image |
| | | if (editData.id) { |
| | | values.id = editData.id |
| | | onUpdate(values) |
| | | return |
| | | let params = { |
| | | id: editData.id, |
| | | auditStatus: editData.type == 'sure' ? 1 : 2, |
| | | } |
| | | onSave(values) |
| | | if (editData.type == 'refuse') { |
| | | params.refuseReason = values.refuseReason |
| | | } |
| | | onSave(params) |
| | | }) |
| | | } |
| | | |
| | |
| | | onCancel={() => onCancel(false)} |
| | | onOk={submit} |
| | | > |
| | | <div style={{ width: '100%', textAlign: 'center', margin: '20px 0', fontWeight: 'bold' }}>确认审核{editData.type == 'sure' ? '同意' : '拒绝'}所选信息么?</div> |
| | | <div style={{ width: '100%', textAlign: 'center', margin: '20px 0', fontWeight: 'bold', fontSize: "22px" }}>确认审核{editData.type == 'sure' ? '通过' : '拒绝'}所选信息么?</div> |
| | | <Form scrollToFirstError layout="horizontal" {...formItemLayout} form={form}> |
| | | <Row> |
| | | <Col span={8}> |
| | |
| | | options={items} |
| | | fieldNames={{ value: 'id', label: 'name' }} |
| | | placeholder="请选择" |
| | | // onChange={(value, label) => { |
| | | // console.log('value', value, '1', label) |
| | | // setCommunity(() => label) |
| | | // }} |
| | | // onChange={(value, label) => { |
| | | // console.log('value', value, '1', label) |
| | | // setCommunity(() => label) |
| | | // }} |
| | | // displayRender={(label) => label[label.length - 1]} |
| | | // changeOnSelect={true} |
| | | /> |
| | |
| | | </Form.Item></Col> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="idMumber" |
| | | name="idNumber" |
| | | label='身份证号' |
| | | required |
| | | > |
| | |
| | | <Row> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="remark" |
| | | name="refuseReason" |
| | | label='拒绝理由' |
| | | rules={[{ required: true, message: '拒绝理由必填' }]} |
| | | > |
| | |
| | | import { useRef, useState, useEffect } from 'react'; |
| | | import { Access, history, useAccess } from 'umi'; |
| | | import AddAndEdit from './components/index'; |
| | | import { getList, regionTree } from './service' |
| | | import { getList, regionTree, audit } from './service' |
| | | const Banner = () => { |
| | | |
| | | const actionRef = useRef(); |
| | |
| | | { |
| | | title: '性别', |
| | | hideInSearch: true, |
| | | dataIndex: 'gender' |
| | | dataIndex: 'gender', |
| | | valueEnum: { |
| | | 1: { text: '男' }, |
| | | 0: { text: '女' }, |
| | | } |
| | | }, |
| | | { |
| | | title: '联系电话', |
| | |
| | | visible={modalVisible} |
| | | onCancel={() => handleModalVisible(false)} |
| | | onSave={async (fileds) => { |
| | | // const success = await sendRequest(add, fileds); |
| | | // if (success) { |
| | | // handleModalVisible(false); |
| | | // addViewRef.current.clean() |
| | | // actionRef.current.reload(); |
| | | // } |
| | | }} |
| | | onUpdate={async (fileds) => { |
| | | // const success = await sendRequest(Edit, fileds); |
| | | // if (success) { |
| | | // handleModalVisible(false); |
| | | // addViewRef.current.clean() |
| | | // actionRef.current.reload(); |
| | | // } |
| | | const success = await sendRequest(audit, fileds); |
| | | if (success) { |
| | | handleModalVisible(false); |
| | | addViewRef.current.clean() |
| | | actionRef.current.reload(); |
| | | } |
| | | }} |
| | | /> |
| | | </PageContainer> |
| | |
| | | data, |
| | | }); |
| | | } |
| | | export const audit = async (id) => { |
| | | export const audit = async (data) => { |
| | | return request(`/api/huacheng-sangeshenbian/party-member/audit`, { |
| | | method: 'POST', |
| | | data |
| | |
| | | } |
| | | // 详情 |
| | | export const getDetail = async (id) => { |
| | | return request(`/api/huacheng-sangeshenbian/banner/getBannerInfo/${id}`, { |
| | | return request(`/api/huacheng-sangeshenbian/party-member/${id}`, { |
| | | method: 'GET', |
| | | // data |
| | | }); |