|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div id="app">
|
|
|
<top-header :pageTitle="pageTitle" v-show="!stepSelect"></top-header>
|
|
|
- <select-person v-if="initSelectPerson" v-show="stepSelectPerson" @confirm="confirm2"></select-person>
|
|
|
+ <select-person v-if="initSelectPerson" v-show="stepSelectPerson" :setids="subForm.personIds" :setnames="seletPerson" @confirm="confirm2"></select-person>
|
|
|
|
|
|
|
|
|
<div class="mui-content vongi-fx vongi-qingjiadt margin60" v-show="!stepSelect" >
|
|
@@ -50,8 +50,16 @@
|
|
|
</div>
|
|
|
<div class="fyy-footer" v-show="!stepSelect" >
|
|
|
<div class="bindfyy-btn">
|
|
|
- <button class="mui-btn " :class="examinePerson.name?'mui-btn-primary':'mui-btn-grey'" type="button" @click="submit">提交</button>
|
|
|
- <!--<button type="button" class="mui-btn mui-btn-grey ">确认调班</button>-->
|
|
|
+<!-- <button class="mui-btn " :class="examinePerson.name?'mui-btn-primary':'mui-btn-grey'" type="button" @click="submit">提交</button>
|
|
|
+ --> <!--<button type="button" class="mui-btn mui-btn-grey ">确认调班</button>-->
|
|
|
+ <button class="mui-btn " style="width: 50%;" :class="examinePerson.name?'mui-btn-success':'mui-btn-grey'" type="submit" @click="submit(0)">
|
|
|
+ <i icon="mui-icon mui-icon-compose"></i>保存草稿
|
|
|
+ </button>
|
|
|
+ <button class="mui-btn " style="width: 50%;" :class="examinePerson.name?'mui-btn-primary':'mui-btn-grey'" type="submit" @click="submit(1)">
|
|
|
+ 提交
|
|
|
+ </button>
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -99,7 +107,8 @@
|
|
|
seletName:"",
|
|
|
seletPerson:"请选择",
|
|
|
showselect1:"",
|
|
|
- showselect2:"",
|
|
|
+ showselect2:"",
|
|
|
+ id:"",
|
|
|
subForm: {
|
|
|
date: '',
|
|
|
imageUrl:"",
|
|
@@ -113,9 +122,37 @@
|
|
|
},
|
|
|
created() {
|
|
|
//this.subForm.date = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}');
|
|
|
+ this.id = this.$route.query.id;
|
|
|
|
|
|
},
|
|
|
- methods: {
|
|
|
+ methods: {
|
|
|
+ getSupplementWorkBatchDetail() {
|
|
|
+ if(!this.id){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isLoading = true;
|
|
|
+
|
|
|
+ API.supplementWorkBatchDetail(this.id).then(response => {
|
|
|
+
|
|
|
+ this.isLoading = false;
|
|
|
+ this.subForm.ids=this.id;
|
|
|
+
|
|
|
+ this.subForm = {
|
|
|
+ ... this.subForm ,
|
|
|
+ ...response
|
|
|
+ };
|
|
|
+ this.subForm.personIds=response.nameId;
|
|
|
+ this.seletPerson=response.name
|
|
|
+ this.subForm.date=response.attendanceDate
|
|
|
+ if(response.imageUrl){
|
|
|
+ this.picList=response.imageUrl.split(",")
|
|
|
+ }
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
//微信选择图片
|
|
|
chooseImage() {
|
|
|
WxJsApi.chooseImage().then(res => {
|
|
@@ -257,7 +294,8 @@
|
|
|
}
|
|
|
},
|
|
|
//提交
|
|
|
- submit() {
|
|
|
+ submit(status) {
|
|
|
+ this.subForm.draft=status;
|
|
|
if(!this.examinePerson.name){
|
|
|
return;
|
|
|
}
|
|
@@ -272,15 +310,22 @@
|
|
|
API.supplementWorkBatchSubmit(this.subForm).then(response => {
|
|
|
this.isLoading = false;
|
|
|
|
|
|
- mui.toast('提交成功');
|
|
|
- this.$router.replace({
|
|
|
- name: "XsyApprovalInfo",
|
|
|
-
|
|
|
- query: {
|
|
|
- formId:"batchApplyWork",
|
|
|
- id:response.id
|
|
|
- }
|
|
|
- })
|
|
|
+
|
|
|
+ if(status){
|
|
|
+ mui.toast('提交成功');
|
|
|
+ this.$router.replace({
|
|
|
+ name: "XsyApprovalInfo",
|
|
|
+ query: {
|
|
|
+ formId:"batchApplyWork",
|
|
|
+ id:response.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }else{
|
|
|
+ mui.toast('保存成功');
|
|
|
+ this.subForm.ids=response.id;
|
|
|
+ this.id=response.id
|
|
|
+ }
|
|
|
}).catch(error => {
|
|
|
this.isLoading = false;
|
|
|
mui.toast(error);
|
|
@@ -295,25 +340,7 @@
|
|
|
mui.toast(error);
|
|
|
})
|
|
|
},
|
|
|
- getOwnerShift(){
|
|
|
- this.isLoading = true;
|
|
|
- var obj={
|
|
|
- date:this.subForm.date+" 00:00:00"
|
|
|
- }
|
|
|
- API.ownerShift(obj).then(response => {
|
|
|
- this.ownerShift=response;
|
|
|
-
|
|
|
- if(this.ownerShift.id){
|
|
|
-
|
|
|
- }else{
|
|
|
- mui.toast('调班当天没有班次,请选择其他日期');
|
|
|
- }
|
|
|
- this.isLoading = false;
|
|
|
- }).catch(error => {
|
|
|
- this.isLoading = false;
|
|
|
- mui.toast(error);
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
asynCallBack() {
|
|
|
|
|
|
},
|
|
@@ -334,7 +361,8 @@
|
|
|
//获取微信配置
|
|
|
WxJsApi.getWxConfig();
|
|
|
mui.alert("请于补卡班次结束24小时后,<br/>再进行补卡")
|
|
|
- //this.getOwnerShift();
|
|
|
+
|
|
|
+ this.getSupplementWorkBatchDetail();
|
|
|
this.getExaminePerson();
|
|
|
},
|
|
|
destroyed() {},
|