shaogen1995 il y a 1 mois
Parent
commit
6d8604cd38

+ 3 - 1
src/components/MyTable/index.tsx

@@ -170,8 +170,10 @@ const MyTable = forwardRef<MyTableMethods, MyTableProps>(
           txt: (item: any) =>
             v[3] && !item[v[2]] ? (
               <div dangerouslySetInnerHTML={{ __html: v[3] }}></div>
+            ) : item[v[2]] && item[v[2]] !== '0' ? (
+              item[v[2]]
             ) : (
-              item[v[2]] ?? isNull
+              isNull
             ),
           txtArr: (item: any) => (
             <div dangerouslySetInnerHTML={{ __html: (item[v[2]] || []).join('<br/>') }}></div>

+ 7 - 2
src/pages/B_enterTibet/B34typeIn/B34MoAdd/index.tsx

@@ -19,10 +19,11 @@ type Props = {
   closeFu: () => void
   succFu: (val: C1GoodType, newFlag?: boolean) => void
   type: '入馆' | '入藏'
+  tableList: C1GoodType[]
   look?: boolean
 }
 
-function B34MoAdd({ info, closeFu, succFu, type, look = false }: Props) {
+function B34MoAdd({ info, closeFu, succFu, type, tableList, look = false }: Props) {
   const getInfoFu = useCallback(async (info: C1GoodType) => {
     const obj: any = { ...info }
     cascaderChArr.forEach(v => {
@@ -79,6 +80,10 @@ function B34MoAdd({ info, closeFu, succFu, type, look = false }: Props) {
         thumbPc: coverPcUrl
       }
 
+      if (tableList.find(v => v.num === obj.num)) {
+        return MessageFu.warning('藏品编号重复')
+      }
+
       // if (1 + 1 === 2) {
       //   console.log('---', obj)
       //   return
@@ -111,7 +116,7 @@ function B34MoAdd({ info, closeFu, succFu, type, look = false }: Props) {
         }
       }
     },
-    [closeFu, info.id, info.id2, succFu]
+    [closeFu, info.id, info.id2, succFu, tableList]
   )
 
   // 上传图片的ref

+ 1 - 0
src/pages/B_enterTibet/B34typeIn/B34edit/index.tsx

@@ -589,6 +589,7 @@ function B34edit({ type }: Props) {
           info={openInfo}
           closeFu={() => setOpenInfo({} as C1GoodType)}
           type={type}
+          tableList={snaps}
           succFu={(obj, newFlag) => {
             if (newFlag) {
               // 是新增

+ 2 - 2
src/pages/C_goodsManage/C1register/AddGoods/index.tsx

@@ -362,7 +362,7 @@ function AddGoods({ nowSta, closeFu, succFu, isEdit, editSnap }: Props) {
         if (flag) return MessageFu.warning('未修改藏品信息')
 
         // -----------藏品编辑模块进来---------------
-        MessageFu.success(`${staTxt.current}成功`)
+        // MessageFu.success(`${staTxt.current}成功`)
         succFu(
           obj,
           '编辑',
@@ -371,7 +371,7 @@ function AddGoods({ nowSta, closeFu, succFu, isEdit, editSnap }: Props) {
           objOld.current.file || [],
           objOld.current
         )
-        closeFu()
+        // closeFu()
       } else {
         // 藏品登记模块
         // 删除附件

+ 2 - 0
src/pages/C_goodsManage/C1register/index.tsx

@@ -8,6 +8,7 @@ import {
 } from '@/store/action/FourAll'
 import history from '@/utils/history'
 import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
+import { MessageFu } from '@/utils/message'
 function C1register() {
   const [waiId, setWaiId] = useState('')
 
@@ -79,6 +80,7 @@ function C1register() {
                 : await FourAPI_saveApply('3', obj2)
 
             if (res.code === 0) {
+              MessageFu.success(`${sta}成功`)
               history.push('/goodEdit')
             }
           }}

+ 2 - 0
src/pages/C_goodsManage/C22goodEdit/C22revamp/index.tsx

@@ -19,6 +19,7 @@ import {
 } from '@/pages/Y_goodsDetails/Y1cathet/data'
 import history from '@/utils/history'
 import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
+import { MessageFu } from '@/utils/message'
 
 export type OldNewType = {
   name: string
@@ -191,6 +192,7 @@ function C22revamp({ goodsId, closeFu, type, sId, upTableFu }: Props) {
             const res = sta === '存草稿' ? await C6_APIsaveDraft(obj2) : await C6_APIsaveApply(obj2)
 
             if (res.code === 0) {
+              MessageFu.success(`${sta}成功`)
               if (type === '新增') history.push('/goodEdit')
               else if (upTableFu) upTableFu()
             }

+ 3 - 2
src/pages/D_storeManage/D1storage/index.module.scss

@@ -36,8 +36,9 @@
             overflow-y: auto;
 
             .ant-tree-treenode {
-              height: 36px;
-              line-height: 36px;
+              margin-bottom: 5px;
+              // min-height: 36px;
+              // line-height: 36px;
             }
           }
         }

+ 8 - 0
src/pages/D_storeManage/D6putsStor/D6edit/index.tsx

@@ -222,6 +222,7 @@ function D6edit() {
           delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
           snaps: snaps.map(v => ({
             goodsId: v.id,
+            returnDate: v.date || '',
             id: v.id2 ? v.id2 : null,
             orderId: topInfo.id,
             snap: JSON.stringify(v)
@@ -233,6 +234,12 @@ function D6edit() {
 
         if (val === '草稿') {
           // 存草稿 当前页保存 不跳转
+
+          // if (1 + 1 === 2) {
+          //   console.log('----', obj)
+          //   return
+          // }
+
           const res = await D6_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
@@ -433,6 +440,7 @@ function D6edit() {
         delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
         snaps: snaps.map(v => ({
           goodsId: v.id,
+          returnDate: v.date || '',
           id: v.id2 ? v.id2 : null,
           orderId: topInfo.id,
           snap: JSON.stringify(v)

+ 1 - 1
src/pages/Login/index.tsx

@@ -50,7 +50,7 @@ export default function Login() {
 
     const flagPass = regex.test(passWord)
     if (!flagPass) {
-      return MessageFu.warning('密码要求由数字、字母或特殊字符中2种方式组成')
+      return MessageFu.warning('用户名或密码错误')
     }
 
     const obj = {