Преглед на файлове

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

lisenzhou преди 2 години
родител
ревизия
e55235e96a

+ 9
- 3
src/pages/statis/components/Filter.jsx Целия файл

2
 import { Row, Col, Radio, DatePicker } from 'antd';
2
 import { Row, Col, Radio, DatePicker } from 'antd';
3
 import moment from 'moment';
3
 import moment from 'moment';
4
 import 'moment/locale/zh-cn';
4
 import 'moment/locale/zh-cn';
5
-import locale from 'antd/es/locale/zh_CN';
5
+import locale from 'antd/es/date-picker/locale/zh_CN';
6
 
6
 
7
 const { RangePicker } = DatePicker;
7
 const { RangePicker } = DatePicker;
8
 const radioOptions = [
8
 const radioOptions = [
11
   { label: '本年', value: '3' },
11
   { label: '本年', value: '3' },
12
 ];
12
 ];
13
 
13
 
14
+export const last30Days = [
15
+  moment().subtract(30, 'days'),
16
+  moment(),
17
+];
18
+
14
 export const yearRange = [
19
 export const yearRange = [
15
   moment().startOf('year'),
20
   moment().startOf('year'),
16
   moment(),
21
   moment(),
29
   const [radioValue, setRadioValue] = React.useState();
34
   const [radioValue, setRadioValue] = React.useState();
30
 
35
 
31
   const onChange = (val) => {
36
   const onChange = (val) => {
37
+    console.log(val);
32
     if (typeof props.onChange === 'function') {
38
     if (typeof props.onChange === 'function') {
33
       props.onChange(getStrValue(val));
39
       props.onChange(getStrValue(val));
34
     }
40
     }
37
   const onPickerChange = val => {
43
   const onPickerChange = val => {
38
     setDateRange(val);
44
     setDateRange(val);
39
     setRadioValue();
45
     setRadioValue();
40
-    onChange(getStrValue(val));
46
+    onChange(val);
41
   }
47
   }
42
 
48
 
43
   const onRadioChange = e => {
49
   const onRadioChange = e => {
59
     }
65
     }
60
     
66
     
61
     setDateRange(dateRange);
67
     setDateRange(dateRange);
62
-    onChange(getStrValue(dateRange));
68
+    onChange(dateRange);
63
   }
69
   }
64
 
70
 
65
   return (
71
   return (

+ 19
- 7
src/pages/statis/components/Sumary.jsx Целия файл

1
 import React from 'react';
1
 import React from 'react';
2
 import { Row, Col } from 'antd';
2
 import { Row, Col } from 'antd';
3
 import classNames from 'classnames';
3
 import classNames from 'classnames';
4
+import { getSummary } from '@/services/statis';
4
 import icon1 from '@/assets/images/statistic/数字统计.png';
5
 import icon1 from '@/assets/images/statistic/数字统计.png';
5
 import icon2 from '@/assets/images/statistic/接待军人总数.png';
6
 import icon2 from '@/assets/images/statistic/接待军人总数.png';
6
 import icon3 from '@/assets/images/statistic/保障机构数.png';
7
 import icon3 from '@/assets/images/statistic/保障机构数.png';
8
 import Styles from './style.module.less';
9
 import Styles from './style.module.less';
9
 
10
 
10
 const DataCard = (props) => {
11
 const DataCard = (props) => {
11
-  const { className, icon } = props;
12
+  const { className, icon, title, value = 0, size } = props;
12
 
13
 
13
   const cls = classNames(Styles['data-card'], className);
14
   const cls = classNames(Styles['data-card'], className);
14
 
15
 
16
+  const valStyle = React.useMemo(() => {
17
+    return size ? { fontSize: size } : {}
18
+  }, [size]);
19
+
15
   return (
20
   return (
16
     <dl className={cls}>
21
     <dl className={cls}>
17
-      <dt>0</dt>
18
-      <dd>任务总数</dd>
22
+      <dt style={valStyle}>{value}</dt>
23
+      <dd>{title}</dd>
19
       <img src={icon} alt="" />
24
       <img src={icon} alt="" />
20
     </dl>
25
     </dl>
21
   )
26
   )
22
 }
27
 }
23
 
28
 
24
 export default (props) => {
29
 export default (props) => {
30
+  
31
+  const [data, setData] = React.useState({});
32
+
33
+  React.useEffect(() => {
34
+    getSummary().then(setData);
35
+  }, []);
36
+
25
   return (
37
   return (
26
     <Row gutter={props.gutter} justify="space-between">
38
     <Row gutter={props.gutter} justify="space-between">
27
       <Col span={6}>
39
       <Col span={6}>
28
-        <DataCard icon={icon1} className={Styles['bk1']} />
40
+        <DataCard title="任务总数" value={data.taskCount} icon={icon1} className={Styles['bk1']} />
29
       </Col>
41
       </Col>
30
       <Col span={6}>
42
       <Col span={6}>
31
-        <DataCard icon={icon2} className={Styles['bk2']} />
43
+        <DataCard title="接待军人总数" value={data.personNum} icon={icon2} className={Styles['bk2']} />
32
       </Col>
44
       </Col>
33
       <Col span={6}>
45
       <Col span={6}>
34
-        <DataCard icon={icon3} className={Styles['bk3']} />
46
+        <DataCard title="总体评价" value={data.evaValue} icon={icon3} className={Styles['bk3']} size="24px" />
35
       </Col>
47
       </Col>
36
       <Col span={6}>
48
       <Col span={6}>
37
-        <DataCard icon={icon4} className={Styles['bk4']} />
49
+        <DataCard title="设备数量" value={data.deviceNum} icon={icon4} className={Styles['bk4']} />
38
       </Col>
50
       </Col>
39
     </Row>
51
     </Row>
40
   )
52
   )

+ 25
- 5
src/pages/statis/components/Task.jsx Целия файл

2
 import * as echarts from 'echarts/core';
2
 import * as echarts from 'echarts/core';
3
 import icon from '@/assets/images/statistic/任务统计.png';
3
 import icon from '@/assets/images/statistic/任务统计.png';
4
 import Chart from '@/components/chart';
4
 import Chart from '@/components/chart';
5
+import { getTaskInfo } from '@/services/statis';
5
 import StatisCard from './StatisCard';
6
 import StatisCard from './StatisCard';
6
-import Filter from './Filter';
7
+import Filter, { last30Days, getStrValue } from './Filter';
7
 
8
 
9
+const defaultValue = getStrValue(last30Days);
8
 export default (props) => {
10
 export default (props) => {
9
 
11
 
10
-  const option = getOption(["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], [0, 0, 0, 0, 0, 0, 8, 9, 10, 1, 1, 6])
12
+  const [dateRange, setDateRange] = React.useState(defaultValue);
13
+  const [option, setOption] = React.useState({});
14
+  // const option = getOption(["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], [0, 0, 0, 0, 0, 0, 8, 9, 10, 1, 1, 6])
15
+
16
+  React.useEffect(() => {
17
+    getTaskInfo({ startDate: dateRange[0], endDate: dateRange[1] }).then(res => {
18
+      const keys = res.map(x => x.dt);
19
+      const vals = res.map(x => x.cnt);
20
+
21
+      const opt = getOption(keys, vals);
22
+
23
+      setOption(res.length > 30 ? { ...opt, dataZoom: { height: 20, bottom: 6 } } : opt);
24
+    });
25
+  }, [dateRange]);
11
 
26
 
12
   return (
27
   return (
13
     <StatisCard
28
     <StatisCard
14
       title="任务统计"
29
       title="任务统计"
15
       icon={icon}
30
       icon={icon}
16
-      extra={<Filter />}
31
+      extra={<Filter onChange={setDateRange} />}
17
     >
32
     >
18
       <Chart option={option} style={{ height: '300px' }} />
33
       <Chart option={option} style={{ height: '300px' }} />
19
     </StatisCard>
34
     </StatisCard>
39
     },
54
     },
40
     xAxis: {
55
     xAxis: {
41
       type: 'category',
56
       type: 'category',
42
-      axisLabel: axisLabel,
57
+      axisLabel: { ...axisLabel, rotate: 45 },
43
       axisLine: {
58
       axisLine: {
44
         show: true,
59
         show: true,
45
         lineStyle: lineStyle
60
         lineStyle: lineStyle
57
       },
72
       },
58
       type: 'value'
73
       type: 'value'
59
     },
74
     },
75
+    // dataZoom: [
76
+    //   {
77
+    //     show: true,
78
+    //   }
79
+    // ],
60
     grid: {
80
     grid: {
61
       top: 20,
81
       top: 20,
62
       left: 50,
82
       left: 50,
63
       right: 20,
83
       right: 20,
64
-      bottom: 50,
84
+      bottom: 100,
65
     },
85
     },
66
     series: [
86
     series: [
67
       {
87
       {

+ 2
- 1
src/pages/statis/components/style.module.less Целия файл

14
 
14
 
15
   dt {
15
   dt {
16
     font-size: 36px;
16
     font-size: 36px;
17
+    line-height: 55px;
17
   }
18
   }
18
 
19
 
19
   dd {
20
   dd {
20
     font-size: 16px;
21
     font-size: 16px;
22
+    line-height: 1.53846;
21
   }
23
   }
22
 
24
 
23
   dt, dd {
25
   dt, dd {
24
     padding: 0;
26
     padding: 0;
25
     font-weight: 400;
27
     font-weight: 400;
26
     color: rgb(255, 255, 255);
28
     color: rgb(255, 255, 255);
27
-    line-height: 1.53846;
28
   }
29
   }
29
 
30
 
30
   img {
31
   img {

+ 86
- 0
src/regulation/edit/index.jsx Целия файл

1
+import { addRegulation, updataRegulation, getRegulationById } from '@/services/regulation';
2
+import { PageContainer, ProForm, ProFormSelect, ProFormText } from '@ant-design/pro-components';
3
+import { Card, Col, message, Row, Space } from 'antd';
4
+import { useNavigate, useSearchParams } from 'react-router-dom';
5
+import { useEffect, useRef, useState } from 'react';
6
+
7
+export default (props) => {
8
+  const [searchParams, setSearchParams] = useSearchParams();
9
+  const id = searchParams.get('id');
10
+  const formRef = useRef();
11
+  const navigate = useNavigate();
12
+
13
+  useEffect(() => {
14
+    if (id) {
15
+      getRegulationById(id).then((res) => {
16
+        formRef.current.setFieldsValue(res);
17
+      });
18
+    }
19
+  }, [id]);
20
+
21
+  const onFinish = async (values) => {
22
+    console.log(values);
23
+
24
+    if (id) {
25
+      //修改
26
+      updataRegulation({ ...values }, id).then((res) => {
27
+        message.success('修改成功');
28
+        navigate(-1);
29
+      });
30
+
31
+    } else {
32
+      //添加
33
+      addRegulation({ ...values }).then((res) => {
34
+        message.success('添加成功');
35
+        navigate(-1);
36
+      });
37
+    }
38
+    return false;
39
+  };
40
+
41
+  return (
42
+    <PageContainer>
43
+      <Card>
44
+        <ProForm
45
+          formRef={formRef}
46
+          layout={'horizontal'}
47
+          labelCol={{ span: 8 }}
48
+          wrapperCol={{ span: 16 }}
49
+          onFinish={onFinish}
50
+          submitter={{
51
+            searchConfig: {
52
+              resetText: '返回',
53
+            },
54
+            onReset: () => navigate(-1),
55
+            render: (props, doms) => {
56
+              return (
57
+                <Row>
58
+                  <Col span={8} offset={8}>
59
+                    <Space>{doms}</Space>
60
+                  </Col>
61
+                </Row>
62
+              );
63
+            },
64
+          }}
65
+        >
66
+          <ProFormText
67
+            name="detail"
68
+            label="发布内容"
69
+            placeholder="请输入发布内容"
70
+            rules={[{ required: true, message: '请输入发布内容' }]}
71
+            allowClear={false}
72
+            width={460}
73
+          />
74
+          <ProFormText
75
+            name="title"
76
+            label="内容名称"
77
+            placeholder="请输入内容名称"
78
+            rules={[{ required: true, message: '请输入内容名称' }]}
79
+            allowClear={false}
80
+            width={460}
81
+          />
82
+        </ProForm>
83
+      </Card>
84
+    </PageContainer>
85
+  );
86
+}

+ 75
- 7
src/regulation/index.jsx Целия файл

1
+import { getRegulationList, updataRegulation, deleteRegulation } from '@/services/regulation';
1
 import { PageContainer, ProTable } from '@ant-design/pro-components';
2
 import { PageContainer, ProTable } from '@ant-design/pro-components';
2
 import { useRef, useState } from 'react';
3
 import { useRef, useState } from 'react';
3
 import { useNavigate } from 'react-router-dom';
4
 import { useNavigate } from 'react-router-dom';
4
 import { queryTable } from '@/utils/request';
5
 import { queryTable } from '@/utils/request';
6
+import { Button, message, Popconfirm } from 'antd';
5
 
7
 
6
 const RegulationList = (props) => {
8
 const RegulationList = (props) => {
7
-const actionRef = useRef();
8
-const navigate = useNavigate();
9
+  const actionRef = useRef();
10
+  const navigate = useNavigate();
9
 
11
 
10
-const columns = [
12
+  // const updata = (row) => {
13
+  //   if (row.id) {
14
+  //     // 修改
15
+  //     updataRegulation(row.id, { ...values }).then((res) => {
16
+  //       message.success('修改成功');
17
+  //       navigate(-1);
18
+  //     });
19
+  //   }
20
+  // };
21
+
22
+  const handleDelete = (id) => {
23
+    if (id) {
24
+      deleteRegulation(id).then((res) => {
25
+        message.success('删除成功');
26
+        actionRef.current.reload();
27
+      });
28
+    }
29
+  };
30
+
31
+  const columns = [
11
     {
32
     {
12
       title: 'id',
33
       title: 'id',
13
       dataIndex: 'id',
34
       dataIndex: 'id',
35
+      width: 200,
14
     },
36
     },
15
     {
37
     {
16
       title: '标题',
38
       title: '标题',
17
       dataIndex: 'title',
39
       dataIndex: 'title',
40
+      width: 200,
18
     },
41
     },
19
 
42
 
20
     {
43
     {
21
       title: '内容',
44
       title: '内容',
22
-      dataIndex: 'content',
45
+      dataIndex: 'detail',
46
+      width: 200,
23
     },
47
     },
24
 
48
 
25
     {
49
     {
26
       title: '发布人',
50
       title: '发布人',
27
-      dataIndex: 'faburen',
51
+      dataIndex: 'create_person',
52
+      width: 200,
28
     },
53
     },
29
     {
54
     {
30
       title: '发布时间',
55
       title: '发布时间',
31
-      dataIndex: 'fabutime',
56
+      dataIndex: 'create_date',
57
+      width: 200,
58
+    },
59
+    {
60
+      title: '操作',
61
+      valueType: 'option',
62
+      width: 200,
63
+      render: (_, record) => [
64
+        <Button
65
+          key={2}
66
+          style={{ padding: 0 }}
67
+          type="link"
68
+          onClick={() => {
69
+            console.log(record, ']]');
70
+            navigate(`/cms/regulation/add?id=${record.id}`);
71
+          }}
72
+        >
73
+          编辑
74
+        </Button>,
75
+
76
+        <Popconfirm
77
+          key={3}
78
+          title="您是否确认删除 ?"
79
+          onConfirm={() => handleDelete(record.id)}
80
+          okText="确定"
81
+          cancelText="取消"
82
+        >
83
+          {/* manualPush */}
84
+          <Button style={{ padding: 0 }} type="link">
85
+            删除
86
+          </Button>
87
+        </Popconfirm>,
88
+      ],
32
     },
89
     },
33
   ];
90
   ];
34
 
91
 
38
         search={false}
95
         search={false}
39
         actionRef={actionRef}
96
         actionRef={actionRef}
40
         rowKey="id"
97
         rowKey="id"
41
-        // request={queryTable(getBannerList)}
98
+        toolBarRender={() => [
99
+          <Button
100
+            key="2"
101
+            type="primary"
102
+            onClick={() => {
103
+              navigate('/cms/regulation/add');
104
+            }}
105
+          >
106
+            新增
107
+          </Button>,
108
+        ]}
109
+        request={queryTable(getRegulationList)}
42
         columns={columns}
110
         columns={columns}
43
       />
111
       />
44
     </PageContainer>
112
     </PageContainer>

+ 42
- 34
src/routes/routes.jsx Целия файл

6
   MenuFoldOutlined,
6
   MenuFoldOutlined,
7
   MenuUnfoldOutlined,
7
   MenuUnfoldOutlined,
8
   PieChartOutlined,
8
   PieChartOutlined,
9
-} from "@ant-design/icons";
10
-import { Navigate } from "react-router-dom";
11
-import AuthLayout from "@/layouts/AuthLayout";
12
-import Container from "@/layouts/Container";
13
-import Login from "@/pages/login";
14
-import Page404 from "@/pages/404";
15
-import Home from "@/pages/sample/home";
16
-import BasicForm from "@/pages/sample/form";
17
-import BasicTable from "@/pages/sample/table";
18
-import GuaranteeTaskList from "@/pages/guaranteeTask";
19
-import GuaranteeTaskEdit from "@/pages/guaranteeTask/Edit";
20
-import GuaranteeTaskPrint from "@/pages/guaranteeTask/print";
9
+} from '@ant-design/icons';
10
+import { Navigate } from 'react-router-dom';
11
+import AuthLayout from '@/layouts/AuthLayout';
12
+import Container from '@/layouts/Container';
13
+import Login from '@/pages/login';
14
+import Page404 from '@/pages/404';
15
+import Home from '@/pages/sample/home';
16
+import BasicForm from '@/pages/sample/form';
17
+import BasicTable from '@/pages/sample/table';
18
+import GuaranteeTaskList from '@/pages/guaranteeTask';
19
+import GuaranteeTaskEdit from '@/pages/guaranteeTask/Edit';
20
+import GuaranteeTaskPrint from '@/pages/guaranteeTask/print';
21
 import GuaranteeTaskEvaluate from "@/pages/evaluate";
21
 import GuaranteeTaskEvaluate from "@/pages/evaluate";
22
 import GuaranteeTaskEvaluateList from "@/pages/evaluate/evaluateList";
22
 import GuaranteeTaskEvaluateList from "@/pages/evaluate/evaluateList";
23
-import DishList from "@/pages/dish/list";
24
-import DishEdit from "@/pages/dish/edit";
25
-import PackageList from "@/pages/package";
26
-import StockList from "@/pages/stock/list";
27
-import StockEdit from "@/pages/stock/edit";
28
-import StockInOut from "@/pages/stock/outAndIn";
29
-import StockLog from "@/pages/stock/stockLog";
30
-import StockClassificationList from "@/pages/stockClassification/list";
31
-import StockClassificationEdit from "@/pages/stockClassification/edit";
32
-import RotationChartList from "@/pages/rotationChart/list";
33
-import RotationChartEdit from "@/pages/rotationChart/edit";
34
-import RotationChartIntroduction from "@/pages/rotationChart/introduction";
35
-import Roles from "@/pages/roles/index";
36
-import RegulationList from "@/regulation";
37
-import UserList from "@/pages/user";
38
-import UserEdit from "@/pages/user/Edit";
23
+import DishList from '@/pages/dish/list';
24
+import DishEdit from '@/pages/dish/edit';
25
+import PackageList from '@/pages/package/List';
26
+import StockList from '@/pages/stock/list';
27
+import StockEdit from '@/pages/stock/edit';
28
+import StockInOut from '@/pages/stock/outAndIn';
29
+import StockLog from '@/pages/stock/stockLog';
30
+import StockClassificationList from '@/pages/stockClassification/list';
31
+import StockClassificationEdit from '@/pages/stockClassification/edit';
32
+import RotationChartList from '@/pages/rotationChart/list';
33
+import RotationChartEdit from '@/pages/rotationChart/edit';
34
+import RotationChartIntroduction from '@/pages/rotationChart/introduction';
35
+import Roles from '@/pages/roles/index';
36
+import RegulationList from '@/regulation';
37
+import RegulationEdit from '@/regulation/edit';
38
+import UserList from '@/pages/user';
39
+import UserEdit from '@/pages/user/Edit';
39
 import PurchasePlanList from "@/pages/purchase/plan/list";
40
 import PurchasePlanList from "@/pages/purchase/plan/list";
40
 import PurchasePlanEdit from "@/pages/purchase/plan/edit";
41
 import PurchasePlanEdit from "@/pages/purchase/plan/edit";
41
 import PurchaseBillEdit from "@/pages/purchase/bill/edit";
42
 import PurchaseBillEdit from "@/pages/purchase/bill/edit";
77
         path: "guaranteeTask",
78
         path: "guaranteeTask",
78
         element: <GuaranteeTaskList />,
79
         element: <GuaranteeTaskList />,
79
         meta: {
80
         meta: {
80
-          title: "军供通报",
81
+          title: "任务通报",
81
         },
82
         },
82
       },
83
       },
83
       {
84
       {
218
         },
219
         },
219
       },
220
       },
220
       {
221
       {
221
-        path: "regulation",
222
-        element: null,
222
+        path: 'regulation',
223
+        element: <RegulationList />,
223
         meta: {
224
         meta: {
224
           title: "规章制度",
225
           title: "规章制度",
225
         },
226
         },
226
       },
227
       },
228
+      {
229
+        path: 'regulation/add',
230
+        element: <RegulationEdit />,
231
+        meta: {
232
+          hideInMenu: true,
233
+          title: '规章制度维护',
234
+        },
235
+      },
227
       {
236
       {
228
         path: "emergency-plan",
237
         path: "emergency-plan",
229
         element: <EmergencyPlanList />,
238
         element: <EmergencyPlanList />,
431
   },
440
   },
432
 ];
441
 ];
433
 
442
 
434
-export function mergeAuthRoutes(r1, r2) {
443
+export function mergeAuthRoutes (r1, r2) {
435
   const r = r1.slice();
444
   const r = r1.slice();
436
   const children = r1[0].children.slice();
445
   const children = r1[0].children.slice();
437
   r[0].children = children.concat(r2);
446
   r[0].children = children.concat(r2);
440
 
449
 
441
 // 全部路由
450
 // 全部路由
442
 export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
451
 export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
443
-
444
-function getPath(parent = "/", current = "") {
452
+function getPath (parent = "/", current = "") {
445
   if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
453
   if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
446
     return current;
454
     return current;
447
   return `${parent}/${current}`.replace(/\/\//g, "/");
455
   return `${parent}/${current}`.replace(/\/\//g, "/");

+ 36
- 0
src/services/regulation.js Целия файл

1
+import request from '@/utils/request';
2
+
3
+/**
4
+ * 查询列表
5
+ * @param {*} params
6
+ * @returns
7
+ */
8
+export const getRegulationList = (params) => request('/posts', { params });
9
+
10
+/**
11
+* 新增
12
+* @param {*} data
13
+* @returns
14
+*/
15
+export const addRegulation = (data) => request('/posts', { method: 'post', data });
16
+
17
+/**
18
+ * 更新
19
+ * @param {*} data
20
+ * @returns
21
+ */
22
+export const updataRegulation = (data, id) => request(`/posts/${id}`, { method: 'get', data });
23
+
24
+/**
25
+* 详情
26
+* @param {*} id
27
+* @returns
28
+*/
29
+export const getRegulationById = (id) => request(`/posts/${id}`);
30
+
31
+/**
32
+ * 删除
33
+ * @param {*} id
34
+ * @returns
35
+ */
36
+export const deleteRegulation = (id) => request(`/posts/${id}`, { method: 'delete' });

+ 5
- 0
src/services/statis.js Целия файл

1
+import request from '@/utils/request';
2
+
3
+export const getSummary = () => request('/statis/summary', { successTip: false });
4
+
5
+export const getTaskInfo = (params) => request('/statis/taskInfo', { params, successTip: false });

+ 5
- 5
src/services/stock.js Целия файл

6
  * @param {*} params
6
  * @param {*} params
7
  * @returns
7
  * @returns
8
  */
8
  */
9
-export const getStoreList = (params) => request('/store', { params,successTip:false });
9
+export const getStoreList = (params) => request('/store', { params, successTip: false });
10
 
10
 
11
 /**
11
 /**
12
  * 新增
12
  * 新增
42
  * @param {*} params
42
  * @param {*} params
43
  * @returns
43
  * @returns
44
  */
44
  */
45
-export const storeExport = (params) => request('/store/export',  { download: true, params });
45
+export const storeExport = (params) => request('/store/export', { download: true, params });
46
 
46
 
47
 
47
 
48
 // 库存分类
48
 // 库存分类
51
  * @param {*} params
51
  * @param {*} params
52
  * @returns
52
  * @returns
53
  */
53
  */
54
-export const getStoreTypeList = (params) => request('/storeType', { params,successTip:false });
54
+export const getStoreTypeList = (params) => request('/storeType', { params, successTip: false });
55
 
55
 
56
 /**
56
 /**
57
  * 新增
57
  * 新增
73
  * @param {*} data
73
  * @param {*} data
74
  * @returns
74
  * @returns
75
  */
75
  */
76
-export const updataStoreType = (id, data) => request(`/storeType/${id}`, { method: 'put', data });
76
+export const updataStoreType = (id, data) => request(`/storeType/${id}`, { method: 'post', data });
77
 
77
 
78
 /**
78
 /**
79
  * 删除
79
  * 删除
104
  * @param {*} params
104
  * @param {*} params
105
  * @returns
105
  * @returns
106
  */
106
  */
107
- export const storeLogExport = (params) => request('/storeLog/export',  { download: true, params });
107
+export const storeLogExport = (params) => request('/storeLog/export', { download: true, params });