cc00ad28 by 任超

feat:证书管理

1 parent e753b4da
......@@ -6,17 +6,26 @@
<el-row>
<el-col :span="5">
<el-form-item label="分发编号">
<el-input v-model="approveForm.batchno" @clear="queryClick()" clearable placeholder="分发编号"></el-input>
<el-input v-model="ruleForm.batchno" @clear="queryClick()" clearable placeholder="分发编号"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="领取时间">
<el-date-picker v-model="ruleForm.ffsj" type="daterange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" @change="timeChange()" value-format="yyyy-MM-dd HH:mm:ss" clearable>
<el-col :span="5">
<el-form-item label="开始日期">
<el-date-picker v-model="ruleForm.ffkssj" :picker-options="pickerOptionsStart" type="date"
placeholder="开始日期" value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="结束时间">
<el-date-picker v-model="ruleForm.ffjssj" :picker-options="pickerOptionsEnd" type="date"
placeholder="结束日期" value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="11" class="btnColRight">
<el-col :span="9" class="btnColRight">
<el-form-item>
<el-button type="primary" native-type="submit" @click="queryClick()">查询</el-button>
<el-button type="primary" @click="openDialog()">新增</el-button>
......@@ -55,10 +64,6 @@ export default {
isDialog: false,
value: '',
ruleForm: {
batchno: "",
ffsj: ""
},
approveForm: {
batchno: '',
ffkssj: '',
ffjssj: ''
......@@ -68,6 +73,26 @@ export default {
columns: datas.columns(),
data: [],
},
// 开始结束日期限制
pickerOptionsStart: {
disabledDate: (time) => {
if (this.ruleForm.ffjssj) {
return (
time.getTime() >= new Date(this.ruleForm.ffjssj).getTime()
);
}
}
},
// 结束日期限制
pickerOptionsEnd: {
disabledDate: (time) => {
if (this.ruleForm.ffkssj) {
return (
time.getTime() <= new Date(this.ruleForm.ffkssj).getTime()
);
}
}
}
}
},
methods: {
......@@ -76,7 +101,7 @@ export default {
},
// 列表渲染接口
fetchData () {
getZsglffList({ ...this.approveForm, ...this.pageData }).then(res => {
getZsglffList({ ...this.ruleForm, ...this.pageData }).then(res => {
if (res.code === 200) {
let { total, records } = res.result
this.tableData.total = total;
......@@ -100,17 +125,6 @@ export default {
queryClick () {
this.fetchData()
},
//修改筛选时间
timeChange () {
if (this.ruleForm.ffsj != null) {
this.approveForm.ffkssj = this.ruleForm.ffsj[0];
this.approveForm.ffjssj = this.ruleForm.ffsj[1];
} else {
this.approveForm.ffkssj = ''
this.approveForm.ffjssj = ''
}
this.fetchData()
},
//确定证书分发
confrimVerify (item) {
this.$confirm('是否确定分发', '提示', {
......@@ -161,4 +175,8 @@ export default {
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
/deep/.el-icon-date {
display: none;
}
</style>
......
......@@ -9,14 +9,21 @@
<el-input v-model="ruleForm.batchno" @clear="queryClick()" clearable placeholder="入库编号"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="人库时间">
<el-date-picker v-model="ruleForm.rksj" type="datetimerange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" @change="timeChange()" value-format="yyyy-MM-dd HH:mm:ss" clearable>
<el-col :span="5">
<el-form-item label="开始日期">
<el-date-picker v-model="ruleForm.rkkssj" :picker-options="pickerOptionsStart" type="date"
placeholder="开始日期" value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="结束时间">
<el-date-picker v-model="ruleForm.rkjssj" :picker-options="pickerOptionsEnd" type="date"
placeholder="结束日期" value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="11" class="btnColRight">
<el-col :span="9" class="btnColRight">
<el-form-item>
<el-button type="primary" native-type="submit" @click="queryClick()">查询</el-button>
<el-button type="primary" @click="openDialog()">新增</el-button>
......@@ -54,7 +61,6 @@ export default {
isDialog: false,
viewDialog: false,
ruleForm: {
rksj: '',
batchno: '',
rkkssj: '',
rkjssj: ''
......@@ -64,7 +70,27 @@ export default {
columns: datas.columns(),
data: [],
},
};
// 开始结束日期限制
pickerOptionsStart: {
disabledDate: (time) => {
if (this.ruleForm.rkjssj) {
return (
time.getTime() >= new Date(this.ruleForm.rkjssj).getTime()
);
}
}
},
// 结束日期限制
pickerOptionsEnd: {
disabledDate: (time) => {
if (this.ruleForm.rkkssj) {
return (
time.getTime() <= new Date(this.ruleForm.rkkssj).getTime()
);
}
}
}
}
},
methods: {
// 列表渲染接口
......@@ -92,17 +118,6 @@ export default {
queryClick () {
this.fetchData()
},
//修改筛选时间
timeChange (val) {
if (this.ruleForm.rksj != null) {
this.ruleForm.rkkssj = this.ruleForm.rksj[0];
this.ruleForm.rkjssj = this.ruleForm.rksj[1];
} else {
this.ruleForm.rkkssj = ''
this.ruleForm.rkjssj = ''
}
this.fetchData()
},
//删除证书入库数据
delZsrk (item) {
this.$confirm('确定要删除吗, 是否继续?', '提示', {
......@@ -153,4 +168,8 @@ export default {
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
/deep/.el-icon-date {
display: none;
}
</style>
......
import filter from '@/utils/filter.js'
let vm = null
const sendThis = (_this) => {
vm = _this
}
......@@ -60,7 +59,6 @@ class data extends filter {
},
{
label: '操作',
width: '200',
align: 'center',
fixed: 'right',
render: (h, scope) => {
......