|
@@ -2,7 +2,7 @@
|
|
|
<div>
|
|
|
<top-header :pageTitle="pageTitle" v-show="!stepSelect"></top-header>
|
|
|
|
|
|
- <select-person v-if="initSelectPerson" v-show="stepSelectPerson" :setids="subForm.personIds" :setnames="seletPerson" @confirm="confirm2"></select-person>
|
|
|
+ <select-person v-if="initSelectPerson" batchJob="1" v-show="stepSelectPerson" :setids="subForm.personIds" :setnames="seletPerson" @confirm="confirm2"></select-person>
|
|
|
|
|
|
<div class="mui-content vongi-fx vongi-qingjiadt margin60" v-show="!stepSelect">
|
|
|
<form class="mui-input-group vongi-editme margin10 mt-10">
|
|
@@ -43,7 +43,18 @@
|
|
|
<textarea id="textarea" rows="3" v-model="subForm.reason" placeholder="请填写加班原因"></textarea>
|
|
|
</div>
|
|
|
</form>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<form class="mui-input-group vongi-editme">
|
|
|
+ <div class="mui-input-row" v-show="examinePersonList.length>1" >
|
|
|
+ <label><i class="colorfe616c">*</i> 审批模板</label>
|
|
|
+ <button class="mui-btn mui-btn-block mui-navigate-right"
|
|
|
+ @click="selectSpBtn" v-html="seletSpName"
|
|
|
+ type='button' style="width:65%">
|
|
|
+ 请选择
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
<div class="mui-input-row">
|
|
|
<label> 审核人</label>
|
|
|
<span v-text="examinePerson.name">赵振</span>
|
|
@@ -91,6 +102,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ examinePersonList:[],
|
|
|
examinePerson:{},
|
|
|
pageTitle: '加班申请',
|
|
|
|
|
@@ -100,6 +112,8 @@
|
|
|
initSelectPerson:false,
|
|
|
stepSelectPerson:false,
|
|
|
seletPerson:"请选择",
|
|
|
+ seletSpName:"请选择",
|
|
|
+
|
|
|
subForm: {
|
|
|
personIds:"",
|
|
|
reason: '',
|
|
@@ -163,6 +177,26 @@
|
|
|
this.subForm.personIds=temp.selectId.join();
|
|
|
}
|
|
|
},
|
|
|
+ //类型选择
|
|
|
+ selectSpBtn() {
|
|
|
+ var picker = new mui.PopPicker();
|
|
|
+ var list= this.examinePersonList
|
|
|
+ var data=[]
|
|
|
+ for (var i = 0; i < list.length; i++) {
|
|
|
+ data.push({
|
|
|
+ value: list[i]['id'],
|
|
|
+ text: list[i]['name']
|
|
|
+ })
|
|
|
+ }
|
|
|
+ picker.setData(data);
|
|
|
+ var _this = this;
|
|
|
+ picker.show(function(selectItems) {
|
|
|
+
|
|
|
+ _this.seletSpName=selectItems[0].text
|
|
|
+ _this.getExaminePerson(selectItems[0].value)
|
|
|
+ //_this.typeName = selectItems[0].text;
|
|
|
+ })
|
|
|
+ },
|
|
|
selectPersonBtn(){
|
|
|
this.initSelectPerson=true;
|
|
|
this.stepSelectPerson=true;
|
|
@@ -257,6 +291,8 @@
|
|
|
this.subForm.draft=status;
|
|
|
if (this.checkForm()) {
|
|
|
this.isLoading = true;
|
|
|
+
|
|
|
+ this.subForm.processTemplateId=this.examinePerson.processTemplateId;
|
|
|
API_ExtraWork.workOverPathSubmit(this.subForm).then(response => {
|
|
|
this.isLoading = false;
|
|
|
if(status){
|
|
@@ -282,10 +318,24 @@
|
|
|
var hoursArr = hourDistanceArr(this.subForm.startTime, this.subForm.endTime);
|
|
|
this.subForm.hours = hoursArr[0];
|
|
|
},
|
|
|
- getExaminePerson(){
|
|
|
+ getExaminePersonList(){
|
|
|
+
|
|
|
+ API_sp.examinePersonList(this.subForm.formId).then(response => {
|
|
|
+ this.examinePersonList=response.list
|
|
|
+ if(this.examinePersonList.length){
|
|
|
+ this.seletSpName=this.examinePersonList[0].name
|
|
|
+ this.getExaminePerson(this.examinePersonList[0].id)
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getExaminePerson(id){
|
|
|
|
|
|
- API_sp.examinePerson(this.subForm.formId).then(response => {
|
|
|
+ API_sp.examinePerson(this.subForm.formId,id).then(response => {
|
|
|
this.examinePerson=response
|
|
|
+ this.examinePerson.processTemplateId=id
|
|
|
}).catch(error => {
|
|
|
|
|
|
mui.toast(error);
|
|
@@ -298,7 +348,7 @@
|
|
|
mounted() {
|
|
|
//获取审核人列表
|
|
|
//this.getBusinessOutApprovalPerson();
|
|
|
- this.getExaminePerson();
|
|
|
+ this.getExaminePersonList();
|
|
|
this.getInfo();
|
|
|
},
|
|
|
destroyed() {},
|