├── .editorconfig
├── .eslintignore
├── .eslintrc-backup
├── .gitignore
├── .webpackrc
├── README.md
├── dist
├── index.css
├── index.html
├── index.js
├── router.css
├── router.js
└── static
│ └── yay.44dd3333.jpg
├── docs
└── images
│ ├── bill.png
│ ├── index.png
│ ├── order.png
│ ├── project.png
│ ├── resource.png
│ └── supplierBill.png
├── mock
└── example.js
├── package-lock.json
├── package.json
├── proxy.config.js
├── service
├── app.js
├── bin
│ └── www
├── constants
│ └── constants.js
├── models
│ ├── customers.js
│ ├── orders.js
│ ├── productStocks.js
│ ├── products.js
│ ├── settlement.js
│ ├── storage.js
│ ├── suppliers.js
│ └── user.js
├── package-lock.json
├── package.json
├── public
│ ├── favicon.ico
│ └── stylesheets
│ │ └── style.css
├── routes
│ ├── auth.js
│ ├── customerBills.js
│ ├── customers.js
│ ├── index.js
│ ├── orders.js
│ ├── productStocks.js
│ ├── products.js
│ ├── resource.js
│ ├── settlement.js
│ ├── storage.js
│ ├── supplierBills.js
│ ├── suppliers.js
│ ├── system.js
│ ├── uploadProductImg.js
│ └── users.js
├── tmp
│ └── .ignore
├── utils
│ └── utils.js
└── views
│ ├── error.jade
│ ├── index.jade
│ └── layout.jade
├── src
├── assets
│ └── yay.jpg
├── components
│ ├── BreadcrumbList
│ │ ├── BreadcrumbList.jsx
│ │ └── index.css
│ ├── CustomerBills
│ │ ├── ClearCustomerBillsModal
│ │ │ ├── ClearCustomerBillsModal.jsx
│ │ │ └── index.css
│ │ ├── ClearDebtOrdersModal
│ │ │ ├── ClearDebtOrdersModal.jsx
│ │ │ └── index.css
│ │ ├── CustomerBillsList
│ │ │ ├── CustomerBillsList.jsx
│ │ │ └── index.css
│ │ ├── CustomerBillsSearchForm
│ │ │ ├── CustomerBillsSearchForm.jsx
│ │ │ └── index.css
│ │ └── DebtOrdersList
│ │ │ ├── DebtOrdersList.jsx
│ │ │ └── index.css
│ ├── Customers
│ │ ├── AddCustomer
│ │ │ ├── AddCustomer.jsx
│ │ │ └── index.css
│ │ ├── CustomerCommon
│ │ │ ├── CustomerForm
│ │ │ │ ├── CustomerForm.jsx
│ │ │ │ └── index.css
│ │ │ └── CustomerTitle
│ │ │ │ ├── CustomerTitle.jsx
│ │ │ │ └── index.css
│ │ └── CustomerList
│ │ │ ├── CustomerList.jsx
│ │ │ └── index.css
│ ├── EditableCell
│ │ ├── EditableCell.jsx
│ │ └── index.css
│ ├── Example.js
│ ├── Funds
│ │ ├── FundsList
│ │ │ ├── FundsList.jsx
│ │ │ └── index.css
│ │ └── FundsSearchForm
│ │ │ ├── FundsSearchForm.js
│ │ │ └── index.css
│ ├── Header
│ │ ├── Header.jsx
│ │ └── index.css
│ ├── ListEditableCell
│ │ ├── ListEditableCell.jsx
│ │ └── index.css
│ ├── LoginModal
│ │ ├── LoginModal.jsx
│ │ └── index.css
│ ├── LogupModal
│ │ ├── LogupModal.jsx
│ │ └── index.css
│ ├── NavLink
│ │ ├── NavLink.jsx
│ │ └── index.css
│ ├── Orders
│ │ ├── AddOrder
│ │ │ ├── AddOrder.jsx
│ │ │ └── index.css
│ │ ├── ModifyOrder
│ │ │ ├── ModifyOrder.jsx
│ │ │ └── index.css
│ │ ├── OrderCommon
│ │ │ ├── AddOrderGrid
│ │ │ │ ├── AddOrderGrid.jsx
│ │ │ │ └── index.css
│ │ │ ├── OrderForm
│ │ │ │ ├── OrderForm.jsx
│ │ │ │ └── index.css
│ │ │ ├── OrderRemarkForm
│ │ │ │ ├── OrderRemarkForm.jsx
│ │ │ │ └── index.css
│ │ │ └── OrderTitle
│ │ │ │ ├── OrderTitle.jsx
│ │ │ │ └── index.css
│ │ ├── OrderList
│ │ │ ├── OrderList.jsx
│ │ │ └── index.css
│ │ └── OrderSearchForm
│ │ │ ├── OrderSearchForm.jsx
│ │ │ └── index.css
│ ├── Products
│ │ ├── AddProduct
│ │ │ ├── AddProduct.jsx
│ │ │ └── index.css
│ │ ├── ProductCommon
│ │ │ ├── ProductForm
│ │ │ │ ├── ProductForm.jsx
│ │ │ │ └── index.css
│ │ │ └── ProductTitle
│ │ │ │ ├── ProductTitle.jsx
│ │ │ │ └── index.css
│ │ └── ProductList
│ │ │ ├── ProductList.jsx
│ │ │ └── index.css
│ ├── Resource
│ │ └── ResourceSearchForm
│ │ │ ├── ResourceSearchForm.js
│ │ │ └── index.css
│ ├── SearchBar
│ │ ├── SearchBar.jsx
│ │ └── index.css
│ ├── SearchForm
│ │ ├── SearchForm.jsx
│ │ └── index.css
│ ├── Settlement
│ │ ├── SettlementList
│ │ │ ├── SettlementList.jsx
│ │ │ └── index.css
│ │ └── SettlementSearchForm
│ │ │ ├── SettlementSearchForm.jsx
│ │ │ └── index.css
│ ├── Spliter
│ │ ├── Spliter.jsx
│ │ └── index.css
│ ├── Stocks
│ │ ├── StockList
│ │ │ ├── StockList.jsx
│ │ │ └── index.css
│ │ └── StockSearchForm
│ │ │ ├── StockSearchForm.js
│ │ │ └── index.css
│ ├── Storage
│ │ ├── AddStorage
│ │ │ ├── AddStorage.jsx
│ │ │ └── index.css
│ │ ├── ModifyStorage
│ │ │ ├── ModifyStorage.jsx
│ │ │ └── index.css
│ │ ├── StorageCommon
│ │ │ ├── AddStorageGrid
│ │ │ │ ├── AddStorageGrid.jsx
│ │ │ │ └── index.css
│ │ │ ├── StorageForm
│ │ │ │ ├── StorageForm.jsx
│ │ │ │ └── index.css
│ │ │ ├── StorageRemarkForm
│ │ │ │ ├── StorageRemarkForm.jsx
│ │ │ │ └── index.css
│ │ │ └── StorageTitle
│ │ │ │ ├── StorageTitle.jsx
│ │ │ │ └── index.css
│ │ ├── StorageList
│ │ │ ├── StorageList.jsx
│ │ │ └── index.css
│ │ └── StorageSearchForm
│ │ │ ├── StorageSearchForm.jsx
│ │ │ └── index.css
│ ├── SupplierBills
│ │ ├── ClearDebtStorageModal
│ │ │ ├── ClearDebtStorageModal.jsx
│ │ │ └── index.css
│ │ ├── ClearSupplierBillsModal
│ │ │ ├── ClearSupplierBillsModal.jsx
│ │ │ └── index.css
│ │ ├── DebtStorageList
│ │ │ ├── DebtStorageList.jsx
│ │ │ └── index.css
│ │ ├── SupplierBillsList
│ │ │ ├── SupplierBillsList.jsx
│ │ │ └── index.css
│ │ └── SupplierBillsSearchForm
│ │ │ ├── SupplierBillsSearchForm.jsx
│ │ │ └── index.css
│ ├── Suppliers
│ │ ├── AddSupplier
│ │ │ ├── AddSupplier.jsx
│ │ │ └── index.css
│ │ ├── SupplierCommon
│ │ │ ├── SupplierForm
│ │ │ │ ├── SupplierForm.jsx
│ │ │ │ └── index.css
│ │ │ └── SupplierTitle
│ │ │ │ ├── SupplierTitle.jsx
│ │ │ │ └── index.css
│ │ └── SupplierList
│ │ │ ├── SupplierList.jsx
│ │ │ └── index.css
│ └── SystemInfo
│ │ ├── SystemInfo.jsx
│ │ └── index.css
├── constants
│ └── constants.js
├── index.html
├── index.js
├── index.less
├── models
│ ├── customerBills.js
│ ├── customers.js
│ ├── example.js
│ ├── funds.js
│ ├── home.js
│ ├── manage.js
│ ├── orders.js
│ ├── products.js
│ ├── resource.js
│ ├── settlement.js
│ ├── stocks.js
│ ├── storage.js
│ ├── supplierBills.js
│ ├── suppliers.js
│ └── systemUser.js
├── router.js
├── routes
│ ├── Bills
│ │ ├── Bills.jsx
│ │ └── index.css
│ ├── CustomerBills
│ │ ├── CustomerBills.jsx
│ │ └── index.css
│ ├── Customers
│ │ ├── Customers.jsx
│ │ └── index.css
│ ├── Funds
│ │ ├── Funds.jsx
│ │ └── index.css
│ ├── HomePage
│ │ ├── HomePage.jsx
│ │ └── index.css
│ ├── IndexPage
│ │ ├── IndexPage.js
│ │ └── index.css
│ ├── Manage
│ │ ├── Manage.jsx
│ │ └── index.css
│ ├── Orders
│ │ ├── Orders.jsx
│ │ └── index.css
│ ├── Products
│ │ ├── Products.jsx
│ │ └── index.css
│ ├── Resource
│ │ ├── Resource.jsx
│ │ └── index.css
│ ├── Settlement
│ │ ├── Settlement.jsx
│ │ └── index.css
│ ├── Stock
│ │ ├── Stock.jsx
│ │ └── index.css
│ ├── Storage
│ │ ├── Storage.jsx
│ │ └── index.css
│ ├── SupplierBills
│ │ ├── SupplierBills.jsx
│ │ └── index.css
│ └── Suppliers
│ │ ├── Suppliers.jsx
│ │ └── index.css
├── services
│ ├── customerBills.js
│ ├── customers.js
│ ├── example.js
│ ├── funds.js
│ ├── orders.js
│ ├── productStocks.js
│ ├── products.js
│ ├── resource.js
│ ├── serviceConfig.js
│ ├── settlement.js
│ ├── stocks.js
│ ├── storage.js
│ ├── supplierBills.js
│ ├── suppliers.js
│ └── systemUser.js
├── tests
│ └── models
│ │ └── example-test.js
└── utils
│ ├── dateFormat.js
│ ├── numberFormat.js
│ ├── request.js
│ └── webSessionUtils.js
├── system.config.js
└── upload
└── uploadfiles
└── .ignore
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 4
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
15 | [Makefile]
16 | indent_style = tab
17 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | src/**/*-test.js
2 |
--------------------------------------------------------------------------------
/.eslintrc-backup:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "babel-eslint",
3 | "extends": "eslint-config-airbnb",
4 | "rules": {
5 | "spaced-comment": [0],
6 | "no-unused-vars": [0],
7 | "no-empty": [0],
8 | "react/wrap-multilines": [0],
9 | "react/no-multi-comp": [0],
10 | "no-constant-condition": [0],
11 | "react/jsx-no-bind": [0],
12 | "react/prop-types": [0],
13 | "arrow-body-style": [0],
14 | "react/prefer-stateless-function": [0],
15 | "semi": [0],
16 | "global-require": [0],
17 | "no-shadow": [0],
18 | "no-useless-computed-key": [0],
19 | "no-underscore-dangle": [0]
20 | },
21 | "ecmaFeatures": {
22 | "experimentalObjectRestSpread": true
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | server.config.js
4 |
--------------------------------------------------------------------------------
/.webpackrc:
--------------------------------------------------------------------------------
1 | {
2 | "entry": "src/*.js",
3 | "publicPath": "/",
4 | "extraBabelPlugins": [
5 | ["import", { "libraryName": "antd", "style": "css" }]
6 | ],
7 | "theme": {
8 | "@primary-color": "#1DA57A",
9 | "@link-color": "#1DA57A",
10 | "@border-radius-base": "2px",
11 | "@font-size-base": "16px",
12 | "@line-height-base": "1.2"
13 | },
14 | "env": {
15 | "development": {
16 | "extraBabelPlugins": [
17 | "dva-hmr"
18 | ]
19 | },
20 | "production": {
21 | "extraBabelPlugins": [
22 | ]
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## AccountSystem 一个小型库存管理系统
2 |
3 | 
4 | 
5 | 
6 |
7 | 
8 |
9 | ## [在线预览](http://mingdi.yvanwang.com/)
10 | 用户名:guest
11 | 密码:123456
12 |
13 | ## 如何安装
14 | 1`.` 请确保安装MongoDB并正确启动( mongodb相关资料请移步[这里](https://docs.mongodb.com/manual/installation/) )
15 | 2`.` 请确保全局安装pm2 `npm install -g pm2`
16 | 3`.` Clone 该项目到本地 `git clone https://github.com/yvanwangl/AccountSystem.git`
17 | 4`.` 安装前端依赖包 `npm install`
18 | 5`.` 安装后端依赖包 `cd service` & `npm install`
19 | 6`.` 该项目采用前后端分离模式开发,如果要在开发模式运行则执行以下命令:
20 | * 启动node server开发服务 `npm run start:dev`
21 | * 启动前端dev server `npm start`
22 | 7`.` 如果以发布模式运行则执行以下命令:
23 | * 前端资源打包 `npm run build`
24 | * 启动node server部署服务 `npm run start:prod`
25 |
26 | ## 项目技术栈
27 | 前端技术:React + React-Router + Redux + React-Redux + Redux-Saga + Webpack
28 | 前端脚手架:[dva](https://github.com/dvajs/dva)
29 | UI组件库:[ant-design](https://github.com/ant-design/ant-design)
30 | 后端技术:Express + Mongoose
31 |
32 | 该项目采用前后端分离技术,前端使用React全家桶,项目整体框架使用dva,dva是一个将redux、redux-saga 和 react-router 等进行封装的前端框架,方便项目配置及代码管理;后端使用express + mongoose 进行后端业务处理及数据库操作。
33 |
34 | ## 实现功能
35 | 1`.` 登录注册功能
36 | 2`.` 基础数据管理功能,包括:客户管理、商品管理、供应商管理
37 | 3`.` 订单及进货单管理功能,包括:订单管理、入库管理
38 | 4`.` 物资管理功能
39 | 5`.` 结算管理功能
40 | 6`.` 账单管理功能,包括:客户对账管理、供应商对账管理
41 |
42 | ## 项目结构
43 | 
44 |
45 | ## 订单管理
46 | 订单管理包括增加、修改、删除及查看订单详情,可以根据订单生成日期、客户名称及订单编号进行查询,订单编号支持模糊查询
47 |
48 | 
49 |
50 | ## 入库管理
51 | 入库管理包括增加、修改、删除及查看入库单详情的功能,可根据入库单生成日期、供应商名称及入库单编号进行查询,入库单编号支持模糊查询
52 |
53 | 
54 |
55 | ## 物资管理
56 | 物资管理将仓库库存的物资和资金进行分类统计,可以查看仓库中当前剩余的商品的种类和数量;资金管理从商品分类的角度对系统流出资金和流入资金进行统计汇总,方便查看不同商品对应的资金情况。
57 |
58 | 
59 |
60 | ## 对账管理——供应商对账
61 | 供应商对账管理从负债入库单和负债供应商两个角度对负债账务进行分类,同时可以根据供应商的名称对负债入库账单和负债供应商进行过滤。从两个角度进行分类统计是为了方便能够按照入库单进行分批清账,或直接向供应商清账,方便账务分类管理
62 |
63 | 
64 |
65 | 其他一些界面的功能就不再一一介绍,感兴趣的话自己clone一份代码,运行一下便知:)
66 |
67 | #### 欢迎Star!
68 |
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
52 | onClearBill(record)}>清账 53 |
54 | ) 55 | } 56 | ]; 57 | } 58 | 59 | static propTypes = { 60 | onClearBill: PropTypes.func, 61 | onPageChange: PropTypes.func, 62 | dataSource: PropTypes.array, 63 | loading: PropTypes.any, 64 | total: PropTypes.any, 65 | current: PropTypes.any 66 | }; 67 | 68 | onPageChange = (page) => { 69 | const {onPageChange} = this.props; 70 | onPageChange(page); 71 | }; 72 | 73 | render() { 74 | const { 75 | loading, 76 | dataSource 77 | } = this.props; 78 | return ( 79 |