xiugaiyangshi
This commit is contained in:
parent
2f317bd32c
commit
cadd1bc4bb
|
@ -5,6 +5,7 @@
|
|||
</template>
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
.el-table--medium td, .el-table--medium th {
|
||||
padding: 0px 0;
|
||||
}
|
||||
|
@ -12,6 +13,7 @@
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<script>
|
||||
export default {
|
||||
|
|
|
@ -93,7 +93,7 @@ export default {
|
|||
<style scoped>
|
||||
.pagination-container {
|
||||
background: #fff;
|
||||
padding: 32px 16px;
|
||||
padding: 0px 16px;
|
||||
}
|
||||
.pagination-container.hidden {
|
||||
display: none;
|
||||
|
|
|
@ -91,9 +91,13 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :md="5">
|
||||
<el-form-item label="认可情况">
|
||||
<el-input v-model="formData.is_approve"></el-input>
|
||||
<el-form-item label="认可情况" prop="is_approve">
|
||||
<el-switch v-model="formData.is_approve"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#8C969D">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
@ -123,8 +127,20 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :xs="24" :md="8">
|
||||
<el-form-item label="依据的体系标准">
|
||||
<el-input v-model="formData.system_standard"></el-input>
|
||||
|
||||
<el-form-item label="依据的体系标准" prop="system_standard">
|
||||
<el-select v-model="formData.system_standard"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
:style="{width: '100%'}">
|
||||
<el-option v-for="(item, index) in type_Options"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled">
|
||||
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
@ -135,9 +151,21 @@
|
|||
</el-col>-->
|
||||
|
||||
|
||||
<el-col :xs="24" :md="8">
|
||||
<el-col :xs="24" :md="12">
|
||||
<el-form-item label="专业代码">
|
||||
<el-input v-model="formData.professional_code"></el-input>
|
||||
<el-select v-model="formData.professional_code"
|
||||
multiple
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
:style="{width: '100%'}"
|
||||
placeholder="请选择专业代码">
|
||||
<el-option v-for="item in professionaloptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
@ -158,7 +186,7 @@
|
|||
|
||||
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="机构转换" name="4">
|
||||
<!--<el-collapse-item title="机构转换" name="4">
|
||||
<el-row>
|
||||
<el-col :xs="24" :md="8">
|
||||
<el-form-item label="原认证机构名称">
|
||||
|
@ -242,7 +270,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-collapse-item>
|
||||
</el-collapse-item>-->
|
||||
</el-collapse>
|
||||
</el-form>
|
||||
<div slot="footer" align="center">
|
||||
|
@ -290,7 +318,9 @@ export default {
|
|||
},
|
||||
dgType: 0,
|
||||
dgVisiable: false,
|
||||
addressOptions0: [],
|
||||
addressOptions0: [],
|
||||
type_Options: [],
|
||||
professionaloptions:[],
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
@ -302,12 +332,26 @@ export default {
|
|||
this.formData.id = this.certapp
|
||||
this.getCertapp_()
|
||||
}
|
||||
this.getTypeOptions();
|
||||
this.getProfOptions()
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
handleChange(val) {
|
||||
console.log(val);
|
||||
},
|
||||
getTypeOptions() {
|
||||
getDictList({ type__code: "system_standards" }).then(response => {
|
||||
this.type_Options = genTree(response.data);
|
||||
});
|
||||
|
||||
},
|
||||
getProfOptions() {
|
||||
getDictList({ type__code: "industry_classification" }).then(response => {
|
||||
this.professionaloptions = genTree(response.data);
|
||||
});
|
||||
|
||||
},
|
||||
getCertapp_(){
|
||||
getCertapp(this.formData.id).then(res=>{
|
||||
this.formData = res.data
|
||||
|
|
|
@ -4,7 +4,36 @@
|
|||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="评审信息">
|
||||
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="认证类型" prop="cert_field">
|
||||
<treeselect v-model="formData.cert_field" :multiple="false" :options="cert_fieldOptions" placeholder="请选择认证类型" :style="{width: '100%'}" @select="typeChange"
|
||||
:clearable="false" :defaultExpandLevel='1' :disable-branch-nodes="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="cert_field_code =='PV'">
|
||||
<el-form-item label="产品分类" prop="pv_class">
|
||||
<treeselect v-model="formData.pv_class"
|
||||
:disable-branch-nodes="true"
|
||||
placeholder="请选择产品分类"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
:options="pv_classOptions"
|
||||
:multiple="false"></treeselect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="cert_field_code =='CCC'">
|
||||
<el-form-item label="产品分类" prop="ccc_list">
|
||||
<treeselect v-model="formData.ccc_list"
|
||||
:disable-branch-nodes="true"
|
||||
placeholder="请选择产品分类"
|
||||
clearable
|
||||
:style="{width: '100%'}"
|
||||
:options="ccc_listOptions"
|
||||
:multiple="true"></treeselect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="评审标题" prop="name">
|
||||
|
@ -14,15 +43,7 @@
|
|||
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="评审代号" prop="cert_field">
|
||||
<el-input v-model="formData.cert_field" placeholder="请输入评审代号" clearable :style="{width: '100%'}"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" style="margin-top:4px">
|
||||
<el-form-item size="large">
|
||||
|
@ -41,7 +62,9 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getDictList } from "@/api/dict";
|
||||
import { createEvaluationItem} from "@/api/evaluationitem";
|
||||
import { genTree } from "@/utils";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
|
@ -56,21 +79,68 @@ export default {
|
|||
id: null,
|
||||
name:undefined,
|
||||
cert_field: undefined,
|
||||
pv_scope: undefined,
|
||||
pv_class: undefined,
|
||||
ccc_list: undefined
|
||||
|
||||
},
|
||||
rules: {
|
||||
|
||||
},
|
||||
cert_fieldOptions: [],
|
||||
cert_field_code:null,
|
||||
pv_scopeOptions: [],
|
||||
pv_classOptions: [],
|
||||
ccc_listOptions: [],
|
||||
cert_patternOptions: []
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
|
||||
this.getPvscope();
|
||||
this.getPvclass();
|
||||
this.getCccList();
|
||||
this.getCertpattern();
|
||||
this.getCerttype();
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
getCerttype() {
|
||||
getDictList({ type__code: "cert_field" }).then(response => {
|
||||
if (response.data) {
|
||||
this.cert_fieldOptions = genTree(response.data);
|
||||
}
|
||||
});
|
||||
},
|
||||
getPvscope() {
|
||||
getDictList({ type__code: "pv_scope" }).then(response => {
|
||||
if (response.data) {
|
||||
this.pv_scopeOptions = genTree(response.data);
|
||||
}
|
||||
});
|
||||
},
|
||||
getPvclass() {
|
||||
getDictList({ type__code: "pv_class" }).then(response => {
|
||||
if (response.data) {
|
||||
this.pv_classOptions = genTree(response.data);
|
||||
}
|
||||
});
|
||||
},
|
||||
getCccList() {
|
||||
getDictList({ type__code: "ccc_list" }).then(response => {
|
||||
if (response.data) {
|
||||
this.ccc_listOptions = genTree(response.data);
|
||||
}
|
||||
});
|
||||
},
|
||||
getCertpattern() {
|
||||
getDictList({ type__code: "cert_pattern" }).then(response => {
|
||||
if (response.data) {
|
||||
this.cert_patternOptions = genTree(response.data);
|
||||
}
|
||||
});
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["elForm"].validate(valid => {
|
||||
if (!valid) return;
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
# Generated by Django 3.0.5 on 2020-08-21 07:22
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('system', '0031_delete_bscodeset'),
|
||||
('certset', '0016_auto_20200805_1435'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='evaluationitem',
|
||||
name='cccpv_class',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='Evaluations_cccpv_class', to='system.Dict', verbose_name='涉及CCC/PV分类'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='evaluationitem',
|
||||
name='cert_field',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='Evaluations_cert_field', to='system.Dict', verbose_name='认证领域'),
|
||||
),
|
||||
]
|
|
@ -62,7 +62,9 @@ class UnitType(CommonAModel):
|
|||
|
||||
class EvaluationItem(CommonAModel):
|
||||
name = models.CharField('评审表名称',null=True, blank=True, max_length=1000)
|
||||
cert_field = models.CharField('所属认证领域分类',max_length=1000,null=True, blank=True,)
|
||||
cert_field = models.ForeignKey(Dict, verbose_name='认证领域', related_name='Evaluations_cert_field', on_delete=models.DO_NOTHING)
|
||||
cccpv_class = models.ForeignKey(Dict, verbose_name='涉及CCC/PV分类', related_name='Evaluations_cccpv_class', on_delete=models.DO_NOTHING, null=True, blank=True)
|
||||
|
||||
class Meta:
|
||||
verbose_name = '评审表项目'
|
||||
verbose_name_plural = verbose_name
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# Generated by Django 3.0.5 on 2020-08-21 06:32
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('system', '0031_delete_bscodeset'),
|
||||
('project', '0020_certapp_risk'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='certapp',
|
||||
name='professional_code',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='certapp_professional_code', to='system.Dict', verbose_name='专业代码'),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 3.0.5 on 2020-08-21 06:35
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('system', '0031_delete_bscodeset'),
|
||||
('project', '0021_auto_20200821_1432'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='certapp',
|
||||
name='professional_code',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='certapp',
|
||||
name='professional_code',
|
||||
field=models.ManyToManyField(blank=True, null=True, related_name='certapp_professional_code', to='system.Dict', verbose_name='专业代码'),
|
||||
),
|
||||
]
|
|
@ -73,7 +73,7 @@ class CertApp(CommonBModel):
|
|||
supervise_amount = models.FloatField('监督金额',null=True, blank=True, default=0)
|
||||
review_amount = models.FloatField('复评金额',null=True, blank=True, default=0)
|
||||
system_standard = models.ForeignKey(Dict, verbose_name='依据的体系标准',null=True, blank=True, related_name='certapp_system_standard', on_delete=models.DO_NOTHING)
|
||||
professional_code = models.ForeignKey(Enterprise, on_delete=models.CASCADE, related_name='certappk_factory', null=True, blank=True)
|
||||
professional_code = models.ManyToManyField(Dict, verbose_name='专业代码',null=True, blank=True, related_name='certapp_professional_code')
|
||||
certification = models.CharField('认证范围', max_length = 1000, null=True, blank=True)
|
||||
risk = models.CharField('风险系数', choices=risk_choices, max_length=50, null=True, blank=True)
|
||||
class Meta:
|
||||
|
|
Loading…
Reference in New Issue