|
@@ -28,20 +28,67 @@
|
|
|
<label>请假事由</label>
|
|
|
<span v-text="detail.reason">家中有事,需要会老家一趟家中有事,需要会老家一趟家中有事,需要会老家一趟家中有事,需要会老家一趟。</span>
|
|
|
</div>
|
|
|
- <div class="mui-input-row">
|
|
|
- <label>上传图片</label>
|
|
|
- <span class="vongi-qingjiadt-photo">
|
|
|
- <template v-for="(item,index) in picList">
|
|
|
- <img :src="item" v-viewer />
|
|
|
- </template>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <div class="mui-input-row vongi-wordcard">
|
|
|
+ <div class="mui-content-padded" >
|
|
|
+ <h5>上传图片</h5>
|
|
|
+
|
|
|
+ <div class="fyy-upphoto">
|
|
|
+ <div class="mui-col-xs-3 fyy-upphoto-close" v-for="(item,index) in picList">
|
|
|
+ <img :src="item" v-viewer />
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
<div class="mui-input-row">
|
|
|
<label>申请时间</label>
|
|
|
<span v-text="detail.createTime">2020-04-27 12:00:00</span>
|
|
|
</div>
|
|
|
-
|
|
|
-
|
|
|
+ <div class="mui-input-row vongi-wordcard">
|
|
|
+ <div class="mui-content-padded" v-if="detail.enableCancel&&opAction" >
|
|
|
+ <h5>销假凭证</h5>
|
|
|
+
|
|
|
+ <div class="fyy-upphoto">
|
|
|
+ <div class="mui-col-xs-3 fyy-upphoto-close" v-for="(item,index) in picList2">
|
|
|
+ <img :src="item" v-viewer />
|
|
|
+ <a class="mui-icon mui-icon-closeempty" @click="delPic(item)"></a>
|
|
|
+ </div>
|
|
|
+ <div class="mui-col-xs-3" @click="chooseImage">
|
|
|
+ <a><span class="mui-icon mui-icon-plusempty"
|
|
|
+ style=" padding: 20px 18px 11px 0;"></span></a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="mui-input-row vongi-wordcard" v-if="detail.cancelImages">
|
|
|
+ <div class="mui-content-padded" >
|
|
|
+ <h5>销假凭证</h5>
|
|
|
+
|
|
|
+ <div class="fyy-upphoto">
|
|
|
+ <div class="mui-col-xs-3 fyy-upphoto-close" v-for="(item,index) in detail.cancelImages.split(',')">
|
|
|
+ <img :src="item" v-viewer />
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="mui-input-row"v-if="detail.cancelTime">
|
|
|
+ <label>销假时间</label>
|
|
|
+ <span v-text="detail.cancelTime">2020-04-27 12:00:00</span>
|
|
|
+ </div>
|
|
|
+ <div class="vongi-btn" v-if="detail.enableCancel&&opAction">
|
|
|
+ <button class="mui-btn mui-btn-primary " type="button" @click="submit()">
|
|
|
+ 申请销假
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+
|
|
|
</form>
|
|
|
|
|
|
|
|
@@ -51,6 +98,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import * as WxJsApi from '$project/utils/wxJsApi'
|
|
|
+
|
|
|
import * as API_Leave from '@/apis/Master/leave'
|
|
|
import Common from '$project/components/Common.vue'
|
|
|
import Loading from '$project/components/Loading.vue'
|
|
@@ -73,6 +122,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ opAction:false,
|
|
|
pageTitle: '请假详情',
|
|
|
daytime:'',
|
|
|
isLoading: false,
|
|
@@ -80,12 +130,43 @@ export default {
|
|
|
detail: {},
|
|
|
status: ['待审核', '已批准', '已拒绝'],
|
|
|
statusColor: ['', 'mui-btn-success', 'mui-btn-danger'],
|
|
|
+ picList2:[],
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
-
|
|
|
+ this.opAction=this.$route.query.opAction
|
|
|
},
|
|
|
methods: {
|
|
|
+ //微信选择图片
|
|
|
+ chooseImage() {
|
|
|
+ WxJsApi.chooseImage().then(res => {
|
|
|
+ var localData = res.localData;
|
|
|
+
|
|
|
+ if (localData.indexOf('data:image') != 0) {
|
|
|
+ //判断是否有这样的头部
|
|
|
+ localData = 'data:image/jpeg;base64,' + localData
|
|
|
+ }
|
|
|
+ localData = localData.replace(/\r|\n/g, '').replace('data:image/jgp', 'data:image/jpeg')
|
|
|
+ this.imgBase64 = localData;
|
|
|
+ //显示裁剪图片
|
|
|
+ //_this.showCropper(field);
|
|
|
+ this.uploadpic();
|
|
|
+ }).catch(error => {
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //上传图片
|
|
|
+ uploadpic() {
|
|
|
+ this.isLoading = true;
|
|
|
+ WxJsApi.uploadPic(this.imgBase64).then(response => {
|
|
|
+ this.isLoading = false;
|
|
|
+
|
|
|
+ this.picList2.push(response);
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
allowExamine(op){
|
|
|
this.$emit('allowExamine',op);
|
|
|
},
|
|
@@ -116,6 +197,9 @@ export default {
|
|
|
this.daytime=day+'天';
|
|
|
this.detail.sp=true
|
|
|
this.detail.text=this.detail.typeName+"申请"
|
|
|
+ if(this.detail.cancelStatus!=5){
|
|
|
+ this.detail.statusName=this.detail.mergeStatusN;
|
|
|
+ }
|
|
|
this.$emit('getInfo',this.detail);
|
|
|
|
|
|
this.isLoading = false;
|
|
@@ -124,7 +208,33 @@ export default {
|
|
|
mui.toast(error);
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ //提交
|
|
|
+ submit() {
|
|
|
+ if(this.picList2.length==0){
|
|
|
+ mui.toast("请上传销假凭证");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (true) {
|
|
|
+ var obj={
|
|
|
+ imageUrl:this.picList2.join(','),
|
|
|
+ id:this.id,
|
|
|
+ formId:'leaveCancelWork'
|
|
|
+ }
|
|
|
+ this.isLoading = true;
|
|
|
+
|
|
|
+ API_Leave.cancelLeaveSubmit(obj).then(response => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast("提交成功");
|
|
|
+ this.getDetail();
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+
|
|
|
+
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
asynCallBack() {
|
|
|
|
|
|
},
|
|
@@ -135,6 +245,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ if(this.opAction){
|
|
|
+ //获取微信配置
|
|
|
+ WxJsApi.getWxConfig();
|
|
|
+ }
|
|
|
this.getDetail();
|
|
|
|
|
|
},
|
|
@@ -164,5 +278,6 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped src="$project/assets/css/xpwyfyy.css"></style>
|
|
|
+<style src="$project/assets/css/iconfont.css"></style>
|
|
|
<style>
|
|
|
</style>
|