shaogen1995 vor 6 Stunden
Ursprung
Commit
2839f30c5f

+ 1 - 0
src/components/Z3upFiles/index.module.scss

@@ -71,6 +71,7 @@
 
       .Z3filesRow {
         width: 100%;
+        max-width: 786px;
         display: flex;
         align-items: center;
         padding: 0px 12px;

+ 1 - 0
src/components/Z3upFilesRef/index.module.scss

@@ -77,6 +77,7 @@
 
       .Z3filesRow {
         width: 100%;
+        max-width: 786px;
         display: flex;
         align-items: center;
         padding: 0px 12px;

+ 1 - 1
src/pages/Abench/A2bench/index.tsx

@@ -116,7 +116,7 @@ function A2bench() {
             <div className='A2ll2RowBox'>
               {stockList.map(v1 =>
                 v1.son.map(v2 =>
-                  v2.authority && v2.name !== '业务中心' ? (
+                  v2.authority && v2.name !== '工作台' ? (
                     <div key={v2.id} className='A2ll2Row' onClick={() => history.push(v2.path)}>
                       <img src={`${iconUrl}/${v2.name}.png`} alt='' />
                       <p>{v2.name}</p>

+ 7 - 4
src/pages/Gmaintain/G1accident/G1edit/index.tsx

@@ -5,7 +5,7 @@ import { InfoProvider } from '@/pages/Zother/InfoContext'
 import EditTop from '@/pages/Zother/EditTop'
 import { G1_APIgetClueList, G1API_obj } from '@/store/action/Gmaintain/G1accident'
 import EditBtn from '@/pages/Zother/EditBtn'
-import { getPanDianListFu } from '../data'
+import { G1moreList, getPanDianListFu } from '../data'
 import FileArchive from '@/pages/Zother/FileArchive'
 
 const rowArr = [
@@ -20,9 +20,12 @@ function G1edit() {
   const [info, setInfo] = useState<any>({ list: [], loding: false })
 
   useEffect(() => {
-    getPanDianListFu(list => {
-      setInfo({ list, loding: true })
-    })
+    getPanDianListFu(
+      list => {
+        setInfo({ list, loding: true })
+      },
+      list => G1moreList(list)
+    )
   }, [])
 
   return (

+ 2 - 2
src/pages/Gmaintain/G1accident/data.ts

@@ -1,12 +1,12 @@
 import { F4_APIgetList } from '@/store/action/Fstorehouse/F4check'
 
-export const getPanDianListFu = async (back: (list: any[]) => void) => {
+export const getPanDianListFu = async (back: (list: any[]) => void, resFu: (val: any) => any) => {
   // 获取盘点单列表
   const res = await F4_APIgetList({}, true)
   if (res.code === 0) {
     let list = res.data.records || []
     list = list.map((v: any) => ({ value: v.num, label: `${v.num} - ${v.storageName}` }))
-    const listRes: any[] = G1moreList(list)
+    const listRes: any[] = resFu(list)
     back(listRes)
   }
 }

+ 4 - 0
src/pages/Gmaintain/G2actuality/G2edit/index.module.scss

@@ -0,0 +1,4 @@
+// .G2edit {
+//   :global {
+//   }
+// }

+ 74 - 0
src/pages/Gmaintain/G2actuality/G2edit/index.tsx

@@ -0,0 +1,74 @@
+import React, { useEffect, useState } from 'react'
+import styles from './index.module.scss'
+import { rowArrTemp } from '@/pages/Zother/data'
+import { getPanDianListFu } from '../../G1accident/data'
+import { G2moreList } from '../data'
+import { InfoProvider } from '@/pages/Zother/InfoContext'
+import EditTop from '@/pages/Zother/EditTop'
+import { G2_APIgetClueList, G2API_obj } from '@/store/action/Gmaintain/G2actuality'
+import FileArchive from '@/pages/Zother/FileArchive'
+import EditBtn from '@/pages/Zother/EditBtn'
+
+const rowArr = [
+  {
+    name: `现状登记`,
+    type: 'txt'
+  },
+  ...rowArrTemp('登记', undefined, '现状登记').slice(1)
+]
+
+function G2edit() {
+  const [info, setInfo] = useState<any>({ list: [], loding: false })
+
+  useEffect(() => {
+    getPanDianListFu(
+      list => {
+        setInfo({ list, loding: true })
+      },
+      list => G2moreList(list)
+    )
+  }, [])
+
+  return (
+    <>
+      {info.loding ? (
+        <InfoProvider>
+          <div className={styles.G2edit} id='editBox'>
+            <div className='editMain'>
+              {/* 顶部 */}
+              <EditTop
+                pageTxt='现状登记'
+                rowArr={rowArr}
+                APIobj={G2API_obj}
+                fileUpInfo={{ myUrl: 'cms/orderCurrent/upload', dirCode: 'actuality' }}
+                // 第二个模块
+                moreDom={{
+                  txt: '现状报告',
+                  API: G2_APIgetClueList,
+                  domList: info.list,
+                  myUrl: 'cms/orderCurrent/son/upload',
+                  dirCode: 'actualitySon'
+                }}
+              />
+
+              {/* 附件归档 */}
+              <FileArchive />
+
+              {/* 底部按钮 */}
+              <EditBtn
+                path='/actuality'
+                APIobj={G2API_obj}
+                checkListTxt='请选择关联藏品'
+                isTow={true}
+              />
+            </div>
+          </div>
+        </InfoProvider>
+      ) : null}
+    </>
+  )
+}
+
+const MemoG2edit = React.memo(G2edit)
+
+export default MemoG2edit

+ 28 - 0
src/pages/Gmaintain/G2actuality/data.ts

@@ -0,0 +1,28 @@
+export const G2moreList = (list: any[]) => {
+  return [
+    {
+      name: '关联盘点',
+      type: 'Select',
+      key: 'oderNum',
+      placeholder: '请搜索盘点申请编号',
+      options: list
+    },
+    {
+      name: '经手人',
+      type: 'Input',
+      key: 'userName'
+    },
+    {
+      name: '现状描述',
+      type: 'TextArea',
+      key: 'currentInfo',
+      full: true
+    },
+    {
+      name: '备注',
+      type: 'TextArea',
+      key: 'remark',
+      full: true
+    }
+  ]
+}

+ 4 - 4
src/pages/Gmaintain/G2actuality/index.module.scss

@@ -1,4 +1,4 @@
-.G2actuality {
-  :global {
-  }
-}
+// .G2actuality {
+//   :global {
+//   }
+// }

+ 24 - 0
src/pages/Gmaintain/G2actuality/index.tsx

@@ -1,9 +1,33 @@
 import React from 'react'
 import styles from './index.module.scss'
+import { baseFormData, topSearch } from '@/pages/Zother/data'
+import { useSelector } from 'react-redux'
+import { RootState } from '@/store'
+import TableList from '@/pages/Zother/TableList'
+import { G2_APIgetList } from '@/store/action/Gmaintain/G2actuality'
+import { baseTableC } from '@/utils/tableData'
+
+const search = topSearch('登记')
+
+const baseFormDataRes = baseFormData()
+
 function G2actuality() {
+  // 从仓库拿数据
+  const tableInfo = useSelector((state: RootState) => state.G2actuality.tableInfo)
+
   return (
     <div className={styles.G2actuality}>
       <div className='pageTitle'>现状登记</div>
+
+      <TableList
+        baseFormData={baseFormDataRes}
+        getListAPI={G2_APIgetList}
+        pageKey='actuality'
+        tableInfo={tableInfo}
+        columnsTemp={baseTableC('登记')}
+        yHeight={585}
+        searchDom={search}
+      />
     </div>
   )
 }

+ 5 - 0
src/pages/Gmaintain/G3repair/G3edit/index.module.scss

@@ -0,0 +1,5 @@
+// .G3edit{
+//   :global{
+
+//   }
+// }

+ 74 - 0
src/pages/Gmaintain/G3repair/G3edit/index.tsx

@@ -0,0 +1,74 @@
+import React, { useEffect, useState } from 'react'
+import styles from './index.module.scss'
+import { rowArrTemp } from '@/pages/Zother/data'
+import { getPanDianListFu } from '../../G1accident/data'
+import { G3moreList } from '../data'
+import { InfoProvider } from '@/pages/Zother/InfoContext'
+import EditTop from '@/pages/Zother/EditTop'
+import { G3_APIgetClueList, G3API_obj } from '@/store/action/Gmaintain/G3repair'
+import FileArchive from '@/pages/Zother/FileArchive'
+import EditBtn from '@/pages/Zother/EditBtn'
+
+const rowArr = [
+  {
+    name: `修复登记`,
+    type: 'txt'
+  },
+  ...rowArrTemp('修复', undefined, '修复登记').slice(1)
+]
+
+function G3edit() {
+  const [info, setInfo] = useState<any>({ list: [], loding: false })
+
+  useEffect(() => {
+    getPanDianListFu(
+      list => {
+        setInfo({ list, loding: true })
+      },
+      list => G3moreList(list)
+    )
+  }, [])
+
+  return (
+    <>
+      {info.loding ? (
+        <InfoProvider>
+          <div className={styles.G3edit} id='editBox'>
+            <div className='editMain'>
+              {/* 顶部 */}
+              <EditTop
+                pageTxt='修复登记'
+                rowArr={rowArr}
+                APIobj={G3API_obj}
+                fileUpInfo={{ myUrl: 'cms/orderFix/upload', dirCode: 'repair' }}
+                // 第二个模块
+                moreDom={{
+                  txt: '修复报告',
+                  API: G3_APIgetClueList,
+                  domList: info.list,
+                  myUrl: 'cms/orderFix/son/upload',
+                  dirCode: 'repairSon'
+                }}
+              />
+
+              {/* 附件归档 */}
+              <FileArchive />
+
+              {/* 底部按钮 */}
+              <EditBtn
+                path='/repair'
+                APIobj={G3API_obj}
+                checkListTxt='请选择关联藏品'
+                isTow={true}
+              />
+            </div>
+          </div>
+        </InfoProvider>
+      ) : null}
+    </>
+  )
+}
+
+const MemoG3edit = React.memo(G3edit)
+
+export default MemoG3edit

+ 46 - 0
src/pages/Gmaintain/G3repair/data.ts

@@ -0,0 +1,46 @@
+export const G3moreList = (list: any[]) => {
+  return [
+    {
+      name: '关联盘点',
+      type: 'Select',
+      key: 'oderNum',
+      placeholder: '请搜索盘点申请编号',
+      options: list
+    },
+    {
+      name: '修复人',
+      type: 'Input',
+      key: 'userName'
+    },
+    {
+      name: '修复原因',
+      type: 'TextArea',
+      key: 'reason',
+      full: true
+    },
+    {
+      name: '修复前&emsp;<br/>藏品状态',
+      type: 'TextArea',
+      key: 'beforeInfo',
+      full: true
+    },
+    {
+      name: '修复后&emsp;<br/>藏品状态',
+      type: 'TextArea',
+      key: 'afterInfo',
+      full: true
+    },
+    {
+      name: '修复过程',
+      type: 'TextArea',
+      key: 'process',
+      full: true
+    },
+    {
+      name: '备注',
+      type: 'TextArea',
+      key: 'remark',
+      full: true
+    }
+  ]
+}

+ 4 - 4
src/pages/Gmaintain/G3repair/index.module.scss

@@ -1,4 +1,4 @@
-.G3repair {
-  :global {
-  }
-}
+// .G3repair {
+//   :global {
+//   }
+// }

+ 24 - 0
src/pages/Gmaintain/G3repair/index.tsx

@@ -1,9 +1,33 @@
 import React from 'react'
 import styles from './index.module.scss'
+import { baseFormData, topSearch } from '@/pages/Zother/data'
+import { useSelector } from 'react-redux'
+import { RootState } from '@/store'
+import TableList from '@/pages/Zother/TableList'
+import { G3_APIgetList } from '@/store/action/Gmaintain/G3repair'
+import { baseTableC } from '@/utils/tableData'
+
+const search = topSearch('修复')
+
+const baseFormDataRes = baseFormData()
+
 function G3repair() {
+  // 从仓库拿数据
+  const tableInfo = useSelector((state: RootState) => state.G3repair.tableInfo)
+
   return (
     <div className={styles.G3repair}>
       <div className='pageTitle'>修复登记</div>
+
+      <TableList
+        baseFormData={baseFormDataRes}
+        getListAPI={G3_APIgetList}
+        pageKey='repair'
+        tableInfo={tableInfo}
+        columnsTemp={baseTableC('修复')}
+        yHeight={585}
+        searchDom={search}
+      />
     </div>
   )
 }

+ 12 - 0
src/pages/Layout/data.ts

@@ -382,6 +382,18 @@ export const routerSon: RouterTypeRow[] = [
     Com: React.lazy(() => import('../Gmaintain/G1accident/G1edit'))
   },
   {
+    id: 540,
+    name: '现状登记-详情页',
+    path: '/actuality_edit/:key/:id',
+    Com: React.lazy(() => import('../Gmaintain/G2actuality/G2edit'))
+  },
+  {
+    id: 550,
+    name: '修复登记-详情页',
+    path: '/repair_edit/:key/:id',
+    Com: React.lazy(() => import('../Gmaintain/G3repair/G3edit'))
+  },
+  {
     id: 602,
     name: '故事管理-详情页',
     path: '/story_edit/:key/:id',

+ 3 - 3
src/store/action/Abench/A2bench.ts

@@ -1,14 +1,14 @@
 import http from '@/utils/http'
 
 /**
- * 业务中心-编辑用户信息
+ * 工作台-编辑用户信息
  */
 export const A2_APIeditUser = (data: any) => {
   return http.post('sys/user/editInfo', data)
 }
 
 /**
- * 业务中心-修改常用功能
+ * 工作台-修改常用功能
  */
 export const A2_APIsetStock = (id: number, permRtf: string) => {
   const data = {
@@ -19,7 +19,7 @@ export const A2_APIsetStock = (id: number, permRtf: string) => {
 }
 
 /**
- * 业务中心-获取分页列表
+ * 工作台-获取分页列表
  */
 export const A2_APIgetList = (data: any) => {
   return http.post('cms/workBench/orderPage', data)

+ 38 - 0
src/store/action/Gmaintain/G2actuality.ts

@@ -0,0 +1,38 @@
+import { AppDispatch } from '@/store'
+import http from '@/utils/http'
+import { APIbase } from '../layout'
+
+/**
+ * 现状登记 -获取分页列表
+ */
+export const G2_APIgetList = (data: any): any => {
+  return async (dispatch: AppDispatch) => {
+    const res = await http.post('cms/orderCurrent/page', data)
+    if (res.code === 0) {
+      const obj = {
+        list: res.data.records,
+        total: res.data.total
+      }
+
+      dispatch({ type: 'G2/getList', payload: obj })
+    }
+  }
+}
+
+/**
+ * 现状登记-藏品列表(取总账数据)-分页
+ */
+export const G2_APIgetClueList = (data: any) => {
+  return http.post('cms/orderCurrent/goodPage', data)
+}
+
+export const G2API_obj = {
+  创建订单: () => APIbase('get', 'cms/orderCurrent/create'),
+  获取详情: (id: number) => APIbase('get', `cms/orderCurrent/detail/${id}`),
+  草稿: (data: any) => APIbase('post', `cms/orderCurrent/saveDraft`, data),
+  发起: (data: any) => APIbase('post', `cms/orderCurrent/saveApply`, data),
+  重新发起: (id: number) => APIbase('get', `cms/orderCurrent/reissue/${id}`),
+  审批: (data: any) => APIbase('post', `cms/orderCurrent/audit`, data),
+  撤回: (id: number) => APIbase('get', `cms/orderCurrent/revocation/${id}`),
+  删除: (id: number) => APIbase('get', `cms/orderCurrent/remove/${id}`)
+}

+ 38 - 0
src/store/action/Gmaintain/G3repair.ts

@@ -0,0 +1,38 @@
+import { AppDispatch } from '@/store'
+import http from '@/utils/http'
+import { APIbase } from '../layout'
+
+/**
+ * 修复登记 -获取分页列表
+ */
+export const G3_APIgetList = (data: any): any => {
+  return async (dispatch: AppDispatch) => {
+    const res = await http.post('cms/orderFix/page', data)
+    if (res.code === 0) {
+      const obj = {
+        list: res.data.records,
+        total: res.data.total
+      }
+
+      dispatch({ type: 'G3/getList', payload: obj })
+    }
+  }
+}
+
+/**
+ * 修复登记-藏品列表(取总账数据)-分页
+ */
+export const G3_APIgetClueList = (data: any) => {
+  return http.post('cms/orderFix/goodPage', data)
+}
+
+export const G3API_obj = {
+  创建订单: () => APIbase('get', 'cms/orderFix/create'),
+  获取详情: (id: number) => APIbase('get', `cms/orderFix/detail/${id}`),
+  草稿: (data: any) => APIbase('post', `cms/orderFix/saveDraft`, data),
+  发起: (data: any) => APIbase('post', `cms/orderFix/saveApply`, data),
+  重新发起: (id: number) => APIbase('get', `cms/orderFix/reissue/${id}`),
+  审批: (data: any) => APIbase('post', `cms/orderFix/audit`, data),
+  撤回: (id: number) => APIbase('get', `cms/orderFix/revocation/${id}`),
+  删除: (id: number) => APIbase('get', `cms/orderFix/remove/${id}`)
+}

+ 28 - 0
src/store/reducer/Gmaintain/G2actuality.ts

@@ -0,0 +1,28 @@
+import { Typetable } from '@/pages/Zother/data'
+
+// 初始化状态
+const initState = {
+  // 列表数据
+  tableInfo: {
+    list: [] as Typetable[],
+    total: 0
+  }
+}
+
+// 定义 action 类型
+type Props = {
+  type: 'G2/getList'
+  payload: { list: Typetable[]; total: number }
+}
+
+// reducer
+export default function Reducer(state = initState, action: Props) {
+  switch (action.type) {
+    // 获取列表数据
+    case 'G2/getList':
+      return { ...state, tableInfo: action.payload }
+
+    default:
+      return state
+  }
+}

+ 28 - 0
src/store/reducer/Gmaintain/G3repair.ts

@@ -0,0 +1,28 @@
+import { Typetable } from '@/pages/Zother/data'
+
+// 初始化状态
+const initState = {
+  // 列表数据
+  tableInfo: {
+    list: [] as Typetable[],
+    total: 0
+  }
+}
+
+// 定义 action 类型
+type Props = {
+  type: 'G3/getList'
+  payload: { list: Typetable[]; total: number }
+}
+
+// reducer
+export default function Reducer(state = initState, action: Props) {
+  switch (action.type) {
+    // 获取列表数据
+    case 'G3/getList':
+      return { ...state, tableInfo: action.payload }
+
+    default:
+      return state
+  }
+}

+ 4 - 0
src/store/reducer/index.ts

@@ -16,6 +16,8 @@ import D3writeOff from './Dmanage/D3writeOff'
 import E1tag from './Eculture/E1tag'
 import E2story from './Eculture/E2story'
 import G1accident from './Gmaintain/G1accident'
+import G2actuality from './Gmaintain/G2actuality'
+import G3repair from './Gmaintain/G3repair'
 import F1inStorage from './Fstorehouse/F1inStorage'
 import F3outStorage from './Fstorehouse/F3outStorage'
 import F4check from './Fstorehouse/F4check'
@@ -48,6 +50,8 @@ const rootReducer = combineReducers({
   E2story,
 
   G1accident,
+  G2actuality,
+  G3repair,
 
   F1inStorage,
   F3outStorage,

+ 1 - 1
src/utils/storage.ts

@@ -38,7 +38,7 @@ export const getTokenFu = (): string => {
   return getTokenInfo().token
 }
 
-// // --------------------业务中心-常用功能存储
+// // --------------------工作台-常用功能存储
 // const CHANG_KEY = 'QING_DAO_PI_JIU_GOODS_HT_CHANG_ARR'
 
 // // 存