6ffa52b0 by 杨威

自然幢表单验证及权利人组件修改

1 parent 84cf8218
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
51 @click="handleInClick(index, childIndex, 'minus')" 51 @click="handleInClick(index, childIndex, 'minus')"
52 >-</el-button 52 >-</el-button
53 > 53 >
54 <!-- </template> -->
55 </el-col> 54 </el-col>
55 <template v-if="hasSyqx">
56 <el-col 56 <el-col
57 :span="3" 57 :span="3"
58 :key="childIndex + '7'" 58 :key="childIndex + '7'"
...@@ -230,6 +230,116 @@ ...@@ -230,6 +230,116 @@
230 </ul> 230 </ul>
231 </el-col> 231 </el-col>
232 </template> 232 </template>
233 <template v-if="!hasSyqx">
234 <el-col
235 :span="5"
236 :key="childIndex + '7'"
237 :class="childIndex > 0 ? 'childYT' : ''"
238 >
239 <ul>
240 <li>批准用途</li>
241 <li>实际用途</li>
242 <li>土地使用起始时间<i class="requisite">*</i></li>
243 </ul>
244 </el-col>
245 <el-col
246 :span="5"
247 :key="childIndex + '6'"
248 :class="childIndex > 0 ? 'childYT' : ''"
249 >
250 <ul>
251 <li>
252 <el-select-tree
253 v-if="show"
254 :default-expand-all="defaultExpandAll"
255 :multiple="multiple"
256 :placeholder="placeholder"
257 :disabled="disabled"
258 :data="$store.state.tdytList"
259 :props="treeProps"
260 :check-strictly="checkStrictly"
261 :clearable="clearable"
262 v-model="childItem.pzytdm"
263 ></el-select-tree>
264 </li>
265 <li>
266 <el-select-tree
267 v-if="show"
268 :default-expand-all="defaultExpandAll"
269 :multiple="multiple"
270 :placeholder="placeholder"
271 :disabled="disabled"
272 :data="$store.state.tdytList"
273 :props="treeProps"
274 :check-strictly="checkStrictly"
275 :clearable="clearable"
276 v-model="childItem.sjytdm"
277 ></el-select-tree>
278 </li>
279 <li>
280 <el-date-picker
281 v-model="childItem.tdsyqssj"
282 ref="tdsyqssj"
283 :picker-options="childItem.pickerStart"
284 type="date"
285 value-format="yyyy-MM-dd"
286 placeholder="选择日期"
287 @input="startTime(index,childIndex)"
288 >
289 </el-date-picker>
290 </li>
291 </ul>
292 </el-col>
293 <el-col
294 :span="5"
295 :key="childIndex + '5'"
296 :class="childIndex > 0 ? 'childYT' : ''"
297 >
298 <ul>
299 <li>地类编码</li>
300 <li>地类编码</li>
301 <li>土地使用结束时间<i class="requisite">*</i></li>
302 </ul>
303 </el-col>
304 <el-col
305 :span="5"
306 :key="childIndex + '4'"
307 :class="childIndex > 0 ? 'childYT' : ''"
308 >
309 <ul>
310 <li>
311 <input
312 type="text"
313 style="top: -1px;"
314
315 v-model="childItem.pzytdm"
316 class="formInput"
317 />
318 </li>
319 <li>
320 <input
321 type="text"
322
323 v-model="childItem.sjytdm"
324 class="formInput"
325 />
326 </li>
327 <li>
328 <el-date-picker
329 v-model="childItem.tdsyjssj"
330 ref="tdsyjssj"
331 type="date"
332 value-format="yyyy-MM-dd"
333 :picker-options="childItem.pickerEnd"
334 placeholder="选择日期"
335 @input="endTime(index,childIndex)"
336 >
337 </el-date-picker>
338 </li>
339 </ul>
340 </el-col>
341 </template>
342 </template>
233 343
234 <div class="title"> 344 <div class="title">
235 <el-select-tree 345 <el-select-tree
...@@ -260,6 +370,10 @@ export default { ...@@ -260,6 +370,10 @@ export default {
260 return {}; 370 return {};
261 }, 371 },
262 }, 372 },
373 hasSyqx:{
374 type:Boolean,
375 default:false
376 }
263 }, 377 },
264 data() { 378 data() {
265 return { 379 return {
...@@ -348,7 +462,6 @@ export default { ...@@ -348,7 +462,6 @@ export default {
348 this.countList[index].list[childIndex].tdsyjssj = Number(startTime.substring(0,4))+Number(syqx)+startTime.slice(4,10); 462 this.countList[index].list[childIndex].tdsyjssj = Number(startTime.substring(0,4))+Number(syqx)+startTime.slice(4,10);
349 }, 463 },
350 endTime(index,childIndex,e){ 464 endTime(index,childIndex,e){
351 console.log(e,'eeeeee');
352 let startTime = this.countList[index].list[childIndex].tdsyqssj; 465 let startTime = this.countList[index].list[childIndex].tdsyqssj;
353 let endTime = this.countList[index].list[childIndex].tdsyjssj; 466 let endTime = this.countList[index].list[childIndex].tdsyjssj;
354 this.countList[index].list[childIndex].pickerStart={ 467 this.countList[index].list[childIndex].pickerStart={
...@@ -479,13 +592,6 @@ export default { ...@@ -479,13 +592,6 @@ export default {
479 rule: /^\s*$/g, //非空 592 rule: /^\s*$/g, //非空
480 }, 593 },
481 { 594 {
482 data:item.list[ind].syqx,
483 name:'使用期限',
484 dom:this.$refs.syqx[temp+ind],
485 // val:this.$refs.syqx[temp+ind].value,
486 rule: /^\s*$/g, //非空
487 },
488 {
489 data:item.list[ind].tdsyjssj, 595 data:item.list[ind].tdsyjssj,
490 name:'土地使用结束时间', 596 name:'土地使用结束时间',
491 dom:this.$refs.tdsyjssj[temp+ind], 597 dom:this.$refs.tdsyjssj[temp+ind],
...@@ -496,6 +602,17 @@ export default { ...@@ -496,6 +602,17 @@ export default {
496 if (ind == item.list.length-1) { 602 if (ind == item.list.length-1) {
497 temp += item.list.length; 603 temp += item.list.length;
498 } 604 }
605 if(this.hasSyqx){
606 rules.push(
607 {
608 data:item.list[ind].syqx,
609 name:'使用期限',
610 dom:this.$refs.syqx[temp+ind],
611 // val:this.$refs.syqx[temp+ind].value,
612 rule: /^\s*$/g, //非空
613 }
614 )
615 }
499 }) 616 })
500 }) 617 })
501 this.rulesResult = true; 618 this.rulesResult = true;
......
...@@ -101,9 +101,11 @@ ...@@ -101,9 +101,11 @@
101 <li> 101 <li>
102 <el-date-picker 102 <el-date-picker
103 v-model="childItem.tdsyqssj" 103 v-model="childItem.tdsyqssj"
104 :picker-options="childItem.pickerStart"
104 type="date" 105 type="date"
105 value-format="yyyy-MM-dd" 106 value-format="yyyy-MM-dd"
106 placeholder="选择日期" 107 placeholder="选择日期"
108 @input="startTime(index,childIndex)"
107 > 109 >
108 </el-date-picker> 110 </el-date-picker>
109 </li> 111 </li>
...@@ -148,7 +150,9 @@ ...@@ -148,7 +150,9 @@
148 v-model="childItem.tdsyjssj" 150 v-model="childItem.tdsyjssj"
149 type="date" 151 type="date"
150 value-format="yyyy-MM-dd" 152 value-format="yyyy-MM-dd"
153 :picker-options="childItem.pickerEnd"
151 placeholder="选择日期" 154 placeholder="选择日期"
155 @input="endTime(index,childIndex)"
152 > 156 >
153 </el-date-picker> 157 </el-date-picker>
154 </li> 158 </li>
...@@ -221,6 +225,8 @@ export default { ...@@ -221,6 +225,8 @@ export default {
221 syqx: "", 225 syqx: "",
222 tdsyjssj: "", 226 tdsyjssj: "",
223 tdsyqssj: "", 227 tdsyqssj: "",
228 pickerStart:{},
229 pickerEnd:{},
224 tdzh: "", 230 tdzh: "",
225 }, 231 },
226 ], 232 ],
...@@ -317,6 +323,42 @@ export default { ...@@ -317,6 +323,42 @@ export default {
317 getQlxzDataList() { 323 getQlxzDataList() {
318 return this.countList; 324 return this.countList;
319 }, 325 },
326 //起始时间判断
327 startTime(index,childIndex){
328 let startTime= this.countList[index].list[childIndex].tdsyqssj;
329 let endTime=this.countList[index].list[childIndex].tdsyjssj;
330 this.countList[index].list[childIndex].pickerEnd={
331 disabledDate: (time) => {
332 if (Object.keys(startTime).length>0) {
333 return new Date(startTime).getTime()>time.getTime();
334 }else {
335 return time.getTime()< Date.now();
336 }
337 }
338 }
339 if (Object.keys(startTime).length > 0 && Object.keys(endTime).length > 0) {
340 let startYear= new Date(startTime).getFullYear();
341 let endYear=new Date(endTime).getFullYear();
342 }
343 },
344 endTime(index,childIndex,e){
345 console.log(e,'eeeeee');
346 let startTime = this.countList[index].list[childIndex].tdsyqssj;
347 let endTime = this.countList[index].list[childIndex].tdsyjssj;
348 this.countList[index].list[childIndex].pickerStart={
349 disabledDate: (time) => {
350 if (Object.keys(endTime).length>0) {
351 return new Date(endTime).getTime()<time.getTime();
352 }else {
353 return time.getTime() > Date.now();
354 }
355 }
356 }
357 if (Object.keys(startTime).length > 0 && Object.keys(endTime).length > 0) {
358 let startYear= new Date(startTime).getFullYear();
359 let endYear=new Date(endTime).getFullYear();
360 }
361 },
320 }, 362 },
321 }; 363 };
322 </script> 364 </script>
......
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
187 187
188 <tr> 188 <tr>
189 <td colspan="12" rowspan="4" align="center"> 189 <td colspan="12" rowspan="4" align="center">
190 <Qlxz ref="qlxzModule"></Qlxz> 190 <Qlxz ref="qlxzModule" :hasSyqx='false'></Qlxz>
191 </td> 191 </td>
192 </tr> 192 </tr>
193 <tr></tr> 193 <tr></tr>
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
218 </template> 218 </template>
219 219
220 <script> 220 <script>
221 import Qlxz from "./../../components/formMenu/qlxz_simple"; 221 import Qlxz from "./../../components/formMenu/qlxz";
222 import {batchUpdateQjH} from "../../api/h"; 222 import {batchUpdateQjH} from "../../api/h";
223 export default { 223 export default {
224 name: "plH", 224 name: "plH",
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
141 141
142 <tr> 142 <tr>
143 <td colspan="12" align="center"> 143 <td colspan="12" align="center">
144 <Qlxz ref="qlxzModule" :formData="form"></Qlxz> 144 <Qlxz ref="qlxzModule" :hasSyqx='false' :formData="form"></Qlxz>
145 </td> 145 </td>
146 </tr> 146 </tr>
147 147
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
207 207
208 <script> 208 <script>
209 import Qlr from "../../../components/formMenu/qlr"; 209 import Qlr from "../../../components/formMenu/qlr";
210 import Qlxz from "../../../components/formMenu/qlxz_simple"; 210 import Qlxz from "../../../components/formMenu/qlxz";
211 import {saveDzInfo,getBdcdyh,getDzDetailByBsm} from "../../../api/dz"; 211 import {saveDzInfo,getBdcdyh,getDzDetailByBsm} from "../../../api/dz";
212 import {getQjZdjbxxDetailById} from "../../../api/zd" 212 import {getQjZdjbxxDetailById} from "../../../api/zd"
213 import {submit,registerCall} from "../../../api/common" 213 import {submit,registerCall} from "../../../api/common"
......
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
301 </tr> 301 </tr>
302 <tr> 302 <tr>
303 <td colspan="12"> 303 <td colspan="12">
304 <Qlxz ref="qlxzModule" :formData="formData"></Qlxz> 304 <Qlxz ref="qlxzModule" :hasSyqx='true' :formData="formData"></Qlxz>
305 </td> 305 </td>
306 </tr> 306 </tr>
307 <tr> 307 <tr>
...@@ -479,9 +479,9 @@ export default { ...@@ -479,9 +479,9 @@ export default {
479 console.log(res.result,'res.result'); 479 console.log(res.result,'res.result');
480 this.getXzqData(res.result.xzqbsm,res.result.djqbsm); 480 this.getXzqData(res.result.xzqbsm,res.result.djqbsm);
481 //如果没有宗地代码,自动生成 481 //如果没有宗地代码,自动生成
482 if(res.result.zddm == null){ 482 // if(res.result.zddm == null){
483 this.generatorCode() 483 // this.generatorCode()
484 } 484 // }
485 //判断容密高是否为区间值,如果是区间值,则将校验值置为'-'并给rjl,jzmd,jzxg赋值 485 //判断容密高是否为区间值,如果是区间值,则将校验值置为'-'并给rjl,jzmd,jzxg赋值
486 this.rjl = this.isInterval(this.formData.jyrjl) ? this.formData.jyrjl : ''; 486 this.rjl = this.isInterval(this.formData.jyrjl) ? this.formData.jyrjl : '';
487 this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? '-' : this.formData.jyrjl; 487 this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? '-' : this.formData.jyrjl;
...@@ -717,7 +717,8 @@ export default { ...@@ -717,7 +717,8 @@ export default {
717 this.$nextTick(()=>{ 717 this.$nextTick(()=>{
718 if(flag){ 718 if(flag){
719 //宗地面积处理 719 //宗地面积处理
720 this.formData.zdmj = this.formData.zdmj.replace(/[^\d\.]/g,'') 720 // console.log(this.formData.zdmj,'this.formData.zdmj');
721 // this.formData.zdmj = this.formData.zdmj.replace(/[^\d\.]/g,'')
721 updateQjZdjbxx(this.formData) 722 updateQjZdjbxx(this.formData)
722 .then((res) => { 723 .then((res) => {
723 if (res.code == 200) { 724 if (res.code == 200) {
......
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
310 310
311 <tr> 311 <tr>
312 <td colspan="12" rowspan="4" align="center"> 312 <td colspan="12" rowspan="4" align="center">
313 <Qlxz ref="qlxzModule"></Qlxz> 313 <Qlxz ref="qlxzModule" :hasSyqx='false'></Qlxz>
314 </td> 314 </td>
315 </tr> 315 </tr>
316 <tr></tr> 316 <tr></tr>
...@@ -403,7 +403,7 @@ ...@@ -403,7 +403,7 @@
403 403
404 <script> 404 <script>
405 import Qlr from "./../../../../../components/formMenu/qlr"; 405 import Qlr from "./../../../../../components/formMenu/qlr";
406 import Qlxz from "./../../../../../components/formMenu/qlxz_simple"; 406 import Qlxz from "./../../../../../components/formMenu/qlxz";
407 import {getQjHDetailByBsm,updateQjH} from "./../../../../../api/h"; 407 import {getQjHDetailByBsm,updateQjH} from "./../../../../../api/h";
408 import {getBdcdyh} from "./../../../../../api/zrz"; 408 import {getBdcdyh} from "./../../../../../api/zrz";
409 import {submit,registerCall} from "./../../../../../api/common" 409 import {submit,registerCall} from "./../../../../../api/common"
......