settlement.vm 23.3 KB
$page.setTitle("结算中心")
<div class="xn-breadcrumb xn-width auto clearfix ">
    <ul class="breadcrumb">
        <li><a class="icon icon-home_page" href="$customizationLink.setTarget("index")"></a> </li>
        <li><a href="$customizationContent.setTarget("report")">报表中心</a> </li>
        <li class="active">结算中心</li>
    </ul>
</div>
<div class="xn-main  auto xn-width  clearfix"  ng-controller="SettleMentIndexController">
    <!--搜索部分-->
    <div class="xn_search_box auto">
        <form class="form-horizontal clearfix xn-form"   name="searchForm" xn-form-validate  novalidate role="form">

                <div class="xn-input-line  clearfix">
                    <div class="xn-input-line  clearfix">
                        <label class="xn-label" style="margin-right: 15px">交易类型:</label>
                        <div class="xn-input-lg">
                            <div  xn-checkbox-list  ng-model="checkbox" data-checkbox-list="checkboxlist"></div>
                        </div>
                    </div>
                </div>

            <div class="xn-input-line  clearfix" style="margin-top: auto">
                <label  class="xn-label" >发生开始时间:</label>
                <div class="xn-col-sm-10" style="margin-top: auto">
                    <div class="input-group openData">
                        <input type="text" class="form-control" id="adjustmentStartTime"  placeholder="请选择开始时间"  ng-model="vm.startDate" name="regularDate"
                               datepicker-popup="yyyy-MM-dd" is-open="startDate" min-date="minDate"  datepicker-options="dateOptions"
                               date-disabled="disabled(date, mode)"  close-text="关闭" current-text="今天"  clear-text="清除">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button"  ng-click="openStart($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                        </span>
                    </div>
                </div>

                <label class="xn-label">发生结束时间:</label>
                <div class="xn-col-sm-10">
                    <div class="input-group openData">
                        <input type="text" class="form-control" id="adjustmentEndTime"  placeholder="请选择结束时间"  ng-model="vm.endDate" name="regularDate"
                               datepicker-popup="yyyy-MM-dd" is-open="endDate" min-date="minDate"  datepicker-options="dateOptions"
                               date-disabled="disabled(date, mode)"  close-text="关闭" current-text="今天"  clear-text="清除">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button"  ng-click="openEnd($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                        </span>
                    </div>
                </div>
            </div>


            <div class="xn-input-line  clearfix" style="margin-top: auto" ng-show="checkboxlist[0].state==true && checkboxlist[1].state==false">
                <label  class="xn-label" >结算开始时间:</label>
                <div class="xn-col-sm-10">
                    <div class="input-group openData">
                        <input type="text" class="form-control" id="settleStartDate"  placeholder="请选择开始时间"  ng-model="vm.settleStartDate" name="regularDate"
                               datepicker-popup="yyyy-MM-dd" is-open="settleStartDate" min-date="minDate"  datepicker-options="dateOptions"
                               date-disabled="disabled(date, mode)"  close-text="关闭" current-text="今天"  clear-text="清除">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button"  ng-click="openSettleStart($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                        </span>
                    </div>
                </div>

                <label class="xn-label">结算结束时间:</label>
                <div class="xn-col-sm-10">
                    <div class="input-group openData">
                        <input type="text" class="form-control" id="settleEndDate"  placeholder="请选择结束时间"  ng-model="vm.settleEndDate" name="regularDate"
                               datepicker-popup="yyyy-MM-dd" is-open="settleEndDate" min-date="minDate"  datepicker-options="dateOptions"
                               date-disabled="disabled(date, mode)"  close-text="关闭" current-text="今天"  clear-text="清除">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button"  ng-click="openSettleEnd($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                        </span>
                    </div>
                </div>
            </div>
        </form>
    </div>


    <div class="xn-table-wrap">
        <tabset class="f-left" vertical="false" type="pills">
            <tab heading="预付款"   ng-click="changeTab('PRE_PAYMENT')"></tab>
            <tab heading="标准付款" ng-click="changeTab('STANDARD_PAYMENT')"></tab>
            <tab heading="采购收货" ng-click="changeTab('PUR_RECEIVE')"></tab>
            <tab heading="采购退货" ng-click="changeTab('PUR_RETURN')"></tab>
            <tab heading="库存调整" ng-click="changeTab('INV_ADJUSTMENT')"></tab>
            <tab heading="销售发货" ng-click="changeTab('SM_SHIPMENT')"></tab>
        </tabset>
        <div class=" mb_10 pr_10 f-right">
            <a class="btn btn-success btn-sm w_80 f-right"  ng-click="doSettleBatch()">结算</a>
            <a class="btn btn-success btn-sm w_80 f-right" style="margin-right: 15px" ng-click="doSearch()">查询</a>
        </div>
    </div>


    <div class="xn-table-wrap" ng-show = "showTag == 'PRE_PAYMENT'">
        <table  class="table table-bordered table-striped ">
            <thead>
            <tr>
                <th class="xn-col-sm-1 xn-text-center">
                    <input type="checkbox"  ng-model="allChecked" ng-click="checkAll()" />
                </th>
                <th class="xn-col-sm-3 xn-center" >单号</th>
                <th class="xn-col-sm-3 xn-center">事业部</th>
                <th class="xn-col-sm-3 xn-center">供应商</th>
                <th class="xn-col-sm-4 xn-center">付款时间 </th>
                <th class="xn-col-sm-3 xn-center">付款人</th>
                <th class="xn-col-sm-3 xn-center">订单号</th>
                <th class="xn-col-sm-2 xn-center">结算金额</th>
                <th class="xn-col-sm-2 xn-center">结算状态</th>
                <th class="xn-col-sm-2 xn-center">操作</th>
            </tr>
            </thead>
            <tbody id="tbody" >
            <tr ng-repeat="settle in settleMentList">
                <td class="xn-col-sm-2 xn-text-center">
                    <input type="checkbox"  ng-model="settle.isChecked" ng-chk="chk(settle)"></input>
                </td>
                <td class="xn-col-sm-1 xn-center" ><a ng-href="$config.getDistributionUrl("")purchasing/payment/open/open.htm?id={{settle.sourceId}}&flowId=0">{{settle.sourceNumber}}</td>
                <td class="xn-col-sm-2 xn-center">{{settle.operatingUnitName}}</td>
                <td class="xn-col-sm-3 xn-center">{{settle.supplierName}}</td>
                <td class="xn-col-sm-4 xn-center">{{settle.time | timeToDateFormat}} </td>
                <td class="xn-col-sm-3 xn-center">{{settle.persion}}</td>
                <td class="xn-col-sm-3 xn-center"><a ng-href="$config.getDistributionUrl("")purchasing/order/open.htm?id={{settle.orderHeadId}}&flowId=0">{{settle.orderNumber}}</a></td>
                <td class="xn-col-sm-2 xn-center">{{settle.settleAmount}}</td>
                <td class="xn-col-sm-2 xn-center">{{settle.isSettled| settled}}</td>
                <td class="xn-col-sm-2 xn-center"><a class="btn btn-myprimary xn-center"  ng-click="doSettle(settle)">结算</a></td>
            </tr>
            <tr  ng-if="!vm.totalCount || vm.totalCount == 0"><td colspan="12" class="center">无法找到相应的记录</td></tr>
            </tbody>
        </table>
        <!--分页-->
        <div class="xn-table-wrap xn-text-center clearfix" ng-if="vm.totalCount ">
            <div class="f-left mt_20 mb_10">共{{vm.totalCount}}条</div>
            <pagination  ng-show="vm.totalCount>vm.pageSize"  ng-change="getList()"  max-size="maxPageSize" total-items="vm.totalCount"
                         ng-model="vm.pageNumber" items-per-page="vm.pageSize"  class="pagination-sm"  boundary-links="true"
                         previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>
        </div>
        <!--分页-->
    </div>
    <div class="xn-table-wrap" ng-show = "showTag == 'STANDARD_PAYMENT'">
        <table  class="table table-bordered table-striped ">
            <thead>
            <tr>
                <th class="xn-col-sm-2 xn-text-center">
                    <input type="checkbox"  ng-model="allChecked" ng-click="checkAll()" />
                </th>
                <th class="xn-col-sm-3 xn-center" >单号</th>
                <th class="xn-col-sm-3 xn-center">事业部</th>
                <th class="xn-col-sm-3 xn-center">供应商</th>
                <th class="xn-col-sm-4 xn-center">付款时间 </th>
                <th class="xn-col-sm-3 xn-center">付款人</th>
                <th class="xn-col-sm-4 xn-center">订单号</th>
                <th class="xn-col-sm-3 xn-center">收货单号</th>
                <th class="xn-col-sm-3 xn-center">结算金额</th>
                <th class="xn-col-sm-2 xn-center">结算状态</th>
                <th class="xn-col-sm-3 xn-center">操作</th>
            </tr>
            </thead>
            <tbody id="tbody" >
            <tr ng-repeat="settle in settleMentList">
            <td class="xn-col-sm-2 xn-text-center">
                <input type="checkbox"  ng-model="settle.isChecked" ng-chk="chk(settle)"></input>
            </td>
            <td class="xn-col-sm-3 xn-center"><a ng-href="$config.getDistributionUrl("")purchasing/payment/open/open.htm?id={{settle.sourceId}}&flowId=0">{{settle.sourceNumber}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.operatingUnitName}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.supplierName}}</td>
            <td class="xn-col-sm-4 xn-center">{{settle.time | timeToDateFormat}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.persion}}</td>
            <td class="xn-col-sm-4 xn-center"><a ng-href="$config.getDistributionUrl("")purchasing/order/open.htm?id={{settle.orderHeadId}}&flowId=0">{{settle.orderNumber}}</a></td>
            <td class="xn-col-sm-3 xn-center"><a ng-href="$config.getDistributionUrl("")purchasing/receipt/view.htm?id={{settle.receiptHeardId}}&flowId=0">{{settle.receiptNumber}}</a></td>
            <td class="xn-col-sm-3 xn-center">{{settle.settleAmount}}</td>
            <td class="xn-col-sm-2 xn-center">{{settle.isSettled| settled}}</td>
            <td class="xn-col-sm-2 xn-center"><a class="btn btn-myprimary xn-center"  ng-click="doSettle(settle)">结算</a></td>
            </tr>
            <tr  ng-if="!vm.totalCount || vm.totalCount == 0"><td colspan="12" class="center">无法找到相应的记录</td></tr>
            </tbody>
        </table>
        <!--分页-->
        <div class="xn-table-wrap xn-text-center clearfix" ng-if="vm.totalCount ">
            <div class="f-left mt_20 mb_10">共{{vm.totalCount}}条</div>
            <pagination  ng-show="vm.totalCount>vm.pageSize"  ng-change="getList()"  max-size="maxPageSize" total-items="vm.totalCount"
                         ng-model="vm.pageNumber" items-per-page="vm.pageSize"  class="pagination-sm"  boundary-links="true"
                         previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>
        </div>
    </div>
    <div class="xn-table-wrap" ng-show = "showTag == 'PUR_RECEIVE'">
        <table  class="table table-bordered table-striped ">
            <thead>
            <tr>
                <th class="xn-col-sm-1 xn-text-center">
                    <input type="checkbox"  ng-model="allChecked" ng-click="checkAll()" />
                </th>
                <th class="xn-col-sm-4 xn-center">单号</th>
                <th class="xn-col-sm-3 xn-center">事业部</th>
                <th class="xn-col-sm-3 xn-center">供应商</th>
                <th class="xn-col-sm-2 xn-center">库房</th>
                <th class="xn-col-sm-4 xn-center">订单号</th>
                <th class="xn-col-sm-4 xn-center">收货时间</th>
                <th class="xn-col-sm-2 xn-center">收货人</th>
                <th class="xn-col-sm-2 xn-center">收货商品金额</th>
                <th class="xn-col-sm-2 xn-center">结算状态</th>
                <th class="xn-col-sm-2 xn-center">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="settle in settleMentList">
            <td class="xn-col-sm-1 xn-text-center">
                <input type="checkbox"  ng-model="settle.isChecked" ng-chk="chk(settle)"></input>
            </td>
            <td class="xn-col-sm-4 xn-center" ><a ng-href="$config.getDistributionUrl("")purchasing/receipt/open.htm?id={{settle.sourceId}}&flowId=">{{settle.sourceNumber}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.operatingUnitName}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.supplierName}}</td>
            <td class="xn-col-sm-2 xn-center">{{settle.storeroomName}}</td>
            <td class="xn-col-sm-4 xn-center"><a ng-href="$config.getDistributionUrl("")purchasing/order/open.htm?id={{settle.orderHeadId}}&flowId=0">{{settle.orderNumber}}</a></td>
            <td class="xn-col-sm-4 xn-center">{{settle.time | timeToDateFormat}}</td>
            <td class="xn-col-sm-2 xn-center">{{settle.persion}}</td>
            <td class="xn-col-sm-2 xn-center">{{settle.settleAmount}}</td>
            <td class="xn-col-sm-2 xn-center">{{settle.isSettled | settled}}</td></td>
                <td class="xn-col-sm-2 xn-center"><a class="btn btn-myprimary xn-center"  ng-click="doSettle(settle)">结算</a></td>
            </tr>
            <tr  ng-if="!vm.totalCount || vm.totalCount == 0"><td colspan="12" class="center">无法找到相应的记录</td></tr>
            </tbody>
        </table>
        <!--分页-->
        <div class="xn-table-wrap xn-text-center clearfix" ng-if="vm.totalCount ">
            <div class="f-left mt_20 mb_10">共{{vm.totalCount}}条</div>
            <pagination  ng-show="vm.totalCount>vm.pageSize"  ng-change="getList()"  max-size="maxPageSize" total-items="vm.totalCount"
                         ng-model="vm.pageNumber" items-per-page="vm.pageSize"  class="pagination-sm"  boundary-links="true"
                         previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>
        </div>
    </div>
    <div class="xn-table-wrap" ng-show = "showTag == 'PUR_RETURN'">
        <table  class="table table-bordered table-striped ">
            <thead>
            <tr>
                <th class="xn-col-sm-2 xn-text-center">
                    <input type="checkbox"  ng-model="allChecked" ng-click="checkAll()" />
                </th>
                <th class="xn-col-sm-5 xn-center" >单号</th>
                <th class="xn-col-sm-4 xn-center">事业部</th>
                <th class="xn-col-sm-3 xn-center">供应商</th>
                <th class="xn-col-sm-3 xn-center">库房</th>
                <th class="xn-col-sm-3 xn-center">订单号</th>
                <th class="xn-col-sm-3 xn-center">退货时间</th>
                <th class="xn-col-sm-3 xn-center">退货人</th>
                <th class="xn-col-sm-3 xn-center">退货商品金额</th>
                <th class="xn-col-sm-3 xn-center">结算状态</th>
                <th class="xn-col-sm-3 xn-center">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="settle in settleMentList">
            <td class="xn-col-sm-2 xn-text-center">
                <input type="checkbox"  ng-model="settle.isChecked" ng-chk="chk(settle)"></input>
            </td>
            <td class="xn-col-sm-5 xn-center" ><a ng-href="$config.getDistributionUrl("")purchasing/backgoods/open.htm?id={{settle.sourceId}}&flowId=">{{settle.sourceNumber}}</td>
            <td class="xn-col-sm-4 xn-center">{{settle.operatingUnitName}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.supplierName}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.storeroomName}}</td>
            <td class="xn-col-sm-3 xn-center"><a ng-href="$config.getDistributionUrl("")purchasing/order/open.htm?id={{settle.orderHeadId}}&flowId=0">{{settle.orderNumber}}</a></td>
            <td class="xn-col-sm-3 xn-center">{{settle.time | timeToDateFormat}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.persion}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.settleAmount}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.isSettled | settled}}</td>
                <td class="xn-col-sm-2 xn-center"><a class="btn btn-myprimary xn-center"  ng-click="doSettle(settle)">结算</a></td>
            </tr>
            <tr  ng-if="!vm.totalCount || vm.totalCount == 0"><td colspan="12" class="center">无法找到相应的记录</td></tr>
            </tbody>
        </table>
        <!--分页-->
        <div class="xn-table-wrap xn-text-center clearfix" ng-if="vm.totalCount ">
            <div class="f-left mt_20 mb_10">共{{vm.totalCount}}条</div>
            <pagination  ng-show="vm.totalCount>vm.pageSize"  ng-change="getList()"  max-size="maxPageSize" total-items="vm.totalCount"
                         ng-model="vm.pageNumber" items-per-page="vm.pageSize"  class="pagination-sm"  boundary-links="true"
                         previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>
        </div>
    </div>
    <div class="xn-table-wrap" ng-show = "showTag == 'INV_ADJUSTMENT'">
        <table  class="table table-bordered table-striped ">
            <thead>
            <tr>
                <th class="xn-col-sm-2 xn-text-center">
                    <input type="checkbox"  ng-model="allChecked" ng-click="checkAll()" />
                </th>
                <th class="xn-col-sm-4 xn-center" >单号</th>
                <th class="xn-col-sm-3 xn-center">事业部</th>
                <th class="xn-col-sm-3 xn-center">库房</th>
                <th class="xn-col-sm-3 xn-center">类别</th>
                <th class="xn-col-sm-4 xn-center">调整时间</th>
                <th class="xn-col-sm-3 xn-center">调整人</th>
                <th class="xn-col-sm-3 xn-center">调整商品金额</th>
                <th class="xn-col-sm-2 xn-center">结算状态</th>
                <th class="xn-col-sm-2 xn-center">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="settle in settleMentList">
            <td class="xn-col-sm-2 xn-text-center">
                <input type="checkbox"  ng-model="settle.isChecked" ng-chk="chk(settle)"></input>
            </td>
            <td class="xn-col-sm-4 xn-center" ><a ng-href="$config.getDistributionUrl("")inventory/adjustment/open.htm?id={{settle.sourceId}}&flowId=0">{{settle.sourceNumber}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.operatingUnitName}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.storeroomName}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.typeName}}</td>
            <td class="xn-col-sm-4 xn-center">{{settle.time | timeToDateFormat}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.persion}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.settleAmount}}</td>
            <td class="xn-col-sm-2 xn-center">{{settle.isSettled | settled}}</td>
                <td class="xn-col-sm-2 xn-center"><a class="btn btn-myprimary xn-center"  ng-click="doSettle(settle)">结算</a></td>
            <tr  ng-if="!vm.totalCount || vm.totalCount == 0"><td colspan="12" class="center">无法找到相应的记录</td></tr>
            </tbody>
        </table>
        <!--分页-->
        <div class="xn-table-wrap xn-text-center clearfix" ng-if="vm.totalCount ">
            <div class="f-left mt_20 mb_10">共{{vm.totalCount}}条</div>
            <pagination  ng-show="vm.totalCount>vm.pageSize"  ng-change="getList()"  max-size="maxPageSize" total-items="vm.totalCount"
                         ng-model="vm.pageNumber" items-per-page="vm.pageSize"  class="pagination-sm"  boundary-links="true"
                         previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>
        </div>
    </div>
    <div class="xn-table-wrap" ng-show = "showTag == 'SM_SHIPMENT'">
        <table  class="table table-bordered table-striped ">
            <thead>
            <tr>
                <th class="xn-col-sm-2 xn-text-center">
                    <input type="checkbox"  ng-model="allChecked" ng-click="checkAll()" />
                </th>
                <th class="xn-col-sm-5 xn-center" >单号</th>
                <th class="xn-col-sm-4 xn-center">事业部</th>
                <th class="xn-col-sm-5 xn-center">店铺</th>
                <th class="xn-col-sm-5 xn-center">发货时间</th>
                <th class="xn-col-sm-3 xn-center">订单金额</th>
                <th class="xn-col-sm-3 xn-center">结算状态</th>
                <th class="xn-col-sm-3 xn-center">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="settle in settleMentList">
            <td class="xn-col-sm-2 xn-text-center">
                <input type="checkbox"  ng-model="settle.isChecked" ng-chk="chk(settle)"></input>
            </td>
            <td class="xn-col-sm-5 xn-center"><a ng-href="$config.getConfig('site.ordering.url')ecommerce/order/search.htm?sourceNumber={{settle.sourceNumber}}">{{settle.sourceNumber}}</td>
            <td class="xn-col-sm-4 xn-center">{{settle.operatingUnitName}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.stormName}}</td>
            <td class="xn-col-sm-5 xn-center">{{settle.time | timeToDateFormat}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.settleAmount}}</td>
            <td class="xn-col-sm-3 xn-center">{{settle.isSettled | settled}}</td>
                <td class="xn-col-sm-2 xn-center"><a class="btn btn-myprimary xn-center"  ng-click="doSettle(settle)">结算</a></td>
            </tbody>
            <tr  ng-if="!vm.totalCount || vm.totalCount == 0"><td colspan="12" class="center">无法找到相应的记录</td></tr>
            </tbody>
        </table>
        <!--分页-->
        <div class="xn-table-wrap xn-text-center clearfix" ng-if="vm.totalCount ">
            <div class="f-left mt_20 mb_10">共{{vm.totalCount}}条</div>
            <pagination  ng-show="vm.totalCount>vm.pageSize"  ng-change="getList()"  max-size="maxPageSize" total-items="vm.totalCount"
                         ng-model="vm.pageNumber" items-per-page="vm.pageSize"  class="pagination-sm"  boundary-links="true"
                         previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>
        </div>
    </div>
</div>


<script type="text/javascript" src="$customizationContent.getURI('dist/scripts/report.js')"></script>