From 921a55df67846789b36f38e5008601453d88a07a Mon Sep 17 00:00:00 2001 From: jianbo <263303411@qq.com> Date: Tue, 13 Aug 2019 09:47:28 +0800 Subject: [PATCH] =?UTF-8?q?python=E5=AD=A6=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 853 +++++++++--------- mina | 2 +- web/controllers/furniture/Furniture.py | 290 ++++++ web/controllers/furniture/__init__.py | 1 + web/static/js/common.js | 4 + web/static/js/furniture/cat.js | 52 ++ web/static/js/furniture/cat_set.js | 62 ++ web/static/js/furniture/index.js | 50 + web/static/js/furniture/set.js | 173 ++++ .../34c121116c4f42e788636160d29b6e22.jpg | Bin 0 -> 58625 bytes web/templates/common/layout_main.html | 4 + web/templates/furniture/cat.html | 75 ++ web/templates/furniture/cat_set.html | 34 + web/templates/furniture/index.html | 100 ++ web/templates/furniture/info.html | 99 ++ web/templates/furniture/set.html | 102 +++ www.py | 2 + 17 files changed, 1490 insertions(+), 413 deletions(-) create mode 100644 web/controllers/furniture/Furniture.py create mode 100644 web/controllers/furniture/__init__.py create mode 100644 web/static/js/furniture/cat.js create mode 100644 web/static/js/furniture/cat_set.js create mode 100644 web/static/js/furniture/index.js create mode 100644 web/static/js/furniture/set.js create mode 100644 web/static/upload/20190812/34c121116c4f42e788636160d29b6e22.jpg create mode 100644 web/templates/furniture/cat.html create mode 100644 web/templates/furniture/cat_set.html create mode 100644 web/templates/furniture/index.html create mode 100644 web/templates/furniture/info.html create mode 100644 web/templates/furniture/set.html diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c150c2f..9c29248 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,13 +2,51 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - @@ -244,73 +267,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -339,7 +295,95 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% for tmp_key in status_mapping %} + + {% endfor %} + + + +
+
+ +
+ + + + + + + + + + + + + + {% if list %} + {% for item in list %} + + + + + + + + {% endfor %} + {% else %} + + {% endif %} + +
序号分类名称状态权重操作
{{ item.id }}{{ item.name }}{{ item.status_desc }}{{ item.weight }} + + {% if item.status == 1 %} + + + + + + + + {% else %} + + + + {% endif %} + +
暂无数据
+ + +{% endblock %} +{% block js %} + +{% endblock %} diff --git a/web/templates/furniture/cat_set.html b/web/templates/furniture/cat_set.html new file mode 100644 index 0000000..a768b47 --- /dev/null +++ b/web/templates/furniture/cat_set.html @@ -0,0 +1,34 @@ +{% extends "common/layout_main.html" %} +{% block content %} +{% include "common/tab_food.html" %} +
+
+

分类设置

+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+
+ + +
+
+
+
+
+{% endblock %} +{% block js %} + +{% endblock %} diff --git a/web/templates/furniture/index.html b/web/templates/furniture/index.html new file mode 100644 index 0000000..2dcc199 --- /dev/null +++ b/web/templates/furniture/index.html @@ -0,0 +1,100 @@ +{% extends "common/layout_main.html" %} +{% block content %} +{% include "common/tab_food.html" %} +
+
+ + + + + + + + + + + + + + {% if list %} + {% for item in list %} + + + + + + + + + {% endfor %} + {% else %} + + {% endif %} + +
家具名分类价格库存标签操作
{{ item.name }}{{ item.name }}{{ item.price }}{{ item.stock }}{{ item.tags }} + + + + {% if item.status == 1 %} + + + + + + + + {% else %} + + + + {% endif %} +
暂无数据~~
+ + {% include 'common/pagenation.html' %} +
+ 家具管理界面 + +
+{% endblock %} +{% block js %} + +{% endblock %} diff --git a/web/templates/furniture/info.html b/web/templates/furniture/info.html new file mode 100644 index 0000000..931248d --- /dev/null +++ b/web/templates/furniture/info.html @@ -0,0 +1,99 @@ +{% extends "common/layout_main.html" %} +{% block content %} +{% include "common/tab_food.html" %} + +
+
+
+
+
+ + 编辑 + +

美食信息

+
+
+
+
+
+

美食名:{{ info.name }}

+

售价:{{ info.price }}

+

库存总量:{{ info.stock }}

+

图书标签:{{ info.tags }}

+

封面图:

+

描述:

+

{{ info.summary | safe }}

+

+
+
+
+
+
+
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + +
会员名称购买数量购买价格订单状态
暂无销售记录
+
+
+ + + + + + + + + + {% if stock_change_list %} + {% for item in stock_change_list %} + + + + + + {% endfor %} + {% else %} + + {% endif %} + +
变更备注时间
{{ item.unit }}{{ item.note }}{{ item.created_time }}
暂无数据~~
+
+
+
+
+
+
+
+
+{% endblock %} diff --git a/web/templates/furniture/set.html b/web/templates/furniture/set.html new file mode 100644 index 0000000..6701af3 --- /dev/null +++ b/web/templates/furniture/set.html @@ -0,0 +1,102 @@ +{% extends "common/layout_main.html" %} +{% block content %} +{% include "common/tab_food.html" %} +
+
+

设置

+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+ + +
+ {% if info and info.main_image %} + + + + + {% endif %} +
+
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+
+ + +
+
+
+
+
+ +{% endblock %} +{% block css %} + + +{% endblock %} +{% block js %} + + + + + + + + + + + + +{% endblock %} \ No newline at end of file diff --git a/www.py b/www.py index 25c0871..386f1b4 100644 --- a/www.py +++ b/www.py @@ -16,6 +16,7 @@ from web.controllers.user.User import route_user from web.controllers.static import route_static from web.controllers.food.Food import route_food +from web.controllers.furniture.Furniture import route_furniture from web.controllers.account.Account import route_account from web.controllers.member.Member import route_member from web.controllers.finance.Finance import route_finance @@ -28,6 +29,7 @@ app.register_blueprint( route_user,url_prefix = "/user" ) app.register_blueprint( route_static,url_prefix = "/static" ) app.register_blueprint( route_account,url_prefix = "/account" ) app.register_blueprint( route_food,url_prefix = "/food" ) +app.register_blueprint( route_furniture,url_prefix = "/furniture" ) app.register_blueprint( route_member,url_prefix = "/member" ) app.register_blueprint( route_finance,url_prefix = "/finance" ) app.register_blueprint( route_stat,url_prefix = "/stat" )