家长维护幼儿信息

This commit is contained in:
sk1551 2020-09-11 10:33:30 +08:00
parent b451bcce02
commit 78b5044e39
5 changed files with 171 additions and 45 deletions

View File

@ -26,6 +26,15 @@ export function getChild(id) {
}) })
} }
// 查询维护幼儿详细
export function getChild_query(query) {
return request({
url: '/benyi/child/getInfo',
method: 'get',
params: query
})
}
// 新增幼儿信息 // 新增幼儿信息
export function addChild(data) { export function addChild(data) {
return request({ return request({
@ -45,9 +54,9 @@ export function updateChild(data) {
} }
// 修改幼儿信息 // 修改幼儿信息
export function updateChild_tb(data,id) { export function updateChild_tb(data, id) {
return request({ return request({
url: '/benyi/child/'+id, url: '/benyi/child/' + id,
method: 'put', method: 'put',
data: data data: data
}) })

View File

@ -88,6 +88,17 @@
v-hasPermi="['benyi:child:edit']" v-hasPermi="['benyi:child:edit']"
>调班</el-button> >调班</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-tooltip effect="dark" content="点我,可以复制链接发送给所有家长补填幼儿信息呦" placement="top-start">
<el-button
type="primary"
icon="el-icon-document-copy"
size="mini"
@click="copy($event,inviteCode)"
v-hasPermi="['benyi:child:add']"
>家长填报链接</el-button>
</el-tooltip>
</el-col>
</el-row> </el-row>
<el-table v-loading="loading" :data="childList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="childList" @selection-change="handleSelectionChange">
@ -289,12 +300,12 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="第一语言" prop="firstLanguage"> <el-form-item label="第一语言" prop="firstLanguage">
<el-input v-model="form.firstLanguage" placeholder="请输入第一语言" /> <el-input v-model="form.firstLanguage" placeholder="请输入第一语言" maxlength="2"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="第二语言" prop="seconderLanguage"> <el-form-item label="第二语言" prop="seconderLanguage">
<el-input v-model="form.seconderLanguage" placeholder="请输入第二语言" /> <el-input v-model="form.seconderLanguage" placeholder="请输入第二语言" maxlength="2" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -357,6 +368,10 @@ import { listClass } from "@/api/system/class";
// //
import VDistpicker from "v-distpicker"; import VDistpicker from "v-distpicker";
// ip
import { getUserProfile } from "@/api/system/user";
//
import Clipboard from "clipboard";
export default { export default {
name: "Child", name: "Child",
@ -382,6 +397,8 @@ export default {
city: null, city: null,
area: null, area: null,
}, },
//
inviteCode: "",
// //
loading: true, loading: true,
// //
@ -492,12 +509,48 @@ export default {
this.getDicts("sys_dm_ryqd").then((response) => { this.getDicts("sys_dm_ryqd").then((response) => {
this.sourceOptions = response.data; this.sourceOptions = response.data;
}); });
this.getLink();
}, },
components: { components: {
// //
VDistpicker, VDistpicker,
}, },
methods: { methods: {
//
getLink() {
getUserProfile().then((response) => {
var domain = window.location.host;
//console.log(domain);
//this.user = response.data;
this.inviteCode =
response.data.dept.deptName +
"幼儿信息维护链接" +
"http://" +
domain +
"/child_preserve/index/" +
response.data.dept.deptId;
});
},
//
copy(e, text) {
const clipboard = new Clipboard(e.target, { text: () => text });
clipboard.on("success", (e) => {
this.msgSuccess("复制成功");
//
clipboard.off("error");
clipboard.off("success");
clipboard.destroy();
});
clipboard.on("error", (e) => {
//
this.msgError("手机权限不支持复制功能");
//
clipboard.off("error");
clipboard.off("success");
clipboard.destroy();
});
clipboard.onClick(e);
},
// //
xbFormat(row, column) { xbFormat(row, column) {
return this.selectDictLabel(this.sexOptions, row.xb); return this.selectDictLabel(this.sexOptions, row.xb);

View File

@ -17,8 +17,11 @@
<div class="result-form"> <div class="result-form">
<p class="form-title">提交核对幼儿信息</p> <p class="form-title">提交核对幼儿信息</p>
<el-form class="form" ref="form" :model="form" label-width="110px"> <el-form class="form" ref="form" :model="form" label-width="110px">
<el-form-item label="家长姓名" prop="jzxm"> <el-form-item label="父亲姓名" prop="father">
<el-input v-model="form.jzxm" placeholder="请输入家长姓名" /> <el-input v-model="form.father" placeholder="请输入父亲姓名" @input="onInput()"/>
</el-form-item>
<el-form-item label="母亲姓名" prop="mother">
<el-input v-model="form.mother" placeholder="请输入母亲姓名" @input="onInput()"/>
</el-form-item> </el-form-item>
<el-form-item label="家长联系方式" prop="phone"> <el-form-item label="家长联系方式" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系方式" :disabled="hide" /> <el-input v-model="form.phone" placeholder="请输入联系方式" :disabled="hide" />
@ -163,6 +166,9 @@ import { getChild_query, updateChild } from "@/api/benyi/child";
// //
import VDistpicker from "v-distpicker"; import VDistpicker from "v-distpicker";
//
import { updateContactpeople } from "@/api/benyi/contactpeople";
export default { export default {
name: "result", name: "result",
data() { data() {
@ -193,6 +199,8 @@ export default {
yzzs: "", yzzs: "",
tynrcontent: "", tynrcontent: "",
href_tynr: "", href_tynr: "",
father: "",
mother: "",
// //
open: false, open: false,
// //
@ -215,7 +223,8 @@ export default {
phone: undefined phone: undefined
}, },
// //
form: {} form: {
}
}; };
}, },
created() { created() {
@ -242,6 +251,10 @@ export default {
VDistpicker VDistpicker
}, },
methods: { methods: {
//
onInput() {
this.$forceUpdate();
},
// //
xbFormat(row, column) { xbFormat(row, column) {
return this.selectDictLabel(this.sexOptions, row.xb); return this.selectDictLabel(this.sexOptions, row.xb);
@ -282,7 +295,10 @@ export default {
this.hide = true; this.hide = true;
this.childList = response.rows; this.childList = response.rows;
this.form = response.data; this.form = response.data;
console.log(this.form);
this.form.id = response.data.id; this.form.id = response.data.id;
this.form.father = response.data.byChildContactpeople.fathername;
this.form.mother = response.data.byChildContactpeople.mothername;
this.diglogForm.province = response.data.birthProvincename; this.diglogForm.province = response.data.birthProvincename;
this.diglogForm.city = response.data.birthCityname; this.diglogForm.city = response.data.birthCityname;
this.diglogForm.area = response.data.birthAreaname; this.diglogForm.area = response.data.birthAreaname;
@ -310,6 +326,16 @@ export default {
this.hide = false; this.hide = false;
} }
}); });
this.form.childid = this.form.id;
this.form.fathername = this.form.father;
this.form.mothername = this.form.mother;
updateContactpeople(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
//this.open = false;
this.hide = false;
}
});
} }
} }
}); });

View File

@ -259,6 +259,8 @@ public class ByChild extends BaseEntity {
@Excel(name = "创建人") @Excel(name = "创建人")
private Long createuserid; private Long createuserid;
private ByChildContactpeople byChildContactpeople;
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
@ -623,6 +625,15 @@ public class ByChild extends BaseEntity {
.append("otherLanguage", getOtherLanguage()) .append("otherLanguage", getOtherLanguage())
.append("createuserid", getCreateuserid()) .append("createuserid", getCreateuserid())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("byChildContactpeople", getByChildContactpeople())
.toString(); .toString();
} }
public ByChildContactpeople getByChildContactpeople() {
return byChildContactpeople;
}
public void setByChildContactpeople(ByChildContactpeople byChildContactpeople) {
this.byChildContactpeople = byChildContactpeople;
}
} }

View File

@ -46,10 +46,37 @@
<result property="otherLanguage" column="other_language"/> <result property="otherLanguage" column="other_language"/>
<result property="createuserid" column="createuserid"/> <result property="createuserid" column="createuserid"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<association property="byChildContactpeople" column="childid" javaType="ByChildContactpeople" resultMap="ByChildContactpeopleResult" />
</resultMap>
<resultMap type="ByChildContactpeople" id="ByChildContactpeopleResult">
<result property="id" column="id"/>
<result property="childid" column="childid"/>
<result property="schoolid" column="schoolid"/>
<result property="classid" column="classid"/>
<result property="fathername" column="fathername"/>
<result property="fphone" column="fphone"/>
<result property="foffphone" column="foffphone"/>
<result property="mothername" column="mothername"/>
<result property="mphone" column="mphone"/>
<result property="moffphone" column="moffphone"/>
<result property="grandfathername" column="grandfathername"/>
<result property="gfgx" column="gfgx"/>
<result property="gfphone" column="gfphone"/>
<result property="gfoffphone" column="gfoffphone"/>
<result property="gfaddress" column="gfaddress"/>
<result property="grandmothername" column="grandmothername"/>
<result property="gmgx" column="gmgx"/>
<result property="gmphone" column="gmphone"/>
<result property="gmaddress" column="gmaddress"/>
<result property="gmoffphone" column="gmoffphone"/>
<result property="createTime" column="create_time"/>
</resultMap> </resultMap>
<sql id="selectByChildVo"> <sql id="selectByChildVo">
select id, schoolid, classid, name, en_name, infant_name, phone, xb, mz, zjhm, csrq, birth_province, birth_provincename, birth_city, birth_cityname, birth_area, birth_areaname, registered_province, registered_provincename, registered_city, registered_cityname, registered_area, registered_areaname, addr_province, addr_provincename, addr_city, addr_cityname, addr_area, addr_areaname, addr_detail, ever_school, learn_english, source, status, enter_date, out_date, first_language, seconder_language, other_language, createuserid, create_time from by_child select c.id, c.schoolid, c.classid, c.name, c.en_name, c.infant_name, c.phone, c.xb, c.mz, c.zjhm, c.csrq, c.birth_province, c.birth_provincename, c.birth_city, c.birth_cityname, c.birth_area, c.birth_areaname, c.registered_province, c.registered_provincename, c.registered_city, c.registered_cityname, c.registered_area, c.registered_areaname, c.addr_province, c.addr_provincename, c.addr_city, c.addr_cityname, c.addr_area, c.addr_areaname, c.addr_detail, c.ever_school, c.learn_english, c.source, c.status, c.enter_date, c.out_date, c.first_language, c.seconder_language, c.other_language, c.createuserid, c.create_time, p.fathername, p.mothername
from by_child c
left join by_child_contactpeople p on c.id=p.childid
</sql> </sql>
<select id="selectByChildList" parameterType="ByChild" resultMap="ByChildResult"> <select id="selectByChildList" parameterType="ByChild" resultMap="ByChildResult">