浏览代码

越写越多bug 哈哈哈哈

shaogen1995 4 月之前
父节点
当前提交
c0e9a81f41

+ 7 - 0
src/pages/C_goodsManage/C6edit/C6add/index.tsx

@@ -259,6 +259,13 @@ function C6add() {
   // 查看的按钮创建-提交-撤回
   const lookBtnFu = useCallback(
     async (val: '创建' | '提交' | '撤回') => {
+      if (val !== '撤回') {
+        if (!topInfo.goods || (topInfo.goods && topInfo.goods.length === 0))
+          return MessageFu.warning('请选择藏品')
+
+        if (oldNewArr.length === 0) return MessageFu.warning('未修改藏品信息')
+      }
+
       const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
       // console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))
 

+ 10 - 0
src/pages/D_storeManage/D4impStor/D4edit/index.tsx

@@ -329,6 +329,16 @@ function D4edit() {
   // 查看的按钮创建-提交-撤回
   const lookBtnFu = useCallback(
     async (val: '创建' | '提交' | '撤回') => {
+      if (val !== '撤回') {
+        if (!topInfo.goods || (topInfo.goods && topInfo.goods.length === 0)) {
+          return MessageFu.warning('请添加藏品')
+        } else {
+          if (topInfo.goods.some(v => !v.siteStr || !v.siteId)) {
+            return MessageFu.warning('请选择存放位置')
+          }
+        }
+      }
+
       const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
       // console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))
 

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

@@ -259,6 +259,12 @@ function D6edit() {
   // 查看的按钮创建-提交-撤回
   const lookBtnFu = useCallback(
     async (val: '创建' | '提交' | '撤回') => {
+      if (val !== '撤回') {
+        if (!topInfo.goods || (topInfo.goods && topInfo.goods.length === 0)) {
+          return MessageFu.warning('请添加藏品')
+        }
+      }
+
       const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
       // console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))
 

+ 6 - 0
src/pages/E_goodsStorage/E2damaged/E2edit/index.tsx

@@ -216,6 +216,12 @@ function E2edit() {
   // 查看的按钮创建-提交-撤回
   const lookBtnFu = useCallback(
     async (val: '创建' | '提交' | '撤回') => {
+      if (val !== '撤回') {
+        if (!topInfo.goods || (topInfo.goods && topInfo.goods.length === 0)) {
+          return MessageFu.warning('请添加藏品')
+        }
+      }
+
       const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
       // console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))