205828b4 by renchao@pashanhoo.com

style:国有建设用地使用权自然幢多幢业务拆分

1 parent c6c016b1
1 <!--
2 * @Description:
3 * @Autor: renchao
4 * @LastEditTime: 2023-10-10 15:54:58
5 -->
6 <template>
7 <div class="from-clues">
8 <el-tabs type="card" v-model="activeName" @tab-click="handleTabClick" v-if="!isJump">
9 <el-tab-pane label="自然幢" name="zrz"></el-tab-pane>
10 <el-tab-pane label="多幢" name="dz" v-if="sqywInfo.djywbm !== 'B37100'"></el-tab-pane>
11 </el-tabs>
12 <div v-show="activeName == 'zrz'">
13 <div class="from-clues-header">
14 <el-form :model="queryzrzForm" ref="queryzrzForm" label-width="110px">
15 <el-row>
16 <el-col :span="7">
17 <el-form-item label="宗地代码">
18 <el-input placeholder="请输入宗地代码" v-model="queryzrzForm.zddm" clearable>
19 </el-input>
20 </el-form-item>
21 </el-col>
22 <el-col :span="7">
23 <el-form-item label="土地证号">
24 <el-input placeholder="请输入土地证号" v-model="queryzrzForm.bdcqzh" clearable>
25 </el-input>
26 </el-form-item>
27 </el-col>
28 <el-col :span="7">
29 <el-form-item label="土地坐落">
30 <el-input placeholder="请输入土地坐落" v-model="queryzrzForm.zl" clearable>
31 </el-input>
32 </el-form-item>
33 </el-col>
34 </el-row>
35 <el-row>
36 <el-col :span="7">
37 <el-form-item label="自然幢号">
38 <el-input placeholder="请输入自然幢号" v-model="queryzrzForm.zrzh" clearable>
39 </el-input>
40 </el-form-item>
41 </el-col>
42 <el-col :span="7">
43 <el-form-item label="项目名称">
44 <el-input placeholder="请输入项目名称" v-model="queryzrzForm.xmmc"></el-input>
45 </el-form-item>
46 </el-col>
47 <el-col :span="7">
48 <el-form-item label="建筑物名称">
49 <el-input placeholder="请输入建筑物名称" v-model="queryzrzForm.jzwmc" clearable>
50 </el-input>
51 </el-form-item>
52 </el-col>
53
54 <el-col :span="3" class="btnColRight">
55 <el-form-item>
56 <el-button type="primary" @click="handleSearch">查询</el-button>
57 <el-button type="primary" @click="resetForm(true)">重置</el-button>
58 </el-form-item>
59 </el-col>
60 </el-row>
61 </el-form>
62 </div>
63 <div class="from-clues-content loadingtext">
64 <lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300"
65 :current-page.sync="pageData.currentPage" :total="zrztableData.total" @size-change="handleSizeChange" @select="select"
66 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns"
67 :data="zrztableData.data">
68 </lb-table>
69 </div>
70 <div class="submit_button">
71 <el-button @click="$popupCacel">取消</el-button>
72 <el-button type="primary" plain @click="submitForm" :loading="loading">发起申请</el-button>
73 </div>
74 </div>
75 <div v-show="activeName == 'dz'">
76 <div class="from-clues-header">
77 <el-form :model="querydzForm" ref="querydzForm" label-width="110px">
78 <el-row>
79 <el-col :span="7">
80 <el-form-item label="宗地代码">
81 <el-input placeholder="请输入宗地代码" v-model="querydzForm.zddm" clearable>
82 </el-input>
83 </el-form-item>
84 </el-col>
85 <el-col :span="7">
86 <el-form-item label="坐落">
87 <el-input placeholder="请输入土地坐落" v-model="querydzForm.zl" clearable>
88 </el-input>
89 </el-form-item>
90 </el-col>
91 <el-col :span="10" class="btnColRight">
92 <el-form-item>
93 <!-- <el-button type="primary" @click="resetForm(true)">重置</el-button> -->
94 <el-button type="primary" @click="handleSearch">查询</el-button>
95 </el-form-item>
96 </el-col>
97 </el-row>
98
99 </el-form>
100 </div>
101 <div class="from-clues-content loadingtext">
102 <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="262"
103 :current-page.sync="pageData.currentPage" :total="dztableData.total" @size-change="handleSizeChange" @select="select"
104 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="dztableData.columns"
105 :data="dztableData.data">
106 </lb-table>
107 </div>
108 <div class="submit_button">
109 <el-button @click="$popupCacel">取消</el-button>
110 <el-button type="primary" plain @click="submitForm" :loading="loading">发起申请</el-button>
111 </div>
112 </div>
113 </div>
114 </template>
115 <script>
116 import Vue from 'vue'
117 import store from '@/store/index.js'
118 import table from "@/utils/mixin/table";
119 //国有建设用地使用权/房屋使用权
120 import { ywPopupDialog } from "@/utils/popup.js";
121 import { datas, sendThis } from "../javascript/fwsyq.js";
122 import jump from "@/views/ywbl/ywsq/components/mixin/jump";
123 import { selectOtherH, selectZrz, selectDz } from "@/api/ywsq.js";
124 import { startBusinessFlow, choiceBdcdy } from "@/api/workFlow.js";
125 export default {
126 mixins: [table, jump],
127 props: {
128 isJump: { type: Boolean, default: false },
129 sqywInfo: { type: Object, default: () => { } },
130 },
131 data () {
132 return {
133 loading: false,
134 activeName: 'zrz',
135 queryzrzForm: {
136 qllx: '',
137 bdcdyh: '',
138 ywh: '',
139 bdcqzh: ''
140 },
141 querydzForm: {
142 qllx: '',
143 bdcdyh: '',
144 ywh: '',
145 bdcqzh: ''
146 },
147 zrztableData: {
148 total: 0,
149 columns: datas.zrzcolumns(),
150 data: [],
151 },
152 dztableData: {
153 total: 0,
154 columns: datas.dzcolumns(),
155 data: [],
156 },
157 bdcdysz: [],
158 };
159 },
160 mounted () {
161 sendThis(this)
162 },
163 methods: {
164 /**
165 * @description: queryClick
166 * @author: renchao
167 */
168 queryClick () {
169 this.$startLoading();
170 if (!this.isJump) {
171 //从业务办理进入
172 if (this.activeName == "zrz") {
173 this.queryzrzForm.sqywbm = this.sqywInfo.djywbm;
174 this.queryzrzForm.fwfl = this.activeName;
175 selectZrz({ ...this.queryzrzForm, ...this.pageData }).then((res) => {
176 this.$endLoading();
177 if (res.code === 200) {
178 this.zrztableData.total = res.result.total;
179 this.zrztableData.data = res.result.records;
180 }
181 });
182 } else {
183 this.querydzForm.sqywbm = this.sqywInfo.djywbm;
184 this.querydzForm.fwfl = this.activeName;
185 selectDz({ ...this.querydzForm, ...this.pageData }).then((res) => {
186 this.$endLoading();
187 if (res.code === 200) {
188 this.dztableData.total = res.result.total;
189 this.dztableData.data = res.result.records;
190 }
191 })
192 }
193
194 } else {
195 //从办理框架选择不动产单元进入
196 //房屋首次办理选择不动产需找出对应自然幢下未选择的户
197 this.queryzrzForm.bsmSlsq = Vue.prototype.$currentRoute.query.bsmSlsq;
198 selectOtherH({ ...this.queryzrzForm, ...this.pageData }).then((res) => {
199 this.$endLoading();
200 if (res.code === 200) {
201 let { total, records } = res.result;
202 this.zrztableData.total = total;
203 this.zrztableData.data = records;
204 }
205 })
206 }
207 },
208 /**
209 * @description: handleTabClick
210 * @author: renchao
211 */
212 handleTabClick () {
213 this.bdcdysz = [],
214 this.pageData.currentPage = 1;
215 this.queryClick();
216 },
217 /**
218 * @description: submitForm
219 * @author: renchao
220 */
221 submitForm () {
222 if (this.bdcdysz.length == 0) {
223 this.$message.error("请至少选择一条数据");
224 return;
225 }
226 if (!this.isJump) {
227 this.loading = true
228 startBusinessFlow({
229 bsmSqyw: this.sqywInfo.bsmSqyw,
230 //sjlx: 'zrz',
231 sjlx: this.activeName,
232 bdcdysz: this.bdcdysz,
233 }).then((res) => {
234 this.loading = false
235 if (res.code == 200) {
236 this.$message({
237 showClose: true,
238 message: '发起申请成功',
239 type: 'success'
240 })
241 if (!this.isJump) {
242 this.jump(res.result, this.sqywInfo.djywbm);
243 } else {
244 store.dispatch('user/refreshPage', true);
245 }
246 this.$popupCacel()
247 } else {
248 if (res.result && res.result.length > 0) {
249 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
250 } else {
251 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
252 }
253 }
254 }).catch(() => {
255 this.loading = false
256 })
257 } else {
258 this.loading = true
259 choiceBdcdy({
260 bsmSlsq: Vue.prototype.$currentRoute.query.bsmSlsq,
261 bdcdysz: this.bdcdysz
262 }).then(res => {
263 this.loading = false
264 if (res.code == 200) {
265 this.$message({
266 showClose: true,
267 message: '发起申请成功',
268 type: 'success'
269 })
270 store.dispatch('user/refreshPage', true);
271 this.$popupCacel()
272 } else {
273 if (res.result && res.result.length > 0) {
274 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
275 } else {
276 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
277 }
278 }
279 }).catch(() => {
280 this.loading = false
281 })
282 }
283 },
284 /**
285 * @description: handleSelectionChange
286 * @param {*} val
287 * @author: renchao
288 */
289 handleSelectionChange (val) {
290 if (this.sqywInfo.sqywdylx == "1") {
291 if (val.length > 1) {
292 this.bdcdysz = [...val[val.length - 1]];
293 } else {
294 this.bdcdysz = val;
295 }
296 } else {
297 this.bdcdysz = val;
298 }
299 },
300 /**
301 * @description: handleLpbClick
302 * @param {*} item
303 * @author: renchao
304 */
305 handleLpbClick (item) {
306 ywPopupDialog('楼盘表', 'lpb/index', {
307 bsm: item.bsm,
308 bsmSqyw: this.sqywInfo.bsmSqyw,
309 onlyShow: false,
310 scyclx: 1
311 }, '85%', true, false)
312 },
313 /**
314 * @description: select
315 * @param {*} selection
316 * @param {*} row
317 * @author: renchao
318 */
319 select (selection, row) {
320 if (this.sqywInfo.sqywdylx == "1") {
321 // 清除 所有勾选项
322 this.$refs.table.clearSelection()
323 // 当表格数据都没有被勾选的时候 就返回
324 // 主要用于将当前勾选的表格状态清除
325 if (selection.length == 0) return
326 this.$refs.table.toggleRowSelection(row, true);
327 }
328 },
329 /**
330 * @description: handleRowClick
331 * @param {*} row
332 * @author: renchao
333 */
334 handleRowClick (row) {
335 // 自然幢单选,多幢多选
336 let refs = 'table1';
337 if (this.activeName == 'dz') {
338 refs = 'table';
339 } else {
340 this.sqywInfo.djywbm !== 'B37100' && this.$refs[refs].clearSelection()
341 }
342 const bdcdysz = this.bdcdysz
343 if (bdcdysz.length > 0) {
344 bdcdysz.forEach(item => {
345 // 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
346 if (item == row) {
347 this.$nextTick(() => { this.$refs[refs].toggleRowSelection(row, false); })
348 }
349 // 不然就让当前的一行勾选
350 else {
351 this.$refs[refs].toggleRowSelection(row, true);
352 }
353 })
354 }
355 else {
356 this.$refs[refs].toggleRowSelection(row, true);
357 }
358 },
359 /**
360 * @description: openBook
361 * @param {*} row
362 * @author: miaofang
363 */
364 openBook (row) {
365 var param = {
366 bdcdyid: row.bdcdyid,
367 qllx: row.qllx,
368 bdcdyh: row.bdcdyh,
369 bsmQlxx: row.bsmQlxx,
370 };
371 this.$popup("登记簿详情", "registerBook/djbFrame", {
372 formData: param
373 })
374 },
375 dzlist (row) {
376 var param = {
377 bdcdyid: row.bdcdyid,
378 qllx: row.qllx,
379 bdcdyh: row.bdcdyh,
380 bsmQlxx: row.bsmQlxx,
381 };
382 this.$popup("自然幢列表", "registerBook/dzlist", {
383 formData: param
384 })
385 },
386 }
387 }
388 </script>
389 <style scoped lang="scss">
390 @import "~@/styles/mixin.scss";
391 @import "~@/styles/public.scss";
392 </style>
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-10-10 15:54:58 4 * @LastEditTime: 2023-10-10 16:32:22
5 --> 5 -->
6 <template> 6 <template>
7 <div class="from-clues"> 7 <div class="from-clues">
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
62 </div> 62 </div>
63 <div class="from-clues-content loadingtext"> 63 <div class="from-clues-content loadingtext">
64 <lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" 64 <lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300"
65 :current-page.sync="pageData.currentPage" :total="zrztableData.total" @size-change="handleSizeChange" @select="select" 65 :current-page.sync="pageData.currentPage" :total="zrztableData.total"
66 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" 66 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns"
67 :data="zrztableData.data"> 67 :data="zrztableData.data">
68 </lb-table> 68 </lb-table>
...@@ -90,7 +90,6 @@ ...@@ -90,7 +90,6 @@
90 </el-col> 90 </el-col>
91 <el-col :span="10" class="btnColRight"> 91 <el-col :span="10" class="btnColRight">
92 <el-form-item> 92 <el-form-item>
93 <!-- <el-button type="primary" @click="resetForm(true)">重置</el-button> -->
94 <el-button type="primary" @click="handleSearch">查询</el-button> 93 <el-button type="primary" @click="handleSearch">查询</el-button>
95 </el-form-item> 94 </el-form-item>
96 </el-col> 95 </el-col>
...@@ -100,7 +99,7 @@ ...@@ -100,7 +99,7 @@
100 </div> 99 </div>
101 <div class="from-clues-content loadingtext"> 100 <div class="from-clues-content loadingtext">
102 <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="262" 101 <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="262"
103 :current-page.sync="pageData.currentPage" :total="dztableData.total" @size-change="handleSizeChange" @select="select" 102 :current-page.sync="pageData.currentPage" :total="dztableData.total" @size-change="handleSizeChange"
104 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="dztableData.columns" 103 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="dztableData.columns"
105 :data="dztableData.data"> 104 :data="dztableData.data">
106 </lb-table> 105 </lb-table>
...@@ -132,6 +131,7 @@ ...@@ -132,6 +131,7 @@
132 return { 131 return {
133 loading: false, 132 loading: false,
134 activeName: 'zrz', 133 activeName: 'zrz',
134 radioVal: '',
135 queryzrzForm: { 135 queryzrzForm: {
136 qllx: '', 136 qllx: '',
137 bdcdyh: '', 137 bdcdyh: '',
...@@ -159,6 +159,28 @@ ...@@ -159,6 +159,28 @@
159 }, 159 },
160 mounted () { 160 mounted () {
161 sendThis(this) 161 sendThis(this)
162 if (this.sqywInfo.djywbm == 'B37100') {
163 this.zrztableData.columns =
164 [{
165 type: 'selection',
166 label: '全选',
167 width: '50'
168 }].concat(datas.zrzcolumns())
169 } else {
170 this.zrztableData.columns = [{
171 label: '选择',
172 width: '50px',
173 render: (h, scope) => {
174 return (
175 <div class="orgColumn">
176 <el-radio onChange={() => { this.handleZrzChange(scope.row) }} v-model={this.radioVal} label={scope.row.bdcdyid}>
177 &ensp;
178 </el-radio>
179 </div>
180 )
181 }
182 }].concat(datas.zrzcolumns())
183 }
162 }, 184 },
163 methods: { 185 methods: {
164 /** 186 /**
...@@ -287,15 +309,7 @@ ...@@ -287,15 +309,7 @@
287 * @author: renchao 309 * @author: renchao
288 */ 310 */
289 handleSelectionChange (val) { 311 handleSelectionChange (val) {
290 if (this.sqywInfo.sqywdylx == "1") {
291 if (val.length > 1) {
292 this.bdcdysz = [...val[val.length - 1]];
293 } else {
294 this.bdcdysz = val;
295 }
296 } else {
297 this.bdcdysz = val; 312 this.bdcdysz = val;
298 }
299 }, 313 },
300 /** 314 /**
301 * @description: handleLpbClick 315 * @description: handleLpbClick
...@@ -310,21 +324,10 @@ ...@@ -310,21 +324,10 @@
310 scyclx: 1 324 scyclx: 1
311 }, '85%', true, false) 325 }, '85%', true, false)
312 }, 326 },
313 /** 327 // 自然幢单选
314 * @description: select 328 handleZrzChange () {
315 * @param {*} selection 329 let arr = this.zrztableData.data.filter(item => item.bdcdyid == this.radioVal)
316 * @param {*} row 330 this.bdcdysz = arr
317 * @author: renchao
318 */
319 select (selection, row) {
320 if (this.sqywInfo.sqywdylx == "1") {
321 // 清除 所有勾选项
322 this.$refs.table.clearSelection()
323 // 当表格数据都没有被勾选的时候 就返回
324 // 主要用于将当前勾选的表格状态清除
325 if (selection.length == 0) return
326 this.$refs.table.toggleRowSelection(row, true);
327 }
328 }, 331 },
329 /** 332 /**
330 * @description: handleRowClick 333 * @description: handleRowClick
...@@ -333,22 +336,26 @@ ...@@ -333,22 +336,26 @@
333 */ 336 */
334 handleRowClick (row) { 337 handleRowClick (row) {
335 // 自然幢单选,多幢多选 338 // 自然幢单选,多幢多选
339 let that = this
336 let refs = 'table1'; 340 let refs = 'table1';
337 if (this.activeName == 'dz') { 341 if (this.activeName == 'dz') {
338 refs = 'table'; 342 refs = 'table';
339 } else { 343 } else {
340 this.sqywInfo.djywbm !== 'B37100' && this.$refs[refs].clearSelection() 344 if (this.sqywInfo.djywbm !== 'B37100') {
345 that.bdcdysz = [row]
346 that.radioVal = row.bdcdyid
341 } 347 }
342 const bdcdysz = this.bdcdysz 348 }
349 const bdcdysz = that.bdcdysz
343 if (bdcdysz.length > 0) { 350 if (bdcdysz.length > 0) {
344 bdcdysz.forEach(item => { 351 bdcdysz.forEach(item => {
345 // 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中 352 // 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
346 if (item == row) { 353 if (item == row) {
347 this.$nextTick(() => { this.$refs[refs].toggleRowSelection(row, false); }) 354 that.$nextTick(() => { that.$refs[refs].toggleRowSelection(row, false); })
348 } 355 }
349 // 不然就让当前的一行勾选 356 // 不然就让当前的一行勾选
350 else { 357 else {
351 this.$refs[refs].toggleRowSelection(row, true); 358 that.$refs[refs].toggleRowSelection(row, true);
352 } 359 }
353 }) 360 })
354 } 361 }
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-08-29 13:05:13 4 * @LastEditTime: 2023-10-10 16:32:09
5 */ 5 */
6 import filter from '@/utils/filter.js' 6 import filter from '@/utils/filter.js'
7 let vm = null 7 let vm = null
...@@ -16,12 +16,6 @@ class data extends filter { ...@@ -16,12 +16,6 @@ class data extends filter {
16 zrzcolumns () { 16 zrzcolumns () {
17 return [ 17 return [
18 { 18 {
19 type: 'selection',
20 label: '全选',
21 width: '50',
22 selectable: this.selected
23 },
24 {
25 label: '序号', 19 label: '序号',
26 type: 'index', 20 type: 'index',
27 width: '50', 21 width: '50',
...@@ -152,8 +146,7 @@ class data extends filter { ...@@ -152,8 +146,7 @@ class data extends filter {
152 { 146 {
153 type: 'selection', 147 type: 'selection',
154 label: '全选', 148 label: '全选',
155 width: '50', 149 width: '50'
156 selectable: this.selected
157 }, 150 },
158 { 151 {
159 label: '序号', 152 label: '序号',
......