Commit 7fa82e46 authored by 李苏's avatar 李苏 💬

职工持证界面

parent 5baaeb3f
<template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="职工" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-col :span="8">
<el-form-item label="用户" ref="userid" prop="userid">
<!-- <el-input :readonly="readonly" v-model="form.userid" ></el-input> -->
<personSelector :label="form.userName||form.userid||'暂无'" @selected='userSelected' ></personSelector>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="证书编号" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-col :span="8">
<el-form-item label="证书编号" ref="code" prop="code">
<el-input :readonly="readonly" v-model="form.code" ></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="证书名称" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="证书名称" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-col :span="8">
<el-form-item label="发证日期" ref="fzsq" prop="fzsq">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.fzsq" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="有效期(年)" ref="yxq" prop="yxq">
<el-input type="number" :readonly="readonly" v-model="form.yxq" ></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="截止日期" ref="jzrq" prop="jzrq">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.jzrq" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="复审日期1" ref="fsrq1" prop="fsrq1">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.fsrq1" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="复审日期2" ref="fsrq2" prop="fsrq2">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.fsrq2" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发证单位" ref="roleid" prop="roleid">
<el-input :readonly="readonly" v-model="form.roleid"></el-input>
<el-col :span="8">
<el-form-item label="实际复审日期1" ref="sjfsrq1" prop="sjfsrq1">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.sjfsrq1" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="适用范围">
<el-select></el-select>
<el-col :span="8">
<el-form-item label="实际复审日期2" ref="sjfsrq2" prop="sjfsrq2">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.sjfsrq2" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="证书有效期">
<el-date-picker style="width: 100%;"></el-date-picker>
<!-- <el-col :span="8">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz" ></el-input>
</el-form-item>
</el-col> -->
<!-- <el-col :span="8">
<el-form-item label="系统版本" ref="sysversion" prop="sysversion">
<el-input :readonly="readonly" v-model="form.sysversion" ></el-input>
</el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item label="适用范围" ref="syfw" prop="syfw">
<RelSelect :readonly="readonly" src='aqgl/rcgl/ygczxx/init/syfw' clearable :match="{value:'id',label:'name'}" v-model='form.syfw' ></RelSelect>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="截至日期">
<el-date-picker style="width: 100%;"></el-date-picker>
<el-form-item label="发证单位" ref="fzdw" prop="fzdw">
<el-input :readonly="readonly" v-model="form.fzdw" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- 按钮重写, -->
<!-- <div slot="reFooter">
<span slot="footer">
重写按钮写在这里,根据需要重写 slot(reFooter,foorer) 节点样式 重写方法需要在此页重新定义
</span>
</div> -->
</RelDialog>
</template>
<script>
......@@ -58,9 +106,10 @@
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
name: 'roleManagementEdit',
name: "aqgl/rcglYgczxxEdit",
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
......@@ -69,11 +118,54 @@
/* 额外初始化,根据需求*/
systemType: [],
bmList: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
roleid: '',
rolename: '',
bz: "",
//ID
id:'',
//用户编码
userid:'',
//证书编号
code:'',
//证书名称
name:'',
//发证日期
fzsq:new Date().getTime(),
//有效期
yxq:'',
//截止日期
jzrq:new Date().getTime(),
//状态
zt:'',
//复审日期1
fsrq1:new Date().getTime(),
//复审日期2
fsrq2:new Date().getTime(),
//实际复审日期1
sjfsrq1:new Date().getTime(),
//实际复审日期2
sjfsrq2:new Date().getTime(),
//备注
bz:'',
//维护人编码
whrid:'',
//维护人
whr:'',
//维护时间
whsj:new Date().getTime(),
//创建人编码
cjrid:'',
//创建人
cjr:'',
//创建时间
cjsj:new Date().getTime(),
//系统版本
sysversion:'',
//发证单位
fzdw:'',
//适用范围
syfw:'',
},
/* form提交时的规则,具体规则参考官网*/
rules: {
......@@ -89,7 +181,9 @@
}
},
methods: {
userSelected(row){
this.form.userid=row.id
}
}
}
</script>
......
......@@ -8,19 +8,19 @@
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">证书编号:</span>
<el-input></el-input>
<el-input v-model="queryParams.zsbh"></el-input>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">职工工号:</span>
<el-input></el-input>
<el-input v-model="queryParams.zggh"></el-input>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">姓名:</span>
<el-input></el-input>
<el-input v-model="queryParams.xm" ></el-input>
</div>
</el-col>
</el-row>
......@@ -28,13 +28,13 @@
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">证书状态:</span>
<el-select></el-select>
<RelSelect src='aqgl/rcgl/ygczxx/init/zszt' clearable :match="{value:'id',label:'name'}" v-model='queryParams.zszt' ></RelSelect>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">适用范围:</span>
<el-select></el-select>
<RelSelect src='aqgl/rcgl/ygczxx/init/syfw' clearable :match="{value:'id',label:'name'}" v-model='queryParams.syfw' ></RelSelect>
</div>
</el-col>
</el-row>
......@@ -58,15 +58,7 @@
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
<template slot="tabCustom">
<el-table-column label="启用/停用" width="90" header-align="center" >
<template slot-scope="scope">
<el-switch @click.native="setEnable(scope.row.id)" :value='tybz(scope)' style="width: 80px;justify-content: center;"
active-color="#13ce66" inactive-color="#eee">
</el-switch>
</template>
</el-table-column>
</template>
</TablePager>
</div>
......@@ -75,14 +67,13 @@
<script>
/* 引入需要的接口*/
import {
QueryKzzxRole,
QueryApptype,
AddKzzxRole,
DeleteKzzxRole,
UpdateKzzxRole,
QtKzzxRole
} from "common/src/api/system/dmgSystem.js";
import {
doQuery,
doAdd,
doUpdate,
doDelete,
doInitSyfw
} from '@/api/daily/holdCertificate.js';
/* edit页面*/
import Edit from './edit'
import {
......@@ -105,132 +96,56 @@
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'kzzx/role',
baseUrl: '/aqgl/rcgl/ygczxx',
/* 查询参数*/
queryParams: {
ksrq: '',
jsrq: ''
zsbh:'',
zggh:'',
xm:'',
syfw:'',
zszt:''
},
/* 表格标题对应参数*/
tableTitle: [
{
prop: 'whsj',
label: '职工工号',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '职工姓名',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '证书编号',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '名称',
...this.$common('ftDateTime')
// {label: "用户编码", prop: "userid", fieldType: "ftString",width:192},
{label: "证书编号", prop: "code", fieldType: "ftString",width:240},
{label: "证书名称", prop: "name", fieldType: "ftString",width:300},
{label: "发证日期", prop: "fzsq", fieldType: "ftDateTime"},
{label: "有效期", prop: "yxq", fieldType: "float"},
{label: "截止日期", prop: "jzrq", fieldType: "ftDateTime"},
{label: "状态", prop: "zt", fieldType: "ftString",width:60},
{label: "复审日期1", prop: "fsrq1", fieldType: "ftDateTime"},
{label: "复审日期2", prop: "fsrq2", fieldType: "ftDateTime"},
{label: "实际复审日期1", prop: "sjfsrq1", fieldType: "ftDateTime"},
{label: "实际复审日期2", prop: "sjfsrq2", fieldType: "ftDateTime"},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
{label: "维护人", prop: "whr", fieldType: "ftString"},
{label: "维护时间", prop: "whsj", fieldType: "ftDateTime"},
{label: "创建人", prop: "cjr", fieldType: "ftString"},
{label: "创建时间", prop: "cjsj", fieldType: "ftDateTime"},
{label: "发证单位", prop: "fzdw", fieldType: "ftString",width:300},
// {label: "适用范围", prop: "syfw", fieldType: "ftString",width:60},
{label: "适用范围", prop: "syfwName", fieldType: "ftString",width:160,
},
{
prop: 'whsj',
label: '作业类别',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '发证日期',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '复审日期1',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '复审日期2',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '实际复审1',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '实际复审2',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '有效期',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '截至日期',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '发证单位',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '适用范围',
...this.$common('ftDateTime')
},
{
prop: 'whsj',
label: '是否超期',
...this.$common('ftDateTime')
}
]
}
},
methods: {
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
},
/* 基础查询*/
query: QueryKzzxRole,
query: doQuery,
/* 基础增*/
apiAdd: AddKzzxRole,
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: UpdateKzzxRole,
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: DeleteKzzxRole,
apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
},
/* 启用停用*/
setEnable(id) {
this.$confirm('是否启用/停用该角色, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
id: id
}
QtKzzxRole(params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].reLoad()
} else {
this.$error(res.message || '操作失败')
}
})
})
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment