
@{
    ViewData["Title"] = "资产负债表";
    Layout = "~/Pages/Shared/_MainLayout.cshtml";
    ViewBag.Nav = new string[] { "报表管理", "资产负债表-新" };
}

<div class="row">
    <div class="col-sm-12">
        <div class="alert alert-warning">
            说明：按周显示时，默认显示周二的数据，按月显示时，默认显示每月月末的数据
        </div>
        <div class="ibox-content m-b-sm border-bottom">
            <form id="toolbar">
                <div class="form-inline" style="line-height:40px;">
                    <div class="form-group">
                        <input id="chk_showdetail" type="checkbox" checked="checked" /><label for="chk_showdetail">是否可看明细</label>
                        <select id="timetype" class="form-control" style="width:120px;">

                            <option value="2">按周的方式</option>
                            <option value="3">按月的方式</option>
                            @*<option value="4">按年的方式</option>*@
                            <option value="1">按日的方式</option>
                        </select>
                        @*<label>日期</label>*@
                        <input id="day" type="text" style="width:120px;display:none;" value="@DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")" class="form-control" />
                        <label>付款主体</label>
                        <select id="sel_paycompany" class="form-control" style="width:200px;">
                            <option value="0">百伦供应链</option>
                            @*<option value="1">广州百伦科技有限公司</option>
                                <option value="2" selected>香港百伦科技有限公司</option>*@
                        </select>
                        <button type="button" class="btn btn-sm btn-primary" onclick="GetData();"><i class="fa fa-search"></i>&nbsp;查询</button>
                        <button id="btnexport" style="display:none;" type="button" class="btn btn-sm btn-success" onclick="ExportXsl();">导出</button>

                        @*<button type="button" class="btn btn-sm btn-warning" onclick="showchart();">环比报表</button>
                        <button type="button" class="btn btn-sm btn-primary" onclick="showtask();">任务运行情况</button>*@
                    </div>
                </div>
            </form>
        </div>
        <div class="ibox-content m-b-sm border-bottom">
            <div class="contain">
                <div class="contain-row" style="width:100%;">
                    <div class="item-col" style="width:8%;border:solid 1px #eee;height:34px;line-height:34px;">统计大项</div>
                    <div class="item-col" style="width:8%;border:solid 1px #eee;border-left-width:0px;height:34px;line-height:34px;">统计项</div>
                    <div style="width:84%;">
                        <div class="item-row" style="width:100%;border-top:solid 1px #eee;">
                            <div style="width:11.5%;">数值</div>
                            <div style="width:11.5%;" id="c0">2019-03-12</div>
                            <div style="width:11.5%;" id="c1">2019-03-13</div>
                            <div style="width:11.5%;" id="c2">2019-03-14</div>
                            <div style="width:11.5%;" id="c3">2019-03-15</div>
                            <div style="width:11.5%;" id="c4">2019-03-16</div>
                            <div style="width:11.5%;" id="c5">2019-03-17</div>
                            <div style="width:11.5%;" id="c6">2019-03-18</div>
                            <div style="width:8%;">操作</div>
                        </div>
                    </div>
                </div>
                <div class="contain-row" style="width:100%;">
                    <div style="width:8%;" class="second-row">
                        <div id="zc" class="item-col" style="width:100%;border-left:solid 1px #eee;border-right:solid 1px #eee;height:132px;line-height:132px;border-bottom:solid 1px #eee;">资产</div>
                        <div class="item-col" style="width:100%;border-left:solid 1px #eee;border-right:solid 1px #eee;border-bottom:solid 1px #eee;height:33px;">&nbsp;</div>
                        <div id="fz" class="item-col" style="width:100%;border-left:solid 1px #eee;border-right:solid 1px #eee;border-bottom:solid 1px #eee;height:264px;line-height:264px;" title="负债和所有者权益">负债和所有者权益</div>
                    </div>
                    <div style="width:8%;" class="second-row">
                        <div id="ldzc" class="item-col zc" style="width:100%;border-bottom:solid 1px #eee;height:33px;line-height:33px;">流动资产</div>
                        <div id="fldzc" class="item-col zc" style="width:100%;border-bottom:solid 1px #eee;height:33px;line-height:33px;">非流动资产</div>
                        <div class="item-col zc" style="width:100%;border-bottom:solid 1px #eee;height:33px;">&nbsp;</div>
                        <div class="item-col zc" style="width:100%;border-bottom:solid 1px #eee;height:33px;line-height:33px;">资产合计</div>
                        <div class="item-col" style="width:100%;border-bottom:solid 1px #eee;height:33px;">&nbsp;</div>
                        <div id="ldfz" class="item-col fz" style="width:100%;border-bottom:solid 1px #eee;height:33px;line-height:33px;">流动负债</div>
                        <div id="fldfz" class="item-col fz" style="width:100%;border-bottom:solid 1px #eee;height:33px;line-height:33px;">非流动负债</div>
                        <div class="item-col fz" style="width:100%;border-bottom:solid 1px #eee;height:33px;">&nbsp;</div>
                        <div class="item-col fz" style="width:100%;border-bottom:solid 1px #eee;height:33px;line-height:33px;">负债合计</div>
                        <div class="item-col fz" style="width:100%;border-bottom:solid 1px #eee;height:33px;">&nbsp;</div>
                        <div id="syzqy" class="item-col fz" style="width:100%;border-bottom:solid 1px #eee;height:33px;line-height:33px;">所有者权益(或股东权益)</div>
                        <div class="item-col fz" style="width:100%;border-bottom:solid 1px #eee;height:33px;">&nbsp;</div>
                        <div class="item-col fz" style="width:100%;border-bottom:solid 1px #eee;height:33px;line-height:33px;">负债和所有者权益（或股东权益）总计</div>
                    </div>
                    <div style="width:84%;">
                        <div class="item-row fa fa1" style="width:100%;">
                            <div style="width:11.5%;">货币资金</div>
                            <div style="width:11.5%;" class="monetary_fund">0</div>
                            <div style="width:11.5%;" class="monetary_fund">0</div>
                            <div style="width:11.5%;" class="monetary_fund">0</div>
                            <div style="width:11.5%;" class="monetary_fund">0</div>
                            <div style="width:11.5%;" class="monetary_fund">0</div>
                            <div style="width:11.5%;" class="monetary_fund">0</div>
                            <div style="width:11.5%;">
                                <input id="monetary_fund" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="monetary_fund_1"></span>
                            </div>
                            <div style="width:8%;">

                            </div>
                        </div>
                        <div class="item-row fa fa1" style="width:100%;">
                            <div style="width:11.5%;">应收账款</div>
                            <div style="width:11.5%;" class="accounts_receivable">0</div>
                            <div style="width:11.5%;" class="accounts_receivable">0</div>
                            <div style="width:11.5%;" class="accounts_receivable">0</div>
                            <div style="width:11.5%;" class="accounts_receivable">0</div>
                            <div style="width:11.5%;" class="accounts_receivable">0</div>
                            <div style="width:11.5%;" class="accounts_receivable">0</div>
                            <div style="width:11.5%;">
                                <input id="accounts_receivable" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="accounts_receivable_1"></span>
                            </div>
                            <div style="width:8%;">
                                <button class="btn btn-xs btn-primary" onclick="UpdateData('accounts_receivable');">更新</button>
                            </div>
                        </div>
                        <div class="item-row fa fa1" style="width:100%;">
                            <div style="width:11.5%;">预付款项</div>
                            <div style="width:11.5%;" class="prepayment">0</div>
                            <div style="width:11.5%;" class="prepayment">0</div>
                            <div style="width:11.5%;" class="prepayment">0</div>
                            <div style="width:11.5%;" class="prepayment">0</div>
                            <div style="width:11.5%;" class="prepayment">0</div>
                            <div style="width:11.5%;" class="prepayment">0</div>
                            <div style="width:11.5%;">
                                <input id="prepayment" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="prepayment_1"></span>
                            </div>
                            <div style="width:8%;">

                            </div>
                        </div>
                        <div class="item-row fa fa1" style="width:100%;">
                            <div style="width:11.5%;">其他应收款</div>
                            <div style="width:11.5%;" class="other_accounts_receivable">0</div>
                            <div style="width:11.5%;" class="other_accounts_receivable">0</div>
                            <div style="width:11.5%;" class="other_accounts_receivable">0</div>
                            <div style="width:11.5%;" class="other_accounts_receivable">0</div>
                            <div style="width:11.5%;" class="other_accounts_receivable">0</div>
                            <div style="width:11.5%;" class="other_accounts_receivable">0</div>
                            <div style="width:11.5%;">
                                <input id="other_accounts_receivable" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="other_accounts_receivable_1"></span>
                            </div>
                            <div style="width:8%;">

                            </div>
                        </div>
                        <div class="item-row fa fa1" style="width:100%;">
                            <div style="width:11.5%;">存货</div>
                            <div style="width:11.5%;" class="inventory_amount">0</div>
                            <div style="width:11.5%;" class="inventory_amount">0</div>
                            <div style="width:11.5%;" class="inventory_amount">0</div>
                            <div style="width:11.5%;" class="inventory_amount">0</div>
                            <div style="width:11.5%;" class="inventory_amount">0</div>
                            <div style="width:11.5%;" class="inventory_amount">0</div>
                            <div style="width:11.5%;">
                                <input id="inventory_amount" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="inventory_amount_1"></span>
                            </div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row fa fa1" style="width:100%;">
                            <div style="width:11.5%;">其他流动资产</div>
                            <div style="width:11.5%;" class="fa_other_assets">0</div>
                            <div style="width:11.5%;" class="fa_other_assets">0</div>
                            <div style="width:11.5%;" class="fa_other_assets">0</div>
                            <div style="width:11.5%;" class="fa_other_assets">0</div>
                            <div style="width:11.5%;" class="fa_other_assets">0</div>
                            <div style="width:11.5%;" class="fa_other_assets">0</div>
                            <div style="width:11.5%;">
                                <input id="fa_other_assets" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="fa_other_assets_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('fa_other_assets');">更新</a></div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;font-weight:bold;" onclick="showitem('fa1', this,231,'ldzc');">
                                流动资产合计
                                <img src="@Url.Content("~/img/downicon.png")" style="width:10px;position:absolute;float:right;margin-top:10px;right:5px;" />
                            </div>
                            <div style="width:11.5%;" class="fa_count">0</div>
                            <div style="width:11.5%;" class="fa_count">0</div>
                            <div style="width:11.5%;" class="fa_count">0</div>
                            <div style="width:11.5%;" class="fa_count">0</div>
                            <div style="width:11.5%;" class="fa_count">0</div>
                            <div style="width:11.5%;" class="fa_count">0</div>
                            <div style="width:11.5%;">
                                <input id="fa_count" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="fa_count_1"></span>
                            </div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row fa fa2" style="width:100%;">
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row fa fa2" style="width:100%;">
                            <div style="width:11.5%;">长期股权投资</div>
                            <div style="width:11.5%;" class="nca_longterm_equity_investment">0</div>
                            <div style="width:11.5%;" class="nca_longterm_equity_investment">0</div>
                            <div style="width:11.5%;" class="nca_longterm_equity_investment">0</div>
                            <div style="width:11.5%;" class="nca_longterm_equity_investment">0</div>
                            <div style="width:11.5%;" class="nca_longterm_equity_investment">0</div>
                            <div style="width:11.5%;" class="nca_longterm_equity_investment">0</div>
                            <div style="width:11.5%;">
                                <input id="nca_longterm_equity_investment" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="nca_longterm_equity_investment_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('nca_longterm_equity_investment');">更新</a></div>
                        </div>
                        <div class="item-row fa fa2" style="width:100%;">
                            <div style="width:11.5%;">固定资产</div>
                            <div style="width:11.5%;" class="fixed_assets">0</div>
                            <div style="width:11.5%;" class="fixed_assets">0</div>
                            <div style="width:11.5%;" class="fixed_assets">0</div>
                            <div style="width:11.5%;" class="fixed_assets">0</div>
                            <div style="width:11.5%;" class="fixed_assets">0</div>
                            <div style="width:11.5%;" class="fixed_assets">0</div>
                            <div style="width:11.5%;">
                                <input id="fixed_assets" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="fixed_assets_1"></span>
                            </div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row fa fa2" style="width:100%;">
                            <div style="width:11.5%;">无形资产</div>
                            <div style="width:11.5%;" class="nca_intangible_assets">0</div>
                            <div style="width:11.5%;" class="nca_intangible_assets">0</div>
                            <div style="width:11.5%;" class="nca_intangible_assets">0</div>
                            <div style="width:11.5%;" class="nca_intangible_assets">0</div>
                            <div style="width:11.5%;" class="nca_intangible_assets">0</div>
                            <div style="width:11.5%;" class="nca_intangible_assets">0</div>
                            <div style="width:11.5%;">
                                <input id="nca_intangible_assets" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="nca_intangible_assets_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('nca_intangible_assets');">更新</a></div>
                        </div>
                        <div class="item-row fa fa2" style="width:100%;">
                            <div style="width:11.5%;">长期待摊费用</div>
                            <div style="width:11.5%;" class="nca_longterm_unamortized_expenses">0</div>
                            <div style="width:11.5%;" class="nca_longterm_unamortized_expenses">0</div>
                            <div style="width:11.5%;" class="nca_longterm_unamortized_expenses">0</div>
                            <div style="width:11.5%;" class="nca_longterm_unamortized_expenses">0</div>
                            <div style="width:11.5%;" class="nca_longterm_unamortized_expenses">0</div>
                            <div style="width:11.5%;" class="nca_longterm_unamortized_expenses">0</div>
                            <div style="width:11.5%;">
                                <input id="nca_longterm_unamortized_expenses" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="nca_longterm_unamortized_expenses_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('nca_longterm_unamortized_expenses');">更新</a></div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;font-weight:bold;" onclick="showitem('fa2', this,198,'fldzc');">
                                非流动资产合计
                                <img src="@Url.Content("~/img/downicon.png")" style="width:10px;position:absolute;float:right;margin-top:10px;right:5px;" />
                            </div>
                            <div style="width:11.5%;" class="nca_count">0</div>
                            <div style="width:11.5%;" class="nca_count">0</div>
                            <div style="width:11.5%;" class="nca_count">0</div>
                            <div style="width:11.5%;" class="nca_count">0</div>
                            <div style="width:11.5%;" class="nca_count">0</div>
                            <div style="width:11.5%;" class="nca_count">0</div>
                            <div style="width:11.5%;">
                                <input id="nca_count" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="nca_count_1"></span>
                            </div>
                            <div style="width:8%;">@*<a class="btn btn-primary btn-xs" onclick="UpdateData('nca_count');">更新</a>*@</div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;">

                            </div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;">资产总计</div>
                            <div style="width:11.5%;" class="count_assets">0</div>
                            <div style="width:11.5%;" class="count_assets">0</div>
                            <div style="width:11.5%;" class="count_assets">0</div>
                            <div style="width:11.5%;" class="count_assets">0</div>
                            <div style="width:11.5%;" class="count_assets">0</div>
                            <div style="width:11.5%;" class="count_assets">0</div>
                            <div style="width:11.5%;">
                                <input id="count_assets" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="count_assets_1"></span>
                            </div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;">

                            </div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row cl cl1" style="width:100%;">
                            <div style="width:11.5%;">短期借款</div>
                            <div style="width:11.5%;" class="short_term_borrow">0</div>
                            <div style="width:11.5%;" class="short_term_borrow">0</div>
                            <div style="width:11.5%;" class="short_term_borrow">0</div>
                            <div style="width:11.5%;" class="short_term_borrow">0</div>
                            <div style="width:11.5%;" class="short_term_borrow">0</div>
                            <div style="width:11.5%;" class="short_term_borrow">0</div>
                            <div style="width:11.5%;">
                                <input id="short_term_borrow" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="short_term_borrow_1"></span>
                            </div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row cl cl1" style="width:100%;">
                            <div style="width:11.5%;">应付账款</div>
                            <div style="width:11.5%;" class="accounts_payable">0</div>
                            <div style="width:11.5%;" class="accounts_payable">0</div>
                            <div style="width:11.5%;" class="accounts_payable">0</div>
                            <div style="width:11.5%;" class="accounts_payable">0</div>
                            <div style="width:11.5%;" class="accounts_payable">0</div>
                            <div style="width:11.5%;" class="accounts_payable">0</div>
                            <div style="width:11.5%;">
                                <input id="accounts_payable" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="accounts_payable_1"></span>
                            </div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row cl cl1" style="width:100%;">
                            <div style="width:11.5%;">预收款项</div>
                            <div style="width:11.5%;" class="advance_received">0</div>
                            <div style="width:11.5%;" class="advance_received">0</div>
                            <div style="width:11.5%;" class="advance_received">0</div>
                            <div style="width:11.5%;" class="advance_received">0</div>
                            <div style="width:11.5%;" class="advance_received">0</div>
                            <div style="width:11.5%;" class="advance_received">0</div>
                            <div style="width:11.5%;">
                                <input id="advance_received" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="advance_received_1"></span>
                            </div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row cl cl1" style="width:100%;">
                            <div style="width:11.5%;">应付职工薪酬</div>
                            <div style="width:11.5%;" class="payable_remuneration">0</div>
                            <div style="width:11.5%;" class="payable_remuneration">0</div>
                            <div style="width:11.5%;" class="payable_remuneration">0</div>
                            <div style="width:11.5%;" class="payable_remuneration">0</div>
                            <div style="width:11.5%;" class="payable_remuneration">0</div>
                            <div style="width:11.5%;" class="payable_remuneration">0</div>
                            <div style="width:11.5%;">
                                <input id="payable_remuneration" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="payable_remuneration_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('payable_remuneration');">更新</a></div>
                        </div>
                        <div class="item-row cl cl1" style="width:100%;">
                            <div style="width:11.5%;">应交税费</div>
                            <div style="width:11.5%;" class="taxes_payable">0</div>
                            <div style="width:11.5%;" class="taxes_payable">0</div>
                            <div style="width:11.5%;" class="taxes_payable">0</div>
                            <div style="width:11.5%;" class="taxes_payable">0</div>
                            <div style="width:11.5%;" class="taxes_payable">0</div>
                            <div style="width:11.5%;" class="taxes_payable">0</div>
                            <div style="width:11.5%;">
                                <input id="taxes_payable" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="taxes_payable_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('taxes_payable');">更新</a></div>
                        </div>
                        <div class="item-row cl cl1" style="width:100%;">
                            <div style="width:11.5%;">应付利息</div>
                            <div style="width:11.5%;" class="cl_payable_interest">0</div>
                            <div style="width:11.5%;" class="cl_payable_interest">0</div>
                            <div style="width:11.5%;" class="cl_payable_interest">0</div>
                            <div style="width:11.5%;" class="cl_payable_interest">0</div>
                            <div style="width:11.5%;" class="cl_payable_interest">0</div>
                            <div style="width:11.5%;" class="cl_payable_interest">0</div>
                            <div style="width:11.5%;">
                                <input id="cl_payable_interest" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="cl_payable_interest_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('cl_payable_interest');">更新</a></div>
                        </div>
                        <div class="item-row cl cl1" style="width:100%;">
                            <div style="width:11.5%;">应付股利</div>
                            <div style="width:11.5%;" class="cl_dividends_payable">0</div>
                            <div style="width:11.5%;" class="cl_dividends_payable">0</div>
                            <div style="width:11.5%;" class="cl_dividends_payable">0</div>
                            <div style="width:11.5%;" class="cl_dividends_payable">0</div>
                            <div style="width:11.5%;" class="cl_dividends_payable">0</div>
                            <div style="width:11.5%;" class="cl_dividends_payable">0</div>
                            <div style="width:11.5%;">
                                <input id="cl_dividends_payable" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="cl_dividends_payable_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('cl_dividends_payable');">更新</a></div>
                        </div>
                        <div class="item-row cl cl1" style="width:100%;">
                            <div style="width:11.5%;">其他应付款</div>
                            <div style="width:11.5%;" class="other_accounts_payable">0</div>
                            <div style="width:11.5%;" class="other_accounts_payable">0</div>
                            <div style="width:11.5%;" class="other_accounts_payable">0</div>
                            <div style="width:11.5%;" class="other_accounts_payable">0</div>
                            <div style="width:11.5%;" class="other_accounts_payable">0</div>
                            <div style="width:11.5%;" class="other_accounts_payable">0</div>
                            <div style="width:11.5%;">
                                <input id="other_accounts_payable" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="other_accounts_payable_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('other_accounts_payable');">更新</a></div>
                        </div>
                        <div class="item-row cl cl1" style="width:100%;">
                            <div style="width:11.5%;">一年内到期的非流动负债</div>
                            <div style="width:11.5%;" class="cl_oneyear_noncurrent_liabilities">0</div>
                            <div style="width:11.5%;" class="cl_oneyear_noncurrent_liabilities">0</div>
                            <div style="width:11.5%;" class="cl_oneyear_noncurrent_liabilities">0</div>
                            <div style="width:11.5%;" class="cl_oneyear_noncurrent_liabilities">0</div>
                            <div style="width:11.5%;" class="cl_oneyear_noncurrent_liabilities">0</div>
                            <div style="width:11.5%;" class="cl_oneyear_noncurrent_liabilities">0</div>
                            <div style="width:11.5%;">
                                <input id="cl_oneyear_noncurrent_liabilities" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="cl_oneyear_noncurrent_liabilities_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('cl_oneyear_noncurrent_liabilities');">更新</a></div>
                        </div>
                        <div class="item-row cl cl1" style="width:100%;">
                            <div style="width:11.5%;">其他流动负债</div>
                            <div style="width:11.5%;" class="cl_other_liabilities">0</div>
                            <div style="width:11.5%;" class="cl_other_liabilities">0</div>
                            <div style="width:11.5%;" class="cl_other_liabilities">0</div>
                            <div style="width:11.5%;" class="cl_other_liabilities">0</div>
                            <div style="width:11.5%;" class="cl_other_liabilities">0</div>
                            <div style="width:11.5%;" class="cl_other_liabilities">0</div>
                            <div style="width:11.5%;">
                                <input id="cl_other_liabilities" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="cl_other_liabilities_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('cl_other_liabilities');">更新</a></div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;font-weight:bold;" onclick="showitem('cl1', this,363,'ldfz');">
                                流动负债合计
                                <img src="@Url.Content("~/img/downicon.png")" style="width:10px;position:absolute;float:right;margin-top:10px;right:5px;" />
                            </div>
                            <div style="width:11.5%;" class="cl_count">0</div>
                            <div style="width:11.5%;" class="cl_count">0</div>
                            <div style="width:11.5%;" class="cl_count">0</div>
                            <div style="width:11.5%;" class="cl_count">0</div>
                            <div style="width:11.5%;" class="cl_count">0</div>
                            <div style="width:11.5%;" class="cl_count">0</div>
                            <div style="width:11.5%;">
                                <input id="cl_count" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="cl_count_1"></span>
                            </div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row cl cl2" style="width:100%;">
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:8%;"></div>
                        </div>


                        <div class="item-row cl cl2" style="width:100%;">
                            <div style="width:11.5%;">长期借款</div>
                            <div style="width:11.5%;" class="ncl_longterm_loan">0</div>
                            <div style="width:11.5%;" class="ncl_longterm_loan">0</div>
                            <div style="width:11.5%;" class="ncl_longterm_loan">0</div>
                            <div style="width:11.5%;" class="ncl_longterm_loan">0</div>
                            <div style="width:11.5%;" class="ncl_longterm_loan">0</div>
                            <div style="width:11.5%;" class="ncl_longterm_loan">0</div>
                            <div style="width:11.5%;">
                                <input id="ncl_longterm_loan" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="ncl_longterm_loan_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('ncl_longterm_loan');">更新</a></div>
                        </div>
                        <div class="item-row cl cl2" style="width:100%;">
                            <div style="width:11.5%;">预计负债</div>
                            <div style="width:11.5%;" class="ncl_anticipation_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_anticipation_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_anticipation_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_anticipation_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_anticipation_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_anticipation_liabilities">0</div>
                            <div style="width:11.5%;">
                                <input id="ncl_anticipation_liabilities" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="ncl_anticipation_liabilities_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('ncl_anticipation_liabilities');">更新</a></div>
                        </div>
                        <div class="item-row cl cl2" style="width:100%;">
                            <div style="width:11.5%;">递延所得税负债</div>
                            <div style="width:11.5%;" class="ncl_deferred_income_tax_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_deferred_income_tax_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_deferred_income_tax_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_deferred_income_tax_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_deferred_income_tax_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_deferred_income_tax_liabilities">0</div>
                            <div style="width:11.5%;">
                                <input id="ncl_deferred_income_tax_liabilities" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="ncl_deferred_income_tax_liabilities_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('ncl_deferred_income_tax_liabilities');">更新</a></div>
                        </div>
                        <div class="item-row cl cl2" style="width:100%;">
                            <div style="width:11.5%;">其他非流动负债</div>
                            <div style="width:11.5%;" class="ncl_other_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_other_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_other_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_other_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_other_liabilities">0</div>
                            <div style="width:11.5%;" class="ncl_other_liabilities">0</div>
                            <div style="width:11.5%;">
                                <input id="ncl_other_liabilities" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="ncl_other_liabilities_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('ncl_other_liabilities');">更新</a></div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;font-weight:bold;" onclick="showitem('cl2', this,198,'fldfz');">
                                非流动负债合计
                                <img src="@Url.Content("~/img/downicon.png")" style="width:10px;position:absolute;float:right;margin-top:10px;right:5px;" />
                            </div>
                            <div style="width:11.5%;" class="ncl_count">0</div>
                            <div style="width:11.5%;" class="ncl_count">0</div>
                            <div style="width:11.5%;" class="ncl_count">0</div>
                            <div style="width:11.5%;" class="ncl_count">0</div>
                            <div style="width:11.5%;" class="ncl_count">0</div>
                            <div style="width:11.5%;" class="ncl_count">0</div>
                            <div style="width:11.5%;">
                                <input id="ncl_count" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="ncl_count_1"></span>
                            </div>
                            <div style="width:8%;">@*<a class="btn btn-primary btn-xs" onclick="UpdateData('ncl_count');">更新</a>*@</div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;">负债合计</div>
                            <div style="width:11.5%;" class="count_liabilities">0</div>
                            <div style="width:11.5%;" class="count_liabilities">0</div>
                            <div style="width:11.5%;" class="count_liabilities">0</div>
                            <div style="width:11.5%;" class="count_liabilities">0</div>
                            <div style="width:11.5%;" class="count_liabilities">0</div>
                            <div style="width:11.5%;" class="count_liabilities">0</div>
                            <div style="width:11.5%;">
                                <input id="count_liabilities" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="count_liabilities_1"></span>
                            </div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:8%;"></div>
                        </div>

                        <div class="item-row oe oe1" style="width:100%;">
                            <div style="width:11.5%;">实收资本（或股本）</div>
                            <div style="width:11.5%;" class="oe_paicl_up_capital">0</div>
                            <div style="width:11.5%;" class="oe_paicl_up_capital">0</div>
                            <div style="width:11.5%;" class="oe_paicl_up_capital">0</div>
                            <div style="width:11.5%;" class="oe_paicl_up_capital">0</div>
                            <div style="width:11.5%;" class="oe_paicl_up_capital">0</div>
                            <div style="width:11.5%;" class="oe_paicl_up_capital">0</div>
                            <div style="width:11.5%;">
                                <input id="oe_paicl_up_capital" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="oe_paicl_up_capital_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('oe_paicl_up_capital');">更新</a></div>
                        </div>

                        <div class="item-row oe oe1" style="width:100%;">
                            <div style="width:11.5%;">资本公积</div>
                            <div style="width:11.5%;" class="oe_capital_reserve">0</div>
                            <div style="width:11.5%;" class="oe_capital_reserve">0</div>
                            <div style="width:11.5%;" class="oe_capital_reserve">0</div>
                            <div style="width:11.5%;" class="oe_capital_reserve">0</div>
                            <div style="width:11.5%;" class="oe_capital_reserve">0</div>
                            <div style="width:11.5%;" class="oe_capital_reserve">0</div>
                            <div style="width:11.5%;">
                                <input id="oe_capital_reserve" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="oe_capital_reserve_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('oe_capital_reserve');">更新</a></div>
                        </div>
                        
                        <div class="item-row oe oe1" style="width:100%;">
                            <div style="width:11.5%;">盈余公积</div>
                            <div style="width:11.5%;" class="oe_surplus_public_accumulation">0</div>
                            <div style="width:11.5%;" class="oe_surplus_public_accumulation">0</div>
                            <div style="width:11.5%;" class="oe_surplus_public_accumulation">0</div>
                            <div style="width:11.5%;" class="oe_surplus_public_accumulation">0</div>
                            <div style="width:11.5%;" class="oe_surplus_public_accumulation">0</div>
                            <div style="width:11.5%;" class="oe_surplus_public_accumulation">0</div>
                            <div style="width:11.5%;">
                                <input id="oe_surplus_public_accumulation" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="oe_surplus_public_accumulation_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('oe_surplus_public_accumulation');">更新</a></div>
                        </div>
                        <div class="item-row oe oe1" style="width:100%;">
                            <div style="width:11.5%;">未分配利润</div>
                            <div style="width:11.5%;" class="oe_undistributed_profit">0</div>
                            <div style="width:11.5%;" class="oe_undistributed_profit">0</div>
                            <div style="width:11.5%;" class="oe_undistributed_profit">0</div>
                            <div style="width:11.5%;" class="oe_undistributed_profit">0</div>
                            <div style="width:11.5%;" class="oe_undistributed_profit">0</div>
                            <div style="width:11.5%;" class="oe_undistributed_profit">0</div>
                            <div style="width:11.5%;">
                                <input id="oe_undistributed_profit" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="oe_undistributed_profit_1"></span>
                            </div>
                            <div style="width:8%;"><a class="btn btn-primary btn-xs" onclick="UpdateData('oe_undistributed_profit');">更新</a></div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;font-weight:bold;" onclick="showitem('oe1', this,165,'syzqy');" title="所有者权益（或股东权益）合计">
                                所有者权益（或股东权益）合计
                                <img src="@Url.Content("~/img/downicon.png")" style="width:10px;position:absolute;float:right;margin-top:10px;right:5px;" />
                            </div>
                            <div style="width:11.5%;" class="oe_count">0</div>
                            <div style="width:11.5%;" class="oe_count">0</div>
                            <div style="width:11.5%;" class="oe_count">0</div>
                            <div style="width:11.5%;" class="oe_count">0</div>
                            <div style="width:11.5%;" class="oe_count">0</div>
                            <div style="width:11.5%;" class="oe_count">0</div>
                            <div style="width:11.5%;">
                                <input id="oe_count" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="oe_count_1"></span>
                            </div>
                            <div style="width:8%;">@*<a class="btn btn-primary btn-xs" onclick="UpdateData('oe_count');">更新</a>*@</div>
                        </div>
                        <div class="item-row oe" style="width:100%;">
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:11.5%;"></div>
                            <div style="width:8%;"></div>
                        </div>
                        <div class="item-row" style="width:100%;">
                            <div style="width:11.5%;" title="负债和所有者权益（或股东权益）总计">负债和所有者权益（或股东权益）总计</div>
                            <div style="width:11.5%;" class="count_liabilities_and_oe">0</div>
                            <div style="width:11.5%;" class="count_liabilities_and_oe">0</div>
                            <div style="width:11.5%;" class="count_liabilities_and_oe">0</div>
                            <div style="width:11.5%;" class="count_liabilities_and_oe">0</div>
                            <div style="width:11.5%;" class="count_liabilities_and_oe">0</div>
                            <div style="width:11.5%;" class="count_liabilities_and_oe">0</div>
                            <div style="width:11.5%;">
                                <input id="count_liabilities_and_oe" class="txtinput" type="number" value="0" style="width:110px;height:24px;line-height:24px;" />
                                <span id="count_liabilities_and_oe_1"></span>
                            </div>
                            <div style="width:8%;">@*<a class="btn btn-primary btn-xs" onclick="UpdateData('count_liabilities_and_oe');">更新</a>*@</div>
                        </div>
                    </div>
                </div>
            </div>
            <div style="clear:both"></div>
        </div>
    </div>
</div>

@section css{
    <style>
        .contain div {
            position: relative;
            float: left;
            text-align: center;
        }

        .item-row {
            border-bottom: solid 1px #eee;
            border-right: solid 1px #eee;
        }

            .item-row:hover {
                background-color: #eee;
            }

            .item-row div {
                cursor: pointer;
            }

            .item-col, .item-row div {
                /*margin: -1px;
            border: solid 1px #eee;
            border-right-width: 0px;*/
                height: 32px;
                line-height: 32px;
                border-right: solid 1px #eee;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

        .second-row div {
            border-left-width: 0px;
        }
    </style>
}

@section scripts{
    <script src="@Url.Content("~/css/select2/select2.min.js")"></script>
    <script src="@Url.Content("~/css/chosen_v1.6.2/chosen.jquery.min.js")"></script>
    <script type="text/javascript">
        var tb;
        var _data=[];

        $(document).ready(function () {
            //计算表格高度
            var height = document.body.clientHeight;
            $("#roletable").attr("data-height", (height - 149));
            laydate.render({ elem: '#day' });
            init();
            //list();

            $('#timetype').change(function () {
                if ($('#timetype').val() == 1) {
                    $('#day').show();
                }
                else {
                    $('#day').hide();
                }
            })

        })

        function init() {

            //异步加载条件的数据
            //syncListData();

            $(".item-row div").click(function () {
                if ($('#chk_showdetail').is(":checked")) {
                    ShowDetail(this);
                }
            })

            $('.fa1').hide();
            $('.fa2').hide();
            $('.cl1').hide();
            $('.cl2').hide();
            $('.oe1').hide();

            GetData();

        }

        function GetData() {
            var type = $('#timetype').val();
            var day = $('#day').val();
            var paycompany = $('#sel_paycompany').val();

            if (type == '') {
                alert('请选择类型');
                return false;
            }

            if (day == '') {
                alert('请选择日期');
                return false;
            }

            if (paycompany == '') {
                alert('请选择付款主体');
                return false;
            }


            $.submit({
                url: '@Url.Content("~/Reports/Finance/BalanceSheetNewJson")',
                type: "POST",
                paramData: 'type=' + type + '&day=' + day + '&paycompanyvalue=' + paycompany,
                func: function (result) {
                    if (result.success) {
                        var list = result.data;

                        _data = [];

                        var obj = list[list.length - 1];
                        var day = obj.statistical_time.replace('T', ' ').replace('00:00:00', '');
                        $('#c6').html(day);

                        //设置文本框的值
                        for (var key in obj) {
                            $('.'+key).css('background', '#fff');
                            $('.'+key).css('color', '#000');

                            //如果是月或者周，不显示文本框
                            if (type == 2 || type == 3) {
                                $('#' + key).hide();
                                $('#' + key).parent().addClass(key);
                                $('#' + key + '_1').show();
                                $('#' + key + '_1').html(numFormat(obj[key]));
                            }
                            else {
                                $('#' + key).val(obj[key]);
                                $('#' + key).attr('dd', day);
                                $('#' + key).show();
                                $('#' + key + '_1').hide();
                                $('#' + key).parent().removeClass(key);
                            }
                            //$('#' + key).val(obj[key]);

                        }

                        for (var i = 0; i < list.length; i++) {
                            _data.push(list[i]);

                            var obj = list[i];
                            var day = obj.statistical_time.replace('T', ' ').replace('00:00:00', '');
                            $('#c' + (i)).html(day);
                            for (var key in obj) {

                                $('.' + key).each(function (j) {
                                    if (j == i) {
                                        $(this).attr('title', day);

                                        if (i < list.length - 1) {
                                            $(this).html(numFormat(obj[key]));
                                        }

                                        if (obj["ismark"] == 1) {
                                            $(this).css('background', '#00A45F');
                                            $(this).css('color', '#fff');
                                        }
                                        else if (obj["ismark"] == 2) {
                                            $(this).css('background', '#0299A4');
                                            $(this).css('color', '#fff');
                                        }
                                        else {
                                            $(this).css('background', '#fff');
                                            $(this).css('color', '#000');
                                        }
                                    }
                                });
                            }

                        }

                        if (result.isexport == 1) {
                            $('#btnexport').show();
                        }
                    }
                    else {
                        alert(result.msg);
                    }
                }
            })
        }

        function UpdateData(c) {
            var val = $('#' + c).val();
            if (val == '') {
                alert('请填写正确的数字。');
                return false;
            }

            var id = $('#id').val();
            if (id == ''||id=='0') {
                alert('id不能为0。');
                return false;
            }

            var day = $('#' + c).attr('dd');

            $.submit({
                url: 'http://api.dcjava.bailuntec.com/balanceSheetModify/record',
                paramData: '{"statistical_time":"' + day + '","' + c + '":' + val + ',"company_value":0,"company_name":"百伦供应链"}',
                contenttype: 'application/json',
                type: 'POST',
                func: function (result) {
                    if (result.success) {
                        layer.msg('提交成功');
                        setTimeout(function () {
                            GetData();
                        }, 1.5 * 1000);
                    }
                    else {
                        layer.msg(result.msg);
                    }
                }
            })

        }


        function ShowDetail(d) {
            var c = $(d).attr('class');
            var title = $(d).attr('title');
            var paycompany = $('#sel_paycompany').val();
            switch (c) {
                case 'monetary_fund':
                    showdetail(title + ' 货币资金明细', '@Url.Content("~/Reports/Finance/MonetaryFund?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'inventory_amount':
                    showdetail(title + ' 存货明细', '@Url.Content("~/Reports/Finance/InventoryBalanceCount?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'short_term_borrow':
                    showdetail(title + ' 短期借款明细', '@Url.Content("~/Reports/Finance/ShortBorrow?date=")' + title + '&paycompanyid=' + paycompany); //ShortBorrow
                    return false;
                case 'prepayment':
                    showdetail(title + ' 预付帐款明细', '@Url.Content("~/Reports/Finance/PrePayCount?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'accounts_payable':
                    showdetail(title + ' 应付帐款明细', '@Url.Content("~/Reports/Finance/CopeWithCount?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'other_accounts_receivable':
                    @*showdetail(title + ' 其他应收款明细', '@Url.Content("~/Reports/Finance/OtherReceivable?date=")' + title + '&paycompanyid=' + paycompany);*@
                    showdetail(title + ' 其他应收款明细', '@Url.Content("~/Reports/Finance/OtherReceivableCount?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'other_accounts_payable':
                    @*showdetail(title + ' 其他应付款明细', '@Url.Content("~/Reports/Finance/OtherPayable?date=")' + title + '&paycompanyid=' + paycompany);*@
                    showdetail(title + ' 其他应付款明细', '@Url.Content("~/Reports/Finance/BalanceSheetSubDetail?type=other_accounts_payable")&day=' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'fixed_assets':
                    @*showdetail(title + ' 固定资产明细', '@Url.Content("~/Reports/Finance/ListFixedAssets?date=")' + title + '&paycompanyid=' + paycompany);*@
                    showdetail(title + ' 固定资产明细', '@Url.Content("~/Reports/Finance/BalanceSheetSubDetail?type=fixed_assets")&day=' + title + '&paycompanyid=' + paycompany);
                    return false;

                case 'withdraw_amount':
                    showdetail(title + ' 平台提现在途明细', '@Url.Content("~/Reports/Finance/WithDrawOnWay?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'platform_balance':
                    showdetail(title + ' 第三方平台余额明细', '@Url.Content("~/Reports/Finance/PlatformBalance?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'bank_account_balance':
                    showdetail(title + ' 主体银行明细', '@Url.Content("~/Reports/Finance/BankBalance?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'finished_prepayment':
                    showdetail(title + ' 成品供应商预付款', '@Url.Content("~/Reports/Finance/PrePay?finish=1&date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'semi_prepayment':
                    showdetail(title + ' 半成品供应商预付款', '@Url.Content("~/Reports/Finance/PrePay?finish=0&date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'logistics_prepayment':
                    showdetail(title + ' 物流供应商预付款', '@Url.Content("~/Reports/Finance/PrePayLogistics?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'fba_inventory_amount':
                    showdetail(title + ' FBA仓在库明细', '@Url.Content("~/Reports/Finance/InventoryBalance?t=0&date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'not_fba_inventory_amount':
                    showdetail(title + ' 非FBA在库明细', '@Url.Content("~/Reports/Finance/InventoryBalance?t=1&date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'fba_transfer_amount':
                    showdetail(title + ' FBA仓在途明细', '@Url.Content("~/Reports/Finance/InventoryBalance?t=3&date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'not_fba_transfer_amount':
                    showdetail(title + ' 非FBA在途明细', '@Url.Content("~/Reports/Finance/InventoryBalance?t=4&date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'semi_inventory_amount':
                    showdetail(title + ' 半成品在库明细', '@Url.Content("~/Reports/Finance/SemiFinishStock?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'finished_accounts_payable':
                    showdetail(title + ' 成品供应商应付款', '@Url.Content("~/Reports/Finance/CopeWith?finish=1&date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'semi_accounts_payable':
                    showdetail(title + ' 半成品供应商应付款', '@Url.Content("~/Reports/Finance/CopeWith?finish=0&date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'logistics_accounts_payable':
                    //showdetail(title + ' 物流供应商应付款', '@Url.Content("~/Reports/Finance/CopeWithLogistics?date=")' + title + '&paycompanyid=' + paycompany);
                    showdetail(title + ' 物流供应商应付款', '@Url.Content("~/Reports/Finance/LogisticWaitPayDetail?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'semi_transfer_amount':
                    showdetail(title + '半成品在途明细', '@Url.Content("~/Reports/Finance/SemiTransferStock?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'amount_borrowed':
                    showdetail(title + '借支金额明细', '@Url.Content("~/Reports/Finance/ListBorrowAmount?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'accounts_receivable':
                    showdetail(title + '应收帐款明细', '@Url.Content("~/Reports/Finance/ReceivablesCount?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'nca_deferred_tax_assets':
                    showdetail(title + ' 递延所得税资产', '@Url.Content("~/Reports/Finance/BalanceSheetSubDetail?type=nca_deferred_tax_assets")&day=' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'semi_prod_inventory_amount':
                    showdetail(title + ' 生产库存', '@Url.Content("~/Reports/Finance/SemiProductionStock?type=semi_prod_inventory_amount")&date=' + title + '&paycompanyid=' + paycompany);
                    return false;
                case 'purchase_pro_amount':
                    showdetail(title + ' 自产采购发货在途', '@Url.Content("~/Reports/Finance/ListSelfProductShippingOnway?date=")' + title + '&paycompanyid=' + paycompany);
                    return false;
            }

            return false;
        }

        function showdetail(title,url)
        {
            layer_show(title,url, '90%','90%');
        }

        function numFormat(num) {
            var res = num.toString().replace(/\d+/, function (n) { // 先提取整数部分
                return n.replace(/(\d)(?=(\d{3})+$)/g, function ($1) {
                    return $1 + ",";
                });
            })
            return res;
        }

        function showitem(c, data, h,i) {
            var t = $(data).attr('val');
            if (t != 1) {
                $(data).attr('val', 1);
                $('.' + c).show();

                $('#' + i).css('height', h + 'px').css('line-height', h + 'px');

                $(data).find('img').attr('src', '@Url.Content("~/img/upicon.png")');

            }
            else {
                $(data).attr('val', 0);
                $('.' + c).hide();

                $('#' + i).css('height', '33px').css('line-height', '33px');
                $(data).find('img').attr('src', '@Url.Content("~/img/downicon.png")');
            }

            var zch = 0,fzh=0;
            $('.zc').each(function () {
                zch += parseInt($(this).height());
            })

            $('.fz').each(function () {
                fzh += parseInt($(this).height());
            })

            $('#zc').css('height', (zch+4) + 'px').css('line-height', (zch+4) + 'px');
            $('#fz').css('height', (fzh + 8) + 'px').css('line-height', (fzh + 8) + 'px');

        }

        function ExportXsl() {
            var type = $('#timetype').val();
            var day = $('#day').val();
            var paycompany = $('#sel_paycompany').val();

            window.open('@Url.Content("~/Reports/Finance/ExportBalanceSheetNew?")' + 'type=' + type + '&paycompanyvalue=' + paycompany+'&day='+day, '_blank');
        }

        function showchart() {
            layer_show('资产负债表环比图', '@Url.Content("~/Reports/Finance/Index2Chart")', '90%', '90%');
        }

        function showtask() {
            layer_show('任务运行情况', '@Url.Content("~/Reports/Finance/BalanceSheetTask")', '90%', '90%');
        }

    </script>
}



