Quellcode durchsuchen

满足判断当前签约医生是否变动

linehang vor 6 Jahren
Ursprung
Commit
ecf07ecaba

+ 6 - 0
app/sign/css/sign_handle.css

@ -31,3 +31,9 @@ ul {list-style: none;}
	resize:none;
}
.cur-pit {cursor: pointer;}
.ellipsis {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.c-red {color: red;}

+ 1 - 1
app/sign/html/sign_detail.html

@ -103,7 +103,7 @@
					<span class="fl w-20-1 c-border-r pl20 c-999">医保卡号</span>
					<span class="fl w-30-1 c-border-r pl20">{{patientInfo.ssc || patientInfo.jtSign.ssc || ""}}</span>
					<span class="fl w-20-1 c-border-r pl20 c-999">服务类型</span>
					<span class="fl w-30-1 pl20">{{patientInfo.jtSign.serverTypeName}}</span>
					<span class="fl w-30-1 pl20">{{serverName}}</span>
				</li>
				<li class="c-border-b clearfix">
					<div class="fl w-50-1">

+ 8 - 8
app/sign/html/sign_handle.html

@ -43,7 +43,7 @@
					<span class="fl w-80-1 pl20">{{patientInfo.address ? patientInfo.address : ""}}</span>
				</li>
			</ul>
			<h3>签约信息</h3>
			<h3>签约信息<span class="c-f12 c-red ml20" style="font-weight: 400;">{{warnMsg}}</span></h3>
			<ul class="m0 p0 mb20 lh40 c-border-t c-border-r c-border-l c-t-left c-333">
				<li class="c-border-b clearfix">
					<div class="fl w-50-1">
@ -56,19 +56,19 @@
			                    </ul>
							</div>
						</div>
						<p class="m0 c-border-b clearfix">
						<div class="m0 c-border-b clearfix">
							<span class="fl w-40 c-border-r pl20 c-999">全科医生</span>
							<span v-if="doctorType == 2" class="fl w-60-1 c-border-r pl20">{{patientInfo.jtSign.doctorName}}</span>
							<div v-if="doctorType == 3" class="c-position-r fl w-60-1 c-border-r">
								<p class="pl20 w-100 set-bg" @click="selectStatus(2)">{{signInfo.healthDoctorName ? signInfo.healthDoctorName : "请选择健康管理师"}}</p>
								<p class="pl20 w-100 set-bg" @click="selectStatus(4)">{{signInfo.doctorName ? signInfo.doctorName : "请选择全科医生"}}</p>
								<ul class="pull-list m0 p0 c-border-l c-border-r c-border-b" v-if="isShowList4">
			                        <li class="cur-pit c-999" v-for="(member, index) in doctorList" :key="index" @click="selectLi(4, member)">{{member.name}}</li>
			                    </ul>
							</div>
						</p>
						</div>
						<div class="m0 c-border-b clearfix">
							<span class="fl w-40 c-border-r pl20 c-999">健康管理师</span>
							<span v-if="doctorType == 3" class="fl w-60-1 c-border-r pl20">{{patientInfo.jtSign.doctorName}}</span>
							<span v-if="doctorType == 3" class="fl w-60-1 c-border-r pl20">{{patientInfo.jtSign.doctorHealthName}}</span>
							<div v-if="doctorType == 2" class="c-position-r fl w-60-1 c-border-r">
								<p class="pl20 w-100 set-bg" @click="selectStatus(2)">{{signInfo.healthDoctorName ? signInfo.healthDoctorName : "请选择健康管理师"}}</p>
								<ul class="pull-list m0 p0 c-border-l c-border-r c-border-b" v-if="isShowList2">
@ -79,7 +79,7 @@
						<div class="m0 clearfix">
							<span class="fl w-40 c-border-r pl20 c-999">政府补贴</span>
							<div class="c-position-r fl w-60-1 c-border-r">
								<p class="pl20 w-100 set-bg" @click="selectStatus(3)">{{signInfo.expenses ? showExpensesName(signInfo.expenses) : "请选择健康管理师"}}</p>
								<p class="pl20 w-100 set-bg" @click="selectStatus(3)">{{signInfo.expenses ? showExpensesName(signInfo.expenses) : "请选择补贴类型"}}</p>
								<ul class="pull-list m0 p0 c-border-l c-border-r c-border-b" v-if="isShowList3">
			                        <li class="cur-pit c-999" v-for="(dict, index) in dictList" :key="index" @click="selectLi(3, dict)">{{dict.value}}</li>
			                    </ul>
@ -93,8 +93,8 @@
								<p class="m0 pl20">居民标签</p>
							</div>
							<div class="fl w-60-1 right-arrow">
								<p class="m0 pl20">{{showTit4}}</p>
								<p class="m0 pl20">{{showTit5}}</p>
								<p class="m0 plr20 ellipsis">{{serverName ? serverName : "请选择服务类型"}}</p>
								<p class="m0 plr20 ellipsis">{{showTit5}}</p>
							</div>
						</div>
						<div class="lh80 clearfix">

+ 24 - 3
app/sign/html/sign_manage.html

@ -81,6 +81,7 @@
		<script src="../../../api/sign_api.js" type="text/javascript"></script>
		<script type="text/javascript">
			var doctorType = JSON.parse(window.localStorage.getItem('wlyyAgent')).doctorType
			var httpData=GetRequest()
			
			function showSuccessMessage(msg) {
				layer.msg(msg, {
@ -113,8 +114,8 @@
		            keyword: "",
		            isFocus: false,
		            isMoney: false,
		            statusTit: '已签约',
		            statusCode: 3,
		            statusTit: null,
		            statusCode: httpData.statusCode || 3,
		            statusArr: [{
		                statusName: '待签约',
		                statusCode: '1'
@ -133,6 +134,7 @@
		            allCount: null
                },
                mounted: function() {
                	this.getStatusTit();
                	this.isRemainFocus();
                	this.isRemainMoney();
                	this.signCount();
@ -219,12 +221,31 @@
			            this.statusCode = data.statusCode;
			            this.signCount();
			        },
			        getStatusTit: function() {
			        	if(!httpData.statusCode) {
			        		this.statusTit = "已签约"
			        	} else {
				        	for (var i = 0; i < 3; i++) {
				        		if(this.statusArr[i].statusCode == httpData.statusCode) {
				        			this.statusTit = this.statusArr[i].statusName
				        		}
				        	}
				        	if (httpData.signStatus) {
				        		this.handle(httpData)
				        	}
				        }
			        },
			        suosou: function() {
			        	this.page = 1;
			        	this.signList();
			        },
			        handle: function(list) {
			        	var status = list.renewFlag == 1 || list.renewFlag == 2 ? 1 : 0;
			        	var status;
			        	if(list.signStatus) {
			        		status = list.signStatus == 1 ? 0 : 1;
			        	} else {
			        		status = list.renewFlag == 1 || list.renewFlag == 2 ? 1 : 0;
			        	}
			        	layer.open({
							type: 2,
							area: ['80%', '648px'],

+ 14 - 2
app/sign/js/sign_detail.js

@ -40,7 +40,8 @@ new Vue({
    	memberList: null,
    	dictList: null,
    	adminTeamCode: null,
    	fileList: null
    	fileList: null,
    	serverName: null
    },
    mounted: function() {
    	this.patientSign();
@ -106,7 +107,18 @@ new Vue({
			signAPI.findPatientSignServerBySignCode(params).then(function(res) {
				layer.close(loadding)
				if(res.status == 200) {
					vm.fileList = []
					vm.fileList = [];
					var len = res.data.length;
					if(res.data.length > 0) {
						vm.serverName = "";
						for(var i = 0; i < len; i++) {
							if(i == 0) {
								vm.serverName += res.data[i].serverTypeName
							} else {
								vm.serverName += + ', ' + res.data[i].serverTypeName
							}
						}
					}
					$.each(res.data, function(i, v) {
		                if(v.serverType == 8 || v.serverType == 9 || v.serverType == 11) {
		                    vm.fileList.push(v);

+ 100 - 15
app/sign/js/sign_handle.js

@ -47,14 +47,16 @@ new Vue({
    	isShowList3: false,
    	isShowList4: false,
    	showTit3: "请选择补贴类型",
    	showTit4: "请选择服务类型",
    	showTit5: "请选择居民标签",
    	patientInfo: null,
    	warnMsg: "",
    	teamList: null,
    	memberList: null, // 团队成员列表
    	doctorList: null, // 全科医生列表
    	dictList: null,
    	fileList: null,
    	serverName: null,
    	serverCode: null,
    	signInfo: {
            signType: 1,
            majorDoctor: null,
@ -66,6 +68,8 @@ new Vue({
            adminTeamCode: null,
            msgid: httpData.msgId, // 消息id(必填)
            patient: httpData.patientCode,
            doctor: null,
            doctorName: null,
            healthDoctor: null,
            healthDoctorName: null,
            type: 1,
@ -80,13 +84,9 @@ new Vue({
        },
    },
    mounted: function() {
    	if (httpData.status == 0) {
    		this.signing()
    	} else {
    		this.signOuttime();
    	}
    	this.getDictByDictName();
    	this.teamLimit();
    	this.patientLabel();
    	this.findPatientSignServerBySignCode();
    },
    methods: {
@ -116,10 +116,47 @@ new Vue({
				if(res.status == 200) {
					vm.patientInfo = res.data
					vm.signInfo.adminTeamCode = vm.patientInfo.jtSign.adminTeamId
					vm.signInfo.healthDoctorName = vm.patientInfo.jtSign.doctorHealthName
					vm.signInfo.healthDoctor = vm.patientInfo.jtSign.doctorHealth
					vm.signInfo.healthDoctorName = vm.patientInfo.jtSign.doctorHealthName || ""
					vm.signInfo.healthDoctor = vm.patientInfo.jtSign.doctorHealth || ""
					vm.signInfo.doctor = vm.patientInfo.jtSign.doctor || ""
					vm.signInfo.doctorName = vm.patientInfo.jtSign.doctorName || ""
					vm.signInfo.expenses = vm.patientInfo.jtSign.expensesType
					vm.teamMember()
					vm.judgeTeamToDoc(vm.signInfo.adminTeamCode)
				} else {
					showErrorMessage(res.msg);
				}
			})
    	},
    	judgeTeamToDoc: function(teamCode) {
    		var judge = false
    		for(var i = 0, len = this.teamList.length; i < len; i++) {
    			if(this.teamList[i].id == teamCode) {
    				judge = true
    				this.teamMember()
    			}
    		}
    		if(!judge) {
    			this.signInfo.adminTeamCode = null
    			this.warnMsg = "您已不在原签约团队,请选择新的签约团队"
    			if(this.doctorType == 2) {
					this.signInfo.healthDoctorName = null
					this.signInfo.healthDoctor = null
				} else {
					this.signInfo.doctor = null
					this.signInfo.doctorName = null
				}
    		}
    	},
    	patientLabel: function() {
    		var vm =this,
    			loadding = layer.load(0, {shade: false}),
    			params = {
    				patient: httpData.patientCode,
    				labelType: null
    			}
			signAPI.patientLabel(params).then(function(res) {
				layer.close(loadding)
				if(res.status == 200) {
				} else {
					showErrorMessage(res.msg);
				}
@ -150,6 +187,11 @@ new Vue({
				layer.close(loadding)
				if(res.status == 200) {
					vm.teamList = res.data
					if (httpData.status == 0) {
			    		vm.signing()
			    	} else {
			    		vm.signOuttime();
			    	}
				} else {
					showErrorMessage(res.msg);
				}
@ -164,7 +206,21 @@ new Vue({
			signAPI.findPatientSignServerBySignCode(params).then(function(res) {
				layer.close(loadding)
				if(res.status == 200) {
					vm.fileList = []
					vm.fileList = [];
					var len = res.data.length;
					if(res.data.length > 0) {
						vm.serverName = "";
						vm.serverCode = "";
						for(var i = 0; i < len; i++) {
							if(i == 0) {
								vm.serverName += res.data[i].serverTypeName
								vm.serverCode += res.data[i].servetType
							} else {
								vm.serverName += + ', ' + res.data[i].serverTypeName
								vm.serverCode += +',' +  res.data[i].servetType
							}
						}
					}
					$.each(res.data, function(i, v) {
		                if(v.serverType == 8 || v.serverType == 9 || v.serverType == 11) {
		                    vm.fileList.push(v);
@ -186,10 +242,31 @@ new Vue({
				vm.memberList = [];
				vm.doctorList = [];
				if(res.status == 200) {
					var judge = false
					$.each(res.data, function(i, v) {
		                if(v.level == 3 || v.level == 2) {vm.memberList.push(v);}
		                if(v.level == 2) {vm.doctorList.push(v);}
						if(v.available) {
							if(v.code == vm.signInfo.doctor && vm.doctorType == 3) {
								judge = true
							}
							if(v.code == vm.signInfo.healthDoctor && vm.doctorType == 2) {
								judge = true
			            	}
						}
		                if(v.available && (v.level == 3 || v.level == 2)) {vm.memberList.push(v);}
		                if(v.available && v.level == 2) {vm.doctorList.push(v);}
		            });
		            if(!judge) {
		            	if(vm.doctorType == 3) {
							vm.signInfo.doctor = null
		            		vm.signInfo.doctorName = null
		            		vm.warnMsg = "居民续签的全科医生已不在您的团队,请重新选择一位全科医生"
						}
						if(vm.doctorType == 2) {
							vm.signInfo.healthDoctor = null
		            		vm.signInfo.healthDoctorName = null
		            		vm.warnMsg = "居民续签的健管师已不在您的团队,请重新选择一位健管师"
		            	}
		            }
				} else {
					showErrorMessage(res.msg);
				}
@ -227,6 +304,14 @@ new Vue({
        	if(num == 1) { // 选择签约团队
        		this.isShowList1 = false;
	            this.signInfo.adminTeamCode = data.id;
	            if(this.doctorType == 2) {
	            	this.signInfo.healthDoctor = null
	            	this.signInfo.healthDoctorName = null
	            }
	            if(this.doctorType == 3) {
	            	this.signInfo.doctor = null
	            	this.signInfo.doctorName = null
	            }
	            if(!this.memberList || !this.doctorList) {
	            	this.teamMember()
	            }
@ -241,9 +326,9 @@ new Vue({
				this.signInfo.expenses = data.code;
			}
			if(num == 4) { // 选择全科医生
				this.isShowList2 = false;
	            this.signInfo.healthDoctorName = data.name
	            this.signInfo.healthDoctor = data.code
				this.isShowList4 = false;
	            this.signInfo.doctorName = data.name
	            this.signInfo.doctor = data.code
			}
        },
        showTeamName: function(teamCode) {