Browse Source

修改楼盘处理逻辑

develop
王健 4 years ago
parent
commit
f57469e10c
  1. 15
      src/views/sale/api/index.js
  2. 49
      src/views/sale/index.vue

15
src/views/sale/api/index.js

@ -12,7 +12,7 @@ export function getSaleList(query) {
//根据ID查询楼盘
export function getSaleId(query) {
return request({
url: '/api/blocks_origin/'+query,
url: '/api/blocks_origin/' + query,
method: 'get',
})
}
@ -35,9 +35,16 @@ export function changeHouse(query) {
//查询字典
export function getDict(data) {
return request({
url:"/admin/dict/type/"+data,
method:"get",
url: "/admin/dict/type/" + data,
method: "get",
// params:data
})
}
//查询已挂牌地块列表
export function getListedLands(query) {
return request({
url: '/api/landlisted',
method: 'get',
params: query
})
}

49
src/views/sale/index.vue

@ -189,7 +189,7 @@
v-model="ruleForm.name"
filterable
allow-create
placeholder="请选择"
placeholder="请选择楼盘"
style="width: 100%"
>
<el-option
@ -203,11 +203,25 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="公告编号:">
<el-input
v-model="ruleForm.annoId"
placeholder="请输入公告编号"
></el-input>
<el-form-item label="关联地块:">
<el-select
v-model="ruleForm.landListedId"
placeholder="请选择关联地块"
filterable
multiple
remote
:loading="landLoading"
:remote-method="remoteMethod"
style="width: 100%"
>
<el-option
v-for="item in landList"
:key="item.landListedId"
:label="item.landCode"
:value="item.landListedId"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -321,6 +335,7 @@ export default {
},
tableData: [],
loading: false,
landLoading: false,
page: {
total: 0, //
currentPage: 1, //
@ -410,6 +425,7 @@ export default {
desc: [{ required: true, message: "请填写活动形式", trigger: "blur" }],
},
nameList: [],
landList: [],
initData: {
住宅: {
高层: ["高层", "小高层"],
@ -444,6 +460,9 @@ export default {
for (var key in this.initData) {
this.wuyeType.push(key);
}
api.getListedLands().then((response) => {
this.landList = response.data.data.records;
});
},
mounted: function () {
this.onSubmit();
@ -470,6 +489,17 @@ export default {
// },
},
methods: {
remoteMethod(query) {
if (query !== "") {
this.landLoading = true;
api.getListedLands({ landCode: query }).then((response) => {
this.landList = response.data.data.records;
this.landLoading = false;
});
} else {
this.landList = [];
}
},
getBigye() {
if (!this.params.propertyType) {
return false;
@ -501,10 +531,11 @@ export default {
);
}
}
this.$set(this.params, "name", this.ruleForm.name);
debugger
// this.$set(this.params, "name", this.ruleForm.name);
this.$set(this.params, "blockId", this.ruleForm.blockId);
this.$set(this.params, "annoId", this.ruleForm.annoId);
this.$set(this.params, "statusCd", "0");
this.$set(this.params, "landListedId", this.ruleForm.landListedId);
// this.$set(this.params, "statusCd", "0");
this.dialogLoad = true;
this.$refs[formName].validate((valid) => {
if (valid) {

Loading…
Cancel
Save