Browse Source

表单默认值-功能

zhangyanfang 5 years ago
parent
commit
eb16b167a3

+ 4 - 2
app/followup/v1/html/fangshi-detail-10.html

@ -894,7 +894,7 @@
                            {
                                "create_user": '',
                                "create_user_name": '',
                                "followup_date": null,//随访日期,
                                "followup_date": new Date().format("yyyy-MM-dd"),//随访日期,
                                "way": '',//随访方式:1-门诊,2-家庭 3-电话   //整数
                                "treate_month": '',//治疗月序
                                "superviser": {
@ -1244,7 +1244,9 @@
                    var vm = this
                    fangshiAPI.getFollowupInfo({ followupId: Request['id']||'1'}).then(function (res) {
                            if (res.status == 200) {
								res.data.status != 1 ? vm.finishedStatus = false : vm.finishedStatus = true
                                res.data.status != 1 ? vm.finishedStatus = false : vm.finishedStatus = true
                                vm.parient.patient.name=res.data.patient.name
                                vm.parient.management.signature_doctor_name=res.data.doctorName
								vm.setEditBtn()
                            } else {
                                top.toastr.error(res.msg);

+ 8 - 2
app/followup/v1/html/fangshi-detail-5.html

@ -252,6 +252,7 @@
						breast_feeding: '0',
						newborn_care_and_feeding: '0',
						other_guide: '0',
						followup_date:''
					},
					followupId: Request['id'],
					version: Request['version'],
@ -318,7 +319,7 @@
					vmP.visiting_doctor_name = data.visiting_doctor_name
				},
				getLastData:function(){
				getLastData:function(doctorName){
                    var vm=this
                    fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass,patientCode:vm.patientCode }).then(function (res) {
						if (res.status == 200) {
@ -327,11 +328,15 @@
							if (vm.finishedStatus) {
								vm.getData()
							} else {
								//默认随访医生签名
								vm.postpartumVisitDetails.visiting_doctor_name=doctorName
								// 居民存在上次历史记录,则代入默认信息
								if (res.data.detail) {
									vm.postpartumVisitDetails = res.data.detail
									vm.dealData(data)
								}
								//默认随访时间为当前时间
								vm.postpartumVisitDetails.followup_date = new Date().format("yyyy-MM-dd")
							}
						}
                    })
@ -384,7 +389,8 @@
							res.data.status!=1?vm.finishedStatus=false:vm.finishedStatus=true
							vm.patientCode=res.data.patientCode
							vm.followupClass=res.data.followupClass
							vm.getLastData()//获取patientCode,followupClass 获取上一次数据
							var doctorName=res.data.doctorName
							vm.getLastData(doctorName)//获取patientCode,followupClass 获取上一次数据
							vm.setEditBtn()
						} else {
							top.toastr.error(res.msg);

+ 10 - 5
app/followup/v1/html/fangshi-detail-7.html

@ -643,7 +643,7 @@
	                    followup_next_date: "",
                        doctor_name: "",
                        followup_type:2,//默认家庭访视,
                        followup_date:new Date().format("yyyy-MM-dd")
                        followup_date:''
                    },
                    followupId: Request['id'],
                    version: Request['version'],
@ -689,7 +689,7 @@
                        this.referral_dis = false
                    } else {
                        this.referral_dis = true
                        this.referral_reason = ''
                        this.severeMentalDisorderData.referral_reason = ''
                    }
                },
                is_referral: function (i) {
@ -831,7 +831,7 @@
                    vmS.doctor_name = data.doctor_name || ""
                },
                getLastData: function () {
                getLastData: function (doctorName) {
                    var vm = this
                    fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass, patientCode: vm.patientCode }).then(function (res) {
                        if (res.status == 200) {
@ -840,11 +840,15 @@
                            if (vm.finishedStatus) {
                                vm.getData()
                            } else {
                                // 默认医生签名
                                vm.severeMentalDisorderData.doctor_name=doctorName
                                // 居民存在上次历史记录,则代入默认信息
                                if (res.data.detail) {
                                    vm.severeMentalDisorderData = res.data.detail
                                    vm.dealData(data)
                                }
                                //默认登记时间为当前时间
                                vm.severeMentalDisorderData.followup_date=new Date().format("yyyy-MM-dd")
                            }
                        }
                    })
@ -944,8 +948,9 @@
                        if (res.status == 200) {
                            res.data.status!=1?vm.finishedStatus=false:vm.finishedStatus=true
							vm.patientCode=res.data.patientCode
							vm.followupClass=res.data.followupClass
							vm.getLastData()//获取patientCode,followupClass 获取上一次数据
                            vm.followupClass=res.data.followupClass
                            var doctorName=res.data.doctorName
							vm.getLastData(doctorName)//获取patientCode,followupClass 获取上一次数据
                            vm.setEditBtn()
                        } else {
                            top.toastr.error(res.msg);

+ 12 - 3
app/followup/v1/html/fangshi-detail-8.html

@ -2094,7 +2094,8 @@
							exercise: '1',
							lose_weight: '1',
							recommended_vaccination: '1',
							other_advice: '1'
							other_advice: '1',
							duty:''
						},
						data1: "",
						input: null,
@ -2580,11 +2581,14 @@
						}
					},
					getLastData: function () {
					getLastData: function (obj) {
						var vm = this
						fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass, patientCode: vm.patientCode }).then(function (res) {
							if (res.status == 200) {
								var data = res.data.detail
								//默认信息
								vm.oldmanData.name=obj.name
								vm.oldmanData.idcard=obj.idcard
								// finishedStatus:true 随访完成,false 随访未完成
								if (vm.finishedStatus) {
									vm.getData()
@ -2594,6 +2598,8 @@
										vm.oldmanData = res.data.detail
										vm.dealData(data)
									}
									//默认随访时间为当前时间(不被历史记录覆盖)
									vm.oldmanData.duty = new Date().format("yyyy-MM-dd")
								}
							}
						})
@ -2673,7 +2679,10 @@
								res.data.status != 1 ? vm.finishedStatus = false : vm.finishedStatus = true
								vm.patientCode = res.data.patientCode
								vm.followupClass = res.data.followupClass
								vm.getLastData()//获取patientCode,followupClass 获取上一次数据
								var obj={}
								obj.name=res.data.patient.name
								obj.idcard=res.data.patient.idcard
								vm.getLastData(obj)//获取patientCode,followupClass 获取上一次数据
								vm.setEditBtn()
							} else {
								top.toastr.error(res.msg);

+ 14 - 3
app/followup/v1/html/fangshi-detail-9.html

@ -349,7 +349,10 @@
                            superviser: {},
                            home_environment: {},
                            life_style: {},
                            health_edu: {}
                            health_edu: {},
                            followup_date:'',
                            way:2,   //默认家庭,
                            signature_doctor_name:''
                        },
                        radio: "",
                        input: '',
@ -411,7 +414,7 @@
                        }
                    },
                    getLastData: function () {
                    getLastData: function (obj) {
                        var vm = this
                        fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass, patientCode: vm.patientCode }).then(function (res) {
                            if (res.status == 200) {
@ -420,11 +423,16 @@
                                if (vm.finishedStatus) {
                                    vm.getData()
                                } else {
                                    // 默认信息
                                    vm.data2.patient.name = obj.name
                                    vm.data2.signature_doctor_name = obj.doctorName
                                    // 居民存在上次历史记录,则代入默认信息
									if (res.data.detail) {
                                        vm.data2 = res.data.detail
                                        vm.dealData(data)
                                    }
                                    //默认随访时间为当前时间
                                    vm.data2.followup_date = new Date().format("yyyy-MM-dd")
                                }
                            }
                        })
@ -492,7 +500,10 @@
                                res.data.status != 1 ? vm.finishedStatus = false : vm.finishedStatus = true
                                vm.patientCode = res.data.patientCode
                                vm.followupClass = res.data.followupClass
                                vm.getLastData()//获取patientCode,followupClass 获取上一次数据
                                var obj={}
                                obj.name=res.data.patient.name
                                obj.doctorName=res.data.doctorName
                                vm.getLastData(obj)//获取patientCode,followupClass 获取上一次数据
								vm.setEditBtn()
                            } else {
                                top.toastr.error(res.msg);

+ 19 - 5
component/followup/fangshi-detail-6.js

@ -638,7 +638,6 @@ Vue.component('fangshi-detail-6', {
                            随访医生签名:\
                        </div>\
                        <div class="ui-col-1">\
                            <el-input type="text" :readonly="!editable" v-model="newbornData.VISITING_DOCTOR" clearable></el-input>\
                            <el-input type="text" :readonly="!editable" v-model="newbornData.visiting_DOCTOR" clearable></el-input>\
                        </div>\
                    </div>\
@ -647,7 +646,6 @@ Vue.component('fangshi-detail-6', {
                            家属确认签字:\
                        </div>\
                        <div class="ui-col-1">\
                            <el-input type="text" :readonly="!editable" v-model="newbornData.FAMILY_SIGN" clearable></el-input>\
                            <el-input type="text" :readonly="!editable" v-model="newbornData.family_SIGN" clearable></el-input>\
                        </div>\
                    </div>\
@ -689,7 +687,11 @@ Vue.component('fangshi-detail-6', {
            input: '',
            name: '',
            number: '',
            newbornData: {},
            newbornData: {
                this_INTERVIEW_DATE:'',
                birthday:'',
                sick_SEX:''
            },
            patientCode:'',
            followupClass:''
        }
@ -1011,7 +1013,7 @@ Vue.component('fangshi-detail-6', {
            }
        },
        getLastData:function(){
        getLastData:function(obj){
            var vm=this
            fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass,patientCode:vm.patientCode }).then(function (res) {
                if (res.status == 200) {
@ -1020,11 +1022,18 @@ Vue.component('fangshi-detail-6', {
                    if (vm.finishedStatus) {
                        vm.getData()
                    } else {
                        //默认信息
                        vm.newbornData.sick_NAME=obj.name
                        vm.newbornData.sick_SEX=obj.sex.toString()
                        vm.newbornData.birthday=obj.birthday
                        vm.newbornData.visiting_DOCTOR=obj.doctorName
                        // 居民存在上次历史记录,则代入默认信息
                        if (res.data.detail) {
                            vm.newbornData = res.data.detail
                            vm.dealData(data)
                        }
                        //默认随访时间为当前时间
                        vm.newbornData.this_INTERVIEW_DATE = new Date().format("yyyy-MM-dd")
                    }
                }
            })
@ -1116,7 +1125,12 @@ Vue.component('fangshi-detail-6', {
                    res.data.status!=1?vm.finishedStatus=false:vm.finishedStatus=true
                    vm.patientCode=res.data.patientCode
                    vm.followupClass=res.data.followupClass
                    vm.getLastData()//获取patientCode,followupClass 获取上一次数据
                    var obj={}
                     obj.doctorName=res.data.doctorName
                     obj.name=res.data.patient.name
                     obj.sex=res.data.patient.sex
                     obj.birthday=res.data.patient.birthday
                    vm.getLastData(obj)//获取patientCode,followupClass 获取上一次数据
                    vm.setEditBtn()
                } else {
                    top.toastr.error(res.msg);