Browse Source

继续改

shibei_master
dai 3 years ago
parent
commit
57609aec88
  1. 63
      src/views/modules/base/huji/chusheng/cpts/edit.vue
  2. 13
      src/views/modules/base/huji/chusheng/index.vue

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

@ -136,7 +136,7 @@
>享受福利</el-checkbox >享受福利</el-checkbox
> >
<el-checkbox <el-checkbox
v-model="fmData.isResiUser" v-model="fmData.isCheck"
true-label="1" true-label="1"
false-label="0" false-label="0"
@change="checkResiAvailable" @change="checkResiAvailable"
@ -292,7 +292,7 @@
<el-form-item <el-form-item
label="户主姓名" label="户主姓名"
prop="houseHolderName" prop="householderName"
label-width="150px" label-width="150px"
style="display: block" style="display: block"
> >
@ -302,19 +302,19 @@
show-word-limit show-word-limit
placeholder="请输入户主姓名" placeholder="请输入户主姓名"
:disabled="fmData.alreadyHaveMaster" :disabled="fmData.alreadyHaveMaster"
v-model="fmData.houseHolderName" v-model="fmData.householderName"
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="与户主关系" label="与户主关系"
prop="houseHolderRelation" prop="householderRelation"
label-width="150px" label-width="150px"
style="display: block" style="display: block"
> >
<el-select <el-select
v-model.trim="fmData.houseHolderRelation" v-model.trim="fmData.householderRelation"
placeholder="与户主关系" placeholder="与户主关系"
size="small" size="small"
clearable clearable
@ -365,21 +365,17 @@
</template> </template>
<script> <script>
import { mapGetters } from "vuex";
import { Loading } from "element-ui"; // Loading import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper"; import formVltHelper from "dai-js/tools/formVltHelper";
import { computedCard } from "@/utils/index"; import { computedCard } from "@/utils/index";
import { isCard, isMobile } from "@/utils/validate"; import { isCard } from "@/utils/validate";
var map;
var search;
var markers;
var infoWindowList;
let loading; // let loading; //
function iniFmData() { function iniFmData() {
return { return {
id: "",
gridId: "", gridId: "",
villageId: "", villageId: "",
buildId: "", buildId: "",
@ -389,15 +385,15 @@ function iniFmData() {
mobile: "", mobile: "",
idCard: "", idCard: "",
isWelfare: "0", //01 isWelfare: "0", //01
isResiUser: "0", isCheck: "0",
gender: "", gender: "",
birthplace: "", birthplace: "",
father: "", father: "",
mother: "", mother: "",
count: "", count: "",
reportDate: "", reportDate: "",
houseHolderName: "", householderName: "",
houseHolderRelation: "", householderRelation: "",
alreadyHaveMaster: false, alreadyHaveMaster: false,
}; };
} }
@ -483,9 +479,9 @@ export default {
methods: { methods: {
async checkResiAvailable() { async checkResiAvailable() {
const { const {
fmData: { idCard, isResiUser }, fmData: { idCard, isCheck },
} = this; } = this;
if (isResiUser == "1" && isCard(idCard)) { if (isCheck == "1" && isCard(idCard)) {
const { data, code, msg } = await requestPost( const { data, code, msg } = await requestPost(
"/epmetuser/icresiuser/checkuser", "/epmetuser/icresiuser/checkuser",
{ {
@ -680,7 +676,7 @@ export default {
console.log("获取户主信息成功", res.data); console.log("获取户主信息成功", res.data);
const { name } = res.data; const { name } = res.data;
if (name) { if (name) {
this.fmData.houseHolderName = name; this.fmData.householderName = name;
this.alreadyHaveMaster = true; this.alreadyHaveMaster = true;
} else { } else {
this.alreadyHaveMaster = false; this.alreadyHaveMaster = false;
@ -692,25 +688,28 @@ export default {
}); });
}, },
handleAddStaff() {
this.fmData.organizationPersonnel = [
...this.fmData.organizationPersonnel,
{ personName: "", personPhone: "" },
];
},
handleDelStaff(index) {
const { organizationPersonnel } = this.fmData;
organizationPersonnel.splice(index, 1);
this.fmData.organizationPersonnel = organizationPersonnel;
},
async initForm(type, row) { async initForm(type, row) {
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
this.formType = type; this.formType = type;
console.log(row); console.log(row);
if (row) { if (row) {
this.fmData = { ...this.fmData, ...row }; // this.fmData = { ...this.fmData, ...row };
this.getInfo(row.id);
}
},
async getInfo(id) {
const { data, code, msg } = await requestPost(
"/epmetuser/icBirthRecord",
{
id,
}
);
if (code === 0) {
this.fmData = { ...this.fmData, ...data };
} else {
this.$message.error(msg);
} }
}, },
@ -738,9 +737,9 @@ export default {
async submit() { async submit() {
let url = ""; let url = "";
if (this.formType === "add") { if (this.formType === "add") {
url = "/epmetuser/birth/save"; url = "/epmetuser/icBirthRecord/save";
} else { } else {
url = "/epmetuser/birth/edit"; url = "/epmetuser/icBirthRecord/update";
this.fmData.orgId = this.orgId; this.fmData.orgId = this.orgId;
} }

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

@ -159,7 +159,7 @@
<el-form-item label="享受福利" prop="remark"> <el-form-item label="享受福利" prop="remark">
<el-select <el-select
v-model.trim="fmData.welfare" v-model.trim="fmData.isWelfare"
placeholder="享受福利" placeholder="享受福利"
size="small" size="small"
clearable clearable
@ -303,11 +303,11 @@
<el-table-column prop="reportDate" align="center" label="申报户口日期"> <el-table-column prop="reportDate" align="center" label="申报户口日期">
</el-table-column> </el-table-column>
<el-table-column prop="houseHolderName" align="center" label="户主姓名"> <el-table-column prop="householderName" align="center" label="户主姓名">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="houseHolderRelation" prop="householderRelation"
align="center" align="center"
label="与户主关系" label="与户主关系"
> >
@ -435,7 +435,7 @@ export default {
name: "", name: "",
mobile: "", mobile: "",
idCard: "", idCard: "",
welfare: "", //01 isWelfare: "", //01
birthdayStart: "", birthdayStart: "",
birthdayEnd: "", birthdayEnd: "",
birthdayTime: ["", ""], birthdayTime: ["", ""],
@ -764,8 +764,7 @@ export default {
}, },
async handleChu() { async handleChu() {
const url = const url = "/epmetuser/icBirthRecord/export";
"/heart/iccommunityselforganization/exportcommunityselforganization";
const { pageSize, pageNo, fmData } = this; const { pageSize, pageNo, fmData } = this;
axios({ axios({
url: window.SITE_CONFIG["apiURL"] + url, url: window.SITE_CONFIG["apiURL"] + url,
@ -834,7 +833,7 @@ export default {
}, },
async getTableData() { async getTableData() {
const url = "/epmetuser/birth/page"; const url = "/epmetuser/icBirthRecord/page";
const { pageSize, pageNo, fmData } = this; const { pageSize, pageNo, fmData } = this;
const { data, code, msg } = await requestPost(url, { const { data, code, msg } = await requestPost(url, {
pageSize, pageSize,

Loading…
Cancel
Save