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="房号" placeholder="房号"
size="small" size="small"
clearable clearable
@change="handleChangeH"
style="width: 120px" style="width: 120px"
class="resi-cell-select" class="resi-cell-select"
> >
@ -125,10 +126,14 @@
class="item_width_1" class="item_width_1"
maxlength="50" maxlength="50"
show-word-limit show-word-limit
style="width: 200px;margin-right:20px;"
placeholder="请输入姓名 " placeholder="请输入姓名 "
v-model="fmData.name" v-model="fmData.name"
> >
</el-input> </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>
<el-form-item <el-form-item
@ -288,6 +293,7 @@
maxlength="50" maxlength="50"
show-word-limit show-word-limit
placeholder="请输入户主姓名" placeholder="请输入户主姓名"
:disabled="fmData.alreadyHaveMaster"
v-model="fmData.houseHolderName" v-model="fmData.houseHolderName"
> >
</el-input> </el-input>
@ -375,6 +381,7 @@ function iniFmData() {
mobile: "", mobile: "",
idCard: "", idCard: "",
welfare: "", //01 welfare: "", //01
isResiUser: "",
gender: "", gender: "",
birthplace: "", birthplace: "",
father: "", father: "",
@ -383,6 +390,7 @@ function iniFmData() {
reportDate: "", reportDate: "",
houseHolderName: "", houseHolderName: "",
houseHolderRelation: "", houseHolderRelation: "",
alreadyHaveMaster: false,
}; };
} }
@ -511,6 +519,10 @@ export default {
this.fmData.homeId = ""; this.fmData.homeId = "";
this.getHouseList(); this.getHouseList();
}, },
handleChangeH(val) {
console.log("val", val);
this.getHouseMaster();
},
getRelationList() { getRelationList() {
const { user } = this.$store.state; 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() { handleAddStaff() {
this.fmData.organizationPersonnel = [ this.fmData.organizationPersonnel = [
...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-row class="resi-row">
<el-col :span="6"> <el-col :span="6">
<div class="resi-cell"> <div class="resi-cell2">
<div class="resi-cell-label">所属网格</div> <div class="resi-cell2-label">所属网格</div>
<div class="resi-cell-value"> <div class="resi-cell2-value">
<el-select <el-select
v-model.trim="fmData.gridId" v-model.trim="fmData.gridId"
placeholder="请选择" placeholder="请选择"
size="small" size="small"
clearable clearable
class="resi-cell-select" class="resi-cell2-select"
@change="handleChangeGrid" @change="handleChangeGrid"
> >
<el-option <el-option
@ -32,15 +32,15 @@
</div> </div>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<div class="resi-cell"> <div class="resi-cell2">
<div class="resi-cell-label">所属房屋</div> <div class="resi-cell2-label">所属房屋</div>
<div class="resi-cell-value"> <div class="resi-cell2-value">
<el-select <el-select
v-model.trim="fmData.villageId" v-model.trim="fmData.villageId"
placeholder="请选择小区" placeholder="请选择小区"
size="small" size="small"
clearable clearable
class="resi-cell-select" class="resi-cell2-select"
@clear="handleClearVillage" @clear="handleClearVillage"
@change="handleChangeV" @change="handleChangeV"
> >
@ -58,7 +58,7 @@
size="small" size="small"
clearable clearable
style="width: 120px" style="width: 120px"
class="resi-cell-select" class="resi-cell2-select"
:disabled="changeVDisabled" :disabled="changeVDisabled"
@clear="handleClearBuild" @clear="handleClearBuild"
@change="handleChangeB" @change="handleChangeB"
@ -78,7 +78,7 @@
size="small" size="small"
clearable clearable
style="width: 120px" style="width: 120px"
class="resi-cell-select" class="resi-cell2-select"
@click="handleClearDan" @click="handleClearDan"
@change="handleChangeD" @change="handleChangeD"
> >
@ -97,7 +97,7 @@
size="small" size="small"
clearable clearable
style="width: 120px" style="width: 120px"
class="resi-cell-select" class="resi-cell2-select"
> >
<el-option <el-option
v-for="item in optionsH" v-for="item in optionsH"
@ -115,7 +115,7 @@
<el-form-item label="姓名" prop="name"> <el-form-item label="姓名" prop="name">
<el-input <el-input
v-model="fmData.name" v-model="fmData.name"
class="resi-cell-input" class="resi-cell2-input"
size="small" size="small"
clearable clearable
placeholder="请输入" placeholder="请输入"
@ -126,7 +126,7 @@
<el-form-item label="手机号" prop="mobile"> <el-form-item label="手机号" prop="mobile">
<el-input <el-input
v-model="fmData.mobile" v-model="fmData.mobile"
class="resi-cell-input" class="resi-cell2-input"
size="small" size="small"
clearable clearable
placeholder="请输入" placeholder="请输入"
@ -137,7 +137,7 @@
<el-form-item label="身份证号" prop="idCard"> <el-form-item label="身份证号" prop="idCard">
<el-input <el-input
v-model="fmData.idCard" v-model="fmData.idCard"
class="resi-cell-input" class="resi-cell2-input"
size="small" size="small"
clearable clearable
placeholder="请输入" placeholder="请输入"
@ -164,7 +164,7 @@
size="small" size="small"
clearable clearable
style="width: 120px" style="width: 120px"
class="resi-cell-select" class="resi-cell2-select"
> >
<el-option <el-option
v-for="item in optionsWelfare" v-for="item in optionsWelfare"
@ -892,12 +892,12 @@ export default {
overflow: visible; overflow: visible;
} }
.demo-form-inline .resi-cell { .demo-form-inline .resi-cell2 {
display: flex; display: flex;
align-items: center; align-items: center;
// margin-bottom: 20px; margin-bottom: 20px;
.resi-cell-label { .resi-cell2-label {
flex-shrink: 0; flex-shrink: 0;
min-width: 0; min-width: 0;
box-sizing: border-box; box-sizing: border-box;
@ -905,21 +905,21 @@ export default {
// text-align: right; // text-align: right;
// line-height: 32; // line-height: 32;
} }
.resi-cell-label1 { .resi-cell2-label1 {
width: max-content; width: max-content;
} }
.resi-cell-value-radio { .resi-cell2-value-radio {
display: flex; display: flex;
align-items: center; align-items: center;
min-height: 32px; min-height: 32px;
} }
.resi-cell-input { .resi-cell2-input {
width: 200px; width: 200px;
} }
.resi-cell--daterange { .resi-cell2--daterange {
max-width: 260px; max-width: 260px;
} }
.resi-cell-select { .resi-cell2-select {
width: 200px; width: 200px;
box-sizing: border-box; box-sizing: border-box;
margin-right: 10px; margin-right: 10px;
@ -930,7 +930,7 @@ export default {
width: 88px; width: 88px;
} }
} }
.resi-cell-select:last-child { .resi-cell2-select:last-child {
margin-right: 0; margin-right: 0;
} }
} }

Loading…
Cancel
Save