7bb7dfcb by weimo934

feat(mjft):修改面积分摊字段

1 parent ba89d9b6
1 import request from '@/plugin/axios'
2
3 /**
4 * 保存面积分摊表
5 * @param data
6 * @constructor
7 */
8 export function savemjft(data) {
9 return request({
10 url: '/zd/qjGygyzdmjft/insertQjGygyzdmjft',
11 method: 'post',
12 data: data,
13 })
14 }
...@@ -104,7 +104,10 @@ export default { ...@@ -104,7 +104,10 @@ export default {
104 { 104 {
105 path:'/zd', 105 path:'/zd',
106 name:'宗地' 106 name:'宗地'
107 }, 107 },{
108 path:'/mjft',
109 name:'面积分摊'
110 }
108 ], 111 ],
109 // 上导航选中id 112 // 上导航选中id
110 indId: undefined, 113 indId: undefined,
......
...@@ -2,18 +2,18 @@ ...@@ -2,18 +2,18 @@
2 <div class="main"> 2 <div class="main">
3 <table border="1"> 3 <table border="1">
4 <tr> 4 <tr>
5 <td colspan="2">土地面积</td> 5 <td colspan="2">土地坐落</td>
6 <td colspan="3"><input type="text" class="formInput" v-model="mjftData.tdmj"/></td> 6 <td colspan="3"><input type="number" class="formInput" v-model.number="mjftData.tdzl" disabled/></td>
7 </tr> 7 </tr>
8 <tr> 8 <tr>
9 <td colspan="2">宗地代码</td> 9 <td colspan="2">宗地代码</td>
10 <td colspan="3"><input type="text" class="formInput" v-model="mjftData.zdbsm "/></td> 10 <td colspan="3"><input type="text" class="formInput" v-model="mjftData.zdbsm " disabled/></td>
11 </tr> 11 </tr>
12 <tr> 12 <tr>
13 <td colspan="2">宗地面积(㎡)</td> 13 <td colspan="2">宗地面积(㎡)</td>
14 <td><input type="text" class="formInput" v-model="mjftData.zjmj"/></td> 14 <td><input type="number" class="formInput" v-model.number="mjftData.zjmj" disabled/></td>
15 <td>定着物数量</td> 15 <td>定着物数量</td>
16 <td><input type="text" class="formInput" v-model="mjftData.dzwsl"/></td> 16 <td>{{dzwdsl}}</td>
17 </tr> 17 </tr>
18 <tr> 18 <tr>
19 <td colspan="2">备注</td> 19 <td colspan="2">备注</td>
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
28 <td>独有独用土地面积(㎡)</td> 28 <td>独有独用土地面积(㎡)</td>
29 <td>分摊土地面积(㎡)</td> 29 <td>分摊土地面积(㎡)</td>
30 </tr> 30 </tr>
31 <tr v-for="(item,i) in mjftData.addQjZdftdzwRequestList"> 31 <tr v-for="(item,i) in mjftData.addQjZdftdzwRequestList" :key="i">
32 <td @click="delRow(i)">-</td> 32 <td @click="delRow(i)">-</td>
33 <td><input type="text" class="formInput" v-model="item.dzwdm"/></td> 33 <td><input type="text" class="formInput" v-model="item.dzwdm"/></td>
34 <td><input type="number" class="formInput" v-model="item.tdsyqsyqmj"/></td> 34 <td><input type="number" class="formInput" v-model.number="item.tdsyqsyqmj"/></td>
35 <td><input type="text" class="formInput" v-model="item.dydytdmj"/></td> 35 <td><input type="number" class="formInput" v-model.number="item.dydytdmj"/></td>
36 <td><input type="text" class="formInput" v-model="item.fttdmj"/></td> 36 <td><input type="number" class="formInput" v-model.number="item.fttdmj"/></td>
37 </tr> 37 </tr>
38 <tr> 38 <tr>
39 <td></td> 39 <td></td>
...@@ -43,38 +43,50 @@ ...@@ -43,38 +43,50 @@
43 <td>{{sumFttdmj}}</td> 43 <td>{{sumFttdmj}}</td>
44 </tr> 44 </tr>
45 </table> 45 </table>
46 <div class="pers">
47 <el-button @click="save" type="primary">保存</el-button>
48 </div>
46 </div> 49 </div>
47 </template> 50 </template>
48 51
49 <script> 52 <script>
53 import {savemjft} from '../../../api/basic'
54
50 export default { 55 export default {
51 name: "index", 56 name: "index",
52 data() { 57 data() {
53 return { 58 return {
54 mjftData: { 59 mjftData: {
55 zdbsm: '', 60 zdbsm: '123', // 宗地标识码 继承获取
56 tdsyqsyqmjhj: '', 61 tdsyqsyqmjhj: '',// 土地所有权/使用权面积合计
57 fttdmjhj: '', 62 fttdmjhj: '', // 分摊土地面积合计
58 dzwdys: '', 63 dzwdys: '', // 表示同一宗地内所有的定着物单元数
59 dydytdmjhj: '', 64 dydytdmjhj: '', // 根据该宗地下共有/共用定着物量自动计算。 ,
60 bz: '', 65 bz: '', // 备注
61 tdmj: '', 66 tdzl: '', // 土地坐落 继承获取
62 zjmj: '', 67 zdmj: '', // 宗地面积 继承获取
63 dzwsl: '',
64 addQjZdftdzwRequestList: [ 68 addQjZdftdzwRequestList: [
65 { 69 {
66 dydytdmj: '', 70 dydytdmj: '', // 独有独用土地面积
67 dzwdm: '', 71 dzwdm: '', // 定着物代码
68 fttdmj: '', 72 fttdmj: '', // 分摊土地面积
69 gygyzdmjftbsm: '', 73 gygyzdmjftbsm: '',// 共有公用面积分摊标识码 ,
70 tdsyqsyqmj: '' 74 tdsyqsyqmj: '' // 土地所有权/使用权面积
71 } 75 }
72 ] 76 ]
73 } 77 }
74 } 78 }
75 }, 79 },
76 created: {}, 80
77 methods: { 81 methods: {
82 save() {
83 console.log(this.mjftData)
84 savemjft(this.mjftData).then(res => {
85 console.log(res)
86 }).catch(error => {
87 console.log(error)
88 })
89 },
78 addRow() { 90 addRow() {
79 this.mjftData.addQjZdftdzwRequestList.push({ 91 this.mjftData.addQjZdftdzwRequestList.push({
80 dydytdmj: '', 92 dydytdmj: '',
...@@ -90,6 +102,7 @@ ...@@ -90,6 +102,7 @@
90 }, 102 },
91 computed: { 103 computed: {
92 sumTdsyqsyqmj: function () { 104 sumTdsyqsyqmj: function () {
105 let self = this;
93 let sum = 0; 106 let sum = 0;
94 let data = this.mjftData.addQjZdftdzwRequestList; 107 let data = this.mjftData.addQjZdftdzwRequestList;
95 for (let i = 0; i < data.length; i++) { 108 for (let i = 0; i < data.length; i++) {
...@@ -98,9 +111,12 @@ ...@@ -98,9 +111,12 @@
98 } 111 }
99 sum += parseFloat(data[i].tdsyqsyqmj) 112 sum += parseFloat(data[i].tdsyqsyqmj)
100 } 113 }
101 return isNaN(sum) ? '' : sum; 114 let num = isNaN(sum) ? '' : sum;
115 self.mjftData.tdsyqsyqmjhj = num;
116 return num;
102 }, 117 },
103 sumDydytdmj: function () { 118 sumDydytdmj: function () {
119 let self = this;
104 let sum = 0; 120 let sum = 0;
105 let data = this.mjftData.addQjZdftdzwRequestList; 121 let data = this.mjftData.addQjZdftdzwRequestList;
106 for (let i = 0; i < data.length; i++) { 122 for (let i = 0; i < data.length; i++) {
...@@ -109,9 +125,12 @@ ...@@ -109,9 +125,12 @@
109 } 125 }
110 sum += parseFloat(data[i].dydytdmj) 126 sum += parseFloat(data[i].dydytdmj)
111 } 127 }
112 return isNaN(sum) ? '' : sum; 128 let num = isNaN(sum) ? '' : sum;
129 self.mjftData.dydytdmjhj = num;
130 return num;
113 }, 131 },
114 sumFttdmj: function () { 132 sumFttdmj: function () {
133 let self = this;
115 let sum = 0; 134 let sum = 0;
116 let data = this.mjftData.addQjZdftdzwRequestList; 135 let data = this.mjftData.addQjZdftdzwRequestList;
117 for (let i = 0; i < data.length; i++) { 136 for (let i = 0; i < data.length; i++) {
...@@ -120,11 +139,22 @@ ...@@ -120,11 +139,22 @@
120 } 139 }
121 sum += parseFloat(data[i].fttdmj) 140 sum += parseFloat(data[i].fttdmj)
122 } 141 }
123 return isNaN(sum) ? '' : sum; 142 let num = isNaN(sum) ? '' : sum;
143 self.mjftData.fttdmjhj = num;
144 return num;
145 },
146 dzwdsl: function () {
147 let self = this
148 let num = this.mjftData.addQjZdftdzwRequestList.length
149 self.mjftData.dzwdys = num
150 return num;
124 } 151 }
125 }, 152 },
153 created() {
154 console.log("create init...")
155 },
126 mounted() { 156 mounted() {
127 157 console.log("mounted init...")
128 } 158 }
129 } 159 }
130 </script> 160 </script>
...@@ -160,5 +190,13 @@ ...@@ -160,5 +190,13 @@
160 cursor: text; 190 cursor: text;
161 } 191 }
162 192
193 .pers {
194 text-align: center;
195 margin-top: 10px;
196 }
197
198 .pers .el-button {
199 width: 150px;
200 }
163 201
164 </style> 202 </style>
......
...@@ -43,8 +43,8 @@ module.exports = { ...@@ -43,8 +43,8 @@ module.exports = {
43 // ] 43 // ]
44 }, 44 },
45 devServer: { 45 devServer: {
46 host: "0.0.0.0", 46 host: "127.0.0.1",
47 port: 8083, 47 port: 8006,
48 https: false, 48 https: false,
49 hotOnly: false, 49 hotOnly: false,
50 proxy: { 50 proxy: {
......