|
@@ -1,13 +1,7 @@
|
|
|
<template>
|
|
|
<div class="phone">
|
|
|
<div class="search">
|
|
|
- <el-input
|
|
|
- placeholder="请输入管理处名称/电话"
|
|
|
- maxlength="11"
|
|
|
- class="search-input"
|
|
|
- clearable
|
|
|
- v-model="mixins_query.location"
|
|
|
- ></el-input>
|
|
|
+ <el-input placeholder="请输入管理处名称/电话" maxlength="11" class="search-input" clearable v-model="location"></el-input>
|
|
|
<el-select placeholder="请选择所属地区" v-model="mixins_query.communityId" clearable>
|
|
|
<el-option v-for="(item, index) in communityListCreate" :key="index" :label="item.label" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
@@ -79,7 +73,7 @@
|
|
|
<el-form-item label="电话号码" prop="newPhone">
|
|
|
<el-input
|
|
|
v-model="ruleForm.newPhone"
|
|
|
- placeholder="列如:010-26888888,13800000001"
|
|
|
+ placeholder="例如:010-26888888,13888888888"
|
|
|
maxlength="11"
|
|
|
@keyup.enter.native="dialogButton('addSave')"
|
|
|
></el-input>
|
|
@@ -103,7 +97,7 @@
|
|
|
<div>
|
|
|
<p>确认删除</p>
|
|
|
<p>
|
|
|
- 是否删除 --- <span class="delete-name">{{ deleteName }}</span>
|
|
|
+ 是否删除对应的记录 --- <span class="delete-name">{{ deleteName }}</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -202,6 +196,13 @@ export default {
|
|
|
},
|
|
|
/**查询按钮*/
|
|
|
searchInfo() {
|
|
|
+ if (this.location) {
|
|
|
+ if (isNaN(this.location)) {
|
|
|
+ this.mixins_query.name = this.location;
|
|
|
+ } else {
|
|
|
+ this.mixins_query.telephone = this.location;
|
|
|
+ }
|
|
|
+ }
|
|
|
this.mixins_search();
|
|
|
},
|
|
|
/**
|
|
@@ -213,6 +214,9 @@ export default {
|
|
|
if (type == 'addSave') {
|
|
|
this.$refs['ruleForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ if (this.ruleForm.newManagementName && this.ruleForm.newManagementName.indexOf('中心') != -1) {
|
|
|
+ return this.$message.warning('不能包含中心');
|
|
|
+ }
|
|
|
let query = {
|
|
|
communityId: this.ruleForm.communityList,
|
|
|
name: this.ruleForm.newManagementName,
|
|
@@ -224,6 +228,7 @@ export default {
|
|
|
if (!this.enditShow) {
|
|
|
this.$http.post('/sc-community-web/property/telephone/add', query).then((res) => {
|
|
|
this.message(res.status, '添加');
|
|
|
+ this.$refs['ruleForm'].resetFields();
|
|
|
});
|
|
|
console.log('点击保存', this.ruleForm);
|
|
|
}
|
|
@@ -307,8 +312,29 @@ export default {
|
|
|
this.centerDialogVisible = true;
|
|
|
this.enditShow = true;
|
|
|
} else {
|
|
|
- this.deleteName = row.telephone;
|
|
|
- this.dialogVisibleDelete = true;
|
|
|
+ // this.deleteName = row.telephone;
|
|
|
+ // this.dialogVisibleDelete = true;
|
|
|
+ const { communityName, buildingName, unitName, roomNumber } = row;
|
|
|
+ // let title = `是否确定删除对应的记录${communityName}${buildingName}${unitName}${telephone}”`;
|
|
|
+ let title = `是否确定删除对应的记录`;
|
|
|
+ this.$msgBox(title)
|
|
|
+ .then(() => {
|
|
|
+ let query = {
|
|
|
+ id: this.rowId
|
|
|
+ };
|
|
|
+ this.$http
|
|
|
+ .get('/sc-community-web/property/telephone/delete', query)
|
|
|
+ .then(({ status, msg }) => {
|
|
|
+ if (0 === status) {
|
|
|
+ this.$message.success(msg);
|
|
|
+ this.mixins_search();
|
|
|
+ } else {
|
|
|
+ this.$message.error(msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
}
|
|
|
}
|