Browse Source

参拍记录修改

develop
王健 4 years ago
parent
commit
ec002b1b35
  1. 17
      src/views/company/auction/api/api.js
  2. 104
      src/views/company/auction/index.vue
  3. 621
      src/views/company/auction/insert.vue

17
src/views/company/auction/api/api.js

@ -8,6 +8,23 @@ export function queryList(param) {
params: param
})
}
//查询详情
export function queryData(param) {
return request({
url: '/api/auction_record/' + param,
method: 'get'
})
}
// 删除
export function delData(param) {
return request({
url: '/api/auction_record/' + param,
method: 'delete'
})
}
//更新
export function putAuction(param) {
return request({
url: '/api/auction_record',

104
src/views/company/auction/index.vue

@ -4,10 +4,7 @@
<div>
<el-form :inline="true" :model="searchForm" class="demo-form-inline">
<el-form-item label="城市:">
<el-input
v-model="searchForm.city"
placeholder="请输入"
></el-input>
<el-input v-model="searchForm.city" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="地块名称:">
<el-input
@ -17,14 +14,14 @@
</el-form-item>
<el-form-item label="举牌企业:">
<el-input
v-model="searchForm.raiseEnterprise"
placeholder="请输入"
v-model="searchForm.raiseEnterprise"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="竞得企业:">
<el-input
v-model="searchForm.winnerEnterprises"
placeholder="请输入"
v-model="searchForm.winnerEnterprises"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item>
@ -62,28 +59,28 @@
><img src="@public/img/land/u1340.png" />批量删除</el-button
>
</div>
<!-- <div>-->
<!-- <el-button-->
<!-- ><img style="margin-right: 5px;" src="@public/img/land/u1401.png" />导入</el-button-->
<!-- >-->
<!-- </div>-->
<!-- <div>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- content="点击此处下载模版"-->
<!-- placement="bottom"-->
<!-- >-->
<!-- <el-button @click="downloadTemplate"-->
<!-- ><i class="el-icon-download"></i-->
<!-- ></el-button>-->
<!-- </el-tooltip>-->
<!-- </div>-->
<!-- <div style="margin-right: 30px">-->
<!-- <el-button @click="newItem" type="primary"-->
<!-- ><i class="el-icon-plus"></i>新建</el-button-->
<!-- >-->
<!-- </div>-->
<!-- <div>-->
<!-- <el-button-->
<!-- ><img style="margin-right: 5px;" src="@public/img/land/u1401.png" />导入</el-button-->
<!-- >-->
<!-- </div>-->
<!-- <div>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- content="点击此处下载模版"-->
<!-- placement="bottom"-->
<!-- >-->
<!-- <el-button @click="downloadTemplate"-->
<!-- ><i class="el-icon-download"></i-->
<!-- ></el-button>-->
<!-- </el-tooltip>-->
<!-- </div>-->
<!-- <div style="margin-right: 30px">-->
<!-- <el-button @click="newItem" type="primary"-->
<!-- ><i class="el-icon-plus"></i>新建</el-button-->
<!-- >-->
<!-- </div>-->
</div>
</div>
</div>
@ -271,6 +268,7 @@ export default {
for (let item in this.searchForm) {
this.searchForm[item] = "";
}
this.onSubmit();
},
handleSizeChange(val) {
@ -288,43 +286,41 @@ export default {
//
newItem() {
// cols
// let newObj = {};
// for (let col of this.cols) {
// newObj[col.prop] = "";
// }
// this.editForm = newObj;
// this.readOnly = false;
// this.dialogFormVisible = true;
this.$router.push({path:'/company/auction/insert',query:{readOnly:'false',isEditOr:'false',}});
// this.$router.push("/company/auction/insert");
this.$router.push({
path: "/company/auction/insert",
query: { readOnly: "false", isEditOr: "false" },
});
},
//
editItem(row) {
let data=JSON.stringify(row)
this.$router.push({path:'/company/auction/insert',query:{readOnly:'false',isEditOr:'true',data:data}});
// this.dialogTitle = "";
// this.readOnly = false;
// this.dialogFormVisible = true;
// this.editForm = row;
this.$router.push({
path: "/company/auction/insert",
query: {
readOnly: "false",
isEditOr: "true",
data: row.auctionRecordId,
},
});
},
//
delItem(row) {
delData(row.data_id).then((res) => {
console.debug(res);
delData(row.auctionRecordId).then((res) => {
this.onSubmit();
});
},
//
viewItem(row) {
let data=JSON.stringify(row)
this.$router.push({path:'/company/auction/insert',query:{readOnly:'true',isEditOr:'false',data:data}});
// this.dialogTitle = "";
// this.readOnly = true;
// this.dialogFormVisible = true;
// this.editForm = row;
this.$router.push({
path: "/company/auction/insert",
query: {
readOnly: "true",
isEditOr: "false",
data: row.auctionRecordId,
},
});
},
//

621
src/views/company/auction/insert.vue

@ -1,459 +1,326 @@
<template>
<div>
<span class="tipsMy">*数据为必填项</span>
<el-form
:model="editForm"
class="myForm"
:disabled="readOnly">
<el-form :model="editForm" class="myForm" :disabled="readOnly">
<el-row>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="城市:">
<el-input v-model="editForm.city"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="地块编号:">
<el-input v-model="editForm.auctionRecordId"></el-input>
<el-input v-model="editForm.landCode"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="地块名称:">
<el-input v-model="editForm.landName"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="成交时间:">
<el-date-picker
type="date"
placeholder="选择成交时间"
v-model="editForm.createDate"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
type="date"
placeholder="选择成交时间"
v-model="editForm.createDate"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="举牌排名:">
<el-input v-model="editForm.ranking"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="举牌企业:">
<el-input v-model="editForm.raiseEnterprise"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="举牌价(万元):">
<el-input v-model="editForm.raisePrice"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="名义楼面价(元/㎡):">
<el-input v-model="editForm.nominalFloorPrice"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="无偿移交比例(%)::">
<el-input v-model="editForm.percentUnpaidTransfers"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="实际楼面价(元/㎡):">
<el-input v-model="editForm.actualFloorPrice"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="溢价率(%):">
<el-input v-model="editForm.premiumRate"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="最后轮次:">
<el-input v-model="editForm.finalRound"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="竞得企业:">
<el-input v-model="editForm.winnerEnterprises"></el-input>
</el-form-item>
</el-col>
<el-col :span="8"> </el-col>
<!-- <el-col :span="8">-->
<!-- <el-button v-show="!readOnly" @click="save">保存</el-button>-->
<!-- </el-col>-->
</el-row>
</el-form>
<div class="dialog_op">
<el-button type="primary" @click="goBack"
>返回</el-button
>
<el-button type="primary" @click="goBack">返回</el-button>
<el-button type="primary" @click="save" v-show="!readOnly"
>保存</el-button
>保存</el-button
>
</div>
</div>
</template>
<script>
import {
queryList,
addData,
updateData,
delData,
exportHandLandToListExcel,
downloadHandLandTemplate,
} from "@/views/bigdata/api/city";
import {putAuction} from "./api/api";
import { putAuction, queryData } from "./api/api";
export default {
name: "newCity",
data() {
return {
searchForm: {
//
annoId: "",
//
landCode: "",
//
landUsage: "",
//
annoDate: "",
export default {
name: "newCity",
data() {
return {
searchForm: {
//
annoId: "",
//
landCode: "",
//
landUsage: "",
//
annoDate: "",
},
tableData: [],
//
cols: [
{
label: "年份",
prop: "year",
width: 150,
},
tableData: [],
//
cols: [
{
label: "年份",
prop: "year",
width: 150,
},
{
label: "城市",
prop: "city",
width: 150,
},
{
label: "GDP(亿元)",
prop: "gdp",
width: 150,
},
{
label: "GDP增速(%)",
prop: "gdpGrowth",
width: 150,
},
{
label: "第一产业(亿元)",
prop: "primaryIndustry",
width: 150,
},
{
label: "第二产业(亿元)",
prop: "secondIndustry",
width: 150,
},
{
label: "第三产业(亿元)",
prop: "thirdIndustry",
width: 150,
},
{
label: "城镇常住人口(万人)",
prop: "urbanResidents",
width: 150,
},
{
label: "常住人口(万人)",
prop: "resident",
width: 150,
},
{
label: "城镇化率",
prop: "urbanRate",
width: 150,
},
{
label: "主城九区常住人口(万人)",
prop: "mainUrbanResidents",
width: 150,
},
{
label: "城镇居民人均收入(元)",
prop: "urbanPerIncome",
width: 150,
},
{
label: "城镇居民收入增速(%)",
prop: "urbanIncomeIncrease",
width: 150,
},
{
label: "房地产投资额(亿元)",
prop: "realEstateInvest",
width: 150,
},
{
label: "固定资产投资额(亿元)",
prop: "fixedInvestments",
width: 150,
},
{
label: "房地产占比(%)",
prop: "perRealestate",
width: 150,
},
],
//
loading: false,
//
selectedData: [],
page: {
total: 0, //
currentPage: 1, //
pageSize: 10, //
{
label: "城市",
prop: "city",
width: 150,
},
//
readOnly: true,
//
hasSelectData: false,
//
dialogFormVisible: false,
dialogTitle: "新增数据",
// Form
editForm: {},
};
},
created() {
let newObj = {};
for (let col of this.cols) {
newObj[col.prop] = "";
}
this.editForm = newObj;
if (this.$route.query.readOnly==='true'){
this.readOnly = true;
let row=JSON.parse(this.$route.query.data)
this.editForm = row;
}else {
this.readOnly = false;
}
if (this.$route.query.isEditOr==='true'){
let row=JSON.parse(this.$route.query.data)
this.editForm = row;
console.log(row);
}
},
methods: {
goBack(){
window.history.back()
},
//
clearSelection() {
this.$refs.multipleTable.clearSelection();
},
//
onSubmit() {
this.tableLoading = true;
let param = Object.assign(
{
current: this.page.currentPage,
size: this.page.pageSize,
},
this.searchForm
);
queryList(param).then((response) => {
this.tableData = response.data.data.records;
this.page.total = response.data.data.total;
this.loading = false;
});
},
//
onReset() {
for (let item in this.searchForm) {
this.searchForm[item] = "";
}
},
handleSizeChange(val) {
this.page.pageSize = val;
},
handleCurrentChange(val) {
this.page.currentPage = val;
},
//
handleSelectionChange(val) {
this.selectedData = val;
},
//
newItem() {
// cols
let newObj = {};
for (let col of this.cols) {
newObj[col.prop] = "";
}
this.editForm = newObj;
this.readOnly = false;
this.dialogFormVisible = true;
},
//
editItem(row) {
this.dialogTitle = "编辑数据";
this.readOnly = false;
this.dialogFormVisible = true;
this.editForm = row;
{
label: "GDP(亿元)",
prop: "gdp",
width: 150,
},
{
label: "GDP增速(%)",
prop: "gdpGrowth",
width: 150,
},
{
label: "第一产业(亿元)",
prop: "primaryIndustry",
width: 150,
},
{
label: "第二产业(亿元)",
prop: "secondIndustry",
width: 150,
},
{
label: "第三产业(亿元)",
prop: "thirdIndustry",
width: 150,
},
{
label: "城镇常住人口(万人)",
prop: "urbanResidents",
width: 150,
},
{
label: "常住人口(万人)",
prop: "resident",
width: 150,
},
{
label: "城镇化率",
prop: "urbanRate",
width: 150,
},
{
label: "主城九区常住人口(万人)",
prop: "mainUrbanResidents",
width: 150,
},
{
label: "城镇居民人均收入(元)",
prop: "urbanPerIncome",
width: 150,
},
{
label: "城镇居民收入增速(%)",
prop: "urbanIncomeIncrease",
width: 150,
},
{
label: "房地产投资额(亿元)",
prop: "realEstateInvest",
width: 150,
},
{
label: "固定资产投资额(亿元)",
prop: "fixedInvestments",
width: 150,
},
{
label: "房地产占比(%)",
prop: "perRealestate",
width: 150,
},
],
//
loading: false,
//
selectedData: [],
page: {
total: 0, //
currentPage: 1, //
pageSize: 10, //
},
//
delItem(row) {
delData(row.data_id).then((res) => {
//
readOnly: true,
//
hasSelectData: false,
//
dialogFormVisible: false,
dialogTitle: "新增数据",
// Form
editForm: {},
};
},
created() {
let newObj = {};
for (let col of this.cols) {
newObj[col.prop] = "";
}
this.editForm = newObj;
if (this.$route.query.readOnly === "true") {
this.readOnly = true;
queryData(this.$route.query.data).then((res) => {
console.log(res);
this.editForm = res.data.data;
});
} else {
this.readOnly = false;
}
if (this.$route.query.isEditOr === "true") {
queryData(this.$route.query.data).then((res) => {
console.log(res);
this.editForm = res.data.data;
});
}
},
methods: {
goBack() {
window.history.back();
},
//
save() {
putAuction(this.editForm).then((res) => {
if (res.data.success) {
this.$message("保存成功");
window.history.back();
} else {
console.debug(res);
});
},
//
viewItem(row) {
this.dialogTitle = "查看数据";
this.readOnly = true;
this.dialogFormVisible = true;
this.editForm = row;
},
//
save() {
// if (this.dialogTitle == "") {
// addData(this.editForm).then((res) => {
// this.dialogFormVisible = false;
// if (res.success) {
// this.$message("");
// this.dialogFormVisible = false;
// } else {
// console.debug(res);
// this.$message.error("");
// }
// });
// } else if (this.dialogTitle == "") {
putAuction(this.editForm).then((res) => {
if (res.data.success) {
this.$message("保存成功");
window.history.back()
} else {
console.debug(res);
this.$message.error("保存失败");
}
});
// }
},
//
downloadTemplate() {
downloadHandLandTemplate().then((res) => {
let url = res.data.data;
downUrlFile(url);
});
},
//
exportData() {
if (this.selectedData.length < 1) {
this.$message({
message: "未选中数据",
type: "warning",
});
return;
}
//proposedseriaId
let ids = [];
for (let item of this.selectedData) {
ids.push(item["proposedseriaId"]);
this.$message.error("保存失败");
}
console.debug(ids);
exportHandLandToListExcel(ids.toString()).then((res) => {
console.debug(res);
});
},
});
// }
},
}
},
};
</script>
<style scoped lang="less">
/deep/ .el-collapse-item__header{
padding: 0 20px;
}
/deep/ .el-input {
width: 90%;
}
/deep/ .el-collapse-item {
margin-bottom: 10px;
padding-left: 10px;
background-color: white;
}
/deep/ .el-collapse-item__header {
padding: 0 20px;
}
/deep/ .el-input {
width: 90%;
}
/deep/ .el-collapse-item {
margin-bottom: 10px;
padding-left: 10px;
background-color: white;
}
/deep/ .el-collapse-item__wrap {
border-top: 1px solid #e8eaec;
}
/deep/ .upload-demo {
text-align: center;
}
/deep/ .el-upload__tip {
text-align: right;
}
.ti-box {
span {
font-size: 1rem;
}
/deep/ .el-collapse-item__wrap {
border-top: 1px solid #e8eaec;
}
/deep/ .upload-demo {
text-align: center;
}
/deep/ .el-upload__tip {
text-align: right;
}
.ti-box {
span {
font-size: 1rem;
}
}
.dialog_op {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
text-align: right;
background-color: white;
border-top: 1px solid #e8eaec;
padding: 5px;
z-index: 99999;
}
.tipsMy{
font-size: 11px;
margin-left: 20px;
margin-top: 20px;
display: inline-block;
}
/deep/ .el-row{
padding: 0 20px;
padding-top: 10px;
background-color: white;
box-shadow: 0px 5px 20px 0px rgba(208, 208, 208, 0.18);
}
/deep/ .el-form-item{
display: flex;
padding-top: 20px;
}
/deep/ .el-form-item__label{
width: 180px;
}
.myForm{
flex: 1;
overflow: auto;
margin: 20px;
padding: 20px 0;
width: calc(100% - 40px);
/*margin-top: 0;*/
background-color: white;
box-shadow: 0px 5px 20px 0px rgba(208, 208, 208, 0.18);
}
.dialog_op {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
text-align: right;
background-color: white;
border-top: 1px solid #e8eaec;
padding: 5px;
z-index: 99999;
}
.tipsMy {
font-size: 11px;
margin-left: 20px;
margin-top: 20px;
display: inline-block;
}
/deep/ .el-row {
padding: 0 20px;
padding-top: 10px;
background-color: white;
box-shadow: 0px 5px 20px 0px rgba(208, 208, 208, 0.18);
}
/deep/ .el-form-item {
display: flex;
padding-top: 20px;
}
/deep/ .el-form-item__label {
width: 180px;
}
.myForm {
flex: 1;
overflow: auto;
margin: 20px;
padding: 20px 0;
width: calc(100% - 40px);
/*margin-top: 0;*/
background-color: white;
box-shadow: 0px 5px 20px 0px rgba(208, 208, 208, 0.18);
}
</style>
Loading…
Cancel
Save