cc00ad28 by 任超

feat:证书管理

1 parent e753b4da
...@@ -6,17 +6,26 @@ ...@@ -6,17 +6,26 @@
6 <el-row> 6 <el-row>
7 <el-col :span="5"> 7 <el-col :span="5">
8 <el-form-item label="分发编号"> 8 <el-form-item label="分发编号">
9 <el-input v-model="approveForm.batchno" @clear="queryClick()" clearable placeholder="分发编号"></el-input> 9 <el-input v-model="ruleForm.batchno" @clear="queryClick()" clearable placeholder="分发编号"></el-input>
10 </el-form-item> 10 </el-form-item>
11 </el-col> 11 </el-col>
12 <el-col :span="8"> 12
13 <el-form-item label="领取时间"> 13 <el-col :span="5">
14 <el-date-picker v-model="ruleForm.ffsj" type="daterange" range-separator="至" start-placeholder="开始日期" 14 <el-form-item label="开始日期">
15 end-placeholder="结束日期" @change="timeChange()" value-format="yyyy-MM-dd HH:mm:ss" clearable> 15 <el-date-picker v-model="ruleForm.ffkssj" :picker-options="pickerOptionsStart" type="date"
16 placeholder="开始日期" value-format="yyyy-MM-dd" clearable>
17 </el-date-picker>
18 </el-form-item>
19 </el-col>
20 <el-col :span="5">
21 <el-form-item label="结束时间">
22 <el-date-picker v-model="ruleForm.ffjssj" :picker-options="pickerOptionsEnd" type="date"
23 placeholder="结束日期" value-format="yyyy-MM-dd" clearable>
16 </el-date-picker> 24 </el-date-picker>
17 </el-form-item> 25 </el-form-item>
18 </el-col> 26 </el-col>
19 <el-col :span="11" class="btnColRight"> 27
28 <el-col :span="9" class="btnColRight">
20 <el-form-item> 29 <el-form-item>
21 <el-button type="primary" native-type="submit" @click="queryClick()">查询</el-button> 30 <el-button type="primary" native-type="submit" @click="queryClick()">查询</el-button>
22 <el-button type="primary" @click="openDialog()">新增</el-button> 31 <el-button type="primary" @click="openDialog()">新增</el-button>
...@@ -55,10 +64,6 @@ export default { ...@@ -55,10 +64,6 @@ export default {
55 isDialog: false, 64 isDialog: false,
56 value: '', 65 value: '',
57 ruleForm: { 66 ruleForm: {
58 batchno: "",
59 ffsj: ""
60 },
61 approveForm: {
62 batchno: '', 67 batchno: '',
63 ffkssj: '', 68 ffkssj: '',
64 ffjssj: '' 69 ffjssj: ''
...@@ -68,6 +73,26 @@ export default { ...@@ -68,6 +73,26 @@ export default {
68 columns: datas.columns(), 73 columns: datas.columns(),
69 data: [], 74 data: [],
70 }, 75 },
76 // 开始结束日期限制
77 pickerOptionsStart: {
78 disabledDate: (time) => {
79 if (this.ruleForm.ffjssj) {
80 return (
81 time.getTime() >= new Date(this.ruleForm.ffjssj).getTime()
82 );
83 }
84 }
85 },
86 // 结束日期限制
87 pickerOptionsEnd: {
88 disabledDate: (time) => {
89 if (this.ruleForm.ffkssj) {
90 return (
91 time.getTime() <= new Date(this.ruleForm.ffkssj).getTime()
92 );
93 }
94 }
95 }
71 } 96 }
72 }, 97 },
73 methods: { 98 methods: {
...@@ -76,7 +101,7 @@ export default { ...@@ -76,7 +101,7 @@ export default {
76 }, 101 },
77 // 列表渲染接口 102 // 列表渲染接口
78 fetchData () { 103 fetchData () {
79 getZsglffList({ ...this.approveForm, ...this.pageData }).then(res => { 104 getZsglffList({ ...this.ruleForm, ...this.pageData }).then(res => {
80 if (res.code === 200) { 105 if (res.code === 200) {
81 let { total, records } = res.result 106 let { total, records } = res.result
82 this.tableData.total = total; 107 this.tableData.total = total;
...@@ -100,17 +125,6 @@ export default { ...@@ -100,17 +125,6 @@ export default {
100 queryClick () { 125 queryClick () {
101 this.fetchData() 126 this.fetchData()
102 }, 127 },
103 //修改筛选时间
104 timeChange () {
105 if (this.ruleForm.ffsj != null) {
106 this.approveForm.ffkssj = this.ruleForm.ffsj[0];
107 this.approveForm.ffjssj = this.ruleForm.ffsj[1];
108 } else {
109 this.approveForm.ffkssj = ''
110 this.approveForm.ffjssj = ''
111 }
112 this.fetchData()
113 },
114 //确定证书分发 128 //确定证书分发
115 confrimVerify (item) { 129 confrimVerify (item) {
116 this.$confirm('是否确定分发', '提示', { 130 this.$confirm('是否确定分发', '提示', {
...@@ -161,4 +175,8 @@ export default { ...@@ -161,4 +175,8 @@ export default {
161 </script> 175 </script>
162 <style scoped lang="scss"> 176 <style scoped lang="scss">
163 @import "~@/styles/public.scss"; 177 @import "~@/styles/public.scss";
178
179 /deep/.el-icon-date {
180 display: none;
181 }
164 </style> 182 </style>
......
...@@ -9,14 +9,21 @@ ...@@ -9,14 +9,21 @@
9 <el-input v-model="ruleForm.batchno" @clear="queryClick()" clearable placeholder="入库编号"></el-input> 9 <el-input v-model="ruleForm.batchno" @clear="queryClick()" clearable placeholder="入库编号"></el-input>
10 </el-form-item> 10 </el-form-item>
11 </el-col> 11 </el-col>
12 <el-col :span="8"> 12 <el-col :span="5">
13 <el-form-item label="人库时间"> 13 <el-form-item label="开始日期">
14 <el-date-picker v-model="ruleForm.rksj" type="datetimerange" range-separator="至" start-placeholder="开始日期" 14 <el-date-picker v-model="ruleForm.rkkssj" :picker-options="pickerOptionsStart" type="date"
15 end-placeholder="结束日期" @change="timeChange()" value-format="yyyy-MM-dd HH:mm:ss" clearable> 15 placeholder="开始日期" value-format="yyyy-MM-dd" clearable>
16 </el-date-picker>
17 </el-form-item>
18 </el-col>
19 <el-col :span="5">
20 <el-form-item label="结束时间">
21 <el-date-picker v-model="ruleForm.rkjssj" :picker-options="pickerOptionsEnd" type="date"
22 placeholder="结束日期" value-format="yyyy-MM-dd" clearable>
16 </el-date-picker> 23 </el-date-picker>
17 </el-form-item> 24 </el-form-item>
18 </el-col> 25 </el-col>
19 <el-col :span="11" class="btnColRight"> 26 <el-col :span="9" class="btnColRight">
20 <el-form-item> 27 <el-form-item>
21 <el-button type="primary" native-type="submit" @click="queryClick()">查询</el-button> 28 <el-button type="primary" native-type="submit" @click="queryClick()">查询</el-button>
22 <el-button type="primary" @click="openDialog()">新增</el-button> 29 <el-button type="primary" @click="openDialog()">新增</el-button>
...@@ -54,7 +61,6 @@ export default { ...@@ -54,7 +61,6 @@ export default {
54 isDialog: false, 61 isDialog: false,
55 viewDialog: false, 62 viewDialog: false,
56 ruleForm: { 63 ruleForm: {
57 rksj: '',
58 batchno: '', 64 batchno: '',
59 rkkssj: '', 65 rkkssj: '',
60 rkjssj: '' 66 rkjssj: ''
...@@ -64,7 +70,27 @@ export default { ...@@ -64,7 +70,27 @@ export default {
64 columns: datas.columns(), 70 columns: datas.columns(),
65 data: [], 71 data: [],
66 }, 72 },
67 }; 73 // 开始结束日期限制
74 pickerOptionsStart: {
75 disabledDate: (time) => {
76 if (this.ruleForm.rkjssj) {
77 return (
78 time.getTime() >= new Date(this.ruleForm.rkjssj).getTime()
79 );
80 }
81 }
82 },
83 // 结束日期限制
84 pickerOptionsEnd: {
85 disabledDate: (time) => {
86 if (this.ruleForm.rkkssj) {
87 return (
88 time.getTime() <= new Date(this.ruleForm.rkkssj).getTime()
89 );
90 }
91 }
92 }
93 }
68 }, 94 },
69 methods: { 95 methods: {
70 // 列表渲染接口 96 // 列表渲染接口
...@@ -92,17 +118,6 @@ export default { ...@@ -92,17 +118,6 @@ export default {
92 queryClick () { 118 queryClick () {
93 this.fetchData() 119 this.fetchData()
94 }, 120 },
95 //修改筛选时间
96 timeChange (val) {
97 if (this.ruleForm.rksj != null) {
98 this.ruleForm.rkkssj = this.ruleForm.rksj[0];
99 this.ruleForm.rkjssj = this.ruleForm.rksj[1];
100 } else {
101 this.ruleForm.rkkssj = ''
102 this.ruleForm.rkjssj = ''
103 }
104 this.fetchData()
105 },
106 //删除证书入库数据 121 //删除证书入库数据
107 delZsrk (item) { 122 delZsrk (item) {
108 this.$confirm('确定要删除吗, 是否继续?', '提示', { 123 this.$confirm('确定要删除吗, 是否继续?', '提示', {
...@@ -153,4 +168,8 @@ export default { ...@@ -153,4 +168,8 @@ export default {
153 </script> 168 </script>
154 <style scoped lang="scss"> 169 <style scoped lang="scss">
155 @import "~@/styles/public.scss"; 170 @import "~@/styles/public.scss";
171
172 /deep/.el-icon-date {
173 display: none;
174 }
156 </style> 175 </style>
......
1 import filter from '@/utils/filter.js' 1 import filter from '@/utils/filter.js'
2 let vm = null 2 let vm = null
3
4 const sendThis = (_this) => { 3 const sendThis = (_this) => {
5 vm = _this 4 vm = _this
6 } 5 }
...@@ -60,7 +59,6 @@ class data extends filter { ...@@ -60,7 +59,6 @@ class data extends filter {
60 }, 59 },
61 { 60 {
62 label: '操作', 61 label: '操作',
63 width: '200',
64 align: 'center', 62 align: 'center',
65 fixed: 'right', 63 fixed: 'right',
66 render: (h, scope) => { 64 render: (h, scope) => {
......