diff --git a/safesite/migrations/0344_auto_20200830_2053.py b/safesite/migrations/0344_auto_20200830_2053.py new file mode 100644 index 00000000..fdb43210 --- /dev/null +++ b/safesite/migrations/0344_auto_20200830_2053.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2.8 on 2020-08-30 20:53 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('safesite', '0343_auto_20200812_2104'), + ] + + operations = [ + # migrations.RemoveField( + # model_name='companyinfo', + # name='liaison_fax', + # ), + migrations.AddField( + model_name='eformitems', + name='type', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='safesite.Dickey'), + ), + ] diff --git a/safesite/migrations/0345_auto_20200830_2243.py b/safesite/migrations/0345_auto_20200830_2243.py new file mode 100644 index 00000000..2cf9781c --- /dev/null +++ b/safesite/migrations/0345_auto_20200830_2243.py @@ -0,0 +1,27 @@ +# Generated by Django 2.2.8 on 2020-08-30 22:43 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('safesite', '0344_auto_20200830_2053'), + ] + + operations = [ + # migrations.RemoveField( + # model_name='companyinfo', + # name='liaison_fax', + # ), + migrations.RemoveField( + model_name='eformitems', + name='type', + ), + migrations.AddField( + model_name='equipmentcheckitem', + name='type', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='safesite.Dickey'), + ), + ] diff --git a/safesite/models.py b/safesite/models.py index c0a7acf8..f0ed9345 100644 --- a/safesite/models.py +++ b/safesite/models.py @@ -884,6 +884,7 @@ class RiskAct(models.Model): # 风险点表 class EquipmentCheckItem(models.Model):# 检查项目 name = models.CharField(max_length=200,verbose_name='检查项目') content = models.CharField(max_length=400,verbose_name='检查内容') + type = models.ForeignKey(Dickey, on_delete=models.CASCADE, null=True, blank=True) class EquipmentCheckForm(models.Model):# 检查表 name = models.CharField(max_length=200,verbose_name='名称') @@ -899,6 +900,7 @@ class EquipmentCheckForm(models.Model):# 检查表 class EFormItems(models.Model): equipment_check_form = models.ForeignKey(EquipmentCheckForm,on_delete=models.CASCADE) equipment_check_item = models.ForeignKey(EquipmentCheckItem,on_delete=models.CASCADE) + submittime = models.DateField(default=timezone.now) class Equipment(models.Model): # 设备表 diff --git a/safesite/templates/equipmentcheckform.html b/safesite/templates/equipmentcheckform.html index 8bfd9c03..f6a62812 100644 --- a/safesite/templates/equipmentcheckform.html +++ b/safesite/templates/equipmentcheckform.html @@ -95,12 +95,14 @@ })} }); function addjcb(){ - opendg('新建检查表','html/equipmentcheckform/add') + var myw = screen.availWidth * 0.6; + opendg('新建检查表','html/equipmentcheckform/add', myw) } function editjcb(){ var row = $('#jcbtable').datagrid('getSelected'); if (row) { - opendg('编辑检查表','html/equipmentcheckform/update/'+row.id) + var myw = screen.availWidth * 0.6; + opendg('编辑检查表','html/equipmentcheckform/update/'+row.id, myw) } else { $.messager.alert('提示', '请选择一行数据!'); diff --git a/safesite/templates/equipmentcheckformadd.html b/safesite/templates/equipmentcheckformadd.html index cc3c7781..495339b2 100644 --- a/safesite/templates/equipmentcheckformadd.html +++ b/safesite/templates/equipmentcheckformadd.html @@ -16,12 +16,16 @@