|
@@ -21,7 +21,7 @@
|
|
<form class="mui-input-group margint10">
|
|
<form class="mui-input-group margint10">
|
|
<div class="mui-input-row">
|
|
<div class="mui-input-row">
|
|
<label>时长(小时)</label>
|
|
<label>时长(小时)</label>
|
|
- <div><button class="mui-btn mui-btn-block" type='button' v-text="subForm.hours+'小时'"></button></div>
|
|
|
|
|
|
+ <div><button class="mui-btn mui-btn-block" type='button' v-text="(subForm.hours!=0||subForm.ff==0?subForm.hours+'小时':'')+(subForm.ff!=0?subForm.ff+'分钟':'')"></button></div>
|
|
</div>
|
|
</div>
|
|
<div class="mui-input-row">
|
|
<div class="mui-input-row">
|
|
<label><span class="colorfe616c"></span>审批人</label>
|
|
<label><span class="colorfe616c"></span>审批人</label>
|
|
@@ -86,6 +86,7 @@ id:"",
|
|
reason: '',
|
|
reason: '',
|
|
startTime: '',
|
|
startTime: '',
|
|
endTime: '',
|
|
endTime: '',
|
|
|
|
+ ff:0,
|
|
hours: 0,
|
|
hours: 0,
|
|
type: '1',
|
|
type: '1',
|
|
formId: 'extraWork',
|
|
formId: 'extraWork',
|
|
@@ -119,7 +120,7 @@ id:"",
|
|
... this.subForm ,
|
|
... this.subForm ,
|
|
...response
|
|
...response
|
|
};
|
|
};
|
|
-
|
|
|
|
|
|
+ this.countHours()
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
mui.toast(error);
|
|
mui.toast(error);
|
|
@@ -235,6 +236,10 @@ id:"",
|
|
countHours() {
|
|
countHours() {
|
|
var hoursArr = hourDistanceArr(this.subForm.startTime, this.subForm.endTime);
|
|
var hoursArr = hourDistanceArr(this.subForm.startTime, this.subForm.endTime);
|
|
this.subForm.hours = hoursArr[0];
|
|
this.subForm.hours = hoursArr[0];
|
|
|
|
+ this.subForm.ff = hoursArr[1];
|
|
|
|
+ var subForm=this.subForm;
|
|
|
|
+ this.subForm.ffN = (subForm.hours!=0||subForm.ff==0?subForm.hours+'小时':'')+(subForm.ff!=0?subForm.ff+'分钟':'');
|
|
|
|
+
|
|
},
|
|
},
|
|
getExaminePerson(){
|
|
getExaminePerson(){
|
|
API_sp.examinePerson(this.subForm.formId).then(response => {
|
|
API_sp.examinePerson(this.subForm.formId).then(response => {
|