├── .gitmodules
├── server
├── Data
│ ├── Readme.md
│ ├── Log
│ │ └── README.md
│ ├── tmp
│ │ └── Readme.md
│ ├── exception.tpl
│ └── Migrations
│ │ └── 2_dev.php
├── Application
│ ├── index.html
│ ├── Common
│ │ ├── index.html
│ │ ├── Conf
│ │ │ ├── index.html
│ │ │ └── tags.php
│ │ ├── Common
│ │ │ └── index.html
│ │ ├── Lib
│ │ │ ├── CommonLog.class.php
│ │ │ └── RecursiveFolderFilterIterator.class.php
│ │ ├── Event
│ │ │ └── BaseRestEvent.class.php
│ │ └── Model
│ │ │ ├── CommonAdvModel.class.php
│ │ │ ├── CommonRelationModel.class.php
│ │ │ └── CommonViewModel.class.php
│ ├── Home
│ │ ├── Conf
│ │ │ ├── tags.php
│ │ │ ├── index.html
│ │ │ └── config.php
│ │ ├── index.html
│ │ ├── View
│ │ │ └── index.html
│ │ ├── Event
│ │ │ ├── AppEvent.class.php
│ │ │ ├── CompanyActiveAppsEvent.class.php
│ │ │ ├── CommonTypeEvent.class.php
│ │ │ └── HeartBeatEvent.class.php
│ │ ├── Service
│ │ │ └── CommonTypeService.class.php
│ │ ├── Schema
│ │ │ ├── 2_session.yml
│ │ │ ├── 3_config.yml
│ │ │ ├── 1_app.yml
│ │ │ └── 0_type.yml
│ │ ├── Model
│ │ │ ├── ConfigModel.class.php
│ │ │ ├── CommonTypeModel.class.php
│ │ │ ├── AppModel.class.php
│ │ │ └── CompanyActiveAppsModel.class.php
│ │ ├── Controller
│ │ │ └── CommonTypeController.class.php
│ │ └── Locale
│ │ │ └── zh-cn.yml
│ ├── Cloud
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ └── Schema
│ │ │ └── 1_industry.yml
│ ├── Notification
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ └── config.yml
│ ├── .DS_Store
│ ├── Dashboard
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ └── config.yml
│ ├── Account
│ │ ├── .DS_Store
│ │ ├── Schema
│ │ │ ├── .DS_Store
│ │ │ └── 4_company_buy_apps.yml
│ │ ├── Conf
│ │ │ └── tags.php
│ │ ├── Event
│ │ │ ├── AuthRoleEvent.class.php
│ │ │ ├── CompanyProfileEvent.class.php
│ │ │ ├── UserInfoEvent.class.php
│ │ │ ├── AuthorizeEvent.class.php
│ │ │ ├── DepartmentEvent.class.php
│ │ │ ├── AuthNodeEvent.class.php
│ │ │ └── UserPreferenceEvent.class.php
│ │ ├── Model
│ │ │ ├── DepartmentModel.class.php
│ │ │ ├── AuthNodeModel.class.php
│ │ │ ├── AuthRoleModel.class.php
│ │ │ ├── CompanyModel.class.php
│ │ │ ├── AuthUserRoleModel.class.php
│ │ │ ├── CompanyProfileModel.class.php
│ │ │ ├── AuthorizeModel.class.php
│ │ │ └── UserInfoModel.class.php
│ │ ├── Controller
│ │ │ ├── AuthRoleController.class.php
│ │ │ ├── RegisterController.class.php
│ │ │ ├── AuthNodeController.class.php
│ │ │ ├── AuthorizeController.class.php
│ │ │ └── LoginController.class.php
│ │ ├── Service
│ │ │ ├── CompanyBuyAppsService.class.php
│ │ │ ├── AuthRoleService.class.php
│ │ │ └── AuthUserRoleService.class.php
│ │ ├── Common
│ │ │ └── function.php
│ │ └── Behaviors
│ │ │ └── UserCommonNavBehavior.class.php
│ ├── Currency
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── config.yml
│ │ ├── Event
│ │ │ └── CurrencyEvent.class.php
│ │ ├── Controller
│ │ │ └── CurrencyController.class.php
│ │ └── Service
│ │ │ └── CurrencyService.class.php
│ ├── Storage
│ │ ├── Common
│ │ │ └── function.php
│ │ ├── Event
│ │ │ ├── StockInEvent.class.php
│ │ │ ├── StorageEvent.class.php
│ │ │ ├── StockLogEvent.class.php
│ │ │ ├── StockOutEvent.class.php
│ │ │ └── StockEvent.class.php
│ │ ├── Model
│ │ │ ├── StorageModel.class.php
│ │ │ ├── StockInModel.class.php
│ │ │ ├── StockOutModel.class.php
│ │ │ ├── StockModel.class.php
│ │ │ ├── StockLogModel.class.php
│ │ │ └── StockInDetailModel.class.php
│ │ ├── Service
│ │ │ ├── StorageService.class.php
│ │ │ ├── StockOutDetailService.class.php
│ │ │ └── StockInDetailService.class.php
│ │ └── Controller
│ │ │ ├── StockInController.class.php
│ │ │ ├── StockLogController.class.php
│ │ │ └── StockOutController.class.php
│ ├── Uploader
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── Model
│ │ │ └── AttachmentModel.class.php
│ │ ├── config.yml
│ │ ├── Event
│ │ │ └── AttachmentEvent.class.php
│ │ ├── Conf
│ │ │ └── tags.php
│ │ ├── Schema
│ │ │ └── 0_attachment.yml
│ │ └── Behaviors
│ │ │ ├── UpdateAttachSourceBehavior.class.php
│ │ │ └── ProcessAttachDeletedBehavior.class.php
│ ├── Bpm
│ │ ├── Event
│ │ │ ├── WorkflowNodeEvent.class.php
│ │ │ └── WorkflowProgressEvent.class.php
│ │ ├── Controller
│ │ │ ├── WorkflowNodeController.class.php
│ │ │ ├── WorkflowProgressController.class.php
│ │ │ └── WorkflowBuilderController.class.php
│ │ ├── Model
│ │ │ ├── WorkflowNodeModel.class.php
│ │ │ ├── WorkflowModel.class.php
│ │ │ └── WorkflowProgressModel.class.php
│ │ ├── Service
│ │ │ └── WorkflowNodeService.class.php
│ │ ├── config.yml
│ │ └── Locale
│ │ │ └── zh-cn.yml
│ ├── Marketing
│ │ ├── Event
│ │ │ ├── SaleOpportunitiesProductEvent.class.php
│ │ │ ├── ContractEvent.class.php
│ │ │ └── SaleOpportunitiesEvent.class.php
│ │ ├── Controller
│ │ │ ├── SaleOpportunitiesProductController.class.php
│ │ │ └── ContractController.class.php
│ │ ├── Service
│ │ │ ├── SaleOpportunitiesProductService.class.php
│ │ │ ├── ContractService.class.php
│ │ │ └── SaleOpportunitiesService.class.php
│ │ ├── Model
│ │ │ ├── SaleOpportunitiesProductModel.class.php
│ │ │ ├── SaleOpportunitiesModel.class.php
│ │ │ └── ContractModel.class.php
│ │ ├── Schema
│ │ │ └── 1_oppor_foreign.yml
│ │ └── Locale
│ │ │ └── zh-cn.yml
│ ├── Printer
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── Controller
│ │ │ └── PrintTemplateController.class.php
│ │ ├── Model
│ │ │ └── PrintTemplateModel.class.php
│ │ ├── Schema
│ │ │ └── 0_template.yml
│ │ ├── Service
│ │ │ └── Parser
│ │ │ │ ├── InterfaceLayout.class.php
│ │ │ │ ├── Layout
│ │ │ │ ├── H1.class.php
│ │ │ │ ├── Table.class.php
│ │ │ │ └── Common.class.php
│ │ │ │ └── AbstractLayout.class.php
│ │ ├── config.yml
│ │ └── Event
│ │ │ └── PrintTemplateEvent.class.php
│ ├── Product
│ │ ├── Controller
│ │ │ └── ProductController.class.php
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── Service
│ │ │ ├── ProductCategoryService.class.php
│ │ │ └── ProductService.class.php
│ │ ├── Model
│ │ │ ├── ProductCategoryModel.class.php
│ │ │ └── ProductModel.class.php
│ │ ├── Event
│ │ │ ├── ProductCategoryEvent.class.php
│ │ │ └── ProductEvent.class.php
│ │ ├── Common
│ │ │ └── function.php
│ │ └── config.yml
│ ├── Office
│ │ └── config.yml
│ ├── CustomerAnalytics
│ │ └── config.yml
│ ├── ProductAttribute
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── Event
│ │ │ ├── ProductAttributeEvent.class.php
│ │ │ ├── ProductAttributeMapEvent.class.php
│ │ │ └── ProductAttributeContentEvent.class.php
│ │ ├── Controller
│ │ │ ├── ProductAttributeController.class.php
│ │ │ └── ProductAttributeContentController.class.php
│ │ ├── Model
│ │ │ ├── ProductAttributeModel.class.php
│ │ │ ├── ProductAttributeMapModel.class.php
│ │ │ └── ProductAttributeContentModel.class.php
│ │ ├── Service
│ │ │ ├── ProductAttributeMapService.class.php
│ │ │ └── ProductAttributeContentService.class.php
│ │ └── config.yml
│ ├── Supplier
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── Event
│ │ │ └── SupplierSupplyProductEvent.class.php
│ │ ├── Controller
│ │ │ └── SupplierSupplyProductController.class.php
│ │ ├── Model
│ │ │ └── SupplierSupplyProductModel.class.php
│ │ ├── Service
│ │ │ ├── SupplierSupplyProductService.class.php
│ │ │ └── SupplierService.class.php
│ │ └── config.yml
│ ├── Region
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── Schema
│ │ │ └── 0_region.yml
│ │ ├── config.yml
│ │ ├── Controller
│ │ │ └── RegionController.class.php
│ │ ├── Event
│ │ │ └── RegionEvent.class.php
│ │ ├── Model
│ │ │ └── RegionModel.class.php
│ │ └── Migration
│ │ │ └── RegionMigration.class.php
│ ├── Analytics
│ │ ├── config.yml
│ │ ├── Service
│ │ │ └── AnalyticsService.class.php
│ │ └── Locale
│ │ │ └── zh-cn.yml
│ ├── MessageCenter
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── Schema
│ │ │ └── 0_notify.yml
│ │ └── config.yml
│ ├── Smtp
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── Controller
│ │ │ └── SendMailController.class.php
│ │ └── config.yml
│ ├── Sale
│ │ ├── Event
│ │ │ ├── OrdersEvent.class.php
│ │ │ └── OrdersDetailEvent.class.php
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── Controller
│ │ │ ├── OrdersDetailController.class.php
│ │ │ └── OrdersController.class.php
│ │ ├── Service
│ │ │ └── OrdersDetailService.class.php
│ │ ├── Model
│ │ │ ├── OrdersDetailModel.class.php
│ │ │ └── OrdersModel.class.php
│ │ └── config.yml
│ ├── Crm
│ │ ├── Event
│ │ │ ├── CrmClueEvent.class.php
│ │ │ └── CustomerEvent.class.php
│ │ ├── Controller
│ │ │ ├── CustomerHeadLogController.class.php
│ │ │ └── CustomerCareController.class.php
│ │ ├── Service
│ │ │ ├── CustomerCareService.class.php
│ │ │ ├── CustomerCommunicateService.class.php
│ │ │ └── CustomerHeadLogService.class.php
│ │ └── Model
│ │ │ ├── CrmClueModel.class.php
│ │ │ ├── CustomerCareModel.class.php
│ │ │ └── CustomerCommunicateModel.class.php
│ ├── DataModel
│ │ ├── Event
│ │ │ └── DataModelFieldEvent.class.php
│ │ ├── Model
│ │ │ └── DataModelFieldModel.class.php
│ │ ├── Controller
│ │ │ └── DataModelFieldController.class.php
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ └── config.yml
│ ├── Finance
│ │ ├── Event
│ │ │ ├── PayablesEvent.class.php
│ │ │ ├── ReceivablesEvent.class.php
│ │ │ ├── FinanceAccountEvent.class.php
│ │ │ └── FinanceStreamlineEvent.class.php
│ │ ├── Controller
│ │ │ ├── FinanceAccountController.class.php
│ │ │ ├── FinanceStreamlineController.class.php
│ │ │ ├── PayablesController.class.php
│ │ │ └── ReceivablesController.class.php
│ │ ├── Model
│ │ │ ├── FinanceAccountModel.class.php
│ │ │ ├── FinanceStreamlineModel.class.php
│ │ │ ├── PayablesModel.class.php
│ │ │ └── ReceivablesModel.class.php
│ │ ├── Service
│ │ │ └── FinanceAccountService.class.php
│ │ └── Locale
│ │ │ └── zh-cn.yml
│ ├── Purchase
│ │ ├── Event
│ │ │ ├── PurchaseEvent.class.php
│ │ │ └── PurchaseDetailEvent.class.php
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── Controller
│ │ │ ├── PurchaseDetailController.class.php
│ │ │ └── PurchaseController.class.php
│ │ ├── Service
│ │ │ └── PurchaseDetailService.class.php
│ │ ├── Model
│ │ │ ├── PurchaseDetailModel.class.php
│ │ │ └── PurchaseModel.class.php
│ │ └── config.yml
│ ├── ContactsCompany
│ │ ├── Event
│ │ │ └── ContactsCompanyRoleEvent.class.php
│ │ ├── Controller
│ │ │ ├── ContactsCompanyRoleController.class.php
│ │ │ ├── ContactsCompanyLinkmanController.class.php
│ │ │ └── ContactsCompanyController.class.php
│ │ ├── Service
│ │ │ ├── ContactsCompanyRoleService.class.php
│ │ │ ├── ContactsCompanyService.class.php
│ │ │ └── ContactsCompanyLinkmanService.class.php
│ │ ├── Model
│ │ │ ├── ContactsCompanyRoleModel.class.php
│ │ │ ├── ContactsCompanyModel.class.php
│ │ │ └── ContactsCompanyLinkmanModel.class.php
│ │ └── Locale
│ │ │ └── zh-cn.yml
│ ├── SaleAnalytics
│ │ ├── Event
│ │ │ ├── SaleBoardEvent.class.php
│ │ │ └── SaleVolumeEvent.class.php
│ │ ├── Locale
│ │ │ └── zh-cn.yml
│ │ ├── Model
│ │ │ ├── SaleBoardModel.class.php
│ │ │ └── SaleVolumeModel.class.php
│ │ ├── Service
│ │ │ ├── SaleBoardService.class.php
│ │ │ └── SaleVolumeService.class.php
│ │ └── config.yml
│ └── Calendar
│ │ ├── Service
│ │ └── EventsService.class.php
│ │ ├── Locale
│ │ └── zh-cn.yml
│ │ ├── Model
│ │ └── EventsModel.class.php
│ │ ├── config.yml
│ │ ├── Schema
│ │ └── 0_events.yml
│ │ └── Controller
│ │ └── EventsController.class.php
├── composer.phar
├── vendor
│ └── .DS_Store
├── config.yaml
└── composer.json
├── utils
├── lib
│ ├── __init__.py
│ ├── utils.pyc
│ ├── __init__.pyc
│ └── utils.py
├── builder
│ └── __init__.py
└── template
│ ├── config.yml
│ ├── Event_php
│ ├── model.js
│ ├── main.js
│ ├── Controller_php
│ ├── Model_php
│ └── Service_php
├── ones
├── .buildignore
├── views
│ ├── blank.html
│ ├── blankTableView.html
│ ├── list.html
│ ├── detailSplit.html
│ ├── detail.html
│ ├── formTemplate.html
│ ├── confirm.html
│ └── itemSelectModal.html
├── robots.txt
├── .DS_Store
├── favicon.ico
├── apps
│ ├── .DS_Store
│ ├── account
│ │ ├── .DS_Store
│ │ ├── statics
│ │ │ ├── style.scss
│ │ │ ├── style.css
│ │ │ └── style.css.map
│ │ └── plugin.js
│ ├── crm
│ │ ├── views
│ │ │ ├── customer_detail_view
│ │ │ │ └── linkman.html
│ │ │ └── crmClue_detail_view
│ │ │ │ └── head_log.html
│ │ └── main.js
│ ├── purchase
│ │ └── plugin.js
│ ├── marketing
│ │ ├── views
│ │ │ └── saleOpportunities_detail_view
│ │ │ │ ├── product.html
│ │ │ │ └── contract.html
│ │ └── plugin.js
│ ├── contactsCompany
│ │ ├── views
│ │ │ └── contactsCompany_detail_view
│ │ │ │ ├── linkman.html
│ │ │ │ └── basic.html
│ │ ├── main.js
│ │ └── plugin.js
│ ├── storage
│ │ ├── plugin.js
│ │ └── views
│ │ │ ├── stock_in_edit.html
│ │ │ └── stock_out_edit.html
│ ├── dataModel
│ │ └── service.js
│ ├── analytics
│ │ ├── statics
│ │ │ ├── style.scss
│ │ │ ├── style.css
│ │ │ └── style.css.map
│ │ └── views
│ │ │ └── canvas.html
│ ├── currency
│ │ ├── main.js
│ │ └── model.js
│ ├── office
│ │ ├── model.js
│ │ └── main.js
│ ├── saleAnalytics
│ │ ├── views
│ │ │ └── dashboard_sale_analytics.html
│ │ ├── plugin.js
│ │ └── model.js
│ ├── uploader
│ │ └── statics
│ │ │ ├── style.css.map
│ │ │ ├── style.scss
│ │ │ └── style.css
│ ├── calendar
│ │ ├── static
│ │ │ ├── style.css.map
│ │ │ ├── style.scss
│ │ │ └── style.css
│ │ └── views
│ │ │ └── event_detail.html
│ ├── customerAnalytics
│ │ ├── model.js
│ │ └── main.js
│ ├── sale
│ │ ├── model.js
│ │ └── main.js
│ ├── finance
│ │ ├── main.js
│ │ ├── views
│ │ │ └── confirm.html
│ │ └── plugin.js
│ ├── product
│ │ ├── main.js
│ │ └── plugin.js
│ ├── region
│ │ ├── main.js
│ │ └── model.js
│ ├── supplier
│ │ └── main.js
│ ├── productAttribute
│ │ └── main.js
│ ├── bpm
│ │ ├── views
│ │ │ ├── progress_aside.html
│ │ │ └── builder.html
│ │ └── static
│ │ │ ├── style.css.map
│ │ │ └── style.scss
│ ├── printer
│ │ ├── views
│ │ │ └── canvas.html
│ │ └── statics
│ │ │ └── style.css.map
│ ├── home
│ │ └── statics
│ │ │ └── style.css.map
│ └── dashboard
│ │ └── static
│ │ └── style.css.map
├── lib
│ └── .DS_Store
├── images
│ ├── cloud.jpg
│ ├── checkmark.png
│ ├── ZeroClipboard.swf
│ ├── logo_mini_blue.png
│ └── logo_mini_white.png
└── styles
│ ├── .DS_Store
│ ├── .sass-cache
│ ├── 1d55b998170a3775d80115d20768ab4a0117edae
│ │ ├── base.scssc
│ │ ├── frame.scssc
│ │ ├── login.scssc
│ │ └── main.scssc
│ ├── d661b57c6701eb4f07401d29558e71d87b65c9c6
│ │ ├── base.scssc
│ │ ├── frame.scssc
│ │ ├── login.scssc
│ │ └── main.scssc
│ └── e623fd01ed63f0630b2e7648dbf7264d157c9c64
│ │ ├── base.scssc
│ │ ├── frame.scssc
│ │ ├── login.scssc
│ │ └── main.scssc
│ ├── animate.css.map
│ ├── animate.css
│ └── animate.scss
├── .bowerrc
├── install
├── Guide.md
├── README.md
├── Complete.md
└── phinx.yml.sample
├── index.html
├── .gitignore
├── test
└── .jshintrc
├── README.md
└── bower.json
/.gitmodules:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Data/Readme.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/utils/lib/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ones/.buildignore:
--------------------------------------------------------------------------------
1 | *.coffee
--------------------------------------------------------------------------------
/server/Data/Log/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/utils/builder/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ones/views/blank.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Application/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Data/tmp/Readme.md:
--------------------------------------------------------------------------------
1 | 临时目录
--------------------------------------------------------------------------------
/server/Application/Common/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Application/Home/Conf/tags.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Application/Home/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Application/Common/Conf/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Application/Home/Conf/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Application/Home/View/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ones/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /
--------------------------------------------------------------------------------
/server/Application/Common/Common/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "ones/bower_components"
3 | }
4 |
--------------------------------------------------------------------------------
/ones/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/.DS_Store
--------------------------------------------------------------------------------
/ones/views/blankTableView.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Application/Home/Conf/config.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ones/images/checkmark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/images/checkmark.png
--------------------------------------------------------------------------------
/server/Application/Cloud/Schema/1_industry.yml:
--------------------------------------------------------------------------------
1 | cloud_industry:
2 | name:
3 | comment: 行业类别名称
--------------------------------------------------------------------------------
/ones/images/ZeroClipboard.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/images/ZeroClipboard.swf
--------------------------------------------------------------------------------
/ones/views/list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/server/Application/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/server/Application/.DS_Store
--------------------------------------------------------------------------------
/ones/apps/account/statics/style.scss:
--------------------------------------------------------------------------------
1 | .auth-node-item {
2 | margin-bottom:10px;
3 | line-height:20px;
4 | }
--------------------------------------------------------------------------------
/ones/apps/purchase/plugin.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones){
2 |
3 | })(window, window.angular, window.ones);
--------------------------------------------------------------------------------
/ones/images/logo_mini_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/images/logo_mini_blue.png
--------------------------------------------------------------------------------
/ones/images/logo_mini_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/images/logo_mini_white.png
--------------------------------------------------------------------------------
/server/Application/Dashboard/Locale/zh-cn.yml:
--------------------------------------------------------------------------------
1 | Dashboard: 控制面板
2 | Add Widget: 新增控件
3 | Widget: 控件
4 | Reload: 重新加载
--------------------------------------------------------------------------------
/ones/apps/marketing/views/saleOpportunities_detail_view/product.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ones/apps/contactsCompany/views/contactsCompany_detail_view/linkman.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Application/Account/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/server/Application/Account/.DS_Store
--------------------------------------------------------------------------------
/ones/apps/marketing/views/saleOpportunities_detail_view/contract.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ones/apps/storage/plugin.js:
--------------------------------------------------------------------------------
1 | (function(window, ones, angular, io){
2 |
3 | })(window, window.ones, window.angular, window.io);
--------------------------------------------------------------------------------
/ones/views/detailSplit.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/server/Application/Account/Schema/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/server/Application/Account/Schema/.DS_Store
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ones/apps/account/statics/style.css:
--------------------------------------------------------------------------------
1 | .auth-node-item {
2 | margin-bottom: 10px;
3 | line-height: 20px; }
4 |
5 | /*# sourceMappingURL=style.css.map */
6 |
--------------------------------------------------------------------------------
/server/Application/Currency/Locale/zh-cn.yml:
--------------------------------------------------------------------------------
1 | APP_NAME: 货币管理模块
2 |
3 | CURRENCIES:
4 | CNY: 人民币
5 | USD: 美元
6 | HKD: 港币
7 |
8 | Base Currency: 本位币
--------------------------------------------------------------------------------
/ones/views/detail.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ones/views/formTemplate.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ones/apps/dataModel/service.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones){
2 |
3 | angular.module('ones.dataModelModule', []);
4 |
5 | })(window, window.angular, window.ones);
--------------------------------------------------------------------------------
/install/Complete.md:
--------------------------------------------------------------------------------
1 | Complete install ONES!
2 | You can get help here: http://forum.ng-erp.com
3 | User Manual: http://ones_manual.mydoc.io
4 | Dev Document: http://ones.mydoc.io
--------------------------------------------------------------------------------
/ones/apps/analytics/statics/style.scss:
--------------------------------------------------------------------------------
1 | .analytics-date-ranger {
2 | input {
3 | height:31px;
4 | line-height:31px;
5 | padding: 0 8px;
6 | }
7 | }
--------------------------------------------------------------------------------
/server/Application/Account/Conf/tags.php:
--------------------------------------------------------------------------------
1 | array(
5 | "Account\\Behaviors\\UserCommonNavBehavior"
6 | )
7 | );
--------------------------------------------------------------------------------
/server/Application/Storage/Common/function.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 8/15/15
6 | * Time: 09:29
7 | */
8 |
9 |
--------------------------------------------------------------------------------
/server/Application/Storage/Event/StockInEvent.class.php:
--------------------------------------------------------------------------------
1 | %s)
--------------------------------------------------------------------------------
/server/Data/exception.tpl:
--------------------------------------------------------------------------------
1 | {"error":1,"msg":" line : "}
--------------------------------------------------------------------------------
/ones/apps/analytics/statics/style.css:
--------------------------------------------------------------------------------
1 | .analytics-date-ranger input {
2 | height: 31px;
3 | line-height: 31px;
4 | padding: 0 8px; }
5 |
6 | /*# sourceMappingURL=style.css.map */
7 |
--------------------------------------------------------------------------------
/server/Application/Bpm/Event/WorkflowNodeEvent.class.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ones/apps/currency/main.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones, io){
2 | 'use strict';
3 | angular.module('ones.app.currency.main', []);
4 |
5 | })(window, window.angular, window.ones, window.io);
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/1d55b998170a3775d80115d20768ab4a0117edae/base.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/1d55b998170a3775d80115d20768ab4a0117edae/base.scssc
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/1d55b998170a3775d80115d20768ab4a0117edae/frame.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/1d55b998170a3775d80115d20768ab4a0117edae/frame.scssc
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/1d55b998170a3775d80115d20768ab4a0117edae/login.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/1d55b998170a3775d80115d20768ab4a0117edae/login.scssc
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/1d55b998170a3775d80115d20768ab4a0117edae/main.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/1d55b998170a3775d80115d20768ab4a0117edae/main.scssc
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/d661b57c6701eb4f07401d29558e71d87b65c9c6/base.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/d661b57c6701eb4f07401d29558e71d87b65c9c6/base.scssc
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/d661b57c6701eb4f07401d29558e71d87b65c9c6/frame.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/d661b57c6701eb4f07401d29558e71d87b65c9c6/frame.scssc
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/d661b57c6701eb4f07401d29558e71d87b65c9c6/login.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/d661b57c6701eb4f07401d29558e71d87b65c9c6/login.scssc
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/d661b57c6701eb4f07401d29558e71d87b65c9c6/main.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/d661b57c6701eb4f07401d29558e71d87b65c9c6/main.scssc
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/e623fd01ed63f0630b2e7648dbf7264d157c9c64/base.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/e623fd01ed63f0630b2e7648dbf7264d157c9c64/base.scssc
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/e623fd01ed63f0630b2e7648dbf7264d157c9c64/frame.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/e623fd01ed63f0630b2e7648dbf7264d157c9c64/frame.scssc
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/e623fd01ed63f0630b2e7648dbf7264d157c9c64/login.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/e623fd01ed63f0630b2e7648dbf7264d157c9c64/login.scssc
--------------------------------------------------------------------------------
/ones/styles/.sass-cache/e623fd01ed63f0630b2e7648dbf7264d157c9c64/main.scssc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laofahai/ones/HEAD/ones/styles/.sass-cache/e623fd01ed63f0630b2e7648dbf7264d157c9c64/main.scssc
--------------------------------------------------------------------------------
/ones/apps/account/statics/style.css.map:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "mappings": "AAAA,eAAgB;EACZ,aAAa,EAAC,IAAI;EAClB,WAAW,EAAC,IAAI",
4 | "sources": ["style.scss"],
5 | "names": [],
6 | "file": "style.css"
7 | }
--------------------------------------------------------------------------------
/ones/apps/contactsCompany/views/contactsCompany_detail_view/basic.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ones/apps/office/model.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones, io){
2 | 'use strict';
3 | angular.module('ones.app.office.model', [])
4 |
5 | ;
6 |
7 | })(window, window.angular, window.ones, window.io);
--------------------------------------------------------------------------------
/server/Application/Common/Conf/tags.php:
--------------------------------------------------------------------------------
1 | [
5 | "Common\\Behaviors\\AutoRouteBehavior",
6 | "Common\\Behaviors\\DynamicConfigBehavior"
7 | ]
8 | ];
--------------------------------------------------------------------------------
/server/Application/Marketing/Event/SaleOpportunitiesProductEvent.class.php:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/server/Application/Analytics/config.yml:
--------------------------------------------------------------------------------
1 | alias: analytics
2 | author: TEam Swift
3 | link: http://ng-erp.com
4 | document: http://ones_manual.mydoc.io/?t=35706
5 | requirements:
6 |
7 | auth_nodes:
8 |
9 |
10 | global_include:
11 | js:
12 | apps/analytics/service
--------------------------------------------------------------------------------
/server/Application/MessageCenter/Locale/zh-cn.yml:
--------------------------------------------------------------------------------
1 | APP_NAME: 消息中心
2 | APP_DESCRIPTION: 提供socket服务,可做数据实时更新、线上聊天等
3 | APP_AUTHOR: TEam Swift
4 | APP_AUTHOR_LINK: http://ng-erp.com
5 |
6 | Message Center: 消息中心
7 | Socket Pass: Web Socket服务地址
8 | Socket Pass help text: 如未使用自定义socket服务,请留空
--------------------------------------------------------------------------------
/ones/styles/animate.css.map:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "mappings": "AAAA,uBAOC;EANG,EAAG;IACC,SAAS,EAAE,YAAY;EAE3B,IAAK;IACD,SAAS,EAAE,cAAc;AAGjC,sBAOC;EANG,EAAG;IACC,SAAS,EAAE,cAAc;EAE7B,IAAK;IACD,SAAS,EAAE,YAAY",
4 | "sources": ["animate.scss"],
5 | "names": [],
6 | "file": "animate.css"
7 | }
--------------------------------------------------------------------------------
/server/Application/Bpm/Controller/WorkflowNodeController.class.php:
--------------------------------------------------------------------------------
1 | array('*', '_type'=>'left')
10 | );
11 |
12 | }
--------------------------------------------------------------------------------
/server/Application/Account/Event/AuthRoleEvent.class.php:
--------------------------------------------------------------------------------
1 | array('*', '_type'=>'left')
10 | );
11 |
12 | }
--------------------------------------------------------------------------------
/server/Application/Marketing/Controller/SaleOpportunitiesProductController.class.php:
--------------------------------------------------------------------------------
1 | array('*', '_type'=>'left')
10 | );
11 |
12 | }
--------------------------------------------------------------------------------
/server/Application/Storage/Service/StorageService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/14/15
6 | * Time: 09:23
7 | */
8 |
9 | namespace Crm\Event;
10 |
11 |
12 | use Crm\Controller\CrmClueController;
13 |
14 | class CrmClueEvent extends CrmClueController {
15 |
16 | }
--------------------------------------------------------------------------------
/server/Application/DataModel/Event/DataModelFieldEvent.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/7/15
6 | * Time: 20:55
7 | */
8 |
9 | namespace Home\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class CommonTypeService extends CommonModel {
15 |
16 | }
--------------------------------------------------------------------------------
/server/Application/Purchase/Event/PurchaseEvent.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/22/15
6 | * Time: 10:56
7 | */
8 |
9 | namespace Marketing\Event;
10 |
11 |
12 | use Common\Event\BaseRestEvent;
13 |
14 | class ContractEvent extends BaseRestEvent {
15 |
16 | }
--------------------------------------------------------------------------------
/server/Application/Product/Service/ProductCategoryService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/4/15
6 | * Time: 21:56
7 | */
8 |
9 | namespace Account\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class DepartmentModel extends CommonViewModel {
15 |
16 | }
--------------------------------------------------------------------------------
/server/Application/Analytics/Service/AnalyticsService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 9/17/15
6 | * Time: 20:19
7 | */
8 |
9 | namespace Analytics\Service;
10 |
11 |
12 | class AnalyticsService {
13 |
14 | public function get_date_range_by_input() {}
15 |
16 | }
--------------------------------------------------------------------------------
/server/Application/Home/Event/CompanyActiveAppsEvent.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/5/15
6 | * Time: 08:33
7 | */
8 |
9 | namespace Home\Event;
10 |
11 |
12 | use Common\Event\BaseRestEvent;
13 |
14 | class CompanyActiveAppsEvent extends BaseRestEvent {
15 |
16 | }
--------------------------------------------------------------------------------
/server/Application/Region/Schema/0_region.yml:
--------------------------------------------------------------------------------
1 | region:
2 | parent_id:
3 | type: integer
4 | limit: 11
5 | name:
6 | type: string
7 | type:
8 | type: integer
9 | limit: 1
10 | $meta:
11 | indexes:
12 | parent_id:
13 | type:
14 | enable_trash: true
--------------------------------------------------------------------------------
/ones/styles/animate.scss:
--------------------------------------------------------------------------------
1 | @keyframes rotate_alone {
2 | 0% {
3 | transform: rotate(0deg);
4 | }
5 | 100% {
6 | transform: rotate(360deg);
7 | }
8 | }
9 | @keyframes rotate_back {
10 | 0% {
11 | transform: rotate(360deg);
12 | }
13 | 100% {
14 | transform: rotate(0deg);
15 | }
16 | }
--------------------------------------------------------------------------------
/server/Application/Account/Controller/AuthRoleController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/3/15
6 | * Time: 09:55
7 | */
8 |
9 | namespace DataModel\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class DataModelFieldModel extends CommonViewModel {
15 | }
--------------------------------------------------------------------------------
/server/Application/Finance/Event/FinanceAccountEvent.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 9/22/15
6 | * Time: 23:25
7 | */
8 |
9 | namespace Account\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class CompanyBuyAppsService extends CommonModel
15 | {
16 |
17 | }
--------------------------------------------------------------------------------
/server/Application/Bpm/Event/WorkflowProgressEvent.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/25/15
6 | * Time: 10:08
7 | */
8 |
9 | namespace Marketing\Event;
10 |
11 |
12 | use Common\Event\BaseRestEvent;
13 |
14 | class SaleOpportunitiesEvent extends BaseRestEvent {
15 |
16 | }
--------------------------------------------------------------------------------
/server/Application/SaleAnalytics/Event/SaleBoardEvent.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 9/25/15
6 | * Time: 22:27
7 | */
8 |
9 | namespace Smtp\Controller;
10 |
11 | use Common\Controller\BaseRestController;
12 |
13 | class SendMailController extends BaseRestController {
14 |
15 | }
--------------------------------------------------------------------------------
/ones/apps/customerAnalytics/main.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones, io){
2 | /*
3 | * @app customerAnalytics
4 | * @author laofahai@TEam Swift
5 | * @link http://ng-erp.com
6 | * */
7 | 'use strict';
8 | angular.module('ones.app.customerAnalytics.main', [])
9 |
10 | ;
11 |
12 | })(window, window.angular, window.ones, window.io);
--------------------------------------------------------------------------------
/ones/apps/region/main.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones, io){
2 | /*
3 | * @app region
4 | * @author laofahai@TEam Swift
5 | * @link http://ng-erp.com
6 | * */
7 | 'use strict';
8 | angular.module('ones.app.region.main', [
9 | 'ones.app.region.model'
10 | ]);
11 |
12 | })(window, window.angular, window.ones, window.io);
--------------------------------------------------------------------------------
/server/Application/DataModel/Controller/DataModelFieldController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/10/15
6 | * Time: 20:53
7 | */
8 |
9 | namespace Crm\Controller;
10 |
11 |
12 | use Common\Controller\BaseRestController;
13 |
14 | class CustomerHeadLogController extends BaseRestController {
15 |
16 | }
--------------------------------------------------------------------------------
/server/Application/Storage/Controller/StockInController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/7/15
6 | * Time: 00:06
7 | */
8 |
9 | namespace ContactsCompany\Controller;
10 |
11 |
12 | use Common\Controller\BaseRestController;
13 |
14 | class ContactsCompanyRoleController extends BaseRestController {
15 |
16 | }
--------------------------------------------------------------------------------
/server/Application/ProductAttribute/Event/ProductAttributeContentEvent.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left']
16 | ];
17 |
18 | }
--------------------------------------------------------------------------------
/ones/apps/calendar/static/style.css:
--------------------------------------------------------------------------------
1 | .cal-year-box [class*="span"], .cal-month-box [class*="cal-cell"] {
2 | min-height: 60px; }
3 |
4 | .cal-month-day {
5 | height: 60px; }
6 |
7 | .cal-context {
8 | margin: 0 50px;
9 | width: auto; }
10 |
11 | .dashboard-block-item .cal-context {
12 | margin: 0; }
13 |
14 | .cal-row-head {
15 | background: #f2f2f2; }
16 |
17 | /*# sourceMappingURL=style.css.map */
18 |
--------------------------------------------------------------------------------
/server/Application/Home/Model/ConfigModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/6/15
6 | * Time: 22:09
7 | */
8 |
9 | namespace Home\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class ConfigModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'Config' => array('*')
18 | );
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/Region/Controller/RegionController.class.php:
--------------------------------------------------------------------------------
1 | array('*', '_type'=>'left')
18 | );
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/Account/Service/AuthRoleService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/6/15
6 | * Time: 08:52
7 | */
8 |
9 | namespace Home\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class CommonTypeModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'CommonType' => array('*')
18 | );
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/Sale/Controller/OrdersDetailController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 7/5/15
6 | * Time: 21:24
7 | */
8 |
9 | namespace Bpm\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class WorkflowModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'Workflow' => array('*', '_type'=>'left')
18 | );
19 | }
--------------------------------------------------------------------------------
/server/Application/Marketing/Service/SaleOpportunitiesProductService.class.php:
--------------------------------------------------------------------------------
1 | w ['*', '_type'=>'left']
17 | ];
18 |
19 | }
--------------------------------------------------------------------------------
/server/Application/Bpm/Controller/WorkflowProgressController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/6/15
6 | * Time: 11:04
7 | */
8 |
9 | namespace Home\Event;
10 |
11 |
12 | use Common\Event\BaseRestEvent;
13 |
14 | class CommonTypeEvent extends BaseRestEvent {
15 |
16 | protected function _order(&$order) {
17 | $order = 'listorder DESC, id ASC';
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/Printer/Controller/PrintTemplateController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 10/23/15
6 | * Time: 18:39
7 | */
8 |
9 | namespace Currency\Event;
10 |
11 | use Currency\Controller\CurrencyController;
12 |
13 | class CurrencyEvent extends CurrencyController {
14 |
15 | public function on_event_list() {
16 | return parent::on_list();
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/server/Application/Finance/Controller/FinanceAccountController.class.php:
--------------------------------------------------------------------------------
1 | response($this->user);
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/server/Application/Account/Service/AuthUserRoleService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 8/8/15
6 | * Time: 09:00
7 | */
8 |
9 | namespace Account\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class AuthUserRoleService extends CommonModel {
15 | protected $_auto = array(
16 | array("company_id", "get_current_company_id", 1, "function")
17 | );
18 | }
--------------------------------------------------------------------------------
/server/Application/Purchase/Controller/PurchaseDetailController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 8/5/15
6 | * Time: 21:19
7 | */
8 |
9 | namespace Storage\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class StockOutDetailService extends CommonModel{
15 | protected $_auto = [
16 | array("company_id", "get_current_company_id", 1, "function")
17 | ];
18 | }
--------------------------------------------------------------------------------
/server/Application/Finance/Controller/FinanceStreamlineController.class.php:
--------------------------------------------------------------------------------
1 | ['*']
19 | ];
20 |
21 | public $not_belongs_to_company = true;
22 |
23 | }
--------------------------------------------------------------------------------
/server/Application/Printer/Model/PrintTemplateModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left']
16 | ];
17 |
18 | }
--------------------------------------------------------------------------------
/server/Application/Printer/Schema/0_template.yml:
--------------------------------------------------------------------------------
1 | print_template:
2 | name:
3 | module_alias:
4 | remark:
5 | blank: true
6 | config:
7 | type: text
8 | limit: text
9 | blank: true
10 | content:
11 | type: text
12 | limit: text
13 |
14 | $meta:
15 | foreign:
16 | company:
17 | restrict:
18 | delete: CASCADE
19 | enable_trash: true
--------------------------------------------------------------------------------
/server/Application/Sale/Service/OrdersDetailService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 7/15/15
6 | * Time: 23:42
7 | */
8 |
9 | namespace Storage\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class StockInDetailService extends CommonModel {
15 |
16 | protected $_auto = [
17 | array("company_id", "get_current_company_id", 1, "function")
18 | ];
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/Account/Controller/AuthNodeController.class.php:
--------------------------------------------------------------------------------
1 | activeApps);
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/Finance/Model/FinanceAccountModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left']
16 | ];
17 |
18 | }
--------------------------------------------------------------------------------
/server/Application/Region/Event/RegionEvent.class.php:
--------------------------------------------------------------------------------
1 | response(D('Region/Region')->get_full_info(I('get.id')));
16 | }
17 |
18 | }
--------------------------------------------------------------------------------
/server/Application/ContactsCompany/Service/ContactsCompanyRoleService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/6/15
6 | * Time: 08:52
7 | */
8 |
9 | namespace Home\Controller;
10 |
11 |
12 | use Common\Controller\BaseRestController;
13 |
14 | class CommonTypeController extends BaseRestController {
15 |
16 | protected function _order(&$order) {
17 | $order = 'listorder DESC, id ASC';
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/SaleAnalytics/Model/SaleBoardModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left']
16 | ];
17 |
18 | }
--------------------------------------------------------------------------------
/server/Application/Supplier/Controller/SupplierSupplyProductController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/6/15
6 | * Time: 22:03
7 | */
8 |
9 | namespace ContactsCompany\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class ContactsCompanyRoleModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'ContactsCompanyRole' => array('*')
18 | );
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/Home/Model/AppModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/5/15
6 | * Time: 18:53
7 | */
8 |
9 | namespace Home\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class AppModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'App' => array('*', "_type"=>"left")
18 | );
19 |
20 | public $not_belongs_to_company = true;
21 |
22 | }
--------------------------------------------------------------------------------
/server/Application/Printer/Service/Parser/InterfaceLayout.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 10/8/15
6 | * Time: 22:54
7 | */
8 |
9 | namespace Printer\Service\Parser;
10 |
11 |
12 | interface InterfaceLayout {
13 |
14 | /*
15 | * @param array $template_config 模板配置
16 | * @param array $data 所有数据
17 | * */
18 | public function compile_to_html($template_config, $data);
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/SaleAnalytics/Model/SaleVolumeModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left']
16 | ];
17 |
18 | }
--------------------------------------------------------------------------------
/server/Application/Printer/config.yml:
--------------------------------------------------------------------------------
1 | alias: printer
2 | author: TEam Swift
3 | link: http://ng-erp.com
4 | requirements:
5 |
6 | auth_nodes:
7 | - printer.printTemplate.*
8 |
9 | global_include:
10 | js:
11 | - apps/printer/service
12 | i18n_global_loaded: true
13 | navs:
14 | Base Data Set:
15 | children:
16 | Print Template:
17 | app: printer
18 | icon: print
19 | link: printer/printTemplate
--------------------------------------------------------------------------------
/server/Application/Purchase/Service/PurchaseDetailService.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left']
18 | ];
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/Sale/Controller/OrdersController.class.php:
--------------------------------------------------------------------------------
1 | array('*', '_type'=>'left'),
10 | "Workflow" => [
11 | "name" => "workflow_id__label__",
12 | "_on" => "Workflow.id=StockIn.workflow_id",
13 | "_type" => "left"
14 | ]
15 | );
16 |
17 | }
--------------------------------------------------------------------------------
/server/Application/Supplier/Model/SupplierSupplyProductModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left']
16 | ];
17 |
18 | }
--------------------------------------------------------------------------------
/server/Application/Supplier/Service/SupplierSupplyProductService.class.php:
--------------------------------------------------------------------------------
1 | array('*', '_type'=>'left'),
10 | "Product" => array('name', 'price', 'cost', 'serial_number', '_type'=>'left', '_on'=>'Product.id=SaleOpportunitiesProduct.product_id')
11 | );
12 |
13 | }
--------------------------------------------------------------------------------
/server/Application/Crm/Event/CustomerEvent.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/21/15
6 | * Time: 19:39
7 | */
8 |
9 | namespace Crm\Event;
10 |
11 |
12 | use Common\Event\BaseRestEvent;
13 |
14 | class CustomerEvent extends BaseRestEvent {
15 |
16 | protected function _filter(&$map) {
17 | if($map['id']) {
18 | $map['Customer.id'] = $map['id'];
19 | unset($map['id']);
20 | }
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/server/Application/DataModel/Locale/zh-cn.yml:
--------------------------------------------------------------------------------
1 | APP_NAME: 数据模型
2 |
3 | Data Model Field: 数据模型字段
4 | Data Model: 数据模型
5 | Alias: 别名
6 | Label: 显示名称
7 | Widget: 输入控件
8 | Data Type: 数据类型
9 | Search Able: 是否可搜索
10 | Extra Config: 扩展配置
11 | Belongs To Module: 从属于模块
12 |
13 | help_text_field_extra_config: "每行一个配置,eg: key:value。配置项目参考"
14 | help_text_search_able: '选中后不可进行修改'
15 | help_text_alias: '接受英文字母和下划线,建议加入命名前缀'
--------------------------------------------------------------------------------
/server/Application/ProductAttribute/Controller/ProductAttributeContentController.class.php:
--------------------------------------------------------------------------------
1 | get_tree();
17 |
18 | $this->response($tree);
19 | }
20 |
21 | }
--------------------------------------------------------------------------------
/server/Application/ProductAttribute/Model/ProductAttributeModel.class.php:
--------------------------------------------------------------------------------
1 | array('*', '_type'=>'left')
16 | );
17 |
18 | }
--------------------------------------------------------------------------------
/server/Application/Calendar/Service/EventsService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/10/15
6 | * Time: 10:28
7 | */
8 |
9 | namespace Calendar\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class EventsService extends CommonModel {
15 |
16 | protected $_auto = [
17 | array("user_info_id", "get_current_user_id", 1, "function"),
18 | array("company_id", "get_current_company_id", 1, "function")
19 | ];
20 |
21 | }
--------------------------------------------------------------------------------
/server/Application/ProductAttribute/Service/ProductAttributeMapService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/18/15
6 | * Time: 09:22
7 | */
8 |
9 | namespace Crm\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class CustomerCareService extends CommonModel {
15 |
16 | protected $_auto = array(
17 | array("user_info_id", "get_current_user_id", 1, "function"),
18 | array("company_id", "get_current_company_id", 1, "function")
19 | );
20 |
21 | }
--------------------------------------------------------------------------------
/server/Application/Supplier/Service/SupplierService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/22/15
6 | * Time: 10:57
7 | */
8 |
9 | namespace Marketing\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class ContractService extends CommonModel {
15 |
16 | protected $_auto = array(
17 | array("user_info_id", "get_current_user_id", 1, "function"),
18 | array("company_id", "get_current_company_id", 1, "function")
19 | );
20 |
21 | }
--------------------------------------------------------------------------------
/server/Data/Migrations/2_dev.php:
--------------------------------------------------------------------------------
1 | fromYaml($app);
16 | }
17 |
18 | // index, foreign key
19 |
20 | $this->apply_meta();
21 | // $this->add_auth_node();
22 | exit;
23 |
24 | }
25 |
26 | }
--------------------------------------------------------------------------------
/server/config.yaml:
--------------------------------------------------------------------------------
1 | debug: true
2 | # 当前版本
3 | version: "1.0"
4 | # 默认语言
5 | default_language: zh-cn
6 | # 会话保存时间
7 | access_max_age: 6000
8 | # 无需认证动作
9 | auth_dont_need_login:
10 | - home.config.bootstrap.event
11 | - home.i18n.event
12 | auth_dont_need_check:
13 | - home.config.app.get
14 | - home.static.js.get
15 | - home.static.css.get
16 |
17 | # 默认导航
18 | navs:
19 | Base Data Set:
20 | icon: navicon
21 | app: common
22 | System Preference:
23 | icon: cog
24 | app: common
--------------------------------------------------------------------------------
/server/Application/ContactsCompany/Service/ContactsCompanyService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 10/8/15
6 | * Time: 22:57
7 | */
8 |
9 | namespace Printer\Service\Parser\Layout;
10 |
11 |
12 | class H1 extends Common {
13 |
14 | protected $template = '%(content)s
';
15 |
16 | public function compile_to_html($template_config, $data) {
17 | return parent::compile_to_html($template_config, $data);
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/Crm/Service/CustomerCommunicateService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/10/15
6 | * Time: 14:25
7 | */
8 |
9 | namespace Crm\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class CustomerCommunicateService extends CommonModel {
15 |
16 | protected $_auto = array(
17 | array("user_info_id", "get_current_user_id", 1, "function"),
18 | array("company_id", "get_current_company_id", 1, "function")
19 | );
20 |
21 | }
--------------------------------------------------------------------------------
/server/Application/Currency/Controller/CurrencyController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 10/24/15
6 | * Time: 09:38
7 | */
8 |
9 | namespace Currency\Controller;
10 |
11 |
12 | use Common\Controller\BaseRestController;
13 |
14 | class CurrencyController extends BaseRestController {
15 |
16 | public function on_list() {
17 | $currencies = D('Currency/Currency', 'Service')->get_currency_list();
18 | $this->response($currencies);
19 | }
20 |
21 | }
--------------------------------------------------------------------------------
/server/Application/Product/Service/ProductService.class.php:
--------------------------------------------------------------------------------
1 | array(
10 | "mapping_type" => self::BELONGS_TO,
11 | "class_name" => "Product/ProductCategory"
12 | )
13 | );
14 |
15 | protected $_auto = [
16 | array("company_id", "get_current_company_id", 1, "function")
17 | ];
18 |
19 | }
--------------------------------------------------------------------------------
/server/Application/ProductAttribute/Service/ProductAttributeContentService.class.php:
--------------------------------------------------------------------------------
1 | get_tree();
23 |
24 | $this->response($tree, $model);
25 |
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/server/Application/Marketing/Service/SaleOpportunitiesService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/21/15
6 | * Time: 17:59
7 | */
8 |
9 | namespace Marketing\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class SaleOpportunitiesService extends CommonModel {
15 |
16 | protected $_auto = array(
17 | array("user_info_id", "get_current_user_id", 1, "function"),
18 | array("company_id", "get_current_company_id", 1, "function")
19 | );
20 |
21 | }
--------------------------------------------------------------------------------
/server/Application/SaleAnalytics/Service/SaleBoardService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/3/15
6 | * Time: 17:53
7 | */
8 |
9 | namespace Account\Event;
10 |
11 |
12 | use Account\Service\AuthNodeService;
13 | use Common\Event\BaseRestEvent;
14 |
15 | class AuthNodeEvent extends BaseRestEvent {
16 |
17 | /*
18 | * 获得节点授权flag
19 | * */
20 | public function get_auth_node_flags() {
21 | $this->response(D('Account/AuthNode', 'Service')->get_flags());
22 | }
23 |
24 | }
--------------------------------------------------------------------------------
/server/Application/Crm/Model/CrmClueModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/6/15
6 | * Time: 09:54
7 | */
8 |
9 | namespace Crm\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class CrmClueModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'CrmClue' => array('*', '_type'=>'left'),
18 | 'CommonType' => array('name'=>'source_from_label', '_on'=>'CrmClue.source_from=CommonType.id', '_type'=>'left')
19 | );
20 |
21 |
22 | }
--------------------------------------------------------------------------------
/server/Application/Calendar/Locale/zh-cn.yml:
--------------------------------------------------------------------------------
1 | APP_NAME: 日程
2 |
3 | Calendar: 日程
4 |
5 | Events: 日程事件
6 |
7 | Subject: 主题
8 |
9 | Year: 年
10 | Month: 月
11 | Week: 周
12 | Day: 天
13 |
14 | Previous: 上一页
15 | Next: 下一页
16 |
17 | Recurs On: 重复
18 | No Repeat: 不重复
19 | Every Year: 每年
20 | Every Month: 每月
21 | Every Week: 每周
22 | Every Day: 每天
23 |
24 | Start At: 开始时间
25 | End At: 结束时间
26 |
27 | View Event Content: 查看事件内容
28 |
29 | EVENTS_TYPE:
30 | Info: 普通
31 | Warning: 警告的
32 | Important: 重要的
33 | Inverse: 反向的
34 | Success: 成功的
35 | Special: 特殊的
--------------------------------------------------------------------------------
/server/Application/ContactsCompany/Service/ContactsCompanyLinkmanService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/15/15
6 | * Time: 11:42
7 | */
8 |
9 | namespace ContactsCompany\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class ContactsCompanyLinkmanService extends CommonModel {
15 |
16 | protected $_auto = [
17 | array("user_info_id", "get_current_user_id", 1, "function"),
18 | array("company_id", "get_current_company_id", 1, "function")
19 | ];
20 |
21 | }
--------------------------------------------------------------------------------
/server/Application/Home/Model/CompanyActiveAppsModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 7/5/15
6 | * Time: 21:36
7 | */
8 |
9 | namespace Home\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class CompanyActiveAppsModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'CompanyActiveApps' => array('app_id'=>'id', '_type'=>'left'),
18 | 'App' => array('alias', '_on'=>'App.id=CompanyActiveApps.app_id', '_type'=>'left')
19 | );
20 |
21 | }
--------------------------------------------------------------------------------
/server/Application/Purchase/Controller/PurchaseController.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>"left"],
18 | 'AuthRole' => [
19 | 'name', 'description', '_on'=>'AuthUserRole.auth_role_id=AuthRole.id', '_type' => 'left'
20 | ]
21 | ];
22 |
23 | }
--------------------------------------------------------------------------------
/server/Application/Account/Model/CompanyProfileModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left'],
16 | "Company" => ['name'=>"company_name", '_on'=>'CompanyProfile.company_id=Company.id', '_type'=>"left"]
17 | ];
18 |
19 | }
--------------------------------------------------------------------------------
/server/Application/ContactsCompany/Controller/ContactsCompanyLinkmanController.class.php:
--------------------------------------------------------------------------------
1 | array('*', '_type'=>'left'),
20 | 'AuthNode' => array('node', 'app', '_on'=>'Authorize.auth_node_id=AuthNode.id', '_type'=>'left')
21 | );
22 |
23 | }
--------------------------------------------------------------------------------
/test/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true,
3 | "browser": true,
4 | "esnext": true,
5 | "bitwise": true,
6 | "camelcase": true,
7 | "curly": true,
8 | "eqeqeq": true,
9 | "immed": true,
10 | "indent": 2,
11 | "latedef": true,
12 | "newcap": true,
13 | "noarg": true,
14 | "quotmark": "single",
15 | "regexp": true,
16 | "undef": true,
17 | "unused": true,
18 | "strict": true,
19 | "trailing": true,
20 | "smarttabs": true,
21 | "jasmine": true,
22 | "globals": {
23 | "angular": false,
24 | "browser": false,
25 | "inject": false
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/server/Application/DataModel/config.yml:
--------------------------------------------------------------------------------
1 | alias: dataModel
2 | author: TEam Swift
3 | description: ONES 数据模型模块
4 | link: http://ng-erp.com
5 | document: http://ones_manual.mydoc.io/?t=35693
6 | auth_nodes:
7 | - dataModel.dataModelField.*
8 | include:
9 | js:
10 | - apps/dataModel/main
11 |
12 | load_all_i18n: true
13 |
14 | navs:
15 | Base Data Set:
16 | children:
17 | System Common Data:
18 | children:
19 | Data Model Field:
20 | app: dataModel
21 | link: dataModel/dataModelField
--------------------------------------------------------------------------------
/server/Application/Common/Lib/RecursiveFolderFilterIterator.class.php:
--------------------------------------------------------------------------------
1 | getInnerIterator();
16 | if ($item->isDir()) {
17 | return true;
18 | }
19 | return false;
20 | }
21 | }
--------------------------------------------------------------------------------
/server/Application/Home/Event/HeartBeatEvent.class.php:
--------------------------------------------------------------------------------
1 | response([
22 | 'logged_out' => true
23 | ]);
24 | }
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/ones/apps/calendar/views/event_detail.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | |
4 |
5 |
6 | |
7 |
8 |
9 | |
10 | |
11 |
12 |
13 | |
14 | |
15 |
16 |
--------------------------------------------------------------------------------
/ones/apps/finance/views/confirm.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
16 |
17 |
--------------------------------------------------------------------------------
/server/Application/ContactsCompany/Model/ContactsCompanyModel.class.php:
--------------------------------------------------------------------------------
1 | array("*", '_type'=>'left'),
17 | "ContactsCompanyRole" => array('name'=>'role_name', '_on'=>'ContactsCompany.contacts_company_role_id=ContactsCompanyRole.id', '_type'=>'left')
18 | );
19 |
20 | }
--------------------------------------------------------------------------------
/server/Application/Storage/Event/StockEvent.class.php:
--------------------------------------------------------------------------------
1 | get_quantity_by_product(I('get.'));
14 | $this->response(['quantity_balance'=>$quantity_balance]);
15 | }
16 |
17 | public function _EM_get_quantity_balance() {
18 | return $this->get_quantity_balance();
19 | }
20 |
21 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ONES is Not-only an ERP System
2 |
3 | ONES not ONS,项目前端基于AngularJS+Bootstrap, 后端使用PHP+MySQL,使用ThinkPHP框架。
4 |
5 | Author: [TEam Swift](http://ng-erp.com)
6 |
7 |
8 | * 讨论反馈 [http://forum.ng-erp.com](http://forum.ng-erp.com)
9 | * 开发文档 [http://ones.mydoc.io](http://ones.mydoc.io)
10 | * 使用手册 [http://ones_manual.mydoc.io](http://ones_manual.mydoc.io)
11 |
12 |
13 | * 核心+扩展应用架构,模块之间相对独立又可有机结合
14 | * 可视化的的工作流设定
15 | * RBAC + 工作流节点权限 + 行级权限接口,丰富的权限控制组合
16 | * 独特的数据模型功能,用于扩展数据字段
17 | * 简单的模块开发,无论是简单的小插件还是大型业务功能,均得心应手
18 | * 独特的通用视图功能,通过约定和配置,写最少的代码完成更多的模块功能
19 | * 完善的前后端缓存接口和插件机制
20 | * 多TAB管理界面
21 | * and more ...
--------------------------------------------------------------------------------
/ones/apps/saleAnalytics/plugin.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones){
2 | 'use strict';
3 | // 桌面块
4 | ones.pluginRegister('dashboard_widgets', function(injector, defered) {
5 | ones.pluginScope.append('dashboard_widgets', {
6 | alias: 'sale_volume_analytics',
7 | title: _('saleAnalytics.Sale Analytics Monthly'),
8 | template: appView('dashboard_sale_analytics.html', 'saleAnalytics'),
9 | sizeX: 6,
10 | sizeY: 4,
11 | auth_node: 'saleAnalytics.saleVolume.get'
12 | });
13 | });
14 |
15 | })(window, window.angular, window.ones);
--------------------------------------------------------------------------------
/server/Application/Product/Common/function.php:
--------------------------------------------------------------------------------
1 | get_attribute_fields();
11 | }
12 |
13 | $product_unique_id = [$row['product_id']];
14 | foreach($attribute_fields as $attr) {
15 | array_push($product_unique_id, sprintf('%d_%d', $attr['id'], $row[$attr['alias']]));
16 | }
17 |
18 | return implode('|', $product_unique_id);
19 | }
20 |
--------------------------------------------------------------------------------
/ones/apps/bpm/views/progress_aside.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
![]()
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/server/Application/Storage/Model/StockOutModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left'],
16 | "Workflow" => [
17 | "name" => "workflow_id__label__",
18 | "_on" => "Workflow.id=StockOut.workflow_id",
19 | "_type" => "left"
20 | ]
21 | ];
22 |
23 | }
--------------------------------------------------------------------------------
/server/Application/Product/Event/ProductEvent.class.php:
--------------------------------------------------------------------------------
1 | where(['id'=>I('get.product_id')])->find();
17 |
18 | $this->response([
19 | 'sale_price' => (float)$product['price'],
20 | 'purchase_price' => (float)$product['cost']
21 | ]);
22 | }
23 |
24 | }
--------------------------------------------------------------------------------
/server/Application/Home/Schema/1_app.yml:
--------------------------------------------------------------------------------
1 | app:
2 | alias:
3 | comment: 应用别名
4 | slug:
5 | blank: true
6 | comment: 缩写
7 | after: alias
8 | requirements:
9 | type: text
10 | blank: true
11 | comment: 依赖
12 | price:
13 | type: decimal
14 | precision: 14
15 | scale: 4
16 | default: 0.00
17 | type:
18 | blank: true
19 | limit: 20
20 | $meta:
21 | # truncate_when_migrate: true
22 | indexes:
23 | alias:
24 | unique: true
25 | type:
26 | enable_trash: true
27 |
28 |
--------------------------------------------------------------------------------
/utils/lib/utils.py:
--------------------------------------------------------------------------------
1 | import sys, os
2 |
3 | def get_template(root_path, file, alias):
4 | template = open(root_path+'/utils/template/' + file, 'r')
5 | tpl_content = template.read()
6 | template.close()
7 |
8 | tpl_content = tpl_content.replace('*alias*', alias)
9 | return tpl_content
10 |
11 | def write_by_template(file_path, content):
12 | the_file = open(file_path, 'w')
13 | the_file.write(content)
14 | the_file.close()
15 |
16 | def get_current_dir():
17 | path = sys.path[0]
18 | if os.path.isdir(path):
19 | return path
20 | elif os.path.isfile(path):
21 | return os.path.dirname(path)
--------------------------------------------------------------------------------
/server/Application/ContactsCompany/Model/ContactsCompanyLinkmanModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/8/15
6 | * Time: 11:46
7 | */
8 |
9 | namespace ContactsCompany\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class ContactsCompanyLinkmanModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'ContactsCompanyLinkman' => array('*', '_type'=>'left'),
18 | 'ContactsCompany' => array('name'=>'company_name', '_on'=>'ContactsCompany.id=ContactsCompanyLinkman.contacts_company_id', '_type'=>'left')
19 | );
20 |
21 | }
--------------------------------------------------------------------------------
/server/Application/Crm/Model/CustomerCareModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/16/15
6 | * Time: 11:20
7 | */
8 |
9 | namespace Crm\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class CustomerCareModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'CustomerCare' => array('*', '_type'=>'left'),
18 | 'CommonType' => array('name'=>'get_type_display', '_on'=>'CustomerCare.type=CommonType.id', '_type'=>'left')
19 | );
20 |
21 | protected $order = "CustomerCare.created DESC, CustomerCare.id DESC";
22 |
23 | }
--------------------------------------------------------------------------------
/server/Application/Home/Schema/0_type.yml:
--------------------------------------------------------------------------------
1 | common_type:
2 | module:
3 | limit: 50
4 | alias:
5 | blank: true
6 | name:
7 | limit: 100
8 | listorder:
9 | type: integer
10 | limit: 4
11 | default: 99
12 | $meta:
13 | indexes:
14 | type_name:
15 | fields: [module, name, company_id]
16 | unique: true
17 | alias:
18 | name:
19 | module:
20 | listorder:
21 | foreign:
22 | company:
23 | restrict:
24 | delete: CASCADE
25 | enable_trash: true
--------------------------------------------------------------------------------
/ones/apps/printer/views/canvas.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/server/Application/Calendar/Model/EventsModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/10/15
6 | * Time: 10:58
7 | */
8 |
9 | namespace Calendar\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class EventsModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'Events' => array('*', '_type'=>'left'),
18 | 'UserInfo' => array('realname', 'avatar', 'email', '_on'=>'Events.user_info_id=UserInfo.id', '_type'=>'left'),
19 | 'Department' => array('name'=>'department_name', '_on'=>'UserInfo.department_id=Department.id', '_type'=>'left')
20 | );
21 |
22 | }
--------------------------------------------------------------------------------
/server/Application/Marketing/Controller/ContractController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/22/15
6 | * Time: 11:06
7 | */
8 |
9 | namespace Marketing\Controller;
10 |
11 |
12 | use Common\Controller\BaseRestController;
13 |
14 | class ContractController extends BaseRestController {
15 |
16 | public function _before_insert() {
17 | $_POST['sale_opportunities_id'] = process_with_item_select_ids('sale_opportunities_id');
18 | $_POST['head_id'] = process_with_item_select_ids('head_id');
19 | }
20 |
21 | public function _before_update() {
22 | $this->_before_insert();
23 | }
24 |
25 | }
--------------------------------------------------------------------------------
/server/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "config": {
3 | "secure-http": false
4 | },
5 | "repositories": [
6 | {
7 | "packagist": false
8 | },
9 | {
10 | "type": "composer",
11 | "url": "http://packagist.cn"
12 | }
13 | ],
14 | "autoload": {
15 | "psr-4": {
16 | "Common\\": "Application/Common"
17 | }
18 | },
19 | "require": {
20 | "php": ">=5.5.9",
21 | "topthink/thinkphp": "3.2.2",
22 | "robmorgan/phinx": "*",
23 | "symfony/config": "*",
24 | "phpmailer/phpmailer": "dev-master"
25 | },
26 | "minimum-stability": "dev"
27 | }
28 |
--------------------------------------------------------------------------------
/server/Application/Common/Event/BaseRestEvent.class.php:
--------------------------------------------------------------------------------
1 | on_event_list();
18 | }
19 |
20 | public function read() {
21 | return $this->on_event_read();
22 | }
23 |
24 | public function on_event_list() {
25 | return $this->on_list();
26 | }
27 |
28 | public function on_event_read() {
29 | return $this->on_read();
30 | }
31 |
32 | }
--------------------------------------------------------------------------------
/server/Application/Account/Model/UserInfoModel.class.php:
--------------------------------------------------------------------------------
1 | array('id', 'login', 'email', 'realname', 'created', 'department_id', '_type'=>'left'),
22 | 'Department' => array('name' => 'department_id__label__', '_on'=>'UserInfo.department_id=Department.id', '_type'=>'left')
23 | );
24 |
25 | }
--------------------------------------------------------------------------------
/ones/apps/bpm/static/style.css.map:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "mappings": "AAAA,sBAAuB;EACnB,QAAQ,EAAC,QAAQ;;AAErB,mBAAoB;EAChB,UAAU,EACN,qHAC0D;EAE9D,gBAAgB,EAAE,OAAO;EACzB,eAAe,EAAE,SAAS;EAC1B,MAAM,EAAC,KAAK;EACZ,KAAK,EAAC,IAAI;EACV,QAAQ,EAAC,QAAQ;EACjB,MAAM,EAAE,cAAc;;AAG1B,YAAa;EACT,OAAO,EAAE,IAAI;EACb,QAAQ,EAAE,QAAQ;EAAE,IAAI,EAAC,IAAI;EAAE,GAAG,EAAC,CAAC;EACpC,OAAO,EAAC,CAAC;EACT,UAAU,EAAE,GAAG;EACf,OAAO,EAAE,OAAO;EAAC,KAAK,EAAC,IAAI;;AAE/B,UAAW;EACP,QAAQ,EAAE,QAAQ;;AAEtB,uBAAwB;EACpB,OAAO,EAAE,KAAK;;AAGlB,mBAAoB;EAChB,UAAU,EAAE,IAAI;;AAGpB,qBAAsB;EAClB,QAAQ,EAAC,QAAQ;EACjB,KAAK,EAAC,CAAC;EAAC,GAAG,EAAC,CAAC;EACb,KAAK,EAAE,GAAG;EAEV,oCAAe;IACX,MAAM,EAAC,KAAK",
4 | "sources": ["style.scss"],
5 | "names": [],
6 | "file": "style.css"
7 | }
--------------------------------------------------------------------------------
/ones/apps/marketing/plugin.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones){
2 | 'use strict';
3 |
4 | // 商机状态
5 | ones.pluginRegister('common_type_module', function(injector, defered) {
6 | ones.pluginScope.append('common_type_module', {
7 | label: _('marketing.Sale Opportunities Status'),
8 | value: 'sale_opportunities_status'
9 | });
10 | });
11 |
12 | // 合同自定义字段
13 | ones.pluginRegister('data_model_supported', function() {
14 | ones.pluginScope.append('data_model_supported', {
15 | label: _('marketing.Contract') + ' ' + _('common.Module'),
16 | value: 'marketing.contract'
17 | });
18 | });
19 |
20 | })(window, window.angular, window.ones);
--------------------------------------------------------------------------------
/server/Application/Bpm/Controller/WorkflowBuilderController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 7/6/15
6 | * Time: 19:54
7 | */
8 |
9 | namespace Bpm\Controller;
10 |
11 |
12 | use Common\Controller\BaseRestController;
13 | use Common\Model\CommonModel;
14 |
15 | class WorkflowBuilderController extends BaseRestController {
16 |
17 | public function on_put() {
18 | $service = D('Bpm/Workflow');
19 | if(false === $service->save_workflow(I('post.data'), I('post.id'))) {
20 | $this->error('E: '.$service->getError());
21 | } else {
22 | $this->success(__('common.Operation Success'));
23 | }
24 | }
25 |
26 | }
--------------------------------------------------------------------------------
/server/Application/ContactsCompany/Controller/ContactsCompanyController.class.php:
--------------------------------------------------------------------------------
1 | merge_region_name_to_list($list);
17 | return $list;
18 | }
19 |
20 | public function _before_item_response_($item) {
21 | $item['region_id__label__'] = D('Region/Region')->get_full_info($item['region_id']);
22 | return $item;
23 | }
24 |
25 | }
--------------------------------------------------------------------------------
/server/Application/Uploader/Conf/tags.php:
--------------------------------------------------------------------------------
1 | array(
6 | "Uploader\\Behaviors\\ProcessUploadedBehavior",
7 | ),
8 | "before_item_update" => array(
9 | "Uploader\\Behaviors\\ProcessUploadedBehavior",
10 | ),
11 |
12 | // 插入完成之后,将主数据记录ID更新至附件表
13 | "after_item_insert" => array(
14 | "Uploader\\Behaviors\\UpdateAttachSourceBehavior",
15 | ),
16 | "after_item_update" => array(
17 | "Uploader\\Behaviors\\UpdateAttachSourceBehavior",
18 | ),
19 |
20 | // 删除记录时同步删除附件
21 | "after_item_delete" => array(
22 | "Uploader\\Behaviors\\ProcessAttachDeletedBehavior",
23 | )
24 | );
--------------------------------------------------------------------------------
/server/Application/Product/Model/ProductModel.class.php:
--------------------------------------------------------------------------------
1 | array("*", '_type'=>"left"),
10 | "ProductCategory" => array(
11 | "name" => "product_category_id__label__",
12 | "_on"=>"Product.product_category_id=ProductCategory.id",
13 | "_type" => "left"
14 | )
15 | );
16 |
17 | public $orderFields = ['id', 'product_category_id'];
18 |
19 | public $fuzzy_search = [
20 | 'Product.name',
21 | 'Product.serial_number',
22 | 'ProductCategory.name'
23 | ];
24 |
25 | }
--------------------------------------------------------------------------------
/ones/apps/finance/plugin.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones) {
2 |
3 | // 支持通用类型
4 | ones.pluginRegister('common_type_module', function(injector, defered) {
5 | ones.pluginScope.append('common_type_module', {
6 | label: _('finance.Receivables Type'),
7 | value: 'finance_receivables_type'
8 | });
9 | ones.pluginScope.append('common_type_module', {
10 | label: _('finance.Payables Type'),
11 | value: 'finance_payables_type'
12 | });
13 | ones.pluginScope.append('common_type_module', {
14 | label: _('finance.Payment Method'),
15 | value: 'finance_payment_method'
16 | });
17 | });
18 |
19 | })(window, window.angular, window.ones);
--------------------------------------------------------------------------------
/server/Application/Crm/Model/CustomerCommunicateModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/8/15
6 | * Time: 18:25
7 | */
8 |
9 | namespace Crm\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class CustomerCommunicateModel extends CommonViewModel {
15 | protected $viewFields = array(
16 | 'CustomerCommunicate' => array('*', '_type'=>'left'),
17 | 'Customer' => array('_on'=>'Customer.id=CustomerCommunicate.customer_id', '_type'=>'left'),
18 | 'ContactsCompany' => array('_on'=>'ContactsCompany.id=Customer.contacts_company_id', '_type'=>'left')
19 | );
20 |
21 | protected $order = "CustomerCommunicate.created DESC, CustomerCommunicate.id DESC";
22 | }
--------------------------------------------------------------------------------
/server/Application/Purchase/Model/PurchaseDetailModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left'],
16 | 'Product' => [
17 | 'name'=>'product_id__label__',
18 | 'measure_unit',
19 | 'serial_number',
20 | 'measure_unit' => 'quantity__after__',
21 | '_on' => 'Product.id=PurchaseDetail.product_id',
22 | '_type' => 'left'
23 | ]
24 | ];
25 |
26 | }
--------------------------------------------------------------------------------
/server/Application/Calendar/config.yml:
--------------------------------------------------------------------------------
1 | alias: calendar
2 | author: TEam Swift
3 | link: http://ng-erp.com
4 | document: http://ones_manual.mydoc.io/?t=35710
5 |
6 | auth_nodes:
7 | - calendar.events.get|flag
8 | - calendar.events.post|flag
9 | - calendar.events.put|flag
10 | - calendar.events.delete|flag
11 |
12 | load_modules:
13 | - mwl.calendar
14 | global_load_modules:
15 | - ones.app.calendar.main
16 |
17 | global_include:
18 | js:
19 | - apps/calendar/main
20 | css:
21 | - apps/calendar/static/style
22 | navs:
23 | Office:
24 | app: office
25 | icon: coffee
26 | children:
27 | Calendar:
28 | app: calendar
29 | icon: calendar
30 | link: calendar/events
31 |
--------------------------------------------------------------------------------
/server/Application/Uploader/Schema/0_attachment.yml:
--------------------------------------------------------------------------------
1 | attachment:
2 | real_url:
3 | source_name:
4 | source_model:
5 | source_id:
6 | blank: true
7 | file_size:
8 | type: integer
9 | limit: 11
10 | file_mime:
11 | type: string
12 | limit: 50
13 | created:
14 | type: datetime
15 | default: CURRENT_TIMESTAMP
16 |
17 | $meta:
18 | indexes:
19 | source_model:
20 | source_id:
21 | source_name:
22 | foreign:
23 | company:
24 | restrict:
25 | delete: CASCADE
26 | user_info:
27 | restrict:
28 | delete: SET_NULL
29 | options:
30 | blank: true
--------------------------------------------------------------------------------
/server/Application/Account/Common/function.php:
--------------------------------------------------------------------------------
1 | select();
23 | $all_nodes = array();
24 |
25 | foreach($data as $node) {
26 | $all_nodes[$node['id']] = $node;
27 | }
28 |
29 | F($cache_key, $all_nodes);
30 |
31 | return $all_nodes;
32 | }
--------------------------------------------------------------------------------
/server/Application/Finance/Controller/PayablesController.class.php:
--------------------------------------------------------------------------------
1 | start_progress(I('post.workflow_id'), $id, [])) {
24 | $this->error($workflow_service->getError());
25 | return false;
26 | }
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/server/Application/Storage/Model/StockModel.class.php:
--------------------------------------------------------------------------------
1 | array('*', '_type'=>'left'),
10 | "Storage" => array('name' => 'storage_name', '_on'=>"Stock.storage_id=Storage.id", "_type"=>"left"),
11 | "Product" => array('name'=>'product_name', 'serial_number', 'product_category_id', 'measure_unit', '_on'=>'Stock.product_id=Product.id', '_type'=>'left'),
12 | "ProductCategory" => ['name'=>'product_category', '_on'=>'Product.product_category_id=ProductCategory.id', '_type'=>'left']
13 | );
14 |
15 | public $fuzzy_search = [
16 | 'Product.name', 'Product.serial_number'
17 | ];
18 |
19 | }
--------------------------------------------------------------------------------
/ones/apps/contactsCompany/plugin.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones) {
2 | // 注册公司基本信息到可支持自定义字段
3 | ones.pluginRegister('data_model_supported', function(injector, defered) {
4 | ones.pluginScope.append('data_model_supported', {
5 | label: _('contactsCompany.Contacts Company') + ' ' + _('common.Module'),
6 | value: 'contactsCompany.contactsCompany'
7 | });
8 | });
9 |
10 |
11 | // 联系人信息扩展字段
12 | ones.pluginRegister('data_model_supported', function(injector, defered) {
13 | ones.pluginScope.append('data_model_supported', {
14 | label: _('contactsCompany.Contacts Company Linkman') + ' ' + _('common.Module'),
15 | value: 'contactsCompany.contactsCompanyLinkman'
16 | });
17 | });
18 |
19 | })(window,window.angular,window.ones);
--------------------------------------------------------------------------------
/server/Application/Finance/Controller/ReceivablesController.class.php:
--------------------------------------------------------------------------------
1 | start_progress(I('post.workflow_id'), $id, [])) {
24 | $this->error($workflow_service->getError());
25 | return false;
26 | }
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/ones/views/confirm.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Application/Common/Model/CommonAdvModel.class.php:
--------------------------------------------------------------------------------
1 | $name;
14 | }
15 |
16 | /*
17 | * @override
18 | *
19 | * 默认增加company_id字段
20 | * */
21 | public function where($map, $parse=null) {
22 | if(!$this->not_belongs_to_company) {
23 | $this->real_model_name = $this->real_model_name ? $this->real_model_name : $this->getModelName();
24 | $map[$this->real_model_name.".company_id"] = get_current_company_id();
25 | }
26 |
27 | return parent::where($map, $parse);
28 | }
29 | }
--------------------------------------------------------------------------------
/ones/apps/region/model.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones, io){
2 | /*
3 | * @app region
4 | * @author laofahai@TEam Swift
5 | * @link http://ng-erp.com
6 | * */
7 | 'use strict';
8 | ones.global_module
9 | .service('Region.RegionAPI', [
10 | 'ones.dataApiFactory',
11 | function(dataAPI) {
12 | this.resource = dataAPI.getResourceInstance({
13 | uri: 'region/region',
14 | extra_methods: ['api_get', 'api_query']
15 | });
16 |
17 | this.get_full_name = function(region_id) {
18 | return this.resource.api_get({_m: 'get_full_name', id: region_id}).$promise;
19 | };
20 | }
21 | ])
22 | ;
23 |
24 | })(window, window.angular, window.ones, window.io);
--------------------------------------------------------------------------------
/server/Application/Uploader/Behaviors/UpdateAttachSourceBehavior.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/25/15
6 | * Time: 19:09
7 | */
8 |
9 | namespace Uploader\Behaviors;
10 |
11 |
12 | use Think\Behavior;
13 |
14 | class UpdateAttachSourceBehavior extends Behavior {
15 |
16 | public function run(&$params) {
17 |
18 | $source_id = $params['insert_id'] ? $params['insert_id'] : $params['update_id'];
19 | $attach_ids = $params['attachment_ids'];
20 |
21 | if(!$source_id or !$attach_ids) {
22 | return;
23 | }
24 |
25 | D('Uploader/Attachment')->where(array(
26 | 'id' => array("IN", $attach_ids)
27 | ))->save(array(
28 | 'source_id' => $source_id
29 | ));
30 |
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/server/Application/Supplier/config.yml:
--------------------------------------------------------------------------------
1 | alias: supplier
2 | author: TEam Swift
3 | link: http://ng-erp.com
4 | document: http://ones_manual.mydoc.io/?t=35697
5 | requirements:
6 | - contactsCompany
7 | - product
8 |
9 | auth_nodes:
10 | - supplier.supplier.*
11 |
12 | include:
13 | js:
14 | - apps/supplier/main
15 | - apps/supplier/model
16 |
17 | navs:
18 | Supplier Manage:
19 | app: supplier
20 | icon: chain
21 | children:
22 | Supplier Manage:
23 | app: supplier
24 | children:
25 | Suppliers List:
26 | app: supplier
27 | link: supplier/supplier
28 | Add New Supplier:
29 | app: supplier
30 | link: supplier/supplier/add
--------------------------------------------------------------------------------
/server/Application/Marketing/Schema/1_oppor_foreign.yml:
--------------------------------------------------------------------------------
1 | sale_opportunities_product:
2 | quote_price:
3 | type: decimal
4 | precision: 14
5 | scale: 4
6 | num:
7 | type: decimal
8 | precision: 14
9 | scale: 4
10 | quote_amount:
11 | type: decimal
12 | precision: 14
13 | scale: 4
14 | $meta:
15 | foreign:
16 | sale_opportunities:
17 | restrict:
18 | delete: CASCADE
19 | product:
20 | restrict:
21 | delete: CASCADE
22 | company:
23 | restrict:
24 | delete: CASCADE
25 | user_info:
26 | options:
27 | blank: true
28 | restrict:
29 | delete: SET_NULL
--------------------------------------------------------------------------------
/ones/views/itemSelectModal.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/server/Application/Account/Event/UserPreferenceEvent.class.php:
--------------------------------------------------------------------------------
1 | get_preference();
20 | foreach($configs as $k=>$v) {
21 | $configs[$k] = Schema::data_field_format($v['data'], $v['data_type']);
22 | }
23 |
24 | $configs = I('get.key') ? $configs[I('get.key')] : $configs;
25 |
26 | $this->response($configs);
27 | }
28 |
29 | public function on_list() {
30 | return $this->on_read();
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/server/Application/Marketing/Model/SaleOpportunitiesModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/20/15
6 | * Time: 23:13
7 | */
8 |
9 | namespace Marketing\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class SaleOpportunitiesModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'SaleOpportunities' => array('*', '_type'=>'left'),
18 | 'Customer' => array('source_from', 'contacts_company_id', '_on'=>'SaleOpportunities.customer_id=Customer.id','_type'=>'left'),
19 | 'ContactsCompany' => array('name'=>'customer', '_on'=>'Customer.contacts_company_id=ContactsCompany.id', '_type'=>'left'),
20 | 'CommonType' => array('name'=>'status_label', '_on'=>'SaleOpportunities.status=CommonType.id', '_type'=>'left')
21 | );
22 |
23 | }
--------------------------------------------------------------------------------
/server/Application/Region/Migration/RegionMigration.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 9/18/16
6 | * Time: 11:06
7 | */
8 |
9 | namespace Region\Migration;
10 |
11 |
12 | use Common\Lib\BaseMigration;
13 |
14 | class RegionMigration extends BaseMigration {
15 |
16 | public function up() {
17 | $sql_path = ENTRY_PATH.'/Application/Region/Schema/data.sql';
18 | if(!is_file($sql_path)) {
19 | return;
20 | }
21 | $sql_content = file_get_contents($sql_path);
22 | $sql_content = explode("\n", $sql_content);
23 |
24 | foreach($sql_content as $sql) {
25 | $sql = trim($sql);
26 | if(!$sql) {
27 | continue;
28 | }
29 | $this->execute($sql);
30 | }
31 |
32 | }
33 | }
--------------------------------------------------------------------------------
/server/Application/Storage/Model/StockLogModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left'],
16 | "Storage" => [
17 | 'name' => 'storage_name',
18 | '_on' => 'Storage.id=StockLog.storage_id',
19 | '_type'=> 'left'
20 | ],
21 | "Product" => [
22 | 'name' => 'product_name',
23 | 'measure_unit',
24 | 'serial_number',
25 | '_on' => 'StockLog.product_id=Product.id',
26 | '_type'=> 'left'
27 | ]
28 | ];
29 |
30 | }
--------------------------------------------------------------------------------
/server/Application/Marketing/Model/ContractModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/22/15
6 | * Time: 10:56
7 | */
8 |
9 | namespace Marketing\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class ContractModel extends CommonViewModel {
15 |
16 | protected $viewFields = array(
17 | 'Contract' => array('*', '_type'=>'left'),
18 | 'SaleOpportunities' => array('name'=>'opportunities_name', 'customer_id', '_on'=>'Contract.sale_opportunities_id=SaleOpportunities.id', '_type'=>'left'),
19 | 'Customer' => array('contacts_company_id', '_on'=>'Customer.id=SaleOpportunities.customer_id', '_type'=>'left'),
20 | 'ContactsCompany' => array('name'=>'customer_name', '_on'=>'Customer.contacts_company_id=ContactsCompany.id', '_type'=>'left')
21 | );
22 |
23 | }
--------------------------------------------------------------------------------
/ones/apps/home/statics/style.css.map:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "mappings": "AAGA,sBAAuB;EACnB,QAAQ,EAAE,QAAQ;;AAEtB,iBAAkB;EACd,YAAY,EAAE,KAAoB;;AAEtC,kBAAmB;EACf,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAC,CAAC;EACP,GAAG,EAAC,CAAC;EACL,KAAK,EAAE,KAAK;EAEZ,kCAAgB;IACZ,MAAM,EAAC,IAAI;IACX,SAAS,EAAC,IAAI;IACd,WAAW,EAAC,IAAI;IAChB,MAAM,EAAC,CAAC;IACR,OAAO,EAAC,MAAM;IACd,UAAU,EApBJ,OAAO;IAqBb,KAAK,EAAC,IAAI;EAEd,kCAAgB;IACZ,WAAW,EAAC,IAAI;IAChB,UAAU,EAAC,OAAO;IAClB,MAAM,EAAC,cAAc;IACrB,UAAU,EAAC,CAAC;IACZ,SAAS,EAAC,IAAI;IAEd,wDAAsB;MAClB,WAAW,EAAC,IAAI;MAChB,OAAO,EAAC,CAAC;MACT,UAAU,EAAC,CAAC;MACZ,aAAa,EAAC,IAAI;MAClB,wHAAO;QACH,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,iBAAiB;QAC9B,MAAM,EAAC,IAAI;QAAC,WAAW,EAAC,IAAI;MAEhC,6DAAK;QACD,KAAK,EAAE,IAAI;MAEf,mEAAW;QACP,KAAK,EAAC,OAAO;MAEjB,kEAAU;QACN,YAAY,EAAC,OAAO;QACpB,oEAAE;UACE,KAAK,EAAC,OAAO",
4 | "sources": ["style.scss"],
5 | "names": [],
6 | "file": "style.css"
7 | }
--------------------------------------------------------------------------------
/server/Application/Currency/Service/CurrencyService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 10/23/15
6 | * Time: 17:14
7 | */
8 |
9 | namespace Currency\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class CurrencyService extends CommonModel {
15 |
16 | static protected $all_currencies = [
17 | [
18 | "name" => "CNY",
19 | "symbol" => "¥"
20 | ],
21 | [
22 | "name" => "USD",
23 | "symbol" => "$"
24 | ],
25 | [
26 | "name" => "HKD",
27 | "symbol" => "HK$"
28 | ]
29 | ];
30 |
31 | /*
32 | * 获得所有可用币种
33 | * @param string $base 本位币
34 | * */
35 | public function get_currency_list() {
36 | return self::$all_currencies;
37 | }
38 |
39 | }
--------------------------------------------------------------------------------
/ones/apps/printer/statics/style.css.map:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "mappings": "AACI,sBAAM;EACF,KAAK,EAAE,IAAI;EAEX,oDAAO;IACH,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,OAAO;AAIxB,mBAAG;EACC,MAAM,EAAC,CAAC;EACR,SAAS,EAAC,IAAI;EACd,OAAO,EAAE,IAAI;AAGjB,uBAAO;EACH,KAAK,EAAC,IAAI;EAAC,OAAO,EAAC,MAAM;EACzB,MAAM,EAAC,IAAI;EAAC,WAAW,EAAC,IAAI;AAGhC,8BAAc;EACV,QAAQ,EAAC,QAAQ;EACjB,iCAAG;IACC,UAAU,EAAC,MAAM;EAGrB,uCAAS;IACL,QAAQ,EAAC,QAAQ;IACjB,IAAI,EAAC,IAAI;IACT,GAAG,EAAC,IAAI;;AAKpB,MAAO;EACH,UAAU,EAAC,IAAI;;AAEnB,OAAQ;EACJ,MAAM,EAAC,MAAM;;AAEjB,OAAQ;EACJ,MAAM,EAAC,MAAM;;AAGjB,aAAc;EACV,gBAAiB;IACb,MAAM,EAAC,iBAAiB;IACxB,OAAO,EAAE,IAAI;IACb,MAAM,EAAC,IAAI;IACX,UAAU,EAAE,oBAAoB;AAKxC,YAAa;EACT,CAAE;IACE,KAAK,EAAE,eAAe;;EAE1B,gBAAiB;IACb,OAAO,EAAC,CAAC;IACT,MAAM,EAAC,CAAC;;EAEZ,sCAAuC;IACnC,OAAO,EAAC,eAAe;;EAG3B,MAAO;IACH,YAAY,EAAE,eAAe",
4 | "sources": ["style.scss"],
5 | "names": [],
6 | "file": "style.css"
7 | }
--------------------------------------------------------------------------------
/server/Application/Printer/Service/Parser/Layout/Table.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 10/8/15
6 | * Time: 23:19
7 | */
8 |
9 | namespace Printer\Service\Parser\Layout;
10 |
11 | use Printer\Service\Parser\AbstractLayout;
12 | use Printer\Service\Parser\InterfaceLayout;
13 |
14 | class Table extends AbstractLayout implements InterfaceLayout {
15 |
16 | protected $table_templates = [
17 | "table" => '',
18 | "th" => '%(content)s | ',
19 | "tr" => '%(content)s
',
20 | "td" => '%(content)s | '
21 | ];
22 |
23 | public function compile_to_html($template_config, $data) {}
24 |
25 | }
--------------------------------------------------------------------------------
/install/phinx.yml.sample:
--------------------------------------------------------------------------------
1 | paths:
2 | migrations: %%PHINX_CONFIG_DIR%%/Data/Migrations
3 | migration_base_class: Common\Lib\BaseMigration
4 | environments:
5 | default_migration_table: phinxlog
6 | default_database: development
7 | production:
8 | adapter: %(adapter)s
9 | host: %(host)s
10 | name: %(name)s
11 | user: %(user)s
12 | pass: %(pass)s
13 | port: %(port)s
14 | charset: utf8
15 |
16 | development:
17 | adapter: %(adapter)s
18 | host: %(host)s
19 | name: %(name)s
20 | user: %(user)s
21 | pass: %(pass)s
22 | port: %(port)s
23 | charset: utf8
24 |
25 | testing:
26 | adapter: %(adapter)s
27 | host: %(host)s
28 | name: %(name)s
29 | user: %(user)s
30 | pass: %(pass)s
31 | port: %(port)s
32 | charset: utf8
--------------------------------------------------------------------------------
/server/Application/Bpm/Model/WorkflowProgressModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left'],
16 | "WorkflowNode" => [
17 | 'status_label' => 'node_status_label',
18 | 'label' => 'node_label',
19 | 'node_type', 'executor',
20 | '_on' => 'WorkflowProgress.workflow_node_id=WorkflowNode.id',
21 | '_type' => 'left'
22 | ],
23 | "Workflow" => [
24 | '_on' => 'WorkflowProgress.workflow_id=Workflow.id',
25 | '_type' => 'left'
26 | ]
27 | ];
28 | }
--------------------------------------------------------------------------------
/server/Application/Calendar/Schema/0_events.yml:
--------------------------------------------------------------------------------
1 | events:
2 | subject:
3 | type:
4 | limit: 10
5 | default: info
6 | recurs_on:
7 | limit: 10
8 | blank: true
9 | start_at:
10 | type: datetime
11 | default: CURRENT_TIMESTAMP
12 | end_at:
13 | type: datetime
14 | default: CURRENT_TIMESTAMP
15 | related_model:
16 | blank: true
17 | limit: 100
18 | related_id:
19 | type: integer
20 | blank: true
21 | $meta:
22 | indexes:
23 | related_model:
24 | related_id:
25 | start_at:
26 | end_at:
27 | foreign:
28 | company:
29 | restrict:
30 | delete: CASCADE
31 | user_info:
32 | restrict:
33 | delete: CASCADE
34 | enable_trash: true
--------------------------------------------------------------------------------
/server/Application/Finance/Service/FinanceAccountService.class.php:
--------------------------------------------------------------------------------
1 | where(['id'=>$account_id])->$method('balance', $amount);
27 |
28 | return $result === false ? false : true;
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/server/Application/Crm/Service/CustomerHeadLogService.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/14/15
6 | * Time: 23:36
7 | */
8 |
9 | namespace Crm\Service;
10 |
11 |
12 | use Common\Model\CommonModel;
13 |
14 | class CustomerHeadLogService extends CommonModel{
15 |
16 | // 领取线索
17 | const TYPE_COLLECT = 1;
18 |
19 | // 释放线索
20 | const TYPE_RELEASE = 2;
21 |
22 | // 分配线索
23 | const TYPE_DISPATCH = 3;
24 |
25 | // 转化为客户
26 | const TYPE_TRANSFORM = 4;
27 |
28 | const TYPE_COLLECT_CUSTOMER = 5;
29 |
30 | const TYPE_RELEASE_CUSTOMER = 6;
31 |
32 | CONST TYPE_DISPATCH_CUSTOMER = 3;
33 |
34 | protected $_auto = array(
35 | array("user_info_id", "get_current_user_id", 1, "function"),
36 | array("company_id", "get_current_company_id", 1, "function")
37 | );
38 |
39 |
40 |
41 | }
--------------------------------------------------------------------------------
/ones/apps/crm/views/crmClue_detail_view/head_log.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
![{{item.realname}}]()
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/server/Application/Marketing/Locale/zh-cn.yml:
--------------------------------------------------------------------------------
1 | APP_NAME: 营销管理
2 | Marketing: 营销管理
3 | Sale Opportunities: 销售机会
4 | Sale Opportunities Product: 销售机会关联产品
5 | Sale: 销售
6 | Contract: 合同
7 |
8 | METHODS:
9 | saleOpportunities:
10 | push: 推进
11 |
12 | HELP_TEXTS:
13 | grid:
14 | saleOpportunities: 我负责的 我创建的
15 |
16 | Sale Opportunities Status: 销售机会状态
17 | Next Contact Time: 下次联系时间
18 | Next Contact Content: 下次联系内容
19 |
20 | Opportunities Push: 推进
21 | Push Remark: 推进备注
22 | Push Opportunities To %s Stage: 推进销售机会至 %s 阶段
23 |
24 | The Sale Stage: 销售阶段
25 |
26 | Opportunities Subject: 机会主题
27 |
28 | Date Range: 时间序列
29 |
30 | Contract Number: 合同编号
31 | Sign Time: 签订日期
32 | Terms: 条款
33 |
34 | Belongs To Customer: 所属客户
35 | Current Contact Time: 本次联系时间
36 |
37 | Quote Price: 报价
38 | Quote Amount: 合计价格
39 |
40 | Sale Funnel: 销售漏斗
--------------------------------------------------------------------------------
/server/Application/ProductAttribute/Model/ProductAttributeMapModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 7/29/15
6 | * Time: 08:48
7 | */
8 |
9 | namespace Productattribute\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class ProductAttributeMapModel extends CommonViewModel {
15 |
16 | protected $viewFields = [
17 | 'ProductAttributeMap' => ['*', '_type'=>'left'],
18 | 'ProductAttribute' => [
19 | 'alias' => 'attribute_field',
20 | '_on' => 'ProductAttributeMap.product_attribute_id=ProductAttribute.id',
21 | '_type' => 'left'
22 | ],
23 | 'ProductAttributeContent' => [
24 | 'content',
25 | '_on' => 'ProductAttributeMap.product_attribute_content_id=ProductAttributeContent.id',
26 | '_type' => 'left'
27 | ]
28 | ];
29 |
30 | }
--------------------------------------------------------------------------------
/server/Application/Finance/Model/FinanceStreamlineModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left'],
16 | "FinanceAccount" => [
17 | 'name' => 'finance_account_id__label__',
18 | 'name',
19 | '_on' => 'FinanceStreamline.finance_account_id=FinanceAccount.id',
20 | '_type' => 'left'
21 | ],
22 | "CommonType" => [
23 | 'name' => 'payment_method__label__',
24 | '_on' => 'FinanceStreamline.payment_method=CommonType.id',
25 | '_type' => 'left'
26 | ]
27 | ];
28 |
29 | }
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ones",
3 | "version": "1.0.0",
4 | "dependencies": {
5 | "angular": "^1.5.5",
6 | "font-awesome": "~4.3.0",
7 | "todc-bootstrap": "~3.3.6",
8 | "angular-strap": "~2.3.8",
9 | "angular-motion": "~0.4.4",
10 | "chosen": "~1.5.1",
11 | "angular-chosen-localytics": "~1.4.0",
12 | "angular-bootstrap-calendar": "~0.20.0",
13 | "angular-markdown-directive": "~0.3.1",
14 | "angular-socket-io": "~0.7.0",
15 | "socket.io-client": "~1.3.5",
16 | "angular-base64-upload": "~0.1.11",
17 | "jsbarcode": "~3.3.3",
18 | "bootstrap-additions": "~0.3.1",
19 | "zeroclipboard": "~2.2.0",
20 | "ng-clip": "~0.2.6",
21 | "angular-cookies": "^1.5.5",
22 | "angular-resource": "^1.5.5",
23 | "angular-animate": "^1.5.5",
24 | "angular-route": "^1.5.5",
25 | "angular-touch": "^1.5.5"
26 | },
27 | "appPath": "ones",
28 | "moduleName": "ones"
29 | }
30 |
--------------------------------------------------------------------------------
/server/Application/Product/config.yml:
--------------------------------------------------------------------------------
1 | alias: product
2 | author: TEam Swift
3 | document: http://ones_manual.mydoc.io/?t=35704
4 | requirements:
5 | - productAttribute
6 | auth_nodes:
7 | - product.product.*
8 | - product.productCategory.*
9 | include:
10 | js:
11 | - apps/product/model
12 | - apps/product/main
13 | global_include:
14 | js:
15 | - apps/product/plugin
16 | navs:
17 | Base Data Set:
18 | children:
19 | Products Manage:
20 | app: product
21 | icon: navicon
22 | children:
23 | Products:
24 | app: product
25 | icon: navicon
26 | link: product/product
27 | Product Category:
28 | app: product
29 | link: product/productCategory
30 | icon: sitemap
--------------------------------------------------------------------------------
/server/Application/Sale/Model/OrdersDetailModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left'],
16 | 'Product' => [
17 | 'name'=>'product_id__label__',
18 | 'measure_unit',
19 | 'serial_number',
20 | 'measure_unit' => 'quantity__after__',
21 | 'Product.measure_unit' => 'already_in__after__',
22 | '_on' => 'Product.id=OrdersDetail.product_id',
23 | '_type' => 'left'
24 | ],
25 | "Orders" => [
26 | "_on" => "Orders.id=OrdersDetail.id",
27 | "_type" => "left"
28 | ]
29 | ];
30 |
31 | }
--------------------------------------------------------------------------------
/server/Application/ProductAttribute/config.yml:
--------------------------------------------------------------------------------
1 | alias: productAttribute
2 | author: TEam Swift
3 | document: http://ones_manual.mydoc.io/?t=35705
4 | link: http://ng-erp.com
5 | requirements:
6 | - product
7 |
8 | auth_nodes:
9 | - productAttribute.productAttribute.*
10 | - productAttribute.productAttributeContent.*
11 |
12 | include:
13 | js:
14 | - apps/productAttribute/main
15 |
16 | global_include:
17 | js:
18 | - apps/productAttribute/model
19 |
20 | navs:
21 | Base Data Set:
22 | children:
23 | Products Manage:
24 | children:
25 | Product Attribute Manage:
26 | app: productAttribute
27 | link: productAttribute/productAttribute
28 | Product Attribute Content Manage:
29 | app: productAttribute
30 | link: productAttribute/productAttributeContent
--------------------------------------------------------------------------------
/server/Application/Crm/Controller/CustomerCareController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/16/15
6 | * Time: 11:19
7 | */
8 |
9 | namespace Crm\Controller;
10 |
11 |
12 | use Common\Controller\BaseRestController;
13 |
14 | class CustomerCareController extends BaseRestController {
15 |
16 | protected function _before_insert() {
17 | // 提交的customer_id为往来单位ID
18 | $_POST['customer_id'] = D('Crm/Customer')->where(array(
19 | 'contacts_company_id' => $_POST['customer_id']
20 | ))->getField('id');
21 | }
22 |
23 | protected function _filter(&$map) {
24 | if(I('get._mf') == 'Customer.id') {
25 | $map['CustomerCare.customer_id'] = D('Crm/Customer')->where(array(
26 | 'contacts_company_id' => I('get._mv')
27 | ))->getField('id');
28 |
29 | unset($map['Customer.id']);
30 | }
31 |
32 | }
33 |
34 | }
--------------------------------------------------------------------------------
/server/Application/Printer/Event/PrintTemplateEvent.class.php:
--------------------------------------------------------------------------------
1 | $v) {
21 | $list[$k]['config'] = PrintTemplateService::parse_config($v['config']);
22 | $list[$k]['content'] = PrintTemplateService::parse_content($v['content']);
23 | }
24 |
25 | return $list;
26 | }
27 |
28 | public function _before_item_response_($data) {
29 | $data['content'] = base64_decode($data['content']);
30 | return $data;
31 | }
32 |
33 |
34 | }
--------------------------------------------------------------------------------
/ones/apps/bpm/static/style.scss:
--------------------------------------------------------------------------------
1 | .bpm-builder-container {
2 | position:relative;
3 | }
4 | #bpm-show-container {
5 | background:
6 | -webkit-linear-gradient(top, transparent 19px, #ddd 20px),
7 | -webkit-linear-gradient(left, transparent 19px, #ddd 20px)
8 | ;
9 | background-color: #f2f2f2;
10 | background-size: 20px 20px;
11 | height:600px;
12 | width:100%;
13 | position:relative;
14 | border: 1px solid #ddd;
15 | }
16 |
17 | .reload-icon {
18 | display: none;
19 | position: absolute; left:15px; top:0;
20 | z-index:9;
21 | background: red;
22 | padding: 3px 8px;color:#fff;
23 | }
24 | .reloading {
25 | position: relative;
26 | }
27 | .reloading .reload-icon {
28 | display: block;
29 | }
30 |
31 | .bpm-builder-footer {
32 | margin-top: 20px;
33 | }
34 |
35 | .bpm-editor-container {
36 | position:absolute;
37 | right:0;top:0;
38 | width: 60%;
39 |
40 | .bpm-edit-area {
41 | height:600px;
42 | }
43 | }
--------------------------------------------------------------------------------
/server/Application/Bpm/config.yml:
--------------------------------------------------------------------------------
1 | alias: bpm
2 | author: TEam Swift
3 | link: http://ng-erp.com
4 | document: http://ones_manual.mydoc.io/?t=35698
5 | requirements:
6 | - product
7 |
8 | auth_nodes:
9 | - bpm.workflow.*
10 | - bpm.workflowBuilder.put
11 | auth_dont_need:
12 | - bpm.builder.get
13 | - bpm.workflowProgress.read
14 |
15 | load_all_i18n: true
16 | include:
17 | js:
18 | - apps/bpm/main
19 | - apps/bpm/model
20 | - apps/bpm/static/raphael-min
21 | - apps/bpm/static/flowchart
22 | css:
23 | - apps/bpm/static/style
24 | global_include:
25 | js:
26 | - apps/bpm/model
27 |
28 | navs:
29 | System Preference:
30 | children:
31 | BPM:
32 | app: bpm
33 | icon: retweet
34 | children:
35 | Workflow:
36 | app: bpm
37 | icon: circle-o-notch
38 | link: bpm/workflow
--------------------------------------------------------------------------------
/ones/apps/saleAnalytics/model.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones, io){
2 | /*
3 | * @app saleAnalytics
4 | * @author laofahai@TEam Swift
5 | * @link http://ng-erp.com
6 | * */
7 | 'use strict';
8 | ones.global_module
9 | .service('SaleAnalytics.SaleVolumeAPI', [
10 | 'ones.dataApiFactory',
11 | function(dataAPI) {
12 | this.resource = dataAPI.getResourceInstance({
13 | uri: 'saleAnalytics/saleVolume'
14 | });
15 |
16 | this.config = {};
17 | }
18 | ])
19 | .service('SaleAnalytics.SaleBoardAPI', [
20 | 'ones.dataApiFactory',
21 | function(dataAPI) {
22 | this.resource = dataAPI.getResourceInstance({
23 | uri: 'saleAnalytics/saleBoard'
24 | });
25 |
26 | this.config = {};
27 | }
28 | ])
29 | ;
30 |
31 | })(window, window.angular, window.ones, window.io);
--------------------------------------------------------------------------------
/server/Application/Printer/Service/Parser/AbstractLayout.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 10/8/15
6 | * Time: 22:54
7 | */
8 |
9 | namespace Printer\Service\Parser;
10 |
11 |
12 | abstract class AbstractLayout {
13 |
14 | protected $template;
15 |
16 | public function set_config($k, $v) {
17 | $this->$k = $v;
18 | }
19 |
20 | /*
21 | * 具体编译方法
22 | * @param string $template
23 | * @param array $variables 具体需替换的数据, k=>v数组
24 | * */
25 | final protected function compile($variables, $template=null) {
26 | $search = [];
27 | $replace= [];
28 | foreach($variables as $k=>$v) {
29 | if(!$k) {
30 | continue;
31 | }
32 | array_push($search, "%({$k})s");
33 | array_push($replace, $v ? $v : "");
34 | }
35 |
36 |
37 | return str_replace($search, $replace, $template ? $template : $this->template);
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/server/Application/Common/Model/CommonRelationModel.class.php:
--------------------------------------------------------------------------------
1 | $name;
13 | }
14 |
15 | /*
16 | * @override
17 | *
18 | * 默认增加company_id字段
19 | * */
20 | public function where($map, $parse=null) {
21 | if(!$this->not_belongs_to_company) {
22 |
23 | $this->real_model_name = $this->real_model_name ? $this->real_model_name : $this->getModelName();
24 |
25 | $map[$this->real_model_name.".company_id"] = get_current_company_id();
26 | }
27 |
28 | return parent::where($map, $parse);
29 | }
30 |
31 | public function set($k, $v) {
32 | $this->$k = $v;
33 | }
34 |
35 | public function get($k) {
36 | return $this->$k;
37 | }
38 |
39 | }
--------------------------------------------------------------------------------
/server/Application/Account/Controller/AuthorizeController.class.php:
--------------------------------------------------------------------------------
1 | $node,
24 | 'flag' => $data['flag'][$node] ? $data['flag'][$node] : 1
25 | ));
26 | }
27 |
28 | $auth = D('Account/Authorize', 'Service');
29 | if($auth->authorize($role_id, $nodes)) {
30 | $this->success(__('account.Authorize Success'));
31 | } else {
32 | $this->error(__('account.Authorize Failed').': '.$auth->getError());
33 | }
34 |
35 | }
36 |
37 | }
--------------------------------------------------------------------------------
/ones/apps/currency/model.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones, io){
2 | 'use strict';
3 |
4 | ones.global_module
5 | .service('Currency.CurrencyAPI', [
6 | 'ones.dataApiFactory',
7 | function(dataAPI) {
8 | this.resource = dataAPI.getResourceInstance({
9 | uri: "currency/currency",
10 | extra_methods: ['api_get', 'api_query']
11 | });
12 |
13 | this.config = {
14 | app: "currency",
15 | module: "currency",
16 | table: "currency",
17 | value_field: "name",
18 | fields: {
19 |
20 | }
21 | };
22 |
23 | this.unicode = function(item) {
24 | return sprintf('%s %s %s', _('currency.CURRENCIES.' + item.name), item.name, item.symbol);
25 | }
26 | }
27 | ])
28 |
29 | ;
30 |
31 | })(window, window.angular, window.ones, window.io);
--------------------------------------------------------------------------------
/ones/apps/dashboard/static/style.css.map:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "mappings": "AAAA,IAAK;EACD,OAAO,EAAE,CAAC;;AAEd,YAAa;EACT,MAAM,EAAC,IAAI;;AAEf,4BAA4B;EACxB,YAAY,EAAE,OAAO;;AAEzB,oCAAqC;EACjC,gBAAgB,EAAE,kBAAkB;;AAExC,qBAAsB;EAClB,QAAQ,EAAC,QAAQ;;AAErB,4HAA2H;EACvH,MAAM,EAAC,IAAI;EACX,QAAQ,EAAC,MAAM;;AAEnB,6CAA8C;EAC1C,UAAU,EAAC,IAAI;EACf,UAAU,EAAC,cAAc;EACzB,aAAa,EAAC,CAAC;EACf,WAAW,EAAC,IAAI;EAChB,SAAS,EAAC,IAAI;;AAGlB,yBAA0B;EACtB,QAAQ,EAAC,QAAQ;EAAC,KAAK,EAAC,CAAC;EAAC,GAAG,EAAC,CAAC;EAC/B,OAAO,EAAC,EAAE;;AAEd,qBAAsB;EAClB,QAAQ,EAAC,QAAQ;EAAC,KAAK,EAAC,IAAI;EAAC,GAAG,EAAC,CAAC;EAClC,OAAO,EAAC,EAAE;;AAGd,4BAA6B;EACzB,QAAQ,EAAC,QAAQ;EAAC,GAAG,EAAC,IAAI;EAAC,KAAK,EAAC,IAAI;EACrC,UAAU,EAAC,IAAI;EAAC,aAAa,EAAE,IAAI;EACnC,OAAO,EAAC,KAAK;EAAC,KAAK,EAAC,IAAI;EAAE,MAAM,EAAC,IAAI;EACrC,WAAW,EAAC,IAAI;EAAC,UAAU,EAAC,MAAM;EAClC,OAAO,EAAC,IAAI;;AAGhB,6BAA8B;EAC1B,QAAQ,EAAC,KAAK;EACd,KAAK,EAAC,KAAK;EACX,IAAI,EAAC,GAAG;EACR,WAAW,EAAC,MAAM;EAClB,GAAG,EAAC,KAAK;;AAGb,UAAW;EACP,MAAM,EAAC,KAAK;;AAGhB,qCAAsC;EAClC,OAAO,EAAC,KAAK",
4 | "sources": ["style.scss"],
5 | "names": [],
6 | "file": "style.css"
7 | }
--------------------------------------------------------------------------------
/server/Application/Printer/Service/Parser/Layout/Common.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 10/8/15
6 | * Time: 20:52
7 | */
8 |
9 | namespace Printer\Service\Parser\Layout;
10 |
11 | use Printer\Service\Parser\AbstractLayout;
12 | use Printer\Service\Parser\Formater;
13 | use Printer\Service\Parser\InterfaceLayout;
14 |
15 | class Common extends AbstractLayout implements InterfaceLayout {
16 |
17 | protected $template = '%(content)s
';
18 |
19 | public function compile_to_html($template_config, $data) {
20 |
21 | $content = $template_config['content'];
22 |
23 | if(is_string($template_config['content'])) {
24 | $content = Formater::spf($template_config['content'], $data);
25 | }
26 |
27 | return $this->compile([
28 | 'style' => $template_config['style'],
29 | 'class' => $template_config['class'],
30 | 'content' => $content
31 | ]);
32 |
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/server/Application/ProductAttribute/Model/ProductAttributeContentModel.class.php:
--------------------------------------------------------------------------------
1 | array('*', '_type'=>'left'),
16 | "Product" => [
17 | "name" => "product_name",
18 | "serial_number",
19 | "_on" => "Product.id=ProductAttributeContent.product_id",
20 | "_type" => "left"
21 | ],
22 | "ProductAttribute" => [
23 | "name" => "product_attribute_name",
24 | "alias",
25 | "_on" => "ProductAttribute.id=ProductAttributeContent.product_attribute_id",
26 | "_type" => "left"
27 | ]
28 | );
29 |
30 | public $fuzzy_search = ['content'];
31 |
32 | }
--------------------------------------------------------------------------------
/server/Application/Finance/Locale/zh-cn.yml:
--------------------------------------------------------------------------------
1 | APP_NAME: 财务管理
2 |
3 | Receivables: 应收款
4 | Payables: 应付款
5 |
6 | Received Amount: 已收金额
7 | Paid Amount: 已付金额
8 | Unreceived Amount: 未收金额
9 | Unpaid Amount: 未付金额
10 | Total Amount: 合计金额
11 | Total Need Receive: 合计应收
12 | Total Need Payment: 合计应付
13 | This Time Received: 本次收款
14 | This Time Paid: 本次付款
15 |
16 | Streamline: 流水
17 |
18 | Finance: 财务
19 | Amount: 金额
20 |
21 | Balance Direction: 余额方向
22 |
23 | Finance Account: 账户
24 | Accounts: 账户
25 | Finance Streamline: 财务流水
26 |
27 | Receivables Type: 应收款类型
28 | Payables Type: 应付款类型
29 |
30 | New Receivables: 新应收款
31 | Portion Received: 已部分收款
32 | All Received: 已收款
33 |
34 | New Payables: 新应付款
35 | Portion Received: 已部分付款
36 | All Received: 已付款
37 |
38 | Need Receive Amount: 应收金额
39 | Need Pay Amount: 应付金额
40 |
41 | Balance: 余额
42 | Currency: 币种
43 |
44 | RECEIVABLES_STATUS_NEW: 新应收款
45 | RECEIVABLES_STATUS_PART: 已部分收款
46 | RECEIVABLES_STATUS_COMPLETE: 已收款
47 |
48 | Operation Record: 操作记录
49 |
50 | Confirm Receivable: 确认收款
51 |
52 | Please input the amount: 请输入金额
53 |
54 | Payment Method: 支付方式
--------------------------------------------------------------------------------
/server/Application/Calendar/Controller/EventsController.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/9/15
6 | * Time: 15:36
7 | */
8 |
9 | namespace Calendar\Controller;
10 |
11 |
12 | use Common\Controller\BaseRestController;
13 |
14 | class EventsController extends BaseRestController {
15 |
16 | protected function _filter(&$map) {
17 | if(!I('get._ia')) {
18 | $map['user_info_id'] = get_current_user_id();
19 | }
20 | }
21 |
22 | protected function _order(&$order) {
23 | $order = "start_at ASC";
24 | }
25 |
26 | protected function _before_insert() {
27 | $_POST['start_at'] = format_form_js_date($_POST['start_at']);
28 | $_POST['end_at'] = format_form_js_date($_POST['end_at']);
29 | $_POST['user_info_id'] = get_current_user_id();
30 |
31 | }
32 | protected function _before_update() {
33 | $_POST['start_at'] = format_form_js_date($_POST['start_at']);
34 | $_POST['end_at'] = format_form_js_date($_POST['end_at']);
35 | }
36 |
37 | }
--------------------------------------------------------------------------------
/server/Application/Common/Model/CommonViewModel.class.php:
--------------------------------------------------------------------------------
1 | $name;
15 | }
16 |
17 | /*
18 | * @override
19 | *
20 | * 默认增加company_id字段
21 | * */
22 | public function where($map, $parse=null) {
23 | if(!$this->not_belongs_to_company && !$this->ignore_auto_company_query_condition) {
24 | $this->real_model_name = $this->real_model_name ? $this->real_model_name : $this->getModelName();
25 | $map[$this->real_model_name.".company_id"] = get_current_company_id();
26 | }
27 |
28 | return parent::where($map, $parse);
29 | }
30 |
31 | public function set($k, $v) {
32 | $this->$k = $v;
33 | }
34 |
35 | public function get($k) {
36 | return $this->$k;
37 | }
38 |
39 | }
--------------------------------------------------------------------------------
/server/Application/Uploader/Behaviors/ProcessAttachDeletedBehavior.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 6/25/15
6 | * Time: 11:09
7 | */
8 |
9 | namespace Uploader\Behaviors;
10 |
11 |
12 | use Think\Behavior;
13 |
14 | class ProcessAttachDeletedBehavior extends Behavior {
15 |
16 | /*
17 | * 数据被删除时同步删除相关附件
18 | * @param = array(
19 | * deleted,
20 | * app,
21 | * module
22 | * )
23 | * */
24 | public function run(&$param) {
25 |
26 | $ids = is_array($param['deleted']) ? $param['deleted'] : explode(',', $param['deleted']);
27 | $map = array(
28 | 'source_model' => sprintf('%s.%s', lcfirst(MODULE_NAME), lcfirst(CONTROLLER_NAME)),
29 | 'source_id' => array('IN', $ids)
30 | );
31 |
32 | $data = D('Uploader/Attachment', 'Model')->where($map)->select();
33 |
34 | $attach_ids = get_array_to_kv($data, 'id', 'id');
35 | $service = D('Uploader/Attachment', 'Service');
36 | $service->do_delete($attach_ids);
37 |
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/ones/apps/product/plugin.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones) {
2 |
3 | // 注册到可支持自定义字段
4 | ones.pluginRegister('data_model_supported', function(injector, defered) {
5 | ones.pluginScope.append('data_model_supported', {
6 | label: _('product.Product') + ' ' + _('common.Module'),
7 | value: 'product.product'
8 | });
9 | });
10 |
11 | /*
12 | * 返回产品计量单位
13 | * */
14 | window.to_product_measure_unit = function(product_api, $q, item) {
15 | if(!item || (!item.product_id && !item.measure_unit)) {
16 | return;
17 | }
18 | if(item.measure_unit) {
19 | return item.measure_unit;
20 | } else {
21 | var defer = $q.defer();
22 | product_api.resource.api_get({id: item.product_id, _fd: 'measure_unit'}).$promise.then(function(product_item){
23 | item.measure_unit = product_item.measure_unit;
24 | defer.resolve(product_item.measure_unit);
25 | });
26 | return defer.promise;
27 | }
28 | }
29 |
30 | })(window,window.angular,window.ones);
--------------------------------------------------------------------------------
/server/Application/Home/Locale/zh-cn.yml:
--------------------------------------------------------------------------------
1 | APP_NAME: ONES基础应用
2 |
3 | METHODS:
4 | app:
5 | put: 启用/禁用
6 |
7 | HELP_TEXTS:
8 | grid:
9 | commonType: 通用类型按照排序倒序、添加时间正序排序
10 |
11 | APPS_TYPES:
12 | Contacts Company Related: 往来单位相关
13 | Marketing Related: 营销相关
14 | Storage Related: 仓储相关
15 | Product Related: 产品相关
16 | Finance Related: 财会相关
17 | Purchase Related: 采购相关
18 | Office Related: 办公相关
19 | Analytics Related: 统计分析相关
20 | Other: 其他
21 |
22 | Config: 配置
23 | App: 应用
24 | App Manage: 应用管理
25 | Clear Cache: 清除缓存
26 | Common Type: 通用类型
27 | Company Manage: 公司管理
28 | Company Profile: 公司资料
29 | System Preference: 首选项
30 | System Operation: 系统操作
31 | Display date hommization: 人性化显示时间
32 |
33 | Enable: 启用
34 | Disable: 禁用
35 |
36 | Price Decimal Scale: 价格保留小数位
37 | Num Decimal Scale: 数量保留小数位
38 |
39 | Edit %s Preference: 修改 %s 首选项
40 |
41 | Free to use: 免费使用
42 | Balance not full: 余额不足,请前往充值
43 |
44 | Clear front-end cache: 清除前端缓存(需重新登录)
45 | Clear back-end cache: 清除后端缓存
46 | Cache has been cleared, please re-login: 缓存已经被清除, 请重新登录
--------------------------------------------------------------------------------
/server/Application/Account/Behaviors/UserCommonNavBehavior.class.php:
--------------------------------------------------------------------------------
1 | get_preference("common_nav");
16 | $common_nav = $common_nav['data'];
17 | if(!$common_nav) {
18 | return ;
19 | }
20 |
21 | // array_unshift($common_nav, array(
22 | // "alias" => "Dashboard",
23 | // "app" => "dashboard",
24 | // "icon" => "dashboard",
25 | // "link" => "dashboard"
26 | // ));
27 |
28 | $navs = array(
29 | array(
30 | "alias" => "Common Operation",
31 | "icon" => "bookmark",
32 | "children" => $common_nav
33 | )
34 | );
35 |
36 | $params = array_merge($navs, $source);
37 | }
38 |
39 | }
--------------------------------------------------------------------------------
/server/Application/Purchase/config.yml:
--------------------------------------------------------------------------------
1 | alias: purchase
2 | author: TEam Swift
3 | link: http://ng-erp.com
4 | document: http://ones_manual.mydoc.io/?t=35701
5 | requirements:
6 | - product
7 | - store
8 | - supplier
9 | - bpm
10 |
11 | auth_nodes:
12 | - purchase.purchase.*
13 |
14 | load_modules:
15 | - ones.gridViewModule
16 | - ones.app.product.model
17 |
18 | include:
19 | js:
20 | - apps/purchase/main
21 | - apps/purchase/model
22 | - apps/product/model
23 | - apps/supplier/model
24 | global_include:
25 | js:
26 | - apps/purchase/plugin
27 |
28 | navs:
29 | Purchase:
30 | app: purchase
31 | icon: shopping-cart
32 | children:
33 | Purchase:
34 | app: purchase
35 | icon: shopping-cart
36 | children:
37 | Add New Purchase:
38 | app: purchase
39 | link: purchase/purchase/add/bill
40 | Purchase Bills:
41 | app: purchase
42 | link: purchase/purchase
43 |
--------------------------------------------------------------------------------
/ones/apps/bpm/views/builder.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | drawing ...
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/server/Application/Purchase/Model/PurchaseModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left'],
16 | "Supplier" => [
17 | 'contacts_company_id',
18 | '_on' => 'Purchase.supplier_id=Supplier.id',
19 | '_type' => 'left'
20 | ],
21 | "ContactsCompany" => [
22 | 'name' => 'supplier_id__label__',
23 | '_on' => 'Supplier.contacts_company_id=ContactsCompany.id',
24 | '_type' => 'left'
25 | ],
26 | "Workflow" => [
27 | 'name' => 'workflow_id__label__',
28 | '_on' => 'Purchase.workflow_id=Workflow.id',
29 | '_type' => 'left'
30 | ]
31 | ];
32 |
33 | public $fuzzy_search = [
34 | 'Purchase.bill_no', 'Purchase.subject',
35 | 'ContactsCompany.name'
36 | ];
37 |
38 |
39 | }
--------------------------------------------------------------------------------
/ones/apps/account/plugin.js:
--------------------------------------------------------------------------------
1 | (function(window, angular, ones) {
2 | 'use strict';
3 |
4 | ones.pluginRegister('user_preference_item', function() {
5 | ones.pluginScope.append('user_preference_item', {
6 | alias: 'show_username_with_department',
7 | label: _('account.Show username with department'),
8 | widget: 'select',
9 | data_source: [
10 | {value: 1, label: _('common.Yes')},
11 | {value: 0, label: _('common.No')}
12 | ],
13 | value: 1
14 | });
15 | ones.pluginScope.append('user_preference_item', {
16 | alias: 'show_username_with_department_opts',
17 | widget: 'hidden',
18 | value: 'home,integer'
19 | });
20 | });
21 |
22 | // 注册到可支持自定义字段
23 | ones.pluginRegister('data_model_supported', function(injector, defered) {
24 | ones.pluginScope.append('data_model_supported', {
25 | label: _('account.Company Profile') + ' ' + _('common.Module'),
26 | value: 'account.companyProfile'
27 | });
28 | });
29 |
30 | })(window, window.angular, window.ones);
--------------------------------------------------------------------------------
/server/Application/Account/Controller/LoginController.class.php:
--------------------------------------------------------------------------------
1 | authenticate(
13 | I("post.company_sign_id"),
14 | I("post.username"),
15 | I("post.password")
16 | );
17 | if(true === $result) {
18 | return $this->response(array(
19 | 'token'=> session_id()
20 | ));
21 | }
22 |
23 | switch($result) {
24 | case -1:
25 | $error = __("account.Company Not Exists");
26 | break;
27 | case -2:
28 | $error = __("account.User Not Exists");
29 | break;
30 | case -3:
31 | $error = __("account.Password doesn't match");
32 | break;
33 | }
34 |
35 | $this->error($error);
36 | }
37 |
38 | }
--------------------------------------------------------------------------------
/ones/apps/storage/views/stock_in_edit.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ones/apps/storage/views/stock_out_edit.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/server/Application/Bpm/Locale/zh-cn.yml:
--------------------------------------------------------------------------------
1 | APP_NAME: BPM
2 | APP_DESCRIPTION: 业务过程管理,提供工作流等服务接口,并提供可视化工作流设计器
3 |
4 | Data Creator: 数据创建者
5 |
6 | Workflow Builder: 工作流设计器
7 |
8 | Executor: 新增执行者
9 | Add To Executor: 新增至执行者
10 | User Role: 用户角色
11 | Department: 部门
12 | User: 用户
13 |
14 | Data owner: 数据拥有者
15 |
16 | Workflow: 工作流
17 | Workflow Progress: 工作流进程
18 | Workflow Design: 工作流设计
19 |
20 | Execute a service API: 执行一个应用服务接口
21 | Edit main row data: 修改当前流程数据
22 | Only 1 start node can be exists: 只可以存在一个开始节点
23 |
24 | Node Setting: 节点设置
25 | Node Name: 节点名称
26 | Node Status Label: 节点状态标签
27 | Action Type: 动作类型
28 | Notify Type: 提醒类型
29 | Do Nothing: 什么都不做
30 | Notify Content: 提醒内容
31 | Service API: 服务API
32 | Edit Field: 修改字段
33 |
34 | Workflow is in progress, please do not re-submit: 工作流已在执行,请勿重复提交
35 | Not a verified workflow node: 不是合法的工作流节点
36 | Can not found start node of workflow: 找不到工作流的起始节点
37 | Workflow node not found: 未找到工作流节点
38 | Only 1 start node can exists: 仅能存在一个开始节点
39 |
40 | Hide or show editor: 隐藏/显示编辑器
41 | Special Roles: 特殊的角色
42 |
43 | Auto execute: 自动执行
44 | Waiting for outside response: 等待外部响应
45 |
46 |
47 | Service API not found: 服务API不存在
48 |
49 | Start Workflow: 开始工作流
--------------------------------------------------------------------------------
/server/Application/Sale/config.yml:
--------------------------------------------------------------------------------
1 | alias: sale
2 | author: TEam Swift
3 | link: http://ng-erp.com
4 | document: http://ones_manual.mydoc.io/?t=35700
5 | requirements:
6 | - product
7 | - bpm
8 | - crm
9 | - contactsCompany
10 |
11 | load_modules:
12 | - ones.gridViewModule
13 | - ones.app.product.model
14 |
15 | auth_nodes:
16 | - sale.orders.get|flag
17 | - sale.orders.post
18 | - sale.orders.put|flag
19 | - sale.orders.delete|flag
20 |
21 | include:
22 | js:
23 | - apps/sale/main
24 | - apps/sale/model
25 | - apps/sale/orders
26 | - apps/product/model
27 | - apps/storage/model
28 | - apps/contactsCompany/model
29 | - apps/crm/model
30 |
31 | global_include:
32 | js:
33 | - apps/sale/plugin
34 |
35 | navs:
36 | Marketing:
37 | children:
38 | Sale:
39 | app: marketing
40 | children:
41 | Add New Orders:
42 | app: sale
43 | link: sale/orders/add/bill
44 | Orders:
45 | app: sale
46 | link: sale/orders
--------------------------------------------------------------------------------
/server/Application/Storage/Model/StockInDetailModel.class.php:
--------------------------------------------------------------------------------
1 |
5 | * Date: 7/17/15
6 | * Time: 21:57
7 | */
8 |
9 | namespace Storage\Model;
10 |
11 |
12 | use Common\Model\CommonViewModel;
13 |
14 | class StockInDetailModel extends CommonViewModel {
15 |
16 | protected $viewFields = [
17 | 'StockInDetail' => ['*', '_type'=>'left'],
18 | 'StockIn' => [
19 | 'bill_no',
20 | 'subject',
21 | '_on'=>'StockInDetail.stock_in_id=StockIn.id',
22 | '_type'=>'left'
23 | ],
24 | 'Product' => [
25 | 'name'=>'product_id__label__',
26 | 'measure_unit',
27 | 'serial_number',
28 | 'measure_unit' => 'quantity__after__',
29 | 'Product.measure_unit' => 'already_in__after__',
30 | '_on' => 'Product.id=StockInDetail.product_id',
31 | '_type' => 'left'
32 | ],
33 | 'Storage' => [
34 | 'name' => 'storage_id__label__',
35 | '_on' => 'Storage.id=StockInDetail.storage_id',
36 | '_type' => 'left'
37 | ]
38 | ];
39 |
40 | }
--------------------------------------------------------------------------------
/server/Application/SaleAnalytics/config.yml:
--------------------------------------------------------------------------------
1 | alias: saleAnalytics
2 | author: TEam Swift
3 | link: http://ng-erp.com
4 | document: http://ones_manual.mydoc.io/?t=35707
5 | requirements:
6 | - crm
7 | - sale
8 | - marketing
9 | - analytics
10 |
11 | auth_nodes:
12 | # 销售额统计
13 | - saleAnalytics.saleVolume.get
14 | # 销售排行
15 | - saleAnalytics.saleBoard.get
16 |
17 | global_include:
18 | js:
19 | - apps/saleAnalytics/main
20 | - apps/saleAnalytics/model
21 | - apps/saleAnalytics/plugin
22 |
23 | include:
24 | js:
25 | - apps/analytics/service
26 | css:
27 | - apps/analytics/statics/style
28 |
29 | navs:
30 | Marketing:
31 | children:
32 | Sale Analytics:
33 | app: saleAnalytics
34 | children:
35 | Sale Analytics:
36 | app: saleAnalytics
37 | icon: bar-chart
38 | link: saleAnalytics/saleVolume
39 | Sale Top Board:
40 | app: saleAnalytics
41 | icon: line-chart
42 | link: saleAnalytics/saleBoard
43 |
--------------------------------------------------------------------------------
/server/Application/Finance/Model/PayablesModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left'],
16 | "CommonType" => [
17 | "name" => "common_type_id_label",
18 | "_on" => "Payables.common_type_id=CommonType.id",
19 | "_type" => "left"
20 | ],
21 | "Workflow" => [
22 | "name" => "workflow_id_label",
23 | "_on" => "Payables.workflow_id=Workflow.id",
24 | "_type" => "left"
25 | ],
26 | "Supplier" => [
27 | 'contacts_company_id',
28 | '_on' => 'Payables.supplier_id=Supplier.id',
29 | '_type' => 'left'
30 | ],
31 | "ContactsCompany" => [
32 | 'name' => 'supplier_id__label__',
33 | '_on' => 'Supplier.contacts_company_id=ContactsCompany.id',
34 | '_type' => 'left'
35 | ]
36 | ];
37 |
38 | }
--------------------------------------------------------------------------------
/server/Application/Sale/Model/OrdersModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left'],
16 | "Customer" => [
17 | 'contacts_company_id',
18 | '_on' => 'Orders.customer_id=Customer.id',
19 | '_type' => 'left'
20 | ],
21 | "ContactsCompany" => [
22 | 'name' => 'customer_id__label__',
23 | 'address' => 'customer_address',
24 | 'phone' => 'customer_phone',
25 | '_on' => 'Customer.contacts_company_id=ContactsCompany.id',
26 | '_type' => 'left'
27 | ],
28 | "Workflow" => [
29 | 'name' => 'workflow_id__label__',
30 | '_on' => 'Orders.workflow_id=Workflow.id',
31 | '_type' => 'left'
32 | ]
33 | ];
34 |
35 | public $fuzzy_search = [
36 | 'Orders.bill_no', 'Orders.subject',
37 | 'ContactsCompany.name'
38 | ];
39 |
40 | }
--------------------------------------------------------------------------------
/server/Application/Finance/Model/ReceivablesModel.class.php:
--------------------------------------------------------------------------------
1 | ['*', '_type'=>'left'],
16 | "CommonType" => [
17 | "name" => "common_type_id_label",
18 | "_on" => "Receivables.common_type_id=CommonType.id",
19 | "_type" => "left"
20 | ],
21 | "Workflow" => [
22 | "name" => "workflow_id_label",
23 | "_on" => "Receivables.workflow_id=Workflow.id",
24 | "_type" => "left"
25 | ],
26 | "Customer" => [
27 | 'contacts_company_id',
28 | '_on' => 'Receivables.customer_id=Customer.id',
29 | '_type' => 'left'
30 | ],
31 | "ContactsCompany" => [
32 | 'name' => 'customer_id__label__',
33 | '_on' => 'Customer.contacts_company_id=ContactsCompany.id',
34 | '_type' => 'left'
35 | ]
36 | ];
37 |
38 | }
--------------------------------------------------------------------------------