This commit is contained in:
王思川 2024-05-15 09:31:38 +08:00
parent 0bb7138499
commit d0270104a1
9 changed files with 30 additions and 6 deletions

View File

@ -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

View File

@ -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"

View File

@ -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 = '集团经营目标表'

View File

@ -1,3 +0,0 @@
from django.db import models
# Create your models here.