<?php
/**
 * 机构认证-审阅
 * $Id: org_accredited_input.php,v 1.1 2020/01/03 11:18:46  Exp $
 * @author lixq
 * @package manager.public_html
 **/

?>
<div id="change">
	<p class="edit_title">机构认证-审阅</p>
	<form id="form" action="org_accredited_result.php" method="post" enctype="multipart/form-data">
	<input type="hidden" name="organization_status" value="<?=$user_mst->organization_status?>"/>
	<input type="hidden" name="id" value="<?=$id?>"/>
	<div class="edit_content">
		<p>上传时间</p>
		<p class="begin_blank"><?=htmlspecialchars($user_mst->organization_submit_date) ?></p>
		<p>编号</p>
		<p class="begin_blank"><?=htmlspecialchars($user_mst->organization_no) ?></p>
		<p>机构名称</p>
		<p class="begin_blank"><?=htmlspecialchars($user_mst->organization_title) ?></p>
		<p>法人姓名</p>
		<p class="begin_blank"><?=$user_mst->legal_person?></p>
		<p>联系方式</p>
		<p class="begin_blank"><?=$user_mst->organization_contact?></p>
		<p>法人身份证正面</p>
    <img src="<?=$user_mst->legal_person_imgage1?>" height="150px" alt="法人身份证正面" />
    <p>法人身份证背面</p>
    <img src="<?=$user_mst->legal_person_imgage2?>" height="150px" alt="法人身份证背面" />
    <p>营业执照图片</p>
    <img src="<?=$user_mst->licensen_imgage?>" style="max-height:600px;" alt="营业执照图片" />
    <p>其他图片</p>
    <img src="<?=$user_mst->other_imgage?>" height="150px" alt="其他图片" />
		<p>状态</p>
		<el-select v-model="status" size="small" style="margin-left: 10px;"@change="currentSel">
        <el-option
            v-for="item in status_list"
            :key="item.id"
            :label="item.title"
            :value="item.id">
        </el-option>
    	</el-select>
	
		<br/><br/>
		<el-button type="danger" @click="edit()" class="edit_btn">编辑</el-button>
		<el-button type="danger" @click="back()" class="edit_btn">返回</el-button>
		<br/><br/>
	</div>
	</form>
</div>
<script type="text/javascript">
	new Vue({
		el:'#change',
		data:{
			id:<?=$id?>,
			status_list:[{"id":"NEW","title":"待审核"},{"id":"OK","title":"审核通过"},{"id":"NG","title":"审核未通过"}],
			status:'<?=$user_mst->organization_status?>',
			title:''
		},
		methods:{
			edit:function(){
				if(this.title && this.title!="待审核"){
  			  this.$confirm('是否状态更改为'+this.title+'?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
            $("input[name='organization_status']").val(this.status);
            $('#form').submit();
          }).catch(() => {
            this.$message({
              type: 'info',
              message: '已取消更改!'
            });          
          });
				}
			},
			currentSel(selVal) {
			  let obj = {};
			  obj = this.status_list.find((item)=>{
			  	return item.id === selVal;
			  });
			  this.title = obj.title;
			},
			back:function(){
			  window.history.go(-1);
			}
		}
	})
	
</script>


