Procházet zdrojové kódy

Merge branch 'dev' of http://git.ycjcjy.com/jgz/admin into dev

Yansen před 2 roky
rodič
revize
a1f89db665

+ 3
- 1
src/pages/purchase/plan/list/index.jsx Zobrazit soubor

@@ -91,6 +91,7 @@ const StockList = (props) => {
91 91
             key={4}
92 92
             style={{ padding: 0 }}
93 93
             type="link"
94
+            disabled={record?.isCompleted}
94 95
             onClick={() => {
95 96
               navigate(`/purchase/bill/edit?id=${record.id}`);
96 97
             }}
@@ -104,6 +105,7 @@ const StockList = (props) => {
104 105
             key={5}
105 106
             style={{ padding: 0 }}
106 107
             type="link"
108
+            disabled={record?.isInStore}
107 109
             onClick={() => {
108 110
               navigate(`/purchase/inStore/edit?id=${record.id}`);
109 111
             }}
@@ -135,7 +137,7 @@ const StockList = (props) => {
135 137
       <ProTable
136 138
         actionRef={actionRef}
137 139
         rowKey="id"
138
-        params={type === "inStore"? {isCompleted:true}:{}}
140
+        params={type === "inStore" ? { isCompleted: true } : {}}
139 141
         toolBarRender={() => [
140 142
           type === "plan" ? (
141 143
             <Button

+ 11
- 25
src/pages/rotationChart/detail/index.jsx Zobrazit soubor

@@ -1,28 +1,19 @@
1
-import { savePosts, getPostsDetail, updatePosts } from "@/services/posts";
2
-import {
3
-  addBanner,
4
-  getBannerdById,
5
-  updataBanner,
6
-} from "@/services/rotationChart";
1
+import { getBannerdById } from "@/services/rotationChart";
7 2
 import { useNavigate, useSearchParams } from "react-router-dom";
8
-import { Card, Typography, message, Row, Button, Space } from "antd";
9
-import { useEffect, useRef, useState } from "react";
3
+import { Card, Button } from "antd";
4
+import { useEffect, useState } from "react";
10 5
 
11
-const { Title } = Typography;
12 6
 export default (props) => {
13 7
   const [searchParams] = useSearchParams();
14 8
   const id = searchParams.get("id");
15 9
   const [data, setData] = useState({});
16
-  // const [url, setUrl] = useState("");
17
-  const navigate = useNavigate();
18 10
 
19
-  const formRef = useRef();
11
+  const navigate = useNavigate();
20 12
 
21 13
   useEffect(() => {
22 14
     if (id) {
23 15
       getBannerdById(id).then((res) => {
24 16
         setData(res);
25
-        // setUrl(res.filesList[0]?.fileAddr);
26 17
       });
27 18
     }
28 19
   }, [id]);
@@ -31,21 +22,16 @@ export default (props) => {
31 22
     <Card title={<Button onClick={() => navigate(-1)}> 返回</Button>}>
32 23
       <div dangerouslySetInnerHTML={{ __html: data?.desc }}></div>
33 24
       {data?.type === "1" && data?.image && (
34
-        <img src={data?.image} alt=""></img>
25
+        <img src={data?.image} alt="" style={{ width: "100%" }}></img>
35 26
       )}
36 27
       {data?.type === "2" && data?.video && (
37
-        <video src={data?.video} autoPlay={false} controls="controls"></video>
28
+        <video
29
+          src={data?.video}
30
+          autoPlay={false}
31
+          controls="controls"
32
+          style={{ width: "100%" }}
33
+        ></video>
38 34
       )}
39
-      {/* {url && (
40
-        <div style={{marginTop:"2em"}}>
41
-          <a
42
-            href={`${url}`}
43
-            download
44
-          >
45
-            {url?.substring(url?.lastIndexOf("/") + 1)}
46
-          </a>
47
-        </div>
48
-      )} */}
49 35
     </Card>
50 36
   );
51 37
 };