This commit is contained in:
caoqianming 2020-09-21 10:59:26 +08:00
parent 4284a5d34e
commit 4ca5c93f80
5 changed files with 80 additions and 45 deletions

View File

@ -1,11 +1,10 @@
<template>
<div>
<el-card >
<el-card>
<div slot="header" class="clearfix">
<span>认证结果评价</span>
<el-button type="primary" >创建</el-button>
</div>
<el-table
<!-- <el-table
ref="elTable"
v-loading="listLoading"
:data="tableData"
@ -19,31 +18,26 @@
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
<el-table-column label="工厂检查结论">
<template slot-scope="scope">
{{ scope.row.conclusion }}
</template>
<template slot-scope="scope">{{ scope.row.conclusion }}</template>
</el-table-column>
<el-table-column label="不符合项分类">
<template slot-scope="scope" >{{ scope.row.create_time }}</template>
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">
{{ scope.row.create_time }}
</template>
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
</el-table>
</el-table> -->
</el-card>
</div>
</template>
<script>
export default {
name:'access',
name: "access",
data() {
return {
listLoading:false,
tableData:[]
}
}
}
listLoading: false,
tableData: [],
};
},
};
</script>

View File

@ -0,0 +1,19 @@
# Generated by Django 3.0.7 on 2020-09-21 02:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('laboratory', '0005_auto_20200824_1649'),
('crm', '0014_auto_20200918_1557'),
]
operations = [
migrations.AddField(
model_name='certunit',
name='testorgs',
field=models.ManyToManyField(to='laboratory.TestOrg', verbose_name='检测机构'),
),
]

View File

@ -80,6 +80,7 @@ class EnterpriseAddress(CommonAModel):
return self.name
from apps.certset.models import ImplementRule, UnitType, Standard
from apps.laboratory.models import TestOrg
class Certunit(CommonAModel):
"""
认证单元
@ -90,3 +91,4 @@ class Certunit(CommonAModel):
unittype = models.ForeignKey(UnitType, verbose_name='单元类型', on_delete = models.DO_NOTHING, related_name='certunit_unittype')
standard = models.ForeignKey(Standard, verbose_name='采用标准', on_delete = models.DO_NOTHING, related_name='certunit_standard')
enterprise = models.ForeignKey(Enterprise, verbose_name='所属公司', on_delete = models.DO_NOTHING, related_name='certunit_enterprise')
testorgs = models.ManyToManyField(TestOrg, verbose_name='检测机构')

View File

@ -0,0 +1,20 @@
# Generated by Django 3.0.7 on 2020-09-21 02:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('laboratory', '0005_auto_20200824_1649'),
('project', '0037_auto_20200918_1557'),
]
operations = [
migrations.AddField(
model_name='certappunit',
name='testorg',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='laboratory.TestOrg', verbose_name='检测机构'),
),
]

View File

@ -204,7 +204,7 @@ class Certappunit(CommonBModel):
"""
certunit = models.ForeignKey('crm.Certunit', verbose_name='单元', on_delete=models.CASCADE, related_name='certappunit_certunit')
certapp = models.ForeignKey(CertApp, verbose_name='所属业务', on_delete = models.CASCADE, related_name='certappunit_certapp')
testorg = models.ForeignKey('laboratory.TestOrg', verbose_name='检测机构', on_delete=models.SET_NULL, null=True, blank=True)
class Meta:
verbose_name = '认证单元'
verbose_name_plural = verbose_name