product unit
This commit is contained in:
parent
aa7a88d031
commit
b67c22adbf
|
@ -2,5 +2,5 @@
|
|||
ENV = 'production'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'http://121.36.23.77:8000'
|
||||
VUE_APP_BASE_API = 'http://121.36.23.77:8036/api'
|
||||
|
||||
|
|
|
@ -192,7 +192,29 @@ export const asyncRoutes = [
|
|||
},
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/testorg',
|
||||
component: Layout,
|
||||
redirect: '/testorg/testorg',
|
||||
name: 'testorg',
|
||||
meta: { title: '产品检测', icon: 'example' },
|
||||
children: [
|
||||
|
||||
{
|
||||
path: 'testorg',
|
||||
name: 'TestOrg',
|
||||
component: () => import('@/views/testorg/testorg'),
|
||||
meta: { title: '实验室信息', icon: 'example', perms: ['testorg_manage'] }
|
||||
},
|
||||
{
|
||||
path: 'testorgnotice',
|
||||
name: 'TextOrgNotice',
|
||||
component: () => import('@/views/testorg/testorgnotice'),
|
||||
meta: { title: '实验室通知公告', icon: 'example', perms: ['testorg_manage'] }
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/accessment',
|
||||
component: Layout,
|
||||
|
@ -215,6 +237,21 @@ export const asyncRoutes = [
|
|||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/certificate',
|
||||
component: Layout,
|
||||
redirect: '/certificate/index',
|
||||
name: 'CertificateManage',
|
||||
meta: { title: '证书管理', icon: 'example'},
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'Certificate',
|
||||
component: () => import('@/views/certificate/index'),
|
||||
meta: { title: '证书管理', icon: 'example', perms: ['certificate_view'] }
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/employee',
|
||||
component: Layout,
|
||||
|
@ -363,29 +400,6 @@ export const asyncRoutes = [
|
|||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/testorg',
|
||||
component: Layout,
|
||||
redirect: '/testorg/testorg',
|
||||
name: 'testorg',
|
||||
meta: { title: '产品检测', icon: 'example' },
|
||||
children: [
|
||||
|
||||
{
|
||||
path: 'testorg',
|
||||
name: 'TestOrg',
|
||||
component: () => import('@/views/testorg/testorg'),
|
||||
meta: { title: '实验室信息', icon: 'example', perms: ['testorg_manage'] }
|
||||
},
|
||||
{
|
||||
path: 'testorgnotice',
|
||||
name: 'TextOrgNotice',
|
||||
component: () => import('@/views/testorg/testorgnotice'),
|
||||
meta: { title: '实验室通知公告', icon: 'example', perms: ['testorg_manage'] }
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
path: '/system',
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card >
|
||||
<div slot="header" class="clearfix">
|
||||
<span>认证结果评价</span>
|
||||
<el-button type="primary" >创建</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
ref="elTable"
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
style="width: 100%;"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column label="评定表编号">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工厂检查结论">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.conclusion }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不符合项分类">
|
||||
<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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name:'access',
|
||||
data() {
|
||||
return {
|
||||
listLoading:false,
|
||||
tableData:[]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,180 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div style="display:flex">
|
||||
<treeselect
|
||||
v-model="listQuery.user__dept"
|
||||
:multiple="false"
|
||||
:options="deptOptions"
|
||||
placeholder="所属组织"
|
||||
:disable-branch-nodes="true"
|
||||
@input="handleFilter"
|
||||
style="width: 280px" clearable/>
|
||||
|
||||
<el-input
|
||||
v-model="listQuery.search"
|
||||
placeholder="姓名/易记码/编号/注册领域"
|
||||
style="width: 300px;margin-left:10px"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="handleFilter"
|
||||
/>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleFilter"
|
||||
>搜索</el-button>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="resetFilter"
|
||||
>刷新重置</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.results"
|
||||
style="width: 100%;margin-top:10px;"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="申请单号">
|
||||
<template slot-scope="scope" v-if="scope.row.number">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="认证领域/分类">
|
||||
<template slot-scope="scope">
|
||||
<el-tag >{{scope.row.cert_field_.name}}</el-tag>
|
||||
<el-tag v-if="scope.row.cccpv_class_" type="warning" style="margin:2px">{{scope.row.cccpv_class_.name}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请信息" width="300px">
|
||||
<template slot-scope="scope">
|
||||
<div><span style="color:darkblue;font-weight:bold">申请方</span>:{{ scope.row.applicant_v.name }}</div>
|
||||
<div v-if="scope.row.manufacture"><span style="color:darkblue;font-weight:bold">制造商</span>:{{ scope.row.manufacture_v.name }}</div>
|
||||
<div v-if="scope.row.factory"><span style="color:darkblue;font-weight:bold">生产厂</span>:{{ scope.row.factory_v.name }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前状态">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人">
|
||||
<template slot-scope="scope">{{ scope.row.create_by_.name}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建日期">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.create_time }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope" >
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
:disabled="!checkPermission(['certapp_accessment'])"
|
||||
@click="handleAccessment(scope)"
|
||||
>评定</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
:disabled="!checkPermission(['certapp_detail'])"
|
||||
@click="handleCertappDetail(scope)"
|
||||
>详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="tableData.count>0"
|
||||
:total="tableData.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getCertappList, deleteCertapp } from "@/api/certapp"
|
||||
import { getOrgList } from "@/api/org"
|
||||
import { getDictList } from "@/api/dict"
|
||||
import Pagination from "@/components/Pagination"
|
||||
import checkPermission from '@/utils/permission'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import { genTree } from '../../utils'
|
||||
export default {
|
||||
components: { Pagination, Treeselect },
|
||||
data() {
|
||||
return {
|
||||
tableData: {count:0},
|
||||
listLoading: true,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20
|
||||
},
|
||||
deptOptions: [],
|
||||
field_list:[]
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getdeptOptions()
|
||||
this.getfields()
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
getCertappList(this.listQuery).then(response => {
|
||||
if (response.data) {
|
||||
this.tableData = response.data
|
||||
}
|
||||
this.listLoading = false
|
||||
});
|
||||
},
|
||||
getdeptOptions() {
|
||||
getOrgList().then(res=>{
|
||||
this.deptOptions = genTree(res.data)
|
||||
})
|
||||
},
|
||||
resetFilter() {
|
||||
this.listQuery = {
|
||||
page: 1,
|
||||
page_size: 20
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
},
|
||||
getfields(){
|
||||
getDictList({type__code:'cert_field'}).then(res=>{
|
||||
let fields = []
|
||||
for(var i=0;i<res.data.length;i++){
|
||||
if(res.data[i].parent!=null){
|
||||
fields.push({id:res.data[i].id, name:res.data[i].name, code:res.data[i].code})
|
||||
}
|
||||
}
|
||||
this.field_list = fields
|
||||
})
|
||||
|
||||
},
|
||||
handleCertappDetail(scope) {
|
||||
this.$router.push({
|
||||
name: "Certappdetail",
|
||||
params: { id: scope.row.id },
|
||||
});
|
||||
},
|
||||
handleAccessment(scope) {
|
||||
this.$router.push({
|
||||
name: "Certappaccess",
|
||||
params: { id: scope.row.id, action:'access' },
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -7,4 +7,10 @@ from simple_history.models import HistoricalRecords
|
|||
from apps.certset.models import ImplementRule, UnitType, EvaluationItem, Standard
|
||||
from apps.crm.models import Enterprise
|
||||
from apps.project.models import CertApp
|
||||
from apps.system.models import CommonAModel, CommonBModel, Dict, User
|
||||
from apps.system.models import CommonAModel, CommonBModel, Dict, User
|
||||
|
||||
# class Accessment(CommonAModel):
|
||||
# """
|
||||
# 认证评定
|
||||
# """
|
||||
# number = models.CharField('评定表编号', unique=True, max_length=200)
|
|
@ -79,3 +79,6 @@ class EnterpriseAddress(CommonAModel):
|
|||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
# class Product(CommonAModel):
|
||||
# name = models.CharField('名称', max_length=200)
|
||||
# description = models.TextField('产品描述', null=True, blank=True)
|
|
@ -0,0 +1,14 @@
|
|||
# Generated by Django 3.0.7 on 2020-09-17 06:43
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('project', '0032_merge_20200903_1142'),
|
||||
('project', '0029_auto_20200904_1553'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
]
|
|
@ -0,0 +1,21 @@
|
|||
# Generated by Django 3.0.7 on 2020-09-17 06:44
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('project', '0033_merge_20200917_1443'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='certapp',
|
||||
name='certification',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='certapp',
|
||||
name='professional_code',
|
||||
),
|
||||
]
|
|
@ -104,8 +104,6 @@ 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.ManyToManyField(Dict, verbose_name='专业代码', 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:
|
||||
verbose_name = '认证受理'
|
||||
|
|
Loading…
Reference in New Issue