<!DOCTYPE html>
<html>
<head>

    <title>收付款管理</title>
    #parse("sys/header.html")


    <style> 

    </style>
    <link rel="stylesheet" href="${rc.contextPath}/statics/plugins/jqgrid/ui.jqgrid-bootstrap.css">
</head>
<body>


<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <ul class="nav navbar-top-links navbar-right">
                <li >
                    <span>&nbsp; 门店：深圳Xxxxxx店</span>
                </li>
                <li><span><i class="fa fa-user-circle" ></i> &nbsp;收银员：张三</span></li>
                <li><a @click="logout"><i class="fa fa fa-sign-out"></i> 退出</a></li>
            </ul>
        </Row>
    </div>

    <div class="container-fluid">
        <div id="content" class="row-fluid">
            <div class="col-md-3">
                <ul class="list-unstyled">
                    <li >
                        <i-input v-model="prodBarcode" @on-enter="query" placeholder="输入或扫码商品条形码"/>
                    </li>
                    <li style="margin-top: 50px;">
                        <div v-show="goodsDetail">
                            <img style="height: 400px;width: 400px;" :src="goods.primaryPicUrl" class="img-rounded"/>
                            <h3 style="margin: 8px;">{{goods.name}}</h3>
                            <p style="margin: 8px;">单价： {{goods.retailPrice}}</p>
                            <p style="margin: 8px;">规格： {{goods.specification}}</p>
                            <p style="margin: 8px;">条形码： {{goods.prodBarcode}}</p>
                            <span style="margin: 8px;">商品描述： {{goods.goodsDesc}}</span>
                        </div>
                        <div v-show="!goodsDetail">
                            请扫描商品
                        </div>
                    </li>
                </ul>

            </div>
            <div class="col-md-6">
                <ul class="list-unstyled">
                    <li style="height: 500px;">
                        <table id="cbec" class="table .table-striped">
                            <tr style="border: white;background-color: orange">
                                <th>跨境商品名称</th>
                                <th>规格</th>
                                <th>单价</th>
                                <!--<th>税费</th>-->
                                <th>数量</th>
                                <th>操作</th>
                            </tr>
                            <tr v-for="(item,i) in goodsList" v-if="item.name">
                                <td><h3>{{item.name}}</h3></td>
                                <td> {{item.specification}}</td>
                                <td> {{item.retailPrice}}</td>
                                <td>
                                    <i class="glyphicon glyphicon-minus" aria-hidden="true" @click="minus(item.id)"></i>
                                    {{item.sellVolume}}
                                    <i class="glyphicon glyphicon-plus" aria-hidden="true" @click="add(item.id)"></i>
                                </td>
                                <td >
                                    <i class="glyphicon glyphicon-remove" aria-hidden="true" @click="deleteItem(item.id)"></i>
                                </td>
                            </tr>
                        </table>

                    </li>
                    <li  style="height: 300px;">
                        <table id="general" class="table .table-striped">
                            <tr style="border: white;background-color: orange">
                                <th>一般贸易</th>
                                <th>规格</th>
                                <th>单价</th>
                                <th>数量</th>
                                <th>操作</th>
                            </tr>

                        </table>
                    </li>

                    <li  style="height: 100px;">
                        <i-button type="warning" @click="clearGoodsList"><i class="fa fa-pencil-square-o"></i>&nbsp;清空商品列表</i-button>
                        <i-button data-toggle="modal" data-target="#myModal" type="warning" ><i class="fa fa-pencil-square-o"></i>&nbsp;提交订单</i-button>

                        <div class="modal fade" id="myModal"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                        <h4 class="modal-title" id="exampleModalLabel">订购人信息</h4>
                                    </div>
                                    <div class="modal-body">
                                        <form>
                                            <div class="form-group">
                                                <label for="customName" class="control-label">姓名:</label>
                                                <input type="text" class="form-control" ref="customName" id="customName">
                                            </div>
                                            <div class="form-group">
                                                <label for="customIDCard" class="control-label">身份证:</label>
                                                <input type="text" class="form-control" ref="customIDCard" id="customIDCard" />
                                            </div>
                                            <div class="form-group">
                                                <label for="customPhone" class="control-label">手机号:</label>
                                                <input type="text" class="form-control" ref="customPhone" id="customPhone" />
                                            </div>
                                        </form>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                        <button type="button" class="btn btn-primary" @click="submitCustomInfo" id="Send">去付款</button>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!--付款码 -->
                        <div class="modal fade" id="payModal"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                        <h4 class="modal-title" id="payModalLabel">付款码</h4>
                                    </div>
                                    <div class="modal-body">
                                        <form>
                                            <div class="form-group">
<!--                                                <input type="text" class="form-control" ref="payCode" id="payCode" />-->
                                                <i-input id="payCode"  @on-enter="submitOrder" ref="payCode" placeholder="请输入付款码"/>
                                            </div>

                                        </form>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-primary" @click="submitOrder" id="submitOrder" data-dismiss="modal">提交</button>
                                    </div>
                                </div>
                            </div><!-- /.modal -->
                        </div>
                    </li>
                </ul>
            </div>
            <div class="col-md-3">
                <h2 class="text-center">取票码</h2>
                <div class="row" >
                    <div class="col-xs-4 col-sm-4" v-for="(item,i) in pickUpCodeList" style="margin-bottom: 8px;">
                        <i-button data-toggle="modal" data-target="#orderDetail" type="warning" @click="queryOrderDetail(item.orderSn)" ><i class="fa fa-pencil-square-o"></i>&nbsp;{{item.pickUpCodeSn}}</i-button>
                    </div>
                </div>
            </div>
            <!--付款码 -->
            <div class="modal fade " id="orderDetail"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog modal-lg" style="width: 80%;height: 80%">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="orderDetailLabel">订单详情</h4>
                        </div>
                        <div class="modal-body">

                                <div class="row" style="border:0">
                                    <div class="col-md-3" id="orderNo">订单编号: {{orderEntity.orderSn}}</div>
                                    <div class="col-md-3" id="serialNumber">支付流水号: <span>{{orderProcessRecord.payTransactionId}}</span></div>
                                    <div class="col-md-3" id="waybillNo">运单编号: </div>
                                    <div class="col-md-3" id="inventoryNo">清单编号: </div>
                                </div>
                                <div class="row" style="border:0">
                                    <div class="col-md-3" id="orderDeclarationTime">订单申报时间: </div>
                                    <div class="col-md-3" id="payDeclarationTime">支付单申报时间: </div>
                                    <div class="col-md-3" id="waybillDeclarationTime">运单申报时间: </div>
                                    <div class="col-md-3" id="inventoryDeclarationTime">清单放行时间: </div>
                                </div>
                            <div class="row" style="border:0">
                                <div class="col-md-3" id="orderSubmitTime">订单提交时间: </div>
                                <div class="col-md-3" id="payStatus">支付状态:
                                    <span v-if="orderEntity.payStatus == 0">未付款</span>
                                    <span v-if="orderEntity.payStatus == 1">付款中</span>
                                    <span v-if="orderEntity.payStatus == 2">已付款</span>
                                </div>
                                <div class="col-md-3" id="inventoryStatus">清关状态: </div>
                            </div>
                            <div class="row" style="border:0">
                                <div class="col-md-3" id="orderDeclareStatus">订单申报状态: </div>
                                <div class="col-md-3" id="payOrderDeclareStatus">支付单申报状态: </div>
                            </div>
                            <div class="row" style="border:0">
                                <div class="col-md-3" id="orderTotal">订单总额: {{orderEntity.actualPrice}}</div>
                                <div class="col-md-3" id="orderTaxes">订单税费: </div>
                                <div class="col-md-3" id="invetoryReceipt">清关回执: </div>
                            </div>
                            <table id="goodsDetailTable" class="table .table-striped" style="margin-top: 50px;">
                                <tr style="border: white;background-color: orange">
                                    <th>商品名称</th>
                                    <th>规格</th>
                                    <th>单价</th>
                                    <!--<th>税费</th>-->
                                    <th>数量</th>
                                    <th>总额</th>
                                </tr>
                                <tr v-for="(item,i) in goodsDetailList" >
                                    <td><h3>{{item.goodsName}}</h3></td>
                                    <td>{{item.specification}}</td>
                                    <td>{{item.retailPrice}}</td>
                                    <td>{{item.number}}</td>
                                    <td >{{item.number*item.retailPrice}}</td>
                                </tr>
                            </table>

                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-primary" @click="verification" id="verification" data-dismiss="modal">核销</button>
                            <button type="button" class="btn btn-primary" @click="refundOrder" id="refundOrder" data-dismiss="modal">退款</button>
                            <button type="button" class="btn btn-primary" @click="retrySendOrder" id="retrySendOrder" data-dismiss="modal">订单重推</button>
                        </div>
                    </div>
                </div><!-- /.modal -->
            </div>
        </div>
    </div>



</div>

<script src="${rc.contextPath}/js/sale/sale.js?_${date.systemTime}"></script>
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script src="${rc.contextPath}/statics/libs/bootstrap.min.js"></script>
</body>
</html>
