Blame view

src/pages/pms/storage/partShop/index.tsx 3.22 KB
80be94ef   jiangwei   服务站配件、配件计划进度、客户订件...
1
  import React, {useState} from 'react';
71a2ef45   jiangwei   样式优化
2
  import { PlusOutlined, DownloadOutlined, UploadOutlined } from '@ant-design/icons';
cc26d1fc   张志伟   🎉 重新构建项目,解决项目过大的问题
3
4
5
6
  import { Card, Button } from 'antd';
  import { PageHeaderWrapper } from '@ant-design/pro-layout';
  import Filter from './components/Filter';
  import List from './components/List';
cc26d1fc   张志伟   🎉 重新构建项目,解决项目过大的问题
7
8
  import store from './store';
  import { createStore } from '@/hooks/moz';
630dfca7   baiyun   优化导入库存和废弃代码删除
9
  import ImportModal from './components/UploadExcel';
80be94ef   jiangwei   服务站配件、配件计划进度、客户订件...
10
  import UploadMoreModal from './components/UploadMoreModal';
c6f9c477   jiangwei   库房流水导出
11
  import StorageFlowModal from './components/StorageFlowModal';
cc26d1fc   张志伟   🎉 重新构建项目,解决项目过大的问题
12
13
14
15
  
  export const { Provider, useStore } = createStore(store);
  
  function PartShop() {
b412162f   jiangwei   服务站配件调整
16
    const { setImportVisible, fw, setVisible, setIsadd, fwS } = useStore();
80be94ef   jiangwei   服务站配件、配件计划进度、客户订件...
17
18
    const [more, setMore] = useState(false);
    const [stock, setStock] = useState(false);
b11d38c3   jiangwei   增加锁库批量导出功能
19
    const [islock, setIslock] = useState(false);
c6f9c477   jiangwei   库房流水导出
20
    const [storageFlowVisible, setStorageFlowVisible] = useState(false);
cc26d1fc   张志伟   🎉 重新构建项目,解决项目过大的问题
21
22
  
    return (
1521db5f   jiangwei   fix
23
      <PageHeaderWrapper title={`服务站配件${fw ? `${fwS ? '(库存)' : '(霏微)'}`: ''}`}>
cc26d1fc   张志伟   🎉 重新构建项目,解决项目过大的问题
24
        <Card>
71a2ef45   jiangwei   样式优化
25
          <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', marginBottom: 20 }}>
cc26d1fc   张志伟   🎉 重新构建项目,解决项目过大的问题
26
            <Filter />
71a2ef45   jiangwei   样式优化
27
28
29
30
31
32
33
34
            <div style={{ display: 'flex', alignItems: 'center'}}>
              <Button
                type="primary"
                icon={<PlusOutlined />}
                onClick={() => { setVisible(true); setIsadd(true); }}
              >
                新增
              </Button>
80be94ef   jiangwei   服务站配件、配件计划进度、客户订件...
35
              {fw && (
b11d38c3   jiangwei   增加锁库批量导出功能
36
              <Button
71a2ef45   jiangwei   样式优化
37
                icon={<UploadOutlined />}
b11d38c3   jiangwei   增加锁库批量导出功能
38
                type="primary"
71a2ef45   jiangwei   样式优化
39
40
41
42
43
44
45
46
47
48
49
                onClick={() => setImportVisible(true)}
                style={{ marginLeft: 10 }}
              >
                导入
              </Button>
                )}
              {fw && (
              <Button
                icon={<UploadOutlined />}
                type="primary"
                onClick={() => { setImportVisible(true); setStock(true); }}
b11d38c3   jiangwei   增加锁库批量导出功能
50
51
                style={{marginLeft: 10}}
              >
2ef8422a   jiangwei   库位导入及一些文件下载模板
52
                调拨库存导入
b11d38c3   jiangwei   增加锁库批量导出功能
53
              </Button>
71a2ef45   jiangwei   样式优化
54
                )}
859291ed   by1642146903   Merge remote-trac...
55
56
              <Button
                type="primary"
71a2ef45   jiangwei   样式优化
57
58
                icon={<DownloadOutlined />}
                onClick={() => { setMore(true); setIslock(true); }}
dfc8ef65   jiangwei   样式调整
59
60
                style={{marginLeft: 10}}
              >
71a2ef45   jiangwei   样式优化
61
                锁件批量导出
dfc8ef65   jiangwei   样式调整
62
              </Button>
859291ed   by1642146903   Merge remote-trac...
63
64
              <Button
                type="primary"
71a2ef45   jiangwei   样式优化
65
66
67
                icon={<DownloadOutlined />}
                onClick={() => setMore(true)}
                style={{marginLeft: 10}}
58a9b20c   jiangwei   服务站配件新增功能、工单缺件bug
68
              >
71a2ef45   jiangwei   样式优化
69
                库存批量导出
58a9b20c   jiangwei   服务站配件新增功能、工单缺件bug
70
              </Button>
c6f9c477   jiangwei   库房流水导出
71
72
73
74
75
76
77
78
              <Button
                type="primary"
                icon={<DownloadOutlined />}
                onClick={() => setStorageFlowVisible(true)}
                style={{marginLeft: 10}}
              >
                库房流水导出
              </Button>
80be94ef   jiangwei   服务站配件、配件计划进度、客户订件...
79
            </div>
cc26d1fc   张志伟   🎉 重新构建项目,解决项目过大的问题
80
81
          </div>
          <List />
fbba5c8e   jiangwei   服务站配件-->文件导入bug
82
          <ImportModal stock={stock} setStock={setStock} />
80be94ef   jiangwei   服务站配件、配件计划进度、客户订件...
83
84
85
          <UploadMoreModal
            visible={more}
            onCancel={() => setMore(false)}
b11d38c3   jiangwei   增加锁库批量导出功能
86
87
            islock={islock}
            setIslock={setIslock}
80be94ef   jiangwei   服务站配件、配件计划进度、客户订件...
88
          />
c6f9c477   jiangwei   库房流水导出
89
          <StorageFlowModal visible={storageFlowVisible} onCancel={() => setStorageFlowVisible(false)} />
cc26d1fc   张志伟   🎉 重新构建项目,解决项目过大的问题
90
91
        </Card>
      </PageHeaderWrapper>
630dfca7   baiyun   优化导入库存和废弃代码删除
92
    );
cc26d1fc   张志伟   🎉 重新构建项目,解决项目过大的问题
93
94
  }
  
01528395   蒋伟   配件系统_配件计划_指定配件
95
  export default () => <Provider><PartShop /></Provider>;