This commit is contained in:
caoqianming 2020-10-29 08:36:23 +08:00
parent dba0c4826d
commit f0fa6ea933
42 changed files with 560 additions and 951 deletions

View File

@ -77,3 +77,20 @@ export function flowCertapp(id) {
method: 'get',
})
}
export function bindCertapp(data) {
//与项目绑定
return request({
url: `/project/certapp/bind/`,
method: 'put',
data
})
}
export function unbindCertapp(id) {
//与项目解绑
return request({
url: `/project/certapp/${id}/unbind/`,
method: 'put',
})
}

View File

@ -312,12 +312,19 @@ export const asyncRoutes = [
meta: { title: '人员信息', icon: 'example', perms: ['employee_view'] }
},
{
path: 'employee/update/:id',
path: 'employee/:id/update',
name: 'EmployeeUpdate',
component: () => import('@/views/employee/employeeupdate'),
meta: { title: '人员信息变更', icon: 'example', perms: ['employee_update'] },
hidden: true
},
{
path: 'employee/:id/detail',
name: 'Employeedetail',
component: () => import('@/views/employee/employeeupdate'),
meta: { title: '人员信息详情', icon: 'example', perms: ['employee_detail'] },
hidden: true
},
// {
// path: 'qualification_',
// name: 'Qualification_',

View File

@ -103,9 +103,9 @@ body .el-table th.gutter{
.el-button+.el-button {
margin-left: 1px;
}
// .el-button {
// border-radius: 0px;
// }
.el-button {
border-radius: 2px;
}
.el-tabs__header {
margin: 0 0 6px;
}

View File

@ -30,17 +30,17 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
style="margin-left: 10px;"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<div style="margin-top:6px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" v-if="$route.name=='EmployeeUpdate'">新增</el-button>
</div>
<el-table
v-loading="listLoading"

View File

@ -26,7 +26,7 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
type="primary"

View File

@ -44,13 +44,13 @@
icon="el-icon-search"
@click="handleFilter"
style="margin-left:10px"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<div style="margin-top:6px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" >认证申请</el-button>

View File

@ -47,7 +47,6 @@
</el-table-column>
<el-table-column label="操作" width="300">
<template slot-scope="scope">
<el-button-group>
<el-button
type="primary"
size="small"
@ -60,7 +59,6 @@
:disabled="!checkPermission(['plan_delete'])"
@click="handleDeletePlan(scope)"
>删除</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>
@ -122,7 +120,6 @@
</el-table-column>
<el-table-column label="操作" width="300" fixed="right">
<template slot-scope="scope">
<el-button-group>
<el-button
type="primary"
size="small"
@ -135,7 +132,6 @@
:disabled="!checkPermission(['project_delete'])"
@click="handleDetailProject(scope)"
>详情</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>

View File

@ -40,9 +40,8 @@
<template slot-scope="scope">{{ scope.row.days }}</template>
</el-table-column>
</el-table>
<el-row :gutter="6">
<el-col :xs="24" :md="12">
<el-card style="margin-top:6px" v-if="$route.params.action=='member'">
<el-row style="margin-top:6px">
<el-card v-if="$route.params.action=='member'">
<div slot="header" class="clearfix">
<span>成员配置</span>
</div>
@ -97,9 +96,9 @@
</el-row>
</el-form>
</el-card>
</el-col>
<el-col :xs="24" :md="12">
<el-card style="margin-top:6px" v-if="this.$route.name=='Certappfeedback' || this.$route.name=='Certapptest'">
</el-row>
<el-row style="margin-top:6px">
<el-card v-if="this.$route.name=='Certappfeedback' || this.$route.name=='Certapptest'">
<div slot="header" class="clearfix">
<span>审核员参与天数/人日数</span>
</div>
@ -141,7 +140,6 @@
</el-row>
</el-form>
</el-card>
</el-col>
</el-row>
<el-dialog
title="选择组员"

View File

@ -28,7 +28,7 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button
>查询</el-button
>
<el-button
class="filter-item"
@ -97,7 +97,7 @@
<span>{{ scope.row.create_time }}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="260">
<el-table-column label="操作" width="260">
<template slot-scope="scope">
<el-button
v-if="scope.row.state == '审核任务已接受'"
@ -222,7 +222,7 @@
<span>{{ scope.row.create_time }}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="260">
<el-table-column label="操作" width="260">
<template slot-scope="scope">
<el-button
type="primary"

View File

@ -23,7 +23,7 @@
icon="el-icon-search"
@click="handleFilter"
style="margin-left:2px"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
type="primary"
@ -87,7 +87,7 @@
@click="handleUpdate(scope)"
>编辑</el-button>
<el-button
v-if="scope.row.state=='申请'"
type="danger"
size="small"
:disabled="!checkPermission(['certapp_delete'])"

View File

@ -1,37 +1,8 @@
<template>
<div class="app-container">
<div style="display:flex">
<treeselect
v-model="listQuery.cert_field"
:multiple="false"
:options="fieldOptions"
placeholder="所属领域"
:default-expand-level="1"
:disable-branch-nodes="true"
@input="handleFilter"
style="width: 280px" clearable/>
<el-input
v-model="listQuery.search"
placeholder="姓名/易记码/编号/注册领域"
style="width: 300px;margin-left:2px"
class="filter-item"
@keyup.enter.native="handleFilter"
/>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
style="margin-left:2px"
>搜索</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置</el-button>
</div>
<div>
<el-button type="primary" @click="appendChose" size="mini">添加选中</el-button>
<el-table
ref="cTable"
v-loading="listLoading"
:data="tableData.results"
style="width: 100%;margin-top:6px;"
@ -39,9 +10,9 @@
fit
stripe
highlight-current-row
max-height="600"
max-height="400"
>
<el-table-column type="index" width="50" />
<el-table-column type="selection" width="50" />
<el-table-column label="申请单号">
<template slot-scope="scope" v-if="scope.row.number">{{ scope.row.number }}</template>
</el-table-column>
@ -109,7 +80,7 @@ export default {
},
created() {
this.getList()
this.getfields()
// this.getfields()
},
methods: {
checkPermission,
@ -167,6 +138,18 @@ deleteCertapp(scope.row.id).then(res=>{
})
},
appendChose(){
var selects = this.$refs.cTable.selection
if(selects.length==0){
this.$message.warning('未选择记录')
}else{
var selectIds = []
for(var i=0;i<selects.length;i++){
selectIds.push(selects[i].id)
}
this.$emit('handleChose', selectIds)
}
}
}
};
</script>

View File

@ -1,18 +1,18 @@
<template>
<div id="print">
<el-form ref="elForm" :model="formData" size="medium" label-width="70px">
<el-form ref="elForm" :model="formData" size="medium" >
<el-row :gutter="12">
<el-col>
<el-table id="evl"
ref="multipleTable"
:data="eltList"
style="width: 100%;margin-top:10px;"
style="width: 100%;"
border
fit
highlight-current-row
max-height="600">
<el-table-column align="center" label="项目内容" width="750">
<el-table-column align="center" label="项目内容">
<template slot-scope="scope">
<span v-if="scope.row.item">{{ scope.row.item_v }}</span>
<span v-else>{{ scope.row.content }}</span>

View File

@ -26,7 +26,7 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
type="primary"

View File

@ -22,13 +22,13 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<el-table
v-loading="listLoading"

View File

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" v-if="$route.name=='EmployeeUpdate'">新增</el-button>
</div>
<el-table
v-loading="listLoading"

View File

@ -44,13 +44,13 @@
icon="el-icon-search"
@click="handleFilter"
style="margin-left:10px"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<!-- <div style="margin-top:6px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>

View File

@ -216,7 +216,7 @@
</el-col>
</el-row>
<el-form-item size="large">
<el-button type="primary" @click="submitForm">保存</el-button>
<el-button v-if="$route.name=='EmployeeUpdate'" type="primary" @click="submitForm" >保存</el-button>
<el-button @click="goBack">返回</el-button>
</el-form-item>
</el-form>

View File

@ -1,16 +1,16 @@
<template>
<div class="app-container">
<el-tabs type="border-card" >
<el-tab-pane label="详细信息" style="height:700px;overflow-y:auto;overflow-x:hidden;">
<el-tab-pane label="详细信息" >
<Employeedetail :id="employee"></Employeedetail>
</el-tab-pane>
<el-tab-pane label="注册资格" style="height:700px;overflow-y:auto;overflow-x:hidden;">
<el-tab-pane label="注册资格" lazy>
<Qualification :employee="employee"></Qualification>
</el-tab-pane>
<el-tab-pane label="专业能力" style="height:700px;overflow-y:auto;overflow-x:hidden;">
<el-tab-pane label="专业能力" lazy>
<Ability :employee="employee"></Ability>
</el-tab-pane>
<el-tab-pane label="教育经历" style="height:700px;overflow-y:auto;overflow-x:hidden;">
<el-tab-pane label="教育经历" lazy>
<Education :employee="employee"></Education>
</el-tab-pane>
</el-tabs>

View File

@ -7,11 +7,12 @@
:multiple="false"
:options="deptOptions"
placeholder="所属组织"
:default-expand-level="1"
:disable-branch-nodes="true"
@input="handleFilter"
clearable/>
</el-col>
<el-col :xs="24" :md="2">
<el-col :xs="24" :md="4">
<el-select
v-model="listQuery.is_fulltime"
placeholder="是否全职"
@ -33,20 +34,18 @@
/>
</el-col>
<el-col :xs="24" :md="4">
<el-button-group>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
></el-button>
<el-button
class="filter-item"
type="warning"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
</el-button-group>
></el-button>
</el-col>
</el-row>
<el-table
@ -91,18 +90,16 @@
</el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-button-group>
<el-button
type="primary"
size="small"
@click="handleChose(scope)"
>选中</el-button>
<el-button
type="info"
type="plain"
size="small"
@click="handleDelete(scope)"
@click="handleDetail(scope)"
>详情</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>
@ -161,6 +158,9 @@ export default {
this.deptOptions = genTree(res.data)
})
},
handleDetail(scope) {
this.$router.push({name:"Employeedetail", params:{id:scope.row.id}})
},
resetFilter() {
this.listQuery = {
page: 1,

View File

@ -10,12 +10,12 @@
<el-button class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter">搜索</el-button>
@click="handleFilter">查询</el-button>
<el-button class="filter-item"
style="margin-left: 10px;"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter">刷新重置</el-button>
@click="resetFilter">重置</el-button>
</div>
<div style="margin-top:6px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>

View File

@ -10,7 +10,7 @@
<el-button class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter">搜索</el-button>
@click="handleFilter">查询</el-button>
<el-button class="filter-item"
type="primary"
icon="el-icon-refresh-left"

View File

@ -29,14 +29,14 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
style="margin-left: 10px;"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<div style="margin-top:6px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>

View File

@ -1,533 +0,0 @@
<template>
<div class="app-container">
<el-row :gutter="6">
<el-col :xs="24" :md="8">
<el-card class="box-card" style="overflow-y:auto;overflow-x:hidden;height:200px">
<div slot="header" class="clearfix">
<span>受审核方</span>
<el-button style="float: right; padding: 0px 0" type="text">更多企业信息</el-button>
</div>
<div class="item">{{auditee.name}}</div>
<div v-for="item in auditee.address_" :key="item.id" class="text item">
<span class="span">{{item.type}}</span>
{{item.address}}
</div>
<div class="text item">
<span class="span">常用联系人</span>
{{auditee.linkman1_name}}/{{auditee.linkman1_duty}}/{{auditee.linkman1_mobile}}
</div>
<div class="text item">
<span class="span">备用联系人</span>
{{auditee.linkman2_name}}/{{auditee.linkman2_duty}}/{{auditee.linkman2_mobile}}
</div>
</el-card>
</el-col>
<el-col :xs="24" :md="16">
<el-card class="box-card" style="overflow-y:auto;overflow-x:hidden;height:200px">
<div slot="header" class="clearfix">
<span>项目信息</span>
</div>
<div class="text item">
<span class="span">项目号</span>
{{project.number}}
<span class="span" >所属计划</span>
<span v-if="project.plan_">{{project.plan_.name}}</span>
<span v-else>暂无</span>
</div>
<div class="text item">
<span class="span">项目概况</span>
<el-tag
v-for="(item, index) in project.certapps"
:key="index"
style="margin:2px;font-size:12px"
>{{item}}</el-tag>
</div>
<div class="text item">
<span class="span">当前状态</span>
{{project.state}}
</div>
<div class="text item" v-if="project.assign_by_">
<span class="span">下达人</span>
{{project.assign_by_.name}}
</div>
<div class="text2 item">
<!-- <el-switch
style="display: block"
v-model="can_paichai"
active-color="#13ce66"
inactive-color="#FF0000"
active-text="是否可派差">
</el-switch>-->
<el-checkbox v-model="can_paichai" border @change="handlePaichai">可派差</el-checkbox>
</div>
</el-card>
</el-col>
</el-row>
<el-row style="margin-top:6px">
<el-col>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>业务信息</span>
</div>
<el-table
ref="projectTable"
v-loading="listLoading"
:data="certappData"
style="width: 100%;"
border
fit
stripe
highlight-current-row
max-height="300"
>
<el-table-column label="单号">
<template slot-scope="scope" v-if="scope.row.number">{{ scope.row.number }}</template>
</el-table-column>
<el-table-column label="认证领域/分类" width="300px">
<template slot-scope="scope">
<el-tag v-if="scope.row.cert_field_">{{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.state}}</template>
</el-table-column>
<el-table-column label="受理/确认人">
<template
slot-scope="scope"
v-if="scope.row.accept_by_"
>{{ scope.row.accept_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="操作" width="300">
<template slot-scope="scope">
<el-button-group>
<el-button
type="primary"
size="small"
:disabled="!checkPermission(['certapp_detail'])"
@click="handleDetail(scope)"
>详情</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
<el-row :gutter="6" style="margin-top:6px">
<el-col :xs="24" :md="9">
<el-card class="box-card" style="overflow-y:auto;overflow-x:hidden;">
<div slot="header" class="clearfix">
<span>联系记录</span>
</div>
<el-table
ref="projectTable"
v-loading="listLoading"
:data="contactData"
style="width: 100%;"
border
fit
stripe
highlight-current-row
height="200"
>
<el-table-column label="联系时间">
<template slot-scope="scope">{{ scope.row.contact_date }}</template>
</el-table-column>
<el-table-column label="内容" >
<template slot-scope="scope">{{ scope.row.content }}</template>
</el-table-column>
<el-table-column label="操作人">
<template slot-scope="scope">{{ scope.row.create_by_.name }}</template>
</el-table-column>
</el-table>
<el-row :gutter="10">
<el-col :xs="24" :md="12">
<el-form
ref="elForm"
:model="formData"
:rules="rules"
size="medium"
label-width="80px"
style="margin-top:2px"
label-position="left"
>
<el-row>
<el-col>
<el-form-item label="联系时间" prop="contact_date">
<el-date-picker
v-model="formData.contact_date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:style="{width: '100%'}"
placeholder="联系时间"
clearable
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="内容" prop="content">
<el-input
v-model="formData.content"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<div style="text-align:right;">
<el-button-group>
<el-button type="primary" @click="createNewRecord" size="mini">创建新记录</el-button>
<!-- <el-button type="primary" @click="updateNowRecord" size="mini">保存</el-button> -->
<el-button @click="resetForm" size="mini">重置</el-button>
</el-button-group>
</div>
</el-row>
</el-form>
</el-col>
<el-col :xs="24" :md="12">
<el-row>
<el-card shadow="never" style="margin-top:2px">
<div slot="header" class="clearfix">
<span>常用语</span>
</div>
<el-tag
v-for="(item, index) in useditems"
:key="index"
@click.native="handleClickTag(item)"
style="margin:2px;font-size:12px"
>{{item}}</el-tag>
</el-card>
</el-row>
</el-col>
</el-row>
</el-card>
</el-col>
<el-col :xs="24" :md="15">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>审核组成员</span>
</div>
<el-table
ref="memberTable"
v-loading="listLoading"
:data="memberData"
style="width: 100%;"
border
fit
stripe
highlight-current-row
height="200"
@row-click="handleMClick"
>
<el-table-column label="姓名">
<template slot-scope="scope">{{ scope.row.user_.name }}</template>
</el-table-column>
<el-table-column label="是否组长" >
<template slot-scope="scope">
<i class="el-icon-circle-check" v-if="scope.row.is_leader" style="color:green;"></i>
</template>
</el-table-column>
<el-table-column label="身份" >
<template slot-scope="scope" v-if="scope.row.identity">{{ scope.row.identity_.name }}</template>
</el-table-column>
</el-table>
<el-form ref="elForm2" :model="formDataMember" label-width="80px" label-position="right" :rules="rules2" style="margin-top:2px">
<el-col :xs="24" :md="12">
<el-form-item label="成员" prop="user" >
<el-input placeholder="请选择成员" readonly clearable v-model="formDataMember.user_.name">
<el-button slot="append" icon="el-icon-search" @click="choseMember"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :xs="24" :md="12">
<el-form-item prop="is_leader">
<el-checkbox v-model="formDataMember.is_leader">组长</el-checkbox>
</el-form-item>
</el-col>
<el-col :xs="24" :md="12">
<el-form-item label="身份" prop="identity">
<el-select v-model="formDataMember.identity" placeholder="请选择">
<el-option
v-for="item in identityOptions"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-form>
<div style="text-align:right;">
<el-button-group>
<el-button type="primary" @click="appendNewM" size="mini">添加新成员</el-button>
<el-button type="warning" @click="updateNowM" size="mini">保存</el-button>
<el-button @click="resetForm2" size="mini">重置</el-button>
</el-button-group>
</div>
</el-card>
</el-col>
</el-row>
<el-dialog
title="选择组员"
:visible.sync="choseVisiable"
:close-on-click-modal="false"
width="80%"
:append-to-body="true"
>
<Userchose ref="Userchose" :queryData="queryData" @handleChose="choseComplete"></Userchose>
</el-dialog>
</div>
</template>
<style scoped>
.text {
font-size: 15px;
}
.el-checkbox__label {
font-size: 18px;
}
.item {
margin-bottom: 4px;
}
.span {
color: gray;
font-weight: bold;
}
</style>
<script>
import { getDictList } from "@/api/dict"
import { getCertappList } from "@/api/certapp";
import { getEnterprise } from "@/api/enterprise";
import { getProject, updateProject } from "@/api/project";
import { getContactRecordList, createContactRecord } from "@/api/plan";
import Pagination from "@/components/Pagination";
import checkPermission from "@/utils/permission";
import Userchose from "@/views/employee/userchose"
import { getMemberList, createMember, updateMember, deleteMember} from "@/api/member"
import { genTree, deepClone } from '@/utils'
export default {
components: { Pagination, Userchose },
props: [],
data() {
return {
auditee: {},
project: { assign_by_: null },
certappData: [],
contactData: [],
memberData:[],
can_paichai: false,
formData: {
content: "",
project: this.$route.query.project,
},
rules: {
contact_date: [
{
required: true,
message: "请选择日期",
trigger: "change",
},
],
content: [
{
required: true,
message: "请输入内容",
trigger: "change",
},
],
},
useditems: [
"可以,第一联系人",
"可以,第二联系人",
"不可以",
"C类企业飞行检查",
],
formDataMember:{
user:null,
user_:{},
is_leader:false,
project:this.$route.query.project
},
rules2:{
user: [
{
required: true,
message: "请选择组员",
trigger: "change",
},
],
},
choseVisiable:false,
queryData:{},
identityOptions:[]
};
},
computed: {},
watch: {},
created() {
this.getParams();
this.getMemberList_()
this.getCertappList_();
this.getContactRecordList_();
this.getIdOptions();
},
mounted() {},
methods: {
checkPermission,
getParams() {
getProject(this.$route.query.project).then((res) => {
this.project = res.data;
this.can_paichai = this.project.can_paichai;
}).then(()=>{
getEnterprise(this.project.auditee).then((res) => {
this.auditee = res.data;
})
})
},
getCertappList_() {
this.listLoading = true;
getCertappList({
project: this.$route.query.project,
pageoff: true,
}).then((res) => {
if (res.data) {
this.certappData = res.data;
}
this.listLoading = false;
});
},
getIdOptions(){
getDictList({type__code:'auditor_teamrole',pageoff:true}).then(res=>{
this.identityOptions = res.data
})
},
getContactRecordList_() {
getContactRecordList({
pageoff: true,
project: this.$route.query.project,
}).then((res) => {
this.contactData = res.data;
});
},
getMemberList_(){
getMemberList({project:this.$route.query.project, pageoff:true}).then(res=>{
this.memberData = res.data
})
},
submitForm() {
this.$refs["elForm"].validate((valid) => {
if (!valid) return;
// TODO 提交表单
});
},
resetForm() {
this.$refs["elForm"].resetFields();
},
resetForm2() {
this.$refs["elForm2"].resetFields();
this.formDataMember.user_ = {}
},
handleDetail() {},
handleClickTag(val) {
this.formData.content = val;
},
createNewRecord() {
createContactRecord(this.formData).then((rse) => {
this.$message.success("成功");
this.getContactRecordList_();
});
},
// contactClick(scope) {
// this.formData.scope
// },
handlePaichai(val) {
if (val) {
this.$confirm("确定标记为可派差?", "提示", {})
.then(() => {
updateProject(this.$route.query.project, {
can_paichai: true,
}).then((res) => {
this.$message.success("成功");
});
})
.catch((res) => {
this.can_paichai = false;
});
} else {
this.$confirm("取消派差标记?", "警告", { type: "warning" })
.then(() => {
this.$message.success("未写接口");
this.can_paichai = true;
})
.catch((res) => {
this.can_paichai = true;
});
}
},
choseMember(){
this.choseVisiable = true
},
appendNewM(){
this.$refs["elForm2"].validate((valid) => {
if (!valid) return;
// TODO 提交表单
createMember(this.formDataMember).then(res=>{
this.$message.success('成功')
this.getMemberList_()
})
});
},
updateNowM(){
if(this.formDataMember.id){
updateMember(this.formDataMember.id, this.formDataMember).then(res=>{
this.$message.success('成功')
this.getMemberList_()
})
}
},
choseComplete(val){
if(val){
this.formDataMember.user = val.user_.id
this.formDataMember.user_.name = val.user_.name
}
this.choseVisiable = false
},
handleMClick(row,c,e){
this.formDataMember = deepClone(row)
}
},
};
</script>

View File

@ -47,7 +47,6 @@
</el-table-column>
<el-table-column label="操作" width="300">
<template slot-scope="scope">
<el-button-group>
<el-button
type="primary"
size="small"
@ -60,7 +59,6 @@
:disabled="!checkPermission(['plan_delete'])"
@click="handleDeletePlan(scope)"
>删除</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>
@ -122,7 +120,6 @@
</el-table-column>
<el-table-column label="操作" width="300" fixed="right">
<template slot-scope="scope">
<el-button-group>
<el-button
type="primary"
size="small"
@ -135,7 +132,6 @@
:disabled="!checkPermission(['project_delete'])"
@click="handleDetailProject(scope)"
>详情</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>

View File

@ -29,22 +29,20 @@
</el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button-group>
<el-button
type="primary"
size="small"
size="mini"
:disabled="!checkPermission(['plan_update'])"
@click="handleUpdatePlan(scope)"
icon="el-icon-edit"
></el-button>
<el-button
type="danger"
size="small"
size="mini"
:disabled="!checkPermission(['plan_delete'])"
@click="handleDeletePlan(scope)"
icon="el-icon-delete"
></el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>
@ -100,29 +98,11 @@
<el-table-column label="创建人">
<template slot-scope="scope">{{ scope.row.create_by_.name}}</template>
</el-table-column>
<el-table-column label="创建日期" width="190">
<el-table-column label="创建日期" >
<template slot-scope="scope">
<span>{{ scope.row.create_time }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="200" fixed="right">
<template slot-scope="scope">
<el-button-group>
<el-button
type="primary"
size="small"
:disabled="!checkPermission(['project_update'])"
@click="planProject(scope)"
>联系企业</el-button>
<el-button
type="danger"
size="small"
:disabled="!checkPermission(['project_delete'])"
@click="handleDetailProject(scope)"
>详情</el-button>
</el-button-group>
</template>
</el-table-column>-->
</el-table>
<pagination
v-show="projectData.count>0"
@ -180,14 +160,13 @@
<el-table-column label="创建人">
<template slot-scope="scope">{{ scope.row.create_by_.name}}</template>
</el-table-column>
<el-table-column label="创建日期" width="190">
<el-table-column label="创建日期" >
<template slot-scope="scope">
<span>{{ scope.row.create_time }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="300" fixed="right">
<el-table-column label="操作" width="260" fixed="right">
<template slot-scope="scope">
<el-button-group>
<el-button
v-if="scope.row.state =='策划中'"
type="primary"
@ -197,7 +176,7 @@
>计划</el-button>
<el-button
v-if="scope.row.state =='策划中'"
type="primary"
type="plain"
size="small"
:disabled="!checkPermission(['project_assgin'])||!scope.row.can_paichai"
@click="assginProject(scope)"
@ -207,7 +186,6 @@
:disabled="!checkPermission(['project_delete'])"
@click="handleDetailProject(scope)"
>详情</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>

View File

@ -1,144 +1,175 @@
<template>
<div class="app-container">
<el-row :gutter="6">
<el-col :xs="24" :md="16">
<el-card class="box-card" style="overflow-y:auto;overflow-x:hidden;height:200px">
<el-col :xs="24" :md="16">
<el-card
class="box-card"
style="overflow-y: auto; overflow-x: hidden; height: 200px"
>
<div slot="header" class="clearfix">
<span>项目信息</span>
</div>
<el-col :xs="24" :md="10" >
<el-card shadow="hover" style="height:150px">
<div class="text item">
<span class="span">项目号</span>
{{project.number}}
</div>
<div class="text item">
<span class="span">所属计划</span>
<span v-if="project.plan_">{{project.plan_.name}}</span>
<span v-else>暂无</span>
<!-- <span class="span">项目概况</span>
<el-col :xs="24" :md="10">
<el-card shadow="hover" style="height: 150px">
<div class="text item">
<span class="span">项目号</span>
{{ project.number }}
</div>
<div class="text item">
<span class="span">所属计划</span>
<span v-if="project.plan_">{{ project.plan_.name }}</span>
<span v-else>暂无</span>
<!-- <span class="span">项目概况</span>
<el-tag
v-for="(item, index) in project.certapps"
:key="index"
style="margin:2px;font-size:12px"
>{{item}}</el-tag>-->
</div>
<div class="text item">
<span class="span">当前状态</span>
{{project.state}}
</div>
<div class="text item" v-if="project.assign_by_">
<span class="span">任务下达人</span>
{{project.assign_by_.name}}
</div>
<div class="text item" v-if="project.edate0">
<span class="span">预计审核时间</span>
{{edate_[0].substring(0,16)}} -{{edate_[1].substring(0,16)}}
</div>
<div class="text item" v-if="project.start_date">
<span class="span">实际审核时间</span>
{{project.start_date.substring(0,16)}}
<span v-if="project.end_date">-{{project.end_date.substring(0,16)}}</span>
</div>
<div class="text2 item" v-if="$route.name=='PlanProject' && project.state == '策划中'">
<el-checkbox v-model="can_paichai" border @change="handlePaichai">可派差</el-checkbox>
</div>
</div>
<div class="text item">
<span class="span">当前状态</span>
{{ project.state }}
</div>
<div class="text item" v-if="project.assign_by_">
<span class="span">任务下达人</span>
{{ project.assign_by_.name }}
</div>
<div class="text item" v-if="project.edate0">
<span class="span">预计审核时间</span>
{{ edate_[0].substring(0, 16) }} -{{
edate_[1].substring(0, 16)
}}
</div>
<div class="text item" v-if="project.start_date">
<span class="span">实际审核时间</span>
{{ project.start_date.substring(0, 16) }}
<span v-if="project.end_date"
>-{{ project.end_date.substring(0, 16) }}</span
>
</div>
<div
class="text2 item"
v-if="$route.name == 'PlanProject' && project.state == '策划中'"
>
<el-checkbox
v-model="can_paichai"
border
@change="handlePaichai"
>可派差</el-checkbox
>
</div>
</el-card>
</el-col>
<el-col :xs="24" :md="14" v-if="$route.name=='AuditProject'">
<el-card shadow="hover" style="height:150px">
<el-form
v-if="project.state=='审核任务已接受'"
ref="edateForm"
style="margin-top:2px"
:inline="true"
>
<el-form-item label="预计审核">
<el-date-picker
v-model="edate"
type="datetimerange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm"
:style="{width: '100%'}"
value-format="yyyy-MM-dd HH:mm"
:default-time="['08:00:00', '17:00:00']"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleEdate">保存</el-button>
</el-form-item>
</el-form>
<el-form
v-if="project.state=='待现场审核'"
ref="sdateForm"
style="margin-top:2px"
:inline="true"
>
<el-form-item label="开始时间">
<el-date-picker
v-model="start_date"
placeholder="开始审核"
format="yyyy-MM-dd HH:mm"
:style="{width: '100%'}"
value-format="yyyy-MM-dd HH:mm"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleStart">开始审核</el-button>
</el-form-item>
</el-form>
<el-col :xs="24" :md="14" v-if="$route.name == 'AuditProject'">
<el-card shadow="hover" style="height: 150px">
<el-form
v-if="project.state == '审核任务已接受'"
ref="edateForm"
style="margin-top: 2px"
:inline="true"
>
<el-form-item label="预计审核">
<el-date-picker
v-model="edate"
type="datetimerange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm"
:style="{ width: '100%' }"
value-format="yyyy-MM-dd HH:mm"
:default-time="['08:00:00', '17:00:00']"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleEdate"
>保存</el-button
>
</el-form-item>
</el-form>
<el-form
v-if="project.state == '待现场审核'"
ref="sdateForm"
style="margin-top: 2px"
:inline="true"
>
<el-form-item label="开始时间">
<el-date-picker
v-model="start_date"
type="datetime"
placeholder="开始审核"
format="yyyy-MM-dd HH:mm"
:style="{ width: '100%' }"
value-format="yyyy-MM-dd HH:mm"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleStart"
>开始审核</el-button
>
</el-form-item>
</el-form>
</el-card>
</el-col>
</el-card>
</el-col>
<el-col :xs="24" :md="8">
<el-card class="box-card" style="overflow-y:auto;overflow-x:hidden;height:200px">
<el-card
class="box-card"
style="overflow-y: auto; overflow-x: hidden; height: 200px"
>
<div slot="header" class="clearfix">
<span>受审核方</span>
<el-button style="float: right; padding: 0px 0" type="text">更多企业信息</el-button>
<el-button style="float: right; padding: 0px 0" type="text"
>更多企业信息</el-button
>
</div>
<div class="item">{{auditee.name}}</div>
<div class="item">{{ auditee.name }}</div>
<div v-for="item in auditee.address_" :key="item.id" class="text item">
<span class="span">{{item.type}}</span>
{{item.address}}
<div
v-for="item in auditee.address_"
:key="item.id"
class="text item"
>
<span class="span">{{ item.type }}</span>
{{ item.address }}
</div>
<div class="text item">
<span class="span">常用联系人</span>
{{auditee.linkman1_name}}/{{auditee.linkman1_duty}}/{{auditee.linkman1_mobile}}
{{ auditee.linkman1_name }}/{{ auditee.linkman1_duty }}/{{
auditee.linkman1_mobile
}}
</div>
<div class="text item">
<span class="span">备用联系人</span>
{{auditee.linkman2_name}}/{{auditee.linkman2_duty}}/{{auditee.linkman2_mobile}}
{{ auditee.linkman2_name }}/{{ auditee.linkman2_duty }}/{{
auditee.linkman2_mobile
}}
</div>
</el-card>
</el-col>
</el-row>
<el-card style="margin-top:6px">
<el-card style="margin-top: 6px">
<div slot="header" class="clearfix">
<span>项目进度</span>
</div>
<span>项目进度</span>
</div>
<el-steps :active="states.indexOf(project.state)" finish-status="success">
<el-step v-for="item in states" :title="item"
:key="item"
></el-step>
<el-step v-for="item in states" :title="item" :key="item"></el-step>
</el-steps>
</el-card>
<el-row style="margin-top:6px">
<el-row style="margin-top: 6px">
<el-col>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>业务信息</span>
</div>
<el-button type="primary" @click="appendCertapp" size="mini">添加申请</el-button>
<el-button type="primary" @click="appendCertapp" size="mini" v-if="$route.name == 'PlanProject'"
:disabled="!checkPermission(['certapp_bind'])">添加申请</el-button>
<el-table
ref="projectTable"
v-loading="listLoading"
:data="certappData"
style="margin-top:2px"
style="margin-top: 2px"
border
fit
stripe
@ -146,16 +177,21 @@
max-height="300"
>
<el-table-column label="单号">
<template slot-scope="scope" v-if="scope.row.number">{{ scope.row.number }}</template>
<template slot-scope="scope" v-if="scope.row.number">{{
scope.row.number
}}</template>
</el-table-column>
<el-table-column label="认证领域/分类" width="300px">
<template slot-scope="scope">
<el-tag v-if="scope.row.cert_field_">{{scope.row.cert_field_.name}}</el-tag>
<el-tag v-if="scope.row.cert_field_">{{
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>
style="margin: 2px"
>{{ scope.row.cccpv_class_.name }}</el-tag
>
</template>
</el-table-column>
<!-- <el-table-column label="申请信息" width="300px">
@ -175,61 +211,68 @@
</template>
</el-table-column>-->
<el-table-column label="当前状态">
<template slot-scope="scope">{{ scope.row.state}}</template>
<template slot-scope="scope">{{ scope.row.state }}</template>
</el-table-column>
<el-table-column label="受理/确认人">
<template
slot-scope="scope"
v-if="scope.row.accept_by_"
>{{ scope.row.accept_by_.name}}</template>
<template slot-scope="scope" v-if="scope.row.accept_by_">{{
scope.row.accept_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">
<el-table-column label="操作" fixed="right" width="260px">
<template slot-scope="scope">
<el-button
v-if="$route.name == 'AuditProject'"
type="primary"
size="small"
:disabled="!checkPermission(['certapp_detail'])"
@click="handleFeedback(scope)"
>反馈</el-button>
<el-button
v-if="$route.name == 'AuditProject'"
size="small"
:disabled="!checkPermission(['certapp_detail'])"
@click="handleCertappTest(scope)"
>安排检测</el-button>
<el-button
v-if="$route.name == 'PlanProject'"
type="primary"
size="small"
:disabled="!checkPermission(['certapp_detail'])"
@click="handlePlan(scope)"
>派人</el-button>
<el-button
size="small"
:disabled="!checkPermission(['certapp_detail'])"
@click="handleDetail(scope)"
>详情</el-button>
<el-button
v-if="$route.name == 'Projectupdate'"
type="danger"
size="small"
@click="handleRemove(scope)"
>移除</el-button>
<el-button
v-if="$route.name == 'AuditProject'"
type="primary"
size="small"
:disabled="!checkPermission(['certapp_detail'])"
@click="handleFeedback(scope)"
>反馈</el-button
>
<el-button
v-if="$route.name == 'AuditProject'"
size="small"
:disabled="!checkPermission(['certapp_detail'])"
@click="handleCertappTest(scope)"
>安排检测</el-button
>
<el-button
v-if="$route.name == 'PlanProject'"
type="primary"
size="small"
:disabled="!checkPermission(['certapp_detail'])"
@click="handlePlan(scope)"
>派人</el-button
>
<el-button
size="small"
:disabled="!checkPermission(['certapp_detail'])"
@click="handleDetail(scope)"
>详情</el-button
>
<el-button
v-if="$route.name == 'Projectupdate'"
type="danger"
size="small"
@click="handleRemove(scope)"
>移除</el-button
>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
<el-row :gutter="6" style="margin-top:6px">
<el-row :gutter="6" style="margin-top: 6px">
<el-col :xs="24" :md="8">
<el-card class="box-card" style="overflow-y:auto;overflow-x:hidden;height:380px">
<el-card
class="box-card"
style="overflow-y: auto; overflow-x: hidden; height: 380px"
>
<div slot="header" class="clearfix">
<span>联系记录</span>
</div>
@ -237,7 +280,7 @@
ref="projectTable"
v-loading="listLoading"
:data="contactData"
style="width: 100%;"
style="width: 100%"
border
fit
stripe
@ -245,13 +288,17 @@
height="160"
>
<el-table-column label="联系时间">
<template slot-scope="scope">{{ scope.row.contact_date }}</template>
<template slot-scope="scope">{{
scope.row.contact_date
}}</template>
</el-table-column>
<el-table-column label="内容">
<template slot-scope="scope">{{ scope.row.content }}</template>
</el-table-column>
<el-table-column label="操作人">
<template slot-scope="scope">{{ scope.row.create_by_.name }}</template>
<template slot-scope="scope">{{
scope.row.create_by_.name
}}</template>
</el-table-column>
</el-table>
<el-row :gutter="10">
@ -262,7 +309,7 @@
:rules="rules"
size="medium"
label-width="80px"
style="margin-top:2px"
style="margin-top: 2px"
label-position="left"
>
<el-row>
@ -272,7 +319,7 @@
v-model="formData.contact_date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:style="{width: '100%'}"
:style="{ width: '100%' }"
placeholder="联系时间"
clearable
></el-date-picker>
@ -285,25 +332,28 @@
<el-input
v-model="formData.content"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
:autosize="{ minRows: 2, maxRows: 4 }"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<div style="text-align:right;">
<el-button-group>
<el-button type="primary" @click="createNewRecord" size="mini">创建新记录</el-button>
<div style="text-align: right">
<el-button
type="primary"
@click="createNewRecord"
size="mini"
>创建新记录</el-button
>
<!-- <el-button type="primary" @click="updateNowRecord" size="mini">保存</el-button> -->
<el-button @click="resetForm" size="mini">重置</el-button>
</el-button-group>
</div>
</el-row>
</el-form>
</el-col>
<el-col :xs="24" :md="12">
<el-row>
<el-card shadow="never" style="margin-top:2px">
<el-card shadow="never" style="margin-top: 2px">
<div slot="header" class="clearfix">
<span>常用语</span>
</div>
@ -311,8 +361,9 @@
v-for="(item, index) in useditems"
:key="index"
@click.native="handleClickTag(item)"
style="margin:2px;font-size:12px"
>{{item}}</el-tag>
style="margin: 2px; font-size: 12px"
>{{ item }}</el-tag
>
</el-card>
</el-row>
</el-col>
@ -320,7 +371,10 @@
</el-card>
</el-col>
<el-col :xs="24" :md="8">
<el-card class="box-card" style="overflow-y:auto;overflow-x:hidden;height:380px">
<el-card
class="box-card"
style="overflow-y: auto; overflow-x: hidden; height: 380px"
>
<div slot="header" class="clearfix">
<span>项目成员</span>
</div>
@ -328,7 +382,7 @@
ref="memberTable"
v-loading="listLoading"
:data="memberData"
style="width: 100%;"
style="width: 100%"
border
fit
stripe
@ -340,22 +394,28 @@
</el-table-column>
<el-table-column label="是否组长">
<template slot-scope="scope">
<i class="el-icon-circle-check" v-if="scope.row.is_leader" style="color:green;"></i>
<i
class="el-icon-circle-check"
v-if="scope.row.is_leader"
style="color: green"
></i>
</template>
</el-table-column>
<el-table-column label="身份">
<template slot-scope="scope" v-if="scope.row.identity">{{ scope.row.identity_.name }}</template>
<template slot-scope="scope" v-if="scope.row.identity">{{
scope.row.identity_.name
}}</template>
</el-table-column>
<el-table-column label="是否接受">
<template slot-scope="scope">
<el-switch
v-model="scope.row.is_accepted"
disabled
active-color="#13ce66"
inactive-color="#ff0000"
></el-switch>
</template>
</el-table-column>
<template slot-scope="scope">
<el-switch
v-model="scope.row.is_accepted"
disabled
active-color="#13ce66"
inactive-color="#ff0000"
></el-switch>
</template>
</el-table-column>
</el-table>
<!-- <el-form
ref="elForm2"
@ -406,7 +466,10 @@
</el-card>
</el-col>
<el-col :xs="24" :md="8">
<el-card class="box-card" style="overflow-y:auto;overflow-x:hidden;height:380px">
<el-card
class="box-card"
style="overflow-y: auto; overflow-x: hidden; height: 380px"
>
<div slot="header" class="clearfix">
<span>审核总反馈</span>
</div>
@ -416,24 +479,24 @@
:rules="backrules"
size="medium"
label-width="80px"
style="margin-top:2px"
style="margin-top: 2px"
label-position="top"
>
<el-row>
<el-col>
<el-form-item label="实际实施时间" prop="backdate">
<el-date-picker
v-model="backformData.backdate"
type="datetimerange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm"
:style="{width: '100%'}"
value-format="yyyy-MM-dd HH:mm"
:default-time="['08:00:00', '17:00:00']"
></el-date-picker>
</el-form-item>
<el-date-picker
v-model="backformData.backdate"
type="datetimerange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm"
:style="{ width: '100%' }"
value-format="yyyy-MM-dd HH:mm"
:default-time="['08:00:00', '17:00:00']"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
@ -450,16 +513,22 @@
<el-input
v-model="backformData.feedback_remark"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
:autosize="{ minRows: 2, maxRows: 4 }"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<div style="text-align:center;" v-if="$route.name=='AuditProject'">
<el-button-group>
<el-button type="primary" @click="handlePback" :disabled="project.state != '现场审核中'">提交反馈</el-button>
</el-button-group>
<div
style="text-align: center"
v-if="$route.name == 'AuditProject'"
>
<el-button
type="primary"
@click="handlePback"
:disabled="project.state != '现场审核中'"
>提交反馈</el-button
>
</div>
</el-row>
</el-form>
@ -473,7 +542,11 @@
width="80%"
:append-to-body="true"
>
<Userchose ref="Userchose" :querydata="querydata" @handleChose="choseComplete"></Userchose>
<Userchose
ref="Userchose"
:querydata="querydata"
@handleChose="choseComplete"
></Userchose>
</el-dialog>
<el-dialog
title="选择申请"
@ -482,10 +555,13 @@
width="80%"
:append-to-body="true"
>
<Certappchose ref="Certappchose" @handleChose="chooseComplete2" :querydata="querydata2"></Certappchose>
<Certappchose
ref="Certappchose"
@handleChose="choseComplete2"
:querydata="querydata2"
></Certappchose>
</el-dialog>
</div>
</template>
<style scoped>
.text {
@ -504,14 +580,20 @@
</style>
<script>
import { getDictList } from "@/api/dict";
import { getCertappList } from "@/api/certapp";
import { getCertappList, bindCertapp, unbindCertapp } from "@/api/certapp";
import { getEnterprise } from "@/api/enterprise";
import { getProject, updateProject, edateProject, startProject, feedbackProject } from "@/api/project";
import {
getProject,
updateProject,
edateProject,
startProject,
feedbackProject,
} from "@/api/project";
import { getContactRecordList, createContactRecord } from "@/api/plan";
import Pagination from "@/components/Pagination";
import checkPermission from "@/utils/permission";
import Userchose from "@/views/employee/userchose";
import Certappchose from '@/views/certapp/certappchose'
import Certappchose from "@/views/certapp/certappchose";
import {
getMemberList,
createMember,
@ -525,8 +607,19 @@ export default {
props: [],
data() {
return {
states:['创建中', '待策划', '策划中', '审核任务已下达', '审核任务已接受', '待现场审核', '现场审核中', '任务已反馈', '检测评定出证', '完成'],
stateIndex:1,
states: [
"创建中",
"待策划",
"策划中",
"审核任务已下达",
"审核任务已接受",
"待现场审核",
"现场审核中",
"任务已反馈",
"检测评定出证",
"完成",
],
stateIndex: 1,
auditee: {},
project: { assign_by_: null },
certappData: [],
@ -535,7 +628,7 @@ export default {
can_paichai: false,
formData: {
content: "",
project: this.$route.query.project,
project: this.$route.params.id,
},
rules: {
contact_date: [
@ -575,19 +668,19 @@ export default {
],
},
choseVisiable: false,
chooseVisiable2:false,
chooseVisiable2: false,
querydata: {},
querydata2:{},
querydata2: {},
identityOptions: [],
edate:[],
edate_:[],
start_date:null,
rdate:[],
backformData:{
backdate:null,
feedback_remark:''
edate: [],
edate_: [],
start_date: null,
rdate: [],
backformData: {
backdate: null,
feedback_remark: "",
},
backrules:{
backrules: {
backdate: [
{
required: true,
@ -595,12 +688,11 @@ export default {
trigger: "change",
},
],
}
},
};
},
computed: {},
watch: {
},
watch: {},
created() {
this.getParams();
this.getMemberList_();
@ -616,13 +708,16 @@ export default {
.then((res) => {
this.project = res.data;
this.can_paichai = this.project.can_paichai;
if(this.project.edate0){
this.edate = [this.project.edate0, this.project.edate1]
this.edate_ = [this.project.edate0, this.project.edate1]
if (this.project.edate0) {
this.edate = [this.project.edate0, this.project.edate1];
this.edate_ = [this.project.edate0, this.project.edate1];
}
if(this.project.end_date){
this.backformData.backdate = [this.project.start_date, this.project.end_date]
this.backformData.feedback_remark = this.project.feedback_remark
if (this.project.end_date) {
this.backformData.backdate = [
this.project.start_date,
this.project.end_date,
];
this.backformData.feedback_remark = this.project.feedback_remark;
}
})
.then(() => {
@ -659,11 +754,12 @@ export default {
});
},
getMemberList_() {
getMemberList({ certapp__project: this.$route.params.id, pageoff: true }).then(
(res) => {
this.memberData = res.data;
}
);
getMemberList({
certapp__project: this.$route.params.id,
pageoff: true,
}).then((res) => {
this.memberData = res.data;
});
},
submitForm() {
this.$refs["elForm"].validate((valid) => {
@ -683,6 +779,7 @@ export default {
this.formData.content = val;
},
createNewRecord() {
console.log(this.formData)
createContactRecord(this.formData).then((rse) => {
this.$message.success("成功");
this.getContactRecordList_();
@ -748,61 +845,114 @@ export default {
handleMClick(row, c, e) {
this.formDataMember = deepClone(row);
},
handleEdate(){
if(this.edate.length){
edateProject(this.project.id, {edate0:this.edate[0], edate1:this.edate[1]}).then(res=>{
this.$message.success('成功')
this.edate_ = this.edate
this.project.state = res.data.state
this.project.edate0 = res.data.edate0
this.project.edate1 = res.data.edate1
}).catch(e=>{})
handleEdate() {
if (this.edate.length) {
edateProject(this.project.id, {
edate0: this.edate[0],
edate1: this.edate[1],
})
.then((res) => {
this.$message.success("成功");
this.edate_ = this.edate;
this.project.state = res.data.state;
this.project.edate0 = res.data.edate0;
this.project.edate1 = res.data.edate1;
})
.catch((e) => {});
}
},
handleStart(scope){
startProject(this.project.id, {start_date:this.start_date}).then(res=>{
this.$message.success('成功')
this.project.state = res.data.state
this.project.start_date = res.data.start_date
}).catch(e=>{})
handleStart(scope) {
startProject(this.project.id, { start_date: this.start_date })
.then((res) => {
this.$message.success("成功");
this.project.state = res.data.state;
this.project.start_date = res.data.start_date;
})
.catch((e) => {});
},
handlePback(){
this.$refs['backform'].validate(valid => {
handlePback() {
this.$refs["backform"].validate((valid) => {
if (valid) {
feedbackProject(this.project.id, {start_date:this.backformData.backdate[0], end_date:this.backformData.backdate[1], feedback_remark:this.backformData.feedback_remark}).then(res=>{
this.$message.success('成功')
this.project.state = res.data.state
this.project.start_date = res.data.start_date
this.project.end_date = res.data.end_date
}).catch(e=>{})}
else{
return false
}})
feedbackProject(this.project.id, {
start_date: this.backformData.backdate[0],
end_date: this.backformData.backdate[1],
feedback_remark: this.backformData.feedback_remark,
})
.then((res) => {
this.$message.success("成功");
this.project.state = res.data.state;
this.project.start_date = res.data.start_date;
this.project.end_date = res.data.end_date;
})
.catch((e) => {});
} else {
return false;
}
});
},
handleFeedback(scope){
this.$router.push({name:"Certappfeedback", params:{action:'feedback', id:scope.row.id}})
handleFeedback(scope) {
this.$router.push({
name: "Certappfeedback",
params: { action: "feedback", id: scope.row.id },
});
},
handleCertappTest(scope) {
this.$router.push({name:"Certapptest", params:{action:'test', id:scope.row.id}})
this.$router.push({
name: "Certapptest",
params: { action: "test", id: scope.row.id },
});
},
handlePlan(scope){
this.$router.push({name:"Certappmember", params:{action:'member', id:scope.row.id}})
handlePlan(scope) {
this.$router.push({
name: "Certappmember",
params: { action: "member", id: scope.row.id },
});
},
handleDetail(scope){
this.$router.push({name:"Certappdetail", params:{id:scope.row.id}})
handleDetail(scope) {
this.$router.push({
name: "Certappdetail",
params: { id: scope.row.id },
});
},
appendCertapp(){
this.querydata2={
page:1,
page_size:10,
applicant:this.project.auditee,
state:'策划'
}
this.chooseVisiable2 = true
appendCertapp() {
this.querydata2 = {
page: 1,
page_size: 10,
applicant: this.project.auditee,
state: "策划",
};
this.chooseVisiable2 = true;
},
choseComplete2(val) {
this.chooseVisiable2 = false;
var data = { ids: val, project: this.$route.params.id };
bindCertapp(data)
.then((res) => {
this.getCertappList_();
this.$message.success("成功");
})
.catch((e) => {
this.getCertappList_();
});
},
handleRemove(scope) {
this.$confirm("确认移除吗?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
unbindCertapp(scope.row.id)
.then((res) => {
this.getCertappList_();
this.$message.success("成功");
})
.catch((e) => {
this.getCertappList_();
});
})
.catch((e) => {});
},
choseComplete2(val){
}
},
};
</script>

View File

@ -45,17 +45,17 @@
icon="el-icon-search"
@click="handleFilter"
style="margin-left:10px"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
style="margin-left: 10px;"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<div style="margin-top:6px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" v-if="$route.name=='EmployeeUpdate'">新增</el-button>
</div>
<el-table
v-loading="listLoading"

View File

@ -45,14 +45,14 @@
icon="el-icon-search"
@click="handleFilter"
style="margin-left:10px"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
style="margin-left: 10px;"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<el-table
v-loading="listLoading"

View File

@ -28,14 +28,14 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
style="margin-left: 10px;"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<div style="margin-top:6px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>

View File

@ -23,14 +23,14 @@
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-search" @click="handleFilter">查询</el-button>
<el-button
class="filter-item"
style="margin-left: 10px;"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<el-table
v-loading="listLoading"

View File

@ -28,14 +28,14 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
style="margin-left: 10px;"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<el-table
v-loading="listLoading"

View File

@ -3,7 +3,7 @@
<div style="margin-top:10px">
<el-input
v-model="search"
placeholder="输入部门名称进行搜索"
placeholder="输入部门名称进行查询"
style="width: 200px;"
class="filter-item"
@keyup.native="handleFilter"

View File

@ -3,7 +3,7 @@
<div style="margin-top:10px">
<el-input
v-model="search"
placeholder="输入权限名称进行搜索"
placeholder="输入权限名称进行查询"
style="width: 200px;"
class="filter-item"
@keyup.native="handleFilter"

View File

@ -3,7 +3,7 @@
<div style="margin-top:10px">
<el-input
v-model="search"
placeholder="输入岗位名称进行搜索"
placeholder="输入岗位名称进行查询"
style="width: 200px;"
class="filter-item"
@keyup.native="handleFilter"

View File

@ -3,7 +3,7 @@
<div style="margin-top:10px">
<el-input
v-model="search"
placeholder="输入角色名称进行搜索"
placeholder="输入角色名称进行查询"
style="width: 200px;"
class="filter-item"
@keyup.native="handleFilter"

View File

@ -28,14 +28,14 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
style="margin-left: 10px;"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<el-table
v-loading="listLoading"

View File

@ -47,14 +47,14 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
>查询</el-button>
<el-button
class="filter-item"
style="margin-left: 10px;"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>刷新重置</el-button>
>重置</el-button>
</div>
<div style="margin-top:10px">
<el-button type="primary" icon="el-icon-plus" @click="handleAddUser">新增</el-button>

View File

@ -54,7 +54,6 @@
</el-table-column>
<el-table-column label="操作" width="250">
<template slot-scope="scope">
<el-button-group>
<el-button
v-if="scope.row.teststate=='待实验室检验'"
@ -76,7 +75,6 @@
:disabled="!checkPermission(['certapps_update'])"
@click="handlestate(scope.row.id)"
>查看任务</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>

View File

@ -37,7 +37,7 @@ class TeamMemberSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
fields = ['code', 'user', 'user_', 'photo', 'fields', 'majors']
fields = ['code', 'user', 'user_', 'photo', 'fields', 'majors', 'id']
def get_majors(self, obj):
majors = obj.ability_employee.all()

View File

@ -48,7 +48,7 @@ class MemberViewSet(CreateUpdateCustomMixin, PageOrNot, ModelViewSet):
def create(self, request, *args, **kwargs):
serializer = self.get_serializer(data=request.data)
serializer.is_valid(raise_exception=True)
if CertApp.object.get(pk=request.data['certapp'])!='策划':
if CertApp.objects.get(pk=request.data['certapp']).state !='策划':
return Response('业务状态异常,操作失败', status = status.HTTP_400_BAD_REQUEST)
if Member.objects.filter(user = request.data['user'], certapp=request.data['certapp'], is_deleted=False).exists():
return Response('已存在该成员', status= status.HTTP_400_BAD_REQUEST)

View File

@ -2,3 +2,4 @@
from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(CertApp)

View File

@ -1,7 +1,6 @@
import re
from django.http import request
from rest_framework.views import APIView
from apps import project
from django.shortcuts import render
from rest_framework.serializers import ModelSerializer
from rest_framework.viewsets import ModelViewSet, GenericViewSet
@ -155,8 +154,7 @@ class CertappViewset(PageOrNot, RbacFilterSet, ModelViewSet):
obj.save()
CertAppFlow.objects.create(certapp = obj, handler=self.request.user, operation='提交现场审核反馈', state=oldstate)
return Response({'state':obj.state}, status=status.HTTP_200_OK)
else:
return Response('项目状态异常,操作失败', status=status.HTTP_400_BAD_REQUEST)
return Response('业务状态异常,操作失败', status=status.HTTP_400_BAD_REQUEST)
@action(methods=['get'], detail=True, perms_map={'get':'*'},
url_name='certapp_flow')
@ -168,9 +166,31 @@ class CertappViewset(PageOrNot, RbacFilterSet, ModelViewSet):
serializer = CertappflowSerializer(objs, many=True)
return Response(serializer.data)
@action(methods=['put'], detail=False, perms_map={'put':'certapp_bind'},
url_name='certapp_bind')
def bind(self, request, *args, **kwargs):
"""
绑定至项目
"""
ids = request.data['ids']
project = Project.objects.get(pk=request.data['project'])
CertApp.objects.filter(pk__in=ids, is_deleted=False, project__isnull=True).update(project=project)
return Response(status=status.HTTP_200_OK)
@action(methods=['put'], detail=True, perms_map={'put':'certapp_unbind'},
url_name='certapp_unbind')
def unbind(self, request, *args, **kwargs):
"""
与项目解绑
"""
obj = self.get_object()
if obj.state == '策划':
obj.project = None
obj.save()
return Response(status=status.HTTP_200_OK)
return Response('业务状态异常,操作失败', status=status.HTTP_400_BAD_REQUEST)
class EvaluationDetailViewset(CreateUpdateCustomMixin, PageOrNot,ModelViewSet):
class EvaluationDetailViewset(CreateUpdateCustomMixin, PageOrNot, ModelViewSet):
"""
受理信息
"""
@ -288,7 +308,7 @@ class ProjectViewSet(RbacFilterSet, ModelViewSet):
serializer = self.get_serializer(data=postdata)
serializer.is_valid(raise_exception=True)
obj = serializer.save(create_by = self.request.user, belong_dept=self.request.user.dept)
obj.state = '创建中'
obj.state = '创建中' #空项目
if 'certapps' in postdata and postdata['certapps']:
CertApp.objects.filter(pk__in = postdata['certapps']).update(project=obj)
obj.state = '待策划'
@ -307,8 +327,7 @@ class ProjectViewSet(RbacFilterSet, ModelViewSet):
obj.state = '审核任务已下达'
obj.save()
return Response(status=status.HTTP_200_OK)
else:
return Response('项目状态异常,操作失败', status=status.HTTP_400_BAD_REQUEST)
return Response('项目状态异常,操作失败', status=status.HTTP_400_BAD_REQUEST)
@action(methods=['put'], detail=True, perms_map={'put':'project_toplan'},
url_name='project_toplan')
@ -408,4 +427,3 @@ class ProjectViewSet(RbacFilterSet, ModelViewSet):
return Response({'start_date':obj.start_date, 'end_date':obj.end_date,'state':obj.state}, status=status.HTTP_200_OK)
else:
return Response('项目状态异常,操作失败', status=status.HTTP_400_BAD_REQUEST)