Преглед на файлове

访视表单拆分孕产妇/新生儿,首次进入无需点击编辑-功能

zhangyanfang преди 5 години
родител
ревизия
42a5875397

+ 58 - 63
app/followup/index.html

@ -27,73 +27,68 @@
        if (Request.userAgent) {
            window.localStorage.setItem(httpRequest.agentName, decodeURIComponent(Request.userAgent))
        }
        var version1;
        var version2;
        if (Request.type == '5' || Request.type == '6') {
            fangshiAPI.getPostpartumVisitDetails({ followupId: followupId || '3' }).then(function (res) {
                if (res.status == 200) {
                    version1 = res.data ? res.data.version : ''
                    bindEvent()
                } else {
                    top.toastr.error(res.msg);
                }
            })
            fangshiAPI.getNewbornFamilyVisitRecord({ followupId: followupId || '2' }).then(function (res) {
                if (res.status == 200) {
                    version2 = res.data ? res.data.version : ''
                    bindEvent()
                } else {
                    top.toastr.error(res.msg);
                }
            })
        }
        bindEvent()
        function bindEvent() {
            if (isAdd == 1) {
                version = lastedVersion
                location.replace('../../app/followup/' + version + '/html/fangshi-detail-5,6.html?id=' + followupId + "&version=" + version)
            } else {
                version = version1 || version2
                location.replace('../../app/followup/' + version + '/html/fangshi-detail-5,6.html?id=' + followupId + "&version=" + version)
            if (Request.type == '5') {
                fangshiAPI.getPostpartumVisitDetails({ followupId: followupId || '1' }).then(function (res) {
                    if (res.status == 200) {
                        version = res.data != null ? res.data.version : lastedVersion
                        location.replace('../../app/followup/' + version + '/html/fangshi-detail-5.html?id=' + followupId + "&version=" + version)
                    } else {
                        top.toastr.error(res.msg);
                    }
                })
            }
        }
        if (Request.type == '7') {
            fangshiAPI.getFollowupSevereMentalDisorder({ followupId: followupId || '1' }).then(function (res) {
                if (res.status == 200) {
                    version = res.data != null ? res.data.version : lastedVersion
                    location.replace('../../app/followup/' + version + '/html/fangshi-detail-7.html?id=' + followupId + "&version=" + version)
            if (Request.type == '6') {
                fangshiAPI.getNewbornFamilyVisitRecord({ followupId: followupId || '1' }).then(function (res) {
                    if (res.status == 200) {
                        version = res.data != null ? res.data.version : lastedVersion
                        location.replace('../../app/followup/' + version + '/html/fangshi-detail-6.html?id=' + followupId + "&version=" + version)
                    } else {
                        top.toastr.error(res.msg);
                    }
                })
            }
            if (Request.type == '7') {
                fangshiAPI.getFollowupSevereMentalDisorder({ followupId: followupId || '1' }).then(function (res) {
                    if (res.status == 200) {
                        version = res.data != null ? res.data.version : lastedVersion
                        location.replace('../../app/followup/' + version + '/html/fangshi-detail-7.html?id=' + followupId + "&version=" + version)
                } else {
                    top.toastr.error(res.msg);
                }
            })
        } if (Request.type == '8') {
            fangshiAPI.getOlderPeopleHealthCheckRecord({ followupId: followupId || '1' }).then(function (res) {
                if (res.status == 200) {
                    version = res.data != null ? res.data.version : lastedVersion
                    location.replace('../../app/followup/' + version + '/html/fangshi-detail-8.html?id=' + followupId + "&version=" + version)
                } else {
                    top.toastr.error(res.msg);
                }
            })
        } if (Request.type == '9') {
            fangshiAPI.getPhthisisFirstCheckRecord({ followupId: followupId }).then(function (res) {
                if (res.status == 200) {
                    version = isAdd!=1? res.data.version : lastedVersion
                    location.replace('../../app/followup/' + version + '/html/fangshi-detail-9.html?id=' + followupId + "&version=" + version)
                } else {
                    top.toastr.error(res.msg);
                }
            })
        } if (Request.type == '10') {
            fangshiAPI.getPhthisis({ followupId: followupId || '1' }).then(function (res) {
                if (res.status == 200) {
                    version = isAdd!=1 ? res.data[0].version : lastedVersion
                    location.replace('../../app/followup/' + version + '/html/fangshi-detail-10.html?id=' + followupId + "&version=" + version)
                } else {
                    top.toastr.error(res.msg);
                }
            })
                    } else {
                        top.toastr.error(res.msg);
                    }
                })
            } if (Request.type == '8') {
                fangshiAPI.getOlderPeopleHealthCheckRecord({ followupId: followupId || '1' }).then(function (res) {
                    if (res.status == 200) {
                        version = res.data != null ? res.data.version : lastedVersion
                        location.replace('../../app/followup/' + version + '/html/fangshi-detail-8.html?id=' + followupId + "&version=" + version)
                    } else {
                        top.toastr.error(res.msg);
                    }
                })
            } if (Request.type == '9') {
                fangshiAPI.getPhthisisFirstCheckRecord({ followupId: followupId }).then(function (res) {
                    if (res.status == 200) {
                        version = isAdd != 1 ? res.data.version : lastedVersion
                        location.replace('../../app/followup/' + version + '/html/fangshi-detail-9.html?id=' + followupId + "&version=" + version)
                    } else {
                        top.toastr.error(res.msg);
                    }
                })
            } if (Request.type == '10') {
                fangshiAPI.getPhthisis({ followupId: followupId || '1' }).then(function (res) {
                    if (res.status == 200) {
                        version = isAdd != 1 ? res.data[0].version : lastedVersion
                        location.replace('../../app/followup/' + version + '/html/fangshi-detail-10.html?id=' + followupId + "&version=" + version)
                    } else {
                        top.toastr.error(res.msg);
                    }
                })
            }
        }
    </script>
</body>

+ 38 - 51
app/followup/v1/html/fangshi-detail-10.html

@ -47,8 +47,7 @@
<body>
    <div id="app">
        <button class="button" @click="editBtn()">编辑</button>
        <button class="button" id="isfinish" :class="{'finish':finishedBtn}" @click="finished()" :disabled="finishedBtn">完成随访</button>
        <button class="button" @click="editBtn()">&nbsp;</button>
        <p class="c-f20 mb10" style="text-align: center;">肺结核患者随访服务记录表</p>
        <div class="ui-grid p10">
            <div class="ui-col-1">
@ -865,6 +864,7 @@
            el: "#app",
            data: function () {
                return {
                    finishedStatus: null, //随访完成状态
                    editable: false,
                    isEditBtn: true,
                    data2: "",
@ -1111,10 +1111,8 @@
                var docInfo = JSON.parse(window.localStorage.getItem("docInfo"));
                console.log(docInfo.code)
                console.log(docInfo.name)
                this.getData()
                //获取随访详情
                this.getStatus()
                this.getData()
            },
            computed:{
                percent: function (){
@ -1133,6 +1131,9 @@
                    var vm = this
                    // var vmP = this.postpartumVisitDetails  Request['id']||'1'  
                    fangshiAPI.getPhthisis({ followupId: Request['id']||'1' }).then(function (res) {
                        if (res.status == 200) {
                            vm.getStatus() //获取随访状态
                        }
                        if (res.status == 200 && res.data[0]) {
                            console.log("获取肺结核信息")
                            console.log(res)
@ -1163,6 +1164,18 @@
                            //     console.log(item.superviser.superviser_type)
                            //     return item
                            // })
                        } else {
                            top.toastr.info(res.msg);
                        }
                    })
                },
                // 完成随访状态修改
                finish: function () {
                    var vm = this
                    fangshiAPI.updateFollowStatus({ followupId: this.followupid }).then(function (res) {
                        if (res.status == 200) {
                            vm.getStatus()
                            top.toastr.info("完成随访成功")
                        } else {
                            top.toastr.error(res.msg);
                        }
@ -1196,75 +1209,49 @@
                    // }
                    fangshiAPI.savePhthisis({ jsonData: JSON.stringify(vm.parient) }).then(function (res) {
                        if (res.status == 200) {
                            console.log(res)
                            var btn=document.getElementById('isfinish')
                            //判断是否完成随访,未完成则将完成按钮显示出来
                            if(vm.sfStatus != 1){
                                vm.finishedBtn = false
                                btn.innerText='完成随访'
                            }else{
                                vm.finishedBtn = true
                                btn.innerText='已完成'
                            }
                            vm.getStatus()
                            top.toastr.info("保存成功")
                            vm.finishedStatus ? vm.getStatus() : vm.finish()
                            vm.finishedStatus ? top.toastr.info('保存成功') : ''
                        } else {
                            top.toastr.error(res.msg);
                        }
                    })
                },
                editBtn: function () {
                    console.log(this.tizheng)
                    this.isEditBtn = !this.isEditBtn
                    if (this.isEditBtn) {
                        var btn = document.getElementsByClassName('button')[0]
                setEditBtn: function () {
                    var btn = document.getElementsByClassName('button')[0]
                    if (!this.finishedStatus) {
                        btn.innerHTML = '完成随访'
                        this.editable = true
                        return
                    }
                    if (this.isEditBtn == true) {
                        btn.innerHTML = '编辑'
                        this.editable = false
                        this.editData()
                    } else {
                        var btn = document.getElementsByClassName('button')[0]
                    } else if (this.isEditBtn == false) {
                        btn.innerHTML = '保存'
                        this.editable = true
                    }
                },
                
                editBtn: function () {
                    if (this.finishedStatus) {
                        this.isEditBtn = !this.isEditBtn
                    }
					this.setEditBtn()
					this.isEditBtn || !this.finishedStatus?this.editData():''//保存数据
                },                
                //获取当前随访状态信息  Request['id']||'1'
                getStatus:function(){
                    var vm = this
                    fangshiAPI.getFollowupInfo({ followupId: Request['id']||'1'}).then(function (res) {
                            if (res.status == 200) {
                                console.log(res)
                                vm.sfStatus = res.data.status
                                var btn=document.getElementById('isfinish')
								if (vm.sfStatus != 1) {
									btn.innerText='完成随访'
								} else {
									btn.innerText='已完成'
								}
                                if(res.data.status == 1){
                                    vm.showFinish = false
                                }
								res.data.status != 1 ? vm.finishedStatus = false : vm.finishedStatus = true
								vm.setEditBtn()
                            } else {
                                top.toastr.error(res.msg);
                            }
                        })
                },
                //点击完成随访时  Request['id']||'1'
                finished:function(){
                    var vm = this
                    fangshiAPI.updateFollowStatus({followupId:Request['id']||'1'}).then(function(res){
                        if (res.status == 200) {
                            console.log(res)
                            vm.finishedBtn = true
                            vm.getStatus()
                            top.toastr.info("完成随访")
                        } else {
                            top.toastr.error(res.msg);
                        }
                    })
                }
            },
        })
    </script>

+ 394 - 0
app/followup/v1/html/fangshi-detail-5.html

@ -0,0 +1,394 @@
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>产后访视+新生儿记录表</title>
	<meta name="author" content="yihu.com" />
	<meta name="format-detection" content="telephone=no" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"
	/>
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<link rel="shortcut icon" href="../../../../favicon.ico">
	<link rel="stylesheet" type="text/css" href="../../../../css/element-ui.css" />
	<link rel="stylesheet" type="text/css" href="../../../../css/cross.css" />
	<link rel="stylesheet" type="text/css" href="../../../../css/bootstrap.min.css" />
	<link href="../../../../plugins/toastr/toastr.min.css" rel="stylesheet">
	<link href="../css/fangshi-detail.css" rel="stylesheet">
</head>
<style>
	.el-radio {
		margin-bottom: 0;
	}
	.setPicker .el-input--prefix .el-input__inner {
		text-align: center
	}
	div.ui-col-1 {
		line-height: 27px;
	}
	.setinput .el-input__inner {
		padding: 0;
		border-bottom: 1px solid #e1e1e1;
		text-align: center;
	}
</style>
<body>
	<div id="app">
		<button class="button" @click="editBtn()">&nbsp;</button>
		<p class="c-f20 mb10" style="text-align: center;">产后访视记录表</p>
		<div class="ui-grid p10">
			<div class="ui-col-1">
				<div class="ui-grid">
					<div class="ui-col-0">姓名:</div>
					<div class="ui-col-1">
						<el-input :readonly="!editable" v-model="postpartumVisitDetails.name" placeholder="" clearable></el-input>
					</div>
				</div>
			</div>
			<div class="ui-col-1">
				<div class="ui-grid">
					<div class="ui-col-0">编号:</div>
					<div class="ui-col-1">
						<el-input :readonly="!editable" v-model="postpartumVisitDetails.number" placeholder="" clearable></el-input>
					</div>
				</div>
			</div>
		</div>
		<table class="table table-bordered">
			<tr>
				<td class="col-w120 c-t-center">随访日期</td>
				<td colspan="3">
					<el-date-picker :readonly="!editable" v-model="postpartumVisitDetails.followup_date" type="date" value-format="yyyy-MM-dd"
					 placeholder="选择日期">
					</el-date-picker>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">分娩日期</td>
				<td>
					<el-date-picker type="date" :readonly="!editable" v-model="postpartumVisitDetails.parturition_date" value-format="yyyy-MM-dd"
					 placeholder="选择日期">
					</el-date-picker>
				</td>
				<td class="col-w120 c-t-center">出院日期</td>
				<td>
					<el-date-picker :readonly="!editable" v-model="postpartumVisitDetails.discharged_date" value-format="yyyy-MM-dd" type="date"
					 placeholder="选择日期">
					</el-date-picker>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">体 温(℃)</td>
				<td colspan="3">
					<el-input type="number" :readonly="!editable" v-model="postpartumVisitDetails.body_temperature" placeholder=""></el-input>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">一般健康情况</td>
				<td colspan="3">
					<el-input type="textarea" :readonly="!editable" v-model="postpartumVisitDetails.healthy_condition" placeholder="" clearable></el-input>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">一般心理状况</td>
				<td colspan="3">
					<el-input :readonly="!editable" v-model="postpartumVisitDetails.psychologic_status" placeholder="" clearable></el-input>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">血 压(mmHg)</td>
				<td colspan="3">
					<div class="setinput">
						<el-input type="number" class="col-w80" :readonly="!editable" v-model="postpartumVisitDetails.blood_pressure_low" placeholder=""></el-input>mmHg /
						<el-input type="number" class="col-w80" :readonly="!editable" v-model="postpartumVisitDetails.blood_pressure_high" placeholder=""></el-input>mmHg
					</div>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">乳 房</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.breast_status">
						<el-radio :disabled="!editable" label="1">未见异常</el-radio>
						<el-radio :disabled="!editable" label="2">异常</el-radio>
					</el-radio-group>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">恶 露</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.lochia_status">
						<el-radio :disabled="!editable" label="1">未见异常</el-radio>
						<el-radio :disabled="!editable" label="2">异常</el-radio>
					</el-radio-group>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">子 宫</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.uterus_status">
						<el-radio :disabled="!editable" label="1">未见异常</el-radio>
						<el-radio :disabled="!editable" label="2">异常</el-radio>
					</el-radio-group>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">伤 口</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.wound_status">
						<el-radio :disabled="!editable" label="1">未见异常</el-radio>
						<el-radio :disabled="!editable" label="2">异常</el-radio>
					</el-radio-group>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">其 他</td>
				<td colspan="3">
					<el-input type="textarea" :readonly="!editable" v-model="postpartumVisitDetails.other" placeholder="" clearable></el-input>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">分 类</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.category">
						<el-radio :disabled="!editable" label="1">未见异常</el-radio>
						<el-radio :disabled="!editable" label="2">异常</el-radio>
					</el-radio-group>
				</td>   
			</tr>
			<tr>
				<td class="col-w120 c-t-center">指 导</td>
				<td colspan="3">
					<el-checkbox-group v-model="check" :disabled="!editable">
						<el-checkbox label="1">个人卫生</el-checkbox>
						<el-checkbox label="2">心理</el-checkbox>
						<el-checkbox label="3">营养</el-checkbox>
						<el-checkbox label="4">母乳喂养</el-checkbox>
						<el-checkbox label="5">新生儿护理与喂养</el-checkbox>
						<el-checkbox class="setinput" label="6">
							<el-input type="text" :readonly="other_guide||!editable" v-model="postpartumVisitDetails.other_guide_content" placeholder="其他"
							 clearable></el-input>
						</el-checkbox>
					</el-checkbox-group>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">转 诊</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.referral">
						<el-radio :disabled="!editable" :label="0">无</el-radio>
						<el-radio :disabled="!editable" :label="1">有</el-radio>
					</el-radio-group>
					<div class="mt20 ui-grid">
						<div class="ui-col-0" for="">原因:</div>
						<div class="ui-col-1">
							<el-input :readonly="!editable" v-model="postpartumVisitDetails.referral_REASON" placeholder="" clearable></el-input>
						</div>
					</div>
					<div class="mt20 ui-grid">
						<div class="ui-col-0">机构:</div>
						<div class="ui-col-1">
							<el-input :readonly="!editable" v-model="postpartumVisitDetails.organization_ORG_NAME" placeholder="" clearable></el-input>
						</div>
						<div class="ui-col-0">科室:</div>
						<div class="ui-col-1">
							<el-input :readonly="!editable" v-model="postpartumVisitDetails.organization" placeholder="" clearable></el-input>
						</div>
					</div>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">下次随访日期</td>
				<td colspan="3">
					<el-date-picker :readonly="!editable" v-model="postpartumVisitDetails.next_visiting_date" value-format="yyyy-MM-dd" type="date"
					 placeholder="选择日期">
					</el-date-picker>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">随访医生签名</td>
				<td colspan="3">
					<el-input :readonly="!editable" v-model="postpartumVisitDetails.visiting_doctor_name" placeholder="" clearable></el-input>
				</td>
			</tr>
		</table>
		<follow-bottom :followupId="followupId"></follow-bottom>
	</div>
	<script src="../../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../js/util.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../plugins/toastr/toastr.min.js"></script>
	<script src="../../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../js/element-ui.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../component/followup/follow-bottom.js"></script>
	<script src="../../../../component/followup/fangshi-detail-6.js"></script>
	<script src="../../../../component/followup/finish-followup-btn.js"></script>
	<script src="../../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../api/fangshi-api.js"></script>
	<script>
		var Request = GetRequest();
		new Vue({
			el: "#app",
			data: function () {
				return {
					finishedStatus: null, //随访完成状态
					editable: false,
					other_guide: true,
					isEditBtn: true,
					data2: "",
					radio: "",
					input: '',
					check: [],
					postpartumVisitDetails: {
						personal_hygiene: '0',
						mentality: '0',
						nutrition: '0',
						breast_feeding: '0',
						newborn_care_and_feeding: '0',
						other_guide: '0',
					},
					followupId: Request['id'],
					version: Request['version']
				}
			},
			mounted: function () {
				//获取随访详情
				this.getData()
			},
			watch: {
				check: function (i) {
					var a = i.indexOf('6')
					if (a > -1) {
						this.other_guide = false
					} else {
						this.other_guide = true
						this.postpartumVisitDetails.other_guide_content = ''
					}
				}
			},
			methods: {
				getData: function () {
					var vm = this
					fangshiAPI.getPostpartumVisitDetails({ followupId: this.followupId || '3' }).then(function (res) {
						if (res.status == 200) {
							var data = res.data
							if (data != null) {											
								vm.postpartumVisitDetails = data
								var vmP = vm.postpartumVisitDetails
								vmP.breast_status = data.breast_status ? data.breast_status.toString() : ''
								vmP.lochia_status = data.lochia_status ? data.lochia_status.toString() : ''
								vmP.uterus_status = data.uterus_status ? data.uterus_status.toString() : ''
								vmP.wound_status = data.wound_status ? data.wound_status.toString() : ''
								vmP.category = data.category ? data.category.toString() : ''
								vmP.other = data.other
								if (data.personal_hygiene == '1') {
									vm.check.push('1')
								} if (data.mentality == '1') {
									vm.check.push('2')
								} if (data.nutrition == '1') {
									vm.check.push('3')
								} if (data.breast_feeding == '1') {
									vm.check.push('4')
								} if (data.newborn_care_and_feeding == '1') {
									vm.check.push('5')
								} if (data.other_guide == '1') {
									vm.check.push('6')
								}
								vmP.other_guide_content = data.other_guide_content
								// vmP.REFERRAL_REASON = data.referral_REASON
								vmP.organization_ORG_NAME = data.organization_ORG_NAME
								vmP.organization = data.organization
								vmP.next_visiting_date = data.next_visiting_date
								vmP.visiting_doctor_name = data.visiting_doctor_name
							}
							vm.getStatus() //获取随访状态
						} else {
							top.toastr.error(res.msg);
						}
					})
				},
				// 完成随访状态修改
				finish: function () {
					fangshiAPI.updateFollowStatus({ followupId: this.followupId }).then(function (res) {
						if (res.status == 200) {
                            vm.getStatus()
                            top.toastr.info("完成随访成功")
						} else {
							top.toastr.error(res.msg);
						}
					})
				},
				editData: function () {
					var vm = this
					vm.check.map(function(i) {
						if (i == '1') {
							vm.postpartumVisitDetails.personal_hygiene = '1'
						} else if (i == '2') {
							vm.postpartumVisitDetails.mentality = '1'
						} else if (i == '3') {
							vm.postpartumVisitDetails.nutrition = '1'
						} else if (i == '4') {
							vm.postpartumVisitDetails.breast_feeding = '1'
						} else if (i == '5') {
							vm.postpartumVisitDetails.newborn_care_and_feeding = '1'
						} else if (i == '6') {
							vm.postpartumVisitDetails.other_guide = '1'
						}
					})
					this.postpartumVisitDetails.create_time = null
					this.postpartumVisitDetails.version = this.version	//版本号
					fangshiAPI.savePostpartumVisitDetails({ followupId: this.followupId || '3', postpartumVisitDetails: JSON.stringify(this.postpartumVisitDetails) }).then(function (res) {
						if (res.status == 200) {
							vm.finishedStatus ?  vm.getStatus() :  vm.finish()
							vm.finishedStatus ? top.toastr.info('保存成功') :''
						} else {
							top.toastr.error(res.msg);
						}
					})
				},
				//获取当前随访状态信息  Request['id']||'1'
				getStatus: function (isShow) {
					var vm = this
					fangshiAPI.getFollowupInfo({ followupId: this.followupId || '1888107' }).then(function (res) {
						if (res.status == 200) {
							res.data.status!=1?vm.finishedStatus=false:vm.finishedStatus=true
							vm.setEditBtn()
						} else {
							top.toastr.error(res.msg);
						}
					})
				},
				setEditBtn: function () {
					var btn = document.getElementsByClassName('button')[0]
					if(!this.finishedStatus){
						btn.innerHTML='完成随访'
						this.editable = true
						return 
					}
					if (this.isEditBtn == true) {
						btn.innerHTML = '编辑'
						this.editable = false
					} else if (this.isEditBtn == false) {
						btn.innerHTML='保存'
						this.editable = true
					}
				},
				editBtn: function () {
					if (this.finishedStatus) {
						this.isEditBtn = !this.isEditBtn
					}
					this.setEditBtn()
					this.isEditBtn || !this.finishedStatus?this.editData():''//保存数据
				}
			}
		})
	</script>
</body>
</html>

+ 15 - 1040
app/followup/v1/html/fangshi-detail-6.html

@ -10,11 +10,11 @@
    />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<link rel="shortcut icon" href="../../../../favicon.ico">
	<link rel="stylesheet" type="text/css" href="../../../../css/element-ui.css" />
	<link rel="stylesheet" type="text/css" href="../../../../css/cross.css" />
	<link rel="stylesheet" type="text/css" href="../../../../css/bootstrap.min.css" />
	<link href="../../../../plugins/toastr/toastr.min.css" rel="stylesheet">
    <link rel="shortcut icon" href="../../../../favicon.ico">
    <link rel="stylesheet" type="text/css" href="../../../../css/element-ui.css" />
    <link rel="stylesheet" type="text/css" href="../../../../css/cross.css" />
    <link rel="stylesheet" type="text/css" href="../../../../css/bootstrap.min.css" />
    <link href="../../../../plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="../css/fangshi-detail.css" rel="stylesheet">
</head>
<style>
@ -40,658 +40,8 @@
<body>
    <div id="app">
        <button class="button" @click="editBtn()">编辑</button>
        <div class="ui-grid p10 setradio">
            <div class="ui-col-1">
                <div class="ui-grid">
                    <div class="ui-col-0">姓名:</div>
                    <div class="ui-col-1">
                        <el-input :readonly="!editable" v-model="newbornData.sick_NAME" placeholder="" clearable></el-input>
                    </div>
                </div>
            </div>
            <div class="ui-col-1">
                <div class="ui-grid">
                    <div class="ui-col-0">户籍:&emsp;</div>
                    <div class="ui-col-1">
                        <el-radio-group v-model="newbornData.help_ORGANIZATION_FLAG" :disabled="!editable">
                            <el-radio label="1" :disabled="!editable">本市</el-radio>
                            <el-radio label="2" :disabled="!editable">省内</el-radio>
                            <el-radio label="3" :disabled="!editable">省外</el-radio>
                        </el-radio-group>
                    </div>
                </div>
            </div>
            <div class="ui-col-1">
                <div class="ui-grid">
                    <div class="ui-col-0">卡号:</div>
                    <div class="ui-col-1">
                        <el-input :readonly="!editable" v-model="newbornData.number_NO" placeholder="" clearable></el-input>
                    </div>
                </div>
            </div>
        </div>
        <table class="table table-bordered">
            <tr>
                <td class="col-w120 c-t-center">性别</td>
                <td>
                    <el-radio-group v-model="newbornData.sick_SEX">
                        <div>
                            <el-radio :disabled="!editable" label="0">未知的性别</el-radio>
                            <el-radio :disabled="!editable" label="1">男</el-radio>
                        </div>
                        <div class="mt10">
                            <el-radio :disabled="!editable" label="2">女</el-radio>
                            <el-radio :disabled="!editable" label="9">未说明的性别</el-radio>
                        </div>
                    </el-radio-group>
                </td>
                <td colspan="2">
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            出生日期:
                        </div>
                        <div class="ui-col-1">
                            <el-date-picker :readonly="!editable" v-model="newbornData.birthday" type="date" placeholder="选择日期">
                            </el-date-picker>
                        </div>
                    </div>
                </td>
                <td>
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            户籍地址:
                        </div>
                        <div class="ui-col-1">
                            <el-input :readonly="!editable" v-model="newbornData.permanent_RESIDENCE_ADDRESS" placeholder="" clearable></el-input>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="col-w120 c-t-center">母亲身份证号</td>
                <td>
                    <el-input :readonly="!editable" v-model="newbornData.mother_IDENTITY_CARD_NO" placeholder="" clearable></el-input>
                </td>
                <td class="c-t-center">家庭住址</td>
                <td colspan="2">
                    <el-input :readonly="!editable" v-model="newbornData.mother_ADDRESS" placeholder="" clearable></el-input>
                </td>
            </tr>
            <tr>
                <td class="col-w120 c-t-center">母 亲</td>
                <td>
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            姓名
                        </div>
                        <div class="ui-col-1">
                            <el-input :readonly="!editable" v-model="newbornData.mother_NAME" placeholder="" clearable></el-input>
                        </div>
                    </div>
                </td>
                <td>
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            职业
                        </div>
                        <div class="ui-col-1">
                            <el-input :readonly="!editable" v-model="newbornData.mother_OCCUPATION" placeholder="" clearable></el-input>
                        </div>
                    </div>
                </td>
                <td>
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            联系电话
                        </div>
                        <div class="ui-col-1">
                            <el-input type="number" :readonly="!editable" v-model="newbornData.mother_PHONE" placeholder=""></el-input>
                        </div>
                    </div>
                </td>
                <td>
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            出生日期
                        </div>
                        <div class="ui-col-1">
                            <el-date-picker :readonly="!editable" v-model="newbornData.mother_BIRTHDAY" type="date" placeholder="选择日期">
                            </el-date-picker>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="col-w120 c-t-center">父 亲</td>
                <td>
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            姓名
                        </div>
                        <div class="ui-col-1">
                            <el-input :readonly="!editable" v-model="newbornData.father_NAME" placeholder="" clearable></el-input>
                        </div>
                    </div>
                </td>
                <td>
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            职业
                        </div>
                        <div class="ui-col-1">
                            <el-input :readonly="!editable" v-model="newbornData.father_OCCUPATION" placeholder="" clearable></el-input>
                        </div>
                    </div>
                </td>
                <td>
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            联系电话
                        </div>
                        <div class="ui-col-1">
                            <el-input type="number" :readonly="!editable" v-model="newbornData.father_PHONE"></el-input>
                        </div>
                    </div>
                </td>
                <td>
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            出生日期
                        </div>
                        <div class="ui-col-1">
                            <el-date-picker :readonly="!editable" v-model="newbornData.father_BIRTHDAY" type="date" placeholder="选择日期">
                            </el-date-picker>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2" class="setinput c-t-center">出生孕周
                    <el-input style="width:70px;" type="number" :readonly="!editable" v-model="newbornData.birth_PREGNANCY_WEEK"></el-input>
                </td>
                <td colspan="3">
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            母亲妊娠期患病情况:
                        </div>
                        <div class="ui-col-1">
                            <el-radio-group v-model="newbornData.pregnancy_SICK">
                                <el-radio :disabled="!editable" label="1">糖尿病</el-radio>
                                <el-radio :disabled="!editable" label="2">糖尿病</el-radio>
                                <el-radio :disabled="!editable" label="3">妊娠期高血压</el-radio>
                                <el-radio :disabled="!editable" label="4" class="setinput">其他
                                    <el-input type="text" :readonly="pregnancy_SICK_CIRCS_other||!editable" v-model="newbornData.pregnancy_SICK_CIRCS" clearable></el-input>
                                </el-radio>
                            </el-radio-group>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="col-w120 c-t-center setinput">助产机构名称:
                    <el-input style="width:120px;" type="text" :readonly="!editable" v-model="newbornData.help_ORGANIZATION_NAME" clearable></el-input>
                </td>
                <td class="c-t-center">
                    出院时间
                    <div class="setPicker">
                        <el-date-picker :readonly="!editable" v-model="newbornData.DISCHARGED_DATE" type="date" placeholder="选择日期">
                        </el-date-picker>
                    </div>
                </td>
                <td colspan="2">
                    出生情况:
                    <el-checkbox-group v-model="delivery_WAY_check" :disabled="!editable">
                        <el-checkbox style="margin-left: 30px;" label="1">顺产</el-checkbox>
                        <el-checkbox label="2">胎头吸引</el-checkbox>
                        <el-checkbox label="3">产钳</el-checkbox>
                        <el-checkbox label="4">剖宫</el-checkbox>
                        <el-checkbox label="5">双多胎</el-checkbox>
                        <el-checkbox label="6">臀位</el-checkbox>
                        <el-checkbox class="setinput" label="7">
                            <el-input type="text" :readonly="birth_OTHER||!editable" v-model="newbornData.birth_OTHER" placeholder="其他" clearable></el-input>
                        </el-checkbox>
                    </el-checkbox-group>
                </td>
                <td>
                    新生儿窒息:
                    <el-radio-group v-model="newbornData.suffocation" :disabled="!editable">
                        <el-radio :disabled="!editable" label="1">无</el-radio>
                        <el-radio :disabled="!editable" label="2">有</el-radio>
                    </el-radio-group>
                    <div class="setinput">
                        (Apgar 评分:1分钟
                        <el-input style="width:70px;" type="number" :readonly="!editable" v-model="newbornData.apgar_O"></el-input>分,5分钟
                        <el-input style="width:70px;" type="number" :readonly="!editable" v-model="newbornData.apgar_F"></el-input>分,不详
                        <el-input style="width:70px;" type="number" :readonly="!editable" v-model="newbornData.apgar_N"></el-input>)
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2" class="c-t-center">新生儿病史:
                    <el-input :readonly="!editable" v-model="newbornData.blessedevent_MEDICAL_HISTORY" placeholder="" clearable></el-input>
                </td>
                <td class="c-t-center">诊治机构:
                    <el-input :readonly="!editable" v-model="newbornData.help_OUT_ORGANIZATION" placeholder="" clearable></el-input>
                </td>
                <td colspan="2">计划免疫情况:
                    <el-radio-group v-model="newbornData.plan_IMMUNE">
                        <el-radio :disabled="!editable" label="1">卡介苗</el-radio>
                        <el-radio :disabled="!editable" label="2">乙肝疫苗</el-radio>
                        <el-radio :disabled="!editable" label="3">以上两种</el-radio>
                        <el-radio :disabled="!editable" label="4">未种</el-radio>
                    </el-radio-group>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            新生儿出生体重:
                        </div>
                        <div class="ui-col-1 setinput">
                            <el-input style="width: 70px;" type="number" :readonly="!editable" v-model="newbornData.blessedevent_BIRTH_WEIGHT" :step="0.1"></el-input>
                            kg
                        </div>
                    </div>
                </td>
                <td>
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            出生身长:
                        </div>
                        <div class="ui-col-1 setinput">
                            <el-input style="width: 70px;" type="number" :readonly="!editable" v-model="newbornData.blessedevent_BIRTH_WEIGHT" :step="0.1"></el-input>cm
                        </div>
                    </div>
                </td>
                <td colspan="2">是否有畸形:
                    <el-radio-group :disabled="!editable" v-model="newbornData.deformity_NULL">
                        <el-radio :disabled="!editable" label="1">无</el-radio>
                        <el-radio :disabled="!editable" label="2">有</el-radio>
                    </el-radio-group>
                </td>
            </tr>
            <tr>
                <td class="c-t-center" colspan="5">
                    *********** 第二次访视以上八行信息不需要重复填写 ***********
                </td>
            </tr>
            <tr>
                <td colspan="5">
                    新生儿疾病筛查:
                    <el-checkbox-group v-model="SCREENING_check" :disabled="!editable">
                        <el-checkbox label="1">未进行</el-checkbox>
                        <el-checkbox label="2">检查均阴性</el-checkbox>
                        <el-checkbox label="3">甲低</el-checkbox>
                        <el-checkbox label="4">苯丙酮尿症</el-checkbox>
                        <el-checkbox label="5" class="setinput">其他遗传代谢病
                            <el-input style="width: 100px;" type="text" :readonly="SCREENING_3_dis||!editable" v-model="newbornData.screening_ABNORMAL"
                                clearable></el-input>
                        </el-checkbox>
                        <el-checkbox label="6">已查无结果</el-checkbox>
                    </el-checkbox-group>
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    新生儿听力筛查:
                    <el-radio-group :disabled="!editable" v-model="newbornData.hearing">
                        <el-radio :disabled="!editable" label="1">通过</el-radio>
                        <el-radio :disabled="!editable" label="2">未通过</el-radio>
                        <el-radio :disabled="!editable" label="3">未筛查</el-radio>
                        <el-radio :disabled="!editable" label="4">不详</el-radio>
                        <el-radio :disabled="!editable" label="5">已查无结果</el-radio>
                    </el-radio-group>
                </td>
                <td colspan="1" class="setinput">
                    目前体重
                    <el-input style="width: 70px;" type="number" :readonly="!editable" v-model="newbornData.now_WEIGHT"></el-input>
                    kg
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    喂养方式:
                    <el-radio-group :disabled="!editable" v-model="newbornData.feed_TYPE">
                        <el-radio :disabled="!editable" label="1">纯母乳</el-radio>
                        <el-radio :disabled="!editable" label="2">部分母乳</el-radio>
                        <el-radio :disabled="!editable" label="3">人工</el-radio>
                    </el-radio-group>
                </td>
                <td colspan="1" class="setinput">
                    吃奶量
                    <el-input style="width: 70px;" type="number" :readonly="!editable" v-model="newbornData.eat_MILE_AMOUNT"></el-input> ml/次
                </td>
                <td colspan="1" class="setinput">
                    吃奶次数
                    <el-input style="width: 70px;" type="number" :readonly="!editable" v-model="newbornData.eat_MILE_TIME"></el-input>次/日
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    呕吐:
                    <el-radio-group :disabled="!editable" v-model="newbornData.vomit">
                        <el-radio :disabled="!editable" v-model="radio" label="1">无</el-radio>
                        <el-radio :disabled="!editable" v-model="radio" label="2">有</el-radio>
                    </el-radio-group>
                </td>
                <td colspan="1">
                    大便:
                    <el-radio-group :disabled="!editable" v-model="newbornData.vulnus">
                        <el-radio :disabled="!editable" v-model="radio" label="1">糊状</el-radio>
                        <el-radio :disabled="!editable" v-model="radio" label="2">稀</el-radio>
                        <el-radio :disabled="!editable" v-model="radio" label="3">其他</el-radio>
                    </el-radio-group>
                </td>
                <td colspan="1" class="setinput">
                    大便次数
                    <el-input style="width: 70px;" type="number" :readonly="!editable" v-model="newbornData.vulnus_TIME"></el-input> 次/日
                </td>
            </tr>
            <tr>
                <td colspan="3" class="setinput">
                    体温:
                    <el-input style="width: 70px;" type="number" :readonly="!editable" v-model="newbornData.body_TEMPERATURE"></el-input>
                </td>
                <td colspan="1" class="setinput">
                    心率:
                    <el-input style="width: 70px;" type="number" :readonly="!editable" v-model="newbornData.pulse_FREQUENCY"></el-input>
                    次/分钟
                </td>
                <td colspan="1" class="setinput">
                    呼吸频率
                    <el-input style="width: 70px;" type="number" :readonly="!editable" v-model="newbornData.breath_FREQUENCY"></el-input>
                    次/日
                </td>
            </tr>
            <tr>
                <td colspan="3">面色:
                    <el-radio-group :disabled="!editable" v-model="newbornData.complexion">
                        <el-radio :disabled="!editable" label="1">红润</el-radio>
                        <el-radio :disabled="!editable" label="2">黄染</el-radio>
                        <el-radio :disabled="!editable" label="3" class="setinput">其他
                            <el-input style="width: 120px;" type="text" :readonly="complexion_NULL_dis||!editable" v-model="newbornData.complexion_NULL"
                                clearable></el-input>
                        </el-radio>
                    </el-radio-group>
                </td>
                <td colspan="2">黄疸部位:
                    <el-radio-group :disabled="!editable" v-model="newbornData.face">
                        <el-radio :disabled="!editable" label="1">面部</el-radio>
                        <el-radio :disabled="!editable" label="2">躯干</el-radio>
                        <el-radio :disabled="!editable" label="3">四肢</el-radio>
                        <el-radio :disabled="!editable" label="4">手足</el-radio>
                    </el-radio-group>
                </td>
            </tr>
            <tr>
                <td colspan="5" class="setinput">
                    前卤
                    <el-input style="width: 70px;" type="number" :readonly="!editable" v-model="newbornData.bregma_FRONT"></el-input>
                    &nbsp;cm&nbsp;✖
                    <el-input style="width: 70px;" type="number" :readonly="!editable" v-model="newbornData.bregma_BACK"></el-input> &nbsp;cm &emsp;
                    <el-radio-group :disabled="!editable" v-model="newbornData.bregma">
                        <el-radio :disabled="!editable" label="1">正常</el-radio>
                        <el-radio :disabled="!editable" label="2">膨隆</el-radio>
                        <el-radio :disabled="!editable" label="3">凹陷</el-radio>
                        <el-radio :disabled="!editable" label="4">其他
                    </el-radio-group>
                    <el-input style="width: 120px;" type="text" :readonly="bregma_other_dis||!editable" v-model="newbornData.bregma_PERFORMANCE"
                        clearable></el-input>
                    </el-radio>
                </td>
            </tr>
            <tr>
                <td class="table2Td" colspan="5">
                    <table class="table2">
                        <tr>
                            <td>眼外观:
                                <el-radio-group :disabled="!editable" v-model="newbornData.eye">
                                    <el-radio :disabled="!editable" label="1">未见异常</el-radio>
                                    <el-radio :disabled="!editable" label="2" class="setinput">异常
                                        <el-input type="text" :readonly="eye_NULL_dis||!editable" v-model="newbornData.eye_NULL" clearable></el-input>
                                    </el-radio>
                                </el-radio-group>
                            </td>
                            <td>四肢活动度:
                                <el-radio-group :disabled="!editable" v-model="newbornData.limbs">
                                    <el-radio :disabled="!editable" label="1">未见异常</el-radio>
                                    <el-radio :disabled="!editable" label="2" class="setinput">异常
                                        <el-input type="text" :readonly="limbs_NULL_dis||!editable" v-model="newbornData.limbs_NULL" clearable></el-input>
                                    </el-radio>
                                </el-radio-group>
                            </td>
                        </tr>
                        <tr>
                            <td>耳外观:
                                <el-radio-group :disabled="!editable" v-model="newbornData.ear">
                                    <el-radio :disabled="!editable" label="1">未见异常</el-radio>
                                    <el-radio :disabled="!editable" label="2" class="setinput">异常
                                        <el-input type="text" :readonly="ear_FACE_dis||!editable" v-model="newbornData.ear_FACE" clearable></el-input>
                                </el-radio-group>
                            </td>
                            <td>颈部包块:
                                <el-radio-group :disabled="!editable" v-model="newbornData.neck_PACK">
                                    <el-radio :disabled="!editable" label="1">无</el-radio>
                                    <el-radio :disabled="!editable" label="2" class="setinput">有
                                        <el-input type="text" :readonly="neck_PACK_NULL_dis||!editable" v-model="newbornData.neck_PACK_NULL" clearable></el-input>
                                    </el-radio>
                                </el-radio-group>
                            </td>
                        </tr>
                        <tr>
                            <td>鼻:
                                <el-radio-group :disabled="!editable" v-model="newbornData.nose">
                                    <el-radio :disabled="!editable" label="1">未见异常</el-radio>
                                    <el-radio :disabled="!editable" label="2" class="setinput">异常
                                        <el-input type="text" :readonly="nose_PERFORMANCE_dis||!editable" v-model="newbornData.nose_PERFORMANCE" clearable></el-input>
                                </el-radio-group>
                            </td>
                            <td>皮肤:
                                <el-radio-group :disabled="!editable" v-model="newbornData.skin">
                                    <el-radio :disabled="!editable" label="1">未见异常</el-radio>
                                    <el-radio :disabled="!editable" label="2">湿疹</el-radio>
                                    <el-radio :disabled="!editable" label="3">糜烂</el-radio>
                                    <el-radio :disabled="!editable" label="4" class="setinput">其他
                                        <el-input type="text" :readonly="skin_PERFORMANCE_dis||!editable" v-model="newbornData.skin_PERFORMANCE" clearable></el-input>
                                    </el-radio>
                                </el-radio-group>
                            </td>
                        </tr>
                        <tr>
                            <td>口腔:
                                <el-radio-group :disabled="!editable" v-model="newbornData.oral">
                                    <el-radio :disabled="!editable" label="1">未见异常</el-radio>
                                    <el-radio :disabled="!editable" label="2" class="setinput">异常
                                        <el-input type="text" :readonly="oral_PERFORMANCE_dis||!editable" v-model="newbornData.oral_PERFORMANCE" clearable></el-input>
                                </el-radio-group>
                            </td>
                            <td>肛门:
                                <el-radio-group :disabled="!editable" v-model="newbornData.anus">
                                    <el-radio :disabled="!editable" label="1">未见异常</el-radio>
                                    <el-radio :disabled="!editable" label="2" class="setinput">异常
                                        <el-input type="text" :readonly="anus_PERFORMANCE_dis||!editable" v-model="newbornData.anus_PERFORMANCE" clearable></el-input>
                                </el-radio-group>
                            </td>
                        </tr>
                        <tr>
                            <td>心肺听诊:
                                <el-radio-group :disabled="!editable" v-model="newbornData.heart">
                                    <el-radio :disabled="!editable" label="1">未见异常</el-radio>
                                    <el-radio :disabled="!editable" label="2" class="setinput">异常
                                        <el-input type="text" :readonly="heart_PERFORMANCE_dis||!editable" v-model="newbornData.heart_PERFORMANCE" clearable></el-input>
                                </el-radio-group>
                            </td>
                            <td>外生殖器:
                                <el-radio-group :disabled="!editable" v-model="newbornData.genitalia">
                                    <el-radio :disabled="!editable" label="1">未见异常</el-radio>
                                    <el-radio :disabled="!editable" label="2" class="setinput">异常
                                        <el-input type="text" :readonly="genitalia_NULL_dis||!editable" v-model="newbornData.genitalia_NULL" clearable></el-input>
                                </el-radio-group>
                            </td>
                        </tr>
                        <tr>
                            <td>腹部触诊:
                                <el-radio-group :disabled="!editable" v-model="newbornData.abdomen">
                                    <el-radio :disabled="!editable" label="1">未见异常</el-radio>
                                    <el-radio :disabled="!editable" label="2" class="setinput">异常
                                        <el-input type="text" :readonly="abdomen_NULL_dis||!editable" v-model="newbornData.abdomen_NULL" clearable></el-input>
                                </el-radio-group>
                            </td>
                            <td>脊柱:
                                <el-radio-group :disabled="!editable" v-model="newbornData.vertebral">
                                    <el-radio :disabled="!editable" label="1">未见异常</el-radio>
                                    <el-radio :disabled="!editable" label="2" class="setinput">异常
                                        <el-input type="text" :readonly="vertebral_NULL_dis||!editable" v-model="newbornData.vertebral_NULL" clearable></el-input>
                                </el-radio-group>
                            </td>
                        </tr>
                        <tr>
                            <td>脐带:
                                <el-radio-group :disabled="!editable" v-model="newbornData.umbilical">
                                    <el-radio :disabled="!editable" v-model="radio" label="1">未脱</el-radio>
                                    <el-radio :disabled="!editable" v-model="radio" label="2">脱落</el-radio>
                                    <el-radio :disabled="!editable" v-model="radio" label="3">脐带有渗出</el-radio>
                                    <el-radio :disabled="!editable" v-model="radio" label="4" class="setinput">其他
                                        <el-input type="text" :readonly="umbilical_NULL_dis||!editable" v-model="newbornData.umbilical_NULL" clearable></el-input>
                                    </el-radio>
                                </el-radio-group>
                            </td>
                            <td class="setinput">
                                <div class="ui-grid">
                                    <div class="ui-col-0">其他:</div>
                                    <div class="ui-col-1">
                                        <el-input type="text" :readonly="!editable" v-model="newbornData.other" clearable></el-input>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="5">
                    转诊意见:
                    <el-radio-group :disabled="!editable" v-model="newbornData.referral">
                        <el-radio :disabled="!editable" v-model="radio" label="1">无</el-radio>
                        <el-radio :disabled="!editable" v-model="radio" label="2">有
                        </el-radio>
                    </el-radio-group>
                    <div class="setinput ui-grid">
                        <div class="ui-col-0">
                            原因:
                        </div>
                        <div class="ui-col-1">
                            <el-input type="text" :readonly="!editable" v-model="newbornData.referral_REASON" clearable></el-input>
                        </div>
                    </div>
                    <div class="ui-grid">
                        <div class="ui-col-1 ui-grid setinput">
                            <div class="ui-col-0">
                                机构:
                            </div>
                            <div class="ui-col-1">
                                <el-input type="text" :readonly="!editable" v-model="newbornData.organization_ORG_NAME" clearable></el-input>
                            </div>
                        </div>
                        <div class="ui-col-1 ui-grid setinput">
                            <div class="ui-col-0">
                                科室:
                            </div>
                            <div class="ui-col-1">
                                <el-input type="text" :readonly="!editable" v-model="newbornData.organization" clearable></el-input>
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="5" class="setinput">
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            指导:
                        </div>
                        <div class="ui-col-1">
                            <el-checkbox-group v-model="guide_check" :disabled="!editable">
                                <el-checkbox label="1">喂养指导</el-checkbox>
                                <el-checkbox label="2">发育指导</el-checkbox>
                                <el-checkbox label="3">防病指导</el-checkbox>
                                <el-checkbox label="4">预防伤害指导</el-checkbox>
                                <el-checkbox label="5">口腔保健指导</el-checkbox>
                                <el-checkbox label="6">其他
                                    <el-input type="text" :readonly="other_GUIDE_CONTENT_dis||!editable" v-model="newbornData.other_GUIDE_CONTENT" clearable></el-input>
                                </el-checkbox>
                            </el-checkbox-group>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            本次访视日期
                        </div>
                        <div class="ui-col-1">
                            <el-date-picker :readonly="!editable" v-model="newbornData.this_INTERVIEW_DATE" type="date" placeholder="选择日期">
                            </el-date-picker>
                        </div>
                    </div>
                </td>
                <td colspan="3">
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            下次随访地点
                        </div>
                        <div class="ui-col-1">
                            <el-input :readonly="!editable" v-model="newbornData.next_VISITING_ADDRESS" placeholder="" clearable></el-input>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="ui-grid">
                        <div class="ui-col-0">
                            下次访视日期
                        </div>
                        <div class="ui-col-1">
                            <el-date-picker :readonly="!editable" v-model="newbornData.next_VISITING_DATE" type="date" placeholder="选择日期">
                            </el-date-picker>
                        </div>
                    </div>
                </td>
                <td colspan="3">
                    <div class="ui-grid">
                        <div class="ui-col-1 ui-grid setinput">
                            <div class="ui-col-0">
                                随访医生签名:
                            </div>
                            <div class="ui-col-1">
                                <el-input type="text" :readonly="!editable" v-model="newbornData.organization_ORG_NAME" clearable></el-input>
                            </div>
                        </div>
                        <div class="ui-col-1 ui-grid setinput">
                            <div class="ui-col-0">
                                家属确认签字:
                            </div>
                            <div class="ui-col-1">
                                <el-input type="text" :readonly="!editable" v-model="newbornData.organization" clearable></el-input>
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        <fangshi-detail-6 :followupId="followupId" :version="version"></fangshi-detail-6>
        <follow-bottom :followupId="followupId"></follow-bottom>
    </div>
    <script src="../../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../../js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
@ -700,407 +50,32 @@
    <script src="../../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../../js/element-ui.js" type="text/javascript" charset="utf-8"></script>
    <!-- 签到信息组件 -->
    <script src="../../../../component/followup/follow-bottom.js"></script>
    <!-- 完成随访按钮组件 -->
    <script src="../../../../component/followup/finish-followup-btn.js"></script>
    <!-- 新生儿信息组件 -->
    <script src="../../../../component/followup/fangshi-detail-6.js"></script>
    <script src="../../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../../api/fangshi-api.js"></script>
    <script>
        var Request = GetRequest();
        new Vue({
            el: "#app",
            data: function () {
                return {
                    editable: true,
                    isEditBtn: true,
                    birth_OTHER: true,
                    pregnancy_SICK_CIRCS_other: true,
                    SCREENING_3_dis: true,
                    bregma_other_dis: true,
                    eye_NULL_dis: true,
                    limbs_NULL_dis: true,
                    complexion_NULL_dis: true,
                    ear_FACE_dis: true,
                    neck_PACK_NULL_dis: true,
                    nose_PERFORMANCE_dis: true,
                    skin_PERFORMANCE_dis: true,
                    oral_PERFORMANCE_dis: true,
                    anus_PERFORMANCE_dis: true,
                    heart_PERFORMANCE_dis: true,
                    genitalia_NULL_dis: true,
                    abdomen_NULL_dis: true,
                    vertebral_NULL_dis: true,
                    umbilical_NULL_dis: true,
                    other_GUIDE_CONTENT_dis: true,
                    delivery_WAY_check: [],
                    SCREENING_check: [],
                    guide_check: [],
                    data2: "",
                    radio: "",
                    input: '',
                    name: '',
                    number: '',
                    newbornData: {}
                    followupId: Request['id'],
                    version: Request['version'],
                }
            },
            computed: {
                pregnancy_SICK: function () {
                    return this.newbornData.pregnancy_SICK
                },
                bregma: function () {
                    return this.newbornData.bregma
                },
                complexion: function () {
                    return this.newbornData.complexion
                },
                eye: function () {
                    return this.newbornData.eye
                },
                limbs: function () {
                    return this.newbornData.limbs
                },
                neck_PACK: function () {
                    return this.newbornData.neck_PACK
                },
                ear: function () {
                    return this.newbornData.ear
                },
                nose: function () {
                    return this.newbornData.nose
                },
                skin: function () {
                    return this.newbornData.skin
                },
                oral: function () {
                    return this.newbornData.oral
                },
                anus: function () {
                    return this.newbornData.anus
                },
                heart: function () {
                    return this.newbornData.heart
                },
                genitalia: function () {
                    return this.newbornData.genitalia
                },
                abdomen: function () {
                    return this.newbornData.abdomen
                },
                vertebral: function () {
                    return this.newbornData.vertebral
                },
                umbilical: function () {
                    return this.newbornData.umbilical
                }
            },
            watch: {
                umbilical: function (i) {
                    var a = i.indexOf('4')
                    if (a > -1) {
                        this.umbilical_NULL_dis = false
                    } else {
                        this.umbilical_NULL_dis = true
                        this.newbornData.umbilical_NULL = ''
                    }
                },
                vertebral: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.vertebral_NULL_dis = false
                    } else {
                        this.vertebral_NULL_dis = true
                        this.newbornData.vertebral_NULL = ''
                    }
                },
                abdomen: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.abdomen_NULL_dis = false
                    } else {
                        this.abdomen_NULL_dis = true
                        this.newbornData.abdomen_NULL = ''
                    }
                },
                genitalia: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.genitalia_NULL_dis = false
                    } else {
                        this.genitalia_NULL_dis = true
                        this.newbornData.genitalia_NULL = ''
                    }
                },
                heart: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.heart_PERFORMANCE_dis = false
                    } else {
                        this.heart_PERFORMANCE_dis = true
                        this.newbornData.heart_PERFORMANCE = ''
                    }
                },
                anus: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.anus_PERFORMANCE_dis = false
                    } else {
                        this.anus_PERFORMANCE_dis = true
                        this.newbornData.anus_PERFORMANCE = ''
                    }
                },
                oral: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.oral_PERFORMANCE_dis = false
                    } else {
                        this.oral_PERFORMANCE_dis = true
                        this.newbornData.oral_PERFORMANCE = ''
                    }
                },
                skin: function (i) {
                    var a = i.indexOf('4')
                    if (a > -1) {
                        this.skin_PERFORMANCE_dis = false
                    } else {
                        this.skin_PERFORMANCE_dis = true
                        this.newbornData.skin_PERFORMANCE = ''
                    }
                },
                nose: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.nose_PERFORMANCE_dis = false
                    } else {
                        this.nose_PERFORMANCE_dis = true
                        this.newbornData.nose_PERFORMANCE = ''
                    }
                },
                neck_PACK: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.neck_PACK_NULL_dis = false
                    } else {
                        this.neck_PACK_NULL_dis = true
                        this.newbornData.neck_PACK_NULL = ''
                    }
                },
                limbs: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.limbs_NULL_dis = false
                    } else {
                        this.limbs_NULL_dis = true
                        this.newbornData.limbs_NULL = ''
                    }
                },
                ear: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.ear_FACE_dis = false
                    } else {
                        this.ear_FACE_dis = true
                        this.newbornData.ear_FACE = ''
                    }
                },
                limbs: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.limbs_NULL_dis = false
                    } else {
                        this.limbs_NULL_dis = true
                        this.newbornData.limbs_NULL = ''
                    }
                },
                eye: function (i) {
                    var a = i.indexOf('2')
                    if (a > -1) {
                        this.eye_NULL_dis = false
                    } else {
                        this.eye_NULL_dis = true
                        this.newbornData.eye_NULL = ''
                    }
                },
                pregnancy_SICK: function (i) {
                    var a = i.indexOf('4')
                    if (a > -1) {
                        this.pregnancy_SICK_CIRCS_other = false
                    } else {
                        this.pregnancy_SICK_CIRCS_other = true
                        this.newbornData.pregnancy_SICK_CIRCS = ''
                    }
                },
                bregma: function (i) {
                    var a = i.indexOf('4')
                    if (a > -1) {
                        this.bregma_other_dis = false
                    } else {
                        this.bregma_other_dis = true
                        this.newbornData.bregma_PERFORMANCE = ''
                    }
                },
                complexion: function (i) {
                    var a = i.indexOf('3')
                    if (a > -1) {
                        this.complexion_NULL_dis = false
                    } else {
                        this.complexion_NULL_dis = true
                        this.newbornData.complexion_NULL = ''
                    }
                },
                delivery_WAY_check: function (i) {
                    var a = i.indexOf('7')
                    if (a > -1) {
                        this.birth_OTHER = false
                    } else {
                        this.birth_OTHER = true
                        this.newbornData.birth_OTHER = ''
                    }
                },
                SCREENING_check: function (i) {
                    var a = i.indexOf('5')
                    if (a > -1) {
                        this.SCREENING_3_dis = false
                    } else {
                        this.SCREENING_3_dis = true
                        this.newbornData.screening_ABNORMAL = ''
                    }
                }
            },
            mounted: function () {
                // this.getData()
            },
            methods: {
                getData: function () {
                    var vm = this
                    fangshiAPI.getNewbornFamilyVisitRecord({ followupId: this.followupId || '2' }).then(function (res) {
                        if (res.status == 200) {
                            var data = res.data
                            vm.newbornData = data
                            var vmN = vm.newbornData
                            vmN.help_ORGANIZATION_FLAG = data.help_ORGANIZATION_FLAG ? data.help_ORGANIZATION_FLAG.toString() : ''
                            vmN.sick_SEX = data.sick_SEX ? data.sick_SEX.toString() : ''
                            vmN.pregnancy_SICK = data.pregnancy_SICK.toString()
                            vm.delivery_WAY_check = data.delivery_WAY.split(',');
                            vmN.suffocation = data.suffocation ? data.suffocation.toString() : ''
                            vmN.plan_IMMUNE = data.plan_IMMUNE ? data.plan_IMMUNE.toString() : ''
                            vmN.deformity_NULL = data.deformity_NULL ? data.deformity_NULL.toString() : ''
                            vmN.hearing = data.hearing ? data.hearing.toString() : ''
                            vmN.feed_TYPE = data.feed_TYPE ? data.feed_TYPE.toString() : ''
                            vmN.vomit = data.vomit ? data.vomit.toString() : ''
                            vmN.vulnus = data.vulnus ? data.vulnus.toString() : ''
                            vmN.vulnus_TIME = data.vulnus_TIME ? data.vulnus_TIME.toString() : ''
                            vmN.body_TEMPERATURE = data.body_TEMPERATURE ? data.body_TEMPERATURE.toString() : ""
                            vmN.complexion = data.complexion ? data.complexion.toString() : ""
                            vmN.face = data.face ? data.face.toString() : ''
                            vmN.bregma = data.bregma ? data.bregma.toString() : ''
                            vmN.eye = data.eye ? data.eye.toString() : ''
                            vmN.limbs = data.limbs ? data.limbs.toString() : ''
                            vmN.ear = data.ear ? data.ear.toString() : ''
                            vmN.nose = data.nose ? data.nose.toString() : ''
                            vmN.neck_PACK = data.neck_PACK ? data.neck_PACK.toString() : ''
                            vmN.skin = data.skin ? data.skin.toString() : ""
                            vmN.oral = data.oral ? data.oral.toString() : ''
                            vmN.anus = data.anus ? data.anus.toString() : ""
                            vmN.heart = data.heart ? data.heart.toString() : ''
                            vmN.genitalia = data.genitalia ? data.genitalia.toString() : ''
                            vmN.abdomen = data.abdomen ? data.abdomen.toString() : ""
                            vmN.vertebral = data.vertebral ? data.vertebral.toString() : ''
                            vmN.referral = data.referral ? data.referral.toString() : ''
                            vmN.umbilical = data.umbilical ? data.umbilical.toString() : ''
                            if (data.screening_4 == 1) {
                                vm.SCREENING_check.push('1')
                            } if (data.screening_5 == 1) {
                                vm.SCREENING_check.push('2')
                            } if (data.screening_1 == 1) {
                                vm.SCREENING_check.push('3')
                            } if (data.screening_2 == 1) {
                                vm.SCREENING_check.push('4')
                            } if (data.screening_3 == 1) {
                                vm.SCREENING_check.push('5')
                            } if (data.screening_6 == 1) {
                                vm.SCREENING_check.push('6')
                            }
                            if (data.feed_GUID == 1) {
                                vm.guide_check.push('1')
                            } if (data.growup_GUID == 1) {
                                vm.guide_check.push('2')
                            } if (data.prevention_DEFORMITY_GUID == 1) {
                                vm.guide_check.push('3')
                            } if (data.prevention_HURT_GUID == 1) {
                                vm.guide_check.push('4')
                            } if (data.oral_CAVITY_GUID == 1) {
                                vm.guide_check.push('5')
                            } if (data.other_GUIDE == 1) {
                                vm.guide_check.push('6')
                            }
                        } else {
                            top.toastr.error(res.msg);
                        }
                    })
                },
                editData: function () {
                    var vm = this
                    var vmN = this.newbornData
                    vmN.delivery_WAY = vm.delivery_WAY_check.join(',')
                    vm.SCREENING_check.map(function(i) {
                        if (i == '1') {
                            vmN.screening_4 = 1
                        } if (i == '2') {
                            vmN.screening_5 = 1
                        } if (i == '3') {
                            vmN.SCREENING_3 = 1
                        } if (i == '4') {
                            vmN.screening_2 = 1
                        } if (i == '5') {
                            vmN.screening_3 = 1
                        } if (i == '6') {
                            vmN.screening_6 = 1
                        }
                    })
                    vm.guide_check.map(function(i) {
                        if (i == '1') {
                            vmN.feed_GUID = 1
                        } if (i == '2') {
                            vmN.growup_GUID = 1
                        } if (i == '3') {
                            vmN.prevention_DEFORMITY_GUID = 1
                        } if (i == '4') {
                            vmN.prevention_HURT_GUID = 1
                        } if (i == '5') {
                            vmN.oral_CAVITY_GUID = 1
                        } if (i == '6') {
                            vmN.other_GUIDE = 1
                        }
                    })
                    vmN.create_time = null
                    vmN.version = '1'
                    fangshiAPI.saveNewbornFamilyVisitRecord({ followupId: this.followupId || '2', newbornFamilyVisitRecordData: JSON.stringify(vmN) }).then(function (res) {
                        if (res.status == 200) {
                            top.toastr.info('保存成功')
                        } else {
                            top.toastr.error(res.msg);
                        }
                    })
                },
                editBtn: function () {
                    this.isEditBtn = !this.isEditBtn
                    if (this.isEditBtn == true) {
                        var btn = document.getElementsByClassName('button')[0]
                        btn.innerHTML = '编辑'
                        this.editable = false
                        this.editData()
                    } else if (this.isEditBtn == false) {
                        var btn = document.getElementsByClassName('button')[0]
                        btn.innerHTML = '保存'
                        this.editable = true
                    }
                }
            }
        })
    </script>
</body>

+ 46 - 41
app/followup/v1/html/fangshi-detail-7.html

@ -32,8 +32,7 @@
<body>
    <div id="app">
        <button class="button" @click="editBtn()">编辑</button>
        <finish-followup-btn :followupId="followupId" :finishedBtn="finishedBtn" v-on:getfinish="getFinishfChild($event)"></finish-followup-btn>
        <button class="button" @click="editBtn()">&nbsp;</button>
        <p class="c-f20 mb10" style="text-align: center;">严重精神障碍患者随访服务记录表</p>
        <div class="ui-grid p10">
            <div class="ui-col-1">
@ -597,7 +596,7 @@
            data: function () {
                return {
                    editable: false,
                    finishedBtn: true,
					finishedStatus: null, //随访完成状态
                    isEditBtn: true,
                    death_reason_type_dis: true,
                    other_symptom: true,
@ -642,7 +641,9 @@
                        rehabilitation_other: "0",
                        followup_class: "",
	                    followup_next_date: "",
	                    doctor_name: ""
                        doctor_name: "",
                        followup_type:2,//默认家庭访视,
                        followup_date:new Date().format("yyyy-MM-dd")
                    },
                    followupId: Request['id'],
                    version: Request['version']
@ -744,8 +745,8 @@
                },
            },
            mounted: function () {
                this.getData()
                this.getStatus()
                //获取随访详情
				this.getData()
            },
            methods: {
                getData: function () {
@ -819,6 +820,19 @@
	                    		vmS.followup_next_date = data.followup_next_date || ""
	                    		vmS.doctor_name = data.doctor_name || ""
                            }
							vm.getStatus() //获取随访状态
                        } else {
                            top.toastr.error(res.msg);
                        }
                    })
                },
                // 完成随访状态修改
                finish: function () {
                    var vm=this
                    fangshiAPI.updateFollowStatus({ followupId: this.followupId }).then(function (res) {
                        if (res.status == 200) {
                            vm.getStatus()
                            top.toastr.info("完成随访成功")
                        } else {
                            top.toastr.error(res.msg);
                        }
@ -878,56 +892,47 @@
                    this.severeMentalDisorderData.version = this.version
                    fangshiAPI.saveFollowupSevereMentalDisorder({ followupId: this.followupId || '1', severeMentalDisorderData: JSON.stringify(this.severeMentalDisorderData) }).then(function (res) {
                        if (res.status == 200) {
                            //判断是否完成随访,未完成则将完成按钮显示出来
                            var btn=document.getElementById('isfinish')
                            if (vm.sfStatus != 1) {
                                vm.finishedBtn = false
                                btn.innerText='完成随访'
                            } else {
                                vm.finishedBtn = true
                                btn.innerText='已完成'
                            }
                            vm.getStatus()
                            top.toastr.info('保存成功')
							vm.finishedStatus ?  vm.getStatus() :  vm.finish()
							vm.finishedStatus ? top.toastr.info('保存成功') : ''
                        } else {
                            top.toastr.error(res.msg);
                        }
                    })
                },
                editBtn: function () {
                    this.isEditBtn = !this.isEditBtn
                    if (this.isEditBtn == true) {
                        var btn = document.getElementsByClassName('button')[0]
                        btn.innerHTML = '编辑'
                        this.editable = false
                        this.editData()
                    } else if (this.isEditBtn == false) {
                        var btn = document.getElementsByClassName('button')[0]
                        btn.innerHTML = '保存'
                        this.editable = true
                    }
                },
				setEditBtn: function () {
					var btn = document.getElementsByClassName('button')[0]
					if(!this.finishedStatus){
						btn.innerHTML='完成随访'
						this.editable = true
						return 
					}
					if (this.isEditBtn == true) {
						btn.innerHTML = '编辑'
						this.editable = false
					} else if (this.isEditBtn == false) {
						btn.innerHTML='保存'
						this.editable = true
					}
				},
                //获取当前随访状态信息  Request['id']||'1'
                getStatus: function () {
                    var vm = this
                    fangshiAPI.getFollowupInfo({ followupId: this.followupId || '1888107' }).then(function (res) {
                        if (res.status == 200) {
                            vm.sfStatus = res.data.status
                            var btn=document.getElementById('isfinish')
								if (vm.sfStatus != 1) {
									btn.innerText='完成随访'
								} else {
									btn.innerText='已完成'
								}
							res.data.status!=1?vm.finishedStatus=false:vm.finishedStatus=true
							vm.setEditBtn()
                        } else {
                            top.toastr.error(res.msg);
                        }
                    })
                },
                getFinishfChild: function (msg) {
                    this.finishedBtn = msg
                    this.getStatus()
                },
                editBtn: function () {
                    if (this.finishedStatus) {
                        this.isEditBtn = !this.isEditBtn
                    }
					this.setEditBtn()
					this.isEditBtn || !this.finishedStatus?this.editData():''//保存数据
				},
                forceUpdate: function() {
                	this.$forceUpdate()
                }

+ 35 - 33
app/followup/v1/html/fangshi-detail-8.html

@ -89,8 +89,7 @@
<body>
	<div id="app">
		<button class="button" @click="editBtn()">编辑</button>
		<finish-followup-btn :followupId="followupId" :finishedBtn="finishedBtn" v-on:getfinish="getFinishfChild($event)"></finish-followup-btn>
		<button class="button" @click="editBtn()">&nbsp;</button>
		<p class="c-f20 mb10" style="text-align: center;">健康体检表</p>
		<div class="ui-grid p10">
			<div class="ui-col-1">
@ -2025,7 +2024,7 @@
				el: "#app",
				data: function () {
					return {
						finishedBtn: true,
						finishedStatus: null, //随访完成状态
						editable: false,
						isEditBtn: true,
						symptom_other_dis: true,
@ -2105,9 +2104,8 @@
					}
				},
				mounted: function () {
					this.getData()
					//获取随访详情
					this.getStatus()
					this.getData()
				},
				computed: {
					rale: function () {
@ -2572,6 +2570,19 @@
										if (data[arr3[i]] == 2) { vm.dangerFacter_check.push((i + 1 + '')) }
									}
								}
								vm.getStatus() //获取随访状态
							} else {
								top.toastr.error(res.msg);
							}
						})
					},
					// 完成随访状态修改
					finish: function () {
						var vm = this
						fangshiAPI.updateFollowStatus({ followupId: this.followupid }).then(function (res) {
							if (res.status == 200) {
								vm.getStatus()
								top.toastr.info("完成随访成功")
							} else {
								top.toastr.error(res.msg);
							}
@ -2603,56 +2614,47 @@
						this.oldmanData.version = this.version || 'v1'	//版本号
						fangshiAPI.saveOlderPeopleHealthCheckRecord({ followupId: this.followupId || '2', olderPeopleHealthCheckData: JSON.stringify(this.oldmanData) }).then(function (res) {
							if (res.status == 200) {
								//判断是否完成随访,未完成则将完成按钮显示出来
								var btn=document.getElementById('isfinish')
								if (vm.sfStatus != 1) {
									vm.finishedBtn = false
									btn.innerText='完成随访'
								} else {
									vm.finishedBtn = true
									btn.innerText='已完成'
								}
								vm.getStatus()
								top.toastr.info('保存成功')
								vm.finishedStatus ? vm.getStatus() : vm.finish()
								vm.finishedStatus ? top.toastr.info('保存成功') : ''
							} else {
								top.toastr.error(res.msg);
							}
						})
					},
					editBtn: function () {
						this.isEditBtn = !this.isEditBtn
					setEditBtn: function () {
						var btn = document.getElementsByClassName('button')[0]
						if (!this.finishedStatus) {
							btn.innerHTML = '完成随访'
							this.editable = true
							return
						}
						if (this.isEditBtn == true) {
							var btn = document.getElementsByClassName('button')[0]
							btn.innerHTML = '编辑'
							this.editable = false
							this.editData()
						} else if (this.isEditBtn == false) {
							var btn = document.getElementsByClassName('button')[0]
							btn.innerHTML = '保存'
							this.editable = true
						}
					},
					editBtn: function () {
						if (this.finishedStatus) {
							this.isEditBtn = !this.isEditBtn
						}
						this.setEditBtn()
						this.isEditBtn || !this.finishedStatus ? this.editData() : ''//保存数据
					},
					//获取当前随访状态信息  Request['id']||'1'
					getStatus: function () {
						var vm = this
						fangshiAPI.getFollowupInfo({ followupId: this.followupId || '1888107' }).then(function (res) {
							if (res.status == 200) {
								vm.sfStatus = res.data.status
								var btn=document.getElementById('isfinish')
								if (vm.sfStatus != 1) {
									btn.innerText='完成随访'
								} else {
									btn.innerText='已完成'
								}
								res.data.status != 1 ? vm.finishedStatus = false : vm.finishedStatus = true
								vm.setEditBtn()
							} else {
								top.toastr.error(res.msg);
							}
						})
					},
					getFinishfChild: function (msg) {
						this.finishedBtn = msg
						this.getStatus()
					},
					},  
					Nnmber: function (event) {
						if (!event.keyCode >= 48 && event.keyCode <= 57) {
							return top.toastr.info('保存成功')

+ 35 - 26
app/followup/v1/html/fangshi-detail-9.html

@ -26,8 +26,7 @@
<body>
    <div id="app">
        <table class="table table-bordered">
            <button class="button" @click="editBtn()">编辑</button>
            <finish-followup-btn :followupId="followupId" :finishedBtn="finishedBtn" v-on:getfinish="getFinishfChild($event)"></finish-followup-btn>
            <button class="button" @click="editBtn()">&nbsp;</button>
            <p class="c-f20 mb10" style="text-align: center;">肺结核患者第一次入户随访记录表</p>
            <div class="ui-grid p10">
                <div class="ui-col-1">
@ -340,7 +339,7 @@
                el: "#app",
                data: function () {
                    return {
                        finishedBtn: true,
						finishedStatus: null, //随访完成状态
                        editable: false,
                        isEditBtn: true,
                        data2: {
@ -360,8 +359,8 @@
                    }
                },
                mounted: function () {
                    this.getData()
                    this.getStatus()
					//获取随访详情
					this.getData()
                },
                methods: {
                    getData: function () {
@ -407,6 +406,19 @@
                                    vm.isEditBtn = false
                                    vm.editable = true
                                }
                                vm.getStatus() //获取随访状态
                            } else {
                                top.toastr.error(res.msg);
                            }
                        })
                    },
                    // 完成随访状态修改
                    finish: function () {
                        var vm = this
                        fangshiAPI.updateFollowStatus({ followupId: this.followupid }).then(function (res) {
                            if (res.status == 200) {
                                vm.getStatus()
                                top.toastr.info("完成随访成功")
                            } else {
                                top.toastr.error(res.msg);
                            }
@ -426,45 +438,42 @@
                        fangshiAPI.savePhthisisFirstCheckRecord({ jsonData: JSON.stringify(data) }).then(function (res) {
                            if (res.status == 200) {
                                //判断是否完成随访,未完成则将完成按钮显示出来
                                if (vm.sfStatus != 1) {
                                    vm.finishedBtn = false
                                } else {
                                    vm.finishedBtn = true
                                }
                                vm.getStatus()
                                top.toastr.info('保存成功')
								vm.finishedStatus ? vm.getStatus() : vm.finish()
								vm.finishedStatus ? top.toastr.info('保存成功') : ''
                            } else {
                                top.toastr.error(res.msg);
                            }
                        })
                    },
                    editBtn: function () {
                        this.isEditBtn = !this.isEditBtn
                    setEditBtn: function () {
                        var btn = document.getElementsByClassName('button')[0]
                        if (!this.finishedStatus) {
                            btn.innerHTML = '完成随访'
                            this.editable = true
                            return
                        }
                        if (this.isEditBtn == true) {
                            var btn = document.getElementsByClassName('button')[0]
                            btn.innerHTML = '编辑'
                            this.editable = false
                            this.editData()
                        } else if (this.isEditBtn == false) {
                            var btn = document.getElementsByClassName('button')[0]
                            btn.innerHTML = '保存'
                            this.editable = true
                        }
                    },
                    editBtn: function () {
                    if (this.finishedStatus) {
                        this.isEditBtn = !this.isEditBtn
                    }
					this.setEditBtn()
                    this.isEditBtn || !this.finishedStatus?this.editData():''//保存数据
                    },
                    //获取当前随访状态信息  Request['id']||'1'
                    getStatus: function () {
                        var vm = this
                        fangshiAPI.getFollowupInfo({ followupId: this.followupId || '1888107' }).then(function (res) {
                            if (res.status == 200) {
                                vm.sfStatus = res.data.status
                                var btn=document.getElementById('isfinish')
								if (vm.sfStatus != 1) {
									btn.innerText='完成随访'
								} else {
									btn.innerText='已完成'
								}
								res.data.status != 1 ? vm.finishedStatus = false : vm.finishedStatus = true
								vm.setEditBtn()
                            } else {
                                top.toastr.error(res.msg);
                            }

+ 51 - 15
component/followup/fangshi-detail-6.js

@ -1,6 +1,6 @@
Vue.component('fangshi-detail-6', {
    template: '<div class="mt40">\
    <button class="button" @click="editBtn()">编辑</button>\
    <button class="button" @click="editBtn()">&nbsp;</button>\
    <p class="c-f20 mb10" style="text-align: center;">新生儿家庭访视记录表</p>\
    <div class="ui-grid p10 setradio">\
        <div class="ui-col-1">\
@ -659,8 +659,9 @@ Vue.component('fangshi-detail-6', {
    props: ['followupid', 'version'],
    data: function () {
        return {
            finishedStatus: null, //随访完成状态
            editable: false,
            isEditBtn: true,
            isEditBtn: true,//是否是编辑按钮
            birth_OTHER: true,
            pregnancy_SICK_CIRCS_other: true,
            SCREENING_3_dis: true,
@ -688,7 +689,7 @@ Vue.component('fangshi-detail-6', {
            input: '',
            name: '',
            number: '',
            newbornData: {}
            newbornData: {},
        }
    },
    computed: {
@ -929,6 +930,7 @@ Vue.component('fangshi-detail-6', {
    },
    mounted: function () {
        //获取随访详情
        this.getData()
    },
    methods: {
@ -942,7 +944,7 @@ Vue.component('fangshi-detail-6', {
                        var vmN = vm.newbornData
                        vmN.help_ORGANIZATION_FLAG = data.help_ORGANIZATION_FLAG ? data.help_ORGANIZATION_FLAG.toString() : ''
                        vmN.sick_SEX = data.sick_SEX ? data.sick_SEX.toString() : ''
                        vmN.pregnancy_SICK = data.pregnancy_SICK?data.pregnancy_SICK.toString():''
                        vmN.pregnancy_SICK = data.pregnancy_SICK ? data.pregnancy_SICK.toString() : ''
                        vm.delivery_WAY_check = data.delivery_WAY ? data.delivery_WAY.split(',') : [];
                        vmN.suffocation = data.suffocation ? data.suffocation.toString() : ''
                        vmN.plan_IMMUNE = data.plan_IMMUNE ? data.plan_IMMUNE.toString() : ''
@ -999,7 +1001,19 @@ Vue.component('fangshi-detail-6', {
                        }
                    }
                    vm.getStatus() //获取随访状态
                } else {
                    top.toastr.error(res.msg);
                }
            })
        },
        // 完成随访状态修改
        finish: function () {
            var vm = this
            fangshiAPI.updateFollowStatus({ followupId: this.followupid }).then(function (res) {
                if (res.status == 200) {
                    vm.getStatus()
                    top.toastr.info("完成随访成功")
                } else {
                    top.toastr.error(res.msg);
                }
@ -1009,7 +1023,7 @@ Vue.component('fangshi-detail-6', {
            var vm = this
            var vmN = this.newbornData
            vmN.delivery_WAY = vm.delivery_WAY_check.join(',')
            vm.SCREENING_check.map(function(i){
            vm.SCREENING_check.map(function (i) {
                if (i == '1') {
                    vmN.screening_4 = 1
                } if (i == '2') {
@ -1024,7 +1038,7 @@ Vue.component('fangshi-detail-6', {
                    vmN.screening_6 = 1
                }
            })
            vm.guide_check.map(function(i) {
            vm.guide_check.map(function (i) {
                if (i == '1') {
                    vmN.feed_GUID = 1
                } if (i == '2') {
@ -1043,25 +1057,47 @@ Vue.component('fangshi-detail-6', {
            vmN.version = this.version
            fangshiAPI.saveNewbornFamilyVisitRecord({ followupId: this.followupid || '2', newbornFamilyVisitRecordData: JSON.stringify(vmN) }).then(function (res) {
                if (res.status == 200) {
                    top.toastr.info('保存成功')
                    vm.finishedStatus ? vm.getStatus() : vm.finish()
                    vm.finishedStatus ? top.toastr.info('保存成功') : ''
                } else {
                    top.toastr.error(res.msg);
                }
            })
        },
        editBtn: function () {
            this.isEditBtn = !this.isEditBtn
        setEditBtn: function () {
            var btn = document.getElementsByClassName('button')[0]
            if(!this.finishedStatus){
                btn.innerHTML='完成随访'
                this.editable = true
                return 
            }
            if (this.isEditBtn == true) {
                var btn = document.getElementsByClassName('button')[2]
                btn.innerHTML = '编辑'
                this.editable = false
                this.editData()
            } else if (this.isEditBtn == false) {
                var btn = document.getElementsByClassName('button')[2]
                btn.innerHTML = '保存'
                btn.innerHTML='保存'
                this.editable = true
            }
        }
        },
        editBtn: function () {
            if (this.finishedStatus) {
                this.isEditBtn = !this.isEditBtn
            }
            this.setEditBtn()
            this.isEditBtn || !this.finishedStatus?this.editData():''//保存数据
        },
        //获取当前随访状态信息  Request['id']||'1'
        getStatus: function () {
            var vm = this
            fangshiAPI.getFollowupInfo({ followupId: this.followupid || '1888107' }).then(function (res) {
                if (res.status == 200) {
                    res.data.status!=1?vm.finishedStatus=false:vm.finishedStatus=true
                    vm.setEditBtn()
                } else {
                    top.toastr.error(res.msg);
                }
            })
        },  
    }
})