58cfdc5d by 焦泽平
2 parents de5b21a2 30380ce6
......@@ -25,7 +25,7 @@
<td colspan="2">其他建筑面积(㎡)</td>
<td colspan="4"><input type="text" v-model="form.qtjzmj" class="inputtitle"/></td>
<td colspan="2">分摊系数</td>
<td colspan="4"><input type="text" v-model="form.ftxs" class="inputtitle"/></td>
<td colspan="4"><input type="number" @blur="inputBlur($event)" ref="ftxs" v-model="form.ftxs" class="inputtitle"/></td>
</tr>
<tr>
<td colspan="2">户型</td>
......@@ -315,6 +315,16 @@
}
},
methods: {
inputBlur(e){
if(e.target.value!==''&&e.target.value>0&&e.target.value<10){
e.target.style.border=""
}else{
e.target.style.border="1px solid red";
e.target.style.boxSizing = 'border-box';
}
},
lodding:function(){
this.$emit('lodding')
},
......@@ -411,6 +421,30 @@
this.fwjgTitleRowspan=1; //房屋结构的单元格垂直合并数量
},
save: function () {
this.rules=[
{
data:this.form.ftxs,
name:'分摊系数',
dom:this.$refs.ftxs,
rule: /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/, //非空
},
];
let flag = true;
this.rules.forEach(item=>{
if(item.rule.test(item.data) || item.data == null){
if(item.dom.$el){
item.dom.$el.style.border = '1px solid red';
item.dom.$el.style.boxSizing = 'border-box';
}else{
item.dom.style.border = '1px solid red';
item.dom.style.boxSizing = 'border-box';
}
flag = false;
return false
}
})
this.form['hbsms'] = this.bsms
this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList();
for(let i=0;i< this.form.fwjgList.length;i++){
......
......@@ -179,6 +179,7 @@
updateQsztByBsm(data)
.then((res => {
if (res.code == 200) {
this.$store.state.oldZdbsm = '';
switch (row.dylx) {
case "zd":
this.$store.state.zdbsm = row.glbsm;
......
......@@ -839,6 +839,7 @@
if (res.code === 200) {
this.$message.success("提交成功!")
this.getZdjbxxData(this.curZdbsm);
this.$store.state.oldZdbsm = '';
this.getRightTree(this.curZdbsm,'0,1,2')
}
})
......
......@@ -231,10 +231,10 @@
<xxxx v-if="!bjztFlag"></xxxx>
<!-- 右键菜单弹出框 -->
<el-dialog v-dialogDrag :close-on-click-modal="false" title="添加" :visible.sync="dialogVisible" width="50%" >
<el-dialog v-dialogDrag :close-on-click-modal="false" :title="taskTitle" :visible.sync="dialogVisible" width="50%" >
<!-- 根据菜单类型(menuType)和右键点击的楼盘类型(treeData.type)来区分弹框内容 -->
<div class="addCh" v-show="menuType == 'ljz'">
<addLjz ref="ljz"></addLjz>
<addLjz ref="ljz" :ljzbsm="curBsm"></addLjz>
</div>
<div class="addCh" v-show="menuType == 'zdy'">
<addZdy ref="zdy"></addZdy>
......@@ -377,6 +377,8 @@ export default {
cbsmList:[], // 层bsmlist
lpbloading:true,
bjztFlag:true,
taskTitle:'添加',
curBsm:'',
};
},
created() {
......@@ -510,6 +512,8 @@ export default {
this.resetInfo();
});
this.dialogVisible = true;
this.taskTitle = '添加';
this.curBsm = '';
},
//弹框中的保存按钮,根据不同菜单点击类型调用不同子组件的保存方法
saveInfo() {
......
......@@ -196,6 +196,12 @@ import { formdate } from "@libs/function";
export default {
name: "ljz",
components: {},
props: {
ljzbsm:{
type: String,
default: '',
}
},
data() {
return {
form: {
......@@ -314,24 +320,50 @@ export default {
onSave(data, bsm) {
//自然幢标识码
this.form.zrzbsm = bsm;
insertLjzInfo(this.form).then((res) => {
if (res.code === 200) {
this.$message.success("保存成功");
//更新树结构数据
console.log(this);
this.$parent.$parent.getLpbMenuTree(bsm);
//关闭弹框
this.$parent.$parent.closeDaialog();
}
});
if(this.ljzbsm == ''){
insertLjzInfo(this.form).then((res) => {
if (res.code === 200) {
this.$message.success("保存成功");
//更新树结构数据
console.log(this);
this.$parent.$parent.getLpbMenuTree(bsm);
//关闭弹框
this.$parent.$parent.closeDaialog();
}else{
this.$message.error(res.message);
}
});
}else{
//逻辑幢更新接口调用 TODO
console.log('保存');
}
},
onSubmit() {
console.log(this.form);
// console.log(this.form);
},
//根据逻辑幢bsm查询逻辑幢信息
getLjzInfo(bsm){
//逻辑幢信息查询接口调用 bsm为逻辑幢bsm TODO
this.form = {zrzh:'11111111'};
this.$forceUpdate();
}
},
created() {
},
created() {this.form.zrzh = this.$store.state.zrzh;},
mounted() {
this.form.zrzh = this.$store.state.zrzh;
},
watch:{
ljzbsm: {
handler: function (item) {
console.log(item,'item');
if(item!=''){
this.getLjzInfo(this.ljzbsm)
}
},
immediate: true
},
}
};
</script>
<style rel="stylesheet/less" lang="less" scoped>
......
......@@ -153,7 +153,7 @@
<!-- 逻辑幢名称 -->
<div class="ljz-name name">
<p>
<p class="cp" @dblclick="openZxx(ljzs.bsm,'ljz')">
{{ ljzs.ljzmc }}
</p>
</div>
......@@ -893,6 +893,8 @@ export default {
this.fghbChoosedList = [];
// 更新楼盘表
this.getLpb(this.zrzbsm, this.$parent.scyclx);
}else{
Message.error(res.message);
}
})
.catch(() => {});
......@@ -917,6 +919,8 @@ export default {
this.fghbChoosedList = [];
// 更新楼盘表
this.getLpb(this.zrzbsm, this.$parent.scyclx);
}else{
Message.error(res.message);
}
})
.catch(() => {});
......@@ -1007,6 +1011,15 @@ export default {
this.$nextTick(()=>{
this.$parent.getHbsm(this.hbsmList, false);
})
},
//逻辑幢、幢单元、层双击
openZxx(bsm,type){
if (this.lpbParent == 'isLpb') {
this.$parent.taskTitle = '编辑';
this.$parent.dialogVisible = true;
this.$parent.curBsm = bsm;
this.$parent.menuType = type;
}
}
},
computed: {
......@@ -1051,16 +1064,20 @@ export default {
},
//父组件中选择单元状态改变选中户的边框颜色
choosedList(n) {
this.$refs.hBsm.forEach((item) => {
this.choosedList.forEach((i) => {
if (item.dataset.bsm == i) {
//定位到最后一个户所在位置
this.$refs.lpbContent.scrollTop = item.offsetTop;
this.$refs.lpbContent.scrollLeft = item.offsetLeft;
item.style.border = '1px solid '+this.borderColor;
}
if (n.length>0) {
this.$refs.hBsm.forEach((item) => {
this.choosedList.forEach((i,ind) => {
if (item.dataset.bsm == i) {
if (ind == 0) {
//定位到第一个户所在位置
this.$refs.lpbContent.scrollTop = item.offsetTop;
this.$refs.lpbContent.scrollLeft = item.offsetLeft;
}
item.style.border = '1px solid '+this.borderColor;
}
});
});
});
}
},
lpbChVisible(value) {
if (value) {
......
<template>
<div class="main" ref="mainBox">
<div class="main" ref="mainBox">
<table border="1">
<tr>
<td colspan="3">宗地代码</td>
<td colspan="4"><input type="text" class="formInput" v-model="zddm " disabled/></td>
<td colspan="4">
<el-input v-model="zddm " disabled></el-input>
</td>
</tr>
<tr>
<td colspan="3">建筑物区分所有权业主共有部分权利人</td>
<td colspan="4"><input type="text" class="formInput" v-model="Data.qlr" disabled/></td>
<td colspan="4">
<el-input v-model="Data.qlr" disabled></el-input>
</td>
</tr>
</table>
<table border="1">
<tr>
<td>
<th>
<el-button
type="primary"
class="changeBtn inAdd addMinus"
@click="addRow"
>+</el-button
>
</td>
<td>建(构)筑物编号</td>
<td>建(构)筑物数量</td>
<td>建(构)筑物面积(㎡)</td>
<td>占地面积(㎡)</td>
<td>分摊土地面积(㎡)</td>
<td>附记</td>
type="primary"
class="changeBtn inAdd addMinus"
@click="addRow"
>+
</el-button
>
</th>
<th>建(构)筑物编号</th>
<th>建(构)筑物数量</th>
<th>建(构)筑物面积(㎡)</th>
<th>占地面积(㎡)</th>
<th>分摊土地面积(㎡)</th>
<th>附记</th>
</tr>
<tr v-for="(item,i) in Data.list" :key="i">
<td>
<el-button
type="primary"
class="changeBtn inMinus addMinus"
@click="delRow(i)"
>-</el-button
type="primary"
class="changeBtn inMinus addMinus"
@click="delRow(i)"
>-
</el-button
>
</td>
<td><el-input v-model="item.jgzwbh" placeholder="请输入建(构)筑物编号"></el-input></td>
<td><el-input v-model="item.jgzsl" oninput="value = (value.match(/^\d*/g)) || null" placeholder="请输入建(构)筑物数量"></el-input></td>
<td><el-input v-model="item.jgzmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入建(构)筑物面积(㎡)"></el-input></td>
<td><el-input v-model="item.zdmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入占地面积(㎡)"></el-input></td>
<td><el-input v-model="item.fttdmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入分摊土地面积(㎡)"></el-input></td>
<td><el-input v-model="item.fj" placeholder="请输入附记"></el-input></td>
<td>
<el-input v-model="item.jgzwbh" placeholder="请输入建(构)筑物编号"></el-input>
</td>
<td>
<el-input v-model="item.jgzsl" oninput="value = (value.match(/^\d{0,10}/g)) || null"
placeholder="请输入建(构)筑物数量"></el-input>
</td>
<td>
<el-input v-model="item.jgzmj" oninput="value = (value.match(/^\d{0,10}(\.?\d{0,3})/g)[0]) || null"
placeholder="请输入建(构)筑物面积(㎡)"></el-input>
</td>
<td>
<el-input v-model="item.zdmj" oninput="value = (value.match(/^\d{0,10}(\.?\d{0,3})/g)[0]) || null"
placeholder="请输入占地面积(㎡)"></el-input>
</td>
<td>
<el-input v-model="item.fttdmj" oninput="value = (value.match(/^\d{0,10}(\.?\d{0,3})/g)[0]) || null"
placeholder="请输入分摊土地面积(㎡)"></el-input>
</td>
<td>
<el-input v-model="item.fj" placeholder="请输入附记"></el-input>
</td>
</tr>
<!-- <tr>
<td>统计</td>
<td>{{sumTdsyqsyqmj}}</td>
<td>{{sumDydytdmj}}</td>
<td>{{sumFttdmj}}</td>
<td>{{sumFttdmj}}</td>
<td>{{sumFttdmj}}</td>
<td>{{sumFttdmj}}</td>
</tr>-->
</table>
<!-- <div class="pers">
<el-button @click="save" type="primary">保存</el-button>
</div> -->
<div class="header-button" :style="{width:mainBoxWidth+'px'}">
<el-button type="primary" class="saveBtn" @click="save">保存</el-button>
<el-button type="primary" class="saveBtn" @click="save">保存</el-button>
</div>
</div>
</template>
......@@ -85,7 +95,7 @@
fj: ''
}]
},
mainBoxWidth:0
mainBoxWidth: 0
}
},
......@@ -100,7 +110,7 @@
},
save() {
console.log(this.Data);
if(this.Data.list.length === 0){
if (this.Data.list.length === 0) {
Message.info("至少填写一条建筑物信息")
return
}
......@@ -194,6 +204,7 @@
.dzwsl {
width: 200px;
}
.header-button {
z-index: 3;
height: 50px;
......
......@@ -599,6 +599,7 @@
if(res.code===200){
this.$message.success("提交完成!");
this.getZrzDetailByBsm(this.$route.query.bsm);
this.$store.state.oldZdbsm = '';
this.getTreeByBsm(this.$route.query.bsm,'zrz','0,1,2')
}else{
this.$message.error(res.message);
......