shaogen1995 8 місяців тому
батько
коміт
6eb608a9f3

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
展示端/.vscode/file-note.json


+ 4 - 3
展示端/src/components/ZinfoPop/index.tsx

@@ -8,17 +8,18 @@ import succImg from '@/assets/img/order/succ.png'
 type Props = {
   type: 'succ' | 'info' | 'err'
   callFu: () => void
+  proof?: boolean
 }
 
-function ZinfoPop({ type, callFu }: Props) {
+function ZinfoPop({ type, callFu, proof }: Props) {
   const infoObj = useMemo(() => {
     let obj = {
       img: succImg,
-      tit1: '预约成功',
+      tit1: proof ? '申请成功' : '预约成功',
       txt2: '工作人员将尽快与您取得联系'
     }
     return obj
-  }, [])
+  }, [proof])
 
   return (
     <div id='openDom' className={styles.ZinfoPop}>

+ 1 - 1
展示端/src/pages/A5order/index.module.scss

@@ -46,7 +46,7 @@
             bottom: 3%;
             margin: auto;
             height: 60px;
-            background-color: var(--themeColor2);
+            background-color: var(--themeColor2) !important;
             text-align: center;
             color: #fff;
             font-size: 20px;

+ 1 - 1
展示端/src/pages/A7team/index.tsx

@@ -8,7 +8,7 @@ import history from '@/utils/history'
 function A7team() {
   return (
     <div className={styles.A7team}>
-      <TopCom txt='团体认证' />
+      <TopCom txt='选择团体' />
       <div className='A7main'>
         <img src={topImg} alt='' />
         <div className='A7tit'>请选择认证单位</div>

+ 162 - 2
展示端/src/pages/A8proof/index.module.scss

@@ -1,7 +1,167 @@
 .A8proof {
+  position: relative;
   :global {
-    .a {
-      width: 0;
+    .A8main {
+      height: calc(100% - 60px);
+      padding: 40px 20px 0;
+      background-image: url('../../assets/img/selectCourse/bg.jpg');
+      background-size: cover;
+
+      .A8Center {
+        height: calc(100% - 120px);
+        margin-bottom: 20px;
+        overflow-y: auto;
+        .A8btn {
+          position: absolute;
+          z-index: 10;
+          width: 90%;
+          bottom: 3%;
+          margin: auto;
+          height: 60px;
+          background-color: var(--themeColor2) !important;
+          text-align: center;
+          color: #fff;
+          font-size: 20px;
+          font-weight: 700;
+          border-radius: 4px;
+        }
+
+        .A8lKa {
+          margin-bottom: 15px;
+          background-color: #fff;
+          border-radius: 5px;
+          box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.25);
+          padding: 18px 0 10px;
+          .A8tit {
+            padding-left: 25px;
+            font-weight: 700;
+            font-size: 18px;
+            color: var(--themeColor);
+            position: relative;
+            margin-bottom: 20px;
+            &::before {
+              content: '';
+              position: absolute;
+              width: 6px;
+              height: 100%;
+              top: 0;
+              left: 0;
+              background-color: var(--themeColor);
+            }
+          }
+
+          .ant-form-item {
+            padding: 0 13px;
+            margin-bottom: 12px;
+            height: 40px;
+            .ant-row {
+              display: flex;
+              .ant-form-item-label {
+                width: 110px;
+                flex: none;
+                display: block;
+              }
+              .ant-form-item-control {
+                flex: none;
+                display: block;
+                width: calc(100% - 110px);
+              }
+
+              .ant-input {
+                border: none !important;
+                box-shadow: none !important;
+                border-bottom: 1px solid #bebebe !important;
+                border-radius: 0;
+              }
+            }
+
+            .ant-input-number {
+              width: 100%;
+              border: none !important;
+              box-shadow: none !important;
+              border-bottom: 1px solid #bebebe !important;
+              border-radius: 0;
+            }
+          }
+
+          .A8Text {
+            min-height: 80px;
+            height: auto;
+
+            textarea {
+              min-height: 80px !important;
+            }
+          }
+        }
+
+        .A8lKa2 {
+          padding: 0;
+          .A8lKa2Top {
+            display: flex;
+            .A8K2ll {
+              padding: 20px 5px 0 26px;
+              width: calc(100% - 66px);
+              .A8K2ll_1 {
+                position: relative;
+                left: -15px;
+                font-size: 14px;
+                span {
+                  color: #ff4d4f;
+                }
+              }
+              .A8K2ll_2 {
+                font-size: 10px;
+                color: #999;
+              }
+            }
+            .A8K2rr {
+              color: #fff;
+              border-radius: 0 5px 5px 0;
+              width: 66px;
+              height: 80px;
+              background-color: var(--themeColor);
+              display: flex;
+              flex-direction: column;
+              justify-content: center;
+              align-items: center;
+              font-size: 16px;
+              .anticon {
+                position: relative;
+                left: 2px;
+                font-size: 24px;
+              }
+            }
+          }
+          .A8lKa2File {
+            padding: 18px 26px;
+            .A8Frow {
+              margin-bottom: 15px;
+              font-size: 14px;
+              display: flex;
+              align-items: center;
+              justify-content: space-between;
+              .A8Frowll {
+                width: calc(100% - 70px);
+              }
+              .A8Frowrr {
+                display: flex;
+                align-items: center;
+                justify-content: space-around;
+                height: 30px;
+                width: 60px;
+                font-size: 20px;
+                color: var(--themeColor);
+                a {
+                  position: relative;
+                  bottom: 2px;
+                  font-size: 22px;
+                  color: var(--themeColor);
+                }
+              }
+            }
+          }
+        }
+      }
     }
   }
 }

+ 159 - 2
展示端/src/pages/A8proof/index.tsx

@@ -1,9 +1,166 @@
-import React from 'react'
+import React, { useCallback, useEffect, useRef, useState } from 'react'
 import styles from './index.module.scss'
+import { useParams } from 'react-router-dom'
+import TopCom from '@/components/TopCom'
+import { Button, Form, FormInstance, Input } from 'antd'
+import ZinfoPop from '@/components/ZinfoPop'
+import history from '@/utils/history'
+import TextArea from 'antd/es/input/TextArea'
+import { CloudUploadOutlined, EyeOutlined, CloseOutlined } from '@ant-design/icons'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { ImageViewer } from 'antd-mobile'
+
 function A8proof() {
+  const urlObj: any = useParams()
+
+  const canRef = useRef('')
+
+  useEffect(() => {
+    if (urlObj.id) {
+      canRef.current =
+        urlObj.id === '1' ? '横琴粤澳深度合作区民生事务局' : '澳门街坊会联合总会广东办事处'
+    }
+  }, [urlObj.id])
+
+  useEffect(() => {
+    FormBoxRef.current?.setFieldsValue({
+      name: '王大锤',
+      phone: '18702025091',
+      danwei: '阿三大苏打'
+    })
+  }, [])
+
+  // 表单的ref
+  const FormBoxRef = useRef<FormInstance>(null)
+
+  // 没有通过校验
+  const onFinishFailed = useCallback(() => {}, [])
+
+  //  通过校验点击确定
+  const onFinish = useCallback(async (values: any) => {
+    setTitPop('succ')
+  }, [])
+
+  // 打开提示弹窗
+  const [titPop, setTitPop] = useState('')
+
+  const [fileArr, setFileArr] = useState([
+    {
+      id: 1,
+      name: '啊实打实大苏打实打实大苏打啊实打实大苏打实打实大苏打啊实打实大苏打实打实大苏打.jpg',
+      src: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
+    },
+    {
+      id: 2,
+      name: 'cccc.pdf',
+      src: '//cccc.pdf'
+    }
+  ])
+
   return (
     <div className={styles.A8proof}>
-      <h1>A8proof</h1>
+      <TopCom txt='团体认证' />
+      <div className='A8main'>
+        <div className='A8Center'>
+          <Form
+            ref={FormBoxRef}
+            name='basic'
+            // labelCol={{ span: 3 }}
+            onFinish={onFinish}
+            onFinishFailed={onFinishFailed}
+            autoComplete='off'
+            scrollToFirstError
+          >
+            {/* 第一个卡片 */}
+            <div className='A8lKa'>
+              <div className='A8tit'>负责人信息</div>
+
+              <Form.Item
+                label='负责人姓名'
+                name='name'
+                rules={[{ required: true, message: '请输入负责人姓名!' }]}
+                getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+              >
+                <Input placeholder='请输入内容,不超过6个字' maxLength={6} />
+              </Form.Item>
+
+              <Form.Item
+                label='联系方式'
+                name='phone'
+                rules={[
+                  { required: true, message: '请输入联系方式!' },
+                  {
+                    pattern: /^1[3-9][0-9]{9}$/,
+                    message: '请输入正确格式的手机号!'
+                  }
+                ]}
+              >
+                <Input placeholder='请输入11位数字' maxLength={11} />
+              </Form.Item>
+
+              <Form.Item
+                className='A8Text'
+                label='单位名称'
+                name='danwei'
+                rules={[{ required: true, message: '请输入单位名称!' }]}
+                // getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+              >
+                <TextArea placeholder='请输入内容,不超过50个字' maxLength={50} />
+              </Form.Item>
+            </div>
+
+            {/* 第二个卡片 */}
+            <div className='A8lKa A8lKa2'>
+              <div className='A8lKa2Top'>
+                <div className='A8K2ll'>
+                  <div className='A8K2ll_1'>
+                    <span>* </span>上传授权或同意文件
+                  </div>
+                  <div className='A8K2ll_2'>仅限PDF,jpg,png格式;大小不超过5M;最多3个文件</div>
+                </div>
+                <div
+                  className='A8K2rr'
+                  style={{
+                    opacity: fileArr.length >= 3 ? '0' : '1',
+                    pointerEvents: fileArr.length >= 3 ? 'none' : 'auto'
+                  }}
+                >
+                  <CloudUploadOutlined />
+                  上传
+                </div>
+              </div>
+              {fileArr.length ? (
+                <div className='A8lKa2File'>
+                  {fileArr.map(item => (
+                    <div key={item.id} className='A8Frow'>
+                      <div className='A8Frowll'>{item.name}</div>
+                      <div className='A8Frowrr'>
+                        {item.name.includes('.pdf') || item.name.includes('.PDF') ? null : (
+                          <EyeOutlined onClick={() => ImageViewer.show({ image: item.src })} />
+                        )}
+
+                        <MyPopconfirm
+                          txtK='删除'
+                          onConfirm={() => setFileArr(fileArr.filter(v => v.id !== item.id))}
+                          Dom={<CloseOutlined className='clearCover' />}
+                        />
+                      </div>
+                    </div>
+                  ))}
+                </div>
+              ) : null}
+            </div>
+
+            <Button className='A8btn' type='primary' htmlType='submit'>
+              提交
+            </Button>
+          </Form>
+        </div>
+      </div>
+      {/* 预约成功的弹窗 */}
+      {titPop ? (
+        <ZinfoPop proof={true} type={titPop as 'succ'} callFu={() => history.push('/my?m=1')} />
+      ) : null}
     </div>
   )
 }