pagination
This commit is contained in:
parent
f84dfc3cc0
commit
328ea10969
|
@ -7,13 +7,18 @@
|
|||
|
||||
|
||||
.el-table--medium td, .el-table--medium th {
|
||||
padding: 0px 0;
|
||||
padding: 2px 0;
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
|
||||
.el-card__body {
|
||||
padding: 10px;
|
||||
}
|
||||
.el-card__header {
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
export default {
|
||||
|
|
|
@ -93,7 +93,7 @@ export default {
|
|||
<style scoped>
|
||||
.pagination-container {
|
||||
background: #fff;
|
||||
padding: 0px 16px;
|
||||
padding: 0px 2px;
|
||||
}
|
||||
.pagination-container.hidden {
|
||||
display: none;
|
||||
|
|
|
@ -118,8 +118,8 @@ export const asyncRoutes = [
|
|||
{
|
||||
path: 'plan',
|
||||
name: 'plan',
|
||||
component: () => import('@/views/certapp/certapp'),
|
||||
meta: { title: '计划', icon: 'example', perms: ['certapp_view'] }
|
||||
component: () => import('@/views/plan/plan'),
|
||||
meta: { title: '计划', icon: 'example', perms: ['plan_view'] }
|
||||
},
|
||||
{
|
||||
path: 'paichai',
|
||||
|
|
|
@ -243,7 +243,7 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" align="center">
|
||||
<el-button @click="close(false)">取消</el-button>
|
||||
<el-button @click="cancel()">返回列表</el-button>
|
||||
<el-button type="primary" @click="handelConfirm">保存</el-button>
|
||||
</div>
|
||||
<el-dialog
|
||||
|
@ -382,9 +382,9 @@ export default {
|
|||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
close(val) {
|
||||
cancel(val) {
|
||||
// this.$refs['elForm'].resetFields()
|
||||
this.$emit("closeDg", val);
|
||||
this.$router.go(-1)
|
||||
},
|
||||
handelConfirm() {
|
||||
this.$refs["elForm"].validate((valid) => {
|
||||
|
@ -409,6 +409,7 @@ export default {
|
|||
},
|
||||
chooseComplete(val) {
|
||||
this.dgVisiable = false;
|
||||
console.log(val)
|
||||
if (val) {
|
||||
if (this.dgType == 0) {
|
||||
this.formData.applicant = val.id;
|
||||
|
@ -419,6 +420,24 @@ export default {
|
|||
linkman_duty: val.linkman1_duty,
|
||||
person_count: val.person_count,
|
||||
};
|
||||
}else if(this.dgType==1){
|
||||
this.formData.manufacture = val.id;
|
||||
this.formData.manufacture_v = {
|
||||
name: val.name,
|
||||
linkman_name: val.linkman1_name,
|
||||
linkman_mobile: val.linkman1_mobile,
|
||||
linkman_duty: val.linkman1_duty,
|
||||
person_count: val.person_count,
|
||||
};
|
||||
}else{
|
||||
this.formData.factory = val.id;
|
||||
this.formData.factory_v = {
|
||||
name: val.name,
|
||||
linkman_name: val.linkman1_name,
|
||||
linkman_mobile: val.linkman1_mobile,
|
||||
linkman_duty: val.linkman1_duty,
|
||||
person_count: val.person_count,
|
||||
};
|
||||
}
|
||||
}
|
||||
this.getAddressList_(val.id);
|
||||
|
|
|
@ -38,12 +38,12 @@
|
|||
class="filter-item"
|
||||
@keyup.enter.native="handleFilter"
|
||||
/>
|
||||
<el-button-group style="margin-left:2px">
|
||||
<el-button
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleFilter"
|
||||
style="margin-left:10px"
|
||||
>搜索</el-button>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
|
@ -51,10 +51,13 @@
|
|||
icon="el-icon-refresh-left"
|
||||
@click="resetFilter"
|
||||
>刷新重置</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div style="margin-top:6px">
|
||||
<el-button-group>
|
||||
<el-button type="primary" icon="el-icon-plus" v-for="(item, index) in field_list" :key="'field_list' + index" @click="handleCreate(item,index)" size="mini">{{item.name}}</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-plus">批量多体系</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
|
@ -98,7 +101,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button-group>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
|
@ -111,6 +114,7 @@
|
|||
:disabled="!checkPermission(['case_delete'])"
|
||||
@click="handleDelete(scope)"
|
||||
>删除</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<<<<<<< HEAD
|
||||
<el-tabs >
|
||||
<el-tab-pane label="申请信息" >
|
||||
<div v-if="isLoad">
|
||||
<CCCform :action="action" @handleCommit="save" :certapp="certapp" v-if="kind=='CCC'"></CCCform>
|
||||
</div>
|
||||
=======
|
||||
<el-tabs type="border-card" >
|
||||
<el-tab-pane label="申请信息" style="height:700px;overflow-y:auto;overflow-x:hidden;">
|
||||
<CCCform :action="action" @handleCommit="save" :certapp="certapp" v-if="kind=='CCC'"></CCCform>
|
||||
<QMSform :action="action" @handleCommit="save" :certapp="certapp" v-if="kind=='QMS'"></QMSform>
|
||||
>>>>>>> cadd1bc4bb33c7e12f4af4ff51565f60fbb6dc85
|
||||
<el-tab-pane label="申请信息" style="overflow-y:auto;overflow-x:hidden;">
|
||||
<CCCform :action="action" @handleCommit="save" :certapp="certapp" v-if="kind=='CCC'&isLoad"></CCCform>
|
||||
<QMSform :action="action" @handleCommit="save" :certapp="certapp" v-if="kind=='QMS'&isLoad"></QMSform>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="产品单元" v-if="certapp">
|
||||
<Productunit :certapp="certapp"></Productunit>
|
||||
|
@ -35,17 +27,12 @@
|
|||
</template>
|
||||
<script>
|
||||
import CCCform from "@/views/certapp/cccform"
|
||||
<<<<<<< HEAD
|
||||
import Productunit from "@/views/certapp/productunit"
|
||||
import { getCertapp, completeCertapp } from "@/api/certapp"
|
||||
import router from '@/router';
|
||||
export default {
|
||||
components: { CCCform, Productunit},
|
||||
=======
|
||||
import QMSform from "@/views/certapp/qmsform"
|
||||
export default {
|
||||
components: { CCCform,QMSform },
|
||||
>>>>>>> cadd1bc4bb33c7e12f4af4ff51565f60fbb6dc85
|
||||
components: { CCCform, Productunit, QMSform},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -0,0 +1,332 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>月计划</span>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<el-button type="primary" @click="genProject0" size="mini">新建计划</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="projectData.results"
|
||||
style="width: 100%;margin-top:10px;"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="240"
|
||||
>
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<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">{{ scope.row.auditee_v.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目信息" width="300px" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope" v-if="scope.row.certapps">
|
||||
<el-tag
|
||||
v-for="(item, index) in scope.row.certapps"
|
||||
:key="index"
|
||||
style="margin:2px"
|
||||
>{{item}}</el-tag>
|
||||
</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="操作" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
v-if="scope.row.status == '待下达'"
|
||||
type="warning"
|
||||
size="small"
|
||||
:disabled="!checkPermission(['project_assign'])"
|
||||
@click="handleAssign(scope)"
|
||||
>下达</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
:disabled="!checkPermission(['project_update'])"
|
||||
@click="handleUpdate(scope)"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
:disabled="!checkPermission(['project_delete'])"
|
||||
@click="handleDelete(scope)"
|
||||
>删除</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="projectData.count>0"
|
||||
:total="projectData.count"
|
||||
:page.sync="listQuery_project.page"
|
||||
:limit.sync="listQuery_project.page_size"
|
||||
@pagination="getProjectList_"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card" style="margin-top:2px">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>待处理项目</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="projectData.results"
|
||||
style="width: 100%;"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="280"
|
||||
>
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<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">{{ scope.row.auditee_v.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目信息" width="300px" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope" v-if="scope.row.certapps">
|
||||
<el-tag
|
||||
v-for="(item, index) in scope.row.certapps"
|
||||
:key="index"
|
||||
style="margin:2px"
|
||||
>{{item}}</el-tag>
|
||||
</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="操作" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
:disabled="!checkPermission(['project_update'])"
|
||||
@click="handleUpdate(scope)"
|
||||
>联系企业</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
:disabled="!checkPermission(['project_delete'])"
|
||||
@click="handleDelete(scope)"
|
||||
>详情</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="projectData.count>0"
|
||||
:total="projectData.count"
|
||||
:page.sync="listQuery_project.page"
|
||||
:limit.sync="listQuery_project.page_size"
|
||||
@pagination="getProjectList_"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogvisible_project" title="创建项目">
|
||||
<el-form
|
||||
ref="elForm"
|
||||
:model="formData"
|
||||
label-width="80px"
|
||||
label-position="right"
|
||||
:rules="rules"
|
||||
>
|
||||
<div v-if="certapps_data.length > 0">
|
||||
已选择
|
||||
<span style="color:red;font-weight:bold">{{certapps_data.length}}</span>条已受理业务
|
||||
</div>
|
||||
<el-form-item label="受审核方" prop="auditee">
|
||||
<el-input placeholder="请选择受审核方" readonly clearable v-model="formData.auditee_v.name">
|
||||
<el-button
|
||||
slot="append"
|
||||
icon="el-icon-search"
|
||||
@click="choose(0)"
|
||||
v-if="certapps_data.length == 0"
|
||||
></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="auditee_v.linkman_name">
|
||||
<el-input v-model="formData.auditee_v.linkman_name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="auditee_v.linkman_mobile">
|
||||
<el-input v-model="formData.auditee_v.linkman_mobile"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="username">
|
||||
<el-input
|
||||
v-model="formData.remark"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 6, maxRows: 10}"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align:right;">
|
||||
<el-button type="danger" @click="dialogvisible_project=false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getCertappList } from "@/api/certapp";
|
||||
import { getProjectList, createProject, assginProject } from "@/api/project";
|
||||
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 {
|
||||
certapps_data: [],
|
||||
certappData: [],
|
||||
listLoading: true,
|
||||
listQuery: {
|
||||
status: "已受理",
|
||||
},
|
||||
listQuery_project: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
status:"待派差"
|
||||
},
|
||||
deptOptions: [],
|
||||
field_list: [],
|
||||
projectData: { count: 0, results: [] },
|
||||
formData: {
|
||||
certapps: [],
|
||||
auditee_v: {},
|
||||
auditee: null,
|
||||
},
|
||||
dialogvisible_project: false,
|
||||
rules: {
|
||||
auditee: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择受审核方",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
certapps_data: function (val) {
|
||||
let certapps = [];
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
certapps.push(val[i].id);
|
||||
}
|
||||
this.formData.certapps = certapps;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getCertappList_();
|
||||
this.getProjectList_();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
getCertappList_() {
|
||||
this.listLoading = true;
|
||||
getCertappList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.certappData = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
getProjectList_() {
|
||||
this.listLoading = true;
|
||||
getProjectList(this.listQuery_project).then((response) => {
|
||||
if (response.data) {
|
||||
this.projectData = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
getdeptOptions() {
|
||||
getOrgList().then((res) => {
|
||||
this.deptOptions = genTree(res.data);
|
||||
});
|
||||
},
|
||||
resetFilter() {
|
||||
this.listQuery = {
|
||||
status: "已受理",
|
||||
};
|
||||
this.getCertappList_();
|
||||
},
|
||||
handleFilter() {
|
||||
this.getCertappList_();
|
||||
},
|
||||
genProject() {
|
||||
if (this.certapps_data.length > 0) {
|
||||
this.dialogvisible_project = true;
|
||||
this.formData.auditee = this.certapps_data[0].applicant;
|
||||
this.formData.auditee_v = this.certapps_data[0].applicant_v;
|
||||
} else {
|
||||
this.$message.warning("请先选择已受理业务");
|
||||
}
|
||||
},
|
||||
genProject0() {
|
||||
this.$refs["projectTable"].clearSelection();
|
||||
this.dialogvisible_project = true;
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.certapps_data = val;
|
||||
},
|
||||
confirm() {
|
||||
this.$refs["elForm"].validate((valid) => {
|
||||
if (!valid) return;
|
||||
// TODO 提交表单
|
||||
createProject(this.formData).then((res) => {
|
||||
this.getCertappList_();
|
||||
this.getProjectList_();
|
||||
this.dialogvisible_project = false;
|
||||
this.$message.success("成功");
|
||||
});
|
||||
});
|
||||
},
|
||||
handleAssign(scope) {
|
||||
if (scope.row.certapps.length == 0) {
|
||||
this.$message.error("该项目不包含业务,无法下达!");
|
||||
} else {
|
||||
this.$confirm("确定下达并转入策划派差吗?", "提示", {
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
assginProject(scope.row.id, {}).then((res) => {
|
||||
this.$message.success("下达成功");
|
||||
this.getProjectList_();
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -3,7 +3,7 @@
|
|||
<el-tabs>
|
||||
<el-tab-pane label="认证项目">
|
||||
<div>
|
||||
<el-button type="primary" @click="genProject0">新建项目</el-button>
|
||||
<el-button type="primary" @click="genProject0" size="mini">新建项目</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
|
@ -77,7 +77,7 @@
|
|||
</el-tab-pane>
|
||||
<el-tab-pane label="待处理业务">
|
||||
<div>
|
||||
<el-button type="primary" @click="genProject">生成项目</el-button>
|
||||
<el-button type="primary" @click="genProject" size="mini">生成项目</el-button>
|
||||
</div>
|
||||
<div style="margin-top:10px">
|
||||
<template>
|
||||
|
|
|
@ -102,10 +102,8 @@ class CertApp(CommonBModel):
|
|||
manufacture_v = JSONField(verbose_name='制造商', null=True)
|
||||
factory = models.ForeignKey(Enterprise, on_delete=models.CASCADE, related_name='certapp_factory', null=True, blank=True)
|
||||
factory_v = JSONField(verbose_name='生产厂', null=True)
|
||||
<<<<<<< HEAD
|
||||
scope = models.TextField('认证范围', null=True, blank=True)
|
||||
|
||||
=======
|
||||
system_people = models.FloatField('体系相关员工数',null=True, blank=True, default=0)
|
||||
initial_people = models.FloatField('初始人日数',null=True, blank=True, default=0)
|
||||
supervision_people = models.FloatField('监督人日数',null=True, blank=True, default=0)
|
||||
|
@ -117,7 +115,6 @@ class CertApp(CommonBModel):
|
|||
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)
|
||||
>>>>>>> cadd1bc4bb33c7e12f4af4ff51565f60fbb6dc85
|
||||
class Meta:
|
||||
verbose_name = '认证受理'
|
||||
verbose_name_plural = verbose_name
|
||||
|
|
Loading…
Reference in New Issue