Browse Source

方法

shibei_master
dai 3 years ago
parent
commit
98c51e155d
  1. 37
      src/views/modules/base/huji/chusheng/cpts/edit.vue
  2. 48
      src/views/modules/base/huji/chusheng/index.vue

37
src/views/modules/base/huji/chusheng/cpts/edit.vue

@ -102,6 +102,7 @@
placeholder="房号"
size="small"
clearable
@change="handleChangeH"
style="width: 120px"
class="resi-cell-select"
>
@ -125,10 +126,14 @@
class="item_width_1"
maxlength="50"
show-word-limit
style="width: 200px;margin-right:20px;"
placeholder="请输入姓名 "
v-model="fmData.name"
>
</el-input>
<el-checkbox v-model="fmData.welfare" true-label="1" false-label="0" >享受福利</el-checkbox>
<el-checkbox v-model="fmData.isResiUser" true-label="1" false-label="0">补充居民信息</el-checkbox>
</el-form-item>
<el-form-item
@ -288,6 +293,7 @@
maxlength="50"
show-word-limit
placeholder="请输入户主姓名"
:disabled="fmData.alreadyHaveMaster"
v-model="fmData.houseHolderName"
>
</el-input>
@ -375,6 +381,7 @@ function iniFmData() {
mobile: "",
idCard: "",
welfare: "", //01
isResiUser: "",
gender: "",
birthplace: "",
father: "",
@ -383,6 +390,7 @@ function iniFmData() {
reportDate: "",
houseHolderName: "",
houseHolderRelation: "",
alreadyHaveMaster: false,
};
}
@ -511,6 +519,10 @@ export default {
this.fmData.homeId = "";
this.getHouseList();
},
handleChangeH(val) {
console.log("val", val);
this.getHouseMaster();
},
getRelationList() {
const { user } = this.$store.state;
@ -620,6 +632,31 @@ export default {
});
},
getHouseMaster() {
const { homeId } = this.fmData;
if (!homeId) return (this.alreadyHaveMaster = false);
this.$http
.post("/epmetuser/icresiuser/queryhousehold/" + homeId, {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取户主信息成功", res.data);
const { name } = res.data;
if (name) {
this.fmData.houseHolderName = name;
this.alreadyHaveMaster = true;
} else {
this.alreadyHaveMaster = false;
}
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
handleAddStaff() {
this.fmData.organizationPersonnel = [
...this.fmData.organizationPersonnel,

48
src/views/modules/base/huji/chusheng/index.vue

@ -9,15 +9,15 @@
>
<el-row class="resi-row">
<el-col :span="6">
<div class="resi-cell">
<div class="resi-cell-label">所属网格</div>
<div class="resi-cell-value">
<div class="resi-cell2">
<div class="resi-cell2-label">所属网格</div>
<div class="resi-cell2-value">
<el-select
v-model.trim="fmData.gridId"
placeholder="请选择"
size="small"
clearable
class="resi-cell-select"
class="resi-cell2-select"
@change="handleChangeGrid"
>
<el-option
@ -32,15 +32,15 @@
</div>
</el-col>
<el-col :span="18">
<div class="resi-cell">
<div class="resi-cell-label">所属房屋</div>
<div class="resi-cell-value">
<div class="resi-cell2">
<div class="resi-cell2-label">所属房屋</div>
<div class="resi-cell2-value">
<el-select
v-model.trim="fmData.villageId"
placeholder="请选择小区"
size="small"
clearable
class="resi-cell-select"
class="resi-cell2-select"
@clear="handleClearVillage"
@change="handleChangeV"
>
@ -58,7 +58,7 @@
size="small"
clearable
style="width: 120px"
class="resi-cell-select"
class="resi-cell2-select"
:disabled="changeVDisabled"
@clear="handleClearBuild"
@change="handleChangeB"
@ -78,7 +78,7 @@
size="small"
clearable
style="width: 120px"
class="resi-cell-select"
class="resi-cell2-select"
@click="handleClearDan"
@change="handleChangeD"
>
@ -97,7 +97,7 @@
size="small"
clearable
style="width: 120px"
class="resi-cell-select"
class="resi-cell2-select"
>
<el-option
v-for="item in optionsH"
@ -115,7 +115,7 @@
<el-form-item label="姓名" prop="name">
<el-input
v-model="fmData.name"
class="resi-cell-input"
class="resi-cell2-input"
size="small"
clearable
placeholder="请输入"
@ -126,7 +126,7 @@
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="fmData.mobile"
class="resi-cell-input"
class="resi-cell2-input"
size="small"
clearable
placeholder="请输入"
@ -137,7 +137,7 @@
<el-form-item label="身份证号" prop="idCard">
<el-input
v-model="fmData.idCard"
class="resi-cell-input"
class="resi-cell2-input"
size="small"
clearable
placeholder="请输入"
@ -164,7 +164,7 @@
size="small"
clearable
style="width: 120px"
class="resi-cell-select"
class="resi-cell2-select"
>
<el-option
v-for="item in optionsWelfare"
@ -892,12 +892,12 @@ export default {
overflow: visible;
}
.demo-form-inline .resi-cell {
.demo-form-inline .resi-cell2 {
display: flex;
align-items: center;
// margin-bottom: 20px;
margin-bottom: 20px;
.resi-cell-label {
.resi-cell2-label {
flex-shrink: 0;
min-width: 0;
box-sizing: border-box;
@ -905,21 +905,21 @@ export default {
// text-align: right;
// line-height: 32;
}
.resi-cell-label1 {
.resi-cell2-label1 {
width: max-content;
}
.resi-cell-value-radio {
.resi-cell2-value-radio {
display: flex;
align-items: center;
min-height: 32px;
}
.resi-cell-input {
.resi-cell2-input {
width: 200px;
}
.resi-cell--daterange {
.resi-cell2--daterange {
max-width: 260px;
}
.resi-cell-select {
.resi-cell2-select {
width: 200px;
box-sizing: border-box;
margin-right: 10px;
@ -930,7 +930,7 @@ export default {
width: 88px;
}
}
.resi-cell-select:last-child {
.resi-cell2-select:last-child {
margin-right: 0;
}
}

Loading…
Cancel
Save