提交 0499b196 authored 作者: 何忠建's avatar 何忠建

新增入驻物业详情页

上级 c8052ffe
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
<div> <div>
<p style="color:#666;margin-bottom:5px;">入驻物业公司数量</p> <p style="color:#666;margin-bottom:5px;">入驻物业公司数量</p>
<p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{statistical.settledNum}} <p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{statistical.settledNum}}
<span v-if="statistical.monthSettledNum > 0"><a-icon type="arrow-up" color="#1890ff" />{{ statistical.monthSettledNum }}</span></p> <span v-if="statistical.monthSettledNum > 0"><a-icon type="arrow-up"
color="#1890ff" />{{ statistical.monthSettledNum }}</span>
</p>
</div> </div>
</div> </div>
</a-col> </a-col>
...@@ -35,7 +37,9 @@ ...@@ -35,7 +37,9 @@
<div> <div>
<p style="color:#666;margin-bottom:5px;">累计物业社区数量</p> <p style="color:#666;margin-bottom:5px;">累计物业社区数量</p>
<p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{statistical.ownerNum}} <p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{statistical.ownerNum}}
<span v-if="statistical.monthOwnerNum > 0"><a-icon type="arrow-up" color="#1890ff" />{{ statistical.monthOwnerNum }}</span></p> <span v-if="statistical.monthOwnerNum > 0"><a-icon type="arrow-up"
color="#1890ff" />{{ statistical.monthOwnerNum }}</span>
</p>
</div> </div>
</div> </div>
</a-col> </a-col>
...@@ -165,28 +169,8 @@ export default { ...@@ -165,28 +169,8 @@ export default {
this.mapEcharts() this.mapEcharts()
}, },
toOperation(record) { toOperation(record) {
let that = this this.$router.push({
this.$confirm({ path: '/settled/propertyDetails?type=audit&id=' + record.id,
title: '确认审核物业集团:' + record.propertyName + '?',
closable: true,
okText: '审核通过',
cancelText: '审核驳回',
onOk() {
return auditPropertyApi({
id: record.id,
auditStatus: 'auditPass',
}).then((res) => {
that.getDataStatistics()
})
},
onCancel() {
return auditPropertyApi({
id: record.id,
auditStatus: 'refuse',
}).then((res) => {
that.getDataStatistics()
})
},
}) })
}, },
//地图 //地图
......
<template>
<a-spin :spinning="confirmLoading">
<div class="title-top">
<h3>{{title}}</h3>
<div class="button"><a-button @click="onCancel">返回</a-button>
<a-button type="primary" @click="submitForm" v-if="pageType == 'edit' || pageType == 'add' ">保存</a-button>
<a-button type="danger" @click="onExamine(2)" v-if="pageType == 'audit'">审核驳回</a-button>
<a-button type="primary" @click="onExamine(1)" v-if="pageType == 'audit'">审核通过</a-button>
</div>
</div>
<j-form-container :disabled="pageType=='detail'">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-card title="物业集团基本信息">
<a-row>
<a-col :span="12">
<a-form-model-item label="物业集团名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="propertyName">
<a-input v-model="model.propertyName" placeholder="请输入物业集团名称"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="统一信用代码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="creditCode">
<a-input v-model="model.creditCode" placeholder="请输入统一信用代码"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="法人姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="legalName">
<a-input v-model="model.legalName" placeholder="请输入法人姓名"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="注册资本(万元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="registCapital">
<a-input-number v-model="model.registCapital" :min="1" placeholder="请输入注册资本" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contactName">
<a-input v-model="model.contactName" placeholder="请输入联系人"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="联系人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contactPhone">
<a-input v-model="model.contactPhone" placeholder="请输入联系人电话"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="注册地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="registAdress">
<area-cascader v-model="model.registAdress" :data="pcaa" :level="1" type="all" @change="addressChange"
style="width:100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="详细地址" :labelCol="{ xs:{ span: 24 }, sm:{ span: 3 } }" :wrapperCol="wrapperCol"
prop="addressInfo">
<a-input v-model="model.addressInfo" placeholder="请输入详细地址" @blur="addressBlur"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="" :offset="3" :pull="3" :labelCol="{ xs:{ span: 24 }, sm:{ span: 3 } }">
<div class="hhh">
<div id="container" style="width:100%;height:200px"></div>
</div>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="集团logo" :labelCol="{ xs:{ span: 24 }, sm:{ span: 3 } }" :wrapperCol="wrapperCol"
prop="logoUrl">
<j-image-upload bizPath="scott/pic" v-model="model.logoUrl"></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="集团介绍" :labelCol="{ xs:{ span: 24 }, sm:{ span: 3 } }" :wrapperCol="wrapperCol"
prop="groupInfo">
<a-textarea v-model="model.groupInfo" placeholder="请输入集团介绍" :auto-size="{ minRows: 3, maxRows: 5 }" />
</a-form-model-item>
</a-col>
</a-row>
</a-card>
<a-card title="授权信息">
<a-row>
<!-- <a-col :span="12">
<a-form-model-item label="试用日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="empowerType">
<a-range-picker v-model="model.empowerDate" placeholder="请选择试用日期" />
</a-form-model-item>
</a-col> -->
<a-col :span="12">
<a-form-model-item label="授权开始日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="empowerBeginDate">
<j-date placeholder="请选择授权开始日期" v-model="model.empowerBeginDate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="授权结束日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="empowerEndDate">
<j-date placeholder="请选择授权结束日期" v-model="model.empowerEndDate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="试用小区数量" :labelCol="labelCol" :wrapperCol="wrapperCol"
prop="ontrialCommunityNum">
<a-input-number v-model="model.ontrialCommunityNum" placeholder="请输入试用小区数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="收费标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chargingStandardId">
<a-select v-model="model.chargingStandardId" placeholder="请选择收费标准" style="width: 100%">
<a-select-option v-for="item in costList" :key="item.id"
:value="item.id">{{item.chargingName}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="管理员账户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adminLoginName">
<a-input v-model="model.adminLoginName" placeholder="请输入管理员账户"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="管理员密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adminPassword">
<a-input v-model="model.adminPassword" placeholder="请输入管理员密码"></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-card>
<a-card title="合同附件">
<a-row>
<a-col :span="24">
<a-form-model-item label="合同附件" :labelCol="{ xs:{ span: 24 }, sm:{ span: 3 } }" :wrapperCol="wrapperCol"
prop="contractUrl">
<j-upload v-model="model.contractUrl"></j-upload>
</a-form-model-item>
</a-col>
</a-row>
</a-card>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
const mapZoom = [5, 8, 10, 12]
let timer = null
import { getPropertyChargruleListApi, getPropertyDetailApi, auditPropertyApi } from '@/api/api'
import { httpAction, getAction } from '@/api/manage'
import { isMobile } from '@/utils/validate'
export default {
name: 'PropertySettledForm',
inject: ['closeCurrent'],
data() {
const validateToNextPhone = (rule, value, callback) => {
if (value && isMobile(value)) {
callback()
} else {
callback('请输入正确的联系人电话!')
}
}
return {
title: '',
pageType: '',
pcaa: this.$Jpcaa,
model: {
propertyName: '',
creditCode: '',
legalName: '',
registCapital: undefined,
contactName: '',
contactPhone: '',
registAdress: [],
provinceName: '',
provinceCode: '',
cityName: '',
cityCode: '',
countyName: '',
countyCode: '',
addressInfo: '',
logoUrl: '',
groupInfo: '',
empowerBeginDate: '',
empowerEndDate: '',
ontrialCommunityNum: undefined,
chargingStandardId: '',
contractUrl: '',
adminLoginName: '',
adminPassword: '123456',
longitude: '',
latitude: '',
},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
propertyName: [{ required: true, message: '请输入物业集团名称', trigger: 'blur' }],
creditCode: [{ required: true, message: '请输入统一信用代码', trigger: 'blur' }],
legalName: [{ required: true, message: '请输入法人代表', trigger: 'blur' }],
registCapital: [{ required: true, message: '请输入注册资本', trigger: 'blur' }],
contactName: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
contactPhone: [
{ required: true, message: '请输入联系人电话', trigger: 'blur' },
{ validator: validateToNextPhone },
],
registAdress: [{ required: true, message: '请选择注册地址', trigger: 'change' }],
addressInfo: [{ required: true, message: '请输入详细地址', trigger: 'blur' }],
logoUrl: [{ required: true, message: '请上传集团LOGO', trigger: 'change' }],
chargingStandardId: [{ required: true, message: '请选择收费标准', trigger: 'change' }],
adminLoginName: [{ required: true, message: '请输入管理员账号', trigger: 'blur' }],
adminPassword: [{ required: true, message: '请输入管理员密码', trigger: 'blur' }],
contractUrl: [{ required: true, message: '请上传合同附件', trigger: 'change' }],
},
url: {
add: '/property-central/property/propertySettled/add',
edit: '/property-central/property/propertySettled/edit',
queryById: '/property-central/property/propertySettled/queryById',
},
costList: [],
mapRef: null,
}
},
computed: {
formDisabled() {
return this.disabled
},
},
watch: {
'model.contactPhone': {
handler(newV, oldV) {
this.model.adminLoginName = newV
},
},
'model.addressInfo': {
handler(newV) {
if (newV) {
clearTimeout(timer)
timer = setTimeout(() => {
// this.getLongitude(this.model.categoryCodes[0], this.model.categoryCodes.join('') + newV, mapZoom[3])
}, 1000)
}
},
},
},
created() {
//备份model原始值
//this.modelDefault = JSON.parse(JSON.stringify(this.model))
this.onLoadCostList()
this.pageType = this.$route.query.type
if (this.$route.query.type == 'add') {
this.title = '新增'
} else if (this.$route.query.type == 'edit') {
this.title = '编辑'
} else if (this.$route.query.type == 'audit') {
this.title = '审核'
} else if (this.$route.query.type == 'detail') {
this.title = '详情'
}
if (this.$route.query.id) {
this.getPageDetail()
}
},
mounted() {
this.mapRef = new BMapGL.Map('container') // 创建地图实例
var point = new BMapGL.Point(108.5525, 34.3237) // 创建点坐标
this.mapRef.centerAndZoom(point, mapZoom[0])
// var zoomCtrl = new BMapGL.ZoomControl(); // 添加缩放控件
// this.mapRef.addControl(zoomCtrl);
this.mapRef.enableScrollWheelZoom(true) //开启鼠标滚轮缩放
this.mapRef.addEventListener('click', (e) => this.getAddress(e))
},
methods: {
async onLoadCostList() {
let data = await getPropertyChargruleListApi()
this.costList = data.result
},
async getPageDetail() {
let { result } = await getPropertyDetailApi({ id: this.$route.query.id })
this.edit(result)
if (result.provinceName) {
this.getLongitude(
result.provinceName,
result.provinceName + result.cityName + result.countyName + result.addressInfo,
mapZoom[3]
)
}
},
onCancel() {
this.closeCurrent()
},
// add() {
// this.edit(this.modelDefault)
// },
edit(record) {
this.model = Object.assign({}, record)
this.model.registAdress = [record.provinceCode, record.cityCode, record.countyCode]
this.visible = true
},
onExamine(type) {
const that = this
if (type == 1) {
return auditPropertyApi({
id: this.$route.query.id,
auditStatus: 'auditPass',
}).then((res) => {
that.$message.success('审核通过成功')
that.$emit('ok')
this.closeCurrent()
})
} else if (type == 2) {
return auditPropertyApi({
id: this.$route.query.id,
auditStatus: 'refuse',
}).then((res) => {
that.$message.success('审核驳回成功')
this.closeCurrent()
})
}
},
addressChange(val) {
const province = Object.keys(val[0])[0]
const city = Object.keys(val[1])[0]
const county = Object.keys(val[2])[0]
this.model.provinceName = val[0][province]
this.model.provinceCode = province
this.model.cityName = val[1][city]
this.model.cityCode = city
this.model.countyName = val[2][county]
this.model.countyCode = county
if (this.model.addressInfo) {
this.getLongitude(
this.model.provinceName,
this.model.provinceName + this.model.cityName + this.model.countyName + this.model.addressInfo,
mapZoom[3]
)
}
},
addressBlur(val) {
if (this.model.provinceName) {
this.getLongitude(
this.model.provinceName,
this.model.provinceName + this.model.cityName + this.model.countyName + val.target.value,
mapZoom[3]
)
}
},
getAddress(e) {
let _this = this
// 创建地理编码实例
var myGeo = new BMapGL.Geocoder()
// 根据坐标得到地址描述
myGeo.getLocation(new BMapGL.Point(e.latlng.lng, e.latlng.lat), function (result) {
if (result) {
_this.mapRef.clearOverlays()
_this.model.registAdress = [
result.addressComponents.province,
result.addressComponents.city,
result.addressComponents.district,
]
_this.model.addressInfo = result.addressComponents.street + result.addressComponents.streetNumber
_this.model.longitude = result.point.lng
_this.model.latitude = result.point.lat
_this.positionMap(e.latlng.lng, e.latlng.lat, mapZoom[3], result.address)
console.log(result)
}
})
},
positionMap(mapCenterLng, mapCenterLat, mapzoom, address) {
var point = new BMapGL.Point(mapCenterLng, mapCenterLat) // 创建点坐标
this.mapRef.centerAndZoom(point, mapzoom)
var marker = new BMapGL.Marker(point, { title: address }) // 创建标注
this.mapRef.addOverlay(marker) // 将标注添加到地图中
let _this = this
// marker.addEventListener("click", function(){
var label = new BMapGL.Label(address, {
// 创建文本标注
position: point, // 设置标注的地理位置
offset: new BMapGL.Size(0, -55), // 设置标注的偏移量
})
_this.mapRef.addOverlay(label) // 将标注添加到地图中
label.setStyle({
// 设置label的样式
color: '#333',
fontSize: '14px',
padding: '4px 10px',
border: '1px solid #1E90FF',
borderRadius: '4px',
transform: 'translateX(-40%)',
})
// });
},
getLongitude(city, address, zoom) {
let _this = this
var myGeo = new BMapGL.Geocoder()
myGeo.getPoint(
address,
function (point) {
if (point) {
_this.mapRef.clearOverlays()
_this.model.longitude = point.lng
_this.model.latitude = point.lat
_this.positionMap(point.lng, point.lat, zoom, address)
} else {
console.log('您选择的地址没有解析到结果!')
}
},
city
)
},
submitForm() {
const that = this
// 触发表单验证
this.$refs.form.validate((valid) => {
if (valid) {
that.confirmLoading = true
let httpurl = ''
let method = ''
if (!this.model.id) {
httpurl += this.url.add
method = 'post'
} else {
httpurl += this.url.edit
method = 'put'
}
//this.model.registAdress = undefined
httpAction(httpurl, this.model, method)
.then((res) => {
if (res.success) {
that.$message.success(res.message)
that.$emit('ok')
this.closeCurrent()
} else {
that.$message.warning(res.message)
}
})
.finally(() => {
that.confirmLoading = false
})
}
})
},
},
beforeDestroy() {
clearTimeout(timer)
this.mapRef.removeEventListener('click', (e) => this.getAddress(e))
},
}
</script>
<style lang="less" scoped>
.title-top {
background: #fff;
padding: 0 25px;
line-height: 50px;
height: 50px;
margin-bottom: 5px;
h3 {
font-weight: bold;
display: inline-block;
}
.button {
float: right;
.ant-btn {
margin-left: 15px;
}
}
}
</style>
<style>
.area-select {
width: 100% !important;
}
</style>
\ No newline at end of file
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="propertyDetails(1)" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('t_property_settled')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('t_property_settled')">导出</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown> </a-dropdown>
...@@ -45,43 +45,34 @@ ...@@ -45,43 +45,34 @@
<a style="margin-left: 24px" v-if="selectedRowKeys.length > 0" @click="onClearSelected">清空</a> <a style="margin-left: 24px" v-if="selectedRowKeys.length > 0" @click="onClearSelected">清空</a>
</div> </div>
<a-table <a-table ref="table" size="middle" :scroll="{x:true}" bordered rowKey="id" :columns="columns"
ref="table" :dataSource="dataSource" :pagination="pagination" :loading="loading"
size="middle" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" class="j-table-force-nowrap"
:scroll="{x:true}" @change="handleTableChange">
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="pagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange"
>
<span slot="propertyStatus" slot-scope="text, record"> <span slot="propertyStatus" slot-scope="text, record">
<span>{{record.propertyStatus === 'normal' ? '正常' : '冻结'}}</span> <span>{{record.propertyStatus === 'normal' ? '正常' : '冻结'}}</span>
</span> </span>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="onLoadDetail(record, 'edit')">编辑</a> <a @click="propertyDetails(2, record.id)">编辑</a>
<a-divider type="vertical"/> <a-divider type="vertical" />
<a-dropdown> <a-dropdown>
<a class="ant-dropdown-link"> <a class="ant-dropdown-link">
更多 <a-icon type="down"/> 更多 <a-icon type="down" />
</a> </a>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item v-if="record.auditStatus !== 'waitAudit'"> <a-menu-item v-if="record.auditStatus !== 'waitAudit'">
<a @click="handlePerssion(record.roleId)">授权</a> <a @click="handlePerssion(record.roleId)">授权</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<a href="javascript:;" @click="onLoadDetail(record)">详情</a> <a href="javascript:;" @click="propertyDetails(4, record.id)">详情</a>
</a-menu-item> </a-menu-item>
<a-menu-item v-if="record.auditStatus === 'waitAudit'"> <a-menu-item v-if="record.auditStatus === 'waitAudit'">
<a href="javascript:;" @click="onExamine(record)">审核</a> <a href="javascript:;" @click="propertyDetails(3, record.id)">审核</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<a href="javascript:;" @click="onStatus(record)">{{record.propertyStatus === 'normal' ? '冻结' : '解冻'}}</a> <a href="javascript:;"
@click="onStatus(record)">{{record.propertyStatus === 'normal' ? '冻结' : '解冻'}}</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" placement="topLeft"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" placement="topLeft">
...@@ -104,153 +95,172 @@ ...@@ -104,153 +95,172 @@
</template> </template>
<script> <script>
import { auditPropertyApi, freezeOrPropertyApi } from '@/api/api' import { auditPropertyApi, freezeOrPropertyApi } from '@/api/api'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import PropertySettledModal from './modules/PropertySettledModal' import PropertySettledModal from './modules/PropertySettledModal'
import UserRoleModal from './modules/UserRoleModal' import UserRoleModal from './modules/UserRoleModal'
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil' import { filterDictTextByCache } from '@/components/dict/JDictSelectUtil'
const columns = [ const columns = [
{ {
title: '物业名称', title: '物业名称',
dataIndex: 'propertyName', dataIndex: 'propertyName',
key: 'propertyName' key: 'propertyName',
},
{
title: '统一社会信用代码',
dataIndex: 'creditCode',
key: 'creditCode',
},
{
title: '联系人',
dataIndex: 'contactName',
key: 'contactName',
},
{
title: '电话',
dataIndex: 'contactPhone',
key: 'contactPhone',
},
{
title: '授权时间',
dataIndex: 'empowerDate',
key: 'empowerDate',
},
{
title: '授权物业数量',
dataIndex: 'ontrialCommunityNum',
key: 'ontrialCommunityNum',
},
{
title: '审核状态',
dataIndex: 'auditStatus',
key: 'auditStatus',
customRender: function (text) {
return filterDictTextByCache('auditStatus', text)
}, },
{ },
title: '统一社会信用代码', {
dataIndex: 'creditCode', title: '到期提示',
key: 'creditCode' dataIndex: 'ontrialEndDate',
}, key: 'ontrialEndDate',
{ },
title: '联系人', {
dataIndex: 'contactName', title: '状态',
key: 'contactName' dataIndex: 'propertyStatus',
}, scopedSlots: { customRender: 'propertyStatus' },
{ key: 'propertyStatus',
title: '电话', },
dataIndex: 'contactPhone', {
key: 'contactPhone' title: '操作',
}, dataIndex: 'action',
{ scopedSlots: { customRender: 'action' },
title: '授权时间', align: 'center',
dataIndex: 'empowerDate', width: 150,
key: 'empowerDate' },
}, ]
{
title: '授权物业数量', export default {
dataIndex: 'ontrialCommunityNum', name: 'PermissionListAsync',
key: 'ontrialCommunityNum' mixins: [JeecgListMixin],
}, components: {
{ PropertySettledModal,
title: '审核状态', UserRoleModal,
dataIndex: 'auditStatus', },
key: 'auditStatus', data() {
customRender: function(text) { return {
return filterDictTextByCache('auditStatus', text); // 表头
columns: columns,
loading: false,
pagination: {
total: 0,
current: 1,
pageSize: 10,
showSizeChanger: true,
},
url: {
list: '/property-central/property/propertySettled/list',
delete: '/property-central/property/propertySettled/delete',
deleteBatch: '/property-central/property/propertySettled/deleteBatch',
},
}
},
methods: {
propertyDetails(type, id) {
if (type == 1) {
this.$router.push({
path: '/settled/propertyDetails?type=add',
})
} else if (type == 2) {
this.$router.push({
path: '/settled/propertyDetails?type=edit&id=' + id,
})
} else if (type == 3) {
this.$router.push({
path: '/settled/propertyDetails?type=audit&id=' + id,
})
} else if (type == 4) {
this.$router.push({
path: '/settled/propertyDetails?type=detail&id=' + id,
})
} }
}, },
{ onLoadDetail(record, type) {
title: '到期提示', record['registAdress'] = [record.provinceCode, record.cityCode, record.countyCode]
dataIndex: 'ontrialEndDate', if (type === 'edit') {
key: 'ontrialEndDate' this.handleEdit(record)
}, } else {
{ this.handleDetail(record)
title: '状态', }
dataIndex: 'propertyStatus',
scopedSlots: { customRender: 'propertyStatus' },
key: 'propertyStatus'
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 150
}
]
export default {
name: 'PermissionListAsync',
mixins: [JeecgListMixin],
components: {
PropertySettledModal,
UserRoleModal
}, },
data() { onExamine(record) {
return { let that = this
// 表头 this.$confirm({
columns: columns, title: '确认审核此物业?',
loading: false, closable: true,
pagination: { okText: '审核通过',
total: 0, cancelText: '审核驳回',
current: 1, onOk() {
pageSize: 10, return auditPropertyApi({
showSizeChanger: true id: record.id,
auditStatus: 'auditPass',
}).then((res) => {
that.searchQuery()
})
}, },
url: { onCancel() {
list: "/property-central/property/propertySettled/list", return auditPropertyApi({
delete: '/property-central/property/propertySettled/delete', id: record.id,
deleteBatch: '/property-central/property/propertySettled/deleteBatch' auditStatus: 'refuse',
}).then((res) => {
that.searchQuery()
})
}, },
} })
}, },
methods: { onStatus(record) {
onLoadDetail(record, type) { let that = this
record['registAdress'] = [record.provinceCode, record.cityCode, record.countyCode] this.$confirm({
if(type === 'edit') { title: `确认${record.propertyStatus === 'normal' ? '冻结' : '解冻'}此物业?`,
this.handleEdit(record) closable: true,
} else { okText: `${record.propertyStatus === 'normal' ? '冻结' : '解冻'}`,
this.handleDetail(record) onOk() {
} return freezeOrPropertyApi({
}, id: record.id,
onExamine(record) { status: `${record.propertyStatus === 'normal' ? 'freeze' : 'normal'}`,
let that = this }).then((res) => {
this.$confirm({ that.searchQuery()
title: '确认审核此物业?', })
closable: true, },
okText: '审核通过', onCancel() {},
cancelText: '审核驳回', })
onOk() { },
return auditPropertyApi({ handlePerssion(roleId) {
id: record.id, this.$refs.modalUserRole.show(roleId)
auditStatus: 'auditPass' },
}).then(res=> { },
that.searchQuery() }
})
},
onCancel() {
return auditPropertyApi({
id: record.id,
auditStatus: 'refuse'
}).then(res=> {
that.searchQuery()
})
}
});
},
onStatus(record) {
let that = this
this.$confirm({
title: `确认${record.propertyStatus === 'normal' ? '冻结' : '解冻'}此物业?`,
closable: true,
okText: `${record.propertyStatus === 'normal' ? '冻结' : '解冻'}`,
onOk() {
return freezeOrPropertyApi({
id: record.id,
status: `${record.propertyStatus === 'normal' ? 'freeze' : 'normal'}`
}).then(res=> {
that.searchQuery()
})
},
onCancel() {}
});
},
handlePerssion(roleId) {
this.$refs.modalUserRole.show(roleId);
}
}
}
</script> </script>
<style scoped> <style scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
</style> </style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论