58cfdc5d by 焦泽平
2 parents de5b21a2 30380ce6
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
25 <td colspan="2">其他建筑面积(㎡)</td> 25 <td colspan="2">其他建筑面积(㎡)</td>
26 <td colspan="4"><input type="text" v-model="form.qtjzmj" class="inputtitle"/></td> 26 <td colspan="4"><input type="text" v-model="form.qtjzmj" class="inputtitle"/></td>
27 <td colspan="2">分摊系数</td> 27 <td colspan="2">分摊系数</td>
28 <td colspan="4"><input type="text" v-model="form.ftxs" class="inputtitle"/></td> 28 <td colspan="4"><input type="number" @blur="inputBlur($event)" ref="ftxs" v-model="form.ftxs" class="inputtitle"/></td>
29 </tr> 29 </tr>
30 <tr> 30 <tr>
31 <td colspan="2">户型</td> 31 <td colspan="2">户型</td>
...@@ -315,6 +315,16 @@ ...@@ -315,6 +315,16 @@
315 } 315 }
316 }, 316 },
317 methods: { 317 methods: {
318
319 inputBlur(e){
320 if(e.target.value!==''&&e.target.value>0&&e.target.value<10){
321 e.target.style.border=""
322 }else{
323 e.target.style.border="1px solid red";
324 e.target.style.boxSizing = 'border-box';
325 }
326 },
327
318 lodding:function(){ 328 lodding:function(){
319 this.$emit('lodding') 329 this.$emit('lodding')
320 }, 330 },
...@@ -411,6 +421,30 @@ ...@@ -411,6 +421,30 @@
411 this.fwjgTitleRowspan=1; //房屋结构的单元格垂直合并数量 421 this.fwjgTitleRowspan=1; //房屋结构的单元格垂直合并数量
412 }, 422 },
413 save: function () { 423 save: function () {
424
425 this.rules=[
426 {
427 data:this.form.ftxs,
428 name:'分摊系数',
429 dom:this.$refs.ftxs,
430 rule: /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/, //非空
431 },
432 ];
433 let flag = true;
434 this.rules.forEach(item=>{
435 if(item.rule.test(item.data) || item.data == null){
436 if(item.dom.$el){
437 item.dom.$el.style.border = '1px solid red';
438 item.dom.$el.style.boxSizing = 'border-box';
439 }else{
440 item.dom.style.border = '1px solid red';
441 item.dom.style.boxSizing = 'border-box';
442 }
443 flag = false;
444 return false
445 }
446 })
447
414 this.form['hbsms'] = this.bsms 448 this.form['hbsms'] = this.bsms
415 this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList(); 449 this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList();
416 for(let i=0;i< this.form.fwjgList.length;i++){ 450 for(let i=0;i< this.form.fwjgList.length;i++){
......
...@@ -179,6 +179,7 @@ ...@@ -179,6 +179,7 @@
179 updateQsztByBsm(data) 179 updateQsztByBsm(data)
180 .then((res => { 180 .then((res => {
181 if (res.code == 200) { 181 if (res.code == 200) {
182 this.$store.state.oldZdbsm = '';
182 switch (row.dylx) { 183 switch (row.dylx) {
183 case "zd": 184 case "zd":
184 this.$store.state.zdbsm = row.glbsm; 185 this.$store.state.zdbsm = row.glbsm;
......
...@@ -839,6 +839,7 @@ ...@@ -839,6 +839,7 @@
839 if (res.code === 200) { 839 if (res.code === 200) {
840 this.$message.success("提交成功!") 840 this.$message.success("提交成功!")
841 this.getZdjbxxData(this.curZdbsm); 841 this.getZdjbxxData(this.curZdbsm);
842 this.$store.state.oldZdbsm = '';
842 this.getRightTree(this.curZdbsm,'0,1,2') 843 this.getRightTree(this.curZdbsm,'0,1,2')
843 } 844 }
844 }) 845 })
......
...@@ -231,10 +231,10 @@ ...@@ -231,10 +231,10 @@
231 <xxxx v-if="!bjztFlag"></xxxx> 231 <xxxx v-if="!bjztFlag"></xxxx>
232 232
233 <!-- 右键菜单弹出框 --> 233 <!-- 右键菜单弹出框 -->
234 <el-dialog v-dialogDrag :close-on-click-modal="false" title="添加" :visible.sync="dialogVisible" width="50%" > 234 <el-dialog v-dialogDrag :close-on-click-modal="false" :title="taskTitle" :visible.sync="dialogVisible" width="50%" >
235 <!-- 根据菜单类型(menuType)和右键点击的楼盘类型(treeData.type)来区分弹框内容 --> 235 <!-- 根据菜单类型(menuType)和右键点击的楼盘类型(treeData.type)来区分弹框内容 -->
236 <div class="addCh" v-show="menuType == 'ljz'"> 236 <div class="addCh" v-show="menuType == 'ljz'">
237 <addLjz ref="ljz"></addLjz> 237 <addLjz ref="ljz" :ljzbsm="curBsm"></addLjz>
238 </div> 238 </div>
239 <div class="addCh" v-show="menuType == 'zdy'"> 239 <div class="addCh" v-show="menuType == 'zdy'">
240 <addZdy ref="zdy"></addZdy> 240 <addZdy ref="zdy"></addZdy>
...@@ -377,6 +377,8 @@ export default { ...@@ -377,6 +377,8 @@ export default {
377 cbsmList:[], // 层bsmlist 377 cbsmList:[], // 层bsmlist
378 lpbloading:true, 378 lpbloading:true,
379 bjztFlag:true, 379 bjztFlag:true,
380 taskTitle:'添加',
381 curBsm:'',
380 }; 382 };
381 }, 383 },
382 created() { 384 created() {
...@@ -510,6 +512,8 @@ export default { ...@@ -510,6 +512,8 @@ export default {
510 this.resetInfo(); 512 this.resetInfo();
511 }); 513 });
512 this.dialogVisible = true; 514 this.dialogVisible = true;
515 this.taskTitle = '添加';
516 this.curBsm = '';
513 }, 517 },
514 //弹框中的保存按钮,根据不同菜单点击类型调用不同子组件的保存方法 518 //弹框中的保存按钮,根据不同菜单点击类型调用不同子组件的保存方法
515 saveInfo() { 519 saveInfo() {
......
...@@ -196,6 +196,12 @@ import { formdate } from "@libs/function"; ...@@ -196,6 +196,12 @@ import { formdate } from "@libs/function";
196 export default { 196 export default {
197 name: "ljz", 197 name: "ljz",
198 components: {}, 198 components: {},
199 props: {
200 ljzbsm:{
201 type: String,
202 default: '',
203 }
204 },
199 data() { 205 data() {
200 return { 206 return {
201 form: { 207 form: {
...@@ -314,6 +320,7 @@ export default { ...@@ -314,6 +320,7 @@ export default {
314 onSave(data, bsm) { 320 onSave(data, bsm) {
315 //自然幢标识码 321 //自然幢标识码
316 this.form.zrzbsm = bsm; 322 this.form.zrzbsm = bsm;
323 if(this.ljzbsm == ''){
317 insertLjzInfo(this.form).then((res) => { 324 insertLjzInfo(this.form).then((res) => {
318 if (res.code === 200) { 325 if (res.code === 200) {
319 this.$message.success("保存成功"); 326 this.$message.success("保存成功");
...@@ -322,16 +329,41 @@ export default { ...@@ -322,16 +329,41 @@ export default {
322 this.$parent.$parent.getLpbMenuTree(bsm); 329 this.$parent.$parent.getLpbMenuTree(bsm);
323 //关闭弹框 330 //关闭弹框
324 this.$parent.$parent.closeDaialog(); 331 this.$parent.$parent.closeDaialog();
332 }else{
333 this.$message.error(res.message);
325 } 334 }
326 }); 335 });
336 }else{
337 //逻辑幢更新接口调用 TODO
338 console.log('保存');
339 }
327 }, 340 },
328 onSubmit() { 341 onSubmit() {
329 console.log(this.form); 342 // console.log(this.form);
343 },
344 //根据逻辑幢bsm查询逻辑幢信息
345 getLjzInfo(bsm){
346 //逻辑幢信息查询接口调用 bsm为逻辑幢bsm TODO
347 this.form = {zrzh:'11111111'};
348 this.$forceUpdate();
349 }
330 }, 350 },
351 created() {
331 }, 352 },
332 created() {this.form.zrzh = this.$store.state.zrzh;},
333 mounted() { 353 mounted() {
354 this.form.zrzh = this.$store.state.zrzh;
334 }, 355 },
356 watch:{
357 ljzbsm: {
358 handler: function (item) {
359 console.log(item,'item');
360 if(item!=''){
361 this.getLjzInfo(this.ljzbsm)
362 }
363 },
364 immediate: true
365 },
366 }
335 }; 367 };
336 </script> 368 </script>
337 <style rel="stylesheet/less" lang="less" scoped> 369 <style rel="stylesheet/less" lang="less" scoped>
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
153 153
154 <!-- 逻辑幢名称 --> 154 <!-- 逻辑幢名称 -->
155 <div class="ljz-name name"> 155 <div class="ljz-name name">
156 <p> 156 <p class="cp" @dblclick="openZxx(ljzs.bsm,'ljz')">
157 {{ ljzs.ljzmc }} 157 {{ ljzs.ljzmc }}
158 </p> 158 </p>
159 </div> 159 </div>
...@@ -893,6 +893,8 @@ export default { ...@@ -893,6 +893,8 @@ export default {
893 this.fghbChoosedList = []; 893 this.fghbChoosedList = [];
894 // 更新楼盘表 894 // 更新楼盘表
895 this.getLpb(this.zrzbsm, this.$parent.scyclx); 895 this.getLpb(this.zrzbsm, this.$parent.scyclx);
896 }else{
897 Message.error(res.message);
896 } 898 }
897 }) 899 })
898 .catch(() => {}); 900 .catch(() => {});
...@@ -917,6 +919,8 @@ export default { ...@@ -917,6 +919,8 @@ export default {
917 this.fghbChoosedList = []; 919 this.fghbChoosedList = [];
918 // 更新楼盘表 920 // 更新楼盘表
919 this.getLpb(this.zrzbsm, this.$parent.scyclx); 921 this.getLpb(this.zrzbsm, this.$parent.scyclx);
922 }else{
923 Message.error(res.message);
920 } 924 }
921 }) 925 })
922 .catch(() => {}); 926 .catch(() => {});
...@@ -1007,6 +1011,15 @@ export default { ...@@ -1007,6 +1011,15 @@ export default {
1007 this.$nextTick(()=>{ 1011 this.$nextTick(()=>{
1008 this.$parent.getHbsm(this.hbsmList, false); 1012 this.$parent.getHbsm(this.hbsmList, false);
1009 }) 1013 })
1014 },
1015 //逻辑幢、幢单元、层双击
1016 openZxx(bsm,type){
1017 if (this.lpbParent == 'isLpb') {
1018 this.$parent.taskTitle = '编辑';
1019 this.$parent.dialogVisible = true;
1020 this.$parent.curBsm = bsm;
1021 this.$parent.menuType = type;
1022 }
1010 } 1023 }
1011 }, 1024 },
1012 computed: { 1025 computed: {
...@@ -1051,16 +1064,20 @@ export default { ...@@ -1051,16 +1064,20 @@ export default {
1051 }, 1064 },
1052 //父组件中选择单元状态改变选中户的边框颜色 1065 //父组件中选择单元状态改变选中户的边框颜色
1053 choosedList(n) { 1066 choosedList(n) {
1067 if (n.length>0) {
1054 this.$refs.hBsm.forEach((item) => { 1068 this.$refs.hBsm.forEach((item) => {
1055 this.choosedList.forEach((i) => { 1069 this.choosedList.forEach((i,ind) => {
1056 if (item.dataset.bsm == i) { 1070 if (item.dataset.bsm == i) {
1057 //定位到最后一个户所在位置 1071 if (ind == 0) {
1072 //定位到第一个户所在位置
1058 this.$refs.lpbContent.scrollTop = item.offsetTop; 1073 this.$refs.lpbContent.scrollTop = item.offsetTop;
1059 this.$refs.lpbContent.scrollLeft = item.offsetLeft; 1074 this.$refs.lpbContent.scrollLeft = item.offsetLeft;
1075 }
1060 item.style.border = '1px solid '+this.borderColor; 1076 item.style.border = '1px solid '+this.borderColor;
1061 } 1077 }
1062 }); 1078 });
1063 }); 1079 });
1080 }
1064 }, 1081 },
1065 lpbChVisible(value) { 1082 lpbChVisible(value) {
1066 if (value) { 1083 if (value) {
......
...@@ -3,29 +3,34 @@ ...@@ -3,29 +3,34 @@
3 <table border="1"> 3 <table border="1">
4 <tr> 4 <tr>
5 <td colspan="3">宗地代码</td> 5 <td colspan="3">宗地代码</td>
6 <td colspan="4"><input type="text" class="formInput" v-model="zddm " disabled/></td> 6 <td colspan="4">
7 <el-input v-model="zddm " disabled></el-input>
8 </td>
7 </tr> 9 </tr>
8 <tr> 10 <tr>
9 <td colspan="3">建筑物区分所有权业主共有部分权利人</td> 11 <td colspan="3">建筑物区分所有权业主共有部分权利人</td>
10 <td colspan="4"><input type="text" class="formInput" v-model="Data.qlr" disabled/></td> 12 <td colspan="4">
13 <el-input v-model="Data.qlr" disabled></el-input>
14 </td>
11 </tr> 15 </tr>
12 </table> 16 </table>
13 <table border="1"> 17 <table border="1">
14 <tr> 18 <tr>
15 <td> 19 <th>
16 <el-button 20 <el-button
17 type="primary" 21 type="primary"
18 class="changeBtn inAdd addMinus" 22 class="changeBtn inAdd addMinus"
19 @click="addRow" 23 @click="addRow"
20 >+</el-button 24 >+
25 </el-button
21 > 26 >
22 </td> 27 </th>
23 <td>建(构)筑物编号</td> 28 <th>建(构)筑物编号</th>
24 <td>建(构)筑物数量</td> 29 <th>建(构)筑物数量</th>
25 <td>建(构)筑物面积(㎡)</td> 30 <th>建(构)筑物面积(㎡)</th>
26 <td>占地面积(㎡)</td> 31 <th>占地面积(㎡)</th>
27 <td>分摊土地面积(㎡)</td> 32 <th>分摊土地面积(㎡)</th>
28 <td>附记</td> 33 <th>附记</th>
29 </tr> 34 </tr>
30 <tr v-for="(item,i) in Data.list" :key="i"> 35 <tr v-for="(item,i) in Data.list" :key="i">
31 <td> 36 <td>
...@@ -33,29 +38,34 @@ ...@@ -33,29 +38,34 @@
33 type="primary" 38 type="primary"
34 class="changeBtn inMinus addMinus" 39 class="changeBtn inMinus addMinus"
35 @click="delRow(i)" 40 @click="delRow(i)"
36 >-</el-button 41 >-
42 </el-button
37 > 43 >
38 </td> 44 </td>
39 <td><el-input v-model="item.jgzwbh" placeholder="请输入建(构)筑物编号"></el-input></td> 45 <td>
40 <td><el-input v-model="item.jgzsl" oninput="value = (value.match(/^\d*/g)) || null" placeholder="请输入建(构)筑物数量"></el-input></td> 46 <el-input v-model="item.jgzwbh" placeholder="请输入建(构)筑物编号"></el-input>
41 <td><el-input v-model="item.jgzmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入建(构)筑物面积(㎡)"></el-input></td> 47 </td>
42 <td><el-input v-model="item.zdmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入占地面积(㎡)"></el-input></td> 48 <td>
43 <td><el-input v-model="item.fttdmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入分摊土地面积(㎡)"></el-input></td> 49 <el-input v-model="item.jgzsl" oninput="value = (value.match(/^\d{0,10}/g)) || null"
44 <td><el-input v-model="item.fj" placeholder="请输入附记"></el-input></td> 50 placeholder="请输入建(构)筑物数量"></el-input>
51 </td>
52 <td>
53 <el-input v-model="item.jgzmj" oninput="value = (value.match(/^\d{0,10}(\.?\d{0,3})/g)[0]) || null"
54 placeholder="请输入建(构)筑物面积(㎡)"></el-input>
55 </td>
56 <td>
57 <el-input v-model="item.zdmj" oninput="value = (value.match(/^\d{0,10}(\.?\d{0,3})/g)[0]) || null"
58 placeholder="请输入占地面积(㎡)"></el-input>
59 </td>
60 <td>
61 <el-input v-model="item.fttdmj" oninput="value = (value.match(/^\d{0,10}(\.?\d{0,3})/g)[0]) || null"
62 placeholder="请输入分摊土地面积(㎡)"></el-input>
63 </td>
64 <td>
65 <el-input v-model="item.fj" placeholder="请输入附记"></el-input>
66 </td>
45 </tr> 67 </tr>
46 <!-- <tr>
47 <td>统计</td>
48 <td>{{sumTdsyqsyqmj}}</td>
49 <td>{{sumDydytdmj}}</td>
50 <td>{{sumFttdmj}}</td>
51 <td>{{sumFttdmj}}</td>
52 <td>{{sumFttdmj}}</td>
53 <td>{{sumFttdmj}}</td>
54 </tr>-->
55 </table> 68 </table>
56 <!-- <div class="pers">
57 <el-button @click="save" type="primary">保存</el-button>
58 </div> -->
59 <div class="header-button" :style="{width:mainBoxWidth+'px'}"> 69 <div class="header-button" :style="{width:mainBoxWidth+'px'}">
60 <el-button type="primary" class="saveBtn" @click="save">保存</el-button> 70 <el-button type="primary" class="saveBtn" @click="save">保存</el-button>
61 </div> 71 </div>
...@@ -85,7 +95,7 @@ ...@@ -85,7 +95,7 @@
85 fj: '' 95 fj: ''
86 }] 96 }]
87 }, 97 },
88 mainBoxWidth:0 98 mainBoxWidth: 0
89 } 99 }
90 }, 100 },
91 101
...@@ -100,7 +110,7 @@ ...@@ -100,7 +110,7 @@
100 }, 110 },
101 save() { 111 save() {
102 console.log(this.Data); 112 console.log(this.Data);
103 if(this.Data.list.length === 0){ 113 if (this.Data.list.length === 0) {
104 Message.info("至少填写一条建筑物信息") 114 Message.info("至少填写一条建筑物信息")
105 return 115 return
106 } 116 }
...@@ -194,6 +204,7 @@ ...@@ -194,6 +204,7 @@
194 .dzwsl { 204 .dzwsl {
195 width: 200px; 205 width: 200px;
196 } 206 }
207
197 .header-button { 208 .header-button {
198 z-index: 3; 209 z-index: 3;
199 height: 50px; 210 height: 50px;
......
...@@ -599,6 +599,7 @@ ...@@ -599,6 +599,7 @@
599 if(res.code===200){ 599 if(res.code===200){
600 this.$message.success("提交完成!"); 600 this.$message.success("提交完成!");
601 this.getZrzDetailByBsm(this.$route.query.bsm); 601 this.getZrzDetailByBsm(this.$route.query.bsm);
602 this.$store.state.oldZdbsm = '';
602 this.getTreeByBsm(this.$route.query.bsm,'zrz','0,1,2') 603 this.getTreeByBsm(this.$route.query.bsm,'zrz','0,1,2')
603 }else{ 604 }else{
604 this.$message.error(res.message); 605 this.$message.error(res.message);
......