shaogen1995 1 månad sedan
förälder
incheckning
e233ec0444

+ 10 - 23
src/pages/Benter/B3auth/B3edit/index.tsx

@@ -1,16 +1,13 @@
-import React, { useState, useRef, useMemo } from 'react'
+import React from 'react'
 import styles from './index.module.scss'
 import { rowArrTemp } from '@/pages/Zother/data'
 import { InfoProvider } from '@/pages/Zother/InfoContext'
 import EditTop from '@/pages/Zother/EditTop'
-import MyTable from '@/components/MyTable'
-import SelectGoods from '@/pages/Zother/SelectGoods'
-import { useParams } from 'react-router-dom'
-import { Button, Input } from 'antd'
+import { Button } from 'antd'
 import { API_getGoodsLists } from '@/store/action/Cledger/C1ledger'
-import { B3_APIgetClueList, B3_APIgoodsSave, B3API_obj } from '@/store/action/Benter/B3auth'
+import { B3API_obj } from '@/store/action/Benter/B3auth'
 import EditBtn from '@/pages/Zother/EditBtn'
-import history from '@/utils/history'
+import { openLink } from '@/utils/history'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import { goodsSonTableC } from '@/utils/tableData'
 import { sgBaseFormDataGood, sgTopSelectDomGood } from '@/pages/Zother/SonGoodsList/data'
@@ -47,18 +44,9 @@ const rowArrDom = [
     },
     callBackChildren: (selectedRows: GoodsType[], setSnapsFu: any) => {
       return (
-        <div
-          className='snipInfo'
-          style={{
-            height: '80px',
-            display: 'flex',
-            alignItems: 'center',
-            gap: '20px',
-            justifyContent: 'space-around'
-          }}
-        >
-          <ImageLazy width={80} height={80} src={selectedRows[0].thumb || ''} />
-          <div style={{ flex: 1, textAlign: 'center' }}>
+        <div className='snipInfo'>
+          <ImageLazy width={60} height={60} src={selectedRows[0].thumb || ''} />
+          <div style={{ flex: 1, textAlign: 'left' }}>
             {selectedRows[0]?.num ? selectedRows[0]?.num + '-' + selectedRows[0]?.name : ''}
           </div>
           <div>
@@ -66,8 +54,7 @@ const rowArrDom = [
               style={{ marginRight: '0' }}
               type='text'
               size='small'
-              danger
-              onClick={() => history.push(`/goodsInfo`)}
+              onClick={() => openLink(`/goodsLook/${selectedRows[0].id}`)}
             >
               查看
             </Button>
@@ -87,8 +74,7 @@ const rowArrDom = [
   {
     name: '鉴定部门',
     type: 'Input',
-    key: 'unit',
-    noNull: true
+    key: 'unit'
   },
   {
     name: '鉴定人员',
@@ -134,6 +120,7 @@ function B3edit() {
             rowArr={rowArrDom}
             APIobj={B3API_obj}
             fileUpInfo={{ myUrl: 'cms/order/auth/upload', dirCode: 'auth' }}
+            Tit='鉴定报告'
           />
           {/* 添加藏品 */}
           {/* {showSelectGoods && (

+ 3 - 1
src/pages/Layout/index.tsx

@@ -165,9 +165,11 @@ function Layout() {
 
       if (flagPush) history.push(pathArr[0])
 
+      const pathRes = isNowPath.split('_')[0]
+
       const resList = tabLeftArr.map(v => ({
         ...v,
-        show: v.son.some(v => v.path === (flagPush ? pathArr[0] : isNowPath)),
+        show: v.son.some(v => v.path === (flagPush ? pathArr[0] : pathRes)),
         son: v.son.filter(c => isOkIdArr.includes(c.id))
       }))
 

+ 11 - 0
src/pages/Zother/EditTopDom/index.module.scss

@@ -43,6 +43,17 @@
           .ant-btn {
             margin-right: 15px;
           }
+
+          .snipInfo {
+            border-radius: 6px;
+            width: calc(48% - 50px);
+            border: 1px solid #ccc;
+            height: 60px;
+            display: flex;
+            align-items: center;
+            gap: 20px;
+            justify-content: space-around;
+          }
         }
       }
       .Edtop1rowFull {

+ 4 - 3
src/pages/Zother/EditTopDom/index.tsx

@@ -35,9 +35,10 @@ type Props = {
   APIobj: API_objType
   // 上传附件的信息
   fileUpInfo: FileUpInfoType
+  Tit: string
 }
 
-function EditTopDom({ rowArr, pageTxt, APIobj, fileUpInfo }: Props) {
+function EditTopDom({ rowArr, pageTxt, APIobj, fileUpInfo, Tit }: Props) {
   const { info, setInfoFu, snaps, setSnapsFu, timeKey, auditInfo, setAuditInfoFu } = useInfo()
 
   const { key, id } = useParams<any>()
@@ -181,7 +182,7 @@ function EditTopDom({ rowArr, pageTxt, APIobj, fileUpInfo }: Props) {
 
           <div className='EdTit'>
             <div>
-              申请信息
+              {Tit}
               {statusTxt ? (
                 <Button className='EdTitBtn' type='dashed'>
                   {statusTxt}
@@ -301,7 +302,7 @@ function EditTopDom({ rowArr, pageTxt, APIobj, fileUpInfo }: Props) {
             <div className='Edtop1row Edtop1rowFull'>
               <div className='Edtop1ll'>附件:</div>
               <div className='Edtop1rr'>
-                <Z3upFiles isLook={isLook} {...fileUpInfo} />
+                <Z3upFiles isLook={isLook} {...fileUpInfo} filesKey='files2' />
               </div>
             </div>
           </div>