zhangyanfang il y a 6 ans
Parent
commit
66d1bd19d0

+ 9 - 0
app/followup/v1/css/fangshi-detail.css

@ -86,3 +86,12 @@ label{font-weight: normal;}
div.ui-col-0{
	line-height: 27px;
}
.button{
	margin-right: 0px;
}
.button:nth-child(2){
	background:#FFC66F;
}
.finish{
	background:#e1e1e1 !important;
}

+ 41 - 14
app/followup/v1/html/fangshi-detail-8.html

@ -90,6 +90,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>
		<p class="c-f20 mb10" style="text-align: center;">健康体检表</p>
		<div class="ui-grid p10">
			<div class="ui-col-1">
@ -343,7 +344,7 @@
						<div class="ui-col-1">
							<el-input :readonly="!editable" v-model="oldmanData.exercise_type" placeholder="" clearable></el-input>
						</div>
						<div class="ui-col-0">年</div>
						<div class="ui-col-0 lh27">年</div>
					</div>
				</td>
			</tr>
@ -447,7 +448,7 @@
					<div class="ui-col-1">
						<el-input :readonly="!editable" v-model="oldmanData.start_drinking_age" placeholder="" clearable></el-input>
					</div>
					<div class="ui-col-0">岁</div>
					<div class="ui-col-0 lh27">岁</div>
				</td>
				<td class="col-w120 c-t-center">近一年是否曾醉酒</td>
				<td>
@ -2000,7 +2001,7 @@
				</div>
			</div>
		</div>
		<follow-bottom></follow-bottom>
		<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>
@ -2010,6 +2011,7 @@
		<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="../../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../../api/fangshi-api.js"></script>
		<script>
@ -2018,6 +2020,7 @@
				el: "#app",
				data: function () {
					return {
						finishedBtn: true,
						editable: false,
						isEditBtn: true,
						symptom_other_dis: true,
@ -2097,6 +2100,8 @@
				},
				mounted: function () {
					this.getData()
					//获取随访详情
					this.getStatus()
				},
				computed: {
					dust_protective_measures: function () {
@ -2293,13 +2298,13 @@
					},
					health_examination: function (i) {
						if (i == '2') {
							for(var i=1;i<5;i++){
								this['health_examination_abnormal'+i+'_dis']=false
							for (var i = 1; i < 5; i++) {
								this['health_examination_abnormal' + i + '_dis'] = false
							}
						}else{
							for(var i=1;i<5;i++){
								this['health_examination_abnormal'+i+'_dis']=true
								this.oldmanData['health_examination_abnormal'+i]=''
						} else {
							for (var i = 1; i < 5; i++) {
								this['health_examination_abnormal' + i + '_dis'] = true
								this.oldmanData['health_examination_abnormal' + i] = ''
							}
						}
					},
@ -2576,6 +2581,13 @@
						this.oldmanData.version = this.version || 'v1'	//版本号
						fangshiAPI.saveOlderPeopleHealthCheckRecord({ followupId: this.followupId || '2', olderPeopleHealthCheckData: JSON.stringify(this.oldmanData) }).then(function (res) {
							if (res.status == 200) {
								//判断是否完成随访,未完成则将完成按钮显示出来
								if (vm.sfStatus != 1) {
									vm.finishedBtn = false
								} else {
									vm.finishedBtn = true
								}
								vm.getStatus()
								top.toastr.info('保存成功')
							} else {
								top.toastr.error(res.msg);
@ -2594,11 +2606,26 @@
							btn.innerHTML = '保存'
							this.editable = true
						}
					}
				},
				Nnmber: function (event) {
					if (!event.keyCode >= 48 && event.keyCode <= 57) {
						return top.toastr.info('保存成功')
					},
					//获取当前随访状态信息  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
							} 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('保存成功')
						}
					}
				}

+ 31 - 0
component/followup/finish-followup-btn.js

@ -0,0 +1,31 @@
Vue.component('finish-followup-btn', {
    template: `
    <button class="button" :class="{'finish':finishedbtn}" @click="finished()" :disabled="finishedbtn">完成随访</button>
    `,
    props: ['followupid', 'finishedbtn'],
    data: function () {
        return {
            sfStatus: '',  //当前的随访状态}
        }
    },
    watch: {
    },
    mounted: function () {
    },
    methods: {
        //点击完成随访时  Request['id']||'1'
        finished: function () {
            var vm = this
            fangshiAPI.updateFollowStatus({ followupId: this.followupid || '1888107' }).then(function (res) {
                if (res.status == 200) {
                    vm.$emit('getfinish', true)
                    top.toastr.info("完成随访")
                } else {
                    top.toastr.error(res.msg);
                }
            })
        },
    },
})

+ 1 - 0
component/followup/follow-bottom.js

@ -29,6 +29,7 @@ Vue.component('follow-bottom', {
	},
	mounted: function () {
		this.getData()
		
	},
	methods: {
		getData: function () {