|
@@ -24,10 +24,10 @@
|
|
<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+'小时'"></button></div>
|
|
</div>
|
|
</div>
|
|
<div class="mui-input-row">
|
|
<div class="mui-input-row">
|
|
- <label><span class="colorfe616c">*</span>审批人</label>
|
|
|
|
- <div class="mui-navigate-right">
|
|
|
|
- <button class="mui-btn mui-btn-block" type='button' @click="selectPerson" v-text="approvalPersonName"></button>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <label><span class="colorfe616c"></span>审批人</label>
|
|
|
|
+
|
|
|
|
+ <div><button class="mui-btn mui-btn-block" type='button' v-text="examinePerson.name"></button></div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
<div class="vongi-meform-pho margint10">
|
|
<div class="vongi-meform-pho margint10">
|
|
@@ -38,7 +38,11 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="fyy-footer">
|
|
<div class="fyy-footer">
|
|
- <div class="bindfyy-btn" @click="submit"><button type="button" class="mui-btn mui-btn-primary ">提交</button></div>
|
|
|
|
|
|
+ <div class="bindfyy-btn" >
|
|
|
|
+ <button class="mui-btn " :class="examinePerson.name?'mui-btn-primary':'mui-btn-grey'" type="button" @click="submit">
|
|
|
|
+ 提交
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<loading :visible="isLoading"></loading>
|
|
<loading :visible="isLoading"></loading>
|
|
@@ -46,6 +50,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import * as API_sp from '@/apis-xsy/xsy'
|
|
require('$project/assets/js/mui.picker.min.js');
|
|
require('$project/assets/js/mui.picker.min.js');
|
|
import * as API_BusinessTravel from '@/apis/Master/business_travel'
|
|
import * as API_BusinessTravel from '@/apis/Master/business_travel'
|
|
import * as API_ExtraWork from '@/apis/Master/extra_work'
|
|
import * as API_ExtraWork from '@/apis/Master/extra_work'
|
|
@@ -70,6 +75,7 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ examinePerson:{},
|
|
pageTitle: '加班',
|
|
pageTitle: '加班',
|
|
|
|
|
|
isLoading: false,
|
|
isLoading: false,
|
|
@@ -79,7 +85,7 @@
|
|
startTime: '',
|
|
startTime: '',
|
|
endTime: '',
|
|
endTime: '',
|
|
hours: 0,
|
|
hours: 0,
|
|
- approvalPersonId: ''
|
|
|
|
|
|
+ formId: 'extraWork',
|
|
},
|
|
},
|
|
|
|
|
|
approvalPersonList: [],
|
|
approvalPersonList: [],
|
|
@@ -162,7 +168,7 @@
|
|
} else if (!this.subForm.reason) {
|
|
} else if (!this.subForm.reason) {
|
|
mui.toast('请填写加班原因');
|
|
mui.toast('请填写加班原因');
|
|
return false;
|
|
return false;
|
|
- } else if (!this.subForm.approvalPersonId) {
|
|
|
|
|
|
+ } else if (false) {
|
|
mui.toast('请选择审批人');
|
|
mui.toast('请选择审批人');
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
@@ -173,15 +179,13 @@
|
|
submit() {
|
|
submit() {
|
|
if (this.checkForm()) {
|
|
if (this.checkForm()) {
|
|
this.isLoading = true;
|
|
this.isLoading = true;
|
|
- API_ExtraWork.submitWorkOver(this.subForm).then(response => {
|
|
|
|
|
|
+ API_ExtraWork.workOverPathSubmit(this.subForm).then(response => {
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
|
|
|
|
mui.toast('提交成功');
|
|
mui.toast('提交成功');
|
|
- this.$router.push({
|
|
|
|
- name: 'MasterExtraWorkInfo',
|
|
|
|
- query: {
|
|
|
|
- id: response.id
|
|
|
|
- }
|
|
|
|
|
|
+ this.$router.replace({
|
|
|
|
+ name: "XsyApprovalInfo",
|
|
|
|
+ query:{id:response.id,formId:'extraWork'}
|
|
})
|
|
})
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
@@ -193,31 +197,26 @@
|
|
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];
|
|
},
|
|
},
|
|
|
|
+ getExaminePerson(){
|
|
|
|
+ API_sp.examinePerson(this.subForm.formId).then(response => {
|
|
|
|
+ this.examinePerson=response
|
|
|
|
+ }).catch(error => {
|
|
|
|
+
|
|
|
|
+ mui.toast(error);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
asynCallBack() {
|
|
asynCallBack() {
|
|
|
|
|
|
},
|
|
},
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
//获取审核人列表
|
|
//获取审核人列表
|
|
- this.getBusinessOutApprovalPerson();
|
|
|
|
|
|
+ //this.getBusinessOutApprovalPerson();
|
|
|
|
+ this.getExaminePerson();
|
|
},
|
|
},
|
|
destroyed() {},
|
|
destroyed() {},
|
|
computed: {
|
|
computed: {
|
|
- approvalPersonName: {
|
|
|
|
- // getter
|
|
|
|
- get: function() {
|
|
|
|
- for (var i = 0; i < this.approvalPersonList.length; i++) {
|
|
|
|
- if (this.approvalPersonList[i]['value'] == this.subForm.approvalPersonId) {
|
|
|
|
- return this.approvalPersonList[i]['text'];
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return '请选择';
|
|
|
|
- },
|
|
|
|
- // setter
|
|
|
|
- set: function(newValue) {
|
|
|
|
- console.log(newValue)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|