9db815d8 by 杨威
2 parents 058c15db 8ff68bac
......@@ -5,7 +5,7 @@ import request from '@/plugin/axios'
export function getSearchList(data) {
return request({
url: '/system/basiccommon/query',
method: 'get',
params : data,
method: 'post',
data : data,
})
}
\ No newline at end of file
......
......@@ -14,6 +14,18 @@ export function savemjft(data) {
}
/**
* 查询面积分摊表信息
*/
export function getMjftInfo(zdBsm) {
return request({
url:"/zd/qjGygyzdmjft/getQjGygyzdmjftDetailById",
method:"get",
params:{
zdBsm
}
})
}
/**
* 新增宗地基本信息
*/
export function insertQjZdjbxx(data) {
......
......@@ -247,8 +247,6 @@
methods: {
getRightTree(bsm) {
getTree(bsm).then(res => {
console.log("=========================================")
console.log(res)
if (res.success) {
this.pd=res.result
}
......
......@@ -181,7 +181,6 @@
})
},
save() {
console.log("保存....");
jzdsingleModify(this.jzdlist).then(res => {
console.log(res)
if (res.success) {
......@@ -230,7 +229,6 @@
},
batchExit() {
console.log("批量修改")
let flag = false;
for (let item of this.jzdlist) {
if (item.isCheck) {
......
......@@ -3,7 +3,7 @@
<table border="1">
<tr>
<td colspan="2">土地坐落</td>
<td colspan="3"><input type="text" class="formInput" v-model="mjftData.tdzl" disabled/></td>
<td colspan="3"><input type="text" class="formInput" v-model="tdzl" disabled/></td>
</tr>
<tr>
<td colspan="2">宗地代码</td>
......@@ -11,7 +11,7 @@
</tr>
<tr>
<td colspan="2">宗地面积(㎡)</td>
<td><input type="number" class="formInput" v-model.number="mjftData.zdmj" disabled/></td>
<td><input type="number" class="formInput" v-model.number="zdmj" disabled/></td>
<td>定着物数量</td>
<td class="dzwsl">{{dzwdsl}}</td>
</tr>
......@@ -28,7 +28,7 @@
<td>独有独用土地面积(㎡)</td>
<td>分摊土地面积(㎡)</td>
</tr>
<tr v-for="(item,i) in mjftData.addQjZdftdzwRequestList" :key="i">
<tr v-for="(item,i) in mjftData.list" :key="i">
<td @click="delRow(i)">-</td>
<td><input type="text" class="formInput" v-model="item.dzwdm"/></td>
<td><input type="number" class="formInput" v-model="item.tdsyqsyqmj" @keydown="oninput"/></td>
......@@ -50,23 +50,23 @@
</template>
<script>
import {savemjft} from '../../../api/zd'
import {getMjftInfo,savemjft} from '../../../api/zd'
import {Message} from 'element-ui'
export default {
name: "index",
data() {
return {
tdzl: '', // 土地坐落 继承获取
zdmj: '', // 宗地面积 继承获取
mjftData: {
zdbsm: '', // 宗地标识码 继承获取
tdsyqsyqmjhj: '',// 土地所有权/使用权面积合计
fttdmjhj: '', // 分摊土地面积合计
dzwdys: '', // 表示同一宗地内所有的定着物单元数
dydytdmjhj: '', // 根据该宗地下共有/共用定着物量自动计算。 ,
bz: '', // 备注
tdzl: '', // 土地坐落 继承获取
zdmj: '', // 宗地面积 继承获取
addQjZdftdzwRequestList: [
bz: '' , // 备注
list: [
{
dydytdmj: '', // 独有独用土地面积
dzwdm: '', // 定着物代码
......@@ -80,9 +80,16 @@
},
methods: {
getData(bsm){
getMjftInfo(bsm).then(res=>{
if (res.success){
this.mjftData=res.result
}
})
},
save() {
console.log(this.mjftData);
for (let val of this.mjftData.addQjZdftdzwRequestList) {
for (let val of this.mjftData.list) {
if (val.dzwdm == '') {
Message.error("定着物代码不能为空")
return
......@@ -93,6 +100,7 @@
console.log(res)
if (res.success) {
Message.success("保存成功")
this.getData(this.mjftData.zdbsm)
} else {
Message.error(res.message)
}
......@@ -104,7 +112,7 @@
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
},
addRow() {
this.mjftData.addQjZdftdzwRequestList.push({
this.mjftData.list.push({
dydytdmj: '',
dzwdm: '',
fttdmj: '',
......@@ -113,14 +121,14 @@
})
},
delRow(index) {
this.mjftData.addQjZdftdzwRequestList.splice(index, 1)
this.mjftData.list.splice(index, 1)
}
},
computed: {
sumTdsyqsyqmj: function () {
let self = this;
let sum = 0;
let data = this.mjftData.addQjZdftdzwRequestList;
let data = this.mjftData.list;
for (let i = 0; i < data.length; i++) {
if (isNaN(parseFloat(data[i].tdsyqsyqmj))) {
continue;
......@@ -134,7 +142,7 @@
sumDydytdmj: function () {
let self = this;
let sum = 0;
let data = this.mjftData.addQjZdftdzwRequestList;
let data = this.mjftData.list;
for (let i = 0; i < data.length; i++) {
if (isNaN(parseFloat(data[i].dydytdmj))) {
continue;
......@@ -148,7 +156,7 @@
sumFttdmj: function () {
let self = this;
let sum = 0;
let data = this.mjftData.addQjZdftdzwRequestList;
let data = this.mjftData.list;
for (let i = 0; i < data.length; i++) {
if (isNaN(parseFloat(data[i].fttdmj))) {
continue;
......@@ -161,7 +169,7 @@
},
dzwdsl: function () {
let self = this
let num = this.mjftData.addQjZdftdzwRequestList.length
let num = this.mjftData.list.length?this.mjftData.list.length:0
self.mjftData.dzwdys = num
return num;
}
......@@ -171,16 +179,19 @@
},
mounted() {
console.log("mounted init...")
if (this.mjftData.zdbsm){
this.getData()
}
},
watch: {
"$store.state.zdbsm": function (bsm) {
this.mjftData.zdbsm = bsm
},
"$store.state.zdmj": function (zdmj) {
this.mjftData.zdmj = zdmj
this.zdmj = zdmj
},
"$store.state.zdzl": function (tdzl) {
this.mjftData.tdzl = tdzl
this.tdzl = tdzl
},
}
}
......
......@@ -440,7 +440,7 @@
console.log(this.form)
},
generatorCode(){
getBdcdyh(this.form.zdbsm,"zrz")
getBdcdyh(this.form.zddm,"zrz")
.then((res)=>{
this.form.zrzh=res.result.substring(0,24);
this.form.bdcdyh=res.result;
......