shaogen1995 2 年之前
父节点
当前提交
4ab2d1b877

+ 6 - 6
管理后台/src/pages/A1Goods/GoodsAdd/index.tsx

@@ -279,7 +279,7 @@ function GoodsAdd({ id, closeMoalFu, addListFu, editListFu, lookFlag }: Props) {
   const onFinishFailed = useCallback(() => {
     setCoverCheck(true);
     setTypeOk(true);
-    return MessageFu.warning("有表单不符号规则!");
+    return MessageFu.warning("当前填入内容不符合要求!");
   }, []);
 
   // 通过校验点击确定
@@ -289,7 +289,7 @@ function GoodsAdd({ id, closeMoalFu, addListFu, editListFu, lookFlag }: Props) {
       setCoverCheck(true);
       setTypeOk(true);
       if (typeCheck.length === 0 || cover === "" || fileCheckFu)
-        return MessageFu.warning("有表单不符号规则!");
+        return MessageFu.warning("当前填入内容不符合要求!");
 
       const fileIds = [];
       if (fileList.model.id && typeCheck.includes("model"))
@@ -377,7 +377,7 @@ function GoodsAdd({ id, closeMoalFu, addListFu, editListFu, lookFlag }: Props) {
           <Form.Item
             label="类别"
             name="dictTexture"
-            rules={[{ required: true, message: "请选择类别!" }]}
+            // rules={[{ required: true, message: "请选择类别!" }]}
           >
             <Select
               placeholder="请选择"
@@ -389,7 +389,7 @@ function GoodsAdd({ id, closeMoalFu, addListFu, editListFu, lookFlag }: Props) {
           <Form.Item
             label="年代"
             name="dictAge"
-            rules={[{ required: true, message: "请选择年代!" }]}
+            // rules={[{ required: true, message: "请选择年代!" }]}
           >
             <Select
               placeholder="请选择"
@@ -401,7 +401,7 @@ function GoodsAdd({ id, closeMoalFu, addListFu, editListFu, lookFlag }: Props) {
           <Form.Item
             label="级别"
             name="dictLevel"
-            rules={[{ required: true, message: "请选择级别!" }]}
+            // rules={[{ required: true, message: "请选择级别!" }]}
           >
             <Select
               placeholder="请选择"
@@ -413,7 +413,7 @@ function GoodsAdd({ id, closeMoalFu, addListFu, editListFu, lookFlag }: Props) {
           <Form.Item
             label="来源"
             name="dictSource"
-            rules={[{ required: true, message: "请选择来源!" }]}
+            // rules={[{ required: true, message: "请选择来源!" }]}
           >
             <Select
               placeholder="请选择"

+ 16 - 12
管理后台/src/pages/A1Goods/index.tsx

@@ -31,8 +31,8 @@ function A1Goods() {
     num: "",
     dictTexture: "",
     dictAge: "",
-    level: "",
-    source: "",
+    dictLevel: "",
+    dictSource: "",
     startTime: "",
     endTime: "",
     pageSize: 10,
@@ -105,8 +105,8 @@ function A1Goods() {
       num: "",
       dictTexture: "",
       dictAge: "",
-      level: "",
-      source: "",
+      dictLevel: "",
+      dictSource: "",
       startTime: "",
       endTime: "",
       pageSize: 10,
@@ -155,19 +155,23 @@ function A1Goods() {
       },
       {
         title: "类别",
-        dataIndex: "dictTexture",
+        render: (item: GoodsTableType) =>
+          item.dictTexture ? item.dictTexture : "(空)",
       },
       {
         title: "年代",
-        dataIndex: "dictAge",
+        render: (item: GoodsTableType) =>
+          item.dictAge ? item.dictAge : "(空)",
       },
       {
         title: "级别",
-        dataIndex: "dictLevel",
+        render: (item: GoodsTableType) =>
+          item.dictLevel ? item.dictLevel : "(空)",
       },
       {
         title: "来源",
-        dataIndex: "dictSource",
+        render: (item: GoodsTableType) =>
+          item.dictSource ? item.dictSource : "(空)",
       },
       {
         title: "简介",
@@ -318,9 +322,9 @@ function A1Goods() {
             <Select
               placeholder="请选择"
               style={{ width: 140 }}
-              value={tableSelect.level}
+              value={tableSelect.dictLevel}
               onChange={(e) =>
-                setTableSelect({ ...tableSelect, level: e, pageNum: 1 })
+                setTableSelect({ ...tableSelect, dictLevel: e, pageNum: 1 })
               }
               options={dictList["level"]}
             />
@@ -331,9 +335,9 @@ function A1Goods() {
             <Select
               placeholder="请选择"
               style={{ width: 140 }}
-              value={tableSelect.source}
+              value={tableSelect.dictSource}
               onChange={(e) =>
-                setTableSelect({ ...tableSelect, source: e, pageNum: 1 })
+                setTableSelect({ ...tableSelect, dictSource: e, pageNum: 1 })
               }
               options={dictList["source"]}
             />

+ 2 - 1
管理后台/src/utils/http.ts

@@ -68,7 +68,8 @@ http.interceptors.response.use(
       }, 200);
     } else if (response.data.code === 0) {
       // MessageFu.success(response.data.msg);
-    } else MessageFu.warning(response.data.msg);
+    } else if (response.data.code !== 3014)
+      MessageFu.warning(response.data.msg);
 
     return response.data;
   },