This commit is contained in:
caoqianming 2020-09-15 15:32:19 +08:00
parent f3eb3f2ead
commit 3488189141
6 changed files with 268 additions and 10 deletions

View File

@ -216,17 +216,24 @@ export const asyncRoutes = [
]
},
{
path: '/judge',
path: '/accessment',
component: Layout,
redirect: '/judge/judge',
name: 'JudgeM',
redirect: '/accessment/index',
name: 'AccessmentManage',
meta: { title: '认证评定', icon: 'example'},
children: [
{
path: 'judge',
name: 'Judge',
component: () => import('@/views/plan/plan'),
meta: { title: '认证评定', icon: 'example', perms: ['plan_view'] }
path: 'index',
name: 'Accessment',
component: () => import('@/views/accessment/index'),
meta: { title: '认证评定', icon: 'example', perms: ['accessment_view'] }
},
{
path: 'certapp/:id/:action/',
name: 'Certappaccess',
component: () => import('@/views/certapp/certapphandle'),
meta: { title: '业务评定', icon: 'example', perms: ['certapp_access'] },
hidden: true
},
]
},

View File

@ -92,3 +92,6 @@ div:focus {
.el-form--label-top .el-form-item__label {
line-height: 16px;
}
.el-button+.el-button {
margin-left: 1px;
}

View File

@ -0,0 +1,15 @@
<template>
<div>
<el-card >
<div slot="header" class="clearfix">
<span>评定结论</span>
</div>
</el-card>
</div>
</template>
<script>
export default {
name:'access'
}
</script>

View File

@ -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
max-height="600"
>
<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>

View File

@ -1,6 +1,20 @@
<template>
<div class="app-container">
<el-tabs type="card" v-model="activeName">
<el-card>
<el-steps :active="1" finish-status="success">
<el-step title="申请"></el-step>
<el-step title="受理"></el-step>
<el-step title="策划"></el-step>
<el-step title="现场审核"></el-step>
<el-step title="产品检测"></el-step>
<el-step title="评定"></el-step>
<el-step title="出证"></el-step>
<el-step title="归档"></el-step>
</el-steps>
</el-card>
<el-row :gutter="6" style="margin-top:6px">
<el-col :span="20">
<el-tabs type="border-card" v-model="activeName">
<el-tab-pane label="申请信息" name="Basic" style="overflow-y:auto;overflow-x:hidden;">
<CCCform @handleCommit="save" :certapp="certappdata" v-if="kind=='CCC'&isLoad"></CCCform>
<QMSform @handleCommit="save" :certapp="certappdata" v-if="kind=='QMS'&isLoad"></QMSform>
@ -28,7 +42,29 @@
<el-tab-pane label="现场审核反馈" name="Certappfeedback" v-if="certapp" lazy>
<Conclusion :certapp="certapp" ></Conclusion>
</el-tab-pane>
<el-tab-pane label="认证评定" name="Certappaccess" v-if="certapp" lazy>
<access :certapp="certapp" ></access>
</el-tab-pane>
</el-tabs>
</el-col>
<el-col :span="4">
<el-card>
<div slot="header" class="clearfix">
<span>业务时间线</span>
</div>
<el-timeline >
<el-timeline-item
v-for="(activity, index) in activities"
:key="index"
:timestamp="activity.timestamp">
{{activity.content}}
</el-timeline-item>
</el-timeline>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
@ -39,8 +75,9 @@ import router from '@/router';
import QMSform from "@/views/certapp/qmsform"
import Conclusion from "@/views/audit/conclusion"
import Member from "@/views/audit/member"
import access from "@/views/accessment/access"
export default {
components: { CCCform, Productunit, QMSform, Conclusion, Member},
components: { CCCform, Productunit, QMSform, Conclusion, Member, access},
props: [],
data() {
return {
@ -48,7 +85,17 @@ export default {
certapp:null,
certappdata:null,
kind:'CCC',
isLoad:false
isLoad:false,
activities: [{
content: '活动按期开始',
timestamp: '2018-04-15'
}, {
content: '通过审核',
timestamp: '2018-04-13'
}, {
content: '创建成功',
timestamp: '2018-04-11'
}]
};
},
computed: {},

View File

@ -18,6 +18,9 @@ from apps.audit.serializers import *
class MyAuditTaskList(ListAPIView):
"""
我的审核项目
"""
perms_map = {'get': 'myaudittask_view'}
serializer_class = ProjectSerializerX
filterset_class = ProjectFilter
@ -37,6 +40,9 @@ class MyAuditTaskList(ListAPIView):
# search_fields = ['auditee__name', 'plan__name']
# ordering=['-pk']
class MyAuditCertappList(PageOrNot, ListAPIView):
"""
我的审核业务
"""
perms_map = {'get': 'myaudittask_view'}
serializer_class = CertappSerializerX
filterset_fields = ['project']