<div ms-controller="Accounting" style="width: 100%; margin: 0 auto">
    <table style="width: 100%" border="0" cellpadding="0" cellspacing="0" ms-attr-id="showOnlyList?'noright':'nobgmian'">
        <tbody>
            <tr>
                <td width="215" id="assets" valign="top" ms-if="!showOnlyList">
                    <div class="boxTitlenoneb">
                        <div class="cw_menu">
                            <div class="title">
                                <a href="javascript:void(0)">
                                    <img src="/Content/Themes/Base/images/set.jpg" alt="管理资产账户分类" title="管理资产账户分类" data-width="300" data-treeheight="350">
                                </a>资产帐户
                            </div>
                            <span class="cw_money cw_zzc">总资产：<font style="font-size: 14px; font-family: Georgia; padding-right: 4px; color: green;" ms-attr-title="account.total">{{account.total|bigNumber}}</font></span>
                            <span class="cw_money cw_zfz">总负债：<font style="font-size: 14px; font-family: Georgia; padding-right: 4px; color: red;" ms-attr-title="account.betray">{{account.betray|bigNumber}}</font></span>
                            <span class="cw_money cw_jzc">净资产：<font style="font-size: 14px; font-family: Georgia; padding-right: 4px; color: green;" ms-attr-title="account.ramain">{{account.ramain|bigNumber}}</font></span>
                            <ul class="cw_menu_ul" ms-each-item="accountList">
                                <li ms-class-current="!item.open" ms-click="item.change" ms-attr-index="$index">
                                    <a href="javascript:void(0)">{{item.title}}</a>
                                    <ul ms-if="item.open">
                                        <li ms-repeat-child="item.items"><a>{{child.AccountName}}<span ms-attr-title="child.Balance">{{child.Balance|bigNumber}}</span></a></li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                    </div>
                </td>
                <td valign="top" width="20px" ms-visible="!showOnlyList">&nbsp;</td>
                <td valign="top" ms-if="!showOnlyList">
                    <div class="boxTitle" style="margin-bottom: 10px;" ms-visible="!showOnlyList">
                        <h2>分类检索</h2>
                        <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="seacrhTable top10" style="background: none;">
                            <tbody>
                                <tr>
                                    <td width="460" class="searchico">
                                        <div class="input-append" style="margin-bottom: 0px;">
                                            <input id="keyInput" type="text" class="span4" ms-duplex="queryData.keyword.val" placeholder="输入客户名称或收支项目或产品名称快速检索" ms-enter="addQuery('keyword',queryData.keyword.val,queryData.keyword.val,false,true)">
                                            <button class="add-on ibtsearch" type="button" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click="grid1.doSearch">搜索</button>
                                            <button class="add-on ibtsearch clearall" type="button" style="height: 28px; font-size: 12px; padding: 3px 12px;" ms-click="clearQuery">显示全部</button>
                                        </div>
                                    </td>
                                    <td class="fgray">
                                        <!--{{lang.SearchHistory}}
                                   <span class="bindSearchHistory" ms-repeat-h='queryHistory'>
                                       <a href="javascript:void(0)" ms-click='addQuery(h.name,h.val,h.label)' ms-title='h.label'>{{h.label|truncate(20)}}</a>
                                   </span>-->
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="seacrhField">
                            <tbody>
                                <tr ms-class="quickword {{$val.hide?'hide':''}}" ms-repeat="queryData" ms-if-loop="$val.items && !$val.jump">
                                    <td ms-attr-colspan="$val.next?1:2" ms-width="$val.next?'50%':'100%'">
                                        <span>{{$val.label}}</span>
                                        <div style="display: inline;" ms-each-r='$val.items'>
                                            <a href="javascript:void(0)" ms-if="!r.type" ms-click='addQuery($key, r.val, r.label)' ms-class-selected="r.curr" ms-html='r.label'></a>
                                            <a href="javascript:void(0)" ms-if="r.type=='selectUser'" ms-click="selectUser($key,r)" ms-class-selected="r.curr" ms-html='r.label'></a>
                                            <a href="javascript:void(0)" ms-if="r.type=='date'" ms-click='addQuery($key, r.val, r.label)' ms-class-selected="r.curr" ms-html='r.label'></a>
                                            <div ms-if="r.type=='date'" ms-visible="queryData[$key].val==r.val">
                                                <input type="text" ms-duplex="queryData[r.d1].val" ms-widget="date" ms-attr-data-format="r.format" style="width: 80px; height: 15px; margin-left: 10px;" readonly="readonly" />
                                                <label ms-if="r.d2" style="margin-left: -15px;">至</label>
                                                <input ms-if="r.d2" type="text" ms-duplex="queryData[r.d2].val" ms-widget="date" ms-attr-data-format="r.format" style="width: 80px; height: 15px;" readonly="readonly" />
                                            </div>
                                        </div>
                                    </td>
                                    <td ms-if="$val.next" width="50%">
                                        <span>{{queryData[$val.next].label}}</span>
                                        <div style="display: inline;">
                                            <a ms-repeat-r="queryData[$val.next].items" href="javascript:void(0)" ms-click='addQuery($val.next, r.val, r.label)' ms-class-selected="r.curr" ms-html='r.label'></a>
                                        </div>
                                    </td>
                                </tr>
                                <tr ms-if="queryMore">
                                    <td colspan="2">
                                        <ul class="quickwordul">
                                            <li>
                                                <div class="quickwordmore" isshow="flase" onclick="quickwordShow()">更多选项<span class="quickdown"></span></div>
                                            </li>
                                        </ul>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" class="seabox">
                                        <span class="first" ms-html='lang.CurrSearchCondition'></span>
                                        <div style="display: inline; float: left;" ms-repeat="queryData">
                                            <span class="searchItem" ms-if-loop='$val.valLabel'>{{$val.valLabel}}
                                        <i><a href="javascript:void(0)" ms-click='removeQuery($key)'></a></i>
                                            </span>
                                        </div>
                                        <span class="last" ms-visible='hasQuery' ms-click='clearQuery'><a href="javascript:void(0)" ms-html='lang.ClearAll'></a></span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList" id="tableList">
                        <thead>
                            <tr class="dobtn" style="background-color: rgba(0, 0, 0, 0);">
                                <td colspan="12" bgcolor="#FFFFFF">
                                    <a href="javascript:void(0);" class="doadd2" ms-click="doadd" tag="in" title="收入" ms-if="ADD" ms-mouseover="showAddList" ms-mouseout="showAddList">收入</a>
                                    <a href="javascript:void(0);" class="doadd2" ms-click="doaddPay" tag="in" title="支出" ms-if="ADD" ms-mouseover="showAddList2" ms-mouseout="showAddList2">支出</a>
                                    <a href="javascript:void(0);" class="doadd" ms-click="tagChange" tag="tr" title="转账" ms-if="ADD">转账</a>
                                    <a href="javascript:void(0)" class="doalldel" ms-click="grid1.removeAll()" ms-if="DELETE">批量删除</a>
                                    <div ms-visible="IsShowAddList && ADD" style="position: relative; top: 0px; left: 0px;" ms-mouseover="showAddList" ms-mouseout="showAddList">
                                        <ul class="addlist">
                                            <li><a style="margin-left: 0;" href="javascript:void(0)" ms-click="doadd">收款明细</a></li>
                                            <li><a style="margin-left: 0;" href="javascript:void(0)" ms-click="doaddReceipts">收款单</a></li>
                                        </ul>
                                    </div>
                                    <div ms-visible="IsShowAddList2 && ADD" style="position: relative; left: 95px;" ms-mouseover="showAddList2" ms-mouseout="showAddList2">
                                        <ul class="addlist">
                                            <li><a style="margin-left: 0;" href="javascript:void(0)" ms-click="doaddPay">支出明细</a></li>
                                            <li><a style="margin-left: 0;" href="javascript:void(0)" ms-click="doaddPayBill">支出单</a></li>
                                        </ul>
                                    </div>
                                </td>
                            </tr>
                            <tr class="head" style="background-color: rgba(0, 0, 0, 0);">
                                <td width="3%" align="center">
                                    <input type="checkbox" ms-duplex-radio="grid1.checkall"></td>
                                <td width="4%" align="center">编号</td>
                                <td width="15%" align="center">客户</td>
                                <td width="4%" align="center">类别</td>
                                <td width="10%" align="center">收支单号</td>
                                <td width="10%" align="center">收支项目</td>
                                <td width="10%" align="center">收支帐户</td>
                                <td width="10%" align="center">产品名称</td>
                                <td width="10%" align="center">产品别名</td>
                                <td width="10%" align="center">金额</td>
                                <td width="10%" align="center">时间</td>
                                <td width="10%" align="center">操作</td>
                            </tr>
                        </thead>
                        <tbody>
                            <tr style="background-color: #fff;" ms-repeat-item="grid1.list">
                                <td align="center">
                                    <input type="checkbox" ms-duplex-radio="item.checked"></td>
                                <td align="center">{{item.No}}</td>
                                <td align="left"><a href="javascript:void(0)" ms-click="gotoview(item.CustomId)">{{item.CustomName|truncate(20,'')}}</a></td>
                                <td align="center"><span ms-if="item.IsTransfer == 0">{{item.Category}}</span> <span ms-if="item.IsTransfer == 1">{{item.Category == '收入'?'转入':'转出'}}</span></td>
                                <td align="center"><a href="javascript:void(0);" ms-click="doviewReceipts(item.ReceiptBill)">{{item.ReceiptBillDisplay}}</a> </td>
                                <td align="center">{{item.ProjectName}}</td>
                                <td align="center">{{item.AccountDisplay}}</td>
                                <td align="center">{{item.ProductDisplay|truncate(26,'...')}}</td>
                                <td align="center">{{item.ProductAlias}}</td>
                                <td align="center" ms-title="'单价'+item.ProductPrice+' x 数量'+ item.ProductNum +'=' + item.Amount">
                                    <span style="color: green" ms-if="item.Category == '收入'">{{item.Amount}}</span>
                                    <span style="color: red" ms-if="item.Category == '支出'">{{item.Amount}}</span>
                                </td>
                                <td align="center">{{item.ReceiptDate}}</td>
                                <td align="left">
                                    <a title="查看" href="javascript:void(0);" class="doview" ms-click="doview(item.IsTransfer==0 ? item.Id : (item.Category=='支出'?item.Ids.split(',')[1]:item.Id))"></a>
                                    <a title="修改" href="javascript:void(0);" ms-if="item.EDIT" class="doedit" ms-click="doedit(item.ReceiptBill,item.ReceiptBillDisplay)" ms-attr-val="item.IsTransfer==0 ? item.Id : (item.Category=='支出'?item.Ids.split(',')[1]:item.Id)"></a>
                                    <a href="javascript:void(0);" ms-if="!item.EDIT" title="非常抱歉，您没有编辑的权限" class="noedit"></a>
                                    <a title="删除" href="javascript:void(0)" ms-visible="isDeletable(item.ReceiptBillDisplay)" ms-if="item.DELETE" class="dodel" ms-click="grid1.remove(item,$index)"></a>
                                    <a href="javascript:void(0);" ms-if="!item.DELETE" title="非常抱歉，您没有删除的权限" class="nodelete"></a>
                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr ms-if="grid1.gridmsg">
                                <td colspan="12" class="gridmsg">{{grid1.gridmsg|html}}</td>
                            </tr>
                            <tr style="background: #fff;">
                                <td colspan="9" align="right">合计：
                                </td>
                                <td colspan="3">
                                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                        <tr style="background: #fff;">
                                            <td width="30%" align="center">{{totalmoney}}</td>
                                            <td width="30%">&nbsp;</td>
                                            <td width="40%">&nbsp;</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="12" ms-widget='paging' data-gridid="grid1"></td>
                            </tr>
                        </tfoot>
                    </table>
                </td>
                <td valign="top" ms-if="showOnlyList">
                    <div id="viewDiv">
                        <div>
                            <ul class="tabWarp">
                                <li ms-class-hover="tab=='tab1'" ms-class-normal="tab!='tab1'" val="tab1" ms-click="tabChange">流水明细</li>
                                <li ms-class-hover="tab=='tab2'" ms-class-normal="tab!='tab2'" val="tab2" ms-click="tabChange">收款单</li>
                            </ul>
                        </div>
                        <div class="tabContent" ms-if="tab=='tab1'">
                            <table width="98%" style="margin: 0 10px;" border="0" cellspacing="1" cellpadding="0" class="tableList" id="table1">

                                <tr class="dobtn" style="background-color: rgba(0, 0, 0, 0);">
                                    <td colspan="11" bgcolor="#FFFFFF">
                                        <a href="javascript:void(0);" class="doadd" ms-click="doadd" title="收入" ms-if="ADD">收入</a>
                                        <a href="javascript:void(0);" class="doadd" ms-click="doaddPay" title="支出" ms-if="ADD">支出</a>
                                        <a href="javascript:void(0)" class="doalldel" ms-click="grid1.removeAll()" ms-if="DELETE">批量删除</a>
                                    </td>
                                </tr>
                                <tr class="head" style="background-color: rgba(0, 0, 0, 0);">
                                    <td width="4%" align="center">
                                        <input type="checkbox"  ms-duplex-radio="grid1.checkall"></td>
                                    <td width="4%" align="center">编号</td>
                                    <td width="4%" align="center">类别</td>
                                    <td width="10%" align="center">收支单号</td>
                                    <td width="10%" align="center">收支项目</td>
                                    <td width="10%" align="center">收支帐户</td>
                                    <td width="10%" align="center">产品名称</td>
                                    <td width="10%" align="center">产品别名</td>
                                    <td width="10%" align="center">金额</td>
                                    <td width="10%" align="center">时间</td>
                                    <td width="10%" align="center">操作</td>
                                </tr>
                                <tr ms-repeat-item="grid1.list" style="background-color: rgb(255, 255, 255);">
                                    <td align="center">
                                        <input ms-duplex-radio="item.checked" type="checkbox" name="checkbox" ms-value="{{item.Id}}"></td>
                                    <td align="center">{{item.No}}</td>
                                    <td align="center"><span ms-if="item.IsTransfer == 0">{{item.Category}}</span> <span ms-if="item.IsTransfer == 1">{{item.Category == '收入'?'转入':'转出'}}</span></td>
                                    <!-- <td align="center"><a href="javascript:void(0);" ms-click="doviewReceipts" ms-attr-val="item.ReceiptBill">{{item.ReceiptBillDisplay}}</a> </td>-->
                                    <td align="center"><a href="javascript:void(0);" ms-click="doviewReceipts(item.ReceiptBill)">{{item.ReceiptBillDisplay}}</a> </td>
                                    <td align="center">{{item.ProjectName}}</td>
                                    <td align="center">{{item.AccountDisplay}}</td>
                                    <td align="center">{{item.ProductDisplay|truncate(26,'...')}}</td>
                                    <td align="center">{{item.ProductAlias}}</td>
                                    <td align="center" ms-title="'单价'+item.ProductPrice+' x 数量'+ item.ProductNum +'=' + item.Amount">
                                        <span style="color: green" ms-if="item.Category == '收入'">{{item.Amount}}</span>
                                        <span style="color: red" ms-if="item.Category == '支出'">{{item.Amount}}</span>
                                    </td>
                                    <td align="center">{{item.ReceiptDate}}</td>
                                    <td align="center">
                                        <a title="查看" href="javascript:void(0);" class="doview" ms-click="doview(item.IsTransfer==0 ? item.Id : (item.Category=='支出'?item.Ids.split(',')[1]:item.Id))"></a>
                                        <a title="修改" href="javascript:void(0);" ms-if="item.EDIT" class="doedit" ms-click="doedit" ms-attr-val="item.IsTransfer==0 ? item.Id : (item.Category=='支出'?item.Ids.split(',')[1]:item.Id)"></a>
                                        <a href="javascript:void(0);" ms-if="!item.EDIT" title="非常抱歉，您没有编辑的权限" class="noedit"></a>
                                        <a title="删除" href="javascript:void(0)" ms-if="item.DELETE" class="dodel" ms-click="grid1.remove(item,$index)"></a>
                                        <a href="javascript:void(0);" ms-if="!item.DELETE" title="非常抱歉，您没有删除的权限" class="nodelete"></a>
                                    </td>
                                </tr>
                                <tr ms-if="grid1.gridmsg">
                                    <td colspan="11" class="gridmsg">{{grid1.gridmsg|html}}</td>
                                </tr>
                                <tr style="background: #fff;">
                                    <td colspan="8" align="right">合计：
                                    </td>
                                    <td colspan="3">
                                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                            <tr style="background: #fff;">
                                                <td width="30%" align="center">{{totalmoney}}</td>
                                                <td width="30%">&nbsp;</td>
                                                <td width="40%">&nbsp;</td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="11" ms-widget='paging' data-gridid="grid1"></td>
                                </tr>
                            </table>
                        </div>
                        <div class="tabContent" ms-if="tab=='tab2'">
                            <table width="98%" style="margin: 0 10px;" border="0" cellspacing="1" cellpadding="0" class="tableList" id="table2">

                                <tr class="dobtn" style="background-color: rgba(0, 0, 0, 0);">
                                    <td colspan="9" bgcolor="#FFFFFF">
                                        <a href="javascript:void(0);" class="doadd" ms-click="doaddReceipts" title="新增" ms-if="RECEIPTSADD">新增</a>
                                        <a href="javascript:void(0)" class="doalldel" ms-click="doAllDelReceipts" ms-if="RECEIPTSDELETE">批量删除</a>
                                    </td>
                                </tr>
                                <tr class="head" style="background-color: rgba(0, 0, 0, 0);">
                                    <td width="3%" align="center">
                                        <input type="checkbox" class="checkAll"></td>
                                    <td width="10%" align="center">收款单号</td>
                                    <td width="10%" align="center">合同订单</td>
                                    <td width="10%" align="center">收款金额</td>
                                    <td width="10%" align="center">业务员</td>
                                    <td width="8%" align="center">收款人</td>
                                    <td width="8%" align="center">收款时间</td>
                                    <td width="10%" align="center">备注</td>
                                    <td width="6%" align="center">操作</td>
                                </tr>
                                <tr ms-repeat-item="receiptList" style="background-color: rgb(255, 255, 255);">
                                    <td align="center">
                                        <input type="checkbox" name="checkbox" ms-value="item.Id"></td>
                                    <td align="center"><a href="javascript:void(0);" ms-click="doviewReceipts(item.Id)">{{item.No}}</a> </td>
                                    <!-- <td align="center"><a href="javascript:void(0);" ms-click="doviewReceipts" ms-attr-val="item.Id">{{item.No}}</a></td>-->
                                    <td align="center"><a ms-href="'#/Market/Contract/'+item.Contract+'/view'">{{item.ContractNum}}</a></td>
                                    <td align="center">{{item.Amount}}</td>
                                    <td align="center">{{item.Salesman}}</td>
                                    <td align="center">{{item.Receiptman}}</td>
                                    <td align="center">{{item.Receiptdate}}</td>
                                    <td align="center">{{item.Remark | truncate(16,'...')}}</td>
                                    <td align="center">
                                        <a title="查看收款单" href="javascript:void(0);" class="doview" ms-click="doviewReceipts(item.Id)" ms-attr-val="item.Id"></a>
                                        <a title="修改" href="javascript:void(0);" ms-if="item.RECEIPTSEDIT" class="doedit" ms-click="doeditReceipts(item.Id)" ms-attr-val="item.Id"></a>
                                        <a href="javascript:void(0);" ms-if="!item.RECEIPTSEDIT" title="非常抱歉，您没有编辑的权限" class="noedit"></a>
                                        <a title="删除" href="javascript:void(0)" ms-if="item.RECEIPTSELETE" class="dodel" ms-attr-index="$index" ms-attr-val="item.Id" ms-click="doDelReceipts"></a>
                                        <a href="javascript:void(0);" ms-if="!item.RECEIPTSELETE" title="非常抱歉，您没有删除的权限" class="nodelete"></a>
                                    </td>
                                </tr>
                                <tr style="background: #fff;">
                                    <td colspan="3" align="right">合计：
                                    </td>
                                    <td colspan="6">
                                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                            <tr style="background: #fff;">
                                                <td width="16%" align="center">{{totalrptmoney}}</td>
                                                <td width="84%" colspan="5">&nbsp;</td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="9" ms-widget='paging,receiptpaging,receiptpaging'></td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>

    <!---新增转账--->
    <noscript id="PayOutMoney">
        <div class="tabContent2">
            <table border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100%;">
                <tbody>
                    <tr>
                        <td width="90">转出账户：</td>
                        <td width="300">
                            <input type="text" readonly="readonly" ms-duplex="accounting.OutAccountName" style="width: 100px">
                            <button class="myfbt" ms-if="!accounting.IsEdit" type="button" ms-widget='dropDownGroupPostUserTree,belongToTree3,belongToOpts3'><i class="customer"></i></button>
                            <span class="must">*</span>
                        </td>
                        <td width="90">转入账户：</td>
                        <td>
                            <input type="text" readonly="readonly" ms-duplex="accounting.AccountName" style="width: 100px">
                            <button class="myfbt" ms-if="!accounting.IsEdit" type="button" ms-widget='dropDownGroupPostUserTree,belongToTree4,belongToOpts4'><i class="customer"></i></button>
                            <span class="must">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td>金额：</td>
                        <td>
                            <div class="input-append">
                                <input type="text" style="width: 200px; height: 60px; font-size: 50px" ms-duplex="accounting.Amount">
                                <span class="add-on bindCurrency" style="height: 38px; font-size: 60px; padding-top: 25px">元</span>
                            </div>
                            <span class="must">*</span>

                        </td>
                        <td>流水日期：</td>
                        <td width="200">
                            <input type="text" style="width: 120px;" readonly="readonly" ms-duplex="accounting.BookDate" ms-widget='date,birthday,birthdayOpts'>
                            <span class="must">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td>备注：</td>
                        <td colspan="3">
                            <textarea rows="4" cols="0" style="width: 600px;" ms-duplex="accounting.Remark"></textarea>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </noscript>
    <!---查看转账--->
    <noscript id="viewTemplate">
        <table width="100%" cellspacing="1" cellpadding="0" border="0" class="tablecInfo">
            <tbody>
                <tr>
                    <td style="width:90px;">转出账户：</td>
                    <td style="width:300px;">{{accounting.OutAccountName}}</td>
                    <td style="width:90px;">转入账户：</td>
                    <td>{{accounting.AccountName}}</td>
                </tr>
                <tr>
                    <td>转账金额：</td>
                    <td><span style="color: red; font-size: 16px; font-family: Georgia;">{{accounting.Amount|currency(' ')}}</span></td>
                    <td>流水日期：</td>
                    <td>{{accounting.BookDate}}</td>
                </tr>
                <tr>
                    <td>备注信息：</td>
                    <td colspan="3" style="height: 80px;">{{accounting.Remark}}</td>
                </tr>
                <tr>
                    <td>经手人：</td>
                    <td>{{accounting.AddBy.FullName}}</td>
                    <td>操作时间</td>
                    <td>{{accounting.AddTime}}</td>
                </tr>
            </tbody>
        </table>
    </noscript>

    <!---收款明细 新增编辑--->
    <noscript id="accountingFormTemplate">
    <!--<div>
       <ul class="tabWarp">
          <li ms-class-hover="tab=='tab1'" ms-class-normal="tab!='tab1'" val="tab1" ms-click="tabChange">基本信息</li>
          <li ms-class-hover="tab=='tab2'" ms-class-normal="tab!='tab2'" val="tab2" ms-click="tabChange">应收应付</li>
       </ul>
    </div> -->
    <div>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="commontable shortSelect">
            <tr>
                <th width="70">客户：</th>
                <td width="360">
                    <div ms-if="!showOnlyList">
                        <input type="text" ms-duplex="accounting.CustomName">
                        <button class="myfbt" type="button" ms-click="selectDetailCustomer()"><i class="customer"></i></button>
                    </div>
                    <div ms-if="showOnlyList" class="subtitle">
                        {{accounting.CustomName}}
                    </div>
                </td>
                <th width="90">归属合同订单：</th>
                <td>
                    <input type="text" readonly="readonly" ms-duplex="accounting.ContractNum">
                    <button class="myfbt" type="button" ms-click="selectContract(false)"><i class="customer"></i></button>
                </td>
            </tr>
            <tr>
                <th>&nbsp;</th>
                <td>&nbsp;</td>
                <th>归属收款单：</th>
                <td>
                    <input type="text" readonly="readonly" ms-duplex="accounting.ReceiptBillDisplay">
                    <button  class="myfbt" type="button" ms-click="selectReceipts"><i class="customer"></i></button>
                </td>
            </tr>
            <tr>
                <th>商品：</th>
                <td>
                    <input type="text" ms-duplex="accounting.ProductDisplay">
                    <button id="Button3" class="myfbt" type="button" ms-click="selectProduct"><i class="customer"></i></button>
                    <span class="must">*</span>
                </td>
                
                <th>品牌：</th>
                <td>
                    <input type="text" readonly="readonly" ms-duplex="accounting.ProductBrand">
                </td>
            </tr>
            <tr>
                <th>商品别称：</th>
                <td>
                    <input type="text" ms-duplex="accounting.ProductAlias">
                </td>
                <th>规格/型号：</th>
                <td>
                    <input type="text" ms-duplex="accounting.ProductStandard">
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <table width="98%" style="margin: 0 auto;" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
                        <tr class="minhead">
                            <td align="center" width="15%">产品单价
                            </td>
                            <td align="center" width="15%">成交单价
                            </td>
                            <td align="center" width="15%">数量
                            </td>
                            <td align="center" width="15%">收入金额
                            </td>
                            <td align="center" width="20%">收入项目
                            </td>
                            <td>收入账户
                            </td>
                        </tr>
                        <tr style="background:#ffffff;">
                            <td>
                                <div class="input-append" style="margin-bottom:auto;">
                                    <input type="text" style="width: 80px" ms-duplex="accounting.ProductPrice">
                                    <span class="add-on">元</span>
                                </div>
                            </td>
                            <td>
                                <div class="input-append" style="margin-bottom:auto;">
                                    <input type="text" style="width: 80px" ms-duplex="accounting.DealPrice">
                                    <span class="add-on">元</span>
                                </div>
                            </td>
                            <td>
                                <input type="text" style="width: 80px;margin:3px auto;" ms-duplex="accounting.ProductNum">
                                <select ms-duplex="accounting.Unit" style="width:50px;height:28px;">
                                    <option ms-repeat-unit="unitsData" ms-value="unit.Id">{{unit.Data}}</option>
                                </select>
                            </td>
                            <td>
                                <div class="input-append" style="margin-bottom:auto;">
                                    <input type="text" style="width: 100px; font-size: 14px;" ms-duplex="accounting.Amount">
                                    <span style="font-size: 14px;" class="add-on">元</span>
                                </div>
                            </td>
                            <td>
                                <input type="text" style="width: 80px;margin-bottom:auto;" readonly="readonly" ms-duplex="accounting.ProjectName">
                                <button class="myfbt" type="button" style="margin-bottom:auto;" ms-widget='dropDownGroupPostUserTree,accountingbelongToTree,belongToOpts'><i class="customer"></i></button>
                                <!--<span class="must">*</span>-->
                            </td>
                            <td>
                                <select ms-duplex="accounting.AccountId" style="width: 130px;">
                                    <option ms-repeat-ass="assetsData" ms-value="ass.Id">{{ass.AccountName}}</option>
                                </select>
                                <!--<span class="must">*</span>-->
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <table width="100%" cellspaceing="0" cellpadding="0" border="0" class="top10">
                        <tr>
                            <th width="120">说明：</th>
                            <td colspan="5">
                                <input type="text" style="width: 520px;" ms-duplex="accounting.Remark">
                                <select style="width: 140px;" ms-change="selectreceiptsData">
                                    <option value="">常用说明</option>
                                    <option ms-repeat-rec="receiptsData" ms-value="rec.Data">{{rec.Data}}</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th>凭据编号：</th>
                            <td width="208">
                                <input type="text" style="width: 90px;" readonly="readonly" ms-duplex="accounting.BillDisplay" />
                                <button class="myfbt" type="button" ms-click="selectBill"><i class="customer"></i></button>
                            </td>
                            <th width="90">收费凭据：</th>
                            <td width="208">
                                <input type="text" readonly="readonly" style="width: 120px;" ms-duplex="accounting.BillTypeDisplay" />
                            </td>
                            <th width="90">开票时间：</th>
                            <td width="208">
                                <input type="text" readonly="readonly" style="width: 120px;" ms-duplex="accounting.BillDate" />
                            </td>
                        </tr>
                        <tr>
                            <th>业务归属员工：</th>
                            <td>
                                <input type="text" style="width: 90px;" ms-duplex="accounting.Salesman" />
                                <button class="myfbt" type="button" ms-click="selectMan('salesman')"><i class="iadduser"></i></button>
                            </td>
                            <th>收款人：</th>
                            <td>
                                <input type="text" style="width: 90px;" ms-duplex="accounting.Receiptman" />
                                <button class="myfbt" type="button" ms-click="selectMan('receiptman')"><i class="iadduser"></i></button>
                            </td>
                            <th>收款时间：</th>
                            <td>
                                <input type="text" readonly="readonly" style="width: 120px;" ms-duplex="accounting.ReceiptDate" ms-widget="date,receiptdateid,receiptdateOpts" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </noscript>

    <!---收款明细 查看--->
    <noscript id="accountingViewTemplate">
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
            <tr>
                <td width="70">客户：</td>
                <td width="360">
                    {{accounting.CustomName}}
                </td>
                <td width="90">归属合同订单：</td>
                <td>
                    {{accounting.ContractNum}}
                </td>
            </tr>
            <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>归属收款单：</td>
                <td>
                    {{accounting.ReceiptBillDisplay}}
                </td>
            </tr>
            <tr>
                <td>商品：</td>
                <td>
                    {{accounting.ProductDisplay}}
                </td>
                
                <td>品牌：</td>
                <td>
                    {{accounting.ProductBrand}}
                </td>
            </tr>
            <tr>
                <td>商品别称：</td>
                <td>
                    {{accounting.ProductAlias}}
                </td>
                <td>规格/型号：</td>
                <td>
                    {{accounting.ProductStandard}}
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList">
            <tr class="minhead">
                <td align="center" width="15%">产品单价
                </td>
                <td align="center" width="15%">成交单价
                </td>
                <td align="center" width="15%">数量
                </td>
                <td align="center" width="15%">收入金额
                </td>
                <td align="center" width="20%">收入项目
                </td>
                <td>收入账户
                </td>
            </tr>
            <tr style="background: #ffffff;">
                <td align="right">{{accounting.ProductPrice}}元
                </td>
                <td align="right">{{accounting.DealPrice}}元
                </td>
                <td align="center">{{accounting.ProductNum}}{{accounting.UnitDisplay}}
                </td>
                <td align="right">{{accounting.Amount}}元
                </td>
                <td>{{accounting.ProjectName}}
                </td>
                <td>{{accounting.AccountName}}
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablecInfo">
            <tr>
                <td width="120">说明：</td>
                <td colspan="5">{{accounting.Remark}}
                </td>
            </tr>
            <tr>
                <td>凭据编号：</td>
                <td width="208">{{accounting.BillDisplay}}
                </td>
                <td width="90">收费凭据：</td>
                <td width="208">{{accounting.BillTypeDisplay}}
                </td>
                <td width="90">开票时间：</td>
                <td width="208">{{accounting.BillDate}}
                </td>
            </tr>
            <tr>
                <td>业务归属员工：</td>
                <td>{{accounting.Salesman}}
                </td>
                <td>收款人：</td>
                <td>{{accounting.Receiptman}}
                </td>
                <td>收款时间：</td>
                <td>{{accounting.ReceiptDate}}
                </td>
            </tr>
        </table>
    </noscript>

    <!---收款单 新增编辑--->
    <noscript id="receiptsFormTemplate">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="commontable shortSelect">
            <tr>
                <th width="80">收款单号：</th>
                <td width="430">
                    <input type="text" ms-duplex="accounting.No">
                    <span class="must">*</span>
                </td>
                <th width="80">合同订单：</th>
                <td>
                    <input type="text" readonly="readonly" ms-duplex="accounting.ContractNum">
                    <button class="myfbt" type="button" ms-click="selectContract(true)"><i class="customer"></i></button>
                </td>
            </tr>
            <tr>
                <th>客户名称：</th>
                <td>
                    <div ms-if="!showOnlyList">
                        <input type="text" ms-duplex="accounting.CustomerDisplay">
                        <button class="myfbt" type="button" ms-click='selectBillCustomer()'>
                            <i class="customer"></i>
                        </button>
                        <span class="must">*</span>
                    </div>
                    <div ms-if="showOnlyList" class="subtitle">{{accounting.CustomerDisplay}}</div>
                </td>
                <th>客户电话：</th>
                <td>
                    <input type="text" ms-duplex="accounting.CustomerTel">
                </td>
            </tr>
            <tr>
                <th>客户联系人：</th>
                <td>
                    <input type="text" style="width: 120px;" ms-duplex="accounting.ContactsDisplay">
                    <select ms-change="contactsChange">
                        <option value="">请选择</option>
                        <option ms-repeat-con="customerContactData" ms-value="con.Id">{{con.Name}}</option>
                    </select>
                </td>
                <th>客户地址：</th>
                <td>
                    <input type="text" ms-duplex="accounting.CustomerAddr">
                </td>
            </tr>
        </table>
        <table width="100%" style="margin: 0 auto;" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
            <tr class="minhead">
                <td align="center" width="8%">收费项目
                </td>
                <td align="center" width="8%">收费账户
                </td>
                <td align="center" width="15%">产品名称
                </td>
                <td align="center" width="10%">规格/型号
                </td>
                <td align="center" width="6%">成交单价
                </td>
                <td align="center" width="6%">数量
                </td>
                <td align="center" width="7%">金额
                </td>
                <td align="center" width="10%">说明
                </td>
                <td align="center" width="4%">操作
                </td>
            </tr>
            <tr ms-repeat-con="receiptDetailList" align="center" style="background-color: rgb(255, 255, 255);" ms-attr-index="$index">
                <td align="center">
                    <input type="text" style="width: 80px" readonly="readonly" ms-duplex="con.ProjectName">
                    <button class="myfbt" type="button" ms-click="setEmps"><i class="customer"></i>&nbsp;</button>
                </td>
                <td align="center">
                    <select ms-duplex="con.AccountId" style="width: 100px;">
                        <option ms-repeat-ass="assetsData" ms-value="ass.Id">{{ass.AccountName}}</option>
                    </select>
                </td>
                <td align="center">
                    <input type="text" ms-duplex="con.ProductDisplay" style="width: 150px;" />
                </td>
                <td align="center">
                    <input type="text" ms-duplex="con.ProductStandard" style="width: 80px;" />
                </td>
                <td align="center">
                    <input type="text" ms-duplex="con.ProductPrice" ms-blur="sumProductAmt2" style="width: 40px;" ms-attr-index="$index" />
                </td>
                <td align="center">
                    <input type="text" ms-duplex="con.ProductNum" ms-blur="sumProductAmt2" style="width: 40px;" ms-attr-index="$index" />
                </td>
                <td align="center">
                    <input type="text" ms-duplex="con.Amount" ms-blur="sumProductAmt" style="width: 50px;" />
                </td>
                <td align="center">
                    <input type="text" ms-duplex="con.Remark" style="width: 80px;" />
                </td>
                <td align="center">
                    <a href="javascript:void(0)" class="dodel" ms-attr-index="$index" ms-click="dodelReceiptDetials" title="删除"></a>
                </td>
            </tr>
            <tr ms-if="receiptDetailList.length == 0">
                <td colspan="9">抱歉！暂无收款明细数据。
                </td>
            </tr>
            <tr>
                <td colspan="6">
                    <table width="100%">
                        <tr>
                            <td>&nbsp; <a href="javascript:void(0);" ms-click="selectProduct" val="mul">+&nbsp;新增</a></td>
                            <td width="70">收款金额合计 </td>
                        </tr>
                    </table>
                </td>
                <td colspan="3">
                    <div class="input-append" style="margin-bottom: 3px;">
                        <input type="text" style="width: 50px" ms-duplex="accounting.Amount">
                        <span class="add-on">元</span>
                    </div>
                </td>
            </tr>
        </table>
        <table width="100%" style="margin: 0 auto;" border="0" cellspacing="0" cellpadding="0" class="commontable">
            <tr>
                <th style="text-align:left;">
                        {{arapType==0?"应收款":"应付款"}}销账
                </th>
            </tr>
        </table>
         <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList">
             <thead>
                 <tr class="head" style="background-color: rgb(250, 250, 250);">
                    <td width="10%" align="center">编号</td>
                    <td width="10%" align="center">计划日期</td>
                    <td width="10%" align="center">合同编号</td>
                    <td width="10%" align="center">款项批次</td>
                    <td width="15%" align="center">客户名称</td>
                    <td width="10%" align="center">{{arapType=='1'?'应付':'应收'}}金额</td>
                    <td width="10%" align="center"> 销账金额</td>
                    <td width="10%" align="center">备注</td>
                    <td width="5%" align="center">操作</td>
                 </tr>
             </thead>
             <tbody>
                <tr ms-repeat-item="arapRelList">
                    <td align="center">{{item.SN}}</td>
                    <td align="center">{{item.PlanDate|truncate(10,'')}}</td>
                    <td align="center">{{item.Contract.ContractNum}}</td>
                    <td align="center">{{item.Batch}}</td>
                    <td align="center">{{item.CustomerName}}</td>
                    <td align="center">{{item.Money|currency}}</td>
                    <td align="right"><input type="text" style="width:50px;" ms-blur="sumWriteOffAmt" ms-duplex="item.SettleMoney"/></td>
                    <td align="center"><input type="text" style="width:200px;" ms-duplex="item.Remark"/></td>
                    <td align="center">
                    <a href="javascript:void(0)" class="dodel" ms-attr-index="$index" ms-click="dodelArapWriteOff($index,item.Id)" title="删除"></a>
                </td>
                </tr>
            </tbody>
            <tfoot>
                 <tr style="background: #F5F5F7;" ms-if="arapRelList.length==0">
                    <td colspan="10">抱歉！暂无应收款销账明细信息</td>
                 </tr>
            </tfoot>
             <tr>
                 <td colspan="6">
                    <table width="100%">
                        <tr>
                            <td>&nbsp; <a href="javascript:void(0);" ms-click="addArap()" val="mul">+&nbsp;新增</a></td>
                            <td width="70">销账金额合计 </td>
                        </tr>
                    </table>
                </td>
                <td colspan="3">
                    <div class="input-append" style="margin-bottom: 3px;">
                        &nbsp;<span class="add-on">{{arapAmount}}元</span>
                    </div>
                </td>
             </tr>
        </table>
   
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="commontable shortSelect top10">
            <tr>
                <th width="90">凭据编号：</th>
                <td>
                    <input type="text" style="width: 90px;" readonly="readonly" ms-duplex="accounting.BillDisplay" />
                    <button class="myfbt" type="button" ms-click="selectBill"><i class="customer"></i></button>
                </td>
                <th>收费凭据：</th>
                <td>
                    <input type="text" readonly="readonly" style="width: 120px;" ms-duplex="accounting.BillTypeDisplay" />
                </td>
                <th>开票时间：</th>
                <td width="208">
                    <input type="text" readonly="readonly" style="width: 120px;" ms-duplex="accounting.BillDate" />
                </td>
            </tr>
            <tr>
                <th>说&nbsp;&nbsp;明：</th>
                <td colspan="5">
                    <input type="text" style="width: 600px;" ms-duplex="accounting.Remark">
                    <select style="width: 140px;" ms-change="selectreceiptsData">
                        <option value="">常用说明</option>
                        <option ms-repeat-rec="receiptsData" ms-value="rec.Data">{{rec.Data}}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th width="50">业务员：</th>
                <td>
                    <input type="text" style="width: 90px;" ms-duplex="accounting.Salesman" />
                    <button class="myfbt" type="button" ms-click="selectMan('salesman')"><i class="iadduser"></i></button>

                </td>
                <th>收款人：</th>
                <td>
                    <input type="text" style="width: 90px;" ms-duplex="accounting.Receiptman" />
                    <button class="myfbt" type="button" ms-click="selectMan('receiptman')"><i class="iadduser"></i></button>

                </td>
                <th>收款时间：</th>
                <td width="223">
                    <input type="text" readonly="readonly" style="width: 109px;" ms-duplex="accounting.Receiptdate" ms-widget="date,receiptdateid,receiptdateOpts" />
                </td>
            </tr>
        </table>
    </noscript>

    <!---收款单 查看--->
    <noscript id="receiptsViewTemplate">
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#D2D2D2" class="tablecInfo">
            <tr>
                <td width="80">收款单号：</td>
                <td width="360">{{accounting.No}}
                </td>
                <td width="80">合同订单：</td>
                <td>{{accounting.ContractNum}}
                </td>
            </tr>
            <tr>
                <td>客户名称：</td>
                <td>{{accounting.CustomerDisplay}}
                </td>
                <td>客户电话：</td>
                <td>{{accounting.CustomerTel}}
                </td>
            </tr>
            <tr>
                <td>客户联系人：</td>
                <td>{{accounting.ContactsDisplay}} 
                </td>
                <td>客户地址：</td>
                <td>{{accounting.CustomerAddr}}
                </td>
            </tr>
        </table>
        <table width="100%" style="margin: 0 auto;" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
            <tr class="minhead">
                <td align="center" width="8%">收费项目
                </td>
                <td align="center" width="8%">收费账户
                </td>
                <td align="center" width="15%">产品名称
                </td>
                <td align="center" width="10%">规格/型号
                </td>
                <td align="center" width="6%">成交单价
                </td>
                <td align="center" width="6%">数量
                </td>
                <td align="center" width="7%">金额
                </td>
                <td align="center" width="10%">说明
                </td>
            </tr>
            <tr ms-repeat-con="receiptDetailList" align="center" style="background-color: rgb(255, 255, 255);" ms-attr-index="$index">
                <td align="center">{{con.ProjectName}}
                </td>
                <td align="center">{{con.AccountDisplay}}
                </td>
                <td align="center">{{con.ProductDisplay}}
                </td>
                <td align="center">{{con.ProductStandard}}
                </td>
                <td align="center">{{con.ProductPrice}}
                </td>
                <td align="center">{{con.ProductNum}}
                </td>
                <td align="center">{{con.Amount}}
                </td>
                <td align="center">{{con.Remark}}
                </td>
            </tr>
            <tr ms-if="receiptDetailList.length == 0">
                <td colspan="8">抱歉！暂无应收销账明细数据。
                </td>
            </tr>
            <tr>
                <td colspan="6">&nbsp; 
                     <span style="float: right;">收款金额合计</span>
                </td>
                <td colspan="2">{{accounting.Amount}}元  
                </td>
            </tr>
        </table>
         <table width="100%" style="margin: 0 auto;" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
             <thead>
                 <tr class="head" style="background-color: rgb(250, 250, 250);">
                    <td width="10%" align="center">编号</td>
                    <td width="10%" align="center">计划日期</td>
                    <td width="10%" align="center">合同编号</td>
                    <td width="10%" align="center">款项批次</td>
                    <td width="15%" align="center">客户名称</td>
                    <td width="10%" align="center">{{arapType=='1'?'应付':'应收'}}金额</td>
                    <td width="10%" align="center"> 销账金额</td>
                    <td width="10%" align="center">备注</td>
                 </tr>
             </thead>
             <tbody>
                <tr ms-repeat-item="arapRelList">
                    <td align="center">{{item.SN}}</td>
                    <td align="center">{{item.PlanDate|truncate(10,'')}}</td>
                    <td align="center">{{item.Contract.ContractNum}}</td>
                    <td align="center">{{item.Batch}}</td>
                    <td align="center">{{item.CustomerName}}</td>
                    <td align="center">{{item.Money|currency}}</td>
                    <td align="right">{{item.SettleMoney|currency}}</td>
                    <td align="center">{{item.Remark}}</td>
                </tr>
            </tbody>
            <tfoot>
                 <tr style="background: #F5F5F7;" ms-if="arapRelList.length==0">
                    <td colspan="10">抱歉！暂无业务明细信息</td>
                 </tr>
            </tfoot>
             <tr>
                <td colspan="6">&nbsp; 
                     <span style="float: right;">销账金额合计</span>
                </td>
                <td colspan="3">{{arapAmount}}元  
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#D2D2D2" class="tablecInfo">
            <tr>
                <td>凭据编号：</td>
                <td>{{accounting.BillDisplay}}
                </td>
                <td>收费凭据：</td>
                <td>{{accounting.BillTypeDisplay}}  
                </td>
                <td>开票时间：</td>
                <td>{{accounting.BillDate}}  
                </td>
            </tr>
            <tr>
                <td>说&nbsp;&nbsp;明：</td>
                <td colspan="5">{{accounting.Remark}}
                </td>
            </tr>
            <tr>
                <td width="60">业务员：</td>
                <td>{{accounting.Salesman}} 
               
                </td>
                <td width="60">收款人：</td>
                <td>{{accounting.Receiptman}} 
               
                </td>
                <td width="60">收款时间：</td>
                <td width="160">{{accounting.Receiptdate}}
                </td>
            </tr>
        </table>
    </noscript>

    <!---选择合同业务明细--->
    <noscript id="ContractListTemplate">
        <div style="max-height: 200px; overflow-y: auto;">
            <div class="boxTitlenob">
                <h2>合同订单
         <span class="rseachbox">
             <input ms-duplex="contractKey" placeholder="输入合同名称快速检索" type="text" style="margin-bottom: 3px; font-size: 9px; color: #989898;" />
             <button class="inputbt" type="button" ms-click="searchContract">
             </button>
         </span>
                </h2>
            </div>
            <table border="0" cellspacing="1" cellpadding="0" class="tableList productlist" style="width: 100%;">
                <tr class="minhead" align="center">
                    <td width="3%">选择</td>
                    <td width="10%" align="center">合同编号</td>
                    <td width="15%" align="center">合同名称</td>
                    <td width="8%" align="center">合同金额</td>
                    <td width="8%" align="center">已回款</td>
                    <td width="8%" align="center">签约日期</td>
                    <td width="15%" align="center">合同期限范围</td>
                </tr>
                <tr ms-repeat-item="selContactList" ms-click="selectedContract" ms-attr-contractid="item.Id" style="cursor: pointer;">
                    <td align="center">
                        <input ms-if="item.checked" name="selectContract" type="radio" ms-attr-index="$index" checked="checked">
                        <input ms-if="!item.checked" name="selectContract" type="radio" ms-attr-index="$index">
                    </td>
                    <td align="center">{{item.ContractNum}}</td>
                    <td align="center">{{item.ContractName|truncate(18,'...')}}</td>
                    <td align="center">{{item.Amount?item.Amount:0}}</td>
                    <td align="center">{{item.ReturnedMoney}}</td>
                    <td align="center">{{item.SignAContractDate|truncate(10,'')}}</td>
                    <td align="center">{{item.StartDate|truncate(10,'')}} 至 {{item.EndDate|truncate(10,'')}}</td>
                </tr>
                <tr style="background: #F5F5F7;" ms-if="selContactList.length==0">
                    <td colspan="7">抱歉！暂无合同信息</td>
                </tr>
            </table>
        </div>
        <div class="boxTitlenob">
            <h2>业务明细</h2>
        </div>
        <table border="0" cellspacing="1" cellpadding="0" class="tableList productlist" style="width: 100%;">
            <tr class="minhead" align="center">
                <td width="4%">选择</td>
                <td width="20%" align="center">产品名称</td>
                <td width="15%" align="center">产品别称</td>
                <td width="10%" align="center">规格/型号</td>
                <td width="6%" align="center">成交单价</td>
                <td width="7%" align="center">数量</td>
                <td width="6%" align="center">单位</td>
                <td width="8%" align="center">金额</td>
                <td width="8%" align="center">已付金额</td>
            </tr>
            <tr ms-repeat-product="selProductList" ms-live-click="selectedProduct" style="cursor: pointer;" ms-attr-val="product.PayState" ms-title="product.PayState==2?'已付清':''">
                <td align="center">
                    <div ms-if="!mulSelect">
                        <input ms-if="product.PayState!=2" type="radio" name="selectProduct" ms-attr-index="$index">
                        <input ms-if="product.PayState==2" type="radio" name="selectProduct" disabled="disabled" title="已付清">
                    </div>
                    <div ms-if="mulSelect">
                        <input ms-attr-title="product.PayState==2?'已付清':''" type="checkbox" name="selectProduct" ms-attr-index="$index" checked="checked">
                        <!--<input ms-if="product.PayState==2" type="checkbox" name="selectProduct" disabled="disabled" title="已付清">-->
                    </div>
                </td>
                <td>{{product.ProductName|truncate(20,'...')}}</td>
                <td>{{product.ProductAlias}}</td>
                <td>{{product.Standard}}</td>
                <td style="text-align: center;">{{product.Price}}</td>
                <td style="text-align: center;">{{product.Num}}</td>
                <td style="text-align: center;">{{product.UnitDisplay}}</td>
                <td style="text-align: center;">{{product.Money}}元</td>
                <td style="text-align: center;">{{product.ReturnAmount?product.ReturnAmount:0}}元</td>
            </tr>
            <tr style="background: #F5F5F7;" ms-if="selProductList.length==0">
                <td colspan="9">抱歉！暂无业务明细信息</td>
            </tr>
        </table>

    </noscript>

    <!---选择收款业务明细--->
    <noscript id="ProductListTemplate">
        <div style="width: 780px; max-height: 300px; overflow-y: auto;">
            <div class="boxTitlenob">
                <h2>业务明细
         <span class="rseachbox">
             <input ms-duplex="productListKey" placeholder="输入产品名称快速检索" type="text" style="margin-bottom: 3px; font-size: 9px; color: #989898;" />
             <button class="inputbt" type="button" ms-click="getProductList">
             </button>
         </span>
                </h2>
            </div>
            <table border="0" cellspacing="1" cellpadding="0" class="tableList productlist" style="width: 100%;">
                <tr class="minhead" align="center">
                    <td width="4%">选择</td>
                    <td width="15%" align="center">产品名称</td>
                    <td width="10%" align="center">产品别称</td>
                    <td width="10%" align="center">规格/型号</td>
                    <td width="6%" align="center">成交单价</td>
                    <td width="7%" align="center">数量</td>
                    <td width="6%" align="center">单位</td>
                    <td width="8%" align="center">金额</td>
                    <td width="8%" align="center">已付金额</td>
                </tr>
                <tr ms-repeat-product="selProductList" ms-live-click="selectedProduct" style="cursor: pointer;" ms-attr-val="product.PayState" ms-title="product.PayState==2?'已付清':''">
                    <td align="center">
                        <input ms-if="!mulSelect && product.PayState!=2" type="radio" name="selectProduct" ms-attr-index="$index">
                        <input ms-if="!mulSelect && product.PayState==2" type="radio" name="selectProduct" disabled="disabled" title="已付清">
                        <input ms-if="mulSelect && product.PayState!=2" type="checkbox" name="selectProduct" ms-attr-index="$index">
                        <input ms-if="mulSelect && product.PayState==2" type="checkbox" name="selectProduct" disabled="disabled" title="已付清">
                    </td>
                    <td>{{product.ProductName|truncate(20,'...')}}</td>
                    <td>{{product.ProductAlias}}</td>
                    <td>{{product.Standard}}</td>
                    <td style="text-align: center;">{{product.Price}}</td>
                    <td style="text-align: center;">{{product.Num}}</td>
                    <td style="text-align: center;">{{product.UnitDisplay}}</td>
                    <td style="text-align: center;">{{product.Money}}元</td>
                    <td style="text-align: center;">{{product.ReturnAmount?product.ReturnAmount:0}}元</td>
                </tr>
                <tr style="background: #F5F5F7;" ms-if="selProductList.length==0">
                    <td colspan="9">抱歉！暂无业务明细信息</td>
                </tr>
            </table>
        </div>
    </noscript>

    <!---选择收款单--->
    <noscript id="ReceiptsListTemplate">
        <div style="max-height: 300px; overflow-y: auto; width: 750px;">
            <div class="boxTitlenob">
                <h2>收款单
         <span class="rseachbox">
             <input ms-duplex="receiptsKey" placeholder="输入收款单号快速检索" type="text" style="margin-bottom: 3px; font-size: 9px; color: #989898;" />
             <button class="inputbt" type="button" ms-click="getReceipts">
             </button>
         </span>
                </h2>
            </div>
            <table border="0" cellspacing="1" cellpadding="0" class="tableList productlist" style="width: 100%;">
                <tr class="minhead" align="center">
                    <td width="4%">选择</td>
                    <td width="10%" align="center">收款单号</td>
                    <td width="10%" align="center">合同订单</td>
                    <td width="10%" align="center">收款金额</td>
                    <td width="10%" align="center">业务员</td>
                    <td width="8%" align="center">收款人</td>
                    <td width="8%" align="center">收款时间</td>
                </tr>
                <tr ms-repeat-item="selReceiptsList" ms-live-click="selectedReceipts" style="cursor: pointer;">
                    <td align="center">
                        <input type="radio" name="selectReceipts" ms-value="item.Id" ms-attr-index="$index"></td>
                    <td align="center">{{item.No}}</td>
                    <td align="center">{{item.ContractNum}}</td>
                    <td align="center">{{item.Amount}}</td>
                    <td align="center">{{item.Salesman}}</td>
                    <td align="center">{{item.Receiptman}}</td>
                    <td align="center">{{item.Receiptdate}}</td>
                </tr>
                <tr style="background: #F5F5F7;" ms-if="selReceiptsList.length==0">
                    <td colspan="8">抱歉！暂无收款单信息</td>
                </tr>
            </table>
        </div>
    </noscript>

    <!---选择票据凭证--->
    <noscript id="BillTemplate">
        <div style="max-height: 300px; overflow-y: auto;">
            <div class="boxTitlenob">
                <h2>开票记录
         <span class="rseachbox">
             <input ms-duplex="billKey" placeholder="输入票据编号快速检索" type="text" style="margin-bottom: 3px; font-size: 9px; color: #989898;" />
             <button class="inputbt" type="button" ms-click="getBills">
             </button>
         </span>
                </h2>
            </div>
            <table border="0" cellspacing="1" cellpadding="0" class="tableList productlist" style="width: 750px;">
                <tr class="minhead" align="center">
                    <td width="4%">选择</td>
                    <td width="6%" align="center">类型</td>
                    <td width="10%" align="center">编号</td>
                    <td width="10%" align="center">票据金额</td>
                    <td width="10%" align="center">实收金额</td>
                    <td width="16%" align="center">往来客户</td>
                    <td width="8%" align="center">开票时间</td>
                </tr>
                <tr ms-repeat-item="selBillsList" ms-live-click="selectedBill" style="cursor: pointer;">
                    <td align="center">
                        <input type="radio" name="selectBill" ms-value="item.Id" ms-attr-index="$index"></td>
                    <td align="center">{{item.BillTypeDisplay}}</td>
                    <td align="center">{{item.BillCode}}</td>
                    <td align="center">{{item.Amount1}}</td>
                    <td align="center">{{item.Amount2}}</td>
                    <td align="center">{{item.CustomName}}</td>
                    <td align="center">{{item.CreateDate}}</td>
                </tr>
                <tr style="background: #F5F5F7;" ms-if="selBillsList.length==0">
                    <td colspan="8">抱歉！暂无开票记录信息</td>
                </tr>
            </table>
        </div>
    </noscript>

    <!---支出明细 新增编辑--->
    <noscript id="accountingFormTemplate2">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="commontable shortSelect">
            <tr>
                <th width="80">客户：</th>
                <td width="380">
                    <div ms-if="!showOnlyList">
                        <input type="text" ms-duplex="accounting.CustomName" readonly="true">
                        <button class="myfbt" type="button" ms-click="selectDetailCustomer()"><i class="customer"></i></button>
                    </div>
                    <div ms-if="showOnlyList" class="subtitle">
                        {{accounting.CustomName}}
                    </div>
                </td>
                <th width="100">合同订单：</th>
                <td>
                    <input type="text" readonly="readonly" style="width: 114px;" ms-duplex="accounting.ContractNum">
                    <button class="myfbt" type="button" ms-click="selectContract(false)"><i class="customer"></i></button>
                </td>
            </tr>
            <tr>
                <th rowspan="2">支出金额：</th>
                <td rowspan="2">
                    <div class="input-append">
                        <input type="text" style="width: 163px; font-size: 30px; height: 42px;" ms-duplex="accounting.Amount">
                        <span style="height: 33px; font-size: 32px; padding-top: 12px;" class="add-on">元</span>
                    </div>
                </td>
                <th>支出项目：</th>
                <td>
                    <input type="text" style="width: 114px" readonly="readonly" ms-duplex="accounting.ProjectName">
                    <button class="myfbt" type="button" ms-widget='dropDownGroupPostUserTree,accountingbelongToTree,belongToOpts'><i class="customer"></i></button>
                    <span class="must">*</span>
                </td>
            </tr>
            <tr>
                <th>支出账户：</th>
                <td>
                    <select ms-duplex="accounting.AccountId" style="width: 157px;">
                        <option ms-repeat-ass="assetsData" ms-value="ass.Id">{{ass.AccountName}}</option>
                    </select>
                    <span class="must">*</span>
                </td>
            </tr>
            <tr>
                <th>支出摘要：</th>
                <td colspan="3">
                    <input type="text" style="width: 623px;" ms-duplex="accounting.Remark">
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <table width="100%" cellspaceing="0" cellpadding="0" border="0">
                        <tr>
                            <th width="80">领款人：</th>
                            <td width="180">
                                <input type="text" style="width: 60px;" ms-duplex="accounting.Receiptman" />
                                <button class="myfbt" type="button" ms-click="selectMan('receiptman')"><i class="iadduser"></i></button>
                                <span class="must">*</span>
                            </td>
                            <th width="80">领导审批：</th>
                            <td width="162" style="position: relative;">
                                <input type="text" style="width: 60px;" ms-duplex="accounting.Examiner" ms-focus="manshow('examiner')" ms-blur="manhide('examiner')" />
                                <div id="examiner" style="position: absolute; top: 30px; background: #f7f6f6; display: none; z-index: 99999;">
                                    <ul>
                                        <li ms-repeat-item="examinerData" style="width: 64px; color: #878585; padding: 2px 5px; cursor: pointer;" ms-mouseover="getManVal('examiner')">{{item}}</li>
                                    </ul>
                                </div>
                            </td>
                            <th width="80">支出时间：</th>
                            <td>
                                <input type="text" readonly="readonly" style="width: 109px;" ms-duplex="accounting.ReceiptDate" ms-widget="date,receiptdateid,receiptdateOpts" />
                            </td>
                        </tr>
                        <tr>
                            <th>会计：</th>
                            <td colspan="5" style="position: relative;">
                                <input type="text" style="width: 60px;" ms-duplex="accounting.Accounting" ms-focus="manshow('accounting')" ms-blur="manhide('accounting')" />
                                &nbsp;核准：
                                <input type="text" style="width: 60px;" ms-duplex="accounting.Checker" ms-focus="manshow('checker')" ms-blur="manhide('checker')" />
                                &nbsp;出纳：
                                <input type="text" style="width: 60px;" ms-duplex="accounting.Teller" ms-focus="manshow('teller')" ms-blur="manhide('teller')" />
                                &nbsp;经手：
                                <input type="text" style="width: 60px;" ms-duplex="accounting.Broker" ms-focus="manshow('broker')" ms-blur="manhide('broker')" />
                                &nbsp;&nbsp;录入人：
                                <input type="text" readonly="readonly" ms-duplex="accounting.AddBy.FullName" style="width: 60px;" />
                                <div id="accounting" style="position: absolute; top: 30px; background: #f7f6f6; display: none;">
                                    <ul>
                                        <li ms-repeat-item="accountingData" style="width: 64px; color: #878585; padding: 2px 5px; cursor: pointer;" ms-mouseover="getManVal('accounting')">{{item}}</li>
                                    </ul>
                                </div>
                                <div id="checker" style="position: absolute; top: 30px; left: 130px; background: #f7f6f6; display: none;">
                                    <ul>
                                        <li ms-repeat-item="checkerData" style="width: 64px; color: #878585; padding: 2px 5px; cursor: pointer;" ms-mouseover="getManVal('checker')">{{item}}</li>
                                    </ul>
                                </div>
                                <div id="teller" style="position: absolute; top: 30px; left: 255px; background: #f7f6f6; display: none;">
                                    <ul>
                                        <li ms-repeat-item="tellerData" style="width: 64px; color: #878585; padding: 2px 5px; cursor: pointer;" ms-mouseover="getManVal('teller')">{{item}}</li>
                                    </ul>
                                </div>
                                <div id="broker" style="position: absolute; top: 30px; left: 385px; background: #f7f6f6; display: none;">
                                    <ul>
                                        <li ms-repeat-item="brokerData" style="width: 64px; color: #878585; padding: 2px 5px; cursor: pointer;" ms-mouseover="getManVal('broker')">{{item}}</li>
                                    </ul>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </noscript>

    <!---支出明细 查看--->
    <noscript id="accountingViewTemplate2">
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#D2D2D2" class="tablecInfo">
            <tr>
                <td width="80">客户：</td>
                <td colspan="3">{{accounting.CustomName}}
                </td>
            </tr>
            <tr>
                <td rowspan="2">支出金额：</td>
                <td rowspan="2" width="311">
                    <span style="font-size: 30px; height: 42px;">{{accounting.Amount}}元</span>
                </td>
                <td width="80">支出项目：</td>
                <td>{{accounting.ProjectName}}
                </td>
            </tr>
            <tr>
                <td>支出账户：</td>
                <td>{{accounting.AccountDisplay}} 
                </td>
            </tr>
            <tr>
                <td>支出摘要：</td>
                <td colspan="3">{{accounting.Remark}} 
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#D2D2D2" class="tablecInfo">
            <tr>
                <td width="80">领款人：</td>
                <td width="100">{{accounting.Receiptman}}
                </td>
                <td width="80">领导审批：</td>
                <td width="100">{{accounting.Examiner}}
                </td>
                <td width="80">支出时间：</td>
                <td width="130">{{accounting.ReceiptDate}}
                </td>
                <td width="80">录入人：</td>
                <td>{{accounting.AddBy.FullName}}
                </td>
            </tr>
            <tr>
                <td>会计：</td>
                <td>{{accounting.Accounting}}</td>
                <td>核准：</td>
                <td>{{accounting.Checker}}</td>
                <td>出纳：</td>
                <td>{{accounting.Teller}}</td>
                <td>经手：</td>
                <td>{{accounting.Broker}}</td>
            </tr>
        </table>
    </noscript>

    <!---支出单 新增编辑--->
    <noscript id="receiptsFormTemplate2">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="commontable shortSelect">
            <tr>
                <th width="80">支出单号：</th>
                <td width="320">
                    <input type="text" ms-duplex="accounting.No">
                    <span class="must">*</span>
                </td>
                <th width="100">归属合同订单：</th>
                <td>
                    <input type="text" readonly="readonly" ms-duplex="accounting.ContractNum">
                    <button class="myfbt" type="button" ms-click="selectContract(true)"><i class="customer"></i></button>
                </td>
            </tr>
            <tr>
                <th>客户名称：</th>
                <td>
                    <input type="text" ms-duplex="accounting.CustomerDisplay">
                    <button ms-visible="!showOnlyList" class="myfbt" type="button" ms-click='selectBillCustomer()'>
                        <i class="customer"></i>
                    </button>
                    <span class="must">*</span>
                </td>
                <th>客户电话：</th>
                <td>
                    <input type="text" ms-duplex="accounting.CustomerTel">
                </td>
            </tr>
            <tr>
                <th>客户联系人：</th>
                <td>
                    <input type="text" style="width: 120px;" ms-duplex="accounting.ContactsDisplay">
                    <select ms-change="contactsChange">
                        <option value="">请选择</option>
                        <option ms-repeat-con="customerContactData" ms-value="con.Id">{{con.Name}}</option>
                    </select>
                </td>
                <th>客户地址：</th>
                <td>
                    <input type="text" ms-duplex="accounting.CustomerAddr">
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
            <tr class="minhead">
                <td align="center" width="20%">支出项目
                </td>
                <td align="center" width="8%">支出账户
                </td>
                <td align="center" width="5%">支出金额
                </td>
                <td align="center" width="40%">支出内容摘要
                </td>
                <td align="center" width="4%">操作
                </td>
            </tr>
            <tr ms-repeat-con="receiptDetailList" align="center" style="background-color: rgb(255, 255, 255);" ms-attr-index="$index">
                <td align="center">
                    <input type="text" style="width: 120px" readonly="readonly" ms-duplex="con.ProjectName">
                    <button class="myfbt" type="button" ms-click="setEmps"><i class="customer"></i>&nbsp;</button>
                </td>
                <td align="center">
                    <select ms-duplex="con.AccountId" style="width: 90%;">
                        <option ms-repeat-ass="assetsData" ms-value="ass.Id">{{ass.AccountName}}</option>
                    </select>
                </td>
                <td align="center">
                    <input type="text" ms-duplex="con.Amount" style="width: 80px;" ms-blur="sumPayAmt" />
                </td>
                <td align="center">
                    <input type="text" ms-duplex="con.Remark" style="width: 90%;" />
                </td>
                <td align="center">
                    <a href="javascript:void(0)" class="dodel" ms-attr-index="$index" ms-click="dodelReceiptDetials" title="删除"></a>
                </td>
            </tr>
            <tr ms-if="receiptDetailList.length == 0">
                <td colspan="5">抱歉！暂无支出明细数据。
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <table width="100%">
                        <tr>
                            <td>&nbsp; <a href="javascript:void(0);" ms-click="doaddReceiptDetials" val="mul">+&nbsp;新增</a></td>
                            <td width="70">支出金额合计 </td>
                        </tr>
                    </table>
                </td>
                <td colspan="3">
                    <div class="input-append" style="margin-bottom: 3px;">
                        <input type="text" style="width: 50px" ms-duplex="accounting.Amount">
                        <span class="add-on">元</span>
                    </div>
                </td>
            </tr>
        </table>
         <table width="100%" style="margin: 0 auto;" border="0" cellspacing="0" cellpadding="0" class="commontable">
            <tr>
                <th style="text-align:left"> {{arapType==0?"应收款":"应付款"}}销账</th>

            </tr>
        </table>
         <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList">
             <thead>
                 <tr class="head" style="background-color: rgb(250, 250, 250);">
                    <td width="10%" align="center">编号</td>
                    <td width="10%" align="center">计划日期</td>
                    <td width="10%" align="center">合同编号</td>
                    <td width="10%" align="center">款项批次</td>
                    <td width="15%" align="center">客户名称</td>
                    <td width="10%" align="center">{{arapType=='1'?'应付':'应收'}}金额</td>
                    <td width="10%" align="center"> 销账金额</td>
                    <td width="10%" align="center">备注</td>
                    <td width="5%" align="center">操作</td>
                 </tr>
             </thead>
             <tbody>
                <tr ms-repeat-item="arapRelList">
                    <td align="center">{{item.SN}}</td>
                    <td align="center">{{item.PlanDate|truncate(10,'')}}</td>
                    <td align="center">{{item.Contract.ContractNum}}</td>
                    <td align="center">{{item.Batch}}</td>
                    <td align="center">{{item.CustomerName}}</td>
                    <td align="center">{{item.Money|currency}}</td>
                    <td align="right"><input type="text" style="width:50px;" ms-blur="sumWriteOffAmt" ms-duplex="item.SettleMoney"/></td>
                    <td align="center"><input type="text" style="width:200px;" ms-duplex="item.Remark"/></td>
                    <td align="center">
                    <a href="javascript:void(0)" class="dodel" ms-attr-index="$index" ms-click="dodelArapWriteOff($index,item.Id)" title="删除"></a>
                </td>
                </tr>
            </tbody>
            <tfoot>
                 <tr style="background: #F5F5F7;" ms-if="arapRelList.length==0">
                    <td colspan="10">抱歉！暂无应付款销账明细信息</td>
                 </tr>
            </tfoot>
             <tr>
                 <td colspan="6">
                    <table width="100%">
                        <tr>
                            <td>&nbsp; <a href="javascript:void(0);" ms-click="addArap()" val="mul">+&nbsp;新增</a></td>
                            <td width="70">销账金额合计 </td>
                        </tr>
                    </table>
                </td>
                <td colspan="3">
                    <div class="input-append" style="margin-bottom: 3px;">
                        &nbsp;<span class="add-on">{{arapAmount}}元</span>
                    </div>
                </td>
             </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="commontable shortSelect top10">
            <tr>
                <th>支出备注：</th>
                <td colspan="5">
                    <input type="text" style="width: 670px;" ms-duplex="accounting.Remark">
                </td>
            </tr>
            <tr>
                <th width="78">领款人：</th>
                <td width="200">
                    <input type="text" style="width: 70px;" ms-duplex="accounting.Receiptman" />
                    <button class="myfbt" type="button" ms-click="selectMan('receiptman')"><i class="iadduser"></i></button>

                </td>
                <th width="78">领导审批：</th>
                <td style="position: relative;">
                    <input type="text" style="width: 70px;" ms-duplex="accounting.Examiner" ms-focus="manshow('examiner')" ms-blur="manhide('examiner')" />
                    <div id="examiner" style="position: absolute; top: 30px; background: #f7f6f6; display: none; z-index: 99999;">
                        <ul>
                            <li ms-repeat-item="examinerData" style="width: 74px; color: #878585; padding: 2px 5px; cursor: pointer;" ms-mouseover="getManVal('examiner')">{{item}}</li>
                        </ul>
                    </div>
                </td>
                <th width="78">支出日期：</th>
                <td width="142">
                    <input type="text" readonly="readonly" ms-duplex="accounting.Receiptdate" style="width: 109px;" ms-widget="date,receiptdateid,receiptdateOpts" />
                </td>
            </tr>
            <tr>
                <th>会计：</th>
                <td colspan="5" style="position: relative;">
                    <input type="text" style="width: 70px;" ms-duplex="accounting.Accounting" ms-focus="manshow('accounting')" ms-blur="manhide('accounting')" />
                    核准：
                    <input type="text" style="width: 70px;" ms-duplex="accounting.Checker" ms-focus="manshow('checker')" ms-blur="manhide('checker')" />
                    出纳：
                    <input type="text" style="width: 70px;" ms-duplex="accounting.Teller" ms-focus="manshow('teller')" ms-blur="manhide('teller')" />
                    经手：
                    <input type="text" style="width: 70px;" ms-duplex="accounting.Broker" ms-focus="manshow('broker')" ms-blur="manhide('broker')" />
                    录入人：
                    <input type="text" style="width: 70px;" readonly="readonly" ms-duplex="accounting.AddByName" />
                    <div id="accounting" style="position: absolute; top: 30px; background: #f7f6f6; display: none;">
                        <ul>
                            <li ms-repeat-item="accountingData" style="width: 74px; color: #878585; padding: 2px 5px; cursor: pointer;" ms-mouseover="getManVal('accounting')">{{item}}</li>
                        </ul>
                    </div>
                    <div id="checker" style="position: absolute; top: 30px; left: 140px; background: #f7f6f6; display: none;">
                        <ul>
                            <li ms-repeat-item="checkerData" style="width: 74px; color: #878585; padding: 2px 5px; cursor: pointer;" ms-mouseover="getManVal('checker')">{{item}}</li>
                        </ul>
                    </div>
                    <div id="teller" style="position: absolute; top: 30px; left: 275px; background: #f7f6f6; display: none;">
                        <ul>
                            <li ms-repeat-item="tellerData" style="width: 74px; color: #878585; padding: 2px 5px; cursor: pointer;" ms-mouseover="getManVal('teller')">{{item}}</li>
                        </ul>
                    </div>
                    <div id="broker" style="position: absolute; top: 30px; left: 415px; background: #f7f6f6; display: none;">
                        <ul>
                            <li ms-repeat-item="brokerData" style="width: 74px; color: #878585; padding: 2px 5px; cursor: pointer;" ms-mouseover="getManVal('broker')">{{item}}</li>
                        </ul>
                    </div>
                </td>
            </tr>
        </table>
    </noscript>

    <!---支出单 查看--->
    <noscript id="receiptsViewTemplate2">
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#D2D2D2" class="tablecInfo">
            <tr>
                <td>支出单号：</td>
                <td colspan="3">{{accounting.No}}
                </td>
            </tr>
            <tr>
                <td width="80">客户名称：</td>
                <td width="300">{{accounting.CustomerDisplay}}
                </td>
                <td width="80">客户电话：</td>
                <td>{{accounting.CustomerTel}}
                </td>
            </tr>
            <tr>
                <td>客户联系人：</td>
                <td>{{accounting.ContactsDisplay}}
                </td>
                <td>客户地址：</td>
                <td>{{accounting.CustomerAddr}}
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
            <tr class="minhead">
                <td align="center" width="20%">支出项目
                </td>
                <td align="center" width="8%">支出账户
                </td>
                <td align="center" width="5%">支出金额
                </td>
                <td align="center" width="40%">支出内容摘要
                </td>
            </tr>
            <tr ms-repeat-con="receiptDetailList" align="center" style="background-color: rgb(255, 255, 255);" ms-attr-index="$index">
                <td align="center">{{con.ProjectName}}
                </td>
                <td align="center">{{con.AccountDisplay}}
                </td>
                <td align="center">{{con.Amount}}
                </td>
                <td align="center">{{con.Remark}}
                </td>
            </tr>
            <tr ms-if="receiptDetailList.length == 0">
                <td colspan="4">抱歉！暂无支出明细数据。
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <table width="100%">
                        <tr>
                            <td>&nbsp;</td>
                            <td width="70">支出金额合计 </td>
                        </tr>
                    </table>
                </td>
                <td colspan="2">{{accounting.Amount}}元
                </td>
            </tr>
        </table>
        <table width="100%" style="margin: 0 auto;" border="0" cellspacing="1" cellpadding="0" class="tableList hasOfferPanel">
             <thead>
                 <tr class="head" style="background-color: rgb(250, 250, 250);">
                    <td width="10%" align="center">编号</td>
                    <td width="10%" align="center">计划日期</td>
                    <td width="10%" align="center">合同编号</td>
                    <td width="10%" align="center">款项批次</td>
                    <td width="15%" align="center">客户名称</td>
                    <td width="10%" align="center">{{arapType=='1'?'应付':'应收'}}金额</td>
                    <td width="10%" align="center"> 销账金额</td>
                    <td width="10%" align="center">备注</td>
                 </tr>
             </thead>
             <tbody>
                <tr ms-repeat-item="arapRelList">
                    <td align="center">{{item.SN}}</td>
                    <td align="center">{{item.PlanDate|truncate(10,'')}}</td>
                    <td align="center">{{item.Contract.ContractNum}}</td>
                    <td align="center">{{item.Batch}}</td>
                    <td align="center">{{item.CustomerName}}</td>
                    <td align="center">{{item.Money|currency}}</td>
                    <td align="right">{{item.SettleMoney|currency}}</td>
                    <td align="center">{{item.Remark}}</td>
                </tr>
            </tbody>
            <tfoot>
                 <tr style="background: #F5F5F7;" ms-if="arapRelList.length==0">
                    <td colspan="10">抱歉！暂无应付销账明细信息</td>
                 </tr>
            </tfoot>
             <tr>
                <td colspan="6">&nbsp; 
                     <span style="float: right;">销账金额合计</span>
                </td>
                <td colspan="3">{{arapAmount}}元  
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#D2D2D2" class="tablecInfo">
            <tr>
                <td width="80">支出备注：</td>
                <td colspan="7">{{accounting.Remark}}
                </td>
            </tr>
            <tr>
                <td width="80">领款人：</td>
                <td>{{accounting.Receiptman}} 
                </td>
                <td width="80">领导审批：</td>
                <td>{{accounting.Examiner}} 
                </td>
                <td width="80">支出日期：</td>
                <td>{{accounting.Receiptdate}}
                </td>
                <td width="80">录入人：</td>
                <td>{{accounting.AddByName}}
                </td>
            </tr>
            <tr>
                <td>会计：</td>
                <td>{{accounting.Accounting}} 
                </td>
                <td>核准：</td>
                <td>{{accounting.Checker}} 
                </td>
                <td>出纳：</td>
                <td>{{accounting.Teller}}
                </td>
                <td>经手：</td>
                <td>{{accounting.Broker}}
                </td>
            </tr>
        </table>
    </noscript>

</div>

