Browse Source

提交, 排班表,出差调整

zhengkaixin 4 years ago
parent
commit
df6a070a25

+ 8 - 0
src/projects/business/views-xsy/ApplyClass/My.vue

@@ -273,9 +273,17 @@
 		background-color:rgba(174, 174, 178, 100);
 		background-color:rgba(174, 174, 178, 100);
 	}
 	}
 	.mycolor4{
 	.mycolor4{
+		font-size: 14px;
 		background-color:rgba(236, 136, 74, 100);
 		background-color:rgba(236, 136, 74, 100);
 	}
 	}
+	.mycolor4 h5{
+		font-size: 14px !important;
+	}
+	.mycolor5 h5{
+		font-size: 14px !important;
+	}
 	.mycolor5{
 	.mycolor5{
+	
 		background-color:rgba(118, 119, 206, 100);
 		background-color:rgba(118, 119, 206, 100);
 	}
 	}
 	.myclass-li{
 	.myclass-li{

+ 50 - 7
src/projects/business/views/Master/BusinessTravel/Form.vue

@@ -16,8 +16,8 @@
 				<form class="mui-input-group">
 				<form class="mui-input-group">
 					<div class="mui-input-row">
 					<div class="mui-input-row">
 						<label><i class="colorfe616c">*</i> 出差日期</label>
 						<label><i class="colorfe616c">*</i> 出差日期</label>
-						<button @click="selectData" class="mui-btn mui-btn-block mui-navigate-right mui-ellipsis" type='button' style="width:65%">
-							{{subForm.startTime}}
+						<button @click="selectStartTime" class="mui-btn mui-btn-block mui-navigate-right mui-ellipsis" type='button' style="width:65%">
+							{{subForm.startTimeShow}}{{subForm.startTimeQuantum=='0'?'上午':''}}{{subForm.startTimeQuantum=='1'?'下午':''}}
 						</button>
 						</button>
 					</div>
 					</div>
 					<div class="mui-input-row vongi-dw">
 					<div class="mui-input-row vongi-dw">
@@ -83,7 +83,9 @@
 				subForm: {
 				subForm: {
 					type: '3',
 					type: '3',
 					destination: '',
 					destination: '',
-					startTime: '',
+					startTimeShow: '请选择',
+					startTime: '请选择',
+					startTimeQuantum:'',
 					estimatedTime: '',
 					estimatedTime: '',
 					content: '',
 					content: '',
 					approvalPersonId: '',
 					approvalPersonId: '',
@@ -98,7 +100,7 @@
 			}
 			}
 		},
 		},
 		created() {
 		created() {
-			this.subForm.startTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d} {h}:{i}');
+			//this.subForm.startTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d} {h}:{i}');
 		},
 		},
 		methods: {
 		methods: {
 			getExaminePerson(){
 			getExaminePerson(){
@@ -110,7 +112,39 @@
 				})
 				})
 			},
 			},
 			 
 			 
+			//选择时间
+			selectStartTime() {
+				var _this = this;
+			
+				var startTime = _this.subForm.startTimeShow == '请选择' ? null : _this.subForm.startTimeShow;
+			
+			
+			
+				var picker = new mui.DtPicker({
+					"type": "hour",
+					"beginYear": 2020,
+					"endYear": 2040,
+					"beginDate": new Date(),
+			        "value": startTime,
 			
 			
+			        "customData":{"h":[{"text":"上午","value":"0"},{"text":"下午","value":"1"}]}
+			
+			
+			    });
+				var _mui=mui;
+				picker.show(function(selectItems) {
+			        var year = selectItems.y.value;
+			        var month = selectItems.m.value;
+			        var day = selectItems.d.value;
+			        var curDate = year + "-" + month + "-" + day;
+			
+			
+					_this.subForm.startTimeShow = curDate;
+			
+			        _this.subForm.startTimeQuantum =  selectItems.h.value;
+			       
+			    });
+			},
 			//选择日期
 			//选择日期
 			selectData() {
 			selectData() {
 				var _this = this;
 				var _this = this;
@@ -128,13 +162,19 @@
 			},
 			},
 			//表单检测
 			//表单检测
 			checkForm() {
 			checkForm() {
-				if (!this.subForm.destination) {
+				if (this.subForm.startTimeShow=='请选择') {
+					mui.toast('请选择出差日期');
+					return false;
+				} else if (!this.subForm.destination) {
 					mui.toast('请填写出差地点');
 					mui.toast('请填写出差地点');
 					return false;
 					return false;
 				} else if (!this.subForm.estimatedTime) {
 				} else if (!this.subForm.estimatedTime) {
-					mui.toast('请填写预估时长');
+					mui.toast('请填写预估天数');
 					return false;
 					return false;
-				} else if (!this.subForm.content) {
+				}  else if (this.subForm.estimatedTime%0.5!=0) {
+					mui.toast('预估天数需要为0.5的倍数');
+					return false;
+				}else if (!this.subForm.content) {
 					mui.toast('请填写申请理由');
 					mui.toast('请填写申请理由');
 					return false;
 					return false;
 				} else if (false) {
 				} else if (false) {
@@ -150,6 +190,9 @@
 					return;
 					return;
 				}
 				}
 				if (this.checkForm()) {
 				if (this.checkForm()) {
+					this.subForm.startTime=this.subForm.startTimeShow+
+					(this.subForm.startTimeQuantum=='0'?' 06:00':' 12:00')
+					
 					this.isLoading = true;
 					this.isLoading = true;
 					API_BusinessTravel.submitBusiness(this.subForm).then(response => {
 					API_BusinessTravel.submitBusiness(this.subForm).then(response => {
 						this.isLoading = false;
 						this.isLoading = false;