<template>
<div>
     
		<div class="mui-content" style="padding-top:24px">
			<div class="  vongi-qingjiadt mt-10">
				<form class="mui-input-group  vongi-wybx">
					<div class="mui-input-row">
						<label>申请人</label>
						<span>{{adjustShiftDetail.name}}</span>
					</div>
                    <div class="mui-input-row">
						<label>出厂日期</label>
						<span>{{adjustShiftDetail.date}}</span>
					</div>
					<div class="mui-input-row">
						<label style="width:100%">申请理由及物品清单</label>
						<textarea id="textarea" rows="8" readonly="readonly" 
						style="
						    width: 100%;
						    padding: 0 20px;
						"
						
						v-model="adjustShiftDetail.content"></textarea>
						
					</div>
                    <div class="mui-input-row padd10">
						<label>图片附件</label>
						<span class="vongi-span vongi-wordcard vongi-meform-pho">
							<div class="fyy-upphoto flew"  v-if="adjustShiftDetail.images" >
								<div class="mui-col-xs-3" v-for="(item,index) in adjustShiftDetail.images.split(',')">
									<img :src="item" v-viewer />
								</div>
							 
							</div>
						</span>
					</div>
				</form>
			</div>
			<div class="  vongi-qingjiadt mt-10">
				<form class="mui-input-group">
					<div class="mui-input-row">
						<label>申请时间</label>
						<span>{{adjustShiftDetail.createTime}}</span>
						
					</div>
					<div class="mui-input-row">
						<label>审核状态</label>
						<span class="" :class="{'colorf8b155':adjustShiftDetail.status=='0','color55f868':adjustShiftDetail.status=='1'||adjustShiftDetail.status=='4','colorfe616c':adjustShiftDetail.status=='2'||adjustShiftDetail.status=='3'}">{{adjustShiftDetail.statusName}}</span></span>
					</div>

				</form>
			</div>
			 
            <div class="mui-content-padded vongi-meform-pho" v-if="false">
					<div class="vongi-center">
                        <p class="margin10">核验码</p>
						<img src="~$project/assets/img/ma.png" width="80%" />
					</div>
			</div>
		</div>
</div>
</template>


<script>
	import * as API from '@/apis-xsy/applyclass'
	import * as API_sp from '@/apis-xsy/xsy'
import ExamineDetail from '$project/components/ExamineDetail.vue'

	import Common from '$project/components/Common.vue'
	import Loading from '$project/components/Loading.vue'
	import TopHeader from '$project/components/TopHeader.vue'
	import {
		mapGetters,
		mapMutations
	} from 'vuex'

	export default {
		name: '',
		components: {
			Common,
			Loading,
			TopHeader,ExamineDetail
		},
		data() {
			return {
				pageTitle: '申请调班详情',

				isLoading: false,
				id: '',
				adjustShiftDetail: {},
				examineDetail: {},
				only: "test"

			}
		},
		created() {
			this.id = this.$route.query.id;
		},
		methods: {
			allowExamine(op){
				this.$emit('allowExamine',op);
				
			},
			getClass(ac, i) {
				var reclass = ""
				
				if (ac.action == "0") {
					if (this.only == "test") {

						this.only = i;
					}
					if (this.only == i) {
						return "color3385FF"
					} else {
						return "mui-hidden"
					}

				}

				if (ac.action == "3" || ac.action == "2") {
					return "colorfe616c"
				}

				if (ac.action == "1" || ac.action == "4") {
					return "color389E0D"
				}
				return reclass
			},
		 
			getAdjustShiftDetail() {
				this.isLoading = true;

				API.carryThingsDetail(this.id).then(response => {
					this.adjustShiftDetail = response;
					this.adjustShiftDetail.sp=true;
					this.isLoading = false;
					
				 
					 this.$emit('getInfo',this.adjustShiftDetail);
					
				}).catch(error => {
					this.isLoading = false;
					mui.toast(error);
				})
			},
			asynCallBack() {

			},
			update() {
				this.adjustShiftDetail.sp=false;
				this.getAdjustShiftDetail();
			 
			}
		},
		mounted() {
			this.getAdjustShiftDetail();
			
		},
		destroyed() {},
		

	}
</script>

<style src="$project/assets/css/iconfont.css"></style>
<style scoped src="$project/assets/css/xpwyfyy.css"></style>
<style src="$project/assets/css/xsy.css"></style>
<style>
</style>
