diff --git a/XH_Digital_Management/settings.py b/XH_Digital_Management/settings.py index b3da346..916f08b 100644 --- a/XH_Digital_Management/settings.py +++ b/XH_Digital_Management/settings.py @@ -37,6 +37,7 @@ INSTALLED_APPS = [ "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", + 'application.performance_management', ] MIDDLEWARE = [ @@ -104,9 +105,9 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/5.0/topics/i18n/ -LANGUAGE_CODE = "en-us" +LANGUAGE_CODE = "zh-hans" -TIME_ZONE = "UTC" +TIME_ZONE = "Asia/Shanghai" USE_I18N = True diff --git a/performance_management/__init__.py b/application/performance_management/__init__.py similarity index 100% rename from performance_management/__init__.py rename to application/performance_management/__init__.py diff --git a/performance_management/admin.py b/application/performance_management/admin.py similarity index 100% rename from performance_management/admin.py rename to application/performance_management/admin.py diff --git a/performance_management/apps.py b/application/performance_management/apps.py similarity index 74% rename from performance_management/apps.py rename to application/performance_management/apps.py index 907c15f..976f189 100644 --- a/performance_management/apps.py +++ b/application/performance_management/apps.py @@ -3,4 +3,4 @@ from django.apps import AppConfig class PerformanceManagementConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" - name = "performance_management" + name = "application.performance_management" diff --git a/performance_management/migrations/__init__.py b/application/performance_management/migrations/__init__.py similarity index 100% rename from performance_management/migrations/__init__.py rename to application/performance_management/migrations/__init__.py diff --git a/application/performance_management/models.py b/application/performance_management/models.py new file mode 100644 index 0000000..35b2d89 --- /dev/null +++ b/application/performance_management/models.py @@ -0,0 +1,26 @@ +from django.db import models + + +class GroupTargets(models.Model): + PROJECT_NATURE_CHOICES = [ + ('new', '新增'), + ('existing', '存续'), + ('new_and_existing', '新增及存续'), + ('old_customer_new_business', '老客户新业务') + ] + + primary_department = models.CharField(max_length=255, blank=False, verbose_name='一级部门') + year = models.IntegerField(blank=False, verbose_name='年份') + project_nature = models.CharField(max_length=50, choices=PROJECT_NATURE_CHOICES, blank=False, verbose_name='项目性质') + sales = models.DecimalField(max_digits=17, decimal_places=2, blank=False, verbose_name='销售额') + total_revenue_target = models.DecimalField(max_digits=17, decimal_places=2, blank=False, verbose_name='收入总目标') + new_revenue_target = models.DecimalField(max_digits=17, decimal_places=2, blank=False, verbose_name='新增收入目标') + existing_revenue_target = models.DecimalField(max_digits=17, decimal_places=2, blank=False, verbose_name='存量收入目标') + cost_limit = models.DecimalField(max_digits=17, decimal_places=2, blank=False, verbose_name='成本限额') + gross_profit = models.DecimalField(max_digits=17, decimal_places=2, blank=False, verbose_name='毛利润') + expense_limit = models.DecimalField(max_digits=17, decimal_places=2, blank=False, verbose_name='费用限额') + operating_profit = models.DecimalField(max_digits=17, decimal_places=2, blank=False, verbose_name='营业利润') + + class Meta: + verbose_name = '集团经营目标表' + verbose_name_plural = '集团经营目标表' diff --git a/performance_management/tests.py b/application/performance_management/tests.py similarity index 100% rename from performance_management/tests.py rename to application/performance_management/tests.py diff --git a/performance_management/views.py b/application/performance_management/views.py similarity index 100% rename from performance_management/views.py rename to application/performance_management/views.py diff --git a/performance_management/models.py b/performance_management/models.py deleted file mode 100644 index 71a8362..0000000 --- a/performance_management/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here.