style:证书入库
Showing
1 changed file
with
82 additions
and
63 deletions
... | @@ -29,32 +29,38 @@ | ... | @@ -29,32 +29,38 @@ |
29 | </el-form-item> | 29 | </el-form-item> |
30 | </el-col> | 30 | </el-col> |
31 | </el-row> | 31 | </el-row> |
32 | <div> | 32 | <el-table :data="ruleForm.tableForm" border style="width: 100%" |
33 | <el-table :data="tableForm" border style="width: 100%" | 33 | :header-cell-style="{ 'text-align': 'center', background: 'rgb(236, 245, 255)' }" |
34 | :header-cell-style="{ 'text-align': 'center', background: 'rgb(236, 245, 255)' }" | 34 | :cell-style="{ 'text-align': 'center' }"> |
35 | :cell-style="{ 'text-align': 'center' }"> | 35 | <el-table-column prop="name" label="纸质证书类型" width="200"></el-table-column> |
36 | <el-table-column prop="name" label="纸质证书类型" width="200"></el-table-column> | 36 | <el-table-column prop="ksysxlh" label="开始印刷序列号" width="200"> |
37 | <el-table-column prop="ksysxlh" label="开始印刷序列号" width="200"> | 37 | <template slot-scope="scope"> |
38 | <template slot-scope="scope"> | 38 | <el-form-item |
39 | :prop="'tableForm.' + scope.$index + '.ksysxlh'" | ||
40 | :rules="rules.ksysxlh"> | ||
39 | <el-input v-model="scope.row.ksysxlh" @blur="ysxlhDeal(scope.row)" maxlength="11" | 41 | <el-input v-model="scope.row.ksysxlh" @blur="ysxlhDeal(scope.row)" maxlength="11" |
40 | oninput="value=value.replace(/[^\d.]/g,'')" :disabled="!readOnly"></el-input> | 42 | oninput="value=value.replace(/[^\d.]/g,'')" :disabled="!readOnly"></el-input> |
41 | </template> | 43 | </el-form-item> |
42 | </el-table-column> | 44 | </template> |
43 | <el-table-column prop="jsysxlh" label="结束印刷序列号" width="200"> | 45 | </el-table-column> |
44 | <template slot-scope="scope"> | 46 | <el-table-column prop="jsysxlh" label="结束印刷序列号" width="200"> |
47 | <template slot-scope="scope"> | ||
48 | <el-form-item | ||
49 | :prop="'tableForm.' + scope.$index + '.jsysxlh'" | ||
50 | :rules="rules.jsysxlh"> | ||
45 | <el-input v-model="scope.row.jsysxlh" @blur="ysxlhDeal(scope.row)" maxlength="11" | 51 | <el-input v-model="scope.row.jsysxlh" @blur="ysxlhDeal(scope.row)" maxlength="11" |
46 | oninput="value=value.replace(/[^\d.]/g,'')" :disabled="!readOnly"></el-input> | 52 | oninput="value=value.replace(/[^\d.]/g,'')" :disabled="!readOnly"></el-input> |
47 | </template> | 53 | </el-form-item> |
48 | </el-table-column> | 54 | </template> |
49 | <el-table-column prop="bs" label="本数"> | 55 | </el-table-column> |
50 | <template slot-scope="scope"> | 56 | <el-table-column prop="bs" label="本数"> |
51 | <span v-if="scope.row.bs == 0" class="font-red">系统计算</span> | 57 | <template slot-scope="scope"> |
52 | <span v-else-if="scope.row.bs < 0" class="font-red">印刷序列号有误</span> | 58 | <span v-if="scope.row.bs == 0" class="font-red">系统计算</span> |
53 | <span v-else>{{ scope.row.bs }}</span> | 59 | <span v-else-if="scope.row.bs < 0" class="font-red">印刷序列号有误</span> |
54 | </template> | 60 | <span v-else>{{ scope.row.bs }}</span> |
55 | </el-table-column> | 61 | </template> |
56 | </el-table> | 62 | </el-table-column> |
57 | </div> | 63 | </el-table> |
58 | <el-form-item label="备注" class="middle-margin-bottom"> | 64 | <el-form-item label="备注" class="middle-margin-bottom"> |
59 | <el-input type="textarea" v-model="ruleForm.bz" :rows="4" :disabled="!readOnly"></el-input> | 65 | <el-input type="textarea" v-model="ruleForm.bz" :rows="4" :disabled="!readOnly"></el-input> |
60 | </el-form-item> | 66 | </el-form-item> |
... | @@ -92,25 +98,25 @@ | ... | @@ -92,25 +98,25 @@ |
92 | zsnum: '', | 98 | zsnum: '', |
93 | zmstarno: '', | 99 | zmstarno: '', |
94 | zmendno: '', | 100 | zmendno: '', |
95 | zmnum: '' | 101 | zmnum: '', |
102 | //表格数据 | ||
103 | tableForm: [ | ||
104 | { | ||
105 | name: '不动产权证书', | ||
106 | ksysxlh: '', | ||
107 | jsysxlh: '', | ||
108 | bs: 0, | ||
109 | zslx: 1 | ||
110 | }, | ||
111 | { | ||
112 | name: '不动产登记证明', | ||
113 | ksysxlh: '', | ||
114 | jsysxlh: '', | ||
115 | bs: 0, | ||
116 | zslx: 2 | ||
117 | } | ||
118 | ] | ||
96 | }, | 119 | }, |
97 | //表格数据 | ||
98 | tableForm: [ | ||
99 | { | ||
100 | name: '不动产权证书', | ||
101 | ksysxlh: '', | ||
102 | jsysxlh: '', | ||
103 | bs: 0, | ||
104 | zslx: 1 | ||
105 | }, | ||
106 | { | ||
107 | name: '不动产登记证明', | ||
108 | ksysxlh: '', | ||
109 | jsysxlh: '', | ||
110 | bs: 0, | ||
111 | zslx: 2 | ||
112 | } | ||
113 | ], | ||
114 | //证书入库业务号参数 | 120 | //证书入库业务号参数 |
115 | ywhQueryForm: { | 121 | ywhQueryForm: { |
116 | serialtype: 'zsrkbh', | 122 | serialtype: 'zsrkbh', |
... | @@ -128,13 +134,19 @@ | ... | @@ -128,13 +134,19 @@ |
128 | rksj: [ | 134 | rksj: [ |
129 | { required: true, message: '请选择入库时间', trigger: 'change' } | 135 | { required: true, message: '请选择入库时间', trigger: 'change' } |
130 | ], | 136 | ], |
137 | ksysxlh: [ | ||
138 | { required: true, message: '开始印刷序列号不能为空', trigger: 'blur' } | ||
139 | ], | ||
140 | jsysxlh: [ | ||
141 | { required: true, message: '结束印刷序列号不能为空', trigger: 'blur' } | ||
142 | ] | ||
131 | }, | 143 | }, |
132 | } | 144 | } |
133 | }, | 145 | }, |
134 | mounted () { | 146 | mounted () { |
135 | if (this.formData.bsmBatch) { | 147 | if (this.formData.bsmBatch) { |
136 | this.tableForm[0].bs = null; | 148 | this.ruleForm.tableForm[0].bs = null; |
137 | this.tableForm[1].bs = null; | 149 | this.ruleForm.tableForm[1].bs = null; |
138 | this.getDetailInfo(this.formData.bsmBatch); | 150 | this.getDetailInfo(this.formData.bsmBatch); |
139 | } else { | 151 | } else { |
140 | this.ywhSerial(); | 152 | this.ywhSerial(); |
... | @@ -146,21 +158,28 @@ | ... | @@ -146,21 +158,28 @@ |
146 | * @author: renchao | 158 | * @author: renchao |
147 | */ | 159 | */ |
148 | submitForm () { | 160 | submitForm () { |
149 | this.tableForm.forEach((item, index) => { | 161 | let that = this |
150 | if (item.bs < 0) { | 162 | this.$refs['ruleForm'].validate((valid) => { |
151 | return; | 163 | if (valid) { |
152 | } | 164 | let arr = this.ruleForm.tableForm.filter(item => item.bs > 0) |
153 | }) | 165 | if (arr.length < 2) { |
154 | store.dispatch("user/refreshPage", false); | 166 | that.$message.error('本书必须大于0,请检查印刷序列号'); |
155 | zsrk(this.ruleForm).then(res => { | 167 | return |
156 | if (res.code == 200) { | 168 | } |
157 | this.$message.success('保存成功') | 169 | store.dispatch("user/refreshPage", false); |
158 | this.$popupCacel() | 170 | zsrk(this.ruleForm).then(res => { |
159 | this.$refs['ruleForm'].resetFields() | 171 | if (res.code == 200) { |
160 | this.resetTableFields() | 172 | that.$message.success('保存成功') |
161 | store.dispatch("user/refreshPage", true) | 173 | that.$popupCacel() |
174 | that.$refs['ruleForm'].resetFields() | ||
175 | that.resetTableFields() | ||
176 | that.dispatch("user/refreshPage", true) | ||
177 | } else { | ||
178 | that.$message.error(res.message); | ||
179 | } | ||
180 | }) | ||
162 | } else { | 181 | } else { |
163 | this.$message.error(res.message); | 182 | return false; |
164 | } | 183 | } |
165 | }) | 184 | }) |
166 | }, | 185 | }, |
... | @@ -187,12 +206,12 @@ | ... | @@ -187,12 +206,12 @@ |
187 | this.ruleForm = res.result; | 206 | this.ruleForm = res.result; |
188 | this.$refs.ruleForm.resetFields() | 207 | this.$refs.ruleForm.resetFields() |
189 | this.readOnly = false; | 208 | this.readOnly = false; |
190 | this.tableForm[0].ksysxlh = res.result.zsstarno; | 209 | this.ruleForm.tableForm[0].ksysxlh = res.result.zsstarno; |
191 | this.tableForm[0].jsysxlh = res.result.zsendno; | 210 | this.ruleForm.tableForm[0].jsysxlh = res.result.zsendno; |
192 | this.tableForm[0].bs = res.result.zsnum; | 211 | this.ruleForm.tableForm[0].bs = res.result.zsnum; |
193 | this.tableForm[1].ksysxlh = res.result.zmstarno; | 212 | this.ruleForm.tableForm[1].ksysxlh = res.result.zmstarno; |
194 | this.tableForm[1].jsysxlh = res.result.zmendno; | 213 | this.ruleForm.tableForm[1].jsysxlh = res.result.zmendno; |
195 | this.tableForm[1].bs = res.result.zmnum; | 214 | this.ruleForm.tableForm[1].bs = res.result.zmnum; |
196 | } | 215 | } |
197 | }) | 216 | }) |
198 | }, | 217 | }, |
... | @@ -243,7 +262,7 @@ | ... | @@ -243,7 +262,7 @@ |
243 | * @author: renchao | 262 | * @author: renchao |
244 | */ | 263 | */ |
245 | resetTableFields () { | 264 | resetTableFields () { |
246 | this.tableForm = [ | 265 | this.ruleForm.tableForm = [ |
247 | { | 266 | { |
248 | name: '不动产权证书', | 267 | name: '不动产权证书', |
249 | ksysxlh: '', | 268 | ksysxlh: '', | ... | ... |
-
Please register or sign in to post a comment