├── .idea
├── factory.iml
├── misc.xml
├── modules.xml
└── workspace.xml
├── README.md
├── data.json
├── db.sqlite3
├── facility
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-36.pyc
│ ├── admin.cpython-36.pyc
│ ├── forms.cpython-36.pyc
│ ├── models.cpython-36.pyc
│ ├── urls.cpython-36.pyc
│ └── views.cpython-36.pyc
├── admin.py
├── apps.py
├── forms.py
├── migrations
│ ├── 0001_initial.py
│ ├── 0002_auto_20190528_1723.py
│ ├── 0003_auto_20190528_1730.py
│ ├── 0004_auto_20190528_1742.py
│ ├── 0005_auto_20190601_2146.py
│ ├── 0006_auto_20190602_1042.py
│ ├── 0007_auto_20190602_1049.py
│ ├── 0008_auto_20190602_1056.py
│ ├── 0009_auto_20190602_1136.py
│ ├── 0010_remove_repair_repair_complementary.py
│ ├── 0011_auto_20190602_1443.py
│ ├── 0012_auto_20190602_1444.py
│ ├── 0013_auto_20190605_1700.py
│ ├── 0014_auto_20190605_1701.py
│ ├── 0015_auto_20190605_1702.py
│ ├── __init__.py
│ └── __pycache__
│ │ ├── 0001_initial.cpython-36.pyc
│ │ ├── 0002_auto_20190528_1701.cpython-36.pyc
│ │ ├── 0002_auto_20190528_1723.cpython-36.pyc
│ │ ├── 0003_auto_20190528_1730.cpython-36.pyc
│ │ ├── 0004_auto_20190528_1742.cpython-36.pyc
│ │ ├── 0005_auto_20190601_2146.cpython-36.pyc
│ │ ├── 0006_auto_20190602_1042.cpython-36.pyc
│ │ ├── 0007_auto_20190602_1049.cpython-36.pyc
│ │ ├── 0008_auto_20190602_1056.cpython-36.pyc
│ │ ├── 0009_auto_20190602_1136.cpython-36.pyc
│ │ ├── 0010_remove_repair_repair_complementary.cpython-36.pyc
│ │ ├── 0011_auto_20190602_1443.cpython-36.pyc
│ │ ├── 0012_auto_20190602_1444.cpython-36.pyc
│ │ ├── 0013_auto_20190605_1700.cpython-36.pyc
│ │ ├── 0014_auto_20190605_1701.cpython-36.pyc
│ │ ├── 0015_auto_20190605_1702.cpython-36.pyc
│ │ └── __init__.cpython-36.pyc
├── models.py
├── templates
│ ├── baoxiu.html
│ ├── baoxiu_list.html
│ ├── dai_repair.html
│ ├── facility_append.html
│ ├── facility_document.html
│ ├── facility_modify.html
│ ├── facility_select.html
│ ├── maintain_append.html
│ ├── maintain_document.html
│ ├── maintain_modify.html
│ ├── maintain_select.html
│ └── repaired_list.html
├── tests.py
├── urls.py
└── views.py
├── factory
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-36.pyc
│ ├── settings.cpython-36.pyc
│ ├── urls.cpython-36.pyc
│ ├── views.cpython-36.pyc
│ └── wsgi.cpython-36.pyc
├── settings.py
├── urls.py
├── views.py
└── wsgi.py
├── manage.py
├── notice
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-36.pyc
│ ├── admin.cpython-36.pyc
│ ├── forms.cpython-36.pyc
│ ├── models.cpython-36.pyc
│ ├── urls.cpython-36.pyc
│ └── views.cpython-36.pyc
├── admin.py
├── apps.py
├── forms.py
├── migrations
│ ├── 0001_initial.py
│ ├── 0002_auto_20190530_1354.py
│ ├── 0003_auto_20190602_1142.py
│ ├── 0004_auto_20190602_1144.py
│ ├── 0005_notice_author.py
│ ├── __init__.py
│ └── __pycache__
│ │ ├── 0001_initial.cpython-36.pyc
│ │ ├── 0002_auto_20190530_1354.cpython-36.pyc
│ │ ├── 0003_auto_20190602_1142.cpython-36.pyc
│ │ ├── 0004_auto_20190602_1144.cpython-36.pyc
│ │ ├── 0005_notice_author.cpython-36.pyc
│ │ └── __init__.cpython-36.pyc
├── models.py
├── templates
│ ├── notice.html
│ ├── notice_lists.html
│ ├── notice_modify.html
│ └── notice_publish.html
├── tests.py
├── urls.py
└── views.py
├── orders
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-36.pyc
│ ├── admin.cpython-36.pyc
│ ├── forms.cpython-36.pyc
│ ├── models.cpython-36.pyc
│ ├── urls.cpython-36.pyc
│ └── views.cpython-36.pyc
├── admin.py
├── apps.py
├── forms.py
├── migrations
│ ├── 0001_initial.py
│ ├── 0002_auto_20190528_1319.py
│ ├── 0003_auto_20190528_1335.py
│ ├── 0004_auto_20190528_1336.py
│ ├── 0005_auto_20190528_1338.py
│ ├── 0006_remove_orders_order_id.py
│ ├── 0007_auto_20190602_1142.py
│ ├── 0008_auto_20190605_1601.py
│ ├── 0009_auto_20190605_1616.py
│ ├── 0010_auto_20190605_1617.py
│ ├── 0011_auto_20190605_1621.py
│ ├── __init__.py
│ └── __pycache__
│ │ ├── 0001_initial.cpython-36.pyc
│ │ ├── 0002_auto_20190528_1319.cpython-36.pyc
│ │ ├── 0003_auto_20190528_1323.cpython-36.pyc
│ │ ├── 0003_auto_20190528_1335.cpython-36.pyc
│ │ ├── 0004_auto_20190528_1324.cpython-36.pyc
│ │ ├── 0004_auto_20190528_1336.cpython-36.pyc
│ │ ├── 0005_auto_20190528_1325.cpython-36.pyc
│ │ ├── 0005_auto_20190528_1338.cpython-36.pyc
│ │ ├── 0006_auto_20190528_1328.cpython-36.pyc
│ │ ├── 0006_remove_orders_order_id.cpython-36.pyc
│ │ ├── 0007_auto_20190602_1142.cpython-36.pyc
│ │ ├── 0008_auto_20190605_1601.cpython-36.pyc
│ │ ├── 0009_auto_20190605_1616.cpython-36.pyc
│ │ ├── 0010_auto_20190605_1617.cpython-36.pyc
│ │ ├── 0011_auto_20190605_1621.cpython-36.pyc
│ │ └── __init__.cpython-36.pyc
├── models.py
├── templates
│ ├── order_append.html
│ ├── order_list.html
│ ├── order_modify.html
│ └── order_select.html
├── tests.py
├── urls.py
└── views.py
├── static
├── base.css
├── bootstrap-3.37
│ ├── css
│ │ ├── bootstrap.min.css
│ │ └── bootstrap.min.css.map
│ ├── fonts
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.svg
│ │ ├── glyphicons-halflings-regular.ttf
│ │ ├── glyphicons-halflings-regular.woff
│ │ └── glyphicons-halflings-regular.woff2
│ └── js
│ │ └── bootstrap.min.js
├── home.css
├── images
│ ├── 0.jpg
│ ├── 1.jpg
│ ├── 2.jpg
│ ├── 3.jpg
│ └── 4.jpg
└── jquery-1.12.4.min.js
├── templates
├── base.html
├── form.html
└── home.html
├── user
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-36.pyc
│ ├── admin.cpython-36.pyc
│ ├── forms.cpython-36.pyc
│ ├── models.cpython-36.pyc
│ ├── urls.cpython-36.pyc
│ └── views.cpython-36.pyc
├── admin.py
├── apps.py
├── forms.py
├── migrations
│ ├── 0001_initial.py
│ ├── 0002_attendance_salary.py
│ ├── 0003_auto_20190528_1939.py
│ ├── 0004_auto_20190528_1946.py
│ ├── 0005_auto_20190528_2203.py
│ ├── 0006_auto_20190528_2204.py
│ ├── 0007_auto_20190528_2205.py
│ ├── 0008_auto_20190528_2205.py
│ ├── 0010_auto_20190529_0038.py
│ ├── 0011_position.py
│ ├── 0012_auto_20190602_1142.py
│ ├── 0013_auto_20190602_1150.py
│ ├── 0014_auto_20190602_1153.py
│ ├── 0015_auto_20190602_1155.py
│ ├── 0016_auto_20190602_1156.py
│ ├── 0017_auto_20190605_0057.py
│ ├── 0018_auto_20190606_1436.py
│ ├── 0019_auto_20190606_1535.py
│ ├── 0020_auto_20190606_2318.py
│ ├── 0021_auto_20190606_2344.py
│ ├── 0022_auto_20190609_2340.py
│ ├── 0023_auto_20190609_2343.py
│ ├── 0024_auto_20190609_2343.py
│ ├── __init__.py
│ └── __pycache__
│ │ ├── 0001_initial.cpython-36.pyc
│ │ ├── 0002_attendance_salary.cpython-36.pyc
│ │ ├── 0003_auto_20190528_1939.cpython-36.pyc
│ │ ├── 0004_auto_20190528_1946.cpython-36.pyc
│ │ ├── 0005_auto_20190528_2203.cpython-36.pyc
│ │ ├── 0006_auto_20190528_2204.cpython-36.pyc
│ │ ├── 0007_auto_20190528_2205.cpython-36.pyc
│ │ ├── 0008_auto_20190528_2205.cpython-36.pyc
│ │ ├── 0010_auto_20190529_0038.cpython-36.pyc
│ │ ├── 0011_position.cpython-36.pyc
│ │ ├── 0012_auto_20190602_1142.cpython-36.pyc
│ │ ├── 0013_auto_20190602_1150.cpython-36.pyc
│ │ ├── 0014_auto_20190602_1153.cpython-36.pyc
│ │ ├── 0015_auto_20190602_1155.cpython-36.pyc
│ │ ├── 0016_auto_20190602_1156.cpython-36.pyc
│ │ ├── 0017_auto_20190605_0057.cpython-36.pyc
│ │ ├── 0018_auto_20190606_1436.cpython-36.pyc
│ │ ├── 0019_auto_20190606_1535.cpython-36.pyc
│ │ ├── 0020_auto_20190606_2318.cpython-36.pyc
│ │ ├── 0021_auto_20190606_2344.cpython-36.pyc
│ │ ├── 0022_auto_20190609_2340.cpython-36.pyc
│ │ ├── 0023_auto_20190609_2343.cpython-36.pyc
│ │ ├── 0024_auto_20190609_2343.cpython-36.pyc
│ │ └── __init__.cpython-36.pyc
├── models.py
├── templates
│ ├── Staff.html
│ ├── attendence_form.html
│ ├── attendence_list.html
│ ├── attendence_lists.html
│ ├── attendence_select.html
│ ├── login.html
│ ├── salary_list.html
│ ├── salary_lists.html
│ ├── salary_normal_select.html
│ ├── salary_select.html
│ ├── staff_type.html
│ ├── staff_type_add.html
│ ├── staff_type_modify.html
│ ├── user_append.html
│ ├── user_info.html
│ ├── user_list.html
│ ├── user_modify.html
│ ├── user_normal_select.html
│ └── user_select.html
├── tests.py
├── urls.py
└── views.py
└── warehouse
├── __init__.py
├── __pycache__
├── __init__.cpython-36.pyc
├── admin.cpython-36.pyc
├── forms.cpython-36.pyc
├── models.cpython-36.pyc
├── urls.cpython-36.pyc
└── views.cpython-36.pyc
├── admin.py
├── apps.py
├── forms.py
├── migrations
├── 0001_initial.py
├── 0002_auto_20190528_1508.py
├── 0003_purchaselist.py
├── 0004_auto_20190528_1529.py
├── 0005_remove_producediary_facility_id.py
├── 0006_auto_20190528_1656.py
├── 0007_auto_20190528_1913.py
├── 0008_auto_20190528_1920.py
├── 0009_auto_20190530_1525.py
├── 0010_product.py
├── 0011_auto_20190530_1536.py
├── 0012_auto_20190601_2204.py
├── 0013_purchaselist.py
├── 0014_auto_20190601_2206.py
├── 0015_purchaselist.py
├── 0016_goods.py
├── 0017_auto_20190606_2344.py
├── 0018_auto_20190607_0031.py
├── 0019_auto_20190607_0032.py
├── 0020_warehousesource.py
├── 0021_auto_20190607_2008.py
├── __init__.py
└── __pycache__
│ ├── 0001_initial.cpython-36.pyc
│ ├── 0002_auto_20190528_1508.cpython-36.pyc
│ ├── 0003_purchaselist.cpython-36.pyc
│ ├── 0004_auto_20190528_1529.cpython-36.pyc
│ ├── 0005_remove_producediary_facility_id.cpython-36.pyc
│ ├── 0006_auto_20190528_1656.cpython-36.pyc
│ ├── 0007_auto_20190528_1913.cpython-36.pyc
│ ├── 0008_auto_20190528_1920.cpython-36.pyc
│ ├── 0009_auto_20190530_1525.cpython-36.pyc
│ ├── 0010_product.cpython-36.pyc
│ ├── 0011_auto_20190530_1536.cpython-36.pyc
│ ├── 0012_auto_20190601_2204.cpython-36.pyc
│ ├── 0013_purchaselist.cpython-36.pyc
│ ├── 0014_auto_20190601_2206.cpython-36.pyc
│ ├── 0015_purchaselist.cpython-36.pyc
│ ├── 0016_goods.cpython-36.pyc
│ ├── 0017_auto_20190606_2344.cpython-36.pyc
│ ├── 0018_auto_20190607_0031.cpython-36.pyc
│ ├── 0019_auto_20190607_0032.cpython-36.pyc
│ ├── 0020_warehousesource.cpython-36.pyc
│ ├── 0021_auto_20190607_2008.cpython-36.pyc
│ └── __init__.cpython-36.pyc
├── models.py
├── templates
├── apply.html
├── buy_list.html
├── buyed_list.html
├── price.html
├── product_diary.html
├── product_diary_append.html
├── product_diary_select.html
├── product_list.html
├── product_type_append.html
├── purchaselist_select.html
├── sanction_list.html
├── source_diary.html
├── source_list.html
├── source_type_append.html
├── warehouse_diary.html
├── warehouse_diary_append.html
├── warehouse_select.html
├── warehouse_source_diary_append.html
└── warehouse_source_select.html
├── tests.py
├── urls.py
└── views.py
/.idea/factory.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # factory-manage
2 | 基于Django的工厂管理系统,人员、工资、仓库、设备、通知等要素管理
3 |
4 | 环境配置:
5 | Windows 10 专业版 x64
6 | Django 2.2
7 | Python 3.6
8 | Pytz 2019.1
9 |
10 |
11 | 感谢B站杨仕航大佬,基本是借鉴大佬的视频完成的;https://www.bilibili.com/video/av16957624/
12 |
13 | 本来想着在服务器上让你们看一下效果,但是在做项目的时候密码很简单并且所有账号都是一个密码,所以有人就猜到了管理员密码。还是你们下载下来在本地看吧。
14 | 初始账号:test 密码:asdfzxcv 在所有员工页面可以看到全部账号,并且所有密码都是这个。
15 |
16 | 有人不太清楚怎么打开,就给我贴标签bug、invalid,emmmm~下面是项目的正确打开方式:将文件download下来后,确保自己有python3的环境。解压后在该页面打开命令行,输入python manage.py runserver,回车应该可以看到http://127.0.0.1:8000/ 在本地浏览器打开就可以了。
17 |
18 | 我也知道在github上相似项目很多,但这是我辛苦做出了的期末作业,还是想和大家分享一下~
19 |
20 | 最近我发现运行会有一些问题,staticfiles错误。检查一下Python和Django的版本,现在默认Django是4.x,需要回退为2.2. 将staticfiles改为static,具体错误见issue
21 |
--------------------------------------------------------------------------------
/db.sqlite3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/db.sqlite3
--------------------------------------------------------------------------------
/facility/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/__init__.py
--------------------------------------------------------------------------------
/facility/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/__pycache__/admin.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/__pycache__/admin.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/__pycache__/forms.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/__pycache__/forms.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/__pycache__/models.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/__pycache__/models.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/__pycache__/urls.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/__pycache__/urls.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/__pycache__/views.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/__pycache__/views.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from .models import Facility, Maintain, Repair
3 |
4 | # Register your models here.
5 | @admin.register(Facility)
6 | class FacilityAdmin(admin.ModelAdmin):
7 | list_display = ("id", "facility_name", "version","price", "buyer", "buy_time")
8 |
9 |
10 | @admin.register(Maintain)
11 | class MaintainAdmin(admin.ModelAdmin):
12 | list_display = ("facility_id", "last_time", "staff_name", "complmentary")
13 |
14 |
15 | @admin.register(Repair)
16 | class RepairAdmin(admin.ModelAdmin):
17 | list_display = ("facility_id" , "baoxiu_staff_name","baoxiu_staff_tel", "baoxiu_time", "baoxiu_complementary", "repair_staff_name", "repair_time")
18 |
19 |
--------------------------------------------------------------------------------
/facility/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class FacilityConfig(AppConfig):
5 | name = 'facility'
6 |
--------------------------------------------------------------------------------
/facility/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 08:36
2 |
3 | from django.db import migrations, models
4 | import django.db.models.deletion
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | initial = True
10 |
11 | dependencies = [
12 | ]
13 |
14 | operations = [
15 | migrations.CreateModel(
16 | name='Facility',
17 | fields=[
18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
19 | ('version', models.CharField(max_length=100)),
20 | ('facility_name', models.CharField(max_length=100)),
21 | ('price', models.BigIntegerField()),
22 | ('buyer', models.CharField(max_length=100)),
23 | ('buy_time', models.DateField(auto_now_add=True)),
24 | ],
25 | ),
26 | migrations.CreateModel(
27 | name='Maintain',
28 | fields=[
29 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
30 | ('last_time', models.DateField(auto_now=True)),
31 | ('staff_name', models.CharField(max_length=100)),
32 | ('complmentary', models.TextField()),
33 | ('facility_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='facility.Facility')),
34 | ],
35 | ),
36 | migrations.CreateModel(
37 | name='Repair',
38 | fields=[
39 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
40 | ('baoxiu_staff_name', models.CharField(max_length=100)),
41 | ('baoxiu_staff_id', models.IntegerField()),
42 | ('baoxiu_time', models.DateField(auto_now=True)),
43 | ('baoxiu_complementary', models.CharField(max_length=200)),
44 | ('repair_staff_id', models.IntegerField()),
45 | ('repair_staff_name', models.CharField(max_length=100)),
46 | ('repair_time', models.DateField(auto_now=True)),
47 | ('repair_complementary', models.CharField(max_length=200)),
48 | ('facility_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='facility.Facility')),
49 | ],
50 | ),
51 | ]
52 |
--------------------------------------------------------------------------------
/facility/migrations/0003_auto_20190528_1730.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 09:30
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL),
12 | ('facility', '0002_auto_20190528_1723'),
13 | ]
14 |
15 | operations = [
16 | migrations.CreateModel(
17 | name='Baoxiu',
18 | fields=[
19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
20 | ('baoxiu_time', models.DateField(auto_now=True, verbose_name='保修时间')),
21 | ('baoxiu_complementary', models.CharField(max_length=200, verbose_name='保修描述')),
22 | ('baoxiu_staff_name', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='保修人')),
23 | ('facility_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='facility.Facility', verbose_name='设备')),
24 | ],
25 | ),
26 | migrations.RemoveField(
27 | model_name='repair',
28 | name='baoxiu_complementary',
29 | ),
30 | migrations.RemoveField(
31 | model_name='repair',
32 | name='baoxiu_staff_name',
33 | ),
34 | migrations.RemoveField(
35 | model_name='repair',
36 | name='baoxiu_time',
37 | ),
38 | migrations.AlterField(
39 | model_name='repair',
40 | name='facility_id',
41 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='facility.Baoxiu', verbose_name='设备'),
42 | ),
43 | migrations.AlterField(
44 | model_name='repair',
45 | name='repair_staff_name',
46 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='维修人'),
47 | ),
48 | ]
49 |
--------------------------------------------------------------------------------
/facility/migrations/0004_auto_20190528_1742.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 09:42
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('facility', '0003_auto_20190528_1730'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='baoxiu',
17 | name='baoxiu_staff_name',
18 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='报修人'),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/facility/migrations/0006_auto_20190602_1042.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 02:42
2 |
3 | from django.db import migrations, models
4 | import django.db.models.deletion
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('facility', '0005_auto_20190601_2146'),
11 | ]
12 |
13 | operations = [
14 | migrations.RemoveField(
15 | model_name='repair',
16 | name='baoxiu_place',
17 | ),
18 | migrations.AddField(
19 | model_name='repair',
20 | name='baoxiu_staff_tel',
21 | field=models.CharField(blank=True, max_length=11, null=True),
22 | ),
23 | migrations.AlterField(
24 | model_name='repair',
25 | name='facility_id',
26 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='facility.Facility', verbose_name='故障设备'),
27 | ),
28 | ]
29 |
--------------------------------------------------------------------------------
/facility/migrations/0007_auto_20190602_1049.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 02:49
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('facility', '0006_auto_20190602_1042'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='repair',
15 | name='baoxiu_complementary',
16 | field=models.CharField(blank=True, max_length=200, null=True, verbose_name='报修描述'),
17 | ),
18 | migrations.AlterField(
19 | model_name='repair',
20 | name='baoxiu_time',
21 | field=models.DateField(auto_now=True, null=True, verbose_name='报修时间'),
22 | ),
23 | ]
24 |
--------------------------------------------------------------------------------
/facility/migrations/0008_auto_20190602_1056.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 02:56
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('facility', '0007_auto_20190602_1049'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='repair',
15 | name='baoxiu_staff_tel',
16 | field=models.CharField(blank=True, max_length=11, null=True, verbose_name='联系方式'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/facility/migrations/0009_auto_20190602_1136.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 03:36
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('facility', '0008_auto_20190602_1056'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterModelOptions(
14 | name='repair',
15 | options={'ordering': ['-baoxiu_time']},
16 | ),
17 | ]
18 |
--------------------------------------------------------------------------------
/facility/migrations/0010_remove_repair_repair_complementary.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 05:29
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('facility', '0009_auto_20190602_1136'),
10 | ]
11 |
12 | operations = [
13 | migrations.RemoveField(
14 | model_name='repair',
15 | name='repair_complementary',
16 | ),
17 | ]
18 |
--------------------------------------------------------------------------------
/facility/migrations/0011_auto_20190602_1443.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 06:43
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('facility', '0010_remove_repair_repair_complementary'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterModelOptions(
14 | name='repair',
15 | options={'ordering': ['baoxiu_time']},
16 | ),
17 | ]
18 |
--------------------------------------------------------------------------------
/facility/migrations/0012_auto_20190602_1444.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 06:44
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('facility', '0011_auto_20190602_1443'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterModelOptions(
14 | name='repair',
15 | options={'ordering': ['-baoxiu_time']},
16 | ),
17 | ]
18 |
--------------------------------------------------------------------------------
/facility/migrations/0013_auto_20190605_1700.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-05 09:00
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('facility', '0012_auto_20190602_1444'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='facility',
17 | name='buyer',
18 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='购买人'),
19 | ),
20 | migrations.AlterField(
21 | model_name='maintain',
22 | name='staff_name',
23 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='保养员'),
24 | ),
25 | ]
26 |
--------------------------------------------------------------------------------
/facility/migrations/0014_auto_20190605_1701.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-05 09:01
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('facility', '0013_auto_20190605_1700'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='facility',
15 | name='buyer',
16 | field=models.CharField(max_length=100, verbose_name='购买人'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/facility/migrations/0015_auto_20190605_1702.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-05 09:02
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('facility', '0014_auto_20190605_1701'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='facility',
17 | name='buyer',
18 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='购买人'),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/facility/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__init__.py
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0001_initial.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0001_initial.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0002_auto_20190528_1701.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0002_auto_20190528_1701.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0002_auto_20190528_1723.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0002_auto_20190528_1723.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0003_auto_20190528_1730.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0003_auto_20190528_1730.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0004_auto_20190528_1742.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0004_auto_20190528_1742.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0005_auto_20190601_2146.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0005_auto_20190601_2146.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0006_auto_20190602_1042.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0006_auto_20190602_1042.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0007_auto_20190602_1049.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0007_auto_20190602_1049.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0008_auto_20190602_1056.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0008_auto_20190602_1056.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0009_auto_20190602_1136.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0009_auto_20190602_1136.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0010_remove_repair_repair_complementary.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0010_remove_repair_repair_complementary.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0011_auto_20190602_1443.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0011_auto_20190602_1443.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0012_auto_20190602_1444.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0012_auto_20190602_1444.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0013_auto_20190605_1700.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0013_auto_20190605_1700.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0014_auto_20190605_1701.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0014_auto_20190605_1701.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/0015_auto_20190605_1702.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/0015_auto_20190605_1702.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/migrations/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/facility/migrations/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/facility/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 | from django.contrib.auth.models import User
3 |
4 |
5 | class Facility(models.Model):#设备
6 | version = models.CharField(max_length=100, verbose_name="型号")
7 | facility_name = models.CharField(max_length=100, verbose_name="名称")
8 | price = models.BigIntegerField(verbose_name="价格")
9 | buyer = models.ForeignKey(User, on_delete=models.DO_NOTHING, verbose_name="购买人")
10 | buy_time = models.DateField(auto_now_add=True, verbose_name="购买时间")
11 | def __str__(self):
12 | return self.facility_name
13 |
14 | class Maintain(models.Model):#保养
15 | facility_id = models.ForeignKey(Facility, on_delete=models.CASCADE, verbose_name="设备")
16 | last_time = models.DateField(auto_now=True, verbose_name="保养时间")
17 | staff_name = models.ForeignKey(User, on_delete=models.DO_NOTHING, verbose_name="保养员")
18 | complmentary = models.TextField(verbose_name="补充")
19 |
20 |
21 | class Repair(models.Model):#维修
22 | facility_id = models.ForeignKey(Facility, on_delete=models.CASCADE, verbose_name="故障设备")
23 | baoxiu_staff_name = models.ForeignKey(User, on_delete=models.DO_NOTHING, verbose_name="报修人", related_name='aaa', null=True, blank=True)
24 | baoxiu_staff_tel = models.CharField(max_length=11, null=True, blank=True,verbose_name="联系方式")
25 | baoxiu_time = models.DateField(auto_now=True, verbose_name="报修时间", null=True, blank=True)
26 | baoxiu_complementary = models.CharField(max_length=200, verbose_name="报修描述", null=True, blank=True)
27 | repair_staff_name = models.ForeignKey(User, on_delete=models.DO_NOTHING, verbose_name="维修人", related_name='bbb', null=True, blank=True)
28 | repair_time = models.DateField(auto_now=True, verbose_name="维修时间", null=True, blank=True)
29 |
30 | class Meta:
31 | ordering = ['-baoxiu_time']
--------------------------------------------------------------------------------
/facility/templates/baoxiu.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>报修{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
报修
13 |
14 |
27 |
28 | {% else %}
29 |
32 | {% endif %}
33 |
34 |
35 |
36 | {% endblock %}
--------------------------------------------------------------------------------
/facility/templates/baoxiu_list.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}全体员工{% endblock %}
4 | {% if user.is_authenticated %}
5 | {% block nav_facility_active %}active{% endblock %}
6 |
7 | {% block nav_facility1_active %}active{% endblock %}
8 | {% block nav_facility2_active %}active{% endblock %}
9 | {% endif %}
10 | {% block content %}
11 |
12 |
13 |
14 | {% if user.is_authenticated %}
15 |
16 |
17 |
18 |
19 | 故障设备 |
20 | 故障描述 |
21 | 报修时间 |
22 |
23 |
24 |
25 | {%for repair in repairs%}
26 |
27 | {{repair.facility_id}} |
28 | {{repair.baoxiu_complementary}} |
29 | {{repair.baoxiu_time}} |
30 |
31 | {% endfor %}
32 |
33 |
34 | {% else %}
35 |
未登录,跳转到首页...
36 |
39 | {% endif %}
40 |
41 |
42 |
43 | {% endblock %}
--------------------------------------------------------------------------------
/facility/templates/dai_repair.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}全体员工{% endblock %}
4 | {% if user.is_authenticated %}
5 | {% block nav_facility_active %}active{% endblock %}
6 |
7 | {% block nav_facility1_active %}active{% endblock %}
8 | {% block nav_facility2_active %}active{% endblock %}
9 | {% endif %}
10 | {% block content %}
11 |
12 |
13 |
14 | {% if user.is_authenticated %}
15 |
16 |
还有{{count}}个报修没有处理
17 |
我要报修
18 |
19 |
20 |
21 | 故障设备 |
22 | 报修人 |
23 | 联系方式 |
24 | 故障描述 |
25 | 报修时间 |
26 | 是否解决 |
27 |
28 |
29 |
30 | {%for repair in repairs%}
31 |
32 | {{repair.facility_id}} |
33 | {{repair.baoxiu_staff_name}} |
34 | {{repair.baoxiu_staff_tel}} |
35 | {{repair.baoxiu_complementary}} |
36 | {{repair.baoxiu_time}} |
37 | 标记已解决 |
38 |
39 | {% endfor %}
40 |
41 |
42 | {% else %}
43 |
未登录,跳转到首页...
44 |
47 | {% endif %}
48 |
49 |
50 |
51 | {% endblock %}
--------------------------------------------------------------------------------
/facility/templates/facility_append.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}设备档案{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
增加
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/facility/templates/facility_document.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}全体员工{% endblock %}
4 | {% if user.is_authenticated %}
5 | {% block nav_facility_active %}active{% endblock %}
6 |
7 | {% block nav_facility1_active %}active{% endblock %}
8 | {% block nav_facility2_active %}active{% endblock %}
9 | {% endif %}
10 | {% block content %}
11 |
12 |
13 |
14 |
新增设备
15 | {% if user.is_authenticated %}
16 |
17 | 查找设备
18 |
19 |
20 | 名称 |
21 | 型号 |
22 | 价格 |
23 | 购买人 |
24 | 购买时间 |
25 | 修改 |
26 | 删除 |
27 |
28 |
29 |
30 | {%for facility in facilities%}
31 |
32 | {{facility.facility_name}} |
33 | {{facility.version}} |
34 | {{facility.price}} |
35 | {{facility.buyer}} |
36 | {{facility.buy_time}} |
37 | 修改 |
38 | 删除 |
39 |
40 | {% endfor %}
41 |
42 |
43 | {% else %}
44 |
未登录,跳转到首页...
45 |
48 | {% endif %}
49 |
50 |
51 |
52 | {% endblock %}
--------------------------------------------------------------------------------
/facility/templates/facility_modify.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}设备档案{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
修改
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/facility/templates/facility_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>查找设备信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/facility/templates/maintain_append.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}增加保养记录{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
增加
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/facility/templates/maintain_document.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}保养记录{% endblock %}
4 | {% if user.is_authenticated %}
5 | {% block nav_facility_active %}active{% endblock %}
6 |
7 | {% block nav_facility1_active %}active{% endblock %}
8 | {% block nav_facility2_active %}active{% endblock %}
9 | {% endif %}
10 | {% block content %}
11 |
12 |
13 |
14 | {% if user.is_authenticated %}
15 |
16 | 添加保养记录
17 | 查找保养记录
18 |
19 |
20 | 设备 |
21 | 保养时间 |
22 | 负责员工 |
23 | 补充 |
24 | 修改 |
25 | 删除 |
26 |
27 |
28 |
29 | {%for facility in facilities%}
30 |
31 | {{facility.facility_id}} |
32 | {{facility.last_time}} |
33 | {{facility.staff_name}} |
34 | {{facility.complmentary}} |
35 | 修改 |
36 | 删除 |
37 |
38 | {% endfor %}
39 |
40 |
41 | {% else %}
42 |
未登录,跳转到首页...
43 |
46 | {% endif %}
47 |
48 |
49 |
50 | {% endblock %}
--------------------------------------------------------------------------------
/facility/templates/maintain_modify.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}修改保养记录{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
修改
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/facility/templates/maintain_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}查找保养信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/facility/templates/repaired_list.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}全体员工{% endblock %}
4 | {% if user.is_authenticated %}
5 | {% block nav_facility_active %}active{% endblock %}
6 |
7 | {% block nav_facility1_active %}active{% endblock %}
8 | {% block nav_facility2_active %}active{% endblock %}
9 | {% endif %}
10 | {% block content %}
11 |
12 |
13 |
14 | {% if user.is_authenticated %}
15 |
16 |
共{{count}}个维修记录
17 |
查找维修记录
18 |
19 |
20 |
21 | 故障设备 |
22 | 报修人 |
23 | 联系方式 |
24 | 故障描述 |
25 | 报修时间 |
26 | 维修人 |
27 | 维修时间 |
28 |
29 |
30 |
31 | {%for repair in repairs%}
32 |
33 | {{repair.facility_id}} |
34 | {{repair.baoxiu_staff_name}} |
35 | {{repair.baoxiu_staff_tel}} |
36 | {{repair.baoxiu_complementary}} |
37 | {{repair.baoxiu_time}} |
38 | {{repair.repair_staff_name}} |
39 | {{repair.repair_time}} |
40 |
41 | {% endfor %}
42 |
43 |
44 | {% else %}
45 |
未登录,跳转到首页...
46 |
49 | {% endif %}
50 |
51 |
52 |
53 | {% endblock %}
--------------------------------------------------------------------------------
/facility/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/facility/urls.py:
--------------------------------------------------------------------------------
1 | from django.urls import path
2 | from . import views
3 |
4 |
5 | urlpatterns = [
6 | path('repaired_select/', views.repaired_select, name='repaired_select'),
7 | path('facility_document/', views.facility_document, name='facility_document'),
8 | path('facility_append/', views.facility_append, name='facility_append'),
9 | path('facility_modify/
', views.facility_modify, name='facility_modify'),
10 | path('facility_delete/', views.facility_delete, name='facility_delete'),
11 | path('facility_select/', views.facility_select, name='facility_select'),
12 | path('maintain_document/', views.maintain_document, name='maintain_document'),
13 | path('maintain_append/', views.maintain_append, name='maintain_append'),
14 | path('maintain_select/', views.maintain_select, name='maintain_select'),
15 | path('maintain_modify/', views.maintain_modify, name='maintain_modify'),
16 | path('maintain_delete/', views.maintain_delete, name='maintain_delete'),
17 | path('baoxiu/', views.baoxiu, name='baoxiu'),
18 | path('baoxiu_list/', views.baoxiu_list, name='baoxiu_list'),
19 | path('dai_repair/', views.dai_repair, name='dai_repair'),
20 | path('repaired_list/', views.repaired_list, name='repaired_list'),
21 | path('mark_done//', views.mark_done, name='mark_done'),
22 | ]
23 |
--------------------------------------------------------------------------------
/factory/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/factory/__init__.py
--------------------------------------------------------------------------------
/factory/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/factory/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/factory/__pycache__/settings.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/factory/__pycache__/settings.cpython-36.pyc
--------------------------------------------------------------------------------
/factory/__pycache__/urls.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/factory/__pycache__/urls.cpython-36.pyc
--------------------------------------------------------------------------------
/factory/__pycache__/views.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/factory/__pycache__/views.cpython-36.pyc
--------------------------------------------------------------------------------
/factory/__pycache__/wsgi.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/factory/__pycache__/wsgi.cpython-36.pyc
--------------------------------------------------------------------------------
/factory/urls.py:
--------------------------------------------------------------------------------
1 | """factory URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/2.0/topics/http/urls/
5 | Examples:
6 | Function views
7 | 1. Add an import: from my_app import views
8 | 2. Add a URL to urlpatterns: path('', views.home, name='home')
9 | Class-based views
10 | 1. Add an import: from other_app.views import Home
11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.urls import include, path
14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15 | """
16 | from django.contrib import admin
17 | from django.urls import path, include
18 | from . import views
19 |
20 |
21 | urlpatterns = [
22 | path('', views.home, name='home'),
23 | path('admin/', admin.site.urls),
24 | path('user/', include('user.urls')),
25 | path('facility/', include('facility.urls')),
26 | path('orders/', include('orders.urls')),
27 | path('notice/', include('notice.urls')),
28 | path('warehouse/', include('warehouse.urls')),
29 | ]
30 |
--------------------------------------------------------------------------------
/factory/views.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import get_object_or_404,redirect,render
2 | from notice.models import Notice
3 |
4 |
5 |
6 | def home(request):
7 | notices = Notice.objects.all()
8 | context = {}
9 | context['notices'] = notices
10 | return render(request, 'home.html', context)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/factory/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for factory project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "factory.settings")
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | import os
3 | import sys
4 |
5 | if __name__ == "__main__":
6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "factory.settings")
7 | try:
8 | from django.core.management import execute_from_command_line
9 | except ImportError as exc:
10 | raise ImportError(
11 | "Couldn't import Django. Are you sure it's installed and "
12 | "available on your PYTHONPATH environment variable? Did you "
13 | "forget to activate a virtual environment?"
14 | ) from exc
15 | execute_from_command_line(sys.argv)
16 |
--------------------------------------------------------------------------------
/notice/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/__init__.py
--------------------------------------------------------------------------------
/notice/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/__pycache__/admin.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/__pycache__/admin.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/__pycache__/forms.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/__pycache__/forms.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/__pycache__/models.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/__pycache__/models.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/__pycache__/urls.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/__pycache__/urls.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/__pycache__/views.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/__pycache__/views.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from .models import Notice
3 |
4 |
5 | # Register your models here.
6 | @admin.register(Notice)
7 | class NoticeAdmin(admin.ModelAdmin):
8 | list_display = ("id", "title", "content", "author", "created_time")
9 |
--------------------------------------------------------------------------------
/notice/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class NoticeConfig(AppConfig):
5 | name = 'notice'
6 |
--------------------------------------------------------------------------------
/notice/forms.py:
--------------------------------------------------------------------------------
1 | from django import forms
2 | from django.contrib import auth
3 | from django.contrib.auth.models import User
4 |
5 |
6 | class notice_publishForm(forms.Form):
7 | title = forms.CharField(
8 | label='标题',
9 | widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': '请输入标题'})
10 | )
11 | content = forms.CharField(
12 | label='内容',
13 | widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': '请输入内容'})
14 | )
15 |
--------------------------------------------------------------------------------
/notice/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-30 04:40
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | initial = True
9 |
10 | dependencies = [
11 | ]
12 |
13 | operations = [
14 | migrations.CreateModel(
15 | name='Notice',
16 | fields=[
17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18 | ('title', models.CharField(max_length=100)),
19 | ('content', models.TextField()),
20 | ],
21 | ),
22 | ]
23 |
--------------------------------------------------------------------------------
/notice/migrations/0002_auto_20190530_1354.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-30 05:54
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('notice', '0001_initial'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='notice',
15 | name='content',
16 | field=models.TextField(verbose_name='内容'),
17 | ),
18 | migrations.AlterField(
19 | model_name='notice',
20 | name='title',
21 | field=models.CharField(max_length=100, verbose_name='标题'),
22 | ),
23 | ]
24 |
--------------------------------------------------------------------------------
/notice/migrations/0003_auto_20190602_1142.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 03:42
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('notice', '0002_auto_20190530_1354'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterModelOptions(
14 | name='notice',
15 | options={'ordering': ['-created_time']},
16 | ),
17 | migrations.AddField(
18 | model_name='notice',
19 | name='created_time',
20 | field=models.DateField(auto_now_add=True, null=True, verbose_name='发布时间'),
21 | ),
22 | ]
23 |
--------------------------------------------------------------------------------
/notice/migrations/0004_auto_20190602_1144.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 03:44
2 |
3 | from django.db import migrations, models
4 | import django.utils.timezone
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('notice', '0003_auto_20190602_1142'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='notice',
16 | name='created_time',
17 | field=models.DateField(auto_now_add=True, default=django.utils.timezone.now, verbose_name='发布时间'),
18 | preserve_default=False,
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/notice/migrations/0005_notice_author.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-03 03:59
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL),
12 | ('notice', '0004_auto_20190602_1144'),
13 | ]
14 |
15 | operations = [
16 | migrations.AddField(
17 | model_name='notice',
18 | name='author',
19 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='发表人'),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/notice/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/migrations/__init__.py
--------------------------------------------------------------------------------
/notice/migrations/__pycache__/0001_initial.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/migrations/__pycache__/0001_initial.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/migrations/__pycache__/0002_auto_20190530_1354.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/migrations/__pycache__/0002_auto_20190530_1354.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/migrations/__pycache__/0003_auto_20190602_1142.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/migrations/__pycache__/0003_auto_20190602_1142.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/migrations/__pycache__/0004_auto_20190602_1144.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/migrations/__pycache__/0004_auto_20190602_1144.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/migrations/__pycache__/0005_notice_author.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/migrations/__pycache__/0005_notice_author.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/migrations/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/notice/migrations/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/notice/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 | from django.contrib.auth.models import User
3 |
4 |
5 | class Notice(models.Model):
6 | title = models.CharField(max_length=100,verbose_name="标题")
7 | author = models.ForeignKey(User, on_delete=models.DO_NOTHING, verbose_name="发表人", null=True)
8 | created_time = models.DateField(auto_now_add=True, verbose_name="发布时间")
9 | content = models.TextField(verbose_name="内容")
10 |
11 | class Meta:
12 | ordering = ['-created_time']
--------------------------------------------------------------------------------
/notice/templates/notice.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}通知{% endblock %}
4 | {% block content %}
5 |
6 | {%for n in notice%}
7 | {{n.title}}
8 | {{n.content}}
9 |
10 | {% endfor %}
11 | {% endblock %}
--------------------------------------------------------------------------------
/notice/templates/notice_modify.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>通知发布{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
修改通知
13 |
14 |
27 |
28 | {% else %}
29 |
32 | {% endif %}
33 |
34 |
35 |
36 | {% endblock %}
--------------------------------------------------------------------------------
/notice/templates/notice_publish.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>通知发布{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
发布通知
13 |
14 |
27 |
28 | {% else %}
29 |
32 | {% endif %}
33 |
34 |
35 |
36 | {% endblock %}
--------------------------------------------------------------------------------
/notice/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/notice/urls.py:
--------------------------------------------------------------------------------
1 | from django.urls import path
2 | from . import views
3 |
4 |
5 | urlpatterns = [
6 | path('notice/', views.notice, name='notice'),
7 | path('notice_publish/', views.notice_publish, name='notice_publish'),
8 | path('notice_lists/', views.notice_lists, name='notice_lists'),
9 | path('NoticeModify/', views.NoticeModify, name='NoticeModify'),
10 | path('delete_notice/', views.delete_notice, name='delete_notice'),
11 | ]
--------------------------------------------------------------------------------
/orders/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/__init__.py
--------------------------------------------------------------------------------
/orders/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/__pycache__/admin.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/__pycache__/admin.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/__pycache__/forms.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/__pycache__/forms.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/__pycache__/models.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/__pycache__/models.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/__pycache__/urls.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/__pycache__/urls.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/__pycache__/views.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/__pycache__/views.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from .models import Orders
3 |
4 | # Register your models here.
5 | @admin.register(Orders)
6 | class OrdersAdmin(admin.ModelAdmin):
7 | list_display = ("id", "order_name", "order_client", "order_price", "order_number", "order_total_price", "order_time", "order_end", "order_supplement")
--------------------------------------------------------------------------------
/orders/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class OrdersConfig(AppConfig):
5 | name = 'orders'
6 |
--------------------------------------------------------------------------------
/orders/forms.py:
--------------------------------------------------------------------------------
1 | from django import forms
2 | from django.contrib import auth
3 | from django.contrib.auth.models import User
4 | from django.forms import widgets
5 | from warehouse.models import Product
6 |
7 | class OrderForm(forms.Form):
8 | ps = Product.objects.all()
9 | prod = []
10 | for p in ps:
11 | prod.append((p.product_name, p.product_name))
12 | order_name = forms.CharField(
13 | label='产品名称',
14 | widget=forms.Select(choices=prod),
15 | )
16 | order_client= forms.CharField(
17 | label='客户名称',
18 | widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': '请输入客户名称'})
19 | )
20 | order_number= forms.CharField(
21 | label='产品数量',
22 | widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': '请输入产品数量'})
23 | )
24 | order_price = forms.CharField(
25 | label='单价',
26 | widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': '请输入单价'})
27 | )
28 | order_total_price = forms.CharField(
29 | label='总价',
30 | widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': '请输入总价'})
31 | )
32 | order_end = forms.DateField(
33 | label='交货时间',
34 | widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': '请输入交货时间'})
35 | )
36 | order_supplement = forms.CharField(
37 | label='详细要求',
38 | widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': '请输入详细要求'})
39 | )
40 |
41 |
42 | class OrderSelectForm(forms.Form):
43 | keyword = forms.CharField(
44 | label='关键字段',
45 | widget=forms.Select(choices=((1, '产品名称'), (2, '客户名称')))
46 | )
47 | valueword = forms.CharField(
48 | label='内容',
49 | widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': '请输入查询内容'})
50 | )
--------------------------------------------------------------------------------
/orders/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-27 14:57
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | initial = True
9 |
10 | dependencies = [
11 | ]
12 |
13 | operations = [
14 | migrations.CreateModel(
15 | name='Orders',
16 | fields=[
17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18 | ('order_ID', models.BigIntegerField()),
19 | ('order_type', models.CharField(max_length=100)),
20 | ('order_client', models.CharField(max_length=100)),
21 | ('order_time', models.DateField(auto_now_add=True)),
22 | ('order_end', models.DateField()),
23 | ('order_finish', models.DateField()),
24 | ('order_price', models.BigIntegerField()),
25 | ('order_number', models.BigIntegerField()),
26 | ('order_supplement', models.TextField()),
27 | ],
28 | ),
29 | ]
30 |
--------------------------------------------------------------------------------
/orders/migrations/0002_auto_20190528_1319.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 05:19
2 |
3 | from django.db import migrations, models
4 | import django.utils.timezone
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('orders', '0001_initial'),
11 | ]
12 |
13 | operations = [
14 | migrations.RemoveField(
15 | model_name='orders',
16 | name='order_finish',
17 | ),
18 | migrations.RemoveField(
19 | model_name='orders',
20 | name='order_type',
21 | ),
22 | migrations.AddField(
23 | model_name='orders',
24 | name='order_name',
25 | field=models.CharField(default=django.utils.timezone.now, max_length=100, verbose_name='产品名称'),
26 | preserve_default=False,
27 | ),
28 | migrations.AlterField(
29 | model_name='orders',
30 | name='order_ID',
31 | field=models.BigIntegerField(verbose_name='订单号'),
32 | ),
33 | migrations.AlterField(
34 | model_name='orders',
35 | name='order_client',
36 | field=models.CharField(max_length=100, verbose_name='客户名称'),
37 | ),
38 | migrations.AlterField(
39 | model_name='orders',
40 | name='order_end',
41 | field=models.DateField(auto_now_add=True, verbose_name='交货时间'),
42 | ),
43 | migrations.AlterField(
44 | model_name='orders',
45 | name='order_number',
46 | field=models.BigIntegerField(verbose_name='数量'),
47 | ),
48 | migrations.AlterField(
49 | model_name='orders',
50 | name='order_price',
51 | field=models.BigIntegerField(verbose_name='价格'),
52 | ),
53 | migrations.AlterField(
54 | model_name='orders',
55 | name='order_supplement',
56 | field=models.TextField(verbose_name='补充'),
57 | ),
58 | migrations.AlterField(
59 | model_name='orders',
60 | name='order_time',
61 | field=models.DateField(auto_now_add=True, verbose_name='订货时间'),
62 | ),
63 | ]
64 |
--------------------------------------------------------------------------------
/orders/migrations/0003_auto_20190528_1335.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 05:35
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('orders', '0002_auto_20190528_1319'),
10 | ]
11 |
12 | operations = [
13 | migrations.AddField(
14 | model_name='orders',
15 | name='order_total_price',
16 | field=models.IntegerField(default=-1, verbose_name='总价'),
17 | ),
18 | migrations.AlterField(
19 | model_name='orders',
20 | name='order_number',
21 | field=models.IntegerField(verbose_name='数量'),
22 | ),
23 | migrations.AlterField(
24 | model_name='orders',
25 | name='order_price',
26 | field=models.IntegerField(verbose_name='单价'),
27 | ),
28 | ]
29 |
--------------------------------------------------------------------------------
/orders/migrations/0004_auto_20190528_1336.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 05:36
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('orders', '0003_auto_20190528_1335'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='orders',
15 | name='order_total_price',
16 | field=models.IntegerField(verbose_name='总价'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/orders/migrations/0005_auto_20190528_1338.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 05:38
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('orders', '0004_auto_20190528_1336'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='orders',
15 | name='order_end',
16 | field=models.DateField(verbose_name='交货时间'),
17 | ),
18 | migrations.AlterField(
19 | model_name='orders',
20 | name='order_price',
21 | field=models.IntegerField(verbose_name='单价(元)'),
22 | ),
23 | migrations.AlterField(
24 | model_name='orders',
25 | name='order_total_price',
26 | field=models.IntegerField(verbose_name='总价(元)'),
27 | ),
28 | ]
29 |
--------------------------------------------------------------------------------
/orders/migrations/0006_remove_orders_order_id.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-29 15:48
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('orders', '0005_auto_20190528_1338'),
10 | ]
11 |
12 | operations = [
13 | migrations.RemoveField(
14 | model_name='orders',
15 | name='order_ID',
16 | ),
17 | ]
18 |
--------------------------------------------------------------------------------
/orders/migrations/0007_auto_20190602_1142.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 03:42
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('orders', '0006_remove_orders_order_id'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterModelOptions(
14 | name='orders',
15 | options={'ordering': ['-order_time']},
16 | ),
17 | ]
18 |
--------------------------------------------------------------------------------
/orders/migrations/0008_auto_20190605_1601.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-05 08:01
2 |
3 | from django.db import migrations, models
4 | import django.db.models.deletion
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('warehouse', '__first__'),
11 | ('orders', '0007_auto_20190602_1142'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='orders',
17 | name='order_name',
18 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='warehouse.Product', verbose_name='产品名称'),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/orders/migrations/0009_auto_20190605_1616.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-05 08:16
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('orders', '0008_auto_20190605_1601'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='orders',
15 | name='order_name',
16 | field=models.CharField(max_length=100, verbose_name='产品名称'),
17 | ),
18 | migrations.AlterField(
19 | model_name='orders',
20 | name='order_supplement',
21 | field=models.TextField(null=True, verbose_name='补充'),
22 | ),
23 | ]
24 |
--------------------------------------------------------------------------------
/orders/migrations/0010_auto_20190605_1617.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-05 08:17
2 |
3 | from django.db import migrations, models
4 | import django.db.models.deletion
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('orders', '0009_auto_20190605_1616'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='orders',
16 | name='order_name',
17 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='warehouse.Product', verbose_name='产品名称'),
18 | ),
19 | ]
20 |
--------------------------------------------------------------------------------
/orders/migrations/0011_auto_20190605_1621.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-05 08:21
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('orders', '0010_auto_20190605_1617'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='orders',
15 | name='order_supplement',
16 | field=models.TextField(blank=True, null=True, verbose_name='补充'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/orders/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__init__.py
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0001_initial.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0001_initial.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0002_auto_20190528_1319.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0002_auto_20190528_1319.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0003_auto_20190528_1323.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0003_auto_20190528_1323.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0003_auto_20190528_1335.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0003_auto_20190528_1335.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0004_auto_20190528_1324.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0004_auto_20190528_1324.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0004_auto_20190528_1336.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0004_auto_20190528_1336.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0005_auto_20190528_1325.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0005_auto_20190528_1325.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0005_auto_20190528_1338.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0005_auto_20190528_1338.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0006_auto_20190528_1328.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0006_auto_20190528_1328.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0006_remove_orders_order_id.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0006_remove_orders_order_id.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0007_auto_20190602_1142.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0007_auto_20190602_1142.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0008_auto_20190605_1601.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0008_auto_20190605_1601.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0009_auto_20190605_1616.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0009_auto_20190605_1616.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0010_auto_20190605_1617.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0010_auto_20190605_1617.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/0011_auto_20190605_1621.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/0011_auto_20190605_1621.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/migrations/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/orders/migrations/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/orders/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 | from warehouse.models import Product
3 |
4 | class Orders(models.Model):#订单
5 | order_name=models.ForeignKey(Product,on_delete=models.DO_NOTHING, verbose_name="产品名称")
6 | order_client=models.CharField(max_length=100, verbose_name="客户名称")
7 | order_number = models.IntegerField(verbose_name="数量")
8 | order_price=models.IntegerField(verbose_name="单价(元)")
9 | order_total_price = models.IntegerField(verbose_name="总价(元)")
10 | order_time = models.DateField(auto_now_add=True, verbose_name="订货时间")
11 | order_end = models.DateField(verbose_name="交货时间")
12 | order_supplement=models.TextField(verbose_name="补充",null=True, blank=True)
13 |
14 | class Meta:
15 | ordering = ['-order_time']
16 |
--------------------------------------------------------------------------------
/orders/templates/order_append.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}增加订单信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
增加
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/orders/templates/order_modify.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}修改订单信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
修改
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/orders/templates/order_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>查找订单信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/orders/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/orders/urls.py:
--------------------------------------------------------------------------------
1 | from django.urls import path
2 | from . import views
3 |
4 |
5 | urlpatterns = [
6 | path('order_list/', views.order_list, name='order_list'),
7 | path('order_modify/', views.order_modify, name='order_modify'),
8 | path('order_delete/', views.order_delete, name='order_delete'),
9 | path('order_append/', views.order_append, name='order_append'),
10 | path('order_select/', views.order_select, name='order_select'),
11 | ]
--------------------------------------------------------------------------------
/static/base.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/static/base.css
--------------------------------------------------------------------------------
/static/bootstrap-3.37/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/static/bootstrap-3.37/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/static/bootstrap-3.37/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/static/bootstrap-3.37/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/static/bootstrap-3.37/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/static/bootstrap-3.37/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/static/bootstrap-3.37/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/static/bootstrap-3.37/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/static/home.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | }
5 | body {
6 | margin-top: 70px!important;
7 | }
8 | ul {
9 | list-style-type: none!important;
10 | }
11 | ul.navbar-right {
12 | margin-right: 0;
13 | }
14 | div.navbar-header{
15 | font-size: 200%;
16 | padding-top: 0.2em;
17 | }
--------------------------------------------------------------------------------
/static/images/0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/static/images/0.jpg
--------------------------------------------------------------------------------
/static/images/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/static/images/1.jpg
--------------------------------------------------------------------------------
/static/images/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/static/images/2.jpg
--------------------------------------------------------------------------------
/static/images/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/static/images/3.jpg
--------------------------------------------------------------------------------
/static/images/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/static/images/4.jpg
--------------------------------------------------------------------------------
/templates/form.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}{{ page_title }}{% endblock %}
4 | {% block nav_home_active %}active{% endblock %}
5 | {% block content %}
6 |
7 |
8 |
9 |
10 |
11 |
{{ form_title }}
12 |
13 |
35 |
36 |
37 |
38 |
39 | {% endblock %}
--------------------------------------------------------------------------------
/user/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/__init__.py
--------------------------------------------------------------------------------
/user/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/user/__pycache__/admin.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/__pycache__/admin.cpython-36.pyc
--------------------------------------------------------------------------------
/user/__pycache__/forms.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/__pycache__/forms.cpython-36.pyc
--------------------------------------------------------------------------------
/user/__pycache__/models.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/__pycache__/models.cpython-36.pyc
--------------------------------------------------------------------------------
/user/__pycache__/urls.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/__pycache__/urls.cpython-36.pyc
--------------------------------------------------------------------------------
/user/__pycache__/views.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/__pycache__/views.cpython-36.pyc
--------------------------------------------------------------------------------
/user/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class UserConfig(AppConfig):
5 | name = 'user'
6 |
--------------------------------------------------------------------------------
/user/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-27 14:57
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | initial = True
11 |
12 | dependencies = [
13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL),
14 | ]
15 |
16 | operations = [
17 | migrations.CreateModel(
18 | name='Profile',
19 | fields=[
20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
21 | ('staff_gender', models.CharField(choices=[('male', '男'), ('female', '女')], default='male', max_length=10, verbose_name='性别')),
22 | ('staff_age', models.PositiveIntegerField(verbose_name='年龄')),
23 | ('staff_home', models.CharField(max_length=100, verbose_name='籍贯')),
24 | ('staff_nationality', models.CharField(max_length=20, verbose_name='民族')),
25 | ('staff_tel', models.BigIntegerField(verbose_name='电话')),
26 | ('start_time', models.DateField(auto_now_add=True, verbose_name='入职时间')),
27 | ('id_card', models.CharField(max_length=20, verbose_name='身份证')),
28 | ('staff_type', models.CharField(max_length=100, verbose_name='职位')),
29 | ('salary_pre_hour', models.IntegerField(verbose_name='时薪')),
30 | ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
31 | ],
32 | ),
33 | ]
34 |
--------------------------------------------------------------------------------
/user/migrations/0003_auto_20190528_1939.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 11:39
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0002_attendance_salary'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='attendance',
15 | name='end_time',
16 | field=models.DateTimeField(auto_now=True, verbose_name='下班时间'),
17 | ),
18 | migrations.AlterField(
19 | model_name='attendance',
20 | name='supplement',
21 | field=models.CharField(max_length=100, null=True, verbose_name='补充'),
22 | ),
23 | ]
24 |
--------------------------------------------------------------------------------
/user/migrations/0004_auto_20190528_1946.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 11:46
2 |
3 | from django.db import migrations, models
4 | import django.utils.timezone
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('user', '0003_auto_20190528_1939'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='attendance',
16 | name='end_time',
17 | field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='下班时间'),
18 | ),
19 | migrations.AlterField(
20 | model_name='attendance',
21 | name='supplement',
22 | field=models.CharField(default='无', max_length=100, null=True, verbose_name='补充'),
23 | ),
24 | ]
25 |
--------------------------------------------------------------------------------
/user/migrations/0005_auto_20190528_2203.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 14:03
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0004_auto_20190528_1946'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='salary',
15 | name='leave_days',
16 | field=models.IntegerField(verbose_name='请假'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/user/migrations/0006_auto_20190528_2204.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 14:04
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0005_auto_20190528_2203'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='salary',
15 | name='absent_days',
16 | field=models.IntegerField(verbose_name='旷班'),
17 | ),
18 | migrations.AlterField(
19 | model_name='salary',
20 | name='attend_days',
21 | field=models.IntegerField(verbose_name='出勤'),
22 | ),
23 | ]
24 |
--------------------------------------------------------------------------------
/user/migrations/0007_auto_20190528_2205.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 14:05
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0006_auto_20190528_2204'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='salary',
15 | name='actual_pay',
16 | field=models.IntegerField(verbose_name='实发'),
17 | ),
18 | migrations.AlterField(
19 | model_name='salary',
20 | name='allowance',
21 | field=models.IntegerField(verbose_name='补贴'),
22 | ),
23 | migrations.AlterField(
24 | model_name='salary',
25 | name='base_salary',
26 | field=models.IntegerField(verbose_name='基础工资'),
27 | ),
28 | migrations.AlterField(
29 | model_name='salary',
30 | name='business_days',
31 | field=models.IntegerField(verbose_name='出差'),
32 | ),
33 | migrations.AlterField(
34 | model_name='salary',
35 | name='kouchu',
36 | field=models.IntegerField(verbose_name='应扣'),
37 | ),
38 | migrations.AlterField(
39 | model_name='salary',
40 | name='late_days',
41 | field=models.IntegerField(verbose_name='迟到'),
42 | ),
43 | migrations.AlterField(
44 | model_name='salary',
45 | name='overtime',
46 | field=models.IntegerField(verbose_name='加班时长'),
47 | ),
48 | migrations.AlterField(
49 | model_name='salary',
50 | name='overtime_salary',
51 | field=models.IntegerField(verbose_name='加班工资'),
52 | ),
53 | migrations.AlterField(
54 | model_name='salary',
55 | name='should_pay',
56 | field=models.IntegerField(verbose_name='应发'),
57 | ),
58 | migrations.AlterField(
59 | model_name='salary',
60 | name='tax',
61 | field=models.IntegerField(verbose_name='个人所得税'),
62 | ),
63 | ]
64 |
--------------------------------------------------------------------------------
/user/migrations/0008_auto_20190528_2205.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 14:05
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0007_auto_20190528_2205'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='attendance',
15 | name='end_time',
16 | field=models.DateTimeField(verbose_name='下班时间'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/user/migrations/0010_auto_20190529_0038.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 16:38
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0008_auto_20190528_2205'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='profile',
15 | name='staff_tel',
16 | field=models.BigIntegerField(verbose_name='电话'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/user/migrations/0011_position.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-30 07:34
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0010_auto_20190529_0038'),
10 | ]
11 |
12 | operations = [
13 | migrations.CreateModel(
14 | name='Position',
15 | fields=[
16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
17 | ('position', models.CharField(max_length=100)),
18 | ],
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/user/migrations/0012_auto_20190602_1142.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 03:42
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0011_position'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterModelOptions(
14 | name='attendance',
15 | options={'ordering': ['-current_time']},
16 | ),
17 | migrations.AlterModelOptions(
18 | name='profile',
19 | options={'ordering': ['-start_time']},
20 | ),
21 | migrations.AlterModelOptions(
22 | name='salary',
23 | options={'ordering': ['-current_time']},
24 | ),
25 | ]
26 |
--------------------------------------------------------------------------------
/user/migrations/0013_auto_20190602_1150.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 03:50
2 |
3 | from django.db import migrations, models
4 | import django.db.models.deletion
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('user', '0012_auto_20190602_1142'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='profile',
16 | name='staff_type',
17 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='user.Position', verbose_name='职位'),
18 | ),
19 | ]
20 |
--------------------------------------------------------------------------------
/user/migrations/0014_auto_20190602_1153.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 03:53
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0013_auto_20190602_1150'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='profile',
15 | name='staff_type',
16 | field=models.CharField(max_length=100, verbose_name='职位'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/user/migrations/0015_auto_20190602_1155.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 03:55
2 |
3 | from django.db import migrations, models
4 | import django.db.models.deletion
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('user', '0014_auto_20190602_1153'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='profile',
16 | name='staff_type',
17 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='user.Position', verbose_name='职位'),
18 | ),
19 | ]
20 |
--------------------------------------------------------------------------------
/user/migrations/0016_auto_20190602_1156.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-02 03:56
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0015_auto_20190602_1155'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='profile',
15 | name='staff_type',
16 | field=models.CharField(max_length=100, verbose_name='职位'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/user/migrations/0017_auto_20190605_0057.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-04 16:57
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0016_auto_20190602_1156'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='attendance',
15 | name='end_time',
16 | field=models.DateTimeField(auto_now=True, verbose_name='下班时间'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/user/migrations/0019_auto_20190606_1535.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-06 07:35
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0018_auto_20190606_1436'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='attendance',
15 | name='supplement',
16 | field=models.CharField(blank=True, default='无', max_length=100, null=True, verbose_name='补充'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/user/migrations/0022_auto_20190609_2340.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-09 15:40
2 |
3 | from django.db import migrations, models
4 | import django.db.models.deletion
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('user', '0021_auto_20190606_2344'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='profile',
16 | name='staff_type',
17 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='user.Position', verbose_name='职位'),
18 | ),
19 | ]
20 |
--------------------------------------------------------------------------------
/user/migrations/0023_auto_20190609_2343.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-09 15:43
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0022_auto_20190609_2340'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='profile',
15 | name='staff_type',
16 | field=models.CharField(max_length=100, verbose_name='职位'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/user/migrations/0024_auto_20190609_2343.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-09 15:43
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('user', '0023_auto_20190609_2343'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='profile',
15 | name='staff_type',
16 | field=models.CharField(max_length=100, null=True, verbose_name='职位'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/user/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__init__.py
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0001_initial.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0001_initial.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0002_attendance_salary.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0002_attendance_salary.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0003_auto_20190528_1939.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0003_auto_20190528_1939.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0004_auto_20190528_1946.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0004_auto_20190528_1946.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0005_auto_20190528_2203.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0005_auto_20190528_2203.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0006_auto_20190528_2204.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0006_auto_20190528_2204.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0007_auto_20190528_2205.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0007_auto_20190528_2205.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0008_auto_20190528_2205.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0008_auto_20190528_2205.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0010_auto_20190529_0038.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0010_auto_20190529_0038.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0011_position.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0011_position.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0012_auto_20190602_1142.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0012_auto_20190602_1142.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0013_auto_20190602_1150.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0013_auto_20190602_1150.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0014_auto_20190602_1153.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0014_auto_20190602_1153.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0015_auto_20190602_1155.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0015_auto_20190602_1155.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0016_auto_20190602_1156.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0016_auto_20190602_1156.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0017_auto_20190605_0057.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0017_auto_20190605_0057.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0018_auto_20190606_1436.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0018_auto_20190606_1436.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0019_auto_20190606_1535.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0019_auto_20190606_1535.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0020_auto_20190606_2318.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0020_auto_20190606_2318.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0021_auto_20190606_2344.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0021_auto_20190606_2344.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0022_auto_20190609_2340.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0022_auto_20190609_2340.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0023_auto_20190609_2343.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0023_auto_20190609_2343.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/0024_auto_20190609_2343.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/0024_auto_20190609_2343.cpython-36.pyc
--------------------------------------------------------------------------------
/user/migrations/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/user/migrations/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/user/templates/Staff.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 | {% load staticfiles %}
3 |
4 | {% block title %}
5 | 员工
6 | {% endblock %}
7 |
8 | {% block content %} 这是一张员工表 {% endblock %}
--------------------------------------------------------------------------------
/user/templates/attendence_form.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}生产日报{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
增加
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/user/templates/attendence_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>查找考勤信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/user/templates/login.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>登录{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if not user.is_authenticated %}
10 |
11 |
12 |
登录
13 |
14 |
28 |
29 | {% else %}
30 |
{{user.username}}
31 |
已登录,跳转到首页...
32 |
35 | {% endif %}
36 |
37 |
38 |
39 | {% endblock %}
--------------------------------------------------------------------------------
/user/templates/salary_normal_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>查找工资信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/user/templates/salary_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>查找工资信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/user/templates/staff_type_add.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>增加工种{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
增加
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/user/templates/staff_type_modify.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>修改工种信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
修改
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/user/templates/user_append.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>新增员工{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
注册
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/user/templates/user_info.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}个人资料{% endblock %}
4 | {% block nav_home_active %}active{% endblock %}
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
姓名:{{ user.username }}
11 |
12 | - 职位:{{user.get_staff_type}}
13 | - 性别:{{user.get_staff_gender}}
14 | - 年龄:{{user.get_staff_age}}岁
15 | - 民族:{{user.get_staff_nationality}}
16 | - 籍贯:{{user.get_staff_home}}
17 | - 入职时间:{{user.get_start_time}}
18 | - 电话:{{user.get_staff_tel}}
19 | - 身份证:{{user.get_id_card}}
20 | - 时薪:{{user.get_salary_pre_hour}}元/小时
21 | - 上一次登录的时间:{{ user.last_login|date:"Y-m-d H:i:s" }}
22 | - 修改密码
23 |
24 | {% else %}
25 |
未登录,跳转到首页...
26 |
29 | {% endif %}
30 |
31 |
32 |
33 | {% endblock %}
--------------------------------------------------------------------------------
/user/templates/user_modify.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>修改员工信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
修改
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/user/templates/user_normal_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>查找员工信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
27 |
28 | {% else %}
29 |
32 | {% endif %}
33 |
34 |
35 |
36 | {% endblock %}
--------------------------------------------------------------------------------
/user/templates/user_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>查找员工信息{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/user/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/user/urls.py:
--------------------------------------------------------------------------------
1 | from django.urls import path
2 | from . import views
3 |
4 |
5 | urlpatterns = [
6 | #path('login_for_medal/', views.login_for_medal, name='login_for_medal'),
7 | path('login/', views.login, name='login'),
8 | path('userappend/', views.userappend, name='userappend'),
9 | path('user_normal_select/', views.user_normal_select, name='user_normal_select'),
10 | path('logout/', views.logout, name='logout'),
11 | path('user_info/', views.user_info, name='user_info'),
12 | path('user_list/', views.user_list, name='user_list'),
13 | path('user_select/', views.user_select, name='user_select'),
14 | path('attendence_list/', views.attendence_list, name='attendence_list'),
15 | path('attendence_lists/', views.attendence_lists, name='attendence_lists'),
16 | path('position_lists/', views.position_lists, name='position_lists'),
17 | path('staff_type_modify/', views.staff_type_modify, name='staff_type_modify'),
18 | path('staff_type_add/', views.staff_type_add, name='staff_type_add'),
19 | path('staff_type_delete/', views.staff_type_delete, name='staff_type_delete'),
20 | path('salary_list/', views.salary_list, name='salary_list'),
21 | path('salary_lists/', views.salary_lists, name='salary_lists'),
22 | path('caculate_salary/', views.caculate_salary, name='caculate_salary'),
23 | path('salary_normal_select/', views.salary_normal_select, name='salary_normal_select'),
24 | path('salary_select/', views.salary_select, name='salary_select'),
25 | #path('change_nickname/', views.change_nickname, name='change_nickname'),
26 | #path('bind_email/', views.bind_email, name='bind_email'),
27 | #path('send_verification_code/', views.send_verification_code, name='send_verification_code'),
28 | path('change_password/', views.change_password, name='change_password'),
29 | #path('forgot_password/', views.forgot_password, name='forgot_password'),
30 | path('user_delete/', views.user_delete, name='user_delete'),
31 | path('user_modify/', views.usermodify, name='user_modify'),
32 | path('attendence_append/', views.attendence_append, name='attendence_append'),
33 | path('attendence_select/', views.attendence_select, name='attendence_select'),
34 | path('attendence_delete/', views.attendence_delete, name='attendence_delete'),
35 | path('attendence_modify/', views.attendence_modify, name='attendence_modify'),
36 | ]
--------------------------------------------------------------------------------
/warehouse/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/__init__.py
--------------------------------------------------------------------------------
/warehouse/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/__pycache__/admin.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/__pycache__/admin.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/__pycache__/forms.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/__pycache__/forms.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/__pycache__/models.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/__pycache__/models.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/__pycache__/urls.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/__pycache__/urls.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/__pycache__/views.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/__pycache__/views.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from .models import Warehouse, PurchaseList, ProduceDiary, Product, Goods, WarehouseSource
3 |
4 | # Register your models here.
5 | @admin.register(Product)
6 | class ProductAdmin(admin.ModelAdmin):
7 | list_display = ("id", "product_name")
8 |
9 |
10 | @admin.register(Warehouse)
11 | class WarehouseAdmin(admin.ModelAdmin):
12 | list_display = ("id", "current_time", "product_name", "number", "unit")
13 |
14 |
15 | @admin.register(WarehouseSource)
16 | class WarehouseSourceAdmin(admin.ModelAdmin):
17 | list_display = ("id", "current_time", "source_name", "number", "unit")
18 |
19 |
20 | @admin.register(PurchaseList)
21 | class PurchaseListAdmin(admin.ModelAdmin):
22 | list_display = ("good_name", "good_version", "good_num", "apply_staff_name", "apply_date",
23 | "sanction_staff_name", "sanction_date", "price", "total_price",
24 | "buyer_name", "buyer_date", "price", "total_price")
25 |
26 |
27 | @admin.register(ProduceDiary)
28 | class ProduceDiaryAdmin(admin.ModelAdmin):
29 | list_display = ("id", "current_time", "staff_name", "product_name", "today_done_num", "qualified_num")
30 |
31 |
32 | @admin.register(Goods)
33 | class GoodsAdmin(admin.ModelAdmin):
34 | list_display = ("id", "good_name")
35 |
--------------------------------------------------------------------------------
/warehouse/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class WarehouseConfig(AppConfig):
5 | name = 'warehouse'
6 |
--------------------------------------------------------------------------------
/warehouse/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 06:55
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | initial = True
9 |
10 | dependencies = [
11 | ]
12 |
13 | operations = [
14 | migrations.CreateModel(
15 | name='Warehouse',
16 | fields=[
17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18 | ('current_time', models.DateField(auto_now_add=True)),
19 | ('luosi_num', models.IntegerField(default=0)),
20 | ('luosi_change', models.IntegerField(default=0)),
21 | ('luomu_num', models.IntegerField(default=0)),
22 | ('luomu_change', models.IntegerField(default=0)),
23 | ('product1_num', models.IntegerField(default=0)),
24 | ('product1_change', models.IntegerField(default=0)),
25 | ],
26 | ),
27 | ]
28 |
--------------------------------------------------------------------------------
/warehouse/migrations/0002_auto_20190528_1508.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 07:08
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('warehouse', '0001_initial'),
10 | ]
11 |
12 | operations = [
13 | migrations.RemoveField(
14 | model_name='warehouse',
15 | name='luomu_change',
16 | ),
17 | migrations.RemoveField(
18 | model_name='warehouse',
19 | name='luosi_change',
20 | ),
21 | migrations.RemoveField(
22 | model_name='warehouse',
23 | name='product1_change',
24 | ),
25 | migrations.AlterField(
26 | model_name='warehouse',
27 | name='current_time',
28 | field=models.DateField(auto_now_add=True, verbose_name='时间'),
29 | ),
30 | migrations.AlterField(
31 | model_name='warehouse',
32 | name='luomu_num',
33 | field=models.IntegerField(default=0, verbose_name='螺母'),
34 | ),
35 | migrations.AlterField(
36 | model_name='warehouse',
37 | name='luosi_num',
38 | field=models.IntegerField(default=0, verbose_name='螺丝'),
39 | ),
40 | migrations.AlterField(
41 | model_name='warehouse',
42 | name='product1_num',
43 | field=models.IntegerField(default=0, verbose_name='产品一'),
44 | ),
45 | ]
46 |
--------------------------------------------------------------------------------
/warehouse/migrations/0003_purchaselist.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 07:19
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('warehouse', '0002_auto_20190528_1508'),
10 | ]
11 |
12 | operations = [
13 | migrations.CreateModel(
14 | name='PurchaseList',
15 | fields=[
16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
17 | ('good_name', models.CharField(max_length=100, verbose_name='品名')),
18 | ('good_version', models.CharField(max_length=100, verbose_name='型号')),
19 | ('good_num', models.IntegerField(default=0, verbose_name='数量')),
20 | ('apply_staff_name', models.CharField(max_length=100, verbose_name='申请人')),
21 | ('apply_date', models.DateField(auto_now_add=True, verbose_name='申请日期')),
22 | ('sanction_staff_name', models.CharField(max_length=100, verbose_name='批准人')),
23 | ('sanction_date', models.DateField(auto_now_add=True, verbose_name='批准日期')),
24 | ('buyer_name', models.DateField(auto_now_add=True, verbose_name='采购员')),
25 | ('buyer_date', models.DateField(auto_now_add=True, verbose_name='采购日期')),
26 | ('price', models.BigIntegerField(default=0, verbose_name='单价')),
27 | ('total_price', models.BigIntegerField(default=0, verbose_name='总价')),
28 | ],
29 | ),
30 | ]
31 |
--------------------------------------------------------------------------------
/warehouse/migrations/0004_auto_20190528_1529.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 07:29
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('warehouse', '0003_purchaselist'),
10 | ]
11 |
12 | operations = [
13 | migrations.CreateModel(
14 | name='ProduceDiary',
15 | fields=[
16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
17 | ('current_time', models.DateField(auto_now_add=True, verbose_name='日期')),
18 | ('facility_id', models.IntegerField(default=0, verbose_name='设备')),
19 | ('staff_name', models.IntegerField(default=0, verbose_name='员工')),
20 | ('product_name', models.IntegerField(default=0, verbose_name='产品')),
21 | ('today_done_num', models.IntegerField(default=0, verbose_name='今日产量')),
22 | ('qualified_num', models.IntegerField(default=0, verbose_name='合格量')),
23 | ],
24 | ),
25 | migrations.AlterField(
26 | model_name='purchaselist',
27 | name='buyer_date',
28 | field=models.DateField(auto_now=True, verbose_name='采购日期'),
29 | ),
30 | migrations.AlterField(
31 | model_name='purchaselist',
32 | name='buyer_name',
33 | field=models.CharField(max_length=100, verbose_name='采购员'),
34 | ),
35 | migrations.AlterField(
36 | model_name='purchaselist',
37 | name='sanction_date',
38 | field=models.DateField(auto_now=True, verbose_name='批准日期'),
39 | ),
40 | migrations.AlterField(
41 | model_name='warehouse',
42 | name='current_time',
43 | field=models.DateField(auto_now_add=True, verbose_name='日期'),
44 | ),
45 | ]
46 |
--------------------------------------------------------------------------------
/warehouse/migrations/0005_remove_producediary_facility_id.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 08:36
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('warehouse', '0004_auto_20190528_1529'),
10 | ]
11 |
12 | operations = [
13 | migrations.RemoveField(
14 | model_name='producediary',
15 | name='facility_id',
16 | ),
17 | ]
18 |
--------------------------------------------------------------------------------
/warehouse/migrations/0006_auto_20190528_1656.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 08:56
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('facility', '0001_initial'),
12 | ('warehouse', '0005_remove_producediary_facility_id'),
13 | ]
14 |
15 | operations = [
16 | migrations.AddField(
17 | model_name='producediary',
18 | name='facility_id',
19 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='facility.Facility', verbose_name='设备'),
20 | ),
21 | migrations.AlterField(
22 | model_name='purchaselist',
23 | name='apply_staff_name',
24 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='申请人'),
25 | ),
26 | ]
27 |
--------------------------------------------------------------------------------
/warehouse/migrations/0008_auto_20190528_1920.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-28 11:20
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('warehouse', '0007_auto_20190528_1913'),
12 | ]
13 |
14 | operations = [
15 | migrations.RemoveField(
16 | model_name='purchaselist',
17 | name='good_name',
18 | ),
19 | migrations.RemoveField(
20 | model_name='purchaselist',
21 | name='good_num',
22 | ),
23 | migrations.RemoveField(
24 | model_name='purchaselist',
25 | name='good_version',
26 | ),
27 | migrations.RemoveField(
28 | model_name='purchaselistsanction',
29 | name='good_name',
30 | ),
31 | migrations.RemoveField(
32 | model_name='purchaselistsanction',
33 | name='good_num',
34 | ),
35 | migrations.RemoveField(
36 | model_name='purchaselistsanction',
37 | name='good_version',
38 | ),
39 | migrations.AlterField(
40 | model_name='purchaselist',
41 | name='buyer_name',
42 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='采购员'),
43 | ),
44 | migrations.AlterField(
45 | model_name='purchaselistsanction',
46 | name='sanction_staff_name',
47 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='批准人'),
48 | ),
49 | ]
50 |
--------------------------------------------------------------------------------
/warehouse/migrations/0009_auto_20190530_1525.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-30 07:25
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('warehouse', '0008_auto_20190528_1920'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='producediary',
17 | name='staff_name',
18 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='员工'),
19 | ),
20 | migrations.AlterField(
21 | model_name='purchaselist',
22 | name='buyer_name',
23 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='采购员'),
24 | ),
25 | ]
26 |
--------------------------------------------------------------------------------
/warehouse/migrations/0010_product.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-30 07:34
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('warehouse', '0009_auto_20190530_1525'),
10 | ]
11 |
12 | operations = [
13 | migrations.CreateModel(
14 | name='Product',
15 | fields=[
16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
17 | ('product_name', models.CharField(max_length=100)),
18 | ],
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/warehouse/migrations/0011_auto_20190530_1536.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-05-30 07:36
2 |
3 | from django.db import migrations, models
4 | import django.db.models.deletion
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('warehouse', '0010_product'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='producediary',
16 | name='product_name',
17 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='warehouse.Product', verbose_name='产品'),
18 | ),
19 | ]
20 |
--------------------------------------------------------------------------------
/warehouse/migrations/0012_auto_20190601_2204.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-01 14:04
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('warehouse', '0011_auto_20190530_1536'),
10 | ]
11 |
12 | operations = [
13 | migrations.RemoveField(
14 | model_name='purchaselist',
15 | name='PurchaseList_id',
16 | ),
17 | migrations.RemoveField(
18 | model_name='purchaselist',
19 | name='buyer_name',
20 | ),
21 | migrations.RemoveField(
22 | model_name='purchaselistapply',
23 | name='apply_staff_name',
24 | ),
25 | migrations.RemoveField(
26 | model_name='purchaselistsanction',
27 | name='PurchaseList_sanction_id',
28 | ),
29 | migrations.RemoveField(
30 | model_name='purchaselistsanction',
31 | name='sanction_staff_name',
32 | ),
33 | migrations.DeleteModel(
34 | name='PurchaseList',
35 | ),
36 | migrations.DeleteModel(
37 | name='PurchaseListApply',
38 | ),
39 | migrations.DeleteModel(
40 | name='PurchaseListSanction',
41 | ),
42 | ]
43 |
--------------------------------------------------------------------------------
/warehouse/migrations/0013_purchaselist.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-01 14:04
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL),
12 | ('warehouse', '0012_auto_20190601_2204'),
13 | ]
14 |
15 | operations = [
16 | migrations.CreateModel(
17 | name='PurchaseList',
18 | fields=[
19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
20 | ('good_name', models.CharField(max_length=100, null=True, verbose_name='品名')),
21 | ('good_version', models.CharField(max_length=100, null=True, verbose_name='型号')),
22 | ('good_num', models.IntegerField(default=0, null=True, verbose_name='数量')),
23 | ('apply_date', models.DateField(auto_now_add=True, null=True, verbose_name='申请日期')),
24 | ('sanction_date', models.DateField(auto_now=True, null=True, verbose_name='批准日期')),
25 | ('price', models.BigIntegerField(default=0, null=True, verbose_name='单价')),
26 | ('total_price', models.BigIntegerField(default=0, null=True, verbose_name='总价')),
27 | ('buyer_date', models.DateField(auto_now=True, null=True, verbose_name='采购日期')),
28 | ('apply_staff_name', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='purchase_a', to=settings.AUTH_USER_MODEL, verbose_name='申请人')),
29 | ('buyer_name', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='purchase_c', to=settings.AUTH_USER_MODEL, verbose_name='采购员')),
30 | ('sanction_staff_name', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='purchase_b', to=settings.AUTH_USER_MODEL, verbose_name='批准人')),
31 | ],
32 | ),
33 | ]
34 |
--------------------------------------------------------------------------------
/warehouse/migrations/0014_auto_20190601_2206.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-01 14:06
2 |
3 | from django.db import migrations
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('warehouse', '0013_purchaselist'),
10 | ]
11 |
12 | operations = [
13 | migrations.RemoveField(
14 | model_name='purchaselist',
15 | name='apply_staff_name',
16 | ),
17 | migrations.RemoveField(
18 | model_name='purchaselist',
19 | name='buyer_name',
20 | ),
21 | migrations.RemoveField(
22 | model_name='purchaselist',
23 | name='sanction_staff_name',
24 | ),
25 | migrations.DeleteModel(
26 | name='PurchaseList',
27 | ),
28 | ]
29 |
--------------------------------------------------------------------------------
/warehouse/migrations/0015_purchaselist.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-01 14:07
2 |
3 | from django.conf import settings
4 | from django.db import migrations, models
5 | import django.db.models.deletion
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL),
12 | ('warehouse', '0014_auto_20190601_2206'),
13 | ]
14 |
15 | operations = [
16 | migrations.CreateModel(
17 | name='PurchaseList',
18 | fields=[
19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
20 | ('good_name', models.CharField(max_length=100, verbose_name='品名')),
21 | ('good_version', models.CharField(max_length=100, verbose_name='型号')),
22 | ('good_num', models.IntegerField(verbose_name='数量')),
23 | ('apply_date', models.DateField(auto_now_add=True, verbose_name='申请日期')),
24 | ('sanction_date', models.DateField(auto_now=True, verbose_name='批准日期')),
25 | ('price', models.BigIntegerField(verbose_name='单价')),
26 | ('total_price', models.BigIntegerField(verbose_name='总价')),
27 | ('buyer_date', models.DateField(auto_now=True, verbose_name='采购日期')),
28 | ('apply_staff_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='purchase_a', to=settings.AUTH_USER_MODEL, verbose_name='申请人')),
29 | ('buyer_name', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='purchase_c', to=settings.AUTH_USER_MODEL, verbose_name='采购员')),
30 | ('sanction_staff_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='purchase_b', to=settings.AUTH_USER_MODEL, verbose_name='批准人')),
31 | ],
32 | ),
33 | ]
34 |
--------------------------------------------------------------------------------
/warehouse/migrations/0016_goods.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-01 14:08
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('warehouse', '0015_purchaselist'),
10 | ]
11 |
12 | operations = [
13 | migrations.CreateModel(
14 | name='Goods',
15 | fields=[
16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
17 | ('good_name', models.CharField(max_length=100)),
18 | ],
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/warehouse/migrations/0018_auto_20190607_0031.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-06 16:31
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('warehouse', '0017_auto_20190606_2344'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='warehouse',
15 | name='number',
16 | field=models.CharField(max_length=100, null=True, verbose_name='数量'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/warehouse/migrations/0019_auto_20190607_0032.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-06 16:32
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('warehouse', '0018_auto_20190607_0031'),
10 | ]
11 |
12 | operations = [
13 | migrations.AlterField(
14 | model_name='warehouse',
15 | name='number',
16 | field=models.IntegerField(null=True, verbose_name='数量'),
17 | ),
18 | migrations.AlterField(
19 | model_name='warehouse',
20 | name='unit',
21 | field=models.CharField(max_length=10, null=True, verbose_name='单位'),
22 | ),
23 | ]
24 |
--------------------------------------------------------------------------------
/warehouse/migrations/0020_warehousesource.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-07 01:56
2 |
3 | from django.db import migrations, models
4 | import django.db.models.deletion
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('warehouse', '0019_auto_20190607_0032'),
11 | ]
12 |
13 | operations = [
14 | migrations.CreateModel(
15 | name='WarehouseSource',
16 | fields=[
17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18 | ('current_time', models.DateField(auto_now_add=True, verbose_name='日期')),
19 | ('number', models.IntegerField(null=True, verbose_name='数量')),
20 | ('unit', models.CharField(max_length=10, null=True, verbose_name='单位')),
21 | ('source_name', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='warehouse.Goods', verbose_name='原料类型')),
22 | ],
23 | options={
24 | 'ordering': ['-current_time'],
25 | },
26 | ),
27 | ]
28 |
--------------------------------------------------------------------------------
/warehouse/migrations/0021_auto_20190607_2008.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0 on 2019-06-07 12:08
2 |
3 | from django.db import migrations, models
4 | import django.db.models.deletion
5 |
6 |
7 | class Migration(migrations.Migration):
8 |
9 | dependencies = [
10 | ('warehouse', '0020_warehousesource'),
11 | ]
12 |
13 | operations = [
14 | migrations.AlterField(
15 | model_name='producediary',
16 | name='facility_id',
17 | field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='facility.Facility', verbose_name='设备'),
18 | ),
19 | ]
20 |
--------------------------------------------------------------------------------
/warehouse/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__init__.py
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0001_initial.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0001_initial.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0002_auto_20190528_1508.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0002_auto_20190528_1508.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0003_purchaselist.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0003_purchaselist.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0004_auto_20190528_1529.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0004_auto_20190528_1529.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0005_remove_producediary_facility_id.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0005_remove_producediary_facility_id.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0006_auto_20190528_1656.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0006_auto_20190528_1656.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0007_auto_20190528_1913.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0007_auto_20190528_1913.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0008_auto_20190528_1920.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0008_auto_20190528_1920.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0009_auto_20190530_1525.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0009_auto_20190530_1525.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0010_product.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0010_product.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0011_auto_20190530_1536.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0011_auto_20190530_1536.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0012_auto_20190601_2204.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0012_auto_20190601_2204.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0013_purchaselist.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0013_purchaselist.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0014_auto_20190601_2206.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0014_auto_20190601_2206.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0015_purchaselist.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0015_purchaselist.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0016_goods.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0016_goods.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0017_auto_20190606_2344.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0017_auto_20190606_2344.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0018_auto_20190607_0031.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0018_auto_20190607_0031.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0019_auto_20190607_0032.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0019_auto_20190607_0032.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0020_warehousesource.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0020_warehousesource.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/0021_auto_20190607_2008.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/0021_auto_20190607_2008.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/migrations/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secrul/factory-manage/51f87a628931dfd3ed88cdccf36ada8f3c0bf951/warehouse/migrations/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/warehouse/templates/apply.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>采购申请{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
采购申请单
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/price.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}诺百特>登录{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
登录
13 |
14 |
27 |
28 | {% else %}
29 |
{{user.username}}
30 |
已登录,跳转到首页...
31 |
34 | {% endif %}
35 |
36 |
37 |
38 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/product_diary.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}全体员工{% endblock %}
4 | {% block nav_producediary_active %}active{% endblock %}
5 |
6 | {% block content %}
7 |
8 |
9 |
10 | {% if user.is_authenticated %}
11 |
12 | 新增生产日报
13 | 查询
14 |
15 |
16 | 日期 |
17 | 设备 |
18 | 员工 |
19 | 产品 |
20 | 今日产量 |
21 | 合格量 |
22 | 修改 |
23 | 删除 |
24 |
25 |
26 |
27 | {%for product_diary in product_diaries%}
28 |
29 | {{product_diary.current_time}} |
30 | {{product_diary.facility_id}} |
31 | {{product_diary.staff_name}} |
32 | {{product_diary.product_name}} |
33 | {{product_diary.today_done_num}} |
34 | {{product_diary.qualified_num}} |
35 | 修改 |
36 | 删除 |
37 |
38 | {% endfor %}
39 |
40 |
41 | {% else %}
42 |
未登录,跳转到首页...
43 |
46 | {% endif %}
47 |
48 |
49 |
50 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/product_diary_append.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}生产日报{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
增加
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/product_diary_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}查找生产日报{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/product_list.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}产品类型{% endblock %}
4 | {% if user.is_authenticated %}
5 |
6 | {% block nav_warehouse_active %}active{% endblock %}
7 | {% endif %}
8 | {% block content %}
9 |
10 |
11 |
12 | {% if user.is_authenticated %}
13 |
14 | 增加产品类型
15 |
16 |
17 | 产品类型 |
18 | 修改 |
19 |
20 |
21 |
22 | {%for product in products%}
23 |
24 | {{product.product_name}} |
25 | 修改 |
26 |
27 | {% endfor %}
28 |
29 |
30 | {% else %}
31 |
未登录,跳转到首页...
32 |
35 | {% endif %}
36 |
37 |
38 |
39 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/product_type_append.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}产品类型{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
增加
13 |
14 |
27 |
28 | {% else %}
29 |
32 | {% endif %}
33 |
34 |
35 |
36 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/purchaselist_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}查找采购记录{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/source_diary.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}原料日报{% endblock %}
4 | {% block nav_warehousediary_active %}active{% endblock %}
5 |
6 | {% block content %}
7 |
8 |
9 |
10 | {% if user.is_authenticated %}
11 |
12 | 增加原料日报
13 | 查找
14 |
15 |
16 | 日期 |
17 | 类型 |
18 | 数量 |
19 | 单位 |
20 | 修改 |
21 | 删除 |
22 |
23 |
24 |
25 |
26 | {%for source_diary in source_diaries%}
27 |
28 | {{source_diary.current_time}} |
29 | {{source_diary.source_name}} |
30 | {{source_diary.number}} |
31 | {{source_diary.unit}} |
32 | 修改 |
33 | 删除 |
34 |
35 | {% endfor %}
36 |
37 |
38 | {% else %}
39 |
未登录,跳转到首页...
40 |
43 | {% endif %}
44 |
45 |
46 |
47 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/source_list.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}原料类型{% endblock %}
4 | {% if user.is_authenticated %}
5 |
6 | {% block nav_warehouse_active %}active{% endblock %}
7 | {% endif %}
8 | {% block content %}
9 |
10 |
11 |
12 | {% if user.is_authenticated %}
13 |
14 | 增加原料类型
15 |
16 |
17 | 原料品名 |
18 | 修改 |
19 |
20 |
21 |
22 | {%for source in goods%}
23 |
24 | {{source.good_name}} |
25 | 修改 |
26 |
27 |
28 | {% endfor %}
29 |
30 |
31 | {% else %}
32 |
未登录,跳转到首页...
33 |
36 | {% endif %}
37 |
38 |
39 |
40 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/source_type_append.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}原料类型{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
增加
13 |
14 |
27 |
28 | {% else %}
29 |
32 | {% endif %}
33 |
34 |
35 |
36 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/warehouse_diary.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}全体员工{% endblock %}
4 | {% block nav_warehousediary_active %}active{% endblock %}
5 |
6 | {% block content %}
7 |
8 |
9 |
10 | {% if user.is_authenticated %}
11 |
12 | 增加产品日报
13 | 查找
14 |
15 |
16 | 日期 |
17 | 类型 |
18 | 数量 |
19 | 单位 |
20 | 修改 |
21 | 删除 |
22 |
23 |
24 |
25 |
26 | {%for warehouse_diary in warehouse_diaries%}
27 |
28 | {{warehouse_diary.current_time}} |
29 | {{warehouse_diary.product_name}} |
30 | {{warehouse_diary.number}} |
31 | {{warehouse_diary.unit}} |
32 | 修改 |
33 | 删除 |
34 |
35 | {% endfor %}
36 |
37 |
38 | {% else %}
39 |
未登录,跳转到首页...
40 |
43 | {% endif %}
44 |
45 |
46 |
47 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/warehouse_diary_append.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}仓库日报{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
增加
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/warehouse_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}查找生产日报{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
27 |
28 | {% else %}
29 |
32 | {% endif %}
33 |
34 |
35 |
36 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/warehouse_source_diary_append.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}原料日报{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
增加
13 |
14 |
28 |
29 | {% else %}
30 |
33 | {% endif %}
34 |
35 |
36 |
37 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/templates/warehouse_source_select.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block title %}查找原料日报{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
9 | {% if user.is_authenticated %}
10 |
11 |
12 |
查找
13 |
14 |
27 |
28 | {% else %}
29 |
32 | {% endif %}
33 |
34 |
35 |
36 | {% endblock %}
--------------------------------------------------------------------------------
/warehouse/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------