cb4ca7ac by weimo934

feat(yzgy):绘制业主共有表单对接接口

1 parent 3917f637
import request from '@/plugin/axios'
/**
* 新增自然幢基本信息
*/
export function insertZrzjbxx (data) {
export function insertZrzjbxx(data) {
return request({
url: 'fw/qjZrz/insert',
method: 'post',
......@@ -13,13 +14,13 @@ export function insertZrzjbxx (data) {
/**
* 生成不动产单元号
*/
export function getBdcdyh (dpdm,dptype) {
export function getBdcdyh(dpdm, dptype) {
return request({
url: '/system/generator/getBdcdyh',
method: 'get',
params:{
dpdm:dpdm,
dptype:dptype
params: {
dpdm: dpdm,
dptype: dptype
}
})
}
......@@ -27,25 +28,46 @@ export function getBdcdyh (dpdm,dptype) {
/**
* 保存自然幢信息
*/
export function saveZrzInfo (data) {
export function saveZrzInfo(data) {
return request({
url: '/fw/qjZrz/updateQjZrz',
method: 'put',
data:data
data: data
})
}
/**
* 保存自然幢信息
*/
export function getZrzDetailByBsm (data) {
export function getZrzDetailByBsm(data) {
return request({
url: '/fw/qjZrz/getQjZrzDetailById',
method: 'get',
params:{
id:data
params: {
id: data
}
})
}
/**
* 新增权籍_建筑物区分所有权业主共有部分调查表
*/
export function saveYzgy(data) {
return request({
url: '/system/qjJzwqfsyqyzgybfdc/insertQjJzwqfsyqyzgybfdc',
method: 'post',
data: data
})
}
/**
* 查询权籍_建筑物区分所有权业主共有部分调查表
*/
export function queryYzgy(id) {
return request({
url: '/system/qjJzwqfsyqyzgybfdc/getQjJzwqfsyqyzgybfdcDetailById',
method: 'get',
params: {id}
})
}
......
......@@ -50,7 +50,7 @@
</template>
<script>
import {getMjftInfo,savemjft} from '../../../api/zd'
import {getMjftInfo, savemjft} from '../../../api/zd'
import {Message} from 'element-ui'
export default {
......@@ -59,14 +59,14 @@
return {
tdzl: '', // 土地坐落 继承获取
zdmj: '', // 宗地面积 继承获取
zddm:'',
zddm: '',
mjftData: {
zdbsm: '', // 宗地标识码 继承获取
tdsyqsyqmjhj: '',// 土地所有权/使用权面积合计
fttdmjhj: '', // 分摊土地面积合计
dzwdys: '', // 表示同一宗地内所有的定着物单元数
dydytdmjhj: '', // 根据该宗地下共有/共用定着物量自动计算。 ,
bz: '' , // 备注
bz: '', // 备注
list: [
{
dydytdmj: '', // 独有独用土地面积
......@@ -81,10 +81,10 @@
},
methods: {
getData(bsm){
getMjftInfo(bsm).then(res=>{
if (res.success){
this.mjftData=res.result
getData(bsm) {
getMjftInfo(bsm).then(res => {
if (res.success) {
this.mjftData = res.result
}
})
},
......@@ -96,7 +96,7 @@
return
}
}
this.mjftData['zdbsm'] = this.$store.state.zdbsm
savemjft(this.mjftData).then(res => {
console.log(res)
if (res.success) {
......@@ -170,7 +170,7 @@
},
dzwdsl: function () {
let self = this
let num = this.mjftData.list.length?this.mjftData.list.length:0
let num = this.mjftData.list.length ? this.mjftData.list.length : 0
self.mjftData.dzwdys = num
return num;
}
......@@ -180,7 +180,7 @@
},
mounted() {
console.log("mounted init...")
if (this.mjftData.zdbsm){
if (this.mjftData.zdbsm) {
this.getData()
}
},
......
<template>
<div class="">业主共有</div>
<div class="">
<div class="main">
<table border="1">
<tr>
<td colspan="3">宗地代码</td>
<td colspan="4"><input type="text" class="formInput" v-model="zddm " disabled/></td>
</tr>
<tr>
<td colspan="3">建筑物区分所有权业主共有部分权利人</td>
<td colspan="4"><input type="text" class="formInput" v-model="Data.qlr" disabled/></td>
</tr>
</table>
<table border="1">
<tr>
<td @click="addRow">+</td>
<td>建(构)筑物编号</td>
<td>建(构)筑物数量</td>
<td>建(构)筑物面积(㎡)</td>
<td>占地面积(㎡)</td>
<td>分摊土地面积(㎡)</td>
<td>附记</td>
</tr>
<tr v-for="(item,i) in Data.list" :key="i">
<td @click="delRow(i)">-</td>
<td><input type="text" class="formInput" v-model="item.jgzwbh"/></td>
<td><input type="number" class="formInput" v-model="item.jgzsl" @keydown="oninput"/></td>
<td><input type="number" class="formInput" v-model.number="item.jgzmj" @keydown="oninput"/></td>
<td><input type="number" class="formInput" v-model.number="item.zdmj" @keydown="oninput"/></td>
<td><input type="number" class="formInput" v-model.number="item.fttdmj" @keydown="oninput"/></td>
<td><input type="text" class="formInput" v-model="item.fj" @keydown="oninput"/></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>
</div>
</template>
<script>
export default {
name:"",
components:{},
props:{},
data(){
return {
}
},
created(){},
mounted(){},
methods:{},
computed: {},
watch: {},
}
import {saveYzgy, queryYzgy} from './../../../api/zrz'
import {Message} from 'element-ui'
export default {
name: "",
data() {
return {
tdzl: '', // 土地坐落 继承获取
zdmj: '', // 宗地面积 继承获取
zddm: '',
Data: {
glbsm: '', // 宗地标识码
qlr: '业主共有', //权利人
list: [{
jgzwbh: '', // 建(构)筑物编号
jgzsl: '', // 建筑物数量
jgzmj: '', // 建构筑物面积
zdmj: '', //占地面积
fttdmj: '', //分摊土地面积
fj: ''
}]
}
}
},
methods: {
getData(id) {
queryYzgy(id).then(res => {
console.log(res)
if (res.result != null) {
this.Data = res.result
}
})
},
save() {
console.log(this.Data);
saveYzgy(this.Data).then(res => {
console.log(res)
if (res.success) {
Message.success("新增成功")
} else {
Message.error(res.message)
}
})
},
oninput(e) {
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
},
addRow() {
this.Data.list.push({
jgzwbh: '', // 建(构)筑物编号
jgzsl: '', // 建筑物数量
jgzmj: '', // 建构筑物面积
zdmj: '', //占地面积
fttdmj: '', //分摊土地面积
fj: ''
})
},
delRow(index) {
this.Data.list.splice(index, 1)
}
},
computed: {},
created() {
console.log("create init...")
},
mounted() {
console.log("mounted init...")
this.Data.glbsm = this.$store.state.zrzbsm
this.zddm = this.$store.state.zddm
this.getData(this.Data.glbsm)
},
watch: {
"$store.state.zdbsm": function (bsm) {
this.Data.glbsm = bsm
},
"$store.state.zddm": function (zddm) {
this.zddm = zddm
}
}
}
</script>
<style scoped lang="less">
</style>
\ No newline at end of file
<style scoped lang="less">
.main {
box-sizing: border-box;
padding: 18px;
height: auto;
width: 80%;
}
table {
margin-top: 10px;
background-color: #fff;
font-size: 14px;
width: 100%;
}
td {
text-align: center;
height: 36px;
min-width: 50px;
}
table .formInput {
margin: 0;
height: 36px;
outline: none;
border: none;
color: #606764;
overflow: visible;
text-align: center;
cursor: text;
}
.pers {
text-align: center;
margin-top: 10px;
}
.pers .el-button {
width: 150px;
}
.dzwsl {
width: 200px;
}
</style>
......