Browse Source

康复计划任务重复问题处理

linehang 5 năm trước cách đây
mục cha
commit
a3e31902c0
1 tập tin đã thay đổi với 36 bổ sung12 xóa
  1. 36 12
      app/recover/html/new_recover.html

+ 36 - 12
app/recover/html/new_recover.html

@ -93,7 +93,7 @@
		        				<ul class="c-h100 p0 m0" style="overflow: auto;">
		        					<li class="mt10 plr10 ptb5 c-border b-r-3 clearfix" v-for="(detail, index) in templateDetail" :key="index">
		        						<div class="fl w-100-78 c-333">
		        							<p class="m0 p0 mb10 txt-ells cur-pit" @click="lookProject(detail)">{{detail.specialistServiceItemDO.title}}</p>
		        							<p :class='detail.isTimeSame ? "m0 p0 mb10 txt-ells cur-pit c-red" : "m0 p0 mb10 txt-ells cur-pit"' @click="lookProject(detail)">{{detail.specialistServiceItemDO.title}}</p>
	        								<div class="clearfix">
	        									<p class="w300 m0 mb10 p0 fl"><span class="c-999">医&emsp;&emsp;院:</span>{{detail.hospitalName}}</p>
	        									<p class="m0 p0 mb10 fl"><span class="c-999">费&emsp;&emsp;用:</span>{{detail.expense}}{{detail.specialistServiceItemDO.unit}}</p>
@ -695,6 +695,14 @@
                	},
                	// 选择日期
                	getSelectDate: function(index) {
                		var vm = this,
                			projectId = vm.templateDetail[index].hospitalServiceItemId;
                		vm.templateDetail = $.map(vm.templateDetail, function(o, index) {
								if(projectId == o.hospitalServiceItemId) {
									o.isTimeSame = false
								}
								return o
							})
                		this.templateDetail[index].specialistServiceItemDO.executeTime = []
                		if(!this.templateDetail[index].value15) {
                			this.checkAllMoney()
@ -709,6 +717,14 @@
                	},
                	// 选择周期
                	getRandgeDate: function(index) {
                		var vm = this,
                			projectId = vm.templateDetail[index].hospitalServiceItemId;
                		vm.templateDetail = $.map(vm.templateDetail, function(o, index) {
								if(projectId == o.hospitalServiceItemId) {
									o.isTimeSame = false
								}
								return o
							})
                		this.templateDetail[index].specialistServiceItemDO.executeTime = []
                		if(!this.templateDetail[index].value14) {
                			this.checkAllMoney()
@ -781,16 +797,16 @@
                			showWarningMessage("请选择计划时间!")
                			return false;
                		}
                		for(var k = 0; k < this.templateDetail.length; k++) {
                			for(var i = 0; i < this.templateDetail[k].specialistServiceItemDO.executeTime.length; i++) {
		    					for(var j = i + 1; j < this.templateDetail[k].specialistServiceItemDO.executeTime.length; j++) {
		    						if(this.templateDetail[k].specialistServiceItemDO.executeTime[i] == this.templateDetail[k].specialistServiceItemDO.executeTime[j]) {
		    							showWarningMessage("请核对项目“" + this.templateDetail[k].specialistServiceItemDO.title + "”的计划时间选择!");
		    							return false;
		    						}
		    					}
		    				}
                		}
//              		for(var k = 0; k < this.templateDetail.length; k++) {
//              			for(var i = 0; i < this.templateDetail[k].specialistServiceItemDO.executeTime.length; i++) {
//		    					for(var j = i + 1; j < this.templateDetail[k].specialistServiceItemDO.executeTime.length; j++) {
//		    						if(this.templateDetail[k].specialistServiceItemDO.executeTime[i] == this.templateDetail[k].specialistServiceItemDO.executeTime[j]) {
//		    							showWarningMessage("请核对项目“" + this.templateDetail[k].specialistServiceItemDO.title + "”的计划时间选择!");
//		    							return false;
//		    						}
//		    					}
//		    				}
//              		}
                		var vm = this,
			    			loadding = layer.load(0, {shade: false}),
			    			data = {
@ -836,7 +852,15 @@
									window.location.href = "../../rehabilitation/html/health_control.html"
								}, 1000)
							} else {
								showErrorMessage(res.msg);
								showErrorMessage(res.msg || "同康复计划项目创建时间重复!");
								vm.templateDetail = $.map(vm.templateDetail, function(o, index) {
									$.each(res.data, function(ind, v) {
										if(v == o.id) {
											o.isTimeSame = true
										}
									});
									return o
								})
							}
						})
    				},