b8065e82 by renchao@pashanhoo.com

Merge branch 'dev'

2 parents 06678ebc 5de6673c
1 <!--
2 * @Description:
3 * @Autor: renchao
4 * @LastEditTime: 2023-10-26 09:20:49
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"
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="handleSearch">查询</el-button>
94 </el-form-item>
95 </el-col>
96 </el-row>
97
98 </el-form>
99 </div>
100 <div class="from-clues-content loadingtext">
101 <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="262"
102 :current-page.sync="pageData.currentPage" :total="dztableData.total" @size-change="handleSizeChange"
103 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="dztableData.columns"
104 :data="dztableData.data">
105 </lb-table>
106 </div>
107 <div class="submit_button">
108 <el-button @click="$popupCacel">取消</el-button>
109 <el-button type="primary" plain @click="submitForm" :loading="loading">发起申请</el-button>
110 </div>
111 </div>
112 </div>
113 </template>
114 <script>
115 import Vue from 'vue'
116 import store from '@/store/index.js'
117 import table from "@/utils/mixin/table";
118 //国有建设用地使用权/房屋使用权
119 import { ywPopupDialog } from "@/utils/popup.js";
120 import { datas, sendThis } from "../javascript/fwsyq.js";
121 import jump from "@/views/ywbl/ywsq/components/mixin/jump";
122 import { selectOtherH, selectZrz, selectDz } from "@/api/ywsq.js";
123 import { startBusinessFlow, choiceBdcdy } from "@/api/workFlow.js";
124 export default {
125 mixins: [table, jump],
126 props: {
127 isJump: { type: Boolean, default: false },
128 sqywInfo: { type: Object, default: () => { } },
129 },
130 data () {
131 return {
132 loading: false,
133 activeName: 'dz',
134 radioVal: '',
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 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 }
184 },
185 methods: {
186 /**
187 * @description: queryClick
188 * @author: renchao
189 */
190 queryClick () {
191 this.$startLoading();
192 if (!this.isJump) {
193 //从业务办理进入
194 if (this.activeName == "zrz") {
195 this.queryzrzForm.sqywbm = this.sqywInfo.djywbm;
196 this.queryzrzForm.fwfl = this.activeName;
197 selectZrz({ ...this.queryzrzForm, ...this.pageData }).then((res) => {
198 this.$endLoading();
199 if (res.code === 200) {
200 this.zrztableData.total = res.result.total;
201 this.zrztableData.data = res.result.records;
202 }
203 });
204 } else {
205 this.querydzForm.sqywbm = this.sqywInfo.djywbm;
206 this.querydzForm.fwfl = this.activeName;
207 selectDz({ ...this.querydzForm, ...this.pageData }).then((res) => {
208 this.$endLoading();
209 if (res.code === 200) {
210 this.dztableData.total = res.result.total;
211 this.dztableData.data = res.result.records;
212 }
213 })
214 }
215
216 } else {
217 //从办理框架选择不动产单元进入
218 //房屋首次办理选择不动产需找出对应自然幢下未选择的户
219 this.queryzrzForm.bsmSlsq = Vue.prototype.$currentRoute.query.bsmSlsq;
220 selectOtherH({ ...this.queryzrzForm, ...this.pageData }).then((res) => {
221 this.$endLoading();
222 if (res.code === 200) {
223 let { total, records } = res.result;
224 this.zrztableData.total = total;
225 this.zrztableData.data = records;
226 }
227 })
228 }
229 },
230 /**
231 * @description: handleTabClick
232 * @author: renchao
233 */
234 handleTabClick () {
235 this.bdcdysz = [],
236 this.pageData.currentPage = 1;
237 this.queryClick();
238 },
239 /**
240 * @description: submitForm
241 * @author: renchao
242 */
243 submitForm () {
244 if (this.bdcdysz.length == 0) {
245 this.$message.error("请至少选择一条数据");
246 return;
247 }
248 if (!this.isJump) {
249 this.loading = true
250 startBusinessFlow({
251 bsmSqyw: this.sqywInfo.bsmSqyw,
252 //sjlx: 'zrz',
253 sjlx: this.activeName,
254 bdcdysz: this.bdcdysz,
255 }).then((res) => {
256 this.loading = false
257 if (res.code == 200) {
258 this.$message({
259 showClose: true,
260 message: '发起申请成功',
261 type: 'success'
262 })
263 if (!this.isJump) {
264 this.jump(res.result, this.sqywInfo.djywbm);
265 } else {
266 store.dispatch('user/refreshPage', true);
267 }
268 this.$popupCacel()
269 } else {
270 if (res.result && res.result.length > 0) {
271 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
272 } else {
273 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
274 }
275 }
276 }).catch(() => {
277 this.loading = false
278 })
279 } else {
280 this.loading = true
281 choiceBdcdy({
282 bsmSlsq: Vue.prototype.$currentRoute.query.bsmSlsq,
283 bdcdysz: this.bdcdysz
284 }).then(res => {
285 this.loading = false
286 if (res.code == 200) {
287 this.$message({
288 showClose: true,
289 message: '发起申请成功',
290 type: 'success'
291 })
292 store.dispatch('user/refreshPage', true);
293 this.$popupCacel()
294 } else {
295 if (res.result && res.result.length > 0) {
296 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
297 } else {
298 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
299 }
300 }
301 }).catch(() => {
302 this.loading = false
303 })
304 }
305 },
306 /**
307 * @description: handleSelectionChange
308 * @param {*} val
309 * @author: renchao
310 */
311 handleSelectionChange (val) {
312 this.bdcdysz = val;
313 },
314 /**
315 * @description: handleLpbClick
316 * @param {*} item
317 * @author: renchao
318 */
319 handleLpbClick (item) {
320 ywPopupDialog('楼盘表', 'lpb/index', {
321 bsm: item.bsm,
322 bsmSqyw: this.sqywInfo.bsmSqyw,
323 onlyShow: false,
324 scyclx: 1
325 }, '85%', true, false)
326 },
327 // 自然幢单选
328 handleZrzChange () {
329 let arr = this.zrztableData.data.filter(item => item.bdcdyid == this.radioVal)
330 this.bdcdysz = arr
331 },
332 /**
333 * @description: handleRowClick
334 * @param {*} row
335 * @author: renchao
336 */
337 handleRowClick (row) {
338 // 自然幢单选,多幢多选
339 let that = this
340 let refs = 'table1';
341 if (this.activeName == 'dz') {
342 refs = 'table';
343 } else {
344 if (this.sqywInfo.djywbm !== 'B37100') {
345 that.bdcdysz = [row]
346 that.radioVal = row.bdcdyid
347 }
348 }
349 const bdcdysz = that.bdcdysz
350 if (bdcdysz.length > 0) {
351 bdcdysz.forEach(item => {
352 // 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
353 if (item == row) {
354 that.$nextTick(() => { that.$refs[refs].toggleRowSelection(row, false); })
355 }
356 // 不然就让当前的一行勾选
357 else {
358 that.$refs[refs].toggleRowSelection(row, true);
359 }
360 })
361 }
362 else {
363 this.$refs[refs].toggleRowSelection(row, true);
364 }
365 },
366 /**
367 * @description: openBook
368 * @param {*} row
369 * @author: miaofang
370 */
371 openBook (row) {
372 var param = {
373 bdcdyid: row.bdcdyid,
374 qllx: row.qllx,
375 bdcdyh: row.bdcdyh,
376 bsmQlxx: row.bsmQlxx,
377 };
378 this.$popup("登记簿详情", "registerBook/djbFrame", {
379 formData: param
380 })
381 },
382 dzlist (row) {
383 var param = {
384 bdcdyid: row.bdcdyid,
385 qllx: row.qllx,
386 bdcdyh: row.bdcdyh,
387 bsmQlxx: row.bsmQlxx,
388 };
389 this.$popup("自然幢列表", "registerBook/dzlist", {
390 formData: param
391 })
392 },
393 }
394 }
395 </script>
396 <style scoped lang="scss">
397 @import "~@/styles/mixin.scss";
398 @import "~@/styles/public.scss";
399 </style>
...@@ -40,8 +40,10 @@ export function queueDjywmc (djywbm, djqxbm) { ...@@ -40,8 +40,10 @@ export function queueDjywmc (djywbm, djqxbm) {
40 case "A06100": // 宅基地使用权/房屋所有权 || 首次登记 40 case "A06100": // 宅基地使用权/房屋所有权 || 首次登记
41 vm = "zjdfwsyq"; 41 vm = "zjdfwsyq";
42 break; 42 break;
43 case "A04100"://国有建设用地使用权/房屋所有权(首次登记)
44 case "A08100": // 集体建设用地使用权/房屋所有权 || 首次登记 43 case "A08100": // 集体建设用地使用权/房屋所有权 || 首次登记
44 vm = "jtjsydfwsyq";
45 break;
46 case "A04100"://国有建设用地使用权/房屋所有权(首次登记)
45 case "B37100": // 在建工程抵押权 || 首次登记 47 case "B37100": // 在建工程抵押权 || 首次登记
46 vm = "fwsyq"; 48 vm = "fwsyq";
47 break; 49 break;
......