<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>业务管理-查看业务</title>
    <style>
        .btn-info:active,
        .btn-info:focus {
            background-color: #fff;
        }

        li.notcompanyli:hover {
            color: #333 !important;
        }

        .base-extend .newTabAddUpdateBox td.enter .viewDetailWord {
            width: 0.35rem;
            text-align: center;
            top: 0.08rem;
            color: #333 !important;
            cursor: default;
            font-style: normal;
        }

        .error option, select.error {
            color: #333 !important;
        }

        .editLastRecord, .saveLastRecord {
            line-height: 0.2rem;
        }

    </style>
</head>
<body>
<div class="base-extend">
    <div class="addHeader">
        <ol class="breadcrumb" style="margin-top:0;">
            <i class="icon-chevron-sign-left newBackBtn"></i>
            <li>业务管理</li>
            <li>查看业务</li>
        </ol>
    </div>
    <div class="detailContentBox">
        <ul class="projectListTab">
            <li>业务信息</li>
            <li class="active">货物信息</li>
        </ul>
        <form class="form-horizontal" autocomplete="off">
            <div class="newTabAddUpdateBox" style="padding-top: 0;top: 0.6rem!important;bottom: 0rem">
                <div class="row">
                    <table>
                        <tr>
                            <td colspan="9">
                                <span class="detailContentBox-tabletitle">货物信息</span>
                            </td>
                        </tr>
                        <tr>
                            <td width="10%">
                                <span>数量</span>
                            </td>
                            <td width="12%">
                                <span class="">销售单价</span>
                            </td>
                            <td width="12%">
                                <span class="">销售总价</span>
                            </td>
                            <td width="12%">
                                <span class="">销售质保金</span>
                            </td>
                            <td width="12%">
                                <span>采购单价</span>
                            </td>
                            <td width="12%">
                                <span class="">采购总价</span>
                            </td>
                            <td width="12%">
                                <span class="">采购质保金</span>
                            </td>
                            <td width="12%">
                                <span class="">分账金额</span>
                            </td>
                            <td width="6%">
                                <span class="">操作</span>
                            </td>
                        </tr>
                        <tbody th:each="good,goods:${billGoodsInformations}" class="goodsTable">
                        <tr>
                            <td colspan="8" style="background-color:#fff;">
                                <b>编号</b>：<span th:text="${goods?.count}"></span>&nbsp;&nbsp;&nbsp;<b>供应商</b>：<span th:text="${good?.customer?.enterpriseName}"></span>&nbsp;&nbsp;<b>厂家</b>：<span th:text="${good?.goodsFactory}"></span>&nbsp;&nbsp;<b>型号</b>：<span th:text="${good?.goodsType}"></span>&nbsp;&nbsp;<b>单位</b>：<span th:text="${good?.goodsUnit}"></span>&nbsp;&nbsp;<b>应收账款有效期</b>：<span th:text="${#calendars.format(good?.settlementDateBegin,'yyyy-MM-dd')}"></span> ~ <span th:text="${#calendars.format(good?.settlementDateEnd,'yyyy-MM-dd')}"></span>
                            </td>
                            <td rowspan="2" style="background-color:#fff;">
                                <span class="viewSettle" style="color: #5AC4FC;cursor: pointer">查看</span>
                            </td>
                        </tr>
                        <tr>
                            <td style="background-color:#fff;"  th:text="${good?.goodsNum}" class="amountInput"></td>
                            <td style="background-color:#fff;" th:text="${good?.salePrice}" class="amountInput"></td>
                            <td style="background-color:#fff;" th:text="${good?.totalSalePrice}" class="amountInput"></td>
                            <td style="background-color:#fff;" th:text="${good?.salesGuaranteeMoney}" class="amountInput"></td>
                            <td style="background-color:#fff;" th:text="${good?.purchasePrice}" class="amountInput">
                            </td>
                            <td style="background-color:#fff;" th:text="${good?.totalPurchasePrice}" class="amountInput">
                            </td>
                            <td style="background-color:#fff;" th:text="${good?.purchaseGuaranteeMoney}" class="amountInput"></td>
                            <td style="background-color:#fff;" th:text="${good?.purchaseGuaranteeMoney}" class="amountInput"></td>
                        </tr>
                        </tbody>
                        <tr>
                            <td colspan="9" style="background-color: #fff">
                                待结清货款金额合计：&nbsp;&nbsp;<span></span>
                            </td>
                        </tr>

                    </table>
                </div>

            </div>

        </form>

    </div>
</div>
</body>
<script>
    $(function () {
        $(".amountInput").each(function (i,ele) {
            $(ele).text(commaDelimiter($(ele).text()))
        })

        //切换表格
        $(".projectListTab li").click(function () {

            if ($(this).text() == '业务信息') {
                $(".yk_rightcontent").load('/business/management/findDetail?businessBasicInfoId='+businessQuery.detailId);
            } else if ($(this).text() == '货物信息') {
                $(".yk_rightcontent").load('/business/management/findBillGoods?businessBasicInfoId='+businessQuery.detailId);
            }
        });

        $(".newBackBtn").click(function () {
            $(".yk_rightcontent").load('/business/management/list');
        })

        $(".goodsTable").on('click','.viewSettle',function(){
            $(".yk_rightcontent").load('/business/management/settleDetails');
        });

    })

</script>
</html>