Forráskód Böngészése

更改封面图上传

lanxin 1 hete
szülő
commit
668ac8af93

+ 43 - 4
src/pages/A6exhibition/A6add/index.tsx

@@ -25,6 +25,7 @@ function A6add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
 
   // 封面图的ref
   const ZupThumbRef1 = useRef<any>(null)
+  const ZupThumbRef2 = useRef<any>(null)
   // 正文的ref
   const ZRichTextRef = useRef<any>(null)
 
@@ -40,6 +41,8 @@ function A6add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
         context: info.contextB,
         img: info.imgB,
         imgTh: info.imgThB,
+        infoImg: info.infoImgB,
+        infoImgTh: info.infoImgThB,
         webSite: info.webSiteB
       }
     } else {
@@ -53,6 +56,11 @@ function A6add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
       thUrl: editObj.imgTh,
       url: editObj.img
     })
+    ZupThumbRef2.current?.setFileComFileFu({
+      fileName: '',
+      thUrl: editObj.infoImgTh,
+      url: editObj.infoImg
+    })
 
     // 设置正文
     ZRichTextRef.current?.ritxtShowFu({
@@ -102,9 +110,12 @@ function A6add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
       setFileCheck(true)
 
       const coverUrl1 = ZupThumbRef1.current?.fileComFileResFu()
+      const coverUrl2 = ZupThumbRef2.current?.fileComFileResFu()
+
       const context = ZRichTextRef.current?.fatherBtnOkFu()
       // 没有传 封面图
       if (!coverUrl1.url) return MessageFu.warning('请上传首页封面图!')
+      if (!coverUrl2.url) return MessageFu.warning('请上传详情封面图!')
       console.log(context)
       if (context.flag) return MessageFu.warning('请输入正文!')
 
@@ -113,6 +124,8 @@ function A6add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
         ...values,
         img: coverUrl1.url,
         imgTh: coverUrl1.thUrl,
+        infoImg: coverUrl2.url,
+        infoImgTh: coverUrl2.thUrl,
         context: context.val.txtArr[0].txt,
         publish: values.publish?.format('YYYY-MM-DD') || '',
         publishB: '',
@@ -127,6 +140,10 @@ function A6add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
         imgB: coverUrl1.url,
         imgTh: '',
         imgThB: coverUrl1.thUrl,
+        infoImg: '',
+        infoImgB: coverUrl2.url,
+        infoImgTh: '',
+        infoImgThB: coverUrl2.thUrl,
         publish: '',
         publishB: values.publish?.format('YYYY-MM-DD') || '',
         status: 0,
@@ -265,18 +282,40 @@ function A6add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
           <div className='formRow'>
             <div className='formLeft'>
               <span>* </span>
-              封面
+              首页封面:
             </div>
             <div className='formRight'>
               <ZupOne
                 ref={ZupThumbRef1}
                 fileCheck={fileCheck}
-                size={20}
+                size={5}
+                dirCode={'A1banner'}
+                myUrl='museum/upload/uploadImg'
+                format={['image/jpg', 'image/png']}
+                inchTxt='4:1'
+                formatTxt='png、jpg'
+                checkTxt='请上传封面图!'
+                upTxt='最多1张'
+                myType='thumb'
+              />
+            </div>
+          </div>
+
+          <div className='formRow'>
+            <div className='formLeft'>
+              <span>* </span>
+              详情封面:
+            </div>
+            <div className='formRight'>
+              <ZupOne
+                ref={ZupThumbRef2}
+                fileCheck={fileCheck}
+                size={5}
                 dirCode={'A1banner'}
                 myUrl='museum/upload/uploadImg'
-                format={['image/jpeg', 'image/jpg', 'image/png']}
+                format={['image/jpg', 'image/png']}
                 inchTxt='2:1'
-                formatTxt='png、jpg和jpeg'
+                formatTxt='png、jpg'
                 checkTxt='请上传封面图!'
                 upTxt='最多1张'
                 myType='thumb'

+ 1 - 1
src/pages/A7collection/A7add/index.tsx

@@ -265,7 +265,7 @@ function A7add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
           </Form.Item>
 
           <Form.Item label='简介' name='remark'>
-            <TextArea maxLength={200} showCount placeholder='请输入内容,不超过200个字' />
+            <TextArea maxLength={1000} showCount placeholder='请输入内容,不超过1000个字' />
           </Form.Item>
 
           {/* 封面 */}

+ 2 - 0
src/pages/B1reserve1/B1look/index.tsx

@@ -53,6 +53,8 @@ function B1add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
 
           <Form.Item label='预约时段'>{itemData?.time}</Form.Item>
 
+          <Form.Item label='讲解服务'>{itemData?.serviceName}</Form.Item>
+
           <Form.Item label='预约人数'>{itemData?.pcs}</Form.Item>
 
           <Form.List name='visitors'>

+ 12 - 1
src/pages/B1reserve1/index.module.scss

@@ -6,8 +6,19 @@
       background-color: #fff;
       padding: 15px 24px;
       display: flex;
-      justify-content: right;
+      justify-content: space-between;
       gap: 20px;
+      .B1topLeft {
+        display: flex;
+        gap: 20px;
+        .rowItem {
+          margin-left: 20px;
+          width: 200px;
+          display: flex;
+          align-items: center;
+          gap: 10px;
+        }
+      }
     }
     .B1tableBox {
       border-radius: 10px;

+ 105 - 7
src/pages/B1reserve1/index.tsx

@@ -1,6 +1,6 @@
 import React, { useCallback, useEffect, useMemo, useState } from 'react'
 import styles from './index.module.scss'
-import { Button } from 'antd'
+import { Button, Input, Select, DatePicker } from 'antd'
 import { useDispatch, useSelector } from 'react-redux'
 import { B1EditInfoType } from './data'
 import { B_APIgetList, B_APIdel, B_APIexportExcel } from '@/store/action/Breserve'
@@ -11,6 +11,10 @@ import MyTable from '@/components/MyTable'
 import { B1tableC } from '@/utils/tableData'
 import B1look from './B1look'
 import { MessageFu } from '@/utils/message'
+import { B_APIgetServe } from '@/store/action/Breserve'
+import dayjs from 'dayjs'
+import { start } from 'repl'
+
 // import { exportExcelFile } from '@/utils/xlsxExport'
 
 const pageDataBase = {
@@ -20,13 +24,38 @@ const pageDataBase = {
 
 function B1reserve1() {
   const dispatch = useDispatch()
+  const { RangePicker } = DatePicker
 
   const [pageData, setPageData] = useState(pageDataBase)
+  const [name, setName] = useState('')
+  const [queryData, setQueryData] = useState<{
+    startTime?: string
+    endTime?: string
+    appointmentServiceId?: number
+    status?: number
+  }>({})
+  const [serverOptions, setServerOptions] = useState<{ label: string; value: number }[]>([])
+
+  const getListFu = useCallback(
+    (name?: string) => {
+      dispatch(B_APIgetList({ ...pageData, name: name || '', type: 1, ...queryData }))
+    },
+    [dispatch, pageData, queryData]
+  )
 
-  const getListFu = useCallback(() => {
-    // status: -1 全部 0 未发布 1 已发布
-    dispatch(B_APIgetList({ ...pageData, type: 1 }))
-  }, [dispatch, pageData])
+  const getServerOptions = useCallback(async () => {
+    const res = await B_APIgetServe()
+    if (res.code === 0) {
+      setServerOptions([
+        { label: '全部', value: 0 },
+        ...res.data.map((item: any) => ({ label: item.context, value: item.id }))
+      ])
+    }
+  }, [])
+
+  useEffect(() => {
+    getServerOptions()
+  }, [getServerOptions])
 
   useEffect(() => {
     getListFu()
@@ -77,14 +106,18 @@ function B1reserve1() {
 
   // 导出excel后端实现
   const exportExcelFu2 = useCallback(async () => {
-    const res: any = await B_APIexportExcel(1)
+    const res: any = await B_APIexportExcel({
+      type: 1,
+      name: name || '',
+      ...queryData
+    })
     const downloadUrl = window.URL.createObjectURL(res)
     const link = document.createElement('a')
     link.href = downloadUrl
     link.download = '展馆预约表.xlsx'
     document.body.appendChild(link)
     link.click()
-  }, [])
+  }, [name, queryData])
 
   const tableLastBtn = useMemo(() => {
     return [
@@ -118,6 +151,71 @@ function B1reserve1() {
 
       {/* 顶部筛选 */}
       <div className='B1top'>
+        <div className='B1topLeft'>
+          <Input
+            style={{ width: 200 }}
+            placeholder='请输入姓名'
+            onChange={e => setName(e.target.value)}
+            value={name}
+          />
+          <Button type='primary' onClick={() => getListFu(name)}>
+            搜索
+          </Button>
+          <Button
+            type='primary'
+            onClick={() => {
+              resetSelectFu()
+              setName('')
+              setQueryData({})
+            }}
+          >
+            重置
+          </Button>
+          <div>
+            预约日期:
+            <RangePicker
+              style={{ width: 400 }}
+              format='YYYY-MM-DD'
+              value={
+                queryData.startTime || queryData.endTime
+                  ? [
+                      queryData.startTime ? dayjs(queryData.startTime) : null,
+                      queryData.endTime ? dayjs(queryData.endTime) : null
+                    ]
+                  : [undefined, undefined]
+              }
+              onChange={date => {
+                setQueryData({
+                  ...queryData,
+                  startTime: date ? date[0]?.format('YYYY-MM-DD') : '',
+                  endTime: date ? date[1]?.format('YYYY-MM-DD') : ''
+                })
+              }}
+            />
+          </div>
+          <div className='rowItem'>
+            讲解服务:
+            <Select
+              style={{ width: 120 }}
+              defaultValue={0}
+              options={serverOptions}
+              onChange={value => setQueryData({ ...queryData, appointmentServiceId: value })}
+            />
+          </div>
+          <div className='rowItem'>
+            状态:
+            <Select
+              style={{ width: 120 }}
+              defaultValue={0}
+              options={[
+                { label: '全部', value: 0 },
+                { label: '已取消', value: -1 },
+                { label: '已预约', value: 2 }
+              ]}
+              onChange={value => setQueryData({ ...queryData, status: value })}
+            />
+          </div>
+        </div>
         <Button type='primary' onClick={exportExcelFu2}>
           导出
         </Button>

+ 12 - 1
src/pages/B2reserve2/index.module.scss

@@ -6,8 +6,19 @@
       background-color: #fff;
       padding: 15px 24px;
       display: flex;
-      justify-content: right;
+      justify-content: space-between;
       gap: 20px;
+      .B1topLeft {
+        display: flex;
+        gap: 20px;
+        .rowItem {
+          margin-left: 20px;
+          width: 200px;
+          display: flex;
+          align-items: center;
+          gap: 10px;
+        }
+      }
     }
     .B2tableBox {
       border-radius: 10px;

+ 76 - 9
src/pages/B2reserve2/index.tsx

@@ -1,6 +1,6 @@
 import React, { useCallback, useEffect, useMemo, useState } from 'react'
 import styles from './index.module.scss'
-import { Button } from 'antd'
+import { Button, Input, Select, DatePicker } from 'antd'
 import { useDispatch, useSelector } from 'react-redux'
 import { B2EditInfoType } from './data'
 import { B_APIgetList, B_APIdel, B_APIexportExcel } from '@/store/action/Breserve'
@@ -11,6 +11,8 @@ import MyTable from '@/components/MyTable'
 import { B2tableC } from '@/utils/tableData'
 import B2look from './B2look'
 import { MessageFu } from '@/utils/message'
+import dayjs from 'dayjs'
+
 // import { exportExcelFile } from '@/utils/xlsxExport'
 
 const pageDataBase = {
@@ -19,14 +21,22 @@ const pageDataBase = {
 }
 
 function B2reserve2() {
+  const { RangePicker } = DatePicker
   const dispatch = useDispatch()
-
+  const [name, setName] = useState('')
   const [pageData, setPageData] = useState(pageDataBase)
-
-  const getListFu = useCallback(() => {
-    // status: -1 全部 0 未发布 1 已发布
-    dispatch(B_APIgetList({ ...pageData, type: 2 }))
-  }, [dispatch, pageData])
+  const [queryData, setQueryData] = useState<{
+    startTime?: string
+    endTime?: string
+    status?: number
+  }>({})
+
+  const getListFu = useCallback(
+    (name?: string) => {
+      dispatch(B_APIgetList({ ...pageData, name: name || '', type: 2, ...queryData }))
+    },
+    [dispatch, pageData, queryData]
+  )
 
   useEffect(() => {
     getListFu()
@@ -77,14 +87,14 @@ function B2reserve2() {
 
   // 导出excel后端实现
   const exportExcelFu2 = useCallback(async () => {
-    const res: any = await B_APIexportExcel(2)
+    const res: any = await B_APIexportExcel({ type: 2, name: name || '', ...queryData })
     const downloadUrl = window.URL.createObjectURL(res)
     const link = document.createElement('a')
     link.href = downloadUrl
     link.download = '活动预约表.xlsx'
     document.body.appendChild(link)
     link.click()
-  }, [])
+  }, [name, queryData])
 
   const tableLastBtn = useMemo(() => {
     return [
@@ -118,6 +128,63 @@ function B2reserve2() {
 
       {/* 顶部筛选 */}
       <div className='B2top'>
+        <div className='B1topLeft'>
+          <Input
+            style={{ width: 200 }}
+            placeholder='请输入姓名'
+            onChange={e => setName(e.target.value)}
+            value={name}
+          />
+          <Button type='primary' onClick={() => getListFu(name)}>
+            搜索
+          </Button>
+          <Button
+            type='primary'
+            onClick={() => {
+              resetSelectFu()
+              setName('')
+              setQueryData({})
+            }}
+          >
+            重置
+          </Button>
+          <div>
+            预约日期:
+            <RangePicker
+              style={{ width: 400 }}
+              format='YYYY-MM-DD'
+              value={
+                queryData.startTime || queryData.endTime
+                  ? [
+                      queryData.startTime ? dayjs(queryData.startTime) : null,
+                      queryData.endTime ? dayjs(queryData.endTime) : null
+                    ]
+                  : [undefined, undefined]
+              }
+              onChange={date => {
+                setQueryData({
+                  ...queryData,
+                  startTime: date ? date[0]?.format('YYYY-MM-DD') : '',
+                  endTime: date ? date[1]?.format('YYYY-MM-DD') : ''
+                })
+              }}
+            />
+          </div>
+
+          <div className='rowItem'>
+            状态:
+            <Select
+              style={{ width: 120 }}
+              defaultValue={0}
+              options={[
+                { label: '全部', value: 0 },
+                { label: '已取消', value: -1 },
+                { label: '已预约', value: 2 }
+              ]}
+              onChange={value => setQueryData({ ...queryData, status: value })}
+            />
+          </div>
+        </div>
         <Button type='primary' onClick={exportExcelFu2}>
           导出
         </Button>

+ 144 - 0
src/pages/C1reserveOpt/C1SetServe.tsx

@@ -0,0 +1,144 @@
+import { DeleteOutlined } from '@ant-design/icons'
+
+import { Form, Input, Modal, Button } from 'antd'
+import styles from './index.module.scss'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { B_APIgetServe, B_APIsetServe, B_APIdelServe } from '@/store/action/Breserve'
+import { useEffect, useCallback, useState } from 'react'
+import { MessageFu } from '@/utils/message'
+
+type C1setServeProps = {
+  setIsShowServe: (v: boolean) => void
+  isShowServe: boolean
+}
+
+const C1setServe = ({ setIsShowServe, isShowServe }: C1setServeProps) => {
+  const [form] = Form.useForm()
+  const [deleteIds, setDeleteIds] = useState<number[]>([])
+
+  const getServe = useCallback(async () => {
+    const res = await B_APIgetServe()
+    if (res.code === 0) {
+      form.setFieldsValue({
+        dynamicItems: [
+          ...res.data.map((item: any) => ({
+            serverName: item.context,
+            price: item.remark,
+            id: item.id
+          }))
+        ]
+      })
+    }
+  }, [form])
+
+  useEffect(() => {
+    getServe()
+  }, [getServe])
+
+  const submitForm = useCallback(async () => {
+    // 校验是否为空
+    try {
+      await form.validateFields()
+    } catch (error) {
+      return
+    }
+    // 同时处理删除和修改,一个操作失败全失败
+    const deleteRes = await Promise.all(deleteIds.map(id => B_APIdelServe(id)))
+    if (deleteRes.some(item => item.code !== 0)) {
+      MessageFu.error('删除讲解服务失败!')
+      return
+    }
+
+    const setRes = await B_APIsetServe(
+      form.getFieldValue('dynamicItems').map((item: any) => ({
+        context: item.serverName,
+        remark: item.price,
+        id: item.id
+      }))
+    )
+    if (setRes.code !== 0) {
+      MessageFu.error('设置讲解服务失败!')
+      return
+    }
+    MessageFu.success('设置讲解服务成功!')
+    setIsShowServe(false)
+  }, [deleteIds, form, setIsShowServe])
+
+  const MyDynamicForm = () => {
+    return (
+      <Form form={form}>
+        <Form.List name='dynamicItems'>
+          {(fields, { add, remove }) => (
+            <>
+              <Button className='addServe' type='primary' onClick={add}>
+                新增
+              </Button>
+              {fields.map(({ key, name, fieldKey, ...restField }) => (
+                <div key={key} style={{ display: 'flex', gap: 8, marginBottom: 8 }}>
+                  <Form.Item
+                    {...restField}
+                    name={[name, 'serverName']}
+                    rules={[{ required: true, message: '请输入讲解服务' }]}
+                  >
+                    <Input style={{ width: 500 }} placeholder='请输入讲解服务' />
+                  </Form.Item>
+                  <Form.Item
+                    {...restField}
+                    name={[name, 'price']}
+                    rules={[{ required: true, message: '请输入价格' }]}
+                  >
+                    <Input placeholder='请输入价格' />
+                  </Form.Item>
+                  <Form.Item {...restField} name={[name, 'id']}>
+                    <Input hidden />
+                  </Form.Item>
+                  <Button
+                    type='text'
+                    danger
+                    onClick={() => {
+                      // 获取当前行数据
+                      const currentId = form.getFieldValue('dynamicItems')[name].id
+                      // 记录删除的id
+                      if (currentId) {
+                        setDeleteIds([...deleteIds, currentId])
+                      }
+                      remove(name)
+                    }}
+                    icon={<DeleteOutlined />}
+                    title='删除'
+                  />
+                </div>
+              ))}
+            </>
+          )}
+        </Form.List>
+      </Form>
+    )
+  }
+  return (
+    <Modal
+      wrapClassName={styles.C1SetServe}
+      width={800}
+      title='设置讲解服务'
+      open={isShowServe}
+      onOk={() => {
+        console.log('ok')
+      }}
+      onCancel={() => setIsShowServe(false)}
+      footer={
+        [] // 设置footer为空,去掉 取消 确定默认按钮
+      }
+    >
+      <MyDynamicForm />
+      <div className='C1Nbtn'>
+        <MyPopconfirm txtK='取消' onConfirm={() => setIsShowServe(false)} />
+        &emsp;
+        <Button type='primary' onClick={submitForm}>
+          提交
+        </Button>
+      </div>
+    </Modal>
+  )
+}
+
+export default C1setServe

+ 25 - 0
src/pages/C1reserveOpt/index.module.scss

@@ -96,3 +96,28 @@
     }
   }
 }
+
+// 设置讲解服务
+.C1SetServe {
+  :global {
+    .ant-modal-close {
+      display: none;
+    }
+    .ant-modal {
+      width: 800px !important;
+    }
+    .ant-modal-body {
+      border-top: 1px solid #ccc;
+      padding-top: 15px !important;
+      .ant-form {
+        max-height: 565px;
+        overflow: auto;
+      }
+      .addServe {
+        position: absolute;
+        top: 15px;
+        right: 24px;
+      }
+    }
+  }
+}

+ 12 - 0
src/pages/C1reserveOpt/index.tsx

@@ -6,11 +6,13 @@ import { useDispatch, useSelector } from 'react-redux'
 import { RootState } from '@/store'
 import { C1_APIgetList, C1_APIsavebk, C1_APIgetbk, C1_APIdelbk } from '@/store/action/C1reserveOpt'
 import { C1tableC } from '@/utils/tableData'
+
 import B1edit from './C1edit'
 import { MessageFu } from '@/utils/message'
 import C1NoTime from './C1NoTime'
 import C1OpenDay from './C1OpenDay'
 import C1xuZhi from './C1xuZhi'
+import C1SetServe from './C1SetServe'
 function C1reserveOpt() {
   const dispatch = useDispatch()
 
@@ -28,6 +30,7 @@ function C1reserveOpt() {
   const [edit, setEdit] = useState(false)
   const [isShowOpenDay, setIsShowOpenDay] = useState(false)
   const [isShowNo, setIsShowNo] = useState(false)
+  const [isShowServe, setIsShowServe] = useState(false)
   // 1111111111111不可预约日期--------------开始
   const [noList, setNoList] = useState<string>('')
   // 2222222222222开放日期--------------开始
@@ -118,6 +121,10 @@ function C1reserveOpt() {
     <div className={styles.C1reserveOpt}>
       <div className='pageTitle'>展馆预约设置{edit ? ' - 编辑' : null}</div>
       <div className='C1top'>
+        <Button type='primary' onClick={() => setIsShowServe(true)}>
+          设置讲解服务
+        </Button>
+        &emsp;
         <Button type='primary' onClick={() => setIsShowOpenDay(true)}>
           设置节假日开放日期
         </Button>
@@ -163,6 +170,11 @@ function C1reserveOpt() {
 
       {/*预约须知 */}
       {configId ? <C1xuZhi closeFu={() => setConfigId(0)} /> : null}
+
+      {/* 设置讲解服务 */}
+      {isShowServe ? (
+        <C1SetServe setIsShowServe={setIsShowServe} isShowServe={isShowServe} />
+      ) : null}
     </div>
   )
 }

+ 12 - 1
src/pages/D1feedback/index.module.scss

@@ -6,8 +6,19 @@
       background-color: #fff;
       padding: 15px 24px;
       display: flex;
-      justify-content: right;
+      justify-content: space-between;
       gap: 20px;
+      .B1topLeft {
+        display: flex;
+        gap: 20px;
+        .rowItem {
+          margin-left: 20px;
+          width: 200px;
+          display: flex;
+          align-items: center;
+          gap: 10px;
+        }
+      }
     }
     .D1tableBox {
       border-radius: 10px;

+ 63 - 6
src/pages/D1feedback/index.tsx

@@ -1,6 +1,6 @@
 import React, { useCallback, useEffect, useMemo, useState } from 'react'
 import styles from './index.module.scss'
-import { Button } from 'antd'
+import { Button, Input, DatePicker } from 'antd'
 import { useDispatch, useSelector } from 'react-redux'
 import { D1EditInfoType } from './data'
 import { D1_APIgetList, D1_APIdel, D1_APIexportExcel } from '@/store/action/D1feedback'
@@ -11,6 +11,8 @@ import MyPopconfirm from '@/components/MyPopconfirm'
 import MyTable from '@/components/MyTable'
 import { D1tableC } from '@/utils/tableData'
 import D1look from './D1look'
+import dayjs from 'dayjs'
+
 // import { exportExcelFile } from '@/utils/xlsxExport'
 
 const pageDataBase = {
@@ -19,13 +21,22 @@ const pageDataBase = {
 }
 
 function D1feedback() {
+  const { RangePicker } = DatePicker
   const dispatch = useDispatch()
 
+  const [search, setSearch] = useState('')
+  const [queryData, setQueryData] = useState<{
+    startTime?: string
+    endTime?: string
+  }>({})
   const [pageData, setPageData] = useState(pageDataBase)
 
-  const getListFu = useCallback(() => {
-    dispatch(D1_APIgetList({ ...pageData }))
-  }, [dispatch, pageData])
+  const getListFu = useCallback(
+    (search?: string) => {
+      dispatch(D1_APIgetList({ ...pageData, search, ...queryData }))
+    },
+    [dispatch, pageData, queryData]
+  )
 
   useEffect(() => {
     getListFu()
@@ -88,14 +99,17 @@ function D1feedback() {
 
   // 导出excel后端实现
   const exportExcelFu2 = useCallback(async () => {
-    const res: any = await D1_APIexportExcel()
+    const res: any = await D1_APIexportExcel({
+      search,
+      ...queryData
+    })
     const downloadUrl = window.URL.createObjectURL(res)
     const link = document.createElement('a')
     link.href = downloadUrl
     link.download = '意见反馈.xlsx'
     document.body.appendChild(link)
     link.click()
-  }, [])
+  }, [search, queryData])
 
   //新增、编辑
   const [editInfo, setEditInfo] = useState<D1EditInfoType>({
@@ -109,6 +123,49 @@ function D1feedback() {
 
       {/* 顶部筛选 */}
       <div className='D1top'>
+        <div className='B1topLeft'>
+          <Input
+            style={{ width: 200 }}
+            placeholder='请输入姓名'
+            onChange={e => setSearch(e.target.value)}
+            value={search}
+          />
+          <Button type='primary' onClick={() => getListFu(search)}>
+            搜索
+          </Button>
+          <Button
+            type='primary'
+            onClick={() => {
+              resetSelectFu()
+              setSearch('')
+              setQueryData({})
+            }}
+          >
+            重置
+          </Button>{' '}
+          <div>
+            提交时间:
+            <RangePicker
+              style={{ width: 400 }}
+              format='YYYY-MM-DD'
+              value={
+                queryData.startTime || queryData.endTime
+                  ? [
+                      queryData.startTime ? dayjs(queryData.startTime) : null,
+                      queryData.endTime ? dayjs(queryData.endTime) : null
+                    ]
+                  : [undefined, undefined]
+              }
+              onChange={date => {
+                setQueryData({
+                  ...queryData,
+                  startTime: date ? date[0]?.format('YYYY-MM-DD') : '',
+                  endTime: date ? date[1]?.format('YYYY-MM-DD') : ''
+                })
+              }}
+            />
+          </div>
+        </div>
         <Button type='primary' onClick={exportExcelFu2}>
           导出
         </Button>

+ 40 - 3
src/store/action/Breserve.ts

@@ -5,7 +5,16 @@ import { baseURL } from '@/utils/http'
 /**
  *根据Type获取预约记录列表 1-展馆预约记录 2-活动预约记录
  */
-export const B_APIgetList = (data: { pageNum: number; pageSize: number; type: number }): any => {
+export const B_APIgetList = (data: {
+  pageNum: number
+  pageSize: number
+  type: number
+  name?: string
+  startTime?: string
+  endTime?: string
+  appointmentServiceId?: number
+  status?: number
+}): any => {
   return async (dispatch: AppDispatch) => {
     const res = await http.post('museum/appointment/page', data)
     if (res.code === 0) {
@@ -35,9 +44,16 @@ export const B_APIdel = (id: number) => {
 /**
  * 导出Excel Type 1-展馆预约记录 2-活动预约记录
  */
-export const B_APIexportExcel = (type: number) => {
+export const B_APIexportExcel = (data: {
+  type: number
+  name?: string
+  startTime?: string
+  endTime?: string
+  appointmentServiceId?: number
+  status?: number
+}) => {
   // return `baseURL/api/museum/appointment/exportExcel?type=${type}`
-  return http.get(`${baseURL}/api/museum/appointment/exportExcel?type=` + type, {
+  return http.post(`${baseURL}/api/museum/appointment/exportExcel`, data, {
     responseType: 'blob'
   })
 }
@@ -48,3 +64,24 @@ export const B_APIexportExcel = (type: number) => {
 // export const B_APIexportExcel = (type: number) => {
 //   return `baseURL/api/museum/appointment/exportExcel?type=${type}`
 // }
+
+/**
+ * 预约记录-设置讲解服务-新增/编辑
+ */
+export const B_APIsetServe = (data: { context: string; id?: number; remark: string }) => {
+  return http.post('museum/appointmentService/saveOrEdit', data)
+}
+
+/**
+ * 预约记录-设置讲解服务-查询
+ */
+export const B_APIgetServe = () => {
+  return http.post(`museum/appointmentService/list`)
+}
+
+/**
+ * 预约记录-设置讲解服务-删除
+ */
+export const B_APIdelServe = (id: number) => {
+  return http.post(`museum/appointmentService/del/${id}`)
+}

+ 6 - 2
src/store/action/D1feedback.ts

@@ -41,7 +41,11 @@ export const D1_APIgetInfo = (id: number) => {
 /**
  * 意见反馈记录-导出
  */
-export const D1_APIexportExcel = () => {
+export const D1_APIexportExcel = (data: {
+  search?: string
+  startTime?: string
+  endTime?: string
+}) => {
   // return `baseURL/api/museum/feedback/exportExcel`
-  return http.get(`${baseURL}/api/museum/feedback/exportExcel`, { responseType: 'blob' })
+  return http.post(`${baseURL}/api/museum/feedback/exportExcel`, data, { responseType: 'blob' })
 }

+ 8 - 0
src/types/api/A6exhibition.ts

@@ -20,6 +20,10 @@ export type A6tableType = {
   webSiteB: string | null
   imgB: string | null
   imgThB: string | null
+  infoImg: string | null
+  infoImgB: string | null
+  infoImgTh: string | null
+  infoImgThB: string | null
   status: 0 | 1
   recommend: 0 | 1
 }
@@ -32,6 +36,10 @@ export type A6AddType = {
   imgB: string
   imgTh: string
   imgThB: string
+  infoImg: string
+  infoImgB: string
+  infoImgTh: string
+  infoImgThB: string
   publish: string
   publishB: string
   remark: string

+ 1 - 0
src/types/api/Breserve.d.ts

@@ -18,6 +18,7 @@ export type B1tableType = {
   activityTitle: string
   visitors: B1visitorsType[]
   idCard: string
+  serviceName: string
 }
 
 export type B1visitorsType = {

+ 5 - 2
src/utils/tableData.ts

@@ -62,9 +62,11 @@ export const B1tableC = [
   ['txtNormal', '申请时间', 'createTime'],
   ['txtNormal', '姓名', 'userName'],
   ['txtNormal', '联系电话', 'phone'],
+  ['txtNormal', '讲解服务', 'serviceName'],
   ['txtNormal', '人数', 'pcs'],
   ['txtNormal', '预约日期', 'appointmentTime'],
-  ['txtNormal', '预约时段', 'time']
+  ['txtNormal', '预约时段', 'time'],
+  ['txtChange', '状态', 'status', { '-1': '已取消', 2: '已预约' }]
 ]
 
 export const B2tableC = [
@@ -73,7 +75,8 @@ export const B2tableC = [
   ['txtNormal', '活动名称', 'activityTitle'],
   ['txtNormal', '联系电话', 'phone'],
   ['txtNormal', '身份证', 'idCard'],
-  ['txtNormal', '预约日期', 'appointmentTime']
+  ['txtNormal', '预约日期', 'appointmentTime'],
+  ['txtChange', '状态', 'status', { '-1': '已取消', 2: '已预约' }]
 ]
 
 export const C1tableC = [