feat(每月作价):迁移住宅租赁基价
1. 计算、修正、最终租赁基价页面查询; 2. 导入、导出、修改、从作价数据导入; 3. 页面功能划分优化; 4. 修改路由规则
This commit is contained in:
@ -3,8 +3,61 @@ import request from '@/utils/request'
|
||||
// 查询人工住宅租赁基价列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/artificial/list',
|
||||
url: '/data/rent-price/residence/artificial/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询人工住宅租赁 年月 列表
|
||||
export function getYearMonthList() {
|
||||
return request({
|
||||
url: '/data/rent-price/residence/artificial/yearmonth',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 从计算租赁租金同步到人工修正租赁租金
|
||||
* @param {年月} yearMonth
|
||||
*/
|
||||
export function importSync(yearMonth) {
|
||||
return request({
|
||||
url: '/data/rent-price/residence/artificial/importSync/' + yearMonth,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 导出
|
||||
* @param {查询条件} query
|
||||
*/
|
||||
export function export2File(query) {
|
||||
return request({
|
||||
url: '/data/rent-price/residence/artificial/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param {id} id
|
||||
*/
|
||||
export function getById(yearMonth, id) {
|
||||
return request({
|
||||
url: '/data/rent-price/residence/artificial/' + yearMonth + '/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改人工住宅租赁基价
|
||||
* @param {表单数据} data
|
||||
*/
|
||||
export function update(data) {
|
||||
return request({
|
||||
url: '/data/rent-price/residence/artificial/',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -1,35 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询【请填写功能名称】列表
|
||||
// 查询计算住宅租赁基价列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/compute/list',
|
||||
url: '/data/rent-price/residence/compute/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询【请填写功能名称】详细
|
||||
// 查询计算住宅租赁基价详细
|
||||
export function get(id) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/compute/' + id,
|
||||
url: '/data/rent-price/residence/compute/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改【请填写功能名称】
|
||||
// 修改计算住宅租赁基价
|
||||
export function update(data) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/compute',
|
||||
url: '/data/rent-price/residence/compute',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 导出【请填写功能名称】
|
||||
// 导出计算住宅租赁基价
|
||||
export function export2File(query) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/compute/export',
|
||||
url: '/data/rent-price/residence/compute/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@ -37,7 +37,7 @@ export function export2File(query) {
|
||||
|
||||
export function getYearMonthList() {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/compute/yearmonth',
|
||||
url: '/data/rent-price/residence/compute/yearmonth',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||
// 查询最终住宅租赁基价列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/ultimate/list',
|
||||
url: '/data/rent-price/residence/ultimate/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@ -12,7 +12,7 @@ export function list(query) {
|
||||
// 查询最终住宅租赁基价详细
|
||||
export function get(id) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/ultimate/' + id,
|
||||
url: '/data/rent-price/residence/ultimate/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@ -20,7 +20,7 @@ export function get(id) {
|
||||
// 修改最终住宅租赁基价
|
||||
export function update(data) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/ultimate',
|
||||
url: '/data/rent-price/residence/ultimate',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
@ -29,8 +29,16 @@ export function update(data) {
|
||||
// 导出最终住宅租赁基价
|
||||
export function export2File(query) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/ultimate/export',
|
||||
url: '/data/rent-price/residence/ultimate/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询人工住宅租赁 年月 列表
|
||||
export function getYearMonthList() {
|
||||
return request({
|
||||
url: '/data/rent-price/residence/ultimate/yearmonth',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px">
|
||||
<el-form-item label="年月" prop="yearMonth" clearable>
|
||||
<el-date-picker
|
||||
v-model="queryParams.yearMonth"
|
||||
format="yyyyMM"
|
||||
value-format="yyyyMM"
|
||||
type="month"
|
||||
placeholder="选择年月"
|
||||
@keyup.enter.native="handleQuery"
|
||||
></el-date-picker>
|
||||
<el-form :model="queryParams" ref="queryForm" :rules="rules" :inline="true" label-width="100px">
|
||||
<el-form-item label="年月" prop="yearMonth">
|
||||
<el-select v-model="queryParams.yearMonth" placeholder="请选择年月">
|
||||
<el-option
|
||||
v-for="item in yearMonthList"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联城小区ID" prop="communityId" clearable>
|
||||
<el-input
|
||||
@ -26,16 +26,61 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-bell"
|
||||
size="mini"
|
||||
@click="handleSync"
|
||||
v-hasPermi="['system:user:import']"
|
||||
>从作价导入</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handleImport"
|
||||
v-hasPermi="['system:user:import']"
|
||||
>文件导入</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:user:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="年月" align="center" prop="yearMonth" />
|
||||
<el-table-column label="小区ID" align="center" prop="communityId" />
|
||||
<el-table-column label="年月" align="center" prop="yearMonth" fixed />
|
||||
<el-table-column label="小区ID" align="center" prop="communityId" fixed />
|
||||
<el-table-column label="租金主力面积系数" align="center" prop="mainRentCoefficient" />
|
||||
<el-table-column label="平均租金" align="center" prop="rentPrice" />
|
||||
<el-table-column label="主力面积租金" align="center" prop="mainRentPrice" />
|
||||
<el-table-column label="平均租金(上周期)" align="center" prop="rentPrice_1" />
|
||||
<el-table-column label="价格涨跌幅类型-调整后" align="center" prop="voppat" />
|
||||
<el-table-column label="价格涨跌幅-调整后" align="center" prop="voppa" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -45,23 +90,135 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 文件上传对话框 -->
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '/' + queryParams.yearMonth"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
<el-alert :title="uploadTips" type="warning" effect="dark" :closable="false"></el-alert>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 修改对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="updateRules" label-width="160px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="小区ID">
|
||||
<el-input v-model="form.communityId" disabled readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="租金主力面积系数">
|
||||
<el-input v-model="form.mainRentCoefficient" disabled readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="平均租金" prop="rentPrice">
|
||||
<el-input v-model="form.rentPrice" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力面积租金" prop="mainRentPrice">
|
||||
<el-input v-model="form.mainRentPrice" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="平均租金(上周期)" prop="rentPrice_1">
|
||||
<el-input v-model="form.rentPrice_1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="价格涨跌幅类型-调整后" prop="voppat">
|
||||
<el-input v-model="form.voppat" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="价格涨跌幅-调整后" prop="voppa">
|
||||
<el-input v-model="form.voppa" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="formSubmitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getToken } from "@/utils/auth";
|
||||
import {
|
||||
list
|
||||
getById,
|
||||
list,
|
||||
update,
|
||||
importSync,
|
||||
export2File,
|
||||
getYearMonthList
|
||||
} from "@/api/data/artificialResidenceRentPrice";
|
||||
|
||||
export default {
|
||||
name: "artificialResidenceRentBasePrice",
|
||||
data() {
|
||||
// 年月
|
||||
var checkYearMonth = (rule, value, callback) => {
|
||||
console.log(value);
|
||||
if (value === "" || !isNaN(parseInt(value))) {
|
||||
var yearMonthValidator = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error("请输入年月"));
|
||||
} else if (value === "" || isNaN(parseInt(value))) {
|
||||
callback(new Error("请输入年月"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
// 价格判断
|
||||
var priceValidator = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error("请输入价格"));
|
||||
} else if (value === "" || isNaN(parseFloat(value))) {
|
||||
callback(new Error("请输入价格"));
|
||||
} else {
|
||||
if (value <= 0) {
|
||||
callback(new Error("请输入合理价格"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var numberValidator = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error("请输入数字"));
|
||||
} else if (value === "" || isNaN(parseFloat(value))) {
|
||||
callback(new Error("请输入数字"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@ -92,10 +249,12 @@ export default {
|
||||
pageIndex: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
yearMonthList: [],
|
||||
statusOptions: [
|
||||
{ value: 1, text: "正常" },
|
||||
{ value: 1, text: "失效" }
|
||||
],
|
||||
uploadTips: "",
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
@ -111,16 +270,45 @@ export default {
|
||||
"/data/rentprice/residence/artificial/importData"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
url: ""
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
yearMonth: [{ validator: checkYearMonth, trigger: "blur" }]
|
||||
yearMonth: [
|
||||
{ validator: yearMonthValidator, trigger: "blur" },
|
||||
{ validator: yearMonthValidator, trigger: "change" }
|
||||
]
|
||||
},
|
||||
updateRules: {
|
||||
yearMonth: [
|
||||
{ validator: yearMonthValidator, trigger: "blur" },
|
||||
{ validator: yearMonthValidator, trigger: "change" }
|
||||
],
|
||||
rentPrice: [
|
||||
{ validator: priceValidator, trigger: "blur" },
|
||||
{ validator: priceValidator, trigger: "change" }
|
||||
],
|
||||
mainPriceRent: [
|
||||
{ validator: priceValidator, trigger: "blur" },
|
||||
{ validator: priceValidator, trigger: "change" }
|
||||
],
|
||||
rentPrice_1: [
|
||||
{ validator: priceValidator, trigger: "blur" },
|
||||
{ validator: priceValidator, trigger: "change" }
|
||||
],
|
||||
voppa: [
|
||||
{ validator: numberValidator, trigger: "blur" },
|
||||
{ validator: numberValidator, trigger: "change" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.loading = false;
|
||||
// this.getList();
|
||||
getYearMonthList().then(response => {
|
||||
this.yearMonthList = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
yesOrNotFormatter: function(row, column, cellValue, index) {
|
||||
@ -139,9 +327,9 @@ export default {
|
||||
},
|
||||
/** 查询办公基价列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.$refs["queryForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
@ -167,6 +355,70 @@ export default {
|
||||
this.queryParams.pageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
handleSync() {
|
||||
this.$refs["queryForm"].validate(valid => {
|
||||
if (valid) {
|
||||
// 清除原有数据,然后导入
|
||||
this.$refs["queryForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm("此操作会删除原数据,是否继续?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(() => {
|
||||
return importSync(this.queryParams.yearMonth);
|
||||
})
|
||||
.then(response => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!"
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$refs["queryForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm("是否确认导出住宅租赁基价数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return export2File(queryParams);
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleImport() {
|
||||
this.$refs["queryForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.upload.title = "人工修正住宅租赁基价导入";
|
||||
this.uploadTips = "当前选中的基价月份:" + this.queryParams.yearMonth;
|
||||
this.upload.open = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
const yearMonth = row.yearMonth;
|
||||
getById(yearMonth, id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改住宅租赁基价";
|
||||
});
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
@ -177,6 +429,38 @@ export default {
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
|
||||
this.getList();
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
formSubmitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
update(this.form).then(response => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!"
|
||||
});
|
||||
this.loading = false;
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -36,16 +36,6 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
@ -55,19 +45,9 @@
|
||||
v-hasPermi="['system:user:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handleImport"
|
||||
v-hasPermi="['system:user:import']"
|
||||
>导入</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="年月" align="center" prop="yearMonth" />
|
||||
<el-table-column label="小区ID" align="center" prop="communityId" />
|
||||
<el-table-column label="小区名称" align="center" prop="communityName" />
|
||||
@ -139,24 +119,6 @@
|
||||
<el-table-column label="绑定混合小区涨跌幅" align="center" prop="bind_MixProject_Pst" />
|
||||
<el-table-column label="价格涨跌幅类型-调整后" align="center" prop="voppat" />
|
||||
<el-table-column label="价格涨跌幅-调整后" align="center" prop="voppa" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>修改</el-button>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>删除</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -167,89 +129,6 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改办公基价对话框 -->
|
||||
<!-- <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="160px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="小区ID">
|
||||
<el-input v-model="form.communityId" disabled="true" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="楼栋ID">
|
||||
<el-input v-model="form.buildingId" disabled="true" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力基价(元/㎡)">
|
||||
<el-input v-model="form.mainPrice" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力租金(元/月·㎡)">
|
||||
<el-input v-model="form.mainPriceRent" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力基价涨跌幅">
|
||||
<el-input v-model="form.mainPricePst" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力租金涨跌幅">
|
||||
<el-input v-model="form.mainPriceRentPst" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力基价类型">
|
||||
<el-input v-model="form.mainPriceType" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力租金类型">
|
||||
<el-input v-model="form.mainPriceRentType" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -355,7 +234,7 @@ export default {
|
||||
},
|
||||
/** 查询办公基价列表 */
|
||||
getList() {
|
||||
this.$refs['queryForm'].validate(valid => {
|
||||
this.$refs["queryForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then(response => {
|
||||
@ -441,18 +320,22 @@ export default {
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm("是否确认导出所有住宅租赁基价数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return export2File(queryParams);
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
.catch(function() {});
|
||||
this.$refs["queryForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm("是否确认导出所有住宅租赁基价数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return export2File(queryParams);
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleImport() {
|
||||
this.upload.title = "办公基价导入";
|
||||
|
@ -519,7 +519,6 @@ export default {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
const yearMonth = row.yearMonth;
|
||||
console.log(yearMonth);
|
||||
getById(yearMonth, id).then(response => {
|
||||
// 复合信息
|
||||
response.data.complexRegion =
|
||||
|
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px">
|
||||
<el-form-item label="年月" prop="yearMonth" clearable>
|
||||
<el-date-picker
|
||||
v-model="queryParams.yearMonth"
|
||||
format="yyyyMM"
|
||||
value-format="yyyyMM"
|
||||
type="month"
|
||||
placeholder="选择年月"
|
||||
@keyup.enter.native="handleQuery"
|
||||
></el-date-picker>
|
||||
<el-form :model="queryParams" ref="queryForm" :rules="rules" :inline="true" label-width="100px">
|
||||
<el-form-item label="年月" prop="yearMonth">
|
||||
<el-select v-model="queryParams.yearMonth" placeholder="请选择年月">
|
||||
<el-option
|
||||
v-for="item in yearMonthList"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联城小区ID" prop="communityId" clearable>
|
||||
<el-form-item label="小区ID" prop="communityId" clearable>
|
||||
<el-input
|
||||
v-model="queryParams.communityId"
|
||||
placeholder="请输入案例小区名称"
|
||||
@ -20,6 +20,21 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称或地址" prop="nameOrAddress" clearable>
|
||||
<el-input
|
||||
v-model="queryParams.nameOrAddress"
|
||||
placeholder="请输入小区名称或地址"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-option label="正常" value="1"></el-option>
|
||||
<el-option label="失效" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -27,16 +42,6 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
@ -46,19 +51,9 @@
|
||||
v-hasPermi="['system:user:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handleImport"
|
||||
v-hasPermi="['system:user:import']"
|
||||
>导入</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="年月" align="center" prop="yearMonth" />
|
||||
<el-table-column label="小区ID" align="center" prop="communityId" />
|
||||
<el-table-column label="小区名称" align="center" prop="communityName" />
|
||||
@ -89,25 +84,6 @@
|
||||
<el-table-column label="分租案例" align="center" prop="shareRentNum" />
|
||||
<el-table-column label="租售比" align="center" prop="saleRentRatio" />
|
||||
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormatter" />
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>修改</el-button>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>删除</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -117,90 +93,6 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改办公基价对话框 -->
|
||||
<!-- <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="160px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="小区ID">
|
||||
<el-input v-model="form.communityId" disabled="true" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="楼栋ID">
|
||||
<el-input v-model="form.buildingId" disabled="true" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力基价(元/㎡)">
|
||||
<el-input v-model="form.mainPrice" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力租金(元/月·㎡)">
|
||||
<el-input v-model="form.mainPriceRent" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力基价涨跌幅">
|
||||
<el-input v-model="form.mainPricePst" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力租金涨跌幅">
|
||||
<el-input v-model="form.mainPriceRentPst" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力基价类型">
|
||||
<el-input v-model="form.mainPriceType" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力租金类型">
|
||||
<el-input v-model="form.mainPriceRentType" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -208,18 +100,18 @@
|
||||
import { getToken } from "@/utils/auth";
|
||||
import {
|
||||
list,
|
||||
get,
|
||||
update,
|
||||
export2File
|
||||
export2File,
|
||||
getYearMonthList
|
||||
} from "@/api/data/ultimateResidenceRentPrice";
|
||||
|
||||
export default {
|
||||
name: "computeResidenceRentBasePrice",
|
||||
name: "ultimateResidenceRentPrice",
|
||||
data() {
|
||||
// 年月
|
||||
var checkYearMonth = (rule, value, callback) => {
|
||||
console.log(value);
|
||||
if (value === "" || !isNaN(parseInt(value))) {
|
||||
var yearMonthValidator = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error("请输入年月"));
|
||||
} else if (value === "" || isNaN(parseInt(value))) {
|
||||
callback(new Error("请输入年月"));
|
||||
} else {
|
||||
callback();
|
||||
@ -247,10 +139,12 @@ export default {
|
||||
queryParams: {
|
||||
yearMonth: undefined,
|
||||
communityId: undefined,
|
||||
communityName: undefined,
|
||||
nameOrAddress: undefined,
|
||||
status: undefined,
|
||||
pageIndex: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
yearMonthList: [],
|
||||
statusOptions: [
|
||||
{ value: 1, text: "正常" },
|
||||
{ value: 1, text: "失效" }
|
||||
@ -273,13 +167,18 @@ export default {
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
yearMonth: [{ validator: checkYearMonth, trigger: "blur" }]
|
||||
yearMonth: [
|
||||
{ validator: yearMonthValidator, trigger: "blur" },
|
||||
{ validator: yearMonthValidator, trigger: "change" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.loading = false;
|
||||
// this.getList();
|
||||
getYearMonthList().then(response => {
|
||||
this.yearMonthList = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
yesOrNotFormatter: function(row, column, cellValue, index) {
|
||||
@ -298,9 +197,9 @@ export default {
|
||||
},
|
||||
/** 查询办公基价列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.$refs["queryForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
@ -337,50 +236,6 @@ export default {
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
// handleAdd() {
|
||||
// this.reset();
|
||||
// this.open = true;
|
||||
// this.title = "添加办公基价";
|
||||
// },
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
get(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改办公基价";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
update(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// addUltimate(this.form).then(response => {
|
||||
// if (response.code === 200) {
|
||||
// this.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// } else {
|
||||
// this.msgError(response.msg);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
@ -396,26 +251,6 @@ export default {
|
||||
this.download(response.msg);
|
||||
})
|
||||
.catch(function() {});
|
||||
},
|
||||
handleImport() {
|
||||
this.upload.title = "办公基价导入";
|
||||
this.upload.open = true;
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
|
||||
this.getList();
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
target: `http://localhost:9700`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
Reference in New Issue
Block a user