<style type="text/css">
   .c1{background-color: #f9f9f9}
   .c2{background-color: #f2f2f2}
</style>

<div class="row">
    <div class="wrapper">
        <div class="page-content order-details">
            <div class="tabs-box table-responsive">
                <!--基础信息start-->
                <table class="table table-bordered order-express">
                    <tbody>
                    <tr class="caption">
                        <th colspan="7" style="text-align: center; " class="c1">
                            基础信息
                        </th>
                    </tr>
                    <tr class="c2">
                        <th>会员账号</th>
                        <th>交易订单编号</th>
                        <th>是否调价</th>
                        <th>订单金额(含税10%)</th>
                        <th>调整后金额(含税10%)</th>
                        <th>订单状态</th>
                    </tr>
                    <tr>
                        <td><?= @$orderBase['user_account'] ?></td>
                        <td><?= @$orderBase['order_sn'] ?></td>
                        <td><?= @$orderBase['tiaojia'] ?></td>
                        <td><?= @$orderBase['order_amount'] ?></td>
                        <td><?= @$purchase['purchase_amount']; ?></td>
                        <td><?= @$orderBase['status_name'] ?></td>
                    </tr>
                    <tr class="c2">
                        <th>订单类型</th>
                        <th>支付方式</th>
                        <th>公司名称</th>
                        <th>Adtag或其它</th>
                        <th>下单时间</th>
                        <th>支付时间</th>
                    </tr>
                    <tr >
                        <td><?= @$orderBase['order_type'] ?></td>
                        <td><?= $orderBase['order_pay_type'] ?></td>
                        <td><?= $orderBase['company_name'] ?></td>
                        <td><?= @$orderBase['adtag'] ?></td>
                        <td><?= @$orderBase['create_time'] ?></td>
                        <td><?= @$orderBase['pay_time'] ?></td>
                    </tr>
                    <tr >
                        <th class="c2">采购订单编号</th>
                        <th></th>
                        <th></th>
                        <th></th>
                        <th></th>
                        <th></th>
                    </tr>
                    <tr style="height: 30px;">
                        <td><?= @$purchase['purchase_sn'] ?></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                    </tbody>
                </table>
                <!--基础信息end-->

                <!--收货信息start-->
                <table class="table table-bordered">
                    <tbody>
                        <tr class="caption">
                            <th colspan="7" style="text-align: center; background: #f9f9f9;">
                                收货信息
                            </th>
                        </tr>
                        <tr class="c2">
                            <th>收货人</th>
                            <th>联系方式</th>
                            <th>收货地址</th>
                            <th>配送快递</th>
                            <th>快递单号</th>
                        </tr>
                        <tr>
                            <td><?= $orderAddress['consignee'] ?></td>
                            <td><?= $orderAddress['mobile'] ?></td>
                            <td><?= $orderAddress["province"].$orderAddress["city"].$orderAddress["district"].$orderAddress['detail_address'] ?></td>
                            <td><?= @$shipping['shipping_name'] ?></td>
                            <td><?= @$shipping['shipping_no'] ?></td>
                        </tr>
                    </tbody>
                </table>
                <!--收货信息end-->

                <!--技术联系人信息start-->
                <table class="table table-bordered order-express">
                    <tbody>
                    <tr class="caption">
                        <th colspan="3" style="text-align: center; background: #f9f9f9;">
                            技术联系人信息
                        </th>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <table class="table table-bordered">
                                <tbody>
                                <?php if(@$orderInfo['technical_contact'] != "") {?>
                                <tr>
                                    <th>技术联系人</th>
                                    <th>联系方式</th>
                                </tr>
                                <tr>
                                    <td><?= @$orderInfo['technical_contact'] ?></td>
                                    <td><?= @$orderInfo['technical_contact_tel'] ?></td>
                                </tr>
                                <?php } else{ echo '<tr><td colspan="2">无</td></tr>'; } ?>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <!--技术联系人信息end-->

                <!--发票信息start-->
                <table class="table table-bordered order-express">
                    <tbody>
                    <tr class="caption">
                        <th colspan="3" style="text-align: center; background: #f9f9f9;">
                            发票信息
                        </th>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <table class="table table-bordered">
                                <tbody>
                                <?php if(count($orderInvoice)) {?>
                                <tr>
                                    <th>发票类型</th>
                                    <th>发票抬头</th>
                                    <th>公司注册地址</th>
                                    <th>税务登记号</th>
                                </tr>
                                <tr>
                                    <td><?= @$orderInvoice['inv_type'] ?></td>
                                    <td><?= @$orderInvoice['tax_title'] ?></td>
                                    <td><?= @$orderInvoice["province"].@$orderInvoice["city"].@$orderInvoice["district"].@$orderInvoice['consignee_address'] ?></td>
                                    <td><?= @$orderInvoice['tax_no'] ?></td>
                                </tr>
                                <tr>
                                    <th>公司电话</th>
                                    <th>开户银行</th>
                                    <th>银行卡号</th>
                                    <th></th>
                                </tr>
                                <tr>
                                    <td><?= @$orderInvoice['company_phone'] ?></td>
                                    <td><?= @$orderInvoice['bank_name'] ?></td>
                                    <td><?= @$orderInvoice['bank_account'] ?></td>
                                    <td></td>
                                </tr>
                                <?php } else{ echo '<tr><td colspan="2">不需要开票</td></tr>'; } ?>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <!--发票信息end-->

                <!--PCB信息start-->
                <table class="table table-bordered order-express">
                    <tbody>
                    <tr class="caption">
                        <th colspan="3" style="text-align: center; background: #f9f9f9;">
                            PCB信息
                        </th>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <table class="table table-bordered">
                                <tbody>
                                <tr class="c2">
                                    <th>板子长宽</th>
                                    <th>板子数量</th>
                                    <th>板子面积</th>
                                    <th>板子层数</th>
                                    <th>拼板个数</th>
                                    <th>阻焊颜色</th>
                                </tr>
                                <tr>
                                    <td><?= $orderInfo['length']."cm*".$orderInfo['width'].'cm' ?></td>
                                    <td><?= $orderInfo['qty'] ?></td>
                                    <td><?= $orderInfo['length']*$orderInfo['width']."平方厘米" ?></td>
                                    <td><?= $orderInfo['layer'] ?></td>
                                    <td><?= $orderInfo['design_num'] ?></td>
                                    <td><?= $orderInfo['board_color'] ?></td>
                                </tr>
                                <tr class="c2">
                                    <th>板子厚度</th>
                                    <th>最小线宽/线距</th>
                                    <th>过孔</th>
                                    <th>字符颜色</th>
                                    <th>铜箔厚度</th>
                                    <th>测试类型</th>
                                </tr>
                                <tr>
                                    <td><?= $orderInfo['thickness'] ?></td>
                                    <td><?= $orderInfo['line_space'] ?></td>
                                    <td><?= $orderInfo['min_hole_size'] ?></td>
                                    <td><?= $orderInfo['font_color'] ?></td>
                                    <td><?= $orderInfo['copper_thickness'] ?></td>
                                    <td><?= $orderInfo['test_type'] ?></td>
                                </tr>
                                <tr class="c2">
                                    <th>焊盘喷镀</th>
                                    <th>阻焊覆盖</th>
                                    <th>内层铜厚</th>
                                    <th>生产周期</th>
                                    <th>交货日期</th>
                                    <th>板材</th>
                                </tr>
                                <tr>
                                    <td><?= @$orderInfo['surface'] ?></td>
                                    <td><?= $orderInfo['via_process'] ?></td>
                                    <td><?= $orderInfo['inside_copper_thickness'] ?></td>
                                    <td><?= @$orderAuditDetail['text'] ?></td>
                                    <td><?= $purchase['finish_time'] ?></td>
                                    <td><?= $orderInfo['material'] ?></td>
                                </tr>
                                <tr class="c2">
                                    <th>过孔</th>
                                </tr>
                                <tr>
                                    <td><?= $orderInfo['min_hole_size'].'mm' ?></td>
                                </tr>
                                <tr>
                                    <th class="c2">其他要求</th>
                                    <th colspan="5"><?= $orderBase['order_remark']  ?></th>
                                </tr>
                                <tr>
                                    <th class="c2">特殊工艺</th>
                                    <th colspan="5"><?= $orderInfo['teshu']  ?></th>
                                </tr>
                                <tr>
                                    <th class="c2">供应商审核结果</th>
                                    <th colspan="5"><?= @$orderAuditReason2['remark'] ?></th>
                                </tr>
                                <tr>
                                    <th class="c2">确认后审核结果</th>
                                    <th colspan="5"><input style="width: 350px;" value="<?= @$orderAuditReason1['remark'] ?>" type="text" id="content" name="">&nbsp;&nbsp;<button class="layui-btn layui-btn-sm layui-btn-normal" onclick="AuditOrder()" >提交</button></th>
                                </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <!--PCB信息end-->

                <!--费用信息start-->
                <table class="table table-bordered order-express">
                    <tbody>
                    <tr class="caption">
                        <th colspan="3" style="text-align: center; background: #f9f9f9;">
                            费用信息
                        </th>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <table class="table table-bordered">
                                <tbody>
                                <tr class="c2">
                                    <th>工程费</th>
                                    <th>拼版费</th>
                                    <th>版费</th>
                                    <th>菲林费</th>
                                    <th>喷镀费</th>
                                    <th>颜色费</th>
                                </tr>
                                <tr>
                                    <td><?= $orderAuditDetail['pcb_gcf_net'] ?></td>
                                    <td><?= $orderAuditDetail['pcb_pinban_net'] ?></td>
                                    <td><?= $orderAuditDetail['pcb_bf_net'] ?></td>
                                    <td><?= $orderAuditDetail['pcb_flf_net'] ?></td>
                                    <td><?= $orderAuditDetail['pdf_net'] ?></td>
                                    <td><?= $orderAuditDetail['pcb_ysf_net'] ?></td>
                                </tr>
                                <tr class="c2">
                                    <th>测试费</th>
                                    <th>加急费</th>
                                    <th>税费</th>
                                    <th>快递费</th>
                                    <th>其他费用</th>
                                    <th></th>
                                </tr>
                                <tr>
                                    <td><?= $orderAuditDetail['pcb_ccf_net'] ?></td>
                                    <td><?= $orderAuditDetail['pcb_jjf_net'] ?></td>
                                    <td><?= $orderBase['invoice_type'] > 0 ? $orderAuditDetail['price']*0.1 : 0; ?></td>
                                    <td><?= $orderAuditDetail['pcb_kdf_net'] ?></td>
                                    <td><?= $orderAuditDetail['pcb_other_net'] ?></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <th class="c2">总计(含税10%)</th>
                                    <th colspan="2"><?= $orderBase['order_amount'] ?></th>
                                    <th class="c2">获得积分</th>
                                    <th colspan="2"><?= $orderBase['integral'] ?></th>
                                </tr>
                                <tr>
                                    <th class="c2">其他费用说明</th>
                                    <th colspan="5"></th>
                                </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <!--费用信息end-->
                <?Php if(!count($purchase) && $orderBase['status'] == 1) { ?>
                <div style="margin-top: 10px;margin-bottom: 20px;">
                    <div style="">
                        <button class="layui-btn export" onclick="AddPurchase()">发起采购</button>
                    </div>
                </div>
                <?php } ?>

            </div>


            <div class="tabs-box table-responsive">
                <table class="table table-bordered table-hover">
                    <thead>
                    <tr class="caption">
                        <th colspan="3" style="text-align: center; background: #f9f9f9;">
                            操作记录
                        </th>
                    </tr>
                    <tr>
                        <th>操作时间</th>
                        <th>操作人</th>
                        <th>操作事件</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach ($actionLog as $k=>$v) { ?>
                    <tr>
                        <td width="15%"><?= date('Y-m-d H:i:s',$v['create_time']) ?></td>
                        <td width="10%"><?= $v['user_name'] ?></td>
                        <td><?= $v['content'] ?></td>
                    </tr>
                    <?php } ?>
                    </tbody>
                </table>
            </div>

        </div>
    </div>
</div>

<!--隐藏域-->
<input  type="hidden" value="<?= $orderBase['order_sn'] ?>" id="order_sn">
<input  type="hidden" value="<?= $orderBase['order_id'] ?>" id="order_id">