b832563a by yangwei

fwsyq中楼盘表功能修改

1 parent cfb9fca9
/*
* @Description: 楼盘表查询
* @Autor: renchao
* @LastEditTime: 2023-07-19 15:00:43
* @LastEditTime: 2023-09-12 10:25:47
*/
import request from "@/utils/request";
let SERVER = window.config
......@@ -26,10 +26,14 @@ export function getLpZrz (data) {
* @param {*} zrzbsm
* @author: renchao
*/
export function getLpb (zrzbsm) {
export function getLpb (zrzbsm,lx) {
return request({
url: "service-lpb/rest/zhcx/lpcx/getLpb?scyclx=0&zrzbsm=" + zrzbsm,
url: "service-lpb/rest/zhcx/lpcx/getLpb",
method: "get",
params: {
zrzbsm:zrzbsm,
scyclx:lx,
},
});
}
/**
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-01 09:18:29
* @LastEditTime: 2023-09-12 16:55:35
-->
<template>
<div class="edit">
......@@ -20,8 +20,10 @@
<lpbContent
ref="lpbContent"
:zrzbsm="formData.bsm"
:scyclx="formData.scyclx"
:onlyShow="formData.onlyShow"
:unitData="formData.unitData"
:sqywInfo="formData"
:key="time"></lpbContent>
</div>
<!-- 右侧图例 -->
......
......@@ -12,13 +12,14 @@
<ljzs-cpn v-if="lpbData.ljzs.length" :ljzs="lpbData.ljzs" :onlyShow="onlyShow"/>
</div>
<!-- 自然幢名称 -->
<p class="lpb-xmmc" :style="{ 'border-bottom': onlyShow ? 0 : '1px solid #e6e6e6'}">
<el-checkbox @change="zdySelectAll($event)" v-if="!onlyShow">{{
<!-- <p class="lpb-xmmc" :style="{ 'border-bottom': onlyShow ? 0 : '1px solid #e6e6e6'}"> -->
<p class="lpb-xmmc" :style="{ 'border-bottom':'1px solid #e6e6e6'}">
<el-checkbox @change="zdySelectAll($event)">{{
lpbData.xmmc
}}</el-checkbox>
<span v-else>{{lpbData.xmmc}}</span>
</p>
<el-button type="primary" class="save-btn" v-if="!onlyShow" @click="saveLpb">保存</el-button>
<el-button type="primary" class="save-btn" v-else @click="submitForm" :loading="loading">发起申请</el-button>
<!-- 右键菜单 -->
<ul
v-show="lpbChVisible"
......@@ -35,6 +36,7 @@ import { getLpb } from "@/api/lpcx.js";
import chCpn from "./ch.vue";
import zdyCpn from "./zdys.vue";
import ljzsCpn from "./ljzs.vue";
import { startBusinessFlow, choiceBdcdy } from "@/api/workFlow.js";
export default {
provide() {
return {
......@@ -63,7 +65,15 @@ export default {
onlyShow:{
type: Boolean,
default: true,
}
},
scyclx: {
type: Number,
default: 0,
},
sqywInfo: {
type: Object,
default: () => { }
},
},
data() {
return {
......@@ -87,11 +97,12 @@ export default {
color:''
},
// 选中户bsm合集
bsmList:[]
bsmList:[],
loading: false,
};
},
mounted() {
this.getLpb(this.zrzbsm);
this.scyclx ? this.getLpb(this.zrzbsm,this.scyclx):this.getLpb(this.zrzbsm);
window.lpbContent = this;
},
methods: {
......@@ -151,13 +162,15 @@ export default {
getLpb(zrzbsm, scyclx, actual) {
getLpb(zrzbsm, scyclx).then((res) => {
if (res.code == 200) {
res.result.lpb.ljzs = res.result.lpb.ljzs.sort(this.compare("place"));
this.lpbData = res.result.lpb == null ? this.lpbData : res.result.lpb;
// this.$nextTick(() => {
// //渲染楼盘表
// this.dataChange();
// });
console.log(this.lpbData, "this.lpbData");
if(scyclx){
if(res.result.syclx == "1") {
res.result.lpb.ljzs = res.result.lpb.ljzs.sort(this.compare("place"));
this.lpbData = res.result.lpb == null ? this.lpbData : res.result.lpb;
}
}else{
res.result.lpb.ljzs = res.result.lpb.ljzs.sort(this.compare("place"));
this.lpbData = res.result.lpb == null ? this.lpbData : res.result.lpb;
}
} else {
this.$message({
message: res.message,
......@@ -207,10 +220,50 @@ export default {
return value1 - value2;
};
},
/**
* @description: submitForm
* @author: renchao
*/
submitForm () {
debugger
if (this.bsmList.length == 0) {
this.$message.error("请至少选择一条数据");
return;
}
this.loading = true
startBusinessFlow({
bsmSqyw: this.sqywInfo.bsmSqyw,
bdcdysz: this.bsmList,
}).then((res) => {
this.loading = false
if (res.code == 200) {
this.$message({
showClose: true,
message: '发起申请成功',
type: 'success'
})
if (!this.isJump) {
this.jump(res.result, this.sqywInfo.djywbm)
} else {
store.dispatch('user/refreshPage', true);
}
this.$popupCacel()
} else {
if (res.result && res.result.length > 0) {
ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
} else {
ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
}
}
}).catch(() => {
this.loading = false
})
},
},
computed:{
lpbContentHeight(){
return this.onlyShow ? 36 : 76
// return this.onlyShow ? 36 : 76
return 76
}
},
watch: {
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-08-18 13:56:32
* @LastEditTime: 2023-09-13 11:19:54
-->
<template>
<div class="from-clues">
......@@ -61,7 +61,7 @@
</el-form>
</div>
<div class="from-clues-content loadingtext">
<lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300"
<lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300"
:current-page.sync="pageData.currentPage" :total="zrztableData.total" @size-change="handleSizeChange" @select="select"
@p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns"
:data="zrztableData.data">
......@@ -311,14 +311,11 @@
}
},
handleLpbClick (item) {
this.$popup('楼盘表', 'lpb/index', {
width: '85%',
formData: {
ywPopupDialog('楼盘表', 'lpb/index', {
bsm: item.bsm,
bsmSqyw:this.sqywInfo.bsmSqyw
}
})
bsmSqyw:this.sqywInfo.bsmSqyw,
scyclx:1
}, '85%', true,false)
},
handleSelectionChange (val) {
if (this.sqywInfo.sqywdylx == "1") {
......@@ -354,26 +351,27 @@
*/
handleRowClick (row) {
// 自然幢多选,多幢单选
let refs = 'table1';
if (this.activeName == 'dz') {
const bdcdysz = this.bdcdysz
this.$refs.table.clearSelection()
if (bdcdysz.length == 1) {
bdcdysz.forEach(item => {
// 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
if (item == row) {
this.$refs.table.toggleRowSelection(row, false);
}
// 不然就让当前的一行勾选
else {
this.$refs.table.toggleRowSelection(row, true);
}
})
}
else {
this.$refs.table.toggleRowSelection(row, true);
}
refs = 'table';
this.$refs[refs].clearSelection()
} else {
this.$refs.table.toggleRowSelection(row);
}
const bdcdysz = this.bdcdysz
if (bdcdysz.length > 0) {
bdcdysz.forEach(item => {
// 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
if (item == row) {
this.$nextTick(()=>{this.$refs[refs].toggleRowSelection(row, false);})
}
// 不然就让当前的一行勾选
else {
this.$refs[refs].toggleRowSelection(row, true);
}
})
}
else {
this.$refs[refs].toggleRowSelection(row, true);
}
},
/**
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-01 09:18:46
* @LastEditTime: 2023-09-13 10:01:27
-->
<template>
<!-- 主体权利信息查询 -->
......@@ -45,14 +45,14 @@
</lb-table>
</div>
<div class="submit_button" style="text-align:center">
<el-button @click="$popupCacel">取消</el-button>
<el-button @click="close">取消</el-button>
<el-button type="primary" plain @click="submitForm" :loading="loading">发起申请</el-button>
</div>
</div>
</template>
<script>
import store from '@/store/index.js'
import { ywPopupDialog } from "@/utils/popup.js";
import { ywPopupDialog,ywPopupCacel } from "@/utils/popup.js";
import { datas, sendThis } from "../javascript/selectAllHInfo.js";
import { defaultParameters } from "../javascript/publicDefaultPar.js";
import table from "@/utils/mixin/table";
......@@ -125,12 +125,12 @@
} else {
store.dispatch('user/refreshPage', true);
}
this.$popupCacel()
this.close()
} else {
if (res.result && res.result.length > 0) {
ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
this.$popup("申请错误明细", "components/ywdialog", { width:'36%', formData:{result: res.result} })
} else {
ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
this.$popup("申请错误明细", "components/ywdialog", { width:'36%', formData:{message: res.message} })
}
}
}).catch(() => {
......@@ -138,6 +138,14 @@
})
},
/**
* @description: close
* @param {*} val
* @author: renchao
*/
close(){
ywPopupCacel()
},
/**
* @description: handleSelectionChange
* @param {*} val
* @author: renchao
......