<!DOCTYPE html>
<html lang="en">

<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <meta http-equiv="X-UA-Compatible" content="ie=edge">
   <title>自行平仓申请</title>
   <link rel="stylesheet" href="../../lib/element-ui/css/index.css">
   <link rel="stylesheet" href="./css/selfcloseposition.css">
   <script src="../../lib/vue/vue.min.js"></script>
   <script src="../../lib/vue/axios.min.js"></script>
   <script src="../../lib/element-ui/js/index.js"></script>

   <script src="../../_common/lts_result.js"></script>
   <script src="../../_common/service_fcfg.js"></script>
   <script src="../../_common/fy_client.js"></script>
   <script src="../../_common/service.js"></script>
   <script src="../../_common/fql.js"></script>
   <!-- <script src="../../_common/service_exports.js"></script> -->
   

   <style type="text/css">
      [v-cloak] {
         display: none;
      }
   </style>
</head>

<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false" onbeforecopy="return false"
   oncopy=document.selection.empty() onselect=document.selection.empty()>  
   <div id="app" style="min-height: 475px;" v-cloak :class="configSkin == 'default' ? 'default' : 'white'">
      <link rel="stylesheet" href="../../lib/common-style/css/default.css" v-if="ifBlack">
      <link rel="stylesheet" href="../../lib/common-style/css/white.css" v-else>
      <div class="application-box">
         <div class="left-box" ref="leftBox">
            <div class="title">自行平仓申请</div>
            <div class="cust-info">
               <div class="line-div">
                  <span>客户账号：</span>
                  <span>{{fundid}}</span>
               </div>
               <div class="line-div">
                  <span>信用状态：</span>
                  <span>{{creditstatus | creditStatus}}</span>
               </div>
               <div class="line-div">
                  <span>维保比例：</span>
                  <span>{{marginrate | numberFilter}}</span>
               </div>
               <div class="line-div">
                  <span>总资产：</span>
                  <span>{{asset}}</span>
               </div>
               <div class="line-div">
                  <span>总负债：</span>
                  <span>{{liability}}</span>
               </div>
            </div>
            <div class="jiacang-btn" v-if="isHaveLimit">
               <a href="###" @click="applyZXPC(1)">申请自行平仓</a>
            </div>
            <div class="check-status" v-html="progressTxt" v-else>{{progressTxt}}</div>
         </div>
         <div class="list">
            <div class="title">
               <span class="button-blue" :class="queryType==0?'active-btn':''" @click="query(0)">申请查询记录</span>
               <span class="button-blue" :class="queryType==1?'active-btn':''" @click="query(1)">申请结果</span>
               <span>查询结果：共[{{ queryType==0?queryListArr.length:queryResArr.length }}]条记录</span>
            </div>
            <div class="date-box">
               <div>
                  <span>开始日期：</span>
                  <el-date-picker type="date" clear-icon v-model="beginDate" @change="getEndDate" :picker-options="startDatePicker" placeholder="请选择">
                  </el-date-picker>
               </div>
               <div class="end-date">
                  <span>结束日期：</span>
                  <el-date-picker type="date" clear-icon v-model="endDate" @change="getBeginDate" :picker-options="endDatePicker" placeholder="请选择">
                  </el-date-picker>
               </div>
               <div class="query-btn">
                  <a href="###" @click="query">查询</a>
               </div>
            </div>
            <div class="log-div" v-if="queryType==0">
               <el-table ref="" :data="queryListArr" height="410" border>
                  <div slot="empty">
                     <div v-if="nullData">
                        <div>
                           <img src="../../lib/common-style/images/loading000.gif" alt="" v-if="loadingColor">
                           <img src="../../lib/common-style/images/loadingfff.gif" alt="" v-else>
                        </div>
                     </div>
                     <div v-else>{{error_con}}</div>
                  </div>
                  <el-table-column prop="" label="申请日期" min-width="160">
                     <template slot-scope="scope">
                        {{scope.row.init_date}} {{scope.row.curr_time}}
                     </template>
                  </el-table-column>
                  <el-table-column prop="gt_ywqqid" label="业务申请号" min-width="100">
                  </el-table-column>
                  <el-table-column prop="client_name" label="客户名称" min-width="100">
                  </el-table-column>
                  <el-table-column prop="gt_ywdm" label="业务代码" min-width="100">
                  </el-table-column>
                  <el-table-column prop="gt_ywmc" label="业务名称" min-width="160">
                  </el-table-column>
                  <el-table-column prop="gt_clzt" label="申请状态" min-width="100">
                     <template slot-scope="scope">
                        {{scope.row.gt_clzt | applyfilter}}
                     </template>
                  </el-table-column>
                  <!-- <el-table-column prop="" label="审批时间" min-width="160">
                     <template slot-scope="scope">
                        {{scope.row.gt_sprq}} {{scope.row.gt_spsj}}
                     </template>
                  </el-table-column> -->
                  <el-table-column prop="deal_info" label="备注" min-width="200">
                  </el-table-column>
               </el-table>
            </div>
            <div class="result-div" v-if="queryType==1">
               <el-table ref="" :data="queryResArr" height="380" border>
                  <div slot="empty">
                     <div v-if="nullData">
                        <div>
                           <img src="../../lib/common-style/images/loading000.gif" alt="" v-if="loadingColor">
                           <img src="../../lib/common-style/images/loadingfff.gif" alt="" v-else>
                        </div>
                     </div>
                     <div v-else>{{error_con}}</div>
                  </div>
                  <el-table-column prop="apply_date" label="申请日期" min-width="160">
                     <template slot-scope="scope">
                        {{scope.row.apply_date|datefilter}}
                     </template>
                  </el-table-column>
                  <el-table-column prop="gt_valid_type" label="申请状态" min-width="100">
                     <template slot-scope="scope">
                        {{scope.row.gt_valid_type|validtypefilter}}
                     </template>
                  </el-table-column>
                  <el-table-column prop="begin_date" label="起始日期" min-width="100">
                     <template slot-scope="scope">
                        {{scope.row.begin_date|datefilter}}
                     </template>
                  </el-table-column>
                  <el-table-column prop="end_date" label="到期日期" min-width="160">
                     <template slot-scope="scope">
                        {{scope.row.end_date|datefilter}}
                     </template>
                  </el-table-column>
                  <el-table-column prop="remark" label="备注" min-width="100">
                  </el-table-column>
                 
               </el-table>
               <div>
                  <p class="loadmore" :class="hasMore?'blueColor':''" @click="queryApplyResult('loadmore')">点击加载更多</p>
               </div>
            </div>
         </div>
      </div>
      <div class="tip">
         <span class="">
            *当您的信用账户已出现《融资融券合同》约定的可予强制平仓情形，在我司强制平仓执行前，您可以向我公司申请自行平仓。期间，无论您采取全部、部分或未采取自行平仓措施，我司仍然有权对您信用账户执行强制平仓，直至您信用账户维持担保比例达到关注线（如我司要求其他维保比例的，则应达到该比例）以上。
            根据合同约定条款，强制平仓执行的的证券品种、数量、价格、时机、顺序等均由我公司自主决定。
         </span>
      </div>
      <div v-show="tipDialog">
         <div class="confirm-mask"></div>
         <div class="confirm-content">
            <div class="dialog-top">
               <span class="dialog-title">富易</span>
               <span class="close-icon" @click="tipDialog = false"><i class="el-icon-close"></i></span>
            </div>
            <div class="dialog-con">
               <div>
                  <img src="../../lib/common-style/images/successico.png" alt="" v-if="success_fail">
                  <img src="../../lib/common-style/images/warning.png" alt="" v-else>
               </div>
               <div class="tip-txt">
                  <div v-html="submit_con">{{submit_con}}</div>
               </div>
            </div>
            <div class="dialog-sure">
               <el-button type="primary" class="known-btn" @click="sureSubmit">确定</el-button>
            </div>
         </div>
      </div>
   </div>
   <script src="./js/md5.js"></script>
   <script src="./js/selfcloseposition.js"></script>
</body>

</html>