5d61be3d by 蔡俊立

证书入库

1 parent 384ca73e
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 /* 2 /*
3 证书管理-获取序列号
4 */
5 export function getSysSerialSingle (params) {
6 return request({
7 url: '/system/sysSerial/getSysSerialSingle',
8 method: 'get',
9 params: params
10 })
11 }
12 /*
3 证书管理-证书入库列表 13 证书管理-证书入库列表
4 */ 14 */
5 export function getZsglrkList (data) { 15 export function getZsglrkList (data) {
6 return request({ 16 return request({
7 url: '/sys/zsgl//getZsglrkList', 17 url: '/sys/zsgl/getZsglrkList',
18 method: 'post',
19 data
20 })
21 }
22 /*
23 证书管理-新增证书入库
24 */
25 export function zsrk (data) {
26 return request({
27 url: '/sys/zsgl/zsrk',
8 method: 'post', 28 method: 'post',
9 data 29 data
10 }) 30 })
......
1 <template>
2 <dialogBox title="证书入库" @submitForm="submitForm" saveButton="保存" width="45%" @closeDialog="closeDialog" v-model="value">
3 <div>
4 <el-form ref="ruleForm" :model="ruleForm" label-width="100px" :rules="rules">
5 <el-row>
6 <el-col :span="12">
7 <el-form-item label="入库编号:" prop="batchNo">
8 <el-input v-model="ruleForm.batchNo" :disabled="true"></el-input>
9 </el-form-item>
10 </el-col>
11 <el-col :span="12">
12 <el-form-item label="登记机构:" prop="djjg">
13 <el-select v-model="ruleForm.djjg" placeholder="请选择">
14 <el-option v-for="item in dictData['ywly']" :key="item.dname" :label="item.dname" :value="item.dname"></el-option>
15 </el-select>
16 </el-form-item>
17 </el-col>
18 </el-row>
19 <el-row>
20 <el-col :span="12">
21 <el-form-item label="入库人员:" prop="rkry">
22 <el-input v-model="ruleForm.rkry" :disabled="true"></el-input>
23 </el-form-item>
24 </el-col>
25 <el-col :span="12">
26 <el-form-item label="入库时间:" prop="rksj">
27 <el-date-picker v-model="ruleForm.rksj" type="datetime" placeholder="选择日期时间"></el-date-picker>
28 </el-form-item>
29 </el-col>
30 </el-row>
31 <div>
32 <el-table :data="tableForm" border style="width: 100%" :header-cell-style="{'text-align':'center',background: 'rgb(236, 245, 255)'}" :cell-style="{'text-align':'center'}">
33 <el-table-column prop="name" label="纸质证书类型" width="200"></el-table-column>
34 <el-table-column prop="ksysxlh" label="开始印刷序列号" width="200">
35 <template slot-scope="scope">
36 <el-input v-model="scope.row.ksysxlh" @blur="ysxlhDeal(scope.row)" maxlength="11"></el-input>
37 </template>
38 </el-table-column>
39 <el-table-column prop="jsysxlh" label="结束印刷序列号" width="200">
40 <template slot-scope="scope">
41 <el-input v-model="scope.row.jsysxlh" @blur="ysxlhDeal(scope.row)" maxlength="11"></el-input>
42 </template>
43 </el-table-column>
44 <el-table-column prop="bs" label="本数">
45 <template slot-scope="scope">
46 <span v-if="scope.row.bs == 0" style="color:red">系统计算</span>
47 <span v-else-if="scope.row.bs < 0" style="color:red">印刷序列号有误</span>
48 <span v-else>{{scope.row.bs}}</span>
49 </template>
50 </el-table-column>
51 </el-table>
52 </div>
53 <el-form-item label="备注" style="margin-top:20px">
54 <el-input type="textarea" v-model="ruleForm.bz" :rows="4"></el-input>
55 </el-form-item>
56 </el-form>
57 </div>
58 </dialogBox>
59 </template>
60
61 <script>
62 import { mapGetters } from 'vuex'
63 import { getSysSerialSingle,zsrk} from "@/api/zsgl.js"
64 export default {
65 components: {
66 },
67 computed: {
68 ...mapGetters(['dictData']),
69 },
70 props: {
71 value: { type: Boolean, default: false },
72 },
73 data () {
74 return {
75 tableData: {},
76 ruleForm: {
77 batchNo: '',
78 djjg: '',
79 rkry: '超级管理员',
80 rksj: '',
81 bz: '',
82 zsstarno: '',
83 zsendno: '',
84 zsnum: '',
85 zmstarno: '',
86 zmendno: '',
87 zmnum: ''
88 },
89 tableForm: [
90 {
91 name: '不动产权证书',
92 ksysxlh: '',
93 jsysxlh: '',
94 bs: 0
95 },
96 {
97 name: '不动产权登记证明',
98 ksysxlh: '',
99 jsysxlh: '',
100 bs: 0
101 }
102 ],
103 ywhQueryForm: {
104 serialtype: 'zsrkbh',
105 serialname: '证书入库编号',
106 serialcode: 'zsrk',
107 digit: '5'
108 },
109 rules: {
110 batchNo: [
111 { required: true, message: '入库编号不能为空', trigger: 'blur' }
112 ],
113 djjg: [
114 { required: true, message: '请选择登记机构', trigger: 'change' }
115 ],
116 rkry: [
117 { required: true, message: '入库人员不能为空', trigger: 'blur' }
118 ],
119 rksj: [
120 { required: true, message: '请选择入库时间', trigger: 'change' }
121 ],
122 },
123 }
124 },
125 methods: {
126 //表单提交
127 submitForm () {
128 zsrk().then(res => {
129 if(res.code == 200){
130 this.$message.sucess("保存成功");
131 this.$emit("input", false);
132 this.$refs.ruleForm.resetFields();
133 this.$refs.tableForm.resetFields();
134 }else{
135 this.$message.error(res.message);
136 }
137 })
138 },
139 //序列号获取
140 ywhSerial(){
141 // getSysSerialSingle(this.ywhQueryForm).then(res => {
142 // if(res.code == 200){
143 // this.ruleForm.batchNo = res.message;
144 // }
145 // })
146 },
147 //印刷序列号处理
148 ysxlhDeal(item){
149 if(item.ksysxlh && item.jsysxlh){
150 if(item.ksysxlh.length == item.jsysxlh.length){
151 if(item.ksysxlh.length != 11){
152 item.bs = -1;
153 return;
154 }
155 item.bs = item.jsysxlh - item.ksysxlh;
156 }
157 }
158 },
159 closeDialog () {
160 this.$emit("input", false);
161 },
162 }
163 }
164 </script>
165 <style scoped lang="scss">
166 @import "~@/styles/mixin.scss";
167
168 </style>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
19 <el-col :span="11" class="btnCol"> 19 <el-col :span="11" class="btnCol">
20 <el-form-item> 20 <el-form-item>
21 <el-button type="primary" @click="queryClick()">查询</el-button> 21 <el-button type="primary" @click="queryClick()">查询</el-button>
22 <el-button type="primary">新增</el-button> 22 <el-button type="primary" @click="openDialog()">新增</el-button>
23 </el-form-item> 23 </el-form-item>
24 </el-col> 24 </el-col>
25 </el-row> 25 </el-row>
...@@ -32,21 +32,24 @@ ...@@ -32,21 +32,24 @@
32 :data="tableData.data"> 32 :data="tableData.data">
33 </lb-table> 33 </lb-table>
34 </div> 34 </div>
35 <addDialog ref="addDialog" v-model="isDialog"/>
35 </div> 36 </div>
36 </template> 37 </template>
37 <script> 38 <script>
38 import table from "@/utils/mixin/table"; 39 import table from "@/utils/mixin/table";
39 import { datas, sendThis } from "./zsrkdata"; 40 import { datas, sendThis } from "./zsrkdata";
41 import addDialog from "./components/addDialog.vue"
40 import { getZsglrkList } from "@/api/zsgl.js" 42 import { getZsglrkList } from "@/api/zsgl.js"
41 export default { 43 export default {
42 name: "zsrk", 44 name: "zsrk",
43 components: {}, 45 components: {addDialog},
44 mixins: [table], 46 mixins: [table],
45 mounted () { 47 mounted () {
46 sendThis(this); 48 sendThis(this);
47 }, 49 },
48 data () { 50 data () {
49 return { 51 return {
52 isDialog: false,
50 ruleForm: { 53 ruleForm: {
51 rkbh: "", 54 rkbh: "",
52 rksj: "" 55 rksj: ""
...@@ -73,7 +76,10 @@ export default { ...@@ -73,7 +76,10 @@ export default {
73 }) 76 })
74 }, 77 },
75 openDialog () { 78 openDialog () {
76 console.log(999999999999999); 79 this.isDialog = true;
80 this.$nextTick(()=> {
81 this.$refs.addDialog.ywhSerial();
82 })
77 }, 83 },
78 }, 84 },
79 }; 85 };
......